summaryrefslogtreecommitdiffstats
path: root/kxkb/extension.h
blob: 82ea9231bd7d0508742bb1e6e71ac996b651589b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef __EXTENSION_H__
#define __EXTENSION_H__

#include <X11/Xlib.h>


class XKBExtension
{
public:
	XKBExtension(Display *display=NULL);
	~XKBExtension();
	bool init();
	void reset();

	static bool setXkbOptions(const TQString& options, bool resetOldOptions);
	bool setLayout(const TQString& model,
					const TQString& tqlayout, const TQString& variant,
					const TQString& includeGroup, bool useCompiledLayouts=true);
	bool setGroup(unsigned int group);
	unsigned int getGroup() const;

private:
    Display *m_dpy;
	TQString m_tempDir;
	static TQMap<TQString, FILE*> fileCache;
	
	bool setLayoutInternal(const TQString& model,
				   const TQString& tqlayout, const TQString& variant,
				   const TQString& includeGroup);
	bool compileCurrentLayout(const TQString& tqlayoutKey);
	bool setCompiledLayout(const TQString& tqlayoutKey);
	
	TQString getPrecompiledLayoutFilename(const TQString& tqlayoutKey);
//	void deletePrecompiledLayouts();
};

#endif