Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui_interface.c File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Functions | Variables
gui_interface.c File Reference
`#include "client_main.h"`
`#include "editgui_g.h"`
`#include "options.h"`
`#include "chatline_g.h"`
`#include "citydlg_g.h"`
`#include "connectdlg_g.h"`
`#include "dialogs_g.h"`
`#include "graphics_g.h"`
`#include "gui_main_g.h"`
`#include "mapview_g.h"`
`#include "themes_g.h"`
`#include "gui_interface.h"`

Go to the source code of this file.

## Functions

struct gui_funcs * | get_gui_funcs (void)
void | ui_init (void)
int | ui_main (int argc, char *argv[])
void | ui_exit (void)
void | version_message (const char *vertext)
void | real_output_window_append (const char *astring, const struct text_tag_list *tags, int conn_id)
enum gui_type | get_gui_type (void)
void | insert_client_build_info (char *outbuf, size_t outlen)
bool | is_view_supported (enum ts_type type)
void | tileset_type_set (enum ts_type type)
struct sprite * | load_gfxfile (const char *filename)
struct sprite * | load_gfxnumber (int num)
struct sprite * | create_sprite (int width, int height, struct color *pcolor)
void | get_sprite_dimensions (struct sprite *sprite, int *width, int *height)
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 | free_sprite (struct sprite *s)
struct color * | color_alloc (int r, int g, int b)
void | color_free (struct color *pcolor)
struct canvas * | canvas_create (int width, int height)
void | canvas_free (struct canvas *store)
void | canvas_set_zoom (struct canvas *store, float zoom)
bool | has_zoom_support (void)
void | canvas_mapview_init (struct canvas *store)
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 | 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 | canvas_put_sprite_full (struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *psprite)
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 | canvas_put_rectangle (struct canvas *pcanvas, struct color *pcolor, int canvas_x, int canvas_y, int width, int height)
void | canvas_fill_sprite_area (struct canvas *pcanvas, struct sprite *psprite, struct color *pcolor, int canvas_x, int canvas_y)
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 | 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 | get_text_size (int *width, int *height, enum client_font font, const char *text)
void | canvas_put_text (struct canvas *pcanvas, int canvas_x, int canvas_y, enum client_font font, struct color *pcolor, const char *text)
void | map_canvas_size_refresh (void)
void | set_rulesets (int num_rulesets, char **rulesets)
void | options_extra_init (void)
void | server_connect (void)
void | add_net_input (int sock)
void | remove_net_input (void)
void | real_conn_list_dialog_update (void *unused)
void | close_connection_dialog (void)
void | add_idle_callback (void(callback)(void *), void *data)
void | sound_bell (void)
void | real_set_client_page (enum client_pages page)
enum client_pages | get_current_client_page (void)
void | set_unit_icon (int idx, struct unit *punit)
void | real_focus_units_changed (void)
void | set_unit_icons_more_arrow (bool onoff)
void | gui_update_font (const char *font_name, const char *font_value)
void | editgui_refresh (void)
void | editgui_notify_object_created (int tag, int id)
void | editgui_notify_object_changed (int objtype, int object_id, bool removal)
void | editgui_popup_properties (const struct tile_list *tiles, int objtype)
void | editgui_tileset_changed (void)
void | editgui_popdown_all (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 | update_timeout_label (void)
void | start_turn (void)
void | real_city_dialog_popup (struct city *pcity)
void | real_city_dialog_refresh (struct city *pcity)
void | popdown_city_dialog (struct city *pcity)
void | popdown_all_city_dialogs (void)
bool | handmade_scenario_warning (void)
void | refresh_unit_city_dialogs (struct unit *punit)
bool | city_dialog_is_open (struct city *pcity)
bool | request_transport (struct unit *pcargo, struct tile *ptile)
void | update_infra_dialog (void)
void | gui_load_theme (const char *directory, const char *theme_name)
void | gui_clear_theme (void)
char ** | get_gui_specific_themes_directories (int *count)
char ** | get_usable_themes_in_directory (const char *directory, int *count)

## Variables

static struct gui_funcs | funcs

## Function Documentation

## ◆ add_idle_callback()

void add_idle_callback | ( | void(callback)(void *) | ,
|  | void * | data
| ) |  |

Call add_idle_callback callback

Definition at line 400 of file gui_interface.c.

## ◆ add_net_input()

void add_net_input | ( | int | sock | ) |

Call add_net_input callback

Definition at line 368 of file gui_interface.c.

## ◆ 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
| ) |  |

