[vala/staging] gobject-2.0, gtk+-*.0: Fix some GLib.Value out/ref parameters



commit c8191fc4ce44ba8df0e4a6e6d97f5eb8fc385e08
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Aug 13 16:48:46 2018 +0200

    gobject-2.0,gtk+-*.0: Fix some GLib.Value out/ref parameters
    
    This is required due to GLib.Value being bound as struct.

 vapi/gobject-2.0.vapi                    |  4 ++--
 vapi/gtk+-2.0.vapi                       |  6 +++---
 vapi/gtk+-3.0.vapi                       | 16 ++++++++--------
 vapi/gtk+-4.0.vapi                       |  8 ++++----
 vapi/metadata/Gtk-3.0.metadata           | 19 +++++++++++++++++--
 vapi/metadata/Gtk-4.0.metadata           |  7 +++++++
 vapi/packages/gtk+-2.0/gtk+-2.0.metadata |  6 +++++-
 7 files changed, 46 insertions(+), 20 deletions(-)
---
diff --git a/vapi/gobject-2.0.vapi b/vapi/gobject-2.0.vapi
index 2b8c5ca60..a2e6c39aa 100644
--- a/vapi/gobject-2.0.vapi
+++ b/vapi/gobject-2.0.vapi
@@ -241,12 +241,12 @@ namespace GLib {
                public void set_qdata (GLib.Quark quark, void* data);
                public void set_qdata_full (GLib.Quark quark, void* data, GLib.DestroyNotify destroy);
                [CCode (cname = "g_param_value_set_default")]
-               public void set_value_default (GLib.Value value);
+               public void set_value_default (ref GLib.Value value);
                public void sink ();
                public void* steal_qdata (GLib.Quark quark);
                public void unref ();
                [CCode (cname = "g_param_value_convert")]
-               public bool value_convert (GLib.Value src_value, GLib.Value dest_value, bool 
strict_validation);
+               public bool value_convert (GLib.Value src_value, ref GLib.Value dest_value, bool 
strict_validation);
                [CCode (cname = "g_param_value_defaults", vfunc_name = "value_defaults")]
                public virtual bool value_defaults (GLib.Value value);
                [CCode (cname = "g_param_value_validate", vfunc_name = "value_validate")]
diff --git a/vapi/gtk+-2.0.vapi b/vapi/gtk+-2.0.vapi
index 0ed7c0b51..6bcde5754 100644
--- a/vapi/gtk+-2.0.vapi
+++ b/vapi/gtk+-2.0.vapi
@@ -1360,7 +1360,7 @@ namespace Gtk {
                protected Container ();
                public void add_with_properties (Gtk.Widget widget, ...);
                public void child_get (Gtk.Widget child, ...);
-               public void child_get_property (Gtk.Widget child, string property_name, GLib.Value value);
+               public void child_get_property (Gtk.Widget child, string property_name, ref GLib.Value value);
                public void child_get_valist (Gtk.Widget child, string first_property_name, va_list var_args);
                public void child_set (Gtk.Widget child, ...);
                public void child_set_property (Gtk.Widget child, string property_name, GLib.Value value);
@@ -1376,7 +1376,7 @@ namespace Gtk {
                public void @foreach (Gtk.Callback callback);
                public uint get_border_width ();
                [NoWrapper]
-               public virtual void get_child_property (Gtk.Widget child, uint property_id, GLib.Value value, 
GLib.ParamSpec pspec);
+               public virtual void get_child_property (Gtk.Widget child, uint property_id, ref GLib.Value 
value, GLib.ParamSpec pspec);
                public GLib.List<weak Gtk.Widget> get_children ();
                public bool get_focus_chain (out GLib.List<weak Gtk.Widget> focusable_widgets);
                public unowned Gtk.Widget get_focus_child ();
@@ -4245,7 +4245,7 @@ namespace Gtk {
                [NoWrapper]
                public virtual void draw_vline (Gdk.Window window, Gtk.StateType state_type, Gdk.Rectangle 
area, Gtk.Widget widget, string detail, int y1_, int y2_, int x);
                public void @get (GLib.Type widget_type, ...);
-               public void get_style_property (GLib.Type widget_type, string property_name, out GLib.Value 
value);
+               public void get_style_property (GLib.Type widget_type, string property_name, ref GLib.Value 
value);
                public void get_valist (GLib.Type widget_type, string first_property_name, void* var_args);
                [NoWrapper]
                public virtual void init_from_rc (Gtk.RcStyle rc_style);
diff --git a/vapi/gtk+-3.0.vapi b/vapi/gtk+-3.0.vapi
index 11acd0041..1bb097bdc 100644
--- a/vapi/gtk+-3.0.vapi
+++ b/vapi/gtk+-3.0.vapi
@@ -1387,7 +1387,7 @@ namespace Gtk {
                [Version (since = "3.0")]
                public void cell_get (Gtk.CellRenderer renderer, ...);
                [Version (since = "3.0")]
-               public void cell_get_property (Gtk.CellRenderer renderer, string property_name, GLib.Value 
value);
+               public void cell_get_property (Gtk.CellRenderer renderer, string property_name, ref 
GLib.Value value);
                [Version (since = "3.0")]
                public void cell_get_valist (Gtk.CellRenderer renderer, string first_property_name, [CCode 
(type = "va_list")] va_list var_args);
                [Version (since = "3.0")]
@@ -1416,7 +1416,7 @@ namespace Gtk {
                [Version (since = "3.0")]
                public unowned Gtk.CellRenderer get_cell_at_position (Gtk.CellAreaContext context, Gtk.Widget 
widget, Gdk.Rectangle cell_area, int x, int y, out Gdk.Rectangle alloc_area);
                [NoWrapper]
-               public virtual void get_cell_property (Gtk.CellRenderer renderer, uint property_id, 
GLib.Value value, GLib.ParamSpec pspec);
+               public virtual void get_cell_property (Gtk.CellRenderer renderer, uint property_id, ref 
GLib.Value value, GLib.ParamSpec pspec);
                [Version (since = "3.0")]
                public unowned string get_current_path_string ();
                [Version (since = "3.0")]
@@ -2325,7 +2325,7 @@ namespace Gtk {
                protected Container ();
                public void add_with_properties (Gtk.Widget widget, ...);
                public void child_get (Gtk.Widget child, ...);
-               public void child_get_property (Gtk.Widget child, string property_name, GLib.Value value);
+               public void child_get_property (Gtk.Widget child, string property_name, ref GLib.Value value);
                public void child_get_valist (Gtk.Widget child, string first_property_name, [CCode (type = 
"va_list")] va_list var_args);
                [Version (since = "3.2")]
                public void child_notify (Gtk.Widget child, string child_property);
@@ -2350,7 +2350,7 @@ namespace Gtk {
                public void @foreach (Gtk.Callback callback);
                public uint get_border_width ();
                [NoWrapper]
-               public virtual void get_child_property (Gtk.Widget child, uint property_id, GLib.Value value, 
GLib.ParamSpec pspec);
+               public virtual void get_child_property (Gtk.Widget child, uint property_id, ref GLib.Value 
value, GLib.ParamSpec pspec);
                public GLib.List<weak Gtk.Widget> get_children ();
                [Version (deprecated = true, deprecated_since = "3.24")]
                public bool get_focus_chain (out GLib.List<weak Gtk.Widget> focusable_widgets);
@@ -7495,7 +7495,7 @@ namespace Gtk {
                [Version (since = "2.16")]
                public void @get (GLib.Type widget_type, ...);
                [Version (since = "2.16")]
-               public void get_style_property (GLib.Type widget_type, string property_name, out GLib.Value 
value);
+               public void get_style_property (GLib.Type widget_type, string property_name, ref GLib.Value 
value);
                [Version (since = "2.16")]
                public void get_valist (GLib.Type widget_type, string first_property_name, [CCode (type = 
"va_list")] va_list var_args);
                [Version (since = "3.0")]
@@ -7564,7 +7564,7 @@ namespace Gtk {
                public Gtk.StateFlags get_state ();
                [Version (since = "3.0")]
                public void get_style (...);
-               public void get_style_property (string property_name, GLib.Value value);
+               public void get_style_property (string property_name, ref GLib.Value value);
                [Version (since = "3.0")]
                public void get_style_valist ([CCode (type = "va_list")] va_list args);
                [Version (since = "3.0")]
@@ -8405,7 +8405,7 @@ namespace Gtk {
                [Version (deprecated = true, deprecated_since = "3.14", since = "3.0")]
                public void get_style (...);
                [Version (deprecated = true, deprecated_since = "3.14", since = "3.0")]
-               public GLib.Value get_style_property (string property_name);
+               public void get_style_property (string property_name, ref GLib.Value value);
                [Version (deprecated = true, deprecated_since = "3.14", since = "3.0")]
                public void get_style_valist ([CCode (type = "va_list")] va_list args);
                [Version (deprecated = true, deprecated_since = "3.14", since = "3.0")]
@@ -10836,7 +10836,7 @@ namespace Gtk {
                [Version (deprecated = true, deprecated_since = "3.8", since = "3.0")]
                public abstract Gtk.StyleProperties? get_style (Gtk.WidgetPath path);
                [Version (since = "3.0")]
-               public abstract bool get_style_property (Gtk.WidgetPath path, Gtk.StateFlags state, 
GLib.ParamSpec pspec, out GLib.Value value);
+               public abstract bool get_style_property (Gtk.WidgetPath path, Gtk.StateFlags state, 
GLib.ParamSpec pspec, ref GLib.Value value);
        }
        [CCode (cheader_filename = "gtk/gtk.h", type_id = "gtk_tool_shell_get_type ()")]
        public interface ToolShell : Gtk.Widget {
diff --git a/vapi/gtk+-4.0.vapi b/vapi/gtk+-4.0.vapi
index a1c760ce0..ae1a615b9 100644
--- a/vapi/gtk+-4.0.vapi
+++ b/vapi/gtk+-4.0.vapi
@@ -6881,7 +6881,7 @@ namespace Gtk {
                public void attribute_disconnect (Gtk.CellRenderer renderer, string attribute);
                public int attribute_get_column (Gtk.CellRenderer renderer, string attribute);
                public void cell_get (Gtk.CellRenderer renderer, ...);
-               public void cell_get_property (Gtk.CellRenderer renderer, string property_name, GLib.Value 
value);
+               public void cell_get_property (Gtk.CellRenderer renderer, string property_name, ref 
GLib.Value value);
                public void cell_get_valist (Gtk.CellRenderer renderer, string first_property_name, [CCode 
(type = "va_list")] va_list var_args);
                public void cell_set (Gtk.CellRenderer renderer, ...);
                public void cell_set_property (Gtk.CellRenderer renderer, string property_name, GLib.Value 
value);
@@ -6897,7 +6897,7 @@ namespace Gtk {
                public Gdk.Rectangle get_cell_allocation (Gtk.CellAreaContext context, Gtk.Widget widget, 
Gtk.CellRenderer renderer, Gdk.Rectangle cell_area);
                public unowned Gtk.CellRenderer get_cell_at_position (Gtk.CellAreaContext context, Gtk.Widget 
widget, Gdk.Rectangle cell_area, int x, int y, out Gdk.Rectangle alloc_area);
                [NoWrapper]
-               public virtual void get_cell_property (Gtk.CellRenderer renderer, uint property_id, 
GLib.Value value, GLib.ParamSpec pspec);
+               public virtual void get_cell_property (Gtk.CellRenderer renderer, uint property_id, ref 
GLib.Value value, GLib.ParamSpec pspec);
                public unowned string get_current_path_string ();
                public unowned Gtk.CellEditable get_edit_widget ();
                public unowned Gtk.CellRenderer get_edited_cell ();
@@ -7434,7 +7434,7 @@ namespace Gtk {
                protected Container ();
                public void add_with_properties (Gtk.Widget widget, ...);
                public void child_get (Gtk.Widget child, ...);
-               public void child_get_property (Gtk.Widget child, string property_name, GLib.Value value);
+               public void child_get_property (Gtk.Widget child, string property_name, ref GLib.Value value);
                public void child_get_valist (Gtk.Widget child, string first_property_name, [CCode (type = 
"va_list")] va_list var_args);
                public void child_notify (Gtk.Widget child, string child_property);
                public void child_notify_by_pspec (Gtk.Widget child, GLib.ParamSpec pspec);
@@ -7447,7 +7447,7 @@ namespace Gtk {
                public virtual void forall (Gtk.Callback callback);
                public void @foreach (Gtk.Callback callback);
                [NoWrapper]
-               public virtual void get_child_property (Gtk.Widget child, uint property_id, GLib.Value value, 
GLib.ParamSpec pspec);
+               public virtual void get_child_property (Gtk.Widget child, uint property_id, ref GLib.Value 
value, GLib.ParamSpec pspec);
                public GLib.List<weak Gtk.Widget> get_children ();
                public unowned Gtk.Adjustment? get_focus_hadjustment ();
                public unowned Gtk.Adjustment? get_focus_vadjustment ();
diff --git a/vapi/metadata/Gtk-3.0.metadata b/vapi/metadata/Gtk-3.0.metadata
index ce154b82b..4f5ed99c0 100644
--- a/vapi/metadata/Gtk-3.0.metadata
+++ b/vapi/metadata/Gtk-3.0.metadata
@@ -424,6 +424,23 @@ RcProperty skip
 // Vala-specific, not really bugs
 /////////////////////////////////
 
+CellArea
+  .cell_get_property.value ref
+  .get_cell_property.value ref
+Container
+  .get_child_property.value ref
+  .child_get_property.value ref
+Style
+  .get_style_property.value ref
+StyleContext
+  .get_style_property.value ref
+StyleProvider
+  .get_style_property.value ref
+ThemingEngine
+  .get_style_property.value ref
+Widget
+  .style_get_property.value ref
+
 // Keep properties non-abstract as before
 *#interface.*#property abstract=false
 
@@ -494,7 +511,6 @@ Style
   .text unowned=false
   .text_aa unowned=false
   .copy skip
-  .get_style_property return_void
 render_* parent="Gtk.StyleContext"
 render_* symbol_type="method" instance_idx=0
 render_icon_pixbuf.size type="Gtk.IconSize"
@@ -554,7 +570,6 @@ Widget
   .new skip
   .render_icon*.size type="Gtk.IconSize"
   .set_parent.parent type="Gtk.Container"
-  .style_get_property.value ref
   .touch_event.event type="Gdk.EventTouch"
   .window skip
 WidgetPath
diff --git a/vapi/metadata/Gtk-4.0.metadata b/vapi/metadata/Gtk-4.0.metadata
index a72140780..890028646 100644
--- a/vapi/metadata/Gtk-4.0.metadata
+++ b/vapi/metadata/Gtk-4.0.metadata
@@ -264,6 +264,13 @@ TreeModel
 // Vala-specific, not really bugs
 /////////////////////////////////
 
+CellArea
+  .cell_get_property.value ref
+  .get_cell_property.value ref
+Container
+  .get_child_property.value ref
+  .child_get_property.value ref
+
 // Backwards compatibility
 AccelGroup
   .find type="Gtk.AccelKey*"
diff --git a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
index d9c6218a3..e43f08d48 100644
--- a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
+++ b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
@@ -117,6 +117,8 @@ gtk_calendar_set_detail_func.destroy hidden="1"
 GtkCalendarDetailFunc transfer_ownership="1"
 GtkCallbackMarshal hidden="1"
 GtkCell.u hidden="1"
+gtk_cell_area_cell_get_property.value is_ref="1"
+gtk_cell_area_get_cell_property.value is_ref="1"
 GtkCellEditable::editing_done has_emitter="1"
 GtkCellEditable::remove_widget has_emitter="1"
 gtk_cell_editable_start_editing.event nullable="1"
@@ -194,12 +196,14 @@ GtkContainer::composite_name transfer_ownership="1"
 GtkContainer::remove has_emitter="1"
 GtkContainer::set_focus_child has_emitter="1"
 GtkContainer::set_focus_child.widget nullable="1"
+gtk_container_child_get_property.value is_ref="1"
 gtk_container_child_get_valist.var_args type_name="va_list"
 gtk_container_child_set_valist.var_args type_name="va_list"
 gtk_container_forall virtual="0"
 gtk_container_forall.callback_data hidden="1"
 gtk_container_foreach.callback_data hidden="1"
 gtk_container_get_children transfer_ownership="1" type_arguments="unowned Widget"
+gtk_container_get_child_property.value is_ref="1"
 gtk_container_get_focus_chain.focusable_widgets is_out="1" takes_ownership="1" type_arguments="unowned 
Widget"
 gtk_container_set_focus_chain.focusable_widgets type_arguments="Widget"
 GtkContainerClass name="pointer"
@@ -725,7 +729,7 @@ GtkStyle.bg_pixmap weak="0"
 gtk_style_clone transfer_ownership="1"
 gtk_style_copy virtual="0" type_name="Style" transfer_ownership="1"
 gtk_style_lookup_color.color is_out="1"
-gtk_style_get_style_property.value is_out="1"
+gtk_style_get_style_property.value is_ref="1"
 gtk_table_get_size.rows is_out="1"
 gtk_table_get_size.columns is_out="1"
 GtkTable.children type_arguments="TableChild"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]