From: Juerg Billeter Date: Thu, 30 Aug 2007 18:05:37 +0000 (+0000) Subject: remove support for reference-type structs, improve support for non-GObject X-Git-Tag: VALA_0_1_3~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dafce8e1e7191b0efd116dac2810ab7a34412aee;p=thirdparty%2Fvala.git remove support for reference-type structs, improve support for non-GObject 2007-08-30 Juerg Billeter * vala/valaclass.vala, vala/valainterfacewriter.vala, vala/valastruct.vala: remove support for reference-type structs, improve support for non-GObject classes * vapigen/valagidlparser.vala, vapi/cairo.vala, vapi/curses.vala, vapi/dbus-glib-1.vala, vapi/enchant.vala, vapi/hal.vala, vapi/libxml-2.0.vala, vapi/sqlite3.vala, vapi/packages/libsoup-2.2/libsoup-2.2-custom.vala, vapi/packages/pango/pango-custom.vala: replace reference-type structs by classes * vapi/atk.vala, vapi/gconf-2.0.vala, vapi/gdk-2.0.vala, vapi/gio-standalone.vala, vapi/gnome-desktop-2.0.vala, vapi/gnome-vfs-2.0.vala, vapi/gstreamer-0.10.vala, vapi/gtk+-2.0.vala, vapi/gtksourceview-2.0.vala, vapi/hildon-1.vala, vapi/libglade-2.0.vala, vapi/libgnome-2.0.vala, vapi/libgnomeui-2.0.vala, vapi/libsoup-2.2.vala, vapi/libwnck-1.0.vala, vapi/pango.vala, vapi/poppler-glib.vala, vapi/vte.vala: regenerated svn path=/trunk/; revision=545 --- diff --git a/ChangeLog b/ChangeLog index 1583b507e..c0d9e4cdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2007-08-30 Jürg Billeter + + * vala/valaclass.vala, vala/valainterfacewriter.vala, + vala/valastruct.vala: remove support for reference-type structs, + improve support for non-GObject classes + + * vapigen/valagidlparser.vala, vapi/cairo.vala, vapi/curses.vala, + vapi/dbus-glib-1.vala, vapi/enchant.vala, vapi/hal.vala, + vapi/libxml-2.0.vala, vapi/sqlite3.vala, + vapi/packages/libsoup-2.2/libsoup-2.2-custom.vala, + vapi/packages/pango/pango-custom.vala: replace reference-type structs + by classes + + * vapi/atk.vala, vapi/gconf-2.0.vala, vapi/gdk-2.0.vala, + vapi/gio-standalone.vala, vapi/gnome-desktop-2.0.vala, + vapi/gnome-vfs-2.0.vala, vapi/gstreamer-0.10.vala, vapi/gtk+-2.0.vala, + vapi/gtksourceview-2.0.vala, vapi/hildon-1.vala, + vapi/libglade-2.0.vala, vapi/libgnome-2.0.vala, + vapi/libgnomeui-2.0.vala, vapi/libsoup-2.2.vala, + vapi/libwnck-1.0.vala, vapi/pango.vala, vapi/poppler-glib.vala, + vapi/vte.vala: regenerated + 2007-08-30 Jürg Billeter * vala/parser.y: fix internal warnings on syntax errors diff --git a/vala/valaclass.vala b/vala/valaclass.vala index 087668fca..00497e26e 100644 --- a/vala/valaclass.vala +++ b/vala/valaclass.vala @@ -449,6 +449,10 @@ public class Vala.Class : DataType { return type_id; } + public void set_type_id (string! type_id) { + this.type_id = type_id; + } + public override string get_marshaller_type_name () { if (marshaller_type_name == null) { if (base_class != null) { @@ -522,10 +526,7 @@ public class Vala.Class : DataType { } public string get_default_free_function () { - if (default_construction_method != null) { - return get_lower_case_cprefix () + "free"; - } - return null; + return get_lower_case_cprefix () + "free"; } public override string get_free_function () { diff --git a/vala/valainterfacewriter.vala b/vala/valainterfacewriter.vala index 2c1188497..a30016d63 100644 --- a/vala/valainterfacewriter.vala +++ b/vala/valainterfacewriter.vala @@ -105,7 +105,25 @@ public class Vala.InterfaceWriter : CodeVisitor { cheaders = "%s,%s".printf (cheaders, cheader); } } - write_string ("[CCode (cheader_filename = \"%s\")]".printf (cheaders)); + write_string ("[CCode ("); + + if (cl.is_reference_counting ()) { + if (cl.base_class == null || cl.base_class.get_ref_function () == null || cl.base_class.get_ref_function () != cl.get_ref_function ()) { + write_string ("ref_function = \"%s\", ".printf (cl.get_ref_function ())); + } + if (cl.base_class == null || cl.base_class.get_unref_function () == null || cl.base_class.get_unref_function () != cl.get_unref_function ()) { + write_string ("unref_function = \"%s\", ".printf (cl.get_unref_function ())); + } + } else { + if (cl.get_dup_function () != null) { + write_string ("copy_function = \"%s\", ".printf (cl.get_dup_function ())); + } + if (cl.get_free_function () != cl.get_default_free_function ()) { + write_string ("free_function = \"%s\", ".printf (cl.get_free_function ())); + } + } + + write_string ("cheader_filename = \"%s\")]".printf (cheaders)); write_newline (); write_indent (); @@ -162,28 +180,6 @@ public class Vala.InterfaceWriter : CodeVisitor { return; } - if (st.is_reference_type ()) { - write_indent (); - 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 (); var first = true; diff --git a/vala/valastruct.vala b/vala/valastruct.vala index 08ebf334d..7c9a85118 100644 --- a/vala/valastruct.vala +++ b/vala/valastruct.vala @@ -41,7 +41,6 @@ public class Vala.Struct : DataType { private string type_id; private string lower_case_cprefix; private string lower_case_csuffix; - private bool reference_type; private bool integer_type; private bool floating_type; private int rank; @@ -200,11 +199,7 @@ public class Vala.Struct : DataType { public override string get_upper_case_cname (string infix) { return get_lower_case_cname (infix).up (); } - - public override bool is_reference_type () { - return reference_type; - } - + /** * Returns whether this is an integer type. * @@ -231,16 +226,7 @@ public class Vala.Struct : DataType { public int get_rank () { return rank; } - - /** - * Sets whether this data type has value or reference type semantics. - * - * @param ref_type true if this data type has reference type semantics - */ - public void set_is_reference_type (bool ref_type) { - reference_type = ref_type; - } - + private void process_ccode_attribute (Attribute! a) { if (a.has_argument ("cname")) { set_cname (a.get_string ("cname")); @@ -273,17 +259,7 @@ public class Vala.Struct : DataType { set_default_value (a.get_string ("default_value")); } } - - private void process_ref_type_attribute (Attribute! a) { - reference_type = true; - if (a.has_argument ("dup_function")) { - set_dup_function (a.get_string ("dup_function")); - } - if (a.has_argument ("free_function")) { - set_free_function (a.get_string ("free_function")); - } - } - + private void process_integer_type_attribute (Attribute! a) { integer_type = true; if (a.has_argument ("rank")) { @@ -305,8 +281,6 @@ public class Vala.Struct : DataType { foreach (Attribute a in attributes) { if (a.name == "CCode") { process_ccode_attribute (a); - } else if (a.name == "ReferenceType") { - process_ref_type_attribute (a); } else if (a.name == "IntegerType") { process_integer_type_attribute (a); } else if (a.name == "FloatingType") { @@ -315,36 +289,6 @@ public class Vala.Struct : DataType { } } - public override bool is_reference_counting () { - return false; - } - - public override string get_dup_function () { - 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) { - free_function = get_default_free_function (); - } - return free_function; - } - - public void set_free_function (string! name) { - this.free_function = name; - } - public override string get_type_id () { if (type_id == null) { if (is_reference_type ()) { @@ -362,11 +306,7 @@ public class Vala.Struct : DataType { public override string get_marshaller_type_name () { if (marshaller_type_name == null) { - if (is_reference_type ()) { - marshaller_type_name = "POINTER"; - } else { - Report.error (source_reference, "The type `%s` doesn't declare a marshaller type name".printf (get_full_name ())); - } + Report.error (source_reference, "The type `%s` doesn't declare a marshaller type name".printf (get_full_name ())); } return marshaller_type_name; } @@ -377,12 +317,8 @@ public class Vala.Struct : DataType { public override string get_get_value_function () { if (get_value_function == null) { - if (is_reference_type ()) { - return "g_value_get_pointer"; - } else { - Report.error (source_reference, "The value type `%s` doesn't declare a GValue get function".printf (get_full_name ())); - return null; - } + Report.error (source_reference, "The value type `%s` doesn't declare a GValue get function".printf (get_full_name ())); + return null; } else { return get_value_function; } @@ -390,12 +326,8 @@ public class Vala.Struct : DataType { public override string get_set_value_function () { if (set_value_function == null) { - if (is_reference_type ()) { - return "g_value_set_pointer"; - } else { - Report.error (source_reference, "The value type `%s` doesn't declare a GValue set function".printf (get_full_name ())); - return null; - } + Report.error (source_reference, "The value type `%s` doesn't declare a GValue set function".printf (get_full_name ())); + return null; } else { return set_value_function; } diff --git a/vapi/atk.vala b/vapi/atk.vala index 87157f14a..6a79b80a4 100644 --- a/vapi/atk.vala +++ b/vapi/atk.vala @@ -400,6 +400,53 @@ namespace Atk { public static GLib.Type get_type (); } [CCode (cheader_filename = "atk/atk.h")] + public class Attribute { + public weak string name; + public weak string value; + public static void set_free (GLib.SList attrib_set); + } + [CCode (cheader_filename = "atk/atk.h")] + public class KeyEventStruct { + public int type; + public uint state; + public uint keyval; + public int length; + public weak string string; + public ushort keycode; + public uint timestamp; + } + [CCode (cheader_filename = "atk/atk.h")] + public class PropertyValues { + public weak string property_name; + public weak GLib.Value old_value; + public weak GLib.Value new_value; + } + [CCode (cheader_filename = "atk/atk.h")] + public class TextRange { + public weak Atk.TextRectangle bounds; + public int start_offset; + public int end_offset; + public weak string content; + } + [CCode (cheader_filename = "atk/atk.h")] + public class TextRectangle { + public int x; + public int y; + public int width; + public int height; + } + [CCode (cheader_filename = "atk/atk.h")] + public class Focus { + public static void tracker_init (Atk.EventListenerInit init); + public static void tracker_notify (Atk.Object object); + } + [CCode (cheader_filename = "atk/atk.h")] + public class State { + public static Atk.StateType type_for_name (string name); + public static weak string type_get_name (Atk.StateType type); + public static Atk.StateType type_register (string name); + } + [CCode (cheader_filename = "atk/atk.h")] public interface Action { public abstract bool do_action (int i); public abstract weak string get_description (int i); @@ -581,31 +628,6 @@ namespace Atk { public static GLib.Type get_type (); public abstract bool set_current_value (GLib.Value value); } - [ReferenceType] - [CCode (cheader_filename = "atk/atk.h")] - public struct Attribute { - public weak string name; - public weak string value; - public static void set_free (GLib.SList attrib_set); - } - [ReferenceType] - [CCode (cheader_filename = "atk/atk.h")] - public struct KeyEventStruct { - public int type; - public uint state; - public uint keyval; - public int length; - public weak string string; - public ushort keycode; - public uint timestamp; - } - [ReferenceType] - [CCode (cheader_filename = "atk/atk.h")] - public struct PropertyValues { - public weak string property_name; - public weak GLib.Value old_value; - public weak GLib.Value new_value; - } [CCode (cheader_filename = "atk/atk.h")] public struct Rectangle { public int x; @@ -614,35 +636,6 @@ namespace Atk { public int height; public static GLib.Type get_type (); } - [ReferenceType] - [CCode (cheader_filename = "atk/atk.h")] - public struct TextRange { - public weak Atk.TextRectangle bounds; - public int start_offset; - public int end_offset; - public weak string content; - } - [ReferenceType] - [CCode (cheader_filename = "atk/atk.h")] - public struct TextRectangle { - public int x; - public int y; - public int width; - public int height; - } - [ReferenceType] - [CCode (cheader_filename = "atk/atk.h")] - public struct Focus { - public static void tracker_init (Atk.EventListenerInit init); - public static void tracker_notify (Atk.Object object); - } - [ReferenceType] - [CCode (cheader_filename = "atk/atk.h")] - public struct State { - public static Atk.StateType type_for_name (string name); - public static weak string type_get_name (Atk.StateType type); - public static Atk.StateType type_register (string name); - } public static delegate void EventListener (Atk.Object obj); public static delegate void EventListenerInit (); public static delegate void FocusHandler (Atk.Object arg1, bool arg2); diff --git a/vapi/cairo.vala b/vapi/cairo.vala index cf4f2d737..671cae5c2 100644 --- a/vapi/cairo.vala +++ b/vapi/cairo.vala @@ -22,9 +22,8 @@ [CCode (cheader_filename = "cairo.h")] namespace Cairo { - [ReferenceType (dup_function = "cairo_reference", free_function = "cairo_destroy")] - [CCode (cname = "cairo_t", cprefix = "cairo_", cheader_filename = "cairo.h")] - public struct Context { + [CCode (ref_function = "cairo_reference", unref_function = "cairo_destroy", cname = "cairo_t", cprefix = "cairo_", cheader_filename = "cairo.h")] + public class Context { [CCode (cname = "cairo_create")] public Context (Surface target); public Status status (); @@ -197,9 +196,8 @@ namespace Cairo { SATURATE } - [ReferenceType (free_function = "cairo_path_destroy")] - [CCode (cname = "cairo_path_t")] - public struct Path { + [CCode (free_function = "cairo_path_destroy", cname = "cairo_path_t")] + public class Path { public Status status; [NoArrayLength ()] public PathData[] data; @@ -230,9 +228,8 @@ namespace Cairo { CLOSE_PATH } - [ReferenceType (dup_function = "cairo_pattern_reference", free_function = "cairo_pattern_destroy")] - [CCode (cname = "cairo_pattern_t")] - public struct Pattern { + [CCode (ref_function = "cairo_pattern_reference", unref_function = "cairo_pattern_destroy", cname = "cairo_pattern_t")] + public class Pattern { public void add_color_stop_rgb (double offset, double red, double green, double blue); public void add_color_stop_rgba (double offset, double red, double green, double blue, double alpha); @@ -287,9 +284,8 @@ namespace Cairo { RADIAL } - [ReferenceType ()] [CCode (cname = "cairo_glyph_t")] - public struct Glyph { + public class Glyph { } [CCode (cname = "cairo_font_slant_t")] @@ -305,9 +301,8 @@ namespace Cairo { BOLD } - [ReferenceType (dup_function = "cairo_font_face_reference", free_function = "cairo_font_face_destroy")] - [CCode (cname = "cairo_font_face_t")] - public struct FontFace { + [CCode (ref_function = "cairo_font_face_reference", unref_function = "cairo_font_face_destroy", cname = "cairo_font_face_t")] + public class FontFace { public Status status (); public FontType get_type (); } @@ -320,9 +315,8 @@ namespace Cairo { ATSUI } - [ReferenceType (dup_function = "cairo_scaled_font_reference", free_function = "cairo_scaled_font_destroy")] - [CCode (cname = "cairo_scaled_font_t")] - public struct ScaledFont { + [CCode (ref_function = "cairo_scaled_font_reference", unref_function = "cairo_scaled_font_destroy", cname = "cairo_scaled_font_t")] + public class ScaledFont { [CCode (cname = "cairo_scaled_font_create")] public ScaledFont (Matrix font_matrix, Matrix ctm, ref FontOptions options); public Status status (); @@ -356,9 +350,8 @@ namespace Cairo { public double y_advance; } - [ReferenceType (dup_function = "cairo_font_options_copy", free_function = "cairo_font_options_destroy")] - [CCode (cname = "cairo_font_options_t")] - public struct FontOptions { + [CCode (copy_function = "cairo_font_options_copy", free_function = "cairo_font_options_destroy", cname = "cairo_font_options_t")] + public class FontOptions { [CCode (cname = "cairo_font_options_create")] public FontOptions (); public Status status (); @@ -400,9 +393,8 @@ namespace Cairo { ON } - [ReferenceType (dup_function = "cairo_surface_reference", free_function = "cairo_surface_destroy")] - [CCode (cname = "cairo_surface_t", cheader_filename = "cairo.h")] - public struct Surface { + [CCode (ref_function = "cairo_surface_reference", unref_function = "cairo_surface_destroy", cname = "cairo_surface_t", cheader_filename = "cairo.h")] + public class Surface { [CCode (cname = "cairo_surface_create_similar")] public Surface.similar (Surface! other, Content content, int width, int height); public void finish (); @@ -449,9 +441,8 @@ namespace Cairo { RGB16_565 } - [ReferenceType (dup_function = "cairo_surface_reference", free_function = "cairo_surface_destroy")] [CCode (cname = "cairo_surface_t")] - public struct ImageSurface : Surface { + public class ImageSurface : Surface { [CCode (cname = "cairo_image_surface_create")] public ImageSurface (Format format, int width, int height); [CCode (cname = "cairo_image_surface_create_for_data")] @@ -469,9 +460,8 @@ namespace Cairo { public ImageSurface.from_png_stream (ReadFunc read_func, pointer closure); } - [ReferenceType (dup_function = "cairo_surface_reference", free_function = "cairo_surface_destroy")] [CCode (cname = "cairo_surface_t", cheader_filename = "cairo-pdf.h")] - public struct PdfSurface : Surface { + public class PdfSurface : Surface { [CCode (cname = "cairo_pdf_surface_create")] public PdfSurface (string! filename, double width_in_points, double height_in_points); [CCode (cname = "cairo_pdf_surface_create_for_stream")] @@ -484,9 +474,8 @@ namespace Cairo { [NoArrayLength ()] public static delegate Status WriteFunc (pointer closure, uchar[] data, uint length); - [ReferenceType (dup_function = "cairo_surface_reference", free_function = "cairo_surface_destroy")] [CCode (cname = "cairo_surface_t", cheader_filename = "cairo-ps.h")] - public struct PsSurface : Surface { + public class PsSurface : Surface { [CCode (cname = "cairo_ps_surface_create")] public PsSurface (string! filename, double width_in_points, double height_in_points); [CCode (cname = "cairo_ps_surface_create_for_stream")] @@ -497,9 +486,8 @@ namespace Cairo { public void dsc_comment (string! comment); } - [ReferenceType (dup_function = "cairo_surface_reference", free_function = "cairo_surface_destroy")] [CCode (cname = "cairo_surface_t", cheader_filename = "cairo-svg.h")] - public struct SvgSurface : Surface { + public class SvgSurface : Surface { [CCode (cname = "cairo_svg_surface_create")] public SvgSurface (string! filename, double width_in_points, double height_in_points); [CCode (cname = "cairo_svg_surface_create_for_stream")] @@ -515,9 +503,8 @@ namespace Cairo { VERSION_1_2 } - [ReferenceType (dup_function = "cairo_surface_reference", free_function = "cairo_surface_destroy")] [CCode (cname = "cairo_surface_t", cheader_filename = "cairo-xlib.h")] - public struct XlibSurface : Surface { + public class XlibSurface : Surface { [CCode (cname = "cairo_xlib_surface_create")] public XlibSurface (pointer dpy, int drawable, pointer visual, int width, int height); [CCode (cname = "cairo_xlib_surface_create_for_bitmap")] @@ -533,9 +520,8 @@ namespace Cairo { public int get_depth (); } - [ReferenceType (free_function = "g_free")] - [CCode (cname = "cairo_matrix_t")] - public struct Matrix { + [CCode (free_function = "g_free", cname = "cairo_matrix_t")] + public class Matrix { public void init (double xx, double yx, double xy, double yy, double x0, double y0); public void init_identity (); public void init_translate (double tx, double ty); diff --git a/vapi/curses.vala b/vapi/curses.vala index 7712d59a1..e9442654e 100644 --- a/vapi/curses.vala +++ b/vapi/curses.vala @@ -55,9 +55,8 @@ namespace Curses { public const int ESCDELAY; - [ReferenceType (free_function = "delwin", dup_function = "dupwin")] - [CCode (cname = "WINDOW", cprefix = "")] - public struct Window { + [CCode (copy_function = "dupwin", free_function = "delwin", cname = "WINDOW", cprefix = "")] + public class Window { public int box(ulong verch, ulong horch); public int clearok(bool bf); public int copywin(Window dstwin, int sminrow, int smincol, int dminrow, int dmincol, int dmaxrow, int dmaxcol, int overlay); @@ -259,9 +258,8 @@ namespace Curses { public int vline(ulong ch, int n); } - [ReferenceType (free_function = "delscreen")] - [CCode (cname = "SCREEN", cprefix = "")] - public struct Screen { + [CCode (free_function = "delscreen", cname = "SCREEN", cprefix = "")] + public class Screen { public void delscreen(); public static Screen newterm(string str, FileStream outfd, FileStream infd); public weak Screen set_term(); diff --git a/vapi/dbus-glib-1.vala b/vapi/dbus-glib-1.vala index 364882ba1..dd3fde1d1 100644 --- a/vapi/dbus-glib-1.vala +++ b/vapi/dbus-glib-1.vala @@ -34,9 +34,8 @@ namespace DBus { public static RawConnection get (BusType type, ref Error error); } - [ReferenceType (dup_function = "dbus_connection_ref", free_function = "dbus_connection_unref")] - [CCode (cname = "DBusConnection")] - public struct RawConnection { + [CCode (ref_function = "dbus_connection_ref", unref_function = "dbus_connection_unref", cname = "DBusConnection")] + public class RawConnection { [CCode (cname = "dbus_connection_setup_with_g_main")] public void setup_with_main (GLib.MainContext context = null); } @@ -98,9 +97,8 @@ namespace DBus { } - [ReferenceType (dup_function = "dbus_g_connection_ref", free_function = "dbus_g_connection_unref")] - [CCode (cname = "DBusGConnection")] - public struct Connection { + [CCode (ref_function = "dbus_g_connection_ref", unref_function = "dbus_g_connection_unref", cname = "DBusGConnection")] + public class Connection { } [CCode (cname = "DBusGProxy", lower_case_csuffix = "g_proxy")] @@ -115,7 +113,6 @@ namespace DBus { [CCode (cname = "DBusGProxyCallNotify")] public static delegate void ProxyCallNotify (Proxy proxy, ProxyCall call_id, pointer user_data); - [ReferenceType] - public struct ProxyCall { + public class ProxyCall { } } diff --git a/vapi/enchant.vala b/vapi/enchant.vala index feff26419..1d7ea93ff 100644 --- a/vapi/enchant.vala +++ b/vapi/enchant.vala @@ -3,8 +3,8 @@ namespace Enchant { public static delegate void BrokerDescribeFn (string provider_name, string provider_desc, string provider_dll_file, pointer user_data); public static delegate void DictDescribeFn (string lang_tag, string provider_name, string provider_desc, string provider_file, pointer user_data); - [ReferenceType (unref_function = "enchant_broker_free")] - public struct Broker { + [CCode (free_function = "enchant_broker_free")] + public class Broker { [CCode (cname = "enchant_broker_init")] public Broker (); @@ -18,8 +18,7 @@ namespace Enchant { public weak string! get_error (); } - [ReferenceType ()] - public struct Dict { + public class Dict { public int check (weak string! word, long len = -1); public weak string[] suggest (weak string! word, long len = -1); // FIXME integrate with memory manager [NoArrayLength ()] diff --git a/vapi/gconf-2.0.vala b/vapi/gconf-2.0.vala index 4c915957f..5b1af2250 100644 --- a/vapi/gconf-2.0.vala +++ b/vapi/gconf-2.0.vala @@ -107,9 +107,8 @@ namespace GConf { [HasEmitter] public signal void error (GLib.Error error); } - [ReferenceType (dup_function = "gconf_backend_ref", free_function = "gconf_backend_unref")] - [CCode (cheader_filename = "gconf/gconf.h")] - public struct Backend { + [CCode (ref_function = "gconf_backend_ref", unref_function = "gconf_backend_unref", cheader_filename = "gconf/gconf.h")] + public class Backend { public weak string name; public uint refcount; public weak GConf.BackendVTable vtable; @@ -117,14 +116,12 @@ namespace GConf { public static weak string file (string address); public weak GConf.Source resolve_address (string address) throws GLib.Error; } - [ReferenceType] [CCode (cheader_filename = "gconf/gconf.h")] - public struct BackendVTable { + public class BackendVTable { public ulong vtable_size; } - [ReferenceType (dup_function = "gconf_change_set_ref", free_function = "gconf_change_set_unref")] - [CCode (cheader_filename = "gconf/gconf.h")] - public struct ChangeSet { + [CCode (ref_function = "gconf_change_set_ref", unref_function = "gconf_change_set_unref", cheader_filename = "gconf/gconf.h")] + public class ChangeSet { public bool check_value (string key, GConf.Value value_retloc); public void clear (); public void @foreach (GConf.ChangeSetForeachFunc func, pointer user_data); @@ -145,9 +142,8 @@ namespace GConf { public uint size (); public void unset (string key); } - [ReferenceType (dup_function = "gconf_engine_ref", free_function = "gconf_engine_unref")] - [CCode (cheader_filename = "gconf/gconf.h")] - public struct Engine { + [CCode (ref_function = "gconf_engine_ref", unref_function = "gconf_engine_unref", cheader_filename = "gconf/gconf.h")] + public class Engine { public weak GLib.SList all_dirs (string dir) throws GLib.Error; public weak GLib.SList all_entries (string dir) throws GLib.Error; public bool associate_schema (string key, string schema_key) throws GLib.Error; @@ -191,9 +187,8 @@ namespace GConf { public void suggest_sync () throws GLib.Error; public bool unset (string key) throws GLib.Error; } - [ReferenceType (dup_function = "gconf_entry_ref", free_function = "gconf_entry_unref")] - [CCode (cheader_filename = "gconf/gconf.h")] - public struct Entry { + [CCode (ref_function = "gconf_entry_ref", unref_function = "gconf_entry_unref", cheader_filename = "gconf/gconf.h")] + public class Entry { public weak string key; public weak GConf.Value value; public weak GConf.Entry copy (); @@ -212,15 +207,13 @@ namespace GConf { public void set_value_nocopy (GConf.Value val); public weak GConf.Value steal_value (); } - [ReferenceType] [CCode (cheader_filename = "gconf/gconf.h")] - public struct EnumStringPair { + public class EnumStringPair { public int enum_value; public weak string str; } - [ReferenceType] [CCode (cheader_filename = "gconf/gconf.h")] - public struct Listeners { + public class Listeners { public uint add (string listen_point, pointer listener_data, GLib.FreeFunc destroy_notify); public uint count (); public void @foreach (GConf.ListenersForeach callback, pointer user_data); @@ -230,21 +223,18 @@ namespace GConf { public void remove (uint cnxn_id); public void remove_if (GConf.ListenersPredicate predicate, pointer user_data); } - [ReferenceType] [CCode (cheader_filename = "gconf/gconf.h")] - public struct LocaleCache { + public class LocaleCache { public void expire (uint max_age_exclusive_in_seconds); public weak GConf.LocaleList get_list (string locale); public LocaleCache (); } - [ReferenceType (dup_function = "gconf_locale_list_ref", free_function = "gconf_locale_list_unref")] - [CCode (cheader_filename = "gconf/gconf.h")] - public struct LocaleList { + [CCode (ref_function = "gconf_locale_list_ref", unref_function = "gconf_locale_list_unref", cheader_filename = "gconf/gconf.h")] + public class LocaleList { public weak string list; } - [ReferenceType] [CCode (cheader_filename = "gconf/gconf.h")] - public struct MetaInfo { + public class MetaInfo { public weak string schema; public weak string mod_user; public GLib.Time mod_time; @@ -257,9 +247,8 @@ namespace GConf { public void set_mod_user (string mod_user); public void set_schema (string schema_name); } - [ReferenceType] [CCode (cheader_filename = "gconf/gconf.h")] - public struct Schema { + public class Schema { public weak GConf.Schema copy (); public GConf.ValueType get_car_type (); public GConf.ValueType get_cdr_type (); @@ -282,16 +271,14 @@ namespace GConf { public void set_short_desc (string desc); public void set_type (GConf.ValueType type); } - [ReferenceType (free_function = "gconf_source_free")] [CCode (cheader_filename = "gconf/gconf.h")] - public struct Source { + public class Source { public uint flags; public weak string address; public weak GConf.Backend backend; } - [ReferenceType (free_function = "gconf_sources_free")] [CCode (cheader_filename = "gconf/gconf.h")] - public struct Sources { + public class Sources { public weak GLib.List sources; public void add_listener (uint id, string location); public weak GLib.SList all_dirs (string dir) throws GLib.Error; @@ -313,15 +300,13 @@ namespace GConf { public bool sync_all () throws GLib.Error; public void unset_value (string key, string locale, GConf.Sources modified_sources) throws GLib.Error; } - [ReferenceType] [CCode (cheader_filename = "gconf/gconf.h")] - public struct UnsetNotify { + public class UnsetNotify { public weak GConf.Sources modified_sources; public weak string key; } - [ReferenceType] [CCode (cheader_filename = "gconf/gconf.h")] - public struct Value { + public class Value { public GConf.ValueType type; public int compare (GConf.Value value_b); public weak GConf.Value copy (); @@ -351,9 +336,8 @@ namespace GConf { public void set_string (string the_str); public weak string to_string (); } - [ReferenceType] [CCode (cheader_filename = "gconf/gconf.h")] - public struct GconfAddress { + public class GconfAddress { [CCode (cname = "gconf_address_backend")] public static weak string backend (string address); [CCode (cname = "gconf_address_flags")] diff --git a/vapi/gdk-2.0.vala b/vapi/gdk-2.0.vala index b44d200c2..671fcdd13 100644 --- a/vapi/gdk-2.0.vala +++ b/vapi/gdk-2.0.vala @@ -1140,13 +1140,7 @@ namespace Gdk { public void withdraw (); } [CCode (cheader_filename = "gdk/gdk.h")] - public class Bitmap : GLib.Object { - public weak GLib.Object parent_instance; - public static weak Gdk.Bitmap create_from_data (Gdk.Drawable drawable, string data, int width, int height); - } - [ReferenceType] - [CCode (cheader_filename = "gdk/gdk.h")] - public struct BRESINFO { + public class BRESINFO { public int minor_axis; public int d; public int m; @@ -1154,37 +1148,22 @@ namespace Gdk { public int incr1; public int incr2; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EdgeTable { + public class EdgeTable { public int ymax; public int ymin; public weak Gdk.ScanLineList scanlines; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EdgeTableEntry { + public class EdgeTableEntry { } [CCode (cheader_filename = "gdk/gdk.h")] - public struct Color { - public uint pixel; - public ushort red; - public ushort green; - public ushort blue; - [InstanceByReference] - public Gdk.Color copy (); - [InstanceByReference] - public bool equal (out Gdk.Color colorb); - public static GLib.Type get_type (); - [InstanceByReference] - public uint hash (); - public static bool parse (string spec, out Gdk.Color color); - [InstanceByReference] - public weak string to_string (); + public class Bitmap : GLib.Object { + public weak GLib.Object parent_instance; + public static weak Gdk.Bitmap create_from_data (Gdk.Drawable drawable, string data, int width, int height); } - [ReferenceType (dup_function = "gdk_cursor_ref", free_function = "gdk_cursor_unref")] - [CCode (cheader_filename = "gdk/gdk.h")] - public struct Cursor { + [CCode (ref_function = "gdk_cursor_ref", unref_function = "gdk_cursor_unref", cheader_filename = "gdk/gdk.h")] + public class Cursor { public Gdk.CursorType type; public weak Gdk.Display get_display (); public weak Gdk.Pixbuf get_image (); @@ -1195,33 +1174,28 @@ namespace Gdk { 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); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct DeviceAxis { + public class DeviceAxis { public Gdk.AxisUse use; public double min; public double max; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct DeviceKey { + public class DeviceKey { public uint keyval; public Gdk.ModifierType modifiers; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct DisplayPointerHooks { + public class DisplayPointerHooks { } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventAny { + public class EventAny { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventButton { + public class EventButton { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1235,9 +1209,8 @@ namespace Gdk { public double x_root; public double y_root; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventClient { + public class EventClient { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1245,9 +1218,8 @@ namespace Gdk { public ushort data_format; public weak GLib.Memory b; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventConfigure { + public class EventConfigure { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1256,9 +1228,8 @@ namespace Gdk { public int width; public int height; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventCrossing { + public class EventCrossing { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1273,9 +1244,8 @@ namespace Gdk { public bool focus; public uint state; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventDND { + public class EventDND { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1284,9 +1254,8 @@ namespace Gdk { public short x_root; public short y_root; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventExpose { + public class EventExpose { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1294,17 +1263,15 @@ namespace Gdk { public weak Gdk.Region region; public int count; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventFocus { + public class EventFocus { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; public short @in; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventGrabBroken { + public class EventGrabBroken { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1312,9 +1279,8 @@ namespace Gdk { public bool implicit; public weak Gdk.Window grab_window; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventKey { + public class EventKey { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1327,9 +1293,8 @@ namespace Gdk { public uchar group; public uint is_modifier; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventMotion { + public class EventMotion { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1343,16 +1308,14 @@ namespace Gdk { public double x_root; public double y_root; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventNoExpose { + public class EventNoExpose { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventOwnerChange { + public class EventOwnerChange { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1362,9 +1325,8 @@ namespace Gdk { public uint time; public uint selection_time; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventProperty { + public class EventProperty { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1372,18 +1334,16 @@ namespace Gdk { public uint time; public uint state; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventProximity { + public class EventProximity { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; public uint time; public weak Gdk.Device device; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventScroll { + public class EventScroll { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1396,9 +1356,8 @@ namespace Gdk { public double x_root; public double y_root; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventSelection { + public class EventSelection { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; @@ -1408,42 +1367,37 @@ namespace Gdk { public uint time; public pointer requestor; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventSetting { + public class EventSetting { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; public Gdk.SettingAction action; public weak string name; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventVisibility { + public class EventVisibility { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; public Gdk.VisibilityState state; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct EventWindowState { + public class EventWindowState { public Gdk.EventType type; public weak Gdk.Window window; public char send_event; public Gdk.WindowState changed_mask; public Gdk.WindowState new_window_state; } - [ReferenceType (dup_function = "gdk_font_ref", free_function = "gdk_font_unref")] - [CCode (cheader_filename = "gdk/gdk.h")] - public struct Font { + [CCode (ref_function = "gdk_font_ref", unref_function = "gdk_font_unref", cheader_filename = "gdk/gdk.h")] + public class Font { public Gdk.FontType type; public int ascent; public int descent; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct GCValues { + public class GCValues { public Gdk.Color foreground; public Gdk.Color background; public weak Gdk.Font font; @@ -1463,9 +1417,8 @@ namespace Gdk { public Gdk.CapStyle cap_style; public Gdk.JoinStyle join_style; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Geometry { + public class Geometry { public int min_width; public int min_height; public int max_width; @@ -1478,37 +1431,32 @@ namespace Gdk { public double max_aspect; public Gdk.Gravity win_gravity; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct KeymapKey { + public class KeymapKey { public uint keycode; public int group; public int level; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct PangoAttrEmbossColor { + public class PangoAttrEmbossColor { public weak Pango.Attribute attr; public Pango.Color color; public PangoAttrEmbossColor (out Gdk.Color color); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct PangoAttrEmbossed { + public class PangoAttrEmbossed { public weak Pango.Attribute attr; public bool embossed; public PangoAttrEmbossed (bool embossed); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct PangoAttrStipple { + public class PangoAttrStipple { public weak Pango.Attribute attr; public weak Gdk.Bitmap stipple; public PangoAttrStipple (Gdk.Bitmap stipple); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct PixbufFormat { + public class PixbufFormat { public weak string get_description (); public weak string get_extensions (); public weak string get_license (); @@ -1519,9 +1467,8 @@ namespace Gdk { public bool is_writable (); public void set_disabled (bool disabled); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct PixbufFrame { + public class PixbufFrame { public weak Gdk.Pixbuf pixbuf; public int x_offset; public int y_offset; @@ -1533,19 +1480,16 @@ namespace Gdk { public weak Gdk.Pixbuf composited; public weak Gdk.Pixbuf revert; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct PixbufScaledAnim { + public class PixbufScaledAnim { public static GLib.Type get_type (); public static GLib.Type iter_get_type (); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct PixbufScaledAnimClass { + public class PixbufScaledAnimClass { } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Pixdata { + public class Pixdata { public uint magic; public int length; public uint pixdata_type; @@ -1559,38 +1503,22 @@ namespace Gdk { public uchar serialize (uint stream_length_p); public weak GLib.String to_csource (string name, Gdk.PixdataDumpType dump_type); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct PixmapObject { + public class PixmapObject { public weak Gdk.Drawable parent_instance; public weak Gdk.Drawable impl; public int depth; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Point { + public class Point { public int x; public int y; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct PointerHooks { - } - [CCode (cheader_filename = "gdk/gdk.h")] - public struct Rectangle { - public int x; - public int y; - public int width; - public int height; - public static GLib.Type get_type (); - [InstanceByReference] - public bool intersect (out Gdk.Rectangle src2, out Gdk.Rectangle dest); - [InstanceByReference] - public void union (out Gdk.Rectangle src2, out Gdk.Rectangle dest); + public class PointerHooks { } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Region { + public class Region { public long size; public long numRects; public weak Gdk.RegionBox rects; @@ -1617,46 +1545,40 @@ namespace Gdk { public void union_with_rect (out Gdk.Rectangle rect); public void xor (Gdk.Region source2); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct RegionBox { + public class RegionBox { public int x1; public int y1; public int x2; public int y2; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct RgbCmap { + public class RgbCmap { public uint colors; public int n_colors; [NoArrayLength] public RgbCmap (uint[] colors, int n_colors); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Segment { + public class Segment { public int x1; public int y1; public int x2; public int y2; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Span { + public class Span { public int x; public int y; public int width; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct TimeCoord { + public class TimeCoord { public uint time; public double axes; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Trapezoid { + public class Trapezoid { public double y1; public double x11; public double x21; @@ -1665,26 +1587,7 @@ namespace Gdk { public double x22; } [CCode (cheader_filename = "gdk/gdk.h")] - public struct WindowAttr { - public weak string title; - public int event_mask; - public int x; - public int y; - public int width; - public int height; - public pointer wclass; - public weak Gdk.Visual visual; - public weak Gdk.Colormap colormap; - public Gdk.WindowType window_type; - public weak Gdk.Cursor cursor; - public weak string wmclass_name; - public weak string wmclass_class; - public bool override_redirect; - public Gdk.WindowTypeHint type_hint; - } - [ReferenceType] - [CCode (cheader_filename = "gdk/gdk.h")] - public struct WindowObject { + public class WindowObject { public weak Gdk.Drawable parent_instance; public weak Gdk.Drawable impl; public weak Gdk.WindowObject parent; @@ -1714,27 +1617,17 @@ namespace Gdk { public Gdk.EventMask event_mask; public static GLib.Type get_type (); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct POINTBLOCK { + public class POINTBLOCK { } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct ScanLineList { + public class ScanLineList { } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct ScanLineListBlock { + public class ScanLineListBlock { } [CCode (cheader_filename = "gdk/gdk.h")] - public struct Atom { - public static Gdk.Atom intern (string atom_name, bool only_if_exists); - public static Gdk.Atom intern_static_string (string atom_name); - public weak string name (); - } - [ReferenceType] - [CCode (cheader_filename = "gdk/gdk.h")] - public struct Cairo { + public class Cairo { public static weak Cairo.Context create (Gdk.Drawable drawable); public static void rectangle (Cairo.Context cr, out Gdk.Rectangle rectangle); public static void region (Cairo.Context cr, Gdk.Region region); @@ -1742,17 +1635,14 @@ namespace Gdk { public static void set_source_pixbuf (Cairo.Context cr, Gdk.Pixbuf pixbuf, double pixbuf_x, double pixbuf_y); public static void set_source_pixmap (Cairo.Context cr, Gdk.Pixmap pixmap, double pixmap_x, double pixmap_y); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Char { + public class Char { } - [ReferenceType (free_function = "gdk_colors_free")] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Colors { + public class Colors { } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Drag { + public class Drag { public static void abort (Gdk.DragContext context, uint time_); public static weak Gdk.DragContext begin (Gdk.Window window, GLib.List targets); public static void drop (Gdk.DragContext context, uint time_); @@ -1765,21 +1655,18 @@ namespace Gdk { public static bool motion (Gdk.DragContext context, Gdk.Window dest_window, Gdk.DragProtocol protocol, int x_root, int y_root, Gdk.DragAction suggested_action, Gdk.DragAction possible_actions, uint time_); public static void status (Gdk.DragContext context, Gdk.DragAction action, uint time_); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Drop { + public class Drop { public static void finish (Gdk.DragContext context, bool success, uint time_); public static void reply (Gdk.DragContext context, bool ok, uint time_); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Error { + public class Error { public static int trap_pop (); public static void trap_push (); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Event { + public class Event { public weak Gdk.Event copy (); public static weak Gdk.Event get (); public bool get_axis (Gdk.AxisUse axis_use, double value); @@ -1800,25 +1687,21 @@ namespace Gdk { public void send_clientmessage_toall (); public void set_screen (Gdk.Screen screen); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Fontset { + public class Fontset { } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Input { + public class Input { public static void set_extension_events (Gdk.Window window, int mask, Gdk.ExtensionMode mode); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Keyboard { + public class Keyboard { public static Gdk.GrabStatus grab (Gdk.Window window, bool owner_events, uint time_); public static bool grab_info_libgtk_only (Gdk.Display display, Gdk.Window grab_window, bool owner_events); public static void ungrab (uint time_); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Keyval { + public class Keyval { public static void convert_case (uint symbol, uint lower, uint upper); public static uint from_name (string keyval_name); public static bool is_lower (uint keyval); @@ -1828,46 +1711,40 @@ namespace Gdk { public static uint to_unicode (uint keyval); public static uint to_upper (uint keyval); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Notify { + public class Notify { public static void startup_complete (); public static void startup_complete_with_id (string startup_id); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Pango { + public class Pango { public static weak Pango.Context context_get (); public static weak Pango.Context context_get_for_screen (Gdk.Screen screen); public static weak Gdk.Region layout_get_clip_region (Pango.Layout layout, int x_origin, int y_origin, int index_ranges, int n_ranges); public static weak Gdk.Region layout_line_get_clip_region (Pango.LayoutLine line, int x_origin, int y_origin, int index_ranges, int n_ranges); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Pointer { + public class Pointer { public static Gdk.GrabStatus grab (Gdk.Window window, bool owner_events, Gdk.EventMask event_mask, Gdk.Window confine_to, Gdk.Cursor cursor, uint time_); public static bool grab_info_libgtk_only (Gdk.Display display, Gdk.Window grab_window, bool owner_events); public static bool is_grabbed (); public static void ungrab (uint time_); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Property { + public class Property { [NoArrayLength] public static void change (Gdk.Window window, Gdk.Atom property, Gdk.Atom type, int format, Gdk.PropMode mode, uchar[] data, int nelements); public static void delete (Gdk.Window window, Gdk.Atom property); [NoArrayLength] public static bool get (Gdk.Window window, Gdk.Atom property, Gdk.Atom type, ulong offset, ulong length, int pdelete, out Gdk.Atom actual_property_type, int actual_format, int actual_length, uchar[] data); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Query { + public class Query { public static void depths (int depths, int count); public static void visual_types (Gdk.VisualType visual_types, int count); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Rgb { + public class Rgb { public static bool colormap_ditherable (Gdk.Colormap cmap); public static bool ditherable (); public static void find_color (Gdk.Colormap colormap, out Gdk.Color color); @@ -1877,9 +1754,8 @@ namespace Gdk { public static void set_min_colors (int min_colors); public static void set_verbose (bool verbose); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Selection { + public class Selection { public static void convert (Gdk.Window requestor, Gdk.Atom selection, Gdk.Atom target, uint time_); public static weak Gdk.Window owner_get (Gdk.Atom selection); public static weak Gdk.Window owner_get_for_display (Gdk.Display display, Gdk.Atom selection); @@ -1890,16 +1766,14 @@ namespace Gdk { public static void send_notify (uint requestor, Gdk.Atom selection, Gdk.Atom target, Gdk.Atom property, uint time_); public static void send_notify_for_display (Gdk.Display display, uint requestor, Gdk.Atom selection, Gdk.Atom target, Gdk.Atom property, uint time_); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Spawn { + public class Spawn { public static bool command_line_on_screen (Gdk.Screen screen, string command_line) throws GLib.Error; public static bool on_screen (Gdk.Screen screen, string working_directory, string argv, string envp, GLib.SpawnFlags flags, GLib.SpawnChildSetupFunc child_setup, pointer user_data, int child_pid) throws GLib.Error; public static bool on_screen_with_pipes (Gdk.Screen screen, string working_directory, string argv, string envp, GLib.SpawnFlags flags, GLib.SpawnChildSetupFunc child_setup, pointer user_data, int child_pid, int standard_input, int standard_output, int standard_error) throws GLib.Error; } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Text { + public class Text { [NoArrayLength] public static int property_to_text_list (Gdk.Atom encoding, int format, uchar[] text, int length, string list); [NoArrayLength] @@ -1909,9 +1783,8 @@ namespace Gdk { [NoArrayLength] public static int property_to_utf8_list_for_display (Gdk.Display display, Gdk.Atom encoding, int format, uchar[] text, int length, string list); } - [ReferenceType] [CCode (cheader_filename = "gdk/gdk.h")] - public struct Threads { + public class Threads { public static uint add_idle (GLib.SourceFunc function, pointer data); public static uint add_idle_full (int priority, GLib.SourceFunc function, pointer data, GLib.DestroyNotify notify); public static uint add_timeout (uint interval, GLib.SourceFunc function, pointer data); @@ -1921,6 +1794,61 @@ namespace Gdk { public static void leave (); public static void set_lock_functions (GLib.Callback enter_fn, GLib.Callback leave_fn); } + [CCode (cheader_filename = "gdk/gdk.h")] + public struct Color { + public uint pixel; + public ushort red; + public ushort green; + public ushort blue; + [InstanceByReference] + 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 (); + public static bool parse (string spec, out Gdk.Color color); + [InstanceByReference] + public weak string to_string (); + } + [CCode (cheader_filename = "gdk/gdk.h")] + public struct Rectangle { + public int x; + public int y; + public int width; + public int height; + public static GLib.Type get_type (); + [InstanceByReference] + public bool intersect (out Gdk.Rectangle src2, out Gdk.Rectangle dest); + [InstanceByReference] + public void union (out Gdk.Rectangle src2, out Gdk.Rectangle dest); + } + [CCode (cheader_filename = "gdk/gdk.h")] + public struct WindowAttr { + public weak string title; + public int event_mask; + public int x; + public int y; + public int width; + public int height; + public pointer wclass; + public weak Gdk.Visual visual; + public weak Gdk.Colormap colormap; + public Gdk.WindowType window_type; + public weak Gdk.Cursor cursor; + public weak string wmclass_name; + public weak string wmclass_class; + public bool override_redirect; + public Gdk.WindowTypeHint type_hint; + } + [CCode (cheader_filename = "gdk/gdk.h")] + public struct Atom { + public static Gdk.Atom intern (string atom_name, bool only_if_exists); + public static Gdk.Atom intern_static_string (string atom_name); + public weak string name (); + } public static delegate void DestroyNotify (pointer data); public static delegate void EventFunc (Gdk.Event event, pointer data); public static delegate Gdk.FilterReturn FilterFunc (pointer xevent, Gdk.Event event, pointer data); diff --git a/vapi/gio-standalone.vala b/vapi/gio-standalone.vala index 2fff61070..4d7b79a0a 100644 --- a/vapi/gio-standalone.vala +++ b/vapi/gio-standalone.vala @@ -463,6 +463,47 @@ namespace GLib { public static GLib.Type get_type (); } [CCode (cheader_filename = "gio/gvfs.h")] + public class AsyncResultData { + public pointer async_object; + public weak GLib.Error error; + public pointer user_data; + } + [CCode (cheader_filename = "gio/gvfs.h")] + public class FileAttributeMatcher { + public bool enumerate_namespace (string @namespace); + public weak string enumerate_next (); + public bool matches (string full_name); + public bool matches_only (string full_name); + public FileAttributeMatcher (string attributes); + } + [CCode (cheader_filename = "gio/gvfs.h")] + public class IOJob { + public void send_to_mainloop (GLib.IODataFunc func, pointer user_data, GLib.DestroyNotify notify, bool block); + } + [CCode (cheader_filename = "gio/gvfs.h")] + public class LocalParentFileInfo { + public bool writable; + public bool is_sticky; + public int owner; + } + [CCode (cheader_filename = "gio/gvfs.h")] + public class UnixMount { + public weak string mount_path; + public weak string device_path; + public weak string filesystem_type; + public bool is_read_only; + } + [CCode (cheader_filename = "gio/gvfs.h")] + public class UnixMountPoint { + public weak string mount_path; + public weak string device_path; + public weak string filesystem_type; + public weak string dev_opt; + public bool is_read_only; + public bool is_user_mountable; + public bool is_loopback; + } + [CCode (cheader_filename = "gio/gvfs.h")] public interface AppInfo { public static weak GLib.AppInfo create_from_commandline (string commandline, string application_name) throws GLib.Error; public abstract weak GLib.AppInfo dup (); @@ -599,53 +640,6 @@ namespace GLib { public abstract bool unmount_finish (GLib.AsyncResult result) throws GLib.Error; public signal void changed (); } - [ReferenceType] - [CCode (cheader_filename = "gio/gvfs.h")] - public struct AsyncResultData { - public pointer async_object; - public weak GLib.Error error; - public pointer user_data; - } - [ReferenceType] - [CCode (cheader_filename = "gio/gvfs.h")] - public struct FileAttributeMatcher { - public bool enumerate_namespace (string @namespace); - public weak string enumerate_next (); - public bool matches (string full_name); - public bool matches_only (string full_name); - public FileAttributeMatcher (string attributes); - } - [ReferenceType] - [CCode (cheader_filename = "gio/gvfs.h")] - public struct IOJob { - public void send_to_mainloop (GLib.IODataFunc func, pointer user_data, GLib.DestroyNotify notify, bool block); - } - [ReferenceType] - [CCode (cheader_filename = "gio/gvfs.h")] - public struct LocalParentFileInfo { - public bool writable; - public bool is_sticky; - public int owner; - } - [ReferenceType] - [CCode (cheader_filename = "gio/gvfs.h")] - public struct UnixMount { - public weak string mount_path; - public weak string device_path; - public weak string filesystem_type; - public bool is_read_only; - } - [ReferenceType] - [CCode (cheader_filename = "gio/gvfs.h")] - public struct UnixMountPoint { - public weak string mount_path; - public weak string device_path; - public weak string filesystem_type; - public weak string dev_opt; - public bool is_read_only; - public bool is_user_mountable; - public bool is_loopback; - } public static delegate void AsyncNextFilesCallback (GLib.FileEnumerator enumerator, GLib.List files, int num_files, pointer user_data, GLib.Error error); public static delegate void AsyncReadyCallback (GLib.Object source_object, GLib.AsyncResult res, pointer user_data); public static delegate void AsyncStopEnumeratingCallback (GLib.FileEnumerator enumerator, bool result, pointer user_data, GLib.Error error); diff --git a/vapi/gnome-desktop-2.0.vala b/vapi/gnome-desktop-2.0.vala index 1c1cee688..05d747797 100644 --- a/vapi/gnome-desktop-2.0.vala +++ b/vapi/gnome-desktop-2.0.vala @@ -56,9 +56,8 @@ namespace Gnome { [CCode (cheader_filename = "libgnomeui/gnome-hint.h")] public class Hint : Gtk.Dialog { } - [ReferenceType (dup_function = "gnome_desktop_item_ref", free_function = "gnome_desktop_item_unref")] - [CCode (cheader_filename = "libgnome/gnome-desktop-item.h")] - public struct DesktopItem { + [CCode (ref_function = "gnome_desktop_item_ref", unref_function = "gnome_desktop_item_unref", cheader_filename = "libgnome/gnome-desktop-item.h")] + public class DesktopItem { public bool attr_exists (string attr); public void clear_localestring (string attr); public void clear_section (string section); diff --git a/vapi/gnome-vfs-2.0.vala b/vapi/gnome-vfs-2.0.vala index dbe01fcf1..dcc971f72 100644 --- a/vapi/gnome-vfs-2.0.vala +++ b/vapi/gnome-vfs-2.0.vala @@ -466,26 +466,7 @@ namespace GnomeVFS { public signal void drive_disconnected (GnomeVFS.Drive drive); } [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ACLKind { - } - [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ACLPerm { - } - [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct FileOffset { - } - [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct FileSize { - } - [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct InodeNumber { - } - [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct MethodHandle { - } - [ReferenceType (free_function = "gnome_vfs_address_free")] - [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct Address { + public class Address { public weak GnomeVFS.Address dup (); public bool equal (GnomeVFS.Address b); public int get_family_type (); @@ -496,13 +477,11 @@ namespace GnomeVFS { public Address.from_string (string address); public weak string to_string (); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct AsyncHandle { + public class AsyncHandle { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct Cancellation { + public class Cancellation { public void ack (); public void cancel (); public bool check (); @@ -510,101 +489,86 @@ namespace GnomeVFS { public int get_fd (); public Cancellation (); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct CloseOp { + public class CloseOp { public weak GLib.Memory dummy; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct CloseOpResult { + public class CloseOpResult { public GnomeVFS.AsyncCloseCallback callback; public pointer callback_data; public GnomeVFS.Result result; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct Context { + public class Context { public static bool check_cancellation_current (); public weak GnomeVFS.Cancellation get_cancellation (); public Context (); public static weak GnomeVFS.Context peek_current (); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct CreateAsChannelOp { + public class CreateAsChannelOp { public weak GnomeVFS.URI uri; public GnomeVFS.OpenMode open_mode; public bool exclusive; public uint perm; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct CreateAsChannelOpResult { + public class CreateAsChannelOpResult { public GnomeVFS.AsyncCreateAsChannelCallback callback; public pointer callback_data; public GnomeVFS.Result result; public weak GLib.IOChannel channel; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct CreateLinkOp { + public class CreateLinkOp { public weak GnomeVFS.URI uri; public weak string uri_reference; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct CreateOp { + public class CreateOp { public weak GnomeVFS.URI uri; public GnomeVFS.OpenMode open_mode; public bool exclusive; public uint perm; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct CreateOpResult { + public class CreateOpResult { public GnomeVFS.AsyncCreateCallback callback; public pointer callback_data; public GnomeVFS.Result result; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct DNSSDBrowseHandle { + public class DNSSDBrowseHandle { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct DNSSDResolveHandle { + public class DNSSDResolveHandle { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct DNSSDService { + public class DNSSDService { public weak string name; public weak string type; public weak string domain; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct DirectoryHandle { + public class DirectoryHandle { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct FileControlOp { + public class FileControlOp { public weak string operation; public pointer operation_data; public GLib.DestroyNotify operation_data_destroy_func; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct FileControlOpResult { + public class FileControlOpResult { public GnomeVFS.AsyncFileControlCallback callback; public pointer callback_data; public GnomeVFS.Result result; public pointer operation_data; public GLib.DestroyNotify operation_data_destroy_func; } - [ReferenceType (dup_function = "gnome_vfs_file_info_ref", free_function = "gnome_vfs_file_info_unref")] - [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct FileInfo { + [CCode (ref_function = "gnome_vfs_file_info_ref", unref_function = "gnome_vfs_file_info_unref", cheader_filename = "libgnomevfs/gnome-vfs.h")] + public class FileInfo { public weak string name; public GnomeVFS.FileInfoFields valid_fields; public GnomeVFS.FileType type; @@ -640,59 +604,51 @@ namespace GnomeVFS { public bool matches (GnomeVFS.FileInfo b); public FileInfo (); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct FindDirectoryOp { + public class FindDirectoryOp { public weak GLib.List uris; public GnomeVFS.FindDirectoryKind kind; public bool create_if_needed; public bool find_if_needed; public uint permissions; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct FindDirectoryOpResult { + public class FindDirectoryOpResult { public GnomeVFS.AsyncFindDirectoryCallback callback; public pointer callback_data; public weak GLib.List result_list; } - [ReferenceType (free_function = "gnome_vfs_find_directory_result_free")] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct FindDirectoryResult { + public class FindDirectoryResult { public weak GnomeVFS.URI uri; public GnomeVFS.Result result; public weak GnomeVFS.FindDirectoryResult dup (); public static GLib.Type get_type (); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GetFileInfoOp { + public class GetFileInfoOp { public weak GLib.List uris; public GnomeVFS.FileInfoOptions options; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GetFileInfoOpResult { + public class GetFileInfoOpResult { public GnomeVFS.AsyncGetFileInfoCallback callback; public pointer callback_data; public weak GLib.List result_list; } - [ReferenceType (free_function = "gnome_vfs_get_file_info_result_free")] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GetFileInfoResult { + public class GetFileInfoResult { public weak GnomeVFS.URI uri; public GnomeVFS.Result result; public weak GnomeVFS.FileInfo file_info; public weak GnomeVFS.GetFileInfoResult dup (); public static GLib.Type get_type (); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct Handle { + public class Handle { } - [ReferenceType (free_function = "gnome_vfs_inet_connection_free")] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct InetConnection { + public class InetConnection { public GnomeVFS.Result create (string host_name, uint host_port, GnomeVFS.Cancellation cancellation); public GnomeVFS.Result create_from_address (GnomeVFS.Address address, uint host_port, GnomeVFS.Cancellation cancellation); public void destroy (GnomeVFS.Cancellation cancellation); @@ -702,30 +658,26 @@ namespace GnomeVFS { public weak GnomeVFS.Socket to_socket (); public weak GnomeVFS.SocketBuffer to_socket_buffer (); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct Job { + public class Job { public static int get_count (); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct LoadDirectoryOp { + public class LoadDirectoryOp { public weak GnomeVFS.URI uri; public GnomeVFS.FileInfoOptions options; public uint items_per_notification; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct LoadDirectoryOpResult { + public class LoadDirectoryOpResult { public GnomeVFS.AsyncDirectoryLoadCallback callback; public pointer callback_data; public GnomeVFS.Result result; public weak GLib.List list; public uint entries_read; } - [ReferenceType (free_function = "gnome_vfs_mime_application_free")] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct MimeApplication { + public class MimeApplication { public weak string id; public weak string name; public weak string command; @@ -755,29 +707,25 @@ namespace GnomeVFS { public bool supports_startup_notification (); public bool supports_uris (); } - [ReferenceType (free_function = "gnome_vfs_mime_sniff_buffer_free")] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct MimeSniffBuffer { + public class MimeSniffBuffer { [NoArrayLength] public MimeSniffBuffer.from_existing_data (uchar[] buffer, long buffer_size); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackAdditionalHeadersIn { + public class ModuleCallbackAdditionalHeadersIn { public weak GnomeVFS.URI uri; public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackAdditionalHeadersOut { + public class ModuleCallbackAdditionalHeadersOut { public weak GLib.List headers; public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackAuthenticationIn { + public class ModuleCallbackAuthenticationIn { public weak string uri; public weak string realm; public bool previous_attempt_failed; @@ -785,17 +733,15 @@ namespace GnomeVFS { public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackAuthenticationOut { + public class ModuleCallbackAuthenticationOut { public weak string username; public weak string password; public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackFillAuthenticationIn { + public class ModuleCallbackFillAuthenticationIn { public weak string uri; public weak string protocol; public weak string server; @@ -807,9 +753,8 @@ namespace GnomeVFS { public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackFillAuthenticationOut { + public class ModuleCallbackFillAuthenticationOut { public bool valid; public weak string username; public weak string domain; @@ -817,9 +762,8 @@ namespace GnomeVFS { public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackFullAuthenticationIn { + public class ModuleCallbackFullAuthenticationIn { public GnomeVFS.ModuleCallbackFullAuthenticationFlags flags; public weak string uri; public weak string protocol; @@ -834,9 +778,8 @@ namespace GnomeVFS { public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackFullAuthenticationOut { + public class ModuleCallbackFullAuthenticationOut { public bool abort_auth; public weak string username; public weak string domain; @@ -846,9 +789,8 @@ namespace GnomeVFS { public ulong out_flags; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackOpResult { + public class ModuleCallbackOpResult { public GnomeVFS.AsyncModuleCallback callback; public pointer user_data; public pointer @in; @@ -858,40 +800,35 @@ namespace GnomeVFS { public GnomeVFS.ModuleCallbackResponse response; public pointer response_data; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackQuestionIn { + public class ModuleCallbackQuestionIn { public weak string primary_message; public weak string secondary_message; public weak string choices; public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackQuestionOut { + public class ModuleCallbackQuestionOut { public int answer; public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackReceivedHeadersIn { + public class ModuleCallbackReceivedHeadersIn { public weak GnomeVFS.URI uri; public weak GLib.List headers; public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackReceivedHeadersOut { + public class ModuleCallbackReceivedHeadersOut { public int dummy; public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackSaveAuthenticationIn { + public class ModuleCallbackSaveAuthenticationIn { public weak string keyring; public weak string uri; public weak string protocol; @@ -905,77 +842,65 @@ namespace GnomeVFS { public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackSaveAuthenticationOut { + public class ModuleCallbackSaveAuthenticationOut { public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackStackInfo { + public class ModuleCallbackStackInfo { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackStatusMessageIn { + public class ModuleCallbackStatusMessageIn { public weak string uri; public weak string message; public int percentage; public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ModuleCallbackStatusMessageOut { + public class ModuleCallbackStatusMessageOut { public int dummy; public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct MonitorHandle { + public class MonitorHandle { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct OpenAsChannelOp { + public class OpenAsChannelOp { public weak GnomeVFS.URI uri; public GnomeVFS.OpenMode open_mode; public uint advised_block_size; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct OpenAsChannelOpResult { + public class OpenAsChannelOpResult { public GnomeVFS.AsyncOpenAsChannelCallback callback; public pointer callback_data; public GnomeVFS.Result result; public weak GLib.IOChannel channel; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct OpenOp { + public class OpenOp { public weak GnomeVFS.URI uri; public GnomeVFS.OpenMode open_mode; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct OpenOpResult { + public class OpenOpResult { public GnomeVFS.AsyncOpenCallback callback; public pointer callback_data; public GnomeVFS.Result result; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ProgressCallbackState { + public class ProgressCallbackState { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ReadOp { + public class ReadOp { public GnomeVFS.FileSize num_bytes; public pointer buffer; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ReadOpResult { + public class ReadOpResult { public GnomeVFS.AsyncReadCallback callback; public pointer callback_data; public GnomeVFS.FileSize num_bytes; @@ -983,13 +908,11 @@ namespace GnomeVFS { public GnomeVFS.Result result; public GnomeVFS.FileSize bytes_read; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ResolveHandle { + public class ResolveHandle { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct SSL { + public class SSL { public GnomeVFS.Result create (string host, uint port, GnomeVFS.Cancellation cancellation); public GnomeVFS.Result create_from_fd (int fd, GnomeVFS.Cancellation cancellation); public void destroy (GnomeVFS.Cancellation cancellation); @@ -999,47 +922,41 @@ namespace GnomeVFS { public weak GnomeVFS.Socket to_socket (); public GnomeVFS.Result write (pointer buffer, GnomeVFS.FileSize bytes, out GnomeVFS.FileSize bytes_written, GnomeVFS.Cancellation cancellation); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct SeekOp { + public class SeekOp { public GnomeVFS.SeekPosition whence; public GnomeVFS.FileOffset offset; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct SeekOpResult { + public class SeekOpResult { public GnomeVFS.AsyncSeekCallback callback; public pointer callback_data; public GnomeVFS.Result result; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct SetFileInfoOp { + public class SetFileInfoOp { public weak GnomeVFS.URI uri; public weak GnomeVFS.FileInfo info; public GnomeVFS.SetFileInfoMask mask; public GnomeVFS.FileInfoOptions options; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct SetFileInfoOpResult { + public class SetFileInfoOpResult { public GnomeVFS.AsyncSetFileInfoCallback callback; public pointer callback_data; public GnomeVFS.Result set_file_info_result; public GnomeVFS.Result get_file_info_result; public weak GnomeVFS.FileInfo info; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct Socket { + public class Socket { public GnomeVFS.Result close (GnomeVFS.Cancellation cancellation); public Socket (GnomeVFS.SocketImpl impl, pointer connection); public GnomeVFS.Result read (pointer buffer, GnomeVFS.FileSize bytes, out GnomeVFS.FileSize bytes_read, GnomeVFS.Cancellation cancellation); public GnomeVFS.Result write (pointer buffer, int bytes, out GnomeVFS.FileSize bytes_written, GnomeVFS.Cancellation cancellation); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct SocketBuffer { + public class SocketBuffer { public GnomeVFS.Result destroy (bool close_socket, GnomeVFS.Cancellation cancellation); public GnomeVFS.Result flush (GnomeVFS.Cancellation cancellation); public SocketBuffer (GnomeVFS.Socket socket); @@ -1048,17 +965,15 @@ namespace GnomeVFS { public GnomeVFS.Result read_until (pointer buffer, GnomeVFS.FileSize bytes, pointer boundary, GnomeVFS.FileSize boundary_len, out GnomeVFS.FileSize bytes_read, bool got_boundary, GnomeVFS.Cancellation cancellation); public GnomeVFS.Result write (pointer buffer, GnomeVFS.FileSize bytes, out GnomeVFS.FileSize bytes_written, GnomeVFS.Cancellation cancellation); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct SocketImpl { + public class SocketImpl { public GnomeVFS.SocketReadFunc read; public GnomeVFS.SocketWriteFunc write; public GnomeVFS.SocketCloseFunc close; public GnomeVFS.SocketSetTimeoutFunc set_timeout; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct ToplevelURI { + public class ToplevelURI { public weak GnomeVFS.URI uri; public weak string host_name; public uint host_port; @@ -1068,14 +983,12 @@ namespace GnomeVFS { public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct Transform { + public class Transform { public GnomeVFS.TransformFunc transform; } - [ReferenceType (dup_function = "gnome_vfs_uri_ref", free_function = "gnome_vfs_uri_unref")] - [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct URI { + [CCode (ref_function = "gnome_vfs_uri_ref", unref_function = "gnome_vfs_uri_unref", cheader_filename = "libgnomevfs/gnome-vfs.h")] + public class URI { public weak GnomeVFS.URI append_file_name (string filename); public weak GnomeVFS.URI append_path (string path); public weak GnomeVFS.URI append_string (string uri_fragment); @@ -1114,17 +1027,15 @@ namespace GnomeVFS { public void set_user_name (string user_name); public weak string to_string (GnomeVFS.URIHideOptions hide_options); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct UnixMount { + public class UnixMount { public weak string mount_path; public weak string device_path; public weak string filesystem_type; public bool is_read_only; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct UnixMountPoint { + public class UnixMountPoint { public weak string mount_path; public weak string device_path; public weak string filesystem_type; @@ -1133,15 +1044,13 @@ namespace GnomeVFS { public bool is_user_mountable; public bool is_loopback; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct WriteOp { + public class WriteOp { public GnomeVFS.FileSize num_bytes; public pointer buffer; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct WriteOpResult { + public class WriteOpResult { public GnomeVFS.AsyncWriteCallback callback; public pointer callback_data; public GnomeVFS.FileSize num_bytes; @@ -1149,9 +1058,8 @@ namespace GnomeVFS { public GnomeVFS.Result result; public GnomeVFS.FileSize bytes_written; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct XferOp { + public class XferOp { public weak GLib.List source_uri_list; public weak GLib.List target_uri_list; public GnomeVFS.XferOptions xfer_options; @@ -1160,17 +1068,15 @@ namespace GnomeVFS { public GnomeVFS.XferProgressCallback progress_sync_callback; public pointer sync_callback_data; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct XferOpResult { + public class XferOpResult { public GnomeVFS.AsyncXferProgressCallback callback; public pointer callback_data; public weak GnomeVFS.XferProgressInfo progress_info; public int reply; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct XferProgressInfo { + public class XferProgressInfo { public GnomeVFS.XferProgressStatus status; public GnomeVFS.Result vfs_status; public GnomeVFS.XferPhase phase; @@ -1188,33 +1094,26 @@ namespace GnomeVFS { public pointer reserved1; public pointer reserved2; } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct XdgAliasList { + public class XdgAliasList { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct XdgGlobHash { + public class XdgGlobHash { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct XdgMimeCache { + public class XdgMimeCache { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct XdgMimeMagic { + public class XdgMimeMagic { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct XdgParentList { + public class XdgParentList { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsApplication { + public class GnomeVfsApplication { } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsAsync { + public class GnomeVfsAsync { [CCode (cname = "gnome_vfs_async_cancel")] public static void cancel (GnomeVFS.AsyncHandle handle); [CCode (cname = "gnome_vfs_async_close")] @@ -1260,9 +1159,8 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_async_xfer")] public static GnomeVFS.Result xfer (GnomeVFS.AsyncHandle handle_return, GLib.List source_uri_list, GLib.List target_uri_list, GnomeVFS.XferOptions xfer_options, GnomeVFS.XferErrorMode error_mode, GnomeVFS.XferOverwriteMode overwrite_mode, int priority, GnomeVFS.AsyncXferProgressCallback progress_update_callback, pointer update_callback_data, GnomeVFS.XferProgressCallback progress_sync_callback, pointer sync_callback_data); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsCheck { + public class GnomeVfsCheck { [CCode (cname = "gnome_vfs_check_same_fs")] public static GnomeVFS.Result same_fs (string source, string target, bool same_fs_return); [CCode (cname = "gnome_vfs_check_same_fs_uris")] @@ -1270,9 +1168,8 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_check_same_fs_uris_cancellable")] public static GnomeVFS.Result same_fs_uris_cancellable (GnomeVFS.URI a, GnomeVFS.URI b, bool same_fs_return, GnomeVFS.Context context); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsCreate { + public class GnomeVfsCreate { [CCode (cname = "gnome_vfs_create_symbolic_link")] public static GnomeVFS.Result symbolic_link (GnomeVFS.URI uri, string target_reference); [CCode (cname = "gnome_vfs_create_symbolic_link_cancellable")] @@ -1282,9 +1179,8 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_create_uri_cancellable")] public static GnomeVFS.Result uri_cancellable (GnomeVFS.Handle handle, GnomeVFS.URI uri, GnomeVFS.OpenMode open_mode, bool exclusive, uint perm, GnomeVFS.Context context); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsDirectory { + public class GnomeVfsDirectory { [CCode (cname = "gnome_vfs_directory_close")] public static GnomeVFS.Result close (GnomeVFS.DirectoryHandle handle); [CCode (cname = "gnome_vfs_directory_list_load")] @@ -1308,9 +1204,8 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_directory_visit_uri")] public static GnomeVFS.Result visit_uri (GnomeVFS.URI uri, GnomeVFS.FileInfoOptions info_options, GnomeVFS.DirectoryVisitOptions visit_options, GnomeVFS.DirectoryVisitFunc callback, pointer data); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsEscape { + public class GnomeVfsEscape { [CCode (cname = "gnome_vfs_escape_host_and_path_string")] public static weak string host_and_path_string (string path); [CCode (cname = "gnome_vfs_escape_path_string")] @@ -1322,33 +1217,29 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_escape_string")] public static weak string string (string string); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsFile { + public class GnomeVfsFile { [CCode (cname = "gnome_vfs_file_control")] public static GnomeVFS.Result control (GnomeVFS.Handle handle, string operation, pointer operation_data); [CCode (cname = "gnome_vfs_file_control_cancellable")] public static GnomeVFS.Result control_cancellable (GnomeVFS.Handle handle, string operation, pointer operation_data, GnomeVFS.Context context); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsFormat { + public class GnomeVfsFormat { [CCode (cname = "gnome_vfs_format_file_size_for_display")] public static weak string file_size_for_display (GnomeVFS.FileSize size); [CCode (cname = "gnome_vfs_format_uri_for_display")] public static weak string uri_for_display (string uri); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsIs { + public class GnomeVfsIs { [CCode (cname = "gnome_vfs_is_executable_command_string")] public static bool executable_command_string (string command_string); [CCode (cname = "gnome_vfs_is_primary_thread")] public static bool primary_thread (); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsMake { + public class GnomeVfsMake { [CCode (cname = "gnome_vfs_make_directory")] public static GnomeVFS.Result directory (string text_uri, uint perm); [CCode (cname = "gnome_vfs_make_directory_for_uri")] @@ -1370,9 +1261,8 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_make_uri_from_shell_arg")] public static weak string uri_from_shell_arg (string uri); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsMime { + public class GnomeVfsMime { [CCode (cname = "gnome_vfs_mime_can_be_executable")] public static bool can_be_executable (string mime_type); [CCode (cname = "gnome_vfs_mime_extensions_list_free")] @@ -1418,9 +1308,8 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_mime_type_is_supertype")] public static bool type_is_supertype (string mime_type); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsModule { + public class GnomeVfsModule { [CCode (cname = "gnome_vfs_module_callback_invoke")] public static bool callback_invoke (string callback_name, pointer @in, ulong in_size, pointer @out, ulong out_size); [CCode (cname = "gnome_vfs_module_callback_pop")] @@ -1430,9 +1319,8 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_module_callback_set_default")] public static void callback_set_default (string callback_name, GnomeVFS.ModuleCallback callback, pointer callback_data, GLib.DestroyNotify destroy_notify); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsMonitor { + public class GnomeVfsMonitor { [CCode (cname = "gnome_vfs_monitor_add")] public static GnomeVFS.Result add (GnomeVFS.MonitorHandle handle, string text_uri, GnomeVFS.MonitorType monitor_type, GnomeVFS.MonitorCallback callback, pointer user_data); [CCode (cname = "gnome_vfs_monitor_callback")] @@ -1440,17 +1328,15 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_monitor_cancel")] public static GnomeVFS.Result cancel (GnomeVFS.MonitorHandle handle); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsMove { + public class GnomeVfsMove { [CCode (cname = "gnome_vfs_move_uri")] public static GnomeVFS.Result uri (GnomeVFS.URI old_uri, GnomeVFS.URI new_uri, bool force_replace); [CCode (cname = "gnome_vfs_move_uri_cancellable")] public static GnomeVFS.Result uri_cancellable (GnomeVFS.URI old, GnomeVFS.URI @new, bool force_replace, GnomeVFS.Context context); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsOpen { + public class GnomeVfsOpen { [CCode (cname = "gnome_vfs_open_fd")] public static GnomeVFS.Result fd (GnomeVFS.Handle handle, int filedes); [CCode (cname = "gnome_vfs_open_uri")] @@ -1458,25 +1344,22 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_open_uri_cancellable")] public static GnomeVFS.Result uri_cancellable (GnomeVFS.Handle handle, GnomeVFS.URI uri, GnomeVFS.OpenMode open_mode, GnomeVFS.Context context); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsRead { + public class GnomeVfsRead { [CCode (cname = "gnome_vfs_read_cancellable")] public static GnomeVFS.Result cancellable (GnomeVFS.Handle handle, pointer buffer, GnomeVFS.FileSize bytes, out GnomeVFS.FileSize bytes_written, GnomeVFS.Context context); [CCode (cname = "gnome_vfs_read_entire_file")] public static GnomeVFS.Result entire_file (string uri, int file_size, out string file_contents); } - [ReferenceType (free_function = "gnome_vfs_resolve_free")] - [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsResolve { + [CCode (free_function = "gnome_vfs_resolve_free", cheader_filename = "libgnomevfs/gnome-vfs.h")] + public class GnomeVfsResolve { [CCode (cname = "gnome_vfs_resolve_next_address")] public static bool next_address (GnomeVFS.ResolveHandle handle, GnomeVFS.Address address); [CCode (cname = "gnome_vfs_resolve_reset_to_beginning")] public static void reset_to_beginning (GnomeVFS.ResolveHandle handle); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsTruncate { + public class GnomeVfsTruncate { [CCode (cname = "gnome_vfs_truncate_handle")] public static GnomeVFS.Result handle (GnomeVFS.Handle handle, GnomeVFS.FileSize length); [CCode (cname = "gnome_vfs_truncate_handle_cancellable")] @@ -1486,33 +1369,29 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_truncate_uri_cancellable")] public static GnomeVFS.Result uri_cancellable (GnomeVFS.URI uri, GnomeVFS.FileSize length, GnomeVFS.Context context); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsUnescape { + public class GnomeVfsUnescape { [CCode (cname = "gnome_vfs_unescape_string")] public static weak string string (string escaped_string, string illegal_characters); [CCode (cname = "gnome_vfs_unescape_string_for_display")] public static weak string string_for_display (string escaped); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsUnlink { + public class GnomeVfsUnlink { [CCode (cname = "gnome_vfs_unlink_from_uri")] public static GnomeVFS.Result from_uri (GnomeVFS.URI uri); [CCode (cname = "gnome_vfs_unlink_from_uri_cancellable")] public static GnomeVFS.Result from_uri_cancellable (GnomeVFS.URI uri, GnomeVFS.Context context); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsUrl { + public class GnomeVfsUrl { [CCode (cname = "gnome_vfs_url_show")] public static GnomeVFS.Result show (string url); [CCode (cname = "gnome_vfs_url_show_with_env")] public static GnomeVFS.Result show_with_env (string url, out string envp); } - [ReferenceType] [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public struct GnomeVfsXfer { + public class GnomeVfsXfer { [CCode (cname = "gnome_vfs_xfer_delete_list")] public static GnomeVFS.Result delete_list (GLib.List source_uri_list, GnomeVFS.XferErrorMode error_mode, GnomeVFS.XferOptions xfer_options, GnomeVFS.XferProgressCallback progress_callback, pointer data); [CCode (cname = "gnome_vfs_xfer_uri")] @@ -1520,6 +1399,24 @@ namespace GnomeVFS { [CCode (cname = "gnome_vfs_xfer_uri_list")] public static GnomeVFS.Result uri_list (GLib.List source_uri_list, GLib.List target_uri_list, GnomeVFS.XferOptions xfer_options, GnomeVFS.XferErrorMode error_mode, GnomeVFS.XferOverwriteMode overwrite_mode, GnomeVFS.XferProgressCallback progress_callback, pointer data); } + [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] + public struct ACLKind { + } + [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] + public struct ACLPerm { + } + [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] + public struct FileOffset { + } + [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] + public struct FileSize { + } + [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] + public struct InodeNumber { + } + [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] + public struct MethodHandle { + } public static delegate void AsyncCallback (GnomeVFS.AsyncHandle handle, GnomeVFS.Result result, pointer callback_data); public static delegate void AsyncCloseCallback (GnomeVFS.AsyncHandle handle, GnomeVFS.Result result, pointer callback_data); public static delegate void AsyncCreateAsChannelCallback (GnomeVFS.AsyncHandle handle, GLib.IOChannel channel, GnomeVFS.Result result, pointer callback_data); diff --git a/vapi/gstreamer-0.10.vala b/vapi/gstreamer-0.10.vala index 36aa03256..751afb932 100644 --- a/vapi/gstreamer-0.10.vala +++ b/vapi/gstreamer-0.10.vala @@ -818,7 +818,7 @@ namespace Gst { public static GLib.Quark type_to_quark (Gst.MessageType type); } [CCode (cheader_filename = "gst/gst.h")] - public class MiniObject : GLib.TypeInstance, GLib.Object { + public class MiniObject : GLib.TypeInstance { public int refcount; public uint flags; public weak Gst.MiniObject copy (); @@ -997,7 +997,7 @@ namespace Gst { public signal void pad_created (Gst.Pad pad); } [CCode (cheader_filename = "gst/gst.h")] - public class ParamSpecFraction : GLib.ParamSpec, GLib.Object { + public class ParamSpecFraction : GLib.ParamSpec { public static GLib.Type get_type (); } [CCode (cheader_filename = "gst/gst.h")] @@ -1172,52 +1172,7 @@ namespace Gst { public class cast_t : GLib.Object { } [CCode (cheader_filename = "gst/gst.h")] - public interface ChildProxy { - public static void child_added (Gst.Object object, Gst.Object child); - public static void get (Gst.Object object, ...); - public abstract weak Gst.Object get_child_by_index (uint index); - public weak Gst.Object get_child_by_name (string name); - public abstract uint get_children_count (); - public static void get_property (Gst.Object object, string name, GLib.Value value); - public static GLib.Type get_type (); - public static void get_valist (Gst.Object object, string first_property_name, pointer var_args); - public static bool lookup (Gst.Object object, string name, Gst.Object target, GLib.ParamSpec pspec); - public static void set (Gst.Object object, ...); - public static void set_property (Gst.Object object, string name, GLib.Value value); - public static void set_valist (Gst.Object object, string first_property_name, pointer var_args); - [HasEmitter] - public signal void child_removed (Gst.Object child); - } - [CCode (cheader_filename = "gst/gst.h")] - public interface ImplementsInterface { - public static pointer cast (pointer from, GLib.Type type); - public static bool check (pointer from, GLib.Type type); - public static GLib.Type get_type (); - } - [CCode (cheader_filename = "gst/gst.h")] - public interface TagSetter { - public void add_tag_valist (Gst.TagMergeMode mode, string tag, pointer var_args); - public void add_tag_valist_values (Gst.TagMergeMode mode, string tag, pointer var_args); - public void add_tag_values (Gst.TagMergeMode mode, string tag); - public void add_tags (Gst.TagMergeMode mode, string tag); - public weak Gst.TagList get_tag_list (); - public Gst.TagMergeMode get_tag_merge_mode (); - public static GLib.Type get_type (); - public void merge_tags (Gst.TagList list, Gst.TagMergeMode mode); - public void set_tag_merge_mode (Gst.TagMergeMode mode); - } - [CCode (cheader_filename = "gst/gst.h")] - public interface URIHandler { - public abstract weak string get_protocols (); - public static GLib.Type get_type (); - public abstract weak string get_uri (); - public uint get_uri_type (); - public abstract void new_uri (string uri); - public abstract bool set_uri (string uri); - } - [ReferenceType] - [CCode (cheader_filename = "gst/gst.h")] - public struct AllocTrace { + public class AllocTrace { public weak string name; public int flags; public int live; @@ -1232,37 +1187,29 @@ namespace Gst { public void set_flags (Gst.AllocTraceFlags flags); public static void set_flags_all (Gst.AllocTraceFlags flags); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct BinaryChunk { + public class BinaryChunk { } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct BinaryElementFactory { + public class BinaryElementFactory { } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct BinaryPadTemplate { + public class BinaryPadTemplate { } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct BinaryPluginElement { + public class BinaryPluginElement { } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct BinaryPluginFeature { + public class BinaryPluginFeature { } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct BinaryRegistryMagic { + public class BinaryRegistryMagic { } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct BinaryTypeFindFactory { + public class BinaryTypeFindFactory { } - [ReferenceType (dup_function = "gst_caps_ref", free_function = "gst_caps_unref")] - [CCode (cheader_filename = "gst/gst.h")] - public struct Caps { + [CCode (ref_function = "gst_caps_ref", unref_function = "gst_caps_unref", cheader_filename = "gst/gst.h")] + public class Caps { public GLib.Type type; public int refcount; public Gst.CapsFlags flags; @@ -1303,9 +1250,8 @@ namespace Gst { public void truncate (); public weak Gst.Caps union (Gst.Caps caps2); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct ClockEntry { + public class ClockEntry { public int refcount; public weak Gst.Clock clock; public Gst.ClockEntryType type; @@ -1315,50 +1261,42 @@ namespace Gst { public Gst.ClockCallback func; public pointer user_data; } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct DebugCategory { + public class DebugCategory { } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct DebugMessage { + public class DebugMessage { } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct ElementDetails { + public class ElementDetails { public weak string longname; public weak string klass; public weak string description; public weak string author; } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct FormatDefinition { + public class FormatDefinition { public Gst.Format value; public weak string nick; public weak string description; public GLib.Quark quark; } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct IndexAssociation { + public class IndexAssociation { public Gst.Format format; public int64 value; } - [ReferenceType (free_function = "gst_index_entry_free")] [CCode (cheader_filename = "gst/gst.h")] - public struct IndexEntry { + public class IndexEntry { public bool assoc_map (Gst.Format format, int64 value); public weak Gst.IndexEntry copy (); public static GLib.Type get_type (); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct IndexGroup { + public class IndexGroup { } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Iterator { + public class Iterator { public Gst.IteratorNextFunction next; public Gst.IteratorItemFunction item; public Gst.IteratorResyncFunction resync; @@ -1376,9 +1314,8 @@ namespace Gst { public Iterator.list (GLib.Type type, GLib.Mutex @lock, uint master_cookie, GLib.List list, pointer owner, Gst.IteratorItemFunction item, Gst.IteratorDisposeFunction free); public void push (Gst.Iterator other); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct PluginDesc { + public class PluginDesc { public int major_version; public int minor_version; public weak string name; @@ -1391,17 +1328,15 @@ namespace Gst { public weak string origin; public pointer _gst_reserved; } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct QueryTypeDefinition { + public class QueryTypeDefinition { public Gst.QueryType value; public weak string nick; public weak string description; public GLib.Quark quark; } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Segment { + public class Segment { public double rate; public double abs_rate; public Gst.Format format; @@ -1425,17 +1360,15 @@ namespace Gst { public int64 to_running_time (Gst.Format format, int64 position); public int64 to_stream_time (Gst.Format format, int64 position); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct StaticCaps { + public class StaticCaps { public weak Gst.Caps caps; public weak string string; public weak Gst.Caps get (); public static GLib.Type get_type (); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct StaticPadTemplate { + public class StaticPadTemplate { public weak string name_template; public Gst.PadDirection direction; public Gst.PadPresence presence; @@ -1444,9 +1377,8 @@ namespace Gst { public weak Gst.Caps get_caps (); public static GLib.Type get_type (); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Structure { + public class Structure { public GLib.Type type; public weak Gst.Structure copy (); public static weak Gst.Structure empty_new (string name); @@ -1494,9 +1426,8 @@ namespace Gst { public void set_value (string fieldname, GLib.Value value); public weak string to_string (); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct TagList { + public class TagList { public GLib.Type type; public void add (Gst.TagMergeMode mode, string tag); public void add_valist (Gst.TagMergeMode mode, string tag, pointer var_args); @@ -1544,9 +1475,8 @@ namespace Gst { public TagList (); public void remove_tag (string tag); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Trace { + public class Trace { public void destroy (); public void flush (); public Trace (string filename, int size); @@ -1554,17 +1484,15 @@ namespace Gst { public void set_default (); public void text_flush (); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct TraceEntry { + public class TraceEntry { public int64 timestamp; public uint sequence; public uint data; public char message; } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct TypeFind { + public class TypeFind { public pointer data; public pointer _gst_reserved; public uint64 get_length (); @@ -1573,66 +1501,56 @@ namespace Gst { public static bool register (Gst.Plugin plugin, string name, uint rank, Gst.TypeFindFunction func, string extensions, Gst.Caps possible_caps, pointer data, GLib.DestroyNotify data_notify); public void suggest (uint probability, Gst.Caps caps); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct TypeNameData { + public class TypeNameData { public weak string name; public GLib.Type type; } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct ValueTable { + public class ValueTable { public GLib.Type type; public Gst.ValueCompareFunc compare; public Gst.ValueSerializeFunc serialize; public Gst.ValueDeserializeFunc deserialize; } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Debug { + public class Debug { public static void print_stack_trace (); public static uint remove_log_function (Gst.LogFunction func); public static uint remove_log_function_by_data (pointer data); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Flow { + public class Flow { public static weak string get_name (Gst.FlowReturn ret); public static GLib.Quark to_quark (Gst.FlowReturn ret); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Fraction { + public class Fraction { public static GLib.Type get_type (); public static GLib.Type range_get_type (); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Init { + public class Init { public static bool check (int argc, string argv) throws GLib.Error; public static weak GLib.OptionGroup get_option_group (); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Param { + public class 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 class 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); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Segtrap { + public class Segtrap { public static bool is_enabled (); public static void set_enabled (bool enabled); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Tag { + public class Tag { public static bool exists (string tag); public static weak string get_description (string tag); public static Gst.TagFlag get_flag (string tag); @@ -1643,9 +1561,8 @@ namespace Gst { public static void merge_use_first (GLib.Value dest, GLib.Value src); public static void register (string name, Gst.TagFlag flag, GLib.Type type, string nick, string blurb, Gst.TagMergeFunc func); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Uri { + public class Uri { public static weak string @construct (string protocol, string location); public static weak string get_location (string uri); public static weak string get_protocol (string uri); @@ -1654,9 +1571,8 @@ namespace Gst { public static bool protocol_is_supported (Gst.URIType type, string protocol); public static bool protocol_is_valid (string protocol); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Util { + public class Util { [NoArrayLength] public static void dump_mem (uchar[] mem, uint size); public static uint64 gdouble_to_guint64 (double value); @@ -1666,9 +1582,8 @@ namespace Gst { public static uint64 uint64_scale (uint64 val, uint64 num, uint64 denom); public static uint64 uint64_scale_int (uint64 val, int num, int denom); } - [ReferenceType] [CCode (cheader_filename = "gst/gst.h")] - public struct Value { + public class Value { public static void array_append_value (GLib.Value value, GLib.Value append_value); public static uint array_get_size (GLib.Value value); public static GLib.Type array_get_type (); @@ -1721,6 +1636,50 @@ namespace Gst { public static void take_mini_object (GLib.Value value, Gst.MiniObject mini_object); public static bool union (GLib.Value dest, GLib.Value value1, GLib.Value value2); } + [CCode (cheader_filename = "gst/gst.h")] + public interface ChildProxy { + public static void child_added (Gst.Object object, Gst.Object child); + public static void get (Gst.Object object, ...); + public abstract weak Gst.Object get_child_by_index (uint index); + public weak Gst.Object get_child_by_name (string name); + public abstract uint get_children_count (); + public static void get_property (Gst.Object object, string name, GLib.Value value); + public static GLib.Type get_type (); + public static void get_valist (Gst.Object object, string first_property_name, pointer var_args); + public static bool lookup (Gst.Object object, string name, Gst.Object target, GLib.ParamSpec pspec); + public static void set (Gst.Object object, ...); + public static void set_property (Gst.Object object, string name, GLib.Value value); + public static void set_valist (Gst.Object object, string first_property_name, pointer var_args); + [HasEmitter] + public signal void child_removed (Gst.Object child); + } + [CCode (cheader_filename = "gst/gst.h")] + public interface ImplementsInterface { + public static pointer cast (pointer from, GLib.Type type); + public static bool check (pointer from, GLib.Type type); + public static GLib.Type get_type (); + } + [CCode (cheader_filename = "gst/gst.h")] + public interface TagSetter { + public void add_tag_valist (Gst.TagMergeMode mode, string tag, pointer var_args); + public void add_tag_valist_values (Gst.TagMergeMode mode, string tag, pointer var_args); + public void add_tag_values (Gst.TagMergeMode mode, string tag); + public void add_tags (Gst.TagMergeMode mode, string tag); + public weak Gst.TagList get_tag_list (); + public Gst.TagMergeMode get_tag_merge_mode (); + public static GLib.Type get_type (); + public void merge_tags (Gst.TagList list, Gst.TagMergeMode mode); + public void set_tag_merge_mode (Gst.TagMergeMode mode); + } + [CCode (cheader_filename = "gst/gst.h")] + public interface URIHandler { + public abstract weak string get_protocols (); + public static GLib.Type get_type (); + public abstract weak string get_uri (); + public uint get_uri_type (); + public abstract void new_uri (string uri); + public abstract bool set_uri (string uri); + } public static delegate bool BusFunc (Gst.Bus bus, Gst.Message message, pointer data); public static delegate Gst.BusSyncReply BusSyncHandler (Gst.Bus bus, Gst.Message message, pointer data); public static delegate bool ClockCallback (Gst.Clock clock, uint64 time, pointer id, pointer user_data); diff --git a/vapi/gtk+-2.0.vala b/vapi/gtk+-2.0.vala index 548bae962..43a9ba04f 100644 --- a/vapi/gtk+-2.0.vala +++ b/vapi/gtk+-2.0.vala @@ -4966,271 +4966,31 @@ namespace Gtk { public void remove_window (Gtk.Window window); } [CCode (cheader_filename = "gtk/gtk.h")] - public interface Buildable { - public abstract void add_child (Gtk.Builder builder, GLib.Object child, string type); - public abstract weak GLib.Object construct_child (Gtk.Builder builder, string name); - public abstract void custom_finished (Gtk.Builder builder, GLib.Object child, string tagname, pointer data); - public abstract void custom_tag_end (Gtk.Builder builder, GLib.Object child, string tagname, pointer data); - public abstract bool custom_tag_start (Gtk.Builder builder, GLib.Object child, string tagname, GLib.MarkupParser parser, pointer data); - public abstract weak GLib.Object get_internal_child (Gtk.Builder builder, string childname); - public weak string get_name (); - public static GLib.Type get_type (); - public abstract void parser_finished (Gtk.Builder builder); - public abstract void set_buildable_property (Gtk.Builder builder, string name, GLib.Value value); - public abstract void set_name (string name); - } - [CCode (cheader_filename = "gtk/gtk.h")] - public interface CellEditable { - public static GLib.Type get_type (); - [HasEmitter] - public signal void editing_done (); - [HasEmitter] - public signal void remove_widget (); - } - [CCode (cheader_filename = "gtk/gtk.h")] - public interface CellLayout { - public abstract void add_attribute (Gtk.CellRenderer cell, string attribute, int column); - public abstract void clear (); - public abstract void clear_attributes (Gtk.CellRenderer cell); - public abstract weak GLib.List get_cells (); - public static GLib.Type get_type (); - public abstract void pack_end (Gtk.CellRenderer cell, bool expand); - public abstract void pack_start (Gtk.CellRenderer cell, bool expand); - public abstract void reorder (Gtk.CellRenderer cell, int position); - public void set_attributes (Gtk.CellRenderer cell, ...); - public abstract void set_cell_data_func (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func, pointer func_data, GLib.DestroyNotify destroy); - } - [CCode (cheader_filename = "gtk/gtk.h")] - public interface Editable { - public void copy_clipboard (); - public void cut_clipboard (); - public void delete_selection (); - public abstract weak string get_chars (int start_pos, int end_pos); - public bool get_editable (); - public abstract int get_position (); - public abstract bool get_selection_bounds (int start, int end); - public static GLib.Type get_type (); - public void paste_clipboard (); - public void select_region (int start, int end); - public void set_editable (bool is_editable); - public abstract void set_position (int position); - [HasEmitter] - public signal void insert_text (string text, int length, int position); - [HasEmitter] - public signal void delete_text (int start_pos, int end_pos); - public signal void changed (); - } - [CCode (cheader_filename = "gtk/gtk.h")] - public interface FileChooser { - public void add_filter (Gtk.FileFilter filter); - public bool add_shortcut_folder (string folder) throws GLib.Error; - public bool add_shortcut_folder_uri (string uri) throws GLib.Error; - public static GLib.Quark error_quark (); - public Gtk.FileChooserAction get_action (); - public weak string get_current_folder (); - public weak string get_current_folder_uri (); - public bool get_do_overwrite_confirmation (); - public weak Gtk.Widget get_extra_widget (); - public weak string get_filename (); - public weak GLib.SList get_filenames (); - public weak Gtk.FileFilter get_filter (); - public bool get_local_only (); - public weak string get_preview_filename (); - public weak string get_preview_uri (); - public weak Gtk.Widget get_preview_widget (); - public bool get_preview_widget_active (); - public bool get_select_multiple (); - public bool get_show_hidden (); - public static GLib.Type get_type (); - public weak string get_uri (); - public weak GLib.SList get_uris (); - public bool get_use_preview_label (); - public weak GLib.SList list_filters (); - public weak GLib.SList list_shortcut_folder_uris (); - public weak GLib.SList list_shortcut_folders (); - public void remove_filter (Gtk.FileFilter filter); - public bool remove_shortcut_folder (string folder) throws GLib.Error; - public bool remove_shortcut_folder_uri (string uri) throws GLib.Error; - public void select_all (); - public bool select_filename (string filename); - public bool select_uri (string uri); - public void set_action (Gtk.FileChooserAction action); - public bool set_current_folder (string filename); - public bool set_current_folder_uri (string uri); - public void set_current_name (string name); - public void set_do_overwrite_confirmation (bool do_overwrite_confirmation); - public void set_extra_widget (Gtk.Widget extra_widget); - public bool set_filename (string filename); - public void set_filter (Gtk.FileFilter filter); - public void set_local_only (bool local_only); - public void set_preview_widget (Gtk.Widget preview_widget); - public void set_preview_widget_active (bool active); - public void set_select_multiple (bool select_multiple); - public void set_show_hidden (bool show_hidden); - public bool set_uri (string uri); - public void set_use_preview_label (bool use_label); - public void unselect_all (); - public void unselect_filename (string filename); - public void unselect_uri (string uri); - } - [CCode (cheader_filename = "gtk/gtk.h")] - public interface PrintOperationPreview { - public abstract void end_preview (); - public static GLib.Type get_type (); - public abstract bool is_selected (int page_nr); - public abstract void render_page (int page_nr); - public signal void ready (Gtk.PrintContext context); - public signal void got_page_size (Gtk.PrintContext context, Gtk.PageSetup page_setup); - } - [CCode (cheader_filename = "gtk/gtk.h")] - public interface RecentChooser { - public abstract void add_filter (Gtk.RecentFilter filter); - public static GLib.Quark error_quark (); - public weak Gtk.RecentInfo get_current_item (); - public abstract weak string get_current_uri (); - public weak Gtk.RecentFilter get_filter (); - public abstract weak GLib.List get_items (); - public int get_limit (); - public bool get_local_only (); - public bool get_select_multiple (); - public bool get_show_icons (); - public bool get_show_not_found (); - public bool get_show_numbers (); - public bool get_show_private (); - public bool get_show_tips (); - public Gtk.RecentSortType get_sort_type (); - public static GLib.Type get_type (); - public weak string get_uris (ulong length); - public abstract weak GLib.SList list_filters (); - public abstract void remove_filter (Gtk.RecentFilter filter); - public abstract void select_all (); - public abstract bool select_uri (string uri) throws GLib.Error; - public abstract bool set_current_uri (string uri) throws GLib.Error; - public void set_filter (Gtk.RecentFilter filter); - public void set_limit (int limit); - public void set_local_only (bool local_only); - public void set_select_multiple (bool select_multiple); - public void set_show_icons (bool show_icons); - public void set_show_not_found (bool show_not_found); - public void set_show_numbers (bool show_numbers); - public void set_show_private (bool show_private); - public void set_show_tips (bool show_tips); - public abstract void set_sort_func (Gtk.RecentSortFunc sort_func, pointer sort_data, GLib.DestroyNotify data_destroy); - public void set_sort_type (Gtk.RecentSortType sort_type); - public abstract void unselect_all (); - public abstract void unselect_uri (string uri); - public signal void selection_changed (); - public signal void item_activated (); - } - [CCode (cheader_filename = "gtk/gtk.h")] - public interface TreeDragDest { - public abstract bool drag_data_received (Gtk.TreePath dest, Gtk.SelectionData selection_data); - public static GLib.Type get_type (); - public abstract bool row_drop_possible (Gtk.TreePath dest_path, Gtk.SelectionData selection_data); - } - [CCode (cheader_filename = "gtk/gtk.h")] - public interface TreeDragSource { - public abstract bool drag_data_delete (Gtk.TreePath path); - public abstract bool drag_data_get (Gtk.TreePath path, Gtk.SelectionData selection_data); - public static GLib.Type get_type (); - public abstract bool row_draggable (Gtk.TreePath path); - } - [CCode (cheader_filename = "gtk/gtk.h")] - public interface TreeModel { - public void @foreach (Gtk.TreeModelForeachFunc func, pointer user_data); - [CCode (sentinel = "-1")] - public void get (out Gtk.TreeIter iter, ...); - public abstract GLib.Type get_column_type (int index_); - public abstract Gtk.TreeModelFlags get_flags (); - public abstract bool get_iter (out Gtk.TreeIter iter, Gtk.TreePath path); - 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 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); - public abstract bool iter_children (out Gtk.TreeIter iter, out Gtk.TreeIter parent); - public abstract bool iter_has_child (out Gtk.TreeIter iter); - public abstract int iter_n_children (out Gtk.TreeIter iter); - public abstract bool iter_next (out Gtk.TreeIter iter); - public abstract bool iter_nth_child (out Gtk.TreeIter iter, out Gtk.TreeIter parent, int n); - public abstract bool iter_parent (out Gtk.TreeIter iter, out Gtk.TreeIter child); - public abstract void ref_node (out Gtk.TreeIter iter); - public abstract void unref_node (out Gtk.TreeIter iter); - [HasEmitter] - public signal void row_changed (Gtk.TreePath path, out Gtk.TreeIter iter); - [HasEmitter] - public signal void row_inserted (Gtk.TreePath path, out Gtk.TreeIter iter); - [HasEmitter] - public signal void row_has_child_toggled (Gtk.TreePath path, out Gtk.TreeIter iter); - [HasEmitter] - public signal void row_deleted (Gtk.TreePath path); - [HasEmitter] - public signal void rows_reordered (Gtk.TreePath path, out Gtk.TreeIter iter, int new_order); - } - [CCode (cheader_filename = "gtk/gtk.h")] - public interface TreeSortable { - public abstract bool get_sort_column_id (int sort_column_id, Gtk.SortType order); - public static GLib.Type get_type (); - public abstract bool has_default_sort_func (); - public abstract void set_default_sort_func (Gtk.TreeIterCompareFunc sort_func, pointer user_data, Gtk.DestroyNotify destroy); - public abstract void set_sort_column_id (int sort_column_id, Gtk.SortType order); - public abstract void set_sort_func (int sort_column_id, Gtk.TreeIterCompareFunc sort_func, pointer user_data, Gtk.DestroyNotify destroy); - [HasEmitter] - public signal void sort_column_changed (); - } - [CCode (cheader_filename = "gtk/gtk.h")] - public struct Allocation { - public int x; - public int y; - public int width; - public int height; - } - [CCode (cheader_filename = "gtk/gtk.h")] - public struct Arg { - } - [ReferenceType] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct CacheInfo { + public class CacheInfo { public weak string cache; public ulong cache_size; public uint n_directories; public int flags; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct AccelGroupEntry { + public class AccelGroupEntry { public weak Gtk.AccelKey key; public weak GLib.Closure closure; public GLib.Quark accel_path_quark; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct AccelKey { + public class AccelKey { public uint accel_key; public Gdk.ModifierType accel_mods; public uint accel_flags; } [CCode (cheader_filename = "gtk/gtk.h")] - public struct ActionEntry { - public weak string name; - public weak string stock_id; - public weak string label; - public weak string accelerator; - public weak string tooltip; - public GLib.Callback callback; - } - [ReferenceType] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct BindingArg { + public class BindingArg { public GLib.Type arg_type; public long long_data; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct BindingEntry { + public class BindingEntry { public uint keyval; public Gdk.ModifierType modifiers; public weak Gtk.BindingSet binding_set; @@ -5244,9 +5004,8 @@ namespace Gtk { public static void remove (Gtk.BindingSet binding_set, uint keyval, Gdk.ModifierType modifiers); public static void skip (Gtk.BindingSet binding_set, uint keyval, Gdk.ModifierType modifiers); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct BindingSet { + public class BindingSet { public weak string set_name; public int priority; public weak GLib.SList widget_path_pspecs; @@ -5261,27 +5020,15 @@ namespace Gtk { public static weak Gtk.BindingSet find (string set_name); public BindingSet (string set_name); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct BindingSignal { + public class BindingSignal { public weak Gtk.BindingSignal next; public weak string signal_name; public uint n_args; public weak Gtk.BindingArg args; } [CCode (cheader_filename = "gtk/gtk.h")] - public struct Border { - public int left; - public int right; - public int top; - public int bottom; - [InstanceByReference] - public Gtk.Border copy (); - public static GLib.Type get_type (); - } - [ReferenceType] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct BoxChild { + public class BoxChild { public weak Gtk.Widget widget; public ushort padding; public uint expand; @@ -5289,34 +5036,30 @@ namespace Gtk { public uint pack; public uint is_secondary; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct FileFilterInfo { + public class FileFilterInfo { public Gtk.FileFilterFlags contains; public weak string filename; public weak string uri; public weak string display_name; public weak string mime_type; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct FixedChild { + public class FixedChild { public weak Gtk.Widget widget; public int x; public int y; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct IMContextInfo { + public class IMContextInfo { public weak string context_id; public weak string context_name; public weak string domain; public weak string domain_dirname; public weak string default_locales; } - [ReferenceType (free_function = "gtk_icon_info_free")] [CCode (cheader_filename = "gtk/gtk.h")] - public struct IconInfo { + public class IconInfo { public weak Gtk.IconInfo copy (); [NoArrayLength] public bool get_attach_points (Gdk.Point[] points, int n_points); @@ -5329,9 +5072,8 @@ namespace Gtk { public weak Gdk.Pixbuf load_icon () throws GLib.Error; public void set_raw_coordinates (bool raw_coordinates); } - [ReferenceType (dup_function = "gtk_icon_set_ref", free_function = "gtk_icon_set_unref")] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct IconSet { + [CCode (ref_function = "gtk_icon_set_ref", unref_function = "gtk_icon_set_unref", cheader_filename = "gtk/gtk.h")] + public class IconSet { public void add_source (Gtk.IconSource source); public weak Gtk.IconSet copy (); [NoArrayLength] @@ -5341,9 +5083,8 @@ namespace Gtk { public IconSet.from_pixbuf (Gdk.Pixbuf pixbuf); public weak Gdk.Pixbuf render_icon (Gtk.Style style, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct IconSource { + public class IconSource { public weak Gtk.IconSource copy (); public Gtk.TextDirection get_direction (); public bool get_direction_wildcarded (); @@ -5366,80 +5107,66 @@ namespace Gtk { public void set_state (Gtk.StateType state); public void set_state_wildcarded (bool setting); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct ImageAnimationData { + public class ImageAnimationData { public weak Gdk.PixbufAnimation anim; public weak Gdk.PixbufAnimationIter iter; public uint frame_timeout; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct ImageIconNameData { + public class ImageIconNameData { public weak string icon_name; public weak Gdk.Pixbuf pixbuf; public uint theme_change_id; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct ImageIconSetData { + public class ImageIconSetData { public weak Gtk.IconSet icon_set; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct ImageImageData { + public class ImageImageData { public weak Gdk.Image image; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct ImagePixbufData { + public class ImagePixbufData { public weak Gdk.Pixbuf pixbuf; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct ImagePixmapData { + public class ImagePixmapData { public weak Gdk.Pixmap pixmap; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct ImageStockData { + public class ImageStockData { public weak string stock_id; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct KeyHash { + public class KeyHash { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct LabelSelectionInfo { + public class LabelSelectionInfo { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct MenuEntry { + public class MenuEntry { public weak string path; public weak string accelerator; public Gtk.MenuCallback callback; public pointer callback_data; public weak Gtk.Widget widget; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct MnemonicHash { + public class MnemonicHash { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct NotebookPage { + public class NotebookPage { public static int num (Gtk.Notebook notebook, Gtk.Widget child); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct PageRange { + public class PageRange { public int start; public int end; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct PaperSize { + public class PaperSize { public weak Gtk.PaperSize copy (); public static weak string get_default (); public double get_default_bottom_margin (Gtk.Unit unit); @@ -5462,9 +5189,8 @@ 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 (free_function = "gtk_print_win32_devnames_free")] [CCode (cheader_filename = "gtk/gtk.h")] - public struct PrintWin32Devnames { + public class PrintWin32Devnames { public weak string driver; public weak string device; public weak string output; @@ -5474,29 +5200,16 @@ namespace Gtk { public pointer to_win32 (); } [CCode (cheader_filename = "gtk/gtk.h")] - public struct RadioActionEntry { - public weak string name; - public weak string stock_id; - public weak string label; - public weak string accelerator; - public weak string tooltip; - public int value; - } - [ReferenceType] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct RangeLayout { + public class RangeLayout { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct RangeStepTimer { + public class RangeStepTimer { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct RcContext { + public class RcContext { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct RcProperty { + public class RcProperty { public GLib.Quark type_name; public GLib.Quark property_name; public weak string origin; @@ -5507,9 +5220,8 @@ namespace Gtk { public static bool parse_flags (GLib.ParamSpec pspec, GLib.String gstring, GLib.Value property_value); public static bool parse_requisition (GLib.ParamSpec pspec, GLib.String gstring, GLib.Value property_value); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct RecentData { + public class RecentData { public weak string display_name; public weak string description; public weak string mime_type; @@ -5518,9 +5230,8 @@ namespace Gtk { public weak string groups; public bool is_private; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct RecentFilterInfo { + public class RecentFilterInfo { public Gtk.RecentFilterFlags contains; public weak string uri; public weak string display_name; @@ -5529,9 +5240,8 @@ namespace Gtk { public weak string groups; public int age; } - [ReferenceType (dup_function = "gtk_recent_info_ref", free_function = "gtk_recent_info_unref")] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct RecentInfo { + [CCode (ref_function = "gtk_recent_info_ref", unref_function = "gtk_recent_info_unref", cheader_filename = "gtk/gtk.h")] + public class RecentInfo { public bool exists (); public ulong get_added (); public int get_age (); @@ -5556,25 +5266,15 @@ namespace Gtk { public bool match (Gtk.RecentInfo info_b); } [CCode (cheader_filename = "gtk/gtk.h")] - public struct Requisition { - public int width; - public int height; - [InstanceByReference] - public Gtk.Requisition copy (); - public static GLib.Type get_type (); - } - [ReferenceType] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct RulerMetric { + public class RulerMetric { public weak string metric_name; public weak string abbrev; public double pixels_per_unit; public double ruler_scale; public int subdivide; } - [ReferenceType (free_function = "gtk_selection_data_free")] [CCode (cheader_filename = "gtk/gtk.h")] - public struct SelectionData { + public class SelectionData { public Gdk.Atom selection; public Gdk.Atom target; public Gdk.Atom type; @@ -5599,19 +5299,16 @@ namespace Gtk { public bool targets_include_text (); public bool targets_include_uri (); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct SettingsPropertyValue { + public class SettingsPropertyValue { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct SettingsValue { + public class SettingsValue { public weak string origin; public weak GLib.Value value; } - [ReferenceType (free_function = "gtk_stock_item_free")] [CCode (cheader_filename = "gtk/gtk.h")] - public struct StockItem { + public class StockItem { public weak string stock_id; public weak string label; public Gdk.ModifierType modifier; @@ -5619,9 +5316,8 @@ namespace Gtk { public weak string translation_domain; public weak Gtk.StockItem copy (); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct TableChild { + public class TableChild { public weak Gtk.Widget widget; public ushort left_attach; public ushort right_attach; @@ -5636,9 +5332,8 @@ namespace Gtk { public uint xfill; public uint yfill; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct TableRowCol { + public class TableRowCol { public ushort requisition; public ushort allocation; public ushort spacing; @@ -5648,16 +5343,14 @@ namespace Gtk { public uint shrink; public uint empty; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct TargetEntry { + public class TargetEntry { public weak string target; public uint flags; public uint info; } - [ReferenceType (dup_function = "gtk_target_list_ref", free_function = "gtk_target_list_unref")] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct TargetList { + [CCode (ref_function = "gtk_target_list_ref", unref_function = "gtk_target_list_unref", cheader_filename = "gtk/gtk.h")] + public class TargetList { public weak GLib.List list; public uint ref_count; public void add (Gdk.Atom target, uint flags, uint info); @@ -5671,16 +5364,14 @@ namespace Gtk { public TargetList (Gtk.TargetEntry targets, uint ntargets); public void remove (Gdk.Atom target); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct TargetPair { + public class TargetPair { public Gdk.Atom target; public uint flags; public uint info; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct TextAppearance { + public class TextAppearance { public Gdk.Color bg_color; public Gdk.Color fg_color; public weak Gdk.Bitmap bg_stipple; @@ -5692,9 +5383,8 @@ namespace Gtk { public uint inside_selection; public uint is_text; } - [ReferenceType (dup_function = "gtk_text_attributes_ref", free_function = "gtk_text_attributes_unref")] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct TextAttributes { + [CCode (ref_function = "gtk_text_attributes_ref", unref_function = "gtk_text_attributes_unref", cheader_filename = "gtk/gtk.h")] + public class TextAttributes { public weak Gtk.TextAppearance appearance; public Gtk.Justification justification; public Gtk.TextDirection direction; @@ -5718,231 +5408,23 @@ namespace Gtk { public static GLib.Type get_type (); public TextAttributes (); } - [ReferenceType] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct TextBTree { - } - [CCode (cheader_filename = "gtk/gtk.h")] - public struct TextIter { - [InstanceByReference] - public bool backward_char (); - [InstanceByReference] - public bool backward_chars (int count); - [InstanceByReference] - public bool backward_cursor_position (); - [InstanceByReference] - public bool backward_cursor_positions (int count); - [InstanceByReference] - public bool backward_find_char (Gtk.TextCharPredicate pred, pointer user_data, out Gtk.TextIter limit); - [InstanceByReference] - public bool backward_line (); - [InstanceByReference] - public bool backward_lines (int count); - [InstanceByReference] - public bool backward_search (string str, Gtk.TextSearchFlags flags, out Gtk.TextIter match_start, out Gtk.TextIter match_end, out Gtk.TextIter limit); - [InstanceByReference] - public bool backward_sentence_start (); - [InstanceByReference] - public bool backward_sentence_starts (int count); - [InstanceByReference] - public bool backward_to_tag_toggle (Gtk.TextTag tag); - [InstanceByReference] - public bool backward_visible_cursor_position (); - [InstanceByReference] - public bool backward_visible_cursor_positions (int count); - [InstanceByReference] - public bool backward_visible_line (); - [InstanceByReference] - public bool backward_visible_lines (int count); - [InstanceByReference] - public bool backward_visible_word_start (); - [InstanceByReference] - public bool backward_visible_word_starts (int count); - [InstanceByReference] - public bool backward_word_start (); - [InstanceByReference] - public bool backward_word_starts (int count); - [InstanceByReference] - public bool begins_tag (Gtk.TextTag tag); - [InstanceByReference] - public bool can_insert (bool default_editability); - [InstanceByReference] - public int compare (out Gtk.TextIter rhs); - [InstanceByReference] - public Gtk.TextIter copy (); - [InstanceByReference] - public bool editable (bool default_setting); - [InstanceByReference] - public bool ends_line (); - [InstanceByReference] - public bool ends_sentence (); - [InstanceByReference] - public bool ends_tag (Gtk.TextTag tag); - [InstanceByReference] - public bool ends_word (); - [InstanceByReference] - public bool equal (out Gtk.TextIter rhs); - [InstanceByReference] - public bool forward_char (); - [InstanceByReference] - public bool forward_chars (int count); - [InstanceByReference] - public bool forward_cursor_position (); - [InstanceByReference] - public bool forward_cursor_positions (int count); - [InstanceByReference] - public bool forward_find_char (Gtk.TextCharPredicate pred, pointer user_data, out Gtk.TextIter limit); - [InstanceByReference] - public bool forward_line (); - [InstanceByReference] - public bool forward_lines (int count); - [InstanceByReference] - public bool forward_search (string str, Gtk.TextSearchFlags flags, out Gtk.TextIter match_start, out Gtk.TextIter match_end, out Gtk.TextIter limit); - [InstanceByReference] - public bool forward_sentence_end (); - [InstanceByReference] - public bool forward_sentence_ends (int count); - [InstanceByReference] - public void forward_to_end (); - [InstanceByReference] - public bool forward_to_line_end (); - [InstanceByReference] - public bool forward_to_tag_toggle (Gtk.TextTag tag); - [InstanceByReference] - public bool forward_visible_cursor_position (); - [InstanceByReference] - public bool forward_visible_cursor_positions (int count); - [InstanceByReference] - public bool forward_visible_line (); - [InstanceByReference] - public bool forward_visible_lines (int count); - [InstanceByReference] - public bool forward_visible_word_end (); - [InstanceByReference] - public bool forward_visible_word_ends (int count); - [InstanceByReference] - public bool forward_word_end (); - [InstanceByReference] - public bool forward_word_ends (int count); - [InstanceByReference] - public bool get_attributes (Gtk.TextAttributes values); - [InstanceByReference] - public weak Gtk.TextBuffer get_buffer (); - [InstanceByReference] - public int get_bytes_in_line (); - [InstanceByReference] - public unichar get_char (); - [InstanceByReference] - public int get_chars_in_line (); - [InstanceByReference] - public weak Gtk.TextChildAnchor get_child_anchor (); - [InstanceByReference] - public weak Pango.Language get_language (); - [InstanceByReference] - public int get_line (); - [InstanceByReference] - public int get_line_index (); - [InstanceByReference] - public int get_line_offset (); - [InstanceByReference] - public weak GLib.SList get_marks (); - [InstanceByReference] - public int get_offset (); - [InstanceByReference] - public weak Gdk.Pixbuf get_pixbuf (); - [InstanceByReference] - public weak string get_slice (out Gtk.TextIter end); - [InstanceByReference] - public weak GLib.SList get_tags (); - [InstanceByReference] - public weak string get_text (out Gtk.TextIter end); - [InstanceByReference] - public weak GLib.SList get_toggled_tags (bool toggled_on); - public static GLib.Type get_type (); - [InstanceByReference] - public int get_visible_line_index (); - [InstanceByReference] - public int get_visible_line_offset (); - [InstanceByReference] - public weak string get_visible_slice (out Gtk.TextIter end); - [InstanceByReference] - public weak string get_visible_text (out Gtk.TextIter end); - [InstanceByReference] - public bool has_tag (Gtk.TextTag tag); - [InstanceByReference] - public bool in_range (out Gtk.TextIter start, out Gtk.TextIter end); - [InstanceByReference] - public bool inside_sentence (); - [InstanceByReference] - public bool inside_word (); - [InstanceByReference] - public bool is_cursor_position (); - [InstanceByReference] - public bool is_end (); - [InstanceByReference] - public bool is_start (); - [InstanceByReference] - public void order (out Gtk.TextIter second); - [InstanceByReference] - public void set_line (int line_number); - [InstanceByReference] - public void set_line_index (int byte_on_line); - [InstanceByReference] - public void set_line_offset (int char_on_line); - [InstanceByReference] - public void set_offset (int char_offset); - [InstanceByReference] - public void set_visible_line_index (int byte_on_line); - [InstanceByReference] - public void set_visible_line_offset (int char_on_line); - [InstanceByReference] - public bool starts_line (); - [InstanceByReference] - public bool starts_sentence (); - [InstanceByReference] - public bool starts_word (); - [InstanceByReference] - public bool toggles_tag (Gtk.TextTag tag); - } - [ReferenceType] - [CCode (cheader_filename = "gtk/gtk.h")] - public struct TextLogAttrCache { - } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct TextPendingScroll { + public class TextBTree { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct TextWindow { + public class TextLogAttrCache { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct ThemeEngine { + public class TextPendingScroll { } [CCode (cheader_filename = "gtk/gtk.h")] - public struct ToggleActionEntry { - public weak string name; - public weak string stock_id; - public weak string label; - public weak string accelerator; - public weak string tooltip; - public GLib.Callback callback; - public bool is_active; + public class TextWindow { } [CCode (cheader_filename = "gtk/gtk.h")] - public struct TreeIter { - public int stamp; - public pointer user_data; - public pointer user_data2; - public pointer user_data3; - [InstanceByReference] - public Gtk.TreeIter copy (); - public static GLib.Type get_type (); + public class ThemeEngine { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct TreePath { + public class TreePath { public void append_index (int index_); public int compare (Gtk.TreePath b); public weak Gtk.TreePath copy (); @@ -5964,9 +5446,8 @@ namespace Gtk { public weak string to_string (); public bool up (); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct TreeRowReference { + public class TreeRowReference { public weak Gtk.TreeRowReference copy (); public static void deleted (GLib.Object proxy, Gtk.TreePath path); public weak Gtk.TreeModel get_model (); @@ -5978,14 +5459,12 @@ namespace Gtk { public static void reordered (GLib.Object proxy, Gtk.TreePath path, out Gtk.TreeIter iter, int new_order); public bool valid (); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct VolumeButtonClass { + public class VolumeButtonClass { public pointer parent_class; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct WidgetAuxInfo { + public class WidgetAuxInfo { public int x; public int y; public int width; @@ -5993,26 +5472,22 @@ namespace Gtk { public uint x_set; public uint y_set; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct WidgetShapeInfo { + public class WidgetShapeInfo { public short offset_x; public short offset_y; public weak Gdk.Bitmap shape_mask; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct WindowGeometryInfo { + public class WindowGeometryInfo { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Accel { + public class Accel { public static bool groups_activate (GLib.Object object, uint accel_key, Gdk.ModifierType accel_mods); public static weak GLib.SList groups_from_object (GLib.Object object); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Accelerator { + public class Accelerator { 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); @@ -6020,23 +5495,20 @@ namespace Gtk { public static void set_default_mod_mask (Gdk.ModifierType default_mod_mask); public static bool valid (uint keyval, Gdk.ModifierType modifiers); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Bindings { + public class Bindings { public static bool activate (Gtk.Object object, uint keyval, Gdk.ModifierType modifiers); public static bool activate_event (Gtk.Object object, Gdk.EventKey event); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Ctree { + public class Ctree { public static GLib.Type expander_style_get_type (); public static GLib.Type expansion_type_get_type (); public static GLib.Type line_style_get_type (); public static GLib.Type pos_get_type (); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Drag { + public class Drag { public static weak Gdk.DragContext begin (Gtk.Widget widget, Gtk.TargetList targets, Gdk.DragAction actions, int button, Gdk.Event event); public static bool check_threshold (Gtk.Widget widget, int start_x, int start_y, int current_x, int current_y); public static void dest_add_image_targets (Gtk.Widget widget); @@ -6075,27 +5547,23 @@ namespace Gtk { public static void source_unset (Gtk.Widget widget); public static void unhighlight (Gtk.Widget widget); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Draw { + public class Draw { 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")] - public struct Gc { + public class Gc { public static weak Gdk.GC get (int depth, Gdk.Colormap colormap, Gdk.GCValues values, Gdk.GCValuesMask values_mask); public static void release (Gdk.GC gc); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Grab { + public class Grab { public static void add (Gtk.Widget widget); public static weak Gtk.Widget get_current (); public static void remove (Gtk.Widget widget); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Icon { + public class Icon { public static Gtk.IconSize size_from_name (string name); public static weak string size_get_name (Gtk.IconSize size); public static bool size_lookup (Gtk.IconSize size, int width, int height); @@ -6103,13 +5571,11 @@ namespace Gtk { public static Gtk.IconSize size_register (string name, int width, int height); public static void size_register_alias (string alias, Gtk.IconSize target); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Idle { + public class Idle { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Init { + public class Init { [NoArrayLength] public static void abi_check (int argc, string[] argv, int num_checks, ulong sizeof_GtkWindow, ulong sizeof_GtkBox); public static void add (Gtk.Function function, pointer data); @@ -6120,43 +5586,37 @@ namespace Gtk { [NoArrayLength] public static bool with_args (int argc, string[] argv, string parameter_string, out GLib.OptionEntry entries, string translation_domain) throws GLib.Error; } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Input { + public class Input { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Key { + public class Key { public static uint snooper_install (Gtk.KeySnoopFunc snooper, pointer func_data); public static void snooper_remove (uint snooper_handler_id); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Main { + public class Main { public static void do_event (Gdk.Event event); public static bool iteration (); public static bool iteration_do (bool blocking); public static uint level (); public static void quit (); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Print { + public class Print { public static GLib.Quark error_quark (); public static weak Gtk.PageSetup run_page_setup_dialog (Gtk.Window parent, Gtk.PageSetup page_setup, Gtk.PrintSettings settings); public static void run_page_setup_dialog_async (Gtk.Window parent, Gtk.PageSetup page_setup, Gtk.PrintSettings settings, Gtk.PageSetupDoneFunc done_cb, pointer data); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Quit { + public class Quit { public static uint add (uint main_level, Gtk.Function function, pointer data); public static void add_destroy (uint main_level, Gtk.Object object); public static void remove (uint quit_handler_id); public static void remove_by_data (pointer data); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Rc { + public class Rc { public static void add_default_file (string filename); public static weak string find_module_in_path (string module_file); public static weak string find_pixmap_in_path (Gtk.Settings settings, GLib.Scanner scanner, string pixmap_file); @@ -6179,9 +5639,8 @@ namespace Gtk { public static weak GLib.Scanner scanner_new (); public static void set_default_files (string filenames); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Selection { + public class Selection { public static void add_target (Gtk.Widget widget, Gdk.Atom selection, Gdk.Atom target, uint info); public static void add_targets (Gtk.Widget widget, Gdk.Atom selection, Gtk.TargetEntry targets, uint ntargets); public static void clear_targets (Gtk.Widget widget, Gdk.Atom selection); @@ -6190,13 +5649,11 @@ namespace Gtk { public static bool owner_set_for_display (Gdk.Display display, Gtk.Widget widget, Gdk.Atom selection, uint time_); public static void remove_all (Gtk.Widget widget); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Signal { + public class Signal { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Stock { + public class Stock { [NoArrayLength] public static void add (Gtk.StockItem[] items, uint n_items); [NoArrayLength] @@ -6205,16 +5662,14 @@ namespace Gtk { public static bool lookup (string stock_id, Gtk.StockItem item); public static void set_translate_func (string domain, Gtk.TranslateFunc func, pointer data, Gtk.DestroyNotify notify); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Target { + public class Target { [NoArrayLength] public static void table_free (Gtk.TargetEntry[] targets, int n_targets); public static weak Gtk.TargetEntry table_new_from_list (Gtk.TargetList list, int n_targets); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Targets { + public class Targets { [NoArrayLength] public static bool include_image (Gdk.Atom[] targets, int n_targets, bool writable); [NoArrayLength] @@ -6224,21 +5679,490 @@ namespace Gtk { [NoArrayLength] public static bool include_uri (Gdk.Atom[] targets, int n_targets); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Timeout { + public class Timeout { } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Tree { + public class Tree { public static bool get_row_drag_data (Gtk.SelectionData selection_data, Gtk.TreeModel tree_model, Gtk.TreePath path); public static bool set_row_drag_data (Gtk.SelectionData selection_data, Gtk.TreeModel tree_model, Gtk.TreePath path); } - [ReferenceType] [CCode (cheader_filename = "gtk/gtk.h")] - public struct Type { + public class Type { public pointer @class (); } + [CCode (cheader_filename = "gtk/gtk.h")] + public interface Buildable { + public abstract void add_child (Gtk.Builder builder, GLib.Object child, string type); + public abstract weak GLib.Object construct_child (Gtk.Builder builder, string name); + public abstract void custom_finished (Gtk.Builder builder, GLib.Object child, string tagname, pointer data); + public abstract void custom_tag_end (Gtk.Builder builder, GLib.Object child, string tagname, pointer data); + public abstract bool custom_tag_start (Gtk.Builder builder, GLib.Object child, string tagname, GLib.MarkupParser parser, pointer data); + public abstract weak GLib.Object get_internal_child (Gtk.Builder builder, string childname); + public weak string get_name (); + public static GLib.Type get_type (); + public abstract void parser_finished (Gtk.Builder builder); + public abstract void set_buildable_property (Gtk.Builder builder, string name, GLib.Value value); + public abstract void set_name (string name); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public interface CellEditable { + public static GLib.Type get_type (); + [HasEmitter] + public signal void editing_done (); + [HasEmitter] + public signal void remove_widget (); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public interface CellLayout { + public abstract void add_attribute (Gtk.CellRenderer cell, string attribute, int column); + public abstract void clear (); + public abstract void clear_attributes (Gtk.CellRenderer cell); + public abstract weak GLib.List get_cells (); + public static GLib.Type get_type (); + public abstract void pack_end (Gtk.CellRenderer cell, bool expand); + public abstract void pack_start (Gtk.CellRenderer cell, bool expand); + public abstract void reorder (Gtk.CellRenderer cell, int position); + public void set_attributes (Gtk.CellRenderer cell, ...); + public abstract void set_cell_data_func (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func, pointer func_data, GLib.DestroyNotify destroy); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public interface Editable { + public void copy_clipboard (); + public void cut_clipboard (); + public void delete_selection (); + public abstract weak string get_chars (int start_pos, int end_pos); + public bool get_editable (); + public abstract int get_position (); + public abstract bool get_selection_bounds (int start, int end); + public static GLib.Type get_type (); + public void paste_clipboard (); + public void select_region (int start, int end); + public void set_editable (bool is_editable); + public abstract void set_position (int position); + [HasEmitter] + public signal void insert_text (string text, int length, int position); + [HasEmitter] + public signal void delete_text (int start_pos, int end_pos); + public signal void changed (); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public interface FileChooser { + public void add_filter (Gtk.FileFilter filter); + public bool add_shortcut_folder (string folder) throws GLib.Error; + public bool add_shortcut_folder_uri (string uri) throws GLib.Error; + public static GLib.Quark error_quark (); + public Gtk.FileChooserAction get_action (); + public weak string get_current_folder (); + public weak string get_current_folder_uri (); + public bool get_do_overwrite_confirmation (); + public weak Gtk.Widget get_extra_widget (); + public weak string get_filename (); + public weak GLib.SList get_filenames (); + public weak Gtk.FileFilter get_filter (); + public bool get_local_only (); + public weak string get_preview_filename (); + public weak string get_preview_uri (); + public weak Gtk.Widget get_preview_widget (); + public bool get_preview_widget_active (); + public bool get_select_multiple (); + public bool get_show_hidden (); + public static GLib.Type get_type (); + public weak string get_uri (); + public weak GLib.SList get_uris (); + public bool get_use_preview_label (); + public weak GLib.SList list_filters (); + public weak GLib.SList list_shortcut_folder_uris (); + public weak GLib.SList list_shortcut_folders (); + public void remove_filter (Gtk.FileFilter filter); + public bool remove_shortcut_folder (string folder) throws GLib.Error; + public bool remove_shortcut_folder_uri (string uri) throws GLib.Error; + public void select_all (); + public bool select_filename (string filename); + public bool select_uri (string uri); + public void set_action (Gtk.FileChooserAction action); + public bool set_current_folder (string filename); + public bool set_current_folder_uri (string uri); + public void set_current_name (string name); + public void set_do_overwrite_confirmation (bool do_overwrite_confirmation); + public void set_extra_widget (Gtk.Widget extra_widget); + public bool set_filename (string filename); + public void set_filter (Gtk.FileFilter filter); + public void set_local_only (bool local_only); + public void set_preview_widget (Gtk.Widget preview_widget); + public void set_preview_widget_active (bool active); + public void set_select_multiple (bool select_multiple); + public void set_show_hidden (bool show_hidden); + public bool set_uri (string uri); + public void set_use_preview_label (bool use_label); + public void unselect_all (); + public void unselect_filename (string filename); + public void unselect_uri (string uri); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public interface PrintOperationPreview { + public abstract void end_preview (); + public static GLib.Type get_type (); + public abstract bool is_selected (int page_nr); + public abstract void render_page (int page_nr); + public signal void ready (Gtk.PrintContext context); + public signal void got_page_size (Gtk.PrintContext context, Gtk.PageSetup page_setup); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public interface RecentChooser { + public abstract void add_filter (Gtk.RecentFilter filter); + public static GLib.Quark error_quark (); + public weak Gtk.RecentInfo get_current_item (); + public abstract weak string get_current_uri (); + public weak Gtk.RecentFilter get_filter (); + public abstract weak GLib.List get_items (); + public int get_limit (); + public bool get_local_only (); + public bool get_select_multiple (); + public bool get_show_icons (); + public bool get_show_not_found (); + public bool get_show_numbers (); + public bool get_show_private (); + public bool get_show_tips (); + public Gtk.RecentSortType get_sort_type (); + public static GLib.Type get_type (); + public weak string get_uris (ulong length); + public abstract weak GLib.SList list_filters (); + public abstract void remove_filter (Gtk.RecentFilter filter); + public abstract void select_all (); + public abstract bool select_uri (string uri) throws GLib.Error; + public abstract bool set_current_uri (string uri) throws GLib.Error; + public void set_filter (Gtk.RecentFilter filter); + public void set_limit (int limit); + public void set_local_only (bool local_only); + public void set_select_multiple (bool select_multiple); + public void set_show_icons (bool show_icons); + public void set_show_not_found (bool show_not_found); + public void set_show_numbers (bool show_numbers); + public void set_show_private (bool show_private); + public void set_show_tips (bool show_tips); + public abstract void set_sort_func (Gtk.RecentSortFunc sort_func, pointer sort_data, GLib.DestroyNotify data_destroy); + public void set_sort_type (Gtk.RecentSortType sort_type); + public abstract void unselect_all (); + public abstract void unselect_uri (string uri); + public signal void selection_changed (); + public signal void item_activated (); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public interface TreeDragDest { + public abstract bool drag_data_received (Gtk.TreePath dest, Gtk.SelectionData selection_data); + public static GLib.Type get_type (); + public abstract bool row_drop_possible (Gtk.TreePath dest_path, Gtk.SelectionData selection_data); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public interface TreeDragSource { + public abstract bool drag_data_delete (Gtk.TreePath path); + public abstract bool drag_data_get (Gtk.TreePath path, Gtk.SelectionData selection_data); + public static GLib.Type get_type (); + public abstract bool row_draggable (Gtk.TreePath path); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public interface TreeModel { + public void @foreach (Gtk.TreeModelForeachFunc func, pointer user_data); + [CCode (sentinel = "-1")] + public void get (out Gtk.TreeIter iter, ...); + public abstract GLib.Type get_column_type (int index_); + public abstract Gtk.TreeModelFlags get_flags (); + public abstract bool get_iter (out Gtk.TreeIter iter, Gtk.TreePath path); + 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 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); + public abstract bool iter_children (out Gtk.TreeIter iter, out Gtk.TreeIter parent); + public abstract bool iter_has_child (out Gtk.TreeIter iter); + public abstract int iter_n_children (out Gtk.TreeIter iter); + public abstract bool iter_next (out Gtk.TreeIter iter); + public abstract bool iter_nth_child (out Gtk.TreeIter iter, out Gtk.TreeIter parent, int n); + public abstract bool iter_parent (out Gtk.TreeIter iter, out Gtk.TreeIter child); + public abstract void ref_node (out Gtk.TreeIter iter); + public abstract void unref_node (out Gtk.TreeIter iter); + [HasEmitter] + public signal void row_changed (Gtk.TreePath path, out Gtk.TreeIter iter); + [HasEmitter] + public signal void row_inserted (Gtk.TreePath path, out Gtk.TreeIter iter); + [HasEmitter] + public signal void row_has_child_toggled (Gtk.TreePath path, out Gtk.TreeIter iter); + [HasEmitter] + public signal void row_deleted (Gtk.TreePath path); + [HasEmitter] + public signal void rows_reordered (Gtk.TreePath path, out Gtk.TreeIter iter, int new_order); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public interface TreeSortable { + public abstract bool get_sort_column_id (int sort_column_id, Gtk.SortType order); + public static GLib.Type get_type (); + public abstract bool has_default_sort_func (); + public abstract void set_default_sort_func (Gtk.TreeIterCompareFunc sort_func, pointer user_data, Gtk.DestroyNotify destroy); + public abstract void set_sort_column_id (int sort_column_id, Gtk.SortType order); + public abstract void set_sort_func (int sort_column_id, Gtk.TreeIterCompareFunc sort_func, pointer user_data, Gtk.DestroyNotify destroy); + [HasEmitter] + public signal void sort_column_changed (); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public struct Allocation { + public int x; + public int y; + public int width; + public int height; + } + [CCode (cheader_filename = "gtk/gtk.h")] + public struct Arg { + } + [CCode (cheader_filename = "gtk/gtk.h")] + public struct ActionEntry { + public weak string name; + public weak string stock_id; + public weak string label; + public weak string accelerator; + public weak string tooltip; + public GLib.Callback callback; + } + [CCode (cheader_filename = "gtk/gtk.h")] + public struct Border { + public int left; + public int right; + public int top; + public int bottom; + [InstanceByReference] + public Gtk.Border copy (); + [InstanceByReference] + public void free (); + public static GLib.Type get_type (); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public struct RadioActionEntry { + public weak string name; + public weak string stock_id; + public weak string label; + public weak string accelerator; + public weak string tooltip; + public int value; + } + [CCode (cheader_filename = "gtk/gtk.h")] + public struct Requisition { + public int width; + public int height; + [InstanceByReference] + public Gtk.Requisition copy (); + [InstanceByReference] + public void free (); + public static GLib.Type get_type (); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public struct TextIter { + [InstanceByReference] + public bool backward_char (); + [InstanceByReference] + public bool backward_chars (int count); + [InstanceByReference] + public bool backward_cursor_position (); + [InstanceByReference] + public bool backward_cursor_positions (int count); + [InstanceByReference] + public bool backward_find_char (Gtk.TextCharPredicate pred, pointer user_data, out Gtk.TextIter limit); + [InstanceByReference] + public bool backward_line (); + [InstanceByReference] + public bool backward_lines (int count); + [InstanceByReference] + public bool backward_search (string str, Gtk.TextSearchFlags flags, out Gtk.TextIter match_start, out Gtk.TextIter match_end, out Gtk.TextIter limit); + [InstanceByReference] + public bool backward_sentence_start (); + [InstanceByReference] + public bool backward_sentence_starts (int count); + [InstanceByReference] + public bool backward_to_tag_toggle (Gtk.TextTag tag); + [InstanceByReference] + public bool backward_visible_cursor_position (); + [InstanceByReference] + public bool backward_visible_cursor_positions (int count); + [InstanceByReference] + public bool backward_visible_line (); + [InstanceByReference] + public bool backward_visible_lines (int count); + [InstanceByReference] + public bool backward_visible_word_start (); + [InstanceByReference] + public bool backward_visible_word_starts (int count); + [InstanceByReference] + public bool backward_word_start (); + [InstanceByReference] + public bool backward_word_starts (int count); + [InstanceByReference] + public bool begins_tag (Gtk.TextTag tag); + [InstanceByReference] + public bool can_insert (bool default_editability); + [InstanceByReference] + public int compare (out Gtk.TextIter rhs); + [InstanceByReference] + public Gtk.TextIter copy (); + [InstanceByReference] + public bool editable (bool default_setting); + [InstanceByReference] + public bool ends_line (); + [InstanceByReference] + public bool ends_sentence (); + [InstanceByReference] + public bool ends_tag (Gtk.TextTag tag); + [InstanceByReference] + public bool ends_word (); + [InstanceByReference] + public bool equal (out Gtk.TextIter rhs); + [InstanceByReference] + public bool forward_char (); + [InstanceByReference] + public bool forward_chars (int count); + [InstanceByReference] + public bool forward_cursor_position (); + [InstanceByReference] + public bool forward_cursor_positions (int count); + [InstanceByReference] + public bool forward_find_char (Gtk.TextCharPredicate pred, pointer user_data, out Gtk.TextIter limit); + [InstanceByReference] + public bool forward_line (); + [InstanceByReference] + public bool forward_lines (int count); + [InstanceByReference] + public bool forward_search (string str, Gtk.TextSearchFlags flags, out Gtk.TextIter match_start, out Gtk.TextIter match_end, out Gtk.TextIter limit); + [InstanceByReference] + public bool forward_sentence_end (); + [InstanceByReference] + public bool forward_sentence_ends (int count); + [InstanceByReference] + public void forward_to_end (); + [InstanceByReference] + public bool forward_to_line_end (); + [InstanceByReference] + public bool forward_to_tag_toggle (Gtk.TextTag tag); + [InstanceByReference] + public bool forward_visible_cursor_position (); + [InstanceByReference] + public bool forward_visible_cursor_positions (int count); + [InstanceByReference] + public bool forward_visible_line (); + [InstanceByReference] + public bool forward_visible_lines (int count); + [InstanceByReference] + public bool forward_visible_word_end (); + [InstanceByReference] + public bool forward_visible_word_ends (int count); + [InstanceByReference] + public bool forward_word_end (); + [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 (); + [InstanceByReference] + public int get_bytes_in_line (); + [InstanceByReference] + public unichar get_char (); + [InstanceByReference] + public int get_chars_in_line (); + [InstanceByReference] + public weak Gtk.TextChildAnchor get_child_anchor (); + [InstanceByReference] + public weak Pango.Language get_language (); + [InstanceByReference] + public int get_line (); + [InstanceByReference] + public int get_line_index (); + [InstanceByReference] + public int get_line_offset (); + [InstanceByReference] + public weak GLib.SList get_marks (); + [InstanceByReference] + public int get_offset (); + [InstanceByReference] + public weak Gdk.Pixbuf get_pixbuf (); + [InstanceByReference] + public weak string get_slice (out Gtk.TextIter end); + [InstanceByReference] + public weak GLib.SList get_tags (); + [InstanceByReference] + public weak string get_text (out Gtk.TextIter end); + [InstanceByReference] + public weak GLib.SList get_toggled_tags (bool toggled_on); + public static GLib.Type get_type (); + [InstanceByReference] + public int get_visible_line_index (); + [InstanceByReference] + public int get_visible_line_offset (); + [InstanceByReference] + public weak string get_visible_slice (out Gtk.TextIter end); + [InstanceByReference] + public weak string get_visible_text (out Gtk.TextIter end); + [InstanceByReference] + public bool has_tag (Gtk.TextTag tag); + [InstanceByReference] + public bool in_range (out Gtk.TextIter start, out Gtk.TextIter end); + [InstanceByReference] + public bool inside_sentence (); + [InstanceByReference] + public bool inside_word (); + [InstanceByReference] + public bool is_cursor_position (); + [InstanceByReference] + public bool is_end (); + [InstanceByReference] + public bool is_start (); + [InstanceByReference] + public void order (out Gtk.TextIter second); + [InstanceByReference] + public void set_line (int line_number); + [InstanceByReference] + public void set_line_index (int byte_on_line); + [InstanceByReference] + public void set_line_offset (int char_on_line); + [InstanceByReference] + public void set_offset (int char_offset); + [InstanceByReference] + public void set_visible_line_index (int byte_on_line); + [InstanceByReference] + public void set_visible_line_offset (int char_on_line); + [InstanceByReference] + public bool starts_line (); + [InstanceByReference] + public bool starts_sentence (); + [InstanceByReference] + public bool starts_word (); + [InstanceByReference] + public bool toggles_tag (Gtk.TextTag tag); + } + [CCode (cheader_filename = "gtk/gtk.h")] + public struct ToggleActionEntry { + public weak string name; + public weak string stock_id; + public weak string label; + public weak string accelerator; + public weak string tooltip; + public GLib.Callback callback; + public bool is_active; + } + [CCode (cheader_filename = "gtk/gtk.h")] + public struct TreeIter { + public int stamp; + public pointer user_data; + public pointer user_data2; + public pointer user_data3; + [InstanceByReference] + public Gtk.TreeIter copy (); + [InstanceByReference] + public void free (); + public static GLib.Type get_type (); + } public static delegate void CallbackMarshal (Gtk.Object object, pointer data, Gtk.Arg[] args); public static delegate void AboutDialogActivateLinkFunc (Gtk.AboutDialog about, string link_, pointer data); public static delegate bool AccelGroupActivate (Gtk.AccelGroup accel_group, GLib.Object acceleratable, uint keyval, Gdk.ModifierType modifier); diff --git a/vapi/gtksourceview-2.0.vala b/vapi/gtksourceview-2.0.vala index 9133632de..0d6220806 100644 --- a/vapi/gtksourceview-2.0.vala +++ b/vapi/gtksourceview-2.0.vala @@ -215,17 +215,14 @@ namespace Gtk { public signal void undo (); public signal void redo (); } - [ReferenceType] [CCode (cheader_filename = "gtksourceview/gtksourceview.h")] - public struct SourceContextData { + public class SourceContextData { } - [ReferenceType] [CCode (cheader_filename = "gtksourceview/gtksourceview.h")] - public struct SourceContextReplace { + public class SourceContextReplace { } - [ReferenceType] [CCode (cheader_filename = "gtksourceview/gtksourceview.h")] - public struct TextRegion { + public class TextRegion { public void add (out Gtk.TextIter _start, out Gtk.TextIter _end); public void debug_print (); public void destroy (bool delete_marks); @@ -237,16 +234,14 @@ namespace Gtk { 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 class 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 class 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/hal.vala b/vapi/hal.vala index 593636abe..dcf901cff 100644 --- a/vapi/hal.vala +++ b/vapi/hal.vala @@ -25,9 +25,8 @@ namespace Hal { public static delegate void DeviceAdded (Context ctx, string udi); public static delegate void DeviceRemoved (Context ctx, string udi); - [ReferenceType (free_function = "libhal_ctx_free")] - [CCode (cprefix = "libhal_ctx_")] - public struct Context { + [CCode (free_function = "libhal_ctx_free", cprefix = "libhal_ctx_")] + public class Context { public Context (); public bool init (ref DBus.RawError error); public bool set_dbus_connection (DBus.RawConnection conn); diff --git a/vapi/hildon-1.vala b/vapi/hildon-1.vala index 4626b9f78..fc3675d03 100644 --- a/vapi/hildon-1.vala +++ b/vapi/hildon-1.vala @@ -588,15 +588,7 @@ namespace Hildon { public weak bool autotitle { get; set; } } [CCode (cheader_filename = "hildon/hildon.h")] - public interface BreadCrumb { - public void activated (); - public abstract void get_natural_size (int width, int height); - public static GLib.Type get_type (); - public signal void crumb_activated (); - } - [ReferenceType] - [CCode (cheader_filename = "hildon/hildon.h")] - public struct Helper { + public class Helper { public static bool event_button_is_finger (Gdk.EventButton event); public static void set_insensitive_message (Gtk.Widget widget, string message); public static void set_insensitive_messagef (Gtk.Widget widget, string format); @@ -604,6 +596,13 @@ namespace Hildon { public static ulong set_logical_font (Gtk.Widget widget, string logicalfontname); public static void set_thumb_scrollbar (Gtk.ScrolledWindow win, bool thumb); } + [CCode (cheader_filename = "hildon/hildon.h")] + public interface BreadCrumb { + public void activated (); + public abstract void get_natural_size (int width, int height); + public static GLib.Type get_type (); + public signal void crumb_activated (); + } public static int get_icon_pixel_size (Gtk.IconSize size); public static void play_system_sound (string sample); } diff --git a/vapi/libglade-2.0.vala b/vapi/libglade-2.0.vala index 0640acc82..2af98df3b 100644 --- a/vapi/libglade-2.0.vala +++ b/vapi/libglade-2.0.vala @@ -26,36 +26,31 @@ namespace Glade { public void signal_connect_data (string handlername, GLib.Callback func, pointer user_data); public void signal_connect_full (string handler_name, Glade.XMLConnectFunc func, pointer user_data); } - [ReferenceType] [CCode (cheader_filename = "glade/glade.h")] - public struct AccelInfo { + public class AccelInfo { public uint key; public Gdk.ModifierType modifiers; public weak string @signal; } - [ReferenceType] [CCode (cheader_filename = "glade/glade.h")] - public struct AtkActionInfo { + public class AtkActionInfo { public weak string action_name; public weak string description; } - [ReferenceType] [CCode (cheader_filename = "glade/glade.h")] - public struct AtkRelationInfo { + public class AtkRelationInfo { public weak string target; public weak string type; } - [ReferenceType] [CCode (cheader_filename = "glade/glade.h")] - public struct ChildInfo { + public class ChildInfo { public weak Glade.Property properties; public uint n_properties; public weak Glade.WidgetInfo child; public weak string internal_child; } - [ReferenceType] [CCode (cheader_filename = "glade/glade.h")] - public struct Interface { + public class Interface { public weak string requires; public uint n_requires; public weak Glade.WidgetInfo toplevels; @@ -65,23 +60,20 @@ namespace Glade { public void destroy (); public void dump (string filename); } - [ReferenceType] [CCode (cheader_filename = "glade/glade.h")] - public struct Property { + public class Property { public weak string name; public weak string value; } - [ReferenceType] [CCode (cheader_filename = "glade/glade.h")] - public struct SignalInfo { + public class SignalInfo { public weak string name; public weak string handler; public weak string object; public uint after; } - [ReferenceType] [CCode (cheader_filename = "glade/glade.h")] - public struct WidgetInfo { + public class WidgetInfo { public weak Glade.WidgetInfo parent; public weak string classname; public weak string name; @@ -100,15 +92,13 @@ namespace Glade { public weak Glade.ChildInfo children; public uint n_children; } - [ReferenceType] [CCode (cheader_filename = "glade/glade.h")] - public struct Parser { + public class Parser { public static weak Glade.Interface parse_buffer (string buffer, int len, string domain); public static weak Glade.Interface parse_file (string file, string domain); } - [ReferenceType] [CCode (cheader_filename = "glade/glade.h")] - public struct Standard { + public class Standard { public void build_children (Gtk.Widget parent, Glade.WidgetInfo info); public static weak Gtk.Widget build_widget (Glade.XML xml, GLib.Type widget_type, Glade.WidgetInfo info); } diff --git a/vapi/libgnome-2.0.vala b/vapi/libgnome-2.0.vala index 28f4313b3..836daef31 100644 --- a/vapi/libgnome-2.0.vala +++ b/vapi/libgnome-2.0.vala @@ -95,9 +95,8 @@ namespace Gnome { [NoAccessorMethod] public weak string espeaker { get; set; } } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct ModuleInfo { + public class ModuleInfo { public weak string name; public weak string version; public weak string description; @@ -112,41 +111,35 @@ namespace Gnome { public Gnome.ModuleGetGOptionGroupFunc get_goption_group_func; public static GLib.Type get_type (); } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct ModuleRequirement { + public class ModuleRequirement { public weak string required_version; public weak Gnome.ModuleInfo module_info; } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct Trigger { + public class Trigger { public Gnome.TriggerType type; public Gnome.TriggerActionFunction function; public weak string level; } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct TriggerList { + public class TriggerList { public weak string nodename; public weak Gnome.TriggerList subtrees; public weak Gnome.Trigger actions; public int numsubtrees; public int numactions; } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct Config { + public class Config { } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct Gconf { + public class Gconf { public static weak string get_app_settings_relative (Gnome.Program program, string subkey); public static weak string get_gnome_libs_settings_relative (string subkey); } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct Help { + public class Help { public static bool display (string file_name, string link_id) throws GLib.Error; public static bool display_desktop (Gnome.Program program, string doc_id, string file_name, string link_id) throws GLib.Error; public static bool display_desktop_with_env (Gnome.Program program, string doc_id, string file_name, string link_id, out string envp) throws GLib.Error; @@ -156,22 +149,19 @@ namespace Gnome { public static bool display_with_doc_id_and_env (Gnome.Program program, string doc_id, string file_name, string link_id, out string envp) throws GLib.Error; public static GLib.Quark error_quark (); } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct Score { + public class Score { } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct Sound { + public class Sound { public static int connection_get (); public static void init (string hostname); public static void play (string filename); public static int sample_load (string sample_name, string filename); public static void shutdown (); } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct Triggers { + public class Triggers { public static void add_trigger (Gnome.Trigger nt); public static void @do (string msg, string level); [NoArrayLength] @@ -179,16 +169,14 @@ namespace Gnome { [NoArrayLength] public static void vdo (string msg, string level, string[] supinfo); } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct Url { + public class Url { public static GLib.Quark error_quark (); public static bool show (string url) throws GLib.Error; public static bool show_with_env (string url, out string envp) throws GLib.Error; } - [ReferenceType] [CCode (cheader_filename = "libgnome/libgnome.h")] - public struct User { + public class User { public static weak string accels_dir_get (); public static weak string dir_get (); public static weak string private_dir_get (); diff --git a/vapi/libgnomeui-2.0.vala b/vapi/libgnomeui-2.0.vala index 1c168c9bf..f9c29c8bf 100644 --- a/vapi/libgnomeui-2.0.vala +++ b/vapi/libgnomeui-2.0.vala @@ -632,44 +632,36 @@ namespace Gnome { public ThumbnailFactory (Gnome.ThumbnailSize size); public void save_thumbnail (Gdk.Pixbuf thumbnail, string uri, ulong original_mtime); } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct AppBarMsg { + public class AppBarMsg { } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct GdkPixbufAsyncHandle { + public class GdkPixbufAsyncHandle { } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct IconDataPoint { + public class IconDataPoint { public int x; public int y; } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct MessageBoxButton { + public class MessageBoxButton { } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct PasswordDialogDetails { + public class PasswordDialogDetails { } - [ReferenceType (free_function = "gnome_theme_file_free")] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct ThemeFile { + public class ThemeFile { } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct UIBuilderData { + public class UIBuilderData { public Gnome.UISignalConnectFunc connect_func; public pointer data; public bool is_interp; public Gtk.CallbackMarshal relay_func; public Gtk.DestroyNotify destroy_func; } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct UIInfo { + public class UIInfo { public Gnome.UIInfoType type; public weak string label; public weak string hint; @@ -682,67 +674,55 @@ namespace Gnome { public Gdk.ModifierType ac_mods; public weak Gtk.Widget widget; } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Authentication { + public class Authentication { public static bool manager_dialog_is_visible (); public static void manager_init (); } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Error { + public class Error { } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Gdk { + public class Gdk { public static weak Gdk.Pixbuf pixbuf_new_from_uri (string uri); public static weak Gnome.GdkPixbufAsyncHandle pixbuf_new_from_uri_async (string uri, Gnome.GdkPixbufLoadCallback load_callback, Gnome.GdkPixbufDoneCallback done_callback, pointer callback_data); public static weak Gdk.Pixbuf pixbuf_new_from_uri_at_scale (string uri, int width, int height, bool preserve_aspect_ratio); public static void pixbuf_new_from_uri_cancel (Gnome.GdkPixbufAsyncHandle handle); } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Gtk { + public class Gtk { public static weak Gnome.ModuleInfo module_info_get (); } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Icon { + public class Icon { public static weak string lookup (Gtk.IconTheme icon_theme, Gnome.ThumbnailFactory thumbnail_factory, string file_uri, string custom_icon, GnomeVFS.FileInfo file_info, string mime_type, Gnome.IconLookupFlags flags, Gnome.IconLookupResultFlags result); public static weak string lookup_sync (Gtk.IconTheme icon_theme, Gnome.ThumbnailFactory thumbnail_factory, string file_uri, string custom_icon, Gnome.IconLookupFlags flags, Gnome.IconLookupResultFlags result); } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Ok { + public class Ok { } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Popup { + public class Popup { } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Question { + public class Question { } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Request { + public class Request { } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Thumbnail { + public class Thumbnail { public static bool has_uri (Gdk.Pixbuf pixbuf, string uri); public static bool is_valid (Gdk.Pixbuf pixbuf, string uri, ulong mtime); public static weak string md5 (string uri); public static weak string path_for_uri (string uri, Gnome.ThumbnailSize size); public static weak Gdk.Pixbuf scale_down_pixbuf (Gdk.Pixbuf pixbuf, int dest_width, int dest_height); } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Warning { + public class Warning { } - [ReferenceType] [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public struct Window { + public class Window { } public static delegate void AppProgressCancelFunc (pointer data); public static delegate double AppProgressFunc (pointer data); diff --git a/vapi/libsoup-2.2.vala b/vapi/libsoup-2.2.vala index 6f42b81a9..225c167b9 100644 --- a/vapi/libsoup-2.2.vala +++ b/vapi/libsoup-2.2.vala @@ -182,6 +182,12 @@ namespace Soup { ARRAY, } [CCode (cheader_filename = "libsoup/soup.h")] + public class ServerAuth { + public ServerAuth (Soup.ServerAuthContext auth_ctx, GLib.SList auth_hdrs, Soup.Message msg); + public weak string get_user (); + public bool check_passwd (string passwd); + } + [CCode (cheader_filename = "libsoup/soup.h")] public class Address : GLib.Object { public weak string get_name (); public weak string get_physical (); @@ -431,49 +437,32 @@ namespace Soup { public signal void new_connection (Soup.Socket arg2); } [CCode (cheader_filename = "libsoup/soup.h")] - public interface MessageFilter { - public static GLib.Type get_type (); - public abstract void setup_message (Soup.Message msg); - } - [ReferenceType] - [CCode (cheader_filename = "libsoup/soup.h")] - public struct ServerAuth { - public ServerAuth (Soup.ServerAuthContext auth_ctx, GLib.SList auth_hdrs, Soup.Message msg); - public weak string get_user (); - public bool check_passwd (string passwd); - } - [ReferenceType] - [CCode (cheader_filename = "libsoup/soup.h")] - public struct AuthBasicClass { + public class AuthBasicClass { public pointer parent_class; } - [ReferenceType (free_function = "soup_dns_lookup_free")] [CCode (cheader_filename = "libsoup/soup.h")] - public struct DNSLookup { + public class DNSLookup { public void cancel (); public weak string get_hostname (); public static weak Soup.DNSLookup name (string name); public bool resolve (); public void resolve_async (GLib.MainContext async_context, Soup.DNSCallback callback, pointer user_data); } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct DataBuffer { + public class DataBuffer { public Soup.Ownership owner; public weak string body; public uint length; } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct MD5Context { + public class MD5Context { public uint buf; public uint bits; public uchar @in; public bool doByteReverse; } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct MessageQueue { + public class MessageQueue { public void append (Soup.Message msg); public void destroy (); public weak Soup.Message first (Soup.MessageQueueIter iter); @@ -483,22 +472,19 @@ namespace Soup { public weak Soup.Message remove (Soup.MessageQueueIter iter); public void remove_message (Soup.Message msg); } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct MessageQueueIter { + public class MessageQueueIter { public weak GLib.List cur; public weak GLib.List next; } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct ServerAuthBasic { + public class ServerAuthBasic { public Soup.AuthType type; public weak string user; public weak string passwd; } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct ServerAuthContext { + public class ServerAuthContext { public uint types; public Soup.ServerAuthCallbackFn callback; public pointer user_data; @@ -506,9 +492,8 @@ namespace Soup { public bool force_integrity; public void challenge (Soup.Message msg, string header_name); } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct ServerAuthDigest { + public class ServerAuthDigest { public Soup.AuthType type; public Soup.DigestAlgorithm algorithm; public bool integrity; @@ -521,9 +506,8 @@ namespace Soup { public weak string digest_response; public weak string request_method; } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct ServerContext { + public class ServerContext { public weak Soup.Message msg; public weak string path; public Soup.MethodId method_id; @@ -534,18 +518,16 @@ namespace Soup { public weak Soup.Address get_client_address (); public weak string get_client_host (); } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct ServerHandler { + public class ServerHandler { public weak string path; public weak Soup.ServerAuthContext auth_ctx; public Soup.ServerCallbackFn callback; public Soup.ServerUnregisterFn unregister; public pointer user_data; } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct Uri { + public class Uri { public GLib.Quark protocol; public weak string user; public weak string passwd; @@ -565,36 +547,31 @@ namespace Soup { public weak string to_string (bool just_path); public bool uses_default_port (); } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct Date { + public class Date { public static weak string generate (ulong when); public static ulong iso8601_parse (string timestamp); public static ulong parse (string timestamp); } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct Dns { + public class Dns { public static void init (); } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct Header { + public class Header { public static weak string param_copy_token (GLib.HashTable tokens, string t); public static weak string param_decode_token (out string @in); public static void param_destroy_hash (GLib.HashTable table); public static weak GLib.HashTable param_parse_list (string header); } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct Headers { + public class Headers { public static bool parse_request (string str, int len, GLib.HashTable dest, out string req_method, out string req_path, Soup.HttpVersion ver); public static bool parse_response (string str, int len, GLib.HashTable dest, Soup.HttpVersion ver, uint status_code, out string reason_phrase); public static bool parse_status_line (string status_line, Soup.HttpVersion ver, uint status_code, out string reason_phrase); } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct Ssl { + public class Ssl { public static GLib.Quark error_quark (); public static void free_client_credentials (pointer creds); public static void free_server_credentials (pointer creds); @@ -602,12 +579,16 @@ namespace Soup { public static pointer get_server_credentials (string cert_file, string key_file); public static weak GLib.IOChannel wrap_iochannel (GLib.IOChannel sock, Soup.SSLType type, string remote_host, pointer credentials); } - [ReferenceType] [CCode (cheader_filename = "libsoup/soup.h")] - public struct Str { + public class Str { public static bool case_equal (pointer v1, pointer v2); public static uint case_hash (pointer key); } + [CCode (cheader_filename = "libsoup/soup.h")] + public interface MessageFilter { + public static GLib.Type get_type (); + public abstract void setup_message (Soup.Message msg); + } public static delegate void AddressCallback (Soup.Address addr, uint status, pointer data); public static delegate void ConnectionCallback (Soup.Connection conn, uint status, pointer data); public static delegate void DNSCallback (Soup.DNSLookup lookup, bool success, pointer user_data); diff --git a/vapi/libwnck-1.0.vala b/vapi/libwnck-1.0.vala index a29db7fad..3f06ba4bc 100644 --- a/vapi/libwnck-1.0.vala +++ b/vapi/libwnck-1.0.vala @@ -328,20 +328,17 @@ namespace Wnck { public static GLib.Type get_type (); public WorkspaceAccessible (GLib.Object obj); } - [ReferenceType] [CCode (cheader_filename = "libwnck/libwnck.h")] - public struct IconCache { + public class IconCache { } - [ReferenceType] [CCode (cheader_filename = "libwnck/libwnck.h")] - public struct PagerAccessibleFactory { + public class PagerAccessibleFactory { public weak Atk.ObjectFactory parent; public static GLib.Type get_type (); public PagerAccessibleFactory (); } - [ReferenceType] [CCode (cheader_filename = "libwnck/libwnck.h")] - public struct ResourceUsage { + public class ResourceUsage { public ulong total_bytes_estimate; public ulong pixmap_bytes; public uint n_pixmaps; diff --git a/vapi/libxml-2.0.vala b/vapi/libxml-2.0.vala index 84426a397..acee5b464 100644 --- a/vapi/libxml-2.0.vala +++ b/vapi/libxml-2.0.vala @@ -23,9 +23,8 @@ */ namespace Xml { - [ReferenceType (free_function = "xmlFreeTextReader")] - [CCode (cname = "xmlTextReader", cheader_filename = "libxml/xmlreader.h")] - public struct TextReader { + [CCode (free_function = "xmlFreeTextReader", cname = "xmlTextReader", cheader_filename = "libxml/xmlreader.h")] + public class TextReader { [CCode (cname = "xmlNewTextReaderFilename")] public TextReader.with_filename (string uri); @@ -116,9 +115,8 @@ namespace Xml { [CCode (cname = "ftpListCallback", cheader_filename = "libxml/nanoftp.h")] public static delegate void FtpListCallback (pointer userData, string filename, string attrib, string owner, string group, ulong size, int links, int year, string month, int day, int hour, int minute); - [ReferenceType (free_function = "xmlNanoFTPFreeCtxt")] - [CCode (cname = "gpointer", cheader_filename = "libxml/nanoftp.h")] - public struct NanoFTP { + [CCode (free_function = "xmlNanoFTPFreeCtxt", cname = "gpointer", cheader_filename = "libxml/nanoftp.h")] + public class NanoFTP { [CCode (cname = "xmlNanoFTPCheckResponse")] public int check_response (); [CCode (cname = "xmlNanoFTPCleanup")] @@ -163,9 +161,8 @@ namespace Xml { public int update_url (string URL); } - [ReferenceType (free_function = "xmlNanoHTTPClose")] - [CCode (cname = "gpointer", cheader_filename = "libxml/nanohttp.h")] - public struct NanoHTTP { + [CCode (free_function = "xmlNanoHTTPClose", cname = "gpointer", cheader_filename = "libxml/nanohttp.h")] + public class NanoHTTP { [CCode (cname = "xmlNanoHTTPAuthHeader")] public string auth_header (); @@ -216,9 +213,8 @@ namespace Xml { public static void scan_proxy (string URL); } - [ReferenceType (free_function = "xmlFreeURI")] - [CCode (cname = "xmlURI", cheader_filename = "libxml/uri.h")] - public struct URI { + [CCode (free_function = "xmlFreeURI", cname = "xmlURI", cheader_filename = "libxml/uri.h")] + public class URI { [CCode (cname = "xmlBuildRelativeURI")] public static string build_relative (string URI, string @base); [CCode (cname = "xmlBuildURI")] @@ -330,8 +326,7 @@ namespace Xml { public static delegate void warningSAXFunc (pointer ctx, string msg, ...); [CCode (cname = "xmlSAXHandler")] - [ReferenceType] - public struct SAXHandler { + public class SAXHandler { public internalSubsetSAXFunc internalSubset; public isStandaloneSAXFunc isStandalone; public hasInternalSubsetSAXFunc hasInternalSubset; @@ -365,9 +360,8 @@ namespace Xml { // public xmlStructuredErrorFunc serror; } - [CCode (cname = "xmlSAXHandler")] - [ReferenceType (free_function = "xmlFreeParserCtxt")] - public struct ParserCtxt { + [CCode (free_function = "xmlFreeParserCtxt", cname = "xmlSAXHandler")] + public class ParserCtxt { public weak SAXHandler sax; public weak pointer userData; diff --git a/vapi/packages/libsoup-2.2/libsoup-2.2-custom.vala b/vapi/packages/libsoup-2.2/libsoup-2.2-custom.vala index 6bf2526ad..a80b91349 100644 --- a/vapi/packages/libsoup-2.2/libsoup-2.2-custom.vala +++ b/vapi/packages/libsoup-2.2/libsoup-2.2-custom.vala @@ -22,8 +22,7 @@ [CCode (cheader_filename = "libsoup/soup.h")] namespace Soup { - [ReferenceType] - public struct ServerAuth { + public class ServerAuth { [Import] public ServerAuth (ServerAuthContext auth_ctx, GLib.SList auth_hdrs, Message msg); [Import] diff --git a/vapi/packages/pango/pango-custom.vala b/vapi/packages/pango/pango-custom.vala index 3c885e580..42e13d615 100644 --- a/vapi/packages/pango/pango-custom.vala +++ b/vapi/packages/pango/pango-custom.vala @@ -21,8 +21,7 @@ */ namespace Pango { - [ReferenceType] - public struct Language { + public class Language { [Import ()] public weak string! to_string (); } diff --git a/vapi/pango.vala b/vapi/pango.vala index f644b3205..dbd2f3481 100644 --- a/vapi/pango.vala +++ b/vapi/pango.vala @@ -212,6 +212,16 @@ namespace Pango { WORD_CHAR, } [CCode (cheader_filename = "pango/pango.h")] + public class Language { + public weak string! to_string (); + public static weak Pango.Language from_string (string language); + public static weak Pango.Language get_default (); + public weak string get_sample_string (); + public static GLib.Type get_type (); + public bool includes_script (Pango.Script script); + public bool matches (string range_list); + } + [CCode (cheader_filename = "pango/pango.h")] public class ATSUIFont : Pango.Font { public static GLib.Type get_type (); } @@ -374,20 +384,8 @@ namespace Pango { public void set_color (Pango.RenderPart part, out Pango.Color color); public void set_matrix (out Pango.Matrix matrix); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct Language { - public weak string! to_string (); - public static weak Pango.Language from_string (string language); - public static weak Pango.Language get_default (); - public weak string get_sample_string (); - public static GLib.Type get_type (); - public bool includes_script (Pango.Script script); - public bool matches (string range_list); - } - [ReferenceType] - [CCode (cheader_filename = "pango/pango.h")] - public struct Analysis { + public class Analysis { public weak Pango.EngineShape shape_engine; public weak Pango.EngineLang lang_engine; public weak Pango.Font font; @@ -398,39 +396,33 @@ namespace Pango { public weak Pango.Language language; public weak GLib.SList extra_attrs; } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct AttrClass { + public class AttrClass { public Pango.AttrType type; } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct AttrColor { + public class AttrColor { public weak Pango.Attribute attr; public Pango.Color color; } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct AttrFloat { + public class AttrFloat { public weak Pango.Attribute attr; public double value; } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct AttrFontDesc { + public class AttrFontDesc { public weak Pango.Attribute attr; public weak Pango.FontDescription desc; public AttrFontDesc (Pango.FontDescription desc); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct AttrInt { + public class AttrInt { public weak Pango.Attribute attr; public int value; } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct AttrIterator { + public class AttrIterator { public weak Pango.AttrIterator copy (); public void destroy (); public weak Pango.Attribute get (Pango.AttrType type); @@ -439,16 +431,14 @@ namespace Pango { public bool next (); public void range (int start, int end); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct AttrLanguage { + public class AttrLanguage { public weak Pango.Attribute attr; public weak Pango.Language value; public AttrLanguage (Pango.Language language); } - [ReferenceType (dup_function = "pango_attr_list_ref", free_function = "pango_attr_list_unref")] - [CCode (cheader_filename = "pango/pango.h")] - public struct AttrList { + [CCode (ref_function = "pango_attr_list_ref", unref_function = "pango_attr_list_unref", cheader_filename = "pango/pango.h")] + public class AttrList { public void change (Pango.Attribute attr); public weak Pango.AttrList copy (); public weak Pango.AttrList filter (Pango.AttrFilterFunc func, pointer data); @@ -459,9 +449,8 @@ namespace Pango { public AttrList (); public void splice (Pango.AttrList other, int pos, int len); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct AttrShape { + public class AttrShape { public weak Pango.Attribute attr; public Pango.Rectangle ink_rect; public Pango.Rectangle logical_rect; @@ -471,23 +460,20 @@ namespace Pango { public AttrShape (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect); public AttrShape.with_data (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect, pointer data, Pango.AttrDataCopyFunc copy_func, GLib.DestroyNotify destroy_func); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct AttrSize { + public class AttrSize { public weak Pango.Attribute attr; public int size; public uint absolute; public AttrSize (int size); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct AttrString { + public class AttrString { public weak Pango.Attribute attr; public weak string value; } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct Attribute { + public class Attribute { public pointer klass; public uint start_index; public uint end_index; @@ -495,22 +481,8 @@ namespace Pango { public void destroy (); public bool equal (Pango.Attribute attr2); } - [CCode (cheader_filename = "pango/pango.h")] - public struct Color { - public ushort red; - public ushort green; - public ushort blue; - [InstanceByReference] - public Pango.Color copy (); - public static GLib.Type get_type (); - [InstanceByReference] - public bool parse (string spec); - [InstanceByReference] - public weak string to_string (); - } - [ReferenceType (dup_function = "pango_coverage_ref", free_function = "pango_coverage_unref")] - [CCode (cheader_filename = "pango/pango.h")] - public struct Coverage { + [CCode (ref_function = "pango_coverage_ref", unref_function = "pango_coverage_unref", cheader_filename = "pango/pango.h")] + public class Coverage { public weak Pango.Coverage copy (); [NoArrayLength] public static weak Pango.Coverage from_bytes (uchar[] bytes, int n_bytes); @@ -521,17 +493,14 @@ namespace Pango { [NoArrayLength] public void to_bytes (uchar[] bytes, int n_bytes); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct EngineLang { + public class EngineLang { } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct EngineShape { + public class EngineShape { } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct FontDescription { + public class FontDescription { public bool better_match (Pango.FontDescription old_match, Pango.FontDescription new_match); public weak Pango.FontDescription copy (); public weak Pango.FontDescription copy_static (); @@ -564,9 +533,8 @@ namespace Pango { public weak string to_string (); public void unset_fields (Pango.FontMask to_unset); } - [ReferenceType (dup_function = "pango_font_metrics_ref", free_function = "pango_font_metrics_unref")] - [CCode (cheader_filename = "pango/pango.h")] - public struct FontMetrics { + [CCode (ref_function = "pango_font_metrics_ref", unref_function = "pango_font_metrics_unref", cheader_filename = "pango/pango.h")] + public class FontMetrics { public int get_approximate_char_width (); public int get_approximate_digit_width (); public int get_ascent (); @@ -577,32 +545,28 @@ namespace Pango { public int get_underline_position (); public int get_underline_thickness (); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct GlyphGeometry { + public class GlyphGeometry { public int width; public int x_offset; public int y_offset; } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct GlyphInfo { + public class GlyphInfo { public uint glyph; public weak Pango.GlyphGeometry geometry; public weak Pango.GlyphVisAttr attr; } - [ReferenceType (free_function = "pango_glyph_item_free")] [CCode (cheader_filename = "pango/pango.h")] - public struct GlyphItem { + public class GlyphItem { public weak Pango.Item item; public weak Pango.GlyphString glyphs; public weak GLib.SList apply_attrs (string text, Pango.AttrList list); public void letter_space (string text, Pango.LogAttr log_attrs, int letter_spacing); public weak Pango.GlyphItem split (string text, int split_index); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct GlyphString { + public class GlyphString { public int num_glyphs; public weak Pango.GlyphInfo glyphs; public int log_clusters; @@ -617,14 +581,12 @@ namespace Pango { public void set_size (int new_len); public void x_to_index (string text, int length, Pango.Analysis analysis, int x_pos, int index_, int trailing); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct GlyphVisAttr { + public class GlyphVisAttr { public uint is_cluster_start; } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct Item { + public class Item { public int offset; public int length; public int num_chars; @@ -634,9 +596,8 @@ namespace Pango { public Item (); public weak Pango.Item split (int split_index, int split_offset); } - [ReferenceType (free_function = "pango_layout_iter_free")] [CCode (cheader_filename = "pango/pango.h")] - public struct LayoutIter { + public class LayoutIter { public bool at_last_line (); public int get_baseline (); public void get_char_extents (out Pango.Rectangle logical_rect); @@ -656,9 +617,8 @@ namespace Pango { public bool next_line (); public bool next_run (); } - [ReferenceType (dup_function = "pango_layout_line_ref", free_function = "pango_layout_line_unref")] - [CCode (cheader_filename = "pango/pango.h")] - public struct LayoutLine { + [CCode (ref_function = "pango_layout_line_ref", unref_function = "pango_layout_line_unref", cheader_filename = "pango/pango.h")] + public class LayoutLine { public weak Pango.Layout layout; public int start_index; public int length; @@ -673,15 +633,13 @@ namespace Pango { public void index_to_x (int index_, bool trailing, int x_pos); public bool x_to_index (int x_pos, int index_, int trailing); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct LayoutRun { + public class LayoutRun { public weak Pango.Item item; public weak Pango.GlyphString glyphs; } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct LogAttr { + public class LogAttr { public uint is_line_break; public uint is_mandatory_break; public uint is_char_break; @@ -696,52 +654,13 @@ namespace Pango { public uint is_expandable_space; } [CCode (cheader_filename = "pango/pango.h")] - public struct Matrix { - public double xx; - public double xy; - public double yx; - public double yy; - public double x0; - public double y0; - [InstanceByReference] - public void concat (out Pango.Matrix new_matrix); - [InstanceByReference] - public Pango.Matrix copy (); - [InstanceByReference] - public double get_font_scale_factor (); - public static GLib.Type get_type (); - [InstanceByReference] - public void rotate (double degrees); - [InstanceByReference] - public void scale (double scale_x, double scale_y); - [InstanceByReference] - public void transform_distance (double dx, double dy); - [InstanceByReference] - public void transform_pixel_rectangle (out Pango.Rectangle rect); - [InstanceByReference] - public void transform_point (double x, double y); - [InstanceByReference] - public void transform_rectangle (out Pango.Rectangle rect); - [InstanceByReference] - public void translate (double tx, double ty); - } - [CCode (cheader_filename = "pango/pango.h")] - public struct Rectangle { - public int x; - public int y; - public int width; - public int height; - } - [ReferenceType] - [CCode (cheader_filename = "pango/pango.h")] - public struct ScriptIter { + public class ScriptIter { public void get_range (out string start, out string end, Pango.Script script); public ScriptIter (string text, int length); public bool next (); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct TabArray { + public class TabArray { public weak Pango.TabArray copy (); public bool get_positions_in_pixels (); public int get_size (); @@ -753,17 +672,15 @@ namespace Pango { public void resize (int new_size); public void set_tab (int tab_index, Pango.TabAlign alignment, int location); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct Win32FontCache { + public class Win32FontCache { public pointer load (pointer logfont); public pointer loadw (pointer logfont); public Win32FontCache (); public void unload (pointer hfont); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct Attr { + public class Attr { public static weak Pango.Attribute background_new (ushort red, ushort green, ushort blue); public static weak Pango.Attribute fallback_new (bool enable_fallback); public static weak Pango.Attribute family_new (string family); @@ -783,9 +700,8 @@ namespace Pango { public static weak Pango.Attribute variant_new (Pango.Variant variant); public static weak Pango.Attribute weight_new (Pango.Weight weight); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct Cairo { + public class Cairo { public static weak Cairo.FontOptions context_get_font_options (Pango.Context context); public static double context_get_resolution (Pango.Context context); public static Pango.CairoShapeRendererFunc context_get_shape_renderer (Pango.Context context, pointer data); @@ -804,18 +720,70 @@ namespace Pango { public static void update_context (Cairo.Context cr, Pango.Context context); public static void update_layout (Cairo.Context cr, Pango.Layout layout); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct Units { + public class Units { public static int from_double (double d); public static double to_double (int i); } - [ReferenceType] [CCode (cheader_filename = "pango/pango.h")] - public struct Version { + public class Version { public static weak string check (int required_major, int required_minor, int required_micro); public static weak string string (); } + [CCode (cheader_filename = "pango/pango.h")] + public struct Color { + public ushort red; + public ushort green; + 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 (); + } + [CCode (cheader_filename = "pango/pango.h")] + public struct Matrix { + public double xx; + public double xy; + public double yx; + public double yy; + public double x0; + public double y0; + [InstanceByReference] + public void concat (out Pango.Matrix new_matrix); + [InstanceByReference] + public Pango.Matrix copy (); + [InstanceByReference] + public void free (); + [InstanceByReference] + public double get_font_scale_factor (); + public static GLib.Type get_type (); + [InstanceByReference] + public void rotate (double degrees); + [InstanceByReference] + public void scale (double scale_x, double scale_y); + [InstanceByReference] + public void transform_distance (double dx, double dy); + [InstanceByReference] + public void transform_pixel_rectangle (out Pango.Rectangle rect); + [InstanceByReference] + public void transform_point (double x, double y); + [InstanceByReference] + public void transform_rectangle (out Pango.Rectangle rect); + [InstanceByReference] + public void translate (double tx, double ty); + } + [CCode (cheader_filename = "pango/pango.h")] + public struct Rectangle { + public int x; + public int y; + public int width; + public int height; + } public static delegate pointer AttrDataCopyFunc (pointer data); public static delegate bool AttrFilterFunc (Pango.Attribute attribute, pointer data); public static delegate void CairoShapeRendererFunc (Cairo.Context cr, Pango.AttrShape attr, bool do_path, pointer data); diff --git a/vapi/poppler-glib.vala b/vapi/poppler-glib.vala index e7b93d60b..802b13657 100644 --- a/vapi/poppler-glib.vala +++ b/vapi/poppler-glib.vala @@ -251,58 +251,50 @@ namespace Poppler { public void set_duplex (bool duplex); public void set_paper_size (double width, double height); } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct ActionAny { + public class ActionAny { public Poppler.ActionType type; public weak string title; } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct ActionGotoDest { + public class ActionGotoDest { public Poppler.ActionType type; public weak string title; public weak Poppler.Dest dest; } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct ActionGotoRemote { + public class ActionGotoRemote { public Poppler.ActionType type; public weak string title; public weak string file_name; public weak Poppler.Dest dest; } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct ActionLaunch { + public class ActionLaunch { public Poppler.ActionType type; public weak string title; public weak string file_name; public weak string params; } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct ActionMovie { + public class ActionMovie { public Poppler.ActionType type; public weak string title; } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct ActionNamed { + public class ActionNamed { public Poppler.ActionType type; public weak string title; public weak string named_dest; } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct ActionUri { + public class ActionUri { public Poppler.ActionType type; public weak string title; public weak string uri; } - [ReferenceType (free_function = "poppler_dest_free")] [CCode (cheader_filename = "poppler.h")] - public struct Dest { + public class Dest { public Poppler.DestType type; public int page_num; public double left; @@ -317,9 +309,8 @@ namespace Poppler { public weak Poppler.Dest copy (); public static GLib.Type get_type (); } - [ReferenceType (free_function = "poppler_fonts_iter_free")] [CCode (cheader_filename = "poppler.h")] - public struct FontsIter { + public class FontsIter { public weak Poppler.FontsIter copy (); public weak string get_file_name (); public Poppler.FontType get_font_type (); @@ -330,27 +321,24 @@ namespace Poppler { public bool is_subset (); public bool next (); } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct FormFieldMapping { + public class FormFieldMapping { public weak Poppler.Rectangle area; public weak Poppler.FormField field; public weak Poppler.FormFieldMapping copy (); public static GLib.Type get_type (); public FormFieldMapping (); } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct ImageMapping { + public class ImageMapping { public weak Poppler.Rectangle area; public weak Gdk.Pixbuf image; public weak Poppler.ImageMapping copy (); public static GLib.Type get_type (); public ImageMapping (); } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct IndexIter { + public class IndexIter { public weak Poppler.IndexIter copy (); public weak Poppler.Action get_action (); public weak Poppler.IndexIter get_child (); @@ -359,18 +347,16 @@ namespace Poppler { public IndexIter (Poppler.Document document); public bool next (); } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct LinkMapping { + public class LinkMapping { public weak Poppler.Rectangle area; public weak Poppler.Action action; public weak Poppler.LinkMapping copy (); public static GLib.Type get_type (); public LinkMapping (); } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct PageTransition { + public class PageTransition { public Poppler.PageTransitionType type; public Poppler.PageTransitionAlignment alignment; public Poppler.PageTransitionDirection direction; @@ -382,9 +368,8 @@ namespace Poppler { public static GLib.Type get_type (); public PageTransition (); } - [ReferenceType] [CCode (cheader_filename = "poppler.h")] - public struct Rectangle { + public class Rectangle { public double x1; public double y1; public double x2; diff --git a/vapi/sqlite3.vala b/vapi/sqlite3.vala index edb327b7a..9bd1c780c 100644 --- a/vapi/sqlite3.vala +++ b/vapi/sqlite3.vala @@ -22,9 +22,8 @@ [CCode (lower_case_cprefix = "sqlite3_", cheader_filename = "sqlite3.h")] namespace Sqlite { - [ReferenceType (free_function = "sqlite3_close")] - [CCode (cname = "sqlite3", cprefix = "sqlite3_")] - public struct Database { + [CCode (free_function = "sqlite3_close", cname = "sqlite3", cprefix = "sqlite3_")] + public class Database { public int exec (string! sql, Callback sqlite3_callback = null, pointer data = null, out string errmsg = null); public int64 last_insert_rowid (); public int changes (); @@ -41,9 +40,8 @@ namespace Sqlite { [CCode (cname = "sqlite3_callback")] public static delegate int Callback (pointer data, int n_columns, string[] values, string[] column_names); - [ReferenceType (free_function = "sqlite3_finalize")] - [CCode (cname = "sqlite3_stmt", cprefix = "sqlite3_")] - public struct Statement { + [CCode (free_function = "sqlite3_finalize", cname = "sqlite3_stmt", cprefix = "sqlite3_")] + public class Statement { [NoArrayLength] public int bind_blob (int index, uchar[] value, int n, GLib.DestroyNotify destroy_notify); public int bind_double (int index, double value); diff --git a/vapi/vte.vala b/vapi/vte.vala index 3cf5b052e..91094712d 100644 --- a/vapi/vte.vala +++ b/vapi/vte.vala @@ -153,9 +153,8 @@ namespace Vte { public static weak Gtk.Type get_type (); public TerminalAccessibleFactory (); } - [ReferenceType] [CCode (cheader_filename = "vte/vte.h")] - public struct CharAttributes { + public class CharAttributes { public long row; public long column; public Gdk.Color fore; diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 4b92c3536..0237f96f6 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -250,7 +250,20 @@ public class Vala.GIdlParser : CodeVisitor { return cb; } - + + private bool is_reference_type (string! cname) { + var st_attributes = get_attributes (cname); + if (st_attributes != null) { + foreach (string attr in st_attributes) { + var nv = attr.split ("=", 2); + if (nv[0] == "is_value_type" && eval (nv[1]) == "1") { + return false; + } + } + } + return true; + } + private void parse_struct (IdlNodeStruct! st_node, Namespace! ns, IdlModule! module) { weak IdlNode node = (IdlNode) st_node; @@ -260,71 +273,110 @@ public class Vala.GIdlParser : CodeVisitor { string name = fix_type_name (node.name, module); - var st = ns.scope.lookup (name) as Struct; - if (st == null) { - st = new Struct (name, current_source_reference); - st.access = MemberAccessibility.PUBLIC; - - st.set_is_reference_type (true); - - var st_attributes = get_attributes (node.name); - if (st_attributes != null) { - foreach (string attr in st_attributes) { - var nv = attr.split ("=", 2); - if (nv[0] == "cheader_filename") { - st.add_cheader_filename (eval (nv[1])); - } else if (nv[0] == "is_value_type" && eval (nv[1]) == "1") { - st.set_is_reference_type (false); - } else if (nv[0] == "hidden") { - if (eval (nv[1]) == "1") { - return; + if (!is_reference_type (node.name)) { + var st = ns.scope.lookup (name) as Struct; + if (st == null) { + st = new Struct (name, current_source_reference); + st.access = MemberAccessibility.PUBLIC; + + var st_attributes = get_attributes (node.name); + if (st_attributes != null) { + foreach (string attr in st_attributes) { + var nv = attr.split ("=", 2); + if (nv[0] == "cheader_filename") { + st.add_cheader_filename (eval (nv[1])); + } else if (nv[0] == "hidden") { + if (eval (nv[1]) == "1") { + return; + } } } } - } - ns.add_struct (st); - current_source_file.add_node (st); - } - - current_data_type = st; + ns.add_struct (st); + current_source_file.add_node (st); + } - string ref_function = null; - string unref_function = null; - string free_function = null; + current_data_type = st; - foreach (weak IdlNode member in st_node.members) { - if (member.type == IdlNodeTypeId.FUNCTION) { - 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 { + 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); } + } else if (member.type == IdlNodeTypeId.FIELD) { + var f = parse_field ((IdlNodeField) member); + if (f != null) { + st.add_field (f); + } } - } else if (member.type == IdlNodeTypeId.FIELD) { - var f = parse_field ((IdlNodeField) member); - if (f != null) { - st.add_field (f); + } + + current_data_type = null; + } else { + var cl = ns.scope.lookup (name) as Class; + if (cl == null) { + cl = new Class (name, current_source_reference); + cl.access = MemberAccessibility.PUBLIC; + + var cl_attributes = get_attributes (node.name); + if (cl_attributes != null) { + foreach (string attr in cl_attributes) { + var nv = attr.split ("=", 2); + if (nv[0] == "cheader_filename") { + cl.add_cheader_filename (eval (nv[1])); + } else if (nv[0] == "hidden") { + if (eval (nv[1]) == "1") { + return; + } + } + } } + + ns.add_class (cl); + current_source_file.add_node (cl); } - } - 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 = cl; + + 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) { + 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) { + cl.add_method (m); + } + } + } else if (member.type == IdlNodeTypeId.FIELD) { + var f = parse_field ((IdlNodeField) member); + if (f != null) { + cl.add_field (f); + } + } + } - current_data_type = null; + if (ref_function != null) { + cl.set_ref_function (ref_function); + } + if (unref_function != null) { + cl.set_unref_function (unref_function); + } else if (free_function != null) { + cl.set_free_function (free_function); + } + + current_data_type = null; + } } private void parse_boxed (IdlNodeBoxed! boxed_node, Namespace! ns, IdlModule! module) { @@ -332,68 +384,104 @@ public class Vala.GIdlParser : CodeVisitor { string name = fix_type_name (node.name, module); - var st = ns.scope.lookup (name) as Struct; - if (st == null) { - st = new Struct (name, current_source_reference); - st.access = MemberAccessibility.PUBLIC; - - st.set_is_reference_type (true); - - var st_attributes = get_attributes (node.name); - if (st_attributes != null) { - foreach (string attr in st_attributes) { - var nv = attr.split ("=", 2); - if (nv[0] == "cheader_filename") { - st.add_cheader_filename (eval (nv[1])); - } else if (nv[0] == "is_value_type" && eval (nv[1]) == "1") { - st.set_is_reference_type (false); + if (!is_reference_type (node.name)) { + var st = ns.scope.lookup (name) as Struct; + if (st == null) { + st = new Struct (name, current_source_reference); + st.access = MemberAccessibility.PUBLIC; + + var st_attributes = get_attributes (node.name); + if (st_attributes != null) { + foreach (string attr in st_attributes) { + var nv = attr.split ("=", 2); + if (nv[0] == "cheader_filename") { + st.add_cheader_filename (eval (nv[1])); + } } } - } - ns.add_struct (st); - st.set_type_id (st.get_upper_case_cname ("TYPE_")); - current_source_file.add_node (st); - } + ns.add_struct (st); + st.set_type_id (st.get_upper_case_cname ("TYPE_")); + current_source_file.add_node (st); + } - current_data_type = st; - - string ref_function = null; - string unref_function = null; - string free_function = null; + current_data_type = st; - foreach (weak IdlNode member in boxed_node.members) { - if (member.type == IdlNodeTypeId.FUNCTION) { - 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 { + 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); } + } else if (member.type == IdlNodeTypeId.FIELD) { + var f = parse_field ((IdlNodeField) member); + if (f != null) { + st.add_field (f); + } } - } else if (member.type == IdlNodeTypeId.FIELD) { - var f = parse_field ((IdlNodeField) member); - if (f != null) { - st.add_field (f); + } + + current_data_type = null; + } else { + var cl = ns.scope.lookup (name) as Class; + if (cl == null) { + cl = new Class (name, current_source_reference); + cl.access = MemberAccessibility.PUBLIC; + + var cl_attributes = get_attributes (node.name); + if (cl_attributes != null) { + foreach (string attr in cl_attributes) { + var nv = attr.split ("=", 2); + if (nv[0] == "cheader_filename") { + cl.add_cheader_filename (eval (nv[1])); + } + } + } + + ns.add_class (cl); + cl.set_type_id (cl.get_upper_case_cname ("TYPE_")); + current_source_file.add_node (cl); + } + + current_data_type = cl; + + 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) { + 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) { + cl.add_method (m); + } + } + } else if (member.type == IdlNodeTypeId.FIELD) { + var f = parse_field ((IdlNodeField) member); + if (f != null) { + cl.add_field (f); + } } } - } - 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); - } + if (ref_function != null) { + cl.set_ref_function (ref_function); + } + if (unref_function != null) { + cl.set_unref_function (unref_function); + } else if (free_function != null) { + cl.set_free_function (free_function); + } - current_data_type = null; + current_data_type = null; + } } private Enum parse_enum (IdlNodeEnum! en_node) { @@ -463,6 +551,11 @@ public class Vala.GIdlParser : CodeVisitor { var parent = new TypeReference (); parse_type_string (parent, node.parent); cl.add_base_type (parent); + } else { + var parent = new TypeReference (); + parent.namespace_name = "GLib"; + parent.type_name = "Object"; + cl.add_base_type (parent); } foreach (string iface_name in node.interfaces) {