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

#include <qxlibscreen.h>

Inheritance diagram for QXlibScreen:
QPlatformScreen QObject

Public Slots

void eventDispatcher ()
 
- Public Slots inherited from QObject
void deleteLater ()
 Schedules this object for deletion. More...
 

Public Functions

unsigned long blackPixel ()
 
Visual * defaultVisual () const
 
int depth () const
 Reimplement in subclass to return current depth of the screen. More...
 
QXlibDisplaydisplay () const
 
QImage::Format format () const
 Reimplement in subclass to return the image format which corresponds to the screen format. More...
 
QRect geometry () const
 Reimplement in subclass to return the pixel geometry of the screen. More...
 
QImage grabWindow (Window window, int x, int y, int w, int h)
 
bool handleEvent (XEvent *xe)
 
QXlibKeyboardkeyboard () const
 
QSize physicalSize () const
 Reimplement this function in subclass to return the physical size of the screen. More...
 
 QXlibScreen ()
 
Window rootWindow ()
 
bool waitForClipboardEvent (Window win, int type, XEvent *event, int timeout)
 
unsigned long whitePixel ()
 
int xScreenNumber () const
 
 ~QXlibScreen ()
 
- Public Functions inherited from QPlatformScreen
virtual QRect availableGeometry () const
 Reimplement in subclass to return the pixel geometry of the available space This normally is the desktop screen minus the task manager, global menubar etc. More...
 
virtual void setDirty (const QRect &)
 
virtual QWidgettopLevelAt (const QPoint &point) const
 Return the given top level widget for a given position. More...
 
virtual ~QPlatformScreen ()
 
- Public Functions inherited from QObject
bool blockSignals (bool b)
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More...
 
const QObjectListchildren () const
 Returns a list of child objects. More...
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectInfo ()
 Dumps information about signal connections, etc. More...
 
void dumpObjectTree ()
 Dumps a tree of children to the debug output. More...
 
QList< QByteArraydynamicPropertyNames () const
 Returns the names of all properties that were dynamically added to the object using setProperty(). More...
 
virtual bool event (QEvent *)
 This virtual function receives events to an object and should return true if the event e was recognized and processed. More...
 
virtual bool eventFilter (QObject *, QEvent *)
 Filters events if this object has been installed as an event filter for the watched object. More...
 
template<typename T >
findChild (const QString &aName=QString()) const
 Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More...
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. More...
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. More...
 
void installEventFilter (QObject *)
 Installs an event filter filterObj on this object. More...
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false. More...
 
void killTimer (int id)
 Kills the timer with timer identifier, id. More...
 
virtual const QMetaObjectmetaObject () const
 Returns a pointer to the meta-object of this object. More...
 
void moveToThread (QThread *thread)
 Changes the thread affinity for this object and its children. More...
 
QString objectName () const
 
QObjectparent () const
 Returns a pointer to the parent object. More...
 
QVariant property (const char *name) const
 Returns the value of the object's name property. More...
 
Q_INVOKABLE QObject (QObject *parent=0)
 Constructs an object with parent object parent. More...
 
void removeEventFilter (QObject *)
 Removes an event filter object obj from this object. More...
 
void setObjectName (const QString &name)
 
void setParent (QObject *)
 Makes the object a child of parent. More...
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value. More...
 
void setUserData (uint id, QObjectUserData *data)
 
bool signalsBlocked () const
 Returns true if signals are blocked; otherwise returns false. More...
 
int startTimer (int interval)
 Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More...
 
QThreadthread () const
 Returns the thread in which the object lives. More...
 
QObjectUserDatauserData (uint id) const
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects. More...
 

Static Public Functions

static QXlibScreentestLiteScreenForWidget (QWidget *widget)
 
- Static Public Functions inherited from QPlatformScreen
static QPlatformScreenplatformScreenForWidget (const QWidget *widget)
 
- Static Public Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More...
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 Disconnects signal in object sender from method in object receiver. More...
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 
static QString tr (const char *sourceText, const char *comment=0, int n=-1)
 
static QString trUtf8 (const char *sourceText, const char *comment=0, int n=-1)
 

Private Functions

void handleSelectionRequest (XEvent *event)
 

