[gnome-flashback/wip/segeiger/inputmethods: 2/6] input-sources: add signals to GfIBusManager
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/wip/segeiger/inputmethods: 2/6] input-sources: add signals to GfIBusManager
- Date: Tue, 22 Sep 2015 11:50:48 +0000 (UTC)
commit f1f39fc0ed2354055fe2d353351d513a79eff8b3
Author: Sebastian Geiger <sbastig gmx net>
Date: Sat Sep 19 19:31:42 2015 +0200
input-sources: add signals to GfIBusManager
gnome-flashback/libinput-sources/gf-ibus-manager.c | 50 ++++++++++++++------
gnome-flashback/libinput-sources/gf-ibus-manager.h | 4 +-
2 files changed, 38 insertions(+), 16 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-ibus-manager.c
b/gnome-flashback/libinput-sources/gf-ibus-manager.c
index 9b9151c..1a5208a 100644
--- a/gnome-flashback/libinput-sources/gf-ibus-manager.c
+++ b/gnome-flashback/libinput-sources/gf-ibus-manager.c
@@ -17,8 +17,8 @@
#include "config.h"
-#include "gf-ibus-manager.h"
#include "gf-candidate-popup.h"
+#include "gf-ibus-manager.h"
struct _GfIBusManager
{
@@ -27,34 +27,56 @@ struct _GfIBusManager
GfCandidatePopup *candidate_popup;
};
-G_DEFINE_TYPE (GfIBusManager, gf_ibus_manager, G_TYPE_OBJECT)
-
-static void
-gf_ibus_manager_dispose (GObject *object)
+enum
{
- GfIBusManager *manager;
+ SIGNAL_READY,
+ SIGNAL_PROPERTIES_REGISTERED,
+ SIGNAL_PROPERTY_UPDATED,
+ SIGNAL_SET_CONTENT_TYPE,
- manager = GF_IBUS_MANAGER (object);
+ LAST_SIGNAL
+};
- g_clear_object (&manager->candidate_popup);
+static guint signals[LAST_SIGNAL] = { 0 };
- G_OBJECT_CLASS (gf_ibus_manager_parent_class)->dispose (object);
-}
+G_DEFINE_TYPE (GfIBusManager, gf_ibus_manager, G_TYPE_OBJECT)
static void
gf_ibus_manager_class_init (GfIBusManagerClass *manager_class)
{
- GObjectClass *object_class;
+ signals[SIGNAL_READY] =
+ g_signal_new ("ready",
+ G_TYPE_FROM_CLASS (manager_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
- object_class = G_OBJECT_CLASS (manager_class);
+ signals[SIGNAL_PROPERTIES_REGISTERED] =
+ g_signal_new ("properties-registered",
+ G_TYPE_FROM_CLASS (manager_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 2, G_TYPE_STRING, IBUS_TYPE_PROP_LIST);
- object_class->dispose = gf_ibus_manager_dispose;
+ signals[SIGNAL_PROPERTY_UPDATED] =
+ g_signal_new ("property-updated",
+ G_TYPE_FROM_CLASS (manager_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 2, G_TYPE_STRING, IBUS_TYPE_PROPERTY);
+
+ signals[SIGNAL_SET_CONTENT_TYPE] =
+ g_signal_new ("set-content-type",
+ G_TYPE_FROM_CLASS (manager_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
}
static void
gf_ibus_manager_init (GfIBusManager *manager)
{
- manager->candidate_popup = gf_candidate_popup_new ();
+
}
GfIBusManager *
diff --git a/gnome-flashback/libinput-sources/gf-ibus-manager.h
b/gnome-flashback/libinput-sources/gf-ibus-manager.h
index aa2201d..2e9c7c3 100644
--- a/gnome-flashback/libinput-sources/gf-ibus-manager.h
+++ b/gnome-flashback/libinput-sources/gf-ibus-manager.h
@@ -27,7 +27,7 @@ G_DECLARE_FINAL_TYPE (GfIBusManager, gf_ibus_manager,
GfIBusManager *gf_ibus_manager_new (void);
-IBusEngineDesc *gf_ibus_manager_get_engine_desc (GfIBusManager *manager,
- const gchar *id);
+IBusEngineDesc *gf_ibus_manager_get_engine_desc (GfIBusManager *manager,
+ const gchar *id);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]