UI: Refactor Frontend API and header
Moved getters to be before setters. Moved functions in cpp file to match the order of their declarations in the header file.
This commit is contained in:
parent
dae03c8a9f
commit
ccdf624c44
@ -148,17 +148,17 @@ void obs_frontend_release_tbar(void)
|
||||
c->obs_frontend_release_tbar();
|
||||
}
|
||||
|
||||
int obs_frontend_get_tbar_position(void)
|
||||
{
|
||||
return !!callbacks_valid() ? c->obs_frontend_get_tbar_position() : 0;
|
||||
}
|
||||
|
||||
void obs_frontend_set_tbar_position(int position)
|
||||
{
|
||||
if (callbacks_valid())
|
||||
c->obs_frontend_set_tbar_position(position);
|
||||
}
|
||||
|
||||
int obs_frontend_get_tbar_position(void)
|
||||
{
|
||||
return !!callbacks_valid() ? c->obs_frontend_get_tbar_position() : 0;
|
||||
}
|
||||
|
||||
char **obs_frontend_get_scene_collections(void)
|
||||
{
|
||||
if (!callbacks_valid())
|
||||
@ -433,18 +433,18 @@ void obs_frontend_pop_ui_translation(void)
|
||||
c->obs_frontend_pop_ui_translation();
|
||||
}
|
||||
|
||||
void obs_frontend_set_streaming_service(obs_service_t *service)
|
||||
{
|
||||
if (callbacks_valid())
|
||||
c->obs_frontend_set_streaming_service(service);
|
||||
}
|
||||
|
||||
obs_service_t *obs_frontend_get_streaming_service(void)
|
||||
{
|
||||
return !!callbacks_valid() ? c->obs_frontend_get_streaming_service()
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
void obs_frontend_set_streaming_service(obs_service_t *service)
|
||||
{
|
||||
if (callbacks_valid())
|
||||
c->obs_frontend_set_streaming_service(service);
|
||||
}
|
||||
|
||||
void obs_frontend_save_streaming_service(void)
|
||||
{
|
||||
if (callbacks_valid())
|
||||
@ -470,17 +470,17 @@ void obs_frontend_preview_program_trigger_transition(void)
|
||||
c->obs_frontend_preview_program_trigger_transition();
|
||||
}
|
||||
|
||||
bool obs_frontend_preview_enabled(void)
|
||||
{
|
||||
return !!callbacks_valid() ? c->obs_frontend_preview_enabled() : false;
|
||||
}
|
||||
|
||||
void obs_frontend_set_preview_enabled(bool enable)
|
||||
{
|
||||
if (callbacks_valid())
|
||||
c->obs_frontend_set_preview_enabled(enable);
|
||||
}
|
||||
|
||||
bool obs_frontend_preview_enabled(void)
|
||||
{
|
||||
return !!callbacks_valid() ? c->obs_frontend_preview_enabled() : false;
|
||||
}
|
||||
|
||||
obs_source_t *obs_frontend_get_current_preview_scene(void)
|
||||
{
|
||||
return !!callbacks_valid() ? c->obs_frontend_get_current_preview_scene()
|
||||
|
@ -24,8 +24,8 @@ struct obs_frontend_callbacks {
|
||||
virtual int obs_frontend_get_transition_duration(void) = 0;
|
||||
virtual void obs_frontend_set_transition_duration(int duration) = 0;
|
||||
virtual void obs_frontend_release_tbar(void) = 0;
|
||||
virtual void obs_frontend_set_tbar_position(int position) = 0;
|
||||
virtual int obs_frontend_get_tbar_position(void) = 0;
|
||||
virtual void obs_frontend_set_tbar_position(int position) = 0;
|
||||
|
||||
virtual void obs_frontend_get_scene_collections(
|
||||
std::vector<std::string> &strings) = 0;
|
||||
@ -103,9 +103,9 @@ struct obs_frontend_callbacks {
|
||||
obs_frontend_translate_ui_cb translate) = 0;
|
||||
virtual void obs_frontend_pop_ui_translation(void) = 0;
|
||||
|
||||
virtual obs_service_t *obs_frontend_get_streaming_service(void) = 0;
|
||||
virtual void
|
||||
obs_frontend_set_streaming_service(obs_service_t *service) = 0;
|
||||
virtual obs_service_t *obs_frontend_get_streaming_service(void) = 0;
|
||||
virtual void obs_frontend_save_streaming_service() = 0;
|
||||
|
||||
virtual bool obs_frontend_preview_program_mode_active(void) = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user