Freeciv-3.3
Loading...
Searching...
No Matches
Macros | Functions | Variables
gui_main.h File Reference
#include <gtk/gtk.h>
#include "gui_main_g.h"
#include "options.h"

Go to the source code of this file.

Macros

#define GUI_NAME_FULL   "gui-gtk-3.22"
 
#define GUI_NAME_SHORT   "gtk3.22"
 
#define GUI_GTK_OPTION(optname)   gui_options.gui_gtk3_22_##optname
 
#define GUI_GTK_OPTION_STR(optname)   "gui_gtk3_22_" #optname
 
#define GUI_GTK_DEFAULT_THEME_NAME   FC_GTK3_22_DEFAULT_THEME_NAME
 
#define single_tile_pixmap   (mapview.single_tile->pixmap)
 

Functions

gcharntoh_str (const gchar *netstr)
 
void enable_menus (bool enable)
 
gboolean map_canvas_focus (void)
 
void reset_unit_table (void)
 
void popup_quit_dialog (void)
 
void quit_gtk_main (void)
 
void refresh_chat_buttons (void)
 
int screen_width (void)
 
int screen_height (void)
 
struct video_moderesolution_request_get (void)
 
void fullscreen_opt_refresh (struct option *poption)
 
bool is_gui_up (void)
 
gboolean fc_lost_focus (GtkWidget *w, GdkEventKey *ev, gpointer data)
 
gboolean fc_gained_focus (GtkWidget *w, GdkEventKey *ev, gpointer data)
 
void update_turn_done_tooltip (void)
 

Variables

PangoFontDescriptioncity_names_style
 
PangoFontDescriptioncity_productions_style
 
PangoFontDescriptionreqtree_text_style
 
GtkTextViewmain_message_area
 
GtkWidgettext_scrollbar
 
GtkWidgettoplevel
 
GtkWidgettop_vbox
 
GtkWidgetmain_frame_civ_name
 
GtkWidgetmain_label_info
 
GtkWidgetecon_label [10]
 
GtkWidgetbulb_label
 
GtkWidgetsun_label
 
GtkWidgetflake_label
 
GtkWidgetgovernment_label
 
GtkWidgetecon_ebox
 
GtkWidgetbulb_ebox
 
GtkWidgetsun_ebox
 
GtkWidgetflake_ebox
 
GtkWidgetgovernment_ebox
 
GtkWidgetmap_canvas
 
GtkWidgetoverview_canvas
 
GtkWidgetoverview_scrolled_window
 
GtkWidgettimeout_label
 
GtkWidgetturn_done_button
 
GtkWidgetunit_info_box
 
GtkWidgetunit_info_label
 
GtkWidgetunit_info_frame
 
GtkWidgetmap_horizontal_scrollbar
 
GtkWidgetmap_vertical_scrollbar
 
GdkWindowroot_window
 
GtkWidgettoplevel_tabs
 
GtkWidgettop_notebook
 
GtkWidgetmap_widget
 
GtkWidgetbottom_notebook
 
GtkWidgetright_notebook
 
GtkTextBuffermessage_buffer
 
int overview_canvas_store_width
 
int overview_canvas_store_height
 

Macro Definition Documentation

◆ GUI_GTK_DEFAULT_THEME_NAME

#define GUI_GTK_DEFAULT_THEME_NAME   FC_GTK3_22_DEFAULT_THEME_NAME

Definition at line 27 of file gui_main.h.

◆ GUI_GTK_OPTION

#define GUI_GTK_OPTION (   optname)    gui_options.gui_gtk3_22_##optname

Definition at line 25 of file gui_main.h.

◆ GUI_GTK_OPTION_STR

#define GUI_GTK_OPTION_STR (   optname)    "gui_gtk3_22_" #optname

Definition at line 26 of file gui_main.h.

◆ GUI_NAME_FULL

#define GUI_NAME_FULL   "gui-gtk-3.22"