Properties

QXlibCursormCursor
 
int mDepth
 
QXlibDisplaymDisplay
 
QImage::Format mFormat
 
QRect mGeometry
 
QXlibKeyboardmKeyboard
 
QSize mPhysicalSize
 
int mScreen
 

Additional Inherited Members

- Signals inherited from QObject
void destroyed (QObject *=0)
 This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More...
 
- Static Public Variables inherited from QObject
static const QMetaObject staticMetaObject
 This variable stores the meta-object for the class. More...
 
- Protected Functions inherited from QObject
virtual void childEvent (QChildEvent *)
 This event handler can be reimplemented in a subclass to receive child events. More...
 
virtual void connectNotify (const char *signal)
 This virtual function is called when something has been connected to signal in this object. More...
 
virtual void customEvent (QEvent *)
 This event handler can be reimplemented in a subclass to receive custom events. More...
 
virtual void disconnectNotify (const char *signal)
 This virtual function is called when something has been disconnected from signal in this object. More...
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal. More...
 
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns 0. More...
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *)
 This event handler can be reimplemented in a subclass to receive timer events for the object. More...
 
- Protected Variables inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Static Protected Variables inherited from QObject
static const QMetaObject staticQtMetaObject
 

Detailed Description

Definition at line 54 of file qxlibscreen.h.

Constructors and Destructors

◆ QXlibScreen()

QXlibScreen::QXlibScreen ( )

Definition at line 192 of file qxlibscreen.cpp.

194 #if !defined(QT_NO_OPENGL) && defined(QT_OPENGL_ES_2)
195  , mEGLDisplay(0)
196 #endif
197 {
198  char *display_name = getenv("DISPLAY");
199  Display *display = XOpenDisplay(display_name);
200  mDisplay = new QXlibDisplay(display);
201 
202 
203 #ifndef DONT_USE_MIT_SHM
204  int MIT_SHM_extension_supported = XShmQueryExtension (mDisplay->nativeDisplay());
205  Q_ASSERT(MIT_SHM_extension_supported == True);
206 #endif
207  original_x_errhandler = XSetErrorHandler(qt_x_errhandler);
208 
209  if (qgetenv("DO_X_SYNCHRONIZE").toInt())
210  XSynchronize(mDisplay->nativeDisplay(), true);
211 
212  mScreen = DefaultScreen(mDisplay->nativeDisplay());
213  XSelectInput(mDisplay->nativeDisplay(),rootWindow(), KeymapStateMask | EnterWindowMask | LeaveWindowMask | PropertyChangeMask);
214  int width = DisplayWidth(mDisplay->nativeDisplay(), mScreen);
215  int height = DisplayHeight(mDisplay->nativeDisplay(), mScreen);
216  mGeometry = QRect(0,0,width,height);
217 
218  int physicalWidth = DisplayWidthMM(mDisplay->nativeDisplay(), mScreen);
219  int physicalHeight = DisplayHeightMM(mDisplay->nativeDisplay(), mScreen);
220  mPhysicalSize = QSize(physicalWidth,physicalHeight);
221 
222  int xSocketNumber = XConnectionNumber(mDisplay->nativeDisplay());
223 
224  mDepth = DefaultDepth(mDisplay->nativeDisplay(),mScreen);
225 #ifdef MYX11_DEBUG
226  qDebug() << "X socket:"<< xSocketNumber;
227 #endif
228  QSocketNotifier *sock = new QSocketNotifier(xSocketNumber, QSocketNotifier::Read, this);
229  connect(sock, SIGNAL(activated(int)), this, SLOT(eventDispatcher()));
230 
231  mCursor = new QXlibCursor(this);
232  mKeyboard = new QXlibKeyboard(this);
233 }
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
void eventDispatcher()
Window rootWindow()
Display * nativeDisplay() const
#define SLOT(a)
Definition: qobjectdefs.h:226
static int(* original_x_errhandler)(Display *dpy, XErrorEvent *)
Definition: qxlibscreen.cpp:61
QXlibCursor * mCursor
Definition: qxlibscreen.h:100
QRect mGeometry
Definition: qxlibscreen.h:96
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QSize mPhysicalSize
Definition: qxlibscreen.h:97
The QSocketNotifier class provides support for monitoring activity on a file descriptor.
Q_CORE_EXPORT void qDebug(const char *,...)
#define SIGNAL(a)
Definition: qobjectdefs.h:227
QXlibDisplay * mDisplay
Definition: qxlibscreen.h:103
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
static int toInt(const QByteArray &str)
Definition: generator.cpp:167
struct _XDisplay Display
Definition: qwindowdefs.h:115
static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
Definition: qxlibscreen.cpp:64
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
QXlibKeyboard * mKeyboard
Definition: qxlibscreen.h:101
QXlibDisplay * display() const
QImage::Format mFormat
Definition: qxlibscreen.h:99

