-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0 Event API #564
2.0 Event API #564
Conversation
* @param event the received event. | ||
* @return true when the event was handled, false if not. | ||
* @version 1.0 | ||
*/ | ||
EQ_API virtual bool processEvent( const Event& event ); | ||
EQ_API virtual bool processEvent( EventType type, SizeEvent& event ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event object cannot be const-ref?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated doxygen to:
* The task of this method is to update the channel and event as necessary,
* and send it to the application using Config::sendEvent().
Aka there are use cases where the event is modified in place during processing, e.g., to set the originator ID to the channel id.
@@ -429,13 +376,19 @@ class Config : public fabric::Config< Server, Config, Observer, Layout, Canvas, | |||
LB_TIMEOUT_INDEFINITE ) const; | |||
|
|||
/** | |||
* Handle one config event. Thread safe. | |||
* Handle the given event. Thread safe. | |||
* | |||
* @param command the event command. | |||
* @return true if the event requires a redraw, false if not. | |||
* @version 1.5.1 | |||
*/ | |||
EQ_API virtual bool handleEvent( EventICommand command ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the generic EventICommand handleEvent something an application would need/want to use? Or the new funcs are enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for EVENT_USER or EVENT_OBSERVER_MOTION, which do not have a more specialized handleEvent( type, struct ).
EVENT_KEY_PRESS : EVENT_KEY_RELEASE; | ||
event.key = _getKey( deflectEvent.key ); | ||
channel.processEvent( type, event ); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even though that's what the old code was doing with 'break', I'm wondering it should be 'continue' to handle all pending events?
I'm finished with it literally. There seemed to be an amendment in the meantime, but I don't know what you changed there. You either tell me or make new commits to isolate those changes. |
No amendment yet, just rebased onto master. |
9185aaf
to
efa3411
Compare
19a8cf1
to
37ec582
Compare
7f6b4e4
to
7fcb167
Compare
Not sure it was mentioned why the Qt events have to be clone when reposted (better put it for later reference). |
PR contains two of my commits. Rebase again? |
+1 otherwise |
Retest this please. |
+1 again |
Review - do not merge yet