KDEUI
kglobalaccel_mac.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _KGLOBALACCEL_MAC_H
00021 #define _KGLOBALACCEL_MAC_H
00022
00023 #include <QtGui/QWidget>
00024
00025 #include "kshortcut.h"
00026
00027 #include <Carbon/Carbon.h>
00028
00029 template <class Key, class T> class QMap;
00030 template <class T> class QList;
00031
00032 class KdedGlobalAccel;
00033 class KGlobalAccelImpl: public QWidget
00034 {
00035 Q_OBJECT
00036 public:
00037 KGlobalAccelImpl(KdedGlobalAccel* owner);
00038 ~KGlobalAccelImpl();
00039
00040 public:
00053 bool grabKey(int key, bool grab);
00054
00056 void setEnabled(bool);
00057
00058 void keyboardLayoutChanged();
00059 private:
00060 friend OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void * inUserData);
00062 bool keyPressed(int key);
00063
00064 KdedGlobalAccel* m_owner;
00065 EventTargetRef m_eventTarget;
00066 EventHandlerUPP m_eventHandler;
00067 EventTypeSpec m_eventType[2];
00068 EventHandlerRef m_curHandler;
00069 QMap<int, QList<EventHotKeyRef> >* refs;
00070 };
00071
00072 #endif // _KGLOBALACCEL_MAC_H