Files
kryon/include/ui_toolbar_props.generated.h
T
2026-09-13 04:54:02 -03:00

73 lines
1.7 KiB
C

/* Generated by k2c from runtime/toolbar_props.kry. */
#ifndef K_RUNTIME_TOOLBAR_PROPS_H
#define K_RUNTIME_TOOLBAR_PROPS_H
#include <stdint.h>
#include <stdbool.h>
#ifndef KIR_STRING_VALUE_DEFINED
#define KIR_STRING_VALUE_DEFINED
#include <stddef.h>
#include <string.h>
/* Immutable borrowed UTF-8 bytes; length preserves embedded nulls. */
typedef struct String { const char *data; size_t length; } String;
static inline String StringView(const char *data, size_t length) {
String value = {data, length};
return value;
}
static inline bool StringEqual(String a, String b) {
return a.length == b.length && (a.length == 0 || memcmp(a.data, b.data, a.length) == 0);
}
#endif
#include "kryon_compat.generated.h"
typedef struct IconRowItem {
Texture2D icon;
bool disabled;
} IconRowItem;
typedef struct BottomIconRowProps {
int32_t center_x;
int32_t view_width;
int32_t view_height;
int32_t count;
const IconRowItem* items;
} BottomIconRowProps;
typedef struct IconRowResult {
int32_t clicked_index;
int32_t y;
int32_t button_width;
} IconRowResult;
typedef struct ToolbarAction {
Texture2D icon;
int32_t icon_type;
bool disabled;
} ToolbarAction;
typedef struct ToolbarProps {
int32_t id;
int32_t class_name;
int32_t x;
int32_t y;
int32_t width;
int32_t height;
bool draw_menu;
const char** options;
int32_t option_count;
int32_t* selected_index;
int32_t dropdown_min_width;
int32_t dropdown_max_width;
int32_t dropdown_height;
const ToolbarAction* actions;
int32_t action_count;
} ToolbarProps;
typedef struct ToolbarResult {
int32_t selected_menu_item;
int32_t clicked_action;
} ToolbarResult;
#endif /* K_RUNTIME_TOOLBAR_PROPS_H */