summaryrefslogtreecommitdiff
path: root/plugingui/nativewindow_pugl.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-10-26 19:48:30 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-10-26 19:48:30 +0100
commit88ad7366a3eb6bc73bc99078ae13302099b76f09 (patch)
tree64a5f5b3a4b5c187d25e21e21bf2808f12367820 /plugingui/nativewindow_pugl.cc
parentb84e5f74e5513e4cd14fe62b03777be8ee9c2537 (diff)
Refactored LineEdit and FileBrowser. Renamed all KEY_XYZ event types to KeyXyz.
Diffstat (limited to 'plugingui/nativewindow_pugl.cc')
-rw-r--r--plugingui/nativewindow_pugl.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugingui/nativewindow_pugl.cc b/plugingui/nativewindow_pugl.cc
index 45cddab..dadb724 100644
--- a/plugingui/nativewindow_pugl.cc
+++ b/plugingui/nativewindow_pugl.cc
@@ -97,18 +97,18 @@ static void onKeyboard(PuglView* view, bool press, uint32_t key)
printf("%d\n", key);
switch(key) {
- case PUGL_KEY_LEFT: e->keycode = GUI::KeyEvent::KEY_LEFT; break;
- case PUGL_KEY_RIGHT: e->keycode = GUI::KeyEvent::KEY_RIGHT; break;
- case PUGL_KEY_UP: e->keycode = GUI::KeyEvent::KEY_UP; break;
- case PUGL_KEY_DOWN: e->keycode = GUI::KeyEvent::KEY_DOWN; break;
- case PUGL_KEY_PAGE_UP: e->keycode = GUI::KeyEvent::KEY_PGDOWN; break;
- case PUGL_KEY_PAGE_DOWN: e->keycode = GUI::KeyEvent::KEY_PGUP; break;
- default: e->keycode = GUI::KeyEvent::KEY_UNKNOWN; break;
+ case PUGL_KEY_LEFT: e->keycode = GUI::KeyEvent::KeyLeft; break;
+ case PUGL_KEY_RIGHT: e->keycode = GUI::KeyEvent::KeyRight; break;
+ case PUGL_KEY_UP: e->keycode = GUI::KeyEvent::KeyUp; break;
+ case PUGL_KEY_DOWN: e->keycode = GUI::KeyEvent::KeyDown; break;
+ case PUGL_KEY_PAGE_UP: e->keycode = GUI::KeyEvent::KeyPageDown; break;
+ case PUGL_KEY_PAGE_DOWN: e->keycode = GUI::KeyEvent::KeyPageUp; break;
+ default: e->keycode = GUI::KeyEvent::KeyUnknown; break;
}
// TODO: perform character type check
- if(e->keycode == GUI::KeyEvent::KEY_UNKNOWN) {
- e->keycode = GUI::KeyEvent::KEY_CHARACTER;
+ if(e->keycode == GUI::KeyEvent::KeyUnknown) {
+ e->keycode = GUI::KeyEvent::KeyCharacter;
e->text.assign(1, (char)key);
}