Mercurial > fife-parpg
comparison engine/core/eventchannel/eventchannel.i @ 157:bb9902910067
input_rework merged!
Bad features:
* Broken DND for zero-projekt.
* Design short-comings.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Tue, 14 Oct 2008 07:41:48 +0000 |
parents | 90005975cdbb |
children | 64738befdf3b |
comparison
equal
deleted
inserted
replaced
156:376b8afc9a18 | 157:bb9902910067 |
---|---|
27 #include "eventchannel/command/ec_commandids.h" | 27 #include "eventchannel/command/ec_commandids.h" |
28 #include "eventchannel/command/ec_icommandlistener.h" | 28 #include "eventchannel/command/ec_icommandlistener.h" |
29 #include "eventchannel/key/ec_key.h" | 29 #include "eventchannel/key/ec_key.h" |
30 #include "eventchannel/key/ec_keyevent.h" | 30 #include "eventchannel/key/ec_keyevent.h" |
31 #include "eventchannel/key/ec_ikeylistener.h" | 31 #include "eventchannel/key/ec_ikeylistener.h" |
32 #include "eventchannel/key/ec_ikeyfilter.h" | |
32 #include "eventchannel/source/ec_eventsourcetypes.h" | 33 #include "eventchannel/source/ec_eventsourcetypes.h" |
33 #include "eventchannel/source/ec_ieventsource.h" | 34 #include "eventchannel/source/ec_ieventsource.h" |
34 #include "eventchannel/mouse/ec_mouseevent.h" | 35 #include "eventchannel/mouse/ec_mouseevent.h" |
35 #include "eventchannel/mouse/ec_imouselistener.h" | 36 #include "eventchannel/mouse/ec_imouselistener.h" |
36 #include "eventchannel/widget/ec_widgetevent.h" | |
37 #include "eventchannel/widget/ec_iwidgetlistener.h" | |
38 #include "eventchannel/eventmanager.h" | 37 #include "eventchannel/eventmanager.h" |
39 %} | 38 %} |
40 | 39 |
41 %include "eventchannel/key/ec_key.h" | 40 %include "eventchannel/key/ec_key.h" |
42 %include "eventchannel/source/ec_eventsourcetypes.h" | 41 %include "eventchannel/source/ec_eventsourcetypes.h" |
166 virtual void mouseMoved(MouseEvent& evt) = 0; | 165 virtual void mouseMoved(MouseEvent& evt) = 0; |
167 virtual void mouseDragged(MouseEvent& evt) = 0; | 166 virtual void mouseDragged(MouseEvent& evt) = 0; |
168 virtual ~IMouseListener(); | 167 virtual ~IMouseListener(); |
169 }; | 168 }; |
170 | 169 |
171 class WidgetEvent: public Event { | 170 %feature("director") IKeyFilter; |
171 class IKeyFilter { | |
172 public: | 172 public: |
173 virtual const std::string& getId(); | 173 virtual bool isFiltered(const KeyEvent& evt) = 0; |
174 virtual ~WidgetEvent(); | 174 virtual ~IKeyFilter(); |
175 private: | |
176 WidgetEvent(); | |
177 }; | |
178 | |
179 %feature("director") IWidgetListener; | |
180 class IWidgetListener { | |
181 public: | |
182 virtual void onWidgetAction(WidgetEvent& evt) = 0; | |
183 virtual ~IWidgetListener(); | |
184 }; | 175 }; |
185 | 176 |
186 class EventManager { | 177 class EventManager { |
187 public: | 178 public: |
188 EventManager(); | 179 EventManager(); |
191 void removeCommandListener(ICommandListener* listener); | 182 void removeCommandListener(ICommandListener* listener); |
192 void addKeyListener(IKeyListener* listener); | 183 void addKeyListener(IKeyListener* listener); |
193 void removeKeyListener(IKeyListener* listener); | 184 void removeKeyListener(IKeyListener* listener); |
194 void addMouseListener(IMouseListener* listener); | 185 void addMouseListener(IMouseListener* listener); |
195 void removeMouseListener(IMouseListener* listener); | 186 void removeMouseListener(IMouseListener* listener); |
196 void addWidgetListener(IWidgetListener* listener); | |
197 void removeWidgetListener(IWidgetListener* listener); | |
198 EventSourceType getEventSourceType(); | 187 EventSourceType getEventSourceType(); |
199 void dispatchCommand(Command& command); | 188 void dispatchCommand(Command& command); |
200 void setNonConsumableKeys(const std::vector<int>& keys); | 189 void setKeyFilter(IKeyFilter* keyFilter); |
201 std::vector<int> getNonConsumableKeys(); | |
202 }; | 190 }; |
203 }; | 191 }; |