-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Both magellan events don't need an event type, since there is only one of them. Consistent with Statistic events, drop it.
- Loading branch information
Stefan Eilemann
authored and
Stefan Eilemann
committed
Jan 12, 2017
1 parent
0b1d510
commit 6a55ac1
Showing
27 changed files
with
130 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2007-2016, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2007-2017, Stefan Eilemann <[email protected]> | ||
* Cedric Stalder <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
|
@@ -501,15 +501,15 @@ void _magellanEventHandler( io_connect_t, natural_t messageType, | |
event.xRotation = -state->axis[3]; | ||
event.yRotation = state->axis[4]; | ||
event.zRotation = state->axis[5]; | ||
_magellanNode->processEvent( EVENT_MAGELLAN_AXIS, event ); | ||
_magellanNode->processEvent( event ); | ||
return; | ||
} | ||
|
||
case kConnexionCmdHandleButtons: | ||
{ | ||
ButtonEvent event; | ||
event.buttons = state->buttons; | ||
_magellanNode->processEvent( EVENT_MAGELLAN_BUTTON, event ); | ||
_magellanNode->processEvent( event ); | ||
return; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2005-2016, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2005-2017, Stefan Eilemann <[email protected]> | ||
* Cedric Stalder <cedric [email protected]> | ||
* Daniel Nachbaur <[email protected]> | ||
* | ||
|
@@ -388,8 +388,8 @@ class Config : public fabric::Config< Server, Config, Observer, Layout, Canvas, | |
EQ_API virtual bool handleEvent( EventType type, const SizeEvent& event ); | ||
EQ_API virtual bool handleEvent( EventType type, const PointerEvent& event); | ||
EQ_API virtual bool handleEvent( EventType type, const KeyEvent& event ); | ||
EQ_API virtual bool handleEvent( EventType type, const AxisEvent& event ); | ||
EQ_API virtual bool handleEvent( EventType type, const ButtonEvent& event ); | ||
EQ_API virtual bool handleEvent( const AxisEvent& event ); | ||
EQ_API virtual bool handleEvent( const ButtonEvent& event ); | ||
|
||
/** @return true if events are pending. Thread safe. @version 1.0 */ | ||
EQ_API bool checkEvent() const; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2006-2016, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2006-2017, Stefan Eilemann <[email protected]> | ||
* Daniel Nachbaur <[email protected]> | ||
* Cedric Stalder <[email protected]> | ||
* | ||
|
@@ -349,17 +349,15 @@ bool EventHandler::_processEvent( const XEvent& event ) | |
axisEvent.xRotation = -spev.motion.rx; | ||
axisEvent.yRotation = -spev.motion.ry; | ||
axisEvent.zRotation = spev.motion.rz; | ||
return _window->processEvent( EVENT_MAGELLAN_AXIS, event, | ||
axisEvent ); | ||
return _window->processEvent( event, axisEvent ); | ||
} | ||
|
||
case SPNAV_EVENT_BUTTON: | ||
{ | ||
ButtonEvent buttonEvent; | ||
buttonEvent.buttons = spev.button.press; | ||
buttonEvent.button = spev.button.bnum; | ||
return _window->processEvent( EVENT_MAGELLAN_BUTTON, event, | ||
buttonEvent ); | ||
return _window->processEvent( event, buttonEvent ); | ||
} | ||
|
||
default: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2005-2016, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2005-2017, Stefan Eilemann <[email protected]> | ||
* Daniel Nachbaur <[email protected]> | ||
* Maxim Makhinya | ||
* | ||
|
@@ -61,14 +61,12 @@ class WindowIF : public GLWindow | |
{ return GLWindow::processEvent( type, event ); } | ||
|
||
/** Process an axis event. @return true if the event was handled. */ | ||
virtual bool processEvent( EventType type, const XEvent&, | ||
AxisEvent& event ) | ||
{ return GLWindow::processEvent( type, event ); } | ||
virtual bool processEvent( const XEvent&, AxisEvent& event ) | ||
{ return GLWindow::processEvent( event ); } | ||
|
||
/** Process a button event. @return true if the event was handled. */ | ||
virtual bool processEvent( EventType type, const XEvent&, | ||
ButtonEvent& event ) | ||
{ return GLWindow::processEvent( type, event ); } | ||
virtual bool processEvent( const XEvent&, ButtonEvent& event ) | ||
{ return GLWindow::processEvent( event ); } | ||
|
||
/** Process a stateless event. @return true if the event was handled. */ | ||
virtual bool processEvent( EventType type, const XEvent& ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2005-2016, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2005-2017, Stefan Eilemann <[email protected]> | ||
* Cedric Stalder<[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
|
@@ -133,13 +133,12 @@ class Node : public fabric::Node< Config, Node, Pipe, NodeVisitor > | |
* The task of this method is to update the node as necessary, and send it | ||
* to the application using Config::sendEvent(). | ||
* | ||
* @param type unused | ||
* @param event the received event. | ||
* @return true if the event was handled, false if not. | ||
* @version 1.5.2 | ||
*/ | ||
EQ_API virtual bool processEvent( EventType type, AxisEvent& event ); | ||
EQ_API virtual bool processEvent( EventType type, ButtonEvent& event ); | ||
EQ_API virtual bool processEvent( AxisEvent& event ); | ||
EQ_API virtual bool processEvent( ButtonEvent& event ); | ||
EQ_API virtual bool processEvent( Statistic& event ); | ||
|
||
/** @internal @sa Serializable::setDirty() */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2014-2016, Daniel Nachbaur <[email protected]> | ||
/* Copyright (c) 2014-2017, Daniel Nachbaur <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License version 2.1 as published | ||
|
@@ -50,8 +50,8 @@ class NotifierInterface | |
virtual bool processEvent( EventType type, SizeEvent& event ) = 0; | ||
virtual bool processEvent( EventType type, PointerEvent& event ) = 0; | ||
virtual bool processEvent( EventType type, KeyEvent& event ) = 0; | ||
virtual bool processEvent( EventType type, AxisEvent& event ) = 0; | ||
virtual bool processEvent( EventType type, ButtonEvent& event ) = 0; | ||
virtual bool processEvent( AxisEvent& event ) = 0; | ||
virtual bool processEvent( ButtonEvent& event ) = 0; | ||
virtual bool processEvent( EventType type ) = 0; //!< stateless event | ||
}; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2005-2016, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2005-2017, Stefan Eilemann <[email protected]> | ||
* Daniel Nachbaur <[email protected]> | ||
* Maxim Makhinya | ||
* | ||
|
@@ -114,14 +114,14 @@ bool SystemWindow::processEvent( const EventType type, KeyEvent& event ) | |
return _parent.processEvent( type, event ); | ||
} | ||
|
||
bool SystemWindow::processEvent( EventType type, AxisEvent& event ) | ||
bool SystemWindow::processEvent( AxisEvent& event ) | ||
{ | ||
return _parent.processEvent( type, event ); | ||
return _parent.processEvent( event ); | ||
} | ||
|
||
bool SystemWindow::processEvent( EventType type, ButtonEvent& event ) | ||
bool SystemWindow::processEvent( ButtonEvent& event ) | ||
{ | ||
return _parent.processEvent( type, event ); | ||
return _parent.processEvent( event ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2005-2016, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2005-2017, Stefan Eilemann <[email protected]> | ||
* Daniel Nachbaur <[email protected]> | ||
* Maxim Makhinya | ||
* | ||
|
@@ -165,10 +165,10 @@ class SystemWindow | |
EQ_API bool processEvent( EventType type, KeyEvent& event ); | ||
|
||
/** Process an axis event. @return true if the event was handled. */ | ||
EQ_API bool processEvent( EventType type, AxisEvent& event ); | ||
EQ_API bool processEvent( AxisEvent& event ); | ||
|
||
/** Process a button event. @return true if the event was handled. */ | ||
EQ_API bool processEvent( EventType type, ButtonEvent& event ); | ||
EQ_API bool processEvent( ButtonEvent& event ); | ||
|
||
/** | ||
* Set the window's pixel viewport wrt its parent pipe. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2007-2016, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2007-2017, Stefan Eilemann <[email protected]> | ||
* Cedric Stalder <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
|
@@ -617,7 +617,7 @@ void EventHandler::_magellanEventHandler( LPARAM lParam ) | |
event.buttons |= PTR_BUTTON2; | ||
if( pRawHid->bRawData[3] ) | ||
event.buttons |= PTR_BUTTON3; | ||
_magellanNode->processEvent( EVENT_MAGELLAN_BUTTON, event ); | ||
_magellanNode->processEvent( event ); | ||
} | ||
else | ||
{ | ||
|
@@ -638,7 +638,7 @@ void EventHandler::_magellanEventHandler( LPARAM lParam ) | |
|
||
_magellanGotRotation = false; | ||
_magellanGotTranslation = false; | ||
_magellanNode->processEvent( EVENT_MAGELLAN_AXIS, event ); | ||
_magellanNode->processEvent( event ); | ||
} | ||
} | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2005-2016, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2005-2017, Stefan Eilemann <[email protected]> | ||
* Maxim Makhinya | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
|
@@ -67,12 +67,12 @@ class WindowIF : public GLWindow | |
{ return GLWindow::processEvent( type, event ); } | ||
|
||
/** Process an axis event. @return true if the event was handled. */ | ||
virtual bool processEvent( EventType type, AxisEvent& event ) | ||
{ return GLWindow::processEvent( type, event ); } | ||
virtual bool processEvent( AxisEvent& event ) | ||
{ return GLWindow::processEvent( event ); } | ||
|
||
/** Process a button event. @return true if the event was handled. */ | ||
virtual bool processEvent( EventType type, ButtonEvent& event ) | ||
{ return GLWindow::processEvent( type, event ); } | ||
virtual bool processEvent( ButtonEvent& event ) | ||
{ return GLWindow::processEvent( event ); } | ||
|
||
/** Process a stateless event. @return true if the event was handled. */ | ||
virtual bool processEvent( EventType ) { return false; } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2005-2016, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2005-2017, Stefan Eilemann <[email protected]> | ||
* Cedric Stalder <[email protected]> | ||
* Daniel Nachbaur <[email protected]> | ||
* | ||
|
@@ -797,19 +797,19 @@ bool Window::processEvent( const EventType type, KeyEvent& event ) | |
return true; | ||
} | ||
|
||
bool Window::processEvent( const EventType type, AxisEvent& event ) | ||
bool Window::processEvent( AxisEvent& event ) | ||
{ | ||
Config* config = getConfig(); | ||
updateEvent( event, config->getTime( )); | ||
config->sendEvent( type ) << event; | ||
config->sendEvent( EVENT_MAGELLAN_AXIS ) << event; | ||
return true; | ||
} | ||
|
||
bool Window::processEvent( const EventType type, ButtonEvent& event ) | ||
bool Window::processEvent( ButtonEvent& event ) | ||
{ | ||
Config* config = getConfig(); | ||
updateEvent( event, config->getTime( )); | ||
config->sendEvent( type ) << event; | ||
config->sendEvent( EVENT_MAGELLAN_BUTTON ) << event; | ||
return true; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* Copyright (c) 2005-2016, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2005-2017, Stefan Eilemann <[email protected]> | ||
* Cedric Stalder <[email protected]> | ||
* Daniel Nachbaur <[email protected]> | ||
* | ||
|
@@ -304,10 +304,10 @@ class Window : public fabric::Window< Pipe, Window, Channel, WindowSettings >, | |
EQ_API bool processEvent( EventType type, KeyEvent& event ) override; | ||
|
||
/** @sa NotifierInterface::processEvent(). */ | ||
EQ_API bool processEvent( EventType type, AxisEvent& event ) override; | ||
EQ_API bool processEvent( AxisEvent& event ) override; | ||
|
||
/** @sa NotifierInterface::processEvent(). */ | ||
EQ_API bool processEvent( EventType type, ButtonEvent& event ) override; | ||
EQ_API bool processEvent( ButtonEvent& event ) override; | ||
|
||
EQ_API bool processEvent( Statistic& event ); | ||
//@} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.