]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/mouse.h
Add decorations for things which should be exported from the library
[libs/gui.git] / source / input / mouse.h
index eb5e9d61a4a1da49fda275a4b0b3e21bcdeb1ae7..0f0013c3964417ecd11b9181945c0aeb9525ad57 100644 (file)
@@ -1,7 +1,9 @@
-#ifndef MSP_GBASE_MOUSE_H_
-#define MSP_GBASE_MOUSE_H_
+#ifndef MSP_INPUT_MOUSE_H_
+#define MSP_INPUT_MOUSE_H_
 
-#include <msp/gbase/window.h>
+#include <sigc++/trackable.h>
+#include <msp/graphics/mspgui_api.h>
+#include <msp/graphics/window.h>
 #include "device.h"
 
 namespace Msp {
@@ -13,19 +15,18 @@ uniform way.
 
 Note: Y axis grows upwards.
 */
-class Mouse: public Device
+class MSPGUI_API Mouse: public Device, public sigc::trackable
 {
 private:
-       Graphics::EventSource &source;
+       Graphics::Window &window;
 
 public:
-       Mouse(Graphics::EventSource &);
-       virtual std::string get_button_name(unsigned) const;
-       virtual std::string get_axis_name(unsigned) const;
+       Mouse(Graphics::Window &);
+
+       std::string get_button_name(unsigned) const override;
+       std::string get_axis_name(unsigned) const override;
 private:
-       void button_press(int, int, unsigned, unsigned);
-       void button_release(int, int, unsigned, unsigned);
-       void pointer_motion(int, int);
+       void input_event(const Graphics::Window::Event &);
 };
 
 } // namespace Input