Freeciv-3.2: /fast/freeciv/nightly/S3_2/client/gui-qt/qtg_cxxside.h Source File

Freeciv-3.2

Loading...
Searching...
No Matches
qtg_cxxside.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifndef FC__QTG_CXXSIDE_H
15#define FC__QTG_CXXSIDE_H
16
17// common
18#include "fc_types.h"
19
20// client
21#include "tilespec.h"
22
23// gui-qt
24#include "canvas.h"
25#include "pages.h"
26
27
28void setup_gui_funcs();
29
30void qtg_ui_init();
31int qtg_ui_main(int argc, char *argv[]);
32void qtg_ui_exit();
33
34enum gui_type qtg_get_gui_type();
35void qtg_insert_client_build_info(char *outbuf, size_t outlen);
36
37void qtg_version_message(const char *vertext);
38void qtg_real_output_window_append(const char *astring,
39 const struct text_tag_list *tags,
40 int conn_id);
41
42bool qtg_is_view_supported(enum ts_type type);
43void qtg_tileset_type_set(enum ts_type type);
44struct sprite *qtg_load_gfxfile(const char *filename, bool svgflag);
45struct sprite *qtg_load_gfxnumber(int num);
46struct sprite *qtg_create_sprite(int width, int height, struct color *pcolor);
47void qtg_get_sprite_dimensions(struct sprite *sprite, int *width, int *height);
48struct sprite *qtg_crop_sprite(struct sprite *source,
49 int x, int y, int width, int height,
50 struct sprite *mask,
51 int mask_offset_x, int mask_offset_y,
52 float scale, bool smooth);
53void qtg_free_sprite(struct sprite *s);
54
55struct color *qtg_color_alloc(int r, int g, int b);
56void qtg_color_free(struct color *pcolor);
57
58struct canvas *qtg_canvas_create(int width, int height);
59void qtg_canvas_free(struct canvas *store);
60void qtg_canvas_set_zoom(struct canvas *store, float zoom);
61bool qtg_has_zoom_support();
62void qtg_canvas_mapview_init(struct canvas *store);
63void qtg_canvas_copy(struct canvas *dest, struct canvas *src,
64 int src_x, int src_y, int dest_x, int dest_y, int width,
65 int height);
66void qtg_canvas_put_sprite(struct canvas *pcanvas,
67 int canvas_x, int canvas_y,
68 struct sprite *sprite,
69 int offset_x, int offset_y, int width, int height);
70void qtg_canvas_put_sprite_full(struct canvas *pcanvas,
71 int canvas_x, int canvas_y,
72 struct sprite *sprite);
73void qtg_canvas_put_sprite_full_scaled(struct canvas *pcanvas,
74 int canvas_x, int canvas_y,
75 int canvas_w, int canvas_h,
76 struct sprite *sprite);
77void qtg_canvas_put_sprite_fogged(struct canvas *pcanvas,
78 int canvas_x, int canvas_y,
79 struct sprite *psprite,
80 bool fog, int fog_x, int fog_y);
81void qtg_canvas_put_rectangle(struct canvas *pcanvas,
82 struct color *pcolor,
83 int canvas_x, int canvas_y,
84 int width, int height);
85void qtg_canvas_fill_sprite_area(struct canvas *pcanvas,
86 struct sprite *psprite, struct color *pcolor,
87 int canvas_x, int canvas_y);
88void qtg_canvas_put_line(struct canvas *pcanvas, struct color *pcolor,
89 enum line_type ltype, int start_x, int start_y,
90 int dx, int dy);
91void qtg_canvas_put_curved_line(struct canvas *pcanvas, struct color *pcolor,
92 enum line_type ltype, int start_x, int start_y,
93 int dx, int dy);
94void qtg_get_text_size(int *width, int *height,
95 enum client_font font, const char *text);
96void qtg_canvas_put_text(struct canvas *pcanvas, int canvas_x, int canvas_y,
97 enum client_font font, struct color *pcolor,
98 const char *text);
99
100void qtg_map_canvas_size_refresh(void);
101
102void qtg_set_rulesets(int num_rulesets, char **rulesets);
103void qtg_options_extra_init();
104void qtg_server_connect();
105void qtg_add_net_input(int sock);
106void qtg_remove_net_input();
107void qtg_real_conn_list_dialog_update(void *unused);
108void qtg_close_connection_dialog();
109void qtg_add_idle_callback(void (callback)(void *), void *data);
110void qtg_sound_bell();
111
112void qtg_real_set_client_page(enum client_pages page);
113enum client_pages qtg_get_current_client_page();
114
115void qtg_popup_combat_info(int attacker_unit_id, int defender_unit_id,
116 int attacker_hp, int defender_hp,
117 bool make_att_veteran, bool make_def_veteran);
118void qtg_set_unit_icon(int idx, struct unit *punit);
119void qtg_set_unit_icons_more_arrow(bool onoff);
120void qtg_real_focus_units_changed(void);
121void qtg_gui_update_font(const char *font_name, const char *font_value);
122
123void qtg_editgui_refresh();
124void qtg_editgui_notify_object_created(int tag, int id);
125void qtg_editgui_notify_object_changed(int objtype, int object_id, bool removal);
126void qtg_editgui_popup_properties(const struct tile_list *tiles, int objtype);
127void qtg_editgui_tileset_changed();
128void qtg_editgui_popdown_all();
129
130void qtg_update_timeout_label();
131void qtg_start_turn();
132void qtg_real_city_dialog_popup(struct city *pcity);
133void qtg_real_city_dialog_refresh(struct city *pcity);
134void qtg_popdown_city_dialog(struct city *pcity);
135void qtg_popdown_all_city_dialogs();
136bool qtg_handmade_scenario_warning();
137void qtg_refresh_unit_city_dialogs(struct unit *punit);
138bool qtg_city_dialog_is_open(struct city *pcity);
139
140bool qtg_request_transport(struct unit *pcargo, struct tile *ptile);
141
142void qtg_update_infra_dialog();
143
144void qtg_gui_load_theme(const char *directory, const char *theme_name);
145void qtg_gui_clear_theme();
146char **qtg_get_gui_specific_themes_directories(int *count);
147char **qtg_get_useable_themes_in_directory(const char *directory, int *count);
148
149void qtg_init_meeting(struct Treaty *ptreaty, struct player *they,
150 struct player *initiator);
151void qtg_recv_cancel_meeting(struct Treaty *ptreaty, struct player *they,
152 struct player *initiator);
153void qtg_prepare_clause_updt(struct Treaty *ptreaty, struct player *they);
154void qtg_recv_create_clause(struct Treaty *ptreaty, struct player *they);
155void qtg_recv_remove_clause(struct Treaty *ptreaty, struct player *they);
156void qtg_recv_accept_treaty(struct Treaty *ptreaty, struct player *they);
157
158void qtg_request_action_confirmation(const char *expl,
159 struct act_confirmation_data *data);
160
161#endif // FC__QTG_CXXSIDE_H
height
struct canvas int int struct sprite int int int int height
Definition canvas_g.h:44
pcolor
struct canvas int int int int struct sprite *sprite struct canvas struct color * pcolor
Definition canvas_g.h:56
canvas_y
struct canvas int int canvas_y
Definition canvas_g.h:43
canvas_x
struct canvas int canvas_x
Definition canvas_g.h:43
canvas_w
struct canvas int int int canvas_w
Definition canvas_g.h:49
canvas_h
struct canvas int int int int canvas_h
Definition canvas_g.h:49
pcanvas
struct canvas * pcanvas
Definition canvas_g.h:42
offset_y
struct canvas int int struct sprite int int offset_y
Definition canvas_g.h:44
offset_x
struct canvas int int struct sprite int offset_x
Definition canvas_g.h:44
width
struct canvas int int struct sprite int int int width
Definition canvas_g.h:44
line_type
line_type
Definition canvas_g.h:25
incite_cost
char * incite_cost
Definition comments.c:74
punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
Definition dialogs_g.h:74
ptreaty
struct Treaty * ptreaty
Definition diplodlg_g.h:28
they
struct Treaty struct player * they
Definition diplodlg_g.h:28
objtype
int objtype
Definition editgui_g.h:28
fc_types.h
source
static GtkWidget * source
Definition gotodlg.c:58
type
GType type
Definition repodlgs.c:1313
canvas.h
pages.h
font_name
const char * font_name
Definition gui_main_g.h:43
qtg_handmade_scenario_warning
bool qtg_handmade_scenario_warning()
Definition dialogs.cpp:4856
qtg_popdown_city_dialog
void qtg_popdown_city_dialog(struct city *pcity)
Definition citydlg.cpp:3734
qtg_crop_sprite
struct sprite * qtg_crop_sprite(struct sprite *source, int x, int y, int width, int height, struct sprite *mask, int mask_offset_x, int mask_offset_y, float scale, bool smooth)
Definition sprite.cpp:104
qtg_recv_create_clause
void qtg_recv_create_clause(struct Treaty *ptreaty, struct player *they)
Definition diplodlg.cpp:1038
setup_gui_funcs
void setup_gui_funcs()
Definition qtg_cxxside.cpp:29
qtg_recv_accept_treaty
void qtg_recv_accept_treaty(struct Treaty *ptreaty, struct player *they)
Definition diplodlg.cpp:919
qtg_real_set_client_page
void qtg_real_set_client_page(enum client_pages page)
Definition pages.cpp:103
qtg_get_text_size
void qtg_get_text_size(int *width, int *height, enum client_font font, const char *text)
Definition canvas.cpp:331
qtg_canvas_fill_sprite_area
void qtg_canvas_fill_sprite_area(struct canvas *pcanvas, struct sprite *psprite, struct color *pcolor, int canvas_x, int canvas_y)
Definition canvas.cpp:234
qtg_ui_init
void qtg_ui_init()
Definition gui_main.cpp:92
qtg_real_city_dialog_refresh
void qtg_real_city_dialog_refresh(struct city *pcity)
Definition citydlg.cpp:3754
qtg_editgui_popup_properties
void qtg_editgui_popup_properties(const struct tile_list *tiles, int objtype)
Definition gui_main.cpp:506
qtg_remove_net_input
void qtg_remove_net_input()
Definition gui_main.cpp:318
qtg_get_current_client_page
enum client_pages qtg_get_current_client_page()
Definition pages.cpp:121
qtg_canvas_put_text
void qtg_canvas_put_text(struct canvas *pcanvas, int canvas_x, int canvas_y, enum client_font font, struct color *pcolor, const char *text)
Definition canvas.cpp:354
qtg_prepare_clause_updt
void qtg_prepare_clause_updt(struct Treaty *ptreaty, struct player *they)
Definition diplodlg.cpp:1030
qtg_update_infra_dialog
void qtg_update_infra_dialog()
Definition infradlg.cpp:24
qtg_has_zoom_support
bool qtg_has_zoom_support()
Definition canvas.cpp:64
qtg_get_useable_themes_in_directory
char ** qtg_get_useable_themes_in_directory(const char *directory, int *count)
Definition themes.cpp:145
qtg_get_sprite_dimensions
void qtg_get_sprite_dimensions(struct sprite *sprite, int *width, int *height)
Definition sprite.cpp:163
qtg_options_extra_init
void qtg_options_extra_init()
Definition gui_main.cpp:237
qtg_canvas_put_sprite_full
void qtg_canvas_put_sprite_full(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite)
Definition canvas.cpp:154
qtg_editgui_refresh
void qtg_editgui_refresh()
Definition gui_main.cpp:500
qtg_load_gfxfile
struct sprite * qtg_load_gfxfile(const char *filename, bool svgflag)
Definition sprite.cpp:67
qtg_canvas_free
void qtg_canvas_free(struct canvas *store)
Definition canvas.cpp:48
qtg_city_dialog_is_open
bool qtg_city_dialog_is_open(struct city *pcity)
Definition citydlg.cpp:3809
qtg_set_rulesets
void qtg_set_rulesets(int num_rulesets, char **rulesets)
Definition pages.cpp:113
qtg_canvas_put_curved_line
void qtg_canvas_put_curved_line(struct canvas *pcanvas, struct color *pcolor, enum line_type ltype, int start_x, int start_y, int dx, int dy)
Definition canvas.cpp:286
qtg_init_meeting
void qtg_init_meeting(struct Treaty *ptreaty, struct player *they, struct player *initiator)
Definition diplodlg.cpp:944
qtg_canvas_put_sprite_full_scaled
void qtg_canvas_put_sprite_full_scaled(struct canvas *pcanvas, int canvas_x, int canvas_y, int canvas_w, int canvas_h, struct sprite *sprite)
Definition canvas.cpp:168
qtg_canvas_put_line
void qtg_canvas_put_line(struct canvas *pcanvas, struct color *pcolor, enum line_type ltype, int start_x, int start_y, int dx, int dy)
Definition canvas.cpp:247
qtg_ui_main
int qtg_ui_main(int argc, char *argv[])
Definition gui_main.cpp:170
qtg_popdown_all_city_dialogs
void qtg_popdown_all_city_dialogs()
Definition citydlg.cpp:3746
qtg_recv_cancel_meeting
void qtg_recv_cancel_meeting(struct Treaty *ptreaty, struct player *they, struct player *initiator)
Definition diplodlg.cpp:1062
qtg_editgui_popdown_all
void qtg_editgui_popdown_all()
Definition gui_main.cpp:512
qtg_is_view_supported
bool qtg_is_view_supported(enum ts_type type)
Definition graphics.cpp:28
qtg_update_timeout_label
void qtg_update_timeout_label()
Definition mapview.cpp:1086
qtg_gui_clear_theme
void qtg_gui_clear_theme()
Definition themes.cpp:104
qtg_real_conn_list_dialog_update
void qtg_real_conn_list_dialog_update(void *unused)
Definition gui_main.cpp:283
qtg_refresh_unit_city_dialogs
void qtg_refresh_unit_city_dialogs(struct unit *punit)
Definition citydlg.cpp:3793
qtg_tileset_type_set
void qtg_tileset_type_set(enum ts_type type)
Definition graphics.cpp:42
qtg_free_sprite
void qtg_free_sprite(struct sprite *s)
Definition sprite.cpp:172
qtg_request_action_confirmation
void qtg_request_action_confirmation(const char *expl, struct act_confirmation_data *data)
Definition dialogs.cpp:4949
qtg_editgui_tileset_changed
void qtg_editgui_tileset_changed()
Definition gui_main.cpp:494
qtg_gui_load_theme
void qtg_gui_load_theme(const char *directory, const char *theme_name)
Definition themes.cpp:44
qtg_canvas_create
struct canvas * qtg_canvas_create(int width, int height)
Definition canvas.cpp:36
qtg_editgui_notify_object_created
void qtg_editgui_notify_object_created(int tag, int id)
Definition gui_main.cpp:525
qtg_canvas_put_sprite
void qtg_canvas_put_sprite(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite, int offset_x, int offset_y, int width, int height)
Definition canvas.cpp:139
qtg_close_connection_dialog
void qtg_close_connection_dialog()
Definition connectdlg.cpp:39
qtg_canvas_copy
void qtg_canvas_copy(struct canvas *dest, struct canvas *src, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
Definition canvas.cpp:79
qtg_popup_combat_info
void qtg_popup_combat_info(int attacker_unit_id, int defender_unit_id, int attacker_hp, int defender_hp, bool make_att_veteran, bool make_def_veteran)
Definition dialogs.cpp:4906
qtg_add_net_input
void qtg_add_net_input(int sock)
Definition gui_main.cpp:308
qtg_color_alloc
struct color * qtg_color_alloc(int r, int g, int b)
Definition colors.cpp:33
qtg_real_city_dialog_popup
void qtg_real_city_dialog_popup(struct city *pcity)
Definition citydlg.cpp:3706
qtg_editgui_notify_object_changed
void qtg_editgui_notify_object_changed(int objtype, int object_id, bool removal)
Definition gui_main.cpp:518
qtg_gui_update_font
void qtg_gui_update_font(const char *font_name, const char *font_value)
Definition gui_main.cpp:531
qtg_set_unit_icon
void qtg_set_unit_icon(int idx, struct unit *punit)
Definition gui_main.cpp:334
qtg_ui_exit
void qtg_ui_exit()
Definition gui_main.cpp:273
qtg_load_gfxnumber
struct sprite * qtg_load_gfxnumber(int num)
Definition sprite.cpp:195
qtg_get_gui_specific_themes_directories
char ** qtg_get_gui_specific_themes_directories(int *count)
Definition themes.cpp:120
qtg_server_connect
void qtg_server_connect()
Definition connectdlg.cpp:77
qtg_version_message
void qtg_version_message(const char *vertext)
Definition chatline.cpp:806
qtg_real_output_window_append
void qtg_real_output_window_append(const char *astring, const struct text_tag_list *tags, int conn_id)
Definition chatline.cpp:738
qtg_start_turn
void qtg_start_turn()
Definition mapview.cpp:1447
qtg_map_canvas_size_refresh
void qtg_map_canvas_size_refresh(void)
Definition mapview.cpp:1459
qtg_real_focus_units_changed
void qtg_real_focus_units_changed(void)
Definition gui_main.cpp:356
qtg_insert_client_build_info
void qtg_insert_client_build_info(char *outbuf, size_t outlen)
Definition gui_main.cpp:587
qtg_set_unit_icons_more_arrow
void qtg_set_unit_icons_more_arrow(bool onoff)
Definition gui_main.cpp:346
qtg_canvas_put_rectangle
void qtg_canvas_put_rectangle(struct canvas *pcanvas, struct color *pcolor, int canvas_x, int canvas_y, int width, int height)
Definition canvas.cpp:205
qtg_canvas_put_sprite_fogged
void qtg_canvas_put_sprite_fogged(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *psprite, bool fog, int fog_x, int fog_y)
Definition canvas.cpp:188
qtg_create_sprite
struct sprite * qtg_create_sprite(int width, int height, struct color *pcolor)
Definition sprite.cpp:181
qtg_add_idle_callback
void qtg_add_idle_callback(void(callback)(void *), void *data)
Definition gui_main.cpp:372
qtg_get_gui_type
enum gui_type qtg_get_gui_type()
Definition gui_main.cpp:549
qtg_request_transport
bool qtg_request_transport(struct unit *pcargo, struct tile *ptile)
Definition dialogs.cpp:4865
qtg_canvas_set_zoom
void qtg_canvas_set_zoom(struct canvas *store, float zoom)
Definition canvas.cpp:56
qtg_canvas_mapview_init
void qtg_canvas_mapview_init(struct canvas *store)
Definition canvas.cpp:72
qtg_color_free
void qtg_color_free(struct color *pcolor)
Definition colors.cpp:45
qtg_sound_bell
void qtg_sound_bell()
Definition gui_main.cpp:295
qtg_recv_remove_clause
void qtg_recv_remove_clause(struct Treaty *ptreaty, struct player *they)
Definition diplodlg.cpp:1082
mask
struct sprite int int int int struct sprite * mask
Definition sprite_g.h:32
y
struct sprite int int y
Definition sprite_g.h:31
scale
struct sprite int int int int struct sprite int int float scale
Definition sprite_g.h:33
mask_offset_x
struct sprite int int int int struct sprite int mask_offset_x
Definition sprite_g.h:32
x
struct sprite int x
Definition sprite_g.h:31
mask_offset_y
struct sprite int int int int struct sprite int int mask_offset_y
Definition sprite_g.h:32
Treaty
Definition diptreaty.h:78
act_confirmation_data
Definition control.h:145
astring
Definition astring.h:36
callback
Definition gui_main.c:2404
canvas
Definition canvas.h:22
canvas::zoom
float zoom
Definition canvas.h:25
city
Definition city.h:320
color
Definition colors.h:21
color::g
int g
Definition colors.h:21
color::r
int r
Definition colors.h:21
color::b
int b
Definition colors.h:21
player
Definition player.h:247
sprite
Definition sprite.h:22
tile
Definition tile.h:50
unit
Definition unit.h:138
directory
const char * directory
Definition themes_g.h:23
tilespec.h