X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Fcursor-control.cpp;h=5ff6540d7960e82df57fea5fa40b9049627fed7a;hb=69ed7f57e6295034fa64ab2bf6d10da6882860ef;hp=4a870e81029f47ee7974e0d711ce5fd5b325229f;hpb=2cdd08f70b0a58b2f00b341df5b73704d3febd47;p=guile-irrlicht.git diff --git a/src/cursor-control.cpp b/src/cursor-control.cpp index 4a870e8..5ff6540 100644 --- a/src/cursor-control.cpp +++ b/src/cursor-control.cpp @@ -21,7 +21,10 @@ #include #include + #include "cursor-control.h" +#include "device.h" +#include "gsubr.h" #include "position2d.h" #include "wrapped.h" @@ -31,12 +34,21 @@ extern "C" { init_cursor_control (void) { init_cursor_control_type (); + DEFINE_GSUBR ("get-cursor-control", 1, 0, 0, irr_getCursorControl); } DEFINE_WRAPPED_TYPE (irr::gui::ICursorControl*, "cursor-control", init_cursor_control_type, cursor_control_p, wrap_cursor_control, unwrap_cursor_control); + SCM + irr_getCursorControl (SCM wrapped_device) + { + irr::gui::ICursorControl* cursor_control = + unwrap_device (wrapped_device)->getCursorControl (); + return wrap_cursor_control (cursor_control); + } + SCM irr_gui_setPosition (SCM wrapped_cursor_control, SCM position)