Commit 941a1b23 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

extend GLib.Value Gtk.TreeModel fixes add GtkSourceView bindings

2007-08-01  Juerg Billeter  <j@bitron.ch>

	* vapi/glib-2.0.vala: extend GLib.Value
	* vapi/gtk+-2.0.vala, vapi/packages/gtk+-2.0/gtk+-2.0.metadata,
	  vapigen/valagidlparser.vala: Gtk.TreeModel fixes
	* vapi/gtksourceview-2.0.vala, vapi/packages/gtksourceview-2.0/: add
	  GtkSourceView bindings

svn path=/trunk/; revision=416
parent 38d90699
2007-08-01 Jürg Billeter <j@bitron.ch>
* vapi/glib-2.0.vala: extend GLib.Value
* vapi/gtk+-2.0.vala, vapi/packages/gtk+-2.0/gtk+-2.0.metadata,
vapigen/valagidlparser.vala: Gtk.TreeModel fixes
* vapi/gtksourceview-2.0.vala, vapi/packages/gtksourceview-2.0/: add
GtkSourceView bindings
2007-07-30 Jürg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala, vapi/atk.vala,
......
......@@ -27,6 +27,10 @@ public struct bool {
[CCode (cname = "gpointer", cheader_filename = "glib.h", type_id = "G_TYPE_POINTER", marshaller_type_name = "POINTER", get_value_function = "g_value_get_pointer", set_value_function = "g_value_set_pointer", default_value = "NULL")]
public struct pointer {
[CCode (cname ="GPOINTER_TO_INT")]
public int to_int ();
[CCode (cname ="GPOINTER_TO_UINT")]
public uint to_uint ();
}
[CCode (cname = "gconstpointer", cheader_filename = "glib.h", type_id = "G_TYPE_POINTER", marshaller_type_name = "POINTER", get_value_function = "g_value_get_pointer", set_value_function = "g_value_set_pointer", default_value = "NULL")]
......@@ -78,6 +82,9 @@ public struct int {
[CCode (cname = "CLAMP")]
public int clamp (int low, int high);
[CCode (cname ="GINT_TO_POINTER")]
public pointer to_pointer ();
}
[CCode (cname = "guint", cheader_filename = "glib.h", type_id = "G_TYPE_UINT", marshaller_type_name = "UINT", get_value_function = "g_value_get_uint", set_value_function = "g_value_set_uint", default_value = "0U")]
......@@ -94,6 +101,9 @@ public struct uint {
[CCode (cname = "CLAMP")]
public uint clamp (uint low, uint high);
[CCode (cname ="GUINT_TO_POINTER")]
public pointer to_pointer ();
}
[CCode (cname = "gshort", cheader_filename = "glib.h", default_value = "0")]
......@@ -614,6 +624,7 @@ namespace GLib {
public void unref ();
public Object ref_sink ();
public void set (...);
public void get_property (string! property_name, Value value);
public virtual void dispose ();
public virtual void finalize ();
public virtual void constructed ();
......@@ -629,7 +640,57 @@ namespace GLib {
[ReferenceType (free_function = "g_free")]
public struct Value {
public weak Value init (Type g_type);
public void copy (Value dest_value);
public weak Value reset ();
public void unset ();
public void set_instance (pointer instance);
public bool fits_pointer ();
public pointer peek_pointer ();
public static bool type_compatible (Type src_type, Type dest_type);
public static bool type_transformable (Type src_type, Type dest_type);
public bool transform (Value dest_value);
[CCode (cname = "g_strdup_value_contents")]
public string strdup_contents ();
public void set_boolean (bool v_boolean);
public bool get_boolean ();
public void set_char (char v_char);
public char get_char ();
public void set_uchar (uchar v_uchar);
public uchar get_uchar ();
public void set_int (int v_int);
public int get_int ();
public void set_uint (uint v_uint);
public uint get_uint ();
public void set_long (long v_long);
public long get_long ();
public void set_ulong (ulong v_ulong);
public ulong get_ulong ();
public void set_int64 (int64 v_int64);
public int64 get_int64 ();
public void set_uint64 (uint64 v_uint64);
public uint64 get_uint64 ();
public void set_float (float v_float);
public float get_float ();
public void set_double (double v_double);
public double get_double ();
public void set_enum (int v_enum);
public int get_enum ();
public void set_flags (uint v_flags);
public uint get_flags ();
public void set_string (string v_string);
public void set_static_string (string v_string);
public void take_string (string# v_string);
public weak string get_string ();
public string dup_string ();
public void set_pointer (pointer v_pointer);
public pointer get_pointer ();
public void set_object (Object v_object);
public void take_object (Object# v_object);
public weak Object get_object ();
public Object dup_object ();
public void set_gtype (Type v_gtype);
public Type get_gtype ();
}
public struct SignalInvocationHint {
......
......@@ -5095,8 +5095,8 @@ namespace Gtk {
public bool get_iter_first (out Gtk.TreeIter iter);
public bool get_iter_from_string (out Gtk.TreeIter iter, string path_string);
public abstract int get_n_columns ();
public abstract weak Gtk.TreePath get_path (out Gtk.TreeIter iter);
public weak string get_string_from_iter (out Gtk.TreeIter iter);
public abstract Gtk.TreePath get_path (out Gtk.TreeIter iter);
public string get_string_from_iter (out Gtk.TreeIter iter);
public static GLib.Type get_type ();
public void get_valist (out Gtk.TreeIter iter, pointer var_args);
public abstract void get_value (out Gtk.TreeIter iter, int column, GLib.Value value);
......
[CCode (cprefix = "Gtk", lower_case_cprefix = "gtk_")]
namespace Gtk {
[CCode (cprefix = "GTK_SOURCE_CONTEXT_", cheader_filename = "gtksourceview/gtksourceview.h")]
public enum SourceContextFlags {
EXTEND_PARENT,
END_PARENT,
END_AT_LINE_END,
FIRST_LINE_ONLY,
ONCE_ONLY,
STYLE_INSIDE,
}
[CCode (cprefix = "GTK_SOURCE_CONTEXT_", cheader_filename = "gtksourceview/gtksourceview.h")]
public enum SourceContextRefOptions {
IGNORE_STYLE,
OVERRIDE_STYLE,
REF_ORIGINAL,
}
[CCode (cprefix = "GTK_SOURCE_SEARCH_", cheader_filename = "gtksourceview/gtksourceview.h")]
public enum SourceSearchFlags {
VISIBLE_ONLY,
TEXT_ONLY,
CASE_INSENSITIVE,
}
[CCode (cprefix = "GTK_SOURCE_SMART_HOME_END_", cheader_filename = "gtksourceview/gtksourceview.h")]
public enum SourceSmartHomeEndType {
DISABLED,
BEFORE,
AFTER,
ALWAYS,
}
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public class SourceBuffer : Gtk.TextBuffer {
public void begin_not_undoable_action ();
public weak Gtk.SourceMarker create_marker (string name, string type, out Gtk.TextIter where);
public void delete_marker (Gtk.SourceMarker marker);
public void end_not_undoable_action ();
public bool get_check_brackets ();
public weak Gtk.SourceMarker get_first_marker ();
public bool get_highlight ();
public void get_iter_at_marker (out Gtk.TextIter iter, Gtk.SourceMarker marker);
public weak Gtk.SourceLanguage get_language ();
public weak Gtk.SourceMarker get_last_marker ();
public weak Gtk.SourceMarker get_marker (string name);
public weak GLib.SList get_markers_in_region (out Gtk.TextIter begin, out Gtk.TextIter end);
public int get_max_undo_levels ();
public weak Gtk.SourceMarker get_next_marker (out Gtk.TextIter iter);
public weak Gtk.SourceMarker get_prev_marker (out Gtk.TextIter iter);
public weak Gtk.SourceStyleScheme get_style_scheme ();
public static GLib.Type get_type ();
public void move_marker (Gtk.SourceMarker marker, out Gtk.TextIter where);
public SourceBuffer (Gtk.TextTagTable table);
public SourceBuffer.with_language (Gtk.SourceLanguage language);
public void redo ();
public void set_check_brackets (bool check_brackets);
public void set_highlight (bool highlight);
public void set_language (Gtk.SourceLanguage language);
public void set_max_undo_levels (int max_undo_levels);
public void set_style_scheme (Gtk.SourceStyleScheme scheme);
public void undo ();
public weak bool check_brackets { get; set; }
public weak bool highlight { get; set; }
public weak int max_undo_levels { get; set; }
public weak Gtk.SourceLanguage language { get; set; }
[NoAccessorMethod]
public weak bool can_undo { get; }
[NoAccessorMethod]
public weak bool can_redo { get; }
public weak Gtk.SourceStyleScheme style_scheme { get; set; }
}
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public class SourceContextEngine : Gtk.SourceEngine {
}
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public class SourceEngine : GLib.Object {
}
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public class SourceLanguage : GLib.Object {
public weak string get_globs ();
public weak string get_id ();
public weak string get_metadata (string name);
public weak string get_mime_types ();
public weak string get_name ();
public weak string get_section ();
public static GLib.Type get_type ();
}
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public class SourceLanguageManager : GLib.Object {
public static weak Gtk.SourceLanguageManager get_default ();
public weak Gtk.SourceLanguage get_language_by_id (string id);
public weak string get_search_path ();
public static GLib.Type get_type ();
public weak GLib.SList list_languages ();
public SourceLanguageManager ();
public void set_search_path (string dirs);
public weak string[] search_path { get; set; }
}
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public class SourceMarker : GLib.Object {
public pointer get_buffer ();
public int get_line ();
public weak string get_marker_type ();
public weak string get_name ();
public static GLib.Type get_type ();
public weak Gtk.SourceMarker next ();
public weak Gtk.SourceMarker prev ();
public void set_marker_type (string type);
}
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public class SourceStyle : GLib.Object {
public weak Gtk.SourceStyle copy ();
public static GLib.Type get_type ();
[NoAccessorMethod]
public weak string background { get; construct; }
[NoAccessorMethod]
public weak string foreground { get; construct; }
[NoAccessorMethod]
public weak bool bold { get; construct; }
[NoAccessorMethod]
public weak bool italic { get; construct; }
[NoAccessorMethod]
public weak bool underline { get; construct; }
[NoAccessorMethod]
public weak bool strikethrough { get; construct; }
[NoAccessorMethod]
public weak bool foreground_set { get; construct; }
[NoAccessorMethod]
public weak bool background_set { get; construct; }
[NoAccessorMethod]
public weak bool bold_set { get; construct; }
[NoAccessorMethod]
public weak bool italic_set { get; construct; }
[NoAccessorMethod]
public weak bool underline_set { get; construct; }
[NoAccessorMethod]
public weak bool strikethrough_set { get; construct; }
}
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public class SourceStyleManager : GLib.Object {
public bool add_scheme (string filename);
public static weak Gtk.SourceStyleManager get_default ();
public weak Gtk.SourceStyleScheme get_scheme (string scheme_id);
public weak string get_search_path ();
public static GLib.Type get_type ();
public weak GLib.SList list_schemes ();
public SourceStyleManager ();
public void set_search_path (string path);
public weak string[] search_path { get; set; }
public signal void changed ();
}
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public class SourceStyleScheme : GLib.Object {
public bool get_current_line_color (Gdk.Color color);
public weak string get_id ();
public weak Gtk.SourceStyle get_matching_brackets_style ();
public weak string get_name ();
public weak Gtk.SourceStyle get_style (string style_name);
public static GLib.Type get_type ();
[NoAccessorMethod]
public weak string id { get; construct; }
[NoAccessorMethod]
public weak string name { get; set; }
}
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public class SourceView : Gtk.TextView {
public bool get_auto_indent ();
public bool get_highlight_current_line ();
public bool get_indent_on_tab ();
public bool get_insert_spaces_instead_of_tabs ();
public uint get_margin ();
public weak Gdk.Pixbuf get_marker_pixbuf (string marker_type);
public bool get_show_line_markers ();
public bool get_show_line_numbers ();
public bool get_show_margin ();
public Gtk.SourceSmartHomeEndType get_smart_home_end ();
public uint get_tabs_width ();
public static GLib.Type get_type ();
public SourceView ();
public SourceView.with_buffer (Gtk.SourceBuffer buffer);
public void set_auto_indent (bool enable);
public void set_highlight_current_line (bool show);
public void set_indent_on_tab (bool enable);
public void set_insert_spaces_instead_of_tabs (bool enable);
public void set_margin (uint margin);
public void set_marker_pixbuf (string marker_type, Gdk.Pixbuf pixbuf);
public void set_show_line_markers (bool show);
public void set_show_line_numbers (bool show);
public void set_show_margin (bool show);
public void set_smart_home_end (Gtk.SourceSmartHomeEndType smart_he);
public void set_tabs_width (uint width);
public weak bool show_line_numbers { get; set; }
public weak bool show_line_markers { get; set; }
public weak uint tabs_width { get; set; }
public weak bool auto_indent { get; set; }
public weak bool insert_spaces_instead_of_tabs { get; set; }
public weak bool show_margin { get; set; }
public weak uint margin { get; set; }
public weak Gtk.SourceSmartHomeEndType smart_home_end { get; set; }
public weak bool highlight_current_line { get; set; }
public weak bool indent_on_tab { get; set; }
public signal void undo ();
public signal void redo ();
}
[ReferenceType]
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public struct SourceContextData {
}
[ReferenceType]
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public struct SourceContextReplace {
}
[ReferenceType]
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public struct TextRegion {
public void add (out Gtk.TextIter _start, out Gtk.TextIter _end);
public void debug_print ();
public void destroy (bool delete_marks);
public weak Gtk.TextBuffer get_buffer ();
public void get_iterator (Gtk.TextRegionIterator iter, uint start);
public weak Gtk.TextRegion intersect (out Gtk.TextIter _start, out Gtk.TextIter _end);
public TextRegion (Gtk.TextBuffer buffer);
public bool nth_subregion (uint subregion, out Gtk.TextIter start, out Gtk.TextIter end);
public int subregions ();
public void subtract (out Gtk.TextIter _start, out Gtk.TextIter _end);
}
[ReferenceType]
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public struct TextRegionIterator {
public void get_subregion (out Gtk.TextIter start, out Gtk.TextIter end);
public bool is_end ();
public bool next ();
}
[ReferenceType]
[CCode (cheader_filename = "gtksourceview/gtksourceview.h")]
public struct Source {
public static bool iter_backward_search (out Gtk.TextIter iter, string str, Gtk.SourceSearchFlags flags, out Gtk.TextIter match_start, out Gtk.TextIter match_end, out Gtk.TextIter limit);
public static bool iter_forward_search (out Gtk.TextIter iter, string str, Gtk.SourceSearchFlags flags, out Gtk.TextIter match_start, out Gtk.TextIter match_end, out Gtk.TextIter limit);
}
}
......@@ -61,6 +61,8 @@ GtkToggleButton::toggled has_emitter="1"
GtkToolItem::set_tooltip has_emitter="1"
GtkTreeIter is_value_type="1"
gtk_tree_model_get ellipsis="1"
gtk_tree_model_get_path transfer_ownership="1"
gtk_tree_model_get_string_from_iter transfer_ownership="1"
GtkTreeModel::row_changed has_emitter="1"
GtkTreeModel::row_deleted has_emitter="1"
GtkTreeModel::row_has_child_toggled has_emitter="1"
......
gtksourceundomanager.c
gtksourceundomanager.h
This diff is collapsed.
Gtk cheader_filename="gtksourceview/gtksourceview.h"
gtk_source_buffer_can_redo hidden="1"
gtk_source_buffer_can_undo hidden="1"
GtkSourceBuffer::highlight_updated hidden="1"
GtkSourceBuffer::marker_updated hidden="1"
GtkTextIter is_value_type="1"
......@@ -766,6 +766,10 @@ public class Vala.GIdlParser : CodeVisitor {
if (eval (nv[1]) == "1") {
add_ellipsis = true;
}
} else if (nv[0] == "transfer_ownership") {
if (eval (nv[1]) == "1") {
return_type.transfers_ownership = true;
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment