[gnome-builder/wip/extensions: 2/4] highlighter: make IdeHighlighter an interface
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/extensions: 2/4] highlighter: make IdeHighlighter an interface
- Date: Sat, 27 Jun 2015 07:11:25 +0000 (UTC)
commit 0d2d50de0751f11d929fc6f7f30096a1bb45be73
Author: Christian Hergert <christian hergert me>
Date: Sat Jun 27 00:07:37 2015 -0700
highlighter: make IdeHighlighter an interface
This will allow us to implement types from libpeas, which means we can use
an extension point to track the preferred implementation.
libide/Makefile.am | 2 +-
libide/clang/ide-clang-highlighter.c | 28 ++++++---
libide/clang/ide-clang-highlighter.h | 3 +-
libide/ctags/ide-ctags-highlighter.c | 31 +++++++----
libide/ctags/ide-ctags-highlighter.h | 3 +-
libide/ide-enums.c.in | 2 +-
libide/ide-highlight-engine.c | 6 +-
libide/ide-highlight-engine.h | 11 +++-
libide/ide-highlighter.c | 104 ++++-----------------------------
libide/ide-highlighter.h | 47 +++++++--------
libide/ide-internal.h | 3 -
libide/xml/ide-xml-highlighter.c | 57 ++++++++++---------
libide/xml/ide-xml-highlighter.h | 3 +-
13 files changed, 123 insertions(+), 177 deletions(-)
---
diff --git a/libide/Makefile.am b/libide/Makefile.am
index 3ae7e10..2db2790 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -418,7 +418,7 @@ glib_enum_headers = \
doap/ide-doap.h \
ide-buffer.h \
ide-diagnostic.h \
- ide-highlighter.h \
+ ide-highlight-engine.h \
ide-indent-style.h \
ide-source-view.h \
ide-symbol.h \
diff --git a/libide/clang/ide-clang-highlighter.c b/libide/clang/ide-clang-highlighter.c
index 03206ea..a311da5 100644
--- a/libide/clang/ide-clang-highlighter.c
+++ b/libide/clang/ide-clang-highlighter.c
@@ -18,6 +18,7 @@
#include <glib/gi18n.h>
+#include "ide-buffer.h"
#include "ide-clang-highlighter.h"
#include "ide-clang-service.h"
#include "ide-clang-translation-unit.h"
@@ -25,10 +26,14 @@
struct _IdeClangHighlighter
{
- IdeHighlighter parent_instance;
+ IdeObject parent_instance;
};
-G_DEFINE_TYPE (IdeClangHighlighter, ide_clang_highlighter, IDE_TYPE_HIGHLIGHTER)
+static void ide_clang_highlighter_iface_init (IdeHighlighterInterface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (IdeClangHighlighter, ide_clang_highlighter, IDE_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_HIGHLIGHTER,
+ ide_clang_highlighter_iface_init))
static inline gboolean
accepts_char (gunichar ch)
@@ -59,11 +64,11 @@ select_next_word (GtkTextIter *begin,
}
static void
-ide_clang_highlighter_real_update (IdeHighlighter *highlighter,
- IdeHighlightCallback callback,
- const GtkTextIter *range_begin,
- const GtkTextIter *range_end,
- GtkTextIter *location)
+ide_clang_highlighter_update (IdeHighlighter *highlighter,
+ IdeHighlightCallback callback,
+ const GtkTextIter *range_begin,
+ const GtkTextIter *range_end,
+ GtkTextIter *location)
{
g_autoptr(IdeClangTranslationUnit) unit = NULL;
GtkTextBuffer *text_buffer;
@@ -134,11 +139,14 @@ completed:
}
static void
-ide_clang_highlighter_class_init (IdeClangHighlighterClass *klass)
+ide_clang_highlighter_iface_init (IdeHighlighterInterface *iface)
{
- IdeHighlighterClass *highlighter_class = IDE_HIGHLIGHTER_CLASS (klass);
+ iface->update = ide_clang_highlighter_update;
+}
- highlighter_class->update = ide_clang_highlighter_real_update;
+static void
+ide_clang_highlighter_class_init (IdeClangHighlighterClass *klass)
+{
}
static void
diff --git a/libide/clang/ide-clang-highlighter.h b/libide/clang/ide-clang-highlighter.h
index 520eb71..a58cbf5 100644
--- a/libide/clang/ide-clang-highlighter.h
+++ b/libide/clang/ide-clang-highlighter.h
@@ -30,8 +30,7 @@ G_BEGIN_DECLS
#define IDE_CLANG_HIGHLIGHTER_ENUM_NAME "def:constant"
#define IDE_CLANG_HIGHLIGHTER_MACRO_NAME "c:macro-name"
-G_DECLARE_FINAL_TYPE (IdeClangHighlighter, ide_clang_highlighter,
- IDE, CLANG_HIGHLIGHTER, IdeHighlighter)
+G_DECLARE_FINAL_TYPE (IdeClangHighlighter, ide_clang_highlighter, IDE, CLANG_HIGHLIGHTER, IdeObject)
G_END_DECLS
diff --git a/libide/ctags/ide-ctags-highlighter.c b/libide/ctags/ide-ctags-highlighter.c
index 9547a90..c959249 100644
--- a/libide/ctags/ide-ctags-highlighter.c
+++ b/libide/ctags/ide-ctags-highlighter.c
@@ -18,6 +18,7 @@
#include <glib/gi18n.h>
+#include "ide-buffer.h"
#include "ide-ctags-highlighter.h"
#include "ide-debug.h"
#include "ide-file.h"
@@ -25,11 +26,16 @@
struct _IdeCtagsHighlighter
{
- IdeHighlighter parent_instance;
- GPtrArray *indexes;
+ IdeObject parent_instance;
+
+ GPtrArray *indexes;
};
-G_DEFINE_TYPE (IdeCtagsHighlighter, ide_ctags_highlighter, IDE_TYPE_HIGHLIGHTER)
+static void ide_ctags_highlighter_iface_init (IdeHighlighterInterface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (IdeCtagsHighlighter, ide_ctags_highlighter, IDE_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_HIGHLIGHTER,
+ ide_ctags_highlighter_iface_init))
static inline gboolean
accepts_char (gunichar ch)
@@ -117,11 +123,11 @@ get_tag (IdeCtagsHighlighter *self,
}
static void
-ide_ctags_highlighter_real_update (IdeHighlighter *highlighter,
- IdeHighlightCallback callback,
- const GtkTextIter *range_begin,
- const GtkTextIter *range_end,
- GtkTextIter *location)
+ide_ctags_highlighter_update (IdeHighlighter *highlighter,
+ IdeHighlightCallback callback,
+ const GtkTextIter *range_begin,
+ const GtkTextIter *range_end,
+ GtkTextIter *location)
{
GtkTextBuffer *text_buffer;
GtkSourceBuffer *source_buffer;
@@ -228,14 +234,17 @@ ide_ctags_highlighter_finalize (GObject *object)
}
static void
+ide_ctags_highlighter_iface_init (IdeHighlighterInterface *iface)
+{
+ iface->update = ide_ctags_highlighter_update;
+}
+
+static void
ide_ctags_highlighter_class_init (IdeCtagsHighlighterClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- IdeHighlighterClass *highlighter_class = IDE_HIGHLIGHTER_CLASS (klass);
object_class->finalize = ide_ctags_highlighter_finalize;
- highlighter_class->update = ide_ctags_highlighter_real_update;
-
}
static void
diff --git a/libide/ctags/ide-ctags-highlighter.h b/libide/ctags/ide-ctags-highlighter.h
index 985a713..0744405 100644
--- a/libide/ctags/ide-ctags-highlighter.h
+++ b/libide/ctags/ide-ctags-highlighter.h
@@ -30,8 +30,7 @@ G_BEGIN_DECLS
#define IDE_CTAGS_HIGHLIGHTER_FUNCTION_NAME "def:function"
#define IDE_CTAGS_HIGHLIGHTER_ENUM_NAME "def:constant"
-G_DECLARE_FINAL_TYPE (IdeCtagsHighlighter, ide_ctags_highlighter,
- IDE, CTAGS_HIGHLIGHTER, IdeHighlighter)
+G_DECLARE_FINAL_TYPE (IdeCtagsHighlighter, ide_ctags_highlighter, IDE, CTAGS_HIGHLIGHTER, IdeObject)
void ide_ctags_highlighter_add_index (IdeCtagsHighlighter *self,
IdeCtagsIndex *index);
diff --git a/libide/ide-enums.c.in b/libide/ide-enums.c.in
index dec08b3..5606972 100644
--- a/libide/ide-enums.c.in
+++ b/libide/ide-enums.c.in
@@ -8,7 +8,7 @@
#include "ide-buffer.h"
#include "ide-diagnostic.h"
#include "ide-doap.h"
-#include "ide-highlighter.h"
+#include "ide-highlight-engine.h"
#include "ide-indent-style.h"
#include "ide-source-view.h"
#include "ide-symbol.h"
diff --git a/libide/ide-highlight-engine.c b/libide/ide-highlight-engine.c
index ccd6a03..1ecb632 100644
--- a/libide/ide-highlight-engine.c
+++ b/libide/ide-highlight-engine.c
@@ -22,10 +22,12 @@
#include <string.h>
#include "egg-signal-group.h"
+#include "ide-buffer.h"
#include "ide-debug.h"
#include "ide-highlight-engine.h"
-#include "ide-types.h"
+#include "ide-highlighter.h"
#include "ide-internal.h"
+#include "ide-types.h"
#define HIGHLIGHT_QUANTA_USEC 5000
#define PRIVATE_TAG_PREFIX "gb-private-tag"
@@ -875,7 +877,7 @@ ide_highlight_engine_set_highlighter (IdeHighlightEngine *self,
if (g_set_object (&self->highlighter, highlighter))
{
- _ide_highlighter_set_highlighter_engine (highlighter, self);
+ IDE_HIGHLIGHTER_GET_IFACE (highlighter)->set_engine (highlighter, self);
ide_highlight_engine_reload (self);
g_object_notify_by_pspec (G_OBJECT (self), gParamSpecs [PROP_HIGHLIGHTER]);
}
diff --git a/libide/ide-highlight-engine.h b/libide/ide-highlight-engine.h
index 5f85c32..3169a8b 100644
--- a/libide/ide-highlight-engine.h
+++ b/libide/ide-highlight-engine.h
@@ -20,7 +20,6 @@
#define IDE_HIGHLIGHT_ENGINE_H
#include "ide-buffer.h"
-#include "ide-highlighter.h"
G_BEGIN_DECLS
@@ -28,6 +27,16 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (IdeHighlightEngine, ide_highlight_engine, IDE, HIGHLIGHT_ENGINE, GObject)
+typedef enum
+{
+ IDE_HIGHLIGHT_STOP,
+ IDE_HIGHLIGHT_CONTINUE,
+} IdeHighlightResult;
+
+typedef IdeHighlightResult (*IdeHighlightCallback) (const GtkTextIter *begin,
+ const GtkTextIter *end,
+ const gchar *style_name);
+
IdeHighlightEngine *ide_highlight_engine_new (IdeBuffer *buffer);
IdeBuffer *ide_highlight_engine_get_buffer (IdeHighlightEngine *self);
IdeHighlighter *ide_highlight_engine_get_highlighter (IdeHighlightEngine *self);
diff --git a/libide/ide-highlighter.c b/libide/ide-highlighter.c
index 702178b..9bdbfe1 100644
--- a/libide/ide-highlighter.c
+++ b/libide/ide-highlighter.c
@@ -18,107 +18,29 @@
#include <glib/gi18n.h>
#include "ide-highlighter.h"
-#include "ide-internal.h"
-typedef struct
-{
- IdeHighlightEngine *engine;
-} IdeHighlighterPrivate;
-
-enum {
- PROP_0,
- PROP_HIGHLIGHT_ENGINE,
- LAST_PROP
-};
-
-static GParamSpec *gParamSpecs [LAST_PROP];
-
-G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (IdeHighlighter, ide_highlighter, IDE_TYPE_OBJECT)
-
-/**
- * ide_highlighter_get_highlight_engine:
- * @self: A #IdeHighlighter.
- *
- * Gets the IdeHighlightEngine property.
- *
- * Returns: (transfer none): An #IdeHighlightEngine.
- */
-IdeHighlightEngine *
-ide_highlighter_get_highlight_engine (IdeHighlighter *self)
-{
- IdeHighlighterPrivate *priv = ide_highlighter_get_instance_private (self);
-
- g_return_val_if_fail (IDE_IS_HIGHLIGHTER (self), NULL);
-
- return priv->engine;
-}
-
-
-static void
-ide_highlighter_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- IdeHighlighter *self = IDE_HIGHLIGHTER (object);
-
- switch (prop_id)
- {
- case PROP_HIGHLIGHT_ENGINE:
- g_value_set_object (value, ide_highlighter_get_highlight_engine (self));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- }
-}
+G_DEFINE_INTERFACE (IdeHighlighter, ide_highlighter, IDE_TYPE_OBJECT)
static void
-ide_highlighter_dispose (GObject *object)
+dummy_update (IdeHighlighter *self,
+ IdeHighlightCallback callback,
+ const GtkTextIter *range_begin,
+ const GtkTextIter *range_end,
+ GtkTextIter *location)
{
- IdeHighlighter *self = (IdeHighlighter *)object;
- IdeHighlighterPrivate *priv = ide_highlighter_get_instance_private (self);
-
- ide_clear_weak_pointer (&priv->engine);
-
- G_OBJECT_CLASS (ide_highlighter_parent_class)->dispose (object);
}
static void
-ide_highlighter_class_init (IdeHighlighterClass *klass)
+dummy_set_engine (IdeHighlighter *self,
+ IdeHighlightEngine *engine)
{
-
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->dispose = ide_highlighter_dispose;
- object_class->get_property = ide_highlighter_get_property;
-
- gParamSpecs [PROP_HIGHLIGHT_ENGINE] =
- g_param_spec_object ("highlight-engine",
- _("Highlight engine"),
- _("The highlight engine of this highlighter."),
- IDE_TYPE_HIGHLIGHT_ENGINE,
- (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
-
- g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs);
}
static void
-ide_highlighter_init (IdeHighlighter *self)
-{
-}
-
-void
-_ide_highlighter_set_highlighter_engine (IdeHighlighter *self,
- IdeHighlightEngine *engine)
+ide_highlighter_default_init (IdeHighlighterInterface *iface)
{
- IdeHighlighterPrivate *priv = ide_highlighter_get_instance_private (self);
-
- g_return_if_fail (IDE_IS_HIGHLIGHTER (self));
- g_return_if_fail (IDE_IS_HIGHLIGHT_ENGINE (engine));
-
- if (ide_set_weak_pointer (&priv->engine, engine))
- g_object_notify_by_pspec (G_OBJECT (self), gParamSpecs [PROP_HIGHLIGHT_ENGINE]);
+ iface->set_engine = dummy_set_engine;
+ iface->update = dummy_update;
}
/**
@@ -144,9 +66,9 @@ ide_highlighter_update (IdeHighlighter *self,
GtkTextIter *location)
{
g_return_if_fail (IDE_IS_HIGHLIGHTER (self));
+ g_return_if_fail (callback != NULL);
g_return_if_fail (range_begin);
g_return_if_fail (range_end);
- if (IDE_HIGHLIGHTER_GET_CLASS (self)->update)
- IDE_HIGHLIGHTER_GET_CLASS (self)->update (self, callback, range_begin, range_end, location);
+ IDE_HIGHLIGHTER_GET_IFACE (self)->update (self, callback, range_begin, range_end, location);
}
diff --git a/libide/ide-highlighter.h b/libide/ide-highlighter.h
index 599faab..e74c5d9 100644
--- a/libide/ide-highlighter.h
+++ b/libide/ide-highlighter.h
@@ -22,6 +22,7 @@
#include <gtk/gtk.h>
#include "ide-buffer.h"
+#include "ide-highlight-engine.h"
#include "ide-object.h"
#include "ide-source-view.h"
#include "ide-types.h"
@@ -30,21 +31,11 @@ G_BEGIN_DECLS
#define IDE_TYPE_HIGHLIGHTER (ide_highlighter_get_type())
-G_DECLARE_DERIVABLE_TYPE (IdeHighlighter, ide_highlighter, IDE, HIGHLIGHTER, IdeObject)
+G_DECLARE_INTERFACE (IdeHighlighter, ide_highlighter, IDE, HIGHLIGHTER, IdeObject)
-typedef enum
+struct _IdeHighlighterInterface
{
- IDE_HIGHLIGHT_STOP,
- IDE_HIGHLIGHT_CONTINUE,
-} IdeHighlightResult;
-
-typedef IdeHighlightResult (*IdeHighlightCallback) (const GtkTextIter *begin,
- const GtkTextIter *end,
- const gchar *style_name);
-
-struct _IdeHighlighterClass
-{
- IdeObjectClass parent;
+ GTypeInterface parent_iface;
/**
* IdeHighlighter::update:
@@ -59,20 +50,26 @@ struct _IdeHighlighterClass
* @location should be set to the position that the highlighter got to
* before yielding back to the engine.
*/
- void (*update) (IdeHighlighter *self,
- IdeHighlightCallback callback,
- const GtkTextIter *range_begin,
- const GtkTextIter *range_end,
- GtkTextIter *location);
-};
+ void (*update) (IdeHighlighter *self,
+ IdeHighlightCallback callback,
+ const GtkTextIter *range_begin,
+ const GtkTextIter *range_end,
+ GtkTextIter *location);
-void ide_highlighter_update (IdeHighlighter *self,
- IdeHighlightCallback callback,
- const GtkTextIter *range_begin,
- const GtkTextIter *range_end,
- GtkTextIter *location);
+ /**
+ * IdeHighlighter::set-engine:
+ *
+ * This vfunc is called when the highlighter is attached to an engine.
+ */
+ void (*set_engine) (IdeHighlighter *self,
+ IdeHighlightEngine *engine);
+};
-IdeHighlightEngine *ide_highlighter_get_highlight_engine (IdeHighlighter *self);
+void ide_highlighter_update (IdeHighlighter *self,
+ IdeHighlightCallback callback,
+ const GtkTextIter *range_begin,
+ const GtkTextIter *range_end,
+ GtkTextIter *location);
G_END_DECLS
diff --git a/libide/ide-internal.h b/libide/ide-internal.h
index d26b179..abaf42a 100644
--- a/libide/ide-internal.h
+++ b/libide/ide-internal.h
@@ -31,7 +31,6 @@
#include "ide-source-view.h"
#include "ide-source-view-mode.h"
#include "ide-symbol.h"
-#include "ide-highlight-engine.h"
G_BEGIN_DECLS
@@ -124,8 +123,6 @@ IdeUnsavedFile *_ide_unsaved_file_new (GFile
GBytes *content,
const gchar *temp_path,
gint64 sequence);
-void _ide_highlighter_set_highlighter_engine (IdeHighlighter *highlighter,
- IdeHighlightEngine *highlight_engine);
G_END_DECLS
diff --git a/libide/xml/ide-xml-highlighter.c b/libide/xml/ide-xml-highlighter.c
index 5be8a86..2017abc 100644
--- a/libide/xml/ide-xml-highlighter.c
+++ b/libide/xml/ide-xml-highlighter.c
@@ -20,33 +20,37 @@
#include "egg-signal-group.h"
-#include "ide-xml-highlighter.h"
-#include "ide-context.h"
#include "ide-buffer.h"
-#include "ide-xml.h"
+#include "ide-context.h"
#include "ide-highlight-engine.h"
+#include "ide-xml-highlighter.h"
+#include "ide-xml.h"
#define HIGHLIGH_TIMEOUT_MSEC 35
#define XML_TAG_MATCH_STYLE_NAME "xml:tag-match"
struct _IdeXmlHighlighter
{
- IdeHighlighter parent_instance;
+ IdeObject parent_instance;
- EggSignalGroup *signal_group;
- GtkTextMark *iter_mark;
- GtkTextBuffer *buffer;
- guint highlight_timeout;
- guint has_tags : 1;
+ IdeHighlightEngine *engine;
+ EggSignalGroup *signal_group;
+ GtkTextMark *iter_mark;
+ GtkTextBuffer *buffer;
+ guint highlight_timeout;
+ guint has_tags : 1;
};
-G_DEFINE_TYPE (IdeXmlHighlighter, ide_xml_highlighter, IDE_TYPE_HIGHLIGHTER)
+static void ide_xml_highlighter_iface_init (IdeHighlighterInterface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (IdeXmlHighlighter, ide_xml_highlighter, IDE_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_HIGHLIGHTER,
+ ide_xml_highlighter_iface_init));
static gboolean
ide_xml_highlighter_highlight_timeout_handler (gpointer data)
{
IdeXmlHighlighter *self = data;
- IdeHighlightEngine *engine;
GtkTextTag *tag;
GtkTextIter iter;
GtkTextIter start;
@@ -56,8 +60,7 @@ ide_xml_highlighter_highlight_timeout_handler (gpointer data)
g_assert (self->buffer != NULL);
g_assert (self->iter_mark != NULL);
- engine = ide_highlighter_get_highlight_engine (IDE_HIGHLIGHTER (self));
- tag = ide_highlight_engine_get_style (engine, XML_TAG_MATCH_STYLE_NAME);
+ tag = ide_highlight_engine_get_style (self->engine, XML_TAG_MATCH_STYLE_NAME);
/*
* Clear previous tags. We could save the previous
@@ -203,17 +206,17 @@ ide_xml_highlighter_on_buffer_set (IdeXmlHighlighter *self,
}
static void
-ide_xml_highlighter_on_highlight_engine_set (IdeHighlighter *self,
- GParamSpec *pspec,
- gpointer *data)
+ide_xml_highlighter_set_engine (IdeHighlighter *highlighter,
+ IdeHighlightEngine *engine)
{
- IdeXmlHighlighter *highlighter = (IdeXmlHighlighter *)self;
- IdeHighlightEngine *engine;
+ IdeXmlHighlighter *self = (IdeXmlHighlighter *)highlighter;
IdeBuffer *buffer = NULL;
- g_assert (IDE_IS_XML_HIGHLIGHTER (highlighter));
+ g_assert (IDE_IS_XML_HIGHLIGHTER (self));
+
+ self->engine = engine;
- if ((engine = ide_highlighter_get_highlight_engine (self)))
+ if (engine != NULL)
{
buffer = ide_highlight_engine_get_buffer (engine);
/*
@@ -228,7 +231,7 @@ ide_xml_highlighter_on_highlight_engine_set (IdeHighlighter *self,
G_CONNECT_SWAPPED);
}
- ide_xml_highlighter_set_buffer (highlighter, buffer);
+ ide_xml_highlighter_set_buffer (self, buffer);
}
static void
@@ -248,6 +251,12 @@ ide_xml_highlighter_engine_dispose (GObject *object)
}
static void
+ide_xml_highlighter_iface_init (IdeHighlighterInterface *iface)
+{
+ iface->set_engine = ide_xml_highlighter_set_engine;
+}
+
+static void
ide_xml_highlighter_class_init (IdeXmlHighlighterClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -258,12 +267,8 @@ ide_xml_highlighter_class_init (IdeXmlHighlighterClass *klass)
static void
ide_xml_highlighter_init (IdeXmlHighlighter *self)
{
- g_signal_connect (self,
- "notify::highlight-engine",
- G_CALLBACK (ide_xml_highlighter_on_highlight_engine_set),
- NULL);
-
self->signal_group = egg_signal_group_new (IDE_TYPE_BUFFER);
+
egg_signal_group_connect_object (self->signal_group,
"cursor-moved",
G_CALLBACK (ide_xml_highlighter_cursor_moved_cb),
diff --git a/libide/xml/ide-xml-highlighter.h b/libide/xml/ide-xml-highlighter.h
index ce45c7f..3263152 100644
--- a/libide/xml/ide-xml-highlighter.h
+++ b/libide/xml/ide-xml-highlighter.h
@@ -25,8 +25,7 @@ G_BEGIN_DECLS
#define IDE_TYPE_XML_HIGHLIGHTER (ide_xml_highlighter_get_type())
-G_DECLARE_FINAL_TYPE (IdeXmlHighlighter, ide_xml_highlighter,
- IDE, XML_HIGHLIGHTER, IdeHighlighter)
+G_DECLARE_FINAL_TYPE (IdeXmlHighlighter, ide_xml_highlighter, IDE, XML_HIGHLIGHTER, IdeObject)
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]