aboutsummaryrefslogtreecommitdiff
path: root/boot/expo.c
Commit message (Collapse)AuthorAgeFilesLines
* expo: Correct background colourSimon Glass2023-11-141-1/+3
| | | | | | | Use the correct background colour when using white-on-black. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* expo: Provide a way to iterate through all scene objectsSimon Glass2023-08-251-0/+15
| | | | | | | For some operations it is necessary to process all objects in an expo. Provide an iterator to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Support building an expo from a description fileSimon Glass2023-07-141-0/+1
| | | | | | | | | | | | | | The only way to create an expo at present is by calling the functions to create each object. It is useful to have more data-driven approach, where the objects can be specified in a suitable file format and created from that. This makes testing easier as well. Add support for describing an expo in a devicetree node. This allows more complex tests to be set up, as well as providing an easier format for users. It also provides a better basis for the upcoming configuration editor. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Add spacing around menus and itemsSimon Glass2023-07-141-0/+2
| | | | | | | | | | It looks better if menus have a bit of an inset, rather than be drawn hard up against the background. Also, menu items look better if they have a bit of spacing between them. Add theme options for these and implement the required changes. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Draw the current opened menu on topSimon Glass2023-07-141-0/+12
| | | | | | | | | | | When a menu is opened, it must be displayed over all other objects in the scene, so that all its items are visible. Handle this by drawing the menu object a second time, after all other objects have been drawn. Draw all of the objects which are dependent on the menu object. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Support simple themesSimon Glass2023-07-141-0/+20
| | | | | | | | | | | It is a pain to manually set the fonts of all objects to be consistent. Some spacing settings are also better set globally than by manually positioning each object. Add a 'theme' to the expo, to hold this information. For now it includes only the font size. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Set up the width and height of objectsSimon Glass2023-07-141-0/+24
| | | | | | | | | | | Provide a way to set the full dimensions of objects, i.e. including the width and height. For menus, calculate the bounding box of all objects in the menu. Set all labels to be the same size, so that highlighting works correct, once implemented. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Allow setting the start of the dynamic-ID rangeSimon Glass2023-07-141-0/+15
| | | | | | | | Provide a way to set this value so that it is easy to separate the statically allocated IDs (generated by the caller) from those generated dynamically by expo itself. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add a separate log category for expoSimon Glass2023-07-141-0/+2
| | | | | | | | | This feature is different enough from bootstd that it probably deserves its own log category. It cannot use a uclass since it is not a device. Add a new category. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Rename exp_set_text_mode()Simon Glass2023-07-141-1/+1
| | | | | | Rename this function to match its peers, using the full "expo' prefix. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Avoid automatically arranging the sceneSimon Glass2023-07-141-1/+14
| | | | | | | | | This should ideally be done once after all scene changes have been made. Require an explicit call when everything is ready. Always arrange after a key it sent, just for convenience. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Store the console in the expoSimon Glass2023-07-141-0/+9
| | | | | | | Rather than finding this each time, keep a pointer to it. This simplifies the code a little. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Add basic implementationSimon Glass2023-01-161-0/+170
An expo is a way of presenting and collecting information from the user. It consists of a collection of 'scenes' of which only one is presented at a time. An expo is typically used to show a boot menu and allow settings to be changed. One created, the same expo can be automatically presented in graphical form using a vidconsole, or in text form on a serial console. Add an initial implementation of the expo itself. Supports for scenes and objects is provided later. Signed-off-by: Simon Glass <sjg@chromium.org>