summaryrefslogtreecommitdiff
path: root/libmatekbd/matekbd-indicator-config.h
blob: d7545fffbb1bbe3733395735432ced77d2bb0eac (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef __MATEKBD_INDICATOR_CONFIG_H__
#define __MATEKBD_INDICATOR_CONFIG_H__

#include <gtk/gtk.h>

#include "libmatekbd/matekbd-keyboard-config.h"

/*
 * Indicator configuration
 */
typedef struct _MatekbdIndicatorConfig {
	int secondary_groups_mask;
	gboolean show_flags;

	gchar *font_family;
	gchar *foreground_color;
	gchar *background_color;

	/* private, transient */
	GSettings *settings;
	GSList *image_filenames;
	GtkIconTheme *icon_theme;
	int config_listener_id;
	XklEngine *engine;
} MatekbdIndicatorConfig;

/**
 * MatekbdIndicatorConfig functions -
 * some of them require MatekbdKeyboardConfig as well -
 * for loading approptiate images
 */
extern void matekbd_indicator_config_init (MatekbdIndicatorConfig *
					applet_config,
					XklEngine * engine);
extern void matekbd_indicator_config_term (MatekbdIndicatorConfig *
					applet_config);

extern void matekbd_indicator_config_load_from_gsettings (MatekbdIndicatorConfig
						   * applet_config);
extern void matekbd_indicator_config_save_to_gsettings (MatekbdIndicatorConfig *
						 applet_config);

extern void matekbd_indicator_config_refresh_style (MatekbdIndicatorConfig *
						 applet_config);

extern gchar
    * matekbd_indicator_config_get_images_file (MatekbdIndicatorConfig *
					     applet_config,
					     MatekbdKeyboardConfig *
					     kbd_config, int group);

extern void matekbd_indicator_config_load_image_filenames (MatekbdIndicatorConfig
							* applet_config,
							MatekbdKeyboardConfig
							* kbd_config);
extern void matekbd_indicator_config_free_image_filenames (MatekbdIndicatorConfig
							* applet_config);

/* Should be updated on Indicator/GSettings configuration change */
extern void matekbd_indicator_config_activate (MatekbdIndicatorConfig *
					    applet_config);

extern void matekbd_indicator_config_start_listen (MatekbdIndicatorConfig *
						applet_config,
						GCallback
						func, gpointer user_data);

extern void matekbd_indicator_config_stop_listen (MatekbdIndicatorConfig *
					       applet_config);

#endif