1 /*
2 * Copyright (C) 2002-2006 Sergey V. Udaltsov <svu@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library 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 GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20 #include <errno.h>
21 #include <locale.h>
22 #include <string.h>
23 #include <unistd.h>
24 #include <sys/stat.h>
25 #include <sys/param.h>
26 #include <sys/wait.h>
27
28 #include <sys/types.h>
29 #include <fcntl.h>
30
31 #include <libxml/xpath.h>
32
33 #include "config.h"
34
35 #include "xklavier_private.h"
36 #include "xklavier_private_xmm.h"
37
38 #define XK_XKB_KEYS
39 #include <X11/keysymdef.h>
40
41 void
xkl_xmm_init_config_registry(XklConfigRegistry * config)42 xkl_xmm_init_config_registry(XklConfigRegistry * config)
43 {
44 }
45
46 gboolean
xkl_xmm_load_config_registry(XklConfigRegistry * config,gboolean if_extras_needed)47 xkl_xmm_load_config_registry(XklConfigRegistry * config,
48 gboolean if_extras_needed)
49 {
50 return xkl_config_registry_load_helper(config,
51 XMODMAP_DEFAULT_RULESET,
52 XMODMAP_BASE,
53 if_extras_needed);
54 }
55
56 gboolean
xkl_xmm_activate_config_rec(XklEngine * engine,const XklConfigRec * data)57 xkl_xmm_activate_config_rec(XklEngine * engine, const XklConfigRec * data)
58 {
59 gboolean rv;
60 rv = xkl_config_rec_set_to_root_window_property(data,
61 xkl_engine_priv
62 (engine,
63 base_config_atom),
64 xkl_engine_backend
65 (engine, XklXmm,
66 current_rules),
67 engine);
68 if (rv)
69 xkl_xmm_lock_group(engine, 0);
70 return rv;
71 }
72