Skip to content
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

Merged
merged 2 commits into from
Oct 5, 2016
Merged

2.0 Event API #564

merged 2 commits into from
Oct 5, 2016

Conversation

eile
Copy link
Member

@eile eile commented Jun 15, 2016

Review - do not merge yet

* @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 );
Copy link
Member

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?

Copy link
Member Author

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.

eile added a commit that referenced this pull request Jun 15, 2016
@@ -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 );
Copy link
Member

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?

Copy link
Member Author

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;
Copy link
Member

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?

@tribal-tec
Copy link
Member

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.

@eile
Copy link
Member Author

eile commented Jun 15, 2016

No amendment yet, just rebased onto master.

@eile eile force-pushed the events branch 3 times, most recently from 9185aaf to efa3411 Compare June 17, 2016 14:46
@eile eile force-pushed the events branch 2 times, most recently from 19a8cf1 to 37ec582 Compare July 14, 2016 09:35
@eile eile force-pushed the events branch 4 times, most recently from 7f6b4e4 to 7fcb167 Compare August 16, 2016 14:50
@tribal-tec
Copy link
Member

Not sure it was mentioned why the Qt events have to be clone when reposted (better put it for later reference).
+1 otherwise, unless something is still missing/pending.

@tribal-tec
Copy link
Member

PR contains two of my commits. Rebase again?

@tribal-tec
Copy link
Member

+1 otherwise

@eile
Copy link
Member Author

eile commented Aug 30, 2016

Retest this please.

@tribal-tec
Copy link
Member

+1 again

@eile eile merged commit 7c0d7a9 into Eyescale:master Oct 5, 2016
@eile eile deleted the events branch October 5, 2016 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants