MateMixerStreamToggle

MateMixerStreamToggle — On/Off switch

Synopsis

#include <libmatemixer/matemixer.h>

                    MateMixerStreamToggle;
struct              MateMixerStreamToggleClass;
gboolean            mate_mixer_stream_toggle_get_state  (MateMixerStreamToggle *toggle);
gboolean            mate_mixer_stream_toggle_set_state  (MateMixerStreamToggle *toggle,
                                                         gboolean state);
MateMixerSwitchOption * mate_mixer_stream_toggle_get_state_option
                                                        (MateMixerStreamToggle *toggle,
                                                         gboolean state);

Object Hierarchy

  GObject
   +----MateMixerSwitch
         +----MateMixerStreamSwitch
               +----MateMixerStreamToggle

Properties

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

Description

Details

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.

MateMixerStreamSwitchClass parent_class;

The parent class.

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.

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.

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.

toggle :

a MateMixerStreamToggle

state :

the state to get the MateMixerSwitchOption for

Returns :

a MateMixerSwitchOption.

Property Details

The "off-state-option" property

  "off-state-option"         MateMixerSwitchOption*  : Read / Write / Construct Only

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


The "on-state-option" property

  "on-state-option"          MateMixerSwitchOption*  : Read / Write / Construct Only

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


The "state" property

  "state"                    gboolean              : Read / Write

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

Default value: FALSE