summaryrefslogtreecommitdiffstats
path: root/kcontrol/access/kaccess.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kcontrol/access/kaccess.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/access/kaccess.h')
-rw-r--r--kcontrol/access/kaccess.h114
1 files changed, 114 insertions, 0 deletions
diff --git a/kcontrol/access/kaccess.h b/kcontrol/access/kaccess.h
new file mode 100644
index 000000000..d75d0bdb6
--- /dev/null
+++ b/kcontrol/access/kaccess.h
@@ -0,0 +1,114 @@
+#ifndef __K_ACCESS_H__
+#define __K_ACCESS_H__
+
+
+#include <qwidget.h>
+#include <qcolor.h>
+
+
+#include <kuniqueapplication.h>
+#include <kwinmodule.h>
+
+
+#include <X11/Xlib.h>
+#define explicit int_explicit // avoid compiler name clash in XKBlib.h
+#include <X11/XKBlib.h>
+#undef explicit
+
+class KDialogBase;
+class QLabel;
+class KComboBox;
+
+class KAccessApp : public KUniqueApplication
+{
+ Q_OBJECT
+
+public:
+
+ KAccessApp(bool allowStyles=true, bool GUIenabled=true);
+
+ bool x11EventFilter(XEvent *event);
+
+ int newInstance();
+
+ void setXkbOpcode(int opcode);
+
+protected:
+
+ void readSettings();
+
+ void xkbStateNotify();
+ void xkbBellNotify(XkbBellNotifyEvent *event);
+ void xkbControlsNotify(XkbControlsNotifyEvent *event);
+
+
+private slots:
+
+ void activeWindowChanged(WId wid);
+ void slotArtsBellTimeout();
+ void notifyChanges();
+ void applyChanges();
+ void yesClicked();
+ void noClicked();
+ void dialogClosed();
+
+private:
+ void createDialogContents();
+ void initMasks();
+
+ int xkb_opcode;
+ unsigned int features;
+ unsigned int requestedFeatures;
+
+ bool _systemBell, _artsBell, _visibleBell, _visibleBellInvert;
+ bool _artsBellBlocked;
+ QString _artsBellFile;
+ QColor _visibleBellColor;
+ int _visibleBellPause;
+
+ bool _gestures, _gestureConfirmation;
+ bool _kNotifyModifiers, _kNotifyAccessX;
+
+ QWidget *overlay;
+
+ QTimer *artsBellTimer;
+
+ KWinModule wm;
+
+ WId _activeWindow;
+
+ KDialogBase *dialog;
+ QLabel *featuresLabel;
+ KComboBox *showModeCombobox;
+
+ int keys[8];
+ int state;
+};
+
+
+class VisualBell : public QWidget
+{
+ Q_OBJECT
+
+public:
+
+ VisualBell(int pause)
+ : QWidget(0, 0, WX11BypassWM), _pause(pause)
+ {};
+
+
+protected:
+
+ void paintEvent(QPaintEvent *);
+
+
+private:
+
+ int _pause;
+
+};
+
+
+
+
+#endif