◆ ~QXlibScreen()

QXlibScreen::~QXlibScreen ( )

Definition at line 235 of file qxlibscreen.cpp.

236 {
237  delete mCursor;
238  delete mDisplay;
239 }
QXlibCursor * mCursor
Definition: qxlibscreen.h:100
QXlibDisplay * mDisplay
Definition: qxlibscreen.h:103

Functions

◆ blackPixel()

unsigned long QXlibScreen::blackPixel ( )

Definition at line 246 of file qxlibscreen.cpp.

Referenced by QXlibClipboard::owner(), physicalSize(), QXlibWindow::QXlibWindow(), and QXlibClipboard::requestor().

247 {
248  return BlackPixel(mDisplay->nativeDisplay(), mScreen);
249 }
Display * nativeDisplay() const
QXlibDisplay * mDisplay
Definition: qxlibscreen.h:103

◆ defaultVisual()

Visual * QXlibScreen::defaultVisual ( ) const

Definition at line 471 of file qxlibscreen.cpp.

Referenced by physicalSize(), and QXlibWindow::QXlibWindow().

472 {
473  return DefaultVisual(display()->nativeDisplay(), xScreenNumber());
474 }
int xScreenNumber() const
Q_GUI_EXPORT EGLNativeDisplayType nativeDisplay()
Definition: qegl_qpa.cpp:55
QXlibDisplay * display() const

◆ depth()

int QXlibScreen::depth ( ) const
inlinevirtual

Reimplement in subclass to return current depth of the screen.

Implements QPlatformScreen.

Definition at line 63 of file qxlibscreen.h.

Referenced by QXlibWindow::correctColorBuffers(), and QXlibWindow::QXlibWindow().

63 { return mDepth; }

◆ display()

QXlibDisplay * QXlibScreen::display ( ) const

◆ eventDispatcher

void QXlibScreen::eventDispatcher ( )
slot

Definition at line 395 of file qxlibscreen.cpp.

Referenced by physicalSize(), and QXlibScreen().

396 {
397  ulong marker = XNextRequest(mDisplay->nativeDisplay());
398  // int i = 0;
399  while (XPending(mDisplay->nativeDisplay())) {
400  XEvent event;
401  XNextEvent(mDisplay->nativeDisplay(), &event);
402  /* done = */
403  handleEvent(&event);
404 
405  if (event.xany.serial >= marker) {
406  #ifdef MYX11_DEBUG
407  qDebug() << "potential livelock averted";
408  #endif
409  #if 0
410  if (XEventsQueued(mDisplay->nativeDisplay(), QueuedAfterFlush)) {
411  qDebug() << " with events queued";
413  }
414  #endif
415  break;
416  }
417  }
418 }
void eventDispatcher()
Display * nativeDisplay() const
#define SLOT(a)
Definition: qobjectdefs.h:226
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
Definition: qobject.cpp:1200
union _XEvent XEvent
Definition: qwindowdefs.h:116
Q_CORE_EXPORT void qDebug(const char *,...)
QXlibDisplay * mDisplay
Definition: qxlibscreen.h:103
unsigned long ulong
Definition: qglobal.h:997
bool handleEvent(XEvent *xe)
bool singleShot
This static function calls a slot after a given time interval.
Definition: qtimer.h:59

◆ format()

QImage::Format QXlibScreen::format ( ) const
inlinevirtual

Reimplement in subclass to return the image format which corresponds to the screen format.

Implements QPlatformScreen.

