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);
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);
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);
67 int canvas_x, int canvas_y,
68 struct sprite *sprite,
69 int offset_x, int offset_y, int width, int height);
71 int canvas_x, int canvas_y,
72 struct sprite *sprite);
74 int canvas_x, int canvas_y,
75 struct sprite *psprite,
76 bool fog, int fog_x, int fog_y);
78 struct color *pcolor,
79 int canvas_x, int canvas_y,
80 int width, int height);
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);
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);
93 enum client_font font, struct color *pcolor,
94 const char *text);
95
97
98void qtg_set_rulesets(int num_rulesets, char **rulesets);
100void qtg_server_connect();
101void qtg_add_net_input(int sock);
103void qtg_real_conn_list_dialog_update(void *unused);
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);
117void qtg_gui_update_font(const char *font_name, const char *font_value);
118
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);
125
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);
134bool qtg_city_dialog_is_open(struct city *pcity);
135
136bool qtg_request_transport(struct unit *pcargo, struct tile *ptile);
137
139
140void qtg_gui_load_theme(const char *directory, const char *theme_name);
143char **qtg_get_usable_themes_in_directory(const char *directory, int *count);
144
145#endif /* FC__QTG_CXXSIDE_H */
struct canvas int int struct sprite int int int int height
Definition canvas_g.h:44
struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color * pcolor
Definition canvas_g.h:57
struct canvas int int struct sprite bool int fog_x
Definition canvas_g.h:51
struct canvas int int canvas_y
Definition canvas_g.h:43
struct canvas int canvas_x
Definition canvas_g.h:43
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
struct canvas int int struct sprite int int int width
Definition canvas_g.h:44
struct canvas * pcanvas
Definition canvas_g.h:42
struct canvas int int struct sprite * psprite
Definition canvas_g.h:50
struct canvas int int struct sprite int int offset_y
Definition canvas_g.h:44
struct canvas int int struct sprite int offset_x
Definition canvas_g.h:44
line_type
Definition canvas_g.h:25
struct canvas int int struct sprite bool fog
Definition canvas_g.h:51
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
int objtype
Definition editgui_g.h:28
static GtkWidget * source
Definition gotodlg.c:58
GType type
Definition repodlgs.c:1312
const char * font_name
Definition gui_main_g.h:43
bool qtg_handmade_scenario_warning()
Definition dialogs.cpp:4750
void qtg_popdown_city_dialog(struct city *pcity)
Definition citydlg.cpp:3749
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
void setup_gui_funcs()
void qtg_real_set_client_page(enum client_pages page)
Definition pages.cpp:102
void qtg_get_text_size(int *width, int *height, enum client_font font, const char *text)
Definition canvas.cpp:311
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
void qtg_ui_init()
Definition gui_main.cpp:91
void qtg_real_city_dialog_refresh(struct city *pcity)
Definition citydlg.cpp:3769
void qtg_editgui_popup_properties(const struct tile_list *tiles, int objtype)
Definition gui_main.cpp:497
void qtg_remove_net_input()
Definition gui_main.cpp:309
enum client_pages qtg_get_current_client_page()
Definition pages.cpp:120
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
void qtg_update_infra_dialog()
Definition infradlg.cpp:24
bool qtg_has_zoom_support()
Definition canvas.cpp:63
void qtg_get_sprite_dimensions(struct sprite *sprite, int *width, int *height)
Definition sprite.cpp:163
void qtg_options_extra_init()
Definition gui_main.cpp:228
void qtg_canvas_put_sprite_full(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite)
Definition canvas.cpp:153
void qtg_editgui_refresh()
Definition gui_main.cpp:491
void qtg_canvas_free(struct canvas *store)
Definition canvas.cpp:47
bool qtg_city_dialog_is_open(struct city *pcity)
Definition citydlg.cpp:3824
void qtg_set_rulesets(int num_rulesets, char **rulesets)
Definition pages.cpp:112
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
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
int qtg_ui_main(int argc, char *argv[])
Definition gui_main.cpp:169
void qtg_popdown_all_city_dialogs()
Definition citydlg.cpp:3761
void qtg_editgui_popdown_all()
Definition gui_main.cpp:503
char ** qtg_get_usable_themes_in_directory(const char *directory, int *count)
Definition themes.cpp:145
bool qtg_is_view_supported(enum ts_type type)
Definition graphics.cpp:28
void qtg_update_timeout_label()
Definition mapview.cpp:1088
void qtg_gui_clear_theme()
Definition themes.cpp:104
void qtg_real_conn_list_dialog_update(void *unused)
Definition gui_main.cpp:274
void qtg_refresh_unit_city_dialogs(struct unit *punit)
Definition citydlg.cpp:3808
struct sprite * qtg_load_gfxfile(const char *filename)
Definition sprite.cpp:67
void qtg_tileset_type_set(enum ts_type type)
Definition graphics.cpp:42
void qtg_free_sprite(struct sprite *s)
Definition sprite.cpp:172
void qtg_editgui_tileset_changed()
Definition gui_main.cpp:485
void qtg_gui_load_theme(const char *directory, const char *theme_name)
Definition themes.cpp:44
struct canvas * qtg_canvas_create(int width, int height)
Definition canvas.cpp:35
void qtg_editgui_notify_object_created(int tag, int id)
Definition gui_main.cpp:516
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
void qtg_close_connection_dialog()
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
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:4800
void qtg_add_net_input(int sock)
Definition gui_main.cpp:299
struct color * qtg_color_alloc(int r, int g, int b)
Definition colors.cpp:29
void qtg_real_city_dialog_popup(struct city *pcity)
Definition citydlg.cpp:3721
void qtg_editgui_notify_object_changed(int objtype, int object_id, bool removal)
Definition gui_main.cpp:509
void qtg_gui_update_font(const char *font_name, const char *font_value)
Definition gui_main.cpp:522
void qtg_set_unit_icon(int idx, struct unit *punit)
Definition gui_main.cpp:325
void qtg_ui_exit()
Definition gui_main.cpp:264
struct sprite * qtg_load_gfxnumber(int num)
Definition sprite.cpp:195
char ** qtg_get_gui_specific_themes_directories(int *count)
Definition themes.cpp:120
void qtg_server_connect()
void qtg_version_message(const char *vertext)
Definition chatline.cpp:808
void qtg_real_output_window_append(const char *astring, const struct text_tag_list *tags, int conn_id)
Definition chatline.cpp:740
void qtg_start_turn()
Definition mapview.cpp:1449
void qtg_map_canvas_size_refresh(void)
Definition mapview.cpp:1461
void qtg_real_focus_units_changed(void)
Definition gui_main.cpp:347
void qtg_insert_client_build_info(char *outbuf, size_t outlen)
Definition gui_main.cpp:578
void qtg_set_unit_icons_more_arrow(bool onoff)
Definition gui_main.cpp:337
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
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
struct sprite * qtg_create_sprite(int width, int height, struct color *pcolor)
Definition sprite.cpp:181
void qtg_add_idle_callback(void(callback)(void *), void *data)
Definition gui_main.cpp:363
enum gui_type qtg_get_gui_type()
Definition gui_main.cpp:540
bool qtg_request_transport(struct unit *pcargo, struct tile *ptile)
Definition dialogs.cpp:4759
void qtg_canvas_set_zoom(struct canvas *store, float zoom)
Definition canvas.cpp:55
void qtg_canvas_mapview_init(struct canvas *store)
Definition canvas.cpp:71
void qtg_color_free(struct color *pcolor)
Definition colors.cpp:41
void qtg_sound_bell()
Definition gui_main.cpp:286
float zoom
Definition canvas.h:24
Definition city.h:309
Definition colors.h:20
int g
Definition colors.h:21
int r
Definition colors.h:21
int b
Definition colors.h:21
Definition tile.h:49
Definition unit.h:138
const char * directory
Definition themes_g.h:23