## MateMixerStreamToggle

MateMixerStreamToggle — On/Off switch

## Functions

gboolean | mate_mixer_stream_toggle_get_state ()
gboolean | mate_mixer_stream_toggle_set_state ()
MateMixerSwitchOption * | mate_mixer_stream_toggle_get_state_option ()

## Properties

MateMixerSwitchOption * | off-state-option | Read / Write / Construct Only
MateMixerSwitchOption * | on-state-option | Read / Write / Construct Only
gboolean | state | Read / Write

## Types and Values

| MateMixerStreamToggle
struct | MateMixerStreamToggleClass

## Object Hierarchy

        GObject
        ╰── MateMixerSwitch
            ╰── MateMixerStreamSwitch
                ╰── MateMixerStreamToggle

## Includes

    #include <libmatemixer/matemixer.h>

## Description

## Functions

### mate_mixer_stream_toggle_get_state ()

    gboolean
    mate_mixer_stream_toggle_get_state (MateMixerStreamToggle *toggle);

Gets the current state of the toggle. `TRUE` corresponds to the 'on' state and `FALSE` to the 'off' state.

#### Parameters

toggle | a MateMixerStreamToggle |

#### Returns

`TRUE` or `FALSE`.

### mate_mixer_stream_toggle_set_state ()

    gboolean
    mate_mixer_stream_toggle_set_state (MateMixerStreamToggle *toggle,
                                        gboolean state);

Sets the `toggle` to the selected state.

This function is equivalent to using `mate_mixer_switch_set_active_option()` with a MateMixerSwitchOption representing the selected state.

#### Parameters

toggle | a MateMixerStreamToggle |
state | the state to set |

#### Returns

`TRUE` on success or `FALSE` on failure.

### mate_mixer_stream_toggle_get_state_option ()

    MateMixerSwitchOption *
    mate_mixer_stream_toggle_get_state_option
                                   (MateMixerStreamToggle *toggle,
                                    gboolean state);

Gets the MateMixerSwitchOption representing the selected state.

#### Parameters

toggle | a MateMixerStreamToggle |
state | the state to get the MateMixerSwitchOption for |

#### Returns

a MateMixerSwitchOption.

## Types and Values

### MateMixerStreamToggle

    typedef struct _MateMixerStreamToggle MateMixerStreamToggle;

The MateMixerStreamToggle structure contains only private data and should only be accessed using the provided API.

### struct MateMixerStreamToggleClass

    struct MateMixerStreamToggleClass {
        MateMixerStreamSwitchClass parent_class;
    };

The class structure for MateMixerStreamToggle.

#### Members

## Property Details

### The `“off-state-option”` property

      “off-state-option”         MateMixerSwitchOption *

The MateMixerSwitchOption representing the 'off' value of the toggle.

Flags: Read / Write / Construct Only

### The `“on-state-option”` property

      “on-state-option”          MateMixerSwitchOption *

The MateMixerSwitchOption representing the 'on' value of the toggle.

Flags: Read / Write / Construct Only

### The `“state”` property

      “state”                    gboolean

The current state of the toggle. `TRUE` corresponds to the 'on' state and `FALSE` to the 'off' state.

Flags: Read / Write

Default value: FALSE