lv_utils.h

Functions

void *lv_utils_bsearch(const void *key, const void *base, size_t n, size_t size, int (*cmp)(const void *pRef, const void *pElement))

Searches base[0] to base[n - 1] for an item that matches *key.

备注

The function cmp must return negative if it's first argument (the search key) is less that it's second (a table entry), zero if equal, and positive if greater.

备注

Items in the array must be in ascending order.

参数:
  • key -- Pointer to item being searched for

  • base -- Pointer to first element to search

  • n -- Number of elements

  • size -- Size of each element

  • cmp -- Pointer to comparison function (see #unicode_list_compare as a comparison function example)

返回:

a pointer to a matching item, or NULL if none exists.

lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path)

Save a draw buf to a file

参数:
  • draw_buf -- pointer to a draw buffer

  • path -- path to the file to save

返回:

LV_RESULT_OK: success; LV_RESULT_INVALID: error