KWin
|
#include <xcbutils.h>
Public Member Functions | |
Property () | |
Property (const Property &other) | |
Property (uint8_t _delete, xcb_window_t window, xcb_atom_t property, xcb_atom_t type, uint32_t long_offset, uint32_t long_length) | |
Property & | operator= (const Property &other) |
template<typename T > | |
std::enable_if<!std::is_pointer< T >::value, T >::type | value (T defaultValue=T(), bool *ok=nullptr) |
Overloaded method for convenience. | |
template<typename T > | |
std::enable_if<!std::is_pointer< T >::value, T >::type | value (uint8_t format, xcb_atom_t type, T defaultValue=T(), bool *ok=nullptr) |
Reads the property as a POD type. | |
template<typename T > | |
std::enable_if< std::is_pointer< T >::value, T >::type | value (T defaultValue=nullptr, bool *ok=nullptr) |
Overloaded method for convenience. | |
template<typename T > | |
std::enable_if< std::is_pointer< T >::value, T >::type | value (uint8_t format, xcb_atom_t type, T defaultValue=nullptr, bool *ok=nullptr) |
Reads the property as an array of T. | |
QByteArray | toByteArray (uint8_t format=8, xcb_atom_t type=XCB_ATOM_STRING, bool *ok=nullptr) |
Reads the property as string and returns a QByteArray. | |
QByteArray | toByteArray (bool *ok) |
Overloaded method for convenience. | |
bool | toBool (uint8_t format=32, xcb_atom_t type=XCB_ATOM_CARDINAL, bool *ok=nullptr) |
Reads the property as a boolean value. | |
bool | toBool (bool *ok) |
Overloaded method for convenience. | |
![]() | |
Wrapper ()=default | |
Wrapper (Args... args) | |
Wrapper (xcb_window_t w, Args... args) | |
![]() | |
virtual | ~AbstractWrapper () |
AbstractWrapper & | operator= (const AbstractWrapper &other) |
const Reply * | operator-> () |
bool | isNull () |
bool | isNull () const |
operator bool () | |
operator bool () const | |
const Reply * | data () |
const Reply * | data () const |
WindowId | window () const |
bool | isRetrieved () const |
Reply * | take () |
Additional Inherited Members | |
![]() | |
typedef Data::cookie_type | Cookie |
typedef Data::reply_type | Reply |
![]() | |
AbstractWrapper () | |
AbstractWrapper (WindowId window, Cookie cookie) | |
AbstractWrapper (const AbstractWrapper &other) | |
void | getReply () |
Definition at line 707 of file xcbutils.h.
|
inline |
Definition at line 710 of file xcbutils.h.
|
inline |
Definition at line 715 of file xcbutils.h.
|
inlineexplicit |
Definition at line 720 of file xcbutils.h.
Definition at line 725 of file xcbutils.h.
|
inline |
Overloaded method for convenience.
Definition at line 893 of file xcbutils.h.
|
inline |
Reads the property as a boolean value.
If the property reply length is 1
the first element is interpreted as a boolean value returning true
for any value unequal to 0
and false
otherwise.
In case of error this method returns false
. Thus it is not possible to distinguish between error case and a read false
value. Use the optional argument ok
to distinguish the error case.
format | Expected format. Defaults to 32. |
type | Expected type Defaults to XCB_ATOM_CARDINAL. |
ok | Set to false in case of error, true in case of success |
false
in error case Definition at line 876 of file xcbutils.h.
|
inline |
Overloaded method for convenience.
Definition at line 856 of file xcbutils.h.
|
inline |
Reads the property as string and returns a QByteArray.
In case of error this method returns a null QByteArray.
Definition at line 838 of file xcbutils.h.
|
inline |
Overloaded method for convenience.
Uses the type which got passed into the ctor and derives the format from the sizeof(T). Note: for the automatic format detection the size of the type T may not vary between architectures. Thus one needs to use e.g. uint32_t instead of long. In general all xcb data types can be used, all Xlib data types can not be used.
defaultValue | The default value to return in case of error |
ok | Set to false in case of error, true in case of success |
defaultValue
in error case Definition at line 785 of file xcbutils.h.
|
inline |
Overloaded method for convenience.
Uses the type which got passed into the ctor and derives the format from the sizeof(T). Note: for the automatic format detection the size of the type T may not vary between architectures. Thus one needs to use e.g. uint32_t instead of long. In general all xcb data types can be used, all Xlib data types can not be used.
defaultValue | The default value to return in case of error |
ok | Set to false in case of error, true in case of success |
defaultValue
in error case Definition at line 745 of file xcbutils.h.
|
inline |
Reads the property as an array of T.
This method is an overload for the case that T is a pointer type.
Return the property value casted to the pointer type T. In case of format
or type
mismatch the defaultValue
is returned. Also if the value length is 0
the defaultValue
is returned. The optional argument ok
is set to false
in case of error and to true
in case of successful reading of the property. Ok will always be true if the property exists and has been successfully read, even in the case the property is empty and its length is 0
format | The expected format of the property value, e.g. 32 for XCB_ATOM_CARDINAL |
type | The expected type of the property value, e.g. XCB_ATOM_CARDINAL |
defaultValue | The default value to return in case of error |
ok | Set to false in case of error, true in case of success |
defaultValue
in error case Definition at line 808 of file xcbutils.h.
|
inline |
Reads the property as a POD type.
Returns the first value of the property data. In case of format
or type
mismatch the defaultValue
is returned. The optional argument ok
is set to false
in case of error and to true
in case of successful reading of the property.
format | The expected format of the property value, e.g. 32 for XCB_ATOM_CARDINAL |
type | The expected type of the property value, e.g. XCB_ATOM_CARDINAL |
defaultValue | The default value to return in case of error |
ok | Set to false in case of error, true in case of success |
defaultValue
in error case Definition at line 764 of file xcbutils.h.