lv_switch.h

Defines

LV_SWITCH_KNOB_EXT_AREA_CORRECTION

Switch knob extra area correction factor

Enums

enum lv_switch_orientation_t

Values:

enumerator LV_SWITCH_ORIENTATION_AUTO
enumerator LV_SWITCH_ORIENTATION_HORIZONTAL
enumerator LV_SWITCH_ORIENTATION_VERTICAL

Functions

lv_obj_t *lv_switch_create(lv_obj_t *parent)

Create a switch object

Parameters:

parent – pointer to an object, it will be the parent of the new switch

Returns:

pointer to the created switch

void lv_switch_set_orientation(lv_obj_t *obj, lv_switch_orientation_t orientation)

Set the orientation of switch.

Parameters:
  • obj – pointer to switch object

  • orientation – switch orientation from lv_switch_orientation_t

lv_switch_orientation_t lv_switch_get_orientation(lv_obj_t *obj)

Get the orientation of switch.

Parameters:

obj – pointer to switch object

Returns:

switch orientation from ::lv_switch_orientation_t

Variables

const lv_obj_class_t lv_switch_class