[vala/wip/sdl2: 22/28] sdl2: Some more parameter problems and cname attribute issues




commit 571401a713824d8a64b3fb1776d19009e9cddb62
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Jan 26 14:53:27 2021 +0100

    sdl2: Some more parameter problems and cname attribute issues

 vapi/sdl2.vapi | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/vapi/sdl2.vapi b/vapi/sdl2.vapi
index 240d37974..2f4389e29 100644
--- a/vapi/sdl2.vapi
+++ b/vapi/sdl2.vapi
@@ -2161,7 +2161,7 @@ namespace SDL {
 
                [CCode (cname = "SDL_Palette", cheader_filename = "SDL2/SDL_pixels.h", free_function = 
"SDL_FreePalette", ref_function = "SDL_Palette_up", unref_function = "SDL_FreePalette")]
                public class Palette {
-                       [CCode (array_length_cexpr = "ncolors", array_length_type = "int")]
+                       [CCode (array_length_cname = "ncolors", array_length_type = "int")]
                        public Video.Color[] colors;
                        public uint32 version;
                        public int refcount;
@@ -2252,9 +2252,8 @@ namespace SDL {
                                int bpp, uint32 r_mask, uint32 g_mask, uint32 b_mask, uint32 a_mask);
                }// PixelFormat
 
-               [CCode (cname = "SDL_blit", cheader_filename = "SDL2/SDL_surface.h")]
-               public delegate int BlitFunc (Video.Surface src, Video.Rect? srcrect,
-                Video.Surface dst, Video.Rect? dstrect);
+               [CCode (cname = "SDL_blit", cheader_filename = "SDL2/SDL_surface.h", has_target = false)]
+               public delegate int BlitFunc (Video.Surface src, Video.Rect? srcrect, Video.Surface dst, 
Video.Rect? dstrect);
 
                [CCode (cname = "SDL_Surface", ref_function = "SDL_Surface_up", unref_function = 
"SDL_FreeSurface", cheader_filename = "SDL2/SDL_surface.h")]
                [Compact]
@@ -2875,7 +2874,7 @@ namespace SDL {
                }
 
                [CCode (cname = "SDL_HitTest", has_target= true, delegate_target_pos = 1.1)]
-               public delegate HitTestResult HitTestFunc (Video.Window window, Video.Point area);
+               public delegate HitTestResult HitTestFunc (Video.Window window, Video.Point? area);
 
 
                [CCode (cprefix = "SDL_", cname = "SDL_Window", free_function = "SDL_DestroyWindow", 
cheader_filename = "SDL2/SDL_video.h")]
@@ -3380,7 +3379,7 @@ namespace SDL {
                                public Video.Window? parent_window;
                                public string title;
                                public string message;
-                               [CCode (array_length_cexpr = "numbuttons", array_length_type = "int")]
+                               [CCode (array_length_cname = "numbuttons", array_length_type = "int")]
                                public Video.MessageBox.ButtonData[] buttons;
                                /**
                                * Can be null to use system settings
@@ -3701,7 +3700,7 @@ namespace SDL {
                        public Cursor.from_color (Video.Surface surface, int hot_x, int hot_y);
 
                        [Version (since = "2.0.0")]
-                       [CCode (cname = "SDL_SystemCursor")]
+                       [CCode (cname = "SDL_CreateSystemCursor")]
                        public Cursor.from_system (Input.SystemCursor id);
 
                        [CCode (cname = "SDL_SetCursor")]
@@ -4285,8 +4284,8 @@ namespace SDL {
                        ANY_CHANGE
                }// AudioAllowFlags
 
-               [CCode (cname = "SDL_AudioCallback", instance_pos = 0.1, has_target = true, 
delegate_target_pos = 0, cheader_filename = "SDL2/SDL_audio.h")]
-               public delegate void AudioFunc (uint8[] stream, int len);
+               [CCode (cname = "SDL_AudioCallback", cheader_filename = "SDL2/SDL_audio.h", instance_pos = 
0.1)]
+               public delegate void AudioFunc ([CCode (array_length_cname = "len", array_length_type = 
"int")] uint8[] stream);
 
                [CCode (cname = "SDL_AudioSpec", cheader_filename = "SDL2/SDL_audio.h")]
                public struct AudioSpec {


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