mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-10 04:37:55 +08:00
docs: fixes API section of the docs to include everything from LVGL. (#4192)
This commit is contained in:
+1
-1
@@ -2060,7 +2060,7 @@ INCLUDE_FILE_PATTERNS =
|
||||
# recursively expanded use the := operator instead of the = operator.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
PREDEFINED = DOXYGEN
|
||||
PREDEFINED = DOXYGEN LV_CONF_PATH="#*#*LV_CONF_PATH*#*#"
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||
# tag can be used to specify a list of macro names that should be expanded. The
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ Naming and API
|
||||
Architecture
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- [x] Consider merging `lv_disp_drv_t`, `lv_disp_t`, `lv_disp_draw_buf_t`, `lv_draw_ctx_t`, and `struct`s from the new driver API (or only some of them)
|
||||
- [x] Consider merging `lv_disp_drv_t`, `lv_disp_t`, `lv_disp_draw_buf_t`, `lv_draw_ctx_t`, and `struct`'s from the new driver API (or only some of them)
|
||||
- [x] New driver architecture #2720
|
||||
- [x] `draw_ctx->buffer_convert`? See [here](https://github.com/lvgl/lvgl/issues/3379#issuecomment-1147954592). Also remove 16 SWAPPED color format? See [here](https://github.com/lvgl/lvgl/issues/3379#issuecomment-1140886258).
|
||||
- [ ] `lv_img_set_src()` use "type-aware" parameter and rework image decoders. See [here](https://github.com/lvgl/lvgl/tree/arch/img-decode-rework)
|
||||
|
||||
@@ -122,6 +122,7 @@ shutil.copytree(examples_path, os.path.join(temp_directory, 'examples'))
|
||||
with open(os.path.join(temp_directory, 'Doxyfile'), 'rb') as f:
|
||||
data = f.read().decode('utf-8')
|
||||
|
||||
data = data.replace('#*#*LV_CONF_PATH*#*#', os.path.join(base_path, 'lv_conf.h'))
|
||||
data = data.replace('*#*#SRC#*#*', '"{0}"'.format(lvgl_src_path))
|
||||
|
||||
with open(os.path.join(temp_directory, 'Doxyfile'), 'wb') as f:
|
||||
|
||||
@@ -301,7 +301,7 @@ Examples
|
||||
of :cpp:type:`lv_anim_t` which contains ``user_data`` field, and :cpp:type:`lv_anim_path_cb_t`
|
||||
receive :cpp:type:`lv_anim_t` as its first argument.
|
||||
- :cpp:func:`lv_imgfont_create` registers ``path_cb`` and receives ``user_data`` as the last
|
||||
argument. The callback :cpp:func:`lv_imgfont_get_path_cb_t` also receives the ``user_data`` as the last argument.
|
||||
argument. The callback :cpp:type:`lv_imgfont_get_path_cb_t` also receives the ``user_data`` as the last argument.
|
||||
|
||||
.. _more-information-1:
|
||||
|
||||
|
||||
+857
File diff suppressed because it is too large
Load Diff
@@ -112,7 +112,7 @@ Built-in colors
|
||||
Opacity
|
||||
*******
|
||||
|
||||
To describe opacity the :cpp:var:`lv_opa_t` type is created from ``uint8_t``.
|
||||
To describe opacity the :cpp:type:`lv_opa_t` type is created from ``uint8_t``.
|
||||
Some special purpose defines are also introduced:
|
||||
|
||||
- :cpp:enumerator:`LV_OPA_TRANSP` Value: 0, means no opacity making the color
|
||||
@@ -144,7 +144,7 @@ The following variable types are defined by the color module:
|
||||
- :cpp:type:`lv_color_int_t` ``uint8_t``, ``uint16_t`` or ``uint32_t``
|
||||
depending on the color depth setting. Used to build color arrays from
|
||||
plain numbers.
|
||||
- :cpp:var:`lv_opa_t` A simple ``uint8_t`` type to describe opacity.
|
||||
- :cpp:type:`lv_opa_t` A simple ``uint8_t`` type to describe opacity.
|
||||
|
||||
The :cpp:type:`lv_color_t`, :cpp:union:`lv_color1_t`, :cpp:union:`lv_color8_t`, :cpp:class:`lv_color16_t`
|
||||
and :cpp:class:`lv_color32_t` types have four fields:
|
||||
|
||||
@@ -239,13 +239,12 @@ You can do this in the following way:
|
||||
If you have multiple displays call :cpp:expr:`lv_disp_set_deafult(disp1)` to
|
||||
select the display to refresh before :cpp:expr:`_lv_disp_refr_timer(NULL)`.
|
||||
|
||||
.. note:: that :cpp:func:`lv_timer_handler` and :cpp:func:`_lv_disp_refr_timer` can not
|
||||
run at the same time.
|
||||
|
||||
If the performance monitor is enabled, the value of
|
||||
:c:macro:`LV_DEF_REFR_PERIOD` needs to be set to be consistent with the refresh
|
||||
period of the display to ensure that the statistical results are
|
||||
correct.
|
||||
.. note:: that :cpp:func:`lv_timer_handler` and :cpp:func:`_lv_disp_refr_timer` can not run at the same time.
|
||||
|
||||
|
||||
If the performance monitor is enabled, the value of :c:macro:`LV_DEF_REFR_PERIOD` needs to be set to be
|
||||
consistent with the refresh period of the display to ensure that the statistical results are correct.
|
||||
|
||||
Further reading
|
||||
***************
|
||||
|
||||
@@ -59,7 +59,7 @@ extern "C" {
|
||||
/**
|
||||
* Fill area, with optional opacity.
|
||||
*
|
||||
* @param[in/out] dest_buf Destination buffer
|
||||
* @param dest_buf Destination buffer
|
||||
* @param[in] dest_area Area with relative coordinates of destination buffer
|
||||
* @param[in] dest_stride Stride of destination buffer in pixels
|
||||
* @param[in] color Color
|
||||
@@ -73,7 +73,7 @@ void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_
|
||||
* By default, image is copied directly, with optional opacity. This function can also
|
||||
* rotate the display output buffer to a specified angle (90x step).
|
||||
*
|
||||
* @param[in/out] dest_buf Destination buffer
|
||||
* @param dest_buf Destination buffer
|
||||
* @param[in] dest_area Area with relative coordinates of destination buffer
|
||||
* @param[in] dest_stride Stride of destination buffer in pixels
|
||||
* @param[in] src_buf Source buffer
|
||||
@@ -89,8 +89,7 @@ void lv_gpu_nxp_pxp_blit(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_
|
||||
/**
|
||||
* BLock Image Transfer - copy rectangular image from src_buf to dst_buf with transformation.
|
||||
*
|
||||
*
|
||||
* @param[in/out] dest_buf Destination buffer
|
||||
* @param dest_buf Destination buffer
|
||||
* @param[in] dest_area Area with relative coordinates of destination buffer
|
||||
* @param[in] dest_stride Stride of destination buffer in pixels
|
||||
* @param[in] src_buf Source buffer
|
||||
|
||||
@@ -71,7 +71,7 @@ lv_res_t lv_gpu_nxp_vglite_fill(const lv_area_t * dest_area, lv_color_t color, l
|
||||
* BLock Image Transfer - copy rectangular image from src_buf to dst_buf with effects.
|
||||
* By default, image is copied directly, with optional opacity.
|
||||
*
|
||||
* @param[in/out] dest_buf Destination buffer
|
||||
* @param dest_buf Destination buffer
|
||||
* @param[in] dest_area Area with relative coordinates of destination buffer
|
||||
* @param[in] dest_stride Stride of destination buffer in pixels
|
||||
* @param[in] src_buf Source buffer
|
||||
@@ -90,7 +90,7 @@ lv_res_t lv_gpu_nxp_vglite_blit(lv_color_t * dest_buf, lv_area_t * dest_area, lv
|
||||
* BLock Image Transfer - copy rectangular image from src_buf to dst_buf with transformation.
|
||||
* By default, image is copied directly, with optional opacity.
|
||||
*
|
||||
* @param[in/out] dest_buf Destination buffer
|
||||
* @param dest_buf Destination buffer
|
||||
* @param[in] dest_area Area with relative coordinates of destination buffer
|
||||
* @param[in] dest_stride Stride of destination buffer in pixels
|
||||
* @param[in] src_buf Source buffer
|
||||
|
||||
@@ -78,7 +78,7 @@ extern "C" {
|
||||
/**
|
||||
* Premultiplies and swizzles given LVGL 32bit color to obtain vglite color.
|
||||
*
|
||||
* @param[in/out] vg_col32 The obtained vglite color
|
||||
* @param vg_col32 The obtained vglite color
|
||||
* @param[in] lv_col32 The initial LVGL 32bit color
|
||||
* @param[in] opa The opacity to premultiply with
|
||||
* @param[in] vg_col_format The format of the resulting vglite color
|
||||
|
||||
@@ -37,7 +37,7 @@ extern "C" {
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
struct lv_draw_sdl_context_internals_t;
|
||||
struct _lv_draw_sdl_context_internals_t;
|
||||
|
||||
typedef struct {
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
lv_draw_ctx_t base_draw;
|
||||
SDL_Renderer * renderer;
|
||||
struct lv_draw_sdl_context_internals_t * internals;
|
||||
struct _lv_draw_sdl_context_internals_t * internals;
|
||||
} lv_draw_sdl_ctx_t;
|
||||
|
||||
/**********************
|
||||
|
||||
@@ -32,7 +32,7 @@ extern "C" {
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
typedef struct lv_draw_sdl_img_header_t {
|
||||
typedef struct _lv_draw_sdl_img_header_t {
|
||||
lv_img_header_t base;
|
||||
SDL_Rect rect;
|
||||
} lv_draw_sdl_img_header_t;
|
||||
|
||||
@@ -31,7 +31,7 @@ extern "C" {
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
typedef struct lv_draw_sdl_context_internals_t {
|
||||
typedef struct _lv_draw_sdl_context_internals_t {
|
||||
lv_lru_t * texture_cache;
|
||||
SDL_Texture * mask;
|
||||
SDL_Texture * composition;
|
||||
|
||||
@@ -32,7 +32,7 @@ extern "C" {
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
typedef struct lv_draw_sdl_rect_header_t {
|
||||
typedef struct _lv_draw_sdl_rect_header_t {
|
||||
lv_img_header_t base;
|
||||
SDL_Rect rect;
|
||||
} lv_draw_sdl_rect_header_t;
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
|
||||
#if LV_USE_GIF
|
||||
|
||||
typedef struct gd_Palette {
|
||||
typedef struct _gd_Palette {
|
||||
int size;
|
||||
uint8_t colors[0x100 * 3];
|
||||
} gd_Palette;
|
||||
|
||||
typedef struct gd_GCE {
|
||||
typedef struct _gd_GCE {
|
||||
uint16_t delay;
|
||||
uint8_t tindex;
|
||||
uint8_t disposal;
|
||||
@@ -21,7 +21,7 @@ typedef struct gd_GCE {
|
||||
|
||||
|
||||
|
||||
typedef struct gd_GIF {
|
||||
typedef struct _gd_GIF {
|
||||
lv_fs_file_t fd;
|
||||
const char * data;
|
||||
uint8_t is_file;
|
||||
@@ -34,12 +34,12 @@ typedef struct gd_GIF {
|
||||
gd_Palette * palette;
|
||||
gd_Palette lct, gct;
|
||||
void (*plain_text)(
|
||||
struct gd_GIF * gif, uint16_t tx, uint16_t ty,
|
||||
struct _gd_GIF * gif, uint16_t tx, uint16_t ty,
|
||||
uint16_t tw, uint16_t th, uint8_t cw, uint8_t ch,
|
||||
uint8_t fg, uint8_t bg
|
||||
);
|
||||
void (*comment)(struct gd_GIF * gif);
|
||||
void (*application)(struct gd_GIF * gif, char id[8], char auth[3]);
|
||||
void (*comment)(struct _gd_GIF * gif);
|
||||
void (*application)(struct _gd_GIF * gif, char id[8], char auth[3]);
|
||||
uint16_t fx, fy, fw, fh;
|
||||
uint8_t bgindex;
|
||||
uint8_t * canvas, *frame;
|
||||
|
||||
+13
-13
@@ -98,7 +98,7 @@ source files with custom allocators.*/
|
||||
|
||||
#ifdef LODEPNG_COMPILE_PNG
|
||||
/*The PNG color types (also used for raw image).*/
|
||||
typedef enum LodePNGColorType {
|
||||
typedef enum _LodePNGColorType {
|
||||
LCT_GREY = 0, /*grayscale: 1,2,4,8,16 bit*/
|
||||
LCT_RGB = 2, /*RGB: 8,16 bit*/
|
||||
LCT_PALETTE = 3, /*palette: 1,2,4,8 bit*/
|
||||
@@ -267,8 +267,8 @@ unsigned encode(const std::string & filename,
|
||||
|
||||
#ifdef LODEPNG_COMPILE_DECODER
|
||||
/*Settings for zlib decompression*/
|
||||
typedef struct LodePNGDecompressSettings LodePNGDecompressSettings;
|
||||
struct LodePNGDecompressSettings {
|
||||
typedef struct _LodePNGDecompressSettings LodePNGDecompressSettings;
|
||||
struct _LodePNGDecompressSettings {
|
||||
/* Check LodePNGDecoderSettings for more ignorable errors such as ignore_crc */
|
||||
unsigned ignore_adler32; /*if 1, continue and don't give an error message if the Adler32 checksum is corrupted*/
|
||||
unsigned ignore_nlen; /*ignore complement of len checksum in uncompressed blocks*/
|
||||
@@ -304,8 +304,8 @@ void lodepng_decompress_settings_init(LodePNGDecompressSettings * settings);
|
||||
Settings for zlib compression. Tweaking these settings tweaks the balance
|
||||
between speed and compression ratio.
|
||||
*/
|
||||
typedef struct LodePNGCompressSettings LodePNGCompressSettings;
|
||||
struct LodePNGCompressSettings { /*deflate = compress*/
|
||||
typedef struct _LodePNGCompressSettings LodePNGCompressSettings;
|
||||
struct _LodePNGCompressSettings { /*deflate = compress*/
|
||||
/*LZ77 related settings*/
|
||||
unsigned btype; /*the block type for LZ (0, 1, 2 or 3, see zlib standard). Should be 2 for proper compression.*/
|
||||
unsigned use_lz77; /*whether or not to use LZ77. Should be 1 for proper compression.*/
|
||||
@@ -338,7 +338,7 @@ Color mode of an image. Contains all information required to decode the pixel
|
||||
bits to RGBA colors. This information is the same as used in the PNG file
|
||||
format, and is used both for PNG and raw image data in LodePNG.
|
||||
*/
|
||||
typedef struct LodePNGColorMode {
|
||||
typedef struct _LodePNGColorMode {
|
||||
/*header (IHDR)*/
|
||||
LodePNGColorType colortype; /*color type, see PNG standard or documentation further in this header file*/
|
||||
unsigned bitdepth; /*bits per sample, see PNG standard or documentation further in this header file*/
|
||||
@@ -418,7 +418,7 @@ size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode * col
|
||||
|
||||
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
|
||||
/*The information of a Time chunk in PNG.*/
|
||||
typedef struct LodePNGTime {
|
||||
typedef struct _LodePNGTime {
|
||||
unsigned year; /*2 bytes used (0-65535)*/
|
||||
unsigned month; /*1-12*/
|
||||
unsigned day; /*1-31*/
|
||||
@@ -429,7 +429,7 @@ typedef struct LodePNGTime {
|
||||
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
|
||||
|
||||
/*Information about the PNG image, except pixels, width and height.*/
|
||||
typedef struct LodePNGInfo {
|
||||
typedef struct _LodePNGInfo {
|
||||
/*header (IHDR), palette (PLTE) and transparency (tRNS) chunks*/
|
||||
unsigned compression_method;/*compression method of the original file. Always 0.*/
|
||||
unsigned filter_method; /*filter method of the original file*/
|
||||
@@ -641,7 +641,7 @@ unsigned lodepng_convert(unsigned char * out, const unsigned char * in,
|
||||
Settings for the decoder. This contains settings for the PNG and the Zlib
|
||||
decoder, but not the Info settings from the Info structs.
|
||||
*/
|
||||
typedef struct LodePNGDecoderSettings {
|
||||
typedef struct _LodePNGDecoderSettings {
|
||||
LodePNGDecompressSettings zlibsettings; /*in here is the setting to ignore Adler32 checksums*/
|
||||
|
||||
/* Check LodePNGDecompressSettings for more ignorable errors such as ignore_adler32 */
|
||||
@@ -678,7 +678,7 @@ void lodepng_decoder_settings_init(LodePNGDecoderSettings * settings);
|
||||
|
||||
#ifdef LODEPNG_COMPILE_ENCODER
|
||||
/*automatically use color type with less bits per pixel if losslessly possible. Default: AUTO*/
|
||||
typedef enum LodePNGFilterStrategy {
|
||||
typedef enum _LodePNGFilterStrategy {
|
||||
/*every filter at zero*/
|
||||
LFS_ZERO = 0,
|
||||
/*every filter at 1, 2, 3 or 4 (paeth), unlike LFS_ZERO not a good choice, but for testing*/
|
||||
@@ -703,7 +703,7 @@ typedef enum LodePNGFilterStrategy {
|
||||
/*Gives characteristics about the integer RGBA colors of the image (count, alpha channel usage, bit depth, ...),
|
||||
which helps decide which color model to use for encoding.
|
||||
Used internally by default if "auto_convert" is enabled. Public because it's useful for custom algorithms.*/
|
||||
typedef struct LodePNGColorStats {
|
||||
typedef struct _LodePNGColorStats {
|
||||
unsigned colored; /*not grayscale*/
|
||||
unsigned key; /*image is not opaque and color key is possible instead of full alpha*/
|
||||
unsigned short key_r; /*key values, always as 16-bit, in 8-bit case the byte is duplicated, e.g. 65535 means 255*/
|
||||
@@ -730,7 +730,7 @@ unsigned lodepng_compute_color_stats(LodePNGColorStats * stats,
|
||||
const LodePNGColorMode * mode_in);
|
||||
|
||||
/*Settings for the encoder.*/
|
||||
typedef struct LodePNGEncoderSettings {
|
||||
typedef struct _LodePNGEncoderSettings {
|
||||
LodePNGCompressSettings zlibsettings; /*settings for the zlib encoder, such as window size, ...*/
|
||||
|
||||
unsigned auto_convert; /*automatically choose output PNG color type. Default: true*/
|
||||
@@ -766,7 +766,7 @@ void lodepng_encoder_settings_init(LodePNGEncoderSettings * settings);
|
||||
|
||||
#if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER)
|
||||
/*The settings, state and information for extended encoding and decoding.*/
|
||||
typedef struct LodePNGState {
|
||||
typedef struct _LodePNGState {
|
||||
#ifdef LODEPNG_COMPILE_DECODER
|
||||
LodePNGDecoderSettings decoder; /*the decoding settings*/
|
||||
#endif /*LODEPNG_COMPILE_DECODER*/
|
||||
|
||||
@@ -44,8 +44,8 @@ typedef struct {
|
||||
} JRECT;
|
||||
|
||||
/* Decompressor object structure */
|
||||
typedef struct JDEC JDEC;
|
||||
struct JDEC {
|
||||
typedef struct _JDEC JDEC;
|
||||
struct _JDEC {
|
||||
size_t dctr; /* Number of bytes available in the input buffer */
|
||||
uint8_t * dptr; /* Current data read ptr */
|
||||
uint8_t * inbuf; /* Bit stream input buffer */
|
||||
|
||||
@@ -85,6 +85,8 @@ lv_obj_t * lv_file_explorer_create(lv_obj_t * parent);
|
||||
* Set file_explorer
|
||||
* @param obj pointer to a label object
|
||||
* @param dir the dir from 'lv_file_explorer_dir_t' enum.
|
||||
* @param path path
|
||||
|
||||
*/
|
||||
void lv_file_explorer_set_quick_access_path(lv_obj_t * obj, lv_file_explorer_dir_t dir, const char * path);
|
||||
#endif
|
||||
|
||||
@@ -83,7 +83,7 @@ lv_obj_t * lv_ime_pinyin_create(lv_obj_t * parent);
|
||||
/**
|
||||
* Set the keyboard of Pinyin input method.
|
||||
* @param obj pointer to a Pinyin input method object
|
||||
* @param dict pointer to a Pinyin input method keyboard
|
||||
* @param kb pointer to a Pinyin input method keyboard
|
||||
*/
|
||||
void lv_ime_pinyin_set_keyboard(lv_obj_t * obj, lv_obj_t * kb);
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ typedef bool (*lv_imgfont_get_path_cb_t)(const lv_font_t * font, void * img_src,
|
||||
* Creates a image font with info parameter specified.
|
||||
* @param height font size
|
||||
* @param path_cb a function to get the image path name of character.
|
||||
* @param user_data pointer to user data
|
||||
* @return pointer to the new imgfont or NULL if create error.
|
||||
*/
|
||||
lv_font_t * lv_imgfont_create(uint16_t height, lv_imgfont_get_path_cb_t path_cb, void * user_data);
|
||||
|
||||
@@ -32,8 +32,10 @@ typedef struct {
|
||||
|
||||
/**< Monkey execution period*/
|
||||
struct {
|
||||
//! @cond Doxygen_Suppress
|
||||
uint32_t min;
|
||||
uint32_t max;
|
||||
//! @endcond
|
||||
} period_range;
|
||||
|
||||
/**< The range of input value*/
|
||||
|
||||
@@ -74,7 +74,7 @@ void lv_msg_unsubscribe(void * s);
|
||||
/**
|
||||
* Send a message with a given ID and payload
|
||||
* @param msg_id ID of the message to send
|
||||
* @param data pointer to the data to send
|
||||
* @param payload pointer to the data to send
|
||||
*/
|
||||
void lv_msg_send(lv_msg_id_t msg_id, const void * payload);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ uint32_t lv_snapshot_buf_size_needed(lv_obj_t * obj, lv_color_format_t cf);
|
||||
* @param obj The object to generate snapshot.
|
||||
* @param cf color format for generated image.
|
||||
* @param dsc image descriptor to store the image result.
|
||||
* @param buff the buffer to store image data.
|
||||
* @param buf the buffer to store image data.
|
||||
* @param buff_size provided buffer size in bytes.
|
||||
*
|
||||
* @return LV_RES_OK on success, LV_RES_INV on error.
|
||||
|
||||
@@ -96,7 +96,7 @@ void lv_led_toggle(lv_obj_t * led);
|
||||
|
||||
/**
|
||||
* Get the brightness of a LED object
|
||||
* @param led pointer to LED object
|
||||
* @param obj pointer to LED object
|
||||
* @return bright 0 (max. dark) ... 255 (max. light)
|
||||
*/
|
||||
uint8_t lv_led_get_brightness(const lv_obj_t * obj);
|
||||
|
||||
Reference in New Issue
Block a user