Freeciv-3.3
Loading...
Searching...
No Matches
gui_cbsetter.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/* Any client that contains this file is using callback interface */
19#define GUI_CB_MODE 1
20
21/* client */
22#include "gui_interface.h"
23
24/* client/include */
25#include "chatline_g.h"
26#include "citydlg_g.h"
27#include "connectdlg_g.h"
28#include "dialogs_g.h"
29#include "editgui_g.h"
30#include "graphics_g.h"
31#include "gui_main_g.h"
32#include "mapview_g.h"
33#include "sprite_g.h"
34#include "themes_g.h"
35
36#include "gui_cbsetter.h"
37
38/**********************************************************************/
42{
43 struct gui_funcs *funcs = get_gui_funcs();
44
48
51
54
61
64
80
82
92
95
100
107
118
120
122
127
129
131}
struct canvas * gui_canvas_create(int width, int height)
Definition canvas.c:26
void gui_canvas_fill_sprite_area(struct canvas *pcanvas, struct sprite *psprite, struct color *pcolor, int canvas_x, int canvas_y)
Definition canvas.c:131
void gui_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.c:67
void gui_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.c:151
void gui_canvas_free(struct canvas *store)
Definition canvas.c:36
void gui_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.c:77
void gui_get_text_size(int *width, int *height, enum client_font font, const char *text)
Definition canvas.c:163
void gui_canvas_put_rectangle(struct canvas *pcanvas, struct color *pcolor, int canvas_x, int canvas_y, int width, int height)
Definition canvas.c:121
void gui_canvas_set_zoom(struct canvas *store, float zoom)
Definition canvas.c:44
void gui_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.c:110
void gui_canvas_mapview_init(struct canvas *store)
Definition canvas.c:60
void gui_canvas_put_text(struct canvas *pcanvas, int canvas_x, int canvas_y, enum client_font font, struct color *pcolor, const char *text)
Definition canvas.c:180
bool gui_has_zoom_support(void)
Definition canvas.c:52
void gui_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.c:141
void gui_canvas_put_sprite_full(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite)
Definition canvas.c:88
void gui_version_message(const char *vertext)
Definition chatline.c:61
void gui_real_output_window_append(const char *astring, const struct text_tag_list *tags, int conn_id)
Definition chatline.c:30
void gui_refresh_unit_city_dialogs(struct unit *punit)
Definition citydlg.c:61
void gui_popdown_all_city_dialogs(void)
Definition citydlg.c:43
void gui_popdown_city_dialog(struct city *pcity)
Definition citydlg.c:35
bool gui_city_dialog_is_open(struct city *pcity)
Definition citydlg.c:85
void gui_real_city_dialog_popup(struct city *pcity)
Definition citydlg.c:27
void gui_real_city_dialog_refresh(struct city *pcity)
Definition citydlg.c:51
struct color * gui_color_alloc(int r, int g, int b)
Definition colors.c:33
void gui_color_free(struct color *color)
Definition colors.c:48
void gui_close_connection_dialog(void)
Definition connectdlg.c:41
void gui_server_connect(void)
Definition connectdlg.c:96
bool gui_request_transport(struct unit *pcargo, struct tile *ptile)
Definition dialogs.c:362
bool gui_handmade_scenario_warning(void)
Definition dialogs.c:353
void gui_popup_image(const char *tag)
Definition dialogs.c:390
void gui_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.c:371
bool gui_is_view_supported(enum ts_type type)
Definition graphics.c:31
void gui_real_conn_list_dialog_update(void *unused)
Definition gui_main.c:141
void gui_insert_client_build_info(char *outbuf, size_t outlen)
Definition gui_main.c:277
void gui_editgui_tileset_changed(void)
Definition gui_main.c:232
void gui_editgui_popdown_all(void)
Definition gui_main.c:250
void gui_set_unit_icon(int idx, struct unit *punit)
Definition gui_main.c:188
void gui_sound_bell(void)
Definition gui_main.c:150
void gui_editgui_notify_object_changed(int objtype, int object_id, bool removal)
Definition gui_main.c:256
void gui_remove_net_input(void)
Definition gui_main.c:172
void gui_real_focus_units_changed(void)
Definition gui_main.c:210
void gui_add_net_input(int sock)
Definition gui_main.c:162
void gui_editgui_notify_object_created(int tag, int id)
Definition gui_main.c:263
void gui_ui_init(void)
Definition gui_main.c:44
enum gui_type gui_get_gui_type(void)
Definition gui_main.c:133
int gui_ui_main(int argc, char *argv[])
Definition gui_main.c:100
void gui_gui_update_font(const char *font_name, const char *font_value)
Definition gui_main.c:269
void gui_options_extra_init(void)
Definition gui_main.c:117
void gui_editgui_refresh(void)
Definition gui_main.c:238
void gui_add_idle_callback(void(callback)(void *), void *data)
Definition gui_main.c:220
void gui_set_unit_icons_more_arrow(bool onoff)
Definition gui_main.c:200
void gui_editgui_popup_properties(const struct tile_list *tiles, int objtype)
Definition gui_main.c:244
void gui_ui_exit(void)
Definition gui_main.c:125
void gui_setup_gui_properties(void)
Definition gui_main.c:285
void gui_update_infra_dialog(void)
Definition infradlg.c:27
void gui_map_canvas_size_refresh(void)
Definition mapview.c:223
void gui_update_timeout_label(void)
Definition mapview.c:92
void gui_start_turn(void)
Definition mapview.c:273
void gui_real_set_client_page(enum client_pages page)
Definition pages.c:29
void gui_set_rulesets(int num_rulesets, char **rulesets)
Definition pages.c:39
enum client_pages gui_get_current_client_page(void)
Definition pages.c:47
void gui_free_sprite(struct sprite *s)
Definition sprite.c:109
void gui_get_sprite_dimensions(struct sprite *sprite, int *width, int *height)
Definition sprite.c:97
struct sprite * gui_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.c:75
struct sprite * gui_create_sprite(int width, int height, struct color *pcolor)
Definition sprite.c:88
struct sprite * gui_load_gfxfile(const char *filename, bool svgflag)
Definition sprite.c:48
void gui_gui_load_theme(const char *directory, const char *theme_name)
Definition themes.c:32
char ** gui_get_usable_themes_in_directory(const char *directory, int *count)
Definition themes.c:63
char ** gui_get_gui_specific_themes_directories(int *count)
Definition themes.c:51
void gui_gui_clear_theme(void)
Definition themes.c:40
void setup_gui_funcs(void)
struct gui_funcs * get_gui_funcs(void)
static struct gui_funcs funcs
void(* server_connect)(void)
void(* editgui_tileset_changed)(void)
int(* ui_main)(int argc, char *argv[])
void(* canvas_put_text)(struct canvas *pcanvas, int canvas_x, int canvas_y, enum client_font font, struct color *pcolor, const char *text)
char **(* get_gui_specific_themes_directories)(int *count)
void(* gui_load_theme)(const char *directory, const char *theme_name)
void(* update_timeout_label)(void)
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)
void(* popup_image)(const char *tag)
void(* editgui_refresh)(void)
void(* set_unit_icon)(int idx, struct unit *punit)
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)
void(* add_idle_callback)(void(callback)(void *), void *data)
void(* canvas_put_sprite_full)(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *psprite)
void(* add_net_input)(int sock)
struct sprite *(* load_gfxfile)(const char *filename, bool svgflag)
void(* editgui_notify_object_created)(int tag, int id)
enum client_pages(* get_current_client_page)(void)
void(* real_city_dialog_refresh)(struct city *pcity)
void(* gui_clear_theme)(void)
void(* remove_net_input)(void)
void(* real_city_dialog_popup)(struct city *pcity)
void(* color_free)(struct color *pcolor)
void(* refresh_unit_city_dialogs)(struct unit *punit)
bool(* is_view_supported)(enum ts_type type)
void(* setup_gui_properties)(void)
void(* get_text_size)(int *width, int *height, enum client_font font, const char *text)
void(* editgui_popup_properties)(const struct tile_list *tiles, int objtype)
void(* update_infra_dialog)(void)
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)
void(* map_canvas_size_refresh)(void)
void(* editgui_notify_object_changed)(int objtype, int object_id, bool removal)
bool(* handmade_scenario_warning)(void)
void(* canvas_fill_sprite_area)(struct canvas *pcanvas, struct sprite *psprite, struct color *pcolor, int canvas_x, int canvas_y)
bool(* request_transport)(struct unit *pcargo, struct tile *ptile)
void(* set_rulesets)(int num_rulesets, char **rulesets)
void(* version_message)(const char *vertext)
void(* real_output_window_append)(const char *astring, const struct text_tag_list *tags, int conn_id)
struct sprite *(* create_sprite)(int width, int height, struct color *pcolor)
bool(* has_zoom_support)(void)
void(* get_sprite_dimensions)(struct sprite *sprite, int *width, int *height)
void(* set_unit_icons_more_arrow)(bool onoff)
void(* gui_update_font)(const char *font_name, const char *font_value)
struct canvas *(* canvas_create)(int width, int height)
void(* ui_exit)(void)
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)
void(* free_sprite)(struct sprite *s)
char **(* get_usable_themes_in_directory)(const char *directory, int *count)
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)
void(* options_extra_init)(void)
void(* popdown_city_dialog)(struct city *pcity)
void(* canvas_put_line)(struct canvas *pcanvas, struct color *pcolor, enum line_type ltype, int start_x, int start_y, int dx, int dy)
void(* start_turn)(void)
void(* canvas_free)(struct canvas *store)
void(* canvas_set_zoom)(struct canvas *store, float zoom)
void(* insert_client_build_info)(char *outbuf, size_t outlen)
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)
void(* canvas_put_rectangle)(struct canvas *pcanvas, struct color *pcolor, int canvas_x, int canvas_y, int width, int height)
enum gui_type(* get_gui_type)(void)
void(* editgui_popdown_all)(void)
void(* popdown_all_city_dialogs)(void)
void(* canvas_mapview_init)(struct canvas *store)
void(* close_connection_dialog)(void)
void(* sound_bell)(void)
void(* real_focus_units_changed)(void)
void(* real_set_client_page)(enum client_pages page)
void(* ui_init)(void)
void(* real_conn_list_dialog_update)(void *unused)
struct color *(* color_alloc)(int r, int g, int b)
bool(* city_dialog_is_open)(struct city *pcity)