Open Broadcaster Software
Free, open source software for live streaming and recording
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
obs-hotkey.h File Reference

Go to the source code of this file.

Data Structures

struct  obs_key_combination
 
struct  obs_hotkeys_translations
 

Macros

#define OBS_INVALID_HOTKEY_ID   (~(obs_hotkey_id)0)
 
#define OBS_INVALID_HOTKEY_PAIR_ID   (~(obs_hotkey_pair_id)0)
 
#define OBS_HOTKEY(x)   x,
 
#define obs_hotkeys_set_translations(translations)
 

Typedefs

typedef size_t obs_hotkey_id
 
typedef size_t obs_hotkey_pair_id
 
typedef enum obs_key obs_key_t
 
typedef struct obs_key_combination obs_key_combination_t
 
typedef struct obs_hotkey obs_hotkey_t
 
typedef struct obs_hotkey_binding obs_hotkey_binding_t
 
typedef enum
obs_hotkey_registerer_type 
obs_hotkey_registerer_t
 
typedef void(* obs_hotkey_func )(void *data, obs_hotkey_id id, obs_hotkey_t *hotkey, bool pressed)
 
typedef bool(* obs_hotkey_active_func )(void *data, obs_hotkey_pair_id id, obs_hotkey_t *hotkey, bool pressed)
 
typedef bool(* obs_hotkey_enum_func )(void *data, obs_hotkey_id id, obs_hotkey_t *key)
 
typedef bool(* obs_hotkey_binding_enum_func )(void *data, size_t idx, obs_hotkey_binding_t *binding)
 
typedef void(* obs_hotkey_callback_router_func )(void *data, obs_hotkey_id id, bool pressed)
 
typedef void(* obs_hotkey_atomic_update_func )(void *)
 

Enumerations

enum  obs_key { OBS_KEY_LAST_VALUE }
 
enum  obs_hotkey_registerer_type {
  OBS_HOTKEY_REGISTERER_FRONTEND, OBS_HOTKEY_REGISTERER_SOURCE, OBS_HOTKEY_REGISTERER_OUTPUT, OBS_HOTKEY_REGISTERER_ENCODER,
  OBS_HOTKEY_REGISTERER_SERVICE
}
 

Functions

EXPORT obs_hotkey_id obs_hotkey_get_id (const obs_hotkey_t *key)
 
EXPORT const char * obs_hotkey_get_name (const obs_hotkey_t *key)
 
EXPORT const char * obs_hotkey_get_description (const obs_hotkey_t *key)
 
EXPORT obs_hotkey_registerer_t obs_hotkey_get_registerer_type (const obs_hotkey_t *key)
 
EXPORT void * obs_hotkey_get_registerer (const obs_hotkey_t *key)
 
EXPORT obs_hotkey_id obs_hotkey_get_pair_partner_id (const obs_hotkey_t *key)
 
EXPORT obs_key_combination_t obs_hotkey_binding_get_key_combination (obs_hotkey_binding_t *binding)
 
EXPORT obs_hotkey_id obs_hotkey_binding_get_hotkey_id (obs_hotkey_binding_t *binding)
 
EXPORT obs_hotkey_tobs_hotkey_binding_get_hotkey (obs_hotkey_binding_t *binding)
 
EXPORT void obs_hotkeys_set_translations_s (struct obs_hotkeys_translations *translations, size_t size)
 
EXPORT void obs_hotkeys_set_audio_hotkeys_translations (const char *mute, const char *unmute, const char *push_to_mute, const char *push_to_talk)
 
EXPORT void obs_hotkeys_set_sceneitem_hotkeys_translations (const char *show, const char *hide)
 
EXPORT obs_hotkey_id obs_hotkey_register_frontend (const char *name, const char *description, obs_hotkey_func func, void *data)
 
EXPORT obs_hotkey_id obs_hotkey_register_encoder (obs_encoder_t *encoder, const char *name, const char *description, obs_hotkey_func func, void *data)
 
EXPORT obs_hotkey_id obs_hotkey_register_output (obs_output_t *output, const char *name, const char *description, obs_hotkey_func func, void *data)
 
EXPORT obs_hotkey_id obs_hotkey_register_service (obs_service_t *service, const char *name, const char *description, obs_hotkey_func func, void *data)
 
EXPORT obs_hotkey_id obs_hotkey_register_source (obs_source_t *source, const char *name, const char *description, obs_hotkey_func func, void *data)
 
