[gnome-flashback/wip/segeiger/inputmethods: 5/5] input-sources: Partial implementation for GfInputSourceManager
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/wip/segeiger/inputmethods: 5/5] input-sources: Partial implementation for GfInputSourceManager
- Date: Sun, 20 Sep 2015 17:24:23 +0000 (UTC)
commit 32ba7a407835c39f49138d4662e2797f5a31e586
Author: Sebastian Geiger <sbastig gmx net>
Date: Sat Sep 19 18:37:18 2015 +0200
input-sources: Partial implementation for GfInputSourceManager
.../libinput-sources/gf-input-source-manager.c | 174 ++++++++++++++++++++
1 files changed, 174 insertions(+), 0 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-input-source-manager.c
b/gnome-flashback/libinput-sources/gf-input-source-manager.c
index 0df2e32..3050c43 100644
--- a/gnome-flashback/libinput-sources/gf-input-source-manager.c
+++ b/gnome-flashback/libinput-sources/gf-input-source-manager.c
@@ -23,6 +23,9 @@
#include "gf-input-source-manager.h"
#include "gf-input-source-settings.h"
#include "gf-ibus-manager.h"
+#include "gf-input-source.h"
+#include "gf-input-source-manager.h"
+
#define DESKTOP_WM_KEYBINDINGS_SCHEMA "org.gnome.desktop.wm.keybindings"
@@ -40,7 +43,31 @@ struct _GfInputSourceManager
GfInputSourceSettings *settings;
+ gboolean ibusReady;
GfIBusManager *ibus_manager;
+
+ /**
+ * All valid input sources currently in the GSettings KEY_INPUT_SOURCES list
+ * indexed by their index there
+ */
+ GHashTable *inputSources;
+
+ /**
+ * All valid input sources currently in the GSettings KEY_INPUT_SOURCES list
+ * of type INPUT_SOURCE_TYPE_IBUS indexed by their IBus ID.
+ */
+ GHashTable *ibusSources;
+
+ /**
+ * All valid input sources currently in the GSettings KEY_INPUT_SOURCES
+ * list ordered
+ */
+ GList *mruSources;
+
+ //FIXME: InputSourceManager depends on KeyboardManager which is not
+ // ported to C yet.
+
+ GfInputSource *currentSource;
};
G_DEFINE_TYPE (GfInputSourceManager, gf_input_source_manager, G_TYPE_OBJECT)
@@ -204,6 +231,113 @@ gf_input_source_manager_dispose (GObject *object)
}
static void
+gf_input_source_manager_reload (void)
+{
+
+}
+
+static void
+gf_input_source_manager_ibus_ready_callback (GfIBusManager* iBusManager, gboolean ready)
+{
+}
+
+static void
+gf_input_source_manager_modifiers_switch ()
+{
+
+}
+
+static void
+gf_input_source_manager_switch_input_source (void)
+{
+
+}
+
+static void
+gf_input_source_manager_keyboard_options_changed (void)
+{
+
+}
+
+static void
+gf_input_source_manager_current_input_source_changed (void)
+{
+
+}
+
+static void
+gf_input_source_manager_activate_input_source (void)
+{
+
+}
+
+static void
+gf_input_source_manager_input_sources_changed (void)
+{
+
+}
+
+static void
+gf_input_source_manager_make_engine_short_name (void)
+{
+
+}
+
+static void
+gf_input_source_manager_ibus_properties_registered (void)
+{
+
+}
+
+static void
+gf_input_source_manager_ibus_property_updated (void)
+{
+
+}
+
+static void
+gf_input_source_manager_update_sub_property (void)
+{
+
+}
+
+static void
+gf_input_source_manager_ibus_set_content_type (void)
+{
+
+}
+
+static void
+gf_input_source_manager_get_new_input_source (void)
+{
+
+}
+
+static void
+gf_input_source_manager_get_current_window (void)
+{
+
+}
+
+static void
+gf_input_source_manager_set_per_window_input_source (void)
+{
+
+}
+
+static void
+gf_input_source_manager_sources_per_window_changed (void)
+{
+
+}
+
+static void
+gf_input_source_manager_change_per_window_source (void)
+{
+
+}
+
+static void
gf_input_source_manager_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -273,8 +407,33 @@ gf_input_source_manager_init (GfInputSourceManager *manager)
{
keybindings_init (manager);
input_source_settings_init (manager);
+ manager->inputSources = g_hash_table_new (g_str_hash, g_str_equal);
+ manager->ibusSources = g_hash_table_new (g_str_hash, g_str_equal);
+
+ g_signal_connect (manager->ibus_manager,
+ "ready",
+ G_CALLBACK (gf_input_source_manager_ibus_ready_callback),
+ manager);
+
+ g_signal_connect (manager->ibus_manager,
+ "properties-registered",
+ G_CALLBACK (gf_input_source_manager_ibus_properties_registered),
+ manager);
+
+ g_signal_connect (manager->ibus_manager,
+ "property-updated",
+ G_CALLBACK (gf_input_source_manager_ibus_property_updated),
+ manager);
+
+ g_signal_connect (manager->ibus_manager,
+ "set-content-type",
+ G_CALLBACK (gf_input_source_manager_ibus_set_content_type),
+ manager);
+
+ //global.display.connect ('modifiers-accelerator-activated', Lang.bind (this, this._modifiersSwitcher);
}
+
GfInputSourceManager *
gf_input_source_manager_new (GfIBusManager *ibus_manager)
{
@@ -282,3 +441,18 @@ gf_input_source_manager_new (GfIBusManager *ibus_manager)
"ibus-manager", ibus_manager,
NULL);
}
+
+GfInputSource *
+gf_input_source_manager_get_current_source (GfInputSourceManager *manager)
+{
+ return manager->currentSource;
+}
+
+/**
+ * Returns: A #GHashTable of #GfInputSource objects
+ */
+GHashTable *
+gf_input_source_manager_input_sources (GfInputSourceManager *manager)
+{
+ return manager->inputSources;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]