diff options
author | Jørgen Lind <jorgen.lind@digia.com> | 2013-04-26 08:39:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-26 14:18:16 +0200 |
commit | fca94fa5ed8321e84e7b0ff515620fbb901db545 (patch) | |
tree | 0172dcecbc859ced094a7ce4665f70902b7dbf7d /src/plugins/platforms/xcb/qxcbwindow.h | |
parent | 7288625c52749f566570a7e7ef047faa8171b18c (diff) |
Add QXcbWindowEventListener
This makes it possible to listen for events on xcb_window_t which are
not platformwindows inside the xcb plugin
Change-Id: Ic9ec17ed757a7f9a5302ef2759c119a72bac573c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h index 300596845e..5601a115e9 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE class QXcbScreen; class QXcbEGLSurface; class QIcon; -class QXcbWindow : public QXcbObject, public QPlatformWindow +class QXcbWindow : public QXcbObject, public QXcbWindowEventListener, public QPlatformWindow { public: enum NetWmState { @@ -126,20 +126,24 @@ public: uint depth() const { return m_depth; } QImage::Format imageFormat() const { return m_imageFormat; } - void handleExposeEvent(const xcb_expose_event_t *event); - void handleClientMessageEvent(const xcb_client_message_event_t *event); - void handleConfigureNotifyEvent(const xcb_configure_notify_event_t *event); - void handleMapNotifyEvent(const xcb_map_notify_event_t *event); - void handleUnmapNotifyEvent(const xcb_unmap_notify_event_t *event); - void handleButtonPressEvent(const xcb_button_press_event_t *event); - void handleButtonReleaseEvent(const xcb_button_release_event_t *event); - void handleMotionNotifyEvent(const xcb_motion_notify_event_t *event); - - void handleEnterNotifyEvent(const xcb_enter_notify_event_t *event); - void handleLeaveNotifyEvent(const xcb_leave_notify_event_t *event); - void handleFocusInEvent(const xcb_focus_in_event_t *event); - void handleFocusOutEvent(const xcb_focus_out_event_t *event); - void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event); + bool handleGenericEvent(xcb_generic_event_t *event, long *result) Q_DECL_OVERRIDE; + + void handleExposeEvent(const xcb_expose_event_t *event) Q_DECL_OVERRIDE; + void handleClientMessageEvent(const xcb_client_message_event_t *event) Q_DECL_OVERRIDE; + void handleConfigureNotifyEvent(const xcb_configure_notify_event_t *event) Q_DECL_OVERRIDE; + void handleMapNotifyEvent(const xcb_map_notify_event_t *event) Q_DECL_OVERRIDE; + void handleUnmapNotifyEvent(const xcb_unmap_notify_event_t *event) Q_DECL_OVERRIDE; + void handleButtonPressEvent(const xcb_button_press_event_t *event) Q_DECL_OVERRIDE; + void handleButtonReleaseEvent(const xcb_button_release_event_t *event) Q_DECL_OVERRIDE; + void handleMotionNotifyEvent(const xcb_motion_notify_event_t *event) Q_DECL_OVERRIDE; + + void handleEnterNotifyEvent(const xcb_enter_notify_event_t *event) Q_DECL_OVERRIDE; + void handleLeaveNotifyEvent(const xcb_leave_notify_event_t *event) Q_DECL_OVERRIDE; + void handleFocusInEvent(const xcb_focus_in_event_t *event) Q_DECL_OVERRIDE; + void handleFocusOutEvent(const xcb_focus_out_event_t *event) Q_DECL_OVERRIDE; + void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) Q_DECL_OVERRIDE; + + QXcbWindow *toWindow() Q_DECL_OVERRIDE; void handleMouseEvent(xcb_timestamp_t time, const QPoint &local, const QPoint &global, Qt::KeyboardModifiers modifiers); |