Freeciv-3.3
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();
36
37void qtg_version_message(const char *vertext);
39 const struct text_tag_list *tags,
40 int conn_id);
41
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,
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);
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);
67 int canvas_x, int canvas_y,
68 struct sprite *sprite,
69 int offset_x, int offset_y, int width, int height);
71 int canvas_x, int canvas_y,
72 struct sprite *sprite);
74 int canvas_x, int canvas_y,
75 int canvas_w, int canvas_h,
76 struct sprite *sprite);
78 int canvas_x, int canvas_y,
79 struct sprite *psprite,
80 bool fog, int fog_x, int fog_y);
82 struct color *pcolor,
83 int canvas_x, int canvas_y,
84 int width, int height);
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);
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);
97 enum client_font font, struct color *pcolor,
98 const char *text);
99
101
102void qtg_set_rulesets(int num_rulesets, char **rulesets);
104void qtg_server_connect();
105void qtg_add_net_input(int sock);
109void qtg_add_idle_callback(void (callback)(void *), void *data);
110void qtg_sound_bell();
111
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);
121void qtg_gui_update_font(const char *font_name, const char *font_value);
122
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);
129
131void qtg_start_turn();
139
140bool qtg_request_transport(struct unit *pcargo, struct tile *ptile);
141
143
144void qtg_gui_load_theme(const char *directory, const char *theme_name);
147char **qtg_get_usable_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
159 struct act_confirmation_data *data);
160
168
169void qtg_popup_image(const char *tag);
170
172
173#endif // FC__QTG_CXXSIDE_H
struct canvas int int struct sprite int int int int height
Definition canvas_g.h:44
struct canvas int int int int struct sprite *sprite struct canvas struct color * pcolor
Definition canvas_g.h:56
struct canvas int int canvas_y
Definition canvas_g.h:43
struct canvas int canvas_x
Definition canvas_g.h:43
struct canvas int int int canvas_w
Definition canvas_g.h:49
struct canvas int int int int canvas_h
Definition canvas_g.h:49
struct canvas * pcanvas
Definition canvas_g.h:42
struct canvas int int struct sprite int int offset_y
Definition canvas_g.h:44
struct canvas int int struct sprite int offset_x
Definition canvas_g.h:44
struct canvas int int struct sprite int int int width
Definition canvas_g.h:44
line_type
Definition canvas_g.h:25
char * incite_cost
Definition comments.c:76
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 int const struct action *paction struct unit struct city const struct action *paction const char * expl
Definition dialogs_g.h:94
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
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 int const struct action *paction struct unit struct city * pcity
Definition dialogs_g.h:78
struct treaty * ptreaty
Definition diplodlg_g.h:28
struct treaty struct player * they
Definition diplodlg_g.h:28
int objtype
Definition editgui_g.h:28
static GtkWidget * source
Definition gotodlg.c:58
GType type
Definition repodlgs.c:1313
const char * font_name
Definition gui_main_g.h:43
bool qtg_handmade_scenario_warning()
Definition dialogs.cpp:4929
void qtg_popdown_city_dialog(struct city *pcity)
Definition citydlg.cpp:3852
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
void qtg_real_economy_report_dialog_update(void *unused)
void setup_gui_funcs()
void qtg_real_set_client_page(enum client_pages page)
Definition pages.cpp:104
void qtg_get_text_size(int *width, int *height, enum client_font font, const char *text)
Definition canvas.cpp:331
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
void qtg_ui_init()
Definition gui_main.cpp:90
void qtg_real_city_dialog_refresh(struct city *pcity)
Definition citydlg.cpp:3872
void qtg_editgui_popup_properties(const struct tile_list *tiles, int objtype)
Definition gui_main.cpp:504
void qtg_remove_net_input()
Definition gui_main.cpp:316
void qtg_init_meeting(struct treaty *ptreaty, struct player *they, struct player *initiator)
Definition diplodlg.cpp:944
void qtg_recv_remove_clause(struct treaty *ptreaty, struct player *they)
enum client_pages qtg_get_current_client_page()
Definition pages.cpp:122
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
void qtg_update_infra_dialog()
Definition infradlg.cpp:24
bool qtg_has_zoom_support()
Definition canvas.cpp:64
void qtg_science_report_dialog_redraw()
void qtg_get_sprite_dimensions(struct sprite *sprite, int *width, int *height)
Definition sprite.cpp:163
void qtg_options_extra_init()
Definition gui_main.cpp:235
void qtg_canvas_put_sprite_full(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite)
Definition canvas.cpp:154
void qtg_editgui_refresh()
Definition gui_main.cpp:498
struct sprite * qtg_load_gfxfile(const char *filename, bool svgflag)
Definition sprite.cpp:67
void qtg_canvas_free(struct canvas *store)
Definition canvas.cpp:48
bool qtg_city_dialog_is_open(struct city *pcity)
Definition citydlg.cpp:3927
void qtg_popup_image(const char *tag)
Definition dialogs.cpp:5040
void qtg_recv_accept_treaty(struct treaty *ptreaty, struct player *they)
Definition diplodlg.cpp:919
void qtg_set_rulesets(int num_rulesets, char **rulesets)
Definition pages.cpp:114
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
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
void qtg_recv_create_clause(struct treaty *ptreaty, struct player *they)
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
int qtg_ui_main(int argc, char *argv[])
Definition gui_main.cpp:168
void qtg_popdown_all_city_dialogs()
Definition citydlg.cpp:3864
void qtg_editgui_popdown_all()
Definition gui_main.cpp:510
char ** qtg_get_usable_themes_in_directory(const char *directory, int *count)
Definition themes.cpp:145
bool qtg_is_view_supported(enum ts_type type)
Definition graphics.cpp:28
void qtg_recv_cancel_meeting(struct treaty *ptreaty, struct player *they, struct player *initiator)
void qtg_update_timeout_label()
Definition mapview.cpp:1086
void qtg_real_units_report_dialog_update(void *unused)
void qtg_gui_clear_theme()
Definition themes.cpp:104
void qtg_endgame_report_dialog_player(const struct packet_endgame_player *packet)
void qtg_real_conn_list_dialog_update(void *unused)
Definition gui_main.cpp:281
void qtg_refresh_unit_city_dialogs(struct unit *punit)
Definition citydlg.cpp:3911
void qtg_tileset_type_set(enum ts_type type)
Definition graphics.cpp:44
void qtg_free_sprite(struct sprite *s)
Definition sprite.cpp:172
void qtg_request_action_confirmation(const char *expl, struct act_confirmation_data *data)
Definition dialogs.cpp:5022
void qtg_editgui_tileset_changed()
Definition gui_main.cpp:492
void qtg_gui_load_theme(const char *directory, const char *theme_name)
Definition themes.cpp:44
struct canvas * qtg_canvas_create(int width, int height)
Definition canvas.cpp:36
void qtg_editgui_notify_object_created(int tag, int id)
Definition gui_main.cpp:523
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
void qtg_close_connection_dialog()
void qtg_setup_gui_properties()
Definition gui_main.cpp:606
void qtg_real_science_report_dialog_update(void *unused)
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
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:4979
void qtg_add_net_input(int sock)
Definition gui_main.cpp:306
struct color * qtg_color_alloc(int r, int g, int b)
Definition colors.cpp:33
void qtg_real_city_dialog_popup(struct city *pcity)
Definition citydlg.cpp:3824
void qtg_editgui_notify_object_changed(int objtype, int object_id, bool removal)
Definition gui_main.cpp:516
void qtg_gui_update_font(const char *font_name, const char *font_value)
Definition gui_main.cpp:529
void qtg_set_unit_icon(int idx, struct unit *punit)
Definition gui_main.cpp:332
void qtg_ui_exit()
Definition gui_main.cpp:271
struct sprite * qtg_load_gfxnumber(int num)
Definition sprite.cpp:195
char ** qtg_get_gui_specific_themes_directories(int *count)
Definition themes.cpp:120
void qtg_server_connect()
void qtg_science_report_dialog_popup(bool raise)
void qtg_version_message(const char *vertext)
Definition chatline.cpp:833
void qtg_real_output_window_append(const char *astring, const struct text_tag_list *tags, int conn_id)
Definition chatline.cpp:765
void qtg_start_turn()
Definition mapview.cpp:1447
void qtg_map_canvas_size_refresh(void)
Definition mapview.cpp:1459
void qtg_real_focus_units_changed(void)
Definition gui_main.cpp:354
void qtg_insert_client_build_info(char *outbuf, size_t outlen)
Definition gui_main.cpp:585
void qtg_set_unit_icons_more_arrow(bool onoff)
Definition gui_main.cpp:344
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
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
struct sprite * qtg_create_sprite(int width, int height, struct color *pcolor)
Definition sprite.cpp:181
void qtg_add_idle_callback(void(callback)(void *), void *data)
Definition gui_main.cpp:370
void qtg_endgame_report_dialog_start(const struct packet_endgame_report *packet)
enum gui_type qtg_get_gui_type()
Definition gui_main.cpp:547
bool qtg_request_transport(struct unit *pcargo, struct tile *ptile)
Definition dialogs.cpp:4938
void qtg_canvas_set_zoom(struct canvas *store, float zoom)
Definition canvas.cpp:56
void qtg_prepare_clause_updt(struct treaty *ptreaty, struct player *they)
void qtg_canvas_mapview_init(struct canvas *store)
Definition canvas.cpp:72
void qtg_color_free(struct color *pcolor)
Definition colors.cpp:45
void qtg_sound_bell()
Definition gui_main.cpp:293
struct sprite int int int int struct sprite * mask
Definition sprite_g.h:32
struct sprite int int y
Definition sprite_g.h:31
struct sprite int int int int struct sprite int int float scale
Definition sprite_g.h:33
struct sprite int int int int struct sprite int mask_offset_x
Definition sprite_g.h:32
struct sprite int x
Definition sprite_g.h:31
struct sprite int int int int struct sprite int int mask_offset_y
Definition sprite_g.h:32
float zoom
Definition canvas.h:25
Definition city.h:317
Definition colors.h:21
int g
Definition colors.h:21
int r
Definition colors.h:21
int b
Definition colors.h:21
Definition tile.h:50
Definition unit.h:140
const char * directory
Definition themes_g.h:23