4 #define CLASS "WMMixer"
6 #define BACKCOLOR "#282828"
7 #define LEDCOLOR "LightSeaGreen"
20 #include <sys/asoundlib.h>
24 #include <X11/Xutil.h>
25 #include <X11/Xproto.h>
27 #include <X11/extensions/shape.h>
35 #include "XPM/wmmixer.xpm"
36 #include "XPM/tile.xpm"
37 #include "XPM/icons.xpm"
49 Atom _XA_GNUSTEP_WM_FUNC
;
58 unsigned long color
[4];
60 snd_mixer_t
*mixer_handle
;
61 snd_mixer_elements_t elements
;
63 typedef struct elementinfoStruct
{
64 snd_mixer_element_info_t info
;
65 snd_mixer_element_t element
;
67 struct elementinfoStruct
*next
;
68 struct elementinfoStruct
*prev
;
89 void initXWin(int argc
, char **argv
);
91 void createWin(Window
*win
, int x
, int y
);
92 unsigned long getColor(char *colorname
);
93 unsigned long mixColor(char *colorname1
, int prop1
, char *colorname2
, int prop2
);
94 void scanArgs(int argc
, char **argv
);
97 void setVol(int left
, int right
);
99 int convert_range(int val
, int omin
, int omax
, int nmin
, int nmax
);
100 void pressEvent(XButtonEvent
*xev
);
101 void releaseEvent(XButtonEvent
*xev
);
102 void motionEvent(XMotionEvent
*xev
);
107 void drawBtns(int btns
);
108 void drawBtn(int x
, int y
, int w
, int h
, int down
);
110 void init_mixer(void);
111 void init_elements(void);
112 elementinfo
*add_element(void);