Files
kryon/include/ui_grid_props.generated.h
T

54 lines
1.3 KiB
C

/* Generated by k2c from runtime/grid_props.kry. */
#ifndef K_RUNTIME_GRID_PROPS_H
#define K_RUNTIME_GRID_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 GridProps {
Rectangle bounds;
int32_t columns;
int32_t min_item_width;
int32_t max_columns;
int32_t gap;
int32_t padding;
uint64_t key;
} GridProps;
typedef struct GridMetrics {
Rectangle bounds;
Rectangle content;
int32_t columns;
int32_t gap;
int32_t padding;
int32_t cell_width;
} GridMetrics;
typedef struct GridCursor {
GridMetrics metrics;
Rectangle item;
int32_t x;
int32_t y;
int32_t col;
int32_t row_height;
int32_t used_height;
} GridCursor;
#endif /* K_RUNTIME_GRID_PROPS_H */