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

#include <qwaylandxcompositeeglintegration.h>

Inheritance diagram for QWaylandXCompositeEGLIntegration:
QWaylandGLIntegration

Public Functions

QWaylandWindowcreateEglWindow (QWidget *widget)
 
EGLDisplay eglDisplay () const
 
void initialize ()
 
 QWaylandXCompositeEGLIntegration (QWaylandDisplay *waylandDispaly)
 
Window rootWindow () const
 
int screen () const
 
QWaylandDisplaywaylandDisplay () const
 
struct wl_xcomposite * waylandXComposite () const
 
DisplayxDisplay () const
 
 ~QWaylandXCompositeEGLIntegration ()
 
- Public Functions inherited from QWaylandGLIntegration
 QWaylandGLIntegration ()
 
virtual ~QWaylandGLIntegration ()
 

Static Private Functions

static void rootInformation (void *data, struct wl_xcomposite *xcomposite, const char *display_name, uint32_t root_window)
 
static void wlDisplayHandleGlobal (struct wl_display *display, uint32_t id, const char *interface, uint32_t version, void *data)
 

Properties

DisplaymDisplay
 
EGLDisplay mEglDisplay
 
Window mRootWindow
 
int mScreen
 
struct wl_xcomposite * mWaylandComposite
 
QWaylandDisplaymWaylandDisplay
 

Static Private Attributes

static const struct wl_xcomposite_listener xcomposite_listener
 

Additional Inherited Members

- Static Public Functions inherited from QWaylandGLIntegration
static QWaylandGLIntegrationcreateGLIntegration (QWaylandDisplay *waylandDisplay)
 

Detailed Description

Definition at line 107 of file qwaylandxcompositeeglintegration.cpp.

Constructors and Destructors

◆ QWaylandXCompositeEGLIntegration()

QWaylandXCompositeEGLIntegration::QWaylandXCompositeEGLIntegration ( QWaylandDisplay waylandDispaly)

Definition at line 55 of file qwaylandxcompositeeglintegration.cpp.

57  , mWaylandDisplay(waylandDispaly)
58 {
59  qDebug() << "Using XComposite-EGL";
61  this);
62 }
static void wlDisplayHandleGlobal(struct wl_display *display, uint32_t id, const char *interface, uint32_t version, void *data)
Q_CORE_EXPORT void qDebug(const char *,...)
struct wl_display * wl_display() const

◆ ~QWaylandXCompositeEGLIntegration()

QWaylandXCompositeEGLIntegration::~QWaylandXCompositeEGLIntegration ( )

Definition at line 64 of file qwaylandxcompositeeglintegration.cpp.

65 {
66  XCloseDisplay(mDisplay);
67 }

Functions

◆ createEglWindow()

QWaylandWindow * QWaylandXCompositeEGLIntegration::createEglWindow ( QWidget widget)
virtual

Implements QWaylandGLIntegration.

Definition at line 73 of file qwaylandxcompositeeglintegration.cpp.

◆ eglDisplay()

EGLDisplay QWaylandXCompositeEGLIntegration::eglDisplay ( ) const

◆ initialize()

void QWaylandXCompositeEGLIntegration::initialize ( )
virtual

Implements QWaylandGLIntegration.

Definition at line 69 of file qwaylandxcompositeeglintegration.cpp.

70 {
71 }

◆ rootInformation()

void QWaylandXCompositeEGLIntegration::rootInformation ( void *  data,
struct wl_xcomposite *  xcomposite,
const char *  display_name,
uint32_t  root_window 
)
staticprivate

Definition at line 122 of file qwaylandxcompositeeglintegration.cpp.

