[gnome-builder/editor-layout] add changed signal to GbSourceCodeAssistant
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/editor-layout] add changed signal to GbSourceCodeAssistant
- Date: Sat, 29 Nov 2014 09:40:47 +0000 (UTC)
commit 1caf4517cc081c6df15c8f7b7fb388a278ae699f
Author: Christian Hergert <christian hergert me>
Date: Sat Nov 29 01:40:39 2014 -0800
add changed signal to GbSourceCodeAssistant
src/code-assistant/gb-source-code-assistant.c | 20 ++++++++++++++++++--
src/code-assistant/gb-source-code-assistant.h | 2 ++
2 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/src/code-assistant/gb-source-code-assistant.c b/src/code-assistant/gb-source-code-assistant.c
index 148a22d..d45ed87 100644
--- a/src/code-assistant/gb-source-code-assistant.c
+++ b/src/code-assistant/gb-source-code-assistant.c
@@ -32,19 +32,24 @@ struct _GbSourceCodeAssistantPrivate
guint active : 1;
};
-enum
-{
+enum {
PROP_0,
PROP_ACTIVE,
PROP_BUFFER,
LAST_PROP
};
+enum {
+ CHANGED,
+ LAST_SIGNAL
+};
+
G_DEFINE_TYPE_WITH_PRIVATE (GbSourceCodeAssistant,
gb_source_code_assistant,
G_TYPE_OBJECT)
static GParamSpec *gParamSpecs [LAST_PROP];
+static guint gSignals [LAST_SIGNAL];
#define PARSE_TIMEOUT_MSEC 350
@@ -283,6 +288,17 @@ gb_source_code_assistant_class_init (GbSourceCodeAssistantClass *klass)
G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_BUFFER,
gParamSpecs [PROP_BUFFER]);
+
+ gSignals [CHANGED] =
+ g_signal_new ("changed",
+ GB_TYPE_SOURCE_CODE_ASSISTANT,
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GbSourceCodeAssistantClass, changed),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
}
static void
diff --git a/src/code-assistant/gb-source-code-assistant.h b/src/code-assistant/gb-source-code-assistant.h
index 1ef6364..f646ff0 100644
--- a/src/code-assistant/gb-source-code-assistant.h
+++ b/src/code-assistant/gb-source-code-assistant.h
@@ -47,6 +47,8 @@ struct _GbSourceCodeAssistant
struct _GbSourceCodeAssistantClass
{
GObjectClass parent_class;
+
+ void (*changed) (GbSourceCodeAssistant *assistant);
};
GType gb_source_code_assistant_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]