Settings

In order to comunicate with a host application, a plugin can expose settings to betray. All betray applications are recomended to support a way for users to modify these settings.

betray_settings_create

uint betray_settings_create(uint type, char *name, uint select_count, char **select_options);

Description: Create a new setting by giving it a name and a type. If the type is set to BETRAY_ST_SELECT, yopu must also give it the number of select options available and an array of strings describing the different options.

betray_settings_count

uint betray_settings_count();

Description: Returns the number of settings available (This number will be static once betray_innit has been called)

betray_settings_type

BSettingType betray_settings_type(uint id);

Description: Returns the BSettingType of a specific setting

Types:

Enum:

BSettingType

BETRAY_ST_TRIGGER

Description: Creates a trigger event for a plugi. Useful for things like screen captiure.

BETRAY_ST_TOGGLE

Description: A simple boolean to turn on or off functionality.

BETRAY_ST_SELECT

Description: A Selector where the application can chose form one of a number of named optrions.

BETRAY_ST_STRING

Description: A text string option.

BETRAY_ST_NUMBER_FLOAT

Description: A floating point value.

BETRAY_ST_NUMBER_INT

Description: A integer value.

BETRAY_ST_SLIDER

Description: A Floating point value ranging from zero to one.

BETRAY_ST_2D

Description: A two dimational value ranged form, minus one to plus one.

BETRAY_ST_3D

Description: A three dimational value ranged form, minus one to plus one.

BETRAY_ST_COLOR

Description: A Color

BETRAY_ST_4X4_MATRIX

Description: A 4x4 trnasfomration matrix

betray_settings_name

char *betray_settings_name(uint id);

Description: Rewturns the name of a specific setting

betray_settings_toggle_get

boolean betray_settings_toggle_get(uint id);

Description: Reads out the current state of a setting with the type BETRAY_ST_TOGGLE.

betray_settings_toggle_set

void betray_settings_toggle_set(uint id, boolean toggle);

Description: Sets the state of a setting with the type BETRAY_ST_TOGGLE.

betray_settings_select_get

uint betray_settings_select_get(uint id);

Description: Reads out the current state of a setting with the type BETRAY_ST_SELECT.

betray_settings_select_set

void betray_settings_select_set(uint id, uint select);

Description: Sets the state of a setting with the type BETRAY_ST_SELECT.

betray_settings_select_count_get

uint betray_settings_select_count_get(uint id);

Description: returns the number of options available for selection.

betray_settings_select_name_get

char *betray_settings_select_name_get(uint id, uint option);

Description: Returns the names of each individual option available.

betray_settings_number_float_get

float betray_settings_number_float_get(uint id);

Description: Reads out the current state of a setting with the type BETRAY_ST_NUMBER_FLOAT.

betray_settings_number_float_set

void betray_settings_number_float_set(uint id, float number);

Description: Sets the state of a setting with the type BETRAY_ST_NUMBER_FLOAT.

betray_settings_number_int_get

int betray_settings_number_int_get(uint id);

Description: Reads out the current state of a setting with the type BETRAY_ST_NUMBER_INT.

betray_settings_number_int_set

void betray_settings_number_int_set(uint id, int number);

Description: Sets the state of a setting with the type BETRAY_ST_NUMBER_INT.

betray_settings_string_get

char *betray_settings_string_get(uint id);

Description: Reads out the current state of a setting with the type BETRAY_ST_STRING.

betray_settings_string_set

void betray_settings_string_set(uint id, char *string);

Description: Sets the state of a setting with the type BETRAY_ST__STRING.

betray_settings_slider_get

float betray_settings_slider_get(uint id);

Description: Reads out the current state of a setting with the type BETRAY_ST_SLIDER.

betray_settings_slider_set

void betray_settings_slider_set(uint id, float slider);

Description: Sets the state of a setting with the type BETRAY_ST_SLIDER.

betray_settings_2d_get

void betray_settings_2d_get(uint id, float *x, float *y);

Description: Reads out the current state of a setting with the type BETRAY_ST_2D.

betray_settings_2d_set

void betray_settings_2d_set(uint id, float x, float y);

Description: Sets the state of a setting with the type BETRAY_ST_2D.

betray_settings_3d_get

void betray_settings_3d_get(uint id, float *x, float *y, float *z);

Description: Reads out the current state of a setting with the type BETRAY_ST_3D.

betray_settings_3d_set

void betray_settings_3d_set(uint id, float x, float y, float z);

Description: Sets the state of a setting with the type BETRAY_ST_3D.

betray_settings_color_get

void betray_settings_color_get(uint id, float *red, float *green, float *blue);

Description: Reads out the current state of a setting with the type BETRAY_ST_COLOR.

betray_settings_color_set

void betray_settings_color_set(uint id, float red, float green, float blue);

Description: Sets the state of a setting with the type BETRAY_ST_COLOR.

betray_settings_4x4_matrix_get

void betray_settings_4x4_matrix_get(uint id, float *matrix);

Description: Reads out the current state of a setting with the type BETRAY_ST_4X4_MATRIX.

betray_settings_4x4_matrix_set

void betray_settings_4x4_matrix_set(uint id, float *matrix);

Description: Sets the state of a setting with the type BETRAY_ST_4X4_MATRIX.