Changeset View
Changeset View
Standalone View
Standalone View
src/server/seat_interface_p.h
Show All 31 Lines | 27 | public: | |||
---|---|---|---|---|---|
32 | QVector<PointerInterface *> pointersForSurface(SurfaceInterface *surface) const; | 32 | QVector<PointerInterface *> pointersForSurface(SurfaceInterface *surface) const; | ||
33 | QVector<KeyboardInterface *> keyboardsForSurface(SurfaceInterface *surface) const; | 33 | QVector<KeyboardInterface *> keyboardsForSurface(SurfaceInterface *surface) const; | ||
34 | QVector<TouchInterface *> touchsForSurface(SurfaceInterface *surface) const; | 34 | QVector<TouchInterface *> touchsForSurface(SurfaceInterface *surface) const; | ||
35 | DataDeviceInterface *dataDeviceForSurface(SurfaceInterface *surface) const; | 35 | DataDeviceInterface *dataDeviceForSurface(SurfaceInterface *surface) const; | ||
36 | TextInputInterface *textInputForSurface(SurfaceInterface *surface) const; | 36 | TextInputInterface *textInputForSurface(SurfaceInterface *surface) const; | ||
37 | void registerDataDevice(DataDeviceInterface *dataDevice); | 37 | void registerDataDevice(DataDeviceInterface *dataDevice); | ||
38 | void registerTextInput(TextInputInterface *textInput); | 38 | void registerTextInput(TextInputInterface *textInput); | ||
39 | void endDrag(quint32 serial); | 39 | void endDrag(quint32 serial); | ||
40 | void cancelPreviousSelection(DataDeviceInterface *newlySelectedDataDevice); | | |||
41 | 40 | | |||
42 | QString name; | 41 | QString name; | ||
43 | bool pointer = false; | 42 | bool pointer = false; | ||
44 | bool keyboard = false; | 43 | bool keyboard = false; | ||
45 | bool touch = false; | 44 | bool touch = false; | ||
46 | QList<wl_resource*> resources; | 45 | QList<wl_resource*> resources; | ||
47 | quint32 timestamp = 0; | 46 | quint32 timestamp = 0; | ||
48 | QVector<PointerInterface*> pointers; | 47 | QVector<PointerInterface*> pointers; | ||
49 | QVector<KeyboardInterface*> keyboards; | 48 | QVector<KeyboardInterface*> keyboards; | ||
50 | QVector<TouchInterface*> touchs; | 49 | QVector<TouchInterface*> touchs; | ||
51 | QVector<DataDeviceInterface*> dataDevices; | 50 | QVector<DataDeviceInterface*> dataDevices; | ||
51 | | ||||
52 | QVector<TextInputInterface*> textInputs; | 52 | QVector<TextInputInterface*> textInputs; | ||
53 | DataDeviceInterface *currentSelection = nullptr; | 53 | | ||
54 | // the last thing copied into the clipboard content | ||||
55 | DataSourceInterface *currentSelection = nullptr; | ||||
54 | 56 | | |||
55 | // Pointer related members | 57 | // Pointer related members | ||
56 | struct Pointer { | 58 | struct Pointer { | ||
57 | enum class State { | 59 | enum class State { | ||
58 | Released, | 60 | Released, | ||
59 | Pressed | 61 | Pressed | ||
60 | }; | 62 | }; | ||
61 | QHash<quint32, quint32> buttonSerials; | 63 | QHash<quint32, quint32> buttonSerials; | ||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 161 | static SeatInterface *get(wl_resource *native) { | |||
160 | auto s = cast(native); | 162 | auto s = cast(native); | ||
161 | return s ? s->q : nullptr; | 163 | return s ? s->q : nullptr; | ||
162 | } | 164 | } | ||
163 | 165 | | |||
164 | private: | 166 | private: | ||
165 | void getPointer(wl_client *client, wl_resource *resource, uint32_t id); | 167 | void getPointer(wl_client *client, wl_resource *resource, uint32_t id); | ||
166 | void getKeyboard(wl_client *client, wl_resource *resource, uint32_t id); | 168 | void getKeyboard(wl_client *client, wl_resource *resource, uint32_t id); | ||
167 | void getTouch(wl_client *client, wl_resource *resource, uint32_t id); | 169 | void getTouch(wl_client *client, wl_resource *resource, uint32_t id); | ||
168 | void updateSelection(DataDeviceInterface *dataDevice, bool set); | 170 | void updateSelection(DataDeviceInterface *dataDevice); | ||
169 | static Private *cast(wl_resource *r); | 171 | static Private *cast(wl_resource *r); | ||
170 | static void unbind(wl_resource *r); | 172 | static void unbind(wl_resource *r); | ||
171 | 173 | | |||
172 | // interface | 174 | // interface | ||
173 | static void getPointerCallback(wl_client *client, wl_resource *resource, uint32_t id); | 175 | static void getPointerCallback(wl_client *client, wl_resource *resource, uint32_t id); | ||
174 | static void getKeyboardCallback(wl_client *client, wl_resource *resource, uint32_t id); | 176 | static void getKeyboardCallback(wl_client *client, wl_resource *resource, uint32_t id); | ||
175 | static void getTouchCallback(wl_client *client, wl_resource *resource, uint32_t id); | 177 | static void getTouchCallback(wl_client *client, wl_resource *resource, uint32_t id); | ||
176 | static void releaseCallback(wl_client *client, wl_resource *resource); | 178 | static void releaseCallback(wl_client *client, wl_resource *resource); | ||
Show All 12 Lines |