X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Froot.h;h=b0751b688985265d76566894c5dab694863ef5c5;hb=4b52d16bc895f9d969383d7a7d6a3558c1972cc5;hp=8e1bed9247e00bd2693bd9fe904ab16995591c9a;hpb=5791712b89bda9d70987592620c659b7b9f2435b;p=libs%2Fgltk.git diff --git a/source/root.h b/source/root.h index 8e1bed9..b0751b6 100644 --- a/source/root.h +++ b/source/root.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "panel.h" @@ -27,7 +28,9 @@ public: private: const Resources &resources; Input::Keyboard *keyboard; + InputMethod *input_method; Input::Mouse *mouse; + Input::Touchscreen *touchscreen; bool own_input; Label *lbl_tooltip; int pointer_x; @@ -44,7 +47,7 @@ public: /** Creates a Root widget with custom input devices. If window is not null, it is used to set the widget's initial geometry. */ - Root(const Resources &, Graphics::Window *, Input::Keyboard *, Input::Mouse *); + Root(const Resources &, Graphics::Window *, Input::Keyboard *, Input::Mouse *, Input::Touchscreen * = 0); private: void init(Graphics::Window *); public: @@ -63,11 +66,12 @@ private: bool button_press_event(unsigned); bool button_release_event(unsigned); bool axis_motion_event(unsigned, float, float); - bool key_press_event(unsigned); - bool key_release_event(unsigned); - bool character_event(StringCodec::unichar); + bool touch_press_event(unsigned); + bool touch_release_event(unsigned); + bool touch_motion_event(unsigned, float, float); void get_pointer(int &, int &); + void get_touch(unsigned, int &, int &); void update_camera(); virtual void on_geometry_change();