Definition at line 64 of file qxlibscreen.h.

64 { return mFormat; }
QImage::Format mFormat
Definition: qxlibscreen.h:99

◆ geometry()

QRect QXlibScreen::geometry ( ) const
inlinevirtual

Reimplement in subclass to return the pixel geometry of the screen.

Implements QPlatformScreen.

Definition at line 62 of file qxlibscreen.h.

62 { return mGeometry; }
QRect mGeometry
Definition: qxlibscreen.h:96

◆ grabWindow()

QImage QXlibScreen::grabWindow ( Window  window,
int  x,
int  y,
int  w,
int  h 
)

Definition at line 420 of file qxlibscreen.cpp.

Referenced by QXlibIntegration::grabWindow(), and physicalSize().

421 {
422  if (w == 0 || h ==0)
423  return QImage();
424 
425  //WinId 0 means the desktop widget
426  if (!window)
427  window = rootWindow();
428 
429  XWindowAttributes window_attr;
430  if (!XGetWindowAttributes(mDisplay->nativeDisplay(), window, &window_attr))
431  return QImage();
432 
433  if (w < 0)
434  w = window_attr.width - x;
435  if (h < 0)
436  h = window_attr.height - y;
437 
438  // Ideally, we should also limit ourselves to the screen area, but the Qt docs say
439  // that it's "unsafe" to go outside the screen, so we can ignore that problem.
440 
441  //We're definitely not optimizing for speed...
442  XImage *xi = XGetImage(mDisplay->nativeDisplay(), window, x, y, w, h, AllPlanes, ZPixmap);
443 
444  if (!xi)
445  return QImage();
446 
447  //taking a copy to make sure we have ownership -- not fast
448  QImage result = QImage( (uchar*) xi->data, xi->width, xi->height, xi->bytes_per_line, QImage::Format_RGB32 ).copy();
449 
450  XDestroyImage(xi);
451 
452  return result;
453 }
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
Definition: qimage.cpp:1410
Window rootWindow()
Display * nativeDisplay() const
unsigned char uchar
Definition: qglobal.h:994
NSWindow * window
QXlibDisplay * mDisplay
Definition: qxlibscreen.h:103
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87

◆ handleEvent()

bool QXlibScreen::handleEvent ( XEvent xe)

Definition at line 263 of file qxlibscreen.cpp.

Referenced by eventDispatcher(), physicalSize(), and waitForClipboardEvent().

