summaryrefslogtreecommitdiff
path: root/plugingui/nativewindow_pugl.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-11-18 21:00:48 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-11-18 21:00:48 +0100
commitc1973bc4d4ec9d8d18a690359a2d649905e35264 (patch)
tree045c4d5afc28422319c4e20322fbafe97fefd280 /plugingui/nativewindow_pugl.cc
parentf11a61a36fa5e21b0c6c2362af2952a3f87408a0 (diff)
Refactored Slider. Expanded all event variable names (all was 'e' before). Changed all uievent enums to enum classes.
Diffstat (limited to 'plugingui/nativewindow_pugl.cc')
-rw-r--r--plugingui/nativewindow_pugl.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugingui/nativewindow_pugl.cc b/plugingui/nativewindow_pugl.cc
index dadb724..0c7ba96 100644
--- a/plugingui/nativewindow_pugl.cc
+++ b/plugingui/nativewindow_pugl.cc
@@ -83,7 +83,7 @@ static void onMouse(PuglView* view, int button, bool press, int x, int y)
e->y = y;
e->button = button;
e->direction = press?1:-1;
- e->doubleclick = false;
+ e->doubleClick = false;
eventq.push_back(e);
}
@@ -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::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;
+ case PUGL_KEY_LEFT: e->keycode = GUI::Key::left; break;
+ case PUGL_KEY_RIGHT: e->keycode = GUI::Key::right; break;
+ case PUGL_KEY_UP: e->keycode = GUI::Key::up; break;
+ case PUGL_KEY_DOWN: e->keycode = GUI::Key::down; break;
+ case PUGL_KEY_PAGE_UP: e->keycode = GUI::Key::pageDown; break;
+ case PUGL_KEY_PAGE_DOWN: e->keycode = GUI::Key::pageUp; break;
+ default: e->keycode = GUI::Key::unknown; break;
}
// TODO: perform character type check
- if(e->keycode == GUI::KeyEvent::KeyUnknown) {
- e->keycode = GUI::KeyEvent::KeyCharacter;
+ if(e->keycode == GUI::Key::unknown) {
+ e->keycode = GUI::Key::character;
e->text.assign(1, (char)key);
}