Files
kryon/include/ui_text_input_props.generated.h
T
2026-09-13 05:27:25 -03:00

73 lines
1.7 KiB
C

/* Generated by k2c from runtime/text_input_props.kry. */
#ifndef K_RUNTIME_TEXT_INPUT_PROPS_H
#define K_RUNTIME_TEXT_INPUT_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 enum SyntaxMode {
SyntaxNone = 0,
SyntaxKry = 1,
SyntaxC = 2,
SyntaxMake = 3,
} SyntaxMode;
typedef struct TextInputProps {
Rectangle bounds;
const char* text;
int32_t cursor_position;
bool focused;
bool cursor_visible;
int32_t focus_id;
int32_t class_name;
} TextInputProps;
typedef struct TextFieldProps {
Rectangle bounds;
char* text;
size_t text_size;
int32_t* cursor_position;
int32_t* focused;
int32_t max_codepoints;
int32_t focus_id;
int32_t* commit_pressed;
bool secure;
bool read_only;
int32_t class_name;
} TextFieldProps;
typedef struct TextAreaProps {
Rectangle bounds;
char* text;
size_t text_size;
int32_t* cursor_position;
int32_t* focused;
int32_t* scroll_y;
int32_t max_codepoints;
int32_t focus_id;
const char* placeholder;
SyntaxMode syntax;
int32_t content_version;
bool read_only;
bool wrap;
int32_t class_name;
} TextAreaProps;
#endif /* K_RUNTIME_TEXT_INPUT_PROPS_H */