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




commit d0e918462a9ce2efbc647ca075257ad15b788799
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 ed4350e9c..d43085b86 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")]
@@ -3373,7 +3372,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
@@ -3694,7 +3693,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")]
@@ -4278,8 +4277,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]