diff options
| author | Simon Glass <[email protected]> | 2025-05-02 08:46:37 -0600 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2025-05-30 09:49:32 +0100 |
| commit | 5a80996cb6a285d09c03d687dc9ad793f12e7bf1 (patch) | |
| tree | f380eb465821947d9af64a8d9364a446c9065713 /include | |
| parent | 5ea2b533ed037b8f6f89c33f13dcf6188ba9162d (diff) | |
expo: Create a struct for generic text attributes
In preparation for adding more text types, refactor the common fields
into a new structure. This will allow common code to be used.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/expo.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/include/expo.h b/include/expo.h index 990cb3094ee..32d69f269a7 100644 --- a/include/expo.h +++ b/include/expo.h @@ -291,23 +291,32 @@ struct scene_obj_img { }; /** - * struct scene_obj_txt - information about a text object in a scene - * - * This is a single-line text object + * struct scene_txt_generic - Generic information common to text objects * - * @obj: Basic object information * @str_id: ID of the text string to display * @font_name: Name of font (allocated by caller) * @font_size: Nominal size of font in pixels */ -struct scene_obj_txt { - struct scene_obj obj; +struct scene_txt_generic { uint str_id; const char *font_name; uint font_size; }; /** + * struct scene_obj_txt - information about a text object in a scene + * + * This is a single-line text object + * + * @obj: Basic object information + * @gen: Generic information common to all objects which show text + */ +struct scene_obj_txt { + struct scene_obj obj; + struct scene_txt_generic gen; +}; + +/** * struct scene_obj_menu - information about a menu object in a scene * * A menu has a number of items which can be selected by the user |
