]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gdk-2.0: Fix gdk_property_get binding
authorJürg Billeter <j@bitron.ch>
Mon, 22 Mar 2010 22:55:08 +0000 (23:55 +0100)
committerJürg Billeter <j@bitron.ch>
Mon, 22 Mar 2010 22:55:08 +0000 (23:55 +0100)
Fixes bug 611250.

vapi/gdk-2.0.vapi
vapi/packages/gdk-2.0/gdk-2.0.metadata
vapigen/valagidlparser.vala

index 54406a4d59c11febaad7b106906868307c4da40d..49f6b2696017ca7600a15ce3339934abe044bee9 100644 (file)
@@ -1774,7 +1774,7 @@ namespace Gdk {
        [CCode (cheader_filename = "gdk/gdk.h")]
        public static void property_delete (Gdk.Window window, Gdk.Atom property);
        [CCode (cheader_filename = "gdk/gdk.h")]
-       public static bool property_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);
+       public static bool property_get (Gdk.Window window, Gdk.Atom property, Gdk.Atom type, ulong offset, ulong length, int pdelete, out Gdk.Atom actual_property_type, out int actual_format, [CCode (array_length_pos = 8.9)] out uchar[] data);
        [CCode (cheader_filename = "gdk/gdk.h")]
        public static void query_depths (int depths, int count);
        [CCode (cheader_filename = "gdk/gdk.h")]
index c9980df9a2e8d5e811bb5b04b48e2a59334e9843..4ee85315e4adf8715003cb0198ee6079e9216629 100644 (file)
@@ -80,6 +80,9 @@ gdk_pointer_grab.confine_to nullable="1"
 gdk_pointer_grab.cursor nullable="1"
 gdk_property_change.data no_array_length="1"
 gdk_property_get.actual_property_type is_out="1"
+gdk_property_get.actual_format is_out="1"
+gdk_property_get.actual_length hidden="1"
+gdk_property_get.data is_out="1" is_array="1" array_length_pos="8.9" transfer_ownership="1"
 GdkRectangle is_value_type="1"
 gdk_rectangle_union.dest is_out="1"
 gdk_region_copy transfer_ownership="1"
index b686be2886bd2ab69eb45357b2cbcef94728bfa6..86924417fc409dda22d3846a865f9d07acb702ab 100644 (file)
@@ -1682,6 +1682,7 @@ public class Vala.GIdlParser : CodeVisitor {
                        bool set_delegate_target_pos = false;
                        double delegate_target_pos = 0;
                        bool array_requested = false;
+                       bool out_requested = false;
                        attributes = get_attributes ("%s.%s".printf (symbol, param_node.name));
                        if (attributes != null) {
                                foreach (string attr in attributes) {
@@ -1690,12 +1691,15 @@ public class Vala.GIdlParser : CodeVisitor {
                                                if (eval (nv[1]) == "1") {
                                                        param_type = new ArrayType (param_type, 1, param_type.source_reference);
                                                        p.parameter_type = param_type;
-                                                       p.direction = ParameterDirection.IN;
+                                                       if (!out_requested) {
+                                                               p.direction = ParameterDirection.IN;
+                                                       }
                                                        array_requested = true;
                                                }
                                        } else if (nv[0] == "is_out") {
                                                if (eval (nv[1]) == "1") {
                                                        p.direction = ParameterDirection.OUT;
+                                                       out_requested = true;
                                                        if (!array_requested && param_type is ArrayType) {
                                                                var array_type = (ArrayType) param_type;
                                                                param_type = array_type.element_type;