/* * Conky, a system monitor, based on torsmo * * This program is licensed under BSD license, read COPYING * * $Id$ */ #ifndef _conky_h_ #define _conky_h_ #include #if defined(HAS_MCHECK_H) #include #endif /* HAS_MCHECK_H */ #include "config.h" #include #include #include #include #include #include #include #if defined(__FreeBSD__) #include #include #endif /* __FreeBSD__ */ #ifdef X11 #if defined(HAVE_CAIRO_H) && defined(HAVE_CAIRO_XLIB_H) && defined(WANT_CAIRO) #define CAIRO #include #include #include #include #endif #endif /* X11 */ #if defined(__FreeBSD__) && (defined(i386) || defined(__i386__)) #include #endif /* __FreeBSD__ */ #if defined(XMMS) || defined(BMP) || defined(AUDACIOUS) || defined(INFOPIPE) #include "xmms.h" #endif #define TOP_CPU 1 #define TOP_NAME 2 #define TOP_PID 3 #define TOP_MEM 4 #define TEXT_BUFFER_SIZE 1280 #define P_MAX_SIZE ((TEXT_BUFFER_SIZE * 4) - 2) #include #define ERR(s, varargs...) \ fprintf(stderr, "Conky: " s "\n", ##varargs) /* critical error */ #define CRIT_ERR(s, varargs...) \ { fprintf(stderr, "Conky: " s "\n", ##varargs); exit(EXIT_FAILURE); } /* in sys/param.h #ifndef MIN #define MIN(a,b) (a>b ? b : a) #endif #ifndef MAX #define MAX(a,b) (a #include #include #ifdef XFT #include #endif #if defined(HAVE_XDBE) && defined(DOUBLE_BUFFER) #define XDBE #include #endif #define ATOM(a) XInternAtom(display, #a, False) #ifdef OWN_WINDOW enum _window_type { TYPE_NORMAL = 0, TYPE_DESKTOP, TYPE_OVERRIDE }; enum _window_hints { HINT_UNDECORATED = 0, HINT_BELOW, HINT_ABOVE, HINT_STICKY, HINT_SKIP_TASKBAR, HINT_SKIP_PAGER }; #define SET_HINT(mask,hint) (mask |= (1<