microui  14.5.1
microui
ui_configuration.h
Go to the documentation of this file.
1 /*
2  * Copyright 2024-2025 MicroEJ Corp. All rights reserved.
3  * MicroEJ Corp. PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  */
5 
12 #ifndef UI_CONFIGURATION_H
13 #define UI_CONFIGURATION_H
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 // -----------------------------------------------------------------------------
20 // Includes
21 // -----------------------------------------------------------------------------
22 
23 // Include VEE Port User configuration file
24 #if defined __has_include
25  #if __has_include("veeport_configuration.h")
26  #include "veeport_configuration.h"
27  #endif // __has_include("veeport_configuration.h")
28 #else
29 // Ensure 'veeport_configuration.h' exists in your project for custom configurations.
30  #include "veeport_configuration.h"
31 #endif // defined __has_include
32 
33 // -----------------------------------------------------------------------------
34 // MicroUI's Allocator Options
35 // -----------------------------------------------------------------------------
36 
41 #define UI_FEATURE_ALLOCATOR_GRAPHICS_ENGINE (0)
42 
48 #define UI_FEATURE_ALLOCATOR_BESTFIT (1)
49 
56 #define UI_FEATURE_ALLOCATOR_CUSTOM (2)
57 
58 // -----------------------------------------------------------------------------
59 // Display Buffer Refresh Strategy Options
60 // -----------------------------------------------------------------------------
61 
66 #define UI_FEATURE_BRS_LEGACY (0)
67 
78 #define UI_FEATURE_BRS_SINGLE (1)
79 
102 #define UI_FEATURE_BRS_PREDRAW (2)
103 
104 // -----------------------------------------------------------------------------
105 // MicroUI's Features Configuration
106 // -----------------------------------------------------------------------------
107 
111 #ifndef UI_DEBUG_PRINT
112 #include <stdio.h>
113 #define UI_DEBUG_PRINT (void)printf
114 #endif
115 
116 /*
117  * @brief Defines the number of rectangles that collections can contain.
118  */
119 #ifndef UI_RECT_COLLECTION_MAX_LENGTH
120 #define UI_RECT_COLLECTION_MAX_LENGTH (8u)
121 #endif
122 
126 #ifndef UI_FEATURE_ALLOCATOR
127 #define UI_FEATURE_ALLOCATOR (UI_FEATURE_ALLOCATOR_GRAPHICS_ENGINE)
128 #endif
129 
136 #ifndef UI_FEATURE_EVENT_DECODER
137 #define UI_FEATURE_EVENT_DECODER (0)
138 #endif
139 
140 #if (1 == UI_FEATURE_EVENT_DECODER)
141 
142 // header file created by MicroEJ Platform builder.
143 #include "microui_constants.h"
144 
154 #ifndef UI_EVENTDECODER_EVENTGEN_COMMAND
155 #define UI_EVENTDECODER_EVENTGEN_COMMAND MICROUI_EVENTGEN_COMMANDS
156 #endif
157 
167 #ifndef UI_EVENTDECODER_EVENTGEN_BUTTONS
168 #define UI_EVENTDECODER_EVENTGEN_BUTTONS MICROUI_EVENTGEN_BUTTONS
169 #endif
170 
181 #ifndef UI_EVENTDECODER_EVENTGEN_TOUCH
182 #define UI_EVENTDECODER_EVENTGEN_TOUCH MICROUI_EVENTGEN_TOUCH
183 #endif
184 
185 #endif // UI_FEATURE_EVENT_DECODER
186 
195 #ifndef UI_FEATURE_BRS
196 #define UI_FEATURE_BRS (UI_FEATURE_BRS_PREDRAW)
197 #endif
198 
209 #ifndef UI_FEATURE_BRS_DRAWING_BUFFER_COUNT
210 #define UI_FEATURE_BRS_DRAWING_BUFFER_COUNT (2u)
211 #endif
212 
230 #ifndef UI_FEATURE_BRS_FLUSH_SINGLE_RECTANGLE
231 #define UI_FEATURE_BRS_FLUSH_SINGLE_RECTANGLE (0)
232 #endif
233 
239 #ifndef UI_GC_SUPPORTED_FORMATS
240 #define UI_GC_SUPPORTED_FORMATS (1u)
241 #endif
242 
248 #ifndef UI_FEATURE_IMAGE_CUSTOM_FORMATS
249 #define UI_FEATURE_IMAGE_CUSTOM_FORMATS (0)
250 #endif
251 
257 #ifndef UI_FEATURE_FONT_CUSTOM_FORMATS
258 #define UI_FEATURE_FONT_CUSTOM_FORMATS (0)
259 #endif
260 
261 // --------------------------------------------------------------------------------
262 // EOF
263 // --------------------------------------------------------------------------------
264 
265 #ifdef __cplusplus
266 }
267 #endif
268 
269 #endif // UI_CONFIGURATION_H