EXPORT obs_hotkey_pair_id obs_hotkey_pair_register_frontend (const char *name0, const char *description0, const char *name1, const char *description1, obs_hotkey_active_func func0, obs_hotkey_active_func func1, void *data0, void *data1)
 
EXPORT obs_hotkey_pair_id obs_hotkey_pair_register_encoder (obs_encoder_t *encoder, const char *name0, const char *description0, const char *name1, const char *description1, obs_hotkey_active_func func0, obs_hotkey_active_func func1, void *data0, void *data1)
 
EXPORT obs_hotkey_pair_id obs_hotkey_pair_register_output (obs_output_t *output, const char *name0, const char *description0, const char *name1, const char *description1, obs_hotkey_active_func func0, obs_hotkey_active_func func1, void *data0, void *data1)
 
EXPORT obs_hotkey_pair_id obs_hotkey_pair_register_service (obs_service_t *service, const char *name0, const char *description0, const char *name1, const char *description1, obs_hotkey_active_func func0, obs_hotkey_active_func func1, void *data0, void *data1)
 
EXPORT obs_hotkey_pair_id obs_hotkey_pair_register_source (obs_source_t *source, const char *name0, const char *description0, const char *name1, const char *description1, obs_hotkey_active_func func0, obs_hotkey_active_func func1, void *data0, void *data1)
 
EXPORT void obs_hotkey_unregister (obs_hotkey_id id)
 
EXPORT void obs_hotkey_pair_unregister (obs_hotkey_pair_id id)
 
EXPORT void obs_hotkey_load_bindings (obs_hotkey_id id, obs_key_combination_t *combinations, size_t num)
 
EXPORT void obs_hotkey_load (obs_hotkey_id id, obs_data_array_t *data)
 
EXPORT void obs_hotkeys_load_encoder (obs_encoder_t *encoder, obs_data_t *hotkeys)
 
EXPORT void obs_hotkeys_load_output (obs_output_t *output, obs_data_t *hotkeys)
 
EXPORT void obs_hotkeys_load_service (obs_service_t *service, obs_data_t *hotkeys)
 
EXPORT void obs_hotkeys_load_source (obs_source_t *source, obs_data_t *hotkeys)
 
EXPORT void obs_hotkey_pair_load (obs_hotkey_pair_id id, obs_data_array_t *data0, obs_data_array_t *data1)
 
EXPORT obs_data_array_tobs_hotkey_save (obs_hotkey_id id)
 
EXPORT obs_data_tobs_hotkeys_save_encoder (obs_encoder_t *encoder)
 
EXPORT obs_data_tobs_hotkeys_save_output (obs_output_t *output)
 
EXPORT obs_data_tobs_hotkeys_save_service (obs_service_t *service)
 
EXPORT obs_data_tobs_hotkeys_save_source (obs_source_t *source)
 
EXPORT void obs_enum_hotkeys (obs_hotkey_enum_func func, void *data)
 
EXPORT void obs_enum_hotkey_bindings (obs_hotkey_binding_enum_func func, void *data)
 
EXPORT void obs_hotkey_inject_event (obs_key_combination_t hotkey, bool pressed)
 
EXPORT void obs_hotkey_enable_background_press (bool enable)
 
EXPORT void obs_hotkey_enable_strict_modifiers (bool enable)
 
EXPORT void obs_hotkey_set_callback_routing_func (obs_hotkey_callback_router_func func, void *data)
 
EXPORT void obs_hotkey_trigger_routed_callback (obs_hotkey_id id, bool pressed)
 
EXPORT void obs_hotkey_enable_callback_rerouting (bool enable)
 
EXPORT void obs_hotkey_update_atomic (obs_hotkey_atomic_update_func func, void *data)
 
EXPORT void obs_key_to_str (obs_key_t key, struct dstr *str)
 
EXPORT void obs_key_combination_to_str (obs_key_combination_t key, struct dstr *str)
 
EXPORT obs_key_t obs_key_from_virtual_key (int code)
 
EXPORT int obs_key_to_virtual_key (obs_key_t key)
 
EXPORT const char * obs_key_to_name (obs_key_t key)
 
EXPORT obs_key_t obs_key_from_name (const char *name)
 
bool obs_key_combination_is_empty (obs_key_combination_t combo)
 

Macro Definition Documentation

