diff options
author | Yaniv Kamay <ykamay@redhat.com> | 2009-11-16 21:15:19 +0200 |
---|---|---|
committer | Yaniv Kamay <ykamay@redhat.com> | 2009-11-30 18:08:16 +0200 |
commit | 6f4736e08be2dfa7fec33d5bca56e33ae2f7af6f (patch) | |
tree | 6e033524cd399dbf8383f2c350ddbb6b016b4d96 /client/application.h | |
parent | 3b51087b3656b111886c7397d0ddd499a96f9e2d (diff) | |
download | spice-6f4736e08be2dfa7fec33d5bca56e33ae2f7af6f.tar.gz spice-6f4736e08be2dfa7fec33d5bca56e33ae2f7af6f.tar.xz spice-6f4736e08be2dfa7fec33d5bca56e33ae2f7af6f.zip |
client: split inputs handler
Diffstat (limited to 'client/application.h')
-rw-r--r-- | client/application.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/client/application.h b/client/application.h index 90d2fa33..5d5c1e87 100644 --- a/client/application.h +++ b/client/application.h @@ -109,6 +109,9 @@ typedef struct StickyInfo { AutoRef<StickyKeyTimer> timer; } StickyInfo; + +typedef std::list<KeyHandler*> KeyHandlersStack; + class Application : public ProcessLoop, public Platform::EventListener, public Platform::DisplayModeListner, @@ -119,8 +122,10 @@ public: int run(); - void set_inputs_handler(InputsHandler& handler); - void remove_inputs_handler(InputsHandler& handler); + void set_key_handler(KeyHandler& handler); + void remove_key_handler(KeyHandler& handler); + void set_mouse_handler(MouseHandler& handler); + void remove_mouse_handler(MouseHandler& handler); void capture_mouse(); void release_mouse_capture(); RedScreen* find_screen(int id); @@ -203,6 +208,7 @@ private: bool is_key_set_pressed(const HotkeySet& key_set); bool is_cad_pressed(); void do_on_key_up(RedKey key); + void __remove_key_handler(KeyHandler& handler); // returns the press value before operation (i.e., if it was already pressed) bool press_key(RedKey key); @@ -235,7 +241,9 @@ private: HotKeys _hot_keys; CommandsMap _commands_map; std::auto_ptr<GUILayer> _gui_layer; - InputsHandler* _inputs_handler; + KeyHandler* _key_handler; + KeyHandlersStack _key_handlers; + MouseHandler* _mouse_handler; const MonitorsList* _monitors; std::wstring _title; bool _splash_mode; |