lv_xml.h

Functions

void lv_xml_init(void)
void *lv_xml_create(lv_obj_t *parent, const char *name, const char **attrs)
void *lv_xml_create_from_ctx(lv_obj_t *parent, lv_xml_component_ctx_t *parent_ctx, lv_xml_component_ctx_t *ctx, const char **attrs)
lv_result_t lv_xml_register_font(lv_xml_component_ctx_t *ctx, const char *name, const lv_font_t *font)
const lv_font_t *lv_xml_get_font(lv_xml_component_ctx_t *ctx, const char *name)
lv_result_t lv_xml_register_image(lv_xml_component_ctx_t *ctx, const char *name, const void *src)
const void *lv_xml_get_image(lv_xml_component_ctx_t *ctx, const char *name)
lv_result_t lv_xml_register_subject(lv_xml_component_ctx_t *ctx, const char *name, lv_subject_t *subject)

Map globally available subject name to an actual subject variable

Parameters:
  • name – name of the subject

  • subject – pointer to a subject

Returns:

LV_RESULT_OK: success

lv_subject_t *lv_xml_get_subject(lv_xml_component_ctx_t *ctx, const char *name)

Get a subject by name.

Parameters:
  • ctx – If specified start searching in that component's subject list, and if not found search in the global space. If NULL search in global space immediately.

  • name – Name of the subject to find.

Returns:

Pointer to the subject or NULL if not found.

lv_result_t lv_xml_register_const(lv_xml_component_ctx_t *ctx, const char *name, const char *value)
const char *lv_xml_get_const(lv_xml_component_ctx_t *ctx, const char *name)
lv_result_t lv_xml_register_event_cb(lv_xml_component_ctx_t *ctx, const char *name, lv_event_cb_t cb)
lv_event_cb_t lv_xml_get_event_cb(lv_xml_component_ctx_t *ctx, const char *name)