[gnome-flashback/wip/segeiger/inputmethods: 1/7] input-sources: add GfIBusManager, unimplemented
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/wip/segeiger/inputmethods: 1/7] input-sources: add GfIBusManager, unimplemented
- Date: Sat, 19 Sep 2015 17:06:26 +0000 (UTC)
commit 52e10216754b3104170f9c89e16fb8dd2759009a
Author: Sebastian Geiger <sbastig gmx net>
Date: Mon Sep 14 15:20:49 2015 +0200
input-sources: add GfIBusManager, unimplemented
gnome-flashback/libinput-sources/Makefile.am | 2 +
gnome-flashback/libinput-sources/gf-ibus-manager.c | 85 ++++++++++++++++++++
gnome-flashback/libinput-sources/gf-ibus-manager.h | 40 +++++++++
3 files changed, 127 insertions(+), 0 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/Makefile.am b/gnome-flashback/libinput-sources/Makefile.am
index 509eb69..d454529 100644
--- a/gnome-flashback/libinput-sources/Makefile.am
+++ b/gnome-flashback/libinput-sources/Makefile.am
@@ -14,6 +14,8 @@ libinput_sources_la_CFLAGS = \
libinput_sources_la_SOURCES = \
gf-candidate-popup.c \
gf-candidate-popup.h \
+ gf-ibus-manager.c \
+ gf-ibus-manager.h \
gf-input-sources.c \
gf-input-sources.h \
$(NULL)
diff --git a/gnome-flashback/libinput-sources/gf-ibus-manager.c
b/gnome-flashback/libinput-sources/gf-ibus-manager.c
new file mode 100644
index 0000000..79f1584
--- /dev/null
+++ b/gnome-flashback/libinput-sources/gf-ibus-manager.c
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2015 Sebastian Geiger
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Based on code in GNOME Shell:
+ * https://git.gnome.org/browse/gnome-shell/tree/js/misc/ibusManager.js
+ */
+
+#include "config.h"
+
+#include "gf-ibus-manager.h"
+#include "gf-candidate-popup.h"
+
+struct _GfIBusManager
+{
+ GObject parent;
+
+ GfCandidatePopup *candidate_popup;
+};
+
+G_DEFINE_TYPE (GfIBusManager, gf_ibus_manager, G_TYPE_OBJECT)
+
+static void
+gf_ibus_manager_finalize (GObject *object)
+{
+ GfIBusManager *manager;
+
+ manager = GF_IBUS_MANAGER (object);
+
+ g_clear_object (&manager->candidate_popup);
+}
+
+static void
+gf_ibus_manager_class_init (GfIBusManagerClass *manager_class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (manager_class);
+
+ object_class->finalize = gf_ibus_manager_finalize;
+}
+
+static void
+gf_ibus_manager_init (GfIBusManager *manager)
+{
+ manager->candidate_popup = gf_candidate_popup_new ();
+}
+
+GfIBusManager *
+gf_ibus_manager_new (void)
+{
+ return g_object_new (GF_TYPE_IBUS_MANAGER, NULL);
+}
+
+void
+gf_ibus_manager_preload_engines (GfIBusManager *manager,
+ const gchar * const *ids)
+{
+}
+
+void
+gf_ibus_manager_set_engine (GfIBusManager *manager,
+ const gchar *id,
+ GAsyncReadyCallback callback)
+{
+}
+
+IBusEngineDesc *
+gf_ibus_manager_get_engine_description (GfIBusManager *manager,
+ const gchar *id)
+{
+ return NULL;
+}
diff --git a/gnome-flashback/libinput-sources/gf-ibus-manager.h
b/gnome-flashback/libinput-sources/gf-ibus-manager.h
new file mode 100644
index 0000000..7cafcb1
--- /dev/null
+++ b/gnome-flashback/libinput-sources/gf-ibus-manager.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2015 Sebastian Geiger
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GF_IBUS_MANAGER_H
+#define GF_IBUS_MANAGER_H
+
+#include <glib-object.h>
+#include <ibus-1.0/ibus.h>
+
+#define GF_TYPE_IBUS_MANAGER gf_ibus_manager_get_type ()
+G_DECLARE_FINAL_TYPE (GfIBusManager, gf_ibus_manager,
+ GF, IBUS_MANAGER, GObject)
+
+GfIBusManager *gf_ibus_manager_new (void);
+
+void gf_ibus_manager_preload_engines (GfIBusManager *manager,
+ const gchar * const *ids);
+
+void gf_ibus_manager_set_engine (GfIBusManager *manager,
+ const gchar *id,
+ GAsyncReadyCallback callback);
+
+IBusEngineDesc *gf_ibus_manager_get_engine_description (GfIBusManager *manager,
+ const gchar *id);
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]