]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/keyboard.cpp
Add EventSource abstraction layer below Window
[libs/gui.git] / source / input / keyboard.cpp
index cef812c1344d3cdfa5f2c7ef181caf43d29c7f1c..963a06266fd5a033f91e5e2d448e4968bbbf6c53 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of libmspgbase
-Copyright © 2007-2008  Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2008, 2010  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -20,15 +20,15 @@ Distributed under the LGPL
 namespace Msp {
 namespace Input {
 
-Keyboard::Keyboard(Graphics::Window &w):
-       window(w)
+Keyboard::Keyboard(Graphics::EventSource &s):
+       source(s)
 {
        name="Keyboard";
 
        buttons.resize(N_KEYS_, false);
 
-       window.signal_key_press.connect(sigc::mem_fun(this, &Keyboard::key_press));
-       window.signal_key_release.connect(sigc::mem_fun(this, &Keyboard::key_release));
+       source.signal_key_press.connect(sigc::mem_fun(this, &Keyboard::key_press));
+       source.signal_key_release.connect(sigc::mem_fun(this, &Keyboard::key_release));
 }
 
 std::string Keyboard::get_button_name(unsigned btn) const