XenevaOS
Loading...
Searching...
No Matches
Typedefs | Functions
layout.h File Reference
#include <stdint.h>
#include <stddef.h>
#include "css.h"
#include <chitralekha.h>
#include <font.h>
#include <draw.h>
Include dependency graph for layout.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef const uint32_t *(* NsImageLookupFn) (const char *src, int *width, int *height, int *intrinsic_width, int *intrinsic_height)
 
typedef const uint32_t *(* NsInlineSvgLookupFn) (NsCssNode *node, int *width, int *height, int *intrinsic_width, int *intrinsic_height)
 

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)
 
const char * NsLayoutText (void)
 
void NsLayoutPrintLinks (int max)
 
void NsLayoutDumpBoxes (void)
 
int NsLayoutPaintTest (int w, int h, int scroll)
 
int NsLayoutDumpPpm (const char *path, int w, int h, int scroll)
 

Typedef Documentation

◆ NsImageLookupFn

typedef const uint32_t *(* NsImageLookupFn) (const char *src, int *width, int *height, int *intrinsic_width, int *intrinsic_height)

Block/inline layout and painting for the XenevaOS NetSurf renderer.

Takes the NsCssNode tree produced by dom.c, resolves libcss computed styles into boxes, wraps inline text with Chitralekha font metrics and paints the resulting display list. Scrolling is in pixels.

◆ NsInlineSvgLookupFn

typedef const uint32_t *(* NsInlineSvgLookupFn) (NsCssNode *node, int *width, int *height, int *intrinsic_width, int *intrinsic_height)

Function Documentation

◆ NsLayoutActive()

int NsLayoutActive ( void  )

◆ NsLayoutBuild()

int NsLayoutBuild ( NsCssNode *  root,
int  viewport_w,
int  viewport_h 
)

◆ NsLayoutContentHeight()

int NsLayoutContentHeight ( void  )

◆ NsLayoutDestroy()

void NsLayoutDestroy ( void  )

◆ NsLayoutDumpBoxes()

void NsLayoutDumpBoxes ( void  )

◆ NsLayoutDumpPpm()

int NsLayoutDumpPpm ( const char *  path,
int  w,
int  h,
int  scroll 
)

◆ NsLayoutHitControl()

int NsLayoutHitControl ( int  x,
int  y,
NsCssNode **  node 
)

◆ NsLayoutHitLink()

int NsLayoutHitLink ( int  x,
int  y,
char *  href,
size_t  hrefsz 
)

◆ NsLayoutPageBg()

uint32_t NsLayoutPageBg ( void  )

◆ NsLayoutPageHeight()

int NsLayoutPageHeight ( void  )

◆ NsLayoutPageWidth()

int NsLayoutPageWidth ( void  )

◆ NsLayoutPaint()

void NsLayoutPaint ( ChCanvas *  canv,
int  vx,
int  vy,
int  vw,
int  vh,
int  scroll_y 
)

◆ NsLayoutPaintTest()

int NsLayoutPaintTest ( int  w,
int  h,
int  scroll 
)

◆ NsLayoutPrintLinks()

void NsLayoutPrintLinks ( int  max)

◆ NsLayoutSetEdit()

void NsLayoutSetEdit ( NsCssNode *  node,
const char *  text,
int  cursor,
int  active 
)

◆ NsLayoutSetImageLookup()

void NsLayoutSetImageLookup ( NsImageLookupFn  fn)

◆ NsLayoutSetInlineSvgLookup()

void NsLayoutSetInlineSvgLookup ( NsInlineSvgLookupFn  fn)

◆ NsLayoutStats()

void NsLayoutStats ( int *  blocks,
int *  lines,
int *  runs,
int *  links 
)

◆ NsLayoutText()

const char * NsLayoutText ( void  )