wmbiff: Remove unused variable.
[dockapps.git] / wmbutton / wmbutton.h
blobb653e7dcacc48a8a9a4ae75b5c70741375ca5196
1 /* wmbutton.h - Edward H. Flora - ehf_dockapps@cox.net */
2 /* Last Modified 3/27/04 */
4 /****** Include Files ***************************************************/
5 #include <X11/Xlib.h>
6 #include <X11/Xutil.h>
7 #include <X11/xpm.h>
8 #include <X11/extensions/shape.h>
9 #include <X11/keysym.h>
10 #include <math.h>
11 #include <stdlib.h>
12 #include <string.h>
13 #include <ctype.h>
14 #include <sys/time.h>
15 #include <unistd.h>
17 /****** Define Config File Info ***************************************/
18 #define CONFFILENAME "/.wmbutton" /* Default conf filename $HOME/.wmbutton */
19 #define CONFIGGLOBAL "/etc/wmbutton.conf" /* system configuration */
20 #define BUTTONFILENAME "/.wmbutton.xpm"
22 /****** Version Number *************************************************/
23 #define VER_STR "0.7.0" /* Version Number String */
25 /****** Define Error Codes *********************************************/
26 #define FAILDISP 20
27 #define FAILSWIN 21
28 #define FAILICON 22
29 #define FAILXPM 23
30 #define FAILWNAM 24
31 #define FAILGC 25
32 #define FAILCONF 26
33 #define FAILTMPL 27
34 #define FAILVIS 28
35 #define FAILBUT 29
37 /****** Define Other Options ****************************************/
38 #define VERB 0 /* Enable=1, Disable=0: Debugging (verbose) Mode*/
39 #define LMASK 0 /* left button mask: run app # mask + button #*/
40 #define MMASK 10 /* middle button mask: run app # mask + button #*/
41 #define RMASK 20 /* right button mask: run app # mask + button #*/
42 #define NUMB_OF_APPS 9 /* Define number of apps */
44 #define EOLN '\n' /* Defines the new line character */
45 #define SIZE1 20 /* Defines the increment to increase the */
46 /* string by until a newline of EOF is found */
48 /****** Defines for Tool Tips ***************************************/
49 #define TOOLTIP_SUPPORT 1
50 #define TOOLTIP_FONT "-*-helvetica-medium-r-normal-*-10-*-*-*-*-*-*-*"
51 #define TOOLTIP_FONT_LEN 128
52 #define TOOLTIP_SHOW_DELAY 750
53 #define TOOLTIP_RESHOW_DELAY 1500
55 #define TOOLTIP_SPACE 12
56 #define TOOLTIP_TOP 0
57 #define TOOLTIP_BOTTOM 1
58 #define TOOLTIP_LEFT 0
59 #define TOOLTIP_RIGHT 2
61 #define BUTTON_SIZE 18
62 #define BUTTON_COLS 3
64 #define BUFFER_SIZE 1024
66 /****** Typedefs *******************************************/
68 struct Config_t {
69 char *configfile;
70 char *buttonfile;
71 char *Geometry_str;
72 char *Display_str;
73 int mmouse;
74 int Verbose;
75 char* szTooltipFont;
76 int bTooltipSwapColors;
77 int bTooltipDisable;
80 /****** Function Prototyes *******************************************/
81 void RunAppN(int app); /* function to run app N as found in conf file */
82 char *Parse(int app); /* parse data in config file */
83 void parseargs(int argc, char **argv);
84 char *readln(FILE *fp); /* read line from file, return pointer to it */
85 void err_mess(int err, char *str); /* Error Handling Routine */
86 void show_usage(void); /* show usage message to stderr */
87 int flush_expose(Window w);
90 /****** Tooltip Function Prototypes **********************************/
91 void initTooltip(void);
92 void destroyTooltip(void);
93 int hasTooltipSupport(void);
94 void showTooltip(int nButton, int nMouseX, int nMouseY);
95 void hideTooltip(void);
96 int hasTooltip(void);
97 void drawTooltipBalloon(Pixmap pix, GC gc, int x, int y, int w, int h, int side);
98 Pixmap createTooltipPixmap(int width, int height, int side, Pixmap *mask);
100 void initTime(void);
101 long currentTimeMillis(void);
102 void getWindowOrigin(Window w, int *nX, int *nY);
103 void getButtonLocation(int nButton, int *nLocationX, int *nLocationY);
104 char *getButtonAppNames(int nButton);
106 /**********************************************************************/