#define OBS_HOTKEY (   x)    x,
#define obs_hotkeys_set_translations (   translations)
Value:
sizeof(struct obs_hotkeys_translations))
EXPORT void obs_hotkeys_set_translations_s(struct obs_hotkeys_translations *translations, size_t size)
Definition: obs-hotkey.h:71
#define OBS_INVALID_HOTKEY_ID   (~(obs_hotkey_id)0)
#define OBS_INVALID_HOTKEY_PAIR_ID   (~(obs_hotkey_pair_id)0)

Typedef Documentation

typedef bool(* obs_hotkey_active_func)(void *data, obs_hotkey_pair_id id, obs_hotkey_t *hotkey, bool pressed)
typedef void(* obs_hotkey_atomic_update_func)(void *)
typedef bool(* obs_hotkey_binding_enum_func)(void *data, size_t idx, obs_hotkey_binding_t *binding)
typedef void(* obs_hotkey_callback_router_func)(void *data, obs_hotkey_id id, bool pressed)
typedef bool(* obs_hotkey_enum_func)(void *data, obs_hotkey_id id, obs_hotkey_t *key)
typedef void(* obs_hotkey_func)(void *data, obs_hotkey_id id, obs_hotkey_t *hotkey, bool pressed)
typedef size_t obs_hotkey_id
typedef size_t obs_hotkey_pair_id
typedef struct obs_hotkey obs_hotkey_t
typedef enum obs_key obs_key_t

Enumeration Type Documentation

Enumerator
OBS_HOTKEY_REGISTERER_FRONTEND 
OBS_HOTKEY_REGISTERER_SOURCE 
OBS_HOTKEY_REGISTERER_OUTPUT 
OBS_HOTKEY_REGISTERER_ENCODER 
OBS_HOTKEY_REGISTERER_SERVICE 
enum obs_key
Enumerator
OBS_KEY_LAST_VALUE 

Function Documentation

