| version 1.6, 2004/02/06 16:51:21 | version 1.11, 2007/01/10 18:02:21 | 
| Line 1 | Line 1 | 
 |  | /*      $Id$    */ | 
 |  |  | 
 | /* | /* | 
 | * Copyright (c) 2003 NONAKA Kimihiro | * Copyright (c) 2003 NONAKA Kimihiro | 
 | * All rights reserved. | * All rights reserved. | 
| Line 10 | Line 12 | 
 | * 2. Redistributions in binary form must reproduce the above copyright | * 2. Redistributions in binary form must reproduce the above copyright | 
 | *    notice, this list of conditions and the following disclaimer in the | *    notice, this list of conditions and the following disclaimer in the | 
 | *    documentation and/or other materials provided with the distribution. | *    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 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | 
 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 
| Line 41  typedef struct { | Line 41  typedef struct { | 
 | void            (*messagebox)(const char *title, const char *msg); | void            (*messagebox)(const char *title, const char *msg); | 
 | } gui_toolkit_t; | } gui_toolkit_t; | 
 |  |  | 
| #if (USE_GTK + 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; | extern gui_toolkit_t* toolkitp; | 
 |  |  | 
| Line 56  void toolkit_initialize(void); | Line 58  void toolkit_initialize(void); | 
 | #define toolkit_set_window_title(s)     (*toolkitp->set_window_title)(s) | #define toolkit_set_window_title(s)     (*toolkitp->set_window_title)(s) | 
 | #define toolkit_messagebox(t,m)         (*toolkitp->messagebox)(t,m) | #define toolkit_messagebox(t,m)         (*toolkitp->messagebox)(t,m) | 
 |  |  | 
| #elif USE_GTK > 0 | #elif USE_GTK2 > 0 | 
 |  |  | 
| #include "gtk/gtk_toolkit.h" | #include "gtk2/gtk_toolkit.h" | 
 |  |  | 
 | #define toolkit_initialize() | #define toolkit_initialize() | 
 | #define toolkit_terminate() | #define toolkit_terminate() | 
| Line 67  void toolkit_initialize(void); | Line 69  void toolkit_initialize(void); | 
 | #define toolkit_widget_show()           gui_gtk_widget_show() | #define toolkit_widget_show()           gui_gtk_widget_show() | 
 | #define toolkit_widget_mainloop()       gui_gtk_widget_mainloop() | #define toolkit_widget_mainloop()       gui_gtk_widget_mainloop() | 
 | #define toolkit_widget_quit()           gui_gtk_widget_quit() | #define toolkit_widget_quit()           gui_gtk_widget_quit() | 
| #define toolkit_event_process() | #define toolkit_event_process()         gui_gtk_event_process() | 
 | #define toolkit_set_window_title(s)     gui_gtk_set_window_title(s) | #define toolkit_set_window_title(s)     gui_gtk_set_window_title(s) | 
 | #define toolkit_messagebox(t,m)         gui_gtk_messagebox(t,m) | #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() |  | 
 | #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 | #elif USE_SDL > 0 | 
 |  |  | 
 | #include "sdl/sdl_toolkit.h" | #include "sdl/sdl_toolkit.h" | 
| Line 101  void toolkit_initialize(void); | Line 88  void toolkit_initialize(void); | 
 | #define toolkit_set_window_title(s)     gui_sdl_set_window_title(s) | #define toolkit_set_window_title(s)     gui_sdl_set_window_title(s) | 
 | #define toolkit_messagebox(t,m)         gui_sdl_messagebox(t,m) | #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 | #else | 
 |  |  | 
| #error undefined USE_GTK and USE_QT and USE_SDL and USE_X11!!! | #error need to defined USE_GTK2 or USE_SDL !!! | 
 |  |  | 
 | #endif | #endif | 
 |  |  |