blob: f7febe1c9ae720652dcfc9632126b82270995840 [file] [log] [blame]
Simon Glass87c6f8a2023-01-06 08:52:36 -06001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2022 Google LLC
4 * Written by Simon Glass <sjg@chromium.org>
5 */
6
7#ifndef __SCENE_H
8#define __SCENE_H
9
Simon Glass2e593892023-06-01 10:22:53 -060010#include <dm/ofnode_decl.h>
Simon Glass87c6f8a2023-01-06 08:52:36 -060011#include <linux/list.h>
12
13struct udevice;
14
15/**
16 * enum expoact_type - types of actions reported by the expo
17 *
18 * @EXPOACT_NONE: no action
Simon Glass4e64bee2023-06-01 10:22:59 -060019 * @EXPOACT_POINT_OBJ: object was highlighted (@id indicates which)
Simon Glass3f33b9c2023-06-01 10:22:56 -060020 * @EXPOACT_POINT_ITEM: menu item was highlighted (@id indicates which)
Simon Glass87c6f8a2023-01-06 08:52:36 -060021 * @EXPOACT_SELECT: menu item was selected (@id indicates which)
Simon Glass4e64bee2023-06-01 10:22:59 -060022 * @EXPOACT_OPEN: menu was opened, so an item can be selected (@id indicates
23 * which menu object)
24 * @EXPOACT_CLOSE: menu was closed (@id indicates which menu object)
Simon Glass87c6f8a2023-01-06 08:52:36 -060025 * @EXPOACT_QUIT: request to exit the menu
26 */
27enum expoact_type {
28 EXPOACT_NONE,
Simon Glass4e64bee2023-06-01 10:22:59 -060029 EXPOACT_POINT_OBJ,
Simon Glass3f33b9c2023-06-01 10:22:56 -060030 EXPOACT_POINT_ITEM,
Simon Glass87c6f8a2023-01-06 08:52:36 -060031 EXPOACT_SELECT,
Simon Glass4e64bee2023-06-01 10:22:59 -060032 EXPOACT_OPEN,
33 EXPOACT_CLOSE,
Simon Glass87c6f8a2023-01-06 08:52:36 -060034 EXPOACT_QUIT,
35};
36
37/**
38 * struct expo_action - an action report by the expo
39 *
40 * @type: Action type (EXPOACT_NONE if there is no action)
Simon Glass3f33b9c2023-06-01 10:22:56 -060041 * @select: Used for EXPOACT_POINT_ITEM and EXPOACT_SELECT
Simon Glass87c6f8a2023-01-06 08:52:36 -060042 * @id: ID number of the object affected.
43 */
44struct expo_action {
45 enum expoact_type type;
46 union {
47 struct {
48 int id;
49 } select;
50 };
51};
52
53/**
Simon Glass2e593892023-06-01 10:22:53 -060054 * struct expo_theme - theme for the expo
55 *
56 * @font_size: Default font size for all text
57 * @menu_inset: Inset width (on each side and top/bottom) for menu items
58 * @menuitem_gap_y: Gap between menu items in pixels
59 */
60struct expo_theme {
61 u32 font_size;
62 u32 menu_inset;
63 u32 menuitem_gap_y;
64};
65
66/**
Simon Glass87c6f8a2023-01-06 08:52:36 -060067 * struct expo - information about an expo
68 *
69 * A group of scenes which can be presented to the user, typically to obtain
70 * input or to make a selection.
71 *
72 * @name: Name of the expo (allocated)
73 * @display: Display to use (`UCLASS_VIDEO`), or NULL to use text mode
Simon Glass42b18492023-06-01 10:22:34 -060074 * @cons: Console to use (`UCLASS_VIDEO_CONSOLE`), or NULL to use text mode
Simon Glass87c6f8a2023-01-06 08:52:36 -060075 * @scene_id: Current scene ID (0 if none)
76 * @next_id: Next ID number to use, for automatic allocation
77 * @action: Action selected by user. At present only one is supported, with the
78 * type set to EXPOACT_NONE if there is no action
79 * @text_mode: true to use text mode for the menu (no vidconsole)
Simon Glassd3db0212023-06-01 10:22:55 -060080 * @popup: true to use popup menus, instead of showing all items
Simon Glass87c6f8a2023-01-06 08:52:36 -060081 * @priv: Private data for the controller
Simon Glass2e593892023-06-01 10:22:53 -060082 * @theme: Information about fonts styles, etc.
Simon Glass87c6f8a2023-01-06 08:52:36 -060083 * @scene_head: List of scenes
84 * @str_head: list of strings
85 */
86struct expo {
87 char *name;
88 struct udevice *display;
Simon Glass42b18492023-06-01 10:22:34 -060089 struct udevice *cons;
Simon Glass87c6f8a2023-01-06 08:52:36 -060090 uint scene_id;
91 uint next_id;
92 struct expo_action action;
93 bool text_mode;
Simon Glassd3db0212023-06-01 10:22:55 -060094 bool popup;
Simon Glass87c6f8a2023-01-06 08:52:36 -060095 void *priv;
Simon Glass2e593892023-06-01 10:22:53 -060096 struct expo_theme theme;
Simon Glass87c6f8a2023-01-06 08:52:36 -060097 struct list_head scene_head;
98 struct list_head str_head;
99};
100
101/**
102 * struct expo_string - a string that can be used in an expo
103 *
104 * @id: ID number of the string
105 * @str: String
106 * @sibling: Node to link this object to its siblings
107 */
108struct expo_string {
109 uint id;
110 const char *str;
111 struct list_head sibling;
112};
113
114/**
115 * struct scene - information about a scene in an expo
116 *
117 * A collection of text/image/menu items in an expo
118 *
119 * @expo: Expo this scene is part of
120 * @name: Name of the scene (allocated)
121 * @id: ID number of the scene
Simon Glassdef898c2023-06-01 10:22:27 -0600122 * @title_id: String ID of title of the scene (allocated)
Simon Glassd3db0212023-06-01 10:22:55 -0600123 * @highlight_id: ID of highlighted object, if any
Simon Glass87c6f8a2023-01-06 08:52:36 -0600124 * @sibling: Node to link this scene to its siblings
125 * @obj_head: List of objects in the scene
126 */
127struct scene {
128 struct expo *expo;
129 char *name;
130 uint id;
Simon Glassdef898c2023-06-01 10:22:27 -0600131 uint title_id;
Simon Glassd3db0212023-06-01 10:22:55 -0600132 uint highlight_id;
Simon Glass87c6f8a2023-01-06 08:52:36 -0600133 struct list_head sibling;
134 struct list_head obj_head;
135};
136
137/**
138 * enum scene_obj_t - type of a scene object
139 *
140 * @SCENEOBJT_NONE: Used to indicate that the type does not matter
141 * @SCENEOBJT_IMAGE: Image data to render
142 * @SCENEOBJT_TEXT: Text line to render
143 * @SCENEOBJT_MENU: Menu containing items the user can select
144 */
145enum scene_obj_t {
146 SCENEOBJT_NONE = 0,
147 SCENEOBJT_IMAGE,
148 SCENEOBJT_TEXT,
149 SCENEOBJT_MENU,
150};
151
152/**
Simon Glassae45d6c2023-06-01 10:22:49 -0600153 * struct scene_dim - Dimensions of an object
154 *
155 * @x: x position, in pixels from left side
156 * @y: y position, in pixels from top
157 * @w: width, in pixels
158 * @h: height, in pixels
159 */
160struct scene_dim {
161 int x;
162 int y;
163 int w;
164 int h;
165};
166
167/**
Simon Glassce72c9e2023-06-01 10:22:50 -0600168 * enum scene_obj_flags_t - flags for objects
169 *
170 * @SCENEOF_HIDE: object should be hidden
Simon Glassd3db0212023-06-01 10:22:55 -0600171 * @SCENEOF_POINT: object should be highlighted
172 * @SCENEOF_OPEN: object should be opened (e.g. menu is opened so that an option
173 * can be selected)
Simon Glassce72c9e2023-06-01 10:22:50 -0600174 */
175enum scene_obj_flags_t {
176 SCENEOF_HIDE = 1 << 0,
Simon Glassd3db0212023-06-01 10:22:55 -0600177 SCENEOF_POINT = 1 << 1,
178 SCENEOF_OPEN = 1 << 2,
Simon Glassce72c9e2023-06-01 10:22:50 -0600179};
180
181/**
Simon Glass87c6f8a2023-01-06 08:52:36 -0600182 * struct scene_obj - information about an object in a scene
183 *
184 * @scene: Scene that this object relates to
185 * @name: Name of the object (allocated)
186 * @id: ID number of the object
187 * @type: Type of this object
Simon Glassae45d6c2023-06-01 10:22:49 -0600188 * @dim: Dimensions for this object
Simon Glassce72c9e2023-06-01 10:22:50 -0600189 * @flags: Flags for this object
Simon Glass87c6f8a2023-01-06 08:52:36 -0600190 * @sibling: Node to link this object to its siblings
191 */
192struct scene_obj {
193 struct scene *scene;
194 char *name;
195 uint id;
196 enum scene_obj_t type;
Simon Glassae45d6c2023-06-01 10:22:49 -0600197 struct scene_dim dim;
Simon Glassce72c9e2023-06-01 10:22:50 -0600198 int flags;
Simon Glass87c6f8a2023-01-06 08:52:36 -0600199 struct list_head sibling;
200};
201
202/**
203 * struct scene_obj_img - information about an image object in a scene
204 *
205 * This is a rectangular image which is blitted onto the display
206 *
207 * @obj: Basic object information
208 * @data: Image data in BMP format
209 */
210struct scene_obj_img {
211 struct scene_obj obj;
212 char *data;
213};
214
215/**
216 * struct scene_obj_txt - information about a text object in a scene
217 *
218 * This is a single-line text object
219 *
220 * @obj: Basic object information
221 * @str_id: ID of the text string to display
222 * @font_name: Name of font (allocated by caller)
223 * @font_size: Nominal size of font in pixels
224 */
225struct scene_obj_txt {
226 struct scene_obj obj;
227 uint str_id;
228 const char *font_name;
229 uint font_size;
230};
231
232/**
233 * struct scene_obj_menu - information about a menu object in a scene
234 *
235 * A menu has a number of items which can be selected by the user
236 *
237 * It also has:
238 *
239 * - a text/image object (@pointer_id) which points to the current item
240 * (@cur_item_id)
241 *
242 * - a preview object which shows an image related to the current item
243 *
244 * @obj: Basic object information
245 * @title_id: ID of the title text, or 0 if none
246 * @cur_item_id: ID of the current menu item, or 0 if none
247 * @pointer_id: ID of the object pointing to the current selection
248 * @item_head: List of items in the menu
249 */
250struct scene_obj_menu {
251 struct scene_obj obj;
252 uint title_id;
253 uint cur_item_id;
254 uint pointer_id;
255 struct list_head item_head;
256};
257
258/**
259 * enum scene_menuitem_flags_t - flags for menu items
260 *
261 * @SCENEMIF_GAP_BEFORE: Add a gap before this item
262 */
263enum scene_menuitem_flags_t {
264 SCENEMIF_GAP_BEFORE = 1 << 0,
265};
266
267/**
268 * struct scene_menitem - a menu item in a menu
269 *
270 * A menu item has:
271 *
272 * - text object holding the name (short) and description (can be longer)
273 * - a text object holding the keypress
274 *
275 * @name: Name of the item (this is allocated by this call)
276 * @id: ID number of the object
277 * @key_id: ID of text object to use as the keypress to show
278 * @label_id: ID of text object to use as the label text
279 * @desc_id: ID of text object to use as the description text
280 * @preview_id: ID of the preview object, or 0 if none
281 * @flags: Flags for this item
282 * @sibling: Node to link this item to its siblings
283 */
284struct scene_menitem {
285 char *name;
286 uint id;
287 uint key_id;
288 uint label_id;
289 uint desc_id;
290 uint preview_id;
291 uint flags;
292 struct list_head sibling;
293};
294
295/**
296 * expo_new() - create a new expo
297 *
298 * Allocates a new expo
299 *
300 * @name: Name of expo (this is allocated by this call)
301 * @priv: Private data for the controller
302 * @expp: Returns a pointer to the new expo on success
303 * Returns: 0 if OK, -ENOMEM if out of memory
304 */
305int expo_new(const char *name, void *priv, struct expo **expp);
306
307/**
308 * expo_destroy() - Destroy an expo and free all its memory
309 *
310 * @exp: Expo to destroy
311 */
312void expo_destroy(struct expo *exp);
313
314/**
Simon Glass9af34152023-06-01 10:22:47 -0600315 * expo_set_dynamic_start() - Set the start of the 'dynamic' IDs
316 *
317 * It is common for a set of 'static' IDs to be used to refer to objects in the
318 * expo. These typically use an enum so that they are defined in sequential
319 * order.
320 *
321 * Dynamic IDs (for objects not in the enum) are intended to be used for
322 * objects to which the code does not need to refer. These are ideally located
323 * above the static IDs.
324 *
325 * Use this function to set the start of the dynamic range, making sure that the
326 * value is higher than all the statically allocated IDs.
327 *
328 * @exp: Expo to update
329 * @dyn_start: Start ID that expo should use for dynamic allocation
330 */
331void expo_set_dynamic_start(struct expo *exp, uint dyn_start);
332
333/**
Simon Glass87c6f8a2023-01-06 08:52:36 -0600334 * expo_str() - add a new string to an expo
335 *
336 * @exp: Expo to update
337 * @name: Name to use (this is allocated by this call)
338 * @id: ID to use for the new object (0 to allocate one)
339 * @str: Pointer to text to display (allocated by caller)
340 * Returns: ID number for the object (typically @id), or -ve on error
341 */
342int expo_str(struct expo *exp, const char *name, uint id, const char *str);
343
344/**
345 * expo_get_str() - Get a string by ID
346 *
347 * @exp: Expo to use
348 * @id: String ID to look up
349 * @returns string, or NULL if not found
350 */
351const char *expo_get_str(struct expo *exp, uint id);
352
353/**
354 * expo_set_display() - set the display to use for a expo
355 *
356 * @exp: Expo to update
357 * @dev: Display to use (`UCLASS_VIDEO`), NULL to use text mode
358 * Returns: 0 (always)
359 */
360int expo_set_display(struct expo *exp, struct udevice *dev);
361
362/**
Simon Glass699b0ac2023-06-01 10:22:52 -0600363 * expo_calc_dims() - Calculate the dimensions of the objects
364 *
365 * Updates the width and height of all objects based on their contents
366 *
367 * @exp: Expo to update
368 * Returns 0 if OK, -ENOTSUPP if there is no graphical console
369 */
370int expo_calc_dims(struct expo *exp);
371
372/**
Simon Glass87c6f8a2023-01-06 08:52:36 -0600373 * expo_set_scene_id() - Set the current scene ID
374 *
375 * @exp: Expo to update
376 * @scene_id: New scene ID to use (0 to select no scene)
377 * Returns: 0 if OK, -ENOENT if there is no scene with that ID
378 */
379int expo_set_scene_id(struct expo *exp, uint scene_id);
380
381/**
382 * expo_render() - render the expo on the display / console
383 *
384 * @exp: Expo to render
385 *
386 * Returns: 0 if OK, -ECHILD if there is no current scene, -ENOENT if the
387 * current scene is not found, other error if something else goes wrong
388 */
389int expo_render(struct expo *exp);
390
391/**
Simon Glass5904d952023-06-01 10:22:37 -0600392 * expo_set_text_mode() - Controls whether the expo renders in text mode
Simon Glass87c6f8a2023-01-06 08:52:36 -0600393 *
394 * @exp: Expo to update
395 * @text_mode: true to use text mode, false to use the console
396 */
Simon Glass5904d952023-06-01 10:22:37 -0600397void expo_set_text_mode(struct expo *exp, bool text_mode);
Simon Glass87c6f8a2023-01-06 08:52:36 -0600398
399/**
400 * scene_new() - create a new scene in a expo
401 *
402 * The scene is given the ID @id which must be unique across all scenes, objects
403 * and items. The expo's @next_id is updated to at least @id + 1
404 *
405 * @exp: Expo to update
406 * @name: Name to use (this is allocated by this call)
407 * @id: ID to use for the new scene (0 to allocate one)
408 * @scnp: Returns a pointer to the new scene on success
409 * Returns: ID number for the scene (typically @id), or -ve on error
410 */
411int scene_new(struct expo *exp, const char *name, uint id, struct scene **scnp);
412
413/**
414 * expo_lookup_scene_id() - Look up a scene by ID
415 *
416 * @exp: Expo to check
417 * @scene_id: Scene ID to look up
418 * @returns pointer to scene if found, else NULL
419 */
420struct scene *expo_lookup_scene_id(struct expo *exp, uint scene_id);
421
422/**
Simon Glass756c9552023-06-01 10:22:57 -0600423 * scene_highlight_first() - Highlight the first item in a scene
424 *
425 * This highlights the first item, so that the user can see that it is pointed
426 * to
427 *
428 * @scn: Scene to update
429 */
430void scene_highlight_first(struct scene *scn);
431
432/**
433 * scene_set_highlight_id() - Set the object which is highlighted
434 *
435 * Sets a new object to highlight in the scene
436 *
437 * @scn: Scene to update
438 * @id: ID of object to highlight
439 */
440void scene_set_highlight_id(struct scene *scn, uint id);
441
442/**
443 * scene_set_open() - Set whether an item is open or not
444 *
445 * @scn: Scene to update
446 * @id: ID of object to update
447 * @open: true to open the object, false to close it
448 * Returns: 0 if OK, -ENOENT if @id is invalid
449 */
450int scene_set_open(struct scene *scn, uint id, bool open);
451
452/**
Simon Glass87c6f8a2023-01-06 08:52:36 -0600453 * scene_title_set() - set the scene title
454 *
455 * @scn: Scene to update
Simon Glassdef898c2023-06-01 10:22:27 -0600456 * @title_id: Title ID to set
457 * Returns: 0 if OK
Simon Glass87c6f8a2023-01-06 08:52:36 -0600458 */
Simon Glassdef898c2023-06-01 10:22:27 -0600459int scene_title_set(struct scene *scn, uint title_id);
Simon Glass87c6f8a2023-01-06 08:52:36 -0600460
461/**
462 * scene_obj_count() - Count the number of objects in a scene
463 *
464 * @scn: Scene to check
465 * Returns: number of objects in the scene, 0 if none
466 */
467int scene_obj_count(struct scene *scn);
468
469/**
470 * scene_img() - add a new image to a scene
471 *
472 * @scn: Scene to update
473 * @name: Name to use (this is allocated by this call)
474 * @id: ID to use for the new object (0 to allocate one)
475 * @data: Pointer to image data
476 * @imgp: If non-NULL, returns the new object
477 * Returns: ID number for the object (typically @id), or -ve on error
478 */
479int scene_img(struct scene *scn, const char *name, uint id, char *data,
480 struct scene_obj_img **imgp);
481
482/**
483 * scene_txt() - add a new text object to a scene
484 *
485 * @scn: Scene to update
486 * @name: Name to use (this is allocated by this call)
487 * @id: ID to use for the new object (0 to allocate one)
488 * @str_id: ID of the string to use
489 * @txtp: If non-NULL, returns the new object
490 * Returns: ID number for the object (typically @id), or -ve on error
491 */
492int scene_txt(struct scene *scn, const char *name, uint id, uint str_id,
493 struct scene_obj_txt **txtp);
494
495/**
496 * scene_txt_str() - add a new string to expr and text object to a scene
497 *
498 * @scn: Scene to update
499 * @name: Name to use (this is allocated by this call)
500 * @id: ID to use for the new object (0 to allocate one)
501 * @str_id: ID of the string to use
502 * @str: Pointer to text to display (allocated by caller)
503 * @txtp: If non-NULL, returns the new object
504 * Returns: ID number for the object (typically @id), or -ve on error
505 */
506int scene_txt_str(struct scene *scn, const char *name, uint id, uint str_id,
507 const char *str, struct scene_obj_txt **txtp);
508
509/**
510 * scene_menu() - create a menu
511 *
512 * @scn: Scene to update
513 * @name: Name to use (this is allocated by this call)
514 * @id: ID to use for the new object (0 to allocate one)
515 * @menup: If non-NULL, returns the new object
516 * Returns: ID number for the object (typically @id), or -ve on error
517 */
518int scene_menu(struct scene *scn, const char *name, uint id,
519 struct scene_obj_menu **menup);
520
521/**
522 * scene_txt_set_font() - Set the font for an object
523 *
524 * @scn: Scene to update
525 * @id: ID of object to update
526 * @font_name: Font name to use (allocated by caller)
527 * @font_size: Font size to use (nominal height in pixels)
528 */
529int scene_txt_set_font(struct scene *scn, uint id, const char *font_name,
530 uint font_size);
531
532/**
533 * scene_obj_set_pos() - Set the postion of an object
534 *
535 * @scn: Scene to update
536 * @id: ID of object to update
537 * @x: x position, in pixels from left side
538 * @y: y position, in pixels from top
539 * Returns: 0 if OK, -ENOENT if @id is invalid
540 */
541int scene_obj_set_pos(struct scene *scn, uint id, int x, int y);
542
543/**
Simon Glass699b0ac2023-06-01 10:22:52 -0600544 * scene_obj_set_size() - Set the size of an object
545 *
546 * @scn: Scene to update
547 * @id: ID of object to update
548 * @w: width in pixels
549 * @h: height in pixels
550 * Returns: 0 if OK, -ENOENT if @id is invalid
551 */
552int scene_obj_set_size(struct scene *scn, uint id, int w, int h);
553
554/**
Simon Glass87c6f8a2023-01-06 08:52:36 -0600555 * scene_obj_set_hide() - Set whether an object is hidden
556 *
557 * The update happens when the expo is next rendered.
558 *
559 * @scn: Scene to update
560 * @id: ID of object to update
561 * @hide: true to hide the object, false to show it
562 * Returns: 0 if OK, -ENOENT if @id is invalid
563 */
564int scene_obj_set_hide(struct scene *scn, uint id, bool hide);
565
566/**
567 * scene_menu_set_title() - Set the title of a menu
568 *
569 * @scn: Scene to update
570 * @id: ID of menu object to update
571 * @title_id: ID of text object to use as the title
572 * Returns: 0 if OK, -ENOENT if @id is invalid, -EINVAL if @title_id is invalid
573 */
574int scene_menu_set_title(struct scene *scn, uint id, uint title_id);
575
576/**
577 * scene_menu_set_pointer() - Set the item pointer for a menu
578 *
579 * This is a visual indicator of the current item, typically a ">" character
580 * which sits next to the current item and moves when the user presses the
581 * up/down arrow keys
582 *
583 * @scn: Scene to update
584 * @id: ID of menu object to update
585 * @cur_item_id: ID of text or image object to use as a pointer to the current
586 * item
587 * Returns: 0 if OK, -ENOENT if @id is invalid, -EINVAL if @cur_item_id is invalid
588 */
589int scene_menu_set_pointer(struct scene *scn, uint id, uint cur_item_id);
590
591/**
592 * scene_obj_get_hw() - Get width and height of an object in a scene
593 *
594 * @scn: Scene to check
595 * @id: ID of menu object to check
596 * @widthp: If non-NULL, returns width of object in pixels
597 * Returns: Height of object in pixels
598 */
599int scene_obj_get_hw(struct scene *scn, uint id, int *widthp);
600
601/**
602 * scene_menuitem() - Add an item to a menu
603 *
604 * @scn: Scene to update
605 * @menu_id: ID of menu object to update
606 * @name: Name to use (this is allocated by this call)
607 * @id: ID to use for the new object (0 to allocate one)
608 * @key_id: ID of text object to use as the keypress to show
609 * @label_id: ID of text object to use as the label text
610 * @desc_id: ID of text object to use as the description text
611 * @preview_id: ID of object to use as the preview (text or image)
612 * @flags: Flags for this item (enum scene_menuitem_flags_t)
613 * @itemp: If non-NULL, returns the new object
614 * Returns: ID number for the item (typically @id), or -ve on error
615 */
616int scene_menuitem(struct scene *scn, uint menu_id, const char *name, uint id,
617 uint key_id, uint label_id, uint desc_id, uint preview_id,
618 uint flags, struct scene_menitem **itemp);
619
620/**
621 * scene_arrange() - Arrange the scene to deal with object sizes
622 *
623 * Updates any menus in the scene so that their objects are in the right place.
624 *
625 * @scn: Scene to arrange
626 * Returns: 0 if OK, -ve on error
627 */
628int scene_arrange(struct scene *scn);
629
630/**
631 * expo_send_key() - set a keypress to the expo
632 *
633 * @exp: Expo to receive the key
634 * @key: Key to send (ASCII or enum bootmenu_key)
635 * Returns: 0 if OK, -ECHILD if there is no current scene
636 */
637int expo_send_key(struct expo *exp, int key);
638
639/**
640 * expo_action_get() - read user input from the expo
641 *
642 * @exp: Expo to check
643 * @act: Returns action
644 * Returns: 0 if OK, -EAGAIN if there was no action to return
645 */
646int expo_action_get(struct expo *exp, struct expo_action *act);
647
Simon Glass2e593892023-06-01 10:22:53 -0600648/**
649 * expo_apply_theme() - Apply a theme to an expo
650 *
651 * @exp: Expo to update
652 * @node: Node containing the theme
653 */
654int expo_apply_theme(struct expo *exp, ofnode node);
655
Simon Glass87c6f8a2023-01-06 08:52:36 -0600656#endif /*__SCENE_H */