MateMixerToggle

MateMixerToggle — On/Off switch

Functions

Properties

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

Types and Values

Object Hierarchy

    GObject
    ╰── MateMixerSwitch
        ╰── MateMixerToggle

Includes

#include <libmatemixer/matemixer.h>

Description

Functions

mate_mixer_toggle_get_state ()

gboolean
mate_mixer_toggle_get_state (MateMixerToggle *toggle);

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

Parameters

toggle

a MateMixerToggle

 

Returns

TRUE or FALSE.


mate_mixer_toggle_set_state ()

gboolean
mate_mixer_toggle_set_state (MateMixerToggle *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 MateMixerToggle

 

state

the state to set

 

Returns

TRUE on success or FALSE on failure.


mate_mixer_toggle_get_state_option ()

MateMixerSwitchOption *
mate_mixer_toggle_get_state_option (MateMixerToggle *toggle,
                                    gboolean state);

Gets the MateMixerSwitchOption representing the selected state.

Parameters

toggle

a MateMixerToggle

 

state

the state to get the MateMixerSwitchOption for

 

Types and Values

MateMixerToggle

typedef struct _MateMixerToggle MateMixerToggle;

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


struct MateMixerToggleClass

struct MateMixerToggleClass {
    MateMixerSwitchClass parent_class;
};

The class structure for MateMixerToggle.

Members

MateMixerSwitchClass parent_class;

The parent class.

 

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