[vala/wip/sdl2: 18/28] sdl2: Fix cname issues of fields
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/sdl2: 18/28] sdl2: Fix cname issues of fields
- Date: Sun, 31 Jan 2021 08:37:02 +0000 (UTC)
commit 2f7049ee43f7585c946b0beb01362efa2fbe4374
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Jan 25 14:28:18 2021 +0100
sdl2: Fix cname issues of fields
vapi/sdl2.vapi | 70 +++++++++++++++++++++++-----------------------------------
1 file changed, 28 insertions(+), 42 deletions(-)
---
diff --git a/vapi/sdl2.vapi b/vapi/sdl2.vapi
index 6b80a5984..ddbaa8383 100644
--- a/vapi/sdl2.vapi
+++ b/vapi/sdl2.vapi
@@ -1767,8 +1767,6 @@ namespace SDL {
[CCode (cname = "SDL_JoyAxisEvent", has_type_id = false, cheader_filename = "SDL2/SDL_events.h")]
[Compact]
public struct JoyAxisEvent : CommonEvent {
- [CCode (cname = "windowID")]
- public uint32 window_id;
public Input.JoystickID which;
public uint8 axis;
public int16 @value;
@@ -1777,8 +1775,6 @@ namespace SDL {
[CCode (cname = "SDL_JoyBallEvent", has_type_id = false, cheader_filename = "SDL2/SDL_events.h")]
[Compact]
public struct JoyBallEvent : CommonEvent {
- [CCode (cname = "windowID")]
- public uint32 window_id;
public Input.JoystickID which;
public uint8 ball;
public int16 xrel;
@@ -1795,18 +1791,14 @@ namespace SDL {
[CCode (cname = "SDL_JoyHatEvent", has_type_id = false, cheader_filename = "SDL2/SDL_events.h")]
[Compact]
public struct JoyHatEvent : CommonEvent {
- [CCode (cname = "windowID")]
- public uint32 window_id;
public Input.JoystickID which;
public uint8 hat;
- public HatValue hat_value;
+ public HatValue @value;
}// JoyHatEvent
[CCode (cname = "SDL_JoyButtonEvent", has_type_id = false, cheader_filename = "SDL2/SDL_events.h")]
[Compact]
public struct JoyButtonEvent : CommonEvent {
- [CCode (cname = "windowID")]
- public uint32 window_id;
public Input.JoystickID which;
public uint8 button;
public uint8 state;
@@ -1815,16 +1807,12 @@ namespace SDL {
[CCode (cname = "SDL_JoyDeviceEvent", has_type_id = false, cheader_filename = "SDL2/SDL_events.h")]
[Compact]
public struct JoyDeviceEvent : CommonEvent {
- [CCode (cname = "windowID")]
- public uint32 window_id;
public Input.JoystickID which;
}// JoyDeviceEvent
[CCode (cname = "SDL_ControllerAxisEvent", has_type_id = false, cheader_filename =
"SDL2/SDL_events.h")]
[Compact]
public struct ControllerAxisEvent : CommonEvent {
- [CCode (cname = "windowID")]
- public uint32 window_id;
public Input.JoystickID which;
public uint8 axis;
public int16 @value;
@@ -1834,8 +1822,6 @@ namespace SDL {
[CCode (cname = "SDL_ControllerButtonEvent", has_type_id = false, cheader_filename =
"SDL2/SDL_events.h")]
[Compact]
public struct ControllerButtonEvent : CommonEvent {
- [CCode (cname = "windowID")]
- public uint32 window_id;
public Input.JoystickID which;
public uint8 button;
public uint8 state;
@@ -1844,17 +1830,15 @@ namespace SDL {
[CCode (cname = "SDL_ControllerDeviceEvent", has_type_id = false, cheader_filename =
"SDL2/SDL_events.h")]
[Compact]
public struct ControllerDeviceEvent : CommonEvent {
- [CCode (cname = "windowID")]
- public uint32 window_id;
public Input.JoystickID which;
}// ControllerDeviceEvent
[CCode (cname = "SDL_TouchFingerEvent", has_type_id = false, cheader_filename = "SDL2/SDL_events.h")]
[Compact]
public struct TouchFingerEvent : CommonEvent {
- [CCode (cname = "touchID")]
+ [CCode (cname = "touchId")]
public Input.Touch.TouchID touch_id;
- [CCode (cname = "fingerID")]
+ [CCode (cname = "fingerId")]
public Input.Touch.FingerID finger_id;
public float x;
public float y;
@@ -1866,7 +1850,7 @@ namespace SDL {
[CCode (cname = "SDL_MultiGestureEvent", has_type_id = false, cheader_filename = "SDL2/SDL_events.h")]
[Compact]
public struct MultiGestureEvent : CommonEvent {
- [CCode (cname = "touchID")]
+ [CCode (cname = "touchId")]
public Input.Touch.TouchID touch_id;
[CCode (cname = "dTheta")]
public float d_theta;
@@ -1874,7 +1858,6 @@ namespace SDL {
public float d_dist;
public float x;
public float y;
- public float pressure;
[CCode (cname = "numFingers")]
public uint16 num_fingers;
}// MultiGestureEvent
@@ -1882,9 +1865,9 @@ namespace SDL {
[CCode (cname = "SDL_DollarGestureEvent", has_type_id = false, cheader_filename =
"SDL2/SDL_events.h")]
[Compact]
public struct DollarGestureEvent : CommonEvent {
- [CCode (cname = "touchID")]
+ [CCode (cname = "touchId")]
public Input.Touch.TouchID touch_id;
- [CCode (cname = "gestureID")]
+ [CCode (cname = "gestureId")]
public Input.Touch.GestureID gesture_id;
[CCode (cname = "numFingers")]
public uint32 num_fingers;
@@ -1930,7 +1913,7 @@ namespace SDL {
[SimpleType]
public struct Event {
public SDL.EventType type;
- public SDL.CommonEvent generic;
+ public SDL.CommonEvent common;
public SDL.WindowEvent window;
public SDL.KeyboardEvent key;
public SDL.TextEditingEvent edit;
@@ -2211,13 +2194,21 @@ namespace SDL {
public uint32 b_mask;
[CCode (cname = "Amask")]
public uint32 a_mask;
+ [CCode (cname = "Rloss")]
public uint8 r_loss;
+ [CCode (cname = "Gloss")]
public uint8 g_loss;
+ [CCode (cname = "Bloss")]
public uint8 b_loss;
+ [CCode (cname = "Aloss")]
public uint8 a_loss;
+ [CCode (cname = "Rshift")]
public uint8 r_shift;
+ [CCode (cname = "Gshift")]
public uint8 g_shift;
+ [CCode (cname = "Bshift")]
public uint8 b_shift;
+ [CCode (cname = "Ashift")]
public uint8 a_shift;
public int refcount;
@@ -2276,9 +2267,9 @@ namespace SDL {
public void* pixels;
public void* userdata; //maybe this could be binded as Simple Generics?
public int locked;
- public void* lock_data;
+ public void* list_blitmap;
public Video.Rect clip_rect;
- public Video.BlitMap map;
+ public Video.BlitMap? map;
public int refcount;
public unowned Surface up () {
@@ -3587,7 +3578,7 @@ namespace SDL {
public Input.Scancode scancode;
public Input.Keycode sym;
public uint16 mod;
- public uint32 unicode;
+ public uint32 unused;
}// Key
[CCode (cheader_filename = "SDL2/SDL_keyboard.h")]
@@ -4078,7 +4069,7 @@ namespace SDL {
//Envelope
public uint16 attack_length;
public uint16 attack_level;
- public uint16 fade_langth;
+ public uint16 fade_length;
public uint16 fade_level;
}
@@ -4098,7 +4089,7 @@ namespace SDL {
//Envelope
public uint16 attack_length;
public uint16 attack_level;
- public uint16 fade_langth;
+ public uint16 fade_length;
public uint16 fade_level;
}
@@ -4114,17 +4105,12 @@ namespace SDL {
public uint16 button;
public uint16 interval;
//Condition
- public uint16 right_sat;
- public uint16 left_sat;
- public int16 right_coeff;
- public int16 left_coeff;
- public uint16 deadband;
- public int16 center;
- //Envelope
- public uint16 attack_length;
- public uint16 attack_level;
- public uint16 fade_langth;
- public uint16 fade_level;
+ public uint16 right_sat[3];
+ public uint16 left_sat[3];
+ public int16 right_coeff[3];
+ public int16 left_coeff[3];
+ public uint16 deadband[3];
+ public int16 center[3];
}
[CCode (cname = "SDL_HapticRamp", cheader_filename = "SDL2/SDL_haptic.h")]
public struct HapticRamp {
@@ -4143,7 +4129,7 @@ namespace SDL {
//Envelope
public uint16 attack_length;
public uint16 attack_level;
- public uint16 fade_langth;
+ public uint16 fade_length;
public uint16 fade_level;
}
[CCode (cname = "SDL_HapticLeftRight", cheader_filename = "SDL2/SDL_haptic.h")]
@@ -4176,7 +4162,7 @@ namespace SDL {
//Envelope
public uint16 attack_length;
public uint16 attack_level;
- public uint16 fade_langth;
+ public uint16 fade_length;
public uint16 fade_level;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]