Call canvas_copy callback

Definition at line 231 of file gui_interface.c.

## ◆ canvas_create()

struct canvas * canvas_create | ( | int | width,
|  | int | height
| ) |  |

Call canvas_create callback

Definition at line 191 of file gui_interface.c.

## ◆ canvas_fill_sprite_area()

void canvas_fill_sprite_area | ( | struct canvas * | pcanvas,
|  | struct sprite * | psprite,
|  | struct color * | pcolor,
|  | int | canvas_x,
|  | int | canvas_y
| ) |  |

Call canvas_fill_sprite_area callback

Definition at line 286 of file gui_interface.c.

## ◆ canvas_free()

void canvas_free | ( | struct canvas * | store | ) |

Call canvas_free callback

Definition at line 199 of file gui_interface.c.

## ◆ canvas_mapview_init()

void canvas_mapview_init | ( | struct canvas * | store | ) |

Call canvas_mapview_init callback

Definition at line 223 of file gui_interface.c.

## ◆ 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
| ) |  |

Call canvas_put_curved_line callback

Definition at line 306 of file gui_interface.c.

## ◆ 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
| ) |  |

Call canvas_put_line callback

Definition at line 296 of file gui_interface.c.

## ◆ canvas_put_rectangle()

void canvas_put_rectangle | ( | struct canvas * | pcanvas,
|  | struct color * | pcolor,
|  | int | canvas_x,
|  | int | canvas_y,
|  | int | width,
|  | int | height
| ) |  |

Call canvas_put_rectangle callback

Definition at line 275 of file gui_interface.c.

## ◆ 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
| ) |  |

Call canvas_put_sprite callback

Definition at line 241 of file gui_interface.c.

## ◆ 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
| ) |  |

Call canvas_put_sprite_fogged callback

Definition at line 263 of file gui_interface.c.

## ◆ canvas_put_sprite_full()

void canvas_put_sprite_full | ( | struct canvas * | pcanvas,
|  | int | canvas_x,
|  | int | canvas_y,
|  | struct sprite * | psprite
| ) |  |

Call canvas_put_sprite_full callback

Definition at line 253 of file gui_interface.c.

## ◆ 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
| ) |  |

Call canvas_put_text callback

Definition at line 326 of file gui_interface.c.

## ◆ canvas_set_zoom()

void canvas_set_zoom | ( | struct canvas * | store,
|  | float | zoom
| ) |  |

Call canvas_set_zoom callback

Definition at line 207 of file gui_interface.c.

## ◆ city_dialog_is_open()

bool city_dialog_is_open | ( | struct city * | pcity | ) |

Call city_dialog_is_open callback

Definition at line 588 of file gui_interface.c.

## ◆ close_connection_dialog()

void close_connection_dialog | ( | void |  | ) |

Call close_connection_dialog callback

Definition at line 392 of file gui_interface.c.

## ◆ color_alloc()

struct color * color_alloc | ( | int | r,
|  | int | g,
|  | int | b
| ) |  |

Call color_alloc callback

Definition at line 175 of file gui_interface.c.

## ◆ color_free()

void color_free | ( | struct color * | pcolor | ) |

Call color_free callback

Definition at line 183 of file gui_interface.c.

## ◆ create_sprite()

struct sprite * create_sprite | ( | int | width,
|  | int | height,
|  | struct color * | pcolor
| ) |  |

