include/EMaterialFlags.h \
include/IAnimatedMeshMD2.h \
include/IAnimatedMeshSceneNode.h \
+ include/IGUIElement.h \
include/IGUIEnvironment.h \
+ include/IGUIStaticText.h \
include/IrrlichtDevice.h \
include/ISceneManager.h \
include/ISceneNode.h \
include/IVideoDriver.h \
include/rect.h \
include/SColor.h \
+ include/SExposedVideoData.h \
include/vector3d.h
--- /dev/null
+/* 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_GUI_ELEMENT_H_INCLUDED__
+#define __C_I_GUI_ELEMENT_H_INCLUDED__
+
+typedef void irr_gui_IGUIElement;
+
+#endif
#ifndef __C_GUI_ENVIRONMENT_H_INCLUDED__
#define __C_GUI_ENVIRONMENT_H_INCLUDED__
+#include "IGUIElement.h"
+#include "IGUIStaticText.h"
#include "rect.h"
+typedef void irr_gui_IGUIEnvironment;
+
#ifdef __cplusplus
extern "C" {
#endif
- void* irr_gui_IGUIEnvironment_addStaticText(void* guienv,
- const char* text,
- const irr_core_rect_s32* rectangle,
- bool border,
- bool wordWrap,
- void* parent,
- int32_t id,
- bool fillBackground);
-
- void irr_gui_IGUIEnvironment_drawAll(void* guienv);
+ irr_gui_IGUIStaticText*
+ irr_gui_IGUIEnvironment_addStaticText(irr_gui_IGUIEnvironment* guienv,
+ const char* text,
+ const irr_core_rect_s32* rectangle,
+ bool border,
+ bool wordWrap,
+ irr_gui_IGUIElement* parent,
+ int32_t id,
+ bool fillBackground);
+
+ void
+ irr_gui_IGUIEnvironment_drawAll(irr_gui_IGUIEnvironment* guienv);
#ifdef __cplusplus
}
--- /dev/null
+/* 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_GUI_STATIC_TEXT_H_INCLUDED__
+#define __C_I_GUI_STATIC_TEXT_H_INCLUDED__
+
+typedef void irr_gui_IGUIStaticText;
+
+#endif
#define __C_IRR_I_VIDEO_DRIVER_H_INCLUDED__
#include "SColor.h"
+#include "SExposedVideoData.h"
#include "rect.h"
+typedef void irr_video_IVideoDriver;
+
#ifdef __cplusplus
extern "C" {
#endif
- bool irr_video_IVideoDriver_beginScene(void* driver,
- bool backBuffer,
- bool zBuffer,
- const irr_video_SColor* color,
- void* videoData, // not used for now
- const irr_core_rect_s32* sourceRect);
+ bool
+ irr_video_IVideoDriver_beginScene(irr_video_IVideoDriver* driver,
+ bool backBuffer,
+ bool zBuffer,
+ const irr_video_SColor* color,
+ irr_video_SExposedVideoData* videoData,
+ const irr_core_rect_s32* sourceRect);
- bool irr_video_IVideoDriver_endScene(void* driver);
+ bool
+ irr_video_IVideoDriver_endScene(irr_video_IVideoDriver* driver);
#ifdef __cplusplus
}
#ifndef __C_IRRLICHT_DEVICE_H_INCLUDED__
#define __C_IRRLICHT_DEVICE_H_INCLUDED__
+#include "IGUIEnvironment.h"
+#include "ISceneManager.h"
+#include "IVideoDriver.h"
+
+typedef void irr_IrrlichtDevice;
+
#ifdef __cplusplus
extern "C" {
#endif
- void* irr_IrrlichtDevice_getGUIEnvironment(void* device);
- void* irr_IrrlichtDevice_getSceneManager(void* device);
- void* irr_IrrlichtDevice_getVideoDriver(void* device);
- void irr_IrrlichtDevice_setWindowCaption(void* device, const char* text);
- int irr_IrrlichtDevice_run(void* device);
- int irr_IrrlichtDevice_drop(void* device);
+ irr_gui_IGUIEnvironment*
+ irr_IrrlichtDevice_getGUIEnvironment(irr_IrrlichtDevice* device);
+
+ irr_scene_ISceneManager*
+ irr_IrrlichtDevice_getSceneManager(irr_IrrlichtDevice* device);
+
+ irr_video_IVideoDriver*
+ irr_IrrlichtDevice_getVideoDriver(irr_IrrlichtDevice* device);
+
+ void
+ irr_IrrlichtDevice_setWindowCaption(irr_IrrlichtDevice* device,
+ const char* text);
+
+ int
+ irr_IrrlichtDevice_run(irr_IrrlichtDevice* device);
+
+ int
+ irr_IrrlichtDevice_drop(irr_IrrlichtDevice* device);
#ifdef __cplusplus
}
--- /dev/null
+/* 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_S_EXPOSED_VIDEO_DATA_H_INCLUDED__
+#define __C_S_EXPOSED_VIDEO_DATA_H_INCLUDED__
+
+typedef void irr_video_SExposedVideoData;
+
+#endif
#include "IAnimatedMeshMD2.h"
#include "IAnimatedMeshSceneNode.h"
#include "IGUIEnvironment.h"
+#include "IGUIElement.h"
+#include "IGUIStaticText.h"
#include "IrrlichtDevice.h"
#include "ISceneManager.h"
#include "ISceneNode.h"
#include "IVideoDriver.h"
#include "rect.h"
#include "SColor.h"
+#include "SExposedVideoData.h"
#include "vector3d.h"
#ifdef __cplusplus
extern "C" {
#endif
- void* irr_createDevice(irr_video_E_DRIVER_TYPE deviceType,
- const irr_core_dimension2d_u32* windowSize,
- u_int32_t bits,
- bool fullscreen,
- bool stencilbuffer,
- bool vsync);
+ irr_IrrlichtDevice*
+ irr_createDevice(irr_video_E_DRIVER_TYPE deviceType,
+ const irr_core_dimension2d_u32* windowSize,
+ u_int32_t bits,
+ bool fullscreen,
+ bool stencilbuffer,
+ bool vsync);
#ifdef __cplusplus
}
#include "cirrlicht.h"
extern "C" {
- void* irr_createDevice(irr_video_E_DRIVER_TYPE deviceType,
- const irr_core_dimension2d_u32* windowSize,
- u_int32_t bits,
- bool fullscreen,
- bool stencilbuffer,
- bool vsync)
+ irr_IrrlichtDevice*
+ irr_createDevice(irr_video_E_DRIVER_TYPE deviceType,
+ const irr_core_dimension2d_u32* windowSize,
+ u_int32_t bits,
+ bool fullscreen,
+ bool stencilbuffer,
+ bool vsync)
{
irr::core::dimension2d<irr::u32> wsize = \
irr::core::dimension2d<irr::u32>(windowSize->width,
irr::createDevice((irr::video::E_DRIVER_TYPE)deviceType,
wsize, bits, fullscreen, stencilbuffer,
vsync);
- return device;
+ return (irr_IrrlichtDevice*)device;
}
}
#include "IGUIEnvironment.h"
extern "C" {
- void* irr_gui_IGUIEnvironment_addStaticText(void* guienv,
- const char* text,
- const irr_core_rect_s32* rectangle,
- bool border,
- bool wordWrap,
- void* parent,
- int32_t id,
- bool fillBackground)
+ irr_gui_IGUIStaticText*
+ irr_gui_IGUIEnvironment_addStaticText(irr_gui_IGUIEnvironment* guienv,
+ const char* text,
+ const irr_core_rect_s32* rectangle,
+ bool border,
+ bool wordWrap,
+ irr_gui_IGUIElement* parent,
+ int32_t id,
+ bool fillBackground)
{
// Convert to wide char text
wchar_t *wtext = (wchar_t*)malloc((strlen(text) + 1) * sizeof(wchar_t));
return staticText;
}
- void irr_gui_IGUIEnvironment_drawAll(void* guienv)
+ void
+ irr_gui_IGUIEnvironment_drawAll(irr_gui_IGUIEnvironment* guienv)
{
((irr::gui::IGUIEnvironment*)guienv)->drawAll();
}
#include "IVideoDriver.h"
extern "C" {
- bool irr_video_IVideoDriver_beginScene(void* driver,
- bool backBuffer,
- bool zBuffer,
- const irr_video_SColor* color,
- void* videoData, // not used for now
- const irr_core_rect_s32* sourceRect)
+ bool
+ irr_video_IVideoDriver_beginScene(irr_video_IVideoDriver* driver,
+ bool backBuffer,
+ bool zBuffer,
+ const irr_video_SColor* color,
+ irr_video_SExposedVideoData* videoData,
+ const irr_core_rect_s32* sourceRect)
{
// Color
irr::video::SColor col = irr::video::SColor(color->a, color->r,
color->g, color->b);
// Video data
+ // TODO
irr::video::SExposedVideoData vdata = irr::video::SExposedVideoData();
// Source rect
sourceRect != NULL ? &rect : 0);
}
- bool irr_video_IVideoDriver_endScene(void* driver)
+ bool
+ irr_video_IVideoDriver_endScene(irr_video_IVideoDriver* driver)
{
return ((irr::video::IVideoDriver*)driver)->endScene();
}
#include "IrrlichtDevice.h"
extern "C" {
- void* irr_IrrlichtDevice_getGUIEnvironment(void* device)
+ irr_gui_IGUIEnvironment*
+ irr_IrrlichtDevice_getGUIEnvironment(irr_IrrlichtDevice* device)
{
return ((irr::IrrlichtDevice*)device)->getGUIEnvironment();
}
- void* irr_IrrlichtDevice_getSceneManager(void* device)
+ irr_scene_ISceneManager*
+ irr_IrrlichtDevice_getSceneManager(irr_IrrlichtDevice* device)
{
return ((irr::IrrlichtDevice*)device)->getSceneManager();
}
- void* irr_IrrlichtDevice_getVideoDriver(void* device)
+ irr_video_IVideoDriver*
+ irr_IrrlichtDevice_getVideoDriver(irr_IrrlichtDevice* device)
{
return ((irr::IrrlichtDevice*)device)->getVideoDriver();
}
- void irr_IrrlichtDevice_setWindowCaption(void* device, const char* text)
+ void
+ irr_IrrlichtDevice_setWindowCaption(irr_IrrlichtDevice* device,
+ const char* text)
{
wchar_t *wtext = (wchar_t*)malloc((strlen(text) + 1) * sizeof(wchar_t));
mbsrtowcs(wtext, &text, strlen(text) + 1, NULL);
((irr::IrrlichtDevice*)device)->setWindowCaption(wtext);
}
- int irr_IrrlichtDevice_run(void* device)
+ int
+ irr_IrrlichtDevice_run(irr_IrrlichtDevice* device)
{
return ((irr::IrrlichtDevice*)device)->run() ? 1 : 0;
}
- int irr_IrrlichtDevice_drop(void* device)
+ int
+ irr_IrrlichtDevice_drop(irr_IrrlichtDevice* device)
{
return ((irr::IrrlichtDevice*)device)->drop() ? 1 : 0;
}