expo: Split out cedit into its own header

Before adding more functions to this interface, create a new header for
the configuration editor.

Fix up the expo header guard while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2023-08-14 16:40:25 -06:00 committed by Tom Rini
parent 431b21fd40
commit 040b04685e
4 changed files with 38 additions and 24 deletions

View file

@ -7,6 +7,7 @@
*/ */
#include <common.h> #include <common.h>
#include <cedit.h>
#include <cli.h> #include <cli.h>
#include <dm.h> #include <dm.h>
#include <expo.h> #include <expo.h>

View file

@ -7,6 +7,7 @@
*/ */
#include <common.h> #include <common.h>
#include <cedit.h>
#include <command.h> #include <command.h>
#include <expo.h> #include <expo.h>
#include <fs.h> #include <fs.h>

33
include/cedit.h Normal file
View file

@ -0,0 +1,33 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright 2023 Google LLC
* Written by Simon Glass <sjg@chromium.org>
*/
#ifndef __CEDIT_H
#define __CEDIT_H
struct expo;
struct video_priv;
/**
* cedit_arange() - Arrange objects in a configuration-editor scene
*
* @exp: Expo to update
* @vid_priv: Private info of the video device
* @scene_id: scene ID to arrange
* Returns: 0 if OK, -ve on error
*/
int cedit_arange(struct expo *exp, struct video_priv *vid_priv, uint scene_id);
/**
* cedit_run() - Run a configuration editor
*
* This accepts input until the user quits with Escape
*
* @exp: Expo to use
* Returns: 0 if OK, -ve on error
*/
int cedit_run(struct expo *exp);
#endif /* __CEDIT_H */

View file

@ -4,14 +4,13 @@
* Written by Simon Glass <sjg@chromium.org> * Written by Simon Glass <sjg@chromium.org>
*/ */
#ifndef __SCENE_H #ifndef __EXPO_H
#define __SCENE_H #define __EXPO_H
#include <dm/ofnode_decl.h> #include <dm/ofnode_decl.h>
#include <linux/list.h> #include <linux/list.h>
struct udevice; struct udevice;
struct video_priv;
/** /**
* enum expoact_type - types of actions reported by the expo * enum expoact_type - types of actions reported by the expo
@ -676,24 +675,4 @@ int expo_apply_theme(struct expo *exp, ofnode node);
*/ */
int expo_build(ofnode root, struct expo **expp); int expo_build(ofnode root, struct expo **expp);
/** #endif /*__EXPO_H */
* cedit_arange() - Arrange objects in a configuration-editor scene
*
* @exp: Expo to update
* @vid_priv: Private info of the video device
* @scene_id: scene ID to arrange
* Returns: 0 if OK, -ve on error
*/
int cedit_arange(struct expo *exp, struct video_priv *vid_priv, uint scene_id);
/**
* cedit_run() - Run a configuration editor
*
* This accepts input until the user quits with Escape
*
* @exp: Expo to use
* Returns: 0 if OK, -ve on error
*/
int cedit_run(struct expo *exp);
#endif /*__SCENE_H */