Freeciv-3.3: /fast/freeciv/nightly/main/client/gui_interface.c Source File

Freeciv-3.3

Loading...
Searching...
No Matches
gui_interface.c
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#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* client */
19#include "client_main.h"
20#include "editgui_g.h"
21#include "options.h"
22
23#include "chatline_g.h"
24#include "citydlg_g.h"
25#include "connectdlg_g.h"
26#include "dialogs_g.h"
27#include "diplodlg_g.h"
28#include "editgui_g.h"
29#include "graphics_g.h"
30#include "gui_main_g.h"
31#include "mapview_g.h"
32#include "repodlgs_g.h"
33#include "themes_g.h"
34
35#include "gui_interface.h"
36
37 static struct gui_funcs funcs;
38
39/**********************************************************************/
43 struct gui_funcs *get_gui_funcs(void)
44{
45 return &funcs;
46}
47
48/**********************************************************************/
51 void ui_init(void)
52{
53 funcs.ui_init();
54}
55
56/**********************************************************************/
59 int ui_main(int argc, char *argv[])
60{
61 return funcs.ui_main(argc, argv);
62}
63
64/**********************************************************************/
67 void ui_exit(void)
68{
69 funcs.ui_exit();
70}
71
72/**********************************************************************/
75 void version_message(const char *vertext)
76{
77 funcs.version_message(vertext);
78}
79
80/**********************************************************************/
83 void real_output_window_append(const char *astring,
84 const struct text_tag_list *tags,
85 int conn_id)
86{
87 funcs.real_output_window_append(astring, tags, conn_id);
88}
89
90/**********************************************************************/
93 enum gui_type get_gui_type(void)
94{
95 return funcs.get_gui_type();
96}
97
98/**********************************************************************/
101 void insert_client_build_info(char *outbuf, size_t outlen)
102{
103 funcs.insert_client_build_info(outbuf, outlen);
104}
105
106/**********************************************************************/
109 bool is_view_supported(enum ts_type type)
110{
111 return funcs.is_view_supported(type);
112}
113
114/**********************************************************************/
117 void tileset_type_set(enum ts_type type)
118{
119 funcs.tileset_type_set(type);
120}
121
122/**********************************************************************/
125 struct sprite *load_gfxfile(const char *filename, bool svgflag)
126{
127 return funcs.load_gfxfile(filename, svgflag);
128}
129
130/**********************************************************************/
133 struct sprite *load_gfxnumber(int num)
134{
135 return funcs.load_gfxnumber(num);
136}
137
138/**********************************************************************/
141 struct sprite *create_sprite(int width, int height, struct color *pcolor)
142{
143 return funcs.create_sprite(width, height, pcolor);
144}
145
146/**********************************************************************/
149 void get_sprite_dimensions(struct sprite *sprite, int *width, int *height)
150{
151 funcs.get_sprite_dimensions(sprite, width, height);
152}
153
154/**********************************************************************/
157 struct sprite *crop_sprite(struct sprite *source,
158 int x, int y, int width, int height,
159 struct sprite *mask, int mask_offset_x, int mask_offset_y,
160 float scale, bool smooth)
161{
162 return funcs.crop_sprite(source, x, y, width, height, mask,
163 mask_offset_x, mask_offset_y, scale, smooth);
164}
165
166/**********************************************************************/
169 void free_sprite(struct sprite *s)
170{
171 funcs.free_sprite(s);
172}
173
174/**********************************************************************/
177 struct color *color_alloc(int r, int g, int b)
178{
179 return funcs.color_alloc(r, g, b);
180}
181
182/**********************************************************************/
185 void color_free(struct color *pcolor)
186{
187 return funcs.color_free(pcolor);
188}
189
190/**********************************************************************/
193 struct canvas *canvas_create(int width, int height)
194{
195 return funcs.canvas_create(width, height);
196}
197
198/**********************************************************************/
201 void canvas_free(struct canvas *store)
202{
203 funcs.canvas_free(store);
204}
205
206/**********************************************************************/
209 void canvas_set_zoom(struct canvas *store, float zoom)
210{
211 funcs.canvas_set_zoom(store, zoom);
212}
213
214/**********************************************************************/
217 bool has_zoom_support(void)
218{
219 return funcs.has_zoom_support();
220}
221
222/**********************************************************************/
225 void canvas_mapview_init(struct canvas *store)
226{
227 funcs.canvas_mapview_init(store);
228}
229
230/**********************************************************************/
233 void canvas_copy(struct canvas *dest, struct canvas *src,
234 int src_x, int src_y, int dest_x, int dest_y, int width,
235 int height)
236{
237 funcs.canvas_copy(dest, src, src_x, src_y, dest_x, dest_y, width, height);
238}
239
240/**********************************************************************/
243 void canvas_put_sprite(struct canvas *pcanvas,
244 int canvas_x, int canvas_y,
245 struct sprite *psprite,
246 int offset_x, int offset_y, int width, int height)
247{
248 funcs.canvas_put_sprite(pcanvas, canvas_x, canvas_y, psprite,
249 offset_x, offset_y, width, height);
250}
251
252/**********************************************************************/
255 void canvas_put_sprite_full(struct canvas *pcanvas,
256 int canvas_x, int canvas_y,
257 struct sprite *psprite)
258{
259 funcs.canvas_put_sprite_full(pcanvas, canvas_x, canvas_y, psprite);
260}
261
262/**********************************************************************/
265 void canvas_put_sprite_full_scaled(struct canvas *pcanvas,
266 int canvas_x, int canvas_y,
267 int canvas_w, int canvas_h,
268 struct sprite *psprite)
269{
270 funcs.canvas_put_sprite_full_scaled(pcanvas, canvas_x, canvas_y,
271 canvas_w, canvas_h, psprite);
272}
273
274/**********************************************************************/
277 void canvas_put_sprite_fogged(struct canvas *pcanvas,
278 int canvas_x, int canvas_y,
279 struct sprite *psprite,
280 bool fog, int fog_x, int fog_y)
281{
282 funcs.canvas_put_sprite_fogged(pcanvas, canvas_x, canvas_y,
283 psprite, fog, fog_x, fog_y);
284}
285
286/**********************************************************************/
289 void canvas_put_rectangle(struct canvas *pcanvas,
290 struct color *pcolor,
291 int canvas_x, int canvas_y, int width, int height)
292{
293 funcs.canvas_put_rectangle(pcanvas, pcolor, canvas_x, canvas_y,
294 width, height);
295}
296
297/**********************************************************************/
300 void canvas_fill_sprite_area(struct canvas *pcanvas,
301 struct sprite *psprite, struct color *pcolor,
302 int canvas_x, int canvas_y)
303{
304 funcs.canvas_fill_sprite_area(pcanvas, psprite, pcolor, canvas_x, canvas_y);
305}
306
307/**********************************************************************/
310 void canvas_put_line(struct canvas *pcanvas, struct color *pcolor,
311 enum line_type ltype, int start_x, int start_y,
312 int dx, int dy)
313{
314 funcs.canvas_put_line(pcanvas, pcolor, ltype, start_x, start_y, dx, dy);
315}
316
317/**********************************************************************/
320 void canvas_put_curved_line(struct canvas *pcanvas, struct color *pcolor,
321 enum line_type ltype, int start_x, int start_y,
322 int dx, int dy)
323{
324 funcs.canvas_put_curved_line(pcanvas, pcolor, ltype, start_x, start_y,
325 dx, dy);
326}
327
328/**********************************************************************/
331 void get_text_size(int *width, int *height,
332 enum client_font font, const char *text)
333{
334 funcs.get_text_size(width, height, font, text);
335}
336
337/**********************************************************************/
340 void canvas_put_text(struct canvas *pcanvas, int canvas_x, int canvas_y,
341 enum client_font font, struct color *pcolor,
342 const char *text)
343{
344 funcs.canvas_put_text(pcanvas, canvas_x, canvas_y, font, pcolor, text);
345}
346
347/**********************************************************************/
350 void map_canvas_size_refresh(void)
351{
352 funcs.map_canvas_size_refresh();
353}
354
355/**********************************************************************/
358 void set_rulesets(int num_rulesets, char **rulesets)
359{
360 funcs.set_rulesets(num_rulesets, rulesets);
361}
362
363/**********************************************************************/
366 void options_extra_init(void)
367{
368 funcs.options_extra_init();
369}
370
371/**********************************************************************/
374 void server_connect(void)
375{
376 funcs.server_connect();
377}
378
379/**********************************************************************/
382 void add_net_input(int sock)
383{
384 funcs.add_net_input(sock);
385}
386
387/**********************************************************************/
390 void remove_net_input(void)
391{
392 funcs.remove_net_input();
393}
394
395/**********************************************************************/
398 void real_conn_list_dialog_update(void *unused)
399{
400 funcs.real_conn_list_dialog_update(NULL);
401}
402
403/**********************************************************************/
406 void close_connection_dialog(void)
407{
408 funcs.close_connection_dialog();
409}
410
411/**********************************************************************/
414 void add_idle_callback(void (callback)(void *), void *data)
415{
416 funcs.add_idle_callback(callback, data);
417}
418
419/**********************************************************************/
422 void sound_bell(void)
423{
424 funcs.sound_bell();
425}
426
427/**********************************************************************/
430 void real_set_client_page(enum client_pages page)
431{
432 funcs.real_set_client_page(page);
433}
434
435/**********************************************************************/
438 enum client_pages get_current_client_page(void)
439{
440 return funcs.get_current_client_page();
441}
442
443/**********************************************************************/
446 void set_unit_icon(int idx, struct unit *punit)
447{
448 funcs.set_unit_icon(idx, punit);
449}
450
451/**********************************************************************/
454 void real_focus_units_changed(void)
455{
456 funcs.real_focus_units_changed();
457}
458
459/**********************************************************************/
462 void set_unit_icons_more_arrow(bool onoff)
463{
464 funcs.set_unit_icons_more_arrow(onoff);
465}
466
467/**********************************************************************/
470 void gui_update_font(const char *font_name, const char *font_value)
471{
472 funcs.gui_update_font(font_name, font_value);
473}
474
475/**********************************************************************/
478 void editgui_refresh(void)
479{
480 funcs.editgui_refresh();
481}
482
483/**********************************************************************/
486 void editgui_notify_object_created(int tag, int id)
487{
488 funcs.editgui_notify_object_created(tag, id);
489}
490
491/**********************************************************************/
494 void editgui_notify_object_changed(int objtype, int object_id, bool removal)
495{
496 funcs.editgui_notify_object_changed(objtype, object_id, removal);
497}
498
499/**********************************************************************/
502 void editgui_popup_properties(const struct tile_list *tiles, int objtype)
503{
504 funcs.editgui_popup_properties(tiles, objtype);
505}
506
507/**********************************************************************/
510 void editgui_tileset_changed(void)
511{
512 funcs.editgui_tileset_changed();
513}
514
515/**********************************************************************/
518 void editgui_popdown_all(void)
519{
520 funcs.editgui_popdown_all();
521}
522
523/**********************************************************************/
526 void popup_combat_info(int attacker_unit_id, int defender_unit_id,
527 int attacker_hp, int defender_hp,
528 bool make_att_veteran, bool make_def_veteran)
529{
530 funcs.popup_combat_info(attacker_unit_id, defender_unit_id,
531 attacker_hp, defender_hp, make_att_veteran,
532 make_def_veteran);
533}
534
535/**********************************************************************/
538 void update_timeout_label(void)
539{
540 funcs.update_timeout_label();
541}
542
543/**********************************************************************/
546 void start_turn(void)
547{
548 funcs.start_turn();
549}
550
551/**********************************************************************/
554 void real_city_dialog_popup(struct city *pcity)
555{
556 funcs.real_city_dialog_popup(pcity);
557}
558
559/**********************************************************************/
562 void real_city_dialog_refresh(struct city *pcity)
563{
564 funcs.real_city_dialog_refresh(pcity);
565}
566
567/**********************************************************************/
570 void popdown_city_dialog(struct city *pcity)
571{
572 funcs.popdown_city_dialog(pcity);
573}
574
575/**********************************************************************/
578 void popdown_all_city_dialogs(void)
579{
580 funcs.popdown_all_city_dialogs();
581}
582
583/**********************************************************************/
586 bool handmade_scenario_warning(void)
587{
588 return funcs.handmade_scenario_warning();
589}
590
591/**********************************************************************/
594 void refresh_unit_city_dialogs(struct unit *punit)
595{
596 funcs.refresh_unit_city_dialogs(punit);
597}
598
599/**********************************************************************/
602 bool city_dialog_is_open(struct city *pcity)
603{
604 return funcs.city_dialog_is_open(pcity);
605}
606
607/**********************************************************************/
610 bool request_transport(struct unit *pcargo, struct tile *ptile)
611{
612 return funcs.request_transport(pcargo, ptile);
613}
614
615/**********************************************************************/
618 void update_infra_dialog(void)
619{
620 funcs.update_infra_dialog();
621}
622
623/**********************************************************************/
626 void gui_load_theme(const char *directory, const char *theme_name)
627{
628 funcs.gui_load_theme(directory, theme_name);
629}
630
631/**********************************************************************/
634 void gui_clear_theme(void)
635{
636 funcs.gui_clear_theme();
637}
638
639/**********************************************************************/
642 char **get_gui_specific_themes_directories(int *count)
643{
644 return funcs.get_gui_specific_themes_directories(count);
645}
646
647/**********************************************************************/
650 char **get_usable_themes_in_directory(const char *directory, int *count)
651{
652 return funcs.get_usable_themes_in_directory(directory, count);
653}
654
655/**********************************************************************/
658 void gui_init_meeting(struct Treaty *ptreaty, struct player *they,
659 struct player *initiator)
660{
661 funcs.gui_init_meeting(ptreaty, they, initiator);
662}
663
664/**********************************************************************/
667 void gui_recv_cancel_meeting(struct Treaty *ptreaty, struct player *they,
668 struct player *initiator)
669{
670 funcs.gui_recv_cancel_meeting(ptreaty, they, initiator);
671}
672
673/**********************************************************************/
676 void gui_prepare_clause_updt(struct Treaty *ptreaty, struct player *they)
677{
678 funcs.gui_prepare_clause_updt(ptreaty, they);
679}
680
681/**********************************************************************/
684 void gui_recv_create_clause(struct Treaty *ptreaty, struct player *they)
685{
686 funcs.gui_recv_create_clause(ptreaty, they);
687}
688
689/**********************************************************************/
692 void gui_recv_remove_clause(struct Treaty *ptreaty, struct player *they)
693{
694 funcs.gui_recv_remove_clause(ptreaty, they);
695}
696
697/**********************************************************************/
700 void gui_recv_accept_treaty(struct Treaty *ptreaty, struct player *they)
701{
702 funcs.gui_recv_accept_treaty(ptreaty, they);
703}
704
705/**********************************************************************/
708 void request_action_confirmation(const char *expl,
709 struct act_confirmation_data *data)
710{
711 funcs.request_action_confirmation(expl, data);
712}
713
714/**********************************************************************/
717 void real_science_report_dialog_update(void *unused)
718{
719 funcs.real_science_report_dialog_update(unused);
720}
721
722/**********************************************************************/
725 void science_report_dialog_redraw(void)
726{
727 funcs.science_report_dialog_redraw();
728}
729
730/**********************************************************************/
733 void science_report_dialog_popup(bool raise)
734{
735 funcs.science_report_dialog_popup(raise);
736}
737
738/**********************************************************************/
741 void real_economy_report_dialog_update(void *unused)
742{
743 funcs.real_economy_report_dialog_update(unused);
744}
745
746/**********************************************************************/
749 void real_units_report_dialog_update(void *unused)
750{
751 funcs.real_units_report_dialog_update(unused);
752}
753
754/**********************************************************************/
757 void endgame_report_dialog_start(const struct packet_endgame_report *packet)
758{
759 funcs.endgame_report_dialog_start(packet);
760}
761
762/**********************************************************************/
765 void endgame_report_dialog_player(const struct packet_endgame_player *packet)
766{
767 funcs.endgame_report_dialog_player(packet);
768}
769
770/**********************************************************************/
773 void popup_image(const char *tag, int width, int height)
774{
775 funcs.popup_image(tag, width, height);
776}
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_put_rectangle
struct canvas int int int int struct sprite *sprite canvas_put_rectangle
Definition canvas_g.h:55
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_put_line
struct canvas int int int int struct sprite *sprite struct canvas struct color int int int int height canvas_put_line
Definition canvas_g.h:62
canvas_put_sprite
canvas_put_sprite
Definition canvas_g.h:42
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
canvas_put_sprite_full_scaled
canvas_put_sprite_full_scaled
Definition canvas_g.h:48
canvas_put_text
canvas_put_text
Definition canvas_g.h:80
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
chatline_g.h
citydlg_g.h
client_main.h
incite_cost
char * incite_cost
Definition comments.c:74
connectdlg_g.h
dialogs_g.h
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
diplodlg_g.h
gui_recv_create_clause
struct Treaty struct player struct player *initiator gui_recv_create_clause
Definition diplodlg_g.h:32
ptreaty
struct Treaty * ptreaty
Definition diplodlg_g.h:28
gui_recv_accept_treaty
struct Treaty struct player struct player *initiator struct Treaty struct player *they gui_recv_accept_treaty
Definition diplodlg_g.h:36
they
struct Treaty struct player * they
Definition diplodlg_g.h:28
gui_recv_cancel_meeting
gui_recv_cancel_meeting
Definition diplodlg_g.h:27
editgui_g.h
objtype
int objtype
Definition editgui_g.h:28
editgui_notify_object_changed
editgui_notify_object_changed
Definition editgui_g.h:27
graphics_g.h
source
static GtkWidget * source
Definition gotodlg.c:58
type
GType type
Definition repodlgs.c:1313
update_timeout_label
void update_timeout_label(void)
Definition gui_interface.c:538
get_gui_funcs
struct gui_funcs * get_gui_funcs(void)
Definition gui_interface.c:43
real_focus_units_changed
void real_focus_units_changed(void)
Definition gui_interface.c:454
set_unit_icons_more_arrow
void set_unit_icons_more_arrow(bool onoff)
Definition gui_interface.c:462
science_report_dialog_popup
void science_report_dialog_popup(bool raise)
Definition gui_interface.c:733
free_sprite
void free_sprite(struct sprite *s)
Definition gui_interface.c:169
editgui_popup_properties
void editgui_popup_properties(const struct tile_list *tiles, int objtype)
Definition gui_interface.c:502
set_unit_icon
void set_unit_icon(int idx, struct unit *punit)
Definition gui_interface.c:446
editgui_notify_object_created
void editgui_notify_object_created(int tag, int id)
Definition gui_interface.c:486
create_sprite
struct sprite * create_sprite(int width, int height, struct color *pcolor)
Definition gui_interface.c:141
get_gui_specific_themes_directories
char ** get_gui_specific_themes_directories(int *count)
Definition gui_interface.c:642
gui_clear_theme
void gui_clear_theme(void)
Definition gui_interface.c:634
popup_image
void popup_image(const char *tag, int width, int height)
Definition gui_interface.c:773
real_city_dialog_popup
void real_city_dialog_popup(struct city *pcity)
Definition gui_interface.c:554
set_rulesets
void set_rulesets(int num_rulesets, char **rulesets)
Definition gui_interface.c:358
endgame_report_dialog_start
void endgame_report_dialog_start(const struct packet_endgame_report *packet)
Definition gui_interface.c:757
version_message
void version_message(const char *vertext)
Definition gui_interface.c:75
get_current_client_page
enum client_pages get_current_client_page(void)
Definition gui_interface.c:438
ui_exit
void ui_exit(void)
Definition gui_interface.c:67
city_dialog_is_open
bool city_dialog_is_open(struct city *pcity)
Definition gui_interface.c:602
get_gui_type
enum gui_type get_gui_type(void)
Definition gui_interface.c:93
ui_init
void ui_init(void)
Definition gui_interface.c:51
real_units_report_dialog_update
void real_units_report_dialog_update(void *unused)
Definition gui_interface.c:749
real_city_dialog_refresh
void real_city_dialog_refresh(struct city *pcity)
Definition gui_interface.c:562
gui_init_meeting
void gui_init_meeting(struct Treaty *ptreaty, struct player *they, struct player *initiator)
Definition gui_interface.c:658
gui_load_theme
void gui_load_theme(const char *directory, const char *theme_name)
Definition gui_interface.c:626
real_economy_report_dialog_update
void real_economy_report_dialog_update(void *unused)
Definition gui_interface.c:741
server_connect
void server_connect(void)
Definition gui_interface.c:374
editgui_popdown_all
void editgui_popdown_all(void)
Definition gui_interface.c:518
load_gfxnumber
struct sprite * load_gfxnumber(int num)
Definition gui_interface.c:133
add_idle_callback
void add_idle_callback(void(callback)(void *), void *data)
Definition gui_interface.c:414
canvas_set_zoom
void canvas_set_zoom(struct canvas *store, float zoom)
Definition gui_interface.c:209
canvas_mapview_init
void canvas_mapview_init(struct canvas *store)
Definition gui_interface.c:225
options_extra_init
void options_extra_init(void)
Definition gui_interface.c:366
popdown_all_city_dialogs
void popdown_all_city_dialogs(void)
Definition gui_interface.c:578
canvas_fill_sprite_area
void canvas_fill_sprite_area(struct canvas *pcanvas, struct sprite *psprite, struct color *pcolor, int canvas_x, int canvas_y)
Definition gui_interface.c:300
refresh_unit_city_dialogs
void refresh_unit_city_dialogs(struct unit *punit)
Definition gui_interface.c:594
start_turn
void start_turn(void)
Definition gui_interface.c:546
real_conn_list_dialog_update
void real_conn_list_dialog_update(void *unused)
Definition gui_interface.c:398
real_set_client_page
void real_set_client_page(enum client_pages page)
Definition gui_interface.c:430
get_text_size
void get_text_size(int *width, int *height, enum client_font font, const char *text)
Definition gui_interface.c:331
gui_recv_remove_clause
void gui_recv_remove_clause(struct Treaty *ptreaty, struct player *they)
Definition gui_interface.c:692
insert_client_build_info
void insert_client_build_info(char *outbuf, size_t outlen)
Definition gui_interface.c:101
canvas_free
void canvas_free(struct canvas *store)
Definition gui_interface.c:201
request_transport
bool request_transport(struct unit *pcargo, struct tile *ptile)
Definition gui_interface.c:610
canvas_put_curved_line
void 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 gui_interface.c:320
close_connection_dialog
void close_connection_dialog(void)
Definition gui_interface.c:406
science_report_dialog_redraw
void science_report_dialog_redraw(void)
Definition gui_interface.c:725
remove_net_input
void remove_net_input(void)
Definition gui_interface.c:390
handmade_scenario_warning
bool handmade_scenario_warning(void)
Definition gui_interface.c:586
load_gfxfile
struct sprite * load_gfxfile(const char *filename, bool svgflag)
Definition gui_interface.c:125
sound_bell
void sound_bell(void)
Definition gui_interface.c:422
is_view_supported
bool is_view_supported(enum ts_type type)
Definition gui_interface.c:109
update_infra_dialog
void update_infra_dialog(void)
Definition gui_interface.c:618
map_canvas_size_refresh
void map_canvas_size_refresh(void)
Definition gui_interface.c:350
real_output_window_append
void real_output_window_append(const char *astring, const struct text_tag_list *tags, int conn_id)
Definition gui_interface.c:83
popup_combat_info
void 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 gui_interface.c:526
canvas_put_sprite_full
void canvas_put_sprite_full(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *psprite)
Definition gui_interface.c:255
tileset_type_set
void tileset_type_set(enum ts_type type)
Definition gui_interface.c:117
has_zoom_support
bool has_zoom_support(void)
Definition gui_interface.c:217
color_free
void color_free(struct color *pcolor)
Definition gui_interface.c:185
color_alloc
struct color * color_alloc(int r, int g, int b)
Definition gui_interface.c:177
editgui_refresh
void editgui_refresh(void)
Definition gui_interface.c:478
canvas_copy
void 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 gui_interface.c:233
add_net_input
void add_net_input(int sock)
Definition gui_interface.c:382
funcs
static struct gui_funcs funcs
Definition gui_interface.c:37
gui_prepare_clause_updt
void gui_prepare_clause_updt(struct Treaty *ptreaty, struct player *they)
Definition gui_interface.c:676
canvas_create
struct canvas * canvas_create(int width, int height)
Definition gui_interface.c:193
request_action_confirmation
void request_action_confirmation(const char *expl, struct act_confirmation_data *data)
Definition gui_interface.c:708
editgui_tileset_changed
void editgui_tileset_changed(void)
Definition gui_interface.c:510
real_science_report_dialog_update
void real_science_report_dialog_update(void *unused)
Definition gui_interface.c:717
popdown_city_dialog
void popdown_city_dialog(struct city *pcity)
Definition gui_interface.c:570
canvas_put_sprite_fogged
void 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 gui_interface.c:277
ui_main
int ui_main(int argc, char *argv[])
Definition gui_interface.c:59
gui_interface.h
gui_main_g.h
font_name
const char * font_name
Definition gui_main_g.h:43
gui_update_font
gui_update_font
Definition gui_main_g.h:43
mapview_g.h
options.h
repodlgs_g.h
endgame_report_dialog_player
endgame_report_dialog_player
Definition repodlgs_g.h:33
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
crop_sprite
crop_sprite
Definition sprite_g.h:30
get_sprite_dimensions
struct sprite int int int int struct sprite int int float bool smooth get_sprite_dimensions
Definition sprite_g.h:36
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:79
act_confirmation_data
Definition control.h:145
astring
Definition astring.h:36
callback
Definition gui_main.c:2405
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
gui_funcs
Definition gui_interface.h:37
gui_funcs::request_action_confirmation
void(* request_action_confirmation)(const char *expl, struct act_confirmation_data *data)
Definition gui_interface.h:166
gui_funcs::server_connect
void(* server_connect)(void)
Definition gui_interface.h:112
gui_funcs::editgui_tileset_changed
void(* editgui_tileset_changed)(void)
Definition gui_interface.h:132
gui_funcs::load_gfxnumber
struct sprite *(* load_gfxnumber)(int num)
Definition gui_interface.h:53
gui_funcs::ui_main
int(* ui_main)(int argc, char *argv[])
Definition gui_interface.h:39
gui_funcs::real_economy_report_dialog_update
void(* real_economy_report_dialog_update)(void *unused)
Definition gui_interface.h:172
gui_funcs::canvas_put_text
void(* canvas_put_text)(struct canvas *pcanvas, int canvas_x, int canvas_y, enum client_font font, struct color *pcolor, const char *text)
Definition gui_interface.h:104
gui_funcs::science_report_dialog_redraw
void(* science_report_dialog_redraw)(void)
Definition gui_interface.h:170
gui_funcs::get_gui_specific_themes_directories
char **(* get_gui_specific_themes_directories)(int *count)
Definition gui_interface.h:154
gui_funcs::gui_load_theme
void(* gui_load_theme)(const char *directory, const char *theme_name)
Definition gui_interface.h:152
gui_funcs::popup_image
void(* popup_image)(const char *tag, int width, int height)
Definition gui_interface.h:177
gui_funcs::update_timeout_label
void(* update_timeout_label)(void)
Definition gui_interface.h:138
gui_funcs::canvas_put_sprite
void(* canvas_put_sprite)(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *psprite, int offset_x, int offset_y, int width, int height)
Definition gui_interface.h:74
gui_funcs::editgui_refresh
void(* editgui_refresh)(void)
Definition gui_interface.h:128
gui_funcs::set_unit_icon
void(* set_unit_icon)(int idx, struct unit *punit)
Definition gui_interface.h:123
gui_funcs::canvas_copy
void(* 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 gui_interface.h:71
gui_funcs::add_idle_callback
void(* add_idle_callback)(void(callback)(void *), void *data)
Definition gui_interface.h:117
gui_funcs::canvas_put_sprite_full
void(* canvas_put_sprite_full)(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *psprite)
Definition gui_interface.h:78
gui_funcs::endgame_report_dialog_player
void(* endgame_report_dialog_player)(const struct packet_endgame_player *packet)
Definition gui_interface.h:175
gui_funcs::add_net_input
void(* add_net_input)(int sock)
Definition gui_interface.h:113
gui_funcs::gui_recv_create_clause
void(* gui_recv_create_clause)(struct Treaty *ptreaty, struct player *they)
Definition gui_interface.h:162
gui_funcs::tileset_type_set
void(* tileset_type_set)(enum ts_type type)
Definition gui_interface.h:51
gui_funcs::load_gfxfile
struct sprite *(* load_gfxfile)(const char *filename, bool svgflag)
Definition gui_interface.h:52
gui_funcs::gui_init_meeting
void(* gui_init_meeting)(struct Treaty *ptreaty, struct player *they, struct player *initiator)
Definition gui_interface.h:157
gui_funcs::editgui_notify_object_created
void(* editgui_notify_object_created)(int tag, int id)
Definition gui_interface.h:129
gui_funcs::get_current_client_page
enum client_pages(* get_current_client_page)(void)
Definition gui_interface.h:121
gui_funcs::real_city_dialog_refresh
void(* real_city_dialog_refresh)(struct city *pcity)
Definition gui_interface.h:141
gui_funcs::gui_clear_theme
void(* gui_clear_theme)(void)
Definition gui_interface.h:153
gui_funcs::remove_net_input
void(* remove_net_input)(void)
Definition gui_interface.h:114
gui_funcs::real_city_dialog_popup
void(* real_city_dialog_popup)(struct city *pcity)
Definition gui_interface.h:140
gui_funcs::gui_recv_remove_clause
void(* gui_recv_remove_clause)(struct Treaty *ptreaty, struct player *they)
Definition gui_interface.h:163
gui_funcs::endgame_report_dialog_start
void(* endgame_report_dialog_start)(const struct packet_endgame_report *packet)
Definition gui_interface.h:174
gui_funcs::color_free
void(* color_free)(struct color *pcolor)
Definition gui_interface.h:64
gui_funcs::refresh_unit_city_dialogs
void(* refresh_unit_city_dialogs)(struct unit *punit)
Definition gui_interface.h:145
gui_funcs::real_science_report_dialog_update
void(* real_science_report_dialog_update)(void *unused)
Definition gui_interface.h:169
gui_funcs::is_view_supported
bool(* is_view_supported)(enum ts_type type)
Definition gui_interface.h:50
gui_funcs::get_text_size
void(* get_text_size)(int *width, int *height, enum client_font font, const char *text)
Definition gui_interface.h:102
gui_funcs::editgui_popup_properties
void(* editgui_popup_properties)(const struct tile_list *tiles, int objtype)
Definition gui_interface.h:131
gui_funcs::update_infra_dialog
void(* update_infra_dialog)(void)
Definition gui_interface.h:150
gui_funcs::popup_combat_info
void(* 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 gui_interface.h:135
gui_funcs::map_canvas_size_refresh
void(* map_canvas_size_refresh)(void)
Definition gui_interface.h:108
gui_funcs::editgui_notify_object_changed
void(* editgui_notify_object_changed)(int objtype, int object_id, bool removal)
Definition gui_interface.h:130
gui_funcs::handmade_scenario_warning
bool(* handmade_scenario_warning)(void)
Definition gui_interface.h:144
gui_funcs::canvas_fill_sprite_area
void(* canvas_fill_sprite_area)(struct canvas *pcanvas, struct sprite *psprite, struct color *pcolor, int canvas_x, int canvas_y)
Definition gui_interface.h:93
gui_funcs::request_transport
bool(* request_transport)(struct unit *pcargo, struct tile *ptile)
Definition gui_interface.h:148
gui_funcs::set_rulesets
void(* set_rulesets)(int num_rulesets, char **rulesets)
Definition gui_interface.h:110
gui_funcs::version_message
void(* version_message)(const char *vertext)
Definition gui_interface.h:45
gui_funcs::real_units_report_dialog_update
void(* real_units_report_dialog_update)(void *unused)
Definition gui_interface.h:173
gui_funcs::real_output_window_append
void(* real_output_window_append)(const char *astring, const struct text_tag_list *tags, int conn_id)
Definition gui_interface.h:46
gui_funcs::gui_recv_cancel_meeting
void(* gui_recv_cancel_meeting)(struct Treaty *ptreaty, struct player *they, struct player *initiator)
Definition gui_interface.h:159
gui_funcs::gui_recv_accept_treaty
void(* gui_recv_accept_treaty)(struct Treaty *ptreaty, struct player *they)
Definition gui_interface.h:164
gui_funcs::create_sprite
struct sprite *(* create_sprite)(int width, int height, struct color *pcolor)
Definition gui_interface.h:54
gui_funcs::has_zoom_support
bool(* has_zoom_support)(void)
Definition gui_interface.h:69
gui_funcs::get_sprite_dimensions
void(* get_sprite_dimensions)(struct sprite *sprite, int *width, int *height)
Definition gui_interface.h:55
gui_funcs::set_unit_icons_more_arrow
void(* set_unit_icons_more_arrow)(bool onoff)
Definition gui_interface.h:124
gui_funcs::gui_update_font
void(* gui_update_font)(const char *font_name, const char *font_value)
Definition gui_interface.h:126
gui_funcs::canvas_create
struct canvas *(* canvas_create)(int width, int height)
Definition gui_interface.h:66
gui_funcs::science_report_dialog_popup
void(* science_report_dialog_popup)(bool raise)
Definition gui_interface.h:171
gui_funcs::ui_exit
void(* ui_exit)(void)
Definition gui_interface.h:40
gui_funcs::canvas_put_sprite_fogged
void(* 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 gui_interface.h:85
gui_funcs::free_sprite
void(* free_sprite)(struct sprite *s)
Definition gui_interface.h:61
gui_funcs::get_usable_themes_in_directory
char **(* get_usable_themes_in_directory)(const char *directory, int *count)
Definition gui_interface.h:155
gui_funcs::canvas_put_curved_line
void(* 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 gui_interface.h:99
gui_funcs::options_extra_init
void(* options_extra_init)(void)
Definition gui_interface.h:111
gui_funcs::popdown_city_dialog
void(* popdown_city_dialog)(struct city *pcity)
Definition gui_interface.h:142
gui_funcs::gui_prepare_clause_updt
void(* gui_prepare_clause_updt)(struct Treaty *ptreaty, struct player *they)
Definition gui_interface.h:161
gui_funcs::canvas_put_line
void(* canvas_put_line)(struct canvas *pcanvas, struct color *pcolor, enum line_type ltype, int start_x, int start_y, int dx, int dy)
Definition gui_interface.h:96
gui_funcs::start_turn
void(* start_turn)(void)
Definition gui_interface.h:139
gui_funcs::canvas_free
void(* canvas_free)(struct canvas *store)
Definition gui_interface.h:67
gui_funcs::canvas_set_zoom
void(* canvas_set_zoom)(struct canvas *store, float zoom)
Definition gui_interface.h:68
gui_funcs::insert_client_build_info
void(* insert_client_build_info)(char *outbuf, size_t outlen)
Definition gui_interface.h:43
gui_funcs::crop_sprite
struct sprite *(* 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 gui_interface.h:56
gui_funcs::canvas_put_rectangle
void(* canvas_put_rectangle)(struct canvas *pcanvas, struct color *pcolor, int canvas_x, int canvas_y, int width, int height)
Definition gui_interface.h:89
gui_funcs::get_gui_type
enum gui_type(* get_gui_type)(void)
Definition gui_interface.h:42
gui_funcs::editgui_popdown_all
void(* editgui_popdown_all)(void)
Definition gui_interface.h:133
gui_funcs::canvas_put_sprite_full_scaled
void(* canvas_put_sprite_full_scaled)(struct canvas *pcanvas, int canvas_x, int canvas_y, int canvas_w, int canvas_h, struct sprite *psprite)
Definition gui_interface.h:81
gui_funcs::popdown_all_city_dialogs
void(* popdown_all_city_dialogs)(void)
Definition gui_interface.h:143
gui_funcs::canvas_mapview_init
void(* canvas_mapview_init)(struct canvas *store)
Definition gui_interface.h:70
gui_funcs::close_connection_dialog
void(* close_connection_dialog)(void)
Definition gui_interface.h:116
gui_funcs::sound_bell
void(* sound_bell)(void)
Definition gui_interface.h:118
gui_funcs::real_focus_units_changed
void(* real_focus_units_changed)(void)
Definition gui_interface.h:125
gui_funcs::real_set_client_page
void(* real_set_client_page)(enum client_pages page)
Definition gui_interface.h:120
gui_funcs::ui_init
void(* ui_init)(void)
Definition gui_interface.h:38
gui_funcs::real_conn_list_dialog_update
void(* real_conn_list_dialog_update)(void *unused)
Definition gui_interface.h:115
gui_funcs::color_alloc
struct color *(* color_alloc)(int r, int g, int b)
Definition gui_interface.h:63
gui_funcs::city_dialog_is_open
bool(* city_dialog_is_open)(struct city *pcity)
Definition gui_interface.h:146
packet_endgame_player
Definition packets_gen.h:93
packet_endgame_report
Definition packets_gen.h:87
player
Definition player.h:249
sprite
Definition sprite.h:22
tile
Definition tile.h:50
unit
Definition unit.h:140
themes_g.h
get_usable_themes_in_directory
get_usable_themes_in_directory
Definition themes_g.h:22
directory
const char * directory
Definition themes_g.h:23