From 8389528230853b9ddca8d4fdb373032daff47521 Mon Sep 17 00:00:00 2001 From: Juerg Billeter Date: Fri, 24 Aug 2007 07:10:26 +0000 Subject: [PATCH] write dup_function and free_function attribute values recognize ref, 2007-08-24 Juerg Billeter * vala/valainterfacewriter.vala, vala/valastruct.vala, gobject/valacodegenerator.vala: write dup_function and free_function attribute values * vapigen/valagidlparser.vala: recognize ref, unref, and free functions, GType arrays, and out parameters * vapi/glib-2.0.vala: mark Closure as reference type * vapi/atk.vala, vapi/gdk-2.0.vala, vapi/gio-standalone.vala, vapi/gstreamer-0.10.vala, vapi/gtk+-2.0.vala, vapi/gtksourceview-2.0.vala, vapi/libsoup-2.2.vala, vapi/pango.vala, vapi/vte.vala: regenerated * vapi/packages/atk/: update to ATK 1.19.6 * vapi/packages/gdk-2.0/, vapi/packages/gtk+-2.0/: update to GTK+ 2.11.6 * vapi/packages/gstreamer-0.10/: update to GStreamer 0.10.14 * vapi/packages/gtksourceview-2.0/: update to GtkSourceView 1.90.3 * vapi/packages/pango/: update to Pango 1.18.0 svn path=/trunk/; revision=498 --- ChangeLog | 18 ++ gobject/valacodegenerator.vala | 11 + vala/valainterfacewriter.vala | 19 +- vala/valastruct.vala | 20 +- vapi/atk.vala | 1 + vapi/gdk-2.0.vala | 20 +- vapi/gio-standalone.vala | 9 +- vapi/glib-2.0.vala | 3 +- vapi/gstreamer-0.10.vala | 26 +- vapi/gtk+-2.0.vala | 254 ++++++++--------- vapi/gtksourceview-2.0.vala | 95 ++++++- vapi/libsoup-2.2.vala | 4 +- vapi/packages/atk/atk.gidl | 3 + vapi/packages/gdk-2.0/gdk-2.0.gidl | 12 + vapi/packages/gstreamer-0.10/gstreamer-0.10.gidl | 90 ++++++- .../gstreamer-0.10/gstreamer-0.10.metadata | 1 + vapi/packages/gtk+-2.0/gtk+-2.0.gidl | 300 ++++++++++++++++----- vapi/packages/gtk+-2.0/gtk+-2.0.metadata | 2 + .../gtksourceview-2.0/gtksourceview-2.0.gidl | 74 ++++- vapi/packages/pango/pango.gidl | 22 +- vapi/pango.vala | 40 +-- vapi/vte.vala | 16 +- vapigen/valagidlparser.vala | 72 ++++- 23 files changed, 777 insertions(+), 335 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc28bd1..a6e0101 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2007-08-24 Jürg Billeter + + * vala/valainterfacewriter.vala, vala/valastruct.vala, + gobject/valacodegenerator.vala: write dup_function and free_function + attribute values + * vapigen/valagidlparser.vala: recognize ref, unref, and free functions, + GType arrays, and out parameters + * vapi/glib-2.0.vala: mark Closure as reference type + * vapi/atk.vala, vapi/gdk-2.0.vala, vapi/gio-standalone.vala, + vapi/gstreamer-0.10.vala, vapi/gtk+-2.0.vala, + vapi/gtksourceview-2.0.vala, vapi/libsoup-2.2.vala, vapi/pango.vala, + vapi/vte.vala: regenerated + * vapi/packages/atk/: update to ATK 1.19.6 + * vapi/packages/gdk-2.0/, vapi/packages/gtk+-2.0/: update to GTK+ 2.11.6 + * vapi/packages/gstreamer-0.10/: update to GStreamer 0.10.14 + * vapi/packages/gtksourceview-2.0/: update to GtkSourceView 1.90.3 + * vapi/packages/pango/: update to Pango 1.18.0 + 2007-08-21 Jürg Billeter * vapi/libxml-2.0.vala: fix typo, patch by Piotr Skamruk diff --git a/gobject/valacodegenerator.vala b/gobject/valacodegenerator.vala index bd79f7b..ff597f1 100644 --- a/gobject/valacodegenerator.vala +++ b/gobject/valacodegenerator.vala @@ -367,6 +367,10 @@ public class Vala.CodeGenerator : CodeVisitor { new CCodeMemberAccess.pointer ( new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), get_symbol_lock_name (m))); + if (mutex_type.data_type.get_free_function () == null) { + Report.error (mutex_type.data_type.source_reference, "The type `%s` doesn't contain a free function".printf (mutex_type.data_type.get_full_name ())); + return; + } fc.add_argument (new CCodeIdentifier (mutex_type.data_type.get_free_function ())); if (instance_dispose_fragment != null) { instance_dispose_fragment.append (new CCodeExpressionStatement (fc)); @@ -945,6 +949,9 @@ public class Vala.CodeGenerator : CodeVisitor { Report.warning (type.source_reference, "duplicating %s instance, use weak variable or explicitly invoke copy method".printf (type.data_type.name)); } dup_function = type.data_type.get_dup_function (); + if (dup_function == null) { + Report.error (type.data_type.source_reference, "The type `%s` doesn't contain a copy function".printf (type.data_type.get_full_name ())); + } } return new CCodeIdentifier (dup_function); } else if (type.type_parameter != null && current_type_symbol is Class) { @@ -963,6 +970,10 @@ public class Vala.CodeGenerator : CodeVisitor { } else { unref_function = type.data_type.get_free_function (); } + if (unref_function == null) { + Report.error (type.data_type.source_reference, "The type `%s` doesn't contain a free function".printf (type.data_type.get_full_name ())); + return null; + } return new CCodeIdentifier (unref_function); } else if (type.type_parameter != null && current_type_symbol is Class) { string func_name = "%s_destroy_func".printf (type.type_parameter.name.down ()); diff --git a/vala/valainterfacewriter.vala b/vala/valainterfacewriter.vala index fc976fc..4a47a80 100644 --- a/vala/valainterfacewriter.vala +++ b/vala/valainterfacewriter.vala @@ -160,7 +160,24 @@ public class Vala.InterfaceWriter : CodeVisitor { if (st.is_reference_type ()) { write_indent (); - write_string ("[ReferenceType]"); + write_string ("[ReferenceType"); + string copy_func = st.get_dup_function (); + string free_func = st.get_free_function (); + string default_free_func = st.get_default_free_function (); + if (copy_func != null || (free_func != null && (default_free_func == null || default_free_func != free_func))) { + write_string (" ("); + if (copy_func != null) { + write_string ("dup_function = \"%s\"".printf (copy_func)); + if (free_func != null) { + write_string (", "); + } + } + if (free_func != null) { + write_string ("free_function = \"%s\"".printf (free_func)); + } + write_string (")"); + } + write_string ("]"); } write_indent (); diff --git a/vala/valastruct.vala b/vala/valastruct.vala index 2d512e1..08ebf33 100644 --- a/vala/valastruct.vala +++ b/vala/valastruct.vala @@ -320,28 +320,28 @@ public class Vala.Struct : DataType { } public override string get_dup_function () { - if (dup_function == null) { - Report.error (source_reference, "The type `%s` doesn't contain a copy function".printf (get_full_name ())); - } return dup_function; } public void set_dup_function (string! name) { this.dup_function = name; } - + + public string get_default_free_function () { + if (default_construction_method != null) { + return get_lower_case_cprefix () + "free"; + } + return null; + } + public override string get_free_function () { if (free_function == null) { - if (default_construction_method != null) { - free_function = get_lower_case_cprefix () + "free"; - } else { - Report.error (source_reference, "The type `%s` doesn't contain a free function".printf (get_full_name ())); - } + free_function = get_default_free_function (); } return free_function; } - private void set_free_function (string! name) { + public void set_free_function (string! name) { this.free_function = name; } diff --git a/vapi/atk.vala b/vapi/atk.vala index 344c10d..ea254e3 100644 --- a/vapi/atk.vala +++ b/vapi/atk.vala @@ -655,6 +655,7 @@ namespace Atk { public static weak Atk.Object get_root (); public static weak string get_toolkit_name (); public static weak string get_toolkit_version (); + public static weak string get_version (); public static void remove_focus_tracker (uint tracker_id); public static void remove_global_event_listener (uint listener_id); public static void remove_key_event_listener (uint listener_id); diff --git a/vapi/gdk-2.0.vala b/vapi/gdk-2.0.vala index 322e30b..23c053c 100644 --- a/vapi/gdk-2.0.vala +++ b/vapi/gdk-2.0.vala @@ -683,7 +683,7 @@ namespace Gdk { [CCode (cname = "gdk_draw_glyphs")] public virtual void draw_glyphs (Gdk.GC gc, Pango.Font font, int x, int y, Pango.GlyphString glyphs); [CCode (cname = "gdk_draw_glyphs_transformed")] - public virtual void draw_glyphs_transformed (Gdk.GC gc, Pango.Matrix matrix, Pango.Font font, int x, int y, Pango.GlyphString glyphs); + public virtual void draw_glyphs_transformed (Gdk.GC gc, out Pango.Matrix matrix, Pango.Font font, int x, int y, Pango.GlyphString glyphs); [NoArrayLength] [CCode (cname = "gdk_draw_gray_image")] public void draw_gray_image (Gdk.GC gc, int x, int y, int width, int height, Gdk.RgbDither dith, uchar[] buf, int rowstride); @@ -804,6 +804,7 @@ namespace Gdk { public bool get_entries_for_keyval (uint keyval, Gdk.KeymapKey[] keys, int n_keys); public static weak Gdk.Keymap get_for_display (Gdk.Display display); public static GLib.Type get_type (); + public bool have_bidi_layouts (); public uint lookup_key (Gdk.KeymapKey key); public bool translate_keyboard_state (uint hardware_keycode, Gdk.ModifierType state, int group, uint keyval, int effective_group, int level, Gdk.ModifierType consumed_modifiers); public signal void direction_changed (); @@ -824,6 +825,7 @@ namespace Gdk { [CCode (cheader_filename = "gdk/gdk.h")] public class Pixbuf : GLib.Object { public weak Gdk.Pixbuf add_alpha (bool substitute_color, uchar r, uchar g, uchar b); + public weak Gdk.Pixbuf apply_embedded_orientation (); public void composite (Gdk.Pixbuf dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, Gdk.InterpType interp_type, int overall_alpha); public void composite_color (Gdk.Pixbuf dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, Gdk.InterpType interp_type, int overall_alpha, int check_x, int check_y, int check_size, uint color1, uint color2); public weak Gdk.Pixbuf composite_color_simple (int dest_width, int dest_height, Gdk.InterpType interp_type, int overall_alpha, int check_size, uint color1, uint color2); @@ -891,7 +893,7 @@ namespace Gdk { [CCode (cheader_filename = "gdk/gdk.h")] public class PixbufAnimation : GLib.Object { public int get_height (); - public weak Gdk.PixbufAnimationIter get_iter (GLib.TimeVal start_time); + public weak Gdk.PixbufAnimationIter get_iter (out GLib.TimeVal start_time); public weak Gdk.Pixbuf get_static_image (); public static GLib.Type get_type (); public int get_width (); @@ -900,7 +902,7 @@ namespace Gdk { } [CCode (cheader_filename = "gdk/gdk.h")] public class PixbufAnimationIter : GLib.Object { - public bool advance (GLib.TimeVal current_time); + public bool advance (out GLib.TimeVal current_time); public int get_delay_time (); public weak Gdk.Pixbuf get_pixbuf (); public static GLib.Type get_type (); @@ -1168,8 +1170,6 @@ namespace Gdk { public Gdk.Color copy (); [InstanceByReference] public bool equal (out Gdk.Color colorb); - [InstanceByReference] - public void free (); public static GLib.Type get_type (); [InstanceByReference] public uint hash (); @@ -1177,7 +1177,7 @@ namespace Gdk { [InstanceByReference] public weak string to_string (); } - [ReferenceType (free_function = "gdk_cursor_unref")] + [ReferenceType (dup_function = "gdk_cursor_ref", free_function = "gdk_cursor_unref")] [CCode (cheader_filename = "gdk/gdk.h")] public struct Cursor { public Gdk.CursorType type; @@ -1189,8 +1189,6 @@ namespace Gdk { public Cursor.from_name (Gdk.Display display, string name); public Cursor.from_pixbuf (Gdk.Display display, Gdk.Pixbuf pixbuf, int x, int y); public Cursor.from_pixmap (Gdk.Pixmap source, Gdk.Pixmap mask, out Gdk.Color fg, out Gdk.Color bg, int x, int y); - public weak Gdk.Cursor @ref (); - public void unref (); } [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] @@ -1431,7 +1429,7 @@ namespace Gdk { public Gdk.WindowState changed_mask; public Gdk.WindowState new_window_state; } - [ReferenceType] + [ReferenceType (dup_function = "gdk_font_ref", free_function = "gdk_font_unref")] [CCode (cheader_filename = "gdk/gdk.h")] public struct Font { public Gdk.FontType type; @@ -1627,7 +1625,6 @@ namespace Gdk { public struct RgbCmap { public uint colors; public int n_colors; - public void free (); [NoArrayLength] public RgbCmap (uint[] colors, int n_colors); } @@ -1744,7 +1741,7 @@ namespace Gdk { [CCode (cheader_filename = "gdk/gdk.h")] public struct Char { } - [ReferenceType] + [ReferenceType (free_function = "gdk_colors_free")] [CCode (cheader_filename = "gdk/gdk.h")] public struct Colors { } @@ -1779,7 +1776,6 @@ namespace Gdk { [CCode (cheader_filename = "gdk/gdk.h")] public struct Event { public weak Gdk.Event copy (); - public void free (); public static weak Gdk.Event get (); public bool get_axis (Gdk.AxisUse axis_use, double value); public bool get_coords (double x_win, double y_win); diff --git a/vapi/gio-standalone.vala b/vapi/gio-standalone.vala index b609917..8b5c707 100644 --- a/vapi/gio-standalone.vala +++ b/vapi/gio-standalone.vala @@ -183,7 +183,7 @@ namespace GLib { public GLib.FileType get_file_type (); public GLib.FileFlags get_flags (); public weak string get_icon (); - public void get_modification_time (GLib.TimeVal result); + public void get_modification_time (out GLib.TimeVal result); public weak string get_name (); public int64 get_size (); public weak string get_symlink_target (); @@ -204,7 +204,7 @@ namespace GLib { public void set_file_type (GLib.FileType type); public void set_flags (GLib.FileFlags flags); public void set_icon (string icon); - public void set_modification_time (GLib.TimeVal mtime); + public void set_modification_time (out GLib.TimeVal mtime); public void set_name (string name); public void set_size (int64 size); public void set_symlink_target (string symlink_target); @@ -227,10 +227,10 @@ namespace GLib { [CCode (cheader_filename = "gio/gvfs.h")] public class FileOutputStream : GLib.OutputStream { public virtual weak GLib.FileInfo get_file_info (string attributes, GLib.Cancellable cancellable, GLib.Error error); - public void get_final_mtime (GLib.TimeVal mtime); + public void get_final_mtime (out GLib.TimeVal mtime); public bool get_should_get_final_mtime (); public static GLib.Type get_type (); - public void set_final_mtime (GLib.TimeVal final_mtime); + public void set_final_mtime (out GLib.TimeVal final_mtime); public void set_should_get_final_mtime (bool get_final_mtime); } [CCode (cheader_filename = "gio/gvfs.h")] @@ -606,7 +606,6 @@ namespace GLib { public struct FileAttributeMatcher { public bool enumerate_namespace (string @namespace); public weak string enumerate_next (); - public void free (); public bool matches (string full_name); public bool matches_only (string full_name); public FileAttributeMatcher (string attributes); diff --git a/vapi/glib-2.0.vala b/vapi/glib-2.0.vala index cd5f763..995e578 100644 --- a/vapi/glib-2.0.vala +++ b/vapi/glib-2.0.vala @@ -732,7 +732,8 @@ namespace GLib { } public static delegate void Callback (); - + + [ReferenceType] public struct Closure { } diff --git a/vapi/gstreamer-0.10.vala b/vapi/gstreamer-0.10.vala index 882fc94..06418e9 100644 --- a/vapi/gstreamer-0.10.vala +++ b/vapi/gstreamer-0.10.vala @@ -540,7 +540,6 @@ namespace Gst { public Buffer.and_alloc (uint size); public void set_caps (Gst.Caps caps); public weak Gst.Buffer span (uint offset, Gst.Buffer buf2, uint len); - public void stamp (Gst.Buffer src); public static weak Gst.Buffer try_new_and_alloc (uint size); } [CCode (cheader_filename = "gst/gst.h")] @@ -627,6 +626,7 @@ namespace Gst { public static weak GLib.List class_get_pad_template_list (pointer element_class); public static void class_install_std_props (pointer klass, ...); public static void class_set_details (pointer klass, Gst.ElementDetails details); + public static void class_set_details_simple (pointer klass, string longname, string classification, string description, string author); public Gst.StateChangeReturn continue_state (Gst.StateChangeReturn ret); public void create_all_pads (); public void found_tags (Gst.TagList list); @@ -703,6 +703,7 @@ namespace Gst { public static GLib.Type get_type (); public weak string get_uri_protocols (); public int get_uri_type (); + public bool has_interface (string interfacename); public static weak Gst.Element make (string factoryname, string name); } [CCode (cheader_filename = "gst/gst.h")] @@ -994,6 +995,10 @@ namespace Gst { public signal void pad_created (Gst.Pad pad); } [CCode (cheader_filename = "gst/gst.h")] + public class ParamSpecFraction : GLib.ParamSpec, GLib.Object { + public static GLib.Type get_type (); + } + [CCode (cheader_filename = "gst/gst.h")] public class Pipeline : Gst.Bin { public weak Gst.Clock fixed_clock; public uint64 stream_time; @@ -1143,6 +1148,8 @@ namespace Gst { } [CCode (cheader_filename = "gst/gst.h")] public class XML : Gst.Object { + public weak GLib.List topelements; + public pointer ns; [NoArrayLength] public weak Gst.Element get_element (uchar[] name); public weak GLib.List get_topelements (); @@ -1251,7 +1258,7 @@ namespace Gst { [CCode (cheader_filename = "gst/gst.h")] public struct BinaryTypeFindFactory { } - [ReferenceType] + [ReferenceType (dup_function = "gst_caps_ref", free_function = "gst_caps_unref")] [CCode (cheader_filename = "gst/gst.h")] public struct Caps { public GLib.Type type; @@ -1284,7 +1291,6 @@ namespace Gst { public Caps.full_valist (Gst.Structure structure, pointer var_args); public Caps.simple (string media_type, string fieldname); public weak Gst.Caps normalize (); - public weak Gst.Caps @ref (); public void remove_structure (uint idx); public void replace (Gst.Caps newcaps); public pointer save_thyself (pointer parent); @@ -1294,7 +1300,6 @@ namespace Gst { public weak string to_string (); public void truncate (); public weak Gst.Caps union (Gst.Caps caps2); - public void unref (); } [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] @@ -1338,12 +1343,11 @@ namespace Gst { public Gst.Format format; public int64 value; } - [ReferenceType] + [ReferenceType (free_function = "gst_index_entry_free")] [CCode (cheader_filename = "gst/gst.h")] public struct IndexEntry { public bool assoc_map (Gst.Format format, int64 value); public weak Gst.IndexEntry copy (); - public void free (); public static GLib.Type get_type (); } [ReferenceType] @@ -1408,7 +1412,6 @@ namespace Gst { public int64 duration; public double applied_rate; public bool clip (Gst.Format format, int64 start, int64 stop, int64 clip_start, int64 clip_stop); - public void free (); public static GLib.Type get_type (); public void init (Gst.Format format); public Segment (); @@ -1450,7 +1453,6 @@ namespace Gst { public bool fixate_field_nearest_fraction (string field_name, int target_numerator, int target_denominator); public bool fixate_field_nearest_int (string field_name, int target); public bool @foreach (Gst.StructureForeachFunc func, pointer user_data); - public void free (); public static weak Gst.Structure from_string (string string, string end); public bool get_boolean (string fieldname, bool value); public bool get_clock_time (string fieldname, uint64 value); @@ -1501,7 +1503,6 @@ namespace Gst { public weak Gst.TagList copy (); public static bool copy_value (GLib.Value dest, Gst.TagList list, string tag); public void @foreach (Gst.TagForeachFunc func, pointer user_data); - public void free (); public bool get_boolean (string tag, bool value); public bool get_boolean_index (string tag, uint index, bool value); public bool get_char (string tag, string value); @@ -1611,6 +1612,12 @@ namespace Gst { } [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] + public struct Param { + public static weak GLib.ParamSpec spec_fraction (string name, string nick, string blurb, int min_num, int min_denom, int max_num, int max_denom, int default_num, int default_denom, GLib.ParamFlags flags); + public static weak GLib.ParamSpec spec_mini_object (string name, string nick, string blurb, GLib.Type object_type, GLib.ParamFlags flags); + } + [ReferenceType] + [CCode (cheader_filename = "gst/gst.h")] public struct Print { public static void element_args (GLib.String buf, int indent, Gst.Element element); public static void pad_caps (GLib.String buf, int indent, Gst.Pad pad); @@ -1780,7 +1787,6 @@ namespace Gst { public static GLib.Type int_range_get_type (); public static bool is_tag_list (pointer p); public static GLib.Quark library_error_quark (); - public static weak GLib.ParamSpec param_spec_mini_object (string name, string nick, string blurb, GLib.Type object_type, GLib.ParamFlags flags); public static weak Gst.Element parse_bin_from_description (string bin_description, bool ghost_unconnected_pads, GLib.Error err); public static GLib.Quark parse_error_quark (); public static weak Gst.Element parse_launch (string pipeline_description, GLib.Error error); diff --git a/vapi/gtk+-2.0.vala b/vapi/gtk+-2.0.vala index 74ef52b..0bb640f 100644 --- a/vapi/gtk+-2.0.vala +++ b/vapi/gtk+-2.0.vala @@ -63,6 +63,8 @@ namespace Gtk { MISSING_ATTRIBUTE, INVALID_ATTRIBUTE, INVALID_TAG, + MISSING_PROPERTY_VALUE, + INVALID_VALUE, } [CCode (cprefix = "GTK_BUTTONBOX_", cheader_filename = "gtk/gtk.h")] public enum ButtonBoxStyle { @@ -1007,7 +1009,7 @@ namespace Gtk { public virtual weak Gtk.Widget create_tool_item (); public void disconnect_accelerator (); public virtual void disconnect_proxy (Gtk.Widget proxy); - public GLib.Closure get_accel_closure (); + public weak GLib.Closure get_accel_closure (); public weak string get_accel_path (); public weak string get_name (); public weak GLib.SList get_proxies (); @@ -1227,8 +1229,8 @@ namespace Gtk { public virtual GLib.Type get_type_from_name (string type_name); public Builder (); public void set_translation_domain (string domain); - public static bool value_from_string (GLib.ParamSpec pspec, string string, GLib.Value value); - public static bool value_from_string_type (GLib.Type type, string string, GLib.Value value); + public bool value_from_string (GLib.ParamSpec pspec, string string, GLib.Value value, GLib.Error error); + public bool value_from_string_type (GLib.Type type, string string, GLib.Value value, GLib.Error error); public weak string translation_domain { get; set; } } [CCode (cheader_filename = "gtk/gtk.h")] @@ -1324,13 +1326,13 @@ namespace Gtk { } [CCode (cheader_filename = "gtk/gtk.h")] public class CellRenderer : Gtk.Object { - public virtual bool activate (Gdk.Event event, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags); + public virtual bool activate (Gdk.Event event, Gtk.Widget widget, string path, out Gdk.Rectangle background_area, out Gdk.Rectangle cell_area, Gtk.CellRendererState flags); public void get_fixed_size (int width, int height); - public virtual void get_size (Gtk.Widget widget, Gdk.Rectangle cell_area, int x_offset, int y_offset, int width, int height); + public virtual void get_size (Gtk.Widget widget, out Gdk.Rectangle cell_area, int x_offset, int y_offset, int width, int height); public static GLib.Type get_type (); - public virtual void render (Gdk.Window window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags); + public virtual void render (Gdk.Window window, Gtk.Widget widget, out Gdk.Rectangle background_area, out Gdk.Rectangle cell_area, out Gdk.Rectangle expose_area, Gtk.CellRendererState flags); public void set_fixed_size (int width, int height); - public virtual weak Gtk.CellEditable start_editing (Gdk.Event event, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags); + public virtual weak Gtk.CellEditable start_editing (Gdk.Event event, Gtk.Widget widget, string path, out Gdk.Rectangle background_area, out Gdk.Rectangle cell_area, Gtk.CellRendererState flags); public void stop_editing (bool canceled); [NoAccessorMethod] public weak Gtk.CellRendererMode mode { get; set; } @@ -1527,7 +1529,7 @@ namespace Gtk { public CellView.with_markup (string markup); public CellView.with_pixbuf (Gdk.Pixbuf pixbuf); public CellView.with_text (string text); - public void set_background_color (Gdk.Color color); + public void set_background_color (out Gdk.Color color); public void set_displayed_row (Gtk.TreePath path); public void set_model (Gtk.TreeModel model); [NoAccessorMethod] @@ -1586,7 +1588,7 @@ namespace Gtk { public void store (); public weak Gtk.SelectionData wait_for_contents (Gdk.Atom target); public weak Gdk.Pixbuf wait_for_image (); - public uchar wait_for_rich_text (Gtk.TextBuffer buffer, Gdk.Atom format, ulong length); + public uchar wait_for_rich_text (Gtk.TextBuffer buffer, out Gdk.Atom format, ulong length); [NoArrayLength] public bool wait_for_targets (Gdk.Atom[] targets, int n_targets); public weak string wait_for_text (); @@ -1599,14 +1601,14 @@ namespace Gtk { [CCode (cheader_filename = "gtk/gtk.h")] public class ColorButton : Gtk.Button { public ushort get_alpha (); - public void get_color (Gdk.Color color); + public void get_color (out Gdk.Color color); public weak string get_title (); public static GLib.Type get_type (); public bool get_use_alpha (); public ColorButton (); - public ColorButton.with_color (Gdk.Color color); + public ColorButton.with_color (out Gdk.Color color); public void set_alpha (ushort alpha); - public void set_color (Gdk.Color color); + public void set_color (out Gdk.Color color); public void set_title (string title); public void set_use_alpha (bool use_alpha); public weak bool use_alpha { get; set; } @@ -1618,11 +1620,11 @@ namespace Gtk { [CCode (cheader_filename = "gtk/gtk.h")] public class ColorSelection : Gtk.VBox { public ushort get_current_alpha (); - public void get_current_color (Gdk.Color color); + public void get_current_color (out Gdk.Color color); public bool get_has_opacity_control (); public bool get_has_palette (); public ushort get_previous_alpha (); - public void get_previous_color (Gdk.Color color); + public void get_previous_color (out Gdk.Color color); public static GLib.Type get_type (); public bool is_adjusting (); public ColorSelection (); @@ -1632,11 +1634,11 @@ namespace Gtk { public static weak string palette_to_string (Gdk.Color[] colors, int n_colors); public static Gtk.ColorSelectionChangePaletteWithScreenFunc set_change_palette_with_screen_hook (Gtk.ColorSelectionChangePaletteWithScreenFunc func); public void set_current_alpha (ushort alpha); - public void set_current_color (Gdk.Color color); + public void set_current_color (out Gdk.Color color); public void set_has_opacity_control (bool has_opacity); public void set_has_palette (bool has_palette); public void set_previous_alpha (ushort alpha); - public void set_previous_color (Gdk.Color color); + public void set_previous_color (out Gdk.Color color); public weak bool has_opacity_control { get; set; } public weak bool has_palette { get; set; } public weak Gdk.Color current_color { get; set; } @@ -2227,6 +2229,7 @@ namespace Gtk { } [CCode (cheader_filename = "gtk/gtk.h")] public class IconView : Gtk.Container, Gtk.CellLayout, Gtk.Buildable { + public void convert_widget_to_bin_window_coords (int wx, int wy, int bx, int by); public weak Gdk.Pixmap create_drag_icon (Gtk.TreePath path); [NoArrayLength] public void enable_model_drag_dest (Gtk.TargetEntry[] targets, int n_targets, Gdk.DragAction actions); @@ -2251,6 +2254,8 @@ namespace Gtk { public Gtk.SelectionMode get_selection_mode (); public int get_spacing (); public int get_text_column (); + public int get_tooltip_column (); + public bool get_tooltip_context (int x, int y, bool keyboard_tip, Gtk.TreeModel model, Gtk.TreePath path, out Gtk.TreeIter iter); public static GLib.Type get_type (); public bool get_visible_range (Gtk.TreePath start_path, Gtk.TreePath end_path); public IconView (); @@ -2274,6 +2279,9 @@ namespace Gtk { public void set_selection_mode (Gtk.SelectionMode mode); public void set_spacing (int spacing); public void set_text_column (int column); + public void set_tooltip_cell (Gtk.Tooltip tooltip, Gtk.TreePath path, Gtk.CellRenderer cell); + public void set_tooltip_column (int column); + public void set_tooltip_item (Gtk.Tooltip tooltip, Gtk.TreePath path); public void unselect_path (Gtk.TreePath path); public void unset_model_drag_dest (); public void unset_model_drag_source (); @@ -2290,6 +2298,7 @@ namespace Gtk { public weak int margin { get; set; } public weak Gtk.Orientation orientation { get; set; } public weak bool reorderable { get; set; } + public weak int tooltip_column { get; set; } public signal void set_scroll_adjustments (Gtk.Adjustment hadjustment, Gtk.Adjustment vadjustment); [HasEmitter] public signal void item_activated (Gtk.TreePath path); @@ -2376,7 +2385,7 @@ namespace Gtk { public static GLib.Type get_type (); public virtual void reset (); public virtual void set_client_window (Gdk.Window window); - public virtual void set_cursor_location (Gdk.Rectangle area); + public virtual void set_cursor_location (out Gdk.Rectangle area); public virtual void set_surrounding (string text, int len, int cursor_index); public virtual void set_use_preedit (bool use_preedit); public signal void preedit_start (); @@ -2545,15 +2554,16 @@ namespace Gtk { public void move_after (out Gtk.TreeIter iter, out Gtk.TreeIter position); public void move_before (out Gtk.TreeIter iter, out Gtk.TreeIter position); public ListStore (int n_columns, ...); + [NoArrayLength] [CCode (cname = "gtk_list_store_newv")] - public ListStore.newv (int n_columns, GLib.Type types); + public ListStore.newv (int n_columns, GLib.Type[] types); public void prepend (out Gtk.TreeIter iter); public bool remove (out Gtk.TreeIter iter); public void reorder (int new_order); [CCode (sentinel = "-1")] public void set (out Gtk.TreeIter iter, ...); [NoArrayLength] - public void set_column_types (int n_types, GLib.Type[] types); + public void set_column_types (int n_columns, GLib.Type[] types); public void set_valist (out Gtk.TreeIter iter, pointer var_args); public void set_value (out Gtk.TreeIter iter, int column, GLib.Value value); [NoArrayLength] @@ -2649,7 +2659,8 @@ namespace Gtk { public static GLib.Type get_type (); public MenuToolButton (Gtk.Widget icon_widget, string label); public MenuToolButton.from_stock (string stock_id); - public void set_arrow_tooltip (Gtk.Tooltips tooltips, string tip_text, string tip_private); + public void set_arrow_tooltip_markup (string markup); + public void set_arrow_tooltip_text (string text); public void set_menu (Gtk.Widget menu); public weak Gtk.Menu menu { get; set; } public signal void show_menu (); @@ -3464,6 +3475,9 @@ namespace Gtk { public class SearchEngineBeagle : Gtk.SearchEngine { } [CCode (cheader_filename = "gtk/gtk.h")] + public class SearchEngineQuartz : Gtk.SearchEngine { + } + [CCode (cheader_filename = "gtk/gtk.h")] public class SearchEngineSimple : Gtk.SearchEngine { } [CCode (cheader_filename = "gtk/gtk.h")] @@ -3580,7 +3594,7 @@ namespace Gtk { [CCode (cheader_filename = "gtk/gtk.h")] public class StatusIcon : GLib.Object { public bool get_blinking (); - public bool get_geometry (Gdk.Screen screen, Gdk.Rectangle area, Gtk.Orientation orientation); + public bool get_geometry (Gdk.Screen screen, out Gdk.Rectangle area, Gtk.Orientation orientation); public weak string get_icon_name (); public weak Gdk.Pixbuf get_pixbuf (); public weak Gdk.Screen get_screen (); @@ -3651,12 +3665,12 @@ namespace Gtk { public weak Gdk.GC black_gc; public weak Gdk.GC white_gc; public weak Gdk.Pixmap bg_pixmap; - public void apply_default_background (Gdk.Window window, bool set_bg, Gtk.StateType state_type, Gdk.Rectangle area, int x, int y, int width, int height); + public void apply_default_background (Gdk.Window window, bool set_bg, Gtk.StateType state_type, out Gdk.Rectangle area, int x, int y, int width, int height); public weak Gtk.Style attach (Gdk.Window window); public virtual weak Gtk.Style copy (); public void detach (); public static GLib.Type get_type (); - public bool lookup_color (string color_name, Gdk.Color color); + public bool lookup_color (string color_name, out Gdk.Color color); public weak Gtk.IconSet lookup_icon_set (string stock_id); public Style (); public virtual weak Gdk.Pixbuf render_icon (Gtk.IconSource source, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail); @@ -3929,7 +3943,7 @@ namespace Gtk { public int get_indent (); public void get_iter_at_location (out Gtk.TextIter iter, int x, int y); public void get_iter_at_position (out Gtk.TextIter iter, int trailing, int x, int y); - public void get_iter_location (out Gtk.TextIter iter, Gdk.Rectangle location); + public void get_iter_location (out Gtk.TextIter iter, out Gdk.Rectangle location); public Gtk.Justification get_justification (); public int get_left_margin (); public void get_line_at_y (out Gtk.TextIter target_iter, int y, int line_top); @@ -3941,7 +3955,7 @@ namespace Gtk { public int get_right_margin (); public weak Pango.TabArray get_tabs (); public static GLib.Type get_type (); - public void get_visible_rect (Gdk.Rectangle visible_rect); + public void get_visible_rect (out Gdk.Rectangle visible_rect); public weak Gdk.Window get_window (Gtk.TextWindowType win); public Gtk.TextWindowType get_window_type (Gdk.Window window); public Gtk.WrapMode get_wrap_mode (); @@ -4079,14 +4093,18 @@ namespace Gtk { public signal bool popup_context_menu (int x, int y, int button_number); } [CCode (cheader_filename = "gtk/gtk.h")] - public class Tooltips : Gtk.Object { - public void disable (); - public void enable (); - public void force_window (); - public static bool get_info_from_tip_window (Gtk.Window tip_window, Gtk.Tooltips tooltips, Gtk.Widget current_widget); + public class Tooltip : GLib.Object { public static GLib.Type get_type (); - public Tooltips (); - public void set_tip (Gtk.Widget widget, string tip_text, string tip_private); + public void set_custom (Gtk.Widget custom_widget); + public void set_icon (Gdk.Pixbuf pixbuf); + public void set_icon_from_stock (string stock_id, Gtk.IconSize size); + public void set_markup (string markup); + public void set_text (string text); + public void set_tip_area (out Gdk.Rectangle rect); + public static void trigger_tooltip_query (Gdk.Display display); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public class Tooltips : Gtk.Object { } [CCode (cheader_filename = "gtk/gtk.h")] public class ToolButton : Gtk.ToolItem { @@ -4134,6 +4152,8 @@ namespace Gtk { public void set_homogeneous (bool homogeneous); public void set_is_important (bool is_important); public void set_proxy_menu_item (string menu_item_id, Gtk.Widget menu_item); + public void set_tooltip_markup (string markup); + public void set_tooltip_text (string text); public void set_use_drag_window (bool use_drag_window); public void set_visible_horizontal (bool visible_horizontal); public void set_visible_vertical (bool visible_vertical); @@ -4162,7 +4182,8 @@ namespace Gtk { public static GLib.Type get_type (); public TreeModelFilter (Gtk.TreeModel child_model, Gtk.TreePath root); public void refilter (); - public void set_modify_func (int n_columns, GLib.Type types, Gtk.TreeModelFilterModifyFunc func, pointer data, Gtk.DestroyNotify destroy); + [NoArrayLength] + public void set_modify_func (int n_columns, GLib.Type[] types, Gtk.TreeModelFilterModifyFunc func, pointer data, Gtk.DestroyNotify destroy); public void set_visible_column (int column); public void set_visible_func (Gtk.TreeModelFilterVisibleFunc func, pointer data, Gtk.DestroyNotify destroy); [NoAccessorMethod] @@ -4227,15 +4248,16 @@ namespace Gtk { public void move_after (out Gtk.TreeIter iter, out Gtk.TreeIter position); public void move_before (out Gtk.TreeIter iter, out Gtk.TreeIter position); public TreeStore (int n_columns, ...); + [NoArrayLength] [CCode (cname = "gtk_tree_store_newv")] - public TreeStore.newv (int n_columns, GLib.Type types); + public TreeStore.newv (int n_columns, GLib.Type[] types); public void prepend (out Gtk.TreeIter iter, out Gtk.TreeIter parent); public bool remove (out Gtk.TreeIter iter); public void reorder (out Gtk.TreeIter parent, int new_order); [CCode (sentinel = "-1")] public void set (out Gtk.TreeIter iter, ...); [NoArrayLength] - public void set_column_types (int n_types, GLib.Type[] types); + public void set_column_types (int n_columns, GLib.Type[] types); public void set_valist (out Gtk.TreeIter iter, pointer var_args); public void set_value (out Gtk.TreeIter iter, int column, GLib.Value value); [NoArrayLength] @@ -4262,9 +4284,9 @@ namespace Gtk { public void expand_all (); public bool expand_row (Gtk.TreePath path, bool open_all); public void expand_to_path (Gtk.TreePath path); - public void get_background_area (Gtk.TreePath path, Gtk.TreeViewColumn column, Gdk.Rectangle rect); + public void get_background_area (Gtk.TreePath path, Gtk.TreeViewColumn column, out Gdk.Rectangle rect); public weak Gdk.Window get_bin_window (); - public void get_cell_area (Gtk.TreePath path, Gtk.TreeViewColumn column, Gdk.Rectangle rect); + public void get_cell_area (Gtk.TreePath path, Gtk.TreeViewColumn column, out Gdk.Rectangle rect); public weak Gtk.TreeViewColumn get_column (int n); public weak GLib.List get_columns (); public void get_cursor (Gtk.TreePath path, Gtk.TreeViewColumn focus_column); @@ -4293,13 +4315,16 @@ namespace Gtk { public Gtk.TreeViewSearchPositionFunc get_search_position_func (); public weak Gtk.TreeSelection get_selection (); public bool get_show_expanders (); + public int get_tooltip_column (); + public bool get_tooltip_context (int x, int y, bool keyboard_tip, Gtk.TreeModel model, Gtk.TreePath path, out Gtk.TreeIter iter); public static GLib.Type get_type (); public weak Gtk.Adjustment get_vadjustment (); public bool get_visible_range (Gtk.TreePath start_path, Gtk.TreePath end_path); - public void get_visible_rect (Gdk.Rectangle visible_rect); + public void get_visible_rect (out Gdk.Rectangle visible_rect); public int insert_column (Gtk.TreeViewColumn column, int position); public int insert_column_with_attributes (int position, string title, Gtk.CellRenderer cell, ...); public int insert_column_with_data_func (int position, string title, Gtk.CellRenderer cell, Gtk.TreeCellDataFunc func, pointer data, GLib.DestroyNotify dnotify); + public bool is_rubber_banding_active (); public void map_expanded_rows (Gtk.TreeViewMappingFunc func, pointer data); public static GLib.Type mode_get_type (); public void move_column_after (Gtk.TreeViewColumn column, Gtk.TreeViewColumn base_column); @@ -4334,6 +4359,9 @@ namespace Gtk { public void set_search_equal_func (Gtk.TreeViewSearchEqualFunc search_equal_func, pointer search_user_data, Gtk.DestroyNotify search_destroy); public void set_search_position_func (Gtk.TreeViewSearchPositionFunc func, pointer data, GLib.DestroyNotify destroy); public void set_show_expanders (bool enabled); + public void set_tooltip_cell (Gtk.Tooltip tooltip, Gtk.TreePath path, Gtk.TreeViewColumn column, Gtk.CellRenderer cell); + public void set_tooltip_column (int column); + public void set_tooltip_row (Gtk.Tooltip tooltip, Gtk.TreePath path); public void set_vadjustment (Gtk.Adjustment adjustment); public void unset_rows_drag_dest (); public void unset_rows_drag_source (); @@ -4356,6 +4384,7 @@ namespace Gtk { [NoAccessorMethod] public weak Gtk.TreeViewGridLines enable_grid_lines { get; set; } public weak bool enable_tree_lines { get; set; } + public weak int tooltip_column { get; set; } public signal void set_scroll_adjustments (Gtk.Adjustment hadjustment, Gtk.Adjustment vadjustment); [HasEmitter] public signal void row_activated (Gtk.TreePath path, Gtk.TreeViewColumn column); @@ -4379,7 +4408,7 @@ namespace Gtk { public class TreeViewColumn : Gtk.Object, Gtk.CellLayout, Gtk.Buildable { public void add_attribute (Gtk.CellRenderer cell_renderer, string attribute, int column); public bool cell_get_position (Gtk.CellRenderer cell_renderer, int start_pos, int width); - public void cell_get_size (Gdk.Rectangle cell_area, int x_offset, int y_offset, int width, int height); + public void cell_get_size (out Gdk.Rectangle cell_area, int x_offset, int y_offset, int width, int height); public bool cell_is_visible (); public void cell_set_cell_data (Gtk.TreeModel tree_model, out Gtk.TreeIter iter, bool is_expander, bool is_expanded); public void clear (); @@ -4537,14 +4566,6 @@ namespace Gtk { public Gtk.Requisition requisition; public Gtk.Allocation allocation; public weak Gdk.Window window; - - [CCode (cname = "GTK_WIDGET_SET_FLAGS")] - public void set_flags (WidgetFlags flags); - [CCode (cname = "GTK_WIDGET_UNSET_FLAGS")] - public void unset_flags (WidgetFlags flags); - [CCode (cname = "GTK_WIDGET_FLAGS")] - public WidgetFlags get_flags (); - public bool activate (); public void add_accelerator (string accel_signal, Gtk.AccelGroup accel_group, uint accel_key, Gdk.ModifierType accel_mods, Gtk.AccelFlags accel_flags); public void add_events (int events); @@ -4577,6 +4598,7 @@ namespace Gtk { public weak Gdk.Display get_display (); public int get_events (); public Gdk.ExtensionMode get_extension_events (); + public bool get_has_tooltip (); public weak Gtk.RcStyle get_modifier_style (); public weak string get_name (); public bool get_no_show_all (); @@ -4600,19 +4622,19 @@ namespace Gtk { public virtual void hide_all (); public bool hide_on_delete (); public void input_shape_combine_mask (Gdk.Bitmap shape_mask, int offset_x, int offset_y); - public bool intersect (Gdk.Rectangle area, Gdk.Rectangle intersection); + public bool intersect (out Gdk.Rectangle area, out Gdk.Rectangle intersection); public bool is_ancestor (Gtk.Widget ancestor); public bool is_composited (); public bool keynav_failed (Gtk.DirectionType direction); public weak GLib.List list_accel_closures (); public weak GLib.List list_mnemonic_labels (); - public void modify_base (Gtk.StateType state, Gdk.Color color); - public void modify_bg (Gtk.StateType state, Gdk.Color color); - public void modify_cursor (Gdk.Color primary, Gdk.Color secondary); - public void modify_fg (Gtk.StateType state, Gdk.Color color); + public void modify_base (Gtk.StateType state, out Gdk.Color color); + public void modify_bg (Gtk.StateType state, out Gdk.Color color); + public void modify_cursor (out Gdk.Color primary, out Gdk.Color secondary); + public void modify_fg (Gtk.StateType state, out Gdk.Color color); public void modify_font (Pango.FontDescription font_desc); public void modify_style (Gtk.RcStyle style); - public void modify_text (Gtk.StateType state, Gdk.Color color); + public void modify_text (Gtk.StateType state, out Gdk.Color color); public Widget (GLib.Type type, ...); public void path (uint path_length, string path, string path_reversed); public static void pop_colormap (); @@ -4642,6 +4664,7 @@ namespace Gtk { public void set_double_buffered (bool double_buffered); public void set_events (int events); public void set_extension_events (Gdk.ExtensionMode mode); + public void set_has_tooltip (bool has_tooltip); public void set_name (string name); public void set_no_show_all (bool no_show_all); public void set_parent (Gtk.Widget parent); @@ -4695,7 +4718,6 @@ namespace Gtk { public weak Gdk.EventMask events { get; set; } public weak Gdk.ExtensionMode extension_events { get; set; } public weak bool no_show_all { get; set; } - [NoAccessorMethod] public weak bool has_tooltip { get; set; } public weak string tooltip_text { get; set; } public weak string tooltip_markup { get; set; } @@ -5165,7 +5187,7 @@ namespace Gtk { [CCode (cheader_filename = "gtk/gtk.h")] public struct AccelGroupEntry { public weak Gtk.AccelKey key; - public GLib.Closure closure; + public weak GLib.Closure closure; public GLib.Quark accel_path_quark; } [ReferenceType] @@ -5239,8 +5261,6 @@ namespace Gtk { public int bottom; [InstanceByReference] public Gtk.Border copy (); - [InstanceByReference] - public void free (); public static GLib.Type get_type (); } [ReferenceType] @@ -5278,23 +5298,22 @@ namespace Gtk { public weak string domain_dirname; public weak string default_locales; } - [ReferenceType] + [ReferenceType (free_function = "gtk_icon_info_free")] [CCode (cheader_filename = "gtk/gtk.h")] public struct IconInfo { public weak Gtk.IconInfo copy (); - public void free (); [NoArrayLength] public bool get_attach_points (Gdk.Point[] points, int n_points); public int get_base_size (); public weak Gdk.Pixbuf get_builtin_pixbuf (); public weak string get_display_name (); - public bool get_embedded_rect (Gdk.Rectangle rectangle); + public bool get_embedded_rect (out Gdk.Rectangle rectangle); public weak string get_filename (); public static GLib.Type get_type (); public weak Gdk.Pixbuf load_icon (GLib.Error error); public void set_raw_coordinates (bool raw_coordinates); } - [ReferenceType] + [ReferenceType (dup_function = "gtk_icon_set_ref", free_function = "gtk_icon_set_unref")] [CCode (cheader_filename = "gtk/gtk.h")] public struct IconSet { public void add_source (Gtk.IconSource source); @@ -5304,15 +5323,12 @@ namespace Gtk { public static GLib.Type get_type (); public IconSet (); public IconSet.from_pixbuf (Gdk.Pixbuf pixbuf); - public weak Gtk.IconSet @ref (); public weak Gdk.Pixbuf render_icon (Gtk.Style style, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail); - public void unref (); } [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] public struct IconSource { public weak Gtk.IconSource copy (); - public void free (); public Gtk.TextDirection get_direction (); public bool get_direction_wildcarded (); public weak string get_filename (); @@ -5409,7 +5425,6 @@ namespace Gtk { [CCode (cheader_filename = "gtk/gtk.h")] public struct PaperSize { public weak Gtk.PaperSize copy (); - public void free (); public static weak string get_default (); public double get_default_bottom_margin (Gtk.Unit unit); public double get_default_left_margin (Gtk.Unit unit); @@ -5431,14 +5446,13 @@ namespace Gtk { public void set_size (double width, double height, Gtk.Unit unit); public void to_key_file (GLib.KeyFile key_file, string group_name); } - [ReferenceType] + [ReferenceType (free_function = "gtk_print_win32_devnames_free")] [CCode (cheader_filename = "gtk/gtk.h")] public struct PrintWin32Devnames { public weak string driver; public weak string device; public weak string output; public int flags; - public void free (); public static pointer from_printer_name (string printer); public static weak Gtk.PrintWin32Devnames from_win32 (pointer global); public pointer to_win32 (); @@ -5499,7 +5513,7 @@ namespace Gtk { public weak string groups; public int age; } - [ReferenceType] + [ReferenceType (dup_function = "gtk_recent_info_ref", free_function = "gtk_recent_info_unref")] [CCode (cheader_filename = "gtk/gtk.h")] public struct RecentInfo { public bool exists (); @@ -5524,8 +5538,6 @@ namespace Gtk { public bool is_local (); public weak string last_application (); public bool match (Gtk.RecentInfo info_b); - public weak Gtk.RecentInfo @ref (); - public void unref (); } [CCode (cheader_filename = "gtk/gtk.h")] public struct Requisition { @@ -5533,8 +5545,6 @@ namespace Gtk { public int height; [InstanceByReference] public Gtk.Requisition copy (); - [InstanceByReference] - public void free (); public static GLib.Type get_type (); } [ReferenceType] @@ -5546,7 +5556,7 @@ namespace Gtk { public double ruler_scale; public int subdivide; } - [ReferenceType] + [ReferenceType (free_function = "gtk_selection_data_free")] [CCode (cheader_filename = "gtk/gtk.h")] public struct SelectionData { public Gdk.Atom selection; @@ -5557,9 +5567,8 @@ namespace Gtk { public int length; public weak Gdk.Display display; public weak Gtk.SelectionData copy (); - public void free (); public weak Gdk.Pixbuf get_pixbuf (); - public bool get_targets (Gdk.Atom targets, int n_atoms); + public bool get_targets (out Gdk.Atom targets, int n_atoms); [NoArrayLength] public weak uchar[] get_text (); public static GLib.Type get_type (); @@ -5584,7 +5593,7 @@ namespace Gtk { public weak string origin; public weak GLib.Value value; } - [ReferenceType] + [ReferenceType (free_function = "gtk_stock_item_free")] [CCode (cheader_filename = "gtk/gtk.h")] public struct StockItem { public weak string stock_id; @@ -5593,7 +5602,6 @@ namespace Gtk { public uint keyval; public weak string translation_domain; public weak Gtk.StockItem copy (); - public void free (); } [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] @@ -5631,7 +5639,7 @@ namespace Gtk { public uint flags; public uint info; } - [ReferenceType] + [ReferenceType (dup_function = "gtk_target_list_ref", free_function = "gtk_target_list_unref")] [CCode (cheader_filename = "gtk/gtk.h")] public struct TargetList { public weak GLib.List list; @@ -5645,9 +5653,7 @@ namespace Gtk { public bool find (Gdk.Atom target, uint info); public static GLib.Type get_type (); public TargetList (Gtk.TargetEntry targets, uint ntargets); - public weak Gtk.TargetList @ref (); public void remove (Gdk.Atom target); - public void unref (); } [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] @@ -5670,7 +5676,7 @@ namespace Gtk { public uint inside_selection; public uint is_text; } - [ReferenceType] + [ReferenceType (dup_function = "gtk_text_attributes_ref", free_function = "gtk_text_attributes_unref")] [CCode (cheader_filename = "gtk/gtk.h")] public struct TextAttributes { public weak Gtk.TextAppearance appearance; @@ -5695,8 +5701,6 @@ namespace Gtk { public void copy_values (Gtk.TextAttributes dest); public static GLib.Type get_type (); public TextAttributes (); - public weak Gtk.TextAttributes @ref (); - public void unref (); } [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] @@ -5805,8 +5809,6 @@ namespace Gtk { [InstanceByReference] public bool forward_word_ends (int count); [InstanceByReference] - public void free (); - [InstanceByReference] public bool get_attributes (Gtk.TextAttributes values); [InstanceByReference] public weak Gtk.TextBuffer get_buffer (); @@ -5912,26 +5914,6 @@ namespace Gtk { public GLib.Callback callback; public bool is_active; } - [ReferenceType] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct Tooltip { - public static GLib.Type get_type (); - public void set_custom (Gtk.Widget custom_widget); - public void set_icon (Gdk.Pixbuf pixbuf); - public void set_icon_from_stock (string stock_id, Gtk.IconSize size); - public void set_markup (string markup); - public void set_text (string text); - public static void trigger_tooltip_query (Gdk.Display display); - } - [ReferenceType] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct TooltipsData { - public weak Gtk.Tooltips tooltips; - public weak Gtk.Widget widget; - public weak string tip_text; - public weak string tip_private; - public static weak Gtk.TooltipsData get (Gtk.Widget widget); - } [CCode (cheader_filename = "gtk/gtk.h")] public struct TreeIter { public int stamp; @@ -5940,8 +5922,6 @@ namespace Gtk { public pointer user_data3; [InstanceByReference] public Gtk.TreeIter copy (); - [InstanceByReference] - public void free (); public static GLib.Type get_type (); } [ReferenceType] @@ -5951,7 +5931,6 @@ namespace Gtk { public int compare (Gtk.TreePath b); public weak Gtk.TreePath copy (); public void down (); - public void free (); public int get_depth (); [NoArrayLength] public weak int[] get_indices (); @@ -5974,7 +5953,6 @@ namespace Gtk { public struct TreeRowReference { public weak Gtk.TreeRowReference copy (); public static void deleted (GLib.Object proxy, Gtk.TreePath path); - public void free (); public weak Gtk.TreeModel get_model (); public weak Gtk.TreePath get_path (); public static GLib.Type get_type (); @@ -6022,7 +6000,7 @@ namespace Gtk { public static uint get_default_mod_mask (); public static weak string get_label (uint accelerator_key, Gdk.ModifierType accelerator_mods); public static weak string name (uint accelerator_key, Gdk.ModifierType accelerator_mods); - public static void parse (string accelerator, uint accelerator_key, Gdk.ModifierType accelerator_mods); + public static void parse (string accelerator, uint accelerator_key, out Gdk.ModifierType accelerator_mods); public static void set_default_mod_mask (Gdk.ModifierType default_mod_mask); public static bool valid (uint keyval, Gdk.ModifierType modifiers); } @@ -6084,7 +6062,7 @@ namespace Gtk { [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] public struct Draw { - public static void insertion_cursor (Gtk.Widget widget, Gdk.Drawable drawable, Gdk.Rectangle area, Gdk.Rectangle location, bool is_primary, Gtk.TextDirection direction, bool draw_arrow); + public static void insertion_cursor (Gtk.Widget widget, Gdk.Drawable drawable, out Gdk.Rectangle area, out Gdk.Rectangle location, bool is_primary, Gtk.TextDirection direction, bool draw_arrow); } [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] @@ -6120,7 +6098,7 @@ namespace Gtk { public static void add (Gtk.Function function, pointer data); public static bool check (int argc, string argv); public static bool check_abi_check (int argc, string argv, int num_checks, ulong sizeof_GtkWindow, ulong sizeof_GtkBox); - public static bool with_args (int argc, string argv, string parameter_string, GLib.OptionEntry entries, string translation_domain, GLib.Error error); + public static bool with_args (int argc, string argv, string parameter_string, out GLib.OptionEntry entries, string translation_domain, GLib.Error error); } [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] @@ -6170,8 +6148,8 @@ namespace Gtk { public static weak Gtk.Style get_style_by_paths (Gtk.Settings settings, string widget_path, string class_path, GLib.Type type); public static weak string get_theme_dir (); public static void parse (string filename); - public static uint parse_color (GLib.Scanner scanner, Gdk.Color color); - public static uint parse_color_full (GLib.Scanner scanner, Gtk.RcStyle style, Gdk.Color color); + public static uint parse_color (GLib.Scanner scanner, out Gdk.Color color); + public static uint parse_color_full (GLib.Scanner scanner, Gtk.RcStyle style, out Gdk.Color color); public static uint parse_priority (GLib.Scanner scanner, Gtk.PathPriorityType priority); public static uint parse_state (GLib.Scanner scanner, Gtk.StateType state); public static void parse_string (string rc_string); @@ -6254,10 +6232,10 @@ namespace Gtk { public static delegate void ClipboardImageReceivedFunc (Gtk.Clipboard clipboard, Gdk.Pixbuf pixbuf, pointer data); public static delegate void ClipboardReceivedFunc (Gtk.Clipboard clipboard, Gtk.SelectionData selection_data, pointer data); public static delegate void ClipboardRichTextReceivedFunc (Gtk.Clipboard clipboard, Gdk.Atom format, uchar[] text, ulong length, pointer data); - public static delegate void ClipboardTargetsReceivedFunc (Gtk.Clipboard clipboard, Gdk.Atom atoms, int n_atoms, pointer data); + public static delegate void ClipboardTargetsReceivedFunc (Gtk.Clipboard clipboard, out Gdk.Atom atoms, int n_atoms, pointer data); public static delegate void ClipboardTextReceivedFunc (Gtk.Clipboard clipboard, string text, pointer data); - public static delegate void ColorSelectionChangePaletteFunc (Gdk.Color colors, int n_colors); - public static delegate void ColorSelectionChangePaletteWithScreenFunc (Gdk.Screen screen, Gdk.Color colors, int n_colors); + public static delegate void ColorSelectionChangePaletteFunc (out Gdk.Color colors, int n_colors); + public static delegate void ColorSelectionChangePaletteWithScreenFunc (Gdk.Screen screen, out Gdk.Color colors, int n_colors); public static delegate void DestroyNotify (pointer data); public static delegate bool EntryCompletionMatchFunc (Gtk.EntryCompletion completion, string key, out Gtk.TreeIter iter, pointer user_data); public static delegate bool FileFilterFunc (Gtk.FileFilterInfo filter_info, pointer data); @@ -6413,32 +6391,32 @@ namespace Gtk { public static void enumerate_printers (Gtk.PrinterFunc func, pointer data, GLib.DestroyNotify destroy, bool wait); public static bool events_pending (); public static weak Gdk.Event get_current_event (); - public static bool get_current_event_state (Gdk.ModifierType state); + public static bool get_current_event_state (out Gdk.ModifierType state); public static uint get_current_event_time (); public static weak Pango.Language get_default_language (); public static weak Gtk.Widget get_event_widget (Gdk.Event event); public static weak GLib.OptionGroup get_option_group (bool open_default_display); public static GLib.Type identifier_get_type (); - public static void paint_arrow (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, Gtk.ArrowType arrow_type, bool fill, int x, int y, int width, int height); - public static void paint_box (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); - public static void paint_box_gap (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.PositionType gap_side, int gap_x, int gap_width); - public static void paint_check (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); - public static void paint_diamond (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); - public static void paint_expander (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, Gtk.ExpanderStyle expander_style); - public static void paint_extension (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.PositionType gap_side); - public static void paint_flat_box (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); - public static void paint_focus (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); - public static void paint_handle (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.Orientation orientation); - public static void paint_hline (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x1, int x2, int y); - public static void paint_layout (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, bool use_text, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, Pango.Layout layout); - public static void paint_option (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); - public static void paint_polygon (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, Gdk.Point points, int npoints, bool fill); - public static void paint_resize_grip (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, Gdk.WindowEdge edge, int x, int y, int width, int height); - public static void paint_shadow (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); - public static void paint_shadow_gap (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.PositionType gap_side, int gap_x, int gap_width); - public static void paint_slider (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.Orientation orientation); - public static void paint_tab (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); - public static void paint_vline (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int y1_, int y2_, int x); + public static void paint_arrow (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, Gtk.ArrowType arrow_type, bool fill, int x, int y, int width, int height); + public static void paint_box (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); + public static void paint_box_gap (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.PositionType gap_side, int gap_x, int gap_width); + public static void paint_check (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); + public static void paint_diamond (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); + public static void paint_expander (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, Gtk.ExpanderStyle expander_style); + public static void paint_extension (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.PositionType gap_side); + public static void paint_flat_box (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); + public static void paint_focus (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); + public static void paint_handle (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.Orientation orientation); + public static void paint_hline (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x1, int x2, int y); + public static void paint_layout (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, bool use_text, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, Pango.Layout layout); + public static void paint_option (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); + public static void paint_polygon (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, Gdk.Point points, int npoints, bool fill); + public static void paint_resize_grip (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, Gdk.WindowEdge edge, int x, int y, int width, int height); + public static void paint_shadow (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); + public static void paint_shadow_gap (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.PositionType gap_side, int gap_x, int gap_width); + public static void paint_slider (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.Orientation orientation); + public static void paint_tab (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height); + public static void paint_vline (Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, out Gdk.Rectangle area, Gtk.Widget widget, string detail, int y1_, int y2_, int x); public static bool parse_args (int argc, string argv); public static GLib.Type private_flags_get_type (); public static void propagate_event (Gtk.Widget widget, Gdk.Event event); diff --git a/vapi/gtksourceview-2.0.vala b/vapi/gtksourceview-2.0.vala index 90144a1..06f443e 100644 --- a/vapi/gtksourceview-2.0.vala +++ b/vapi/gtksourceview-2.0.vala @@ -1,6 +1,21 @@ [CCode (cprefix = "Gtk", lower_case_cprefix = "gtk_")] namespace Gtk { - [CCode (cprefix = "GTK_SOURCE_SEARCH_", cheader_filename = "gtksourceview/gtksourceiter.h")] + [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, @@ -13,12 +28,13 @@ namespace Gtk { AFTER, ALWAYS, } - [CCode (cheader_filename = "gtksourceview/gtksourcebuffer.h")] + [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 void ensure_highlight (out Gtk.TextIter start, out Gtk.TextIter end); public bool get_check_brackets (); public weak Gtk.SourceMarker get_first_marker (); public bool get_highlight (); @@ -52,17 +68,30 @@ namespace Gtk { public weak bool can_redo { get; } public weak Gtk.SourceStyleScheme style_scheme { get; set; } } - [CCode (cheader_filename = "gtksourceview/gtksourcelanguage.h")] + [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 bool get_hidden (); 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 weak string get_style_ids (); + public weak string get_style_name (string style_id); public static GLib.Type get_type (); + public weak string id { get; } + public weak string name { get; } + public weak string section { get; } + public weak bool hidden { get; } } - [CCode (cheader_filename = "gtksourceview/gtksourcelanguagemanager.h")] + [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); @@ -73,7 +102,7 @@ namespace Gtk { public void set_search_path (string dirs); public weak string[] search_path { get; set; } } - [CCode (cheader_filename = "gtksourceview/gtksourcemarker.h")] + [CCode (cheader_filename = "gtksourceview/gtksourceview.h")] public class SourceMarker : GLib.Object { public pointer get_buffer (); public int get_line (); @@ -84,7 +113,7 @@ namespace Gtk { public weak Gtk.SourceMarker prev (); public void set_marker_type (string type); } - [CCode (cheader_filename = "gtksourceview/gtksourcestyle.h")] + [CCode (cheader_filename = "gtksourceview/gtksourceview.h")] public class SourceStyle : GLib.Object { public weak Gtk.SourceStyle copy (); public static GLib.Type get_type (); @@ -113,31 +142,36 @@ namespace Gtk { [NoAccessorMethod] public weak bool strikethrough_set { get; construct; } } - [CCode (cheader_filename = "gtksourceview/gtksourcestylemanager.h")] + [CCode (cheader_filename = "gtksourceview/gtksourceview.h")] public class SourceStyleManager : GLib.Object { - public bool add_scheme (string filename); + public void append_search_path (string path); + public void force_rescan (); public static weak Gtk.SourceStyleManager get_default (); public weak Gtk.SourceStyleScheme get_scheme (string scheme_id); + public weak string get_scheme_ids (); public weak string get_search_path (); public static GLib.Type get_type (); - public weak GLib.SList list_schemes (); public SourceStyleManager (); + public void prepend_search_path (string path); public void set_search_path (string path); public weak string[] search_path { get; set; } - public signal void changed (); + public weak string[] scheme_ids { get; } } - [CCode (cheader_filename = "gtksourceview/gtksourcestylescheme.h")] + [CCode (cheader_filename = "gtksourceview/gtksourceview.h")] public class SourceStyleScheme : GLib.Object { - public bool get_current_line_color (Gdk.Color color); + public bool get_current_line_color (out Gdk.Color color); + public weak string get_description (); + public weak string get_filename (); 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 weak Gtk.SourceStyle get_style (string style_id); public static GLib.Type get_type (); [NoAccessorMethod] public weak string id { get; construct; } [NoAccessorMethod] public weak string name { get; set; } + public weak string filename { get; } } [CCode (cheader_filename = "gtksourceview/gtksourceview.h")] public class SourceView : Gtk.TextView { @@ -179,4 +213,39 @@ namespace Gtk { 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); + } } diff --git a/vapi/libsoup-2.2.vala b/vapi/libsoup-2.2.vala index 54609b2..37c0ed7 100644 --- a/vapi/libsoup-2.2.vala +++ b/vapi/libsoup-2.2.vala @@ -445,11 +445,10 @@ namespace Soup { public struct AuthBasicClass { public pointer parent_class; } - [ReferenceType] + [ReferenceType (free_function = "soup_dns_lookup_free")] [CCode (cheader_filename = "libsoup/soup.h")] public struct DNSLookup { public void cancel (); - public void free (); public weak string get_hostname (); public static weak Soup.DNSLookup name (string name); public bool resolve (); @@ -559,7 +558,6 @@ namespace Soup { public static void decode (string part); public static weak string encode (string part, string escape_extra); public bool equal (Soup.Uri uri2); - public void free (); public Uri (string uri_string); public Uri.with_base (string uri_string); public weak string to_string (bool just_path); diff --git a/vapi/packages/atk/atk.gidl b/vapi/packages/atk/atk.gidl index 33dad94..7224d00 100644 --- a/vapi/packages/atk/atk.gidl +++ b/vapi/packages/atk/atk.gidl @@ -2989,6 +2989,9 @@ + + + diff --git a/vapi/packages/gdk-2.0/gdk-2.0.gidl b/vapi/packages/gdk-2.0/gdk-2.0.gidl index baaad55..ad2f575 100644 --- a/vapi/packages/gdk-2.0/gdk-2.0.gidl +++ b/vapi/packages/gdk-2.0/gdk-2.0.gidl @@ -2186,6 +2186,12 @@ + + + + + + @@ -2274,6 +2280,12 @@ + + + + + + diff --git a/vapi/packages/gstreamer-0.10/gstreamer-0.10.gidl b/vapi/packages/gstreamer-0.10/gstreamer-0.10.gidl index 5e619b9..f770ac0 100644 --- a/vapi/packages/gstreamer-0.10/gstreamer-0.10.gidl +++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10.gidl @@ -1300,7 +1300,7 @@ - + @@ -1864,6 +1864,16 @@ + + + + + + + + + + @@ -2369,6 +2379,13 @@ + + + + + + + @@ -3972,6 +3989,17 @@ + + + + + + + + + + + @@ -4463,6 +4491,7 @@ + @@ -4734,8 +4763,8 @@ - - + + @@ -6410,16 +6439,33 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6543,6 +6589,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata b/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata index 353e971..fd7e25c 100644 --- a/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata +++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata @@ -8,4 +8,5 @@ gst_iterator_resync hidden="1" GstPad.querytypefunc hidden="1" gst_pad_set_query_type_function hidden="1" GstPadTemplate::pad_created has_emitter="1" +gst_type_register_static_full hidden="1" diff --git a/vapi/packages/gtk+-2.0/gtk+-2.0.gidl b/vapi/packages/gtk+-2.0/gtk+-2.0.gidl index 64a0551..b80740a 100644 --- a/vapi/packages/gtk+-2.0/gtk+-2.0.gidl +++ b/vapi/packages/gtk+-2.0/gtk+-2.0.gidl @@ -63,6 +63,8 @@ + + @@ -4639,17 +4641,21 @@ + + + + @@ -8695,6 +8701,7 @@ + @@ -8758,6 +8765,16 @@ + + + + + + + + + + @@ -8912,6 +8929,24 @@ + + + + + + + + + + + + + + + + + + @@ -9082,6 +9117,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -9905,6 +9964,7 @@ + @@ -11101,7 +11161,7 @@ - + @@ -11110,6 +11170,20 @@ + + + + + + + + + + + + + + @@ -14158,7 +14232,7 @@ - + @@ -14169,7 +14243,7 @@ - + @@ -14181,7 +14255,7 @@ - + @@ -15313,6 +15387,9 @@ + + + @@ -18340,7 +18417,8 @@ - + + @@ -18654,7 +18732,61 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -18665,25 +18797,25 @@ - + - + - + - + @@ -18691,10 +18823,10 @@ - + - + @@ -18702,7 +18834,7 @@ - + @@ -18900,19 +19032,19 @@ - + - + - + @@ -18957,7 +19089,7 @@ - + @@ -18966,24 +19098,38 @@ + + + + + + + + + + + + + + - + - + - + @@ -19552,6 +19698,7 @@ + @@ -20009,6 +20156,24 @@ + + + + + + + + + + + + + + + + + + @@ -20062,6 +20227,12 @@ + + + + + + @@ -20326,6 +20497,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -21873,6 +22069,12 @@ + + + + + + @@ -22367,6 +22569,13 @@ + + + + + + + @@ -25311,59 +25520,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + diff --git a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata index 6c761fa..020687d 100644 --- a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata +++ b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata @@ -60,6 +60,8 @@ GtkTextTag::event has_emitter="1" GtkToggleAction::toggled has_emitter="1" GtkToggleActionEntry is_value_type="1" GtkToggleButton::toggled has_emitter="1" +GtkToolbar.GtkTooltips hidden="1" +GtkToolbar.gpointer hidden="1" GtkToolItem::set_tooltip has_emitter="1" GtkTreeIter is_value_type="1" gtk_tree_model_get ellipsis="1" sentinel="-1" diff --git a/vapi/packages/gtksourceview-2.0/gtksourceview-2.0.gidl b/vapi/packages/gtksourceview-2.0/gtksourceview-2.0.gidl index 837cabb..a74f32e 100644 --- a/vapi/packages/gtksourceview-2.0/gtksourceview-2.0.gidl +++ b/vapi/packages/gtksourceview-2.0/gtksourceview-2.0.gidl @@ -95,6 +95,14 @@ + + + + + + + + @@ -289,12 +297,22 @@ + + + + + + + + + + @@ -326,6 +344,19 @@ + + + + + + + + + + + + + @@ -441,17 +472,18 @@ - + + - + + - - - + + + - @@ -464,8 +496,14 @@ + + + + + + - + @@ -473,13 +511,14 @@ - - + + + + - @@ -492,6 +531,7 @@ + @@ -499,6 +539,18 @@ + + + + + + + + + + + + @@ -521,7 +573,7 @@ - + diff --git a/vapi/packages/pango/pango.gidl b/vapi/packages/pango/pango.gidl index bb13146..0abdbe4 100644 --- a/vapi/packages/pango/pango.gidl +++ b/vapi/packages/pango/pango.gidl @@ -229,6 +229,22 @@ + + + + + + + + + + + + + + + + @@ -2573,12 +2589,6 @@ - - - - - - diff --git a/vapi/pango.vala b/vapi/pango.vala index 4329ea2..0fa726a 100644 --- a/vapi/pango.vala +++ b/vapi/pango.vala @@ -210,6 +210,15 @@ namespace Pango { WORD_CHAR, } [CCode (cheader_filename = "pango/pango.h")] + public class ATSUIFont : Pango.Font { + public static GLib.Type get_type (); + } + [CCode (cheader_filename = "pango/pango.h")] + public class CairoFont : GLib.Object { + public weak Cairo.ScaledFont get_scaled_font (); + public static GLib.Type get_type (); + } + [CCode (cheader_filename = "pango/pango.h")] public class CairoFontMap : GLib.Object { public weak Pango.Context create_context (); public static weak Pango.FontMap get_default (); @@ -424,7 +433,7 @@ namespace Pango { public weak Pango.Language value; public AttrLanguage (Pango.Language language); } - [ReferenceType] + [ReferenceType (dup_function = "pango_attr_list_ref", free_function = "pango_attr_list_unref")] [CCode (cheader_filename = "pango/pango.h")] public struct AttrList { public void change (Pango.Attribute attr); @@ -435,9 +444,7 @@ namespace Pango { public void insert (Pango.Attribute attr); public void insert_before (Pango.Attribute attr); public AttrList (); - public weak Pango.AttrList @ref (); public void splice (Pango.AttrList other, int pos, int len); - public void unref (); } [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] @@ -482,15 +489,13 @@ namespace Pango { public ushort blue; [InstanceByReference] public Pango.Color copy (); - [InstanceByReference] - public void free (); public static GLib.Type get_type (); [InstanceByReference] public bool parse (string spec); [InstanceByReference] public weak string to_string (); } - [ReferenceType] + [ReferenceType (dup_function = "pango_coverage_ref", free_function = "pango_coverage_unref")] [CCode (cheader_filename = "pango/pango.h")] public struct Coverage { public weak Pango.Coverage copy (); @@ -499,11 +504,9 @@ namespace Pango { public Pango.CoverageLevel get (int index_); public void max (Pango.Coverage other); public Coverage (); - public weak Pango.Coverage @ref (); public void set (int index_, Pango.CoverageLevel level); [NoArrayLength] public void to_bytes (uchar[] bytes, int n_bytes); - public void unref (); } [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] @@ -520,7 +523,6 @@ namespace Pango { public weak Pango.FontDescription copy (); public weak Pango.FontDescription copy_static (); public bool equal (Pango.FontDescription desc2); - public void free (); public static weak Pango.FontDescription from_string (string str); public weak string get_family (); public Pango.Gravity get_gravity (); @@ -549,7 +551,7 @@ namespace Pango { public weak string to_string (); public void unset_fields (Pango.FontMask to_unset); } - [ReferenceType] + [ReferenceType (dup_function = "pango_font_metrics_ref", free_function = "pango_font_metrics_unref")] [CCode (cheader_filename = "pango/pango.h")] public struct FontMetrics { public int get_approximate_char_width (); @@ -561,8 +563,6 @@ namespace Pango { public static GLib.Type get_type (); public int get_underline_position (); public int get_underline_thickness (); - public weak Pango.FontMetrics @ref (); - public void unref (); } [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] @@ -578,13 +578,12 @@ namespace Pango { public weak Pango.GlyphGeometry geometry; public weak Pango.GlyphVisAttr attr; } - [ReferenceType] + [ReferenceType (free_function = "pango_glyph_item_free")] [CCode (cheader_filename = "pango/pango.h")] public struct GlyphItem { public weak Pango.Item item; public weak Pango.GlyphString glyphs; public weak GLib.SList apply_attrs (string text, Pango.AttrList list); - public void free (); public void letter_space (string text, Pango.LogAttr log_attrs, int letter_spacing); public weak Pango.GlyphItem split (string text, int split_index); } @@ -597,7 +596,6 @@ namespace Pango { public weak Pango.GlyphString copy (); public void extents (Pango.Font font, out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect); public void extents_range (int start, int end, Pango.Font font, out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect); - public void free (); public void get_logical_widths (string text, int length, int embedding_level, int logical_widths); public static GLib.Type get_type (); public int get_width (); @@ -619,7 +617,6 @@ namespace Pango { public int num_chars; public weak Pango.Analysis analysis; public weak Pango.Item copy (); - public void free (); public static GLib.Type get_type (); public Item (); public weak Pango.Item split (int split_index, int split_offset); @@ -634,11 +631,10 @@ namespace Pango { public bool includes_script (Pango.Script script); public bool matches (string range_list); } - [ReferenceType] + [ReferenceType (free_function = "pango_layout_iter_free")] [CCode (cheader_filename = "pango/pango.h")] public struct LayoutIter { public bool at_last_line (); - public void free (); public int get_baseline (); public void get_char_extents (out Pango.Rectangle logical_rect); public void get_cluster_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect); @@ -672,8 +668,6 @@ namespace Pango { [NoArrayLength] public void get_x_ranges (int start_index, int end_index, int[] ranges, int n_ranges); public void index_to_x (int index_, bool trailing, int x_pos); - public weak Pango.LayoutLine @ref (); - public void unref (); public bool x_to_index (int x_pos, int index_, int trailing); } [ReferenceType] @@ -711,8 +705,6 @@ namespace Pango { [InstanceByReference] public Pango.Matrix copy (); [InstanceByReference] - public void free (); - [InstanceByReference] public double get_font_scale_factor (); public static GLib.Type get_type (); [InstanceByReference] @@ -740,7 +732,6 @@ namespace Pango { [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] public struct ScriptIter { - public void free (); public void get_range (string start, string end, Pango.Script script); public ScriptIter (string text, int length); public bool next (); @@ -749,7 +740,6 @@ namespace Pango { [CCode (cheader_filename = "pango/pango.h")] public struct TabArray { public weak Pango.TabArray copy (); - public void free (); public bool get_positions_in_pixels (); public int get_size (); public void get_tab (int tab_index, Pango.TabAlign alignment, int location); @@ -763,7 +753,6 @@ namespace Pango { [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] public struct Win32FontCache { - public void free (); public pointer load (pointer logfont); public pointer loadw (pointer logfont); public Win32FontCache (); @@ -802,7 +791,6 @@ namespace Pango { public static void context_set_shape_renderer (Pango.Context context, Pango.CairoShapeRendererFunc func, pointer data, GLib.DestroyNotify dnotify); public static weak Pango.Layout create_layout (Cairo.Context cr); public static void error_underline_path (Cairo.Context cr, double x, double y, double width, double height); - public static weak Cairo.ScaledFont font_get_scaled_font (Pango.Font font); public static void glyph_string_path (Cairo.Context cr, Pango.Font font, Pango.GlyphString glyphs); public static void layout_line_path (Cairo.Context cr, Pango.LayoutLine line); public static void layout_path (Cairo.Context cr, Pango.Layout layout); diff --git a/vapi/vte.vala b/vapi/vte.vala index c4604eb..7ca81b5 100644 --- a/vapi/vte.vala +++ b/vapi/vte.vala @@ -83,16 +83,16 @@ namespace Vte { public void set_background_image (Gdk.Pixbuf image); public void set_background_image_file (string path); public void set_background_saturation (double saturation); - public void set_background_tint_color (Gdk.Color color); + public void set_background_tint_color (out Gdk.Color color); public void set_background_transparent (bool transparent); public void set_backspace_binding (Vte.TerminalEraseBinding binding); - public void set_color_background (Gdk.Color background); - public void set_color_bold (Gdk.Color bold); - public void set_color_cursor (Gdk.Color cursor_background); - public void set_color_dim (Gdk.Color dim); - public void set_color_foreground (Gdk.Color foreground); - public void set_color_highlight (Gdk.Color highlight_background); - public void set_colors (Gdk.Color foreground, Gdk.Color background, Gdk.Color palette, long palette_size); + public void set_color_background (out Gdk.Color background); + public void set_color_bold (out Gdk.Color bold); + public void set_color_cursor (out Gdk.Color cursor_background); + public void set_color_dim (out Gdk.Color dim); + public void set_color_foreground (out Gdk.Color foreground); + public void set_color_highlight (out Gdk.Color highlight_background); + public void set_colors (out Gdk.Color foreground, out Gdk.Color background, out Gdk.Color palette, long palette_size); public void set_cursor_blinks (bool blink); public void set_default_colors (); public void set_delete_binding (Vte.TerminalEraseBinding binding); diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 4ee58a3..a8f229c 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -297,12 +297,24 @@ public class Vala.GIdlParser : CodeVisitor { } current_data_type = st; - + + string ref_function = null; + string unref_function = null; + string free_function = null; + foreach (weak IdlNode member in st_node.members) { if (member.type == IdlNodeTypeId.FUNCTION) { - var m = parse_function ((IdlNodeFunction) member); - if (m != null) { - st.add_method (m); + if (member.name == "ref") { + ref_function = ((IdlNodeFunction) member).symbol; + } else if (member.name == "unref") { + unref_function = ((IdlNodeFunction) member).symbol; + } else if (member.name == "free") { + free_function = ((IdlNodeFunction) member).symbol; + } else { + var m = parse_function ((IdlNodeFunction) member); + if (m != null) { + st.add_method (m); + } } } else if (member.type == IdlNodeTypeId.FIELD) { var f = parse_field ((IdlNodeField) member); @@ -312,6 +324,15 @@ public class Vala.GIdlParser : CodeVisitor { } } + if (ref_function != null) { + st.set_dup_function (ref_function); + } + if (unref_function != null) { + st.set_free_function (unref_function); + } else if (free_function != null) { + st.set_free_function (free_function); + } + current_data_type = null; return st; @@ -336,12 +357,24 @@ public class Vala.GIdlParser : CodeVisitor { } current_data_type = st; - + + string ref_function = null; + string unref_function = null; + string free_function = null; + foreach (weak IdlNode member in boxed_node.members) { if (member.type == IdlNodeTypeId.FUNCTION) { - var m = parse_function ((IdlNodeFunction) member); - if (m != null) { - st.add_method (m); + if (member.name == "ref") { + ref_function = ((IdlNodeFunction) member).symbol; + } else if (member.name == "unref") { + unref_function = ((IdlNodeFunction) member).symbol; + } else if (member.name == "free") { + free_function = ((IdlNodeFunction) member).symbol; + } else { + var m = parse_function ((IdlNodeFunction) member); + if (m != null) { + st.add_method (m); + } } } else if (member.type == IdlNodeTypeId.FIELD) { var f = parse_field ((IdlNodeField) member); @@ -351,6 +384,15 @@ public class Vala.GIdlParser : CodeVisitor { } } + if (ref_function != null) { + st.set_dup_function (ref_function); + } + if (unref_function != null) { + st.set_free_function (unref_function); + } else if (free_function != null) { + st.set_free_function (free_function); + } + current_data_type = null; return st; @@ -638,6 +680,12 @@ public class Vala.GIdlParser : CodeVisitor { } else if (n == "FILE") { type.namespace_name = "GLib"; type.type_name = "FileStream"; + } else if (n == "GType") { + type.namespace_name = "GLib"; + type.type_name = "Type"; + if (type_node.is_pointer) { + type.array_rank = 1; + } } else { parse_type_string (type, n); if (type_node.is_pointer && is_value_type (n)) { @@ -651,15 +699,21 @@ public class Vala.GIdlParser : CodeVisitor { } private bool is_value_type (string! type_name) { - // FIXME only works if both types are in current package, e.g. doesn't work when Gtk uses GdkRectangle var type_attributes = get_attributes (type_name); if (type_attributes != null) { + // type in the same package foreach (string attr in type_attributes) { var nv = attr.split ("=", 2); if (nv[0] == "is_value_type" && eval (nv[1]) == "1") { return true; } } + } else { + // type in a dependency package + var dt = cname_type_map[type_name]; + if (dt != null) { + return !dt.is_reference_type (); + } } return false; -- 2.7.4