Files
kryon/include/ui_button_props.generated.h
T
waozi 4b7c4e84f0 Release v0.2.0: Kry UI runtime authored in .kry
Widget, layout, interaction, style, and UI-tree logic is now authored in
the Kry (.kry) UI language and compiled into the native C and Go runtimes,
replacing the hand-written C widget implementation. The remaining C is
platform and raster backends (X11 window, font rasterization, paint command
execution, surface/image caches, test helpers).

- Clipboard OSC52/paste callbacks are host-provided write functions instead
  of raw function-pointer typedefs, unblocking Go runtime generation.
- AccessibilityNode and Accelerator types are generated from .kry.
- Generated-runtime parity test passes for both C and Go.
2026-09-20 19:36:28 -03:00

71 lines
1.7 KiB
C

/* Generated by k2c from runtime/button_props.kry. */
#ifndef K_RUNTIME_BUTTON_PROPS_H
#define K_RUNTIME_BUTTON_PROPS_H
#include <stdint.h>
#include <stdbool.h>
#include "kry_bounds.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 "ui_control_props.generated.h"
#include "ui_menu_props.generated.h"
#include "ui_image_props.generated.h"
typedef enum ArrowDirection {
ArrowLeft = 0,
ArrowRight = 1,
ArrowUp = 2,
ArrowDown = 3,
} ArrowDirection;
typedef struct ButtonProps {
Rectangle bounds;
const char* label;
int32_t id;
int32_t class_name;
ButtonTone tone;
ButtonEmphasis emphasis;
ControlSize size;
bool disabled;
bool loading;
bool selected;
bool invisible;
bool full_width;
bool pill;
bool circle;
Texture2D icon;
int32_t icon_type;
IconPlacement icon_placement;
bool icon_only;
bool square;
ImageProps image;
bool swatch;
Color swatch_color;
int32_t menu_id;
const MenuItem* items;
int32_t item_count;
int32_t* open;
int32_t* activated_id;
bool menu;
bool split;
bool arrow;
bool info;
ArrowDirection direction;
ButtonState state;
} ButtonProps;
#endif /* K_RUNTIME_BUTTON_PROPS_H */