[gitg/vala] Implemented basic file listing plugin for commit



commit 59dcccd3d582a5ef67854b78d424838fb23f19f9
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date:   Tue Jul 17 16:41:01 2012 +0200

    Implemented basic file listing plugin for commit

 configure.ac                             |    3 +
 plugins/Makefile.am                      |    2 +-
 plugins/files/Makefile.am                |   53 +++
 plugins/files/files.plugin               |   11 +
 plugins/files/gitg-files-tree-store.vala |  164 ++++++++
 plugins/files/gitg-files.vala            |  246 +++++++++++
 plugins/files/resources/resources.xml    |    8 +
 plugins/files/resources/view-files.ui    |   67 +++
 vapi/gtksourceview-3.0.deps              |    7 +
 vapi/gtksourceview-3.0.vapi              |  651 ++++++++++++++++++++++++++++++
 10 files changed, 1211 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b75d86f..5c29745 100644
--- a/configure.ac
+++ b/configure.ac
@@ -240,11 +240,13 @@ GITG_PLUGIN_VALAFLAGS="				\
 	--pkg libgitg-gtk-1.0			\
 	--pkg gio-2.0				\
 	--pkg gtk+-3.0				\
+	--pkg gtksourceview-3.0			\
 	--pkg libpeas-1.0			\
 	--pkg gee-1.0				\
 	--pkg json-glib-1.0			\
 	--pkg webkitgtk-3.0			\
 	--pkg config				\
+	--pkg posix				\
 	\$(GITG_VALAFLAGS)			\
 	--vapidir \$(top_srcdir)/vapi		\
 	--vapidir \$(top_builddir)/libgitg	\
@@ -297,6 +299,7 @@ plugins/dash/Makefile
 plugins/history/Makefile
 plugins/diff/Makefile
 plugins/diff/icons/Makefile
+plugins/files/Makefile
 ])
 
 AC_OUTPUT
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 378a083..961592d 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = dash history diff
+SUBDIRS = dash history diff files
 
 -include $(top_srcdir)/git.mk
