1 // wmmixer - A mixer designed for WindowMaker
4 // Copyright (C) 1998 Sam Hawker <shawkie@geocities.com>
5 // Copyright (C) 2002 Gordon Fraser <gordon@debian.org>
6 // This software comes with ABSOLUTELY NO WARRANTY
7 // This software is free software, and you are welcome to redistribute it
8 // under certain conditions
9 // See the COPYING file for details.
12 #ifndef __xhandler_h__
13 #define __xhandler_h__
15 //--------------------------------------------------------------------
17 // X-Windows includes - standard
20 #include <X11/Xutil.h>
21 #include <X11/Xproto.h>
23 #include <X11/extensions/shape.h>
31 // Xpm images - standard
32 #include "XPM/wmmixer.xpm"
33 #include "XPM/tile.xpm"
35 // Xpm images - custom
36 #include "XPM/icons.xpm"
37 #include "XPM/norec.xpm"
39 //--------------------------------------------------------------------
43 #define BTN_RIGHT_X 17
44 #define BTN_RIGHT_Y 34
61 //--------------------------------------------------------------------
74 Display
*display_default_
;
80 unsigned long colors_
[4];
81 unsigned long shade_colors_
[25];
83 char display_name_
[256];
84 char position_name_
[256];
85 char ledcolor_name_
[256];
86 char ledcolor_high_name_
[256];
87 char backcolor_name_
[256];
102 // X-Windows basics - standard
103 Atom _XA_GNUSTEP_WM_FUNC
;
107 unsigned long getColor(char*);
108 unsigned long mixColor(char*, int, char*, int);
109 void drawButton(int, int, int, int, bool);
110 void initPixmaps(int);
111 void initWindow(int, char**);
112 void initGraphicsContext();
117 int flush_expose(Window
);
122 void init(int, char**, int);
125 void update(unsigned);
126 void drawLeft(unsigned);
127 void drawRight(unsigned);
128 void drawBtns(int, bool);
129 void drawMono(unsigned);
131 bool isLeftButton(int, int);
132 bool isRightButton(int, int);
133 bool isMuteButton(int, int);
134 bool isRecButton(int, int);
135 bool isVolumeBar(int, int);
137 Display
* getDisplay() {return display_default_
;}
138 int getButtonState();
139 void setButtonState(int);
140 void setDisplay(char* arg
);
141 void setPosition(char* arg
);
142 void setLedColor(char* arg
);
143 void setLedHighColor(char* arg
);
144 void setBackColor(char* arg
);
146 void setWindowMaker();
153 #endif //__xhandler_h__