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];
88 char window_class_
[256];
103 // X-Windows basics - standard
104 Atom _XA_GNUSTEP_WM_FUNC
;
108 unsigned long getColor(char*);
109 unsigned long mixColor(char*, int, char*, int);
110 void drawButton(int, int, int, int, bool);
111 void initPixmaps(int);
112 void initWindow(int, char**);
113 void initGraphicsContext();
118 int flush_expose(Window
);
123 void init(int, char**, int);
126 void update(unsigned);
127 void drawLeft(unsigned);
128 void drawRight(unsigned);
129 void drawBtns(int, bool);
130 void drawMono(unsigned);
132 bool isLeftButton(int, int);
133 bool isRightButton(int, int);
134 bool isMuteButton(int, int);
135 bool isRecButton(int, int);
136 bool isVolumeBar(int, int);
138 Display
* getDisplay() {return display_default_
;}
139 int getButtonState();
140 void setButtonState(int);
141 void setDisplay(char* arg
);
142 void setPosition(char* arg
);
143 void setLedColor(char* arg
);
144 void setLedHighColor(char* arg
);
145 void setBackColor(char* arg
);
146 void setWindowClass(char* arg
);
148 void setWindowMaker();
155 #endif //__xhandler_h__