264 {
265  int quit = false;
266  QXlibWindow *platformWindow = 0;
267  QWidget *widget = QWidget::find(xe->xany.window);
268  if (widget) {
269  platformWindow = static_cast<QXlibWindow *>(widget->platformWindow());
270  }
271 
274  switch (xe->type) {
275 
276  case ClientMessage:
277  if (xe->xclient.format == 32 && xe->xclient.message_type == wmProtocolsAtom) {
278  Atom a = xe->xclient.data.l[0];
279  if (a == wmDeleteWindowAtom)
280  platformWindow->handleCloseEvent();
281  }
282  break;
283 
284  case Expose:
285  if (platformWindow)
286  if (xe->xexpose.count == 0)
287  platformWindow->paintEvent();
288  break;
289  case ConfigureNotify:
290  if (platformWindow)
291  platformWindow->resizeEvent(&xe->xconfigure);
292  break;
293 
294  case ButtonPress:
295  if (platformWindow)
296  platformWindow->mousePressEvent(&xe->xbutton);
297  break;
298 
299  case ButtonRelease:
300  if (platformWindow)
301  platformWindow->handleMouseEvent(QEvent::MouseButtonRelease, &xe->xbutton);
302  break;
303 
304  case MotionNotify:
305  if (platformWindow)
306  platformWindow->handleMouseEvent(QEvent::MouseMove, &xe->xbutton);
307  break;
308 
309  case XKeyPress:
310  mKeyboard->handleKeyEvent(widget,QEvent::KeyPress, &xe->xkey);
311  break;
312 
313  case XKeyRelease:
314  mKeyboard->handleKeyEvent(widget,QEvent::KeyRelease, &xe->xkey);
315  break;
316 
317  case EnterNotify:
318  if (platformWindow)
319  platformWindow->handleEnterEvent();
320  break;
321 
322  case LeaveNotify:
323  if (platformWindow)
324  platformWindow->handleLeaveEvent();
325  break;
326 
327  case XFocusIn:
328  if (platformWindow)
329  platformWindow->handleFocusInEvent();
330  break;
331 
332  case XFocusOut:
333  if (platformWindow)
334  platformWindow->handleFocusOutEvent();
335  break;
336 
337  case PropertyNotify:
338  break;
339 
340  case SelectionClear:
341  qDebug() << "Selection Clear!!!";
342  break;
343  case SelectionRequest:
345  break;
346  case SelectionNotify:
347  qDebug() << "Selection Notify!!!!";
348 
349  break;
350 
351 
352  default:
353 #ifdef MYX11_DEBUG
354  qDebug() << hex << xe->xany.window << "Other X event" << xe->type;
355 #endif
356  break;
357  }
358 
359  return quit;
360 }
QPointer< QWidget > widget
void handleSelectionRequest(XEvent *event)
void paintEvent()
void handleMouseEvent(QEvent::Type, XButtonEvent *ev)
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
long ASN1_INTEGER_get ASN1_INTEGER * a
void resizeEvent(XConfigureEvent *configure_event)
void handleLeaveEvent()
void handleFocusInEvent()
Q_CORE_EXPORT QTextStream & hex(QTextStream &s)
void handleEnterEvent()
Q_CORE_EXPORT void qDebug(const char *,...)
void handleFocusOutEvent()
static QWidget * find(WId)
Returns a pointer to the widget with window identifer/handle id.
Definition: qwidget.cpp:2517
static Atom atom(X11Atom atom)
void handleCloseEvent()
QXlibKeyboard * mKeyboard
Definition: qxlibscreen.h:101
void handleKeyEvent(QWidget *widget, QEvent::Type type, XKeyEvent *ev)
void mousePressEvent(XButtonEvent *)

◆ handleSelectionRequest()

void QXlibScreen::handleSelectionRequest ( XEvent event)
private

Definition at line 481 of file qxlibscreen.cpp.

Referenced by handleEvent(), and physicalSize().

482 {
483  QPlatformIntegration *integration = QApplicationPrivate::platformIntegration();
484  QXlibClipboard *clipboard = static_cast<QXlibClipboard *>(integration->clipboard());
485  clipboard->handleSelectionRequest(event);
486 }
static QWaylandClipboard * clipboard
void handleSelectionRequest(XEvent *event)
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
Definition: qobject.cpp:1200
virtual QPlatformClipboard * clipboard() const
Accessor for the platform integrations clipboard.
The QPlatformIntegration class is the entry for WindowSystem specific functionality.

◆ keyboard()

QXlibKeyboard * QXlibScreen::keyboard ( ) const

Definition at line 476 of file qxlibscreen.cpp.

Referenced by QXlibWindow::handleMouseEvent(), and physicalSize().

477 {
478  return mKeyboard;
479 }
QXlibKeyboard * mKeyboard
Definition: qxlibscreen.h:101

◆ physicalSize()

QSize QXlibScreen::physicalSize ( ) const
inlinevirtual

Reimplement this function in subclass to return the physical size of the screen.

This function is used by QFont to convert point sizes to pixel sizes.

The default implementation takes the pixel size of the screen, considers a resolution of 100 dots per inch, and returns the calculated physical size. A device with a screen that has different resolutions will need to be supported by a suitable reimplementation of this function.

Reimplemented from QPlatformScreen.

Definition at line 65 of file qxlibscreen.h.

65 { return mPhysicalSize; }
QSize mPhysicalSize
Definition: qxlibscreen.h:97

◆ rootWindow()

Window QXlibScreen::rootWindow ( )

◆ testLiteScreenForWidget()

QXlibScreen * QXlibScreen::testLiteScreenForWidget ( QWidget widget)
static

Definition at line 455 of file qxlibscreen.cpp.

Referenced by QXlibWindowSurface::flush(), QXlibIntegration::grabWindow(), physicalSize(), and QXlibWindowSurface::resizeShmImage().

