1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
3
* Copyright (C) 2008 Red Hat, Inc.
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
#ifndef __GVC_MIXER_CONTROL_H
22
#define __GVC_MIXER_CONTROL_H
24
#include <glib-object.h>
25
#include "gvc-mixer-stream.h"
26
#include "gvc-mixer-card.h"
27
#include "gvc-mixer-ui-device.h"
37
} GvcMixerControlState;
39
#define GVC_TYPE_MIXER_CONTROL (gvc_mixer_control_get_type ())
40
#define GVC_MIXER_CONTROL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GVC_TYPE_MIXER_CONTROL, GvcMixerControl))
41
#define GVC_MIXER_CONTROL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GVC_TYPE_MIXER_CONTROL, GvcMixerControlClass))
42
#define GVC_IS_MIXER_CONTROL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GVC_TYPE_MIXER_CONTROL))
43
#define GVC_IS_MIXER_CONTROL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GVC_TYPE_MIXER_CONTROL))
44
#define GVC_MIXER_CONTROL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GVC_TYPE_MIXER_CONTROL, GvcMixerControlClass))
46
typedef struct GvcMixerControlPrivate GvcMixerControlPrivate;
51
GvcMixerControlPrivate *priv;
56
GObjectClass parent_class;
58
void (*state_changed) (GvcMixerControl *control,
59
GvcMixerControlState new_state);
60
void (*stream_added) (GvcMixerControl *control,
62
void (*stream_removed) (GvcMixerControl *control,
64
void (*card_added) (GvcMixerControl *control,
66
void (*card_removed) (GvcMixerControl *control,
68
void (*default_sink_changed) (GvcMixerControl *control,
70
void (*default_source_changed) (GvcMixerControl *control,
72
void (*active_output_update) (GvcMixerControl *control,
74
void (*active_input_update) (GvcMixerControl *control,
76
void (*output_added) (GvcMixerControl *control,
78
void (*input_added) (GvcMixerControl *control,
80
void (*output_removed) (GvcMixerControl *control,
82
void (*input_removed) (GvcMixerControl *control,
84
} GvcMixerControlClass;
86
GType gvc_mixer_control_get_type (void);
88
GvcMixerControl * gvc_mixer_control_new (const char *name);
90
gboolean gvc_mixer_control_open (GvcMixerControl *control);
91
gboolean gvc_mixer_control_close (GvcMixerControl *control);
93
GSList * gvc_mixer_control_get_cards (GvcMixerControl *control);
94
GSList * gvc_mixer_control_get_streams (GvcMixerControl *control);
95
GSList * gvc_mixer_control_get_sinks (GvcMixerControl *control);
96
GSList * gvc_mixer_control_get_sources (GvcMixerControl *control);
97
GSList * gvc_mixer_control_get_sink_inputs (GvcMixerControl *control);
98
GSList * gvc_mixer_control_get_source_outputs (GvcMixerControl *control);
100
GvcMixerStream * gvc_mixer_control_lookup_stream_id (GvcMixerControl *control,
102
GvcMixerCard * gvc_mixer_control_lookup_card_id (GvcMixerControl *control,
104
GvcMixerUIDevice * gvc_mixer_control_lookup_output_id (GvcMixerControl *control,
106
GvcMixerUIDevice * gvc_mixer_control_lookup_input_id (GvcMixerControl *control,
108
GvcMixerUIDevice * gvc_mixer_control_lookup_device_from_stream (GvcMixerControl *control,
109
GvcMixerStream *stream);
111
GvcMixerStream * gvc_mixer_control_get_default_sink (GvcMixerControl *control);
112
GvcMixerStream * gvc_mixer_control_get_default_source (GvcMixerControl *control);
113
GvcMixerStream * gvc_mixer_control_get_event_sink_input (GvcMixerControl *control);
115
gboolean gvc_mixer_control_set_default_sink (GvcMixerControl *control,
116
GvcMixerStream *stream);
117
gboolean gvc_mixer_control_set_default_source (GvcMixerControl *control,
118
GvcMixerStream *stream);
120
gdouble gvc_mixer_control_get_vol_max_norm (GvcMixerControl *control);
121
gdouble gvc_mixer_control_get_vol_max_amplified (GvcMixerControl *control);
122
void gvc_mixer_control_change_output (GvcMixerControl *control,
123
GvcMixerUIDevice* output);
124
void gvc_mixer_control_change_input (GvcMixerControl *control,
125
GvcMixerUIDevice* input);
126
GvcMixerStream* gvc_mixer_control_get_stream_from_device (GvcMixerControl *control,
127
GvcMixerUIDevice *device);
128
gboolean gvc_mixer_control_change_profile_on_selected_device (GvcMixerControl *control,
129
GvcMixerUIDevice *device,
130
const gchar* profile);
132
GvcMixerControlState gvc_mixer_control_get_state (GvcMixerControl *control);
136
#endif /* __GVC_MIXER_CONTROL_H */