--- np2/x11/toolkit.h 2004/07/14 16:01:40 1.7 +++ np2/x11/toolkit.h 2007/01/10 18:02:21 1.11 @@ -1,3 +1,5 @@ +/* $Id: toolkit.h,v 1.11 2007/01/10 18:02:21 monaka Exp $ */ + /* * Copyright (c) 2003 NONAKA Kimihiro * All rights reserved. @@ -10,8 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -41,7 +41,9 @@ typedef struct { void (*messagebox)(const char *title, const char *msg); } gui_toolkit_t; -#if (USE_GTK + USE_GTK2 + USE_QT + USE_SDL + USE_X11) > 1 +void toolkit_msgbox(const char *title, const char *msg); + +#if (USE_GTK2 + USE_SDL) > 1 extern gui_toolkit_t* toolkitp; @@ -56,13 +58,9 @@ void toolkit_initialize(void); #define toolkit_set_window_title(s) (*toolkitp->set_window_title)(s) #define toolkit_messagebox(t,m) (*toolkitp->messagebox)(t,m) -#elif USE_GTK > 0 || USE_GTK2 > 0 +#elif USE_GTK2 > 0 -#if USE_GTK2 > 0 #include "gtk2/gtk_toolkit.h" -#elif USE_GTK > 0 -#include "gtk/gtk_toolkit.h" -#endif #define toolkit_initialize() #define toolkit_terminate() @@ -75,21 +73,6 @@ void toolkit_initialize(void); #define toolkit_set_window_title(s) gui_gtk_set_window_title(s) #define toolkit_messagebox(t,m) gui_gtk_messagebox(t,m) -#elif USE_QT > 0 - -#include "qt/qttoolkit.h" - -#define toolkit_initialize() -#define toolkit_terminate() gui_qt_terminate() -#define toolkit_arginit(argcp, argvp) gui_qt_arginit(argcp, argvp) -#define toolkit_widget_create() gui_qt_widget_create() -#define toolkit_widget_show() gui_qt_widget_show() -#define toolkit_widget_mainloop() gui_qt_widget_mainloop() -#define toolkit_widget_quit() gui_qt_widget_quit() -#define toolkit_event_process() gui_qt_event_process() -#define toolkit_set_window_title(s) gui_qt_set_window_title(s) -#define toolkit_messagebox(t,m) gui_qt_messagebox(t,m) - #elif USE_SDL > 0 #include "sdl/sdl_toolkit.h" @@ -105,24 +88,9 @@ void toolkit_initialize(void); #define toolkit_set_window_title(s) gui_sdl_set_window_title(s) #define toolkit_messagebox(t,m) gui_sdl_messagebox(t,m) -#elif USE_X11 > 0 - -#include "x11/x11_toolkit.h" - -#define toolkit_initialize() -#define toolkit_terminate() -#define toolkit_arginit(argcp, argvp) gui_x11_arginit(argcp, argvp) -#define toolkit_widget_create() gui_x11_widget_create() -#define toolkit_widget_show() gui_x11_widget_show() -#define toolkit_widget_mainloop() gui_x11_widget_mainloop() -#define toolkit_widget_quit() gui_x11_widget_quit() -#define toolkit_event_process() gui_x11_event_process() -#define toolkit_set_window_title(s) gui_x11_set_window_title(s) -#define toolkit_messagebox(t,m) gui_x11_messagebox(t,m) - #else -#error undefined USE_GTK and USE_QT and USE_SDL and USE_X11!!! +#error need to defined USE_GTK2 or USE_SDL !!! #endif