Qt 4.8
Public Functions | Static Public Functions | Static Private Functions | Properties | List of all members
QWaylandWindowManagerIntegration Class Reference

#include <qwaylandwindowmanagerintegration.h>

Public Functions

void authenticateWithToken (const QByteArray &token=QByteArray())
 
void mapClientToProcess (long long processId)
 
void mapSurfaceToProcess (struct wl_surface *surface, long long processId)
 
 QWaylandWindowManagerIntegration (QWaylandDisplay *waylandDisplay)
 
struct wl_windowmanager * windowManager () const
 
virtual ~QWaylandWindowManagerIntegration ()
 

Static Public Functions

static QWaylandWindowManagerIntegrationcreateIntegration (QWaylandDisplay *waylandDisplay)
 

Static Private Functions

static void wlHandleListenerGlobal (wl_display *display, uint32_t id, const char *interface, uint32_t version, void *data)
 

Properties

QWaylandDisplaymWaylandDisplay
 
struct wl_windowmanager * mWaylandWindowManager
 

Detailed Description

Definition at line 49 of file qwaylandwindowmanagerintegration.h.

Constructors and Destructors

◆ QWaylandWindowManagerIntegration()

QWaylandWindowManagerIntegration::QWaylandWindowManagerIntegration ( QWaylandDisplay waylandDisplay)
explicit

Definition at line 52 of file qwaylandwindowmanagerintegration.cpp.

Referenced by createIntegration().

53  : mWaylandDisplay(waylandDisplay)
55 {
56  wl_display_add_global_listener(mWaylandDisplay->wl_display(),
58  this);
59 }
static void wlHandleListenerGlobal(wl_display *display, uint32_t id, const char *interface, uint32_t version, void *data)
struct wl_display * wl_display() const

◆ ~QWaylandWindowManagerIntegration()

QWaylandWindowManagerIntegration::~QWaylandWindowManagerIntegration ( )
virtual

Definition at line 61 of file qwaylandwindowmanagerintegration.cpp.

62 {
63 
64 }

Functions

◆ authenticateWithToken()

void QWaylandWindowManagerIntegration::authenticateWithToken ( const QByteArray token = QByteArray())

Definition at line 85 of file qwaylandwindowmanagerintegration.cpp.

86 {
87  QByteArray authToken = token;
88  if (authToken.isEmpty())
89  authToken = qgetenv("WL_AUTHENTICATION_TOKEN");
91  wl_windowmanager_authenticate_with_token(mWaylandWindowManager, authToken.constData());
92 }
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
Definition: qbytearray.h:421

◆ createIntegration()

QWaylandWindowManagerIntegration * QWaylandWindowManagerIntegration::createIntegration ( QWaylandDisplay waylandDisplay)
static

Definition at line 47 of file qwaylandwindowmanagerintegration.cpp.

Referenced by QWaylandDisplay::QWaylandDisplay().

48 {
49  return new QWaylandWindowManagerIntegration(waylandDisplay);
50 }
QWaylandWindowManagerIntegration(QWaylandDisplay *waylandDisplay)

◆ mapClientToProcess()

void QWaylandWindowManagerIntegration::mapClientToProcess ( long long  processId)

Definition at line 79 of file qwaylandwindowmanagerintegration.cpp.

80 {
82  wl_windowmanager_map_client_to_process(mWaylandWindowManager, (uint32_t) processId);
83 }

◆ mapSurfaceToProcess()

void QWaylandWindowManagerIntegration::mapSurfaceToProcess ( struct wl_surface *  surface,
long long  processId 
)

◆ windowManager()

struct wl_windowmanager * QWaylandWindowManagerIntegration::windowManager ( ) const

Definition at line 66 of file qwaylandwindowmanagerintegration.cpp.

67 {
68  return mWaylandWindowManager;
69 }

◆ wlHandleListenerGlobal()

void QWaylandWindowManagerIntegration::wlHandleListenerGlobal ( wl_display *  display,
uint32_t  id,
const char *  interface,
uint32_t  version,
void *  data 
)
staticprivate

Definition at line 71 of file qwaylandwindowmanagerintegration.cpp.

Referenced by QWaylandWindowManagerIntegration().

72 {
73  if (strcmp(interface, "wl_windowmanager") == 0) {
75  integration->mWaylandWindowManager = wl_windowmanager_create(display, id);
76  }
77 }
Q_GUI_EXPORT EGLDisplay display()
Definition: qegl.cpp:589
static const char * data(const QByteArray &arr)

Properties

◆ mWaylandDisplay

QWaylandDisplay* QWaylandWindowManagerIntegration::mWaylandDisplay
private

Definition at line 66 of file qwaylandwindowmanagerintegration.h.

Referenced by QWaylandWindowManagerIntegration().

◆ mWaylandWindowManager

struct wl_windowmanager* QWaylandWindowManagerIntegration::mWaylandWindowManager
private

The documentation for this class was generated from the following files: