Used as the event parameter of ::LV_EVENT_COVER_CHECK to check if an area is covered by the object or not.
In the event use const lv_area_t * area = lv_event_get_cover_area(e) to get the area to check
and lv_event_set_cover_res(e, res) to set the result.
Store some info to speed up drawing of very large texts
It takes a lot of time to get the first visible character because
all the previous characters needs to be checked to calculate the positions.
This structure stores an earlier (e.g. at -1000 px) coordinate and the index of that line.
Therefore the calculations can start from here.
Groups can be used to logically hold objects so that they can be individually focused.
They are NOT for laying out objects on a screen (try layouts for that).
Image decoder args.
It determines how to decoder an image, e.g. whether to premultiply the alpha or not.
It should be passed to lv_img_decoder_open() function. If NULL is provided, default
args are used.
Map codepoints to a glyph_dscs
Several formats are supported to optimize memory usage
See https://github.com/lvgl/lv_font_conv/blob/master/doc/font_spec.md
The image data is compressed, so decoder needs to decode image firstly.
If this flag is set, the whole image will be decompressed upon decode, and
get_area_cb won’t be necessary.
For RGB map of the image data, mark if it’s pre-multiplied with alpha.
For indexed image, this bit indicated palette data is pre-multiplied with alpha.
The buffer(s) has to be screen sized and LVGL will render into the correct location of the buffer.
This way the buffer always contain the whole image. Only the changed ares will be updated.
With 2 buffers the buffers’ content are kept in sync automatically and in flush_cb only address change is required.
Use the buffer(s) to render the screen is smaller parts.
This way the buffers can be smaller then the display to save RAM. At least 1/10 screen size buffer(s) are recommended.
Waiting for an other task to be finished.
For example in case of LV_DRAW_TASK_TYPE_LAYER (used to blend a layer)
is blocked until all the draw tasks of the layer is rendered.
The draw task is being rendered. This draw task needs to be finished before
lv_draw_get_available_task and lv_draw_get_next_available_task would
return any depending draw tasks.
The draw task is added to the command queue of the draw unit.
As the queued task are executed in order it’s possible to queue multiple draw task
(for the same draw unit) even if they are depending on each other.
Therefore lv_draw_get_available_task and lv_draw_get_next_available_task can return
draw task for the same draw unit even if a dependent draw task is not finished ready yet.
< An area is invalidated (marked for redraw). lv_event_get_param(e)
returns a pointer to an lv_area_t object with the coordinates of the
area to be invalidated. The area can be freely modified if needed to
adapt it a special requirement of the display. Usually needed with
monochrome displays to invalidate N x 8 rows or columns in one pass.
Simple layer means that the layer can be rendered in chunks.
For example with opa_layered = 140 it’s possible to render only 10 lines
from the layer. When it’s ready go to the next 10 lines.
It avoids large memory allocations for the layer buffer.
The buffer size for a chunk can be set by LV_DRAW_LAYER_SIMPLE_BUF_SIZE in lv_conf.h.
The widget is transformed and cannot be rendered in chunks.
It’s because - due to the transformations - pixel outside of
a given area will also contribute to the final image.
In this case there is no limitation on the buffer size.
LVGL will allocate as large buffer as needed to render the transformed area.
To prevent overflow, insert breaks between any two characters.
Otherwise breaks are inserted at word boundaries, as configured via LV_TXT_BREAK_CHARS
or according to LV_TXT_LINE_BREAK_LONG_LEN, LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN,
and LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN.
Convert a letter index (in the encoded text) to byte index.
E.g. in UTF-8 “AÁRT” index of ‘R’ is 2 but start at byte 3 because ‘Á’ is 2 bytes long
@param txt a ‘\0’ terminated UTF-8 string
@param utf8_id character index
@return byte index of the ’enc_id’th letter
Convert a byte index (in an encoded text) to character index.
E.g. in UTF-8 “AÁRT” index of ‘R’ is 2 but start at byte 3 because ‘Á’ is 2 bytes long
@param txt a ‘\0’ terminated UTF-8 string
@param byte_id byte index
@return character index of the letter at ’byte_id’th position
Decode the next encoded character from a string.
@param txt pointer to ‘\0’ terminated string
@param i_start start index in ‘txt’ where to start.
After the call it will point to the next encoded char in ‘txt’.
NULL to use txt[0] as index
@return the decoded Unicode character or 0 on invalid data code
Get the number of characters (and NOT bytes) in a string.
E.g. in UTF-8 “ÁBC” is 3 characters (but 4 bytes)
@param txt a ‘\0’ terminated char string
@return number of characters
Convert a Unicode letter to encoded
@param letter_uni a Unicode letter
@return Encoded character in Little Endian to be compatible with C chars (e.g. ‘Á’, ‘Ü’)
Delete an animation by getting the animated variable from a.
Only animations with exec_cb will be deleted.
This function exists because it’s logical that all anim. functions receives an
lv_anim_t as their first parameter. It’s not practical in C but might make
the API more consequent and makes easier to generate bindings.
@param a pointer to an animation.
@param exec_cb a function pointer which is animating ‘var’,
or NULL to ignore it and delete all the animations of ’var
@return true: at least 1 animation is deleted, false: no animation is deleted
Get the animation of a variable and its exec_cb.
This function exists because it’s logical that all anim. functions receives an
lv_anim_t as their first parameter. It’s not practical in C but might make
the API more consequent and makes easier to generate bindings.
@param a pointer to an animation.
@param exec_cb a function pointer which is animating ‘var’, or NULL to return first matching ‘var’
@return pointer to the animation.
Delete animation(s) of a variable with a given animator function
@param var pointer to variable
@param exec_cb a function pointer which is animating ‘var’,
or NULL to ignore it and delete all the animations of ’var
@return true: at least 1 animation is deleted, false: no animation is deleted
Get the animation of a variable and its exec_cb.
@param var pointer to variable
@param exec_cb a function pointer which is animating ‘var’, or NULL to return first matching ‘var’
@return pointer to the animation.
Get the repeat count of the animation.
@param a pointer to an initialized lv_anim_t variable
@return the repeat count or LV_ANIM_REPEAT_INFINITE for infinite repetition. 0: disabled repetition.
Get the user_data field of the animation
@param a pointer to an initialized lv_anim_t variable
@return the pointer to the custom user_data of the animation
Initialize an animation variable.
E.g.:
lv_anim_t a;
lv_anim_init(&a);
lv_anim_set_…(&a);
lv_anim_start(&a);
@param a pointer to an lv_anim_t variable to initialize
A custom cubic bezier animation path, need to specify cubic-parameters in a->parameter.bezier3
@param a pointer to an animation
@return the current value to set
Calculate the current value of an animation applying step characteristic.
(Set end value on the end of the animation)
@param a pointer to an animation
@return the current value to set
Manually refresh the state of the animations.
Useful to make the animations running in a blocking process where
lv_timer_handler can’t run for a while.
Shouldn’t be used directly because it is called in lv_refr_now().
Resolve the speed (created with lv_anim_speed or lv_anim_speed_clamped) to time
based on start and end values.
@param speed return values of lv_anim_speed or lv_anim_speed_clamped
@param start the start value of the animation
@param end the end value of the animation
@return the time required to get from start to end with the given speed setting
Set parameter for cubic bezier path
@param a pointer to an initialized lv_anim_t variable
@param x1 first control point X
@param y1 first control point Y
@param x2 second control point X
@param y2 second control point Y
Set a function call when the animation is completed
@param a pointer to an initialized lv_anim_t variable
@param completed_cb a function call when the animation is fully completed
Similar to lv_anim_set_exec_cb but lv_anim_custom_exec_cb_t receives
lv_anim_t * as its first parameter instead of void *.
This function might be used when LVGL is bound to other languages because
it’s more consistent to have lv_anim_t * as first parameter.
@param a pointer to an initialized lv_anim_t variable
@param exec_cb a function to execute.
Set a delay before starting the animation
@param a pointer to an initialized lv_anim_t variable
@param delay delay before the animation in milliseconds
Set a function call when the animation is deleted.
@param a pointer to an initialized lv_anim_t variable
@param deleted_cb a function call when the animation is deleted
Set a whether the animation’s should be applied immediately or only when the delay expired.
@param a pointer to an initialized lv_anim_t variable
@param en true: apply the start value immediately in lv_anim_start;
false: apply the start value only when delay ms is elapsed and the animations really starts
Set a function to animate var
@param a pointer to an initialized lv_anim_t variable
@param exec_cb a function to execute during animation
LVGL’s built-in functions can be used.
E.g. lv_obj_set_x
Set a function to use the current value of the variable and make start and end value
relative to the returned current value.
@param a pointer to an initialized lv_anim_t variable
@param get_value_cb a function call when the animation starts
Set the path (curve) of the animation.
@param a pointer to an initialized lv_anim_t variable
@param path_cb a function to set the current value of the animation.
Make the animation repeat itself.
@param a pointer to an initialized lv_anim_t variable
@param cnt repeat count or LV_ANIM_REPEAT_INFINITE for infinite repetition. 0: to disable repetition.
Set a delay before repeating the animation.
@param a pointer to an initialized lv_anim_t variable
@param delay delay in milliseconds before repeating the animation.
Make the animation to play back to when the forward direction is ready
@param a pointer to an initialized lv_anim_t variable
@param delay delay in milliseconds before starting the playback animation.
Make the animation to play back to when the forward direction is ready
@param a pointer to an initialized lv_anim_t variable
@param duration duration of playback animation in milliseconds. 0: disable playback
Set a function call when the animation really starts (considering delay)
@param a pointer to an initialized lv_anim_t variable
@param start_cb a function call when the animation starts
Set the start and end values of an animation
@param a pointer to an initialized lv_anim_t variable
@param start the start value
@param end the end value
Store the speed as a special value which can be used as time in animations.
It will be converted to time internally based on the start and end values.
The return value can be used as a constant with multiple animations
and let LVGL convert the speed to time based on the actual values.
LIMITATION: the max time stored this way can be 10,000 ms.
@param speed the speed of the animation in with unit / sec resolution in 0..10k range
@return a special value which can be used as an animation time
@note internally speed is stored as 10 unit/sec
Store the speed as a special value which can be used as time in animations.
It will be converted to time internally based on the start and end values.
The return value can be used as a constant with multiple animations
and let LVGL convert the speed to time based on the actual values.
@param speed the speed of the animation in as unit / sec resolution in 0..10k range
@param min_time the minimum time in 0..10k range
@param max_time the maximum time in 0..10k range
@return a special value in where all three values are stored and can be used as an animation time
@note internally speed is stored as 10 unit/sec
@note internally min/max_time are stored with 10 ms unit
Calculate the time of an animation based on its speed, start and end values.
It simpler than lv_anim_speed or lv_anim_speed_clamped as it converts
speed, start, and end to a time immediately.
As it’s simpler there is no limit on the maximum time.
@param speed the speed of the animation
@param start the start value
@param end the end value
@return the time of the animation in milliseconds
Create an animation
@param a an initialized ‘anim_t’ variable. Not required after call.
@return pointer to the created animation (different from the a parameter)
Add animation to the animation timeline.
@param at pointer to the animation timeline.
@param start_time the time the animation started on the timeline, note that start_time will override the value of delay.
@param a pointer to an animation.
Get the wait time when playing from the very start, or reverse from the very end.
@param at pointer to an animation timeline
@return the remaining time in milliseconds
Get the progress of the animation timeline.
@param at pointer to the animation timeline.
@return return value 0~65535 to map 0~100% animation progress.
Merge (add) all animations of a timeline to another
@param dest merge animation into this timeline
@param src merge the animations of this timeline
@param delay add the animations with this extra delay
Set the time to wait before starting the animation.
Applies only when playing from the very start, or reverse from the very end.
@param at pointer to an animation timeline
@param delay the delay time in milliseconds
Set the progress of the animation timeline.
@param at pointer to the animation timeline.
@param progress set value 0~65535 to map 0~100% animation progress.
Make the animation timeline repeat itself.
@param at pointer to the animation timeline.
@param cnt repeat count or LV_ANIM_REPEAT_INFINITE for infinite repetition. 0: to disable repetition.
Set a delay before repeating the animation timeline.
@param at pointer to the animation timeline.
@param delay delay in milliseconds before repeating the animation timeline.
Set the user_data of a an animation timeline
@param at pointer to the animation timeline.
@param user_data pointer to any data. Only the pointer will be saved.
Create an animation image objects
@param parent pointer to an object, it will be the parent of the new button
@return pointer to the created animation image object
Set a function call when the animation is completed
@param obj pointer to an animation image object
@param completed_cb a function call when the animation is completed
Set the image animation repeatedly play times.
@param obj pointer to an animation image object
@param count the number of times to repeat the animation
Make the image animation to play back to when the forward direction is ready.
@param obj pointer to an animation image object
@param duration delay in milliseconds before starting the playback image animation.
Make the image animation to play back to when the forward direction is ready.
@param obj pointer to an animation image object
@param duration the duration of the playback image animation in milliseconds. 0: disable playback
Set the images source for flip playback of animation image.
@param obj pointer to an animation image object
@param dsc pointer to a series images
@param num images’ number
Set a function call when the animation image really starts (considering delay)
@param obj pointer to an animation image object
@param start_cb a function call when the animation is start
Align an object to the current position of the arc (knob)
@param obj pointer to an arc object
@param obj_to_align pointer to an object to align
@param r_offset consider the radius larger with this value (< 0: for smaller radius)
Get the start angle of an arc.
@param obj pointer to an arc object
@return the start angle [0..360] (if LV_USE_FLOAT is enabled it can be fractional too.)
Get the end angle of an arc background.
@param obj pointer to an arc object
@return the end angle [0..360] (if LV_USE_FLOAT is enabled it can be fractional too.)
Get the start angle of an arc background.
@param obj pointer to an arc object
@return the start angle [0..360] (if LV_USE_FLOAT is enabled it can be fractional too.)
Rotate an object to the current position of the arc (knob)
@param obj pointer to an arc object
@param obj_to_rotate pointer to an object to rotate
@param r_offset consider the radius larger with this value (< 0: for smaller radius)
Set the start and end angles
@param obj pointer to an arc object
@param start the start angle (if LV_USE_FLOAT is enabled it can be fractional too.)
@param end the end angle (if LV_USE_FLOAT is enabled it can be fractional too.)
Set the start and end angles of the arc background
@param obj pointer to an arc object
@param start the start angle (if LV_USE_FLOAT is enabled it can be fractional too.)
@param end the end angle (if LV_USE_FLOAT is enabled it can be fractional too.)
Set the start angle of an arc background. 0 deg: right, 90 bottom etc.
@param obj pointer to an arc object
@param end the end angle (if LV_USE_FLOAT is enabled it can be fractional too.)
Set the start angle of an arc background. 0 deg: right, 90 bottom, etc.
@param obj pointer to an arc object
@param start the start angle (if LV_USE_FLOAT is enabled it can be fractional too.)
Set the end angle of an arc. 0 deg: right, 90 bottom, etc.
@param obj pointer to an arc object
@param end the end angle (if LV_USE_FLOAT is enabled it can be fractional too.)
Set the start angle of an arc. 0 deg: right, 90 bottom, etc.
@param obj pointer to an arc object
@param start the start angle. (if LV_USE_FLOAT is enabled it can be fractional too.)
Get the angle size of an arc label.
@param obj pointer to an arc label object
@return the end angle [0..360] (if LV_USE_FLOAT is enabled it can be fractional too.)
Get the start angle of an arc label.
@param obj pointer to an arc label object
@return the start angle [0..360] (if LV_USE_FLOAT is enabled it can be fractional too.)
Get the text angle for an arc label object.
@note The text angle is calculated at runtime. You can get the updated value
after the arclabel’s size has been updated.
Returns the real rendered text angle in degrees except in
LV_ARCLABEL_OVERFLOW_VISIBLE mode.
@param obj pointer to an arc label object
@return the text angle (if LV_USE_FLOAT is enabled it can be fractional too.)
Set the end angle of an arc. 0 deg: right, 90 bottom, etc.
@param obj pointer to an arc label object
@param size the angle size (if LV_USE_FLOAT is enabled it can be fractional too.)
Set the start angle of an arc. 0 deg: right, 90 bottom, etc.
@param obj pointer to an arc label object
@param start the start angle. (if LV_USE_FLOAT is enabled it can be fractional too.)
Set the end overlap behavior for an arc label object.
This controls how text is handled when it would overlap at the end of a 360-degree arc.
@param obj pointer to an arc label object
@param overlap set the arc label’s end overlap behavior
Set the overflow behavior for an arc label object.
@param obj pointer to an arc label object
@param overflow the overflow mode (visible, ellipsis, clip)
Enable the recoloring by in-line commands
@param obj pointer to an arc label object
@param en true: enable recoloring, false: disable
Example: “This is a #ff0000 red# word”
Sets a new static text for the arc label or refreshes it with the current text.
The ‘text’ must remain valid in memory; the arc label does not manage its lifecycle.
Align an area to another
@param base an area where the other will be aligned
@param to_align the area to align
@param align LV_ALIGN_...
@param ofs_x X offset
@param ofs_y Y offset
Get resulting sub areas after removing the common parts of two areas from the first area
@param res_p pointer to an array of areas with a count of 4, the resulting areas will be stored here
@param a1_p pointer to the first area
@param a2_p pointer to the second area
@return number of results (max 4) or -1 if no intersect
Get the common parts of two areas
@param res_p pointer to an area, the result will be stored her
@param a1_p pointer to the first area
@param a2_p pointer to the second area
@return false: the two area has NO common parts, res_p is invalid
Check if an area is fully on another
@param ain_p pointer to an area which could be in ‘aholder_p’
@param aholder_p pointer to an area which could involve ‘ain_p’
@param radius radius of aholder_p (e.g. for rounded rectangle)
@return true: ain_p is fully inside aholder_p
Check if two area has common parts
@param a1_p pointer to an area.
@param a2_p pointer to another area
@return false: a1_p and a2_p has no common parts
Check if an area is fully out of another
@param aout_p pointer to an area which could be in ‘aholder_p’
@param aholder_p pointer to an area which could involve ‘ain_p’
@param radius radius of aholder_p (e.g. for rounded rectangle)
@return true: aout_p is fully outside aholder_p
Check if a point is on an area
@param a_p pointer to an area
@param p_p pointer to a point
@param radius radius of area (e.g. for rounded rectangle)
@return false:the point is out of the area
Join two areas into a third which involves the other two
@param a_res_p pointer to an area, the result will be stored here
@param a1_p pointer to the first area
@param a2_p pointer to the second area
Initialize an area
@param area_p pointer to an area
@param x1 left coordinate of the area
@param y1 top coordinate of the area
@param x2 right coordinate of the area
@param y2 bottom coordinate of the area
Set the position of an area (width and height will be kept)
@param area_p pointer to an area
@param x the new x coordinate of the area
@param y the new y coordinate of the area
Assigns one content to the array, replacing its current content.
@param array pointer to an lv_array_t variable
@param index the index of the element to replace
@param value pointer to the elements to add
@return true: success; false: error
Returns a pointer to the element at position n in the array.
@param array pointer to an lv_array_t variable
@param index the index of the element to return
@return a pointer to the requested element, NULL if index is out of range
Concatenate two arrays. Adds new elements to the end of the array.
@note The destination array is automatically expanded as necessary.
@param array pointer to an lv_array_t variable
@param other pointer to the array to concatenate
@return LV_RESULT_OK: success, otherwise: error
Copy an array to another.
@note this will create a new array with the same capacity and size as the source array.
@param target pointer to an lv_array_t variable to copy to
@param source pointer to an lv_array_t variable to copy from
Remove from the array either a single element or a range of elements ([start, end)).
@note This effectively reduces the container size by the number of elements removed.
@note When start equals to end, the function has no effect.
@param array pointer to an lv_array_t variable
@param start the index of the first element to be removed
@param end the index of the first element that is not to be removed
@return LV_RESULT_OK: success, otherwise: error
Init an array.
@param array pointer to an lv_array_t variable to initialize
@param capacity the initial capacity of the array
@param element_size the size of an element in bytes
Init an array from a buffer.
@note The buffer must be large enough to store capacity elements. The array will not release the buffer and reallocate it.
The user must ensure that the buffer is valid during the lifetime of the array. And release the buffer when the array is no longer needed.
@param array pointer to an lv_array_t variable to initialize
@param buf pointer to a buffer to use as the array’s data
@param capacity the initial capacity of the array
@param element_size the size of an element in bytes
Push back element. Adds a new element to the end of the array.
If the array capacity is not enough for the new element, the array will be resized automatically.
@note If the element is NULL, it will be added as an empty element.
@param array pointer to an lv_array_t variable
@param element pointer to the element to add. NULL to push an empty element.
@return LV_RESULT_OK: success, otherwise: error
Resize the array to the given capacity.
@note if the new capacity is smaller than the current size, the array will be truncated.
@param array pointer to an lv_array_t variable
@param new_capacity the new capacity of the array
Call an asynchronous function the next time lv_timer_handler() is run. This function is likely to return
before the call actually happens!
@param async_xcb a callback which is the task itself.
(the ‘x’ in the argument name indicates that it’s not a fully generic function because it not follows
the func_name(object, callback, ...) convention)
@param user_data custom parameter
Bind an integer or float Subject to a Bar’s value.
@param obj pointer to Bar
@param subject pointer to Subject
@return pointer to newly-created Observer
Set minimum and the maximum values of a bar
@param obj pointer to the bar object
@param min minimum value
@param max maximum value
@note If min is greater than max, the drawing direction becomes to the opposite direction.
Set a new start value on the bar
@param obj pointer to a bar object
@param start_value new start value
@param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
Set a new value on the bar
@param obj pointer to a bar object
@param value new value
@param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
Calculate a value of a Cubic Bezier function.
@param t time in range of [0..LV_BEZIER_VAL_MAX]
@param u0 must be 0
@param u1 control value 1 values in range of [0..LV_BEZIER_VAL_MAX]
@param u2 control value 2 in range of [0..LV_BEZIER_VAL_MAX]
@param u3 must be LV_BEZIER_VAL_MAX
@return the value calculated from the given parameters in range of [0..LV_BEZIER_VAL_MAX]
Close the pending decoding. Free resources etc.
@param decoder pointer to the decoder the function associated with
@param dsc pointer to decoder descriptor
Get info about a lvgl binary image
@param decoder the decoder where this function belongs
@param dsc image descriptor containing the source and type of the image and other info.
@param header store the image data here
@return LV_RESULT_OK: the info is successfully stored in header; LV_RESULT_INVALID: unknown format or other error.
Open a lvgl binary image
@param decoder the decoder where this function belongs
@param dsc pointer to decoder descriptor. src, style are already initialized in it.
@return LV_RESULT_OK: the info is successfully stored in header; LV_RESULT_INVALID: unknown format or other error.
Clear the attributes of a button of the button matrix
@param obj pointer to button matrix object
@param btn_id 0 based index of the button to modify. (Not counting new lines)
@param ctrl OR-ed attributes. E.g. LV_BUTTONMATRIX_CTRL_NO_REPEAT | LV_BUTTONMATRIX_CTRL_CHECKABLE
Clear the attributes of all buttons of a button matrix
@param obj pointer to a button matrix object
@param ctrl attribute(s) to set from lv_buttonmatrix_ctrl_t. Values can be ORed.
Create a button matrix object
@param parent pointer to an object, it will be the parent of the new button matrix
@return pointer to the created button matrix
Get the button’s text
@param obj pointer to button matrix object
@param btn_id the index a button not counting new line characters.
@return text of btn_index` button
Get the index of the lastly “activated” button by the user (pressed, released, focused etc)
Useful in the event_cb to get the text of the button, check if hidden etc.
@param obj pointer to button matrix object
@return index of the last released button (LV_BUTTONMATRIX_BUTTON_NONE: if unset)
Get the whether a control value is enabled or disabled for button of a button matrix
@param obj pointer to a button matrix object
@param btn_id the index of a button not counting new line characters.
@param ctrl control values to check (ORed value can be used)
@return true: the control attribute is enabled false: disabled
Set the attributes of a button of the button matrix
@param obj pointer to button matrix object
@param btn_id 0 based index of the button to modify. (Not counting new lines)
@param ctrl OR-ed attributes. E.g. LV_BUTTONMATRIX_CTRL_NO_REPEAT | LV_BUTTONMATRIX_CTRL_CHECKABLE
Set attributes of all buttons of a button matrix
@param obj pointer to a button matrix object
@param ctrl attribute(s) to set from lv_buttonmatrix_ctrl_t. Values can be ORed.
Set a single button’s relative width.
This method will cause the matrix be regenerated and is a relatively
expensive operation. It is recommended that initial width be specified using
lv_buttonmatrix_set_ctrl_map and this method only be used for dynamic changes.
@param obj pointer to button matrix object
@param btn_id 0 based index of the button to modify.
@param width relative width compared to the buttons in the same row. [1..15]
Set the button control map (hidden, disabled etc.) for a button matrix.
The control map array will be copied and so may be deallocated after this
function returns.
@param obj pointer to a button matrix object
@param ctrl_map pointer to an array of lv_button_ctrl_t control bytes. The
length of the array and position of the elements must match
the number and order of the individual buttons (i.e. excludes
newline entries).
An element of the map should look like e.g.:
ctrl_map[0] = width | LV_BUTTONMATRIX_CTRL_NO_REPEAT | LV_BUTTONMATRIX_CTRL_TGL_ENABLE
Set a new map. Buttons will be created/deleted according to the map. The
button matrix keeps a reference to the map and so the string array must not
be deallocated during the life of the matrix.
@param obj pointer to a button matrix object
@param map pointer a string array. The last string has to be: “”. Use “\n” to make a line break.
Make the button matrix like a selector widget (only one button may be checked at a time).
LV_BUTTONMATRIX_CTRL_CHECKABLE must be enabled on the buttons to be selected using
lv_buttonmatrix_set_ctrl() or lv_buttonmatrix_set_button_ctrl_all().
@param obj pointer to a button matrix object
@param en whether “one check” mode is enabled
Acquire a cache entry with the given key. If entry not in cache, it will return NULL (not found).
If the entry is found, it’s priority will be changed by the cache’s policy. And the lv_cache_entry_t::ref_cnt will be incremented.
@param cache The cache object pointer to acquire the entry.
@param key The key of the entry to acquire.
@param user_data A user data pointer that will be passed to the create callback.
@return Returns a pointer to the acquired cache entry on success with lv_cache_entry_t::ref_cnt incremented, NULL on error.
Acquire a cache entry with the given key. If the entry is not in the cache, it will create a new entry with the given key.
If the entry is found, it’s priority will be changed by the cache’s policy. And the lv_cache_entry_t::ref_cnt will be incremented.
If you want to use this API to simplify the code, you should provide a lv_cache_ops_t::create_cb that creates a new entry with the given key.
This API is a combination of lv_cache_acquire() and lv_cache_add(). The effect is the same as calling lv_cache_acquire() and lv_cache_add() separately.
And the internal impact on cache is also consistent with these two APIs.
@param cache The cache object pointer to acquire the entry.
@param key The key of the entry to acquire or create.
@param user_data A user data pointer that will be passed to the create callback.
@return Returns a pointer to the acquired or created cache entry on success with lv_cache_entry_t::ref_cnt incremented, NULL on error.
Add a new cache entry with the given key and data. If the cache is full, the cache’s policy will be used to evict an entry.
@param cache The cache object pointer to add the entry.
@param key The key of the entry to add.
@param user_data A user data pointer that will be passed to the create callback.
@return Returns a pointer to the added cache entry on success with lv_cache_entry_t::ref_cnt incremented, NULL on error.
Create a cache object with the given parameters.
@param cache_class The class of the cache. Currently only support one two builtin classes:
- lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy.
- lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy.
@param node_size The node size is the size of the data stored in the cache..
@param max_size The max size is the maximum amount of memory or count that the cache can hold.
- lv_cache_class_lru_rb_count: max_size is the maximum count of nodes in the cache.
- lv_cache_class_lru_rb_size: max_size is the maximum size of the cache in bytes.
@param ops A set of operations that can be performed on the cache. See lv_cache_ops_t for details.
@return Returns a pointer to the created cache object on success, NULL on error.
Destroy a cache object.
@param cache The cache object pointer to destroy.
@param user_data A user data pointer that will be passed to the free callback.
Drop a cache entry with the given key. If the entry is not in the cache, nothing will happen to it.
If the entry is found, it will be removed from the cache and its data will be freed when the last reference to it is released.
@note The data will not be freed immediately but when the last reference to it is released. But this entry will not be found by lv_cache_acquire().
If you want cache a same key again, you should use lv_cache_add() or lv_cache_acquire_or_create().
@param cache The cache object pointer to drop the entry.
@param key The key of the entry to drop.
@param user_data A user data pointer that will be passed to the free callback.
Drop all cache entries. All entries will be removed from the cache and their data will be freed when the last reference to them is released.
@note If some entries are still referenced by other objects, it will issue an error. And this case shouldn’t happen in normal cases..
@param cache The cache object pointer to drop all entries.
@param user_data A user data pointer that will be passed to the free callback.
Allocate a cache entry.
@param node_size The size of the node in the cache.
@param cache The cache instance to allocate the cache entry from.
@return The pointer to the allocated cache entry.
Get the cache instance of a cache entry.
@param entry The cache entry to get the cache instance of.
@return The pointer to the cache instance of the cache entry.
Get the cache entry of a data. The data should be allocated by the cache instance.
@param data The data to get the cache entry of.
@param node_size The size of the node in the cache.
@return The pointer to the cache entry of the data.
Get the node size of a cache entry. Which is the same size with lv_cache_entry_get_size()’s node_size parameter.
@param entry The cache entry to get the node size of.
@return The node size of the cache entry.
Initialize a cache entry.
@param entry The cache entry to initialize.
@param cache The cache instance to allocate the cache entry from.
@param node_size The size of the node in the cache.
Evict one entry from the cache. The eviction policy will be used to select the entry to evict.
@param cache The cache object pointer to evict an entry.
@param user_data A user data pointer that will be passed to the free callback.
@return Returns true if an entry is evicted, false if no entry is evicted.
Get the free size of the cache.
@param cache The cache object pointer to get the free size.
@param user_data A user data pointer that will be passed to the free callback.
@return Returns the free size of the cache.
Get the maximum size of the cache.
@param cache The cache object pointer to get the maximum size.
@param user_data A user data pointer that will be passed to the free callback.
@return Returns the maximum size of the cache.
Get the current size of the cache.
@param cache The cache object pointer to get the current size.
@param user_data A user data pointer that will be passed to the free callback.
@return Returns the current size of the cache.
Return true if the cache is enabled.
Disabled cache means that when the max_size of the cache is 0. In this case, all cache operations will be no-op.
@param cache The cache object pointer to check if it’s disabled.
@return Returns true if the cache is enabled, false otherwise.
Create an iterator for the cache object. The iterator is used to iterate over all cache entries.
@param cache The cache object pointer to create the iterator.
@return Returns a pointer to the created iterator on success, NULL on error.
Release a cache entry. The lv_cache_entry_t::ref_cnt will be decremented. If the lv_cache_entry_t::ref_cnt is zero, it will issue an error.
If the entry passed to this function is the last reference to the data and the entry is marked as invalid, the cache’s policy will be used to evict the entry.
@param cache The cache object pointer to release the entry.
@param entry The cache entry pointer to release.
@param user_data A user data pointer that will be passed to the free callback.
Reserve a certain amount of memory/count in the cache. This function is useful when you want to reserve a certain amount of memory/count in advance,
for example, when you know that you will need it later.
When the current cache size is max than the reserved size, the function will evict entries until the reserved size is reached.
@param cache The cache object pointer to reserve.
@param reserved_size The amount of memory/count to reserve.
@param user_data A user data pointer that will be passed to the free callback.
Set the compare callback of the cache.
@param cache The cache object pointer to set the compare callback.
@param compare_cb The compare callback to set.
@param user_data A user data pointer.
Set the create callback of the cache.
@param cache The cache object pointer to set the create callback.
@param alloc_cb The create callback to set.
@param user_data A user data pointer.
Set the free callback of the cache.
@param cache The cache object pointer to set the free callback.
@param free_cb The free callback to set.
@param user_data A user data pointer.
Set the maximum size of the cache.
If the current cache size is greater than the new maximum size, the cache’s policy will be used to evict entries until the new maximum size is reached.
If set to 0, the cache will be disabled.
@note But this behavior will happen only new entries are added to the cache.
@param cache The cache object pointer to set the maximum size.
@param max_size The new maximum size of the cache.
@param user_data A user data pointer that will be passed to the free callback.
Give a name for a cache object. Only the pointer of the string is saved.
@param cache The cache object pointer to set the name.
@param name The name of the cache.
Get the button matrix object of the calendar.
It shows the dates and day names.
@param obj pointer to a calendar object
@return pointer to a the button matrix
Get the currently pressed day
@param calendar pointer to a calendar object
@param date store the pressed date here
@return LV_RESULT_OK: there is a valid pressed date
LV_RESULT_INVALID: there is no pressed data
Get the currently showed
@param calendar pointer to a calendar object
@return pointer to an lv_calendar_date_t variable containing the date is being shown.
Get the today’s date
@param calendar pointer to a calendar object
@return return pointer to an lv_calendar_date_t variable containing the date of today.
Sets a custom calendar year list
@param parent pointer to a calendar object
@param years_list pointer to an const char array with the years list, see lv_dropdown set_options for more information.
E.g. `const char * years = “2023\n2022\n2021\n2020\n2019”
Only the pointer will be saved so this variable can’t be local which will be destroyed later.
Set the name of the days
@param obj pointer to a calendar object
@param day_names pointer to an array with the names.
E.g. const char * days[7] = {"Sun", "Mon", ...}
Only the pointer will be saved so this variable can’t be local which will be destroyed later.
Set the highlighted dates
@param obj pointer to a calendar object
@param highlighted pointer to an lv_calendar_date_t array containing the dates.
Only the pointer will be saved so this variable can’t be local which will be destroyed later.
@param date_num number of dates in the array
Set the today’s year, month and day at once
@param obj pointer to a calendar object
@param year today’s year
@param month today’s month [1..12]
@param day today’s day [1..31]
Allocate a block of zeroed memory dynamically
@param num requested number of element to be allocated.
@param size requested size of each element in bytes.
@return pointer to allocated zeroed memory, or NULL on failure
Copy a buffer to the canvas
@param obj pointer to a canvas object
@param canvas_area the area of the canvas to copy the new data to
@param src_buf pointer to a buffer holding the source data
@param src_area the area of the source buffer to copy from. If NULL, copy the whole buffer.
@note canvas_area and src_area should be the same size. If canvas_area and the size of src_buf are the same,
src_area can be left NULL.
Wait until all the drawings are finished on layer.
Needs to be usd in pair with lv_canvas_init_layer.
@param canvas pointer to a canvas
@param layer pointer to a layer to finalize
Return the pointer for the buffer.
It’s recommended to use this function instead of the buffer form the
return value of lv_canvas_get_image() as is can be aligned
@param canvas pointer to a canvas object
@return pointer to the buffer
Get the image of the canvas as a pointer to an lv_image_dsc_t variable.
@param canvas pointer to a canvas object
@return pointer to the image descriptor.
Get a pixel’s color and opacity
@param obj pointer to a canvas
@param x X coordinate of the pixel
@param y Y coordinate of the pixel
@return ARGB8888 color of the pixel
Initialize a layer to use LVGL’s generic draw functions (lv_draw_rect/label/…) on the canvas.
Needs to be usd in pair with lv_canvas_finish_layer.
@param canvas pointer to a canvas
@param layer pointer to a layer variable to initialize
Set a draw buffer for the canvas. A draw buffer either can be allocated by lv_draw_buf_create()
or defined statically by LV_DRAW_BUF_DEFINE_STATIC. When buffer start address and stride has alignment
requirement, it’s recommended to use lv_draw_buf_create.
@param obj pointer to a canvas object
@param draw_buf pointer to a draw buffer
Set the palette color of a canvas for index format. Valid only for LV_COLOR_FORMAT_I1/2/4/8
@param obj pointer to canvas object
@param index the palette color to set:
- for LV_COLOR_FORMAT_I1: 0..1
- for LV_COLOR_FORMAT_I2: 0..3
- for LV_COLOR_FORMAT_I4: 0..15
- for LV_COLOR_FORMAT_I8: 0..255
@param color the color to set
Set a pixel’s color and opacity
@param obj pointer to a canvas
@param x X coordinate of the pixel
@param y Y coordinate of the pixel
@param color the color
@param opa the opacity
@note The following color formats are supported
LV_COLOR_FORMAT_I1/2/4/8, LV_COLOR_FORMAT_A8,
LV_COLOR_FORMAT_RGB565, LV_COLOR_FORMAT_RGB888,
LV_COLOR_FORMAT_XRGB8888, LV_COLOR_FORMAT_ARGB8888
@note this function invalidates the canvas object every time,
for best performance, if you’re changing a lot of pixels in a loop,
call lv_display_enable_invalidation before the loop starts
so the invalidation isn’t done on every call
Add a cursor with a given color
@param obj pointer to chart object
@param color color of the cursor
@param dir direction of the cursor. LV_DIR_RIGHT/LEFT/TOP/DOWN/HOR/VER/ALL. OR-ed values are possible
@return pointer to the created cursor
Allocate and add a data series to the chart
@param obj pointer to a chart object
@param color color of the data series
@param axis the y axis to which the series should be attached (::LV_CHART_AXIS_PRIMARY_Y or ::LV_CHART_AXIS_SECONDARY_Y)
@return pointer to the allocated data series or NULL on failure
Get the coordinate of the cursor with respect to the paddings
@param chart pointer to a chart object
@param cursor pointer to cursor
@return coordinate of the cursor as lv_point_t
Get the overall offset from the chart’s side to the center of the first point.
In case of a bar chart it will be the center of the first column group
@param obj pointer to a chart object
@return the offset of the center
Get the position of a point to the chart.
@param obj pointer to a chart object
@param ser pointer to series
@param id the index.
@param p_out store the result position here
Get the index of the currently pressed point. It’s the same for every series.
@param obj pointer to a chart object
@return the index of the point [0 .. point count] or LV_CHART_POINT_ID_NONE if no point is being pressed
Get the next series.
@param chart pointer to a chart
@param ser the previous series or NULL to get the first
@return the next series or NULL if there is no more.
Get the array of x values of a series
@param obj pointer to a chart object
@param ser pointer to a data series on ‘chart’
@return the array of values with ‘point_count’ elements
Get the array of y values of a series
@param obj pointer to a chart object
@param ser pointer to a data series on ‘chart’
@return the array of values with ‘point_count’ elements
Get the current index of the x-axis start point in the data array
@param obj pointer to a chart object
@param ser pointer to a data series on ‘chart’
@return the index of the current x start point in the data array
Hide/Unhide a single series of a chart.
@param chart pointer to a chart object.
@param series pointer to a series object
@param hide true: hide the series
Initialize all data points of a series with a value
@param obj pointer to chart object
@param ser pointer to a data series on ‘chart’
@param value the new value for all points. LV_CHART_POINT_NONE can be used to hide the points.
Set the maximal y values on an axis
@param obj pointer to a chart object
@param axis LV_CHART_AXIS_PRIMARY_Y or LV_CHART_AXIS_SECONDARY_Y
@param max maximum value of the y axis
Set the minimal values on an axis
@param obj pointer to a chart object
@param axis LV_CHART_AXIS_PRIMARY_Y or LV_CHART_AXIS_SECONDARY_Y
@param min minimal value of the y axis
Set the minimal and maximal y values on an axis
@param obj pointer to a chart object
@param axis LV_CHART_AXIS_PRIMARY_Y or LV_CHART_AXIS_SECONDARY_Y
@param min minimum value of the y axis
@param max maximum value of the y axis
Stick the cursor to a point
@param chart pointer to a chart object
@param cursor pointer to the cursor
@param ser pointer to a series
@param point_id the point’s index or LV_CHART_POINT_NONE to not assign to any points.
Set the coordinate of the cursor with respect to the paddings
@param chart pointer to a chart object
@param cursor pointer to the cursor
@param pos the new coordinate of cursor relative to the chart
Set the X coordinate of the cursor with respect to the paddings
@param chart pointer to a chart object
@param cursor pointer to the cursor
@param x the new X coordinate of cursor relative to the chart
Set the coordinate of the cursor with respect to the paddings
@param chart pointer to a chart object
@param cursor pointer to the cursor
@param y the new Y coordinate of cursor relative to the chart
Set the number of horizontal and vertical division lines
@param obj pointer to a chart object
@param hdiv number of horizontal division lines
@param vdiv number of vertical division lines
Set the next point’s Y value according to the update mode policy.
@param obj pointer to chart object
@param ser pointer to a data series on ‘chart’
@param value the new value of the next data
Set the next point’s X and Y value according to the update mode policy.
@param obj pointer to chart object
@param ser pointer to a data series on ‘chart’
@param x_value the new X value of the next data
@param y_value the new Y value of the next data
Set an external array for the x data points to use for the chart
NOTE: It is the users responsibility to make sure the point_cnt matches the external array size.
@param obj pointer to a chart object
@param ser pointer to a data series on ‘chart’
@param array external array of points for chart
Set an external array for the y data points to use for the chart
NOTE: It is the users responsibility to make sure the point_cnt matches the external array size.
@param obj pointer to a chart object
@param ser pointer to a data series on ‘chart’
@param array external array of points for chart
Set an individual point’s y value of a chart’s series directly based on its index
@param obj pointer to a chart object
@param ser pointer to a data series on ‘chart’
@param id the index of the x point in the array
@param value value to assign to array point
Set an individual point’s x and y value of a chart’s series directly based on its index
Can be used only with LV_CHART_TYPE_SCATTER.
@param obj pointer to chart object
@param ser pointer to a data series on ‘chart’
@param id the index of the x point in the array
@param x_value the new X value of the next data
@param y_value the new Y value of the next data
Same as lv_chart_set_next_value but set the values from an array
@param obj pointer to chart object
@param ser pointer to a data series on ‘chart’
@param values the new values to set
@param values_cnt number of items in values
Same as lv_chart_set_next_value2 but set the values from an array
@param obj pointer to chart object
@param ser pointer to a data series on ‘chart’
@param x_values the new values to set on the X axis
@param y_values the new values to set o nthe Y axis
@param values_cnt number of items in x_values and y_values
Set the index of the x-axis start point in the data array.
This point will be considers the first (left) point and the other points will be drawn after it.
@param obj pointer to a chart object
@param ser pointer to a data series on ‘chart’
@param id the index of the x point in the data array
Set the text of a check box. txt will be copied and may be deallocated
after this function returns.
@param obj pointer to a check box
@param txt the text of the check box. NULL to refresh with the current text.
Set the text of a check box. txt must not be deallocated during the life
of this checkbox.
@param obj pointer to a check box
@param txt the text of the check box.
Create a circle buffer
@param capacity the maximum number of elements in the buffer
@param element_size the size of an element in bytes
@return pointer to the created buffer
Create a circle buffer from an existing buffer
@param buf pointer to a buffer
@param capacity the maximum number of elements in the buffer
@param element_size the size of an element in bytes
@return pointer to the created buffer
Fill the buffer with values
@param circle_buf pointer to buffer
@param count the number of values to fill
@param fill_cb the callback function to fill the buffer
@param user_data
@return the number of values filled
Peek a value
@param circle_buf pointer to buffer
@param data pointer to a variable to store the peeked value
@return LV_RESULT_OK: the value is peeked; LV_RESULT_INVALID: the value is not peeked
Peek a value at an index
@param circle_buf pointer to buffer
@param index the index of the value to peek, if the index is greater than the size of the buffer, it will return looply.
@param data pointer to a variable to store the peeked value
@return LV_RESULT_OK: the value is peeked; LV_RESULT_INVALID: the value is not peeked
Read a value
@param circle_buf pointer to buffer
@param data pointer to a variable to store the read value
@return LV_RESULT_OK: the value is read; LV_RESULT_INVALID: the value is not read
Resize the buffer
@param circle_buf pointer to a buffer
@param capacity the new capacity of the buffer
@return LV_RESULT_OK: the buffer is resized; LV_RESULT_INVALID: the buffer is not resized
Write a value
@param circle_buf pointer to buffer
@param data pointer to the value to write
@return LV_RESULT_OK: the value is written; LV_RESULT_INVALID: the value is not written
Clamp a height between min and max height. If the min/max height is in percentage value use the ref_height
@param height height to clamp
@param min_height the minimal height
@param max_height the maximal height
@param ref_height the reference height used when min/max height is in percentage
@return the clamped height
Clamp a width between min and max width. If the min/max width is in percentage value use the ref_width
@param width width to clamp
@param min_width the minimal width
@param max_width the maximal width
@param ref_width the reference width used when min/max width is in percentage
@return the clamped width
Create an ARGB8888 color
@param r the red channel (0..255)
@param g the green channel (0..255)
@param b the blue channel (0..255)
@param a the alpha channel (0..255)
@return the color
Mix two RGB565 colors
@param c1 the first color (typically the foreground color)
@param c2 the second color (typically the background color)
@param mix 0..255, or LV_OPA_0/10/20…
@return mix == 0: c2
mix == 255: c1
mix == 128: 0.5 x c1 + 0.5 x c2
Get the pixel size of a color format in bits, bpp
@param cf a color format (LV_COLOR_FORMAT_...)
@return the pixel size in bits
@sa LV_COLOR_FORMAT_GET_BPP
Get the pixel size of a color format in bytes
@param cf a color format (LV_COLOR_FORMAT_...)
@return the pixel size in bytes
@sa LV_COLOR_FORMAT_GET_SIZE
Check if a color format has alpha channel or not
@param src_cf a color format (LV_COLOR_FORMAT_...)
@return true: has alpha channel; false: doesn’t have alpha channel
Convert a HSV color to RGB
@param h hue [0..359]
@param s saturation [0..100]
@param v value [0..100]
@return the given RGB color in RGB (with LV_COLOR_DEPTH depth)
Mix two colors with a given ratio.
@param c1 the first color to mix (usually the foreground)
@param c2 the second color to mix (usually the background)
@param mix The ratio of the colors. 0: full c2, 255: full c1, 127: half c1 and halfc2
@return the mixed color
Blend two colors that have not been pre-multiplied using their alpha values
@param fg the foreground color
@param bg the background color
@return result color
Convert am RGB888 color to XRGB8888 stored in uint32_t
@param color and RGB888 color
@return color as XRGB8888 on uin32_t (the alpha channel is always set to 0xFF)
Calculate the y value of cubic-bezier(x1, y1, x2, y2) function as specified x.
@param x time in range of [0..LV_BEZIER_VAL_MAX]
@param x1 x of control point 1 in range of [0..LV_BEZIER_VAL_MAX]
@param y1 y of control point 1 in range of [0..LV_BEZIER_VAL_MAX]
@param x2 x of control point 2 in range of [0..LV_BEZIER_VAL_MAX]
@param y2 y of control point 2 in range of [0..LV_BEZIER_VAL_MAX]
@return the value calculated
Delay for the given milliseconds.
By default it’s a blocking delay, but with lv_delay_set_cb()
a custom delay function can be set too
@param ms the number of milliseconds to delay
Add an event handler to the display
@param disp pointer to a display
@param event_cb an event callback
@param filter event code to react or LV_EVENT_ALL
@param user_data optional user_data
Create a new display with the given resolution
@param hor_res horizontal resolution in pixels
@param ver_res vertical resolution in pixels
@return pointer to a display object or NULL on error
Remove an event
@param disp pointer to a display
@param index the index of the event to remove
@return true: and event was removed; false: no event was removed
For specified display, computes the number of pixels (a distance or size) as if the
display had 160 DPI. This allows you to specify 1/160-th fractions of an inch to
get real distance on the display that will be consistent regardless of its current
DPI. It ensures lv_dpx(100), for example, will have the same physical size
regardless to the DPI of the display.
@param disp pointer to display whose dpi should be considered
@param n number of 1/160-th-inch units to compute with
@return number of pixels to use to make that distance
Temporarily enable and disable the invalidation of the display.
@param disp pointer to a display (NULL to use the default display)
@param en true: enable invalidation; false: invalidation
Tell if it’s the last area of the refreshing process.
Can be called from flush_cb to execute some special display refreshing if needed when all areas area flushed.
@param disp pointer to display
@return true: it’s the last area to flush;
false: there are other areas too which will be refreshed soon
Get the horizontal resolution of a display.
@param disp pointer to a display (NULL to use the default display)
@return the horizontal resolution of the display.
Get elapsed time since last user activity on a display (e.g. click)
@param disp pointer to a display (NULL to get the overall smallest inactivity)
@return elapsed ticks (milliseconds) since the last activity
Get the size of the invalidated draw buffer. Can be used in the flush callback
to get the number of bytes used in the current render buffer.
@param disp pointer to a display
@param width the width of the invalidated area
@param height the height of the invalidated area
@return the size of the invalidated draw buffer in bytes, not accounting for
any preceding palette information for a valid display, 0 otherwise
Return the bottom layer. The bottom layer is the same on all screen and it is under the normal screen layer.
It’s visible only if the screen is transparent.
@param disp pointer to display (NULL to use the default screen)
@return pointer to the bottom layer object
Return the sys. layer. The system layer is the same on all screen and it is above the normal screen and the top layer.
@param disp pointer to display which sys. layer should be retrieved. (NULL to use the default screen)
@return pointer to the sys layer object
Return the top layer. The top layer is the same on all screens and it is above the normal screen layer.
@param disp pointer to display which top layer should be get. (NULL to use the default screen)
@return pointer to the top layer object
Get if matrix rotation is enabled for a display or not
@param disp pointer to a display (NULL to use the default display)
@return true: matrix rotation is enabled; false: disabled
Get the next display.
@param disp pointer to the current display. NULL to initialize.
@return the next display or NULL if no more. Gives the first display when the parameter is NULL.
Get the horizontal offset from the full / physical display
@param disp pointer to a display (NULL to use the default display)
@return the horizontal offset from the physical display
Get the vertical offset from the full / physical display
@param disp pointer to a display (NULL to use the default display)
@return the horizontal offset from the physical display
Get the original horizontal resolution of a display without considering rotation
@param disp pointer to a display (NULL to use the default display)
@return the horizontal resolution of the display.
Get the original vertical resolution of a display without considering rotation
@param disp pointer to a display (NULL to use the default display)
@return the vertical resolution of the display
Get the physical horizontal resolution of a display
@param disp pointer to a display (NULL to use the default display)
@return the physical horizontal resolution of the display
Get the physical vertical resolution of a display
@param disp pointer to a display (NULL to use the default display)
@return the physical vertical resolution of the display
Get a pointer to the screen refresher timer to
modify its parameters with lv_timer_... functions.
@param disp pointer to a display
@return pointer to the display refresher timer. (NULL on error)
Return a pointer to the active screen on a display
@param disp pointer to display which active screen should be get.
(NULL to use the default screen)
@return pointer to the active screen object (loaded by ‘lv_screen_load()’)
Return the screen that is currently being loaded by the display
@param disp pointer to a display object (NULL to use the default screen)
@return pointer to the screen being loaded or NULL if no screen is currently being loaded
Return with a pointer to the previous screen. Only used during screen transitions.
@param disp pointer to display which previous screen should be get.
(NULL to use the default screen)
@return pointer to the previous screen object or NULL if not used now
Get the vertical resolution of a display
@param disp pointer to a display (NULL to use the default display)
@return the vertical resolution of the display
Register vsync event of a display. LV_EVENT_VSYNC event will be sent periodically.
Please don’t use it in display event listeners, as it may cause memory leaks and illegal access issues.
Remove an event_cb with user_data
@param disp pointer to a display
@param event_cb the event_cb of the event to remove
@param user_data user_data
@return the count of the event removed
Send an event to a display
@param disp pointer to a display
@param code an event code. LV_EVENT_…
@param param optional param
@return LV_RESULT_OK: disp wasn’t deleted in the event.
Disabling anti-aliasing is not supported since v9. This function will be removed.
Enable anti-aliasing for the render engine
@param disp pointer to a display
@param en true/false
Set the buffers for a display, similarly to lv_display_set_draw_buffers, but accept the raw buffer pointers.
For DIRECT/FULL rending modes, the buffer size must be at least
hor_res * ver_res * lv_color_format_get_size(lv_display_get_color_format(disp))
@param disp pointer to a display
@param buf1 first buffer
@param buf2 second buffer (can be NULL)
@param buf_size buffer size in byte
@param render_mode LV_DISPLAY_RENDER_MODE_PARTIAL/DIRECT/FULL
Set the frame buffers for a display, similarly to lv_display_set_buffers, but allow
for a custom stride as required by a display controller.
This allows the frame buffers to have a stride alignment different from the rest of
the buffers@param disp pointer to a display @param buf1 first buffer @param buf2 second buffer (can beNULL`)
@param buf_size buffer size in byte
@param stride buffer stride in bytes
@param render_mode LV_DISPLAY_RENDER_MODE_PARTIAL/DIRECT/FULL
Set the color format of the display.
@param disp pointer to a display
@param color_format Possible values are
- LV_COLOR_FORMAT_RGB565
- LV_COLOR_FORMAT_RGB888
- LV_COLOR_FORMAT_XRGB888
- LV_COLOR_FORMAT_ARGB888
@note To change the endianness of the rendered image in case of RGB565 format
(i.e. swap the 2 bytes) call lv_draw_sw_rgb565_swap in the flush_cb
Set the buffers for a display, accept a draw buffer pointer.
Normally use lv_display_set_buffers is enough for most cases.
Use this function when an existing lv_draw_buf_t is available.
@param disp pointer to a display
@param buf1 first buffer
@param buf2 second buffer (can be NULL)
Set the flush callback which will be called to copy the rendered image to the display.
@param disp pointer to a display
@param flush_cb the flush callback (px_map contains the rendered image as raw pixel map and it should be copied to area on the display)
Set a callback to be used while LVGL is waiting flushing to be finished.
It can do any complex logic to wait, including semaphores, mutexes, polling flags, etc.
If not set the disp->flushing flag is used which can be cleared with lv_display_flush_ready()
@param disp pointer to a display
@param wait_cb a callback to call while LVGL is waiting for flush ready.
If NULL lv_display_flush_ready() can be used to signal that flushing is ready.
Use matrix rotation for the display. This function is depended on LV_DRAW_TRANSFORM_USE_MATRIX
@param disp pointer to a display (NULL to use the default display)
@param enable true: enable matrix rotation, false: disable
If physical resolution is not the same as the normal resolution
the offset of the active display area can be set here.
@param disp pointer to a display
@param x X offset
@param y Y offset
It’s not mandatory to use the whole display for LVGL, however in some cases physical resolution is important.
For example the touchpad still sees whole resolution and the values needs to be converted
to the active LVGL display area.
@param disp pointer to a display
@param hor_res the new physical horizontal resolution, or -1 to assume it’s the same as the normal hor. res.
@param ver_res the new physical vertical resolution, or -1 to assume it’s the same as the normal hor. res.
Sets the resolution of a display. LV_EVENT_RESOLUTION_CHANGED event will be sent.
Here the native resolution of the device should be set. If the display will be rotated later with
lv_display_set_rotation LVGL will swap the hor. and ver. resolution automatically.
@param disp pointer to a display
@param hor_res the new horizontal resolution
@param ver_res the new vertical resolution
Set the rotation of this display. LVGL will swap the horizontal and vertical resolutions internally.
@param disp pointer to a display (NULL to use the default display)
@param rotation LV_DISPLAY_ROTATION_0/90/180/270
Set the theme of a display. If there are no user created widgets yet the screens’ theme will be updated
@param disp pointer to a display
@param th pointer to a theme
Unregister vsync event of a display. LV_EVENT_VSYNC event won’t be sent periodically.
Please don’t use it in display event listeners, as it may cause memory leaks and illegal access issues.
@param disp pointer to a display
@param event_cb an event callback
@param user_data optional user_data
For default display, computes the number of pixels (a distance or size) as if the
display had 160 DPI. This allows you to specify 1/160-th fractions of an inch to
get real distance on the display that will be consistent regardless of its current
DPI. It ensures lv_dpx(100), for example, will have the same physical size
regardless to the DPI of the display.
@param n number of 1/160-th-inch units to compute with
@return number of pixels to use to make that distance
Add an empty draw task to the draw task list of a layer.
@param layer pointer to a layer
@param coords the coordinates of the draw task
@return the created draw task which needs to be
further configured e.g. by added a draw descriptor
Get an area the should be invalidated when the arcs angle changed between start_angle and end_ange
@param x the x coordinate of the center of the arc
@param y the y coordinate of the center of the arc
@param radius the radius of the arc
@param start_angle the start angle of the arc (0 deg on the bottom, 90 deg on the right)
@param end_angle the end angle of the arc
@param w width of the arc
@param rounded true: the arc is rounded
@param area store the area to invalidate here
Create a blur draw task
@param layer pointer to a layer
@param dsc pointer to an initialized lv_draw_blur_dsc_t variable
@param coords coordinates of the character
Draw a border
@param layer pointer to a layer
@param dsc pointer to an initialized draw descriptor variable
@param coords the coordinates of the rectangle
Draw a box shadow
@param layer pointer to a layer
@param dsc pointer to an initialized draw descriptor variable
@param coords the coordinates of the rectangle
Adjust the stride of a draw buf in place.
@param src pointer to a draw buffer
@param stride the new stride in bytes for image. Use LV_STRIDE_AUTO for automatic calculation.
@return LV_RESULT_OK: success or LV_RESULT_INVALID: failed
Align the address of a buffer. The buffer needs to be large enough for the real data after alignment
@param buf the data to align
@param color_format the color format of the buffer
@return the aligned buffer
Align the address of a buffer with custom draw buffer handlers.
The buffer needs to be large enough for the real data after alignment
@param handlers the draw buffer handlers
@param buf the data to align
@param color_format the color format of the buffer
@return the aligned buffer
Copy an area from a buffer to another
@param dest pointer to the destination draw buffer
@param dest_area the area to copy from the destination buffer, if NULL, use the whole buffer
@param src pointer to the source draw buffer
@param src_area the area to copy from the destination buffer, if NULL, use the whole buffer
@note dest_area and src_area should have the same width and height
@note The default copy function required dest and src to have the same color format.
Overwriting dest->handlers->buf_copy_cb can resolve this limitation.
Duplicate a draw buf with same image size, stride and color format. Copy the image data too.
@param draw_buf the draw buf to duplicate
@return the duplicated draw buf on success, NULL if failed
Duplicate a draw buf with same image size, stride and color format. Copy the image data too.
@param handlers the draw buffer handlers
@param draw_buf the draw buf to duplicate
@return the duplicated draw buf on success, NULL if failed
Flush the cache of the buffer
@param draw_buf the draw buffer needs to be flushed
@param area the area to flush in the buffer,
use NULL to flush the whole draw buffer address range
Get the struct which holds the callbacks for draw buf management.
Custom callback can be set on the returned value
@return pointer to the struct of handlers
Initialize a draw buf with the given buffer and parameters. Clear draw buffer flag to zero.
@param draw_buf the draw buf to initialize
@param w the buffer width in pixels
@param h the buffer height in pixels
@param cf the color format
@param stride the stride in bytes. Use 0 for automatic calculation
@param data the buffer used for drawing. Unaligned data will be aligned internally
@param data_size the size of the buffer in bytes
@return return LV_RESULT_OK on success, LV_RESULT_INVALID otherwise
Invalidate the cache of the buffer
@param draw_buf the draw buffer needs to be invalidated
@param area the area to invalidate in the buffer,
use NULL to invalidate the whole draw buffer address range
Premultiply draw buffer color with alpha channel.
If it’s already premultiplied, return directly.
Only color formats with alpha channel will be processed.
Keep using the existing memory, reshape the draw buffer to the given width and height.
Return NULL if data_size is smaller than the required size.
@param draw_buf pointer to a draw buffer
@param cf the new color format, use 0 or LV_COLOR_FORMAT_UNKNOWN to keep using the original color format.
@param w the new width in pixels
@param h the new height in pixels
@param stride the stride in bytes for image. Use 0 for automatic calculation.
Save a draw buf to a file
@param draw_buf pointer to a draw buffer
@param path path to the file to save
@return LV_RESULT_OK: success; LV_RESULT_INVALID: error
Set the palette color of an indexed image. Valid only for LV_COLOR_FORMAT_I1/2/4/8
@param draw_buf pointer to an image descriptor
@param index the palette color to set:
Calculate the stride in bytes based on a width and color format
@param w the width in pixels
@param color_format the color format
@return the stride in bytes
Calculate the stride in bytes based on a width and color format
@param handlers the draw buffer handlers
@param w the width in pixels
@param color_format the color format
@return the stride in bytes
Create a draw task to render a single character
@param layer pointer to a layer
@param dsc pointer to draw descriptor
@param point position of the label
@param unicode_letter the letter to draw
Allocate a new draw unit with the given size and appends it to the list of draw units
@param size the size to allocate. E.g. sizeof(my_draw_unit_t),
where the first element of my_draw_unit_t is lv_draw_unit_t.
Used internally to try dispatching draw tasks of a specific layer
@param disp pointer to a display on which the dispatching was requested
@param layer pointer to a layer
@return at least one draw task is being rendered (maybe it was taken earlier)
Fill an area
@param layer pointer to a layer
@param dsc pointer to an initialized draw descriptor variable
@param coords the coordinates of the rectangle
Needs to be called when a draw task is created and configured.
It will send an event about the new draw task to the widget
and assign it to a draw unit.
@param layer pointer to a layer
@param t pointer to a draw task
If there is only one draw unit check the first draw task if it’s available.
If there are multiple draw units call lv_draw_get_next_available_task to find a task.
@param layer the draw layer to search in
@param t_prev continue searching from this task
@param draw_unit_id check the task where preferred_draw_unit_id equals this value or LV_DRAW_UNIT_NONE
@return an available draw task or NULL if there is not any
Tell how many draw task are waiting to be drawn on the area of t_check.
It can be used to determine if a GPU shall combine many draw tasks into one or not.
If a lot of tasks are waiting for the current ones it makes sense to draw them one-by-one
to not block the dependent tasks’ rendering
@param t_check the task whose dependent tasks shall be counted
@return number of tasks depending on t_check
Find and available draw task
@param layer the draw layer to search in
@param t_prev continue searching from this task
@param draw_unit_id check the task where preferred_draw_unit_id equals this value or LV_DRAW_UNIT_NONE
@return an available draw task or NULL if there is not any
Create an image draw task
@param layer pointer to a layer
@param dsc pointer to an initialized draw descriptor
@param coords the coordinates of the image
@note coords can be small than the real image area
(if only a part of the image is rendered)
or can be larger (in case of tiled images). .
Can be used by draw units to handle the decoding and
prepare everything for the actual image rendering
@param t pointer to a draw task
@param draw_dsc the draw descriptor of the image
@param coords the absolute coordinates of the image
@param draw_core_cb a callback to perform the actual rendering
@param decoder_args the args passed to image decoders, or NULL for defaults
Can be used by draw units for TILED images to handle the decoding and
prepare everything for the actual image rendering
@param t pointer to a draw task
@param draw_dsc the draw descriptor of the image
@param coords the absolute coordinates of the image
@param draw_core_cb a callback to perform the actual rendering
@param decoder_args the args passed to image decoders, or NULL for defaults
Should be used during rendering the characters to get the position and other
parameters of the characters
@param t pointer to a draw task
@param dsc pointer to draw descriptor
@param coords coordinates of the label
@param cb a callback to call to draw each glyphs one by one
Create a draw task to blend a layer to another layer
@param layer pointer to a layer
@param dsc pointer to an initialized draw descriptor. src must be set to the layer to blend
@param coords the coordinates of the layer.
@note coords can be small than the total widget area from which the layer is created
(if only a part of the widget was rendered to a layer)
Create (allocate) a new layer on a parent layer
@param parent_layer the parent layer to which the layer will be merged when it’s rendered
@param color_format the color format of the layer
@param area the areas of the layer (absolute coordinates)
@return the new target_layer or NULL on error
Got to a pixel at X and Y coordinate on a layer
@param layer pointer to a layer
@param x the target X coordinate
@param y the target X coordinate
@return buf offset to point to the given X and Y coordinate
Initialize a layer which is allocated by the user
@param layer pointer the layer to initialize (its lifetime needs to be managed by the user)
@param parent_layer the parent layer to which the layer will be merged when it’s rendered
@param color_format the color format of the layer
@param area the areas of the layer (absolute coordinates)
@return the new target_layer or NULL on error
A helper function to call a callback which draws a line between two points.
This way it doesn’t matter if p1, p2 or points were used as it calls the
callback as needed.
@param t draw task
@param dsc pointer to a draw descriptor
@param draw_line_cb a callback that draws a line between dsc->p1 and dsc->p2
The rectangle is a wrapper for fill, border, bg. image and box shadow.
Internally fill, border, image and box shadow draw tasks will be created.
@param layer pointer to a layer
@param dsc pointer to an initialized draw descriptor variable
@param coords the coordinates of the rectangle
Draw box shadow with SW render.
@param t pointer to a draw task
@param dsc the draw descriptor
@param coords the coordinates of the rectangle for which the box shadow should be drawn
Fill an area using SW render. Handle gradient and radius.
@param t pointer to a draw task
@param dsc the draw descriptor
@param coords the coordinates of the rectangle
Convert a draw buffer in I1 color format from htiled (row-wise)
to vtiled (column-wise) buffer layout. The conversion assumes that the buffer width
and height is rounded to a multiple of 8.
@param buf pointer to the buffer to be converted
@param buf_size size of the buffer in bytes
@param width width of the buffer
@param height height of the buffer
@param out_buf pointer to the output buffer
@param out_buf_size size of the output buffer in bytes
@param bit_order_lsb bit order of the resulting vtiled buffer
Invert a draw buffer in the I1 color format.
Conventionally, a bit is set to 1 during blending if the luminance is greater than 127.
Depending on the display controller used, you might want to have different behavior.
The inversion will be performed in place.
@param buf pointer to the buffer to be inverted
@param buf_size size of the buffer in bytes
Converts an I1 buffer to ARGB8888 format.
@param buf_i1 pointer to buffer with I1 formatted render
@param buf_argb8888 pointer to buffer for ARGB8888 render
@param width width in pixels of the area.
must be a multiple of 8.
@param height height in pixels of the area
@param buf_i1_stride stride of i1 buffer in bytes
@param buf_argb8888_stride stride of argb8888 buffer in bytes
@param index0_color color of the 0 bits of i1 buf
@param index1_color color of the 1 bits of i1 buf
Draw an image with SW render. It handles image decoding, tiling, transformations, and recoloring.
@param t pointer to a draw task
@param draw_dsc the draw descriptor
@param coords the coordinates of the image
Initialize an angle mask.
@param param pointer to a lv_draw_mask_param_t to initialize
@param vertex_x X coordinate of the angle vertex (absolute coordinates)
@param vertex_y Y coordinate of the angle vertex (absolute coordinates)
@param start_angle start angle in degrees. 0 deg on the right, 90 deg, on the bottom
@param end_angle end angle
Apply the added buffers on a line. Used internally by the library’s drawing routines.
@param masks the masks list to apply, must be ended with NULL pointer in array.
@param mask_buf store the result mask here. Has to be len byte long. Should be initialized with 0xFF.
@param abs_x absolute X coordinate where the line to calculate start
@param abs_y absolute Y coordinate where the line to calculate start
@param len length of the line to calculate (in pixel count)
@return One of these values:
Initialize a fade mask.
@param param pointer to a lv_draw_mask_param_t to initialize
@param coords coordinates of the area to affect (absolute coordinates)
@param opa_top opacity on the top
@param y_top at which coordinate start to change to opacity to opa_bottom
@param opa_bottom opacity at the bottom
@param y_bottom at which coordinate reach opa_bottom.
Free the data from the parameter.
It’s called inside lv_draw_sw_mask_remove_id and lv_draw_sw_mask_remove_custom
Needs to be called only in special cases when the mask is not added by lv_draw_mask_add
and not removed by lv_draw_mask_remove_id or lv_draw_mask_remove_custom
@param p pointer to a mask parameter
Initialize a line mask from a point and an angle.
@param param pointer to a lv_draw_mask_param_t to initialize
@param px X coordinate of a point of the line
@param py X coordinate of a point of the line
@param angle right 0 deg, bottom: 90
@param side an element of lv_draw_mask_line_side_t to describe which side to keep.
With LV_DRAW_MASK_LINE_SIDE_LEFT/RIGHT and horizontal line all pixels are kept
With LV_DRAW_MASK_LINE_SIDE_TOP/BOTTOM and vertical line all pixels are kept
Initialize a line mask from two points.
@param param pointer to a lv_draw_mask_param_t to initialize
@param p1x X coordinate of the first point of the line
@param p1y Y coordinate of the first point of the line
@param p2x X coordinate of the second point of the line
@param p2y y coordinate of the second point of the line
@param side and element of lv_draw_mask_line_side_t to describe which side to keep.
With LV_DRAW_MASK_LINE_SIDE_LEFT/RIGHT and horizontal line all pixels are kept
With LV_DRAW_MASK_LINE_SIDE_TOP/BOTTOM and vertical line all pixels are kept
Initialize a map mask.
@param param pointer to a lv_draw_mask_param_t to initialize
@param coords coordinates of the map (absolute coordinates)
@param map array of bytes with the mask values
Initialize a fade mask.
@param param pointer to an lv_draw_mask_radius_param_t to initialize
@param rect coordinates of the rectangle to affect (absolute coordinates)
@param radius radius of the rectangle
@param inv true: keep the pixels inside the rectangle; keep the pixels outside of the rectangle
Mask out a rectangle with radius from a current layer
@param t pointer to a draw task
@param dsc the draw descriptor
@param coords the coordinates of the mask
Register a custom blend handler for a color format.
Handler will be called when blending a color or an
image to a buffer with the given color format.
At most one handler can be registered for a color format.
Subsequent registrations will overwrite the previous handler.
Swap the upper and lower byte of an RGB565 buffer.
Might be required if a 8bit parallel port or an SPI port send the bytes in the wrong order.
The bytes will be swapped in place.
@param buf pointer to buffer
@param buf_size_px number of pixels in the buffer
Rotate a buffer into another buffer
@param src the source buffer
@param dest the destination buffer
@param src_width source width in pixels
@param src_height source height in pixels
@param src_stride source stride in bytes (number of bytes in a row)
@param dest_stride destination stride in bytes (number of bytes in a row)
@param rotation LV_DISPLAY_ROTATION_0/90/180/270
@param color_format LV_COLOR_FORMAT_RGB565/RGB888/XRGB8888/ARGB8888
Used internally to get a transformed are of an image
@param dest_area area to calculate, i.e. get this area from the transformed image
@param src_buf source buffer
@param src_w source buffer width in pixels
@param src_h source buffer height in pixels
@param src_stride source buffer stride in bytes
@param draw_dsc draw descriptor
@param sup supplementary data
@param cf color format of the source buffer
@param dest_buf the destination buffer
Unregister a custom blend handler for a color format.
@param dest_cf color format
@return true if a handler was unregistered, false if no handler was registered
Try to get an arc draw descriptor from a draw task.
@param task draw task
@return the task’s draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_ARC
Try to get a blur draw descriptor from a draw task.
@param task draw task
@return the task’s draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_BLUR
Try to get a border draw descriptor from a draw task.
@param task draw task
@return the task’s draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_BORDER
Try to get a box shadow draw descriptor from a draw task.
@param task draw task
@return the task’s draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_BOX_SHADOW
Try to get a fill draw descriptor from a draw task.
@param task draw task
@return the task’s draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_FILL
Try to get an image draw descriptor from a draw task.
@param task draw task
@return the task’s draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_IMAGE
Try to get a label draw descriptor from a draw task.
@param task draw task
@return the task’s draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_LABEL
Try to get a line draw descriptor from a draw task.
@param task draw task
@return the task’s draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_LINE
Try to get a rectangle mask draw descriptor from a draw task.
@param task draw task
@return the task’s draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_MASK_RECTANGLE
Try to get a triangle draw descriptor from a draw task.
@param task draw task
@return the task’s draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_TRIANGLE
Add an options to a drop-down list from a string. Only works for non-static options.
@param obj pointer to drop-down list object
@param option a string without ‘\n’. E.g. “Four”
@param pos the insert position, indexed from 0, LV_DROPDOWN_POS_LAST = end of string
Bind an integer Subject to a Dropdown’s value.
@param obj pointer to Dropdown
@param subject pointer to Subject
@return pointer to newly-created Observer
Create a drop-down list object
@param parent pointer to an object, it will be the parent of the new drop-down list
@return pointer to the created drop-down list
Get the list of a drop-down to allow styling or other modifications
@param obj pointer to a drop-down list object
@return pointer to the list of the drop-down
Get the index of an option.
@param obj pointer to drop-down object
@param option an option as string
@return index of option in the list of all options. -1 if not found.
Get the options of a drop-down list
@param obj pointer to drop-down list object
@return the options separated by ‘\n’-s (E.g. “Option1\nOption2\nOption3”)
Get whether the selected option in the list should be highlighted or not
@param obj pointer to drop-down list object
@return true: highlight enabled; false: disabled
Get the current selected option as a string
@param obj pointer to drop-down object
@param buf pointer to an array to store the string
@param buf_size size of buf in bytes. 0: to ignore it.
Get the symbol on the drop-down list. Typically a down caret or arrow.
@param obj pointer to drop-down list object
@return the symbol or NULL if not enabled
Set the options in a drop-down list from a string.
The options will be copied and saved in the object so the options can be destroyed after calling this function
@param obj pointer to drop-down list object
@param options a string with ‘\n’ separated options. E.g. “One\nTwo\nThree”
Set the options in a drop-down list from a static string (global, static or dynamically allocated).
Only the pointer of the option string will be saved.
@param obj pointer to drop-down list object
@param options a static string with ‘\n’ separated options. E.g. “One\nTwo\nThree”
Set whether the selected option in the list should be highlighted or not
@param obj pointer to drop-down list object
@param en true: highlight enabled; false: disabled
Set an arrow or other symbol to display when on drop-down list’s button. Typically a down caret or arrow.
@param obj pointer to drop-down list object
@param symbol a text like LV_SYMBOL_DOWN, an image (pointer or path) or NULL to not draw symbol icon
@note angle and zoom transformation can be applied if the symbol is an image.
E.g. when drop down is checked (opened) rotate the symbol by 180 degree
Set text of the drop-down list’s button.
If set to NULL the selected option’s text will be displayed on the button.
If set to a specific text then that text will be shown regardless of the selected option.
@param obj pointer to a drop-down list object
@param text the text as a string (Copy is saved)
Set text of the drop-down list’s button.
If set to NULL the selected option’s text will be displayed on the button.
If set to a specific text then that text will be shown regardless of the selected option.
@param obj pointer to a drop-down list object
@param text the text as a string (Only its pointer is saved)
Get a pointer to an area which should be examined whether the object fully covers it or not.
Can be used in LV_EVENT_HIT_TEST
@param e pointer to an event
@return an area with absolute coordinates to check
Get current target of the event. It’s the Widget for which the event handler being called.
If the event is not bubbled it’s the same as “normal” target.
@param e pointer to the event descriptor
@return pointer to the current target of the event_code
Get the current target of the event. It’s the object which event handler being called.
If the event is not bubbled it’s the same as “original” target.
@param e pointer to the event descriptor
@return the target of the event_code
Get a pointer to an lv_hit_test_info_t variable in which the hit test result should be saved. Can be used in LV_EVENT_HIT_TEST
@param e pointer to an event
@return pointer to lv_hit_test_info_t or NULL if called on an unrelated event
Get the input device passed as parameter to indev related events.
@param e pointer to an event
@return the indev that triggered the event or NULL if called on a not indev related event
Get the area to be invalidated. Can be used in LV_EVENT_INVALIDATE_AREA
@param e pointer to an event
@return the area to invalidated (can be modified as required)
Get the key passed as parameter to an event. Can be used in LV_EVENT_KEY
@param e pointer to an event
@return the triggering key or NULL if called on an unrelated event
Get the draw context which should be the first parameter of the draw functions.
Namely: LV_EVENT_DRAW_MAIN/POST, LV_EVENT_DRAW_MAIN/POST_BEGIN, LV_EVENT_DRAW_MAIN/POST_END
@param e pointer to an event
@return pointer to a draw context or NULL if called on an unrelated event
Get the old area of the object before its size was changed. Can be used in LV_EVENT_SIZE_CHANGED
@param e pointer to an event
@return the old absolute area of the object or NULL if called on an unrelated event
Get the signed rotary encoder diff. passed as parameter to an event. Can be used in LV_EVENT_ROTARY
@param e pointer to an event
@return the triggering key or NULL if called on an unrelated event
Get the animation descriptor of a scrolling. Can be used in LV_EVENT_SCROLL_BEGIN
@param e pointer to an event
@return the animation that will scroll the object. (can be modified as required)
Get a pointer to an lv_point_t variable in which the self size should be saved (width in point->x and height point->y).
Can be used in LV_EVENT_GET_SELF_SIZE
@param e pointer to an event
@return pointer to lv_point_t or NULL if called on an unrelated event
Get Widget originally targeted by the event. It’s the same even if event was bubbled.
@param e pointer to the event descriptor
@return the target of the event_code
Get the object originally targeted by the event. It’s the same even if the event is bubbled.
@param e pointer to the event descriptor
@return pointer to the original target of the event_code
Nested events can be called and one of them might belong to an object that is being deleted.
Mark this object’s event_temp_data deleted to know that its lv_obj_send_event should return LV_RESULT_INVALID
@param target pointer to an event target which was deleted
Stop event from trickling down to children.
This is only valid when called in the middle of an event processing chain.
@param e pointer to the event descriptor
Used as get_glyph_bitmap callback in lvgl’s native font format if the font is uncompressed.
@param g_dsc the glyph descriptor including which font to use, which supply the glyph_index and format.
@param draw_buf a draw buffer that can be used to store the bitmap of the glyph, it’s OK not to use it.
@return pointer to an A8 bitmap (not necessarily bitmap_out) or NULL if unicode_letter not found
Return with the bitmap of a font.
It always converts the normal fonts to A8 format in a draw_buf with
LV_DRAW_BUF_ALIGN and LV_DRAW_BUF_STRIDE_ALIGN
@note You must call lv_font_get_glyph_dsc() to get g_dsc (lv_font_glyph_dsc_t)
before you can call this function.
@param g_dsc the glyph descriptor including which font to use, which supply the glyph_index
and the format.
@param draw_buf a draw buffer that can be used to store the bitmap of the glyph.
@return pointer to the glyph’s data.
It can be a draw buffer for bitmap fonts or an image source for imgfonts.
Get the descriptor of a glyph
@param font pointer to font
@param dsc_out store the result descriptor here
@param letter a UNICODE letter code
@param letter_next the next letter after letter. Used for kerning
@return true: descriptor is successfully loaded into dsc_out.
false: the letter was not found, no data is loaded to dsc_out
Used as get_glyph_dsc callback in lvgl’s native font format if the font is uncompressed.
@param font pointer to font
@param dsc_out store the result descriptor here
@param unicode_letter a UNICODE letter code
@param unicode_letter_next the unicode letter succeeding the letter under test
@return true: descriptor is successfully loaded into dsc_out.
false: the letter was not found, no data is loaded to dsc_out
Return the bitmap as it is. It works only if the font stores the bitmap in
a non-volitile memory.
@param g_dsc the glyph descriptor including which font to use, which supply the glyph_index
and the format.
@return the bitmap as it is
Get the width of a glyph with kerning
@param font pointer to a font
@param letter a UNICODE letter
@param letter_next the next letter after letter. Used for kerning
@return the width of the glyph
Release the bitmap of a font.
@note You must call lv_font_get_glyph_dsc() to get g_dsc (lv_font_glyph_dsc_t) before you can call this function.
@param g_dsc the glyph descriptor including which font to use, which supply the glyph_index and the format.
Checks if a font has a static rendering bitmap.
@param font pointer to a font
@return return true if the font has a bitmap generated for static rendering.
Configure the use of kerning information stored in a font
@param font pointer to a font
@param kerning LV_FONT_KERNING_NORMAL (default) or LV_FONT_KERNING_NONE
Initialize a ‘fs_dir_t’ variable for directory reading
@param rddir_p pointer to a ‘lv_fs_dir_t’ variable
@param path path to a directory
@return LV_FS_RES_OK or any error from lv_fs_res_t enum
Read the next filename form a directory.
The name of the directories will begin with ‘/’
@param rddir_p pointer to an initialized ‘fs_dir_t’ variable
@param fn pointer to a buffer to store the filename
@param fn_len length of the buffer to store the filename
@return LV_FS_RES_OK or any error from lv_fs_res_t enum
Initialize a file system driver with default values.
It is used to ensure all fields have known values and not memory junk.
After it you can set the fields.
@param drv pointer to driver variable to initialize
Add a new drive
@param drv pointer to an lv_fs_drv_t structure which is inited with the
corresponding function pointers. Only pointer is saved, so the
driver should be static or dynamically allocated.
Get the buffer address and size from a path object
@param path pointer to an initialized lv_fs_path_ex data
@param buffer pointer to a void * variable to store the address
@param size pointer to an uint32_t data to store the size
@return LV_RESULT_OK: buffer and size are set; LV_RESULT_INVALID: an error happened.
Get the last element of a path (e.g. U:/folder/file -> file)
@param path pointer to a file name
@return pointer to the beginning of the last element in the path
Get the size in bytes of an open file.
The file read/write position will not be affected.
@param file_p pointer to a lv_fs_file_t variable
@param size_res pointer to store the file size
@return LV_FS_RES_OK or any error from lv_fs_res_t
Test if a drive is ready or not. If the ready function was not initialized true will be
returned.
@param letter letter of the drive
@return true: drive is ready; false: drive is not ready
Read the contents of a file at the given path into a buffer.
@param buf a buffer to read the contents of the file into
@param buf_size the size of the buffer and the amount to read from the file
@param path the path of the file
@return LV_FS_RES_OK on success, LV_FS_RES_UNKNOWN if fewer than
buf_size bytes could be read from the file,
or any error from lv_fs_res_t
Load a file into a memory buffer.
@param filename the path of the file
@param size pointer to store the size of the loaded file
@return a pointer to the loaded file buffer, or NULL if an error occurred
Create a special object from buffer/ memory address which looks like a file and can be passed
as path to lv_fs_open and other functions accepting a path.
Open a file
@param file_p pointer to a lv_fs_file_t variable
@param path path to the file beginning with the driver letter (e.g. S:/folder/file.txt)
@param mode read: FS_MODE_RD, write: FS_MODE_WR, both: FS_MODE_RD | FS_MODE_WR
@return LV_FS_RES_OK or any error from lv_fs_res_t enum
Get the size in bytes of a file at the given path.
@param path the path of the file
@param size_res pointer to store the file size
@return LV_FS_RES_OK or any error from lv_fs_res_t
Concatenate two path components and automatically add/remove a separator as needed.
buf, buf_sz, and the return value are analogous to lv_snprintf
@param buf the buffer to place the result in
@param buf_sz the size of buf. At most buf_sz - 1 characters will be written to buf,
and a null terminator
@param base the first path component
@param end the second path component
@return the number of characters (not including the null terminator)
that would be written to buf, even if buf_sz-1 was smaller
Read from a file
@param file_p pointer to a lv_fs_file_t variable
@param buf pointer to a buffer where the read bytes are stored
@param btr Bytes To Read
@param br the number of real read bytes (Bytes Read). NULL if unused.
@return LV_FS_RES_OK or any error from lv_fs_res_t enum
Set the position of the ‘cursor’ (read write pointer) in a file
@param file_p pointer to a lv_fs_file_t variable
@param pos the new position expressed in bytes index (0: start of file)
@param whence tells from where to set position. See lv_fs_whence_t
@return LV_FS_RES_OK or any error from lv_fs_res_t enum
Give the position of the read write pointer
@param file_p pointer to a lv_fs_file_t variable
@param pos pointer to store the position of the read write pointer
@return LV_FS_RES_OK or any error from ‘fs_res_t’
Write into a file
@param file_p pointer to a lv_fs_file_t variable
@param buf pointer to a buffer with the bytes to write
@param btw Bytes To Write
@param bw the number of real written bytes (Bytes Written). NULL if unused.
@return LV_FS_RES_OK or any error from lv_fs_res_t enum
Helper function to initialize conical gradient
@param dsc gradient descriptor
@param center_x center x position: can be a coordinate or an lv_pct() value
predefined constants LV_GRAD_LEFT, LV_GRAD_RIGHT, LV_GRAD_TOP, LV_GRAD_BOTTOM, LV_GRAD_CENTER can be used as well
@param center_y center y position
@param start_angle start angle in degrees
@param end_angle end angle in degrees
@param extend one of LV_GRAD_EXTEND_PAD, LV_GRAD_EXTEND_REPEAT or LV_GRAD_EXTEND_REFLECT
Initialize gradient color map from a table
@param grad pointer to a gradient descriptor
@param colors color array
@param fracs position array (0..255): if NULL, then colors are distributed evenly
@param opa opacity array: if NULL, then LV_OPA_COVER is assumed
@param num_stops number of gradient stops (1..LV_GRADIENT_MAX_STOPS)
Helper function to initialize linear gradient
@param dsc gradient descriptor
@param from_x start x position: can be a coordinate or an lv_pct() value
predefined constants LV_GRAD_LEFT, LV_GRAD_RIGHT, LV_GRAD_TOP, LV_GRAD_BOTTOM, LV_GRAD_CENTER can be used as well
@param from_y start y position
@param to_x end x position
@param to_y end y position
@param extend one of LV_GRAD_EXTEND_PAD, LV_GRAD_EXTEND_REPEAT or LV_GRAD_EXTEND_REFLECT
Helper function to initialize radial gradient
@param dsc gradient descriptor
@param center_x center x position: can be a coordinate or an lv_pct() value
predefined constants LV_GRAD_LEFT, LV_GRAD_RIGHT, LV_GRAD_TOP, LV_GRAD_BOTTOM, LV_GRAD_CENTER can be used as well
@param center_y center y position
@param to_x point on the end circle x position
@param to_y point on the end circle y position
@param extend one of LV_GRAD_EXTEND_PAD, LV_GRAD_EXTEND_REPEAT or LV_GRAD_EXTEND_REFLECT
Set focal (starting) circle of a radial gradient
@param dsc gradient descriptor
@param center_x center x position: can be a coordinate or an lv_pct() value
predefined constants LV_GRAD_LEFT, LV_GRAD_RIGHT, LV_GRAD_TOP, LV_GRAD_BOTTOM, LV_GRAD_CENTER can be used as well
@param center_y center y position
@param radius radius of the starting circle (NOTE: this must be a scalar number, not percentage)
Send a control character to Widget that has focus in a group.
@param group pointer to a group
@param c a character (use LV_KEY_.. to navigate)
@return result of Widget with focus in group.
Set default group. New Widgets will be added to this group if it’s enabled in
their class with add_to_def_group = true.
@param group pointer to a group (can be NULL)
Set a function for a group which will be called when a focus edge is reached
@param group pointer to a group
@param edge_cb the call back function or NULL if unused
Set a function for a group which will be called when a new Widget has focus.
@param group pointer to a group
@param focus_cb the call back function or NULL if unused
Set whether the next or previous Widget in a group gets focus when Widget that has
focus is deleted.
@param group pointer to a group
@param policy new refocus policy enum
Set whether moving focus to next/previous Widget will allow wrapping from
first->last or last->first Widget.
@param group pointer to group
@param en true: wrapping enabled; false: wrapping disabled
Get the area of a rectangle if its rotated and scaled
@param res store the coordinates here
@param w width of the rectangle to transform
@param h height of the rectangle to transform
@param angle angle of rotation
@param scale_x zoom in x direction, (256 no zoom)
@param scale_y zoom in y direction, (256 no zoom)
@param pivot x,y pivot coordinates of rotation
Resize image cache.
If set to 0, the cache will be disabled.
@param new_size new size of the cache in bytes.
@param evict_now true: evict the images should be removed by the eviction policy, false: wait for the next cache cleanup.
Decode full_area pixels incrementally by calling in a loop. Set decoded_area to LV_COORD_MIN on first call.
@param dsc image decoder descriptor
@param full_area input parameter. the full area to decode after enough subsequent calls
@param decoded_area input+output parameter. set the values to LV_COORD_MIN for the first call and to reset decoding.
the decoded area is stored here after each call.
@return LV_RESULT_OK: success; LV_RESULT_INVALID: an error occurred or there is nothing left to decode
Get information about an image.
Try the created image decoder one by one. Once one is able to get info that info will be used.
@param src the image source. Can be
Get the next image decoder in the linked list of image decoders
@param decoder pointer to an image decoder or NULL to get the first one
@return the next image decoder or NULL if no more image decoder exists
Initialize the image decoder module
@param image_cache_size Image cache size in bytes. 0 to disable cache.
@param image_header_count Number of header cache entries. 0 to disable header cache.
Open an image.
Try the created image decoders one by one. Once one is able to open the image that decoder is saved in dsc
@param dsc describes a decoding session. Simply a pointer to an lv_image_decoder_dsc_t variable.
@param src the image source. Can be
1) File name: E.g. “S:folder/img1.png” (The drivers needs to registered via lv_fs_drv_register()))
2) Variable: Pointer to an lv_image_dsc_t variable
3) Symbol: E.g. LV_SYMBOL_OK
@param args args about how the image should be opened.
@return LV_RESULT_OK: opened the image. dsc->decoded and dsc->header are set.
LV_RESULT_INVALID: none of the registered image decoders were able to open the image.
Check the decoded image, make any modification if decoder args requires.
@note A new draw buf will be allocated if provided decoded is not modifiable or stride mismatch etc.
@param dsc pointer to a decoder descriptor
@param decoded pointer to a decoded image to post process to meet dsc->args requirement.
@return post processed draw buffer, when it differs with decoded, it’s newly allocated.
Set a callback to close a decoding session. E.g. close files and free other resources.
@param decoder pointer to an image decoder
@param close_cb a function to close a decoding session
Set a callback to get information about the image
@param decoder pointer to an image decoder
@param info_cb a function to collect info about an image (fill an lv_image_header_t struct)
Get whether the transformations (rotate, zoom) are anti-aliased or not
@param obj pointer to an image object
@return true: anti-aliased; false: not anti-aliased
Get the pivot (rotation center) of the image.
If pivot is set with LV_PCT, convert it to px before return.
@param obj pointer to an image object
@param pivot store the rotation center here
Get the rotation of the image.
@param obj pointer to an image object
@return rotation in 0.1 degrees (0..3600)
@note if image_align is LV_IMAGE_ALIGN_STRETCH or LV_IMAGE_ALIGN_FIT
rotation will be set to 0 automatically.
Invalidate image header cache. Use NULL to invalidate all image headers.
It’s also automatically called when an image is invalidated.
@param src pointer to an image source.
Resize image header cache.
If set to 0, the cache is disabled.
@param count new max count of cached image headers.
@param evict_now true: evict the image headers should be removed by the eviction policy, false: wait for the next cache cleanup.
Enable/disable anti-aliasing for the transformations (rotate, zoom) or not.
The quality is better with anti-aliasing looks better but slower.
@param obj pointer to an image object
@param antialias true: anti-aliased; false: not anti-aliased
Set the image object size mode.
@param obj pointer to an image object
@param align the new align mode.
@note if image_align is LV_IMAGE_ALIGN_STRETCH or LV_IMAGE_ALIGN_FIT
rotation, scale and pivot will be overwritten and controlled internally.
Set an offset for the source of an image so the image will be displayed from the new origin.
@param obj pointer to an image
@param x the new offset along x axis.
Set an offset for the source of an image.
so the image will be displayed from the new origin.
@param obj pointer to an image
@param y the new offset along y axis.
Set the rotation center of the image.
The image will be rotated around this point.
x, y can be set with value of LV_PCT, lv_image_get_pivot will return the true pixel coordinate of pivot in this case.
@param obj pointer to an image object
@param x rotation center x of the image
@param y rotation center y of the image
Set the rotation angle of the image.
The image will be rotated around the set pivot set by lv_image_set_pivot()
Note that indexed and alpha only images can’t be transformed.
@param obj pointer to an image object
@param angle rotation in degree with 0.1 degree resolution (0..3600: clock wise)
@note if image_align is LV_IMAGE_ALIGN_STRETCH or LV_IMAGE_ALIGN_FIT
rotation will be set to 0 automatically.
Set the zoom factor of the image.
Note that indexed and alpha only images can’t be transformed.
@param obj pointer to an image object
@param zoom the zoom factor. Example values:
- 256 or LV_SCALE_NONE: no zoom
- <256: scale down
- >256: scale up
- 128: half size
- 512: double size
Set the horizontal zoom factor of the image.
Note that indexed and alpha only images can’t be transformed.
@param obj pointer to an image object
@param zoom the zoom factor. Example values:
- 256 or LV_SCALE_NONE: no zoom
- <256: scale down
- >256: scale up
- 128: half size
- 512: double size
Set the vertical zoom factor of the image.
Note that indexed and alpha only images can’t be transformed.
@param obj pointer to an image object
@param zoom the zoom factor. Example values:
- 256 or LV_SCALE_NONE: no zoom
- <256: scale down
- >256: scale up
- 128: half size
- 512: double size
Set the image data to display on the object
@param obj pointer to an image object
@param src 1) pointer to an ::lv_image_dsc_t descriptor (converted by LVGL’s image converter) (e.g. &my_img) or
2) path to an image file (e.g. “S:/dir/img.bin”)or
3) a SYMBOL (e.g. LV_SYMBOL_OK)
Create an image button object
@param parent pointer to an object, it will be the parent of the new image button
@return pointer to the created image button
Get the left image in a given state
@param obj pointer to an image button object
@param state the state where to get the image (from lv_button_state_t) `
@return pointer to the left image source (a C array or path to a file)
Get the middle image in a given state
@param obj pointer to an image button object
@param state the state where to get the image (from lv_button_state_t) `
@return pointer to the middle image source (a C array or path to a file)
Get the right image in a given state
@param obj pointer to an image button object
@param state the state where to get the image (from lv_button_state_t) `
@return pointer to the left image source (a C array or path to a file)
Set images for a state of the image button
@param obj pointer to an image button object
@param state for which state set the new image
@param src_left pointer to an image source for the left side of the button (a C array or path to
a file)
@param src_mid pointer to an image source for the middle of the button (ideally 1px wide) (a C
array or path to a file)
@param src_right pointer to an image source for the right side of the button (a C array or path
to a file)
Set the left image for a state of the image button
@param obj pointer to an image button object
@param state for which state set the new image
@param src_left pointer to an image source for the left side of the button
(a C array or path to a file)
Set the middle image for a state of the image button
@param obj pointer to an image button object
@param state for which state set the new image
@param src_mid pointer to an image source for the middle of the button
(a C array or path to a file)
Set the right image for a state of the image button
@param obj pointer to an image button object
@param state for which state set the new image
@param src_right pointer to an image source for the right side of the button
(a C array or path to a file)
Get the currently processed input device. Can be used in action functions too.
@return pointer to the currently processed input device or NULL if no input device processing
right now
Add an event handler to the indev
@param indev pointer to an indev
@param event_cb an event callback
@param filter event code to react or LV_EVENT_ALL
@param user_data optional user_data
Enable or disable one or all input devices (default enabled)
@param indev pointer to an input device or NULL to enable/disable all of them
@param enable true to enable, false to disable
Find a scrollable object based on the current scroll vector in the indev.
In handles scroll propagation to the parent if needed, and scroll directions too.
@param indev pointer to an indev
@return the found scrollable object or NULL if not found.
Gets a pointer to the currently active object in the currently processed input device.
@return pointer to currently active object or NULL if no active object
Get a pointer to the assigned display of the indev
@param indev pointer to an input device
@return pointer to the assigned display or NULL if indev is NULL
Get the last pressed key of an input device (for LV_INDEV_TYPE_KEYPAD)
@param indev pointer to an input device
@return the last pressed key (0 on error)
Get the next input device.
@param indev pointer to the current input device. NULL to initialize.
@return the next input device or NULL if there are no more. Provide the first input device when
the parameter is NULL
Get the last point of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON)
@param indev pointer to an input device
@param point pointer to a point to store the result
Get whether indev is moved while pressed
@param indev pointer to an input device
@return true: indev is moved while pressed; false: indev is not moved while pressed
Get the callback function to read input device data to the indev
@param indev pointer to an input device
@return Pointer to callback function to read input device data or NULL if indev is NULL
Get a pointer to the indev read timer to
modify its parameters with lv_timer_... functions.
@param indev pointer to an input device
@return pointer to the indev read refresher timer. (NULL on error)
Check the current scroll direction of an input device (for LV_INDEV_TYPE_POINTER and
LV_INDEV_TYPE_BUTTON)
@param indev pointer to an input device
@return LV_DIR_NONE: no scrolling now
LV_DIR_HOR/VER
Get the currently scrolled object (for LV_INDEV_TYPE_POINTER and
LV_INDEV_TYPE_BUTTON)
@param indev pointer to an input device
@return pointer to the currently scrolled object or NULL if no scrolling by this indev
Get the counter for consecutive clicks within a short distance and time.
The counter is updated before LV_EVENT_SHORT_CLICKED is fired.
@param indev pointer to an input device
@return short click streak counter
Get the type of an input device
@param indev pointer to an input device
@return the type of the input device from lv_hal_indev_type_t (LV_INDEV_TYPE_...)
Get the movement vector of an input device (for LV_INDEV_TYPE_POINTER and
LV_INDEV_TYPE_BUTTON)
@param indev pointer to an input device
@param point pointer to a point to store the types.pointer.vector
Remove an event
@param indev pointer to an indev
@param index the index of the event to remove
@return true: and event was removed; false: no event was removed
Remove an event_cb with user_data
@param indev pointer to a indev
@param event_cb the event_cb of the event to remove
@param user_data user_data
@return the count of the event removed
Reset one or all input devices
@param indev pointer to an input device to reset or NULL to reset all of them
@param obj pointer to an object which triggers the reset.
Get the distance of the nearest snap point
@param obj the object on which snap points should be found
@param p save the distance of the found snap point there
Predict where would a scroll throw end
@param indev pointer to an input device
@param dir LV_DIR_VER or LV_DIR_HOR
@return the difference compared to the current position when the throw would be finished
Search the most top, clickable object by a point
@param obj pointer to a start object, typically the screen
@param point pointer to a point for searching the most top child
@return pointer to the found object or NULL if there was no suitable object
Send an event to an indev
@param indev pointer to an indev
@param code an event code. LV_EVENT_…
@param param optional param
@return LV_RESULT_OK: indev wasn’t deleted in the event.
Set the an array of points for LV_INDEV_TYPE_BUTTON.
These points will be assigned to the buttons to press a specific point on the screen
@param indev pointer to an input device
@param points array of points
Set a cursor for a pointer input device (for LV_INPUT_TYPE_POINTER and LV_INPUT_TYPE_BUTTON)
@param indev pointer to an input device
@param cur_obj pointer to an object to be used as cursor
Set the minimum distance threshold for gesture detection.
The total distance from the first point to the current point must exceed
this value (in pixels) for the movement to be considered large enough
to trigger a gesture.
Set the minimum velocity threshold for gesture detection.
The difference between consecutive points must exceed this value (in pixels)
for the movement to be considered fast enough to trigger a gesture.
Set key remapping callback (LV_INDEV_TYPE_KEYPAD)
@param indev pointer to an indev
@param remap_cb remapping function callback. Use NULL to disable callback.
Set a callback function to read input device data to the indev
@param indev pointer to an input device
@param read_cb pointer to callback function to read input device data
Set scroll limit to the input device
@param indev pointer to an input device
@param scroll_limit the number of pixels to slide before actually drag the object
Set scroll throw slow-down to the indev. Greater value means faster slow-down
@param indev pointer to an input device
@param scroll_throw the slow-down in [%]
Set the type of an input device
@param indev pointer to an input device
@param indev_type the type of the input device from lv_indev_type_t (LV_INDEV_TYPE_...)
Touch and key related events are sent to the input device first and to the widget after that.
If this functions called in an indev event, the event won’t be sent to the widget.
@param indev pointer to an input device
Invalidate an area on display to redraw it
@param area_p pointer to area which should be invalidated (NULL: delete the invalidated areas)
@param disp pointer to display where the area should be invalidated (NULL can be used if there is
only one display)
@return LV_RESULT_OK: the area is invalidated; LV_RESULT_INVALID: the area wasn’t invalidated.
Create an iterator based on an instance, and then the next element of the iterator can be obtained through lv_iter_next,
In order to obtain the next operation in a unified and abstract way.
@param instance The instance to be iterated
@param elem_size The size of the element to be iterated in bytes
@param context_size The size of the context to be passed to the next_cb in bytes
@param next_cb The callback function to get the next element
@return The iterator object
Destroy the iterator object, and release the context. Other resources allocated by the user are not released.
The user needs to release it by itself.
@param iter lv_iter_t object create before
Get the context of the iterator. You can use it to store some temporary variables associated with current iterator..
@param iter lv_iter_t object create before
@return the iter context
Inspect the element of the iterator. The callback function will be called for each element of the iterator.
@param iter lv_iter_t object create before
@param inspect_cb The callback function to inspect the element
Make the iterator peekable, which means that the user can peek the next element without advancing the iterator.
@param iter lv_iter_t object create before
@param capacity The capacity of the peek buffer
Get the next element of the iterator.
@param iter lv_iter_t object create before
@param elem The pointer to store the next element
@return LV_RESULT_OK: Get the next element successfully
LV_RESULT_INVALID: The next element is invalid
Peek the next element of the iterator without advancing the iterator.
@param iter lv_iter_t object create before
@param elem The pointer to store the next element
@return LV_RESULT_OK: Peek the next element successfully
LV_RESULT_INVALID: The next element is invalid
Only advance the iterator without getting the next element.
@param iter lv_iter_t object create before
@return LV_RESULT_OK: Peek the next element successfully
LV_RESULT_INVALID: The next element is invalid
Reset the peek cursor to the next cursor.
@param iter lv_iter_t object create before
@return LV_RESULT_OK: Reset the peek buffer successfully
LV_RESULT_INVALID: The peek buffer is invalid
Default keyboard event callback to handle button presses.
Adds characters to the text area and switches map if needed.
If a custom event_cb is used, this function can be called within it.
@param e the triggering event
Get the text of a button by index.
@param obj pointer to a keyboard object
@param btn_id index of the button (excluding newline characters)
@return pointer to the text of the button
Get the index of the last selected button (pressed, released, focused, etc.).
Useful in the event_cb to retrieve button text or properties.
@param obj pointer to a keyboard object
@return index of the last interacted button
returns LV_BUTTONMATRIX_BUTTON_NONE if not set
Set a custom button map for the keyboard.
@param kb pointer to a keyboard object
@param mode the mode to assign the new map to (see ‘lv_keyboard_mode_t’)
@param map pointer to a string array describing the button map
see ‘lv_buttonmatrix_set_map()’ for more details
@param ctrl_map pointer to the control map. See ‘lv_buttonmatrix_set_ctrl_map()’
Set a new mode (e.g., text, number, special characters).
@param kb pointer to a keyboard object
@param mode the desired mode (see ‘lv_keyboard_mode_t’)
Assign a text area to the keyboard. Pressed characters will be inserted there.
@param kb pointer to a keyboard object
@param ta pointer to a text area object to write into
Bind an integer, string, or pointer Subject to a Label.
@param obj pointer to Label
@param subject pointer to Subject
@param fmt optional printf-like format string with 1 format specifier (e.g. “%d °C”)
or NULL to bind to the value directly.
@return pointer to newly-created Observer
@note If fmt == NULL strings and pointers (\0 terminated string) will be shown
as text as they are, integers as %d, floats as %0.1f
Delete characters from a label. The label text cannot be static.
@param obj pointer to a label object
@param pos character index from where to cut. Expressed in character index and not byte index.
0: start in front of the first character
@param cnt number of characters to cut
Get the index of letter on a relative point of a label.
@param obj pointer to label object
@param pos_in pointer to point with coordinates on a the label
@param bidi whether to use bidi processed
@return The index of the letter on the ‘pos_p’ point (E.g. on 0;0 is the 0. letter if aligned to the left)
Expressed in character index and not byte index (different in UTF-8)
Get the relative x and y coordinates of a letter
@param obj pointer to a label object
@param char_id index of the character [0 … text length - 1].
Expressed in character index, not byte index (different in UTF-8)
@param pos store the result here (E.g. index = 0 gives 0;0 coordinates if the text if aligned to the left)
@brief Get the selection start index.
@param obj pointer to a label object.
@return selection start index. LV_LABEL_TEXT_SELECTION_OFF if nothing is selected.
Insert a text to a label. The label text cannot be static.
@param obj pointer to a label object
@param pos character index to insert. Expressed in character index and not byte index.
0: before first char. LV_LABEL_POS_LAST: after last char.
@param txt pointer to the text to insert
Check if a character is drawn under a point.
@param obj pointer to a label object
@param pos Point to check for character under
@return whether a character is drawn under the point
Set the behavior of the label with text longer than the object size
@param obj pointer to a label object
@param long_mode the new mode from ‘lv_label_long_mode’ enum.
In LV_LONG_WRAP/DOT/SCROLL/SCROLL_CIRC the size of the label should be set AFTER this function
Enable the recoloring by in-line commands
@param obj pointer to a label object
@param en true: enable recoloring, false: disable
Example: “This is a #ff0000 red# word”
Set a new text for a label. Memory will be allocated to store the text by the label.
@param obj pointer to a label object
@param text ‘\0’ terminated character string. NULL to refresh with the current text.
@note If LV_USE_ARABIC_PERSIAN_CHARS is enabled the text will be modified to have the correct Arabic
characters in it.
Set a new formatted text for a label. Memory will be allocated to store the text by the label.
@param obj pointer to a label object
@param fmt printf-like format string
Example:
@code
lv_label_set_text_fmt(label1, “%d user”, user_num);
@endcode
@note If LV_USE_ARABIC_PERSIAN_CHARS is enabled the text will be modified to have the correct Arabic characters in it.
Set where text selection should end
@param obj pointer to a label object
@param index character index where selection should end. LV_LABEL_TEXT_SELECTION_OFF for no selection
Set where text selection should start
@param obj pointer to a label object
@param index character index from where selection should start. LV_LABEL_TEXT_SELECTION_OFF for no selection
Set a static text. It will not be saved by the label so the ‘text’ variable
has to be ‘alive’ while the label exists.
@param obj pointer to a label object
@param text pointer to a text. NULL to refresh with the current text.
@note It ignores LV_USE_ARABIC_PERSIAN_CHARS
Set a new formatted text for a label. Memory will be allocated to store the text by the label.
@param obj pointer to a label object
@param fmt printf-like format string
@param args variadic arguments list
Create a new layout
@param callbacks the layout callbacks
@param user_data custom data that will be passed when a callback is invoked
@return the ID of the new layout
Get a pointer to the mutable array of points or NULL if it is not mutable
@param obj pointer to a line object
@return pointer to the array of points. NULL if not mutable.
Check the mutability of the stored point array pointer.
@param obj pointer to a line object
@return true: the point array pointer is mutable, false: constant
Set an array of points. The line object will connect these points.
@param obj pointer to a line object
@param points an array of points. Only the address is saved, so the array needs to be alive while the line exists
@param point_num number of points in ‘point_a’
Set a non-const array of points. Identical to lv_line_set_points except the array may be retrieved by lv_line_get_points_mutable.
@param obj pointer to a line object
@param points a non-const array of points. Only the address is saved, so the array needs to be alive while the line exists.
@param point_num number of points in ‘point_a’
Enable (or disable) the y coordinate inversion.
If enabled then y will be subtracted from the height of the object,
therefore the y = 0 coordinate will be on the bottom.
@param obj pointer to a line object
@param en true: enable the y inversion, false:disable the y inversion
Add button to a list
@param list pointer to a list, it will be the parent of the new button
@param icon icon for the button, when NULL it will have no icon
@param txt text of the new button, when NULL no text will be added
@return pointer to the created button
Add text to a list
@param list pointer to a list, it will be the parent of the new label
@param txt text of the new label
@return pointer to the created label
Get text of a given list button
@param list pointer to a list
@param btn pointer to the button
@return text of btn, if btn doesn’t have text “” will be returned
Move a node to a new linked list
@param ll_ori_p pointer to the original (old) linked list
@param ll_new_p pointer to the new linked list
@param node pointer to a node
@param head true: be the head in the new list
false be the tail in the new list
Return with the pointer of the previous node after ‘n_act’
@param ll_p pointer to linked list
@param n_act pointer a node
@return pointer to the previous node
Remove the node ‘node_p’ from ‘ll_p’ linked list.
It does not free the memory of node.
@param ll_p pointer to the linked list of ‘node_p’
@param node_p pointer to node in ‘ll_p’ linked list
Lock LVGL’s general mutex.
LVGL is not thread safe, so a mutex is used to avoid executing multiple LVGL functions at the same time
from different threads. It shall be called when calling LVGL functions from threads
different than lv_timer_handler’s thread. It doesn’t need to be called in LVGL events because
they are called from lv_timer_handler().
It is called internally in lv_timer_handler().
Print a log message via printf if enabled with LV_LOG_PRINTF in lv_conf.h
and/or a print callback if registered with lv_log_register_print_cb
@param format printf-like format string
@param … parameters for format
Add a log
@param level the level of log. (From lv_log_level_t enum)
@param file name of the file when the log added
@param line line number in the source code where the log added
@param func name of the function when the log added
@param format printf-like format string
@param … parameters for format
Register custom print/write function to call when a log is added.
It can format its “File path”, “Line number” and “Description” as required
and send the formatted log message to a console or serial port.
@param print_cb a function pointer to print a log
Get the mapped of a number given an input and output range
@param x integer which mapped value should be calculated
@param min_in min input range
@param max_in max input range
@param min_out max output range
@param max_out max output range
@return the mapped number
Give information about the work memory of dynamic allocation
@param mon_p pointer to a lv_mem_monitor_t variable,
the result of the analysis will be stored here
@brief Tests the memory allocation system by allocating and freeing a block of memory.
@return LV_RESULT_OK if the memory allocation system is working properly, or LV_RESULT_INVALID if there is an error.
@brief This function will compare two memory blocks
@param p1 Pointer to the first memory block
@param p2 Pointer to the second memory block
@param len Number of bytes to compare
@return The difference between the value of the first unmatching byte.
@brief Copies a block of memory from a source address to a destination address.
@param dst Pointer to the destination array where the content is to be copied.
@param src Pointer to the source of data to be copied.
@param len Number of bytes to copy.
@return Pointer to the destination array.
@note The function does not check for any overlapping of the source and destination memory blocks.
@brief Move a block of memory from source to destination
@param dst Pointer to the destination array where the content is to be copied.
@param src Pointer to the source of data to be copied.
@param len Number of bytes to copy
@return Pointer to the destination array.
@brief Fills a block of memory with a specified value.
@param dst Pointer to the destination array to fill with the specified value.
@param v Value to be set. The value is passed as an int, but the function fills
the block of memory using the unsigned char conversion of this value.
@param len Number of bytes to be set to the value.
Create a menu cont object
@param parent pointer to a menu page or menu section object, it will be the parent of the new menu cont object
@return pointer to the created menu cont
Create a menu section object
@param parent pointer to a menu page object, it will be the parent of the new menu section object
@return pointer to the created menu section
Create a menu separator object
@param parent pointer to a menu page object, it will be the parent of the new menu separator object
@return pointer to the created menu separator
Set menu page to display in main
@param obj pointer to the menu
@param page pointer to the menu page to set (NULL to clear main and clear menu history)
Set menu page title with a static text. It will not be saved by the label so the ‘text’ variable
has to be ‘alive’ while the page exists.
@param page pointer to the menu page
@param title pointer to text for title in header (NULL to not display title)
Add a button to the footer of to the message box. It also creates a footer.
@param obj pointer to a message box
@param text the text of the button
@return the created button
Add a button to the header of to the message box. It also creates a header.
@param obj pointer to a message box
@param icon the icon of the button
@return the created button
Add a text to the content area of message box. Multiple texts will be created below each other.
@param obj pointer to a message box
@param text text to add
@return the created label
Add a formatted text to the content area of message box. Multiple texts will be created below each other.
@param obj pointer to a message box
@param fmt printf-like format string
@return the created label
Add title to the message box. It also creates a header for the title.
@param obj pointer to a message box
@param title the text of the tile
@return the created title label
Add an event handler function for an object.
Used by the user to react on event which happens with the object.
An object can have multiple event handler. They will be called in the same order as they were added.
@param obj pointer to an object
@param filter an event code (e.g. LV_EVENT_CLICKED) on which the event should be called. LV_EVENT_ALL can be used to receive all the events.
@param event_cb the new event function
@param user_data custom data will be available in event_cb
@return handler to the event. It can be used in lv_obj_remove_event_dsc.
Play a timeline animation on a trigger
@param obj pointer to widget which should trigger playing the animation
@param trigger an event code, e.g. LV_EVENT_CLICKED
@param at pointer to an animation timeline
@param delay wait time before starting the animation
@param reverse true: play in reverse
Add an event handler to a widget that will create a screen on a trigger.
The created screen will be deleted when it’s unloaded
@param obj pointer to widget which should load the screen
@param trigger an event code, e.g. LV_EVENT_CLICKED
@param screen_create_cb a callback to create the screen, e.g. lv_obj_t * myscreen_create(void)
@param anim_type element of lv_screen_load_anim_t the screen load animation
@param duration duration of the animation in milliseconds
@param delay delay before the screen load in milliseconds
Add an event handler to a widget that will load a screen on a trigger.
@param obj pointer to widget which should load the screen
@param trigger an event code, e.g. LV_EVENT_CLICKED
@param screen the screen to load (must be a valid widget)
@param anim_type element of lv_screen_load_anim_t the screen load animation
@param duration duration of the animation in milliseconds
@param delay delay before the screen load in milliseconds
Add one or more states to the object. The other state bits will remain unchanged.
If specified in the styles, transition animation will be started from the previous state to the current.
@param obj pointer to an object
@param state the states to add. E.g LV_STATE_PRESSED | LV_STATE_FOCUSED
Add a style to an object.
@param obj pointer to an object
@param style pointer to a style to add
@param selector OR-ed value of parts and state to which the style should be added
Add an event handler to increment (or decrement) the value of a subject on a trigger.
@param obj pointer to a widget
@param subject pointer to a subject to change
@param trigger the trigger on which the subject should be changed
@param step value to add on trigger
if the minimum value is reached, the maximum value will be set on rollover.
Set the value of an integer subject.
@param obj pointer to a widget
@param subject pointer to a subject to change
@param trigger the trigger on which the subject should be changed
@param value the value to set
Set the value of a string subject.
@param obj pointer to a widget
@param subject pointer to a subject to change
@param trigger the trigger on which the subject should be changed
@param value the value to set
Toggle the value of an integer subject on an event. If it was != 0 it will be 0.
If it was 0, it will be 1.
@param obj pointer to a widget
@param subject pointer to a subject to toggle
@param trigger the trigger on which the subject should be changed
Change the alignment of an object and set new coordinates.
Equivalent to:
lv_obj_set_align(obj, align);
lv_obj_set_pos(obj, x_ofs, y_ofs);
@param obj pointer to an object to align
@param align type of alignment (see ‘lv_align_t’ enum) LV_ALIGN_OUT_... can’t be used.
@param x_ofs x coordinate offset after alignment
@param y_ofs y coordinate offset after alignment
Align an object to another object.
@param obj pointer to an object to align
@param base pointer to another object (if NULL objs parent is used). ‘obj’ will be aligned to it.
@param align type of alignment (see ‘lv_align_t’ enum)
@param x_ofs x coordinate offset after alignment
@param y_ofs y coordinate offset after alignment
@note if the position or size of base changes obj needs to be aligned manually again
Tell whether an area of an object is visible (even partially) now or not
@param obj pointer to an object
@param area the are to check. The visible part of the area will be written back here.
@return true visible; false not visible (hidden, out of parent, on other screen, etc)
Set an integer Subject to 1 when a Widget is checked and set it 0 when unchecked, and
clear Widget’s checked state when Subject’s value changes to 0 and set it when non-zero.
@param obj pointer to Widget
@param subject pointer to a Subject
@return pointer to newly-created Observer
@note Ensure Widget’s LV_OBJ_FLAG_CHECKABLE flag is set.
Set Widget’s flag(s) if an integer Subject’s value is equal to a reference value, clear flag otherwise.
@param obj pointer to Widget
@param subject pointer to Subject
@param flag flag(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_OBJ_FLAG_HIDDEN)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Set Widget’s flag(s) if an integer Subject’s value is greater than or equal to a reference value, clear flag otherwise.
@param obj pointer to Widget
@param subject pointer to Subject
@param flag flag(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_OBJ_FLAG_HIDDEN)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Set Widget’s flag(s) if an integer Subject’s value is greater than a reference value, clear flag otherwise.
@param obj pointer to Widget
@param subject pointer to Subject
@param flag flag(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_OBJ_FLAG_HIDDEN)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Set Widget’s flag(s) if an integer Subject’s value is less than or equal to a reference value, clear flag otherwise.
@param obj pointer to Widget
@param subject pointer to Subject
@param flag flag(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_OBJ_FLAG_HIDDEN)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Set Widget’s flag(s) if an integer Subject’s value is less than a reference value, clear flag otherwise.
@param obj pointer to Widget
@param subject pointer to Subject
@param flag flag(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_OBJ_FLAG_HIDDEN)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Set Widget’s flag(s) if an integer Subject’s value is not equal to a reference value, clear flag otherwise.
@param obj pointer to Widget
@param subject pointer to Subject
@param flag flag(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_OBJ_FLAG_HIDDEN)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Set Widget’s state(s) if an integer Subject’s value is equal to a reference value, clear flag otherwise.
@param obj pointer to Widget
@param subject pointer to Subject
@param state state(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_STATE_CHECKED)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Set Widget’s state(s) if an integer Subject’s value is greater than or equal to a reference value, clear flag otherwise.
@param obj pointer to Widget
@param subject pointer to Subject
@param state state(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_STATE_CHECKED)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Set Widget’s state(s) if an integer Subject’s value is greater than a reference value, clear flag otherwise.
@param obj pointer to Widget
@param subject pointer to Subject
@param state state(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_STATE_CHECKED)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Set Widget’s state(s) if an integer Subject’s value is less than or equal to a reference value, clear flag otherwise.
@param obj pointer to Widget
@param subject pointer to Subject
@param state state(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_STATE_CHECKED)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Set Widget’s state(s) if an integer Subject’s value is less than a reference value, clear flag otherwise.
@param obj pointer to Widget
@param subject pointer to Subject
@param state state(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_STATE_CHECKED)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Set a Widget’s state(s) if an integer Subject’s value is not equal to a reference value, clear flag otherwise
@param obj pointer to Widget
@param subject pointer to Subject
@param state state(s) (can be bit-wise OR-ed) to set or clear (e.g. LV_STATE_CHECKED)
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Disable a style if a subject’s value is not equal to a reference value
@param obj pointer to Widget
@param style pointer to a style
@param selector pointer to a selector
@param subject pointer to Subject
@param ref_value reference value to compare Subject’s value with
@return pointer to newly-created Observer
Connect a subject’s value to a style property of a widget.
@param obj pointer to a Widget
@param prop a style property
@param selector a selector for which the property should be added, e.g. LV_PART_KNOB | LV_STATE_PRESSED
@param subject pointer a Subject to which value the property should be bound
@return pointer to newly-created Observer
@brief Calculates the height in pixels of an LVGL object based on its style and parent for a given height prop.
@param obj Pointer to the LVGL object whose height is being calculated.
@param prop Which style height to calculate for. Valid values are: LV_STYLE_HEIGHT, LV_STYLE_MIN_HEIGHT, or
LV_STYLE_MAX_HEIGHT.
@return The computed height for the object:
@note If the style height is a fixed value, that value is returned.
@note If the style height is LV_SIZE_CONTENT, the content height is calculated and returned.
@note If the style height is a LV_PCT(), the percentage is applied to the parent’s height.
@brief Calculates the width in pixels of an LVGL object based on its style and parent for a given width prop.
@param obj Pointer to the LVGL object whose width is being calculated.
@param prop Which style width to calculate for. Valid values are: LV_STYLE_WIDTH, LV_STYLE_MIN_WIDTH, or
LV_STYLE_MAX_WIDTH.
@return The computed width for the object:
@note If the style width is a fixed value, that value is returned.
@note If the style width is LV_SIZE_CONTENT, the content width is calculated and returned.
@note If the style width is a LV_PCT(), the percentage is applied to the parent’s width.
Get the required extra size (around the object’s part) to draw shadow, outline, value etc.
@param obj pointer to an object
@param part part of the object
@return the extra size required around the object
Align an object to the center on its parent.
@param obj pointer to an object to align
@note if the parent size changes obj needs to be aligned manually again
Create an object form a class descriptor
@param class_p pointer to a class
@param parent pointer to an object where the new object should be created
@return pointer to the created object
Delete all children of an object.
Also remove the objects from their group and remove all animations (if any).
Send LV_EVENT_DELETE to deleted objects.
@param obj pointer to an object
Delete an object and all of its children.
Also remove the objects from their group and remove all animations (if any).
Send LV_EVENT_DELETE to deleted objects.
@param obj pointer to an object
Helper function for asynchronously deleting objects.
Useful for cases where you can’t delete an object directly in an LV_EVENT_DELETE handler (i.e. parent).
@param obj object to delete
@see lv_async_call
Enable or disable automatic style refreshing when a new style is added/removed to/from an object
or any other style change happens.
@param en true: enable refreshing; false: disable refreshing
Used by the widgets internally to call the ancestor widget types’s event handler
@param class_p pointer to the class of the widget (NOT the ancestor class)
@param e pointer to the event descriptor
@return LV_RESULT_OK: the target object was not deleted in the event; LV_RESULT_INVALID: it was deleted in the event_code
Get the child of an object by the child’s index.
@param obj pointer to an object whose child should be get
@param idx the index of the child.
0: the oldest (firstly created) child
1: the second oldest
child count-1: the youngest
-1: the youngest
-2: the second youngest
@return pointer to the child or NULL if the index was invalid
Get the child of an object by the child’s index. Consider the children only with a given type.
@param obj pointer to an object whose child should be get
@param idx the index of the child.
0: the oldest (firstly created) child
1: the second oldest
child count-1: the youngest
-1: the youngest
-2: the second youngest
@param class_p the type of the children to check
@return pointer to the child or NULL if the index was invalid
Get the number of children having a given type.
@param obj pointer to an object
@param class_p the type of the children to check
@return the number of children
Get the an area where to object can be clicked.
It’s the object’s normal area plus the extended click area.
@param obj pointer to an object
@param area store the result area here
Get the area reduced by the paddings and the border width.
@param obj pointer to an object
@note The position of the object is recalculated only on the next redraw. To force coordinate recalculation
call lv_obj_update_layout(obj).
@param area the area which still fits into the parent without causing overflow (making the parent scrollable)
Get the height reduced by the top and bottom padding and the border width.
@param obj pointer to an object
@note The position of the object is recalculated only on the next redraw. To force coordinate recalculation
call lv_obj_update_layout(obj).
@return the height which still fits into the parent without causing overflow (making the parent scrollable)
Get the width reduced by the left and right padding and the border width.
@param obj pointer to an object
@note The position of the object is recalculated only on the next redraw. To force coordinate recalculation
call lv_obj_update_layout(obj).
@return the width which still fits into its parent without causing overflow (making the parent scrollable)
Get the height of an object
@param obj pointer to an object
@note The position of the object is recalculated only on the next redraw. To force coordinate recalculation
call lv_obj_update_layout(obj).
@return the height in pixels
Get the index of a child.
@param obj pointer to an object
@return the child index of the object.
E.g. 0: the oldest (firstly created child).
(-1 if child could not be found or no parent exists)
Get the index of a child. Consider the children only with a given type.
@param obj pointer to an object
@param class_p the type of the children to check
@return the child index of the object.
E.g. 0: the oldest (firstly created child with the given class).
(-1 if child could not be found or no parent exists)
Number of pixels a scrollable container Widget can be scrolled up
before its bottom edge appears. When LV_OBJ_FLAG_SCROLL_ELASTIC flag
is set in Widget, this value can go negative while Widget is being
dragged above its normal bottom-edge boundary.
@param obj pointer to scrollable container Widget
@return pixels Widget can be scrolled up before its bottom edge appears
Get the X and Y coordinates where the scrolling will end for Widget if a scrolling animation is in progress.
If no scrolling animation, give the current x or y scroll position.
@param obj pointer to scrollable Widget
@param end pointer to lv_point_t object in which to store result
Number of pixels a scrollable container Widget can be scrolled right
before its left edge appears. When LV_OBJ_FLAG_SCROLL_ELASTIC flag
is set in Widget, this value can go negative while Widget is being
dragged farther right than its normal left-edge boundary.
@param obj pointer to scrollable container Widget
@return pixels Widget can be scrolled right before its left edge appears
Number of pixels a scrollable container Widget can be scrolled left
before its right edge appears. When LV_OBJ_FLAG_SCROLL_ELASTIC flag
is set in Widget, this value can go negative while Widget is being
dragged farther left than its normal right-edge boundary.
@param obj pointer to scrollable container Widget
@return pixels Widget can be scrolled left before its right edge appears
Number of pixels a scrollable container Widget can be scrolled down
before its top edge appears. When LV_OBJ_FLAG_SCROLL_ELASTIC flag
is set in Widget, this value can go negative while Widget is being
dragged below its normal top-edge boundary.
@param obj pointer to scrollable container Widget
@return pixels Widget can be scrolled down before its top edge appears
Get current X scroll position. Identical to lv_obj_get_scroll_left().
@param obj pointer to scrollable container Widget
@return current scroll position from left edge
- If Widget is not scrolled return 0.
- If scrolled return > 0.
- If scrolled inside (elastic scroll) return < 0.
Get current Y scroll position. Identical to lv_obj_get_scroll_top().
@param obj pointer to scrollable container Widget
@return current scroll position from top edge
- If Widget is not scrolled return 0.
- If scrolled return > 0.
- If scrolled inside (elastic scroll) return < 0.
Get the area of the scrollbars
@param obj pointer to Widget
@param hor pointer to store the area of the horizontal scrollbar
@param ver pointer to store the area of the vertical scrollbar
Get the height occupied by the “parts” of the widget. E.g. the height of all rows of a table.
@param obj pointer to an object
@return the width of the virtually drawn content
@note This size independent from the real size of the widget.
It just tells how large the internal (“virtual”) content is.
Get the width occupied by the “parts” of the widget. E.g. the width of all columns of a table.
@param obj pointer to an object
@return the width of the virtually drawn content
@note This size independent from the real size of the widget.
It just tells how large the internal (“virtual”) content is.
Return a sibling of an object
@param obj pointer to an object whose sibling should be get
@param idx 0: obj itself
-1: the first older sibling
-2: the next older sibling
1: the first younger sibling
2: the next younger sibling
etc
@return pointer to the requested sibling or NULL if there is no such sibling
Return a sibling of an object. Consider the siblings only with a given type.
@param obj pointer to an object whose sibling should be get
@param idx 0: obj itself
-1: the first older sibling
-2: the next older sibling
1: the first younger sibling
2: the next younger sibling
etc
@param class_p the type of the children to check
@return pointer to the requested sibling or NULL if there is no such sibling
Get the style height actually used by the object after clamping the height within the min max range.
@param obj pointer to an object
@return the min/max/normal height set by lv_obj_set_style_<min/max>_height()
@note This is not the calculated size, so if the size was set as LV_SIZE_CONTENT or LV_PCT()
then that value will be returned.
Get the style width actually used by the object after clamping the width within the min max range.
@param obj pointer to an object
@return the min/max/normal width set by lv_obj_set_style_<min/max>_width()
@note This is not the calculated size, so if the size was set as LV_SIZE_CONTENT or LV_PCT()
then that value will be returned.
Get the opa style property from all parents and multiply and >> 8 them.
@param obj the object whose opacity should be get
@param part the part whose opacity should be get. Non-MAIN parts will consider the opa of the MAIN part too
@return the final opacity considering the parents’ opacity too
Get the value of a style property. The current state of the object will be considered.
Inherited properties will be inherited.
If a property is not set a default value will be returned.
@param obj pointer to an object
@param part a part from which the property should be get
@param prop the property to get
@return the value of the property.
Should be read from the correct field of the lv_style_value_t according to the type of the property.
Get the recolor style property from all parents and blend them recursively.
@param obj the object whose recolor value should be retrieved
@param part the target part to check. Non-MAIN parts will also consider
the recolor value from the MAIN part during calculation
@return the final blended recolor value combining all parent’s recolor values
Transform an area using the angle and zoom style properties of an object
@param obj pointer to an object whose style properties should be used
@param area an area to transform, the result will be written back here too
@param flags OR-ed valued of :cpp:enum:lv_obj_point_transform_flag_t
Get the width of an object
@param obj pointer to an object
@note The position of the object is recalculated only on the next redraw. To force coordinate recalculation
call lv_obj_update_layout(obj).
@return the width in pixels
Get the x coordinate of object.
@param obj pointer to an object
@return distance of obj from the left side of its parent plus the parent’s left padding
@note The position of the object is recalculated only on the next redraw. To force coordinate recalculation
call lv_obj_update_layout(obj).
@note Zero return value means the object is on the left padding of the parent, and not on the left edge.
@note Scrolling of the parent doesn’t change the returned value.
@note The returned value is always the distance from the parent even if obj is positioned by a layout.
Get the x2 coordinate of object.
@param obj pointer to an object
@return distance of obj from the right side of its parent plus the parent’s right padding
@note The position of the object is recalculated only on the next redraw. To force coordinate recalculation
call lv_obj_update_layout(obj).
@note Zero return value means the object is on the right padding of the parent, and not on the right edge.
@note Scrolling of the parent doesn’t change the returned value.
@note The returned value is always the distance from the parent even if obj is positioned by a layout.
Get the y coordinate of object.
@param obj pointer to an object
@return distance of obj from the top side of its parent plus the parent’s top padding
@note The position of the object is recalculated only on the next redraw. To force coordinate recalculation
call lv_obj_update_layout(obj).
@note Zero return value means the object is on the top padding of the parent, and not on the top edge.
@note Scrolling of the parent doesn’t change the returned value.
@note The returned value is always the distance from the parent even if obj is positioned by a layout.
Get the y2 coordinate of object.
@param obj pointer to an object
@return distance of obj from the bottom side of its parent plus the parent’s bottom padding
@note The position of the object is recalculated only on the next redraw. To force coordinate recalculation
call lv_obj_update_layout(obj).
@note Zero return value means the object is on the bottom padding of the parent, and not on the bottom edge.
@note Scrolling of the parent doesn’t change the returned value.
@note The returned value is always the distance from the parent even if obj is positioned by a layout.
Check if any object has a given class (type).
It checks the ancestor classes too.
@param obj pointer to an object
@param class_p a class to check (e.g. lv_slider_class)
@return true: obj has the given class
Check if a given flag or all the given flags are set on an object.
@param obj pointer to an object
@param f the flag(s) to check (OR-ed values can be used)
@return true: all flags are set; false: not all flags are set
Check if a given flag or any of the flags are set on an object.
@param obj pointer to an object
@param f the flag(s) to check (OR-ed values can be used)
@return true: at least one flag is set; false: none of the flags are set
Check if the object is in a given state or not.
@param obj pointer to an object
@param state a state or combination of states to check
@return true: obj is in state; false: obj is not in state
Check if an object has a specified style property for a given style selector.
@param obj pointer to an object
@param selector the style selector to be checked, defining the scope of the style to be examined.
@param prop the property to be checked.
@return true if the object has the specified selector and property, false otherwise.
Hit-test an object given a particular point in screen space.
@param obj object to hit-test
@param point screen-space point (absolute coordinate)
@return true: if the object is considered under the point
Initialize an arc draw descriptor from an object’s styles in its current state
@param obj pointer to an object
@param part part of the object, e.g. LV_PART_MAIN, LV_PART_SCROLLBAR, LV_PART_KNOB, etc
@param draw_dsc the descriptor to initialize.
Should be initialized with lv_draw_arc_dsc_init(draw_dsc).
Initialize a blur draw descriptor from an object’s styles in its current state.
draw_dsc->radius will only be calculated if it’s 0 initially. Radius can be set before calling this function
to avoid getting it twice.
@param obj pointer to an object
@param part part of the object, e.g. LV_PART_MAIN, LV_PART_SCROLLBAR, LV_PART_KNOB, etc
@param draw_dsc the descriptor to initialize.
Should be initialized with lv_draw_blur_dsc_init(draw_dsc).
Initialize an image draw descriptor from an object’s styles in its current state
@param obj pointer to an object
@param part part of the object, e.g. LV_PART_MAIN, LV_PART_SCROLLBAR, LV_PART_KNOB, etc
@param draw_dsc the descriptor to initialize.
Should be initialized with lv_draw_image_dsc_init(draw_dsc).
Initialize a label draw descriptor from an object’s styles in its current state
@param obj pointer to an object
@param part part of the object, e.g. LV_PART_MAIN, LV_PART_SCROLLBAR, LV_PART_KNOB, etc
@param draw_dsc the descriptor to initialize.
If the opa field is set to or the property is equal to LV_OPA_TRANSP the rest won’t be initialized.
Should be initialized with lv_draw_label_dsc_init(draw_dsc).
Initialize a line draw descriptor from an object’s styles in its current state
@param obj pointer to an object
@param part part of the object, e.g. LV_PART_MAIN, LV_PART_SCROLLBAR, LV_PART_KNOB, etc
@param draw_dsc the descriptor to initialize.
Should be initialized with lv_draw_line_dsc_init(draw_dsc).
Initialize a rectangle draw descriptor from an object’s styles in its current state
@param obj pointer to an object
@param part part of the object, e.g. LV_PART_MAIN, LV_PART_SCROLLBAR, LV_PART_KNOB, etc
@param draw_dsc the descriptor to initialize.
If an ..._opa field is set to LV_OPA_TRANSP the related properties won’t be initialized.
Should be initialized with lv_draw_rect_dsc_init(draw_dsc).
@note Only the relevant fields will be set.
E.g. if border width == 0 the other border properties won’t be evaluated.
Mark the object as invalid to redrawn its area
@param obj pointer to an object
@return LV_RESULT_OK: the area is invalidated; LV_RESULT_INVALID: the area wasn’t invalidated.
(maybe it was off-screen or fully clipped)
Mark an area of an object as invalid.
The area will be truncated to the object’s area and marked for redraw.
@param obj pointer to an object
@param area the area to redraw
@return LV_RESULT_OK: the area is invalidated; LV_RESULT_INVALID: the area wasn’t invalidated.
(maybe it was off-screen or fully clipped)
Test whether the and object is positioned by a layout or not
@param obj pointer to an object to test
@return true: positioned by a layout; false: not positioned by a layout
Tell whether an object is visible (even partially) now or not
@param obj pointer to an object
@return true: visible; false not visible (hidden, out of parent, on other screen, etc)
moves the object to the given index in its parent.
When used in listboxes, it can be used to sort the listbox items.
@param obj pointer to the object to be moved.
@param index new index in parent. -1 to count from the back
@note to move to the background: lv_obj_move_to_index(obj, 0)
@note to move forward (up): lv_obj_move_to_index(obj, lv_obj_get_index(obj) - 1)
Utility to set an object reference to NULL when it gets deleted.
The reference should be in a location that will not become invalid
during the object’s lifetime, i.e. static or allocated.
@param obj_ptr a pointer to a pointer to an object
Redrawn on object and all its children using the passed draw context
@param layer pointer to a layer where to draw.
@param obj the start object from the redraw should start
Send a ‘LV_EVENT_REFR_EXT_DRAW_SIZE’ Call the ancestor’s event handler to the object to refresh the value of the extended draw size.
The result will be saved in obj.
@param obj pointer to an object
Handle if the size of the internal (“virtual”) content of an object has changed.
@param obj pointer to an object
@return false: nothing happened; true: refresh happened
Notify an object and its children about its style is modified.
@param obj pointer to an object
@param part the part whose style was changed. E.g. LV_PART_ANY, LV_PART_MAIN
@param prop LV_STYLE_PROP_ANY or an LV_STYLE_... property.
It is used to optimize what needs to be refreshed.
LV_STYLE_PROP_INV to perform only a style cache update
Remove an event_cb from an object
@param obj pointer to a obj
@param event_cb the event_cb of the event to remove
@return the count of the event removed
Remove an event_cb with user_data
@param obj pointer to a obj
@param event_cb the event_cb of the event to remove
@param user_data user_data
@return the count of the event removed
Remove Observers associated with Widget obj from specified subject or all Subjects.
@param obj pointer to Widget whose Observers should be removed
@param subject Subject to remove Widget from, or NULL to remove from all Subjects
@note This function can be used e.g. when a Widget’s Subject(s) needs to
be replaced by other Subject(s)
Remove a local style property from a part of an object with a given state.
@param obj pointer to an object
@param prop a style property to remove.
@param selector OR-ed value of parts and state for which the style should be removed
@return true the property was found and removed; false: the property was not found
Remove one or more states to the object. The other state bits will remain unchanged.
If specified in the styles, transition animation will be started from the previous state to the current.
@param obj pointer to an object
@param state the states to add. E.g LV_STATE_PRESSED | LV_STATE_FOCUSED
Remove a style from an object.
@param obj pointer to an object
@param style pointer to a style to remove. Can be NULL to check only the selector
@param selector OR-ed values of states and a part to remove only styles with matching selectors. LV_STATE_ANY and LV_PART_ANY can be used
Remove all styles added by a theme from a widget
@param selector OR-ed values of states and a part to remove only styles with matching selectors.
LV_STATE_ANY and LV_PART_ANY can be used
@param obj pointer to a widget
Replaces a style of an object, preserving the order of the style stack (local styles and transitions are ignored).
@param obj pointer to an object
@param old_style pointer to a style to replace.
@param new_style pointer to a style to replace the old style with.
@param selector OR-ed values of states and a part to replace only styles with matching selectors. LV_STATE_ANY and LV_PART_ANY can be used
Notify all object if a style is modified
@param style pointer to a style. Only the objects with this style will be notified
(NULL to notify all objects)
Scroll by given amount of pixels.
@param obj pointer to scrollable Widget to scroll
@param dx pixels to scroll horizontally
@param dy pixels to scroll vertically
@param anim_en LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
@note > 0 value means scroll right/bottom (show the more content on the right/bottom)
@note e.g. dy = -20 means scroll down 20 px
Scroll by given amount of pixels.
dx and dy will be limited internally to allow scrolling only on the content area.
@param obj pointer to scrollable Widget to scroll
@param dx pixels to scroll horizontally
@param dy pixels to scroll vertically
@param anim_en LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
@note e.g. dy = -20 means scroll down 20 px
Low level function to scroll by given x and y coordinates.
LV_EVENT_SCROLL is sent.
@param obj pointer to an object to scroll
@param x pixels to scroll horizontally
@param y pixels to scroll vertically
@return LV_RESULT_INVALID: to object was deleted in LV_EVENT_SCROLL;
LV_RESULT_OK: if the object is still valid
Scroll to given coordinate on Widget.
x and y will be limited internally to allow scrolling only on the content area.
@param obj pointer to scrollable Widget to scroll
@param x pixels to scroll horizontally
@param y pixels to scroll vertically
@param anim_en LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
Scroll obj’s parent Widgets recursively until obj becomes visible.
Widget will be scrolled into view even it has nested scrollable parents.
@param obj pointer to Widget to scroll into view
@param anim_en LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
Scroll to X coordinate on Widget.
x will be limited internally to allow scrolling only on the content area.
@param obj pointer to scrollable Widget to scroll
@param x pixels to scroll horizontally
@param anim_en LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
Scroll to Y coordinate on Widget.
y will be limited internally to allow scrolling only on the content area.
@param obj pointer to scrollable Widget to scroll
@param y pixels to scroll vertically
@param anim_en LV_ANIM_ON: scroll with animation; LV_ANIM_OFF: scroll immediately
Send an event to the object
@param obj pointer to an object
@param event_code the type of the event from lv_event_t
@param param arbitrary data depending on the widget type and the event. (Usually NULL)
@return LV_RESULT_OK: obj was not deleted in the event; LV_RESULT_INVALID: obj was deleted in the event_code
Change the alignment of an object.
@param obj pointer to an object to align
@param align type of alignment (see ‘lv_align_t’ enum) LV_ALIGN_OUT_... can’t be used.
Set the height reduced by the top and bottom padding and the border width.
@param obj pointer to an object
@param h the height without paddings in pixels
Set the width reduced by the left and right padding and the border width.
@param obj pointer to an object
@param w the width without paddings in pixels
Set add or remove one or more flags.
@param obj pointer to an object
@param f OR-ed values from lv_obj_flag_t to update.
@param v true: add the flags; false: remove the flags
Set how to place (where to align) the items and tracks
@param obj pointer to an object. The parent must have flex layout else nothing will happen.
@param main_place where to place the items on main axis (in their track). Any value of lv_flex_align_t.
@param cross_place where to place the item in their track on the cross axis. LV_FLEX_ALIGN_START/END/CENTER
@param track_cross_place where to place the tracks in the cross direction. Any value of lv_flex_align_t.
Set how the item should flow
@param obj pointer to an object. The parent must have flex layout else nothing will happen.
@param flow an element of lv_flex_flow_t.
Sets the width or height (on main axis) to grow the object in order fill the free space
@param obj pointer to an object. The parent must have flex layout else nothing will happen.
@param grow a value to set how much free space to take proportionally to other growing items.
Set the cell of an object. The object’s parent needs to have grid layout, else nothing will happen
@param obj pointer to an object
@param column_align the vertical alignment in the cell. LV_GRID_START/END/CENTER/STRETCH
@param col_pos column ID
@param col_span number of columns to take (>= 1)
@param row_align the horizontal alignment in the cell. LV_GRID_START/END/CENTER/STRETCH
@param row_pos row ID
@param row_span number of rows to take (>= 1)
Set the height of an object
@param obj pointer to an object
@param h the new height
@note possible values are:
pixel simple set the size accordingly
LV_SIZE_CONTENT set the size to involve all children in the given direction
lv_pct(x) to set size in percentage of the parent’s content area size (the size without paddings).
x should be in [0..1000]% range
Set local style property on an object’s part and state.
@param obj pointer to an object
@param prop the property
@param value value of the property. The correct element should be set according to the type of the property
@param selector OR-ed value of parts and state for which the style should be set
Set the position of an object relative to the set alignment.
@param obj pointer to an object
@param x new x coordinate
@param y new y coordinate
@note With default alignment it’s the distance from the top left corner
@note E.g. LV_ALIGN_CENTER alignment it’s the offset from the center of the parent
@note The position is interpreted on the content area of the parent
@note The values can be set in pixel or in percentage of parent size with lv_pct(v)
Set the size of an object.
@param obj pointer to an object
@param w the new width
@param h the new height
@note possible values are:
pixel simple set the size accordingly
LV_SIZE_CONTENT set the size to involve all children in the given direction
lv_pct(x) to set size in percentage of the parent’s content area size (the size without paddings).
x should be in [0..1000]% range
Add or remove one or more states to the object. The other state bits will remain unchanged.
@param obj pointer to an object
@param state the states to add. E.g LV_STATE_PRESSED | LV_STATE_FOCUSED
@param v true: add the states; false: remove the states
Set the alignment which tells from which point of the parent the X and Y
coordinates should be interpreted. Possible values are: LV_ALIGN_DEFAULT,
LV_ALIGN_TOP_LEFT/MID/RIGHT, LV_ALIGN_BOTTOM_LEFT/MID/RIGHT,
LV_ALIGN_LEFT/RIGHT_MID, LV_ALIGN_CENTER. LV_ALIGN_DEFAULT means
LV_ALIGN_TOP_LEFT with LTR base direction and LV_ALIGN_TOP_RIGHT with RTL base
direction.
Default: LV_ALIGN_DEFAULT, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Animation template for Widget’s animation. Should be a pointer to lv_anim_t. The
animation parameters are widget specific, e.g. animation time could be the E.g.
blink time of the cursor on the Text Area or scroll time of a roller. See Widgets’
documentation to learn more.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Pointer to animation descriptor
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Animation duration in milliseconds. Its meaning is widget specific. E.g. blink time
of the cursor on the Text Area or scroll time of a roller. See Widgets’
documentation to learn more.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set color of arc.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set an image from which arc will be masked out. It’s useful to display complex
effects on the arcs. Can be a pointer to lv_image_dsc_t or a path to a file.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Pointer to image source
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set opacity of arcs.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Make end points of arcs rounded. true: rounded, false: perpendicular line ending.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set width (thickness) of arcs in pixels.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set base direction of Widget. Possible values are LV_BIDI_DIR_LTR/RTL/AUTO.
Default: LV_BASE_DIR_AUTO, inherited: Yes, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set background color of Widget.
Default: 0xffffff, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set gradient definition. The pointed instance must exist while Widget is alive.
NULL to disable. It wraps BG_GRAD_COLOR, BG_GRAD_DIR, BG_MAIN_STOP and
BG_GRAD_STOP into one descriptor and allows creating gradients with more colors
as well. If it’s set other gradient related properties will be ignored.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Pointer to gradient descriptor
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set gradient color of the background. Used only if grad_dir is not LV_GRAD_DIR_NONE.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set direction of the gradient of the background. Possible values are
LV_GRAD_DIR_NONE/HOR/VER.
Default: LV_GRAD_DIR_NONE, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set opacity of the second gradient color.
Default: 255, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set point from which background’s gradient color should start. 0 means to top/left
side, 255 the bottom/right side, 128 the center, and so on.
Default: 255, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set opacity of the background image. Value 0, LV_OPA_0 or LV_OPA_TRANSP means
fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other
values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set a color to mix to the background image.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set intensity of background image recoloring. Value 0, LV_OPA_0 or
LV_OPA_TRANSP means no mixing, 255, LV_OPA_100 or LV_OPA_COVER means full
recoloring, other values or LV_OPA_10, LV_OPA_20, etc are interpreted
proportionally.
Default: LV_OPA_TRANSP, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set a background image. Can be a pointer to lv_image_dsc_t, a path to a file or
an LV_SYMBOL_....
Default: NULL, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Pointer to image source
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
If enabled the background image will be tiled. Possible values are true or false.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set opacity of the first gradient color.
Default: 255, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set point from which background color should start for gradients. 0 means to
top/left side, 255 the bottom/right side, 128 the center, and so on.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set opacity of the background. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_TRANSP, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
If set, a layer will be created for the widget and the layer will be masked with
this A8 bitmap mask.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Pointer to A8 bitmap mask
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Describes how to blend the colors to the background. Possible values are
LV_BLEND_MODE_NORMAL/ADDITIVE/SUBTRACTIVE/MULTIPLY/DIFFERENCE.
Default: LV_BLEND_MODE_NORMAL, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
If true the background of the widget will be blurred. The part should have < 100%
opacity to make it visible. If false the given part will be blurred when it’s
rendered but before drawing the children.
Default: false, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Setting to LV_BLUR_QUALITY_SPEED the blurring algorithm will prefer speed over
quality. LV_BLUR_QUALITY_PRECISION will force using higher quality but slower
blur. With LV_BLUR_QUALITY_AUTO the quality will be selected automatically.
Default: LV_BLUR_QUALITY_AUTO, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets the intensity of blurring. Applied on each lv_part separately before the
children are rendered.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set color of the border.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set opacity of the border. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets whether the border should be drawn before or after the children are drawn.
true: after children, false: before children.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set only which side(s) the border should be drawn. Possible values are
LV_BORDER_SIDE_NONE/TOP/BOTTOM/LEFT/RIGHT/INTERNAL. OR-ed values can be used as
well, e.g. LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_LEFT.
Default: LV_BORDER_SIDE_FULL, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set width of the border. Only pixel values can be used.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Enable clipping of content that overflows rounded corners of parent Widget. Can be
true or false.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Mix a color with all colors of the Widget.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Pointer to color-filter descriptor
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
The intensity of mixing of color filter.
Default: LV_OPA_TRANSP, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set the color of the shadow.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set an offset on the shadow in pixels in X direction.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set an offset on the shadow in pixels in Y direction.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set the opacity of the shadow.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Setting to LV_BLUR_QUALITY_SPEED the blurring algorithm will prefer speed over
quality. LV_BLUR_QUALITY_PRECISION will force using higher quality but slower
blur. With LV_BLUR_QUALITY_AUTO the quality will be selected automatically.
Default: LV_BLUR_QUALITY_PRECISION, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets the intensity of blurring. Applied on each lv_part separately before the
children are rendered.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Defines how to align the children perpendicular to the direction of flex flow.
Default: LV_FLEX_ALIGN_NONE, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Defines in which direction the flex layout should arrange the children.
Default: LV_FLEX_FLOW_NONE, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Defines how much space to take proportionally from the free space of the Widget’s track.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Defines how to align the children in the direction of flex flow.
Default: LV_FLEX_ALIGN_NONE, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Defines how to align the tracks of the flow.
Default: LV_FLEX_ALIGN_NONE, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set column in which Widget should be placed.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set how many columns Widget should span. Needs to be >= 1.
Default: 1, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set row in which Widget should be placed.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set how many rows Widget should span. Needs to be >= 1.
Default: 1, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set how to align Widget horizontally.
Default: LV_GRID_ALIGN_START, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set how to align Widget vertically.
Default: LV_GRID_ALIGN_START, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Defines how to distribute the columns.
Default: LV_GRID_ALIGN_START, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
An array to describe the columns of the grid. Should be LV_GRID_TEMPLATE_LAST terminated.
Default: NULL, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Pointer to grid-column descriptor array
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Defines how to distribute the rows.
Default: LV_GRID_ALIGN_START, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
An array to describe the rows of the grid. Should be LV_GRID_TEMPLATE_LAST terminated.
Default: NULL, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Pointer to grid-row descriptor array
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets height of Widget. Pixel, percentage and LV_SIZE_CONTENT can be used.
Percentage values are relative to the height of the parent’s content area.
Default: Widget dependent, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set image colorkey definition. The lv_image_colorkey_t contains two color values:
high_color and low_color. the color of pixels ranging from low_color to
high_color will be transparent.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Pointer to image color key
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set opacity of an image. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set color to mix with the image.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set intensity of color mixing. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set layout of Widget. Children will be repositioned and resized according to
policies set for the layout. For possible values see documentation of the layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Its meaning depends on the type of Widget. For example in case of lv_scale it means
the length of the ticks.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set color of lines.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set gap between dashes in pixels. Note that dash works only on horizontal and
vertical lines.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set width of dashes in pixels. Note that dash works only on horizontal and vertical lines.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set opacity of lines.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Make end points of the lines rounded. true: rounded, false: perpendicular line ending.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set width of lines in pixels.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets margin on the bottom. Widget will keep this space from its siblings in layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets margin on the left. Widget will keep this space from its siblings in layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets margin on the right. Widget will keep this space from its siblings in layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets margin on the top. Widget will keep this space from its siblings in layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets a maximal height. Pixel and percentage values can be used. Percentage values
are relative to the height of the parent’s content area.
Default: LV_COORD_MAX, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets a maximal width. Pixel and percentage values can be used. Percentage values
are relative to the width of the parent’s content area.
Default: LV_COORD_MAX, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets a minimal height. Pixel and percentage values can be used. Percentage values
are relative to the height of the parent’s content area.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets a minimal width. Pixel and percentage values can be used. Percentage values
are relative to the width of the parent’s content area.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Scale down all opacity values of the Widget by this factor. Value 0, LV_OPA_0 or
LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means
fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: Yes, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
First draw Widget on the layer, then scale down layer opacity factor. Value 0,
LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or
LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc
means semi transparency.
Default: LV_OPA_COVER, inherited: Yes, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set color of outline.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set opacity of outline. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set padding of outline, i.e. the gap between Widget and the outline.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set width of outline in pixels.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets the padding on the bottom. It makes the content area smaller in this direction.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets the padding between the columns. Used by the layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets the padding on the left. It makes the content area smaller in this direction.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Pad text labels away from the scale ticks/remainder of the LV_PART_.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets the padding on the right. It makes the content area smaller in this direction.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets the padding between the rows. Used by the layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets the padding on the top. It makes the content area smaller in this direction.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Move start point of object (e.g. scale tick) radially.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set radius on every corner. The value is interpreted in pixels (>= 0) or
LV_RADIUS_CIRCLE for max radius.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set a color to mix to the obj.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets the intensity of color mixing. Value 0, LV_OPA_0 or LV_OPA_TRANSP means
fully transparent. A value of 255, LV_OPA_100 or LV_OPA_COVER means fully
opaque. Intermediate values like LV_OPA_10, LV_OPA_20, etc result in
semi-transparency.
Default: LV_OPA_TRANSP, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Adjust sensitivity for rotary encoders in 1/256 unit. It means, 128: slow down the
rotary to half, 512: speeds up to double, 256: no change.
Default: 256, inherited: Yes, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set color of shadow.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set an offset on the shadow in pixels in X direction.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set an offset on the shadow in pixels in Y direction.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set opacity of shadow. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Make shadow calculation to use a larger or smaller rectangle as base. The value can
be in pixels to make the area larger/smaller.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set width of the shadow in pixels. The value should be >= 0.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set how to align the lines of the text. Note that it doesn’t align the Widget
itself, only the lines inside the Widget. Possible values are
LV_TEXT_ALIGN_LEFT/CENTER/RIGHT/AUTO. LV_TEXT_ALIGN_AUTO detect the text base
direction and uses left or right alignment accordingly.
Default: LV_TEXT_ALIGN_AUTO, inherited: Yes, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets color of text.
Default: 0x000000, inherited: Yes, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set decoration for the text. Possible values are
LV_TEXT_DECOR_NONE/UNDERLINE/STRIKETHROUGH. OR-ed values can be used as well.
Default: LV_TEXT_DECOR_NONE, inherited: Yes, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set font of text (a pointer lv_font_t *).
Default: LV_FONT_DEFAULT, inherited: Yes, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Pointer to font
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set letter space in pixels.
Default: 0, inherited: Yes, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set line space in pixels.
Default: 0, inherited: Yes, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set opacity of text. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: Yes, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets the color of letter outline stroke.
Default: 0x000000, inherited: Yes, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Color to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set the opacity of the letter outline stroke. Value 0, LV_OPA_0 or
LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means
fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: Yes, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set the letter outline stroke width in pixels.
Default: 0, inherited: Yes, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Make Widget higher on both sides with this value. Pixel and percentage (with
lv_pct(x)) values can be used. Percentage values are relative to Widget’s height.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set pivot point’s X coordinate for transformations. Relative to Widget’s top left corner.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set pivot point’s Y coordinate for transformations. Relative to Widget’s top left corner.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Rotate Widget. The value is interpreted in 0.1 degree units. E.g. 450 means 45 deg.
Default: 0, inherited: No, layout: Yes, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Zoom Widget horizontally. The value 256 (or LV_SCALE_NONE) means normal size, 128
half size, 512 double size, and so on.
Default: 0, inherited: No, layout: Yes, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Zoom Widget vertically. The value 256 (or LV_SCALE_NONE) means normal size, 128
half size, 512 double size, and so on.
Default: 0, inherited: No, layout: Yes, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Skew Widget horizontally. The value is interpreted in 0.1 degree units. E.g. 450
means 45 deg.
Default: 0, inherited: No, layout: Yes, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Skew Widget vertically. The value is interpreted in 0.1 degree units. E.g. 450
means 45 deg.
Default: 0, inherited: No, layout: Yes, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Make Widget wider on both sides with this value. Pixel and percentage (with
lv_pct(x)) values can be used. Percentage values are relative to Widget’s width.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
An initialized lv_style_transition_dsc_t to describe a transition.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param obj Pointer to Widget
@param value Pointer to transition descriptor
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Move object around the centre of the parent object (e.g. around the circumference
of a scale).
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Move Widget with this value in X direction. Applied after layouts, aligns and other
positioning. Pixel and percentage (with lv_pct(x)) values can be used. Percentage
values are relative to Widget’s width.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Move Widget with this value in Y direction. Applied after layouts, aligns and other
positioning. Pixel and percentage (with lv_pct(x)) values can be used. Percentage
values are relative to Widget’s height.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Sets width of Widget. Pixel, percentage and LV_SIZE_CONTENT values can be used.
Percentage values are relative to the width of the parent’s content area.
Default: Widget dependent, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set X coordinate of Widget considering the align setting. Pixel and percentage
values can be used. Percentage values are relative to the width of the parent’s
content area.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set Y coordinate of Widget considering the align setting. Pixel and percentage
values can be used. Percentage values are relative to the height of the parent’s
content area.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param obj Pointer to Widget
@param value Value to submit
@param selector A joint type for lv_part_t and lv_state_t. Example values:
- 0: means LV_PART_MAIN | LV_STATE_DEFAULT
- LV_STATE_PRESSED
- LV_PART_KNOB
- LV_PART_KNOB | LV_STATE_PRESSED | LV_STATE_CHECKED
Set the maximum subject value to set by the event
@param obj pointer to the Widget to which the event is attached
@param dsc pointer to the descriptor returned by lv_obj_add_subject_increment_event()
@param max_value the maximum value to set
Set the minimum subject value to set by the event
@param obj pointer to the Widget to which the event is attached
@param dsc pointer to the descriptor returned by lv_obj_add_subject_increment_event()
@param min_value the minimum value to set
Set what to do when the min/max value is crossed.
@param obj pointer to the Widget to which the event is attached
@param dsc pointer to the descriptor returned by lv_obj_add_subject_increment_event()
@param rollover false: stop at the min/max value; true: jump to the other end
@note the subject also can have min/max values and always the smaller range will be considered
Set the transform matrix of an object
@param obj pointer to an object
@param matrix pointer to a matrix to set
@note LV_DRAW_TRANSFORM_USE_MATRIX needs to be enabled.
Set the width of an object
@param obj pointer to an object
@param w the new width
@note possible values are:
pixel simple set the size accordingly
LV_SIZE_CONTENT set the size to involve all children in the given direction
lv_pct(x) to set size in percentage of the parent’s content area size (the size without paddings).
x should be in [0..1000]% range
Set the x coordinate of an object
@param obj pointer to an object
@param x new x coordinate
@note With default alignment it’s the distance from the top left corner
@note E.g. LV_ALIGN_CENTER alignment it’s the offset from the center of the parent
@note The position is interpreted on the content area of the parent
@note The values can be set in pixel or in percentage of parent size with lv_pct(v)
Set the y coordinate of an object
@param obj pointer to an object
@param y new y coordinate
@note With default alignment it’s the distance from the top left corner
@note E.g. LV_ALIGN_CENTER alignment it’s the offset from the center of the parent
@note The position is interpreted on the content area of the parent
@note The values can be set in pixel or in percentage of parent size with lv_pct(v)
Apply recolor effect to the input color based on the object’s style properties.
@param obj the target object containing recolor style properties
@param part the part to retrieve recolor styles.
@param color the original color to be modified
@return the blended color after applying recolor and opacity
Get if a given style is disabled on an object.
@param obj pointer to an object
@param style pointer to a style
@param selector the selector of a style (e.g. LV_STATE_PRESSED | LV_PART_KNOB)
@return true: disable the style, false: enable the style
Temporary disable a style for a selector. It will look like is the style wasn’t added
@param obj pointer to an object
@param style pointer to a style
@param selector the selector of a style (e.g. LV_STATE_PRESSED | LV_PART_KNOB)
@param dis true: disable the style, false: enable the style
Swap the positions of two objects.
When used in listboxes, it can be used to sort the listbox items.
@param obj1 pointer to the first object
@param obj2 pointer to the second object
Transform a point using the angle and zoom style properties of an object
@param obj pointer to an object whose style properties should be used
@param p a point to transform, the result will be written back here too
@param flags OR-ed valued of :cpp:enum:lv_obj_point_transform_flag_t
Transform an array of points using the angle and zoom style properties of an object
@param obj pointer to an object whose style properties should be used
@param points the array of points to transform, the result will be written back here too
@param count number of points in the array
@param flags OR-ed valued of :cpp:enum:lv_obj_point_transform_flag_t
Iterate through all children of any object.
@param start_obj start integrating from this object
@param cb call this callback on the objects
@param user_data pointer to any user related data (will be passed to cb)
Update the layer type of a widget bayed on its current styles.
The result will be stored in obj->spec_attr->layer_type
@param obj the object whose layer should be updated
Check children of obj and scroll obj to fulfill scroll_snap settings.
@param obj Widget whose children need to be checked and snapped
@param anim_en LV_ANIM_ON/OFF
Get target Widget of Observer.
This is the same as lv_observer_get_target(), except it returns target
as an lv_obj_t *.
@param observer pointer to Observer
@return pointer to saved Widget target
Convert a percentage value to int32_t.
Percentage values are stored in special range
@param x the percentage (0..1000)
@return a coordinate that stores the percentage
Transform an array of points
@param points pointer to an array of points
@param count number of points in the array
@param angle angle with 0.1 resolutions (123 means 12.3°)
@param scale_x horizontal zoom, 256 means 100%
@param scale_y vertical zoom, 256 means 100%
@param pivot pointer to the pivot point of the transformation
@param zoom_first true: zoom first and rotate after that; else: opposite order
Transform a point
@param point pointer to a point
@param angle angle with 0.1 resolutions (123 means 12.3°)
@param scale_x horizontal zoom, 256 means 100%
@param scale_y vertical zoom, 256 means 100%
@param pivot pointer to the pivot point of the transformation
@param zoom_first true: zoom first and rotate after that; else: opposite order
Get a pseudo random number in the given range
@param min the minimum value
@param max the maximum value
@return return the random number. min <= return_value <= max
Reallocate a memory with a new size. The old content will be kept.
@param data_p pointer to an allocated memory.
Its content will be copied to the new memory block and freed
@param new_size the desired new size in byte
@return pointer to the new memory, NULL on failure
Reallocate a memory with a new size. The old content will be kept.
In case of failure, the old pointer is free’d.
@param data_p pointer to an allocated memory.
Its content will be copied to the new memory block and freed
@param new_size the desired new size in byte
@return pointer to the new memory, NULL on failure
Search the most top object which fully covers an area
@param area_p pointer to an area
@param obj the first object to start the searching (typically a screen)
@return
Redraw the invalidated areas now.
Normally the redrawing is periodically executed in lv_timer_handler but a long blocking process
can prevent the call of lv_timer_handler. In this case if the GUI is updated in the process
(e.g. progress bar) this function can be called when the screen should be updated.
@param disp pointer to display to refresh. NULL to refresh all displays.
Get an option as a string.
@param obj pointer to roller object
@param option index of chosen option
@param buf pointer to an array to store the string
@param buf_size size of buf in bytes. 0: to ignore it.
@return LV_RESULT_OK if option found
Get the current selected option as a string.
@param obj pointer to roller object
@param buf pointer to an array to store the string
@param buf_size size of buf in bytes. 0: to ignore it.
Set the options on a roller
@param obj pointer to roller object
@param options a string with ‘\n’ separated options. E.g. “One\nTwo\nThree”
@param mode LV_ROLLER_MODE_NORMAL or LV_ROLLER_MODE_INFINITE
Set the selected option
@param obj pointer to a roller object
@param sel_opt index of the selected option (0 … number of option - 1);
@param anim LV_ANIM_ON: set with animation; LV_ANIM_OFF set immediately
Sets the given string as the selection on the roller. Does not alter the current selection on failure.
@param obj pointer to roller object
@param sel_opt pointer to the string you want to set as an option
@param anim LV_ANIM_ON: set with animation; LV_ANIM_OFF set immediately
@return true if set successfully and false if the given string does not exist as an option in the roller
Add a Section to specified Scale. Section will not be drawn until
a valid range is set for it using lv_scale_set_section_range().
@param obj pointer to Scale Widget
@return pointer to new Section
Bind an integer subject to a scales section maximum value
@param obj pointer to an Scale
@param section pointer to a Scale section
@param subject pointer to a Subject
@return pointer to newly-created Observer
Bind an integer subject to a scales section minimum value
@param obj pointer to a Scale
@param section pointer to a Scale section
@param subject pointer to a Subject
@return pointer to newly-created Observer
DEPRECATED, use lv_scale_set_section_range instead.
Set range for specified Scale Section
@param section pointer to Section
@param range_min Section new minimum value
@param range_max Section new maximum value
DEPRECATED, use lv_scale_set_section_style_main/indicator/items instead.
Set style for specified part of Section.
@param section pointer to Section
@param part the part of the Scale the style will apply to, e.g. LV_PART_INDICATOR
@param section_part_style pointer to style to apply
Set angle between the low end and the high end of the Scale.
(Applies only to round Scales.)
@param obj pointer to Scale Widget
@param max_angle angle in degrees from Scale minimum where top end of Scale will be drawn
Point image needle to specified value;
image must point to the right. E.g. -O——>
@param obj pointer to Scale Widget
@param needle_img pointer to needle’s Image
@param value Scale value needle will point to
Point line needle to specified value.
@param obj pointer to Scale Widget
@param needle_line needle_line of the Scale. The line points will be allocated and
managed by the Scale unless the line point array was previously set
using lv_line_set_points_mutable.
@param needle_length length of the needle
- needle_length>0: needle_length=needle_length;
- needle_length<0: needle_length=radius-|needle_length|;
@param value Scale value needle will point to
Set angular offset from the 3-o’clock position of the low end of the Scale.
(Applies only to round Scales.)
@param obj pointer to Scale Widget
@param rotation clockwise angular offset (in degrees) from the 3-o’clock position
of the low end of the scale; negative and >360 values are first normalized
to range [0..360].
Examples:
- 0 = 3 o’clock (right side)
- 30 = 4 o’clock
- 60 = 5 o’clock
- 90 = 6 o’clock
- 135 = midway between 7 and 8 o’clock (default)
- 180 = 9 o’clock
- 270 = 12 o’clock
- 300 = 1 o’clock
- 330 = 2 o’clock
- -30 = 2 o’clock
- 390 = 4 o’clock
Set the range of a scale section
@param scale pointer to scale
@param section pointer to section
@param range_min the section’s new minimum value
@param range_max the section’s new maximum value
Set custom text source for major ticks labels.
@param obj pointer to Scale Widget
@param txt_src pointer to an array of strings which will be display at major ticks;
last element must be a NULL pointer.
Switch screen with animation
@param scr pointer to the new screen to load
@param anim_type type of the animation from lv_screen_load_anim_t, e.g. LV_SCREEN_LOAD_ANIM_MOVE_LEFT
@param time time of the animation
@param delay delay before the transition
@param auto_del true: automatically delete the old screen
Bind an integer or float Subject to a Slider’s value.
@param obj pointer to Slider
@param subject pointer to Subject
@return pointer to newly-created Observer
Set a new value for the left knob of a slider
@param obj pointer to a slider object
@param value new value
@param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
Set a new value on the slider
@param obj pointer to a slider object
@param value the new value
@param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
Get a pointer to the style of a span’s built-in style.
Any lv_style_set_… functions can be applied on the returned style.
@param span pointer to the span
@return pointer to the style. (valid as long as the span is valid)
Set a new text for a span. Memory will be allocated to store the text by the span.
As the spangroup is not passed a redraw (invalidation) can’t be triggered automatically.
Therefore lv_spangroup_refresh(spangroup) needs to be called manually,
@param span pointer to a span.
@param text pointer to a text.
Set a new text for a span using a printf-like formatting string.
Memory will be allocated to store the text by the span.
As the spangroup is not passed a redraw (invalidation) can’t be triggered automatically.
Therefore lv_spangroup_refresh(spangroup) needs to be called manually,
@param span pointer to a span.
@param fmt printf-like format string
Set a static text. It will not be saved by the span so the ‘text’ variable
has to be ‘alive’ while the span exist.
As the spangroup is not passed a redraw (invalidation) can’t be triggered automatically.
Therefore lv_spangroup_refresh(spangroup) needs to be called manually,
Bind an integer, string, or pointer Subject to a Spangroup’s Span.
@param obj pointer to Spangroup
@param span pointer to Span
@param subject pointer to Subject
@param fmt optional printf-like format string with 1 format specifier (e.g. “%d °C”)
or NULL to bind to the value directly.
@return pointer to newly-created Observer
@note If fmt == NULL strings and pointers (\0 terminated string) will be shown
as text as they are, integers as %d, floats as %0.1f
Remove the span from the spangroup and free memory.
@param obj pointer to a spangroup object.
@param span pointer to a span.
@note Note that before calling lv_spangroup_delete_spanlv_observer_remove needs to be called manually as LVGL can’t remove the
binding automatically.
Get the text content width when all span of spangroup on a line.
@param obj pointer to a spangroup object.
@param max_width if text content width >= max_width, return max_width
to reduce computation, if max_width == 0, returns the text content width.
@return text content width or max_width.
Get the span object by point.
@param obj pointer to a spangroup object.
@param point pointer to point containing absolute coordinates
@return pointer to the span under the point or NULL if not found.
Get the span’s coords in the spangroup.
@note Before calling this function, please make sure that the layout of span group has been updated.
Like calling lv_obj_update_layout() like function.
DEPRECATED. Use the text_align style property instead
Set the align of the spangroup.
@param obj pointer to a spangroup object.
@param align see lv_text_align_t for details.
Set maximum lines of the spangroup.
@param obj pointer to a spangroup object.
@param lines max lines that can be displayed in LV_SPAN_MODE_BREAK mode. < 0 means no limit.
DEPRECATED, set the width to LV_SIZE_CONTENT or fixed value to control expanding/wrapping“
Set the mode of the spangroup.
@param obj pointer to a spangroup object.
@param mode see lv_span_mode_t for details.
Copy all style properties of style to the bbuilt-in static style of the span.
@param obj pointer_to a spangroup
@param span pointer to a span.
@param style pointer to a style to copy into the span’s built-in style
Set a new text for a span. Memory will be allocated to store the text by the span.
@param obj pointer to a spangroup widget.
@param span pointer to a span.
@param text pointer to a text.
Set a new text for a span using a printf-like formatting string.
Memory will be allocated to store the text by the span.
@param obj pointer to a spangroup widget.
@param span pointer to a span.
@param fmt printf-like format string
Set a new text for a span. Memory will be allocated to store the text by the span.
@param obj pointer to a spangroup widget.
@param span pointer to a span.
@param text pointer to a text.
Bind an integer subject to a Spinbox’s value.
@param obj pointer to Spinbox
@param subject pointer to Subject
@return pointer to newly-created Observer
Get the spinbox step value (user has to convert to float according to its digit format)
@param obj pointer to spinbox
@return value integer step value of the spinbox
Get the spinbox numeral value (user has to convert to float according to its digit format)
@param obj pointer to spinbox
@return value integer value of the spinbox
Set spinbox digit format (digit count and decimal format)
@param obj pointer to spinbox
@param digit_count number of digit excluding the decimal separator and the sign
@param sep_pos number of digit before the decimal point. If 0, decimal point is not
shown
Set direction of digit step when clicking an encoder button while in editing mode
@param obj pointer to spinbox
@param direction the direction (LV_DIR_RIGHT or LV_DIR_LEFT)
Set the animation time and arc length of the spinner
The animation is suited for angle values between 180 and 360.
@param obj pointer to a spinner
@param t the animation time in milliseconds
@param angle the angle of the arc in degrees
Set the animation arc length of the spinner.
The animation is suited to values between 180 and 360.
@param obj pointer to a spinner
@param angle the angle of the arc in degrees
Get the square root of a number
@param x integer which square root should be calculated
@param q store the result here. q->i: integer part, q->f: fractional part in 1/256 unit
@param mask optional to skip some iterations if the magnitude of the root is known.
Set to 0x8000 by default.
If root < 16: mask = 0x80
If root < 256: mask = 0x800
Else: mask = 0x8000
@brief Copies the string pointed to by src, including the terminating null character,
to the end of the string pointed to by dst.
@param dst Pointer to the destination string where the content is to be appended.
@param src Pointer to the source of data to be copied.
@return A pointer to the destination string, which is dst.
@brief Searches for the first occurrence of character c in the string str.
@param str Pointer to the null-terminated byte string to be searched.
@param c The character to be searched for.
@return A pointer to the first occurrence of character c in the string str, or a null pointer if c is not found.
@brief This function will compare two strings without specified length.
@param s1 pointer to the first string
@param s2 pointer to the second string
@return the difference between the value of the first unmatching character.
@brief Copies the string pointed to by src, including the terminating null character,
to the character array pointed to by dst.
@param dst Pointer to the destination array where the content is to be copied.
@param src Pointer to the source of data to be copied.
@return A pointer to the destination array, which is dst.
@brief Duplicate a string by allocating a new one and copying the content.
@param src Pointer to the source of data to be copied.
@return A pointer to the new allocated string. NULL if failed.
@brief Copies up to dst_size-1 (non-null) characters from src to dst. A null terminator is always added.
@param dst Pointer to the destination array where the content is to be copied.
@param src Pointer to the source of data to be copied.
@param dst_size Maximum number of characters to be copied to dst, including the null character.
@return The length of src. The return value is equivalent to the value returned by lv_strlen(src)
@brief Computes the length of the string str up to (but not including) the terminating null character.
@param str Pointer to the null-terminated byte string to be examined.
@return The length of the string in bytes.
@brief Copies up to src_len characters from the string pointed to by src
to the end of the string pointed to by dst.
A terminating null character is appended to dst even if no null character
was encountered in src after src_len characters were copied.
@param dst Pointer to the destination string where the content is to be appended.
@param src Pointer to the source of data to be copied.
@param src_len Maximum number of characters from src to be copied to the end of dst.
@return A pointer to the destination string, which is dst.
@brief This function will compare two strings up to the given length.
@param s1 pointer to the first string
@param s2 pointer to the second string
@param len the maximum amount of characters to compare
@return the difference between the value of the first unmatching character.
@brief Copies up to dest_size characters from the string pointed to by src to the character array pointed to by dst
and fills the remaining length with null bytes.
@param dst Pointer to the destination array where the content is to be copied.
@param src Pointer to the source of data to be copied.
@param dest_size Maximum number of characters to be copied to dst.
@return A pointer to the destination array, which is dst.
@note dst will not be null terminated if dest_size bytes were copied from src before the end of src was reached.
@brief Duplicate a string by allocating a new one and copying the content
up to the end or the specified maximum length, whichever comes first.
@param src Pointer to the source of data to be copied.
@param max_len Maximum number of characters to be copied.
@return Pointer to a newly allocated null-terminated string. NULL if failed.
@brief Computes the length of the string str up to (but not including) the terminating null character,
or the given maximum length.
@param str Pointer to byte string that is null-terminated or at least max_len bytes long.
@param max_len Maximum number of characters to examine.
@return The length of the string in bytes.
Copy all properties of a style to an other.
It has the same affect callying the same lv_set_style_...
functions on both styles.
It means new memory will be allocated to store the properties in
the destination style.
After the copy the destination style is fully independent of the source
and source can removed without affecting the destination style.
@param dst the destination to copy into (can not the a constant style)
@param src the source style to copy from.
Get the value of a property
@param style pointer to a style
@param prop the ID of a property
@param value pointer to a lv_style_value_t variable to store the value
@return LV_RESULT_INVALID: the property wasn’t found in the style (value is unchanged)
LV_RESULT_OK: the property was fond, and value is set accordingly
@note For performance reasons there are no sanity check on style
Initialize a style
@param style pointer to a style to initialize
@note Do not call lv_style_init on styles that already have some properties
because this function won’t free the used memory, just sets a default state for the style.
In other words be sure to initialize styles only once!
Copy all properties of a style to an other without resetting the dst style.
It has the same effect as calling the same lv_set_style_...
functions on both styles.
It means new memory will be allocated to store the properties in
the destination style.
After the copy the destination style is fully independent of the source
and source can removed without affecting the destination style.
@param dst the destination to copy into (cannot be a constant style)
@param src the source style to copy from.
Remove a property from a style
@param style pointer to a style
@param prop a style property ORed with a state.
@return true: the property was found and removed; false: the property wasn’t found
Set the alignment which tells from which point of the parent the X and Y
coordinates should be interpreted. Possible values are: LV_ALIGN_DEFAULT,
LV_ALIGN_TOP_LEFT/MID/RIGHT, LV_ALIGN_BOTTOM_LEFT/MID/RIGHT,
LV_ALIGN_LEFT/RIGHT_MID, LV_ALIGN_CENTER. LV_ALIGN_DEFAULT means
LV_ALIGN_TOP_LEFT with LTR base direction and LV_ALIGN_TOP_RIGHT with RTL base
direction.
Default: LV_ALIGN_DEFAULT, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Animation template for Widget’s animation. Should be a pointer to lv_anim_t. The
animation parameters are widget specific, e.g. animation time could be the E.g.
blink time of the cursor on the Text Area or scroll time of a roller. See Widgets’
documentation to learn more.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Pointer to animation descriptor
Animation duration in milliseconds. Its meaning is widget specific. E.g. blink time
of the cursor on the Text Area or scroll time of a roller. See Widgets’
documentation to learn more.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set an image from which arc will be masked out. It’s useful to display complex
effects on the arcs. Can be a pointer to lv_image_dsc_t or a path to a file.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Pointer to image source
Make end points of arcs rounded. true: rounded, false: perpendicular line ending.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set width (thickness) of arcs in pixels.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Set base direction of Widget. Possible values are LV_BIDI_DIR_LTR/RTL/AUTO.
Default: LV_BASE_DIR_AUTO, inherited: Yes, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set background color of Widget.
Default: 0xffffff, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Color to submit
Set gradient definition. The pointed instance must exist while Widget is alive.
NULL to disable. It wraps BG_GRAD_COLOR, BG_GRAD_DIR, BG_MAIN_STOP and
BG_GRAD_STOP into one descriptor and allows creating gradients with more colors
as well. If it’s set other gradient related properties will be ignored.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Pointer to gradient descriptor
Set gradient color of the background. Used only if grad_dir is not LV_GRAD_DIR_NONE.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Color to submit
Set direction of the gradient of the background. Possible values are
LV_GRAD_DIR_NONE/HOR/VER.
Default: LV_GRAD_DIR_NONE, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set opacity of the second gradient color.
Default: 255, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set point from which background’s gradient color should start. 0 means to top/left
side, 255 the bottom/right side, 128 the center, and so on.
Default: 255, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set opacity of the background image. Value 0, LV_OPA_0 or LV_OPA_TRANSP means
fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other
values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set a color to mix to the background image.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Color to submit
Set intensity of background image recoloring. Value 0, LV_OPA_0 or
LV_OPA_TRANSP means no mixing, 255, LV_OPA_100 or LV_OPA_COVER means full
recoloring, other values or LV_OPA_10, LV_OPA_20, etc are interpreted
proportionally.
Default: LV_OPA_TRANSP, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set a background image. Can be a pointer to lv_image_dsc_t, a path to a file or
an LV_SYMBOL_....
Default: NULL, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Pointer to image source
If enabled the background image will be tiled. Possible values are true or false.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set opacity of the first gradient color.
Default: 255, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set point from which background color should start for gradients. 0 means to
top/left side, 255 the bottom/right side, 128 the center, and so on.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set opacity of the background. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_TRANSP, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
If set, a layer will be created for the widget and the layer will be masked with
this A8 bitmap mask.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Pointer to A8 bitmap mask
Describes how to blend the colors to the background. Possible values are
LV_BLEND_MODE_NORMAL/ADDITIVE/SUBTRACTIVE/MULTIPLY/DIFFERENCE.
Default: LV_BLEND_MODE_NORMAL, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
If true the background of the widget will be blurred. The part should have < 100%
opacity to make it visible. If false the given part will be blurred when it’s
rendered but before drawing the children.
Default: false, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Setting to LV_BLUR_QUALITY_SPEED the blurring algorithm will prefer speed over
quality. LV_BLUR_QUALITY_PRECISION will force using higher quality but slower
blur. With LV_BLUR_QUALITY_AUTO the quality will be selected automatically.
Default: LV_BLUR_QUALITY_AUTO, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets the intensity of blurring. Applied on each lv_part separately before the
children are rendered.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set opacity of the border. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets whether the border should be drawn before or after the children are drawn.
true: after children, false: before children.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set only which side(s) the border should be drawn. Possible values are
LV_BORDER_SIDE_NONE/TOP/BOTTOM/LEFT/RIGHT/INTERNAL. OR-ed values can be used as
well, e.g. LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_LEFT.
Default: LV_BORDER_SIDE_FULL, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set width of the border. Only pixel values can be used.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Enable clipping of content that overflows rounded corners of parent Widget. Can be
true or false.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Mix a color with all colors of the Widget.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Pointer to color-filter descriptor
The intensity of mixing of color filter.
Default: LV_OPA_TRANSP, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set an offset on the shadow in pixels in X direction.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Set an offset on the shadow in pixels in Y direction.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Setting to LV_BLUR_QUALITY_SPEED the blurring algorithm will prefer speed over
quality. LV_BLUR_QUALITY_PRECISION will force using higher quality but slower
blur. With LV_BLUR_QUALITY_AUTO the quality will be selected automatically.
Default: LV_BLUR_QUALITY_PRECISION, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets the intensity of blurring. Applied on each lv_part separately before the
children are rendered.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Defines how to align the children perpendicular to the direction of flex flow.
Default: LV_FLEX_ALIGN_NONE, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Defines in which direction the flex layout should arrange the children.
Default: LV_FLEX_FLOW_NONE, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Defines how much space to take proportionally from the free space of the Widget’s track.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Defines how to align the children in the direction of flex flow.
Default: LV_FLEX_ALIGN_NONE, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Defines how to align the tracks of the flow.
Default: LV_FLEX_ALIGN_NONE, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set column in which Widget should be placed.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set how many columns Widget should span. Needs to be >= 1.
Default: 1, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set row in which Widget should be placed.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set how many rows Widget should span. Needs to be >= 1.
Default: 1, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set how to align Widget horizontally.
Default: LV_GRID_ALIGN_START, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set how to align Widget vertically.
Default: LV_GRID_ALIGN_START, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Defines how to distribute the columns.
Default: LV_GRID_ALIGN_START, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
An array to describe the columns of the grid. Should be LV_GRID_TEMPLATE_LAST terminated.
Default: NULL, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Pointer to grid-column descriptor array
Defines how to distribute the rows.
Default: LV_GRID_ALIGN_START, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
An array to describe the rows of the grid. Should be LV_GRID_TEMPLATE_LAST terminated.
Default: NULL, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Pointer to grid-row descriptor array
Sets height of Widget. Pixel, percentage and LV_SIZE_CONTENT can be used.
Percentage values are relative to the height of the parent’s content area.
Default: Widget dependent, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set image colorkey definition. The lv_image_colorkey_t contains two color values:
high_color and low_color. the color of pixels ranging from low_color to
high_color will be transparent.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Pointer to image color key
Set opacity of an image. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set color to mix with the image.
Default: 0x000000, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Color to submit
Set intensity of color mixing. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set layout of Widget. Children will be repositioned and resized according to
policies set for the layout. For possible values see documentation of the layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Its meaning depends on the type of Widget. For example in case of lv_scale it means
the length of the ticks.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Set gap between dashes in pixels. Note that dash works only on horizontal and
vertical lines.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set width of dashes in pixels. Note that dash works only on horizontal and vertical lines.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Make end points of the lines rounded. true: rounded, false: perpendicular line ending.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets margin on the bottom. Widget will keep this space from its siblings in layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets margin on the left. Widget will keep this space from its siblings in layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets margin on the right. Widget will keep this space from its siblings in layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets margin on the top. Widget will keep this space from its siblings in layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets a maximal height. Pixel and percentage values can be used. Percentage values
are relative to the height of the parent’s content area.
Default: LV_COORD_MAX, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets a maximal width. Pixel and percentage values can be used. Percentage values
are relative to the width of the parent’s content area.
Default: LV_COORD_MAX, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets a minimal height. Pixel and percentage values can be used. Percentage values
are relative to the height of the parent’s content area.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets a minimal width. Pixel and percentage values can be used. Percentage values
are relative to the width of the parent’s content area.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Scale down all opacity values of the Widget by this factor. Value 0, LV_OPA_0 or
LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means
fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: Yes, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
First draw Widget on the layer, then scale down layer opacity factor. Value 0,
LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or
LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc
means semi transparency.
Default: LV_OPA_COVER, inherited: Yes, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set opacity of outline. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Set padding of outline, i.e. the gap between Widget and the outline.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Sets the padding on the bottom. It makes the content area smaller in this direction.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets the padding between the columns. Used by the layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets the padding on the left. It makes the content area smaller in this direction.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Pad text labels away from the scale ticks/remainder of the LV_PART_.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets the padding on the right. It makes the content area smaller in this direction.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets the padding between the rows. Used by the layouts.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets the padding on the top. It makes the content area smaller in this direction.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set the value of property in a style.
This function shouldn’t be used directly by the user.
Instead use lv_style_set_<prop_name>(). E.g. lv_style_set_bg_color()
@param style pointer to style
@param prop the ID of a property (e.g. LV_STYLE_BG_COLOR)
@param value lv_style_value_t variable in which a field is set according to the type of prop
Move start point of object (e.g. scale tick) radially.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set radius on every corner. The value is interpreted in pixels (>= 0) or
LV_RADIUS_CIRCLE for max radius.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets the intensity of color mixing. Value 0, LV_OPA_0 or LV_OPA_TRANSP means
fully transparent. A value of 255, LV_OPA_100 or LV_OPA_COVER means fully
opaque. Intermediate values like LV_OPA_10, LV_OPA_20, etc result in
semi-transparency.
Default: LV_OPA_TRANSP, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Adjust sensitivity for rotary encoders in 1/256 unit. It means, 128: slow down the
rotary to half, 512: speeds up to double, 256: no change.
Default: 256, inherited: Yes, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set an offset on the shadow in pixels in X direction.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Set an offset on the shadow in pixels in Y direction.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Set opacity of shadow. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Make shadow calculation to use a larger or smaller rectangle as base. The value can
be in pixels to make the area larger/smaller.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Set width of the shadow in pixels. The value should be >= 0.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Set how to align the lines of the text. Note that it doesn’t align the Widget
itself, only the lines inside the Widget. Possible values are
LV_TEXT_ALIGN_LEFT/CENTER/RIGHT/AUTO. LV_TEXT_ALIGN_AUTO detect the text base
direction and uses left or right alignment accordingly.
Default: LV_TEXT_ALIGN_AUTO, inherited: Yes, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set decoration for the text. Possible values are
LV_TEXT_DECOR_NONE/UNDERLINE/STRIKETHROUGH. OR-ed values can be used as well.
Default: LV_TEXT_DECOR_NONE, inherited: Yes, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set font of text (a pointer lv_font_t *).
Default: LV_FONT_DEFAULT, inherited: Yes, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Pointer to font
Set opacity of text. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully
transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values
or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: Yes, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets the color of letter outline stroke.
Default: 0x000000, inherited: Yes, layout: No, ext. draw: No.
@param style Pointer to style
@param value Color to submit
Set the opacity of the letter outline stroke. Value 0, LV_OPA_0 or
LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means
fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
Default: LV_OPA_COVER, inherited: Yes, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set the letter outline stroke width in pixels.
Default: 0, inherited: Yes, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Make Widget higher on both sides with this value. Pixel and percentage (with
lv_pct(x)) values can be used. Percentage values are relative to Widget’s height.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Set pivot point’s X coordinate for transformations. Relative to Widget’s top left corner.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set pivot point’s Y coordinate for transformations. Relative to Widget’s top left corner.
Default: 0, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Rotate Widget. The value is interpreted in 0.1 degree units. E.g. 450 means 45 deg.
Default: 0, inherited: No, layout: Yes, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Zoom Widget horizontally. The value 256 (or LV_SCALE_NONE) means normal size, 128
half size, 512 double size, and so on.
Default: 0, inherited: No, layout: Yes, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Zoom Widget vertically. The value 256 (or LV_SCALE_NONE) means normal size, 128
half size, 512 double size, and so on.
Default: 0, inherited: No, layout: Yes, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Skew Widget horizontally. The value is interpreted in 0.1 degree units. E.g. 450
means 45 deg.
Default: 0, inherited: No, layout: Yes, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Skew Widget vertically. The value is interpreted in 0.1 degree units. E.g. 450
means 45 deg.
Default: 0, inherited: No, layout: Yes, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
Make Widget wider on both sides with this value. Pixel and percentage (with
lv_pct(x)) values can be used. Percentage values are relative to Widget’s width.
Default: 0, inherited: No, layout: No, ext. draw: Yes.
@param style Pointer to style
@param value Value to submit
An initialized lv_style_transition_dsc_t to describe a transition.
Default: NULL, inherited: No, layout: No, ext. draw: No.
@param style Pointer to style
@param value Pointer to transition descriptor
Move object around the centre of the parent object (e.g. around the circumference
of a scale).
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Move Widget with this value in X direction. Applied after layouts, aligns and other
positioning. Pixel and percentage (with lv_pct(x)) values can be used. Percentage
values are relative to Widget’s width.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Move Widget with this value in Y direction. Applied after layouts, aligns and other
positioning. Pixel and percentage (with lv_pct(x)) values can be used. Percentage
values are relative to Widget’s height.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Sets width of Widget. Pixel, percentage and LV_SIZE_CONTENT values can be used.
Percentage values are relative to the width of the parent’s content area.
Default: Widget dependent, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set X coordinate of Widget considering the align setting. Pixel and percentage
values can be used. Percentage values are relative to the width of the parent’s
content area.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Set Y coordinate of Widget considering the align setting. Pixel and percentage
values can be used. Percentage values are relative to the height of the parent’s
content area.
Default: 0, inherited: No, layout: Yes, ext. draw: No.
@param style Pointer to style
@param value Value to submit
Initialize a transition descriptor.
@param tr pointer to a transition descriptor to initialize
@param props an array with the properties to transition. The last element must be zero.
@param path_cb an animation path (ease) callback. If NULL liner path will be used.
@param time duration of the transition in [ms]
@param delay delay before the transition in [ms]
@param user_data any custom data that will be saved in the transition animation and will be available when path_cb is called
Add Observer to Subject. When Subject’s value changes observer_cb will be called.
@param subject pointer to Subject
@param observer_cb notification callback
@param user_data optional user data
@return pointer to newly-created Observer
Add Observer to Subject for a Widget.
When the Widget is deleted, Observer will be unsubscribed from Subject automatically.
@param subject pointer to Subject
@param observer_cb notification callback
@param obj pointer to Widget
@param user_data optional user data
@return pointer to newly-created Observer
@note Do not call lv_observer_remove() on Observers created this way.
Only clean up such Observers by either:
- deleting the Widget, or
- calling lv_subject_deinit() to gracefully de-couple and
remove all Observers.
Add an Observer to a Subject and also save a target pointer.
@param subject pointer to Subject
@param observer_cb notification callback
@param target any pointer (NULL is okay)
@param user_data optional user data
@return pointer to newly-created Observer
Remove all Observers from a Subject and free allocated memory, and delete
any associated Widget-Binding events. This leaves subject “disconnected” from
all Observers and all associated Widget events established through Widget Binding.
@param subject pointer to Subject
@note This can safely be called regardless of whether any Observers
added with lv_subject_add_observer_obj() or bound to a Widget Property
with one of the ..._bind_...() functions.
Get an element from Subject Group’s list.
@param subject pointer to Group-type Subject
@param index index of element to get
@return pointer to indexed Subject from list, or NULL if index is out of bounds
Get previous value of a string Subject.
@param subject pointer to Subject
@return pointer to buffer containing previous value
@note NULL will be returned if NULL was passed in lv_subject_init_string()
as prev_buf.
Initialize a Group-type Subject.
@param group_subject pointer to Group-type Subject
@param list list of other Subject addresses; when any of these have values
updated, Observers of group_subject will be notified.
@param list_len number of elements in list[]
Initialize a string-type Subject.
@param subject pointer to Subject
@param buf pointer to buffer to store string
@param prev_buf pointer to buffer to store previous string; can be NULL if not used
@param size size of buffer(s)
@param value initial value of string, e.g. “hello”
@note A string Subject stores its own copy of the string, not just the pointer.
Clear control bits of the cell.
@param obj pointer to a Table object
@param row id of the row [0 .. row_cnt -1]
@param col id of the column [0 .. col_cnt -1]
@param ctrl OR-ed values from ::lv_table_cell_ctrl_t
Get custom user data to the cell.
@param obj pointer to a Table object
@param row id of the row [0 .. row_cnt -1]
@param col id of the column [0 .. col_cnt -1]
Get the value of a cell.
@param obj pointer to a Table object
@param row id of the row [0 .. row_cnt -1]
@param col id of the column [0 .. col_cnt -1]
@return text in the cell
Get the width of a column
@param obj table pointer to a Table object
@param col id of the column [0 .. LV_TABLE_COL_MAX -1]
@return width of the column
Get the selected cell (pressed and or focused)
@param obj pointer to a table object
@param row pointer to variable to store the selected row (LV_TABLE_CELL_NONE: if no cell selected)
@param col pointer to variable to store the selected column (LV_TABLE_CELL_NONE: if no cell selected)
Get whether a cell has the control bits
@param obj pointer to a Table object
@param row id of the row [0 .. row_cnt -1]
@param col id of the column [0 .. col_cnt -1]
@param ctrl OR-ed values from ::lv_table_cell_ctrl_t
@return true: all control bits are set; false: not all control bits are set
Add control bits to the cell.
@param obj pointer to a Table object
@param row id of the row [0 .. row_cnt -1]
@param col id of the column [0 .. col_cnt -1]
@param ctrl OR-ed values from ::lv_table_cell_ctrl_t
Add custom user data to the cell.
@param obj pointer to a Table object
@param row id of the row [0 .. row_cnt -1]
@param col id of the column [0 .. col_cnt -1]
@param user_data pointer to the new user_data.
Should be allocated by lv_malloc,
and it will be freed automatically when the table is deleted or
when the cell is dropped due to lower row or column count.
Set the value of a cell.
@param obj pointer to a Table object
@param row id of the row [0 .. row_cnt -1]
@param col id of the column [0 .. col_cnt -1]
@param txt text to display in the cell. It will be copied and saved so this variable is not required after this function call.
@note New roes/columns are added automatically if required
Set the value of a cell. Memory will be allocated to store the text by the table.
@param obj pointer to a Table object
@param row id of the row [0 .. row_cnt -1]
@param col id of the column [0 .. col_cnt -1]
@param fmt printf-like format
@note New roes/columns are added automatically if required
Set the width of a column
@param obj table pointer to a Table object
@param col_id id of the column [0 .. LV_TABLE_COL_MAX -1]
@param w width of the column
Add a tab to the tabview
@param obj pointer to a tabview widget
@param name the name of the tab, it will be displayed on the tab bar
@return the widget where the content of the tab can be created
Get a given tab button by index
@param obj pointer to a tabview widget
@param idx zero based index of the tab button to get.
< 0 means start counting tab button from the back (-1 is the last tab button)
@return pointer to the tab button, or NULL if the index was out of range
Set the width or height of the tab bar
@param obj pointer to tabview widget
@param size size of the tab bar in pixels or percentage.
will be used as width or height based on the position of the tab bar)
Delete a part of a string
@param txt string to modify, must be ‘\0’ terminated and should point to a heap or stack frame, not read-only memory.
@param pos position where to start the deleting (0: before the first char, 1: after the first
char etc.)
@param len number of characters to delete
Decode two encoded character from a string.
@param txt pointer to ‘\0’ terminated string
@param letter the first decoded Unicode character or 0 on invalid data code
@param letter_next the second decoded Unicode character or 0 on invalid data code
@param ofs start index in ‘txt’ where to start.
After the call it will point to the next encoded char in ‘txt’.
NULL to use txt[0] as index
Get the next line of text. Check line length and break chars too.
@param txt a ‘\0’ terminated string
@param len length of ‘txt’ in bytes
@param font pointer to a font
@param used_width When used_width != NULL, save the width of this line if
flag == LV_TEXT_FLAG_NONE, otherwise save -1.
@param attributes text attributes, flags to control line break behaviour, spacing etc
@return the index of the first char of the new line
(in byte index not letter index. With UTF-8 they are different)
Get size of a text
@param size_res pointer to a ‘point_t’ variable to store the result
@param text pointer to a text
@param font pointer to font of the text
@param letter_space letter space of the text
@param line_space line space of the text
@param max_width max width of the text (break the lines to fit this size). Set COORD_MAX to avoid
@param flag settings for the text from ::lv_text_flag_t
Get size of a text
@param size_res pointer to a ‘point_t’ variable to store the result
@param text pointer to a text
@param font pointer to font of the text
@param attributes the text attributes, flags for line break behaviour, spacing etc
Give the length of a text with a given font with text flags
@param txt a ‘\0’ terminate string
@param length length of ‘txt’ in byte count and not characters (Á is 1 character but 2 bytes in
UTF-8)
@param font pointer to font of the text
@param attributes the text attributes, flags for line break behaviour, spacing etc
@return length of a char_num long text
Insert a string into another
@param txt_buf the original text (must be big enough for the result text and NULL terminated)
@param pos position to insert (0: before the original text, 1: after the first char etc.)
@param ins_txt text to insert, must be ‘\0’ terminated
Insert a character to the current cursor position.
To add a wide char, e.g. ‘Á’ use lv_text_encoded_conv_wc('Á')
@param obj pointer to a text area object
@param c a character (e.g. ‘a’)
Get whether the cursor click positioning is enabled or not.
@param obj pointer to a text area object
@return true: enable click positions; false: disable
Set how long show the password before changing it to ‘*’
@param obj pointer to a text area object
@return show time in milliseconds. 0: hide immediately.
Set a list of characters. Only these characters will be accepted by the text area
@param obj pointer to a text area object
@param list list of characters. A copy is saved. Example: “+-.,0123456789”
Set a list of characters. Only these characters will be accepted by the text area
@param obj pointer to a text area object
@param list list of characters. Only the pointer is saved. Example: “+-.,0123456789”
@deprecated Use the normal text_align style property instead
Set the label’s alignment.
It sets where the label is aligned (in one line mode it can be smaller than the text area)
and how the lines of the area align in case of multiline text area
@param obj pointer to a text area object
@param align the align mode from ::lv_text_align_t
Enable/Disable the positioning of the cursor by clicking the text on the text area.
@param obj pointer to a text area object
@param en true: enable click positions; false: disable
Set the cursor position
@param obj pointer to a text area object
@param pos the new cursor position in character index
< 0 : index from the end of the text
LV_TEXTAREA_CURSOR_LAST: go after the last character
In LV_EVENT_INSERT the text which planned to be inserted can be replaced by another text.
It can be used to add automatic formatting to the text area.
@param obj pointer to a text area object
@param txt pointer to a new string to insert. If "" no text will be added.
The variable must be live after the event_cb exists. (Should be global or static)
Set max length of a Text Area.
@param obj pointer to a text area object
@param num the maximal number of characters can be added (lv_textarea_set_text ignores it)
Set how long show the password before changing it to ‘*’
@param obj pointer to a text area object
@param time show time in milliseconds. 0: hide immediately.
Initialize the theme
@param disp pointer to display
@param color_primary the primary color of the theme
@param color_secondary the secondary color for the theme
@param dark
@param font pointer to a font to use.
@return a pointer to reference this theme later
Initialize the theme
@param disp pointer to display
@param dark_bg
@param font pointer to a font to use.
@return a pointer to reference this theme later
Set an apply callback for a theme.
The apply callback is used to add styles to different objects
@param theme pointer to theme which callback should be set
@param apply_cb pointer to the callback
Set a base theme for a theme.
The styles from the base them will be added before the styles of the current theme.
Arbitrary long chain of themes can be created by setting base themes.
@param theme pointer to theme which base should be set
@param parent pointer to the base theme
Get the elapsed milliseconds between two time stamps
@param tick a time stamp
@param prev_tick a time stamp before tick
@return the elapsed milliseconds between prev_tick and tick
Get the elapsed milliseconds since a previous time stamp
@param prev_tick a previous time stamp (return value of lv_tick_get() )
@return the elapsed milliseconds since ‘prev_tick’
You have to call this function periodically.
It is typically safe to call from an interrupt handler or a different thread.
@param tick_period the call period of this function in milliseconds
Add a tile to the tileview
@param tv pointer to the tileview object
@param col_id column id of the tile
@param row_id row id of the tile
@param dir direction to move to the next tile
@return pointer to the added tile object
Set the active tile in the tileview.
@param parent pointer to the tileview object
@param tile_obj pointer to the tile object to be set as active
@param anim_en animation enable flag (LV_ANIM_ON or LV_ANIM_OFF)
Set the active tile by index in the tileview
@param tv pointer to the tileview object
@param col_id column id of the tile to be set as active
@param row_id row id of the tile to be set as active
@param anim_en animation enable flag (LV_ANIM_ON or LV_ANIM_OFF)
Create a new lv_timer
@param timer_xcb a callback to call periodically.
(the ‘x’ in the argument name indicates that it’s not a fully generic function because it not follows
the func_name(object, callback, ...) convention)
@param period call period in ms unit
@param user_data custom parameter
@return pointer to the new timer
Iterate through the timers
@param timer NULL to start iteration or the previous return value to get the next timer
@return the next timer or NULL if there is no more timer
Call it in the super-loop of main() or threads. It will run lv_timer_handler()
with a given period in ms. You can use it with sleep or delay in OS environment.
This function is used to simplify the porting.
@param period the period for running lv_timer_handler()
@return the time after which it must be called again
Call it in the super-loop of main() or threads. It will automatically call lv_timer_handler() at the right time.
This function is used to simplify the porting.
Set whether a lv_timer will be deleted automatically when it is called repeat_count times.
@param timer pointer to a lv_timer.
@param auto_delete true: auto delete; false: timer will be paused when it is called repeat_count times.
@brief Create a tree node
@param class_p pointer to a class of the node
@param parent pointer to the parent node (or NULL if it’s the root node)
@return pointer to the new node
@brief Walk the tree recursively and call a callback function on each node
@param node pointer to the root node of the tree
@param mode LV_TREE_WALK_PRE_ORDER or LV_TREE_WALK_POST_ORDER
@param cb callback function to call on each node
@param bcb callback function to call before visiting a node
@param acb callback function to call after visiting a node
@param user_data user data to pass to the callback functions
@return true: traversal is finished; false: traversal broken
Add a button to the window
@param obj pointer to a window widget
@param icon an icon to be displayed on the button
@param btn_w width of the button
@return the widget where the content of the button can be created
Add a title to the window
@param obj pointer to a window widget
@param txt the text of the title
@return the widget where the content of the title can be created
Same as lv_anim_exec_xcb_t but receives lv_anim_t * as the first parameter.
It’s more consistent but less convenient. Might be used by binding generator functions.
Generic prototype of “animator” functions.
First parameter is the variable to animate.
Second parameter is the value to set.
Compatible with lv_xxx_set_yyy(obj, value) functions
The x in _xcb_t means it’s not a fully generic prototype because
it doesn’t receive lv_anim_t * as its first argument
The cache add function, used by the cache class to add a cache entry with a given key.
This function only cares about how to add the entry, it doesn’t check if the entry already exists and doesn’t care about is it a victim or not.
@return the added cache entry, or NULL if the entry is not added.
The cache instance allocation function, used by the cache class to allocate memory for cache instances.
@return It should return a pointer to the allocated instance.
The cache instance initialization function, used by the cache class to initialize the cache instance.
@return It should return true if the initialization is successful, false otherwise.
The cache iterator creation function, used by the cache class to create an iterator for the cache.
@return A pointer to the created iterator, or NULL if the iterator cannot be created.
The cache remove function, used by the cache class to remove a cache entry from the cache but doesn’t free the memory..
This function only cares about how to remove the entry, it doesn’t care about is it a victim or not.
The cache reserve condition function, used by the cache class to check if a new entry can be added to the cache without exceeding its maximum size.
See lv_cache_reserve_cond_res_t for the possible results.
Used as the event parameter of ::LV_EVENT_COVER_CHECK to check if an area is covered by the object or not.
In the event use const lv_area_t * area = lv_event_get_cover_area(e) to get the area to check
and lv_event_set_cover_res(e, res) to set the result.
Passed as a parameter to lv_draw_label_iterate_characters to
draw the characters one by one
@param t pointer to a draw task
@param dsc pointer to lv_draw_glyph_dsc_t to describe the character to draw
if NULL don’t draw character
@param fill_dsc pointer to a fill descriptor to draw a background for the character or
underline or strike through
if NULL do not fill anything
@param fill_area the area to fill
if NULL do not fill anything
PErform the actual rendering of a decoded image
@param t pointer to a draw task
@param draw_dsc the draw descriptor of the image
@param decoder_dsc pointer to the decoded image’s descriptor
@param sup supplementary data
@param img_coords the absolute coordinates of the image
@param clipped_img_area the absolute clip coordinates
Store some info to speed up drawing of very large texts
It takes a lot of time to get the first visible character because
all the previous characters needs to be checked to calculate the positions.
This structure stores an earlier (e.g. at -1000 px) coordinate and the index of that line.
Therefore the calculations can start from here.
Groups can be used to logically hold objects so that they can be individually focused.
They are NOT for laying out objects on a screen (try layouts for that).
Image decoder args.
It determines how to decoder an image, e.g. whether to premultiply the alpha or not.
It should be passed to lv_img_decoder_open() function. If NULL is provided, default
args are used.
Close the pending decoding. Free resources etc.
@param decoder pointer to the decoder the function associated with
@param dsc pointer to decoder descriptor
Custom drawing functions for special image formats.
@param layer pointer to a layer
@param dsc pointer to decoder descriptor
@param coords the coordinates of the image
@param draw_dsc the draw image descriptor
@param clip_area the clip area of the image
Decode full_area pixels incrementally by calling in a loop. Set decoded_area values to LV_COORD_MIN on first call.
Required only if the “open” function can’t return with the whole decoded pixel array.
@param decoder pointer to the decoder the function associated with
@param dsc pointer to decoder descriptor
@param full_area input parameter. the full area to decode after enough subsequent calls
@param decoded_area input+output parameter. set the values to LV_COORD_MIN for the first call and to reset decoding.
the decoded area is stored here after each call.
@return LV_RESULT_OK: ok; LV_RESULT_INVALID: failed or there is nothing left to decode
Get info from an image and store in the header
@param decoder pointer to decoder object
@param dsc pointer to decoder descriptor
@param header store the info here
@return LV_RESULT_OK: info written correctly; LV_RESULT_INVALID: failed
Open an image for decoding. Prepare it as it is required to read it later
@param decoder pointer to the decoder the function associated with
@param dsc pointer to decoder descriptor. src, color are already initialized in it.
Callback called to notify Observer that Subject’s value has changed
@param observer pointer to Observer
@param subject pointer to Subject being observed
The possible parts of widgets.
The parts can be considered as the internal building block of the widgets.
E.g. slider = background + indicator + knob
Not all parts are used by every widget