mirror of
https://github.com/Not-Nik/raylib-zig.git
synced 2025-09-09 03:57:29 +00:00
Convert WindowState flags again, this time with a non-exaustive enum (#43)
This commit is contained in:
parent
7e95ad81b5
commit
8a2cd7dce2
@ -111,6 +111,8 @@ def fix_enums(arg_name, arg_type, func_name):
|
||||
arg_type = "CameraMode"
|
||||
elif arg_name == "gesture":
|
||||
arg_type = "Gestures"
|
||||
elif arg_name == "flags" and func_name in ["SetWindowState", "ClearWindowState", "SetConfigFlags"]:
|
||||
arg_type = "ConfigFlags"
|
||||
return arg_type
|
||||
|
||||
|
||||
|
@ -461,6 +461,7 @@ pub const ConfigFlags = enum(c_int) {
|
||||
flag_window_highdpi = 8192,
|
||||
flag_window_mouse_passthrough = 16384,
|
||||
flag_interlaced_hint = 65536,
|
||||
_,
|
||||
};
|
||||
|
||||
pub const TraceLogLevel = enum(c_int) {
|
||||
|
@ -13,8 +13,8 @@ pub extern "c" fn IsWindowMaximized() bool;
|
||||
pub extern "c" fn IsWindowFocused() bool;
|
||||
pub extern "c" fn IsWindowResized() bool;
|
||||
pub extern "c" fn IsWindowState(flag: c_uint) bool;
|
||||
pub extern "c" fn SetWindowState(flags: c_uint) void;
|
||||
pub extern "c" fn ClearWindowState(flags: c_uint) void;
|
||||
pub extern "c" fn SetWindowState(flags: rl.ConfigFlags) void;
|
||||
pub extern "c" fn ClearWindowState(flags: rl.ConfigFlags) void;
|
||||
pub extern "c" fn ToggleFullscreen() void;
|
||||
pub extern "c" fn MaximizeWindow() void;
|
||||
pub extern "c" fn MinimizeWindow() void;
|
||||
@ -97,7 +97,7 @@ pub extern "c" fn GetTime() f64;
|
||||
pub extern "c" fn GetRandomValue(min: c_int, max: c_int) c_int;
|
||||
pub extern "c" fn SetRandomSeed(seed: c_uint) void;
|
||||
pub extern "c" fn TakeScreenshot(fileName: [*c]const u8) void;
|
||||
pub extern "c" fn SetConfigFlags(flags: c_uint) void;
|
||||
pub extern "c" fn SetConfigFlags(flags: rl.ConfigFlags) void;
|
||||
pub extern "c" fn TraceLog(logLevel: c_int, text: [*c]const u8, ...) void;
|
||||
pub extern "c" fn SetTraceLogLevel(logLevel: c_int) void;
|
||||
pub extern "c" fn MemAlloc(size: c_uint) *anyopaque;
|
||||
|
@ -461,6 +461,7 @@ pub const ConfigFlags = enum(c_int) {
|
||||
flag_window_highdpi = 8192,
|
||||
flag_window_mouse_passthrough = 16384,
|
||||
flag_interlaced_hint = 65536,
|
||||
_,
|
||||
};
|
||||
|
||||
pub const TraceLogLevel = enum(c_int) {
|
||||
@ -897,12 +898,12 @@ pub fn isWindowState(flag: u32) bool {
|
||||
return cdef.IsWindowState(@as(c_uint, flag));
|
||||
}
|
||||
|
||||
pub fn setWindowState(flags: u32) void {
|
||||
cdef.SetWindowState(@as(c_uint, flags));
|
||||
pub fn setWindowState(flags: ConfigFlags) void {
|
||||
cdef.SetWindowState(flags);
|
||||
}
|
||||
|
||||
pub fn clearWindowState(flags: u32) void {
|
||||
cdef.ClearWindowState(@as(c_uint, flags));
|
||||
pub fn clearWindowState(flags: ConfigFlags) void {
|
||||
cdef.ClearWindowState(flags);
|
||||
}
|
||||
|
||||
pub fn toggleFullscreen() void {
|
||||
@ -1225,8 +1226,8 @@ pub fn takeScreenshot(fileName: []const u8) void {
|
||||
cdef.TakeScreenshot(@ptrCast([*c]const u8, fileName));
|
||||
}
|
||||
|
||||
pub fn setConfigFlags(flags: u32) void {
|
||||
cdef.SetConfigFlags(@as(c_uint, flags));
|
||||
pub fn setConfigFlags(flags: ConfigFlags) void {
|
||||
cdef.SetConfigFlags(flags);
|
||||
}
|
||||
|
||||
pub fn traceLog(logLevel: i32, text: []const u8) void {
|
||||
|
Loading…
x
Reference in New Issue
Block a user