Skip to content

Commit

Permalink
Adapt for the updated LVGL submodules.
Browse files Browse the repository at this point in the history
  • Loading branch information
MouriNaruto committed Dec 19, 2023
1 parent 82b90cb commit c042c66
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 48 deletions.
88 changes: 64 additions & 24 deletions LvglWindowsDesktopApplication/lv_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#ifndef LV_CONF_H
#define LV_CONF_H

#include <stdint.h>

/*====================
COLOR SETTINGS
*====================*/
Expand All @@ -38,8 +36,8 @@
* - LV_STDLIB_CUSTOM: Implement the functions externally
*/
#define LV_USE_STDLIB_MALLOC LV_STDLIB_CLIB
#define LV_USE_STDLIB_STRING LV_STDLIB_BUILTIN
#define LV_USE_STDLIB_SPRINTF LV_STDLIB_BUILTIN
#define LV_USE_STDLIB_STRING LV_STDLIB_CLIB
#define LV_USE_STDLIB_SPRINTF LV_STDLIB_CLIB


#if LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
Expand Down Expand Up @@ -79,9 +77,6 @@
/*Align the start address of draw_buf addresses to this bytes*/
#define LV_DRAW_BUF_ALIGN 4

/* Max. memory to be used for layers */
#define LV_LAYER_MAX_MEMORY_USAGE 150 /*[kB]*/

#define LV_USE_DRAW_SW 1
#if LV_USE_DRAW_SW == 1
/* Set the number of draw unit.
Expand Down Expand Up @@ -127,6 +122,23 @@
/* Use NXP's PXP on iMX RTxxx platforms. */
#define LV_USE_DRAW_PXP 0

/* Use Renesas Dave2D on RA platforms. */
#define LV_USE_DRAW_DAVE2D 0

/* Draw using cached SDL textures*/
#define LV_USE_DRAW_SDL 0

/* Use VG-Lite GPU. */
#define LV_USE_DRAW_VG_LITE 0

#if LV_USE_DRAW_VG_LITE
/* Enbale VG-Lite custom external 'gpu_init()' function */
#define LV_VG_LITE_USE_GPU_INIT 0

/* Enable VG-Lite assert. */
#define LV_VG_LITE_USE_ASSERT 0
#endif

/*=================
* OPERATING SYSTEM
*=================*/
Expand Down Expand Up @@ -438,9 +450,9 @@

#define LV_USE_BAR 1

#define LV_USE_BTN 1
#define LV_USE_BUTTON 1

#define LV_USE_BTNMATRIX 1
#define LV_USE_BUTTONMATRIX 1

#define LV_USE_CALENDAR 1
#if LV_USE_CALENDAR
Expand All @@ -464,16 +476,17 @@

#define LV_USE_DROPDOWN 1 /*Requires: lv_label*/

#define LV_USE_IMG 1 /*Requires: lv_label*/
#define LV_USE_IMAGE 1 /*Requires: lv_label*/

#define LV_USE_IMGBTN 1
#define LV_USE_IMAGEBUTTON 1

#define LV_USE_KEYBOARD 1

#define LV_USE_LABEL 1
#if LV_USE_LABEL
#define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/
#define LV_LABEL_LONG_TXT_HINT 1 /*Store some extra info in labels to speed up drawing of very long texts*/
#define LV_LABEL_WAIT_CHAR_COUNT 3 /*The count of wait chart*/
#endif

#define LV_USE_LED 1
Expand Down Expand Up @@ -538,7 +551,7 @@
#endif /*LV_USE_THEME_DEFAULT*/

/*A very simple theme that is a good starting point for a custom theme*/
#define LV_USE_THEME_BASIC 1
#define LV_USE_THEME_SIMPLE 1

/*A theme designed for monochrome displays*/
#define LV_USE_THEME_MONO 1
Expand Down Expand Up @@ -615,11 +628,16 @@

/*GIF decoder library*/
#define LV_USE_GIF 0
#if LV_USE_GIF
/*GIF decoder accelerate*/
#define LV_GIF_CACHE_DECODE_DATA 0
#endif


/*Decode bin images to RAM*/
#define LV_BIN_DECODER_RAM_LOAD 0

/*RLE decoder library*/
/*RLE decompress library*/
#define LV_USE_RLE 0

