JWM Source Documentation
jwm.h
Go to the documentation of this file.
1 
10 #ifndef JWM_H
11 #define JWM_H
12 
13 #include "../config.h"
14 
15 #ifndef MAKE_DEPEND
16 
17 # include <stdio.h>
18 # include <stdlib.h>
19 # include <string.h>
20 # include <ctype.h>
21 # include <limits.h>
22 
23  /* Ideally png.h would be included in image.c, which is the only
24  * file that references it. Unfortunately, if setjmp.h is included
25  * before png.h, png.h will complain about only including setjmp.h
26  * once. The X headers apparently include setjmp.h, so I don't have
27  * any control over the situation. Fortunately png.h can't complain
28  * if it was included first. */
29 # ifdef USE_PNG
30 # include <png.h>
31 # else
32 # include <setjmp.h>
33 # endif
34 
35 # ifdef HAVE_LOCALE_H
36 # include <locale.h>
37 # endif
38 # ifdef HAVE_LIBINTL_H
39 # include <libintl.h>
40 # endif
41 # ifdef HAVE_STDARG_H
42 # include <stdarg.h>
43 # endif
44 # ifdef HAVE_SIGNAL_H
45 # include <signal.h>
46 # endif
47 # ifdef HAVE_UNISTD_H
48 # include <unistd.h>
49 # endif
50 # ifdef HAVE_TIME_H
51 # include <time.h>
52 # endif
53 # ifdef HAVE_SYS_WAIT_H
54 # include <sys/wait.h>
55 # endif
56 # ifdef HAVE_SYS_TIME_H
57 # include <sys/time.h>
58 # endif
59 # ifdef HAVE_SYS_SELECT_H
60 # include <sys/select.h>
61 # endif
62 
63 # include <X11/Xlib.h>
64 # ifdef HAVE_X11_XUTIL_H
65 # include <X11/Xutil.h>
66 # endif
67 # ifdef HAVE_X11_XRESOURCE_H
68 # include <X11/Xresource.h>
69 # endif
70 # ifdef HAVE_X11_CURSORFONT_H
71 # include <X11/cursorfont.h>
72 # endif
73 # ifdef HAVE_X11_XPROTO_H
74 # include <X11/Xproto.h>
75 # endif
76 # ifdef HAVE_X11_XATOM_H
77 # include <X11/Xatom.h>
78 # endif
79 # ifdef HAVE_X11_KEYSYM_H
80 # include <X11/keysym.h>
81 # endif
82 
83 # ifdef USE_SHAPE
84 # include <X11/extensions/shape.h>
85 # endif
86 
87 # ifdef USE_XMU
88 # include <X11/Xmu/Xmu.h>
89 # endif
90 
91 # ifdef USE_XINERAMA
92 # include <X11/extensions/Xinerama.h>
93 # endif
94 # ifdef USE_XFT
95 # ifdef HAVE_FT2BUILD_H
96 # include <ft2build.h>
97 # endif
98 # include <X11/Xft/Xft.h>
99 # endif
100 # ifdef USE_XRENDER
101 # include <X11/extensions/Xrender.h>
102 # endif
103 # ifdef USE_FRIBIDI
104 # include <fribidi/fribidi.h>
105 # endif
106 
107 #endif /* MAKE_DEPEND */
108 
109 #ifndef _
110 # ifdef HAVE_GETTEXT
111 # define _ gettext
112 # else
113 # define _
114 # endif
115 #endif
116 
120 #define MAX_WINDOW_WIDTH (1 << 15)
121 #define MAX_WINDOW_HEIGHT (1 << 15)
122 
123 #define MAX_INCLUDE_DEPTH 16
124 #define MOVE_DELTA 3
125 #define RESTART_DELAY 1000
126 #define URGENCY_DELAY 500
128 #define SHELL_NAME "/bin/sh"
129 
130 #ifdef __GNUC__
131 # if __GNUC__ >= 3
132 # define JLIKELY(x) __builtin_expect(!!(x), 1)
133 # define JUNLIKELY(x) __builtin_expect(!!(x), 0)
134 # else
135 # warning "JLIKELY/JUNLIKELY not available with this version of gcc"
136 # define JLIKELY(x) (x)
137 # define JUNLIKELY(x) (x)
138 # endif
139 #else
140 # warning "JLIKELY/JUNLIKELY not available with this compiler"
141 # define JLIKELY(x) (x)
142 # define JUNLIKELY(x) (x)
143 #endif
144 
145 #include "debug.h"
146 #include "jxlib.h"
147 
148 #endif /* JWM_H */
149 

joewing.net / Projects / JWM