diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-13 08:54:45 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-13 08:54:45 +0200 |
commit | b62bd0584a7872b6917917009b707785b3abd077 (patch) | |
tree | 9981f274712c098cabbff0c4667672a3934e5393 /src/plugins/platforms/xcb/qxcbkeyboard.h | |
parent | 5e10745dca1d10025404a9f268f03ae697fb10cc (diff) | |
parent | 97baad65f65783d2b5ff938f6217aec9434f2e5f (diff) |
Merge branch 'refactor'
Conflicts:
mkspecs/qws/linux-lsb-g++/qmake.conf
src/gui/image/qpixmap_mac.cpp
src/gui/painting/qpaintengine_x11.cpp
src/gui/painting/qtessellator.cpp
src/gui/text/qfontengine_qws.cpp
src/gui/text/qfontengine_x11.cpp
src/gui/widgets/qlinecontrol.cpp
src/opengl/qgl.h
src/opengl/qgl_x11egl.cpp
src/plugins/plugins.pro
Change-Id: If52dcd55cd55f2983a756c2f843967702b60a310
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbkeyboard.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbkeyboard.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h b/src/plugins/platforms/xcb/qxcbkeyboard.h index 095c3e4efb..ea5f84e8c2 100644 --- a/src/plugins/platforms/xcb/qxcbkeyboard.h +++ b/src/plugins/platforms/xcb/qxcbkeyboard.h @@ -48,26 +48,32 @@ #include <QEvent> +class QWindow; + class QXcbKeyboard : public QXcbObject { public: QXcbKeyboard(QXcbConnection *connection); ~QXcbKeyboard(); - void handleKeyPressEvent(QWidget *widget, const xcb_key_press_event_t *event); - void handleKeyReleaseEvent(QWidget *widget, const xcb_key_release_event_t *event); + void handleKeyPressEvent(QXcbWindow *window, const xcb_key_press_event_t *event); + void handleKeyReleaseEvent(QXcbWindow *window, const xcb_key_release_event_t *event); void handleMappingNotifyEvent(const xcb_mapping_notify_event_t *event); Qt::KeyboardModifiers translateModifiers(int s); private: - void handleKeyEvent(QWidget *widget, QEvent::Type type, xcb_keycode_t code, quint16 state, xcb_timestamp_t time); + void handleKeyEvent(QWindow *window, QEvent::Type type, xcb_keycode_t code, quint16 state, xcb_timestamp_t time); int translateKeySym(uint key) const; QString translateKeySym(xcb_keysym_t keysym, uint xmodifiers, int &code, Qt::KeyboardModifiers &modifiers, QByteArray &chars, int &count); + void setupModifiers(); + void setMask(uint sym, uint mask); + xcb_keysym_t lookupString(QWindow *window, uint state, xcb_keycode_t code, + QEvent::Type type, QByteArray *chars); uint m_alt_mask; uint m_super_mask; @@ -75,6 +81,7 @@ private: uint m_meta_mask; uint m_mode_switch_mask; uint m_num_lock_mask; + uint m_caps_lock_mask; xcb_key_symbols_t *m_key_symbols; }; |