return 0;
}
+int expo_first_scene_id(struct expo *exp)
+{
+ struct scene *scn;
+
+ if (list_empty(&exp->scene_head))
+ return -ENOENT;
+
+ scn = list_first_entry(&exp->scene_head, struct scene, sibling);
+
+ return scn->id;
+}
+
int expo_render(struct expo *exp)
{
struct udevice *dev = exp->display;
return 0;
}
+int scene_render_deps(struct scene *scn, uint id)
+{
+ struct scene_obj *obj;
+ int ret;
+
+ if (!id)
+ return 0;
+ obj = scene_obj_find(scn, id, SCENEOBJT_NONE);
+ if (!obj)
+ return log_msg_ret("obj", -ENOENT);
+
+ if (!(obj->flags & SCENEOF_HIDE)) {
+ ret = scene_obj_render(obj, false);
+ if (ret && ret != -ENOTSUPP)
+ return log_msg_ret("ren", ret);
+
+ if (obj->type == SCENEOBJT_MENU)
+ scene_menu_render_deps(scn,
+ (struct scene_obj_menu *)obj);
+ }
+
+ return 0;
+}
+
int scene_render(struct scene *scn)
{
struct expo *exp = scn->expo;
}
}
+ /* render any highlighted object on top of the others */
+ if (scn->highlight_id && !exp->text_mode) {
+ ret = scene_render_deps(scn, scn->highlight_id);
+ if (ret && ret != -ENOTSUPP)
+ return log_msg_ret("dep", ret);
+ }
+
return 0;
}
*/
void scene_menu_render(struct scene_obj_menu *menu);
+/**
+ * scene_render_deps() - Render an object and its dependencies
+ *
+ * @scn: Scene to render
+ * @id: Object ID to render (or 0 for none)
+ * Returns: 0 if OK, -ve on error
+ */
+int scene_render_deps(struct scene *scn, uint id);
+
+/**
+ * scene_menu_render_deps() - Render a menu and its dependencies
+ *
+ * Renders the menu and all of its attached objects
+ *
+ * @scn: Scene to render
+ * @menu: Menu render
+ * Returns: 0 if OK, -ve on error
+ */
+int scene_menu_render_deps(struct scene *scn, struct scene_obj_menu *menu);
+
/**
* scene_menu_calc_dims() - Calculate the dimensions of a menu
*
vid_priv->colour_fg);
vidconsole_pop_colour(cons, &old);
}
+
+int scene_menu_render_deps(struct scene *scn, struct scene_obj_menu *menu)
+{
+ struct scene_menitem *item;
+
+ scene_render_deps(scn, menu->title_id);
+ scene_render_deps(scn, menu->cur_item_id);
+ scene_render_deps(scn, menu->pointer_id);
+
+ list_for_each_entry(item, &menu->item_head, sibling) {
+ scene_render_deps(scn, item->key_id);
+ scene_render_deps(scn, item->label_id);
+ scene_render_deps(scn, item->desc_id);
+ }
+
+ return 0;
+}