File: volume.h

package info (click to toggle)
gkrellm-volume 2.1.13-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 304 kB
  • ctags: 241
  • sloc: ansic: 1,929; makefile: 68
file content (86 lines) | stat: -rw-r--r-- 1,964 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* GKrellM Volume plugin 
|  Copyright (C) 1999-2000 Sjoerd Simons
|
|  Author:  Sjoerd Simons  sjoerd@luon.net
|
|  This program is free software which I release under the GNU General Public
|  License. You may redistribute and/or modify this program under the terms
|  of that license as published by the Free Software Foundation; either
|  version 2 of the License, or (at your option) any later version.
|
|  This program is distributed in the hope that it will be useful,
|  but WITHOUT ANY WARRANTY; without even the implied warranty of
|  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
|  GNU General Public License for more details.
|
|  To get a copy of the GNU General Puplic License,  write to the
|  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include "mixer.h"

#define VOLUME_MAJOR_VERSION 2
#define VOLUME_MINOR_VERSION 1
#define VOLUME_EXTRA_VERSION 12

#define CONFIG_KEYWORD "volume_plugin_config"

#define LOCATION MON_APM 
/* The location of the plugin, choose between :
|*   MON_CLOCK, MON_CPU, MON_PROC, MON_DISK,
|*   MON_INET, MON_NET, MON_FS, MON_MAIL,       
|*   MON_APM, or MON_UPTIME                    
*/

/* per slider flags */
enum {
 IS_PRESSED =0,
 SAVE_VOLUME,
 BALANCE,
 MUTED
};

/* global flags */
enum {
  MUTEALL =0
};
/* flags macro's */
#define SET_FLAG(s,x) (s |= (1 << x))
#define DEL_FLAG(s,x) (s = s & ~(1<<x))
#define GET_FLAG(s,x) (s & (1<<x))
/******/

typedef struct Slider Slider;
typedef struct Mixer Mixer;

typedef struct{
  GkrellmKrell *krell;
  GkrellmPanel *panel;
  GkrellmDecal *decal;
  int flags;
  Slider *slider;
} Bslider;

struct  Slider {
  GkrellmKrell *krell;
  GkrellmPanel *panel;
  GkrellmDecalbutton *button;
  mixer_t *mixer;
  Mixer *parent;
  int dev;
  int flags;
  int pleft,pright;
  int balance; /* [-100..100] */
  Slider *next;
  Bslider *bal;
};



struct Mixer {
  char *id;
  mixer_t *mixer;
  Slider *Sliderz;
  Mixer *next;
};