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==;
96 %include dimension2d.h
97 %template(dimension2df) irr::core::dimension2d<irr::f32>;
98 %template(dimension2du) irr::core::dimension2d<irr::u32>;
99 %template(dimension2di) irr::core::dimension2d<irr::s32>;
102 %template(rectf) irr::core::rect<irr::f32>;
103 %template(recti) irr::core::rect<irr::s32>;
106 %template(vector3df) irr::core::vector3d<irr::f32>;
107 %template(vector3di) irr::core::vector3d<irr::s32>;
109 %rename("%(undercase)s", %$not %$isconstant, %$not %$isenumitem) "";
110 %feature("constasvar");
112 %include EDriverTypes.h
113 %include EMaterialFlags.h
114 %include IrrCompileConfig.h
116 %rename("%(regex:/(.*)SColor(.*)/\\1s_color\\2/)s") "";
117 %rename(get_color_alpha) irr::video::SColor::getAlpha;
118 %rename(get_color_red) irr::video::SColor::getRed;
119 %rename(get_color_green) irr::video::SColor::getGreen;
120 %rename(get_color_blue) irr::video::SColor::getBlue;
121 %rename(get_color_average) irr::video::SColor::getAverage;
122 %rename(get_colorf_alpha) irr::video::SColorf::getAlpha;
123 %rename(get_colorf_red) irr::video::SColorf::getRed;
124 %rename(get_colorf_green) irr::video::SColorf::getGreen;
125 %rename(get_colorf_blue) irr::video::SColorf::getBlue;
126 %rename(get_colorf_average) irr::video::SColorf::getAverage;
129 %rename("%(regex:/(.*)IAnimatedMesh(.*)/\\1animated_mesh\\2/)s") "";
130 %rename (set_md2_animation) setMD2Animation;
131 %include IAnimatedMesh.h
132 %include IAnimatedMeshMD2.h
133 %include SAnimatedMesh.h
135 %rename("%(regex:/(.*)ISceneNode(.*)/\\1scene_node\\2/)s") "";
136 %include ISceneNode.h
138 %rename("%(regex:/(.*)IAnimatedMeshSceneNode(.*)/\\1animated_mesh_scene_node\\2/)s") "";
139 %include IAnimatedMeshSceneNode.h
141 %rename("%(regex:/(.*)IGUIStaticText(.*)/\\1gui_static_text\\2/)s") "";
142 %include IGUIStaticText.h
144 %rename(get_gui_environment) getGUIEnvironment;
145 %rename("%(regex:/(.*)IGUIEnvironment(.*)/\\1gui_environment\\2/)s") "";
146 %include IGUIEnvironment.h
148 %rename("%(regex:/(.*)ISceneManager(.*)/\\1scene_manager\\2/)s") "";
149 %include ISceneManager.h
151 %ignore irr::video::IVideoDriver::createImage;
152 %rename(apply_material) apply;
153 %rename("%(regex:/(.*)IVideoDriver(.*)/\\1video_driver\\2/)s") "";
154 %include IVideoDriver.h
156 %rename(yield_device) yield;
157 %rename(sleep_device) sleep;
158 %include IrrlichtDevice.h
161 %scheme %{ (load-extension "libguile-irrlicht" "scm_init_irrlicht_module") %}