Call create_sprite callback

Definition at line 139 of file gui_interface.c.

## ◆ 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
| ) |  |

Call crop_sprite callback

Definition at line 155 of file gui_interface.c.

## ◆ editgui_notify_object_changed()

void editgui_notify_object_changed | ( | int | objtype,
|  | int | object_id,
|  | bool | removal
| ) |  |

Call editgui_notify_object_changed callback

Definition at line 480 of file gui_interface.c.

## ◆ editgui_notify_object_created()

void editgui_notify_object_created | ( | int | tag,
|  | int | id
| ) |  |

Call editgui_notify_object_created callback

Definition at line 472 of file gui_interface.c.

## ◆ editgui_popdown_all()

void editgui_popdown_all | ( | void |  | ) |

Call editgui_popdown_all callback

Definition at line 504 of file gui_interface.c.

## ◆ editgui_popup_properties()

void editgui_popup_properties | ( | const struct tile_list * | tiles,
|  | int | objtype
| ) |  |

Call editgui_popup_properties callback

Definition at line 488 of file gui_interface.c.

## ◆ editgui_refresh()

void editgui_refresh | ( | void |  | ) |

Call editgui_refresh callback

Definition at line 464 of file gui_interface.c.

## ◆ editgui_tileset_changed()

void editgui_tileset_changed | ( | void |  | ) |

Call editgui_tileset_changed callback

Definition at line 496 of file gui_interface.c.

## ◆ free_sprite()

void free_sprite | ( | struct sprite * | s | ) |

Call free_sprite callback

Definition at line 167 of file gui_interface.c.

## ◆ get_current_client_page()

enum client_pages get_current_client_page | ( | void |  | ) |

Call get_current_client_page callback

Definition at line 424 of file gui_interface.c.

## ◆ get_gui_funcs()

struct gui_funcs * get_gui_funcs | ( | void |  | ) |

Return gui_funcs table. Used by gui side to get table for filling with function addresses.

Definition at line 41 of file gui_interface.c.

Referenced by setup_gui_funcs(), and setup_gui_funcs().

## ◆ get_gui_specific_themes_directories()

char ** get_gui_specific_themes_directories | ( | int * | count | ) |

Call get_gui_specific_themes_directories callback

Definition at line 628 of file gui_interface.c.

## ◆ get_gui_type()

enum gui_type get_gui_type | ( | void |  | ) |

Call get_gui_type callback

Definition at line 91 of file gui_interface.c.

## ◆ get_sprite_dimensions()

void get_sprite_dimensions | ( | struct sprite * | sprite,
|  | int * | width,
|  | int * | height
| ) |  |

Call get_sprite_dimensions callback

Definition at line 147 of file gui_interface.c.

## ◆ get_text_size()

void get_text_size | ( | int * | width,
|  | int * | height,
|  | enum client_font | font,
|  | const char * | text
| ) |  |

Call get_text_size callback

Definition at line 317 of file gui_interface.c.

## ◆ get_usable_themes_in_directory()

char ** get_usable_themes_in_directory | ( | const char * | directory,
|  | int * | count
| ) |  |

Call get_usable_themes_in_directory callback

Definition at line 636 of file gui_interface.c.

## ◆ gui_clear_theme()

void gui_clear_theme | ( | void |  | ) |

Call gui_clear_theme callback

Definition at line 620 of file gui_interface.c.

## ◆ gui_load_theme()

void gui_load_theme | ( | const char * | directory,
|  | const char * | theme_name
| ) |  |

Call gui_load_theme callback

Definition at line 612 of file gui_interface.c.

## ◆ gui_update_font()

void gui_update_font | ( | const char * | font_name,
|  | const char * | font_value
| ) |  |

Call gui_update_font callback

Definition at line 456 of file gui_interface.c.

## ◆ handmade_scenario_warning()

bool handmade_scenario_warning | ( | void |  | ) |

Call handmade_scenario_warning callback

