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)
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
19 #endif /* __cplusplus */
23 #include "featured_text.h"
31 void (*ui_init
)(void);
32 void (*ui_main
)(int argc
, char *argv
[]);
33 void (*ui_exit
)(void);
35 enum gui_type (*get_gui_type
)(void);
37 void (*version_message
)(char *vertext
);
38 void (*real_output_window_append
)(const char *astring
,
39 const struct text_tag_list
*tags
,
42 bool (*isometric_view_supported
)(void);
43 bool (*overhead_view_supported
)(void);
44 void (*free_intro_radar_sprites
)(void);
45 struct sprite
* (*load_gfxfile
)(const char *filename
);
46 struct sprite
* (*create_sprite
)(int width
, int height
, struct color
*pcolor
);
47 void (*get_sprite_dimensions
)(struct sprite
*sprite
, int *width
, int *height
);
48 struct sprite
* (*crop_sprite
)(struct sprite
*source
,
49 int x
, int y
, int width
, int height
,
51 int mask_offset_x
, int mask_offset_y
);
52 void (*free_sprite
)(struct sprite
*s
);
54 struct color
*(*color_alloc
)(int r
, int g
, int b
);
55 void (*color_free
)(struct color
*pcolor
);
57 struct canvas
*(*canvas_create
)(int width
, int height
);
58 void (*canvas_free
)(struct canvas
*store
);
59 void (*canvas_copy
)(struct canvas
*dest
, struct canvas
*src
,
60 int src_x
, int src_y
, int dest_x
, int dest_y
, int width
,
62 void (*canvas_put_sprite
)(struct canvas
*pcanvas
,
63 int canvas_x
, int canvas_y
,
64 struct sprite
*psprite
,
65 int offset_x
, int offset_y
, int width
, int height
);
66 void (*canvas_put_sprite_full
)(struct canvas
*pcanvas
,
67 int canvas_x
, int canvas_y
,
68 struct sprite
*psprite
);
69 void (*canvas_put_sprite_fogged
)(struct canvas
*pcanvas
,
70 int canvas_x
, int canvas_y
,
71 struct sprite
*psprite
,
72 bool fog
, int fog_x
, int fog_y
);
73 void (*canvas_put_rectangle
)(struct canvas
*pcanvas
,
75 int canvas_x
, int canvas_y
,
76 int width
, int height
);
77 void (*canvas_fill_sprite_area
)(struct canvas
*pcanvas
,
78 struct sprite
*psprite
, struct color
*pcolor
,
79 int canvas_x
, int canvas_y
);
80 void (*canvas_fog_sprite_area
)(struct canvas
*pcanvas
,
81 struct sprite
*psprite
,
82 int canvas_x
, int canvas_y
);
83 void (*canvas_put_line
)(struct canvas
*pcanvas
, struct color
*pcolor
,
84 enum line_type ltype
, int start_x
, int start_y
,
86 void (*canvas_put_curved_line
)(struct canvas
*pcanvas
, struct color
*pcolor
,
87 enum line_type ltype
, int start_x
, int start_y
,
89 void (*get_text_size
)(int *width
, int *height
,
90 enum client_font font
, const char *text
);
91 void (*canvas_put_text
)(struct canvas
*pcanvas
, int canvas_x
, int canvas_y
,
92 enum client_font font
, struct color
*pcolor
,
95 void (*gui_set_rulesets
)(int num_rulesets
, char **rulesets
);
96 void (*gui_options_extra_init
)(void);
97 void (*gui_server_connect
)(void);
98 void (*add_net_input
)(int sock
);
99 void (*remove_net_input
)(void);
100 void (*real_conn_list_dialog_update
)(void);
101 void (*close_connection_dialog
)(void);
102 void (*add_idle_callback
)(void (callback
)(void *), void *data
);
103 void (*sound_bell
)(void);
105 void (*real_set_client_page
)(enum client_pages page
);
106 enum client_pages (*get_current_client_page
)(void);
108 void (*set_unit_icon
)(int idx
, struct unit
*punit
);
109 void (*set_unit_icons_more_arrow
)(bool onoff
);
110 void (*real_focus_units_changed
)(void);
111 void (*gui_update_font
)(const char *font_name
, const char *font_value
);
112 void (*set_city_names_font_sizes
)(int my_city_names_font_size
,
113 int my_city_productions_font_size
);
115 void (*editgui_refresh
)(void);
116 void (*editgui_notify_object_created
)(int tag
, int id
);
117 void (*editgui_notify_object_changed
)(int objtype
, int object_id
, bool remove
);
118 void (*editgui_popup_properties
)(const struct tile_list
*tiles
, int objtype
);
119 void (*editgui_tileset_changed
)(void);
120 void (*editgui_popdown_all
)(void);
122 void (*gui_ggz_embed_ensure_server
)(void);
123 void (*gui_ggz_embed_leave_table
)(void);
124 void (*add_ggz_input
)(int sock
);
125 void (*remove_ggz_input
)(void);
127 void (*update_timeout_label
)(void);
128 void (*real_city_dialog_popup
)(struct city
*pcity
);
129 void (*real_city_dialog_refresh
)(struct city
*pcity
);
130 void (*popdown_city_dialog
)(struct city
*pcity
);
131 void (*popdown_all_city_dialogs
)(void);
132 void (*refresh_unit_city_dialogs
)(struct unit
*punit
);
133 bool (*city_dialog_is_open
)(struct city
*pcity
);
135 void (*gui_load_theme
)(const char *directory
, const char *theme_name
);
136 void (*gui_clear_theme
)(void);
137 char **(*get_gui_specific_themes_directories
)(int *count
);
138 char **(*get_useable_themes_in_directory
)(const char *directory
, int *count
);
141 struct gui_funcs
*get_gui_funcs(void);
145 #endif /* __cplusplus */
147 #endif /* FC__QTG_CSIDE_H */