Freeciv-3.3
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
23/* Mac uses "command"/"meta" key for menu accelerator modifier key */
24#ifdef __APPLE__
25#define ACCL_MOD_KEY "<Meta>"
26#define ACCL_MOD_MASK GDK_META_MASK
27#else
28#define ACCL_MOD_KEY "<ctrl>"
29#define ACCL_MOD_MASK GDK_CONTROL_MASK
30#endif
31
32#define GUI_NAME_FULL "gui-gtk-4.0"
33#define GUI_NAME_SHORT "gtk4"
34
35#define GUI_GTK_OPTION(optname) gui_options.gui_gtk4_##optname
36#define GUI_GTK_OPTION_STR(optname) "gui_gtk4_" #optname
37#define GUI_GTK_DEFAULT_THEME_NAME FC_GTK4_DEFAULT_THEME_NAME
38
39void main_message_area_resize(void *data);
40void animation_idle_cb(void *data);
41
42/* Network string charset conversion */
44
48
49#define single_tile_pixmap (mapview.single_tile->pixmap)
50
53extern GtkWidget * toplevel;
54extern GtkWidget * top_vbox;
57extern GtkWidget * econ_label[10];
58extern GtkWidget * bulb_label;
59extern GtkWidget * sun_label;
60extern GtkWidget * flake_label;
62extern GtkWidget * econ_widget;
63extern GtkWidget * map_canvas; /* GtkDrawingArea */
64extern GtkWidget * overview_canvas; /* GtkDrawingArea */
65extern GtkWidget * overview_scrolled_window; /* GtkScrolledWindow */
73
75extern GtkWidget * top_notebook;
76extern GtkWidget * map_widget;
80
83
85
86void reset_unit_table(void);
87void popup_quit_dialog(void);
88void quit_gtk_main(void);
89void refresh_chat_buttons(void);
90
91int screen_width(void);
92int screen_height(void);
94
96
98bool is_gui_up(void);
99
101 gpointer data);
102
104 gpointer data);
106 gpointer data);
107
108void update_turn_done_tooltip(void);
109
110#endif /* FC__GUI_MAIN_H */
char * incite_cost
Definition comments.c:76
GtkWidget * map_vertical_scrollbar
Definition gui_main.c:110
GtkTextBuffer * message_buffer
Definition gui_main.c:179
GtkWidget * main_label_info
Definition gui_main.c:139
GtkWidget * unit_info_label
Definition gui_main.c:152
struct video_mode * resolution_request_get(void)
Definition gui_main.c:2612
gchar * ntoh_str(const gchar *netstr)
GtkWidget * timeout_label
Definition gui_main.c:149
PangoFontDescription * city_productions_style
Definition gui_main.c:135
GtkWidget * overview_scrolled_window
Definition gui_main.c:113
GtkWidget * top_notebook
Definition gui_main.c:130
GtkWidget * unit_info_box
Definition gui_main.c:153
gboolean fc_lost_focus(GtkWidget *w, GdkEventKey *ev, gpointer data)
Definition gui_main.c:736
void fullscreen_opt_refresh(struct option *poption)
Definition gui_main.c:2434
gboolean fc_gained_focus(GtkWidget *w, GdkEventKey *ev, gpointer data)
Definition gui_main.c:746
GtkWidget * government_label
Definition gui_main.c:148
GtkWidget * sun_label
Definition gui_main.c:146
PangoFontDescription * city_names_style
Definition gui_main.c:134
void refresh_chat_buttons(void)
Definition gui_main.c:2510
gboolean map_canvas_focus(void)
Definition gui_main.c:360
GtkWidget * turn_done_button
Definition gui_main.c:150
int screen_width(void)
Definition gui_main.c:2576
void reset_unit_table(void)
Definition gui_main.c:1024
GtkWidget * bottom_notebook
Definition gui_main.c:130
GtkWidget * unit_info_frame
Definition gui_main.c:154
GtkWidget * top_vbox
Definition gui_main.c:129
GtkWidget * text_scrollbar
bool is_gui_up(void)
Definition gui_main.c:2059
PangoFontDescription * reqtree_text_style
Definition gui_main.c:136
GtkWidget * flake_label
Definition gui_main.c:147
GtkWidget * bulb_label
Definition gui_main.c:145
GtkWidget * overview_canvas
Definition gui_main.c:112
GtkWidget * toplevel
Definition gui_main.c:126
GtkWidget * map_horizontal_scrollbar
Definition gui_main.c:109
GtkWidget * map_canvas
Definition gui_main.c:108
GtkWidget * econ_label[10]
Definition gui_main.c:144
GtkWidget * right_notebook
Definition gui_main.c:130
void popup_quit_dialog(void)
Definition gui_main.c:2350
GtkWidget * map_widget
Definition gui_main.c:131
void quit_gtk_main(void)
Definition gui_main.c:2338
GtkWidget * toplevel_tabs
Definition gui_main.c:128
int overview_canvas_store_width
Definition gui_main.c:123
void update_turn_done_tooltip(void)
Definition gui_main.c:1109
GtkTextView * main_message_area
Definition gui_main.c:178
int overview_canvas_store_height
Definition gui_main.c:124
int screen_height(void)
Definition gui_main.c:2594
GtkWidget * main_frame_civ_name
Definition gui_main.c:138
gboolean terminate_signal_processing(GtkEventControllerFocus *controller, gpointer data)
Definition gui_main.c:1043
GtkWidget * econ_widget
Definition gui_main.c:155
GtkApplication * gui_app(void)
Definition gui_main.c:2678
void animation_idle_cb(void *data)
Definition gui_main.c:2433
void main_message_area_resize(void *data)
Definition gui_main.c:360