123 {
124  Q_UNUSED(xcomposite);
126 
127  integration->mDisplay = XOpenDisplay(display_name);
128  integration->mRootWindow = (Window) root_window;
129  integration->mScreen = XDefaultScreen(integration->mDisplay);
130  integration->mEglDisplay = eglGetDisplay(integration->mDisplay);
131  eglBindAPI(EGL_OPENGL_ES_API);
132  EGLint minor,major;
133  if (!eglInitialize(integration->mEglDisplay,&major,&minor)) {
134  qFatal("Failed to initialize EGL");
135  }
136  eglSwapInterval(integration->eglDisplay(),0);
137  qDebug() << "ROOT INFORMATION" << integration->mDisplay << integration->mRootWindow << integration->mScreen;
138 }
Q_CORE_EXPORT void qDebug(const char *,...)
static const char * data(const QByteArray &arr)
Q_CORE_EXPORT void qFatal(const char *,...)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rootWindow()

Window QWaylandXCompositeEGLIntegration::rootWindow ( ) const

◆ screen()

int QWaylandXCompositeEGLIntegration::screen ( ) const

◆ waylandDisplay()

QWaylandDisplay * QWaylandXCompositeEGLIntegration::waylandDisplay ( ) const

◆ waylandXComposite()

wl_xcomposite * QWaylandXCompositeEGLIntegration::waylandXComposite ( ) const

Definition at line 102 of file qwaylandxcompositeeglintegration.cpp.

Referenced by QWaylandXCompositeEGLContext::geometryChanged().

103 {
104  return mWaylandComposite;
105 }

◆ wlDisplayHandleGlobal()

void QWaylandXCompositeEGLIntegration::wlDisplayHandleGlobal ( struct wl_display *  display,
uint32_t  id,
const char *  interface,
uint32_t  version,
void *  data 
)
staticprivate

Definition at line 111 of file qwaylandxcompositeeglintegration.cpp.

Referenced by QWaylandXCompositeEGLIntegration().

112 {
113  Q_UNUSED(version);
114  if (strcmp(interface, "wl_xcomposite") == 0) {
116  integration->mWaylandComposite = wl_xcomposite_create(display,id,1);
118  }
119 
120 }
static const struct wl_xcomposite_listener xcomposite_listener
Q_GUI_EXPORT EGLDisplay display()
Definition: qegl.cpp:589
static const char * data(const QByteArray &arr)
static struct wl_xcomposite * wl_xcomposite_create(struct wl_display *display, uint32_t id, uint32_t version)
static int wl_xcomposite_add_listener(struct wl_xcomposite *wl_xcomposite, const struct wl_xcomposite_listener *listener, void *data)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ xDisplay()

Display * QWaylandXCompositeEGLIntegration::xDisplay ( ) const

Properties

◆ mDisplay

Display* QWaylandXCompositeEGLIntegration::mDisplay
private

◆ mEglDisplay

EGLDisplay QWaylandXCompositeEGLIntegration::mEglDisplay
private

Definition at line 84 of file qwaylandxcompositeeglintegration.h.

Referenced by eglDisplay(), and rootInformation().

◆ mRootWindow

Window QWaylandXCompositeEGLIntegration::mRootWindow
private

Definition at line 86 of file qwaylandxcompositeeglintegration.h.

Referenced by rootInformation(), and rootWindow().

◆ mScreen

int QWaylandXCompositeEGLIntegration::mScreen
private

Definition at line 85 of file qwaylandxcompositeeglintegration.h.

Referenced by rootInformation(), and screen().

◆ mWaylandComposite

struct wl_xcomposite* QWaylandXCompositeEGLIntegration::mWaylandComposite
private

Definition at line 81 of file qwaylandxcompositeeglintegration.h.

Referenced by waylandXComposite(), and wlDisplayHandleGlobal().

◆ mWaylandDisplay

QWaylandDisplay* QWaylandXCompositeEGLIntegration::mWaylandDisplay
private

◆ xcomposite_listener

const struct wl_xcomposite_listener QWaylandXCompositeEGLIntegration::xcomposite_listener
staticprivate

Definition at line 91 of file qwaylandxcompositeeglintegration.h.

Referenced by wlDisplayHandleGlobal().


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