Changeset View
Changeset View
Standalone View
Standalone View
src/server/surface_interface_p.h
Show All 33 Lines | |||||
34 | 34 | | |||
35 | class IdleInhibitorInterface; | 35 | class IdleInhibitorInterface; | ||
36 | 36 | | |||
37 | class SurfaceInterface::Private : public Resource::Private | 37 | class SurfaceInterface::Private : public Resource::Private | ||
38 | { | 38 | { | ||
39 | public: | 39 | public: | ||
40 | struct State { | 40 | struct State { | ||
41 | QRegion damage = QRegion(); | 41 | QRegion damage = QRegion(); | ||
42 | QRegion bufferDamage = QRegion(); | ||||
42 | QRegion opaque = QRegion(); | 43 | QRegion opaque = QRegion(); | ||
43 | QRegion input = QRegion(); | 44 | QRegion input = QRegion(); | ||
44 | bool inputIsSet = false; | 45 | bool inputIsSet = false; | ||
45 | bool opaqueIsSet = false; | 46 | bool opaqueIsSet = false; | ||
46 | bool bufferIsSet = false; | 47 | bool bufferIsSet = false; | ||
47 | bool shadowIsSet = false; | 48 | bool shadowIsSet = false; | ||
48 | bool blurIsSet = false; | 49 | bool blurIsSet = false; | ||
49 | bool contrastIsSet = false; | 50 | bool contrastIsSet = false; | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 107 | private: | |||
107 | QMetaObject::Connection constrainsOneShotConnection; | 108 | QMetaObject::Connection constrainsOneShotConnection; | ||
108 | QMetaObject::Connection constrainsUnboundConnection; | 109 | QMetaObject::Connection constrainsUnboundConnection; | ||
109 | 110 | | |||
110 | SurfaceInterface *q_func() { | 111 | SurfaceInterface *q_func() { | ||
111 | return reinterpret_cast<SurfaceInterface *>(q); | 112 | return reinterpret_cast<SurfaceInterface *>(q); | ||
112 | } | 113 | } | ||
113 | void swapStates(State *source, State *target, bool emitChanged); | 114 | void swapStates(State *source, State *target, bool emitChanged); | ||
114 | void damage(const QRect &rect); | 115 | void damage(const QRect &rect); | ||
116 | void damageBuffer(const QRect &rect); | ||||
115 | void setScale(qint32 scale); | 117 | void setScale(qint32 scale); | ||
116 | void setTransform(OutputInterface::Transform transform); | 118 | void setTransform(OutputInterface::Transform transform); | ||
117 | void addFrameCallback(uint32_t callback); | 119 | void addFrameCallback(uint32_t callback); | ||
118 | void attachBuffer(wl_resource *buffer, const QPoint &offset); | 120 | void attachBuffer(wl_resource *buffer, const QPoint &offset); | ||
119 | void setOpaque(const QRegion ®ion); | 121 | void setOpaque(const QRegion ®ion); | ||
120 | void setInput(const QRegion ®ion, bool isInfinite); | 122 | void setInput(const QRegion ®ion, bool isInfinite); | ||
121 | 123 | | |||
122 | static void destroyFrameCallback(wl_resource *r); | 124 | static void destroyFrameCallback(wl_resource *r); | ||
123 | 125 | | |||
124 | static void attachCallback(wl_client *client, wl_resource *resource, wl_resource *buffer, int32_t sx, int32_t sy); | 126 | static void attachCallback(wl_client *client, wl_resource *resource, wl_resource *buffer, int32_t sx, int32_t sy); | ||
125 | static void damageCallback(wl_client *client, wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height); | 127 | static void damageCallback(wl_client *client, wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height); | ||
126 | static void frameCallback(wl_client *client, wl_resource *resource, uint32_t callback); | 128 | static void frameCallback(wl_client *client, wl_resource *resource, uint32_t callback); | ||
127 | static void opaqueRegionCallback(wl_client *client, wl_resource *resource, wl_resource *region); | 129 | static void opaqueRegionCallback(wl_client *client, wl_resource *resource, wl_resource *region); | ||
128 | static void inputRegionCallback(wl_client *client, wl_resource *resource, wl_resource *region); | 130 | static void inputRegionCallback(wl_client *client, wl_resource *resource, wl_resource *region); | ||
129 | static void commitCallback(wl_client *client, wl_resource *resource); | 131 | static void commitCallback(wl_client *client, wl_resource *resource); | ||
130 | // since version 2 | 132 | // since version 2 | ||
131 | static void bufferTransformCallback(wl_client *client, wl_resource *resource, int32_t transform); | 133 | static void bufferTransformCallback(wl_client *client, wl_resource *resource, int32_t transform); | ||
132 | // since version 3 | 134 | // since version 3 | ||
133 | static void bufferScaleCallback(wl_client *client, wl_resource *resource, int32_t scale); | 135 | static void bufferScaleCallback(wl_client *client, wl_resource *resource, int32_t scale); | ||
136 | // since version 4 | ||||
137 | static void damageBufferCallback(wl_client *client, wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height); | ||||
134 | 138 | | |||
135 | static const struct wl_surface_interface s_interface; | 139 | static const struct wl_surface_interface s_interface; | ||
136 | }; | 140 | }; | ||
137 | 141 | | |||
138 | } | 142 | } | ||
139 | } | 143 | } | ||
140 | 144 | | |||
141 | #endif | 145 | #endif |