2 guile-irrlicht --- GNU Guile bindings for Irrlicht Engine
4 Copyright (C) 2021 Javier Sancho <jsf@jsancho.org>
6 This file is part of guile-irrlicht.
8 guile-irrlicht is free software; you can redistribute it and/or modify
9 it under the terms of the GNU Lesser General Public License as
10 published by the Free Software Foundation; either version 3 of the
11 License, or (at your option) any later version.
13 guile-irrlicht is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public
19 License along with guile-irrlicht. If not, see
20 <http://www.gnu.org/licenses/>.
25 #include <irrlicht/irrlicht.h>
28 using namespace scene;
29 using namespace video;
34 %typecheck (SWIG_TYPECHECK_POINTER) const IRR_CHAR_TYPE &
36 $1 = scm_is_string ($input);
38 %typemap (in) const IRR_CHAR_TYPE &
40 $1 = ($ltype) scm_to_utf8_string ($input);
42 %typemap (freearg) const IRR_CHAR_TYPE &
47 %typecheck (SWIG_TYPECHECK_POINTER) const IRR_WCHAR_TYPE &
49 $1 = scm_is_string ($input);
51 %typemap (in) const IRR_WCHAR_TYPE &
53 $1 = ($ltype) scm_to_utf32_string ($input);
55 %typemap (freearg) const IRR_WCHAR_TYPE &
60 %typecheck (SWIG_TYPECHECK_POINTER) const IRR_IO_PATH &
62 $1 = scm_is_string ($input);
64 %typemap (in) const IRR_IO_PATH &
66 $1 = new $*1_ltype (scm_to_utf8_string ($input));
68 %typemap (freearg) const IRR_IO_PATH &
74 %apply const IRR_CHAR_TYPE & { const irr::core::stringc & };
75 %apply const IRR_WCHAR_TYPE & { const wchar_t *, const irr::core::stringw & };
76 %apply const IRR_IO_PATH & { const irr::io::path &, const path &, irr::io::path &, path & };
79 typedef unsigned int u32;
83 #define _IRR_DEPRECATED_
85 %rename (add) operator+;
86 %rename (substract) operator-;
87 %rename (product) operator*;
88 %rename (divide) operator/;
89 %rename (equal) operator==;
90 %rename (not_equal) operator!=;
91 %rename (less) operator<;
92 %rename (less_equal) operator<=;
93 %rename (greater) operator>;
94 %rename (greater_equal) operator>=;
102 %include dimension2d.h
103 %template (dimension2df) irr::core::dimension2d<irr::f32>;
104 %template (dimension2du) irr::core::dimension2d<irr::u32>;
105 %template (dimension2di) irr::core::dimension2d<irr::s32>;
108 %template (rectf) irr::core::rect<irr::f32>;
109 %template (recti) irr::core::rect<irr::s32>;
112 %template (vector3df) irr::core::vector3d<irr::f32>;
113 %template (vector3di) irr::core::vector3d<irr::s32>;
115 %rename ("%(undercase)s", %$not %$isconstant, %$not %$isenumitem) "";
116 %feature ("constasvar");
118 %include EDriverTypes.h
119 %include EMaterialFlags.h
120 %include IrrCompileConfig.h
122 %rename (color) irr::video::SColor;
123 %rename (color) irr::video::SColor::SColor;
124 %rename (xcolor) irr::video::SColor::color;
125 %rename (get_color_alpha) irr::video::SColor::getAlpha;
126 %rename (get_color_red) irr::video::SColor::getRed;
127 %rename (get_color_green) irr::video::SColor::getGreen;
128 %rename (get_color_blue) irr::video::SColor::getBlue;
129 %rename (get_color_average) irr::video::SColor::getAverage;
130 %rename (get_colorf_alpha) irr::video::SColorf::getAlpha;
131 %rename (get_colorf_red) irr::video::SColorf::getRed;
132 %rename (get_colorf_green) irr::video::SColorf::getGreen;
133 %rename (get_colorf_blue) irr::video::SColorf::getBlue;
134 %rename (get_colorf_average) irr::video::SColorf::getAverage;
137 %include IReferenceCounted.h
138 %include IAttributeExchangingObject.h
142 %rename (animated_mesh) irr::scene::IAnimatedMesh;
143 %include IAnimatedMesh.h
145 %include IAnimatedMeshMD2.h
146 %include SAnimatedMesh.h
148 %rename (scene_node) irr::scene::ISceneNode;
149 %include ISceneNode.h
151 %rename (animated_mesh_scene_node) irr::scene::IAnimatedMeshSceneNode;
152 %rename (set_md2_animation) irr::scene::IAnimatedMeshSceneNode::setMD2Animation;
153 %include IAnimatedMeshSceneNode.h
155 %include IEventReceiver.h
156 %include IGUIElement.h
158 %rename (gui_static_text) irr::gui::IGUIStaticText;
159 %include IGUIStaticText.h
161 %rename (get_gui_environment) getGUIEnvironment;
162 %rename (gui_environment) irr::gui::IGUIEnvironment;
163 %include IGUIEnvironment.h
165 %rename (scene_manager) irr::scene::ISceneManager;
166 %include ISceneManager.h
168 %ignore irr::video::IVideoDriver::createImage;
169 %rename (apply_material) apply;
170 %rename (video_driver) irr::video::IVideoDriver;
171 %include IVideoDriver.h
173 %rename (yield_device) yield;
174 %rename (sleep_device) sleep;
175 %include IrrlichtDevice.h
178 %scheme %{ (load-extension "libguile-irrlicht" "scm_init_irrlicht_module") %}