|
|
| version 1.8, 2004/07/26 15:54:18 | 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 43 typedef struct { | Line 43 typedef struct { |
| void toolkit_msgbox(const char *title, const char *msg); | void toolkit_msgbox(const char *title, const char *msg); |
| #if (USE_GTK + USE_GTK2 + USE_QT + USE_SDL + USE_X11) > 1 | #if (USE_GTK2 + USE_SDL) > 1 |
| extern gui_toolkit_t* toolkitp; | extern gui_toolkit_t* toolkitp; |
| Line 58 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 || USE_GTK2 > 0 | #elif USE_GTK2 > 0 |
| #if USE_GTK2 > 0 | |
| #include "gtk2/gtk_toolkit.h" | #include "gtk2/gtk_toolkit.h" |
| #elif USE_GTK > 0 | |
| #include "gtk/gtk_toolkit.h" | |
| #endif | |
| #define toolkit_initialize() | #define toolkit_initialize() |
| #define toolkit_terminate() | #define toolkit_terminate() |
| Line 77 void toolkit_initialize(void); | Line 73 void toolkit_initialize(void); |
| #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() 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 | #elif USE_SDL > 0 |
| #include "sdl/sdl_toolkit.h" | #include "sdl/sdl_toolkit.h" |
| Line 107 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 |