From 79e12d94cc21232477796a4e76fc2ddb5d88f9dc Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Sun, 24 May 2020 09:28:56 +0200 Subject: [PATCH] --- src/gui-element.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ src/gui-element.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 src/gui-element.cpp create mode 100644 src/gui-element.h diff --git a/src/gui-element.cpp b/src/gui-element.cpp new file mode 100644 index 0000000..39d3a41 --- /dev/null +++ b/src/gui-element.cpp @@ -0,0 +1,41 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + This file is part of guile-irrlicht. + + guile-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. + + guile-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 + . +*/ + +#include +#include +#include "gsubr.h" +#include "gui-element.h" +#include "wrapped.h" + +using namespace irr; + +SCM +IGUIElement_getID (SCM gui_element) +{ + gui::IGUIElement* element = (gui::IGUIElement*) scm_to_irr_pointer (gui_element); + return scm_from_int32 (element->getID ()); +} + +void +init_gui_element (void) +{ + DEFINE_GSUBR ("IGUIElement_getID", 1, 0, 0, IGUIElement_getID); +} diff --git a/src/gui-element.h b/src/gui-element.h new file mode 100644 index 0000000..2808ca8 --- /dev/null +++ b/src/gui-element.h @@ -0,0 +1,31 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + This file is part of guile-irrlicht. + + guile-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. + + guile-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 + . +*/ + +#ifndef __GUILE_IRRLICHT_GUI_ELEMENT_H_INCLUDED__ +#define __GUILE_IRRLICHT_GUI_ELEMENT_H_INCLUDED__ + +#include +#include + +void +init_gui_element (void); + +#endif -- 2.39.5