| 1 | #ifndef UTILS_H |
| 2 | #define UTILS_H |
| 3 | |
| 4 | #include "program.h" |
| 5 | |
| 6 | #include <X11/Xlib.h> |
| 7 | #include <X11/Xft/Xft.h> |
| 8 | |
| 9 | typedef struct { |
| 10 | char name[MAX_NAME_LEN]; |
| 11 | } Dup; |
| 12 | |
| 13 | extern Dup dupn[MAX_NAME_LEN * 2]; |
| 14 | extern int dupcnt; |
| 15 | |
| 16 | #if defined(__linux__) |
| 17 | char *strcasestr(const char *haystack, const char *needle); |
| 18 | #endif |
| 19 | |
| 20 | int isdup(const char *name); |
| 21 | int isdis(const char *filepath); |
| 22 | void add_to_dup(const char *name); |
| 23 | int launch_path(const char *exec); |
| 24 | void cleanup(Display *display, Window window, GC gc, |
| 25 | XftColor *color, XftColor *selcolor, XftDraw *draw, XftFont *font, |
| 26 | Colormap colormap, Visual *visual); |
| 27 | |
| 28 | #endif |