aboutsummaryrefslogtreecommitdiff
path: root/src/keyboard.h
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-01-24 03:38:44 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-27 17:10:40 +0100
commitb85daf94830a3ca39d59237fdb07bc33ede1c450 (patch)
tree8d704b1d8614759da71fbe42dca737c0e2261142 /src/keyboard.h
parent9b8fb0492c8c05630644d840aef520f3c6b17829 (diff)
downloadayatana-indicator-keyboard-b85daf94830a3ca39d59237fdb07bc33ede1c450.tar.gz
ayatana-indicator-keyboard-b85daf94830a3ca39d59237fdb07bc33ede1c450.tar.bz2
ayatana-indicator-keyboard-b85daf94830a3ca39d59237fdb07bc33ede1c450.zip
100% re-write of the keyboard indicator in plain C.
Diffstat (limited to 'src/keyboard.h')
-rw-r--r--src/keyboard.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/keyboard.h b/src/keyboard.h
new file mode 100644
index 00000000..50e8bff0
--- /dev/null
+++ b/src/keyboard.h
@@ -0,0 +1,37 @@
+#ifndef __KEYBOARD_H__
+#define __KEYBOARD_H__
+
+G_BEGIN_DECLS
+
+#define KEYBOARD_LAYOUT_CHANGED "layout-changed"
+#define KEYBOARD_CONFIG_CHANGED "config-changed"
+
+#define G_KEYBOARD(o) (G_TYPE_CHECK_INSTANCE_CAST((o), G_TYPE_KEYBOARD, Keyboard))
+#define G_TYPE_KEYBOARD (keyboard_get_type())
+#define G_IS_KEYBOARD(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), G_TYPE_KEYBOARD))
+
+typedef struct _Keyboard Keyboard;
+typedef struct _KeyboardClass KeyboardClass;
+typedef struct _KeyboardPrivate KeyboardPrivate;
+
+struct _Keyboard
+{
+ GObject parent;
+ KeyboardPrivate *pPrivate;
+};
+
+struct _KeyboardClass
+{
+ GObjectClass parent_class;
+};
+
+GType keyboard_get_type(void);
+Keyboard* keyboard_new();
+void keyboard_AddSource(Keyboard *pKeyboard);
+guint keyboard_GetNumLayouts(Keyboard *pKeyboard);
+void keyboard_GetLayout(Keyboard *pKeyboard, gint nLayout, gchar **pLanguage, gchar **pDescription);
+void keyboard_SetLayout(Keyboard *pKeyboard, gint nLayout);
+
+G_END_DECLS
+
+#endif