[vala/0.48] atspi-2: Fix a few binding errors



commit c9a2ce3d21d9cefd7a97ce2a219734a1ad671744
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Aug 9 08:13:38 2022 +0200

    atspi-2: Fix a few binding errors

 vapi/atspi-2.vapi                | 18 ++++++++++--------
 vapi/metadata/Atspi-2.0.metadata | 10 ++++++++++
 2 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/vapi/atspi-2.vapi b/vapi/atspi-2.vapi
index f2d8490a0..60f7b5ffd 100644
--- a/vapi/atspi-2.vapi
+++ b/vapi/atspi-2.vapi
@@ -118,9 +118,8 @@ namespace Atspi {
        }
        [CCode (cheader_filename = "atspi/atspi.h", type_id = "atspi_event_listener_get_type ()")]
        public class EventListener : GLib.Object {
-               public weak Atspi.EventListenerCB callback;
-               public weak GLib.DestroyNotify cb_destroyed;
-               public void* user_data;
+               [CCode (delegate_target_cname = "user_data", destroy_notify_cname = "cb_destroyed")]
+               public Atspi.EventListenerCB callback;
                [CCode (has_construct_function = false)]
                public EventListener (owned Atspi.EventListenerCB callback);
                public bool deregister (string event_type) throws GLib.Error;
@@ -430,9 +429,12 @@ namespace Atspi {
        }
        [CCode (cheader_filename = "atspi/atspi.h", has_type_id = false)]
        public struct KeySet {
-               public uint keysyms;
-               public ushort keycodes;
-               public weak string keystrings;
+               [CCode (array_length_cname = "len", array_length_type = "gshort")]
+               public weak uint[] keysyms;
+               [CCode (array_length_cname = "len", array_length_type = "gshort")]
+               public weak ushort[] keycodes;
+               [CCode (array_length_cname = "len", array_length_type = "gshort")]
+               public weak string[] keystrings;
                public short len;
        }
        [CCode (cheader_filename = "atspi/atspi.h", cprefix = "ATSPI_CACHE_", type_id = "atspi_cache_get_type 
()")]
@@ -791,9 +793,9 @@ namespace Atspi {
                PARAGRAPH
        }
        [CCode (cheader_filename = "atspi/atspi.h", instance_pos = 1.9)]
-       public delegate bool DeviceListenerCB (owned Atspi.DeviceEvent stroke);
+       public delegate bool DeviceListenerCB (Atspi.DeviceEvent stroke);
        [CCode (cheader_filename = "atspi/atspi.h", has_target = false)]
-       public delegate bool DeviceListenerSimpleCB (owned Atspi.DeviceEvent stroke);
+       public delegate bool DeviceListenerSimpleCB (Atspi.DeviceEvent stroke);
        [CCode (cheader_filename = "atspi/atspi.h", instance_pos = 1.9)]
        public delegate void EventListenerCB (owned Atspi.Event event);
        [CCode (cheader_filename = "atspi/atspi.h", has_target = false)]
diff --git a/vapi/metadata/Atspi-2.0.metadata b/vapi/metadata/Atspi-2.0.metadata
index eec213c7a..9bfb723fb 100644
--- a/vapi/metadata/Atspi-2.0.metadata
+++ b/vapi/metadata/Atspi-2.0.metadata
@@ -5,7 +5,17 @@ DeviceEvent struct
 
 DeviceListener
        .new_simple skip=false
+DeviceListenerCB.stroke owned=false
+DeviceListenerSimpleCB.stroke owned=false
 
 EventListener
        .*_no_data skip=false
        .new_simple skip=false
+       .callback unowned=false delegate_target_cname="user_data" destroy_notify_cname="cb_destroyed"
+       .cb_destroyed skip
+       .user_data skip
+
+KeySet
+       .keysyms array array_length_field="len"
+       .keycodes array array_length_field="len"
+       .keystrings array array_length_field="len"


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