📄 gui.h
字号:
void create_display(void);void destroy_dialogs(void);void destroy_display(void);void dialog_popup(GtkWidget *dialog, DPPosn posn);void disc_callback(GtkWidget *w, gpointer data);void discard_dialog_init(void);void discard_dialog_popup(Tile t, int ori, int mode);void do_chow(GtkWidget *w, gpointer data);gint doubleclicked(GtkWidget *w, GdkEventButton *eb,gpointer data);void ds_dialog_init(void);void ds_dialog_popup(void);void error_dialog_init(void);void error_dialog_popup(char *msg);void game_option_init(void);void game_prefs_init(void);void info_dialog_popup(char *msg);GtkWidget *menubar_create(void);GtkWidget *make_or_refresh_option_updater(GameOptionEntry *goe, int prefsp);void messagewindow_init(void);void nag_popup(void);void option_reset_callback(GtkWidget *w, gpointer data);void option_updater_callback(GtkWidget *w, gpointer data);void open_connection(GtkWidget *w UNUSED, gpointer data);void open_dialog_init(char *idt, char *nt);void open_dialog_popup(GtkWidget *w UNUSED, gpointer data);void playing_prefs_init(void);void prefs_updater_callback(GtkWidget *w, gpointer data);int read_or_update_rcfile(char *rcfile, XmjrcGroup read_groups, XmjrcGroup update_groups);void scoring_dialog_init(void);void scoring_dialog_popup(void);void set_dialog_posn(DialogPosition p);void set_animation(int a);void setup_dialogs(void);void showraise(GtkWidget *w);void status_init(void);void status_showraise(void);void status_update(int game_over);void textwindow_init(void);void tilesetbox_highlight_nth(TileSetBox *tb,int n);void tilesetbox_init(TileSetBox *tb, int ori,GtkSignalFunc func,gpointer func_data);void tilesetbox_set(TileSetBox *tb, const TileSet *ts, int ori);void turn_dialog_init(void);void turn_dialog_popup(void);void usage(char *pname,char *msg);void warningwindow_init(void);int log_msg_add(LogLevel l,char *warning);void warning_clear(void);/* Convenience function */#define send_packet(m) client_send_packet(the_game,(PMsgMsg *)m)/* VARIABLES *//* in gui.c */extern int debug;extern int server_pversion; /* protocol version that server speaks (independently of game) */extern PlayerP our_player;extern int our_id;extern seats our_seat; /* our seat in the game */extern Game *the_game;extern int selected_button; /* the index of the user's selected tile, or -1 if none */extern int ptimeout; /* claim timeout time in milliseconds */extern int local_timeouts; /* are we handling timeouts ourselves? */extern GdkPixmap **tilepixmaps[]; /* pixmaps for the tiles */extern GtkWidget *topwindow; /* main window */extern GtkWidget *menubar; /* menubar */extern GtkWidget *board; /* the table area itself */extern GtkWidget *boardframe; /* fixed widget wrapping the board */extern GtkWidget *outerframe; /* the outermost frame widget */extern GtkStyle *tablestyle; /* for the dark green stuff */extern GtkStyle *highlightstyle; /* to highlight tiles */extern GtkWidget *highlittile; /* the unique highlighted tile */extern GdkFont *fixed_font; /* a fixed width font */extern GdkFont *big_font; /* big font for claim windows */extern GtkWidget *dialoglowerbox; /* encloses dialogs when dialogs are below *//* Why an array? So I can pass pointers around */extern DiscardDialog discard_dialog[1];/* dialog box for specifying chows */extern GtkWidget *chow_dialog;/* dialog box for declaring specials */extern GtkWidget *ds_dialog;/* dialog box for continuing with next hand */extern GtkWidget *continue_dialog;/* dialog for opening connection */extern GtkWidget *open_dialog;extern GtkWidget *openmenuentry, *newgamemenuentry, *resumegamemenuentry, *savemenuentry, *saveasmenuentry, *closemenuentry, *gameoptionsmenuentry;extern GtkWidget *openallowdisconnectbutton,*opensaveonexitbutton,*openrandomseatsbutton, *openplayercheckboxes[3],*openplayernames[3],*openplayeroptions[3],*opentimeoutspinbutton;/* dialog box for action when it's our turn. Actions: Discard Kong Add to Pung Mah Jong*/extern GtkWidget *turn_dialog;/* dialog box for closed sets when scoring. Actions: Eyes Chow Pung Done*/extern GtkWidget *scoring_dialog;/* window for game status display */extern GtkWidget *status_window;/* an array of text widgets for displaying scores etc. Element 4 is for settlements. The others are for each player: currently, I think these should be table relative.*/extern GtkWidget *scoring_notebook;extern GtkWidget *textpages[5];extern GtkWidget *textlabels[5]; /* labels for the pages */extern GtkWidget *textwindow; /* and the window for it *//* option stuff */extern char robot_names[3][128];/* The window for messages, and the display text widget */extern GtkWidget *messagewindow, *messagetext;/* and for warnings */extern GtkWidget *warningwindow, *warningtext;extern GtkWidget *info_box; /* box to hold info windows *//* completed games, for nagging */extern int completed_games;extern int nag_state; /* has user been nagged to pay? *//* window to nag for donations */extern GtkWidget *nag_window;/* This gives the width of a player display in units of tiles */extern int pdispwidth;extern int display_size; /* and this is the preference value for pdispwidth */extern int square_aspect; /* force a square table */extern char address[]; /* server address */extern char name[]; /* player's name */extern char main_font_name[]; /* font used in all dialogs etc */extern char text_font_name[]; /* font used for text in windows */extern char fallback_text_font_name[]; /* one that worked */extern char table_colour_name[]; /* colour of the table background */extern int animate; /* do fancy animation */extern int nopopups; /* suppress automatic popup of message/scoring windows */extern int tiletips; /* show tiletips constantly */extern int showwall; /* show the wall or not */extern int info_windows_in_main; /* should the message and game info windows be included in the main window, or be separate popups ? */extern int iconify_dialogs_with_main; /* as it says ... */extern char *tileset, *tileset_path; /* tile sets */extern int pref_showwall; /* preferred value of showwall *//* playing options */extern int playing_auto_declare_specials;extern int playing_auto_declare_losing;extern int playing_auto_declare_winning;/* the player display areas */extern PlayerDisp pdisps[NUM_SEATS];extern int calling; /* disgusting global flag *//* the widget in which we put discards */extern GtkWidget *discard_area;/* This is an allocation structure in which we note its allocated size, at some point when we know the allocation is valid.*/extern GtkAllocation discard_area_alloc;extern GtkWidget *just_doubleclicked; /* yech yech yech. See doubleclicked *//* space round edge of dialog boxes */extern const gint dialog_border_width;/* horiz space between buttons */extern const gint dialog_button_spacing;/* vert space between text and buttons etc */extern const gint dialog_vert_spacing;/* space around player boxes. N.B. this should only apply to the outermost boxes */extern const int player_border_width;extern DialogPosition dialogs_position;/* in gui-dial.c */extern GtkWidget *openfile, *openhost, *openport, *openfiletext, *openhosttext, *openporttext, *openidtext, *opennametext, *opengamefiletext;extern GtkWidget *display_option_dialog;extern GtkWidget *game_option_dialog;extern GtkWidget *game_prefs_dialog;extern GtkWidget *game_option_panel;extern GtkWidget *game_prefs_panel;extern GameOptionTable prefs_table;extern GtkWidget *playing_prefs_dialog;/* static for each module */#include "version.h"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -