56 mEventHandler(eventHandler)
82 int result = screen_create_event(&event);
84 qFatal(
"QBB: failed to create screen event, errno=%d",
errno);
86 #if defined(QBBSCREENEVENTTHREAD_DEBUG) 87 qDebug() <<
"QBB: screen event thread started";
95 result = screen_get_event(
mContext, event, -1);
97 qFatal(
"QBB: failed to get screen event, errno=%d",
errno);
102 int result = screen_get_event_property_iv(event, SCREEN_PROPERTY_TYPE, &qnxType);
104 qFatal(
"QBB: failed to query screen event type, errno=%d",
errno);
106 if (qnxType == SCREEN_EVENT_USER) {
108 #if defined(QBBSCREENEVENTTHREAD_DEBUG) 109 qDebug() <<
"QBB: QNX screen user event";
117 #if defined(QBBSCREENEVENTTHREAD_DEBUG) 118 qDebug() <<
"QBB: screen event thread stopped";
122 screen_destroy_event(event);
127 screen_event_t
event;
131 int result = screen_create_event(&event);
133 qFatal(
"QBB: failed to create screen event, errno=%d",
errno);
137 int type = SCREEN_EVENT_USER;
138 result = screen_set_event_property_iv(event, SCREEN_PROPERTY_TYPE, &type);
140 qFatal(
"QBB: failed to set screen event type, errno=%d",
errno);
146 result = screen_send_event(
mContext, event, getpid());
148 qFatal(
"QBB: failed to set screen event type, errno=%d",
errno);
151 screen_destroy_event(event);
153 #if defined(QBBSCREENEVENTTHREAD_DEBUG) 154 qDebug() <<
"QBB: screen event thread shutdown begin";
160 #if defined(QBBSCREENEVENTTHREAD_DEBUG) 161 qDebug() <<
"QBB: screen event thread shutdown end";
#define QT_END_NAMESPACE
This macro expands to.
QBBScreenEventThread(screen_context_t context, QBBScreenEventHandler *eventHandler)
void injectPointerMoveEvent(int x, int y)
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
Q_CORE_EXPORT void qDebug(const char *,...)
bool handleEvent(screen_event_t event)
#define QT_BEGIN_NAMESPACE
This macro expands to.
static void injectKeyboardEvent(int flags, int sym, int mod, int scan, int cap)
void injectPointerMoveEvent(int x, int y)
virtual ~QBBScreenEventThread()
screen_context_t mContext
QBBScreenEventHandler * mEventHandler
Q_CORE_EXPORT void qFatal(const char *,...)
static void injectKeyboardEvent(int flags, int sym, int mod, int scan, int cap)
virtual void run()
The starting point for the thread.
bool wait(unsigned long time=ULONG_MAX)
Blocks the thread until either of these conditions is met: