Freeciv-3.1
Loading...
Searching...
No Matches
gui_main.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#ifndef FC__GUI_MAIN_H
14#define FC__GUI_MAIN_H
15
16#include <gtk/gtk.h>
17
18/* client */
19#include "gui_main_g.h"
20#include "options.h"
21
22#define GUI_NAME_FULL "gui-gtk-4.0"
23#define GUI_NAME_SHORT "gtk4"
24
25#define GUI_GTK_OPTION(optname) gui_options.gui_gtk4_##optname
26#define GUI_GTK_OPTION_STR(optname) "gui_gtk4_" #optname
27#define GUI_GTK_DEFAULT_THEME_NAME FC_GTK4_DEFAULT_THEME_NAME
28
29void main_message_area_resize(void *data);
30void animation_idle_cb(void *data);
31
32/* Network string charset conversion */
33gchar *ntoh_str(const gchar *netstr);
34
35extern PangoFontDescription *city_names_style;
36extern PangoFontDescription *city_productions_style;
37extern PangoFontDescription *reqtree_text_style;
38
39#define single_tile_pixmap (mapview.single_tile->pixmap)
40
41extern GtkTextView * main_message_area;
42extern GtkWidget * text_scrollbar;
43extern GtkWidget * toplevel;
44extern GtkWidget * top_vbox;
45extern GtkWidget * main_frame_civ_name;
46extern GtkWidget * main_label_info;
47extern GtkWidget * econ_label[10];
48extern GtkWidget * bulb_label;
49extern GtkWidget * sun_label;
50extern GtkWidget * flake_label;
51extern GtkWidget * government_label;
52extern GtkWidget * econ_widget;
53extern GtkWidget * map_canvas; /* GtkDrawingArea */
54extern GtkWidget * overview_canvas; /* GtkDrawingArea */
55extern GtkWidget * overview_scrolled_window; /* GtkScrolledWindow */
56extern GtkWidget * timeout_label;
57extern GtkWidget * turn_done_button;
58extern GtkWidget * unit_info_box;
59extern GtkWidget * unit_info_label;
60extern GtkWidget * unit_info_frame;
61extern GtkWidget * map_horizontal_scrollbar;
62extern GtkWidget * map_vertical_scrollbar;
63
64extern GtkWidget * toplevel_tabs;
65extern GtkWidget * top_notebook;
66extern GtkWidget * map_widget;
67extern GtkWidget * bottom_notebook;
68extern GtkWidget * right_notebook;
69extern GtkTextBuffer * message_buffer;
70
73
74gboolean map_canvas_focus(void);
75
76void reset_unit_table(void);
77void popup_quit_dialog(void);
78void quit_gtk_main(void);
79void refresh_chat_buttons(void);
80
81int screen_width(void);
82int screen_height(void);
84
85void fullscreen_opt_refresh(struct option *poption);
86
87GtkApplication *gui_app(void);
88bool is_gui_up(void);
89
90gboolean terminate_signal_processing(GtkEventControllerFocus *controller,
91 gpointer data);
92
94
95#endif /* FC__GUI_MAIN_H */
GtkWidget * map_vertical_scrollbar
Definition gui_main.c:108
GtkTextBuffer * message_buffer
Definition gui_main.c:177
GtkWidget * main_label_info
Definition gui_main.c:137
GtkWidget * unit_info_label
Definition gui_main.c:150
struct video_mode * resolution_request_get(void)
Definition gui_main.c:2396
gchar * ntoh_str(const gchar *netstr)
GtkWidget * timeout_label
Definition gui_main.c:147
PangoFontDescription * city_productions_style
Definition gui_main.c:133
GtkWidget * overview_scrolled_window
Definition gui_main.c:111
GtkWidget * top_notebook
Definition gui_main.c:128
GtkWidget * unit_info_box
Definition gui_main.c:151
void fullscreen_opt_refresh(struct option *poption)
Definition gui_main.c:2238
GtkWidget * government_label
Definition gui_main.c:146
GtkWidget * sun_label
Definition gui_main.c:144
PangoFontDescription * city_names_style
Definition gui_main.c:132
void refresh_chat_buttons(void)
Definition gui_main.c:2313
gboolean map_canvas_focus(void)
Definition gui_main.c:366
GtkWidget * turn_done_button
Definition gui_main.c:148
int screen_width(void)
Definition gui_main.c:2356
void reset_unit_table(void)
Definition gui_main.c:972
GtkWidget * bottom_notebook
Definition gui_main.c:128
GtkWidget * unit_info_frame
Definition gui_main.c:152
GtkWidget * top_vbox
Definition gui_main.c:127
GtkWidget * text_scrollbar
bool is_gui_up(void)
Definition gui_main.c:1864
PangoFontDescription * reqtree_text_style
Definition gui_main.c:134
GtkWidget * flake_label
Definition gui_main.c:145
GtkWidget * bulb_label
Definition gui_main.c:143
GtkWidget * overview_canvas
Definition gui_main.c:110
GtkWidget * toplevel
Definition gui_main.c:124
GtkWidget * map_horizontal_scrollbar
Definition gui_main.c:107
GtkWidget * map_canvas
Definition gui_main.c:106
GtkWidget * econ_label[10]
Definition gui_main.c:142
GtkWidget * right_notebook
Definition gui_main.c:128
void popup_quit_dialog(void)
Definition gui_main.c:2154
GtkWidget * map_widget
Definition gui_main.c:129
void quit_gtk_main(void)
Definition gui_main.c:2142
GtkWidget * toplevel_tabs
Definition gui_main.c:126
int overview_canvas_store_width
Definition gui_main.c:121
void update_turn_done_tooltip(void)
Definition gui_main.c:1055
GtkTextView * main_message_area
Definition gui_main.c:176
int overview_canvas_store_height
Definition gui_main.c:122
int screen_height(void)
Definition gui_main.c:2376
GtkWidget * main_frame_civ_name
Definition gui_main.c:136
gboolean terminate_signal_processing(GtkEventControllerFocus *controller, gpointer data)
Definition gui_main.c:995
GtkWidget * econ_widget
Definition gui_main.c:153
GtkApplication * gui_app(void)
Definition gui_main.c:2617
void animation_idle_cb(void *data)
Definition gui_main.c:2372
void main_message_area_resize(void *data)
Definition gui_main.c:334