Changeset View
Changeset View
Standalone View
Standalone View
src/server/surfacerole_p.h
Show All 13 Lines | |||||
14 | namespace Server | 14 | namespace Server | ||
15 | { | 15 | { | ||
16 | 16 | | |||
17 | class SurfaceInterface; | 17 | class SurfaceInterface; | ||
18 | 18 | | |||
19 | class SurfaceRole | 19 | class SurfaceRole | ||
20 | { | 20 | { | ||
21 | public: | 21 | public: | ||
22 | explicit SurfaceRole(); | ||||
22 | explicit SurfaceRole(SurfaceInterface *surface); | 23 | explicit SurfaceRole(SurfaceInterface *surface); | ||
23 | virtual ~SurfaceRole(); | 24 | virtual ~SurfaceRole(); | ||
24 | 25 | | |||
26 | const QPointer<SurfaceInterface> &surface() const | ||||
27 | { | ||||
28 | return m_surface; | ||||
29 | } | ||||
30 | | ||||
31 | void setSurface(SurfaceInterface *surface); | ||||
32 | | ||||
25 | virtual void commit() = 0; | 33 | virtual void commit() = 0; | ||
26 | 34 | | |||
27 | private: | 35 | private: | ||
28 | QPointer<SurfaceInterface> m_surface; | 36 | QPointer<SurfaceInterface> m_surface; | ||
29 | 37 | | |||
30 | Q_DISABLE_COPY(SurfaceRole) | 38 | Q_DISABLE_COPY(SurfaceRole) | ||
31 | }; | 39 | }; | ||
32 | 40 | | |||
33 | } | 41 | } | ||
34 | } | 42 | } | ||
35 | 43 | | |||
36 | #endif // KWAYLAND_SERVER_SURFACEROLE_P_H | 44 | #endif // KWAYLAND_SERVER_SURFACEROLE_P_H |