Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

gui.h

Go to the documentation of this file.
00001 /*
00002  * $Id: gui.h 13990 2007-06-30 00:59:50Z cbiere $
00003  *
00004  * Copyright (c) 2004, Raphael Manfredi
00005  *
00006  *----------------------------------------------------------------------
00007  * This file is part of gtk-gnutella.
00008  *
00009  *  gtk-gnutella is free software; you can redistribute it and/or modify
00010  *  it under the terms of the GNU General Public License as published by
00011  *  the Free Software Foundation; either version 2 of the License, or
00012  *  (at your option) any later version.
00013  *
00014  *  gtk-gnutella is distributed in the hope that it will be useful,
00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with gtk-gnutella; if not, write to the Free Software
00021  *  Foundation, Inc.:
00022  *      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *----------------------------------------------------------------------
00024  */
00025 
00026 #ifndef _gtk_ui_h_
00027 #define _gtk_ui_h_
00028 
00029 #include "common.h"
00030 
00031 #ifdef USE_TOPLESS
00032 
00033 /* Diverse dummy definitions */
00034 #define settings_gui_save_if_dirty()
00035 
00036 #define main_gui_early_init(argc, argv, disable_xshm)
00037 #define main_gui_init()
00038 #define main_gui_timer(x)
00039 #define main_gui_update_coords()
00040 #define main_gui_shutdown()
00041 #define main_gui_shutdown_tick(remain)
00042 #define settings_gui_shutdown()
00043 
00044 #define drop_init()
00045 #define drop_close()
00046 
00047 #define search_gui_store_searches()
00048 
00049 #define icon_timer()
00050 
00051 static inline void
00052 main_gui_run(const gchar *unused_geometry_spec)
00053 {
00054     GMainLoop *ml;
00055 
00056     (void) unused_geometry_spec;
00057 
00058 #if defined(USE_GLIB1)
00059     ml = g_main_new(FALSE);
00060     g_main_run(ml);
00061 #elif defined(USE_GLIB2)
00062     ml = g_main_loop_new(NULL, FALSE);
00063     g_main_loop_run(ml);
00064 #endif /* GLIB */
00065 }
00066 
00067 #else   /* !USE_TOPLESS */
00068 
00069 #include <gtk/gtk.h>
00070 
00071 #ifdef USE_GTK1
00072 #include "gtk1/support-glade.h"
00073 #endif
00074 #ifdef USE_GTK2
00075 #include "gtk2/support-glade.h"
00076 #endif
00077 
00078 #include "main.h"
00079 
00080 #ifdef USE_GTK1
00081 #define g_ascii_strcasecmp g_strcasecmp
00082 #define gdk_drawable_get_size gdk_window_get_size
00083 #endif
00084 
00085 /* GUI signal functions */
00086 #ifdef USE_GTK1
00087 #define gui_signal_connect(widget, name, func, data) \
00088     gtk_signal_connect(GTK_OBJECT(widget), (name), \
00089         GTK_SIGNAL_FUNC(func), (data))
00090 
00091 #define gui_signal_connect_after(widget, name, func, data) \
00092     gtk_signal_connect_after(GTK_OBJECT(widget), (name), \
00093         GTK_SIGNAL_FUNC(func), (data))
00094 
00095 #define gui_signal_disconnect(widget, func, data) \
00096     gtk_signal_disconnect_by_func(GTK_OBJECT(widget), \
00097         GTK_SIGNAL_FUNC(func), (data))
00098 
00099 #define gui_signal_stop_emit_by_name(widget, name) \
00100     gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), (name))
00101     
00102 #endif /* USE_GTK1 */
00103 
00104 #ifdef USE_GTK2
00105 #define gui_signal_connect(widget, name, func, data) \
00106     g_signal_connect((widget), (name), \
00107         G_CALLBACK(func), (data))
00108 
00109 #define gui_signal_connect_after(widget, name, func, data) \
00110     g_signal_connect_after((widget), (name), \
00111         G_CALLBACK(func), (data))
00112 
00113 #define gui_signal_disconnect(widget, func, data) \
00114     g_signal_handlers_disconnect_by_func((widget), \
00115         G_CALLBACK(func), (data))
00116 
00117 #define gui_signal_stop_emit_by_name(widget, name) \
00118     g_signal_stop_emission_by_name((widget), (name))
00119     
00120 #endif  /* Gtk+ 2.0 */
00121 
00122 
00123 /* Common padding values for GtkCellRenderer */
00124 #define GUI_CELL_RENDERER_XPAD ((guint) 4U)
00125 #define GUI_CELL_RENDERER_YPAD ((guint) 0U)
00126 
00131 enum sorting_order {
00132     SORT_DESC = -1,
00133     SORT_NONE = 0,
00134     SORT_ASC = 1,
00135     SORT_NO_COL = 2     
00136 };
00137 
00138 #endif  /* USE_TOPLESS */
00139 #endif /* _gtk_ui_h_ */
00140 
00141 /* vi: set ts=4 sw=4 cindent: */

Generated on Sat Jun 30 17:53:23 2007 for gtk-gnutella by  doxygen 1.3.9.1