Definition at line 572 of file gui_interface.c.

## ◆ has_zoom_support()

bool has_zoom_support | ( | void |  | ) |

Call has_zoom_support callback

Definition at line 215 of file gui_interface.c.

## ◆ insert_client_build_info()

void insert_client_build_info | ( | char * | outbuf,
|  | size_t | outlen
| ) |  |

Call insert_client_build_info callback

Definition at line 99 of file gui_interface.c.

## ◆ is_view_supported()

bool is_view_supported | ( | enum ts_type | type | ) |

Call is_view_supported callback

Definition at line 107 of file gui_interface.c.

## ◆ load_gfxfile()

struct sprite * load_gfxfile | ( | const char * | filename | ) |

Call load_gfxfile callback

Definition at line 123 of file gui_interface.c.

## ◆ load_gfxnumber()

struct sprite * load_gfxnumber | ( | int | num | ) |

Call load_gfxnumber callback

Definition at line 131 of file gui_interface.c.

## ◆ map_canvas_size_refresh()

void map_canvas_size_refresh | ( | void |  | ) |

Call map_canvas_size_refresh callback

Definition at line 336 of file gui_interface.c.

## ◆ options_extra_init()

void options_extra_init | ( | void |  | ) |

Call options_extra_init callback

Definition at line 352 of file gui_interface.c.

## ◆ popdown_all_city_dialogs()

void popdown_all_city_dialogs | ( | void |  | ) |

Call popdown_all_city_dialogs callback

Definition at line 564 of file gui_interface.c.

## ◆ popdown_city_dialog()

void popdown_city_dialog | ( | struct city * | pcity | ) |

Call popdown_city_dialog callback

Definition at line 556 of file gui_interface.c.

## ◆ 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
| ) |  |

Call popup_combat_info callback

Definition at line 512 of file gui_interface.c.

## ◆ real_city_dialog_popup()

void real_city_dialog_popup | ( | struct city * | pcity | ) |

Call real_city_dialog_popup callback

Definition at line 540 of file gui_interface.c.

## ◆ real_city_dialog_refresh()

void real_city_dialog_refresh | ( | struct city * | pcity | ) |

Call real_city_dialog_refresh callback

Definition at line 548 of file gui_interface.c.

## ◆ real_conn_list_dialog_update()

void real_conn_list_dialog_update | ( | void * | unused | ) |

Call real_conn_list_dialog_update callback

Definition at line 384 of file gui_interface.c.

## ◆ real_focus_units_changed()

void real_focus_units_changed | ( | void |  | ) |

Call real_focus_units_changed callback

Definition at line 440 of file gui_interface.c.

## ◆ real_output_window_append()

void real_output_window_append | ( | const char * | astring,
|  | const struct text_tag_list * | tags,
|  | int | conn_id
| ) |  |

Call real_output_window_append callback

Definition at line 81 of file gui_interface.c.

## ◆ real_set_client_page()

void real_set_client_page | ( | enum client_pages | page | ) |

Call real_set_client_page callback

Definition at line 416 of file gui_interface.c.

## ◆ refresh_unit_city_dialogs()

void refresh_unit_city_dialogs | ( | struct unit * | punit | ) |

Call refresh_unit_city_dialogs callback

Definition at line 580 of file gui_interface.c.

## ◆ remove_net_input()

void remove_net_input | ( | void |  | ) |

Call remove_net_input callback

Definition at line 376 of file gui_interface.c.

## ◆ request_transport()

bool request_transport | ( | struct unit * | pcargo,
|  | struct tile * | ptile
| ) |  |

Call request_transport callback

Definition at line 596 of file gui_interface.c.

## ◆ server_connect()

void server_connect | ( | void |  | ) |

Call server_connect callback

Definition at line 360 of file gui_interface.c.

## ◆ set_rulesets()

void set_rulesets | ( | int | num_rulesets,
|  | char ** | rulesets
| ) |  |

Call set_rulesets callback

