[gnome-flashback/wip/segeiger/inputmethods: 7/7] 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: 7/7] input-sources: Partial implementation for GfInputSourceManager
- Date: Sat, 19 Sep 2015 17:06:57 +0000 (UTC)
commit 7871b66b038a2a5e88bedd3ccf32867a4e1cf048
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 | 175 +++++++++++++++++++-
1 files changed, 173 insertions(+), 2 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-input-source-manager.c
b/gnome-flashback/libinput-sources/gf-input-source-manager.c
index b5f325b..8f34c1a 100644
--- a/gnome-flashback/libinput-sources/gf-input-source-manager.c
+++ b/gnome-flashback/libinput-sources/gf-input-source-manager.c
@@ -15,29 +15,200 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <config.h>
-
+#include "gf-ibus-manager.h"
+#include "gf-input-source.h"
#include "gf-input-source-manager.h"
+
struct _GfInputSourceManager
{
GObject parent;
+
+ /**
+ * 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.
+ GfIBusManager *ibusManager;
+ gboolean ibusReady;
+
+ GfInputSource *currentSource;
};
G_DEFINE_TYPE (GfInputSourceManager, gf_input_source_manager, G_TYPE_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_class_init (GfInputSourceManagerClass *managerClass)
{
+
}
static void
gf_input_source_manager_init (GfInputSourceManager *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->ibusManager,
+ "ready",
+ G_CALLBACK (gf_input_source_manager_ibus_ready_callback),
+ manager);
+
+ g_signal_connect (manager->ibusManager,
+ "properties-registered",
+ G_CALLBACK (gf_input_source_manager_ibus_properties_registered),
+ manager);
+
+ g_signal_connect (manager->ibusManager,
+ "property-updated",
+ G_CALLBACK (gf_input_source_manager_ibus_property_updated),
+ manager);
+
+ g_signal_connect (manager->ibusManager,
+ "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 (void)
{
return g_object_new (GF_TYPE_INPUT_SOURCE_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;
}
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]