~kroq-gar78/ubuntu/precise/gnome-control-center/fix-885947

« back to all changes in this revision

Viewing changes to panels/sound/gvc-mixer-stream.h

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2011-05-17 10:47:27 UTC
  • mfrom: (0.1.11 experimental) (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20110517104727-lqel6m8vhfw5jby1
Tags: 1:3.0.1.1-1ubuntu1
* Rebase on Debian, remaining Ubuntu changes:
* debian/control:
  - Build-Depend on hardening-wrapper, dpkg-dev and dh-autoreconf
  - Add dependency on ubuntu-system-service
  - Remove dependency on gnome-icon-theme-symbolic
  - Move dependency on apg, gnome-icon-theme-symbolic and accountsservice to
    be a Recommends: until we get them in main
* debian/rules:
  - Use autoreconf
  - Add binary-post-install rule for gnome-control-center-data
  - Run dh-autoreconf
* debian/gnome-control-center.dirs:
* debian/gnome-control-center.links:
  - Add a link to the control center shell for indicators
* debian/patches/00_disable-nm.patch:
  - Temporary patch to disable building with NetworkManager until we get
    the new one in the archive
* debian/patches/01_git_remove_gettext_calls.patch:
  - Remove calls to AM_GNU_GETTEXT, IT_PROG_INTLTOOL should be enough
* debian/patches/01_git_kill_warning.patch:
  - Kill warning
* debian/patches/50_ubuntu_systemwide_prefs.patch:
  - Ubuntu specific proxy preferences
* debian/patches/51_ubuntu_system_keyboard.patch:
  - Implement the global keyboard spec at https://wiki.ubuntu.com/DefaultKeyboardSettings

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
 
2
 *
 
3
 * Copyright (C) 2008 Red Hat, Inc.
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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.
 
18
 *
 
19
 */
 
20
 
 
21
#ifndef __GVC_MIXER_STREAM_H
 
22
#define __GVC_MIXER_STREAM_H
 
23
 
 
24
#include <glib-object.h>
 
25
#include "gvc-pulseaudio-fake.h"
 
26
#include "gvc-channel-map.h"
 
27
#include <gio/gio.h>
 
28
 
 
29
G_BEGIN_DECLS
 
30
 
 
31
#define GVC_TYPE_MIXER_STREAM         (gvc_mixer_stream_get_type ())
 
32
#define GVC_MIXER_STREAM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GVC_TYPE_MIXER_STREAM, GvcMixerStream))
 
33
#define GVC_MIXER_STREAM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GVC_TYPE_MIXER_STREAM, GvcMixerStreamClass))
 
34
#define GVC_IS_MIXER_STREAM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GVC_TYPE_MIXER_STREAM))
 
35
#define GVC_IS_MIXER_STREAM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GVC_TYPE_MIXER_STREAM))
 
36
#define GVC_MIXER_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GVC_TYPE_MIXER_STREAM, GvcMixerStreamClass))
 
37
 
 
38
typedef struct GvcMixerStreamPrivate GvcMixerStreamPrivate;
 
39
 
 
40
typedef struct
 
41
{
 
42
        GObject                parent;
 
43
        GvcMixerStreamPrivate *priv;
 
44
} GvcMixerStream;
 
45
 
 
46
typedef struct
 
47
{
 
48
        GObjectClass           parent_class;
 
49
 
 
50
        /* vtable */
 
51
        gboolean (*push_volume)     (GvcMixerStream *stream,
 
52
                                     gpointer *operation);
 
53
        gboolean (*change_is_muted) (GvcMixerStream *stream,
 
54
                                     gboolean        is_muted);
 
55
        gboolean (*change_port)     (GvcMixerStream *stream,
 
56
                                     const char     *port);
 
57
} GvcMixerStreamClass;
 
58
 
 
59
typedef struct
 
60
{
 
61
        char *port;
 
62
        char *human_port;
 
63
        guint priority;
 
64
} GvcMixerStreamPort;
 
65
 
 
66
GType               gvc_mixer_stream_get_type        (void);
 
67
 
 
68
guint               gvc_mixer_stream_get_index       (GvcMixerStream *stream);
 
69
guint               gvc_mixer_stream_get_id          (GvcMixerStream *stream);
 
70
const GvcChannelMap *gvc_mixer_stream_get_channel_map(GvcMixerStream *stream);
 
71
const GvcMixerStreamPort *gvc_mixer_stream_get_port  (GvcMixerStream *stream);
 
72
const GList *       gvc_mixer_stream_get_ports       (GvcMixerStream *stream);
 
73
gboolean            gvc_mixer_stream_change_port     (GvcMixerStream *stream,
 
74
                                                      const char     *port);
 
75
 
 
76
pa_volume_t         gvc_mixer_stream_get_volume      (GvcMixerStream *stream);
 
77
gdouble             gvc_mixer_stream_get_decibel     (GvcMixerStream *stream);
 
78
gboolean            gvc_mixer_stream_push_volume     (GvcMixerStream *stream);
 
79
pa_volume_t         gvc_mixer_stream_get_base_volume (GvcMixerStream *stream);
 
80
 
 
81
gboolean            gvc_mixer_stream_get_is_muted    (GvcMixerStream *stream);
 
82
gboolean            gvc_mixer_stream_get_can_decibel (GvcMixerStream *stream);
 
83
gboolean            gvc_mixer_stream_change_is_muted (GvcMixerStream *stream,
 
84
                                                      gboolean        is_muted);
 
85
gboolean            gvc_mixer_stream_is_running      (GvcMixerStream *stream);
 
86
const char *        gvc_mixer_stream_get_name        (GvcMixerStream *stream);
 
87
const char *        gvc_mixer_stream_get_icon_name   (GvcMixerStream *stream);
 
88
GIcon *             gvc_mixer_stream_get_gicon       (GvcMixerStream *stream);
 
89
const char *        gvc_mixer_stream_get_description (GvcMixerStream *stream);
 
90
const char *        gvc_mixer_stream_get_application_id (GvcMixerStream *stream);
 
91
gboolean            gvc_mixer_stream_is_event_stream (GvcMixerStream *stream);
 
92
gboolean            gvc_mixer_stream_is_virtual      (GvcMixerStream *stream);
 
93
gint                gvc_mixer_stream_get_card_index  (GvcMixerStream *stream);
 
94
 
 
95
/* private */
 
96
gboolean            gvc_mixer_stream_set_volume      (GvcMixerStream *stream,
 
97
                                                      pa_volume_t     volume);
 
98
gboolean            gvc_mixer_stream_set_decibel     (GvcMixerStream *stream,
 
99
                                                      gdouble         db);
 
100
gboolean            gvc_mixer_stream_set_is_muted    (GvcMixerStream *stream,
 
101
                                                      gboolean        is_muted);
 
102
gboolean            gvc_mixer_stream_set_can_decibel (GvcMixerStream *stream,
 
103
                                                      gboolean        can_decibel);
 
104
gboolean            gvc_mixer_stream_set_name        (GvcMixerStream *stream,
 
105
                                                      const char     *name);
 
106
gboolean            gvc_mixer_stream_set_description (GvcMixerStream *stream,
 
107
                                                      const char     *description);
 
108
gboolean            gvc_mixer_stream_set_icon_name   (GvcMixerStream *stream,
 
109
                                                      const char     *name);
 
110
gboolean            gvc_mixer_stream_set_is_event_stream (GvcMixerStream *stream,
 
111
                                                          gboolean is_event_stream);
 
112
gboolean            gvc_mixer_stream_set_is_virtual  (GvcMixerStream *stream,
 
113
                                                      gboolean is_event_stream);
 
114
gboolean            gvc_mixer_stream_set_application_id (GvcMixerStream *stream,
 
115
                                                         const char *application_id);
 
116
gboolean            gvc_mixer_stream_set_base_volume (GvcMixerStream *stream,
 
117
                                                      pa_volume_t     base_volume);
 
118
gboolean            gvc_mixer_stream_set_port        (GvcMixerStream *stream,
 
119
                                                      const char     *port);
 
120
gboolean            gvc_mixer_stream_set_ports       (GvcMixerStream *stream,
 
121
                                                      GList          *ports);
 
122
gboolean            gvc_mixer_stream_set_card_index  (GvcMixerStream *stream,
 
123
                                                      gint            card_index);
 
124
 
 
125
G_END_DECLS
 
126
 
 
127
#endif /* __GVC_MIXER_STREAM_H */