Move GetScrollbarReservedWidth, GetScrollbarContentWidth, and GetScrollbarSafeContentWidth into runtime/scroll_props.kry as "#extern #export" declarations, so the tracked ui_scroll_props.generated.h carries the public ABI and include/ui_scroll.h is deleted. kryon.h already includes the props header, and the API-name and smart-test path lists follow. Gates: generated-runtime-parity-test, fast-test, scroll-policy-test, and the refreshed public-API snapshot pass.
35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
/* Generated by k2c from runtime/scroll_props.kry. */
|
|
#ifndef K_RUNTIME_SCROLL_PROPS_H
|
|
#define K_RUNTIME_SCROLL_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 struct ScrollProps {
|
|
Rectangle bounds;
|
|
int32_t content_height;
|
|
int32_t* offset;
|
|
} ScrollProps;
|
|
int32_t GetScrollbarReservedWidth(int32_t max_scroll);
|
|
int32_t GetScrollbarContentWidth(int32_t content_width, int32_t max_scroll);
|
|
int32_t GetScrollbarSafeContentWidth(int32_t content_x, int32_t content_width, int32_t scrollbar_x, int32_t max_scroll);
|
|
|
|
#endif /* K_RUNTIME_SCROLL_PROPS_H */
|