From b9c1b2c8c247e97f0145e0bc94a7c7d3ab0903d6 Mon Sep 17 00:00:00 2001 From: xolatile Date: Sun, 7 Apr 2024 19:01:25 -0400 Subject: [PATCH] Gesture functions... --- raylib.ads | 119 +++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 64 insertions(+), 55 deletions(-) diff --git a/raylib.ads b/raylib.ads index 7c38361..1821964 100644 --- a/raylib.ads +++ b/raylib.ads @@ -544,6 +544,7 @@ package Raylib is for Index_Range'Size use 16; type Pointer is access all System.Address; + type Strings is access all Character; type Vector_2D is record X : Float := 0.0; @@ -1197,7 +1198,7 @@ package Raylib is function Get_Monitor_Name ( Monitor : Integer := 0 - ) return Pointer with + ) return Strings with Import => True, Convention => C, External_Name => "GetMonitorName"; @@ -1209,7 +1210,7 @@ package Raylib is Convention => C, External_Name => "SetClipboardText"; - function Get_Clipboard_Text return Pointer with + function Get_Clipboard_Text return Strings with Import => True, Convention => C, External_Name => "GetClipboardText"; @@ -1907,7 +1908,7 @@ package Raylib is function Get_Gamepad_Name ( Gamepad : Integer := 0 - ) return access Character with + ) return Strings with Import => True, Convention => C, External_Name => "GetGamepadName"; @@ -2060,70 +2061,78 @@ package Raylib is Convention => C, External_Name => "SetMouseCursor"; - --~function int GetTouchX (void) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Get_Touch_X return Integer with + Import => True, + Convention => C, + External_Name => "GetTouchX"; - --~function int GetTouchY (void) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Get_Touch_Y return Integer with + Import => True, + Convention => C, + External_Name => "GetTouchY"; - --~function Vector2 GetTouchPosition (int index) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Get_Touch_Position ( + Index : Integer := 0 + ) return Vector_2D with + Import => True, + Convention => C, + External_Name => "GetTouchPosition"; - --~function int GetTouchPointId (int index) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Get_Touch_Point_Id ( + Index : Integer := 0 + ) return Integer with + Import => True, + Convention => C, + External_Name => "GetTouchPointId"; - --~function int GetTouchPointCount (void) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Get_Touch_Point_Count return Integer with + Import => True, + Convention => C, + External_Name => "GetTouchPointCount"; - --~procedure SetGesturesEnabled (unsigned int flags) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + procedure Set_Gestures_Enabled ( + Data : Gesture := Gesture_None + ) with + Import => True, + Convention => C, + External_Name => "SetGesturesEnabled"; - --~function bool IsGestureDetected (unsigned int gesture) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Is_Gesture_Detected ( + Data : Gesture := Gesture_None + ) return Logical with + Import => True, + Convention => C, + External_Name => "IsGestureDetected"; - --~function int GetGestureDetected (void) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Get_Gesture_Detected return Integer with + Import => True, + Convention => C, + External_Name => "GetGestureDetected"; - --~function float GetGestureHoldDuration (void) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Get_Gesture_Hold_Duration return Float with + Import => True, + Convention => C, + External_Name => "GetGestureHoldDuration"; - --~function Vector2 GetGestureDragVector (void) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Get_Gesture_Drag_Vector return Vector_2D with + Import => True, + Convention => C, + External_Name => "GetGestureDragVector"; - --~function float GetGestureDragAngle (void) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Get_Gesture_Drag_Angle return Float with + Import => True, + Convention => C, + External_Name => "GetGestureDragAngle"; - --~function Vector2 GetGesturePinchVector (void) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Get_Gesture_Pinch_Vector return Vector_2D with + Import => True, + Convention => C, + External_Name => "GetGesturePinchVector"; - --~function float GetGesturePinchAngle (void) with - --~Import => True, - --~Convention => C, - --~External_Name => ""; + function Get_Gesture_Pinch_Angle return Float with + Import => True, + Convention => C, + External_Name => "GetGesturePinchAngle"; procedure Update_Camera ( Data : access Camera_3D := null;