Simon Glass | 8df4a4e | 2023-08-14 16:40:25 -0600 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright 2023 Google LLC |
| 4 | * Written by Simon Glass <sjg@chromium.org> |
| 5 | */ |
| 6 | |
| 7 | #ifndef __CEDIT_H |
| 8 | #define __CEDIT_H |
| 9 | |
| 10 | struct expo; |
Simon Glass | 6a5af5f | 2023-08-14 16:40:27 -0600 | [diff] [blame] | 11 | struct scene; |
Simon Glass | 8df4a4e | 2023-08-14 16:40:25 -0600 | [diff] [blame] | 12 | struct video_priv; |
| 13 | |
| 14 | /** |
| 15 | * cedit_arange() - Arrange objects in a configuration-editor scene |
| 16 | * |
| 17 | * @exp: Expo to update |
| 18 | * @vid_priv: Private info of the video device |
| 19 | * @scene_id: scene ID to arrange |
| 20 | * Returns: 0 if OK, -ve on error |
| 21 | */ |
| 22 | int cedit_arange(struct expo *exp, struct video_priv *vid_priv, uint scene_id); |
| 23 | |
| 24 | /** |
| 25 | * cedit_run() - Run a configuration editor |
| 26 | * |
| 27 | * This accepts input until the user quits with Escape |
| 28 | * |
| 29 | * @exp: Expo to use |
| 30 | * Returns: 0 if OK, -ve on error |
| 31 | */ |
| 32 | int cedit_run(struct expo *exp); |
| 33 | |
Simon Glass | 6a5af5f | 2023-08-14 16:40:27 -0600 | [diff] [blame] | 34 | /** |
| 35 | * cedit_prepare() - Prepare to run a cedit |
| 36 | * |
| 37 | * Set up the video device, select the first scene and highlight the first item. |
| 38 | * This ensures that all menus have a selected item. |
| 39 | * |
| 40 | * @exp: Expo to use |
| 41 | * @vid_privp: Set to private data for the video device |
| 42 | * @scnp: Set to the first scene |
| 43 | * Return: scene ID of first scene if OK, -ve on error |
| 44 | */ |
| 45 | int cedit_prepare(struct expo *exp, struct video_priv **vid_privp, |
| 46 | struct scene **scnp); |
| 47 | |
Simon Glass | 8df4a4e | 2023-08-14 16:40:25 -0600 | [diff] [blame] | 48 | #endif /* __CEDIT_H */ |