X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=blobdiff_plain;f=src%2Fevent-receiver.cpp;h=cae9191691668a98a28a146b8c85e381dd6dcfc8;hp=293f48f794f1a6b028003aa50c9b5ad2d438f11e;hb=41a6ad96e81a8d8153c54877c4c12f61100677a9;hpb=bf2cb00e2ef19e2eb33557f900405f836ebe65a3 diff --git a/src/event-receiver.cpp b/src/event-receiver.cpp index 293f48f..cae9191 100644 --- a/src/event-receiver.cpp +++ b/src/event-receiver.cpp @@ -25,10 +25,8 @@ #include "gsubr.h" #include "keycodes.h" - using namespace irr; - SCM IEventRecevier_make (SCM proc_on_event) { @@ -52,7 +50,6 @@ IEventRecevier_make (SCM proc_on_event) return scm_from_pointer ((void*)receiver, NULL); } - SCM SEvent_EventType (SCM event) { @@ -60,7 +57,6 @@ SEvent_EventType (SCM event) (((SEvent*)scm_to_pointer (event))->EventType); } - SCM SEvent_SGUIEvent_Caller (SCM event) { @@ -69,7 +65,6 @@ SEvent_SGUIEvent_Caller (SCM event) return scm_from_pointer ((void*)caller, NULL); } - SCM SEvent_SGUIEvent_EventType (SCM event) { @@ -77,7 +72,6 @@ SEvent_SGUIEvent_EventType (SCM event) (((SEvent*)scm_to_pointer (event))->GUIEvent.EventType); } - SCM SEvent_SKeyInput_Key (SCM event) { @@ -85,7 +79,6 @@ SEvent_SKeyInput_Key (SCM event) (((SEvent*)scm_to_pointer (event))->KeyInput.Key); } - SCM SEvent_SKeyInput_PressedDown (SCM event) { @@ -93,20 +86,15 @@ SEvent_SKeyInput_PressedDown (SCM event) (((SEvent*)scm_to_pointer (event))->KeyInput.PressedDown); } - -extern "C" { - - void - init_event_receiver (void) - { - DEFINE_GSUBR ("IEventRecevier_make", 1, 0, 0, IEventRecevier_make); - DEFINE_GSUBR ("SEvent_EventType", 1, 0, 0, SEvent_EventType); - DEFINE_GSUBR ("SEvent_SGUIEvent_Caller", 1, 0, 0, SEvent_SGUIEvent_Caller); - DEFINE_GSUBR ("SEvent_SGUIEvent_EventType", 1, 0, 0, SEvent_SGUIEvent_EventType); - DEFINE_GSUBR ("SEvent_SKeyInput_Key", 1, 0, 0, SEvent_SKeyInput_Key); - DEFINE_GSUBR ("SEvent_SKeyInput_PressedDown", 1, 0, 0, SEvent_SKeyInput_PressedDown); - } - +void +init_event_receiver (void) +{ + DEFINE_GSUBR ("IEventRecevier_make", 1, 0, 0, IEventRecevier_make); + DEFINE_GSUBR ("SEvent_EventType", 1, 0, 0, SEvent_EventType); + DEFINE_GSUBR ("SEvent_SGUIEvent_Caller", 1, 0, 0, SEvent_SGUIEvent_Caller); + DEFINE_GSUBR ("SEvent_SGUIEvent_EventType", 1, 0, 0, SEvent_SGUIEvent_EventType); + DEFINE_GSUBR ("SEvent_SKeyInput_Key", 1, 0, 0, SEvent_SKeyInput_Key); + DEFINE_GSUBR ("SEvent_SKeyInput_PressedDown", 1, 0, 0, SEvent_SKeyInput_PressedDown); } SCM @@ -145,7 +133,6 @@ scm_from_event_type (EEVENT_TYPE event_type) } } - SCM scm_from_gui_event_type (gui::EGUI_EVENT_TYPE gui_event_type) {