MateMixerSwitch

MateMixerSwitch

Functions

Properties

MateMixerSwitchOption * active-option Read / Write / Construct Only
MateMixerSwitchFlags flags Read / Write / Construct Only
gchar * label Read / Write / Construct Only
gchar * name Read / Write / Construct Only
MateMixerSwitchRole role Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── MateMixerSwitch
        ╰── MateMixerToggle

Includes

#include <libmatemixer/matemixer.h>

Description

Functions

mate_mixer_switch_get_name ()

const gchar *
mate_mixer_switch_get_name (MateMixerSwitch *swtch);

Gets the name of the switch.

The name serves as a unique identifier and in most cases it is not in a user-readable form.

Parameters

swtch

a MateMixerSwitch

 

Returns

the name of the switch.


mate_mixer_switch_get_label ()

const gchar *
mate_mixer_switch_get_label (MateMixerSwitch *swtch);

Gets the label of the switch.

This is a potentially translated string that should be presented to users in the user interface.

Parameters

swtch

a MateMixerSwitch

 

Returns

the label of the switch option.


mate_mixer_switch_get_flags ()

MateMixerSwitchFlags
mate_mixer_switch_get_flags (MateMixerSwitch *swtch);

Gets the flags of the switch. See MateMixerSwitchFlags for information about the meaning of the individual flags.

Parameters

swtch

a MateMixerSwitch

 

Returns

the flags of the switch.


mate_mixer_switch_get_role ()

MateMixerSwitchRole
mate_mixer_switch_get_role (MateMixerSwitch *swtch);

Gets the role of the switch. The role identifies the purpose of the switch.

Note that while the role identification should be reliable, it may be based on looking for well-known switch names on some sound systems.

Parameters

swtch

a MateMixerSwitch

 

mate_mixer_switch_get_option ()

MateMixerSwitchOption *
mate_mixer_switch_get_option (MateMixerSwitch *swtch,
                              const gchar *name);

Gets the MateMixerSwitchOption with the given name.

Parameters

swtch

a MateMixerSwitch

 

name

the name of an option

 

Returns

a MateMixerSwitchOption or NULL if there is no such switch option.


mate_mixer_switch_list_options ()

const GList *
mate_mixer_switch_list_options (MateMixerSwitch *swtch);

Gets the list of switch options that belong to the switch.

The returned GList is owned by the MateMixerSwitch and may be invalidated at any time.

Parameters

swtch

a MateMixerSwitch

 

Returns

a GList of the switch options.


mate_mixer_switch_get_active_option ()

MateMixerSwitchOption *
mate_mixer_switch_get_active_option (MateMixerSwitch *swtch);

Gets the MateMixerSwitchOption which is currently active.

Parameters

swtch

a MateMixerSwitch

 

mate_mixer_switch_set_active_option ()

gboolean
mate_mixer_switch_set_active_option (MateMixerSwitch *swtch,
                                     MateMixerSwitchOption *option);

Changes the currently active switch option.

Parameters

swtch

a MateMixerSwitch

 

option

the MateMixerSwitchOption to set as the active option

 

Returns

TRUE on success or FALSE on failure.

Types and Values

enum MateMixerSwitchFlags

Members

MATE_MIXER_SWITCH_NO_FLAGS

No flags.

 

MATE_MIXER_SWITCH_TOGGLE

The switch is a MateMixerToggle.

 

MATE_MIXER_SWITCH_ALLOWS_NO_ACTIVE_OPTION

   

enum MateMixerSwitchRole

Members

MATE_MIXER_SWITCH_ROLE_UNKNOWN

Unknown switch role.

 

MATE_MIXER_SWITCH_ROLE_DEVICE_PROFILE

The switch changes the active sound device profile.

 

MATE_MIXER_SWITCH_ROLE_PORT

The switch changes the active port.

 

MATE_MIXER_SWITCH_ROLE_BOOST

The switch changes the boost value.

 

MateMixerSwitch

typedef struct _MateMixerSwitch MateMixerSwitch;

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


struct MateMixerSwitchClass

struct MateMixerSwitchClass {
    GObjectClass parent_class;
};

The class structure for MateMixerSwitch.

Members

GObjectClass parent_class;

The parent class.

 

Property Details

The “active-option” property

  “active-option”            MateMixerSwitchOption *

Active option of the switch.

Flags: Read / Write / Construct Only


The “flags” property

  “flags”                    MateMixerSwitchFlags

Flags of the switch.

Flags: Read / Write / Construct Only


The “label” property

  “label”                    gchar *

Label of the switch.

Flags: Read / Write / Construct Only

Default value: NULL


The “name” property

  “name”                     gchar *

Name of the switch.

Flags: Read / Write / Construct Only

Default value: NULL


The “role” property

  “role”                     MateMixerSwitchRole

Role of the switch.

Flags: Read / Write / Construct Only

Default value: MATE_MIXER_SWITCH_ROLE_UNKNOWN