]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - include/qerplugin.h
Merge branch 'q3map2help' into 'master'
[xonotic/netradiant.git] / include / qerplugin.h
index cb6c2ba57da16d38925f67401da30128d2ac8cf1..b6a8865f2bcc6c9b42c147f6469c3704cdb834e8 100644 (file)
@@ -26,6 +26,7 @@
 #ifndef __QERPLUGIN_H__
 #define __QERPLUGIN_H__
 
+#include "uilib/uilib.h"
 #include "generic/constant.h"
 
 
@@ -35,7 +36,6 @@
 // NOTE: parent can be 0 in all functions but it's best to set them
 
 // this API does not depend on gtk+ or glib
-typedef struct _GtkWidget GtkWidget;
 
 enum EMessageBoxType
 {
@@ -65,28 +65,27 @@ enum EMessageBoxReturn
 
 // simple Message Box, see above for the 'type' flags
 
-typedef EMessageBoxReturn ( *PFN_QERAPP_MESSAGEBOX )( GtkWidget *parent, const char* text, const char* caption /* = "NetRadiant"*/, EMessageBoxType type /* = eMB_OK*/, EMessageBoxIcon icon /* = eMB_ICONDEFAULT*/ );
+typedef EMessageBoxReturn ( *PFN_QERAPP_MESSAGEBOX )( ui::Window parent, const char* text, const char* caption /* = "NetRadiant"*/, EMessageBoxType type /* = eMB_OK*/, EMessageBoxIcon icon /* = eMB_ICONDEFAULT*/ );
 
 // file and directory selection functions return null if the user hits cancel
 // - 'title' is the dialog title (can be null)
 // - 'path' is used to set the initial directory (can be null)
 // - 'pattern': the first pattern is for the win32 mode, then comes the Gtk pattern list, see Radiant source for samples
-typedef const char* ( *PFN_QERAPP_FILEDIALOG )( GtkWidget *parent, bool open, const char* title, const char* path /* = 0*/, const char* pattern /* = 0*/, bool want_load /* = false*/, bool want_import /* = false*/, bool want_save /* = false*/ );
+typedef const char* ( *PFN_QERAPP_FILEDIALOG )( ui::Window parent, bool open, const char* title, const char* path /* = 0*/, const char* pattern /* = 0*/, bool want_load /* = false*/, bool want_import /* = false*/, bool want_save /* = false*/ );
 
 // returns a gchar* string that must be g_free'd by the user
-typedef char* ( *PFN_QERAPP_DIRDIALOG )( GtkWidget *parent, const char* title /* = "Choose Directory"*/, const char* path /* = 0*/ );
+typedef char* ( *PFN_QERAPP_DIRDIALOG )( ui::Window parent, const char* title /* = "Choose Directory"*/, const char* path /* = 0*/ );
 
 // return true if the user closed the dialog with 'Ok'
 // 'color' is used to set the initial value and store the selected value
 template<typename Element> class BasicVector3;
 typedef BasicVector3<float> Vector3;
-typedef bool ( *PFN_QERAPP_COLORDIALOG )( GtkWidget *parent, Vector3& color,
+typedef bool ( *PFN_QERAPP_COLORDIALOG )( ui::Window parent, Vector3& color,
                                                                                  const char* title /* = "Choose Color"*/ );
 
 // load a .bmp file and create a GtkImage widget from it
 // NOTE: 'filename' is relative to <radiant_path>/plugins/bitmaps/
-typedef struct _GtkImage GtkImage;
-typedef GtkImage* ( *PFN_QERAPP_NEWIMAGE )( const char* filename );
+typedef ui::Image ( *PFN_QERAPP_NEWIMAGE )( const char* filename );
 
 // ========================================