From cc775983b62d7d6bee4ab73a09c101a40790947f Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 3 Dec 2002 17:06:49 +0000 Subject: FbWindow add and remove --- src/FbTk/EventManager.cc | 13 +++++++++++-- src/FbTk/EventManager.hh | 6 +++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/FbTk/EventManager.cc b/src/FbTk/EventManager.cc index 05d95c4..6d10b8d 100644 --- a/src/FbTk/EventManager.cc +++ b/src/FbTk/EventManager.cc @@ -19,9 +19,10 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: EventManager.cc,v 1.2 2002/12/01 13:42:14 rathnor Exp $ +// $Id: EventManager.cc,v 1.3 2002/12/03 17:06:49 fluxgen Exp $ #include "EventManager.hh" +#include "FbWindow.hh" #include using namespace std; @@ -41,7 +42,7 @@ EventManager::~EventManager() { void EventManager::handleEvent(XEvent &ev) { // find eventhandler for event window if (m_eventhandlers.find(ev.xany.window) == m_eventhandlers.end()) { - cerr<<"Can't find window="< namespace FbTk { +class FbWindow; + /** singleton mediator for EventHandlers */ @@ -34,6 +36,8 @@ public: static EventManager *instance(); void handleEvent(XEvent &ev); + void add(EventHandler &ev, const FbWindow &win); + void remove(const FbWindow &win); void add(EventHandler &ev, Window win) { registerEventHandler(ev, win); } void remove(Window win) { unregisterEventHandler(win); } void registerEventHandler(EventHandler &ev, Window win); -- cgit v0.11.2