]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - include/qerplugin.h
refactored plugin api; refactored callback library; added signals library
[xonotic/netradiant.git] / include / qerplugin.h
index fe581e81a933e71ffb8d6be1741c93e50bc5c53c..3e352e53b19c391d8a6469a796a5e6efe0409f96 100644 (file)
@@ -90,8 +90,27 @@ typedef GtkImage* (* PFN_QERAPP_NEWIMAGE) (const char* filename);
 
 // ========================================
 
+namespace scene
+{
+  class Node;
+}
+
 class ModuleObserver;
 
+#include "signal/signalfwd.h"
+#include "windowobserver.h"
+#include "math/vector.h"
+
+typedef SignalHandler3<const WindowVector&, ButtonIdentifier, ModifierFlags> MouseEventHandler;
+typedef SignalFwd<MouseEventHandler>::handler_id_type MouseEventHandlerId;
+
+enum VIEWTYPE
+{
+  YZ = 0,
+  XZ = 1,
+  XY = 2
+};
+
 // the radiant core API
 struct _QERFuncTable_1
 {
@@ -106,6 +125,10 @@ struct _QERFuncTable_1
   const char* (*getGameName)();
   const char* (*getGameMode)();
 
+  const char* (*getMapName)();
+  scene::Node& (*getMapWorldEntity)();
+  float (*getGridSize)();
+
   const char* (*getGameDescriptionKeyValue)(const char* key);
   const char* (*getRequiredGameDescriptionKeyValue)(const char* key);
 
@@ -118,6 +141,12 @@ struct _QERFuncTable_1
   void (*attachGameModeObserver)(ModuleObserver& observer);
   void (*detachGameModeObserver)(ModuleObserver& observer);
 
+  MouseEventHandlerId (*XYWindowMouseDown_connect)(const MouseEventHandler& handler);
+  void (*XYWindowMouseDown_disconnect)(MouseEventHandlerId id);
+  VIEWTYPE (*XYWindow_getViewType)();
+  Vector3 (*XYWindow_windowToWorld)(const WindowVector& position);
+  const char* (*TextureBrowser_getSelectedShader)();
+
   // GTK+ functions
   PFN_QERAPP_MESSAGEBOX  m_pfnMessageBox;
   PFN_QERAPP_FILEDIALOG  m_pfnFileDialog;