12 #include <gcursor.hpp>
52 bool isNative()
const {
return cursor_->nativecursor_;}
53 void touchDown(GTouch
const&);
54 void touchUp(GTouch
const&);
55 void touchMove(GTouch
const&);
58 void sendButtonEvent(
bool press);
62 friend class GTouchManager;
63 friend class GTouchPad;
65 GPoint mouse_, lastmouse_, locmouse_;
74 GTouchCursor& createCursor2(GColor& cursor_color);
75 GTouchCursor* cursor1() {
return curs1_;}
76 GTouchCursor* cursor2() {
return curs2_;}
79 friend class GTouchManager;
80 GTouchPad(GTouchDevice*,
bool nativecursor);
81 void touchCB(GTouch
const* touches,
int touchCount,
double timestamp);
82 GTouchDevice *device_{};
83 GTouchCursor *curs1_{}, *curs2_{};
90 static GTouchManager& instance();
94 size_t init(GWindow& window);
98 float mouseGain()
const {
return mousegain_;}
99 void setMouseGain(
float val) {mousegain_ = val;}
101 double timeResolution()
const {
return timeres_;}
102 void setTimeResolution(
double val) {timeres_ = val;}
110 GTouchPad* getPad(
unsigned int channel);
111 size_t padCount()
const {
return pads_.size();}
114 friend class GTouchPad;
115 friend class GTouchCursor;
118 GTouchManager(GTouchManager
const&) =
delete;
119 GTouchManager(GTouchManager
const&&) =
delete;
120 GTouchManager& operator=(GTouchManager
const&) =
delete;
121 GTouchManager& operator=(GTouchManager
const&&) =
delete;
123 GTouchCursor* addCursor(GColor&);
124 static void focusInWindowCB(GEvent&);
125 static void focusOutWindowCB(GEvent&);
126 static bool mouseButtonCB(GMouseEvent&);
127 static bool mouseMotionCB(GMouseEvent&);
128 static bool wheelCB(GMouseEvent&);
129 static int touchCB(GTouchDevice* d,
const GTouch* touches,
int touchcount,
130 double timestamp,
int frame);
135 std::vector<GTouchPad*> pads_;
136 std::vector<GTouchCursor*> cursors_;
137 GTouchCursor* nativecurs_{};