2023-07-03 20:26:53 +02:00
//
// plugin-properties.h
// obs-studio
//
// Created by Patrick Heyer on 2023-03-07.
//
@ import Foundation ;
# import <obs-properties.h>
/// Configures single source property's visibility, possible modification callback and callback payload data, as well as whether the property should be enabled
/// - Parameters:
/// - property: The source property to change
/// - enable: Whether the source property should be enabled (user-changeable)
/// - visible: Whether the source property should be visible
/// - callback: Pointer to a function that will be called if this property has been modified or the properties are reloaded
2024-02-20 20:15:19 +01:00
/// - capture: Optional reference to ``OBSAVCapture`` instance
void configure_property ( obs_property_t * property , bool enable , bool visible , void * callback , OBSAVCapture * capture ) ;
2023-07-03 20:26:53 +02:00
/// Generic callback handler for changed properties. Will update all properties of an OBSAVCapture source at once
/// - Parameters:
2024-02-20 20:15:19 +01:00
/// - capture: Pointer to ``OBSAVCapture`` instance
2023-07-03 20:26:53 +02:00
/// - properties: Pointer to properties struct associated with the source
/// - property: Pointer to the property that the callback is attached to
/// - settings: Pointer to settings associated with the source
/// - Returns: Always returns true
2024-02-20 20:15:19 +01:00
bool properties_changed ( OBSAVCapture * capture , obs_properties_t * properties , obs_property_t * property ,
2023-07-03 20:26:53 +02:00
obs_data_t * settings ) ;
/// Callback handler for preset changes.
/// - Parameters:
2024-02-20 20:15:19 +01:00
/// - capture: Pointer to ``OBSAVCapture`` instance
2023-07-03 20:26:53 +02:00
/// - properties: Pointer to properties struct associated with the source
/// - property: Pointer to the property that the callback is attached to
/// - settings: Pointer to settings associated with the source
/// - Returns: Always returns true
2024-02-20 20:15:19 +01:00
bool properties_changed_preset ( OBSAVCapture * capture , obs_properties_t * properties , obs_property_t * property ,
2023-07-03 20:26:53 +02:00
obs_data_t * settings ) ;
/// Callback handler for changing preset usage for an OBSAVCapture source. Switches between preset-based configuration and manual configuration
/// - Parameters:
2024-02-20 20:15:19 +01:00
/// - capture: Pointer to ``OBSAVCapture`` instance
2023-07-03 20:26:53 +02:00
/// - properties: Pointer to properties struct associated with the source
/// - property: Pointer to the property that the callback is attached to
/// - settings: Pointer to settings associated with the source
/// - Returns: Always returns true
2024-02-20 20:15:19 +01:00
bool properties_changed_use_preset ( OBSAVCapture * capture , obs_properties_t * properties , obs_property_t * property ,
obs_data_t * settings ) ;
2023-07-03 20:26:53 +02:00
/// Updates preset property with description-value-pairs of presets supported by the currently selected device
/// - Parameters:
2024-02-20 20:15:19 +01:00
/// - capture: Pointer to ``OBSAVCapture`` instance
2023-07-03 20:26:53 +02:00
/// - property: Pointer to the property that the callback is attached to
/// - settings: Pointer to settings associated with the source
/// - Returns: Always returns true
2024-02-20 20:15:19 +01:00
bool properties_update_preset ( OBSAVCapture * capture , obs_property_t * property , obs_data_t * settings ) ;
2023-07-03 20:26:53 +02:00
/// Updates device property with description-value-pairs of devices available via CoreMediaIO
/// - Parameters:
2024-02-20 20:15:19 +01:00
/// - capture: Pointer to ``OBSAVCapture`` instance
2023-07-03 20:26:53 +02:00
/// - property: Pointer to the property that the callback is attached to
/// - settings: Pointer to settings associated with the source
/// - Returns: Always returns true
2024-02-20 20:15:19 +01:00
bool properties_update_device ( OBSAVCapture * capture , obs_property_t * property , obs_data_t * settings ) ;
2023-07-03 20:26:53 +02:00
/// Updates available values for all properties required in manual device configuration.
///
/// Properties updated by this call include:
/// * Resolutions
/// * Frame rates and frame rate ranges
/// * Color formats
/// * Color range
///
/// In CoreMediaIO color format, resolution and frame rate ranges are always coupled into a single format, while color range is always contained in the color format. The formats are thus compiled and de-duplicated to create a selection of all properties.
///
/// Frame rate ranges will be limited to ranges only available for a specific combination of resolution and color format.
///
/// - Parameters:
2024-02-20 20:15:19 +01:00
/// - capture: Pointer to ``OBSAVCapture`` instance
2023-07-03 20:26:53 +02:00
/// - property: Pointer to the property that the callback is attached to
/// - settings: Pointer to settings associated with the source
/// - Returns: Always returns true
2024-02-20 20:15:19 +01:00
bool properties_update_config ( OBSAVCapture * capture , obs_properties_t * properties , obs_data_t * settings ) ;