2 * Copyright (C) 2006 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.
25 #include "kxkbconfig.h"
30 struct XkbOptionGroup
{
34 QList
<XkbOption
> options
;
41 XkbOptionGroup
* group
;
45 QHash
<QString
, QString
> models
;
46 QHash
<QString
, QString
> layouts
;
47 // QHash<QString, QList<XkbVariant>*> variants;
48 QHash
<QString
, XkbOption
> options
;
49 QHash
<QString
, XkbOptionGroup
> optionGroups
;
61 static const Window UNKNOWN_WINDOW_ID
= (Window
) 0;
62 static const QString X11_WIN_CLASS_ROOT
;
63 static const QString X11_WIN_CLASS_UNKNOWN
;
65 static QString
getWindowClass(Window winId
, Display
* dpy
);
68 static int registerForNewDeviceEvent(Display
* dpy
);
69 static int isNewDeviceEvent(XEvent
* event
);
70 static int m_xinputEventType
;
74 static const QString
findX11Dir();
75 static const QString
findXkbRulesFile(const QString
&x11Dir
, Display
* dpy
);
76 static QList
<XkbVariant
>* getVariants(const QString
& layout
, const QString
& x11Dir
);
77 static RulesInfo
* loadRules(const QString
& rulesFile
, bool layoutsOnly
=false);
78 static XkbConfig
getGroupNames(Display
* dpy
);
81 static XkbOptionGroup
createMissingGroup(const QString
& groupName
);
82 static bool isGroupExclusive(const QString
& groupName
);
83 #endif /* HAVE_XKLAVIER */
87 #endif /*X11HELPER_H_*/