提交 6d0ef756 编写于 作者: J jp9000

libobs: Add refresh signal to scenes

This signal is used to specify when a scene needs a full refresh of its
item list.
上级 50277093
......@@ -135,6 +135,11 @@ Scene Signals
Called when scene items have been reoredered in the scene.
**refresh** (ptr scene)
Called when the entire scene item list needs to be refreshed.
Usually this is only used when groups have changed.
**item_visible** (ptr scene, ptr item, bool visible)
Called when a scene item's visibility state changes.
......
......@@ -48,6 +48,7 @@ static const char *obs_scene_signals[] = {
"void item_add(ptr scene, ptr item)",
"void item_remove(ptr scene, ptr item)",
"void reorder(ptr scene)",
"void refresh(ptr scene)",
"void item_visible(ptr scene, ptr item, bool visible)",
"void item_select(ptr scene, ptr item)",
"void item_deselect(ptr scene, ptr item)",
......@@ -1919,6 +1920,18 @@ static inline void signal_reorder(struct obs_scene_item *item)
signal_parent(item->parent, command, &params);
}
static inline void signal_refresh(obs_scene_t *scene)
{
const char *command = NULL;
struct calldata params;
uint8_t stack[128];
command = "refresh";
calldata_init_fixed(&params, stack, sizeof(stack));
signal_parent(scene, command, &params);
}
void obs_sceneitem_set_order(obs_sceneitem_t *item,
enum obs_order_movement movement)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册