/* * GSetGame - ui.h * Copyright 2007 Kirill Gorelov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef UI_H #define UI_H #include #include #include #include #include "cards.h" #define CARDS_MARGIN 30 #define CARDS_SPACING 20 /* The user interface global */ typedef struct _UserInterface { /* The UI root */ GladeXML *xml; /* Pointer to the window */ GtkWidget* window; /* The table drawing area */ GdkPixmap *backbuffer; GdkGC * backbuffer_gc; /* The cards image */ CardsImage *cards_image; } UserInterface; extern UserInterface ui; void ui_load(void); void ui_start(void); void ui_set_config(void); void ui_draw_playcanvas(void); void ui_resize_cards(); void ui_free(void); const gchar* ui_ask_player_name(); gint gset_msg(gchar *msg); #if 0 // XXX FIXME: the compiler complains that this function is not used :-/ static gint gset_msg(gchar *msg) { GtkWidget *dlg; gint result=0; dlg = gtk_message_dialog_new( (GtkWindow*)ui.window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, msg); gtk_window_set_resizable(GTK_WINDOW(dlg), FALSE); result = gtk_dialog_run(GTK_DIALOG(dlg)); gtk_widget_destroy(dlg); return result; } #endif #endif