[gnome-builder/gnome-builder-3-18] libide: fixup IdeIndenter so it can be used from vala
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-18] libide: fixup IdeIndenter so it can be used from vala
- Date: Tue, 13 Oct 2015 07:23:50 +0000 (UTC)
commit f90842c79cc83dbf2db1f6acb17c093c2520d1e4
Author: Christian Hergert <christian hergert me>
Date: Thu Sep 24 06:25:17 2015 -0700
libide: fixup IdeIndenter so it can be used from vala
libide/ide-indenter.c | 8 ++++----
libide/ide-indenter.h | 20 +++++++++++---------
2 files changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/libide/ide-indenter.c b/libide/ide-indenter.c
index e70a37a..375dd2b 100644
--- a/libide/ide-indenter.c
+++ b/libide/ide-indenter.c
@@ -21,7 +21,7 @@
#include "ide-context.h"
#include "ide-indenter.h"
-G_DEFINE_INTERFACE (IdeIndenter, ide_indenter, IDE_TYPE_OBJECT)
+G_DEFINE_INTERFACE (IdeIndenter, ide_indenter, G_TYPE_OBJECT)
static gchar *
ide_indenter_default_format (IdeIndenter *self,
@@ -60,8 +60,8 @@ ide_indenter_default_init (IdeIndenterInterface *iface)
* @text_view: A #GtkTextView
* @begin: A #GtkTextIter for the beginning region of text to replace.
* @end: A #GtkTextIter for the end region of text to replace.
- * @cursor_offset: The offset in characters from @end to place the cursor.
- * Negative values are okay.
+ * @cursor_offset: (out): The offset in characters from @end to place the
+ * cursor. Negative values are okay.
* @event: The #GdkEventKey that triggered the event.
*
* This function performs an indentation for the key press activated by @event.
@@ -72,7 +72,7 @@ ide_indenter_default_init (IdeIndenterInterface *iface)
* @cursor_offset may be set to jump the cursor starting from @end. Negative
* values are allowed.
*
- * Returns: (transfer full): A string containing the replacement text, or %NULL.
+ * Returns: (nullable) (transfer full): A string containing the replacement text, or %NULL.
*/
gchar *
ide_indenter_format (IdeIndenter *self,
diff --git a/libide/ide-indenter.h b/libide/ide-indenter.h
index d7a35da..f785096 100644
--- a/libide/ide-indenter.h
+++ b/libide/ide-indenter.h
@@ -27,20 +27,22 @@ G_BEGIN_DECLS
#define IDE_TYPE_INDENTER (ide_indenter_get_type())
-G_DECLARE_INTERFACE (IdeIndenter, ide_indenter, IDE, INDENTER, IdeObject)
+G_DECLARE_INTERFACE (IdeIndenter, ide_indenter, IDE, INDENTER, GObject)
struct _IdeIndenterInterface
{
GTypeInterface parent;
- gchar *(*format) (IdeIndenter *self,
- GtkTextView *text_view,
- GtkTextIter *begin,
- GtkTextIter *end,
- gint *cursor_offset,
- GdkEventKey *event);
- gboolean (*is_trigger) (IdeIndenter *self,
- GdkEventKey *event);
+ gchar *(*format) (IdeIndenter *self,
+ GtkTextView *text_view,
+ GtkTextIter *begin,
+ GtkTextIter *end,
+ gint *cursor_offset,
+ GdkEventKey *event);
+ gboolean (*is_trigger) (IdeIndenter *self,
+ GdkEventKey *event);
+ void (*set_context) (IdeIndenter *self,
+ IdeContext *context);
};
gboolean ide_indenter_is_trigger (IdeIndenter *self,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]