Commit 5a5cb867 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

use exceptions instead of GError parameters for generated bindings, based

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

	* vala/valacreationmethod.vala, gobject/valacodegenerator.vala,
	  vapigen/valagidlparser.vala: use exceptions instead of GError
	  parameters for generated bindings, based on patch by Alberto Ruiz,
	  fixes bug 470432

	* vapi/clutter-0.3.vala, vapi/gdk-2.0.vala, vapi/gio-standalone.vala,
	  vapi/gnome-desktop-2.0.vala, vapi/gstreamer-0.10.vala,
	  vapi/gtk+-2.0.vala, vapi/hildon-1.vala, vapi/pango.vala: regenerated

svn path=/trunk/; revision=503
parent 8a4487f2
2007-08-27 Jürg Billeter <j@bitron.ch>
* vala/valacreationmethod.vala, gobject/valacodegenerator.vala,
vapigen/valagidlparser.vala: use exceptions instead of GError
parameters for generated bindings, based on patch by Alberto Ruiz,
fixes bug 470432
* vapi/clutter-0.3.vala, vapi/gdk-2.0.vala, vapi/gio-standalone.vala,
vapi/gnome-desktop-2.0.vala, vapi/gstreamer-0.10.vala,
vapi/gtk+-2.0.vala, vapi/hildon-1.vala, vapi/pango.vala: regenerated
2007-08-24 Jürg Billeter <j@bitron.ch>
* vapigen/valagidlparser.vala, vapi/gdk-2.0.vala,
......
......@@ -97,6 +97,7 @@ public class Vala.CodeGenerator : CodeVisitor {
TypeReference string_type;
TypeReference float_type;
TypeReference double_type;
DataType gerror_type;
DataType glist_type;
DataType gslist_type;
DataType gstring_type;
......@@ -246,6 +247,7 @@ public class Vala.CodeGenerator : CodeVisitor {
var glib_ns = root_symbol.scope.lookup ("GLib");
gerror_type = (DataType) glib_ns.scope.lookup ("Error");
glist_type = (DataType) glib_ns.scope.lookup ("List");
gslist_type = (DataType) glib_ns.scope.lookup ("SList");
gstring_type = (DataType) glib_ns.scope.lookup ("String");
......@@ -1160,12 +1162,19 @@ public class Vala.CodeGenerator : CodeVisitor {
var cerror_block = new CCodeBlock ();
foreach (CatchClause clause in current_try.get_catch_clauses ()) {
// go to catch clause if error domain matches
var ccond = new CCodeBinaryExpression (CCodeBinaryOperator.EQUALITY, new CCodeMemberAccess.pointer (new CCodeIdentifier ("inner_error"), "domain"), new CCodeIdentifier (clause.type_reference.data_type.get_upper_case_cname ()));
var cgoto_stmt = new CCodeGotoStatement ("__catch%d_%s".printf (current_try_id, clause.type_reference.data_type.get_lower_case_cname ()));
var cgoto_block = new CCodeBlock ();
cgoto_block.add_statement (new CCodeGotoStatement ("__catch%d_%s".printf (current_try_id, clause.type_reference.data_type.get_lower_case_cname ())));
if (clause.type_reference.data_type == gerror_type) {
// general catch clause
cerror_block.add_statement (cgoto_stmt);
} else {
var ccond = new CCodeBinaryExpression (CCodeBinaryOperator.EQUALITY, new CCodeMemberAccess.pointer (new CCodeIdentifier ("inner_error"), "domain"), new CCodeIdentifier (clause.type_reference.data_type.get_upper_case_cname ()));
var cgoto_block = new CCodeBlock ();
cgoto_block.add_statement (cgoto_stmt);
cerror_block.add_statement (new CCodeIfStatement (ccond, cgoto_block));
cerror_block.add_statement (new CCodeIfStatement (ccond, cgoto_block));
}
}
// print critical message if no catch clause matches
cerror_block.add_statement (cprint_frag);
......
/* valacreationmethod.vala
*
* Copyright (C) 2007 Raffaele Sandrini
* Copyright (C) 2007 Raffaele Sandrini, Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -17,7 +17,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Raffaele Sandrini <j@bitron.ch>
* Raffaele Sandrini <rasa@gmx.ch>
* Jürg Billeter <j@bitron.ch>
*/
using GLib;
......@@ -49,7 +50,11 @@ public class Vala.CreationMethod : Method {
foreach (FormalParameter param in get_parameters()) {
param.accept (visitor);
}
foreach (TypeReference error_domain in get_error_domains ()) {
error_domain.accept (visitor);
}
if (body != null) {
body.accept (visitor);
}
......
......@@ -598,10 +598,10 @@ namespace Clutter {
public Texture ();
public Texture.from_pixbuf (Gdk.Pixbuf pixbuf);
[NoArrayLength]
public bool set_from_rgb_data (uchar[] data, bool has_alpha, int width, int height, int rowstride, int bpp, Clutter.TextureFlags flags, GLib.Error error);
public bool set_from_rgb_data (uchar[] data, bool has_alpha, int width, int height, int rowstride, int bpp, Clutter.TextureFlags flags) throws GLib.Error;
[NoArrayLength]
public bool set_from_yuv_data (uchar[] data, int width, int height, Clutter.TextureFlags flags, GLib.Error error);
public bool set_pixbuf (Gdk.Pixbuf pixbuf, GLib.Error error);
public bool set_from_yuv_data (uchar[] data, int width, int height, Clutter.TextureFlags flags) throws GLib.Error;
public bool set_pixbuf (Gdk.Pixbuf pixbuf) throws GLib.Error;
public weak Gdk.Pixbuf pixbuf { get; set; }
[NoAccessorMethod]
public weak bool tiled { get; construct; }
......@@ -749,8 +749,6 @@ namespace Clutter {
[InstanceByReference]
public bool equal (out Clutter.Color b);
[InstanceByReference]
public void free ();
[InstanceByReference]
public void from_hls (uchar hue, uchar luminance, uchar saturation);
[InstanceByReference]
public void from_hlsx (int32 hue, int32 luminance, int32 saturation);
......@@ -800,14 +798,13 @@ namespace Clutter {
public uint symbol ();
public uint unicode ();
}
[ReferenceType]
[ReferenceType (free_function = "clutter_knot_free")]
[CCode (cheader_filename = "clutter/clutter.h")]
public struct Knot {
public int x;
public int y;
public weak Clutter.Knot copy ();
public bool equal (Clutter.Knot knot_b);
public void free ();
public static GLib.Type get_type ();
}
[ReferenceType]
......@@ -821,7 +818,7 @@ namespace Clutter {
public double axes;
public weak Clutter.InputDevice device;
}
[ReferenceType]
[ReferenceType (free_function = "clutter_perspective_free")]
[CCode (cheader_filename = "clutter/clutter.h")]
public struct Perspective {
public int32 fovy;
......@@ -829,7 +826,6 @@ namespace Clutter {
public int32 z_near;
public int32 z_far;
public weak Clutter.Perspective copy ();
public void free ();
public static GLib.Type get_type ();
}
[ReferenceType]
......@@ -881,7 +877,6 @@ namespace Clutter {
[CCode (cheader_filename = "clutter/clutter.h")]
public struct Event {
public weak Clutter.Event copy ();
public void free ();
public static weak Clutter.Event get ();
public void get_coords (int x, int y);
public Clutter.ModifierType get_state ();
......@@ -908,7 +903,7 @@ namespace Clutter {
[CCode (cheader_filename = "clutter/clutter.h")]
public struct Init {
public static GLib.Quark error_quark ();
public static Clutter.InitError with_args (int argc, string argv, string parameter_string, GLib.OptionEntry entries, string translation_domain, GLib.Error error);
public static Clutter.InitError with_args (int argc, out string argv, string parameter_string, out GLib.OptionEntry entries, string translation_domain) throws GLib.Error;
}
[ReferenceType]
[CCode (cheader_filename = "clutter/clutter.h")]
......
......@@ -834,7 +834,7 @@ namespace Gdk {
public static GLib.Quark error_quark ();
public void fill (uint pixel);
public weak Gdk.Pixbuf flip (bool horizontal);
public static weak Gdk.Pixbuf from_pixdata (Gdk.Pixdata pixdata, bool copy_pixels, GLib.Error error);
public static weak Gdk.Pixbuf from_pixdata (Gdk.Pixdata pixdata, bool copy_pixels) throws GLib.Error;
public int get_bits_per_sample ();
public Gdk.Colorspace get_colorspace ();
public static weak Gdk.PixbufFormat get_file_info (string filename, int width, int height);
......@@ -853,11 +853,11 @@ namespace Gdk {
public Pixbuf (Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height);
[NoArrayLength]
public Pixbuf.from_data (uchar[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify destroy_fn, pointer destroy_fn_data);
public Pixbuf.from_file (string filename, GLib.Error error);
public Pixbuf.from_file_at_scale (string filename, int width, int height, bool preserve_aspect_ratio, GLib.Error error);
public Pixbuf.from_file_at_size (string filename, int width, int height, GLib.Error error);
public Pixbuf.from_file (string filename) throws GLib.Error;
public Pixbuf.from_file_at_scale (string filename, int width, int height, bool preserve_aspect_ratio) throws GLib.Error;
public Pixbuf.from_file_at_size (string filename, int width, int height) throws GLib.Error;
[NoArrayLength]
public Pixbuf.from_inline (int data_length, uchar[] data, bool copy_pixels, GLib.Error error);
public Pixbuf.from_inline (int data_length, uchar[] data, bool copy_pixels) throws GLib.Error;
[NoArrayLength]
public Pixbuf.from_xpm_data (string[] data);
public Pixbuf.subpixbuf (int src_x, int src_y, int width, int height);
......@@ -866,14 +866,14 @@ namespace Gdk {
public void render_threshold_alpha (Gdk.Bitmap bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold);
public weak Gdk.Pixbuf rotate_simple (Gdk.PixbufRotation angle);
public void saturate_and_pixelate (Gdk.Pixbuf dest, float saturation, bool pixelate);
public bool save (string filename, string type, GLib.Error error);
public bool save_to_buffer (string buffer, ulong buffer_size, string type, GLib.Error error);
public bool save (string filename, string type) throws GLib.Error;
public bool save_to_buffer (string buffer, ulong buffer_size, string type) throws GLib.Error;
[NoArrayLength]
public bool save_to_bufferv (string buffer, ulong buffer_size, string type, string[] option_keys, string[] option_values, GLib.Error error);
public bool save_to_callback (Gdk.PixbufSaveFunc save_func, pointer user_data, string type, GLib.Error error);
public bool save_to_bufferv (string buffer, ulong buffer_size, string type, string[] option_keys, string[] option_values) throws GLib.Error;
public bool save_to_callback (Gdk.PixbufSaveFunc save_func, pointer user_data, string type) throws GLib.Error;
[NoArrayLength]
public bool save_to_callbackv (Gdk.PixbufSaveFunc save_func, pointer user_data, string type, string[] option_keys, string[] option_values, GLib.Error error);
public bool savev (string filename, string type, out string option_keys, out string option_values, GLib.Error error);
public bool save_to_callbackv (Gdk.PixbufSaveFunc save_func, pointer user_data, string type, string[] option_keys, string[] option_values) throws GLib.Error;
public bool savev (string filename, string type, out string option_keys, out string option_values) throws GLib.Error;
public void scale (Gdk.Pixbuf dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, Gdk.InterpType interp_type);
public weak Gdk.Pixbuf scale_simple (int dest_width, int dest_height, Gdk.InterpType interp_type);
[NoAccessorMethod]
......@@ -901,7 +901,7 @@ namespace Gdk {
public static GLib.Type get_type ();
public int get_width ();
public bool is_static_image ();
public PixbufAnimation.from_file (string filename, GLib.Error error);
public PixbufAnimation.from_file (string filename) throws GLib.Error;
}
[CCode (cheader_filename = "gdk/gdk.h")]
public class PixbufAnimationIter : GLib.Object {
......@@ -930,17 +930,17 @@ namespace Gdk {
}
[CCode (cheader_filename = "gdk/gdk.h")]
public class PixbufLoader : GLib.Object {
public bool close (GLib.Error error);
public bool close () throws GLib.Error;
public weak Gdk.PixbufAnimation get_animation ();
public weak Gdk.PixbufFormat get_format ();
public weak Gdk.Pixbuf get_pixbuf ();
public static GLib.Type get_type ();
public PixbufLoader ();
public PixbufLoader.with_mime_type (string mime_type, GLib.Error error);
public PixbufLoader.with_type (string image_type, GLib.Error error);
public PixbufLoader.with_mime_type (string mime_type) throws GLib.Error;
public PixbufLoader.with_type (string image_type) throws GLib.Error;
public void set_size (int width, int height);
[NoArrayLength]
public bool write (uchar[] buf, ulong count, GLib.Error error);
public bool write (uchar[] buf, ulong count) throws GLib.Error;
public signal void size_prepared (int width, int height);
public signal void area_prepared ();
public signal void area_updated (int x, int y, int width, int height);
......@@ -1552,7 +1552,7 @@ namespace Gdk {
public uint height;
public uchar pixel_data;
[NoArrayLength]
public bool deserialize (uint stream_length, uchar[] stream, GLib.Error error);
public bool deserialize (uint stream_length, uchar[] stream) throws GLib.Error;
public pointer from_pixbuf (Gdk.Pixbuf pixbuf, bool use_rle);
public uchar serialize (uint stream_length_p);
public weak GLib.String to_csource (string name, Gdk.PixdataDumpType dump_type);
......@@ -1891,9 +1891,9 @@ namespace Gdk {
[ReferenceType]
[CCode (cheader_filename = "gdk/gdk.h")]
public struct Spawn {
public static bool command_line_on_screen (Gdk.Screen screen, string command_line, GLib.Error 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, GLib.Error 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, GLib.Error error);
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")]
......
This diff is collapsed.
......@@ -61,9 +61,9 @@ namespace Gnome {
public void clear_localestring (string attr);
public void clear_section (string section);
public weak Gnome.DesktopItem copy ();
public int drop_uri_list (string uri_list, Gnome.DesktopItemLaunchFlags flags, GLib.Error error);
public int drop_uri_list (string uri_list, Gnome.DesktopItemLaunchFlags flags) throws GLib.Error;
[NoArrayLength]
public int drop_uri_list_with_env (string uri_list, Gnome.DesktopItemLaunchFlags flags, string[] envp, GLib.Error error);
public int drop_uri_list_with_env (string uri_list, Gnome.DesktopItemLaunchFlags flags, string[] envp) throws GLib.Error;
public static GLib.Quark error_quark ();
public bool exists ();
public static weak string find_icon (Gtk.IconTheme icon_theme, string icon, int desired_size, int flags);
......@@ -79,16 +79,16 @@ namespace Gnome {
public weak string get_string (string attr);
public weak string get_strings (string attr);
public static GLib.Type get_type ();
public int launch (GLib.List file_list, Gnome.DesktopItemLaunchFlags flags, GLib.Error error);
public int launch_on_screen (GLib.List file_list, Gnome.DesktopItemLaunchFlags flags, Gdk.Screen screen, int workspace, GLib.Error error);
public int launch (GLib.List file_list, Gnome.DesktopItemLaunchFlags flags) throws GLib.Error;
public int launch_on_screen (GLib.List file_list, Gnome.DesktopItemLaunchFlags flags, Gdk.Screen screen, int workspace) throws GLib.Error;
[NoArrayLength]
public int launch_with_env (GLib.List file_list, Gnome.DesktopItemLaunchFlags flags, string[] envp, GLib.Error error);
public int launch_with_env (GLib.List file_list, Gnome.DesktopItemLaunchFlags flags, string[] envp) throws GLib.Error;
public DesktopItem ();
public DesktopItem.from_basename (string basename, Gnome.DesktopItemLoadFlags flags, GLib.Error error);
public DesktopItem.from_file (string file, Gnome.DesktopItemLoadFlags flags, GLib.Error error);
public DesktopItem.from_string (string uri, string string, long length, Gnome.DesktopItemLoadFlags flags, GLib.Error error);
public DesktopItem.from_uri (string uri, Gnome.DesktopItemLoadFlags flags, GLib.Error error);
public bool save (string under, bool force, GLib.Error error);
public DesktopItem.from_basename (string basename, Gnome.DesktopItemLoadFlags flags) throws GLib.Error;
public DesktopItem.from_file (string file, Gnome.DesktopItemLoadFlags flags) throws GLib.Error;
public DesktopItem.from_string (string uri, string string, long length, Gnome.DesktopItemLoadFlags flags) throws GLib.Error;
public DesktopItem.from_uri (string uri, Gnome.DesktopItemLoadFlags flags) throws GLib.Error;
public bool save (string under, bool force) throws GLib.Error;
public void set_boolean (string attr, bool value);
public void set_entry_type (Gnome.DesktopItemType type);
public void set_launch_time (uint timestamp);
......
......@@ -789,8 +789,8 @@ namespace Gst {
public Message.duration (Gst.Object src, Gst.Format format, int64 duration);
public Message.element (Gst.Object src, Gst.Structure structure);
public Message.eos (Gst.Object src);
public Message.error (Gst.Object src, GLib.Error error, string debug);
public Message.info (Gst.Object src, GLib.Error error, string debug);
public Message.error (Gst.Object src, string debug) throws GLib.Error;
public Message.info (Gst.Object src, string debug) throws GLib.Error;
public Message.latency (Gst.Object src);
public Message.new_clock (Gst.Object src, Gst.Clock clock);
public Message.segment_done (Gst.Object src, Gst.Format format, int64 position);
......@@ -798,20 +798,20 @@ namespace Gst {
public Message.state_changed (Gst.Object src, Gst.State oldstate, Gst.State newstate, Gst.State pending);
public Message.state_dirty (Gst.Object src);
public Message.tag (Gst.Object src, Gst.TagList tag_list);
public Message.warning (Gst.Object src, GLib.Error error, string debug);
public Message.warning (Gst.Object src, string debug) throws GLib.Error;
public void parse_async_start (bool new_base_time);
public void parse_buffering (int percent);
public void parse_clock_lost (Gst.Clock clock);
public void parse_clock_provide (Gst.Clock clock, bool ready);
public void parse_duration (Gst.Format format, int64 duration);
public void parse_error (GLib.Error gerror, string debug);
public void parse_info (GLib.Error gerror, string debug);
public void parse_error (string debug) throws GLib.Error;
public void parse_info (string debug) throws GLib.Error;
public void parse_new_clock (Gst.Clock clock);
public void parse_segment_done (Gst.Format format, int64 position);
public void parse_segment_start (Gst.Format format, int64 position);
public void parse_state_changed (Gst.State oldstate, Gst.State newstate, Gst.State pending);
public void parse_tag (Gst.TagList tag_list);
public void parse_warning (GLib.Error gerror, string debug);
public void parse_warning (string debug) throws GLib.Error;
public static weak string type_get_name (Gst.MessageType type);
public static GLib.Quark type_to_quark (Gst.MessageType type);
}
......@@ -837,7 +837,7 @@ namespace Gst {
public uint flags;
public static bool check_uniqueness (GLib.List list, string name);
public static void default_deep_notify (GLib.Object object, Gst.Object orig, GLib.ParamSpec pspec, string excluded_props);
public void default_error (GLib.Error error, string debug);
public void default_error (string debug) throws GLib.Error;
public weak string get_name ();
public weak string get_name_prefix ();
public weak Gst.Object get_parent ();
......@@ -1035,7 +1035,7 @@ namespace Gst {
public static void list_free (GLib.List list);
public weak Gst.Plugin load ();
public static weak Gst.Plugin load_by_name (string name);
public static weak Gst.Plugin load_file (string filename, GLib.Error error);
public static weak Gst.Plugin load_file (string filename) throws GLib.Error;
public bool name_filter (string name);
}
[CCode (cheader_filename = "gst/gst.h")]
......@@ -1607,7 +1607,7 @@ namespace Gst {
[ReferenceType]
[CCode (cheader_filename = "gst/gst.h")]
public struct Init {
public static bool check (int argc, string argv, GLib.Error err);
public static bool check (int argc, string argv) throws GLib.Error;
public static weak GLib.OptionGroup get_option_group ();
}
[ReferenceType]
......@@ -1787,11 +1787,11 @@ namespace Gst {
public static GLib.Type int_range_get_type ();
public static bool is_tag_list (pointer p);
public static GLib.Quark library_error_quark ();
public static weak Gst.Element parse_bin_from_description (string bin_description, bool ghost_unconnected_pads, GLib.Error err);
public static weak Gst.Element parse_bin_from_description (string bin_description, bool ghost_unconnected_pads) throws GLib.Error;
public static GLib.Quark parse_error_quark ();
public static weak Gst.Element parse_launch (string pipeline_description, GLib.Error error);
public static weak Gst.Element parse_launch (string pipeline_description) throws GLib.Error;
[NoArrayLength]
public static weak Gst.Element parse_launchv (string[] argv, GLib.Error error);
public static weak Gst.Element parse_launchv (string[] argv) throws GLib.Error;
public static GLib.Quark resource_error_quark ();
public static GLib.Quark stream_error_quark ();
public static bool update_registry ();
......
......@@ -1220,8 +1220,8 @@ namespace Gtk {
}
[CCode (cheader_filename = "gtk/gtk.h")]
public class Builder : GLib.Object {
public uint add_from_file (string filename, GLib.Error error);
public uint add_from_string (string buffer, ulong length, GLib.Error error);
public uint add_from_file (string filename) throws GLib.Error;
public uint add_from_string (string buffer, ulong length) throws GLib.Error;
public void connect_signals (pointer user_data);
public void connect_signals_full (Gtk.BuilderConnectFunc func, pointer user_data);
public static GLib.Quark error_quark ();
......@@ -1232,8 +1232,8 @@ namespace Gtk {
public virtual GLib.Type get_type_from_name (string type_name);
public Builder ();
public void set_translation_domain (string domain);
public bool value_from_string (GLib.ParamSpec pspec, string string, GLib.Value value, GLib.Error error);
public bool value_from_string_type (GLib.Type type, string string, GLib.Value value, GLib.Error error);
public bool value_from_string (GLib.ParamSpec pspec, string string, GLib.Value value) throws GLib.Error;
public bool value_from_string_type (GLib.Type type, string string, GLib.Value value) throws GLib.Error;
public weak string translation_domain { get; set; }
}
[CCode (cheader_filename = "gtk/gtk.h")]
......@@ -2219,7 +2219,7 @@ namespace Gtk {
public bool has_icon (string icon_name);
public weak GLib.List list_contexts ();
public weak GLib.List list_icons (string context);
public weak Gdk.Pixbuf load_icon (string icon_name, int size, Gtk.IconLookupFlags flags, GLib.Error error);
public weak Gdk.Pixbuf load_icon (string icon_name, int size, Gtk.IconLookupFlags flags) throws GLib.Error;
public weak Gtk.IconInfo lookup_icon (string icon_name, int size, Gtk.IconLookupFlags flags);
public IconTheme ();
public void prepend_search_path (string path);
......@@ -2811,8 +2811,8 @@ namespace Gtk {
public double get_top_margin (Gtk.Unit unit);
public static GLib.Type get_type ();
public PageSetup ();
public PageSetup.from_file (string file_name, GLib.Error error);
public PageSetup.from_key_file (GLib.KeyFile key_file, string group_name, GLib.Error error);
public PageSetup.from_file (string file_name) throws GLib.Error;
public PageSetup.from_key_file (GLib.KeyFile key_file, string group_name) throws GLib.Error;
public void set_bottom_margin (double margin, Gtk.Unit unit);
public void set_left_margin (double margin, Gtk.Unit unit);
public void set_orientation (Gtk.PageOrientation orientation);
......@@ -2820,7 +2820,7 @@ namespace Gtk {
public void set_paper_size_and_default_margins (Gtk.PaperSize size);
public void set_right_margin (double margin, Gtk.Unit unit);
public void set_top_margin (double margin, Gtk.Unit unit);
public bool to_file (string file_name, GLib.Error error);
public bool to_file (string file_name) throws GLib.Error;
public void to_key_file (GLib.KeyFile key_file, string group_name);
}
[CCode (cheader_filename = "gtk/gtk.h")]
......@@ -2989,13 +2989,13 @@ namespace Gtk {
public weak Gtk.Printer get_printer ();
public weak Gtk.PrintSettings get_settings ();
public Gtk.PrintStatus get_status ();
public weak Cairo.Surface get_surface (GLib.Error error);
public weak Cairo.Surface get_surface () throws GLib.Error;
public weak string get_title ();
public bool get_track_print_status ();
public static GLib.Type get_type ();
public PrintJob (string title, Gtk.Printer printer, Gtk.PrintSettings settings, Gtk.PageSetup page_setup);
public void send (Gtk.PrintJobCompleteFunc callback, pointer user_data, GLib.DestroyNotify dnotify);
public bool set_source_file (string filename, GLib.Error error);
public bool set_source_file (string filename) throws GLib.Error;
public void set_track_print_status (bool track_status);
[NoAccessorMethod]
public weak string title { get; construct; }
......@@ -3012,14 +3012,14 @@ namespace Gtk {
public class PrintOperation : GLib.Object, Gtk.PrintOperationPreview {
public void cancel ();
public weak Gtk.PageSetup get_default_page_setup ();
public void get_error (GLib.Error error);
public void get_error () throws GLib.Error;
public weak Gtk.PrintSettings get_print_settings ();
public Gtk.PrintStatus get_status ();
public weak string get_status_string ();
public static GLib.Type get_type ();
public bool is_finished ();
public PrintOperation ();
public Gtk.PrintOperationResult run (Gtk.PrintOperationAction action, Gtk.Window parent, GLib.Error error);
public Gtk.PrintOperationResult run (Gtk.PrintOperationAction action, Gtk.Window parent) throws GLib.Error;
public void set_allow_async (bool allow_async);
public void set_current_page (int current_page);
public void set_custom_tab_label (string label);
......@@ -3103,8 +3103,8 @@ namespace Gtk {
public bool get_use_color ();
public bool has_key (string key);
public PrintSettings ();
public PrintSettings.from_file (string file_name, GLib.Error error);
public PrintSettings.from_key_file (GLib.KeyFile key_file, string group_name, GLib.Error error);
public PrintSettings.from_file (string file_name) throws GLib.Error;
public PrintSettings.from_key_file (GLib.KeyFile key_file, string group_name) throws GLib.Error;
public void set (string key, string value);
public void set_bool (string key, bool value);
public void set_collate (bool collate);
......@@ -3132,7 +3132,7 @@ namespace Gtk {
public void set_reverse (bool reverse);
public void set_scale (double scale);
public void set_use_color (bool use_color);
public bool to_file (string file_name, GLib.Error error);
public bool to_file (string file_name) throws GLib.Error;
public void to_key_file (GLib.KeyFile key_file, string group_name);
public void unset (string key);
}
......@@ -3364,11 +3364,11 @@ namespace Gtk {
public int get_limit ();
public static GLib.Type get_type ();
public bool has_item (string uri);
public weak Gtk.RecentInfo lookup_item (string uri, GLib.Error error);
public bool move_item (string uri, string new_uri, GLib.Error error);
public weak Gtk.RecentInfo lookup_item (string uri) throws GLib.Error;
public bool move_item (string uri, string new_uri) throws GLib.Error;
public RecentManager ();
public int purge_items (GLib.Error error);
public bool remove_item (string uri, GLib.Error error);
public int purge_items () throws GLib.Error;
public bool remove_item (string uri) throws GLib.Error;
public void set_limit (int limit);
[NoAccessorMethod]
public weak string filename { get; construct; }
......@@ -3731,7 +3731,7 @@ namespace Gtk {
public void delete_mark_by_name (string name);
public bool delete_selection (bool interactive, bool default_editable);
[NoArrayLength]
public bool deserialize (Gtk.TextBuffer content_buffer, Gdk.Atom format, out Gtk.TextIter iter, uchar[] data, ulong length, GLib.Error error);
public bool deserialize (Gtk.TextBuffer content_buffer, Gdk.Atom format, out Gtk.TextIter iter, uchar[] data, ulong length) throws GLib.Error;
public bool deserialize_get_can_create_tags (Gdk.Atom format);
public void deserialize_set_can_create_tags (Gdk.Atom format, bool can_create_tags);
public void get_bounds (out Gtk.TextIter start, out Gtk.TextIter end);
......@@ -4484,8 +4484,8 @@ namespace Gtk {
[CCode (cheader_filename = "gtk/gtk.h")]
public class UIManager : GLib.Object, Gtk.Buildable {
public void add_ui (uint merge_id, string path, string name, string action, Gtk.UIManagerItemType type, bool top);
public uint add_ui_from_file (string filename, GLib.Error error);
public uint add_ui_from_string (string buffer, long length, GLib.Error error);
public uint add_ui_from_file (string filename) throws GLib.Error;
public uint add_ui_from_string (string buffer, long length) throws GLib.Error;
public void ensure_update ();
public weak Gtk.AccelGroup get_accel_group ();
public virtual weak Gtk.Action get_action (string path);
......@@ -4871,7 +4871,7 @@ namespace Gtk {
public void set_decorated (bool setting);
public void set_default (Gtk.Widget default_widget);
public static void set_default_icon (Gdk.Pixbuf icon);
public static bool set_default_icon_from_file (string filename, GLib.Error err);
public static bool set_default_icon_from_file (string filename) throws GLib.Error;
public static void set_default_icon_list (GLib.List list);
public static void set_default_icon_name (string name);
public void set_default_size (int width, int height);
......@@ -4883,7 +4883,7 @@ namespace Gtk {
public void set_gravity (Gdk.Gravity gravity);
public void set_has_frame (bool setting);
public void set_icon (Gdk.Pixbuf icon);
public bool set_icon_from_file (string filename, GLib.Error err);
public bool set_icon_from_file (string filename) throws GLib.Error;
public void set_icon_list (GLib.List list);
public void set_icon_name (string name);
public void set_keep_above (bool setting);
......@@ -5015,8 +5015,8 @@ namespace Gtk {
[CCode (cheader_filename = "gtk/gtk.h")]
public interface FileChooser {
public void add_filter (Gtk.FileFilter filter);
public bool add_shortcut_folder (string folder, GLib.Error error);
public bool add_shortcut_folder_uri (string uri, GLib.Error error);
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 ();
......@@ -5041,8 +5041,8 @@ namespace Gtk {
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, GLib.Error error);
public bool remove_shortcut_folder_uri (string uri, GLib.Error error);
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);
......@@ -5096,8 +5096,8 @@ namespace Gtk {
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, GLib.Error error);
public abstract bool set_current_uri (string uri, GLib.Error error);
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);
......@@ -5315,7 +5315,7 @@ namespace Gtk {
public bool get_embedded_rect (out Gdk.Rectangle rectangle);
public weak string get_filename ();
public static GLib.Type get_type ();
public weak Gdk.Pixbuf load_icon (GLib.Error error);
public 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")]
......@@ -5446,7 +5446,7 @@ namespace Gtk {
public bool is_equal (Gtk.PaperSize size2);
public PaperSize (string name);