-
Notifications
You must be signed in to change notification settings - Fork 0
/
wmmixer.h
81 lines (62 loc) · 1.64 KB
/
wmmixer.h
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
// wmmixer.h - A mixer designed for WindowMaker
//
// Release 1.5
// Copyright (C) 1998 Sam Hawker <[email protected]>
// Copyright (C) 2002 Gordon Fraser <[email protected]>
// This software comes with ABSOLUTELY NO WARRANTY
// This software is free software, and you are welcome to redistribute it
// under certain conditions
// See the COPYING file for details.
#ifndef __wmmixer_h__
#define __wmmixer_h__
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <unistd.h>
#include <getopt.h>
#include <iostream>
#include <string>
#include <X11/X.h>
#include "mixer.h"
#include "xhandler.h"
#include "common.h"
#include "exception.h"
// For repeating next and prev buttons
#define RPTINTERVAL 5
class WMMixer {
public:
WMMixer();
~WMMixer();
void init(int, char **);
void loop();
private:
// Mixer
Mixer *mixer;
std::string mixer_device;
unsigned num_channels;
unsigned current_channel;
unsigned current_channel_left;
unsigned current_channel_right;
bool current_recording;
bool current_show_recording;
XHandler *xhandler;
unsigned *channel_list;
int repeat_timer;
// For draggable volume control
bool dragging;
// Default scroll amount
int wheel_scroll;
// Input/Output
void readConfigurationFile();
void displayVersion(void);
void displayUsage(const char*);
void checkVol(bool);
void motionEvent(XMotionEvent *xev);
void releaseEvent(XButtonEvent *xev);
void pressEvent(XButtonEvent *xev);
void parseArgs(int , char **);
void initMixer();
void initXHandler();
void updateDisplay();
};
#endif //__wmmixer_h__