Definition at line 344 of file gui_interface.c.

## ◆ set_unit_icon()

void set_unit_icon | ( | int | idx,
|  | struct unit * | punit
| ) |  |

Call set_unit_icon callback

Definition at line 432 of file gui_interface.c.

## ◆ set_unit_icons_more_arrow()

void set_unit_icons_more_arrow | ( | bool | onoff | ) |

Call set_unit_icons_more_arrow callback

Definition at line 448 of file gui_interface.c.

## ◆ sound_bell()

void sound_bell | ( | void |  | ) |

Call sound_bell callback

Definition at line 408 of file gui_interface.c.

## ◆ start_turn()

void start_turn | ( | void |  | ) |

Call start_turn callback

Definition at line 532 of file gui_interface.c.

## ◆ tileset_type_set()

void tileset_type_set | ( | enum ts_type | type | ) |

Call tileset_type_set callback

Definition at line 115 of file gui_interface.c.

## ◆ ui_exit()

void ui_exit | ( | void |  | ) |

Call ui_exit callback

Definition at line 65 of file gui_interface.c.

## ◆ ui_init()

void ui_init | ( | void |  | ) |

Call ui_init callback

Definition at line 49 of file gui_interface.c.

## ◆ ui_main()

int ui_main | ( | int | argc,
|  | char * | argv[]
| ) |  |

Call ui_main callback

Definition at line 57 of file gui_interface.c.

## ◆ update_infra_dialog()

void update_infra_dialog | ( | void |  | ) |

Call update_infra_dialog callback

Definition at line 604 of file gui_interface.c.

## ◆ update_timeout_label()

void update_timeout_label | ( | void |  | ) |

Call update_timeout_label callback

Definition at line 524 of file gui_interface.c.

## ◆ version_message()

void version_message | ( | const char * | vertext | ) |

Call version_message callback

Definition at line 73 of file gui_interface.c.

## Variable Documentation

## ◆ funcs

struct gui_funcs funcs

static

Definition at line 35 of file gui_interface.c.

Referenced by add_idle_callback(), add_net_input(), canvas_copy(), canvas_create(), canvas_fill_sprite_area(), canvas_free(), canvas_mapview_init(), canvas_put_curved_line(), canvas_put_line(), canvas_put_rectangle(), canvas_put_sprite(), canvas_put_sprite_fogged(), canvas_put_sprite_full(), canvas_put_text(), canvas_set_zoom(), city_dialog_is_open(), close_connection_dialog(), color_alloc(), color_free(), create_sprite(), crop_sprite(), editgui_notify_object_changed(), editgui_notify_object_created(), editgui_popdown_all(), editgui_popup_properties(), editgui_refresh(), editgui_tileset_changed(), fc_interface_init_client(), fc_interface_init_server(), fc_interface_init_tool(), free_sprite(), get_current_client_page(), get_gui_funcs(), get_gui_specific_themes_directories(), get_gui_type(), get_sprite_dimensions(), get_text_size(), get_usable_themes_in_directory(), gui_clear_theme(), gui_load_theme(), gui_update_font(), handmade_scenario_warning(), has_zoom_support(), insert_client_build_info(), is_view_supported(), load_gfxfile(), load_gfxnumber(), map_canvas_size_refresh(), options_extra_init(), popdown_all_city_dialogs(), popdown_city_dialog(), popup_combat_info(), real_city_dialog_popup(), real_city_dialog_refresh(), real_conn_list_dialog_update(), real_focus_units_changed(), real_output_window_append(), real_set_client_page(), refresh_unit_city_dialogs(), remove_net_input(), request_transport(), server_connect(), set_rulesets(), set_unit_icon(), set_unit_icons_more_arrow(), setup_gui_funcs(), setup_gui_funcs(), sound_bell(), start_turn(), tileset_type_set(), ui_exit(), ui_init(), ui_main(), update_infra_dialog(), update_timeout_label(), and version_message().