diff --git a/plugins/files/Makefile.am b/plugins/files/Makefile.am
new file mode 100644
index 0000000..06a868b
--- /dev/null
+++ b/plugins/files/Makefile.am
@@ -0,0 +1,53 @@
+INCLUDES =								\
+	-I$(top_srcdir)							\
+	-I$(srcdir)							\
+	$(GITG_PLUGIN_CFLAGS)						\
+	$(WARN_CFLAGS)							\
+	-DDATADIR=\""$(datadir)"\"					\
+	-DLIBDIR=\""$(libdir)"\"
+
+plugindir = $(GITG_PLUGIN_LIBDIR)
+plugin_LTLIBRARIES = libfiles.la
+plugin_DATA = files.plugin
+
+VALAFLAGS = $(GITG_PLUGIN_VALAFLAGS)
+VALA_SOURCES =								\
+	gitg-files.vala							\
+	gitg-files-tree-store.vala
+
+libfiles_la_LDFLAGS = $(GITG_PLUGIN_LIBTOOL_FLAGS)
+
+libfiles_la_LIBADD = $(GITG_PLUGIN_LIBS)
+libfiles_la_CFLAGS = -w
+
+libfiles_la_SOURCES = 				\
+	$(VALA_SOURCES)				\
+	gitg-files-resources.c
+
+BUILT_SOURCES = 						\
+	gitg-files-resources.c					\
+	gitg-files-resources.h
+
+gitg-files-resources.c: resources/resources.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir)/resources resources/resources.xml)
+	$(GLIB_COMPILE_RESOURCES) --generate-source 	\
+		--sourcedir $(srcdir)/resources 	\
+		--target "$@" "$<"
+
+gitg-files-resources.h: resources/resources.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir)/resources resources/resources.xml)
+	$(GLIB_COMPILE_RESOURCES) --generate-header 	\
+		--sourcedir $(srcdir)/resources 	\
+		--target "$@" "$<"
+
+EXTRA_DIST = $(plugin_DATA)			\
+	resources/resources.xml			\
+	$(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir)/resources resources/resources.xml)
+
+CLEANFILES = 					\
+	$(VALA_SOURCES:.vala=.c)		\
+	$(BUILT_SOURCES)			\
+	libfiles_la_vala.stamp
+
+install-data-hook:
+	rm -f $(GITG_PLUGIN_LIBDIR)/libfiles.la
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/files/files.plugin b/plugins/files/files.plugin
new file mode 100644
index 0000000..338b10a
--- /dev/null
+++ b/plugins/files/files.plugin
@@ -0,0 +1,11 @@
+[Plugin]
+Loader=C
+Module=files
+Name=Files
+Description=gitg repository files
+Authors=Jesse van den Kieboom <jessevdk gnome org>
+Copyright=Copyright  2012 Jesse van den Kieboom
+Website=
+Hidden=1
+Builtin=1
+Version=1.0
diff --git a/plugins/files/gitg-files-tree-store.vala b/plugins/files/gitg-files-tree-store.vala
new file mode 100644
index 0000000..750a3ff
--- /dev/null
+++ b/plugins/files/gitg-files-tree-store.vala
@@ -0,0 +1,164 @@
+/*
+ * This file is part of gitg
+ *
+ * Copyright (C) 2012 - Jesse van den Kieboom
+ *
+ * gitg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gitg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gitg. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace GitgFiles
+{
+
+public class TreeStore : Gtk.TreeStore
+{
+	private Ggit.Tree d_tree;
+
+	public Ggit.Tree? tree
+	{
+		get { return d_tree; }
+		set
+		{
+			d_tree = value;
+			update();
+		}
+	}
+
+	construct
+	{
+		set_column_types(new Type[] {typeof(string), typeof(bool), typeof(Ggit.OId)});
+
+		set_sort_func(0, (model, a, b) => {
+			string aname;
+			string bname;
+			bool aisdir;
+			bool bisdir;
+
+			model.get(a, 0, out aname, 1, out aisdir);
+			model.get(b, 0, out bname, 1, out bisdir);
+
+			if (aisdir == bisdir)
+			{
+				return strcmp(aname.collate_key_for_filename(),
+				              bname.collate_key_for_filename());
+			}
+			else if (aisdir)
+			{
+				return -1;
+			}
+			else
+			{
+				return 1;
+			}
+		});
+
+		set_sort_column_id(0, Gtk.SortType.ASCENDING);
+	}
+
+	public Ggit.OId get_id(Gtk.TreeIter iter)
+	{
+		Ggit.OId ret;
+
+		get(iter, 2, out ret);
+
+		return ret;
+	}
+
+	public string get_full_path(Gtk.TreeIter iter)
+	{
+		string ret = get_name(iter);
+		Gtk.TreeIter parent;
+
+		while (iter_parent(out parent, iter))
+		{
+			ret = Path.build_filename(get_name(parent), ret);
+			iter = parent;
+		}
+
+		return ret;
+	}
+
+	public string get_name(Gtk.TreeIter iter)
+	{
+		string ret;
+
+		get(iter, 0, out ret);
+
+		return ret;
+	}
+
+	public bool get_isdir(Gtk.TreeIter iter)
+	{
+		bool ret;
+
+		get(iter, 1, out ret);
+
+		return ret;
+	}
+
+	private void update()
+	{
+		clear();
+
+		if (d_tree == null)
+		{
+			return;
+		}
+
+		var paths = new HashTable<string, Gtk.TreePath>(str_hash, str_equal);
+
+		try
+		{
+			d_tree.walk((root, entry) => {
+				var attr = entry.get_attributes();
+				var isdir = Posix.S_ISDIR(attr);
+
+				Gtk.TreeIter? parent = null;
+
+				if (root != "")
+				{
+					get_iter(out parent, paths.lookup(root));
+				}
+
+				Gtk.TreeIter iter;
+				append(out iter, parent);
+				set(iter,
+				    0, entry.get_name(),
+				    1, isdir,
+				    2, entry.get_id());
+
+				if (isdir)
+				{
+					string path;
+
+					if (root == "")
+					{
+						path = entry.get_name() + Path.DIR_SEPARATOR_S;
+					}
+					else
+					{
+						path = root + entry.get_name() + Path.DIR_SEPARATOR_S;
+					}
+
+					paths.insert(path, get_path(iter));
+				}
+
+				return 0;
+			}, Ggit.TreeWalkMode.POST);
+		} catch (Error e) { }
+	}
+}
+
+}
+
+// vi:ts=4
diff --git a/plugins/files/gitg-files.vala b/plugins/files/gitg-files.vala
new file mode 100644
index 0000000..39e3f0f
--- /dev/null
+++ b/plugins/files/gitg-files.vala
@@ -0,0 +1,246 @@
+/*
+ * This file is part of gitg
+ *
+ * Copyright (C) 2012 - Jesse van den Kieboom
+ *
+ * gitg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gitg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gitg. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace GitgFiles
+{
+	public class Panel : Object, GitgExt.UIElement, GitgExt.Panel
+	{
+		// Do this to pull in config.h before glib.h (for gettext...)
+		private const string version = Gitg.Config.VERSION;
+
+		public GitgExt.Application? application { owned get; construct set; }
+		private GitgExt.ObjectSelection? d_view;
+
+		private TreeStore d_model;
+		private Gtk.Paned d_paned;
+		private GtkSource.View d_source;
+		private Settings d_fontsettings;
+		private Settings d_stylesettings;
+
+		construct
+		{
+			d_model = new TreeStore();
+		}
+
+		public string id
+		{
+			owned get { return "/org/gnome/gitg/Panels/Files"; }
+		}
+
+		public bool is_available()
+		{
+			var view = application.current_view;
+
+			if (view == null)
+			{
+				return false;
+			}
+
+			return (view is GitgExt.ObjectSelection);
+		}
+
+		public string display_name
+		{
+			owned get { return _("Files"); }
+		}
+
+		public Icon? icon
+		{
+			owned get { return new ThemedIcon("system-file-manager-symbolic"); }
+		}
+
+		private void on_selection_changed(GitgExt.ObjectSelection selection)
+		{
+			selection.foreach_selected((commit) => {
+				var c = commit as Ggit.Commit;
+
+				if (c != null)
+				{
+					d_model.tree = c.get_tree();
+					return false;
+				}
+
+				return true;
+			});
+		}
+
+		private Gee.HashMap<string, Object>? from_builder(string path, string[] ids)
+		{
+			var builder = new Gtk.Builder();
+
+			try
+			{
+				builder.add_from_resource("/org/gnome/gitg/files/" + path);
+			}
+			catch (Error e)
+			{
+				warning("Failed to load ui: %s", e.message);
+				return null;
+			}
+
+			Gee.HashMap<string, Object> ret = new Gee.HashMap<string, Object>();
+
+			foreach (string id in ids)
+			{
+				ret[id] = builder.get_object(id);
+			}
+
+			return ret;
+		}
+
+		private void update_font()
+		{
+			var fname = d_fontsettings.get_string("monospace-font-name");
+			d_source.override_font(Pango.FontDescription.from_string(fname));
+		}
+
+		private void update_style()
+		{
+			var scheme = d_stylesettings.get_string("scheme");
+			var manager = GtkSource.StyleSchemeManager.get_default();
+			var s = manager.get_scheme(scheme);
+
+			if (s != null)
+			{
+				var buf = d_source.get_buffer() as GtkSource.Buffer;
+				buf.set_style_scheme(s);
+			}
+		}
+
+		private void build_ui()
+		{
+			var ret = from_builder("view-files.ui", {"paned_files", "tree_view_files", "source_view_file"});
+
+			var tv = ret["tree_view_files"] as Gtk.TreeView;
+			tv.model = d_model;
+
+			tv.get_selection().changed.connect(selection_changed);
+
+			d_source = ret["source_view_file"] as GtkSource.View;
+			d_paned = ret["paned_files"] as Gtk.Paned;
+
+			d_fontsettings = new Settings("org.gnome.desktop.interface");
+
+			if (d_fontsettings != null)
+			{
+				d_fontsettings.changed["monospace-font-name"].connect((s, k) => {
+					update_font();
+				});
+			}
+
+			d_stylesettings = new Settings("org.gnome.gedit.preferences.editor");
+
+			if (d_stylesettings != null)
+			{
+				d_stylesettings.changed["scheme"].connect((s, k) => {
+					update_style();
+				});
+
+				update_style();
+			}
+
+			update_font();
+		}
+
+		public Gtk.Widget? widget
+		{
+			owned get
+			{
+				var objsel = (GitgExt.ObjectSelection)application.current_view;
+
+				if (objsel != d_view)
+				{
+					if (d_view != null)
+					{
+						d_view.selection_changed.disconnect(on_selection_changed);
+					}
+
+					d_view = objsel;
+					d_view.selection_changed.connect(on_selection_changed);
+
+					on_selection_changed(objsel);
+				}
+
+				if (d_paned == null)
+				{
+					build_ui();
+				}
+
+				return d_paned;
+			}
+		}
+
+		private void selection_changed(Gtk.TreeSelection selection)
+		{
+			Gtk.TreeModel mod;
+			Gtk.TreeIter iter;
+
+			selection.get_selected(out mod, out iter);
+
+			var buf = d_source.get_buffer() as GtkSource.Buffer;
+			buf.set_text("");
+
+			if (d_model.get_isdir(iter))
+			{
+				return;
+			}
+
+			var id = d_model.get_id(iter);
+			Ggit.Blob blob;
+
+			try
+			{
+				blob = application.repository.lookup(id, typeof(Ggit.Blob)) as Ggit.Blob;
+			} catch
+			{
+				return;
+			}
+
+			var fname = d_model.get_full_path(iter);
+			unowned uint8[] content = blob.get_content();
+
+			var ct = ContentType.guess(fname, content, null);
+
+			if (ContentType.is_a(ct, "text/plain"))
+			{
+				var manager = GtkSource.LanguageManager.get_default();
+
+				buf.set_text((string)content);
+				buf.language = manager.guess_language(fname, ct);
+			}
+		}
+
+		public bool is_enabled()
+		{
+			// TODO
+			return true;
+		}
+	}
+}
+
+[ModuleInit]
+public void peas_register_types(TypeModule module)
+{
+	Peas.ObjectModule mod = module as Peas.ObjectModule;
+
+	mod.register_extension_type(typeof(GitgExt.Panel),
+	                            typeof(GitgFiles.Panel));
+}
+
+// ex: ts=4 noet
diff --git a/plugins/files/resources/resources.xml b/plugins/files/resources/resources.xml
new file mode 100644
index 0000000..c1ff33e
--- /dev/null
+++ b/plugins/files/resources/resources.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/gitg/files">
+    <file>view-files.ui</file>
+  </gresource>
+</gresources>
+
+<!-- ex: et ts=2 -->
diff --git a/plugins/files/resources/view-files.ui b/plugins/files/resources/view-files.ui
new file mode 100644
index 0000000..9d27f2f
--- /dev/null
+++ b/plugins/files/resources/view-files.ui
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires gtksourceview 3.0 -->
+  <object class="GtkSourceBuffer" id="source_buffer_file"/>
+  <object class="GtkPaned" id="paned_files">
+    <property name="visible">True</property>
+    <property name="can_focus">True</property>
+    <property name="position">200</property>
+    <child>
+      <object class="GtkScrolledWindow" id="scrolled_window_files">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <child>
+          <object class="GtkTreeView" id="tree_view_files">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="headers_visible">False</property>
+            <property name="headers_clickable">False</property>
+            <property name="search_column">0</property>
+            <child internal-child="selection">
+              <object class="GtkTreeSelection" id="treeview-selection"/>
+            </child>
+            <child>
+              <object class="GtkTreeViewColumn" id="tree_view_column_file">
+                <property name="sizing">autosize</property>
+                <property name="title" translatable="yes">column</property>
+                <child>
+                  <object class="GtkCellRendererText" id="cell_renderer_name"/>
+                  <attributes>
+                    <attribute name="text">0</attribute>
+                  </attributes>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="resize">False</property>
+        <property name="shrink">True</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkScrolledWindow" id="scrolled_window_file">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <child>
+          <object class="GtkSourceView" id="source_view_file">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="buffer">source_buffer_file</property>
+            <property name="show_line_numbers">True</property>
+            <property name="show_right_margin">True</property>
+            <property name="smart_home_end">GTK_SOURCE_SMART_HOME_END_AFTER</property>
+            <property name="editable">False</property>
+            <property name="cursor_visible">False</property>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="resize">True</property>
+        <property name="shrink">True</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/vapi/gtksourceview-3.0.deps b/vapi/gtksourceview-3.0.deps
new file mode 100644
index 0000000..1306ac4
--- /dev/null
+++ b/vapi/gtksourceview-3.0.deps
@@ -0,0 +1,7 @@
+atk
+gdk-3.0
+gdk-pixbuf-2.0
+gio-2.0
+gtk+-3.0
+pango
+cairo
diff --git a/vapi/gtksourceview-3.0.vapi b/vapi/gtksourceview-3.0.vapi
new file mode 100644
index 0000000..0d6e008
--- /dev/null
+++ b/vapi/gtksourceview-3.0.vapi
@@ -0,0 +1,651 @@
+/* gtksourceview-3.0.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "GtkSource", gir_namespace = "GtkSource", gir_version = "3.0", lower_case_cprefix = "gtk_source_")]
+namespace GtkSource {
+	namespace CompletionCapability {
+		[CCode (cheader_filename = "gtksourceview/gtksource.h", cname = "GTK_SOURCE_COMPLETION_CAPABILITY_AUTOMATIC")]
+		public const string AUTOMATIC;
+		[CCode (cheader_filename = "gtksourceview/gtksource.h", cname = "GTK_SOURCE_COMPLETION_CAPABILITY_INTERACTIVE")]
+		public const string INTERACTIVE;
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_buffer_get_type ()")]
+	[GIR (name = "Buffer")]
+	public class Buffer : Gtk.TextBuffer {
+		[CCode (has_construct_function = false)]
+		public Buffer (Gtk.TextTagTable? table);
+		public bool backward_iter_to_source_mark (Gtk.TextIter iter, string? category);
+		public void begin_not_undoable_action ();
+		public unowned GtkSource.Mark create_source_mark (string? name, string category, Gtk.TextIter where);
+		public void end_not_undoable_action ();
+		public void ensure_highlight (Gtk.TextIter start, Gtk.TextIter end);
+		public bool forward_iter_to_source_mark (Gtk.TextIter iter, string? category);
+		[CCode (array_length = false, array_null_terminated = true)]
+		public string[] get_context_classes_at_iter (Gtk.TextIter iter);
+		public bool get_highlight_matching_brackets ();
+		public bool get_highlight_syntax ();
+		public unowned GtkSource.Language get_language ();
+		public int get_max_undo_levels ();
+		public GLib.SList<weak GtkSource.Mark> get_source_marks_at_iter (Gtk.TextIter iter, string? category);
+		public GLib.SList<weak GtkSource.Mark> get_source_marks_at_line (int line, string? category);
+		public unowned GtkSource.StyleScheme get_style_scheme ();
+		public unowned GtkSource.UndoManager get_undo_manager ();
+		public bool iter_backward_to_context_class_toggle (Gtk.TextIter iter, string context_class);
+		public bool iter_forward_to_context_class_toggle (Gtk.TextIter iter, string context_class);
+		public bool iter_has_context_class (Gtk.TextIter iter, string context_class);
+		public void remove_source_marks (Gtk.TextIter start, Gtk.TextIter end, string? category);
+		public void set_highlight_matching_brackets (bool highlight);
+		public void set_highlight_syntax (bool highlight);
+		public void set_language (GtkSource.Language? language);
+		public void set_max_undo_levels (int max_undo_levels);
+		public void set_style_scheme (GtkSource.StyleScheme? scheme);
+		public void set_undo_manager (GtkSource.UndoManager? manager);
+		[CCode (has_construct_function = false)]
+		public Buffer.with_language (GtkSource.Language language);
+		[NoAccessorMethod]
+		public bool can_redo { get; }
+		[NoAccessorMethod]
+		public bool can_undo { get; }
+		public bool highlight_matching_brackets { get; set; }
+		public bool highlight_syntax { get; set; }
+		public GtkSource.Language language { get; set; }
+		public int max_undo_levels { get; set; }
+		public GtkSource.StyleScheme style_scheme { get; set; }
+		public GtkSource.UndoManager undo_manager { get; set construct; }
+		public virtual signal void bracket_matched (Gtk.TextIter iter, GtkSource.BracketMatchType state);
+		public signal void highlight_updated (Gtk.TextIter object, Gtk.TextIter p0);
+		[HasEmitter]
+		public virtual signal void redo ();
+		public signal void source_mark_updated (Gtk.TextMark object);
+		[HasEmitter]
+		public virtual signal void undo ();
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_completion_get_type ()")]
+	[GIR (name = "Completion")]
+	public class Completion : GLib.Object {
+		[CCode (has_construct_function = false)]
+		protected Completion ();
+		public bool add_provider (GtkSource.CompletionProvider provider) throws GLib.Error;
+		public void block_interactive ();
+		public GtkSource.CompletionContext create_context (Gtk.TextIter? position);
+		public unowned GtkSource.CompletionInfo get_info_window ();
+		public unowned GLib.List<GtkSource.CompletionProvider> get_providers ();
+		public unowned GtkSource.View get_view ();
+		public void move_window (Gtk.TextIter iter);
+		[NoWrapper]
+		public virtual bool proposal_activated (GtkSource.CompletionProvider provider, GtkSource.CompletionProposal proposal);
+		public bool remove_provider (GtkSource.CompletionProvider provider) throws GLib.Error;
+		[CCode (cname = "gtk_source_completion_show")]
+		public bool start (GLib.List<GtkSource.CompletionProvider>? providers, owned GtkSource.CompletionContext context);
+		public void unblock_interactive ();
+		[NoAccessorMethod]
+		public uint accelerators { get; set construct; }
+		[NoAccessorMethod]
+		public uint auto_complete_delay { get; set construct; }
+		[NoAccessorMethod]
+		public uint proposal_page_size { get; set construct; }
+		[NoAccessorMethod]
+		public uint provider_page_size { get; set construct; }
+		[NoAccessorMethod]
+		public bool remember_info_visibility { get; set construct; }
+		[NoAccessorMethod]
+		public bool select_on_show { get; set construct; }
+		[NoAccessorMethod]
+		public bool show_headers { get; set construct; }
+		[NoAccessorMethod]
+		public bool show_icons { get; set construct; }
+		public GtkSource.View view { get; construct; }
+		public virtual signal void activate_proposal ();
+		[HasEmitter]
+		public virtual signal void hide ();
+		public virtual signal void move_cursor (Gtk.ScrollStep step, int num);
+		public virtual signal void move_page (Gtk.ScrollStep step, int num);
+		public virtual signal void populate_context (GtkSource.CompletionContext context);
+		public virtual signal void show ();
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_completion_context_get_type ()")]
+	[GIR (name = "CompletionContext")]
+	public class CompletionContext : GLib.InitiallyUnowned {
+		[CCode (has_construct_function = false)]
+		protected CompletionContext ();
+		public void add_proposals (GtkSource.CompletionProvider provider, GLib.List<GtkSource.CompletionProposal> proposals, bool finished);
+		public GtkSource.CompletionActivation get_activation ();
+		public Gtk.TextIter get_iter ();
+		[NoAccessorMethod]
+		public GtkSource.CompletionActivation activation { get; set; }
+		[NoAccessorMethod]
+		public GtkSource.Completion completion { owned get; construct; }
+		[NoAccessorMethod]
+		public Gtk.TextIter iter { get; set; }
+		public virtual signal void cancelled ();
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_completion_info_get_type ()")]
+	[GIR (name = "CompletionInfo")]
+	public class CompletionInfo : Gtk.Window, Atk.Implementor, Gtk.Buildable {
+		[CCode (has_construct_function = false)]
+		public CompletionInfo ();
+		public unowned Gtk.Widget get_widget ();
+		public void move_to_iter (Gtk.TextView view, Gtk.TextIter? iter);
+		public void set_widget (Gtk.Widget? widget);
+		public virtual signal void before_show ();
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_completion_item_get_type ()")]
+	[GIR (name = "CompletionItem")]
+	public class CompletionItem : GLib.Object, GtkSource.CompletionProposal {
+		[CCode (has_construct_function = false)]
+		public CompletionItem (string label, string text, Gdk.Pixbuf? icon, string? info);
+		[CCode (has_construct_function = false)]
+		public CompletionItem.from_stock (string? label, string text, string stock, string? info);
+		[CCode (has_construct_function = false)]
+		public CompletionItem.with_markup (string markup, string text, Gdk.Pixbuf? icon, string? info);
+		[NoAccessorMethod]
+		public Gdk.Pixbuf icon { owned get; set; }
+		[NoAccessorMethod]
+		public string info { owned get; set; }
+		[NoAccessorMethod]
+		public string label { owned get; set; }
+		[NoAccessorMethod]
+		public string markup { owned get; set; }
+		[NoAccessorMethod]
+		public string text { owned get; set; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_completion_words_get_type ()")]
+	[GIR (name = "CompletionWords")]
+	public class CompletionWords : GLib.Object, GtkSource.CompletionProvider {
+		[CCode (has_construct_function = false)]
+		public CompletionWords (string? name, Gdk.Pixbuf? icon);
+		public void register (Gtk.TextBuffer buffer);
+		public void unregister (Gtk.TextBuffer buffer);
+		[NoAccessorMethod]
+		public Gdk.Pixbuf icon { owned get; set construct; }
+		[NoAccessorMethod]
+		public int interactive_delay { get; set construct; }
+		[NoAccessorMethod]
+		public uint minimum_word_size { get; set construct; }
+		[NoAccessorMethod]
+		public string name { owned get; set construct; }
+		[NoAccessorMethod]
+		public int priority { get; set construct; }
+		[NoAccessorMethod]
+		public uint proposals_batch_size { get; set construct; }
+		[NoAccessorMethod]
+		public uint scan_batch_size { get; set construct; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_gutter_get_type ()")]
+	[GIR (name = "Gutter")]
+	public class Gutter : GLib.Object {
+		[CCode (has_construct_function = false)]
+		protected Gutter ();
+		public void get_padding (int xpad, int ypad);
+		public unowned GtkSource.GutterRenderer get_renderer_at_pos (int x, int y);
+		public unowned Gdk.Window get_window ();
+		public bool insert (GtkSource.GutterRenderer renderer, int position);
+		public void queue_draw ();
+		public void remove (GtkSource.GutterRenderer renderer);
+		public void reorder (GtkSource.GutterRenderer renderer, int position);
+		public void set_padding (int xpad, int ypad);
+		[NoAccessorMethod]
+		public GtkSource.View view { owned get; construct; }
+		[NoAccessorMethod]
+		public Gtk.TextWindowType window_type { get; construct; }
+		[NoAccessorMethod]
+		public int xpad { get; set construct; }
+		[NoAccessorMethod]
+		public int ypad { get; set construct; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_gutter_renderer_get_type ()")]
+	[GIR (name = "GutterRenderer")]
+	public abstract class GutterRenderer : GLib.InitiallyUnowned {
+		[CCode (has_construct_function = false)]
+		protected GutterRenderer ();
+		public virtual void begin (Cairo.Context cr, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.TextIter start, Gtk.TextIter end);
+		[NoWrapper]
+		public virtual void change_buffer (Gtk.TextBuffer old_buffer);
+		[NoWrapper]
+		public virtual void change_view (Gtk.TextView old_view);
+		public virtual void draw (Cairo.Context cr, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.TextIter start, Gtk.TextIter end, GtkSource.GutterRendererState state);
+		public virtual void end ();
+		public void get_alignment (out float xalign, out float yalign);
+		public GtkSource.GutterRendererAlignmentMode get_alignment_mode ();
+		public bool get_background (out Gdk.RGBA color);
+		public void get_padding (out int xpad, out int ypad);
+		public int get_size ();
+		public unowned Gtk.TextView get_view ();
+		public bool get_visible ();
+		public Gtk.TextWindowType get_window_type ();
+		public void set_alignment (float xalign, float yalign);
+		public void set_alignment_mode (GtkSource.GutterRendererAlignmentMode mode);
+		public void set_background (Gdk.RGBA? color);
+		public void set_padding (int xpad, int ypad);
+		public void set_size (int size);
+		public void set_visible (bool visible);
+		public GtkSource.GutterRendererAlignmentMode alignment_mode { get; set construct; }
+		[NoAccessorMethod]
+		public Gdk.RGBA background_rgba { get; set; }
+		[NoAccessorMethod]
+		public bool background_set { get; set construct; }
+		public int size { get; set construct; }
+		public Gtk.TextView view { get; }
+		public bool visible { get; set construct; }
+		public Gtk.TextWindowType window_type { get; }
+		[NoAccessorMethod]
+		public float xalign { get; set construct; }
+		[NoAccessorMethod]
+		public int xpad { get; set construct; }
+		[NoAccessorMethod]
+		public float yalign { get; set construct; }
+		[NoAccessorMethod]
+		public int ypad { get; set construct; }
+		[HasEmitter]
+		public virtual signal void activate (Gtk.TextIter iter, Cairo.RectangleInt area, Gdk.Event event);
+		[HasEmitter]
+		public virtual signal bool query_activatable (Gtk.TextIter iter, Cairo.RectangleInt area, Gdk.Event event);
+		[HasEmitter]
+		public virtual signal void query_data (Gtk.TextIter start, Gtk.TextIter end, GtkSource.GutterRendererState state);
+		[HasEmitter]
+		public virtual signal bool query_tooltip (Gtk.TextIter iter, Cairo.RectangleInt area, int x, int y, Gtk.Tooltip tooltip);
+		[HasEmitter]
+		public virtual signal void queue_draw ();
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_gutter_renderer_pixbuf_get_type ()")]
+	[GIR (name = "GutterRendererPixbuf")]
+	public class GutterRendererPixbuf : GtkSource.GutterRenderer {
+		[CCode (has_construct_function = false, type = "GtkGutterRenderer*")]
+		public GutterRendererPixbuf ();
+		public unowned GLib.Icon get_gicon ();
+		public unowned string get_icon_name ();
+		public unowned Gdk.Pixbuf get_pixbuf ();
+		public unowned string get_stock_id ();
+		public void set_gicon (GLib.Icon icon);
+		public void set_icon_name (string icon_name);
+		public void set_pixbuf (Gdk.Pixbuf pixbuf);
+		public void set_stock_id (string stock_id);
+		public GLib.Icon gicon { get; set; }
+		public string icon_name { get; set; }
+		public Gdk.Pixbuf pixbuf { get; set; }
+		public string stock_id { get; set; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_gutter_renderer_text_get_type ()")]
+	[GIR (name = "GutterRendererText")]
+	public class GutterRendererText : GtkSource.GutterRenderer {
+		[CCode (has_construct_function = false, type = "GtkGutterRenderer*")]
+		public GutterRendererText ();
+		public void measure (string text, int width, int height);
+		public void measure_markup (string markup, int width, int height);
+		public void set_markup (string markup, int length);
+		public void set_text (string text, int length);
+		[NoAccessorMethod]
+		public string markup { owned get; set construct; }
+		[NoAccessorMethod]
+		public string text { owned get; set construct; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_language_get_type ()")]
+	[GIR (name = "Language")]
+	public class Language : GLib.Object {
+		[CCode (has_construct_function = false)]
+		protected Language ();
+		[CCode (array_length = false, array_null_terminated = true)]
+		public string[] get_globs ();
+		public bool get_hidden ();
+		public unowned string get_id ();
+		public unowned string get_metadata (string name);
+		[CCode (array_length = false, array_null_terminated = true)]
+		public string[] get_mime_types ();
+		public unowned string get_name ();
+		public unowned string get_section ();
+		public unowned string get_style_fallback (string style_id);
+		[CCode (array_length = false, array_null_terminated = true)]
+		public string[] get_style_ids ();
+		public unowned string get_style_name (string style_id);
+		public bool hidden { get; }
+		public string id { get; }
+		public string name { get; }
+		public string section { get; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_language_manager_get_type ()")]
+	[GIR (name = "LanguageManager")]
+	public class LanguageManager : GLib.Object {
+		[CCode (has_construct_function = false)]
+		public LanguageManager ();
+		public static unowned GtkSource.LanguageManager get_default ();
+		public unowned GtkSource.Language get_language (string id);
+		[CCode (array_length = false, array_null_terminated = true)]
+		public unowned string[] get_language_ids ();
+		[CCode (array_length = false, array_null_terminated = true)]
+		public unowned string[] get_search_path ();
+		public unowned GtkSource.Language guess_language (string? filename, string? content_type);
+		public void set_search_path ([CCode (array_length = false, array_null_terminated = true)] string[]? dirs);
+		[CCode (array_length = false, array_null_terminated = true)]
+		public string[] language_ids { get; }
+		[CCode (array_length = false, array_null_terminated = true)]
+		public string[] search_path { get; set; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_mark_get_type ()")]
+	[GIR (name = "Mark")]
+	public class Mark : Gtk.TextMark {
+		[CCode (has_construct_function = false)]
+		public Mark (string name, string category);
+		public unowned string get_category ();
+		public unowned GtkSource.Mark next (string? category);
+		public unowned GtkSource.Mark prev (string category);
+		public string category { get; construct; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_mark_attributes_get_type ()")]
+	[GIR (name = "MarkAttributes")]
+	public class MarkAttributes : GLib.Object {
+		[CCode (has_construct_function = false)]
+		public MarkAttributes ();
+		public bool get_background (out Gdk.RGBA background);
+		public unowned GLib.Icon get_gicon ();
+		public unowned string get_icon_name ();
+		public unowned Gdk.Pixbuf get_pixbuf ();
+		public unowned string get_stock_id ();
+		public string get_tooltip_markup (GtkSource.Mark mark);
+		public string get_tooltip_text (GtkSource.Mark mark);
+		public unowned Gdk.Pixbuf render_icon (Gtk.Widget widget, int size);
+		public void set_background (Gdk.RGBA background);
+		public void set_gicon (GLib.Icon gicon);
+		public void set_icon_name (string icon_name);
+		public void set_pixbuf (Gdk.Pixbuf pixbuf);
+		public void set_stock_id (string stock_id);
+		[NoAccessorMethod]
+		public Gdk.RGBA background { get; set; }
+		public GLib.Icon gicon { get; set; }
+		public string icon_name { get; set; }
+		public Gdk.Pixbuf pixbuf { get; set; }
+		public string stock_id { get; set; }
+		public signal string query_tooltip_markup (GtkSource.Mark mark);
+		public signal string query_tooltip_text (GtkSource.Mark mark);
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_print_compositor_get_type ()")]
+	[GIR (name = "PrintCompositor")]
+	public class PrintCompositor : GLib.Object {
+		[CCode (has_construct_function = false)]
+		public PrintCompositor (GtkSource.Buffer buffer);
+		public void draw_page (Gtk.PrintContext context, int page_nr);
+		[CCode (has_construct_function = false)]
+		public PrintCompositor.from_view (GtkSource.View view);
+		public string get_body_font_name ();
+		public double get_bottom_margin (Gtk.Unit unit);
+		public unowned GtkSource.Buffer get_buffer ();
+		public string get_footer_font_name ();
+		public string get_header_font_name ();
+		public bool get_highlight_syntax ();
+		public double get_left_margin (Gtk.Unit unit);
+		public string get_line_numbers_font_name ();
+		public int get_n_pages ();
+		public double get_pagination_progress ();
+		public bool get_print_footer ();
+		public bool get_print_header ();
+		public uint get_print_line_numbers ();
+		public double get_right_margin (Gtk.Unit unit);
+		public uint get_tab_width ();
+		public double get_top_margin (Gtk.Unit unit);
+		public Gtk.WrapMode get_wrap_mode ();
+		public bool paginate (Gtk.PrintContext context);
+		public void set_body_font_name (string font_name);
+		public void set_bottom_margin (double margin, Gtk.Unit unit);
+		public void set_footer_font_name (string? font_name);
+		public void set_footer_format (bool separator, string? left, string? center, string? right);
+		public void set_header_font_name (string? font_name);
+		public void set_header_format (bool separator, string? left, string? center, string? right);
+		public void set_highlight_syntax (bool highlight);
+		public void set_left_margin (double margin, Gtk.Unit unit);
+		public void set_line_numbers_font_name (string? font_name);
+		public void set_print_footer (bool print);
+		public void set_print_header (bool print);
+		public void set_print_line_numbers (uint interval);
+		public void set_right_margin (double margin, Gtk.Unit unit);
+		public void set_tab_width (uint width);
+		public void set_top_margin (double margin, Gtk.Unit unit);
+		public void set_wrap_mode (Gtk.WrapMode wrap_mode);
+		public string body_font_name { owned get; set; }
+		public GtkSource.Buffer buffer { get; construct; }
+		public string footer_font_name { owned get; set; }
+		public string header_font_name { owned get; set; }
+		public bool highlight_syntax { get; set; }
+		public string line_numbers_font_name { owned get; set; }
+		public int n_pages { get; }
+		public bool print_footer { get; set; }
+		public bool print_header { get; set; }
+		public uint print_line_numbers { get; set; }
+		public uint tab_width { get; set; }
+		public Gtk.WrapMode wrap_mode { get; set; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_style_get_type ()")]
+	[GIR (name = "Style")]
+	public class Style : GLib.Object {
+		[CCode (has_construct_function = false)]
+		protected Style ();
+		public GtkSource.Style copy ();
+		[NoAccessorMethod]
+		public string background { owned get; construct; }
+		[NoAccessorMethod]
+		public bool background_set { get; construct; }
+		[NoAccessorMethod]
+		public bool bold { get; construct; }
+		[NoAccessorMethod]
+		public bool bold_set { get; construct; }
+		[NoAccessorMethod]
+		public string foreground { owned get; construct; }
+		[NoAccessorMethod]
+		public bool foreground_set { get; construct; }
+		[NoAccessorMethod]
+		public bool italic { get; construct; }
+		[NoAccessorMethod]
+		public bool italic_set { get; construct; }
+		[NoAccessorMethod]
+		public string line_background { owned get; construct; }
+		[NoAccessorMethod]
+		public bool line_background_set { get; construct; }
+		[NoAccessorMethod]
+		public bool strikethrough { get; construct; }
+		[NoAccessorMethod]
+		public bool strikethrough_set { get; construct; }
+		[NoAccessorMethod]
+		public bool underline { get; construct; }
+		[NoAccessorMethod]
+		public bool underline_set { get; construct; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_style_scheme_get_type ()")]
+	[GIR (name = "StyleScheme")]
+	public class StyleScheme : GLib.Object {
+		[CCode (has_construct_function = false)]
+		protected StyleScheme ();
+		[CCode (array_length = false, array_null_terminated = true)]
+		public unowned string[] get_authors ();
+		public unowned string get_description ();
+		public unowned string get_filename ();
+		public unowned string get_id ();
+		public unowned string get_name ();
+		public unowned GtkSource.Style get_style (string style_id);
+		public string description { get; }
+		public string filename { get; }
+		public string id { get; construct; }
+		public string name { get; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_style_scheme_manager_get_type ()")]
+	[GIR (name = "StyleSchemeManager")]
+	public class StyleSchemeManager : GLib.Object {
+		[CCode (has_construct_function = false)]
+		public StyleSchemeManager ();
+		public void append_search_path (string path);
+		public void force_rescan ();
+		public static unowned GtkSource.StyleSchemeManager get_default ();
+		public unowned GtkSource.StyleScheme get_scheme (string scheme_id);
+		[CCode (array_length = false, array_null_terminated = true)]
+		public unowned string[] get_scheme_ids ();
+		[CCode (array_length = false, array_null_terminated = true)]
+		public unowned string[] get_search_path ();
+		public void prepend_search_path (string path);
+		public void set_search_path ([CCode (array_length = false, array_null_terminated = true)] string[]? path);
+		[CCode (array_length = false, array_null_terminated = true)]
+		public string[] scheme_ids { get; }
+		[CCode (array_length = false, array_null_terminated = true)]
+		public string[] search_path { get; set; }
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_view_get_type ()")]
+	[GIR (name = "View")]
+	public class View : Gtk.TextView, Atk.Implementor, Gtk.Buildable, Gtk.Scrollable {
+		[CCode (has_construct_function = false, type = "GtkWidget*")]
+		public View ();
+		public bool get_auto_indent ();
+		public unowned GtkSource.Completion get_completion ();
+		public GtkSource.DrawSpacesFlags get_draw_spaces ();
+		public unowned GtkSource.Gutter get_gutter (Gtk.TextWindowType window_type);
+		public bool get_highlight_current_line ();
+		public bool get_indent_on_tab ();
+		public int get_indent_width ();
+		public bool get_insert_spaces_instead_of_tabs ();
+		public unowned GtkSource.MarkAttributes get_mark_attributes (string category, int priority);
+		public uint get_right_margin_position ();
+		public bool get_show_line_marks ();
+		public bool get_show_line_numbers ();
+		public bool get_show_right_margin ();
+		public GtkSource.SmartHomeEndType get_smart_home_end ();
+		public uint get_tab_width ();
+		public uint get_visual_column (Gtk.TextIter iter);
+		public void set_auto_indent (bool enable);
+		public void set_draw_spaces (GtkSource.DrawSpacesFlags flags);
+		public void set_highlight_current_line (bool hl);
+		public void set_indent_on_tab (bool enable);
+		public void set_indent_width (int width);
+		public void set_insert_spaces_instead_of_tabs (bool enable);
+		public void set_mark_attributes (string category, GtkSource.MarkAttributes attributes, int priority);
+		public void set_right_margin_position (uint pos);
+		public void set_show_line_marks (bool show);
+		public void set_show_line_numbers (bool show);
+		public void set_show_right_margin (bool show);
+		public void set_smart_home_end (GtkSource.SmartHomeEndType smart_he);
+		public void set_tab_width (uint width);
+		[CCode (has_construct_function = false, type = "GtkWidget*")]
+		public View.with_buffer (GtkSource.Buffer buffer);
+		public bool auto_indent { get; set; }
+		public GtkSource.Completion completion { get; }
+		public GtkSource.DrawSpacesFlags draw_spaces { get; set; }
+		public bool highlight_current_line { get; set; }
+		public bool indent_on_tab { get; set; }
+		public int indent_width { get; set; }
+		public bool insert_spaces_instead_of_tabs { get; set; }
+		public uint right_margin_position { get; set; }
+		public bool show_line_marks { get; set; }
+		public bool show_line_numbers { get; set; }
+		public bool show_right_margin { get; set; }
+		public GtkSource.SmartHomeEndType smart_home_end { get; set; }
+		public uint tab_width { get; set; }
+		public virtual signal void line_mark_activated (Gtk.TextIter iter, Gdk.Event event);
+		public virtual signal void move_lines (bool copy, int step);
+		public virtual signal void move_words (int step);
+		public virtual signal void redo ();
+		public virtual signal void show_completion ();
+		public virtual signal void undo ();
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_completion_proposal_get_type ()")]
+	[GIR (name = "CompletionProposal")]
+	public interface CompletionProposal : GLib.Object {
+		public virtual bool equal (GtkSource.CompletionProposal other);
+		public virtual unowned Gdk.Pixbuf get_icon ();
+		public abstract string get_info ();
+		public abstract string get_label ();
+		public abstract string get_markup ();
+		public abstract string get_text ();
+		public virtual uint hash ();
+		[HasEmitter]
+		public virtual signal void changed ();
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_completion_provider_get_type ()")]
+	[GIR (name = "CompletionProvider")]
+	public interface CompletionProvider : GLib.Object {
+		public virtual bool activate_proposal (GtkSource.CompletionProposal proposal, Gtk.TextIter iter);
+		public virtual GtkSource.CompletionActivation get_activation ();
+		public virtual unowned Gdk.Pixbuf? get_icon ();
+		public virtual unowned Gtk.Widget? get_info_widget (GtkSource.CompletionProposal proposal);
+		public virtual int get_interactive_delay ();
+		public virtual string get_name ();
+		public virtual int get_priority ();
+		public virtual bool get_start_iter (GtkSource.CompletionContext context, GtkSource.CompletionProposal proposal, Gtk.TextIter iter);
+		public virtual bool match (GtkSource.CompletionContext context);
+		public virtual void populate (GtkSource.CompletionContext context);
+		public virtual void update_info (GtkSource.CompletionProposal proposal, GtkSource.CompletionInfo info);
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", type_id = "gtk_source_undo_manager_get_type ()")]
+	[GIR (name = "UndoManager")]
+	public interface UndoManager : GLib.Object {
+		public abstract void begin_not_undoable_action ();
+		public abstract bool can_redo ();
+		public abstract bool can_undo ();
+		public abstract void end_not_undoable_action ();
+		public abstract void redo ();
+		public abstract void undo ();
+		[HasEmitter]
+		public virtual signal void can_redo_changed ();
+		[HasEmitter]
+		public virtual signal void can_undo_changed ();
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", cprefix = "GTK_SOURCE_BRACKET_MATCH_")]
+	[GIR (name = "BracketMatchType")]
+	public enum BracketMatchType {
+		NONE,
+		OUT_OF_RANGE,
+		NOT_FOUND,
+		FOUND
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", cprefix = "GTK_SOURCE_COMPLETION_ACTIVATION_")]
+	[Flags]
+	[GIR (name = "CompletionActivation")]
+	public enum CompletionActivation {
+		NONE,
+		INTERACTIVE,
+		USER_REQUESTED
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", cprefix = "GTK_SOURCE_DRAW_SPACES_")]
+	[Flags]
+	[GIR (name = "DrawSpacesFlags")]
+	public enum DrawSpacesFlags {
+		SPACE,
+		TAB,
+		NEWLINE,
+		NBSP,
+		LEADING,
+		TEXT,
+		TRAILING,
+		ALL
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", cprefix = "GTK_SOURCE_GUTTER_RENDERER_ALIGNMENT_MODE_")]
+	[GIR (name = "GutterRendererAlignmentMode")]
+	public enum GutterRendererAlignmentMode {
+		CELL,
+		FIRST,
+		LAST
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", cprefix = "GTK_SOURCE_GUTTER_RENDERER_STATE_")]
+	[Flags]
+	[GIR (name = "GutterRendererState")]
+	public enum GutterRendererState {
+		NORMAL,
+		CURSOR,
+		PRELIT,
+		SELECTED
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", cprefix = "GTK_SOURCE_SMART_HOME_END_")]
+	[GIR (name = "SmartHomeEndType")]
+	public enum SmartHomeEndType {
+		DISABLED,
+		BEFORE,
+		AFTER,
+		ALWAYS
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", cprefix = "GTK_SOURCE_VIEW_GUTTER_POSITION_")]
+	[GIR (name = "ViewGutterPosition")]
+	public enum ViewGutterPosition {
+		LINES,
+		MARKS
+	}
+	[CCode (cheader_filename = "gtksourceview/gtksource.h", cprefix = "GTK_SOURCE_COMPLETION_ERROR_")]
+	[GIR (name = "CompletionError")]
+	public errordomain CompletionError {
+		ALREADY_BOUND,
+		NOT_BOUND;
+		[CCode (cname = "gtk_source_completion_error_quark")]
+		public static GLib.Quark uark ();
+	}
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]