Various improvements (#614)
- Auto-select widgets in Launcher and apps with toolbars on devices without touch. - Improved USB HID input reliability, cleanup - Updated PSRAM settings to improve boot stability on supported devices. - Prevented duplicate Wi-Fi event subscriptions during screen rebuilds. - Updated docs - Fixes in WifiManage and WifiConnect - Reduced main task stack size - Moved USB HID stack size to PSRAM when available - app_manager_find_manifest() now returns a copy instead of a pointer
This commit is contained in:
committed by
GitHub
parent
cc8be3faef
commit
d6b1d15e56
@@ -85,6 +85,26 @@ error_t window_manager_stop(void);
|
||||
*/
|
||||
typedef void (*WindowCreateWidgetsFn)(lv_obj_t* root, void* user_data);
|
||||
|
||||
/**
|
||||
* Called whenever this window's live widgets are about to be deleted while the window record
|
||||
* itself survives - i.e. its owning app is still running and may see this window resurface
|
||||
* later.
|
||||
* Always paired 1:1 with a prior @a create_widgets call that actually ran.
|
||||
* Never called for a window whose widgets were never built.
|
||||
* @param[in] user_data whatever was passed to window_manager_create_ext() for this window
|
||||
* @warning Called on the LVGL task with the LVGL lock already held (same as
|
||||
* WindowCreateWidgetsFn) - do NOT call window_manager_start()/stop()/create()/create_ext()/
|
||||
* remove() from this callback, that would deadlock.
|
||||
* @warning Do NOT acquire any other lock from this callback either. It runs while a thread
|
||||
* elsewhere may already be holding that lock and blocked waiting for the LVGL lock this
|
||||
* callback is running under - acquiring it here would deadlock against that thread. Only touch
|
||||
* memory that needs no other synchronization, e.g. null out this window's own cached
|
||||
* lv_obj_t* pointers (they're only ever otherwise touched under the LVGL lock anyway) so a
|
||||
* stale update arriving after this call can detect the window is gone instead of using freed
|
||||
* widgets.
|
||||
*/
|
||||
typedef void (*WindowDestroyWidgetsFn)(void* user_data);
|
||||
|
||||
/**
|
||||
* Creates a new window on top of the stack (last created = topmost). Deletes the previously
|
||||
* topmost window's widgets (if any) and builds this window's widgets immediately via
|
||||
@@ -97,6 +117,12 @@ typedef void (*WindowCreateWidgetsFn)(lv_obj_t* root, void* user_data);
|
||||
*/
|
||||
WindowId window_manager_create(AppInstanceId app_instance_id, WindowCreateWidgetsFn create_widgets, void* user_data);
|
||||
|
||||
/**
|
||||
* Same as window_manager_create(), but also registers @a destroy_widgets - see its docs.
|
||||
* @param[in] destroy_widgets may be NULL to opt out (equivalent to window_manager_create())
|
||||
*/
|
||||
WindowId window_manager_create_ext(AppInstanceId app_instance_id, WindowCreateWidgetsFn create_widgets, WindowDestroyWidgetsFn destroy_widgets, void* user_data);
|
||||
|
||||
/**
|
||||
* Removes a window, wherever it is in the stack - not necessarily the topmost one. If it was
|
||||
* topmost, its widgets are deleted and whichever window is now on top (if any) has its
|
||||
|
||||
Reference in New Issue
Block a user