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);
return wrap_gui_element (unwrap_event (event)->GUIEvent.Caller);
}
+ SCM
+ event_gui_type (SCM event)
+ {
+ return scm_from_gui_event_type (unwrap_event (event)->GUIEvent.EventType);
+ }
+
SCM
event_key_input_key (SCM event)
{
}
}
+ SCM
+ scm_from_gui_event_type (irr::gui::EGUI_EVENT_TYPE gui_event_type)
+ {
+ switch (gui_event_type)
+ {
+ case irr::gui::EGET_ELEMENT_FOCUS_LOST:
+ return scm_from_utf8_symbol ("element-focus-lost");
+ break;
+
+ case irr::gui::EGET_ELEMENT_FOCUSED:
+ return scm_from_utf8_symbol ("element-focused");
+ break;
+
+ case irr::gui::EGET_ELEMENT_HOVERED:
+ return scm_from_utf8_symbol ("element-hovered");
+ break;
+
+ case irr::gui::EGET_ELEMENT_LEFT:
+ return scm_from_utf8_symbol ("element-left");
+ break;
+
+ case irr::gui::EGET_ELEMENT_CLOSED:
+ return scm_from_utf8_symbol ("element-closed");
+ break;
+
+ case irr::gui::EGET_BUTTON_CLICKED:
+ return scm_from_utf8_symbol ("button-clicked");
+ break;
+
+ case irr::gui::EGET_SCROLL_BAR_CHANGED:
+ return scm_from_utf8_symbol ("scrollbar-changed");
+ break;
+
+ case irr::gui::EGET_CHECKBOX_CHANGED:
+ return scm_from_utf8_symbol ("checkbox-changed");
+ break;
+
+ case irr::gui::EGET_LISTBOX_CHANGED:
+ return scm_from_utf8_symbol ("listbox-changed");
+ break;
+
+ case irr::gui::EGET_LISTBOX_SELECTED_AGAIN:
+ return scm_from_utf8_symbol ("listbox-selected-again");
+ break;
+
+ case irr::gui::EGET_FILE_SELECTED:
+ return scm_from_utf8_symbol ("file-selected");
+ break;
+
+ case irr::gui::EGET_DIRECTORY_SELECTED:
+ return scm_from_utf8_symbol ("directory-selected");
+ break;
+
+ case irr::gui::EGET_FILE_CHOOSE_DIALOG_CANCELLED:
+ return scm_from_utf8_symbol ("file-choose-dialog-cancelled");
+ break;
+
+ case irr::gui::EGET_MESSAGEBOX_YES:
+ return scm_from_utf8_symbol ("messagebox-yes");
+ break;
+
+ case irr::gui::EGET_MESSAGEBOX_NO:
+ return scm_from_utf8_symbol ("messagebox-no");
+ break;
+
+ case irr::gui::EGET_MESSAGEBOX_OK:
+ return scm_from_utf8_symbol ("messagebox-ok");
+ break;
+
+ case irr::gui::EGET_MESSAGEBOX_CANCEL:
+ return scm_from_utf8_symbol ("messagebox-cancel");
+ break;
+
+ case irr::gui::EGET_EDITBOX_ENTER:
+ return scm_from_utf8_symbol ("editbox-enter");
+ break;
+
+ case irr::gui::EGET_EDITBOX_CHANGED:
+ return scm_from_utf8_symbol ("editbox-changed");
+ break;
+
+ case irr::gui::EGET_EDITBOX_MARKING_CHANGED:
+ return scm_from_utf8_symbol ("editbox-marking-changed");
+ break;
+
+ case irr::gui::EGET_TAB_CHANGED:
+ return scm_from_utf8_symbol ("tab-changed");
+ break;
+
+ case irr::gui::EGET_MENU_ITEM_SELECTED:
+ return scm_from_utf8_symbol ("menu-item-selected");
+ break;
+
+ case irr::gui::EGET_COMBO_BOX_CHANGED:
+ return scm_from_utf8_symbol ("combo-box-changed");
+ break;
+
+ case irr::gui::EGET_SPINBOX_CHANGED:
+ return scm_from_utf8_symbol ("spinbox-changed");
+ break;
+
+ case irr::gui::EGET_TABLE_CHANGED:
+ return scm_from_utf8_symbol ("table-changed");
+ break;
+
+ case irr::gui::EGET_TABLE_HEADER_CHANGED:
+ return scm_from_utf8_symbol ("table-header-changed");
+ break;
+
+ case irr::gui::EGET_TABLE_SELECTED_AGAIN:
+ return scm_from_utf8_symbol ("table-selected-again");
+ break;
+
+ case irr::gui::EGET_TREEVIEW_NODE_DESELECT:
+ return scm_from_utf8_symbol ("treeview-node-deselect");
+ break;
+
+ case irr::gui::EGET_TREEVIEW_NODE_SELECT:
+ return scm_from_utf8_symbol ("treeview-node-select");
+ break;
+
+ case irr::gui::EGET_TREEVIEW_NODE_EXPAND:
+ return scm_from_utf8_symbol ("treeview-node-expand");
+ break;
+
+ case irr::gui::EGET_TREEVIEW_NODE_COLLAPSE:
+ return scm_from_utf8_symbol ("treeview-node-collapse");
+ break;
+
+ default:
+ SCM type = scm_from_uint (gui_event_type);
+ scm_error (scm_arg_type_key, NULL, "Wrong GUI event type: ~S",
+ scm_list_1 (type), scm_list_1 (type));
+ }
+ }
+
}