
From: Simon Glass <sjg@chromium.org> So far expo only supports user interaction with a keyboard. This is the common case, but for PC devices it is typical to have a mouse or touchpad available as well. Particularly for the configuration editor, these devices are often more convenient for selecting options than moving up and down with with the keyboard. This series adds mouse support to expo, providing a function to process a click similar to processing of a keypress. The core of this is a new expo_send_click() function. Within scenes, the logic to search for objects by and x and y position is provided. As with keypresses, expo provides clear separation between the processing of a click (which may or may not produce an action) and the handling of that action. This allows expo to be used within an existing event loop. Expo uses a mouse by default if available. This series also includes a few other minor improvements, including some code tidy-ups and support for filled boxes. Simon Glass (23): video: Provide a few Ubuntu fonts video: Support drawing filled boxes expo: Guard against a crash in scene_textline_calc_dims() expo: Support boxes fully test: video: Provide an easy way to watch video tests expo: Tidy up a few key-related comments expo: Add comments for enum bootmenu_id_t expo: Provide a way to enable the mouse expo: Tidy up image position with the menu expo: test: Move expo creation into a separate function expo: Provide a way to check if a position is within a menu expo: Allow checking if a position is within a textline expo: Tidy up comments for enum expoact_type expo: Add three new actions for mouse events expo: Support sending a click to a menu expo: Support sending a click to a scene expo: Support sending a click to an expo expo: Refactor expo_poll() to separate out key handling expo: Check the mouse when polling expo: Enable the mouse when available expo: Add a test helper for clicking on objects expo: Provide a test of cedit mouse behaviour expo: Provide a test of expo mouse behaviour arch/sandbox/dts/cedit.dtsi | 13 ++ boot/bootflow_internal.h | 14 +- boot/bootflow_menu.c | 4 +- boot/cedit.c | 23 +++ boot/expo.c | 85 ++++++++- boot/expo_build.c | 30 ++++ boot/scene.c | 248 ++++++++++++++++++++++++++- boot/scene_internal.h | 80 ++++++++- boot/scene_menu.c | 77 ++++++++- boot/scene_textline.c | 13 +- doc/develop/expo.rst | 16 ++ drivers/video/console_truetype.c | 8 + drivers/video/fonts/Kconfig | 32 +++- drivers/video/fonts/Makefile | 2 + drivers/video/fonts/ubuntu_bold.ttf | Bin 0 -> 270164 bytes drivers/video/fonts/ubuntu_light.ttf | Bin 0 -> 362552 bytes drivers/video/video-uclass.c | 27 +-- include/expo.h | 60 ++++++- include/test/cedit-test.h | 5 +- include/video.h | 3 +- test/boot/Makefile | 4 +- test/boot/cedit.c | 108 +++++++++++- test/boot/expo.c | 240 ++++++++++++++++++++++++-- test/boot/expo_common.c | 24 +++ test/boot/expo_common.h | 33 ++++ test/dm/video.c | 22 ++- 26 files changed, 1109 insertions(+), 62 deletions(-) create mode 100644 drivers/video/fonts/ubuntu_bold.ttf create mode 100644 drivers/video/fonts/ubuntu_light.ttf create mode 100644 test/boot/expo_common.c create mode 100644 test/boot/expo_common.h -- 2.43.0 base-commit: adb7fe6f5bb8f837020ac8de96646f19fbc65eaf branch: apf