libobs: Add refresh signal to scenes
This signal is used to specify when a scene needs a full refresh of its item list.
This commit is contained in:
parent
5027709320
commit
6d0ef75663
@ -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, ¶ms);
|
||||
}
|
||||
|
||||
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(¶ms, stack, sizeof(stack));
|
||||
signal_parent(scene, command, ¶ms);
|
||||
}
|
||||
|
||||
void obs_sceneitem_set_order(obs_sceneitem_t *item,
|
||||
enum obs_order_movement movement)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user