From: Rico Tzschichholz Date: Fri, 6 Sep 2013 07:21:55 +0000 (+0200) Subject: gtk+-2.0, gtk+-3.0: Fixes for Icon* related bindings and some deprecations X-Git-Tag: 0.21.2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49b81b97cc97d6938aaff59ff413773c17ae97b7;p=thirdparty%2Fvala.git gtk+-2.0, gtk+-3.0: Fixes for Icon* related bindings and some deprecations --- diff --git a/vapi/gtk+-2.0.vapi b/vapi/gtk+-2.0.vapi index bd6eba3d9..350d63f0f 100644 --- a/vapi/gtk+-2.0.vapi +++ b/vapi/gtk+-2.0.vapi @@ -2106,8 +2106,8 @@ namespace Gtk { public Gtk.IconSet copy (); [CCode (has_construct_function = false)] public IconSet.from_pixbuf (Gdk.Pixbuf pixbuf); - public void get_sizes (Gtk.IconSize[] sizes); - public unowned Gdk.Pixbuf render_icon (Gtk.Style style, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail); + public void get_sizes (out Gtk.IconSize[] sizes); + public Gdk.Pixbuf render_icon (Gtk.Style style, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail); } [CCode (cheader_filename = "gtk/gtk.h", copy_function = "gtk_icon_source_copy", type_id = "gtk_icon_source_get_type ()")] [Compact] @@ -2145,7 +2145,8 @@ namespace Gtk { public static unowned Gtk.IconTheme get_default (); public unowned string get_example_icon_name (); public static unowned Gtk.IconTheme get_for_screen (Gdk.Screen screen); - public int get_icon_sizes (string icon_name); + [CCode (array_length = false, array_null_terminated = true)] + public int[] get_icon_sizes (string icon_name); public void get_search_path (out string[] path); public bool has_icon (string icon_name); public GLib.List list_contexts (); diff --git a/vapi/gtk+-3.0.vapi b/vapi/gtk+-3.0.vapi index d0a9e9ef1..982d67a2c 100644 --- a/vapi/gtk+-3.0.vapi +++ b/vapi/gtk+-3.0.vapi @@ -359,6 +359,7 @@ namespace Gtk { public Gtk.Widget widget { get; set; } } [CCode (cheader_filename = "gtk/gtk.h")] + [Deprecated (replacement = "GLib.Action", since = "3.10")] public class Action : GLib.Object, Gtk.Buildable { [CCode (has_construct_function = false)] public Action (string name, string? label, string? tooltip, string? stock_id); @@ -428,6 +429,7 @@ namespace Gtk { public virtual signal void activate (); } [CCode (cheader_filename = "gtk/gtk.h")] + [Deprecated (since = "3.10")] public class ActionGroup : GLib.Object, Gtk.Buildable { [CCode (has_construct_function = false)] public ActionGroup (string name); @@ -2344,6 +2346,7 @@ namespace Gtk { public void set_context_id (string context_id); } [CCode (cheader_filename = "gtk/gtk.h")] + [Deprecated (replacement = "Gtk.IconTheme", since = "3.10")] public class IconFactory : GLib.Object, Gtk.Buildable { [CCode (has_construct_function = false)] public IconFactory (); @@ -2370,14 +2373,14 @@ namespace Gtk { public bool get_embedded_rect (out Gdk.Rectangle rectangle); public unowned string get_filename (); public Gdk.Pixbuf load_icon () throws GLib.Error; - public async unowned Gdk.Pixbuf load_icon_async (GLib.Cancellable cancellable) throws GLib.Error; + public async Gdk.Pixbuf load_icon_async (GLib.Cancellable? cancellable = null) throws GLib.Error; public Cairo.Surface load_surface (Gdk.Window for_window) throws GLib.Error; public Gdk.Pixbuf load_symbolic (Gdk.RGBA fg, Gdk.RGBA? success_color = null, Gdk.RGBA? warning_color = null, Gdk.RGBA? error_color = null, out bool was_symbolic = null) throws GLib.Error; - public async unowned Gdk.Pixbuf load_symbolic_async (Gdk.RGBA fg, Gdk.RGBA success_color, Gdk.RGBA warning_color, Gdk.RGBA error_color, GLib.Cancellable cancellable) throws GLib.Error; + public async Gdk.Pixbuf load_symbolic_async (Gdk.RGBA fg, Gdk.RGBA? success_color = null, Gdk.RGBA? warning_color = null, Gdk.RGBA? error_color = null, GLib.Cancellable? cancellable = null) throws GLib.Error; public Gdk.Pixbuf load_symbolic_for_context (Gtk.StyleContext context, out bool was_symbolic = null) throws GLib.Error; - public async unowned Gdk.Pixbuf load_symbolic_for_context_async (Gtk.StyleContext context, GLib.Cancellable cancellable) throws GLib.Error; + public async Gdk.Pixbuf load_symbolic_for_context_async (Gtk.StyleContext context, GLib.Cancellable? cancellable = null) throws GLib.Error; [Deprecated (replacement = "load_symbolic_for_context", since = "3.0")] - public unowned Gdk.Pixbuf load_symbolic_for_style (Gtk.Style style, Gtk.StateType state, bool was_symbolic) throws GLib.Error; + public Gdk.Pixbuf load_symbolic_for_style (Gtk.Style style, Gtk.StateType state, out bool was_symbolic = null) throws GLib.Error; public void set_raw_coordinates (bool raw_coordinates); } [CCode (cheader_filename = "gtk/gtk.h")] @@ -2386,6 +2389,7 @@ namespace Gtk { } [CCode (cheader_filename = "gtk/gtk.h", ref_function = "gtk_icon_set_ref", type_id = "gtk_icon_set_get_type ()", unref_function = "gtk_icon_set_unref")] [Compact] + [Deprecated (replacement = "Gtk.IconTheme", since = "3.10")] public class IconSet { [CCode (has_construct_function = false)] public IconSet (); @@ -2393,7 +2397,7 @@ namespace Gtk { public Gtk.IconSet copy (); [CCode (has_construct_function = false)] public IconSet.from_pixbuf (Gdk.Pixbuf pixbuf); - public void get_sizes (Gtk.IconSize[] sizes); + public void get_sizes (out Gtk.IconSize[] sizes); [Deprecated (replacement = "set_render_icon_pixbuf", since = "3.0")] public Gdk.Pixbuf render_icon (Gtk.Style style, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail); [Deprecated (since = "3.10")] @@ -2403,6 +2407,7 @@ namespace Gtk { } [CCode (cheader_filename = "gtk/gtk.h", copy_function = "gtk_icon_source_copy", type_id = "gtk_icon_source_get_type ()")] [Compact] + [Deprecated (replacement = "Gtk.IconTheme", since = "3.10")] public class IconSource { [CCode (has_construct_function = false)] public IconSource (); @@ -2438,7 +2443,8 @@ namespace Gtk { public static unowned Gtk.IconTheme get_default (); public unowned string get_example_icon_name (); public static unowned Gtk.IconTheme get_for_screen (Gdk.Screen screen); - public int get_icon_sizes (string icon_name); + [CCode (array_length = false, array_null_terminated = true)] + public int[] get_icon_sizes (string icon_name); public void get_search_path (out string[] path); public bool has_icon (string icon_name); public GLib.List list_contexts (); diff --git a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata index 6a58b35f3..01321c606 100644 --- a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata +++ b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata @@ -252,8 +252,11 @@ gtk_icon_view_get_selected_items transfer_ownership="1" type_arguments="TreePath gtk_tree_view_get_visible_range.start_path is_out="1" transfer_ownership="1" gtk_tree_view_get_visible_range.end_path is_out="1" transfer_ownership="1" gtk_icon_set_copy transfer_ownership="1" +gtk_icon_set_get_sizes.sizes is_array="1" is_out="1" transfer_ownership="1" +gtk_icon_set_render_icon transfer_ownership="1" gtk_icon_source_copy transfer_ownership="1" gtk_icon_theme_list_contexts transfer_ownership="1" type_arguments="string" +gtk_icon_theme_get_icon_sizes is_array="1" no_array_length="1" array_null_terminated="1" transfer_ownership="1" gtk_icon_theme_get_search_path.path is_array="1" is_out="1" transfer_ownership="1" gtk_icon_theme_get_search_path.n_elements hidden="1" gtk_icon_theme_list_icons transfer_ownership="1" type_arguments="string" diff --git a/vapi/packages/gtk+-3.0/gtk+-3.0.metadata b/vapi/packages/gtk+-3.0/gtk+-3.0.metadata index 66e7292ea..900b5391e 100644 --- a/vapi/packages/gtk+-3.0/gtk+-3.0.metadata +++ b/vapi/packages/gtk+-3.0/gtk+-3.0.metadata @@ -25,9 +25,11 @@ gtk_action_get_proxies type_arguments="Widget" gtk_action_new.label nullable="1" gtk_action_new.tooltip nullable="1" gtk_action_new.stock_id nullable="1" +GtkAction deprecated_since="3.10" replacement="GLib.Action" GtkAction::activate has_emitter="1" GtkActionEntry is_value_type="1" GtkActionEntry.callback type_name="ActionCallback" ctype="GCallback" no_delegate_target="1" value_owned="0" +GtkActionGroup deprecated_since="3.10" gtk_action_group_add_action_with_accel.accelerator nullable="1" gtk_action_group_add_actions.user_data hidden="0" gtk_action_group_add_actions_full.user_data hidden="0" @@ -42,6 +44,7 @@ gtk_action_group_set_translate_func.func transfer_ownership="1" gtk_action_group_set_translate_func.data hidden="1" gtk_action_group_set_translate_func.notify hidden="1" gtk_action_group_list_actions transfer_ownership="1" type_arguments="unowned Action" +GtkActivatable deprecated_since="3.10" GtkAdjustment::changed has_emitter="1" GtkAdjustment::value_changed has_emitter="1" gtk_alignment_get_padding.padding_top is_out="1" @@ -337,19 +340,30 @@ gtk_hsv_get_*.* is_out="1" gtk_hsv_to_rgb.r is_out="1" gtk_hsv_to_rgb.g is_out="1" gtk_hsv_to_rgb.b is_out="1" +GtkIconFactory deprecated_since="3.10" replacement="Gtk.IconTheme" GtkIconInfo compact="1" copy_function="gtk_icon_info_copy" free_function="gtk_icon_info_free" gtk_icon_info_copy transfer_ownership="1" gtk_icon_info_get_embedded_rect.rectangle is_out="1" gtk_icon_info_load_icon transfer_ownership="1" +gtk_icon_info_load_icon_async.cancellable nullable="1" default_value="null" +gtk_icon_info_load_icon_finish transfer_ownership="1" gtk_icon_info_load_surface transfer_ownership="1" gtk_icon_info_load_symbolic transfer_ownership="1" gtk_icon_info_load_symbolic.success_color nullable="1" default_value="null" gtk_icon_info_load_symbolic.warning_color nullable="1" default_value="null" gtk_icon_info_load_symbolic.error_color nullable="1" default_value="null" gtk_icon_info_load_symbolic.was_symbolic is_out="1" default_value="null" +gtk_icon_info_load_symbolic_async.cancellable nullable="1" default_value="null" +gtk_icon_info_load_symbolic_async.success_color nullable="1" default_value="null" +gtk_icon_info_load_symbolic_async.warning_color nullable="1" default_value="null" +gtk_icon_info_load_symbolic_async.error_color nullable="1" default_value="null" +gtk_icon_info_load_symbolic_finish transfer_ownership="1" gtk_icon_info_load_symbolic_for_context transfer_ownership="1" gtk_icon_info_load_symbolic_for_context.was_symbolic is_out="1" default_value="null" -gtk_icon_info_load_symbolic_for_style deprecated_since="3.0" replacement="load_symbolic_for_context" +gtk_icon_info_load_symbolic_for_context_async.cancellable nullable="1" default_value="null" +gtk_icon_info_load_symbolic_for_context_finish transfer_ownership="1" +gtk_icon_info_load_symbolic_for_style transfer_ownership="1" deprecated_since="3.0" replacement="load_symbolic_for_context" +gtk_icon_info_load_symbolic_for_style.was_symbolic is_out="1" default_value="null" gtk_icon_view_get_cursor.path transfer_ownership="1" gtk_icon_view_get_tooltip_context.iter is_out="1" gtk_icon_view_get_tooltip_context.x is_out="1" @@ -359,11 +373,15 @@ gtk_icon_view_get_cell_rect.cell nullable="1" gtk_icon_view_get_cell_rect.rect is_out="1" gtk_icon_view_get_visible_range.start_path is_out="1" transfer_ownership="1" gtk_icon_view_get_visible_range.end_path is_out="1" transfer_ownership="1" +GtkIconSet deprecated_since="3.10" replacement="Gtk.IconTheme" gtk_icon_set_copy transfer_ownership="1" +gtk_icon_set_get_sizes.sizes is_array="1" is_out="1" transfer_ownership="1" gtk_icon_set_render_icon transfer_ownership="1" deprecated_since="3.0" replacement="set_render_icon_pixbuf" gtk_icon_set_render_icon_pixbuf transfer_ownership="1" deprecated_since="3.10" gtk_icon_set_render_icon_surface transfer_ownership="1" deprecated_since="3.10" +GtkIconSource deprecated_since="3.10" replacement="Gtk.IconTheme" gtk_icon_source_copy transfer_ownership="1" +gtk_icon_theme_get_icon_sizes is_array="1" no_array_length="1" array_null_terminated="1" transfer_ownership="1" gtk_icon_theme_get_search_path.path is_array="1" is_out="1" transfer_ownership="1" gtk_icon_theme_get_search_path.n_elements hidden="1" gtk_icon_theme_list_contexts transfer_ownership="1" type_arguments="string"