]> git.jsancho.org Git - c-irrlicht.git/commitdiff
IReferenceCounted
authorJavier Sancho <jsf@jsancho.org>
Thu, 5 Dec 2019 12:42:04 +0000 (13:42 +0100)
committerJavier Sancho <jsf@jsancho.org>
Thu, 5 Dec 2019 12:42:04 +0000 (13:42 +0100)
Makefile.am
include/IReferenceCounted.h [new file with mode: 0644]
include/IrrlichtDevice.h
include/cirrlicht.h
src/IReferenceCounted.cpp [new file with mode: 0644]
src/IrrlichtDevice.cpp

index 641b6d1943a2ef7969bd23157e7e1ad2337d9221..f0f254626a56566f3f5b18d77ccb06ada4558982 100644 (file)
@@ -7,6 +7,7 @@ libCIrrlicht_la_SOURCES = \
   src/ICursorControl.cpp \
   src/IFileSystem.cpp \
   src/IGUIEnvironment.cpp \
+  src/IReferenceCounted.cpp \
   src/IrrlichtDevice.cpp \
   src/ISceneManager.cpp \
   src/ISceneNode.cpp \
@@ -31,6 +32,7 @@ pkginclude_HEADERS = \
   include/IGUIEnvironment.h \
   include/IGUIStaticText.h \
   include/IMeshSceneNode.h \
+  include/IReferenceCounted.h \
   include/IrrlichtDevice.h \
   include/irrTypes.h \
   include/ISceneManager.h \
diff --git a/include/IReferenceCounted.h b/include/IReferenceCounted.h
new file mode 100644 (file)
index 0000000..25e6944
--- /dev/null
@@ -0,0 +1,40 @@
+/* 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_IREFERENCE_COUNTED_H_INCLUDED__
+#define __C_I_IREFERENCE_COUNTED_H_INCLUDED__
+
+#include <stdbool.h>
+
+typedef void irr_IReferenceCounted;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+  bool
+  irr_drop(irr_IReferenceCounted* object);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index b328be2b3dd52bb0fd4aee28ddc09d7d861db28b..fcd0b4584455df0a3b1d319770c08765415368ab 100644 (file)
@@ -61,9 +61,6 @@ extern "C" {
   bool
   irr_run(irr_IrrlichtDevice* device);
 
-  bool
-  irr_drop(irr_IrrlichtDevice* device);
-
   void
   irr_yield(irr_IrrlichtDevice* device);
 
index 828a892a1cb5f6dc24ad81caa4224a83c3a7813b..f8b8e4f1b4f1ebd941917b9895872cda42849cf7 100644 (file)
@@ -40,6 +40,7 @@
 #include "IGUIElement.h"
 #include "IGUIStaticText.h"
 #include "IMeshSceneNode.h"
+#include "IReferenceCounted.h"
 #include "IrrlichtDevice.h"
 #include "irrTypes.h"
 #include "ISceneManager.h"
diff --git a/src/IReferenceCounted.cpp b/src/IReferenceCounted.cpp
new file mode 100644 (file)
index 0000000..2e5dc2b
--- /dev/null
@@ -0,0 +1,31 @@
+/* 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 "IReferenceCounted.h"
+
+extern "C" {
+  bool
+  irr_drop(irr_IReferenceCounted* object)
+  {
+    return ((irr::IReferenceCounted*)object)->drop();
+  }
+}
index 32feec364da9eacc17fff43a32c84c45693d1ee6..512b9da11d72b1da68e8ca9ee582766e0bd5d9f5 100644 (file)
@@ -75,12 +75,6 @@ extern "C" {
     return ((irr::IrrlichtDevice*)device)->run();
   }
 
-  bool
-  irr_drop(irr_IrrlichtDevice* device)
-  {
-    return ((irr::IrrlichtDevice*)device)->drop();
-  }
-
   void
   irr_yield(irr_IrrlichtDevice* device)
   {