JWM Source Documentation
jwm.h
Go to the documentation of this file.
00001 00010 #ifndef JWM_H 00011 #define JWM_H 00012 00013 #include "../config.h" 00014 00015 #ifndef MAKE_DEPEND 00016 00017 # include <stdio.h> 00018 # include <stdlib.h> 00019 # include <ctype.h> 00020 # include <limits.h> 00021 00022 /* Ideally png.h would be included in image.c, which is the only 00023 * file that references it. Unfortunately, if setjmp.h is included 00024 * before png.h, png.h will complain about only including setjmp.h 00025 * once. The X headers apparently include setjmp.h, so I don't have 00026 * any control over the situation. Fortunately png.h can't complain 00027 * if it was included first. */ 00028 # ifdef USE_PNG 00029 # include <png.h> 00030 # else 00031 # include <setjmp.h> 00032 # endif 00033 00034 # ifdef HAVE_LOCALE_H 00035 # include <locale.h> 00036 # endif 00037 # ifdef HAVE_LIBINTL_H 00038 # include <libintl.h> 00039 # endif 00040 # ifdef HAVE_STDARG_H 00041 # include <stdarg.h> 00042 # endif 00043 # ifdef HAVE_SIGNAL_H 00044 # include <signal.h> 00045 # endif 00046 # ifdef HAVE_UNISTD_H 00047 # include <unistd.h> 00048 # endif 00049 # ifdef HAVE_TIME_H 00050 # include <time.h> 00051 # endif 00052 # ifdef HAVE_SYS_WAIT_H 00053 # include <sys/wait.h> 00054 # endif 00055 # ifdef HAVE_SYS_TIME_H 00056 # include <sys/time.h> 00057 # endif 00058 # ifdef HAVE_SYS_SELECT_H 00059 # include <sys/select.h> 00060 # endif 00061 00062 # include <X11/Xlib.h> 00063 # ifdef HAVE_X11_XUTIL_H 00064 # include <X11/Xutil.h> 00065 # endif 00066 # ifdef HAVE_X11_XRESOURCE_H 00067 # include <X11/Xresource.h> 00068 # endif 00069 # ifdef HAVE_X11_CURSORFONT_H 00070 # include <X11/cursorfont.h> 00071 # endif 00072 # ifdef HAVE_X11_XPROTO_H 00073 # include <X11/Xproto.h> 00074 # endif 00075 # ifdef HAVE_X11_XATOM_H 00076 # include <X11/Xatom.h> 00077 # endif 00078 # ifdef HAVE_X11_KEYSYM_H 00079 # include <X11/keysym.h> 00080 # endif 00081 00082 # ifdef USE_SHAPE 00083 # include <X11/extensions/shape.h> 00084 # endif 00085 00086 # ifdef USE_XMU 00087 # include <X11/Xmu/Xmu.h> 00088 # endif 00089 00090 # ifdef USE_XINERAMA 00091 # include <X11/extensions/Xinerama.h> 00092 # endif 00093 # ifdef USE_XFT 00094 # ifdef HAVE_FT2BUILD_H 00095 # include <ft2build.h> 00096 # endif 00097 # include <X11/Xft/Xft.h> 00098 # endif 00099 # ifdef USE_XRENDER 00100 # include <X11/extensions/Xrender.h> 00101 # endif 00102 # ifdef USE_FRIBIDI 00103 # include <fribidi/fribidi.h> 00104 # endif 00105 00106 #endif /* MAKE_DEPEND */ 00107 00108 #ifndef _ 00109 # ifdef HAVE_GETTEXT 00110 # define _ gettext 00111 # else 00112 # define _ 00113 # endif 00114 #endif 00115 00116 #define DEFAULT_DESKTOP_WIDTH 4 00117 #define DEFAULT_DESKTOP_HEIGHT 1 00118 00119 #define MAX_INCLUDE_DEPTH 16 00120 00121 #define MAX_BORDER_WIDTH 32 00122 #define MIN_BORDER_WIDTH 1 00123 #define DEFAULT_BORDER_WIDTH 4 00124 00125 #define MAX_TITLE_HEIGHT 64 00126 #define MIN_TITLE_HEIGHT 2 00127 #define DEFAULT_TITLE_HEIGHT 20 00128 00129 #define MAX_DOUBLE_CLICK_DELTA 32 00130 #define MIN_DOUBLE_CLICK_DELTA 0 00131 #define DEFAULT_DOUBLE_CLICK_DELTA 2 00132 00133 #define MAX_DOUBLE_CLICK_SPEED 2000 00134 #define MIN_DOUBLE_CLICK_SPEED 1 00135 #define DEFAULT_DOUBLE_CLICK_SPEED 400 00136 00137 #define MAX_SNAP_DISTANCE 32 00138 #define MIN_SNAP_DISTANCE 1 00139 #define DEFAULT_SNAP_DISTANCE 5 00140 00141 #define MAX_TRAY_BORDER 32 00142 #define MIN_TRAY_BORDER 0 00143 #define DEFAULT_TRAY_BORDER 1 00144 00145 #define MAX_WINDOW_WIDTH (1 << 15) 00146 #define MAX_WINDOW_HEIGHT (1 << 15) 00147 00148 #define MOVE_DELTA 3 00149 00150 #define RESTART_DELAY 50000 00151 00152 #define SHELL_NAME "/bin/sh" 00153 00154 #define DEFAULT_MENU_TITLE "JWM" 00155 00157 #ifdef USE_SHAPE 00158 # define CORNER_RADIUS 4 00159 #endif 00160 00161 #ifdef __GNUC__ 00162 # if __GNUC__ >= 3 00163 # define JLIKELY(x) __builtin_expect(!!(x), 1) 00164 # define JUNLIKELY(x) __builtin_expect(!!(x), 0) 00165 # else 00166 # warning "JLIKELY/JUNLIKELY not available with this version of gcc" 00167 # define JLIKELY(x) (x) 00168 # define JUNLIKELY(x) (x) 00169 # endif 00170 #else 00171 # warning "JLIKELY/JUNLIKELY not available with this compiler" 00172 # define JLIKELY(x) (x) 00173 # define JUNLIKELY(x) (x) 00174 #endif 00175 00176 #include "debug.h" 00177 #include "jxlib.h" 00178 00179 #endif /* JWM_H */ 00180