NetSurf
Functions
hints.h File Reference
#include <stdint.h>
#include <libcss/libcss.h>
Include dependency graph for hints.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

nserror css_hint_init (void)
 
void css_hint_fini (void)
 
css_error node_presentational_hint (void *pw, void *node, uint32_t *nhints, css_hint **hints)
 Callback to retrieve presentational hints for a node. More...
 
bool nscss_parse_colour (const char *data, css_color *result)
 Parser for colours specified in attribute values. More...
 

Function Documentation

◆ css_hint_fini()

void css_hint_fini ( void  )

Definition at line 599 of file hints.c.

References hint_ctx, css_hint_ctx::hints, and css_hint_ctx::len.

Referenced by nscss_fini().

Here is the caller graph for this function:

◆ css_hint_init()

nserror css_hint_init ( void  )

Definition at line 588 of file hints.c.

References hint_ctx, css_hint_ctx::hints, MAX_HINTS_PER_ELEMENT, NSERROR_NOMEM, and NSERROR_OK.

Referenced by nscss_init().

Here is the caller graph for this function:

◆ node_presentational_hint()

css_error node_presentational_hint ( void *  pw,
void *  node,
uint32_t *  nhints,
css_hint **  hints 
)

Callback to retrieve presentational hints for a node.

Parameters
[in]pwHTML document
[in]nodeDOM node
[out]nhintsnumber of hints retrieved
[out]hintsretrieved hints
Returns
CSS_OK on success, CSS_PROPERTY_NOT_SET if there is no hint for the requested property, CSS_NOMEM on memory exhaustion.

Definition at line 1628 of file hints.c.

References css_hint_anchor_color(), css_hint_bg_color(), css_hint_bg_image(), css_hint_body_color(), css_hint_caption_side(), css_hint_clean(), css_hint_color(), css_hint_float(), css_hint_font_size(), css_hint_get_hints(), css_hint_height(), css_hint_height_width_canvas(), css_hint_height_width_textarea(), css_hint_list(), css_hint_margin_hspace_vspace(), css_hint_margin_left_right_align_center(), css_hint_margin_left_right_hr(), css_hint_table_cell_border_padding(), css_hint_table_spacing_border(), css_hint_text_align_center(), css_hint_text_align_normal(), css_hint_text_align_special(), css_hint_text_align_table_special(), css_hint_vertical_align_replaced(), css_hint_vertical_align_table_cells(), css_hint_white_space_nowrap(), css_hint_width(), css_hint_width_input(), fallthrough, hint_ctx, css_hint_ctx::len, NSLOG, and nsoption_bool.

Here is the call graph for this function:

◆ nscss_parse_colour()

bool nscss_parse_colour ( const char *  data,
css_color *  result 
)

Parser for colours specified in attribute values.

Parameters
dataData to parse (NUL-terminated)
resultPointer to location to receive resulting css_color
Returns
true on success, false on invalid input
Todo:
Implement HTML5's utterly insane legacy colour parsing

Definition at line 449 of file hints.c.

References charToHex(), isHex(), parse_named_colour(), result, and SLEN.

Referenced by box_create_frameset(), box_iframe(), css_hint_anchor_color(), css_hint_bg_color(), css_hint_body_color(), css_hint_color(), css_hint_table_cell_border_padding(), and css_hint_table_spacing_border().

Here is the call graph for this function:
Here is the caller graph for this function: