[gnome-flashback] input-sources: add GfIBusManager, unimplemented
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] input-sources: add GfIBusManager, unimplemented
- Date: Sat, 19 Sep 2015 18:42:19 +0000 (UTC)
commit 3889da9ec9bc9c95f155eeb1972afd7fcdc24c6c
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 | 64 ++++++++++++++++++++
gnome-flashback/libinput-sources/gf-ibus-manager.h | 29 +++++++++
.../libinput-sources/gf-input-sources.c | 23 +++++++-
4 files changed, 117 insertions(+), 1 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..8011318
--- /dev/null
+++ b/gnome-flashback/libinput-sources/gf-ibus-manager.c
@@ -0,0 +1,64 @@
+/*
+ * 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/>.
+ */
+
+#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_dispose (GObject *object)
+{
+ GfIBusManager *manager;
+
+ manager = GF_IBUS_MANAGER (object);
+
+ g_clear_object (&manager->candidate_popup);
+
+ G_OBJECT_CLASS (gf_ibus_manager_parent_class)->dispose (object);
+}
+
+static void
+gf_ibus_manager_class_init (GfIBusManagerClass *manager_class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (manager_class);
+
+ object_class->dispose = gf_ibus_manager_dispose;
+}
+
+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);
+}
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..7886eb5
--- /dev/null
+++ b/gnome-flashback/libinput-sources/gf-ibus-manager.h
@@ -0,0 +1,29 @@
+/*
+ * 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>
+
+#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);
+
+#endif
diff --git a/gnome-flashback/libinput-sources/gf-input-sources.c
b/gnome-flashback/libinput-sources/gf-input-sources.c
index bd02248..b5a2809 100644
--- a/gnome-flashback/libinput-sources/gf-input-sources.c
+++ b/gnome-flashback/libinput-sources/gf-input-sources.c
@@ -17,23 +17,44 @@
#include "config.h"
+#include "gf-ibus-manager.h"
#include "gf-input-sources.h"
struct _GfInputSources
{
- GObject parent;
+ GObject parent;
+
+ GfIBusManager *ibus_manager;
};
G_DEFINE_TYPE (GfInputSources, gf_input_sources, G_TYPE_OBJECT)
static void
+gf_input_sources_dispose (GObject *object)
+{
+ GfInputSources *input_sources;
+
+ input_sources = GF_INPUT_SOURCES (object);
+
+ g_clear_object (&input_sources->ibus_manager);
+
+ G_OBJECT_CLASS (gf_input_sources_parent_class)->dispose (object);
+}
+
+static void
gf_input_sources_class_init (GfInputSourcesClass *input_sources_class)
{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (input_sources_class);
+
+ object_class->dispose = gf_input_sources_dispose;
}
static void
gf_input_sources_init (GfInputSources *input_sources)
{
+ input_sources->ibus_manager = gf_ibus_manager_new ();
}
GfInputSources *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]