wmail: DAMakePixmapFromData expects an unsigned short pointer.
[dockapps.git] / wmmixer / wmmixer.h
blobffab02d81d616e50d410569a8ea119156cf1a0a7
1 // wmmixer.h - A mixer designed for WindowMaker
2 //
3 // Release 1.5
4 // Copyright (C) 1998 Sam Hawker <shawkie@geocities.com>
5 // Copyright (C) 2002 Gordon Fraser <gordon@debian.org>
6 // Patch added by Rodolfo (kix) Garcia <kix@kix.es> to select the config file
7 // This software comes with ABSOLUTELY NO WARRANTY
8 // This software is free software, and you are welcome to redistribute it
9 // under certain conditions
10 // See the COPYING file for details.
13 #ifndef __wmmixer_h__
14 #define __wmmixer_h_
16 // Input/Output
17 #include <stdio.h>
18 #include <stdlib.h>
19 #include <string.h>
20 #include <unistd.h>
21 #include <getopt.h>
23 #include <iostream>
25 #include <X11/X.h>
27 // WMMixer
28 #include "mixctl.h"
29 #include "xhandler.h"
30 #include "common.h"
31 #include "exception.h"
33 // For repeating next and prev buttons
34 #define RPTINTERVAL 5
35 #define CONFIGFILELEN 256
37 class WMMixer
39 protected:
41 // Mixer
42 MixCtl *mixctl_;
44 char mixer_device_[256];
45 char config_file_[CONFIGFILELEN];
46 unsigned num_channels_;
47 unsigned current_channel_;
48 unsigned current_channel_left_;
49 unsigned current_channel_right_;
50 bool current_recording_;
51 bool current_show_recording_;
53 XHandler *xhandler_;
55 unsigned *channel_list_;
57 int repeat_timer_;
59 // For draggable volume control
60 bool dragging_;
61 // Default scroll amount
62 int wheel_scroll_;
64 // Input/Output
65 void readConfigurationFile();
66 void displayVersion(void);
67 void displayUsage(const char*);
68 void checkVol(bool);
70 void motionEvent(XMotionEvent *xev);
71 void releaseEvent(XButtonEvent *xev);
72 void pressEvent(XButtonEvent *xev);
73 void parseArgs(int , char **);
75 void initMixer();
76 void initXHandler();
78 void updateDisplay();
80 public:
81 WMMixer();
82 ~WMMixer();
84 void init(int, char **);
85 void loop();
89 #endif //__wmmixer_h__