X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Froot.h;h=b0751b688985265d76566894c5dab694863ef5c5;hb=4b52d16bc895f9d969383d7a7d6a3558c1972cc5;hp=b79bca367d3e22c51ca3c86ad61bf6683728337e;hpb=2b1a962fba03a01d641f5b6e2b8d75c6e71e2d40;p=libs%2Fgltk.git diff --git a/source/root.h b/source/root.h index b79bca3..b0751b6 100644 --- a/source/root.h +++ b/source/root.h @@ -3,9 +3,11 @@ #include #include +#include #include #include #include +#include #include #include "panel.h" @@ -26,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; @@ -34,6 +38,7 @@ private: Time::TimeStamp tooltip_timeout; Widget *tooltip_target; Msp::GL::Camera camera; + Msp::GL::Program *shprog; public: /** Creates a Root widget for a window. The geometry is set to match the @@ -42,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: @@ -61,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();