]> git.jsancho.org Git - c-irrlicht.git/blobdiff - src/IrrlichtDevice.cpp
run and drop device
[c-irrlicht.git] / src / IrrlichtDevice.cpp
index fc7665a9e97231c033d8e8d3789dbd7c388ae332..d782a661c28cc6fb8f44c8c2934f5d32263a930f 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include <irrlicht/irrlicht.h>
+#include <wchar.h>
 #include "IrrlichtDevice.h"
 
 extern "C" {
@@ -32,4 +33,21 @@ extern "C" {
   {
     return ((irr::IrrlichtDevice*)device)->getVideoDriver();
   }
+
+  void irr_IrrlichtDevice_setWindowCaption(void* device, const char* text)
+  {
+    wchar_t *wtext = (wchar_t*)malloc(strlen(text) + 1);
+    mbsrtowcs(wtext, &text, strlen(text) + 1, NULL);
+    ((irr::IrrlichtDevice*)device)->setWindowCaption(wtext);
+  }
+
+  int irr_IrrlichtDevice_run(void* device)
+  {
+    return ((irr::IrrlichtDevice*)device)->run() ? 1 : 0;
+  }
+
+  int irr_IrrlichtDevice_drop(void* device)
+  {
+    return ((irr::IrrlichtDevice*)device)->drop() ? 1 : 0;
+  }
 }