]> git.jsancho.org Git - c-irrlicht.git/commitdiff
ICursorControl
authorJavier Sancho <jsf@jsancho.org>
Sun, 20 Oct 2019 16:46:00 +0000 (18:46 +0200)
committerJavier Sancho <jsf@jsancho.org>
Sun, 20 Oct 2019 16:46:00 +0000 (18:46 +0200)
Makefile.am
include/ICursorControl.h [new file with mode: 0644]
include/IrrlichtDevice.h
include/cirrlicht.h
src/ICursorControl.cpp [new file with mode: 0644]
src/IrrlichtDevice.cpp

index 98935f0ce0ec950ea1974e8990575c61b2b9522d..35fdb7459ee3b2e0837b60c175e310cef71ccd91 100644 (file)
@@ -3,6 +3,7 @@ lib_LTLIBRARIES = libCIrrlicht.la
 libCIrrlicht_la_SOURCES = \
   src/CIrrlicht.cpp \
   src/IAnimatedMeshSceneNode.cpp \
+  src/ICursorControl.cpp \
   src/IFileSystem.cpp \
   src/IGUIEnvironment.cpp \
   src/IrrlichtDevice.cpp \
@@ -20,6 +21,7 @@ pkginclude_HEADERS = \
   include/IAnimatedMeshMD2.h \
   include/IAnimatedMeshSceneNode.h \
   include/ICameraSceneNode.h \
+  include/ICursorControl.h \
   include/IFileArchive.h \
   include/IFileSystem.h \
   include/IGUIElement.h \
diff --git a/include/ICursorControl.h b/include/ICursorControl.h
new file mode 100644 (file)
index 0000000..f2afcf6
--- /dev/null
@@ -0,0 +1,39 @@
+/* c-irrlicht --- C bindings for Irrlicht Engine
+
+   Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
+
+   This file is part of c-irrlicht.
+
+   c-irrlicht is free software; you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
+
+   c-irrlicht is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with guile-irrlicht.  If not, see
+   <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __C_I_CURSOR_CONTROL_H_INCLUDED__
+#define __C_I_CURSOR_CONTROL_H_INCLUDED__
+
+typedef void irr_gui_ICursorControl;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+  void
+  irr_gui_setVisibleCursor(irr_gui_ICursorControl* cursorControl,
+                           int visible);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 72620c690cdddbdff2d2a4dec587d91fd7b5e9d4..3f7446469bd02b640c6b16896829ce2d0bbab2d4 100644 (file)
@@ -22,6 +22,7 @@
 #ifndef __C_IRRLICHT_DEVICE_H_INCLUDED__
 #define __C_IRRLICHT_DEVICE_H_INCLUDED__
 
+#include "ICursorControl.h"
 #include "IFileSystem.h"
 #include "IGUIEnvironment.h"
 #include "ISceneManager.h"
@@ -33,6 +34,9 @@ typedef void irr_IrrlichtDevice;
 extern "C" {
 #endif
 
+  irr_gui_ICursorControl*
+  irr_getCursorControl(irr_IrrlichtDevice* device);
+
   irr_io_IFileSystem*
   irr_getFileSystem(irr_IrrlichtDevice* device);
 
index ed0819a25201de4f08a183fbb70e5f63e1af8ad1..a40c33aca81dcf9ec3d2de294a1ffb8b0e7fa0b0 100644 (file)
@@ -28,6 +28,7 @@
 #include "IAnimatedMeshMD2.h"
 #include "IAnimatedMeshSceneNode.h"
 #include "ICameraSceneNode.h"
+#include "ICursorControl.h"
 #include "IFileArchive.h"
 #include "IFileSystem.h"
 #include "IGUIEnvironment.h"
diff --git a/src/ICursorControl.cpp b/src/ICursorControl.cpp
new file mode 100644 (file)
index 0000000..a07c05b
--- /dev/null
@@ -0,0 +1,34 @@
+/* c-irrlicht --- C bindings for Irrlicht Engine
+
+   Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
+
+   This file is part of c-irrlicht.
+
+   c-irrlicht is free software; you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
+
+   c-irrlicht is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with guile-irrlicht.  If not, see
+   <http://www.gnu.org/licenses/>.
+*/
+
+#include <irrlicht/irrlicht.h>
+#include "ICursorControl.h"
+
+extern "C" {
+  void
+  irr_gui_setVisibleCursor(irr_gui_ICursorControl* cursorControl,
+                           int visible)
+  {
+    ((irr::gui::ICursorControl*)cursorControl)
+      ->setVisible(visible);
+  }
+
+}
index 98c4afb340ee644ea3be1294fbececc6b1815932..ff416ce5968e5d0417f22aee4fda346450b11ff7 100644 (file)
 #include "IrrlichtDevice.h"
 
 extern "C" {
+  irr_gui_ICursorControl*
+  irr_getCursorControl(irr_IrrlichtDevice* device)
+  {
+    return ((irr::IrrlichtDevice*)device)->getCursorControl();
+  }
+
   irr_io_IFileSystem*
   irr_getFileSystem(irr_IrrlichtDevice* device)
   {