Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / kcontrol / kxkb / xklavier_adaptor.h
blobd9b24c7c09138cff6d7ea0cd2a037517202ea093
1 /*
2 * Copyright (C) 2007 Andriy Rysin (rysin@kde.org)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef XKLAVIER_ADAPTOR_H
20 #define XKLAVIER_ADAPTOR_H
22 #include <X11/Xlib.h>
24 #include <QHash>
25 #include <QList>
27 #include "kxkbconfig.h"
29 class LayoutUnit;
30 class XKlavierAdaptorPriv;
32 class XKlavierAdaptor {
34 public:
35 ~XKlavierAdaptor();
37 void loadXkbConfig(bool layoutsOnly);
39 QHash<QString, QString> getModels();
40 QHash<QString, QString> getLayouts();
41 QHash<QString, XkbOption> getOptions();
42 QHash<QString, XkbOptionGroup> getOptionGroups();
43 QHash<QString, QList<XkbVariant>*> getVariants();
45 XkbConfig getGroupNames();
46 int filterEvents(XEvent* ev);
47 int startListening();
48 int stopListening();
50 static XKlavierAdaptor* getInstance(Display* dpy);
52 private:
53 XKlavierAdaptor(Display* dpy);
55 XKlavierAdaptorPriv* priv;
58 #endif