Files
kryon/include/ui_text_props.generated.h
T

50 lines
1.2 KiB
C

/* Generated by k2c from runtime/text_props.kry. */
#ifndef K_RUNTIME_TEXT_PROPS_H
#define K_RUNTIME_TEXT_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 "ui_control_props.generated.h"
typedef enum TextWrap {
TextWrapAuto = 0,
TextWrapNone = 1,
} TextWrap;
typedef enum TextAlign {
TextAlignStart = 0,
TextAlignCenter = 1,
TextAlignEnd = 2,
} TextAlign;
typedef struct TextProps {
Rectangle bounds;
const char* text;
int32_t class_name;
int32_t font;
Color color;
TextWrap wrap;
TextAlign align;
TextAlign vertical_align;
bool disabled;
int32_t letter_spacing;
bool selectable;
} TextProps;
#endif /* K_RUNTIME_TEXT_PROPS_H */