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

参数:

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

返回:

pointer to the created switch

void lv_switch_set_orientation(lv_obj_t *obj, lv_switch_orientation_t orientation)

Set the orientation of switch.

参数:
  • 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.

参数:

obj -- pointer to switch object

返回:

switch orientation from ::lv_switch_orientation_t

Variables

const lv_obj_class_t lv_switch_class