raylib-zig/lib/raygui-ext.zig
2025-04-20 13:50:02 +02:00

64 lines
5.3 KiB
Zig

// raylib-zig (c) Nikolas Wipper 2024
const rl = @import("raylib-zig");
const rgui = @import("raygui.zig");
pub extern "c" fn GuiEnable() void;
pub extern "c" fn GuiDisable() void;
pub extern "c" fn GuiLock() void;
pub extern "c" fn GuiUnlock() void;
pub extern "c" fn GuiIsLocked() bool;
pub extern "c" fn GuiSetAlpha(alpha: f32) void;
pub extern "c" fn GuiSetState(state: c_int) void;
pub extern "c" fn GuiGetState() c_int;
pub extern "c" fn GuiSetFont(font: rl.Font) void;
pub extern "c" fn GuiGetFont() rl.Font;
pub extern "c" fn GuiSetStyle(control: rgui.Control, property: c_int, value: c_int) void;
pub extern "c" fn GuiGetStyle(control: rgui.Control, property: c_int) c_int;
pub extern "c" fn GuiLoadStyle(fileName: [*c]const u8) void;
pub extern "c" fn GuiLoadStyleDefault() void;
pub extern "c" fn GuiEnableTooltip() void;
pub extern "c" fn GuiDisableTooltip() void;
pub extern "c" fn GuiSetTooltip(tooltip: [*c]const u8) void;
pub extern "c" fn GuiIconText(iconId: c_int, text: [*c]const u8) [*c]const u8;
pub extern "c" fn GuiSetIconScale(scale: c_int) void;
pub extern "c" fn GuiGetIcons() [*c]c_uint;
pub extern "c" fn GuiLoadIcons(fileName: [*c]const u8, loadIconsName: bool) [*c][*c]u8;
pub extern "c" fn GuiDrawIcon(iconId: c_int, posX: c_int, posY: c_int, pixelSize: c_int, color: rl.Color) void;
pub extern "c" fn GuiWindowBox(bounds: rl.Rectangle, title: [*c]const u8) c_int;
pub extern "c" fn GuiGroupBox(bounds: rl.Rectangle, text: [*c]const u8) c_int;
pub extern "c" fn GuiLine(bounds: rl.Rectangle, text: [*c]const u8) c_int;
pub extern "c" fn GuiPanel(bounds: rl.Rectangle, text: [*c]const u8) c_int;
pub extern "c" fn GuiTabBar(bounds: rl.Rectangle, text: [*c][*c]const u8, count: c_int, active: [*c]c_int) c_int;
pub extern "c" fn GuiScrollPanel(bounds: rl.Rectangle, text: [*c]const u8, content: rl.Rectangle, scroll: [*c]rl.Vector2, view: [*c]rl.Rectangle) c_int;
pub extern "c" fn GuiLabel(bounds: rl.Rectangle, text: [*c]const u8) c_int;
pub extern "c" fn GuiButton(bounds: rl.Rectangle, text: [*c]const u8) c_int;
pub extern "c" fn GuiLabelButton(bounds: rl.Rectangle, text: [*c]const u8) c_int;
pub extern "c" fn GuiToggle(bounds: rl.Rectangle, text: [*c]const u8, active: [*c]bool) c_int;
pub extern "c" fn GuiToggleGroup(bounds: rl.Rectangle, text: [*c]const u8, active: [*c]c_int) c_int;
pub extern "c" fn GuiToggleSlider(bounds: rl.Rectangle, text: [*c]const u8, active: [*c]c_int) c_int;
pub extern "c" fn GuiCheckBox(bounds: rl.Rectangle, text: [*c]const u8, checked: [*c]bool) c_int;
pub extern "c" fn GuiComboBox(bounds: rl.Rectangle, text: [*c]const u8, active: [*c]c_int) c_int;
pub extern "c" fn GuiDropdownBox(bounds: rl.Rectangle, text: [*c]const u8, active: [*c]c_int, editMode: bool) c_int;
pub extern "c" fn GuiSpinner(bounds: rl.Rectangle, text: [*c]const u8, value: [*c]c_int, minValue: c_int, maxValue: c_int, editMode: bool) c_int;
pub extern "c" fn GuiValueBox(bounds: rl.Rectangle, text: [*c]const u8, value: [*c]c_int, minValue: c_int, maxValue: c_int, editMode: bool) c_int;
pub extern "c" fn GuiValueBoxFloat(bounds: rl.Rectangle, text: [*c]const u8, textValue: [*c]u8, value: [*c]f32, editMode: bool) c_int;
pub extern "c" fn GuiTextBox(bounds: rl.Rectangle, text: [*c]u8, textSize: c_int, editMode: bool) c_int;
pub extern "c" fn GuiSlider(bounds: rl.Rectangle, textLeft: [*c]const u8, textRight: [*c]const u8, value: [*c]f32, minValue: f32, maxValue: f32) c_int;
pub extern "c" fn GuiSliderPro(bounds: rl.Rectangle, textLeft: [*c]const u8, textRight: [*c]const u8, value: [*c]f32, minValue: f32, maxValue: f32, sliderWidth: c_int) c_int;
pub extern "c" fn GuiSliderBar(bounds: rl.Rectangle, textLeft: [*c]const u8, textRight: [*c]const u8, value: [*c]f32, minValue: f32, maxValue: f32) c_int;
pub extern "c" fn GuiProgressBar(bounds: rl.Rectangle, textLeft: [*c]const u8, textRight: [*c]const u8, value: [*c]f32, minValue: f32, maxValue: f32) c_int;
pub extern "c" fn GuiStatusBar(bounds: rl.Rectangle, text: [*c]const u8) c_int;
pub extern "c" fn GuiDummyRec(bounds: rl.Rectangle, text: [*c]const u8) c_int;
pub extern "c" fn GuiGrid(bounds: rl.Rectangle, text: [*c]const u8, spacing: f32, subdivs: c_int, mouseCell: [*c]rl.Vector2) c_int;
pub extern "c" fn GuiListView(bounds: rl.Rectangle, text: [*c]const u8, scrollIndex: [*c]c_int, active: [*c]c_int) c_int;
pub extern "c" fn GuiListViewEx(bounds: rl.Rectangle, text: [*c][*c]const u8, count: c_int, scrollIndex: [*c]c_int, active: [*c]c_int, focus: [*c]c_int) c_int;
pub extern "c" fn GuiMessageBox(bounds: rl.Rectangle, title: [*c]const u8, message: [*c]const u8, buttons: [*c]const u8) c_int;
pub extern "c" fn GuiTextInputBox(bounds: rl.Rectangle, title: [*c]const u8, message: [*c]const u8, buttons: [*c]const u8, text: [*c]u8, textMaxSize: c_int, secretViewActive: [*c]bool) c_int;
pub extern "c" fn GuiColorPicker(bounds: rl.Rectangle, text: [*c]const u8, color: [*c]rl.Color) c_int;
pub extern "c" fn GuiColorPanel(bounds: rl.Rectangle, text: [*c]const u8, color: [*c]rl.Color) c_int;
pub extern "c" fn GuiColorBarAlpha(bounds: rl.Rectangle, text: [*c]const u8, alpha: [*c]f32) c_int;
pub extern "c" fn GuiColorBarHue(bounds: rl.Rectangle, text: [*c]const u8, value: [*c]f32) c_int;
pub extern "c" fn GuiColorPickerHSV(bounds: rl.Rectangle, text: [*c]const u8, colorHsv: [*c]rl.Vector3) c_int;
pub extern "c" fn GuiColorPanelHSV(bounds: rl.Rectangle, text: [*c]const u8, colorHsv: [*c]rl.Vector3) c_int;