[gnome-flashback/wip/segeiger/inputmethods: 4/8] input-sources: implement missing methods for GfInputSource
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/wip/segeiger/inputmethods: 4/8] input-sources: implement missing methods for GfInputSource
- Date: Tue, 22 Sep 2015 11:05:29 +0000 (UTC)
commit 1e39d1528fa900134b8df023b5b5d096587396b1
Author: Sebastian Geiger <sbastig gmx net>
Date: Tue Sep 22 12:59:26 2015 +0200
input-sources: implement missing methods for GfInputSource
gnome-flashback/libinput-sources/gf-input-source.c | 103 +++++++++++++-------
gnome-flashback/libinput-sources/gf-input-source.h | 23 +++++
2 files changed, 92 insertions(+), 34 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-input-source.c
b/gnome-flashback/libinput-sources/gf-input-source.c
index b255b95..b72b8ac 100644
--- a/gnome-flashback/libinput-sources/gf-input-source.c
+++ b/gnome-flashback/libinput-sources/gf-input-source.c
@@ -100,39 +100,6 @@ get_xkb_id (GfInputSource *source)
}
static void
-gf_input_source_set_id (GfInputSource *source,
- const char *const id)
-{
- g_free (source->id);
- source->id = g_strdup (id);
-}
-
-static void
-gf_input_source_set_display_name (GfInputSource *source,
- const char *const display_name)
-{
- g_free (source->display_name);
- source->display_name = g_strdup (display_name);
-}
-
-static void
-gf_input_source_set_short_name (GfInputSource *source,
- const char *const short_name)
-{
- g_free (source->short_name);
- source->short_name = g_strdup (short_name);
- g_signal_emit (source, SIGNAL_CHANGED, 0, short_name);
-}
-
-static void
-gf_input_source_set_index (GfInputSource *source,
- gint index)
-{
- source->index = index;
-}
-
-
-static void
gf_input_source_get_property (GObject *object,
guint prop_id,
GValue *value,
@@ -314,4 +281,72 @@ gf_input_source_new (GfIBusManager *ibus_manager,
"index", index,
"ibus-manager", ibus_manager,
NULL);
-}
\ No newline at end of file
+}
+
+void
+gf_input_source_set_id (GfInputSource *source,
+ const char *const id)
+{
+ g_free (source->id);
+ source->id = g_strdup (id);
+}
+
+void
+gf_input_source_set_display_name (GfInputSource *source,
+ const char *const display_name)
+{
+ g_free (source->display_name);
+ source->display_name = g_strdup (display_name);
+}
+
+void
+gf_input_source_set_short_name (GfInputSource *source,
+ const char *const short_name)
+{
+ g_free (source->short_name);
+ source->short_name = g_strdup (short_name);
+ g_signal_emit (source, SIGNAL_CHANGED, 0, short_name);
+}
+
+void
+gf_input_source_set_index (GfInputSource *source,
+ gint index)
+{
+ source->index = index;
+}
+
+gchar *
+gf_input_source_get_id (GfInputSource *source)
+{
+ return source->id;
+}
+
+gchar *
+gf_input_source_get_display_name (GfInputSource *source)
+{
+ return source->display_name;
+}
+
+gchar *
+gf_input_source_get_short_name (GfInputSource *source)
+{
+ return source->short_name;
+}
+
+gint
+gf_input_source_get_index (GfInputSource *source)
+{
+ return source->index;
+}
+
+void
+gf_input_source_activate (GfInputSource *source)
+{
+ g_signal_emit (source, SIGNAL_ACTIVATE, 0);
+}
+
+gchar*
+gf_input_source_get_xkb_id (GfInputSource *source)
+{
+ return g_strdup (source->xkb_id);
+}
diff --git a/gnome-flashback/libinput-sources/gf-input-source.h
b/gnome-flashback/libinput-sources/gf-input-source.h
index dbc1028..2f25cbf 100644
--- a/gnome-flashback/libinput-sources/gf-input-source.h
+++ b/gnome-flashback/libinput-sources/gf-input-source.h
@@ -30,4 +30,27 @@ GfInputSource *gf_input_source_new (GfIBusManager *ibus_manager
const char *short_name,
guint index);
+void gf_input_source_set_id (GfInputSource *input_source,
+ const char* const id);
+
+void gf_input_source_set_display_name (GfInputSource *input_source,
+ const char* const display_name);
+
+void gf_input_source_set_short_name (GfInputSource *input_source,
+ const char* const short_name);
+
+void gf_input_source_set_index (GfInputSource *input_source,
+ gint index);
+
+
+gchar * gf_input_source_get_id (GfInputSource *inputSource);
+
+gchar * gf_input_source_get_display_name (GfInputSource *input_source);
+
+gchar * gf_input_source_get_short_name (GfInputSource *input_source);
+
+gint gf_input_source_get_index (GfInputSource *input_source);
+
+void gf_input_source_activate (GfInputSource *input_source);
+
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]