diff options
author | David Robillard <d@drobilla.net> | 2021-05-24 18:45:36 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-05-24 20:44:16 -0400 |
commit | 7c3aa758300b6dbcdbb7f287e70b071d90620baa (patch) | |
tree | 108ed1ed631b0459d1647fe6ac36a9bb8ca66df6 /examples | |
parent | dd0b921970c2024dc1de72b5b522884f0a2e7e52 (diff) | |
download | pugl-7c3aa758300b6dbcdbb7f287e70b071d90620baa.tar.gz pugl-7c3aa758300b6dbcdbb7f287e70b071d90620baa.tar.bz2 pugl-7c3aa758300b6dbcdbb7f287e70b071d90620baa.zip |
Add fancy constructor for C++ events and wrap puglSendEvent()
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pugl_cpp_demo.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/pugl_cpp_demo.cpp b/examples/pugl_cpp_demo.cpp index e49c416..552094f 100644 --- a/examples/pugl_cpp_demo.cpp +++ b/examples/pugl_cpp_demo.cpp @@ -66,7 +66,12 @@ CubeView::onEvent(const pugl::ConfigureEvent& event) noexcept pugl::Status CubeView::onEvent(const pugl::UpdateEvent&) noexcept { - return postRedisplay(); + // Normally, we would post a redisplay: + // return postRedisplay(); + + // But for testing, use sendEvent() instead: + return sendEvent( + pugl::ExposeEvent{0u, 0.0, 0.0, frame().width, frame().height}); } pugl::Status |