Files
kryon/include/ui_node2d_props.generated.h
T
waozi 6dadfae89b Route the web KSS layer through the generated kry module
parseWebStyleSheet now runs runtime/kss_parser.kry in declarative mode: the shared grammar lexes rule selectors, declaration spans, and foreign blocks (@keyframes, @media, @supports, @container) and the web layer only maps them to CSS. Theme overlays, typed environment axes, imports with cycle and missing-source diagnostics, layer ordering, and file:line:column provenance now behave identically on the web, and the hand-written regex KSS parser is removed. Durations convert through exact decimal shifting and integer diagnostics printing avoids float division so C, Go, and JavaScript agree. Strict and CSS-superset web suites pass; the remaining k2js syntax failure is the pre-existing ruby text regression from 4d60fab5.
2026-09-15 18:38:13 -03:00

145 lines
3.1 KiB
C

/* Generated by k2c from runtime/node2d_props.kry. */
#ifndef K_RUNTIME_NODE2D_PROPS_H
#define K_RUNTIME_NODE2D_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 "kryon_compat.generated.h"
#include "ui_image.h"
#include "kry_animation.h"
typedef enum Body2DType {
Body2DStatic = 0,
Body2DKinematic = 1,
Body2DDynamic = 2,
} Body2DType;
typedef enum Shape2DKind {
Shape2DBox = 0,
Shape2DCircle = 1,
} Shape2DKind;
typedef enum AudioKind {
AudioSound = 0,
AudioMusic = 1,
} AudioKind;
typedef struct SceneProps {
float time_scale;
int32_t physics_enabled;
Vector2 gravity;
} SceneProps;
typedef struct Node2DProps {
Vector2 position;
float rotation;
Vector2 scale;
} Node2DProps;
typedef struct Camera2DProps {
float zoom;
float rotation;
int32_t active;
} Camera2DProps;
typedef struct Sprite2DProps {
const char* asset_path;
Rectangle source;
Vector2 size;
Color tint;
ImageFit fit;
} Sprite2DProps;
typedef struct Light2DProps {
float radius;
Color color;
float energy;
int32_t enabled;
} Light2DProps;
typedef struct Body2DProps {
Body2DType body_type;
int32_t fixed_rotation;
float gravity_scale;
int32_t body_id_index;
int16_t body_id_world;
int16_t body_id_gen;
} Body2DProps;
typedef struct CollisionShape2DProps {
Shape2DKind shape_kind;
Vector2 size;
int32_t is_sensor;
} CollisionShape2DProps;
typedef struct Area2DProps {
int32_t monitoring;
int32_t last_enter_body;
int32_t last_exit_body;
} Area2DProps;
typedef struct AnimationPlayerProps {
Animation anims[4];
int32_t anim_count;
int32_t current;
float time;
int32_t playing;
} AnimationPlayerProps;
typedef struct AnimatedSprite2DProps {
const char* asset_path;
int32_t frame_count;
int32_t frames_per_row;
int32_t frame_w;
int32_t frame_h;
float fps;
Vector2 size;
Color tint;
float time;
} AnimatedSprite2DProps;
typedef struct TileMapProps {
const char* asset_path;
int32_t tile_w;
int32_t tile_h;
int32_t tiles_per_row;
int32_t map_w;
int32_t map_h;
int32_t tile_px_w;
int32_t tile_px_h;
const int* tiles;
Color tint;
} TileMapProps;
typedef struct AudioSourceProps {
const char* asset_path;
AudioKind kind;
float volume;
float pitch;
int32_t loop;
int32_t playing;
int32_t loaded;
void* handle;
} AudioSourceProps;
SceneProps ScenePropsDefault(void);
float SceneTimeScaleFor(float time_scale);
Node2DProps Node2DPropsDefault(void);
#endif /* K_RUNTIME_NODE2D_PROPS_H */