Changeset View
Changeset View
Standalone View
Standalone View
toplevel.h
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | |||||
66 | 66 | | |||
67 | class KWIN_EXPORT Toplevel | 67 | class KWIN_EXPORT Toplevel | ||
68 | : public QObject | 68 | : public QObject | ||
69 | { | 69 | { | ||
70 | Q_OBJECT | 70 | Q_OBJECT | ||
71 | 71 | | |||
72 | Q_PROPERTY(bool alpha READ hasAlpha NOTIFY hasAlphaChanged) | 72 | Q_PROPERTY(bool alpha READ hasAlpha NOTIFY hasAlphaChanged) | ||
73 | Q_PROPERTY(qulonglong frameId READ frameId) | 73 | Q_PROPERTY(qulonglong frameId READ frameId) | ||
74 | Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged) | 74 | | ||
75 | /** | ||||
76 | * This property holds the geometry of the Toplevel, excluding invisible | ||||
77 | * portions, e.g. client-side and server-side drop-shadows, etc. | ||||
78 | * | ||||
79 | * @deprecated Use frameGeometry property instead. | ||||
80 | */ | ||||
81 | Q_PROPERTY(QRect geometry READ frameGeometry NOTIFY geometryChanged) | ||||
82 | | ||||
83 | /** | ||||
84 | * This property holds the geometry of the Toplevel, excluding invisible | ||||
85 | * portions, e.g. server-side and client-side drop-shadows, etc. | ||||
86 | */ | ||||
87 | Q_PROPERTY(QRect frameGeometry READ frameGeometry NOTIFY geometryChanged) | ||||
88 | | ||||
75 | Q_PROPERTY(QRect visibleRect READ visibleRect) | 89 | Q_PROPERTY(QRect visibleRect READ visibleRect) | ||
76 | Q_PROPERTY(int height READ height) | 90 | Q_PROPERTY(int height READ height) | ||
77 | Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged) | 91 | Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged) | ||
78 | Q_PROPERTY(QPoint pos READ pos) | 92 | Q_PROPERTY(QPoint pos READ pos) | ||
79 | Q_PROPERTY(int screen READ screen NOTIFY screenChanged) | 93 | Q_PROPERTY(int screen READ screen NOTIFY screenChanged) | ||
80 | Q_PROPERTY(QSize size READ size) | 94 | Q_PROPERTY(QSize size READ size) | ||
81 | Q_PROPERTY(int width READ width) | 95 | Q_PROPERTY(int width READ width) | ||
82 | Q_PROPERTY(qulonglong windowId READ windowId CONSTANT) | 96 | Q_PROPERTY(qulonglong windowId READ windowId CONSTANT) | ||
▲ Show 20 Lines • Show All 173 Lines • ▼ Show 20 Line(s) | |||||
256 | public: | 270 | public: | ||
257 | explicit Toplevel(); | 271 | explicit Toplevel(); | ||
258 | virtual xcb_window_t frameId() const; | 272 | virtual xcb_window_t frameId() const; | ||
259 | xcb_window_t window() const; | 273 | xcb_window_t window() const; | ||
260 | /** | 274 | /** | ||
261 | * @return a unique identifier for the Toplevel. On X11 same as @ref window | 275 | * @return a unique identifier for the Toplevel. On X11 same as @ref window | ||
262 | */ | 276 | */ | ||
263 | virtual quint32 windowId() const; | 277 | virtual quint32 windowId() const; | ||
264 | QRect geometry() const; | 278 | /** | ||
279 | * Returns the geometry of the Toplevel, excluding invisible portions, e.g. | ||||
280 | * server-side and client-side drop shadows, etc. | ||||
281 | */ | ||||
282 | QRect frameGeometry() const; | ||||
265 | /** | 283 | /** | ||
266 | * The geometry of the Toplevel which accepts input events. This might be larger | 284 | * The geometry of the Toplevel which accepts input events. This might be larger | ||
267 | * than the actual geometry, e.g. to support resizing outside the window. | 285 | * than the actual geometry, e.g. to support resizing outside the window. | ||
268 | * | 286 | * | ||
269 | * Default implementation returns same as geometry. | 287 | * Default implementation returns same as geometry. | ||
270 | */ | 288 | */ | ||
271 | virtual QRect inputGeometry() const; | 289 | virtual QRect inputGeometry() const; | ||
272 | QSize size() const; | 290 | QSize size() const; | ||
▲ Show 20 Lines • Show All 391 Lines • ▼ Show 20 Line(s) | |||||
664 | } | 682 | } | ||
665 | 683 | | |||
666 | inline void Toplevel::setWindowHandles(xcb_window_t w) | 684 | inline void Toplevel::setWindowHandles(xcb_window_t w) | ||
667 | { | 685 | { | ||
668 | Q_ASSERT(!m_client.isValid() && w != XCB_WINDOW_NONE); | 686 | Q_ASSERT(!m_client.isValid() && w != XCB_WINDOW_NONE); | ||
669 | m_client.reset(w, false); | 687 | m_client.reset(w, false); | ||
670 | } | 688 | } | ||
671 | 689 | | |||
672 | inline QRect Toplevel::geometry() const | 690 | inline QRect Toplevel::frameGeometry() const | ||
673 | { | 691 | { | ||
674 | return geom; | 692 | return geom; | ||
675 | } | 693 | } | ||
676 | 694 | | |||
677 | inline QSize Toplevel::size() const | 695 | inline QSize Toplevel::size() const | ||
678 | { | 696 | { | ||
679 | return geom.size(); | 697 | return geom.size(); | ||
680 | } | 698 | } | ||
▲ Show 20 Lines • Show All 285 Lines • Show Last 20 Lines |