blob: 851d8e83564a9933af7442b109d7a00e5226330c [file] [log] [blame]
Simon Glass040b0462023-08-14 16:40:25 -06001/* 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
10struct expo;
Simon Glass8d0f8902023-08-14 16:40:27 -060011struct scene;
Simon Glass040b0462023-08-14 16:40:25 -060012struct 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 */
22int 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 */
32int cedit_run(struct expo *exp);
33
Simon Glass8d0f8902023-08-14 16:40:27 -060034/**
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 */
45int cedit_prepare(struct expo *exp, struct video_priv **vid_privp,
46 struct scene **scnp);
47
Simon Glass040b0462023-08-14 16:40:25 -060048#endif /* __CEDIT_H */