/*QR code library*/
Expand All @@ -631,21 +649,23 @@
/*FreeType library*/
#define LV_USE_FREETYPE 0
#if LV_USE_FREETYPE
/*Memory used by FreeType to cache characters [bytes]*/
#define LV_FREETYPE_CACHE_SIZE (64 * 1024)
/*Memory used by FreeType to cache characters in kilobytes*/
#define LV_FREETYPE_CACHE_SIZE 768

/*Let FreeType to use LVGL memory and file porting*/
#define LV_FREETYPE_USE_LVGL_PORT 0

/* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */
/* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */
/* if font size >= 256, must be configured as image cache */
#define LV_FREETYPE_SBIT_CACHE 0
/*FreeType cache type:
* LV_FREETYPE_CACHE_TYPE_IMAGE - Image cache
* LV_FREETYPE_CACHE_TYPE_SBIT - Sbit cache
* LV_FREETYPE_CACHE_TYPE_OUTLINE - Outline cache*/
#define LV_FREETYPE_CACHE_TYPE LV_FREETYPE_CACHE_TYPE_IMAGE

/* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */
/* (0:use system defaults) */
#define LV_FREETYPE_CACHE_FT_FACES 4
#define LV_FREETYPE_CACHE_FT_SIZES 4
#define LV_FREETYPE_CACHE_FT_FACES 8
#define LV_FREETYPE_CACHE_FT_SIZES 8
#define LV_FREETYPE_CACHE_FT_OUTLINES 256
#endif

/* Built-in TTF decoder */
Expand All @@ -667,6 +687,15 @@
/* Enable ThorVG by assuming that its installed and linked to the project */
#define LV_USE_THORVG_EXTERNAL 0

/*Enable LZ4 compress/decompress lib*/
#define LV_USE_LZ4 0

/*Use lvgl built-in LZ4 lib*/
#define LV_USE_LZ4_INTERNAL 0

/*Use external LZ4 library*/
#define LV_USE_LZ4_EXTERNAL 0

/*FFmpeg library for image decoding and playing videos
*Supports all major image formats so do not enable other image decoder with it*/
#define LV_USE_FFMPEG 0
Expand All @@ -683,7 +712,7 @@
#define LV_USE_SNAPSHOT 0

/*1: Enable system monitor component*/
#define LV_USE_SYSMON 1
#define LV_USE_SYSMON (LV_USE_MEM_MONITOR | LV_USE_PERF_MONITOR)

/*1: Enable the runtime performance profiler*/
#define LV_USE_PROFILER 0
Expand Down Expand Up @@ -748,7 +777,7 @@
#define LV_IME_PINYIN_USE_K9_MODE 1
#if LV_IME_PINYIN_USE_K9_MODE == 1
#define LV_IME_PINYIN_K9_CAND_TEXT_NUM 3
#endif // LV_IME_PINYIN_USE_K9_MODE
#endif /*LV_IME_PINYIN_USE_K9_MODE*/
#endif

/*1: Enable file explorer*/
Expand All @@ -771,11 +800,22 @@
#if LV_USE_SDL
#define LV_SDL_INCLUDE_PATH <SDL2/SDL.h>
#define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT /*LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance*/
#define LV_SDL_BUF_COUNT 1 /*1 or 2*/
#define LV_SDL_BUF_COUNT 1 /*1 or 2*/
#define LV_SDL_FULLSCREEN 0 /*1: Make the window full screen by default*/
#define LV_SDL_DIRECT_EXIT 1 /*1: Exit the application when all SDL windows are closed*/
#endif

/*Use X11 to open window on Linux desktop and handle mouse and keyboard*/
#define LV_USE_X11 0
#if LV_USE_X11
#define LV_X11_DIRECT_EXIT 1 /*Exit the application when all X11 windows have been closed*/
#define LV_X11_DOUBLE_BUFFER 1 /*Use double buffers for endering*/
/*select only 1 of the following render modes (LV_X11_RENDER_MODE_PARTIAL preferred!)*/
#define LV_X11_RENDER_MODE_PARTIAL 1 /*Partial render mode (preferred)*/
#define LV_X11_RENDER_MODE_DIRECT 0 /*direct render mode*/
#define LV_X11_RENDER_MODE_FULL 0 /*Full render mode*/
#endif

/*Driver for /dev/fb*/
#define LV_USE_LINUX_FBDEV 0
#if LV_USE_LINUX_FBDEV
Expand Down
Loading

0 comments on commit c042c66

Please sign in to comment.