Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536/* The engine's C interface; `crates/webengine/src/lib.rs` is the definition. */#ifndef WEBENGINE_H#define WEBENGINE_H
#include <stddef.h>#include <stdint.h>
#ifdef __cplusplusextern "C" {#endif
/* One element's border box in viewport coordinates, CSS px. `element` is the element's position among the document's elements in document order, <html> first. */typedef struct WebengineBox { uint32_t element; double x; double y; double width; double height;} WebengineBox;
/* Lays out a NUL-terminated UTF-8 HTML document against a width x height CSS px viewport. Returns *count boxes, a parent before its children, to be released with webengine_boxes_free; or NULL with *count 0 when html is NULL or not UTF-8, or when layout fails. */WebengineBox *webengine_layout(const char *html, double width, double height, size_t *count);
/* Releases what webengine_layout returned. NULL is ignored. */void webengine_boxes_free(WebengineBox *boxes, size_t count);
#ifdef __cplusplus}#endif
#endif