Skip to content

Commit

Permalink
update bindings to match c8a6093d52ff6bdd17f9df012f6666b74629f595
Browse files Browse the repository at this point in the history
  • Loading branch information
ryupold committed Sep 24, 2023
1 parent 0c9450c commit 123ecc5
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 14 deletions.
20 changes: 18 additions & 2 deletions bindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,22 @@
"description": "Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)",
"custom": false
},
{
"name": "SetWindowMaxSize",
"params": [
{
"name": "width",
"typ": "i32"
},
{
"name": "height",
"typ": "i32"
}
],
"returnType": "void",
"description": "Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)",
"custom": false
},
{
"name": "SetWindowSize",
"params": [
Expand Down Expand Up @@ -1464,7 +1480,7 @@
"name": "GetApplicationDirectory",
"params": [],
"returnType": "[*:0]const u8",
"description": "Get the directory if the running application (uses static string)",
"description": "Get the directory of the running application (uses static string)",
"custom": false
},
{
Expand Down Expand Up @@ -2082,7 +2098,7 @@
"params": [
{
"name": "gesture",
"typ": "i32"
"typ": "u32"
}
],
"returnType": "bool",
Expand Down
7 changes: 6 additions & 1 deletion marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ void mSetWindowMinSize(int width, int height)
SetWindowMinSize(width, height);
}

void mSetWindowMaxSize(int width, int height)
{
SetWindowMaxSize(width, height);
}

void mSetWindowSize(int width, int height)
{
SetWindowSize(width, height);
Expand Down Expand Up @@ -853,7 +858,7 @@ void mSetGesturesEnabled(unsigned int flags)
SetGesturesEnabled(flags);
}

bool mIsGestureDetected(int gesture)
bool mIsGestureDetected(unsigned int gesture)
{
return IsGestureDetected(gesture);
}
Expand Down
7 changes: 5 additions & 2 deletions marshal.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ void mSetWindowMonitor(int monitor);
// Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
void mSetWindowMinSize(int width, int height);

// Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
void mSetWindowMaxSize(int width, int height);

// Set window dimensions
void mSetWindowSize(int width, int height);

Expand Down Expand Up @@ -366,7 +369,7 @@ const char * mGetPrevDirectoryPath(const char * dirPath);
// Get current working directory (uses static string)
const char * mGetWorkingDirectory(void);

// Get the directory if the running application (uses static string)
// Get the directory of the running application (uses static string)
const char * mGetApplicationDirectory(void);

// Change working directory, return true on success
Expand Down Expand Up @@ -520,7 +523,7 @@ int mGetTouchPointCount(void);
void mSetGesturesEnabled(unsigned int flags);

// Check if a gesture have been detected
bool mIsGestureDetected(int gesture);
bool mIsGestureDetected(unsigned int gesture);

// Get latest detected gesture
int mGetGestureDetected(void);
Expand Down
27 changes: 21 additions & 6 deletions raylib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3006,8 +3006,8 @@
"name": "fileName"
},
{
"type": "unsigned int *",
"name": "bytesRead"
"type": "int *",
"name": "dataSize"
}
]
},
Expand All @@ -3025,8 +3025,8 @@
"name": "data"
},
{
"type": "unsigned int",
"name": "bytesToWrite"
"type": "int",
"name": "dataSize"
}
]
},
Expand Down Expand Up @@ -3273,6 +3273,21 @@
}
]
},
{
"name": "SetWindowMaxSize",
"description": "Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)",
"returnType": "void",
"params": [
{
"type": "int",
"name": "width"
},
{
"type": "int",
"name": "height"
}
]
},
{
"name": "SetWindowSize",
"description": "Set window dimensions",
Expand Down Expand Up @@ -4363,7 +4378,7 @@
},
{
"name": "GetApplicationDirectory",
"description": "Get the directory if the running application (uses static string)",
"description": "Get the directory of the running application (uses static string)",
"returnType": "const char *"
},
{
Expand Down Expand Up @@ -4917,7 +4932,7 @@
"returnType": "bool",
"params": [
{
"type": "int",
"type": "unsigned int",
"name": "gesture"
}
]
Expand Down
15 changes: 13 additions & 2 deletions raylib.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,17 @@ pub fn SetWindowMinSize(
);
}

/// Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
pub fn SetWindowMaxSize(
width: i32,
height: i32,
) void {
raylib.mSetWindowMaxSize(
width,
height,
);
}

/// Set window dimensions
pub fn SetWindowSize(
width: i32,
Expand Down Expand Up @@ -2026,7 +2037,7 @@ pub fn GetWorkingDirectory() [*:0]const u8 {
);
}

/// Get the directory if the running application (uses static string)
/// Get the directory of the running application (uses static string)
pub fn GetApplicationDirectory() [*:0]const u8 {
return @as(
[*:0]const u8,
Expand Down Expand Up @@ -2508,7 +2519,7 @@ pub fn SetGesturesEnabled(

/// Check if a gesture have been detected
pub fn IsGestureDetected(
gesture: i32,
gesture: u32,
) bool {
return raylib.mIsGestureDetected(
gesture,
Expand Down

0 comments on commit 123ecc5

Please sign in to comment.