KWin
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Functions
xcbutils.h File Reference
#include "effect/globals.h"
#include "effect/xcb.h"
#include "main.h"
#include "utils/c_ptr.h"
#include "utils/version.h"
#include <QList>
#include <QRect>
#include <QRegion>
#include <xcb/composite.h>
#include <xcb/randr.h>
#include <xcb/xcb.h>
#include <xcb/shm.h>

Go to the source code of this file.

Classes

struct  KWin::Xcb::WrapperData< Reply, Cookie, Args >
 Variadic template to wrap an xcb request. More...
 
struct  KWin::Xcb::WrapperData< Reply, Cookie >
 Partial template specialization for WrapperData with no further arguments. More...
 
class  KWin::Xcb::AbstractWrapper< Data >
 Abstract base class for the wrapper. More...
 
struct  KWin::Xcb::tupleCompare< T1, T2, I >
 Template to compare the arguments of two std::tuple. More...
 
struct  KWin::Xcb::tupleCompare< T1, T2, 0 >
 Recursive template case for first tuple element. More...
 
class  KWin::Xcb::Wrapper< Data, Args >
 Wrapper taking a WrapperData as first template argument and xcb request args as variadic args. More...
 
class  KWin::Xcb::Wrapper< Data, xcb_window_t, Args... >
 Template specialization for xcb_window_t being first variadic argument. More...
 
class  KWin::Xcb::Wrapper< Data >
 Template specialization for no variadic arguments. More...
 
class  KWin::Xcb::Atom
 
class  KWin::Xcb::WindowGeometry
 
class  KWin::Xcb::Tree
 
struct  KWin::Xcb::CurrentInputData
 
class  KWin::Xcb::CurrentInput
 
struct  KWin::Xcb::QueryKeymapData
 
class  KWin::Xcb::QueryKeymap
 
struct  KWin::Xcb::ModifierMappingData
 
class  KWin::Xcb::ModifierMapping
 
class  KWin::Xcb::Property
 
class  KWin::Xcb::StringProperty
 
class  KWin::Xcb::TransientFor
 
class  KWin::Xcb::GeometryHints
 
struct  KWin::Xcb::GeometryHints::NormalHints::SizeHints
 
class  KWin::Xcb::MotifHints
 
class  KWin::Xcb::RandR::ScreenResources
 
class  KWin::Xcb::RandR::CrtcGamma
 
class  KWin::Xcb::RandR::CrtcInfo
 
class  KWin::Xcb::RandR::OutputInfo
 
class  KWin::Xcb::RandR::CurrentResources
 
class  KWin::Xcb::RandR::OutputProperty
 
class  KWin::Xcb::ExtensionData
 
class  KWin::Xcb::Extensions
 
class  KWin::Xcb::Window
 
class  KWin::Xcb::Shm
 Small helper class to encapsulate SHM related functionality. More...
 

Namespaces

namespace  KWin
 
namespace  KWin::Xcb
 
namespace  KWin::Xcb::RandR
 

Macros

#define XCB_WRAPPER_DATA(__NAME__, __REQUEST__, ...)
 Macro to create the WrapperData subclass.
 
#define XCB_WRAPPER(__NAME__, __REQUEST__, ...)
 Macro to create Wrapper typedef and WrapperData.
 

Typedefs

typedef xcb_window_t KWin::Xcb::WindowId
 

Functions

uint32_t KWin::Xcb::toXNative (qreal value)
 
QRect KWin::Xcb::toXNative (const QRectF &r)
 
qreal KWin::Xcb::fromXNative (int value)
 
QRectF KWin::Xcb::fromXNative (const QRect &r)
 
QSizeF KWin::Xcb::fromXNative (const QSize &s)
 
QRectF KWin::Xcb::nativeFloor (const QRectF &rect)
 

Macro Definition Documentation

◆ XCB_WRAPPER

#define XCB_WRAPPER ( __NAME__,
__REQUEST__,
... )
Value:
XCB_WRAPPER_DATA(__NAME__##Data, __REQUEST__, __VA_ARGS__) \
typedef Wrapper<__NAME__##Data, __VA_ARGS__> __NAME__;
#define XCB_WRAPPER_DATA(__NAME__, __REQUEST__,...)
Macro to create the WrapperData subclass.
Definition xcbutils.h:553

Macro to create Wrapper typedef and WrapperData.

This macro expands the XCB_WRAPPER_DATA macro and creates an additional typedef for Wrapper with name __NAME__. The created WrapperData is also derived from __NAME__ with "Data" as suffix.

Parameters
__NAME__The name for the Wrapper typedef
__REQUEST__The name of the xcb request, passed to XCB_WRAPPER_DATA
__VA_ARGS__The variadic template arguments for Wrapper and WrapperData
See also
XCB_WRAPPER_DATA

Definition at line 572 of file xcbutils.h.

◆ XCB_WRAPPER_DATA

#define XCB_WRAPPER_DATA ( __NAME__,
__REQUEST__,
... )
Value:
struct __NAME__ : public WrapperData<__REQUEST__##_reply_t, __REQUEST__##_cookie_t, __VA_ARGS__> \
{ \
static constexpr request_func requestFunc = &__REQUEST__##_unchecked; \
static constexpr reply_func replyFunc = &__REQUEST__##_reply; \
};

Macro to create the WrapperData subclass.

Creates a struct with name __NAME__ for the xcb request identified by __REQUEST__. The variadic arguments are used to pass as template arguments to the WrapperData.

The __REQUEST__ is the common prefix of the cookie type, reply type, request function and reply function. E.g. "xcb_get_geometry" is used to create:

  • cookie type xcb_get_geometry_cookie_t
  • reply type xcb_get_geometry_reply_t
  • request function pointer xcb_get_geometry_unchecked
  • reply function pointer xcb_get_geometry_reply
Parameters
__NAME__The name of the WrapperData subclass
__REQUEST__The name of the xcb request, e.g. xcb_get_geometry
__VA_ARGS__The variadic template arguments, e.g. xcb_drawable_t
See also
XCB_WRAPPER

Definition at line 553 of file xcbutils.h.