Definition at line 22 of file gui_main.h.

◆ GUI_NAME_SHORT

#define GUI_NAME_SHORT   "gtk3.22"

Definition at line 23 of file gui_main.h.

◆ single_tile_pixmap

#define single_tile_pixmap   (mapview.single_tile->pixmap)

Definition at line 36 of file gui_main.h.

Function Documentation

◆ enable_menus()

void enable_menus ( bool  enable)

Enable/Disable the game page menu bar.

Definition at line 1053 of file gui_main.c.

◆ fc_gained_focus()

gboolean fc_gained_focus ( GtkWidget w,
GdkEventKey ev,
gpointer  data 
)

Freeciv window has gained focus

Definition at line 746 of file gui_main.c.

Referenced by activate_gui(), setup_dialog(), and ui_main().

◆ fc_lost_focus()

gboolean fc_lost_focus ( GtkWidget w,
GdkEventKey ev,
gpointer  data 
)

Freeciv window has lost focus

Definition at line 736 of file gui_main.c.

Referenced by activate_gui(), setup_dialog(), and ui_main().

◆ fullscreen_opt_refresh()

void fullscreen_opt_refresh ( struct option poption)

Option callback for the 'fullscreen' gtk-gui option.

Definition at line 2434 of file gui_main.c.

◆ is_gui_up()

bool is_gui_up ( void  )

Return whether gui is currently running.

Definition at line 2059 of file gui_main.c.

◆ map_canvas_focus()

gboolean map_canvas_focus ( void  )

Focus on map canvas

Definition at line 360 of file gui_main.c.

◆ ntoh_str()

gchar * ntoh_str ( const gchar netstr)

◆ popup_quit_dialog()

void popup_quit_dialog ( void  )

Popups the dialog with the message: Are you sure you want to quit?

Open dialog to confirm that user wants to quit client.

Definition at line 2350 of file gui_main.c.

◆ quit_gtk_main()

void quit_gtk_main ( void  )

Exit gtk main loop.

Definition at line 2338 of file gui_main.c.

◆ refresh_chat_buttons()

void refresh_chat_buttons ( void  )

Set the chatline buttons to reflect the state of the game and current client options. This function should be called on game start.

Definition at line 2510 of file gui_main.c.

◆ reset_unit_table()

void reset_unit_table ( void  )

Called when the tileset is changed to reset the unit pixmap table.

Definition at line 1024 of file gui_main.c.

◆ resolution_request_get()

struct video_mode * resolution_request_get ( void  )

Give resolution requested by user, if any.

Definition at line 2612 of file gui_main.c.

◆ screen_height()

int screen_height ( void  )

Return height of the primary monitor

Definition at line 2594 of file gui_main.c.

◆ screen_width()

int screen_width ( void  )

Return width of the primary monitor

Definition at line 2576 of file gui_main.c.

◆ update_turn_done_tooltip()

void update_turn_done_tooltip ( void  )

Override background color for canvases Update tooltip of the Turn Done button

Update tooltip of the Turn Done button

Definition at line 1109 of file gui_main.c.

Variable Documentation

◆ bottom_notebook

GtkWidget* bottom_notebook
extern

Definition at line 130 of file gui_main.c.

◆ bulb_ebox

GtkWidget* bulb_ebox
extern

Definition at line 157 of file gui_main.c.

Referenced by setup_widgets(), and update_info_label().

◆ bulb_label

GtkWidget* bulb_label
extern

Definition at line 145 of file gui_main.c.

◆ city_names_style

PangoFontDescription* city_names_style
extern

Definition at line 134 of file gui_main.c.

◆ city_productions_style

PangoFontDescription* city_productions_style
extern

Definition at line 135 of file gui_main.c.

◆ econ_ebox

GtkWidget* econ_ebox
extern

Definition at line 156 of file gui_main.c.

