libcss
Loading...
Searching...
No Matches
Public Attributes | List of all members
css_unit_ctx Struct Reference

#include <unit.h>

Public Attributes

css_fixed viewport_width
 
css_fixed viewport_height
 
css_fixed font_size_default
 
css_fixed font_size_minimum
 
css_fixed device_dpi
 
const css_computed_styleroot_style
 
void * pw
 
const css_unit_len_measure measure
 

Detailed Description

LibCSS unit conversion context.

The client callback is optional. It is used for measuring "ch" (glyph '0' advance) and "ex" (height of the letter 'x') units. If a NULL pointer is given, LibCSS will use a fixed scaling of the "em" unit.

Member Data Documentation

◆ device_dpi

css_fixed css_unit_ctx::device_dpi

DPI of the device the style is selected for.

◆ font_size_default

css_fixed css_unit_ctx::font_size_default

Client default font size in CSS pixels.

◆ font_size_minimum

css_fixed css_unit_ctx::font_size_minimum

Client minimum font size in CSS pixels. May be zero.

◆ measure

const css_unit_len_measure css_unit_ctx::measure

Optional client callback for font measuring.

◆ pw

void* css_unit_ctx::pw

Optional client private word for measure callback.

◆ root_style

const css_computed_style* css_unit_ctx::root_style

Computed style for the document root element, needed for rem units. May be NULL, in which case font_size_default is used instead, as would be the case if rem unit is used on the root element.

◆ viewport_height

css_fixed css_unit_ctx::viewport_height

Viewport height in CSS pixels. Used if unit is vh, vw, vi, vb, vmin, or vmax.

◆ viewport_width

css_fixed css_unit_ctx::viewport_width

Viewport width in CSS pixels. Used if unit is vh, vw, vi, vb, vmin, or vmax.


The documentation for this struct was generated from the following file: