Removed silencing of gtk warning logs from gtk3.22-client.
[freeciv.git] / client / gui_interface.h
blob5a03fb1dfcd14dee9ee605e749b5df21cb42af81
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.
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 ***********************************************************************/
14 #ifndef FC__QTG_CSIDE_H
15 #define FC__QTG_CSIDE_H
17 #ifdef __cplusplus
18 extern "C" {
19 #endif /* __cplusplus */
21 /* common */
22 #include "fc_types.h"
23 #include "featured_text.h"
24 #include "tile.h"
26 /* client/include */
27 #include "canvas_g.h"
28 #include "pages_g.h"
30 /* client */
31 #include "tilespec.h"
33 struct gui_funcs {
34 void (*ui_init)(void);
35 void (*ui_main)(int argc, char *argv[]);
36 void (*ui_exit)(void);
38 enum gui_type (*get_gui_type)(void);
39 void (*insert_client_build_info)(char *outbuf, size_t outlen);
40 void (*adjust_default_options)(void);
42 void (*version_message)(const char *vertext);
43 void (*real_output_window_append)(const char *astring,
44 const struct text_tag_list *tags,
45 int conn_id);
47 bool (*is_view_supported)(enum ts_type type);
48 void (*free_intro_radar_sprites)(void);
49 struct sprite * (*load_gfxfile)(const char *filename);
50 struct sprite * (*create_sprite)(int width, int height, struct color *pcolor);
51 void (*get_sprite_dimensions)(struct sprite *sprite, int *width, int *height);
52 struct sprite * (*crop_sprite)(struct sprite *source,
53 int x, int y, int width, int height,
54 struct sprite *mask,
55 int mask_offset_x, int mask_offset_y);
56 void (*free_sprite)(struct sprite *s);
58 struct color *(*color_alloc)(int r, int g, int b);
59 void (*color_free)(struct color *pcolor);
61 struct canvas *(*canvas_create)(int width, int height);
62 void (*canvas_free)(struct canvas *store);
63 void (*canvas_set_zoom)(struct canvas *store, float zoom);
64 bool (*has_zoom_support)(void);
65 void (*canvas_copy)(struct canvas *dest, struct canvas *src,
66 int src_x, int src_y, int dest_x, int dest_y, int width,
67 int height);
68 void (*canvas_put_sprite)(struct canvas *pcanvas,
69 int canvas_x, int canvas_y,
70 struct sprite *psprite,
71 int offset_x, int offset_y, int width, int height);
72 void (*canvas_put_sprite_full)(struct canvas *pcanvas,
73 int canvas_x, int canvas_y,
74 struct sprite *psprite);
75 void (*canvas_put_sprite_fogged)(struct canvas *pcanvas,
76 int canvas_x, int canvas_y,
77 struct sprite *psprite,
78 bool fog, int fog_x, int fog_y);
79 void (*canvas_put_rectangle)(struct canvas *pcanvas,
80 struct color *pcolor,
81 int canvas_x, int canvas_y,
82 int width, int height);
83 void (*canvas_fill_sprite_area)(struct canvas *pcanvas,
84 struct sprite *psprite, struct color *pcolor,
85 int canvas_x, int canvas_y);
86 void (*canvas_put_line)(struct canvas *pcanvas, struct color *pcolor,
87 enum line_type ltype, int start_x, int start_y,
88 int dx, int dy);
89 void (*canvas_put_curved_line)(struct canvas *pcanvas, struct color *pcolor,
90 enum line_type ltype, int start_x, int start_y,
91 int dx, int dy);
92 void (*get_text_size)(int *width, int *height,
93 enum client_font font, const char *text);
94 void (*canvas_put_text)(struct canvas *pcanvas, int canvas_x, int canvas_y,
95 enum client_font font, struct color *pcolor,
96 const char *text);
98 void (*set_rulesets)(int num_rulesets, char **rulesets);
99 void (*options_extra_init)(void);
100 void (*server_connect)(void);
101 void (*add_net_input)(int sock);
102 void (*remove_net_input)(void);
103 void (*real_conn_list_dialog_update)(void);
104 void (*close_connection_dialog)(void);
105 void (*add_idle_callback)(void (callback)(void *), void *data);
106 void (*sound_bell)(void);
108 void (*real_set_client_page)(enum client_pages page);
109 enum client_pages (*get_current_client_page)(void);
111 void (*set_unit_icon)(int idx, struct unit *punit);
112 void (*set_unit_icons_more_arrow)(bool onoff);
113 void (*real_focus_units_changed)(void);
114 void (*gui_update_font)(const char *font_name, const char *font_value);
115 void (*set_city_names_font_sizes)(int my_city_names_font_size,
116 int my_city_productions_font_size);
118 void (*editgui_refresh)(void);
119 void (*editgui_notify_object_created)(int tag, int id);
120 void (*editgui_notify_object_changed)(int objtype, int object_id, bool removal);
121 void (*editgui_popup_properties)(const struct tile_list *tiles, int objtype);
122 void (*editgui_tileset_changed)(void);
123 void (*editgui_popdown_all)(void);
125 void (*update_timeout_label)(void);
126 void (*real_city_dialog_popup)(struct city *pcity);
127 void (*real_city_dialog_refresh)(struct city *pcity);
128 void (*popdown_city_dialog)(struct city *pcity);
129 void (*popdown_all_city_dialogs)(void);
130 bool (*handmade_scenario_warning)(void);
131 void (*refresh_unit_city_dialogs)(struct unit *punit);
132 bool (*city_dialog_is_open)(struct city *pcity);
134 bool (*request_transport)(struct unit *pcargo, struct tile *ptile);
136 void (*gui_load_theme)(const char *directory, const char *theme_name);
137 void (*gui_clear_theme)(void);
138 char **(*get_gui_specific_themes_directories)(int *count);
139 char **(*get_useable_themes_in_directory)(const char *directory, int *count);
142 struct gui_funcs *get_gui_funcs(void);
144 #ifdef __cplusplus
146 #endif /* __cplusplus */
148 #endif /* FC__QTG_CSIDE_H */