Qt 4.8
Classes | Static Public Functions | List of all members
QWindowSystemInterface Class Reference

#include <qwindowsysteminterface_qpa.h>

Classes

struct  TouchPoint
 

Static Public Functions

static void handleCloseEvent (QWidget *w)
 
static void handleEnterEvent (QWidget *w)
 
static void handleExtendedKeyEvent (QWidget *w, QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text=QString(), bool autorep=false, ushort count=1)
 
static void handleExtendedKeyEvent (QWidget *w, ulong timestamp, QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text=QString(), bool autorep=false, ushort count=1)
 
static void handleGeometryChange (QWidget *w, const QRect &newRect)
 
static void handleKeyEvent (QWidget *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
 
static void handleKeyEvent (QWidget *w, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
 
static void handleLeaveEvent (QWidget *w)
 
static void handleLocaleChange ()
 
static void handleMouseEvent (QWidget *w, const QPoint &local, const QPoint &global, Qt::MouseButtons b)
 tlw == 0 means that ev is in global coords only More...
 
static void handleMouseEvent (QWidget *w, ulong timestamp, const QPoint &local, const QPoint &global, Qt::MouseButtons b)
 
static void handlePlatformPanelEvent (QWidget *w)
 
static void handleScreenAvailableGeometryChange (int screenIndex)
 
static void handleScreenCountChange (int count)
 
static void handleScreenGeometryChange (int screenIndex)
 
static void handleTouchEvent (QWidget *w, QEvent::Type type, QTouchEvent::DeviceType devType, const QList< struct TouchPoint > &points)
 
static void handleTouchEvent (QWidget *w, ulong timestamp, QEvent::Type type, QTouchEvent::DeviceType devType, const QList< struct TouchPoint > &points)
 
static void handleWheelEvent (QWidget *w, const QPoint &local, const QPoint &global, int d, Qt::Orientation o)
 
static void handleWheelEvent (QWidget *w, ulong timestamp, const QPoint &local, const QPoint &global, int d, Qt::Orientation o)
 
static void handleWindowActivated (QWidget *w)
 
static void handleWindowStateChanged (QWidget *w, Qt::WindowState newState)
 

Detailed Description

Definition at line 58 of file qwindowsysteminterface_qpa.h.

Functions

◆ handleCloseEvent()

void QWindowSystemInterface::handleCloseEvent ( QWidget w)
static

◆ handleEnterEvent()

void QWindowSystemInterface::handleEnterEvent ( QWidget w)
static

◆ handleExtendedKeyEvent() [1/2]

void QWindowSystemInterface::handleExtendedKeyEvent ( QWidget w,
QEvent::Type  type,
int  key,
Qt::KeyboardModifiers  modifiers,
quint32  nativeScanCode,
quint32  nativeVirtualKey,
quint32  nativeModifiers,
const QString text = QString(),
bool  autorep = false,
ushort  count = 1 
)
static

Definition at line 161 of file qwindowsysteminterface_qpa.cpp.

Referenced by QXlibKeyboard::handleKeyEvent(), QXcbKeyboard::handleKeyEvent(), and QBBScreenEventHandler::injectKeyboardEvent().

166 {
167  unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
168  handleExtendedKeyEvent(w, time, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers,
169  text, autorep, count);
170 }
int type
Definition: qmetatype.cpp:239
static void handleExtendedKeyEvent(QWidget *w, QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text=QString(), bool autorep=false, ushort count=1)
int elapsed() const
Returns the number of milliseconds that have elapsed since the last time start() or restart() was cal...
Definition: qdatetime.cpp:2123
int key

◆ handleExtendedKeyEvent() [2/2]

void QWindowSystemInterface::handleExtendedKeyEvent ( QWidget w,
ulong  timestamp,
QEvent::Type  type,
int  key,
Qt::KeyboardModifiers  modifiers,
quint32  nativeScanCode,
quint32  nativeVirtualKey,
quint32  nativeModifiers,
const QString text = QString(),
bool  autorep = false,
ushort  count = 1 
)
static

Definition at line 172 of file qwindowsysteminterface_qpa.cpp.

178 {
179  if (tlw) {
181  if (data->in_destructor)
182  tlw = 0;
183  }
184 
186  new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, type, key, modifiers,
187  nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count);
189 }
int type
Definition: qmetatype.cpp:239
static const char * data(const QByteArray &arr)
static void queueWindowSystemEvent(WindowSystemEvent *ev)
int key
uint in_destructor
Definition: qwidget.h:129
Q_GUI_EXPORT QWidgetData * qt_qwidget_data(QWidget *widget)
Definition: qwidget.cpp:12915

◆ handleGeometryChange()

void QWindowSystemInterface::handleGeometryChange ( QWidget w,
const QRect newRect 
)
static

◆ handleKeyEvent() [1/2]

void QWindowSystemInterface::handleKeyEvent ( QWidget w,
QEvent::Type  t,
int  k,
Qt::KeyboardModifiers  mods,
const QString text = QString(),
bool  autorep = false,
ushort  count = 1 
)
static

Definition at line 143 of file qwindowsysteminterface_qpa.cpp.

Referenced by buttonChange(), QDirectFbInput::handleKeyEvents(), QWaylandInputDevice::inputHandleKey(), QWSKeyboardHandler::processKeyEvent(), QOpenKODEWindow::processKeyEvents(), QVFbScreenKeyboardHandler::readKeyboardData(), and QBBButtonEventNotifier::updateButtonStates().

143  {
144  unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
145  handleKeyEvent(w, time, t, k, mods, text, autorep, count);
146 }
static void handleKeyEvent(QWidget *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
int elapsed() const
Returns the number of milliseconds that have elapsed since the last time start() or restart() was cal...
Definition: qdatetime.cpp:2123

◆ handleKeyEvent() [2/2]

void QWindowSystemInterface::handleKeyEvent ( QWidget w,
ulong  timestamp,
QEvent::Type  t,
int  k,
Qt::KeyboardModifiers  mods,
const QString text = QString(),
bool  autorep = false,
ushort  count = 1 
)
static

Definition at line 148 of file qwindowsysteminterface_qpa.cpp.

149 {
150  if (tlw) {
152  if (data->in_destructor)
153  tlw = 0;
154  }
155 
157  new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, t, k, mods, text, autorep, count);
159 }
static const char * data(const QByteArray &arr)
static void queueWindowSystemEvent(WindowSystemEvent *ev)
uint in_destructor
Definition: qwidget.h:129
Q_GUI_EXPORT QWidgetData * qt_qwidget_data(QWidget *widget)
Definition: qwidget.cpp:12915

◆ handleLeaveEvent()

void QWindowSystemInterface::handleLeaveEvent ( QWidget w)
static

◆ handleLocaleChange()

void QWindowSystemInterface::handleLocaleChange ( )
static

◆ handleMouseEvent() [1/2]

void QWindowSystemInterface::handleMouseEvent ( QWidget w,
const QPoint local,
const QPoint global,
Qt::MouseButtons  b 
)
static

tlw == 0 means that ev is in global coords only

Definition at line 126 of file qwindowsysteminterface_qpa.cpp.

Referenced by buttonChange(), QXcbWindow::handleMouseEvent(), QXlibWindow::handleMouseEvent(), QDirectFbInput::handleMouseEvents(), QBBScreenEventHandler::handlePointerEvent(), QBBScreenEventHandler::handleTouchEvent(), QBBScreenEventHandler::injectPointerMoveEvent(), QWaylandInputDevice::inputHandleButton(), QWaylandInputDevice::inputHandleMotion(), QOpenKODEWindow::processMouseEvents(), QTsLibMouseHandler::readMouseData(), QVFbScreenMouseHandler::readMouseData(), and QLinuxInputMouseHandler::sendMouseEvent().

126  {
127  unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
128  handleMouseEvent(w, time, local, global, b);
129 }
static void handleMouseEvent(QWidget *w, const QPoint &local, const QPoint &global, Qt::MouseButtons b)
tlw == 0 means that ev is in global coords only
int elapsed() const
Returns the number of milliseconds that have elapsed since the last time start() or restart() was cal...
Definition: qdatetime.cpp:2123

◆ handleMouseEvent() [2/2]

void QWindowSystemInterface::handleMouseEvent ( QWidget w,
ulong  timestamp,
const QPoint local,
const QPoint global,
Qt::MouseButtons  b 
)
static

Definition at line 131 of file qwindowsysteminterface_qpa.cpp.

132 {
133  if (tlw) {
135  if (data->in_destructor)
136  tlw = 0;
137  }
139  new QWindowSystemInterfacePrivate::MouseEvent(tlw, timestamp, local, global, b);
141 }
static const char * data(const QByteArray &arr)
static void queueWindowSystemEvent(WindowSystemEvent *ev)
uint in_destructor
Definition: qwidget.h:129
Q_GUI_EXPORT QWidgetData * qt_qwidget_data(QWidget *widget)
Definition: qwidget.cpp:12915

◆ handlePlatformPanelEvent()

void QWindowSystemInterface::handlePlatformPanelEvent ( QWidget w)
static

◆ handleScreenAvailableGeometryChange()

void QWindowSystemInterface::handleScreenAvailableGeometryChange ( int  screenIndex)
static

◆ handleScreenCountChange()

void QWindowSystemInterface::handleScreenCountChange ( int  count)
static

◆ handleScreenGeometryChange()

void QWindowSystemInterface::handleScreenGeometryChange ( int  screenIndex)
static

◆ handleTouchEvent() [1/2]

void QWindowSystemInterface::handleTouchEvent ( QWidget w,
QEvent::Type  type,
QTouchEvent::DeviceType  devType,
const QList< struct TouchPoint > &  points 
)
static

Definition at line 240 of file qwindowsysteminterface_qpa.cpp.

Referenced by QBBScreenEventHandler::handleTouchEvent(), and QLinuxInputMouseHandler::readMouseData().

240  {
241  unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
242  handleTouchEvent(w, time, type, devType, points);
243 }
int type
Definition: qmetatype.cpp:239
static void handleTouchEvent(QWidget *w, QEvent::Type type, QTouchEvent::DeviceType devType, const QList< struct TouchPoint > &points)
int elapsed() const
Returns the number of milliseconds that have elapsed since the last time start() or restart() was cal...
Definition: qdatetime.cpp:2123

◆ handleTouchEvent() [2/2]

void QWindowSystemInterface::handleTouchEvent ( QWidget w,
ulong  timestamp,
QEvent::Type  type,
QTouchEvent::DeviceType  devType,
const QList< struct TouchPoint > &  points 
)
static

Definition at line 245 of file qwindowsysteminterface_qpa.cpp.

246 {
247  if (!points.size()) // Touch events must have at least one point
248  return;
249 
250  QList<QTouchEvent::TouchPoint> touchPoints;
251  Qt::TouchPointStates states;
253 
256  while (point != end) {
257  p.setId(point->id);
258  p.setPressure(point->pressure);
259  states |= point->state;
260  Qt::TouchPointStates state = point->state;
261  if (point->isPrimary) {
262  state |= Qt::TouchPointPrimary;
263  }
264  p.setState(state);
265  p.setRect(point->area);
266  p.setScreenPos(point->area.center());
267  p.setNormalizedPos(point->normalPosition);
268 
269  touchPoints.append(p);
270  ++point;
271  }
272 
274  new QWindowSystemInterfacePrivate::TouchEvent(tlw, timestamp, type, devType, touchPoints);
276 }
void setScreenPos(const QPointF &screenPos)
Definition: qevent.cpp:4695
int type
Definition: qmetatype.cpp:239
void setRect(const QRectF &rect)
Definition: qevent.cpp:4775
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the list.
Definition: qlist.h:269
The QList::const_iterator class provides an STL-style const iterator for QList and QQueue...
Definition: qlist.h:228
void setNormalizedPos(const QPointF &normalizedPos)
Definition: qevent.cpp:4703
void setState(Qt::TouchPointStates state)
Definition: qevent.cpp:4671
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
static void queueWindowSystemEvent(WindowSystemEvent *ev)
void setId(int id)
Definition: qevent.cpp:4663
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
void setPressure(qreal pressure)
Definition: qevent.cpp:4799
The TouchPoint class provides information about a touch point in a QTouchEvent.
Definition: qevent.h:744
static const KeyPair *const end
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:272

◆ handleWheelEvent() [1/2]

void QWindowSystemInterface::handleWheelEvent ( QWidget w,
const QPoint local,
const QPoint global,
int  d,
Qt::Orientation  o 
)
static

Definition at line 191 of file qwindowsysteminterface_qpa.cpp.

Referenced by buttonChange(), QXcbWindow::handleButtonPressEvent(), QXlibWindow::handleMouseEvent(), QBBScreenEventHandler::handlePointerEvent(), QDirectFbInput::handleWheelEvent(), and QLinuxInputMouseHandler::readMouseData().

191  {
192  unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
193  handleWheelEvent(w, time, local, global, d, o);
194 }
double d
Definition: qnumeric_p.h:62
static void handleWheelEvent(QWidget *w, const QPoint &local, const QPoint &global, int d, Qt::Orientation o)
int elapsed() const
Returns the number of milliseconds that have elapsed since the last time start() or restart() was cal...
Definition: qdatetime.cpp:2123

◆ handleWheelEvent() [2/2]

void QWindowSystemInterface::handleWheelEvent ( QWidget w,
ulong  timestamp,
const QPoint local,
const QPoint global,
int  d,
Qt::Orientation  o 
)
static

Definition at line 196 of file qwindowsysteminterface_qpa.cpp.

197 {
198  if (tlw) {
200  if (data->in_destructor)
201  tlw = 0;
202  }
203 
205  new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, d, o);
207 }
double d
Definition: qnumeric_p.h:62
static const char * data(const QByteArray &arr)
static void queueWindowSystemEvent(WindowSystemEvent *ev)
uint in_destructor
Definition: qwidget.h:129
Q_GUI_EXPORT QWidgetData * qt_qwidget_data(QWidget *widget)
Definition: qwidget.cpp:12915

◆ handleWindowActivated()

void QWindowSystemInterface::handleWindowActivated ( QWidget w)
static

◆ handleWindowStateChanged()

void QWindowSystemInterface::handleWindowStateChanged ( QWidget w,
Qt::WindowState  newState 
)
static

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