aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-17 18:43:41 +0100
committerDavid Robillard <d@drobilla.net>2020-03-17 18:58:42 +0100
commit8ecb682579e5a8236cddf151ec200f5ea07d3292 (patch)
tree51d8bf5ba75384d4365071f42559b5ad626107c0 /examples
parent163748d173af0ebeeec80b1e414169e72d23bb24 (diff)
downloadpugl-8ecb682579e5a8236cddf151ec200f5ea07d3292.tar.gz
pugl-8ecb682579e5a8236cddf151ec200f5ea07d3292.tar.bz2
pugl-8ecb682579e5a8236cddf151ec200f5ea07d3292.zip
Use clearer names for pointer events
These old "notify" names are a smell from X11 which is a bit strange and inconsistent here, since nearly everything is a "notification" of sorts. I think the new names here are much more clear since they are consistent with the keyboard focus events.
Diffstat (limited to 'examples')
-rw-r--r--examples/pugl_cairo_demo.c4
-rw-r--r--examples/pugl_embed_demo.c8
-rw-r--r--examples/pugl_window_demo.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/examples/pugl_cairo_demo.c b/examples/pugl_cairo_demo.c
index a1423ae..6b43cb0 100644
--- a/examples/pugl_cairo_demo.c
+++ b/examples/pugl_cairo_demo.c
@@ -195,11 +195,11 @@ onEvent(PuglView* view, const PuglEvent* event)
app->mouseDown = false;
postButtonRedisplay(view);
break;
- case PUGL_ENTER_NOTIFY:
+ case PUGL_POINTER_IN:
app->entered = true;
puglPostRedisplay(view);
break;
- case PUGL_LEAVE_NOTIFY:
+ case PUGL_POINTER_OUT:
app->entered = false;
puglPostRedisplay(view);
break;
diff --git a/examples/pugl_embed_demo.c b/examples/pugl_embed_demo.c
index a540b67..313a92c 100644
--- a/examples/pugl_embed_demo.c
+++ b/examples/pugl_embed_demo.c
@@ -193,7 +193,7 @@ onParentEvent(PuglView* view, const PuglEvent* event)
case PUGL_KEY_PRESS:
onKeyPress(view, &event->key, "Parent: ");
break;
- case PUGL_MOTION_NOTIFY:
+ case PUGL_MOTION:
break;
case PUGL_CLOSE:
app->quit = 1;
@@ -230,7 +230,7 @@ onEvent(PuglView* view, const PuglEvent* event)
case PUGL_KEY_PRESS:
onKeyPress(view, &event->key, "Child: ");
break;
- case PUGL_MOTION_NOTIFY:
+ case PUGL_MOTION:
app->xAngle -= event->motion.x - app->lastMouseX;
app->yAngle += event->motion.y - app->lastMouseY;
app->lastMouseX = event->motion.x;
@@ -246,10 +246,10 @@ onEvent(PuglView* view, const PuglEvent* event)
puglPostRedisplay(view);
}
break;
- case PUGL_ENTER_NOTIFY:
+ case PUGL_POINTER_IN:
app->mouseEntered = true;
break;
- case PUGL_LEAVE_NOTIFY:
+ case PUGL_POINTER_OUT:
app->mouseEntered = false;
break;
case PUGL_TIMER:
diff --git a/examples/pugl_window_demo.c b/examples/pugl_window_demo.c
index 175d782..7beb330 100644
--- a/examples/pugl_window_demo.c
+++ b/examples/pugl_window_demo.c
@@ -142,7 +142,7 @@ onEvent(PuglView* view, const PuglEvent* event)
case PUGL_KEY_PRESS:
onKeyPress(view, &event->key);
break;
- case PUGL_MOTION_NOTIFY:
+ case PUGL_MOTION:
cube->xAngle -= event->motion.x - cube->lastMouseX;
cube->yAngle += event->motion.y - cube->lastMouseY;
cube->lastMouseX = event->motion.x;
@@ -153,11 +153,11 @@ onEvent(PuglView* view, const PuglEvent* event)
cube->dist = fmaxf(10.0f, cube->dist + (float)event->scroll.dy);
redisplayView(app, view);
break;
- case PUGL_ENTER_NOTIFY:
+ case PUGL_POINTER_IN:
cube->entered = true;
redisplayView(app, view);
break;
- case PUGL_LEAVE_NOTIFY:
+ case PUGL_POINTER_OUT:
cube->entered = false;
redisplayView(app, view);
break;