wmfu: Indicate directory of wireless header file.
[dockapps.git] / AlsaMixer.app / Mixer.h
blob187a7fb4393b732c65b9fdb35746b0572bc08232
1 //
2 // Mixer.app
3 //
4 // Copyright (c) 1998-2002 Per Liden
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307,
19 // USA.
22 #ifndef _MIXER_H_
23 #define _MIXER_H_
25 #include "AMixer/AMixer.h"
27 #include <X11/Xlib.h>
29 #define APPNAME "AlsaMixer.app"
30 #define VERSION "1.8.0"
31 #define INSTANCENAME "alsamixer_app"
32 #define CLASSNAME "AlsaMixer_app"
33 #define SETTINGS "/GNUstep/Defaults/AlsaMixer"
34 #define MAX_COMMAND_LENGTH 512
36 #define LABEL_X 4
37 #define LABEL_Y 54
38 #define LABEL_FONT "-*-helvetica-medium-r-*-*-8-*-*-*-*-*-*-*"
40 #define LED_X 57
41 #define LED_Y 59
42 #define BUTTON_MIN 45
43 #define BUTTON_MAX 6
45 class Mixer
47 public:
48 Mixer(int argc, char** argv);
49 ~Mixer() {};
50 void run();
51 void saveVolumeSettings();
53 private:
54 void tryHelp(char* appname);
55 void showHelp();
56 void checkArgument(char** argv, int argc, int index);
57 void showErrorLed();
58 void findMixerDevice();
59 void getVolume();
60 void setVolume(int button, int volume);
61 void toggleMute(int button);
62 void setButtonType(int button);
63 void setButtonPosition(int button, int position);
64 void setButtonPositionRelative(int button, int relativePosition);
65 void loadVolumeSettings();
67 Display* mDisplay;
68 Window mRoot;
69 Window mAppWin;
70 Window mIconWin;
71 Window mButton[3];
72 char* mMixerDevice;
73 char* mInstanceName;
74 char* mLabelText;
75 char* mSettingsFile;
76 char* mCommand;
77 int mError;
78 int mVolumeSource[3];
79 int mVolume[3];
80 int mVolumePos[3];
81 int mVolumeMute[3];
82 int mWheelButton;
83 bool mSaveSettings;
84 bool mLoadSettings;
85 AMixer* aMixer;
88 #endif