456 {
457  QPlatformScreen *platformScreen = platformScreenForWidget(widget);
458  return static_cast<QXlibScreen *>(platformScreen);
459 }
The QPlatformScreen class provides an abstraction for visual displays.
static QPlatformScreen * platformScreenForWidget(const QWidget *widget)

◆ waitForClipboardEvent()

bool QXlibScreen::waitForClipboardEvent ( Window  win,
int  type,
XEvent event,
int  timeout 
)

Definition at line 371 of file qxlibscreen.cpp.

Referenced by physicalSize().

372 {
374  timer.start();
375  do {
376  if (XCheckTypedWindowEvent(mDisplay->nativeDisplay(),win,type,event))
377  return true;
378 
379  // process other clipboard events, since someone is probably requesting data from us
380  XEvent e;
381  if (XCheckIfEvent(mDisplay->nativeDisplay(), &e, checkForClipboardEvents, 0))
382  handleEvent(&e);
383 
384  mDisplay->flush();
385 
386  // sleep 50 ms, so we don't use up CPU cycles all the time.
387  struct timeval usleep_tv;
388  usleep_tv.tv_sec = 0;
389  usleep_tv.tv_usec = 50000;
390  select(0, 0, 0, 0, &usleep_tv);
391  } while (timer.elapsed() < timeout);
392  return false;
393 }
int type
Definition: qmetatype.cpp:239
Display * nativeDisplay() const
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
EventLoopTimerRef timer
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
Definition: qobject.cpp:1200
The QElapsedTimer class provides a fast way to calculate elapsed times.
Definition: qelapsedtimer.h:53
qint64 elapsed() const
Returns the number of milliseconds since this QElapsedTimer was last started.
union _XEvent XEvent
Definition: qwindowdefs.h:116
QXlibDisplay * mDisplay
Definition: qxlibscreen.h:103
bool handleEvent(XEvent *xe)
void flush() const
static Bool checkForClipboardEvents(Display *, XEvent *e, XPointer)
void start()
Starts this timer.

◆ whitePixel()

unsigned long QXlibScreen::whitePixel ( )

Definition at line 251 of file qxlibscreen.cpp.

Referenced by QXlibClipboard::owner(), physicalSize(), QXlibWindow::QXlibWindow(), and QXlibClipboard::requestor().

252 {
253  return WhitePixel(mDisplay->nativeDisplay(), mScreen);
254 }
Display * nativeDisplay() const
QXlibDisplay * mDisplay
Definition: qxlibscreen.h:103

◆ xScreenNumber()

int QXlibScreen::xScreenNumber ( ) const

Definition at line 466 of file qxlibscreen.cpp.

Referenced by defaultVisual(), physicalSize(), QGLXContext::QGLXContext(), and QXlibWindow::QXlibWindow().

467 {
468  return mScreen;
469 }

Properties

◆ mCursor

QXlibCursor* QXlibScreen::mCursor
private

Definition at line 100 of file qxlibscreen.h.

Referenced by QXlibScreen(), and ~QXlibScreen().

◆ mDepth

int QXlibScreen::mDepth
private

Definition at line 98 of file qxlibscreen.h.

Referenced by depth(), and QXlibScreen().

◆ mDisplay

QXlibDisplay* QXlibScreen::mDisplay
private

◆ mFormat

QImage::Format QXlibScreen::mFormat
private

Definition at line 99 of file qxlibscreen.h.

Referenced by format().

◆ mGeometry

QRect QXlibScreen::mGeometry
private

Definition at line 96 of file qxlibscreen.h.

Referenced by geometry(), and QXlibScreen().

◆ mKeyboard

QXlibKeyboard* QXlibScreen::mKeyboard
private

Definition at line 101 of file qxlibscreen.h.

Referenced by handleEvent(), keyboard(), and QXlibScreen().

◆ mPhysicalSize

QSize QXlibScreen::mPhysicalSize
private

Definition at line 97 of file qxlibscreen.h.

Referenced by physicalSize(), and QXlibScreen().

◆ mScreen

int QXlibScreen::mScreen
private

Definition at line 107 of file qxlibscreen.h.

Referenced by blackPixel(), QXlibScreen(), rootWindow(), whitePixel(), and xScreenNumber().


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