]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/gtkgensurf/plugin.cpp
Merge commit 'c845c5cd8f427d39665d6a8b1f6eeff401370d80' into garux-merge
[xonotic/netradiant.git] / contrib / gtkgensurf / plugin.cpp
index 2ec3d469c709d5ac36af601cadabe82500a92d40..928bd1458f6bf68b47a75946c8f4c2024e455501 100644 (file)
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <uilib/uilib.h>
+
 #include "gensurf.h"
 
 // Global plugin FuncTable
 _QERFuncTable_1 g_FuncTable;
 _QERQglTable g_GLTable;
 _QERUIGtkTable g_UIGtkTable;
-_QEREntityTable g_EntityTable;
+_QEREntityTable __ENTITYTABLENAME;
+_QERBrushTable __BRUSHTABLENAME;
+_QERPatchTable __PATCHTABLENAME;
 bool SingleBrushSelected;
 bool g_bInitDone;
 
 #include "iplugin.h"
 
 const char* QERPlug_Init( void* hApp, void* pMainWidget ){
-       g_pRadiantWnd = (GtkWidget*)pMainWidget;
+       g_pRadiantWnd = ui::Window::from(pMainWidget);
 
        return "GenSurf for Q3Radiant";
 }
@@ -138,14 +142,10 @@ void QERPlug_Dispatch( const char *p, vec3_t vMin, vec3_t vMax, bool bSingleBrus
                        UseFaceBounds();
                }
 
-               gtk_widget_show( g_pWnd );
+               g_pWnd.show();
        }
 }
 
-extern "C" LPVOID WINAPI QERPlug_GetFuncTable(){
-       return &g_FuncTable;
-}
-
 // =============================================================================
 // SYNAPSE
 
@@ -165,13 +165,7 @@ virtual ~GenSurfSynapseClient() { }
 CSynapseServer* g_pSynapseServer = NULL;
 GenSurfSynapseClient g_SynapseClient;
 
-#if __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
-extern "C" CSynapseClient * SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
-#if __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+extern "C" CSynapseClient * SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ){
        if ( strcmp( version, SYNAPSE_VERSION ) ) {
                Syn_Printf( "ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version );
                return NULL;