47 #include <QWindowSystemInterface> 48 #include <QMouseEvent> 57 , m_dfbDisplayLayer(dfbLayer)
62 DirectFBError(
"Failed to initialise eventbuffer", ok);
84 res = window->GetID(window, &
id);
86 DirectFBError(
"QDirectFbInput::addWindow", res);
99 res = window->GetID(window, &
id);
101 DirectFBError(
"QDirectFbInput::removeWindow", res);
112 while(hasEvent == DFB_OK){
116 DirectFBError(
"Failed to get event",ok);
117 if (event.clazz == DFEC_WINDOW) {
118 switch (event.window.type) {
119 case DWET_BUTTONDOWN:
146 QPoint p(event.window.x, event.window.y);
152 layer->GetWindow(layer.
data(),
event.window.window_id, window.
outPtr());
154 long timestamp = (
event.window.timestamp.tv_sec*1000) + (event.window.timestamp.tv_usec/1000);
162 QPoint p(event.window.cx, event.window.cy);
164 long timestamp = (
event.window.timestamp.tv_sec*1000) + (event.window.timestamp.tv_usec/1000);
167 event.window.step*120,
177 long timestamp = (
event.window.timestamp.tv_sec*1000) + (event.window.timestamp.tv_usec/1000);
180 if (DFB_KEY_TYPE(event.window.key_symbol) == DIKT_UNICODE)
181 character =
QChar(event.window.key_symbol);
189 switch (event.window.type) {
206 window->GetPosition(window.
data(), &x, &y);
207 return QPoint(event.window.cx +x, event.window.cy + y);
#define QT_END_NAMESPACE
This macro expands to.
static IDirectFBDisplayLayer * dfbDisplayLayer(int display=DLID_PRIMARY)
int remove(const Key &key)
Removes all the items that have the key from the hash.
T * data() const
Returns the value of the pointer referenced by this object.
static void handleWheelEvent(QWidget *w, const QPoint &local, const QPoint &global, int d, Qt::Orientation o)
static QDirectFbKeyMap * keyMap()
static Qt::MouseButtons buttons
static void handleKeyEvent(QWidget *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
static QEvent::Type eventType(DFBWindowEventType type)
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
The QChar class provides a 16-bit Unicode character.
const T value(const Key &key) const
Returns the value associated with the key.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
static Qt::KeyboardModifiers keyboardModifiers(DFBInputDeviceModifierMask mask)
#define QT_BEGIN_NAMESPACE
This macro expands to.
static void handleMouseEvent(QWidget *w, const QPoint &local, const QPoint &global, Qt::MouseButtons b)
tlw == 0 means that ev is in global coords only
Type
This enum type defines the valid event types in Qt.
The QPoint class defines a point in the plane using integer precision.
static void handleEnterEvent(QWidget *w)
static Qt::MouseButtons mouseButtons(DFBInputDeviceButtonMask mask)
static void handleLeaveEvent(QWidget *w)