Referenced by setup_widgets(), and update_info_label().

◆ econ_label

GtkWidget* econ_label[10]
extern

Definition at line 144 of file gui_main.c.

◆ flake_ebox

GtkWidget* flake_ebox
extern

Definition at line 159 of file gui_main.c.

Referenced by setup_widgets(), and update_info_label().

◆ flake_label

GtkWidget* flake_label
extern

Definition at line 147 of file gui_main.c.

◆ government_ebox

GtkWidget* government_ebox
extern

Definition at line 160 of file gui_main.c.

Referenced by setup_widgets(), and update_info_label().

◆ government_label

GtkWidget* government_label
extern

Definition at line 148 of file gui_main.c.

◆ main_frame_civ_name

GtkWidget* main_frame_civ_name
extern

Definition at line 138 of file gui_main.c.

◆ main_label_info

GtkWidget* main_label_info
extern

Definition at line 139 of file gui_main.c.

◆ main_message_area

GtkTextView* main_message_area
extern

Definition at line 178 of file gui_main.c.

◆ map_canvas

GtkWidget* map_canvas
extern

Definition at line 108 of file gui_main.c.

◆ map_horizontal_scrollbar

GtkWidget* map_horizontal_scrollbar
extern

Definition at line 109 of file gui_main.c.

◆ map_vertical_scrollbar

GtkWidget* map_vertical_scrollbar
extern

Definition at line 110 of file gui_main.c.

◆ map_widget

GtkWidget* map_widget
extern

Definition at line 131 of file gui_main.c.

◆ message_buffer

GtkTextBuffer* message_buffer
extern

Definition at line 179 of file gui_main.c.

◆ overview_canvas

GtkWidget* overview_canvas
extern

Definition at line 112 of file gui_main.c.

◆ overview_canvas_store_height

int overview_canvas_store_height
extern

Definition at line 124 of file gui_main.c.

◆ overview_canvas_store_width

int overview_canvas_store_width
extern

Definition at line 123 of file gui_main.c.

◆ overview_scrolled_window

GtkWidget* overview_scrolled_window
extern

Definition at line 113 of file gui_main.c.

◆ reqtree_text_style

PangoFontDescription* reqtree_text_style
extern

Definition at line 136 of file gui_main.c.

◆ right_notebook

GtkWidget* right_notebook
extern

Definition at line 130 of file gui_main.c.

◆ root_window

GdkWindow* root_window
extern

Definition at line 127 of file gui_main.c.

Referenced by anim_cursor_cb(), remove_net_input(), and ui_main().

◆ sun_ebox

GtkWidget* sun_ebox
extern

Definition at line 158 of file gui_main.c.

Referenced by setup_widgets(), and update_info_label().

◆ sun_label

GtkWidget* sun_label
extern

Definition at line 146 of file gui_main.c.

◆ text_scrollbar

GtkWidget* text_scrollbar
extern

◆ timeout_label

GtkWidget* timeout_label
extern

Definition at line 149 of file gui_main.c.

◆ top_notebook

GtkWidget* top_notebook
extern

Definition at line 130 of file gui_main.c.

◆ top_vbox

GtkWidget* top_vbox
extern

Definition at line 129 of file gui_main.c.

◆ toplevel

GtkWidget* toplevel
extern

Definition at line 126 of file gui_main.c.

◆ toplevel_tabs

GtkWidget* toplevel_tabs
extern

Definition at line 128 of file gui_main.c.

◆ turn_done_button

GtkWidget* turn_done_button
extern

Definition at line 150 of file gui_main.c.

◆ unit_info_box

GtkWidget* unit_info_box
extern

Definition at line 153 of file gui_main.c.

◆ unit_info_frame

GtkWidget* unit_info_frame
extern

Definition at line 154 of file gui_main.c.

◆ unit_info_label

GtkWidget* unit_info_label
extern

Definition at line 152 of file gui_main.c.