1
/* -*- mode: c; style: linux -*- */
3
/* gnome-keyboard-properties-xkb.h
4
* Copyright (C) 2003-2007 Sergey V Udaltsov
6
* Written by Sergey V. Udaltsov <svu@gnome.org>
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2, or (at your option)
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24
#ifndef __GNOME_KEYBOARD_PROPERTY_XKB_H
25
#define __GNOME_KEYBOARD_PROPERTY_XKB_H
27
#include <gconf/gconf-client.h>
29
#include "libgnomekbd/gkbd-keyboard-config.h"
32
#define CWID(s) GTK_WIDGET (gtk_builder_get_object (chooser_dialog, s))
33
extern XklEngine *engine;
34
extern XklConfigRegistry *config_registry;
35
extern GConfClient *xkb_gconf_client;
36
extern GkbdKeyboardConfig initial_config;
38
extern void setup_xkb_tabs (GtkBuilder * dialog,
39
GConfChangeSet * changeset);
41
extern void xkb_layouts_fill_selected_tree (GtkBuilder * dialog);
43
extern void xkb_layouts_register_buttons_handlers (GtkBuilder * dialog);
45
extern void xkb_layouts_register_gconf_listener (GtkBuilder * dialog);
47
extern void xkb_options_register_gconf_listener (GtkBuilder * dialog);
49
extern void xkb_layouts_prepare_selected_tree (GtkBuilder * dialog,
50
GConfChangeSet * changeset);
52
extern void xkb_options_load_options (GtkBuilder * dialog);
54
extern void xkb_options_popup_dialog (GtkBuilder * dialog);
56
extern void clear_xkb_elements_list (GSList * list);
58
extern char *xci_desc_to_utf8 (XklConfigItem * ci);
60
extern gchar *xkb_layout_description_utf8 (const gchar * visible);
62
extern void enable_disable_restoring (GtkBuilder * dialog);
64
extern void preview_toggled (GtkBuilder * dialog, GtkWidget * button);
66
extern void choose_model (GtkBuilder * dialog);
68
extern void xkb_layout_choose (GtkBuilder * dialog);
70
extern GSList *xkb_layouts_get_selected_list (void);
72
extern GSList *xkb_options_get_selected_list (void);
74
#define xkb_layouts_set_selected_list(list) \
75
gconf_client_set_list (gconf_client_get_default (), \
76
GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS, \
77
GCONF_VALUE_STRING, (list), NULL)
79
#define xkb_options_set_selected_list(list) \
80
gconf_client_set_list (gconf_client_get_default (), \
81
GKBD_KEYBOARD_CONFIG_KEY_OPTIONS, \
82
GCONF_VALUE_STRING, (list), NULL)
84
extern GtkWidget *xkb_layout_preview_create_widget (GtkBuilder *
87
extern void xkb_layout_preview_update (GtkBuilder * chooser_dialog);
89
extern void xkb_layout_preview_set_drawing_layout (GtkWidget * kbdraw,
92
extern gchar *xkb_layout_chooser_get_selected_id (GtkBuilder *
95
extern void xkb_save_default_group (gint group_no);
97
extern gint xkb_get_default_group (void);
100
#endif /* __GNOME_KEYBOARD_PROPERTY_XKB_H */