~ubuntu-branches/ubuntu/utopic/rhythmbox/utopic-proposed

« back to all changes in this revision

Viewing changes to widgets/bacon-volume.h

Tags: upstream-0.9.2
ImportĀ upstreamĀ versionĀ 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Volume Button / popup widget
 
2
 * (c) copyright 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Library General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2 of the License, or (at your option) any later version.
 
8
 *
 
9
 * This library is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * Library General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Library General Public
 
15
 * License along with this library; if not, write to the
 
16
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
 * Boston, MA 02111-1307, USA.
 
18
 */
 
19
 
 
20
#ifndef __BACON_VOLUME_BUTTON_H__
 
21
#define __BACON_VOLUME_BUTTON_H__
 
22
 
 
23
#include <gtk/gtkbutton.h>
 
24
#include <gtk/gtkicontheme.h>
 
25
 
 
26
G_BEGIN_DECLS
 
27
 
 
28
#define BACON_TYPE_VOLUME_BUTTON \
 
29
  (bacon_volume_button_get_type ())
 
30
#define BACON_VOLUME_BUTTON(obj) \
 
31
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), BACON_TYPE_VOLUME_BUTTON, \
 
32
                               BaconVolumeButton))
 
33
 
 
34
typedef struct _BaconVolumeButton {
 
35
  GtkButton parent;
 
36
 
 
37
  /* popup */
 
38
  GtkWidget *dock, *scale, *image, *plus, *min;
 
39
  GtkIconSize size;
 
40
  gint click_id;
 
41
  float direction;
 
42
  gboolean timeout;
 
43
  guint32 pop_time;
 
44
  GtkIconTheme *theme;
 
45
} BaconVolumeButton;
 
46
 
 
47
typedef struct _BaconVolumeButtonClass {
 
48
  GtkButtonClass parent_class;
 
49
 
 
50
  /* signals */
 
51
  void  (* value_changed)       (BaconVolumeButton * button);
 
52
 
 
53
  gpointer __bla[4];
 
54
} BaconVolumeButtonClass;
 
55
 
 
56
GType           bacon_volume_button_get_type    (void);
 
57
 
 
58
GtkWidget *     bacon_volume_button_new         (GtkIconSize size,
 
59
                                                 float min, float max,
 
60
                                                 float step);
 
61
float           bacon_volume_button_get_value   (BaconVolumeButton * button);
 
62
void            bacon_volume_button_set_value   (BaconVolumeButton * button,
 
63
                                                 float value);
 
64
 
 
65
G_END_DECLS
 
66
 
 
67
#endif /* __BACON_VOLUME_BUTTON_H__ */