|
XenevaOS
|
#include "layout.h"#include "dom.h"#include <stdlib.h>#include <string.h>#include <stdio.h>#include <stdbool.h>#include <_xeneva.h>#include <sys/_kefile.h>
Classes | |
| struct | NsLayoutBox |
| struct | NsTextPool |
| struct | NsInlineItem |
| struct | NsInlineList |
| struct | NsLineCtx |
| struct | NsFlexItem |
| struct | NsClip |
Macros | |
| #define | NS_BOX_BLOCK 1 |
| #define | NS_BOX_LINE 2 |
| #define | NS_BOX_RUN 3 |
| #define | NS_BOX_CONTROL 4 |
| #define | NS_BOX_IMAGE 5 |
| #define | NS_BOX_INLINE_BLOCK 6 |
| #define | NS_LAYOUT_MAX_LINKS 640 |
| #define | NS_LAYOUT_MAX_DEPTH 64 |
| #define | NS_PLAIN_MAX (256 * 1024) |
| #define | NS_LAYOUT_MAX_CONTROLS 128 |
Typedefs | |
| typedef struct NsLayoutBox | NsLayoutBox |
| typedef struct NsTextPool | NsTextPool |
Functions | |
| void | NsLayoutSetImageLookup (NsImageLookupFn fn) |
| void | NsLayoutSetInlineSvgLookup (NsInlineSvgLookupFn fn) |
| int | NsLayoutBuild (NsCssNode *root, int viewport_w, int viewport_h) |
| void | NsLayoutDestroy (void) |
| int | NsLayoutActive (void) |
| int | NsLayoutPageHeight (void) |
| int | NsLayoutPageWidth (void) |
| int | NsLayoutContentHeight (void) |
| void | NsLayoutStats (int *blocks, int *lines, int *runs, int *links) |
| uint32_t | NsLayoutPageBg (void) |
| void | NsLayoutPaint (ChCanvas *canv, int vx, int vy, int vw, int vh, int scroll_y) |
| int | NsLayoutHitLink (int x, int y, char *href, size_t hrefsz) |
| int | NsLayoutHitControl (int x, int y, NsCssNode **node) |
| void | NsLayoutSetEdit (NsCssNode *node, const char *text, int cursor, int active) |
| void | NsLayoutDumpBoxes (void) |
| void | NsLayoutPrintLinks (int max) |
| int | NsLayoutPaintTest (int w, int h, int scroll) |
| int | NsLayoutDumpPpm (const char *path, int w, int h, int scroll) |
| const char * | NsLayoutText (void) |
| #define NS_BOX_BLOCK 1 |
Block/inline layout and painting. See layout.h.
Scope: CSS 2.1 block formatting, inline text runs, line wrapping, margins/padding/borders/backgrounds, links, lists, and simple form controls. Tables/floats/positioning degrade to document flow rather than disappearing.
| #define NS_BOX_CONTROL 4 |
| #define NS_BOX_IMAGE 5 |
| #define NS_BOX_INLINE_BLOCK 6 |
| #define NS_BOX_LINE 2 |
| #define NS_BOX_RUN 3 |
| #define NS_LAYOUT_MAX_CONTROLS 128 |
| #define NS_LAYOUT_MAX_DEPTH 64 |
| #define NS_LAYOUT_MAX_LINKS 640 |
| #define NS_PLAIN_MAX (256 * 1024) |
| typedef struct NsLayoutBox NsLayoutBox |
| typedef struct NsTextPool NsTextPool |
| int NsLayoutActive | ( | void | ) |
| int NsLayoutBuild | ( | NsCssNode * | root, |
| int | viewport_w, | ||
| int | viewport_h | ||
| ) |
| int NsLayoutContentHeight | ( | void | ) |
| void NsLayoutDestroy | ( | void | ) |
| void NsLayoutDumpBoxes | ( | void | ) |
| int NsLayoutDumpPpm | ( | const char * | path, |
| int | w, | ||
| int | h, | ||
| int | scroll | ||
| ) |
| int NsLayoutHitControl | ( | int | x, |
| int | y, | ||
| NsCssNode ** | node | ||
| ) |
| int NsLayoutHitLink | ( | int | x, |
| int | y, | ||
| char * | href, | ||
| size_t | hrefsz | ||
| ) |
| uint32_t NsLayoutPageBg | ( | void | ) |
| int NsLayoutPageHeight | ( | void | ) |
| int NsLayoutPageWidth | ( | void | ) |
| void NsLayoutPaint | ( | ChCanvas * | canv, |
| int | vx, | ||
| int | vy, | ||
| int | vw, | ||
| int | vh, | ||
| int | scroll_y | ||
| ) |
| int NsLayoutPaintTest | ( | int | w, |
| int | h, | ||
| int | scroll | ||
| ) |
| void NsLayoutPrintLinks | ( | int | max | ) |
| void NsLayoutSetEdit | ( | NsCssNode * | node, |
| const char * | text, | ||
| int | cursor, | ||
| int | active | ||
| ) |
| void NsLayoutSetImageLookup | ( | NsImageLookupFn | fn | ) |
| void NsLayoutSetInlineSvgLookup | ( | NsInlineSvgLookupFn | fn | ) |
| void NsLayoutStats | ( | int * | blocks, |
| int * | lines, | ||
| int * | runs, | ||
| int * | links | ||
| ) |
| const char * NsLayoutText | ( | void | ) |
| int h |
| const char* href |
| NsCssNode* node |
| int w |
| int x |
| int y |