KWin
|
#include <xcbutils.h>
Public Member Functions | |
Window (xcb_window_t window=XCB_WINDOW_NONE, bool destroy=true) | |
Window (const QRectF &geometry, uint32_t mask=0, const uint32_t *values=nullptr, xcb_window_t parent=rootWindow()) | |
Window (const QRectF &geometry, uint16_t windowClass, uint32_t mask=0, const uint32_t *values=nullptr, xcb_window_t parent=rootWindow()) | |
Window (const Window &other)=delete | |
~Window () | |
void | create (const QRectF &geometry, uint32_t mask=0, const uint32_t *values=nullptr, xcb_window_t parent=rootWindow()) |
void | create (const QRectF &geometry, uint16_t windowClass, uint32_t mask=0, const uint32_t *values=nullptr, xcb_window_t parent=rootWindow()) |
void | reset (xcb_window_t window=XCB_WINDOW_NONE, bool destroy=true) |
bool | isValid () const |
const QRectF & | geometry () const |
void | setGeometry (const QRectF &geometry) |
void | setGeometry (qreal x, qreal y, qreal width, qreal height) |
void | move (const QPointF &pos) |
void | move (qreal x, qreal y) |
void | resize (const QSizeF &size) |
void | resize (qreal width, qreal height) |
void | raise () |
void | lower () |
void | map () |
void | unmap () |
void | reparent (xcb_window_t parent, qreal x=0, qreal y=0) |
void | changeProperty (xcb_atom_t property, xcb_atom_t type, uint8_t format, uint32_t length, const void *data, uint8_t mode=XCB_PROP_MODE_REPLACE) |
void | deleteProperty (xcb_atom_t property) |
void | setBorderWidth (uint32_t width) |
void | grabButton (uint8_t pointerMode, uint8_t keyboardmode, uint16_t modifiers=XCB_MOD_MASK_ANY, uint8_t button=XCB_BUTTON_INDEX_ANY, uint16_t eventMask=XCB_EVENT_MASK_BUTTON_PRESS, xcb_window_t confineTo=XCB_WINDOW_NONE, xcb_cursor_t cursor=XCB_CURSOR_NONE, bool ownerEvents=false) |
void | ungrabButton (uint16_t modifiers=XCB_MOD_MASK_ANY, uint8_t button=XCB_BUTTON_INDEX_ANY) |
void | clear () |
void | setBackgroundPixmap (xcb_pixmap_t pixmap) |
void | defineCursor (xcb_cursor_t cursor) |
void | focus (uint8_t revertTo=XCB_INPUT_FOCUS_POINTER_ROOT, xcb_timestamp_t time=XCB_TIME_CURRENT_TIME) |
void | selectInput (uint32_t events) |
void | kill () |
operator xcb_window_t () const | |
This class is an RAII wrapper for an xcb_window_t. An xcb_window_t hold by an instance of this class will be freed when the instance gets destroyed.
Furthermore the class provides wrappers around some xcb methods operating on an xcb_window_t.
For the cases that one is more interested in wrapping the xcb methods the constructor which takes an existing window and the reset method allow to disable the RAII functionality.
Definition at line 1556 of file xcbutils.h.
|
inline |
Takes over responsibility of window
. If window
is not provided an invalid Window is created. Use create to set an xcb_window_t later on.
If destroy
is true
the window will be destroyed together with this object, if false
the window will be kept around. This is useful if you are not interested in the RAII capabilities but still want to use a window like an object.
window | The window to manage. |
destroy | Whether the window should be destroyed together with the object. |
Definition at line 1678 of file xcbutils.h.
|
inline |
Creates an xcb_window_t and manages it. It's a convenient method to create a window with depth, class and visual being copied from parent and border being 0
.
geometry | The geometry for the window to be created |
mask | The mask for the values |
values | The values to be passed to xcb_create_window |
parent | The parent window |
Definition at line 1684 of file xcbutils.h.
|
inline |
Creates an xcb_window_t and manages it. It's a convenient method to create a window with depth and visual being copied from parent and border being 0
.
geometry | The geometry for the window to be created |
windowClass | The window class |
mask | The mask for the values |
values | The values to be passed to xcb_create_window |
parent | The parent window |
Definition at line 1690 of file xcbutils.h.
|
delete |
|
inline |
Definition at line 1696 of file xcbutils.h.
|
inline |
Definition at line 1829 of file xcbutils.h.
|
inline |
Clears the window area. Same as xcb_clear_area with x, y, width, height being 0
.
Definition at line 1873 of file xcbutils.h.
|
inline |
Creates a new window for which the responsibility is taken over. If a window had been managed before it is freed.
Depth and visual are being copied from parent and border is 0
.
geometry | The geometry for the window to be created |
windowClass | The window class |
mask | The mask for the values |
values | The values to be passed to xcb_create_window |
parent | The parent window |
Definition at line 1720 of file xcbutils.h.
|
inline |
Creates a new window for which the responsibility is taken over. If a window had been managed before it is freed.
Depth, class and visual are being copied from parent and border is 0
.
geometry | The geometry for the window to be created |
mask | The mask for the values |
values | The values to be passed to xcb_create_window |
parent | The parent window |
Definition at line 1726 of file xcbutils.h.
|
inline |
Definition at line 1890 of file xcbutils.h.
|
inline |
Definition at line 1837 of file xcbutils.h.
|
inline |
Definition at line 1895 of file xcbutils.h.
|
inline |
Definition at line 1628 of file xcbutils.h.
|
inline |
Definition at line 1854 of file xcbutils.h.
|
inline |
true
if a window is managed, false
otherwise. Definition at line 1710 of file xcbutils.h.
|
inline |
Definition at line 1905 of file xcbutils.h.
|
inline |
Definition at line 1800 of file xcbutils.h.
|
inline |
Definition at line 1805 of file xcbutils.h.
|
inline |
Definition at line 1764 of file xcbutils.h.
|
inline |
Definition at line 1769 of file xcbutils.h.
|
inline |
Definition at line 1715 of file xcbutils.h.
|
inline |
Definition at line 1794 of file xcbutils.h.
|
inline |
Definition at line 1821 of file xcbutils.h.
|
inline |
Frees the existing window and starts to manage the new window
. If destroy
is true
the new managed window will be destroyed together with this object or when reset is called again. If destroy
is false
the window will not be destroyed. It is then the responsibility of the caller to destroy the window.
Definition at line 1741 of file xcbutils.h.
|
inline |
Definition at line 1778 of file xcbutils.h.
|
inline |
Definition at line 1783 of file xcbutils.h.
|
inline |
Definition at line 1900 of file xcbutils.h.
|
inline |
Definition at line 1881 of file xcbutils.h.
|
inline |
Definition at line 1845 of file xcbutils.h.
|
inline |
Configures the window with a new geometry.
geometry | The new window geometry to be used |
Definition at line 1748 of file xcbutils.h.
|
inline |
Definition at line 1753 of file xcbutils.h.
|
inline |
Definition at line 1865 of file xcbutils.h.
|
inline |
Definition at line 1813 of file xcbutils.h.