4
#include <kaboutdata.h>
5
#include <kcmdlineargs.h>
7
extern "C" KDE_EXPORT int kdemain(int argc, char * argv[] )
9
KAboutData about(I18N_NOOP("kaccess"), 0, ki18n("KDE Accessibility Tool"),
10
0, KLocalizedString(), KAboutData::License_GPL,
11
ki18n("(c) 2000, Matthias Hoelzer-Kluepfel"));
13
about.addAuthor(ki18n("Matthias Hoelzer-Kluepfel"), ki18n("Author") , "hoelzer@kde.org");
15
KCmdLineArgs::init( argc, argv, &about );
17
if (!KAccessApp::start())
20
// verify the Xlib has matching XKB extension
21
int major = XkbMajorVersion;
22
int minor = XkbMinorVersion;
23
if (!XkbLibraryVersion(&major, &minor))
25
kError() << "Xlib XKB extension does not match" << endl;
28
kDebug() << "Xlib XKB extension major=" << major << " minor=" << minor;
30
// we need an application object for QX11Info
33
// verify the X server has matching XKB extension
34
// if yes, the XKB extension is initialized
38
if (!XkbQueryExtension(QX11Info::display(), &opcode_rtrn, &xkb_opcode, &error_rtrn,
41
kError() << "X server has not matching XKB extension" << endl;
44
kDebug() << "X server XKB extension major=" << major << " minor=" << minor;
46
//Without that, the application dies when the dialog is closed only once.
47
app.setQuitOnLastWindowClosed(false);
49
app.setXkbOpcode(xkb_opcode);
50
app.disableSessionManagement();