[gtksourceview/wip/chergert/vim] more signals
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/chergert/vim] more signals
- Date: Tue, 9 Nov 2021 19:17:03 +0000 (UTC)
commit d397964260e7adacf9d2d1bf4a1b9aa043d69514
Author: Christian Hergert <chergert redhat com>
Date: Tue Nov 9 11:16:58 2021 -0800
more signals
gtksourceview/gtksourcevimimcontext.c | 48 +++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
---
diff --git a/gtksourceview/gtksourcevimimcontext.c b/gtksourceview/gtksourcevimimcontext.c
index dad4d247..86f67b17 100644
--- a/gtksourceview/gtksourcevimimcontext.c
+++ b/gtksourceview/gtksourcevimimcontext.c
@@ -64,6 +64,8 @@ enum {
FORMAT_TEXT,
DISCOVER_URI,
LOAD_URI,
+ OPEN,
+ SAVE,
N_SIGNALS
};
@@ -408,6 +410,52 @@ gtk_source_vim_im_context_class_init (GtkSourceVimIMContextClass *klass)
G_TYPE_STRING,
1,
GTK_SOURCE_TYPE_VIEW);
+
+ /**
+ * GtkSourceVimIMContext::save:
+ * @self: a #GtkSourceVimIMContext
+ * @view: the #GtkSourceView
+ * @path: (nullable): the path if provided, otherwise %NULL
+ *
+ * Requests the application save the file. If a filename was provided,
+ * it will be available to the signal handler as @path.
+ *
+ * Since: 5.4
+ */
+ signals[SAVE] =
+ g_signal_new ("save",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL,
+ NULL,
+ G_TYPE_NONE,
+ 2,
+ GTK_SOURCE_TYPE_VIEW,
+ G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ /**
+ * GtkSourceVimIMContext::open:
+ * @self: a #GtkSourceVimIMContext
+ * @view: the #GtkSourceView
+ * @path: (nullable): the path if provided, otherwise %NULL
+ *
+ * Requests the application open the file found at @path. If @path is
+ * %NULL, then the current file should be reloaded from storage.
+ *
+ * Since: 5.4
+ */
+ signals[OPEN] =
+ g_signal_new ("open",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL,
+ NULL,
+ G_TYPE_NONE,
+ 2,
+ GTK_SOURCE_TYPE_VIEW,
+ G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]