Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-qt/qtg_cxxside.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
qtg_cxxside.h
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#ifndef FC__QTG_CXXSIDE_H
15#define FC__QTG_CXXSIDE_H
16
17// common
18#include "fc_types.h"
19
20// client
21#include "tilespec.h"
22
23// gui-qt
24#include "canvas.h"
25#include "pages.h"
26
27
28void setup_gui_funcs();
29
30void qtg_ui_init();
31int qtg_ui_main(int argc, char *argv[]);
32void qtg_ui_exit();
33
34enum gui_type qtg_get_gui_type();
35void qtg_insert_client_build_info(char *outbuf, size_t outlen);
36
37void qtg_version_message(const char *vertext);
38void qtg_real_output_window_append(const char *astring,
39 const struct text_tag_list *tags,
40 int conn_id);
41
42bool qtg_is_view_supported(enum ts_type type);
43void qtg_tileset_type_set(enum ts_type type);
44struct sprite *qtg_load_gfxfile(const char *filename);
45struct sprite *qtg_load_gfxnumber(int num);
46struct sprite *qtg_create_sprite(int width, int height, struct color *pcolor);
47void qtg_get_sprite_dimensions(struct sprite *sprite, int *width, int *height);
48struct sprite *qtg_crop_sprite(struct sprite *source,
49 int x, int y, int width, int height,
50 struct sprite *mask,
51 int mask_offset_x, int mask_offset_y,
52 float scale, bool smooth);
53void qtg_free_sprite(struct sprite *s);
54
55struct color *qtg_color_alloc(int r, int g, int b);
56void qtg_color_free(struct color *pcolor);
57
58struct canvas *qtg_canvas_create(int width, int height);
59void qtg_canvas_free(struct canvas *store);
60void qtg_canvas_set_zoom(struct canvas *store, float zoom);
61bool qtg_has_zoom_support();
62void qtg_canvas_mapview_init(struct canvas *store);
63void qtg_canvas_copy(struct canvas *dest, struct canvas *src,
64 int src_x, int src_y, int dest_x, int dest_y, int width,
65 int height);
66void qtg_canvas_put_sprite(struct canvas *pcanvas,
67 int canvas_x, int canvas_y,
68 struct sprite *sprite,
69 int offset_x, int offset_y, int width, int height);
70void qtg_canvas_put_sprite_full(struct canvas *pcanvas,
71 int canvas_x, int canvas_y,
72 struct sprite *sprite);
73void qtg_canvas_put_sprite_fogged(struct canvas *pcanvas,
74 int canvas_x, int canvas_y,
75 struct sprite *psprite,
76 bool fog, int fog_x, int fog_y);
77void qtg_canvas_put_rectangle(struct canvas *pcanvas,
78 struct color *pcolor,
79 int canvas_x, int canvas_y,
80 int width, int height);
81void qtg_canvas_fill_sprite_area(struct canvas *pcanvas,
82 struct sprite *psprite, struct color *pcolor,
83 int canvas_x, int canvas_y);
84void qtg_canvas_put_line(struct canvas *pcanvas, struct color *pcolor,
85 enum line_type ltype, int start_x, int start_y,
86 int dx, int dy);
87void qtg_canvas_put_curved_line(struct canvas *pcanvas, struct color *pcolor,
88 enum line_type ltype, int start_x, int start_y,
89 int dx, int dy);
90void qtg_get_text_size(int *width, int *height,
91 enum client_font font, const char *text);
92void qtg_canvas_put_text(struct canvas *pcanvas, int canvas_x, int canvas_y,
93 enum client_font font, struct color *pcolor,
94 const char *text);
95
96void qtg_map_canvas_size_refresh(void);
97
98void qtg_set_rulesets(int num_rulesets, char **rulesets);
99void qtg_options_extra_init();
100void qtg_server_connect();
101void qtg_add_net_input(int sock);
102void qtg_remove_net_input();
103void qtg_real_conn_list_dialog_update(void *unused);
104void qtg_close_connection_dialog();
105void qtg_add_idle_callback(void (callback)(void *), void *data);
106void qtg_sound_bell();
107
108void qtg_real_set_client_page(enum client_pages page);
109enum client_pages qtg_get_current_client_page();
110
111void qtg_popup_combat_info(int attacker_unit_id, int defender_unit_id,
112 int attacker_hp, int defender_hp,
113 bool make_att_veteran, bool make_def_veteran);
114void qtg_set_unit_icon(int idx, struct unit *punit);
115void qtg_set_unit_icons_more_arrow(bool onoff);
116void qtg_real_focus_units_changed(void);
117void qtg_gui_update_font(const char *font_name, const char *font_value);
118
119void qtg_editgui_refresh();
120void qtg_editgui_notify_object_created(int tag, int id);
121void qtg_editgui_notify_object_changed(int objtype, int object_id, bool removal);
122void qtg_editgui_popup_properties(const struct tile_list *tiles, int objtype);
123void qtg_editgui_tileset_changed();
124void qtg_editgui_popdown_all();
125
126void qtg_update_timeout_label();
127void qtg_start_turn();
128void qtg_real_city_dialog_popup(struct city *pcity);
129void qtg_real_city_dialog_refresh(struct city *pcity);
130void qtg_popdown_city_dialog(struct city *pcity);
131void qtg_popdown_all_city_dialogs();
132bool qtg_handmade_scenario_warning();
133void qtg_refresh_unit_city_dialogs(struct unit *punit);
134bool qtg_city_dialog_is_open(struct city *pcity);
135
136bool qtg_request_transport(struct unit *pcargo, struct tile *ptile);
137
138void qtg_update_infra_dialog();
139
140void qtg_gui_load_theme(const char *directory, const char *theme_name);
141void qtg_gui_clear_theme();
142char **qtg_get_gui_specific_themes_directories(int *count);
143char **qtg_get_usable_themes_in_directory(const char *directory, int *count);
144
145#endif /* FC__QTG_CXXSIDE_H */
height
struct canvas int int struct sprite int int int int height
Definition canvas_g.h:44
pcolor
struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color * pcolor
Definition canvas_g.h:57
fog_x
struct canvas int int struct sprite bool int fog_x
Definition canvas_g.h:51
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
client_font
struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color int int canvas_y struct canvas struct color enum line_type ltype int start_x int start_y int dx int dy enum client_font
Definition canvas_g.h:69
width
struct canvas int int struct sprite int int int width
Definition canvas_g.h:44
pcanvas
struct canvas * pcanvas
Definition canvas_g.h:42
psprite
struct canvas int int struct sprite * psprite
Definition canvas_g.h:50
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
line_type
line_type
Definition canvas_g.h:25
fog
struct canvas int int struct sprite bool fog
Definition canvas_g.h:51
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:73
objtype
int objtype
Definition editgui_g.h:28
fc_types.h
source
static GtkWidget * source
Definition gotodlg.c:58
type
GType type
Definition repodlgs.c:1312
canvas.h
pages.h
font_name
const char * font_name
Definition gui_main_g.h:43
qtg_handmade_scenario_warning
bool qtg_handmade_scenario_warning()
Definition dialogs.cpp:4749
qtg_popdown_city_dialog
void qtg_popdown_city_dialog(struct city *pcity)
Definition citydlg.cpp:3734
qtg_crop_sprite
struct sprite * qtg_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.cpp:104
setup_gui_funcs
void setup_gui_funcs()
Definition qtg_cxxside.cpp:29
qtg_real_set_client_page
void qtg_real_set_client_page(enum client_pages page)
Definition pages.cpp:102
qtg_get_text_size
void qtg_get_text_size(int *width, int *height, enum client_font font, const char *text)
Definition canvas.cpp:311
qtg_canvas_fill_sprite_area
void qtg_canvas_fill_sprite_area(struct canvas *pcanvas, struct sprite *psprite, struct color *pcolor, int canvas_x, int canvas_y)
Definition canvas.cpp:214
qtg_ui_init
void qtg_ui_init()
Definition gui_main.cpp:91
qtg_real_city_dialog_refresh
void qtg_real_city_dialog_refresh(struct city *pcity)
Definition citydlg.cpp:3754
qtg_editgui_popup_properties
void qtg_editgui_popup_properties(const struct tile_list *tiles, int objtype)
Definition gui_main.cpp:497
qtg_remove_net_input
void qtg_remove_net_input()
Definition gui_main.cpp:309
qtg_get_current_client_page
enum client_pages qtg_get_current_client_page()
Definition pages.cpp:120
qtg_canvas_put_text
void qtg_canvas_put_text(struct canvas *pcanvas, int canvas_x, int canvas_y, enum client_font font, struct color *pcolor, const char *text)
Definition canvas.cpp:334
qtg_update_infra_dialog
void qtg_update_infra_dialog()
Definition infradlg.cpp:24
qtg_has_zoom_support
bool qtg_has_zoom_support()
Definition canvas.cpp:63
qtg_get_sprite_dimensions
void qtg_get_sprite_dimensions(struct sprite *sprite, int *width, int *height)
Definition sprite.cpp:163
qtg_options_extra_init
void qtg_options_extra_init()
Definition gui_main.cpp:228
qtg_canvas_put_sprite_full
void qtg_canvas_put_sprite_full(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite)
Definition canvas.cpp:153
qtg_editgui_refresh
void qtg_editgui_refresh()
Definition gui_main.cpp:491
qtg_canvas_free
void qtg_canvas_free(struct canvas *store)
Definition canvas.cpp:47
qtg_city_dialog_is_open
bool qtg_city_dialog_is_open(struct city *pcity)
Definition citydlg.cpp:3809
qtg_set_rulesets
void qtg_set_rulesets(int num_rulesets, char **rulesets)
Definition pages.cpp:112
qtg_canvas_put_curved_line
void qtg_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.cpp:266
qtg_canvas_put_line
void qtg_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.cpp:227
qtg_ui_main
int qtg_ui_main(int argc, char *argv[])
Definition gui_main.cpp:169
qtg_popdown_all_city_dialogs
void qtg_popdown_all_city_dialogs()
Definition citydlg.cpp:3746
qtg_editgui_popdown_all
void qtg_editgui_popdown_all()
Definition gui_main.cpp:503
qtg_get_usable_themes_in_directory
char ** qtg_get_usable_themes_in_directory(const char *directory, int *count)
Definition themes.cpp:145
qtg_is_view_supported
bool qtg_is_view_supported(enum ts_type type)
Definition graphics.cpp:28
qtg_update_timeout_label
void qtg_update_timeout_label()
Definition mapview.cpp:1080
qtg_gui_clear_theme
void qtg_gui_clear_theme()
Definition themes.cpp:104
qtg_real_conn_list_dialog_update
void qtg_real_conn_list_dialog_update(void *unused)
Definition gui_main.cpp:274
qtg_refresh_unit_city_dialogs
void qtg_refresh_unit_city_dialogs(struct unit *punit)
Definition citydlg.cpp:3793
qtg_load_gfxfile
struct sprite * qtg_load_gfxfile(const char *filename)
Definition sprite.cpp:67
qtg_tileset_type_set
void qtg_tileset_type_set(enum ts_type type)
Definition graphics.cpp:42
qtg_free_sprite
void qtg_free_sprite(struct sprite *s)
Definition sprite.cpp:172
qtg_editgui_tileset_changed
void qtg_editgui_tileset_changed()
Definition gui_main.cpp:485
qtg_gui_load_theme
void qtg_gui_load_theme(const char *directory, const char *theme_name)
Definition themes.cpp:44
qtg_canvas_create
struct canvas * qtg_canvas_create(int width, int height)
Definition canvas.cpp:35
qtg_editgui_notify_object_created
void qtg_editgui_notify_object_created(int tag, int id)
Definition gui_main.cpp:516
qtg_canvas_put_sprite
void qtg_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.cpp:138
qtg_close_connection_dialog
void qtg_close_connection_dialog()
Definition connectdlg.cpp:39
qtg_canvas_copy
void qtg_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.cpp:78
qtg_popup_combat_info
void qtg_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.cpp:4799
qtg_add_net_input
void qtg_add_net_input(int sock)
Definition gui_main.cpp:299
qtg_color_alloc
struct color * qtg_color_alloc(int r, int g, int b)
Definition colors.cpp:29
qtg_real_city_dialog_popup
void qtg_real_city_dialog_popup(struct city *pcity)
Definition citydlg.cpp:3706
qtg_editgui_notify_object_changed
void qtg_editgui_notify_object_changed(int objtype, int object_id, bool removal)
Definition gui_main.cpp:509
qtg_gui_update_font
void qtg_gui_update_font(const char *font_name, const char *font_value)
Definition gui_main.cpp:522
qtg_set_unit_icon
void qtg_set_unit_icon(int idx, struct unit *punit)
Definition gui_main.cpp:325
qtg_ui_exit
void qtg_ui_exit()
Definition gui_main.cpp:264
qtg_load_gfxnumber
struct sprite * qtg_load_gfxnumber(int num)
Definition sprite.cpp:195
qtg_get_gui_specific_themes_directories
char ** qtg_get_gui_specific_themes_directories(int *count)
Definition themes.cpp:120
qtg_server_connect
void qtg_server_connect()
Definition connectdlg.cpp:77
qtg_version_message
void qtg_version_message(const char *vertext)
Definition chatline.cpp:808
qtg_real_output_window_append
void qtg_real_output_window_append(const char *astring, const struct text_tag_list *tags, int conn_id)
Definition chatline.cpp:740
qtg_start_turn
void qtg_start_turn()
Definition mapview.cpp:1441
qtg_map_canvas_size_refresh
void qtg_map_canvas_size_refresh(void)
Definition mapview.cpp:1453
qtg_real_focus_units_changed
void qtg_real_focus_units_changed(void)
Definition gui_main.cpp:347
qtg_insert_client_build_info
void qtg_insert_client_build_info(char *outbuf, size_t outlen)
Definition gui_main.cpp:578
qtg_set_unit_icons_more_arrow
void qtg_set_unit_icons_more_arrow(bool onoff)
Definition gui_main.cpp:337
qtg_canvas_put_rectangle
void qtg_canvas_put_rectangle(struct canvas *pcanvas, struct color *pcolor, int canvas_x, int canvas_y, int width, int height)
Definition canvas.cpp:185
qtg_canvas_put_sprite_fogged
void qtg_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.cpp:168
qtg_create_sprite
struct sprite * qtg_create_sprite(int width, int height, struct color *pcolor)
Definition sprite.cpp:181
qtg_add_idle_callback
void qtg_add_idle_callback(void(callback)(void *), void *data)
Definition gui_main.cpp:363
qtg_get_gui_type
enum gui_type qtg_get_gui_type()
Definition gui_main.cpp:540
qtg_request_transport
bool qtg_request_transport(struct unit *pcargo, struct tile *ptile)
Definition dialogs.cpp:4758
qtg_canvas_set_zoom
void qtg_canvas_set_zoom(struct canvas *store, float zoom)
Definition canvas.cpp:55
qtg_canvas_mapview_init
void qtg_canvas_mapview_init(struct canvas *store)
Definition canvas.cpp:71
qtg_color_free
void qtg_color_free(struct color *pcolor)
Definition colors.cpp:41
qtg_sound_bell
void qtg_sound_bell()
Definition gui_main.cpp:286
astring
Definition astring.h:36
callback
Definition gui_main.c:2186
canvas
Definition canvas.h:21
canvas::zoom
float zoom
Definition canvas.h:24
city
Definition city.h:309
color
Definition colors.h:20
color::g
int g
Definition colors.h:21
color::r
int r
Definition colors.h:21
color::b
int b
Definition colors.h:21
sprite
Definition sprite.h:22
tile
Definition tile.h:49
unit
Definition unit.h:138
directory
const char * directory
Definition themes_g.h:23
tilespec.h