[vala/wip/sdl2: 15/18] sdl2: Fix static methods
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/sdl2: 15/18] sdl2: Fix static methods
- Date: Tue, 26 Jan 2021 13:55:03 +0000 (UTC)
commit 54b742729c4fe546037e28762dd424dfeea4cf1c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Jan 25 16:10:10 2021 +0100
sdl2: Fix static methods
vapi/sdl2.vapi | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/vapi/sdl2.vapi b/vapi/sdl2.vapi
index ddbaa8383..d15cfc612 100644
--- a/vapi/sdl2.vapi
+++ b/vapi/sdl2.vapi
@@ -225,7 +225,7 @@ namespace SDL {
}
[CCode (cname = "SDL_version", cheader_filename = "SDL2/SDL_version.h")]
- public class Version {
+ public struct Version {
public uint8 major;
public uint8 minor;
public uint8 patch;
@@ -1968,13 +1968,13 @@ namespace SDL {
public static int wait_inms (out SDL.Event ev, int timeout);
[CCode (cname = "SDL_PushEvent")]
- public static int push (SDL.Event ev);
+ public static int push (SDL.Event? ev);
[CCode (cname = "SDL_SetEventFilter")]
public static void set_eventfilter (SDL.EventFilter filter);
[CCode (cname = "SDL_GetEventFilter")]
- public static bool get_eventfilter (out SDL.EventFilter filter);
+ public static bool get_eventfilter (out unowned SDL.EventFilter filter);
[CCode (cname = "SDL_AddEventWatch")]
public static void add_eventwatch (SDL.EventFilter filter);
@@ -3990,7 +3990,7 @@ namespace SDL {
return _to_string () ?? "INVALID";
}
[CCode (cname = "SDL_GameControllerGetAxisFromString")]
- public static GameController.Axis? from_string (string axis_string);
+ public static GameController.Axis from_string (string axis_string);
}
[Version (since = "2.0.0")]
@@ -4005,7 +4005,7 @@ namespace SDL {
return _to_string () ?? "INVALID";
}
[CCode (cname = "SDL_GameControllerGetButtonFromString")]
- public static GameController.Button? from_string (string button_string);
+ public static GameController.Button from_string (string button_string);
}
[CCode (cprefix = "SDL_CONTROLLER_BINDTYPE_", cheader_filename =
"SDL2/SDL_gamecontroller.h")]
public enum BindType {
@@ -4413,7 +4413,7 @@ namespace SDL {
public static void pause (int pause_on);
[CCode (cname = "SDL_LoadWAV_RW")]
- public static unowned AudioSpec? load_rw (RWops src, int freesrc, ref AudioSpec spec, out
uint8[] audio_buf, out uint32 audio_len);
+ public static unowned AudioSpec? load_rw (RWops src, int freesrc, ref AudioSpec spec, [CCode
(array_length = false)] out uint8[] audio_buf, out uint32 audio_len);
public static unowned AudioSpec? load (string file, ref AudioSpec spec, out uint8[]
audio_buf, out uint32 audio_len) {
return load_rw (new SDL.RWops.from_file (file, "rb"), 1,
@@ -4424,10 +4424,10 @@ namespace SDL {
public static void free (ref uint8 audio_buf);
[CCode (cname = "SDL_MixAudio")]
- public static void mix (out uint8[] dst, uint8[] src, uint32 len, int volume);
+ public static void mix ([CCode (array_length = false)] ref uint8[] dst, [CCode (array_length
= false)] uint8[] src, uint32 len, int volume);
[CCode (cname = "SDL_MixAudioFormat")]
- public static void mix_device (out uint8[] dst, uint8[] src, AudioFormat format, uint32 len,
int volume);
+ public static void mix_device ([CCode (array_length = false)] ref uint8[] dst, [CCode
(array_length = false)] uint8[] src, AudioFormat format, uint32 len, int volume);
[Version (deprecated = true, replacement = "AudioDevice.do_lock")]
[CCode (cname = "SDL_LockAudio")]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]