46 #include <QtCore/QUuid> 48 #if defined(QBBROOTWINDOW_DEBUG) 49 #include <QtCore/QDebug> 62 #if defined(QBBROOTWINDOW_DEBUG) 71 qFatal(
"QBBRootWindow: failed to create window, errno=%d",
errno);
77 result = screen_set_window_property_pv(
m_window, SCREEN_PROPERTY_DISPLAY, (
void **)&display);
79 qFatal(
"QBBRootWindow: failed to set window display, errno=%d",
errno);
87 result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_ZORDER, val);
89 qFatal(
"QBBRootWindow: failed to set window z-order, errno=%d",
errno);
95 val[0] = SCREEN_USAGE_NATIVE;
96 result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_USAGE, val);
98 qFatal(
"QBBRootWindow: failed to set window buffer usage, errno=%d",
errno);
103 result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_FORMAT, val);
105 qFatal(
"QBBRootWindow: failed to set window pixel format, errno=%d",
errno);
111 result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_BUFFER_SIZE, val);
113 qFatal(
"QBBRootWindow: failed to set window buffer size, errno=%d",
errno);
117 result = screen_create_window_buffers(
m_window, 1);
119 qFatal(
"QBB: failed to create window buffer, errno=%d",
errno);
125 val[0] = geometry.
width();
126 val[1] = geometry.
height();
127 result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_SIZE, val);
129 qFatal(
"QBBRootWindow: failed to set window size, errno=%d",
errno);
135 result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_COLOR, val);
137 qFatal(
"QBBRootWindow: failed to set window colour, errno=%d",
errno);
142 val[0] = SCREEN_TRANSPARENCY_NONE;
143 result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_TRANSPARENCY, val);
145 qFatal(
"QBBRootWindow: failed to set window transparency, errno=%d",
errno);
151 result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_SWAP_INTERVAL, val);
153 qFatal(
"QBBRootWindow: failed to set window swap interval, errno=%d",
errno);
158 val[0] = geometry.
width();
159 val[1] = geometry.
height();
160 result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_SOURCE_SIZE, val);
162 qFatal(
"QBBRootWindow: failed to set window source size, errno=%d",
errno);
168 result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_SOURCE_POSITION, val);
170 qFatal(
"QBBRootWindow: failed to set window source position, errno=%d",
errno);
185 #if defined(QBBROOTWINDOW_DEBUG) 189 screen_buffer_t buffer;
190 int result = screen_get_window_property_pv(
m_window, SCREEN_PROPERTY_RENDER_BUFFERS, (
void **)&buffer);
192 qFatal(
"QBBRootWindow: failed to query window buffer, errno=%d",
errno);
196 int dirtyRect[] = {0, 0, 1, 1};
197 result = screen_post_window(
m_window, buffer, 1, dirtyRect, 0);
199 qFatal(
"QBB: failed to post window buffer, errno=%d",
errno);
205 #if defined(QBBROOTWINDOW_DEBUG) 212 qFatal(
"QBBRootWindow: failed to flush context, errno=%d",
errno);
218 #if defined(QBBROOTWINDOW_DEBUG) 222 int result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_ROTATION, &rotation);
224 qFatal(
"QBBRootWindow: failed to set window rotation, errno=%d",
errno);
232 int result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_SIZE, val);
234 qFatal(
"QBBRootWindow: failed to set window size, errno=%d",
errno);
238 result = screen_set_window_property_iv(
m_window, SCREEN_PROPERTY_SOURCE_SIZE, val);
240 qFatal(
"QBBRootWindow: failed to set window source size, errno=%d",
errno);
255 qFatal(
"QBBRootWindow: failed to create app window group, errno=%d",
errno);
QByteArray m_windowGroupName
screen_context_t nativeContext() const
static QUuid createUuid()
On any platform other than Windows, this function returns a new UUID with variant QUuid::DCE and vers...
int width() const
Returns the width of the rectangle.
int height() const
Returns the height of the rectangle.
QString toString() const
Returns the string representation of this QUuid.
void resize(const QSize &size)
Q_CORE_EXPORT void qDebug(const char *,...)
int width() const
Returns the width.
Q_GUI_EXPORT EGLDisplay display()
virtual QRect geometry() const
Reimplement in subclass to return the pixel geometry of the screen.
const char * constData() const
Returns a pointer to the data stored in the byte array.
screen_display_t nativeDisplay() const
Q_CORE_EXPORT void qFatal(const char *,...)
QByteArray toAscii() const Q_REQUIRED_RESULT
Returns an 8-bit representation of the string as a QByteArray.
int height() const
Returns the height.
The QRect class defines a rectangle in the plane using integer precision.
void setRotation(int rotation)
The QSize class defines the size of a two-dimensional object using integer point precision.
QBBRootWindow(QBBScreen *screen)
static const int MAGIC_ZORDER_FOR_NO_NAV