]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/mainframe.cpp
portability fixes
[xonotic/netradiant.git] / radiant / mainframe.cpp
index d0b900012f9c197f7c29773a4ee9937a3f7da2da..9b36b72cbcdfae0f56d6ce48f53eafc051295edd 100644 (file)
@@ -58,6 +58,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "cmdlib.h"
 #include "scenelib.h"
 #include "stream/stringstream.h"
+#include "signal/isignal.h"
 #include "os/path.h"
 #include "os/file.h"
 #include "eclasslib.h"
@@ -181,12 +182,11 @@ void VFS_Destroy()
     Radiant_detachHomePathsObserver(g_VFSModuleObserver);
 }
 
-
 // Home Paths
 
 void HomePaths_Realise()
 {
-#if defined (__linux__) || defined (__APPLE__)
+#if defined(POSIX)
   const char* prefix = g_pGameDescription->getKeyValue("prefix");
   if(!string_empty(prefix)) 
   {
@@ -510,10 +510,10 @@ public:
 const char* const c_library_extension =
 #if defined(WIN32)
 "dll"
-#elif defined(__linux__)
-"so"
 #elif defined (__APPLE__)
 "dylib"
+#elif defined(__linux__) || defined (__FreeBSD__)
+"so"
 #endif
 ;
 
@@ -2631,6 +2631,26 @@ public:
 
 MainWindowActive g_MainWindowActive;
 
+SignalHandlerId XYWindowDestroyed_connect(const SignalHandler& handler)
+{
+  return g_pParentWnd->GetXYWnd()->onDestroyed.connectFirst(handler);
+}
+
+void XYWindowDestroyed_disconnect(SignalHandlerId id)
+{
+  g_pParentWnd->GetXYWnd()->onDestroyed.disconnect(id);
+}
+
+MouseEventHandlerId XYWindowMouseDown_connect(const MouseEventHandler& handler)
+{
+  return g_pParentWnd->GetXYWnd()->onMouseDown.connectFirst(handler);
+}
+
+void XYWindowMouseDown_disconnect(MouseEventHandlerId id)
+{
+  g_pParentWnd->GetXYWnd()->onMouseDown.disconnect(id);
+}
+
 // =============================================================================
 // MainFrame class
 
@@ -3479,7 +3499,7 @@ void MainFrame_Construct()
     const char* ENGINEPATH_ATTRIBUTE =
 #if defined(WIN32)
       "enginepath_win32"
-#elif defined(__linux__)
+#elif defined(__linux__) || defined (__FreeBSD__)
       "enginepath_linux"
 #elif defined(__APPLE__)
       "enginepath_macos"