Files
kryon/include/ui_capability_props.generated.h
T
waozi bdf53c1e62 Declare the capability host in its props header
Move KryCapabilitiesHas, KryCapabilityName, and KrySafeContentRect into
runtime/capability_props.kry as "#extern #export" declarations, so the tracked
ui_capability_props.generated.h carries the public ABI and
include/kry_capabilities.h is deleted. kryon.h, android_surface.h, and the
host module include the props header directly.

Gates: generated-runtime-parity-test, fast-test, k2c/k2cpp/k2go-syntax-test,
go-runtime-test, examples-syntax-test, and the refreshed public-API snapshot
pass.
2026-09-21 01:47:26 -03:00

57 lines
1.5 KiB
C

/* Generated by k2c from runtime/capability_props.kry. */
#ifndef K_RUNTIME_CAPABILITY_PROPS_H
#define K_RUNTIME_CAPABILITY_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"
typedef enum KryCapability {
KRY_CAP_FILE_PICKER = 1,
KRY_CAP_FILE_SAVE = 2,
KRY_CAP_SHARE = 4,
KRY_CAP_SECURE_STORE = 8,
KRY_CAP_BIOMETRIC_UNLOCK = 16,
KRY_CAP_NOTIFICATIONS = 32,
KRY_CAP_WAKELOCK = 64,
KRY_CAP_CLIPBOARD = 128,
} KryCapability;
typedef struct KrySafeArea {
int left;
int top;
int right;
int bottom;
} KrySafeArea;
typedef struct KryViewportSpec {
int width;
int height;
KrySafeArea safe_area;
int padding;
int reserved_top;
int reserved_bottom;
int min_content_width;
} KryViewportSpec;
int32_t KryCapabilitiesHas(int32_t capabilities, KryCapability capability);
const char* KryCapabilityName(KryCapability capability);
Rectangle KrySafeContentRect(KryViewportSpec spec);
#endif /* K_RUNTIME_CAPABILITY_PROPS_H */