From: Javier Sancho Date: Mon, 27 Apr 2020 06:33:50 +0000 (+0200) Subject: Rename event procedures X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=70a3e723e41be522422f3e49faa060c64227bca8;p=guile-irrlicht.git Rename event procedures --- diff --git a/examples/04-movement.scm b/examples/04-movement.scm index e0592c3..c6efed6 100644 --- a/examples/04-movement.scm +++ b/examples/04-movement.scm @@ -54,11 +54,11 @@ (assoc-ref key-is-down key-code)) (define (on-event event) - (if (equal? (event-type event) 'key-input-event) + (if (equal? (get-event-type event) 'key-input-event) (set! key-is-down (assoc-set! key-is-down - (event-key-input-key event) - (event-key-input-pressed event)))) + (get-event-key-input-key event) + (get-event-key-input-pressed event)))) #f) (define receiver (make-event-receiver on-event)) diff --git a/src/event-receiver.cpp b/src/event-receiver.cpp index f0ec53a..56affaf 100644 --- a/src/event-receiver.cpp +++ b/src/event-receiver.cpp @@ -35,11 +35,11 @@ extern "C" { { init_event_receiver_type (); init_event_type (); - DEFINE_GSUBR ("event-gui-caller", 1, 0, 0, event_gui_caller); - DEFINE_GSUBR ("event-gui-type", 1, 0, 0, event_gui_type); - DEFINE_GSUBR ("event-key-input-key", 1, 0, 0, event_key_input_key); - DEFINE_GSUBR ("event-key-input-pressed", 1, 0, 0, event_key_input_pressed); - DEFINE_GSUBR ("event-type", 1, 0, 0, event_type); + DEFINE_GSUBR ("get-event-gui-caller", 1, 0, 0, get_event_gui_caller); + DEFINE_GSUBR ("get-event-gui-type", 1, 0, 0, get_event_gui_type); + DEFINE_GSUBR ("get-event-key-input-key", 1, 0, 0, get_event_key_input_key); + DEFINE_GSUBR ("get-event-key-input-pressed", 1, 0, 0, get_event_key_input_pressed); + DEFINE_GSUBR ("get-event-type", 1, 0, 0, get_event_type); DEFINE_GSUBR ("make-event-receiver", 1, 0, 0, make_event_receiver); } @@ -52,31 +52,31 @@ extern "C" { wrap_event, unwrap_event); SCM - event_gui_caller (SCM event) + get_event_gui_caller (SCM event) { return wrap_gui_element (unwrap_event (event)->GUIEvent.Caller); } SCM - event_gui_type (SCM event) + get_event_gui_type (SCM event) { return scm_from_gui_event_type (unwrap_event (event)->GUIEvent.EventType); } SCM - event_key_input_key (SCM event) + get_event_key_input_key (SCM event) { return scm_from_key_code (unwrap_event (event)->KeyInput.Key); } SCM - event_key_input_pressed (SCM event) + get_event_key_input_pressed (SCM event) { return scm_from_bool (unwrap_event (event)->KeyInput.PressedDown); } SCM - event_type (SCM event) + get_event_type (SCM event) { return scm_from_event_type (unwrap_event (event)->EventType); } diff --git a/src/event-receiver.h b/src/event-receiver.h index 876bf0c..b85efd4 100644 --- a/src/event-receiver.h +++ b/src/event-receiver.h @@ -38,19 +38,19 @@ extern "C" { event_p, wrap_event, unwrap_event); SCM - event_gui_caller (SCM event); + get_event_gui_caller (SCM event); SCM - event_gui_type (SCM event); + get_event_gui_type (SCM event); SCM - event_key_input_key (SCM event); + get_event_key_input_key (SCM event); SCM - event_key_input_pressed (SCM event); + get_event_key_input_pressed (SCM event); SCM - event_type (SCM event); + get_event_type (SCM event); SCM make_event_receiver (SCM proc_on_event);