X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Fcursor-control.cpp;fp=src%2Fcursor-control.cpp;h=ada992f7fbb0bb0319ec161a3bbb02414ef0f00f;hb=fd10e89f595a8ae45d4471a7d77426d0a1b77502;hp=4a870e81029f47ee7974e0d711ce5fd5b325229f;hpb=3ea56c83d8f0c7994f5113166e315d06aa1dcb4a;p=guile-irrlicht.git diff --git a/src/cursor-control.cpp b/src/cursor-control.cpp index 4a870e8..ada992f 100644 --- a/src/cursor-control.cpp +++ b/src/cursor-control.cpp @@ -21,7 +21,9 @@ #include #include + #include "cursor-control.h" +#include "device.h" #include "position2d.h" #include "wrapped.h" @@ -31,12 +33,22 @@ extern "C" { init_cursor_control (void) { init_cursor_control_type (); + scm_c_define_gsubr ("get-cursor-control", 1, 0, 0, (scm_t_subr)irr_getCursorControl); + scm_c_export ("get-cursor-control", NULL); } 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)