]> git.jsancho.org Git - guile-irrlicht.git/blobdiff - src/gui-toolbar.cpp
make-box3d
[guile-irrlicht.git] / src / gui-toolbar.cpp
index fb3ca10862ff8ad2b5b4f0d0081e7e513a4d8345..ace658cf6ca423f20bca76d3294b83081da18caf 100644 (file)
 #include "gsubr.h"
 #include "gui-toolbar.h"
 #include "wchar.h"
-
+#include "wrapped.h"
 
 using namespace irr;
 
-
 SCM
 IGUIToolBar_addButton (SCM gui_toolbar,
                        SCM id,
@@ -39,25 +38,20 @@ IGUIToolBar_addButton (SCM gui_toolbar,
                        SCM is_push_button,
                        SCM use_alpha_channel)
 {
-  gui::IGUIToolBar* toolbar = (gui::IGUIToolBar*) scm_to_pointer (gui_toolbar);
+  gui::IGUIToolBar* toolbar = (gui::IGUIToolBar*) scm_to_irr_pointer (gui_toolbar);
   gui::IGUIButton* button =
     toolbar->addButton (scm_to_int32 (id),
                         scm_to_wide_char_string (text),
                         scm_to_wide_char_string (tooltiptext),
-                        (video::ITexture*) scm_to_pointer (img),
-                        (video::ITexture*) scm_to_pointer (pressedimg),
+                        (video::ITexture*) scm_to_irr_pointer (img),
+                        (video::ITexture*) scm_to_irr_pointer (pressedimg),
                         scm_to_bool (is_push_button),
                         scm_to_bool (use_alpha_channel));
   return scm_from_pointer ((void*) button, NULL);
 }
 
-
-extern "C" {
-
-  void
-  init_gui_toolbar (void)
-  {
-    DEFINE_GSUBR ("IGUIToolBar_addButton", 8, 0, 0, IGUIToolBar_addButton);
-  }
-
+void
+init_gui_toolbar (void)
+{
+  DEFINE_GSUBR ("IGUIToolBar_addButton", 8, 0, 0, IGUIToolBar_addButton);
 }