|
libwebsockets
Lightweight C library for HTML5 websockets
|
#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | lws_dlo_dim_t |
| struct | lws_font_glyph |
| struct | lws_display_id |
| struct | lws_dlo |
| struct | lws_circle |
| struct | lws_dlo_rect |
| struct | lws_dlo_circle |
| struct | lws_dlo_hit |
| struct | lws_font_choice |
| struct | lws_display_font |
| struct | lws_dlo_filesystem |
| struct | lws_dlo_text |
| struct | lws_dlo_rasterize |
| struct | lws_dlo_png |
| struct | lws_dlo_jpeg |
| struct | lws_dlo_svg |
| struct | lws_dlo_gif |
| struct | lws_dlo_image_t |
| struct | lws_displaylist |
| struct | lws_dl_rend |
| struct | lws_display_render_stack |
| struct | lws_display_render_state |
| struct | lws_dlo_ss_create_info_t |
| union | lws_dlo_image_t.u |
Macros | |
| #define | LWSDC_RGBA(_r, _g, _b, _a) |
| #define | LWSDC_R(_c) |
| #define | LWSDC_G(_c) |
| #define | LWSDC_B(_c) |
| #define | LWSDC_ALPHA(_c) |
| #define | RGB_TO_Y(_r, _g, _b) |
| #define | PALETTE_RGBY(_r, _g, _b) |
| #define | LWSDLO_TEXT_FLAG_WRAP (1 << 0) |
| #define | LWS_DLO_ASSET_BLOB_DEFAULT_MAX_FOOTPRINT (64 * 1024 * 1024) |
| #define | LWS_DLO_ASSET_BLOB_MAX_PAYLOAD (16 * 1024 * 1024) |
| #define | LWS_DLO_ASSET_L1_MAX_FOOTPRINT (8 * 1024 * 1024) |
| #define | LWS_DLO_ASSET_L1_MAX_ITEMS 256 |
| #define | LWS_DLO_ASSET_CACHE_EXPIRY_S (24 * 60 * 60) |
| #define | lws_dlo_image_width(_u) |
| #define | lws_dlo_image_height(_u) |
| #define | lws_dlo_image_metadata_scan(_u) |
Variables | |
| LWS_VISIBLE LWS_EXTERN_FOR_DATA const struct lws_plat_file_ops | lws_dlo_fops |
| struct lws_dlo_dim_t |
| struct lws_font_glyph |
| struct lws_display_id |
| Data Fields | ||
|---|---|---|
| lws_dll2_t | list | |
| char | id[16] | |
| lws_box_t | box | |
| void * | priv_user | |
| void * | priv_driver | |
| char | exists | |
| char | iframe | |
| struct lws_dlo |
| Data Fields | ||
|---|---|---|
| lws_dll2_t | list | |
| lws_dll2_t | col_list | |
| lws_dll2_t | row_list | |
| lws_dll2_owner_t | children | |
| lws_dll2_owner_t | table_cols | |
| lws_dll2_owner_t | table_rows | |
| struct lws_dlo * | abut_x | |
| struct lws_dlo * | abut_y | |
| lws_dlo_destroy_t | _destroy | |
| lws_dlo_renderer_t | render | |
| lws_fx_t | margin[4] | |
| lws_fx_t | padding[4] | |
| lws_display_id_t * | id | |
| lws_box_t | box | |
| lws_display_colour_t | dc | |
| uint8_t | budget | |
| int16_t | base_up | |
| uint8_t | flag_toplevel:1 | |
| uint8_t | flag_block:1 | |
| uint8_t | flag_row:1 | |
| uint8_t | flag_cell:1 | |
| uint8_t | flag_abs:1 | |
| uint8_t | flag_float:1 | |
| uint8_t | flag_zraise:1 | |
| uint8_t | flag_online:1 | |
| uint8_t | flag_bg_homed:1 | |
| uint8_t | flag_inline_bg:1 | |
| uint8_t | flag_flex_item:1 | |
| uint8_t | flag_fixed_h:1 | |
| uint8_t | flag_abs_stretch:1 | |
| uint8_t | flex_grow | |
| uint8_t | align_self | |
| struct lws_circle |
| struct lws_dlo_rect |
| struct lws_dlo_circle |
| struct lws_dlo_hit |
| struct lws_font_choice |
| struct lws_display_font |
| Data Fields | ||
|---|---|---|
| lws_dll2_t | list | |
| lws_font_choice_t | choice | |
| const uint8_t * | data | |
| uint8_t * | priv | |
| size_t | data_len | |
| lws_dlo_renderer_t | renderer | |
| lws_dlo_image_glyph_t | image_glyph | |
| lws_fx_t | em | |
| lws_fx_t | ex | |
| struct lws_dlo_filesystem |
| Data Fields | ||
|---|---|---|
| lws_dll2_t | list | |
| const char * | name | |
| const void * | data | |
| size_t | len | |
| struct lws_dlo_text |
| Data Fields | ||
|---|---|---|
| lws_dlo_t | dlo | |
| const lws_display_font_t * | font | |
| lws_dll2_owner_t | glyphs | |
| lws_box_t | bounding_box | |
| const struct lws_surface_info * | ic | |
| struct lwsac * | ac_glyphs | |
| uint8_t * | line | |
| uint16_t | curr | |
| uint16_t | glyph_row | |
| char * | text | |
| uint8_t * | kern | |
| size_t | text_len | |
| lws_display_list_coord_t | clkernpx | |
| lws_display_list_coord_t | cwidth | |
| lws_fx_t | indent | |
| uint32_t | flags | |
| int16_t | font_y_baseline | |
| int16_t | font_height | |
| int16_t | font_line_height | |
| int16_t | group_height | |
| int16_t | group_y_baseline | |
| lws_fx_t | _cwidth | |
| struct lws_dlo_rasterize |
| Data Fields | ||
|---|---|---|
| lws_dll2_owner_t | owner | |
| lws_sorted_usec_list_t | sul | |
| int | lines | |
| struct lws_dlo_png |
| Data Fields | ||
|---|---|---|
| lws_dlo_t | dlo | |
| lws_flow_t | flow | |
| char | name[25] | |
| lws_upng_t * | png | |
| uint32_t | emitted | |
| uint8_t * | row | |
| uint32_t | row_len | |
| lws_reclaimable_t | rc | |
| uint8_t | evicted | |
| uint8_t | yields | |
| struct lws_dlo_jpeg |
| Data Fields | ||
|---|---|---|
| lws_dlo_t | dlo | |
| lws_flow_t | flow | |
| char | name[25] | |
| lws_jpeg_t * | j | |
| uint32_t | emitted | |
| uint8_t * | row | |
| uint32_t | row_len | |
| lws_reclaimable_t | rc | |
| uint8_t | evicted | |
| struct lws_dlo_svg |
| Data Fields | ||
|---|---|---|
| lws_dlo_t | dlo | |
| lws_flow_t | flow | |
| char | name[25] | |
| lws_svg_t * | svg | |
| struct lws_dlo_gif |
| struct lws_displaylist |
| Data Fields | ||
|---|---|---|
| lws_dll2_owner_t | dl | |
| struct lws_display_state * | ds | |
| struct lws_dl_rend |
| struct lws_display_render_stack |
| struct lws_display_render_state |
| Data Fields | ||
|---|---|---|
| lws_sorted_usec_list_t | sul | |
| struct lws_display_state * | lds | |
| lws_dll2_owner_t | ids | |
| const struct lws_surface_info * | ic | |
| lws_display_render_stack_t | st[64] | |
| int | sp | |
| uint8_t * | line | |
| lws_displaylist_t | displaylist | |
| struct lws_ss_handle * | hss_html | |
| lws_display_scalar | curr | |
| lws_display_scalar | lowest_id_y | |
| char | html | |
| char | retained | |
| char | layout_clipped | |
| int32_t | viewport_h | |
| struct lws_dlo_ss_create_info_t |
| Data Fields | ||
|---|---|---|
| struct lws_context * | cx | |
| lws_displaylist_t * | dl | |
| lws_dlo_t * | dlo_parent | |
| lws_box_t * | box | |
| sul_cb_t | on_rx | |
| lws_sorted_usec_list_t * | on_rx_sul | |
| const char * | url | |
| struct lhp_ctx * | lhp | |
| lws_dlo_image_t * | u | |
| int32_t | window | |
| uint8_t | type | |
| union lws_dlo_image_t.u |
| Data Fields | ||
|---|---|---|
| lws_dlo_jpeg_t * | dlo_jpeg | |
| lws_dlo_png_t * | dlo_png | |
| lws_dlo_svg_t * | dlo_svg | |
| lws_dlo_gif_t * | dlo_gif | |
| #define LWSDC_RGBA | ( | _r, | |
| _g, | |||
| _b, | |||
| _a ) |
Definition at line 41 of file lws-dlo.h.
| #define RGB_TO_Y | ( | _r, | |
| _g, | |||
| _b ) |
| #define PALETTE_RGBY | ( | _r, | |
| _g, | |||
| _b ) |
| #define LWS_DLO_ASSET_BLOB_DEFAULT_MAX_FOOTPRINT (64 * 1024 * 1024) |
| #define LWS_DLO_ASSET_BLOB_MAX_PAYLOAD (16 * 1024 * 1024) |
| #define LWS_DLO_ASSET_L1_MAX_FOOTPRINT (8 * 1024 * 1024) |
| #define LWS_DLO_ASSET_L1_MAX_ITEMS 256 |
| #define LWS_DLO_ASSET_CACHE_EXPIRY_S (24 * 60 * 60) |
| #define lws_dlo_image_width | ( | _u | ) |
Definition at line 924 of file lws-dlo.h.
| #define lws_dlo_image_height | ( | _u | ) |
Definition at line 928 of file lws-dlo.h.
| #define lws_dlo_image_metadata_scan | ( | _u | ) |
Definition at line 933 of file lws-dlo.h.
| typedef struct lws_font_glyph lws_font_glyph_t |
| typedef lws_stateful_ret_t(* lws_dlo_renderer_t) (struct lws_display_render_state *rs) |
| typedef lws_font_glyph_t *(* lws_dlo_image_glyph_t) (struct lws_dlo_text *text, uint32_t unicode, char attach) |
| typedef struct lws_display_id lws_display_id_t |
| typedef struct lws_circle lws_circle_t |
| typedef struct lws_dlo_rect lws_dlo_rect_t |
| typedef struct lws_dlo_circle lws_dlo_circle_t |
| typedef struct lws_dlo_hit lws_dlo_hit_t |
| typedef struct lws_font_choice lws_font_choice_t |
| typedef struct lws_display_font lws_display_font_t |
| typedef struct lws_dlo_filesystem lws_dlo_filesystem_t |
| typedef struct lws_dlo_text lws_dlo_text_t |
| typedef struct lws_dlo_rasterize lws_dlo_rasterize_t |
| typedef struct lws_dlo_png lws_dlo_png_t |
| typedef struct lws_dlo_jpeg lws_dlo_jpeg_t |
| typedef struct lws_dlo_svg lws_dlo_svg_t |
| typedef struct lws_dlo_gif lws_dlo_gif_t |
| typedef struct lws_displaylist lws_displaylist_t |
| typedef struct lws_dl_rend lws_dl_rend_t |
| typedef struct lws_display_render_stack lws_display_render_stack_t |
| typedef struct lws_display_render_state lws_display_render_state_t |
| enum lws_dlo_cursor_t |
Definition at line 220 of file lws-dlo.h.
| enum lws_dlo_image_type_t |
| Enumerator | |
|---|---|
| LWSDLOSS_TYPE_JPEG | |
| LWSDLOSS_TYPE_PNG | |
| LWSDLOSS_TYPE_SVG | |
| LWSDLOSS_TYPE_GIF | |
| LWSDLOSS_TYPE_CSS | |
Definition at line 374 of file lws-dlo.h.
| LWS_VISIBLE LWS_EXTERN void lws_display_render_free_ids | ( | lws_display_render_state_t * | rs | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_display_id_t * lws_display_render_add_id | ( | lws_display_render_state_t * | rs, |
| const char * | id, | ||
| void * | priv ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_display_id_t * lws_display_render_get_id | ( | lws_display_render_state_t * | rs, |
| const char * | id ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_render_dump_ids | ( | lws_dll2_owner_t * | ids | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_dlo_contents | ( | lws_dlo_t * | parent, |
| lws_dlo_dim_t * | dim ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_dlo_adjust_dims | ( | lws_dlo_t * | dlo, |
| lws_dlo_dim_t * | dim ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_dl_init | ( | lws_displaylist_t * | dl, |
| struct lws_display_state * | ds ) |
lws_display_dl_init() - init display list object
| dl | Pointer to the display list |
| ds | Lws display state to bind the list to |
Initializes the display list dl and binds it to the display state ds.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_dl_dump | ( | lws_displaylist_t * | dl | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_list_destroy | ( | struct lws_context * | cx, |
| lws_displaylist_t * | dl ) |
lws_display_list_destroy() - destroys display list and objects on it
| cx | lws_context |
| dl | Pointer to the display list |
Destroys every DLO on the list.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_dlo_destroy | ( | lws_dlo_t ** | r | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_display_dlo_add | ( | lws_displaylist_t * | dl, |
| lws_dlo_t * | dlo_parent, | ||
| lws_dlo_t * | dlo ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_dlo_ensure_err_diff | ( | lws_dlo_t * | dlo | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_list_render_line | ( | lws_display_render_state_t * | rs | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_get_ids_boxes | ( | lws_display_render_state_t * | rs | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_dlo_rect_t * lws_display_dlo_rect_new | ( | lws_displaylist_t * | dl, |
| lws_dlo_t * | dlo_parent, | ||
| lws_box_t * | box, | ||
| const lws_fx_t * | radii, | ||
| lws_display_colour_t | dc ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_render_rect | ( | struct lws_display_render_state * | rs | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_dlo_hit_t * lws_display_dlo_hit_new | ( | lws_displaylist_t * | dl, |
| lws_dlo_t * | dlo_parent, | ||
| const lws_box_t * | box, | ||
| const char * | url, | ||
| size_t | url_len ) |
lws_display_dlo_hit_new() - add a non-printing hit region to the display list
| dl | the display list |
| dlo_parent | the dlo whose child it becomes, or NULL for the list head |
| box | its box relative to the parent, or NULL for all zeros |
| url | the url (or other metadata string) the region carries, or NULL |
| url_len | the length of url |
The url is copied into the region's own allocation. Set .fill on the result for a region that always has its parent's size, and .cursor to the lws_dlo_cursor_t the pointer should take over it.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_dlo_hit_destroy | ( | struct lws_dlo * | dlo | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_render_hit | ( | struct lws_display_render_state * | rs | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_dlo_hit_t * lws_display_dl_hit_test | ( | lws_displaylist_t * | dl, |
| int | x, | ||
| int | y, | ||
| lws_box_t * | abox ) |
lws_display_dl_hit_test() - find the hit region at a point
| dl | the display list |
| x | x in the display list's coordinates |
| y | y in the display list's coordinates |
| abox | NULL, or filled with the region's absolute box if one is hit |
Returns the topmost hit region containing the point, or NULL if none. For a laid-out html document the coordinates are those of the document, so a viewport offset must be added to a window position first.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_dlo_cursor_t lws_display_dl_cursor_at | ( | lws_displaylist_t * | dl, |
| int | x, | ||
| int | y ) |
lws_display_dl_cursor_at() - the pointer shape for a point
| dl | the display list |
| x | x in the display list's coordinates |
| y | y in the display list's coordinates |
Returns the cursor the topmost hit region containing the point asks for, or LWS_DLO_CURSOR_DEFAULT if there is none. A windowing app calls this on pointer motion and sets the platform cursor to match.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_dlo_text_t * lws_display_dlo_text_new | ( | lws_displaylist_t * | dl, |
| lws_dlo_t * | dlo_parent, | ||
| lws_box_t * | box, | ||
| const lws_display_font_t * | font ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_display_dlo_text_update | ( | lws_dlo_text_t * | text, |
| lws_display_colour_t | dc, | ||
| lws_fx_t | indent, | ||
| const char * | utf8, | ||
| size_t | text_len ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_dlo_text_measure | ( | lws_dlo_text_t * | text, |
| const char * | utf8, | ||
| size_t | text_len, | ||
| lws_fx_t * | total, | ||
| lws_fx_t * | longest_word ) |
lws_display_dlo_text_measure() - width of a string in a text dlo's font
text: a text dlo, used for its font utf8: the string text_len: its length in bytes total: set to the width if laid out on one line longest_word: set to the width of the widest space-delimited word
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_dlo_text_destroy | ( | struct lws_dlo * | dlo | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_dlo_png_t * lws_display_dlo_png_new | ( | lws_displaylist_t * | dl, |
| lws_dlo_t * | dlo_parent, | ||
| lws_box_t * | box, | ||
| const char * | name, | ||
| size_t | len ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_render_png | ( | struct lws_display_render_state * | rs | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_dlo_png_metadata_scan | ( | lws_dlo_png_t * | dp | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_dlo_png_destroy | ( | struct lws_dlo * | dlo | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_dlo_jpeg_t * lws_display_dlo_jpeg_new | ( | lws_displaylist_t * | dl, |
| lws_dlo_t * | dlo_parent, | ||
| lws_box_t * | box, | ||
| const char * | name, | ||
| size_t | len ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_render_jpeg | ( | struct lws_display_render_state * | rs | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_dlo_jpeg_metadata_scan | ( | lws_dlo_jpeg_t * | dj | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_dlo_jpeg_destroy | ( | struct lws_dlo * | dlo | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_dlo_svg_t * lws_display_dlo_svg_new | ( | lws_displaylist_t * | dl, |
| lws_dlo_t * | dlo_parent, | ||
| lws_box_t * | box, | ||
| const char * | name, | ||
| size_t | len ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_render_svg | ( | struct lws_display_render_state * | rs | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_dlo_svg_metadata_scan | ( | lws_dlo_svg_t * | ds | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_dlo_svg_destroy | ( | struct lws_dlo * | dlo | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_dlo_gif_t * lws_display_dlo_gif_new | ( | lws_displaylist_t * | dl, |
| lws_dlo_t * | dlo_parent, | ||
| lws_box_t * | box, | ||
| const char * | name, | ||
| size_t | len ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_render_gif | ( | struct lws_display_render_state * | rs | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_display_dlo_gif_metadata_scan | ( | lws_dlo_gif_t * | dg | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_display_dlo_gif_destroy | ( | struct lws_dlo * | dlo | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_display_dlo_gif_rx | ( | lws_dlo_gif_t * | dlo_gif, |
| const uint8_t * | buf, | ||
| size_t | len ) |
| LWS_VISIBLE LWS_EXTERN int lws_dlo_ss_create | ( | lws_dlo_ss_create_info_t * | i, |
| lws_dlo_t ** | pdlo ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_dlo_ss_find | ( | struct lws_context * | cx, |
| const char * | url, | ||
| lws_dlo_image_t * | u ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_dlo_ss_assets_active | ( | struct lws_context * | cx | ) |
lws_dlo_ss_assets_active() - are any document assets fetching or queued?
| cx | the lws_context |
Returns nonzero if any image or stylesheet asset is being fetched, or is queued waiting for an in-flight slot. A document whose own stream has ended should defer considering itself complete until this returns 0.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_dlo_ss_stop_any_active | ( | struct lws_context * | cx | ) |
lws_dlo_ss_stop_any_active() - destroy all tracked document assets
| cx | the lws_context |
Destroys every document asset that is fetching or queued for a fetch slot, if any. Used to tear a document down; see lws_lhp_ss_cancel().
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_dlo_ss_detach_lhp | ( | struct lws_context * | cx, |
| struct lhp_ctx * | lhp ) |
lws_dlo_ss_detach_lhp() - forget a document parser in its asset streams
| cx | the lws context |
| lhp | the html parser context that is about to be destroyed |
Asset streams (images, stylesheets) created for a document keep pointers to its parser context and to the sul and callback of the stream that owns it, to resume the parse when they have something. If that stream is destroyed while assets are still in flight (a failure of the html stream, a context destroy), call this from its DESTROYING so the assets stop referring to memory that is going away; they then finish or fail on their own and are destroyed with their dlos or by lws_dlo_ss_stop_any_active().
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_dlo_ss_renew_images | ( | struct lws_context * | cx | ) |
lws_dlo_ss_renew_images() - reset tracked images for a re-scan
| cx | the lws_context |
Image decode state only moves forwards, but a retained display list can be re-scanned at a different vertical offset (eg, an interactive viewport scrolling). This re-stashes each tracked image's payload from the document asset cache and gives it a fresh decoder, so the next scan can decode the rows the viewport wants. Images not in the cache are left as they are.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_dlo_ss_renew_image | ( | struct lws_context * | cx, |
| lws_dlo_t * | dlo ) |
lws_dlo_ss_renew_image() - re-stash one image's payload from the asset cache
| cx | the lws context |
| dlo | the png or jpeg dlo |
As lws_dlo_ss_renew_images() for one image whose payload and decoder were evicted to make room: returns 0 if it is decodable again.
| LWS_VISIBLE LWS_EXTERN struct lws_cache_ttl_lru * lws_dlo_asset_cache | ( | struct lws_context * | cx | ) |
lws_dlo_asset_cache() - get the context's document asset cache, if any
| cx | the lws_context |
Returns NULL if the context was created without dlo_asset_cache_dir, else the L1 cache handle of the context asset cache, for inspection or manual invalidation using the lws_cache_ttl apis. The cache belongs to the context and is destroyed with it.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lhp_displaylist_layout | ( | struct lhp_ctx * | ctx, |
| char | reason ) |
| LWS_VISIBLE LWS_EXTERN int lws_font_register | ( | struct lws_context * | cx, |
| const uint8_t * | data, | ||
| size_t | data_len ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_font_register_file | ( | struct lws_context * | cx, |
| const char * | path ) |
lws_font_register_file() - register an mcufont kept in a file
| cx | the lws context |
| path | the file, opened through the context's fops |
Only the face's name and metrics stay in memory. Its dictionary and the glyph strings text needs are read in when text is set in it, and are reclaimable heap occupants: they are given back when memory runs short and read again when next needed.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_fonts_register_dir | ( | struct lws_context * | cx, |
| const char * | dirpath ) |
lws_fonts_register_dir() - register every .mcufont in a directory
| cx | the lws context |
| dirpath | the directory to scan |
Returns the number of faces registered (0 if the directory can't be read or holds none).
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN const lws_display_font_t * lws_font_choose | ( | struct lws_context * | cx, |
| const lws_font_choice_t * | hints ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_fonts_destroy | ( | struct lws_context * | cx | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_dlo_filesystem_t * lws_dlo_file_register | ( | struct lws_context * | cx, |
| const lws_dlo_filesystem_t * | f ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_dlo_file_unregister | ( | lws_dlo_filesystem_t ** | f | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_dlo_file_unregister_by_name | ( | struct lws_context * | cx, |
| const char * | name ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN const lws_dlo_filesystem_t * lws_dlo_file_choose | ( | struct lws_context * | cx, |
| const char * | name ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_dlo_file_destroy | ( | struct lws_context * | cx | ) |
| LWS_VISIBLE LWS_EXTERN_FOR_DATA const struct lws_plat_file_ops lws_dlo_fops |