EXPORT void obs_enum_hotkey_bindings ( obs_hotkey_binding_enum_func  func,
void *  data 
)
EXPORT void obs_enum_hotkeys ( obs_hotkey_enum_func  func,
void *  data 
)
EXPORT obs_hotkey_t* obs_hotkey_binding_get_hotkey ( obs_hotkey_binding_t binding)
EXPORT obs_hotkey_id obs_hotkey_binding_get_hotkey_id ( obs_hotkey_binding_t binding)
EXPORT obs_key_combination_t obs_hotkey_binding_get_key_combination ( obs_hotkey_binding_t binding)
EXPORT void obs_hotkey_enable_background_press ( bool  enable)
EXPORT void obs_hotkey_enable_callback_rerouting ( bool  enable)
EXPORT void obs_hotkey_enable_strict_modifiers ( bool  enable)
EXPORT const char* obs_hotkey_get_description ( const obs_hotkey_t key)
EXPORT obs_hotkey_id obs_hotkey_get_id ( const obs_hotkey_t key)
EXPORT const char* obs_hotkey_get_name ( const obs_hotkey_t key)
EXPORT obs_hotkey_id obs_hotkey_get_pair_partner_id ( const obs_hotkey_t key)
EXPORT void* obs_hotkey_get_registerer ( const obs_hotkey_t key)
EXPORT obs_hotkey_registerer_t obs_hotkey_get_registerer_type ( const obs_hotkey_t key)
EXPORT void obs_hotkey_inject_event ( obs_key_combination_t  hotkey,
bool  pressed 
)
EXPORT void obs_hotkey_load ( obs_hotkey_id  id,
obs_data_array_t data 
)
EXPORT void obs_hotkey_load_bindings ( obs_hotkey_id  id,
obs_key_combination_t combinations,
size_t  num 
)
EXPORT void obs_hotkey_pair_load ( obs_hotkey_pair_id  id,
obs_data_array_t data0,
obs_data_array_t data1 
)
EXPORT obs_hotkey_pair_id obs_hotkey_pair_register_encoder ( obs_encoder_t encoder,
const char *  name0,
const char *  description0,
const char *  name1,
const char *  description1,
obs_hotkey_active_func  func0,
obs_hotkey_active_func  func1,
void *  data0,
void *  data1 
)
EXPORT obs_hotkey_pair_id obs_hotkey_pair_register_frontend ( const char *  name0,
const char *  description0,
const char *  name1,
const char *  description1,
obs_hotkey_active_func  func0,
obs_hotkey_active_func  func1,
void *  data0,
void *  data1 
)
EXPORT obs_hotkey_pair_id obs_hotkey_pair_register_output ( obs_output_t output,
const char *  name0,
const char *  description0,
const char *  name1,
const char *  description1,
obs_hotkey_active_func  func0,
obs_hotkey_active_func  func1,
void *  data0,
void *  data1 
)
EXPORT obs_hotkey_pair_id obs_hotkey_pair_register_service ( obs_service_t service,
const char *  name0,
const char *  description0,
const char *  name1,
const char *  description1,
obs_hotkey_active_func  func0,
obs_hotkey_active_func  func1,
void *  data0,
void *  data1 
)
EXPORT obs_hotkey_pair_id obs_hotkey_pair_register_source ( obs_source_t source,
const char *  name0,
const char *  description0,
const char *  name1,
const char *  description1,
obs_hotkey_active_func  func0,
obs_hotkey_active_func  func1,
void *  data0,
void *  data1 
)
EXPORT void obs_hotkey_pair_unregister ( obs_hotkey_pair_id  id)
EXPORT obs_hotkey_id obs_hotkey_register_encoder ( obs_encoder_t encoder,
const char *  name,
const char *  description,
obs_hotkey_func  func,
void *  data 
)
EXPORT obs_hotkey_id obs_hotkey_register_frontend ( const char *  name,
const char *  description,
obs_hotkey_func  func,
void *  data 
)
EXPORT obs_hotkey_id obs_hotkey_register_output ( obs_output_t output,
const char *  name,
const char *  description,
obs_hotkey_func  func,
void *  data 
)
EXPORT obs_hotkey_id obs_hotkey_register_service ( obs_service_t service,
const char *  name,
const char *  description,
obs_hotkey_func  func,
void *  data 
)
EXPORT obs_hotkey_id obs_hotkey_register_source ( obs_source_t source,
const char *  name,
const char *  description,
obs_hotkey_func  func,
void *  data 
)
EXPORT obs_data_array_t* obs_hotkey_save ( obs_hotkey_id  id)
EXPORT void obs_hotkey_set_callback_routing_func ( obs_hotkey_callback_router_func  func,
void *  data 
)
EXPORT void obs_hotkey_trigger_routed_callback ( obs_hotkey_id  id,
bool  pressed 
)
EXPORT void obs_hotkey_unregister ( obs_hotkey_id  id)
EXPORT void obs_hotkey_update_atomic ( obs_hotkey_atomic_update_func  func,
void *  data 
)
EXPORT void obs_hotkeys_load_encoder ( obs_encoder_t encoder,
obs_data_t hotkeys 
)
EXPORT void obs_hotkeys_load_output ( obs_output_t output,
obs_data_t hotkeys 
)
EXPORT void obs_hotkeys_load_service ( obs_service_t service,
obs_data_t hotkeys 
)
EXPORT void obs_hotkeys_load_source ( obs_source_t source,
obs_data_t hotkeys 
)
EXPORT obs_data_t* obs_hotkeys_save_encoder ( obs_encoder_t encoder)
EXPORT obs_data_t* obs_hotkeys_save_output ( obs_output_t output)
EXPORT obs_data_t* obs_hotkeys_save_service ( obs_service_t service)
EXPORT obs_data_t* obs_hotkeys_save_source ( obs_source_t source)
EXPORT void obs_hotkeys_set_audio_hotkeys_translations ( const char *  mute,
const char *  unmute,
const char *  push_to_mute,
const char *  push_to_talk 
)
EXPORT void obs_hotkeys_set_sceneitem_hotkeys_translations ( const char *  show,
const char *  hide 
)
EXPORT void obs_hotkeys_set_translations_s ( struct obs_hotkeys_translations translations,
size_t  size 
)
bool obs_key_combination_is_empty ( obs_key_combination_t  combo)
inline
EXPORT void obs_key_combination_to_str ( obs_key_combination_t  key,
struct dstr str 
)
EXPORT obs_key_t obs_key_from_name ( const char *  name)
EXPORT obs_key_t obs_key_from_virtual_key ( int  code)
EXPORT const char* obs_key_to_name ( obs_key_t  key)
EXPORT void obs_key_to_str ( obs_key_t  key,
struct dstr str 
)
EXPORT int obs_key_to_virtual_key ( obs_key_t  key)