[gtksourceview/wip/chergert/vim] add some signals for future use
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/chergert/vim] add some signals for future use
- Date: Tue, 9 Nov 2021 19:07:09 +0000 (UTC)
commit c03deb278fb106990fd8fbf19d4453cfa3a217dd
Author: Christian Hergert <chergert redhat com>
Date: Tue Nov 9 11:06:54 2021 -0800
add some signals for future use
gtksourceview/gtksourcevimimcontext.c | 50 +++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
---
diff --git a/gtksourceview/gtksourcevimimcontext.c b/gtksourceview/gtksourcevimimcontext.c
index c6d7187d..dad4d247 100644
--- a/gtksourceview/gtksourcevimimcontext.c
+++ b/gtksourceview/gtksourcevimimcontext.c
@@ -62,6 +62,8 @@ enum {
enum {
EXECUTE_COMMAND,
FORMAT_TEXT,
+ DISCOVER_URI,
+ LOAD_URI,
N_SIGNALS
};
@@ -358,6 +360,54 @@ gtk_source_vim_im_context_class_init (GtkSourceVimIMContextClass *klass)
2,
GTK_TYPE_TEXT_ITER,
GTK_TYPE_TEXT_ITER);
+
+ /**
+ * GtkSourceVimIMContext::load-uri:
+ * @self: a #GtkSourceVimIMContext
+ * @uri: the URI of the buffer to load
+ * @line: the line number to load, starting from 0
+ * @line_offset: the offset within the line, starting from 0
+ *
+ * Requests that the application load the file @uri at @line and
+ * @line_offset.
+ *
+ * Since: 5.4
+ */
+ signals[LOAD_URI] =
+ g_signal_new ("load-uri",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ g_signal_accumulator_true_handled, NULL,
+ NULL,
+ G_TYPE_BOOLEAN,
+ 3,
+ G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE,
+ G_TYPE_UINT, G_TYPE_UINT);
+
+ /**
+ * GtkSourceVimIMContext::discover-uri:
+ * @self: a #GtkSourceVimIMContext
+ * @view: the loaded #GtkSourceView
+ *
+ * Requests the URI of the file loaded in @view. This is used when
+ * generating jump history so that the user may move back and forth
+ * during editing with Ctrl+I/Ctrl+0.
+ *
+ * Returns: A string containing the URI
+ *
+ * Since: 5.4
+ */
+ signals[DISCOVER_URI] =
+ g_signal_new ("discover-uri",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ g_signal_accumulator_first_wins, NULL,
+ NULL,
+ G_TYPE_STRING,
+ 1,
+ GTK_SOURCE_TYPE_VIEW);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]