| 1 | #ifndef PROGRAM_H |
| 2 | #define PROGRAM_H |
| 3 | |
| 4 | #include <X11/Xlib.h> |
| 5 | #include <X11/Xft/Xft.h> |
| 6 | |
| 7 | #define MAX_ITEMS 512 |
| 8 | #define MAX_NAME_LEN 256 |
| 9 | #define MAX_LINE_LENGTH 256 |
| 10 | |
| 11 | #if defined(__OpenBSD__) |
| 12 | #define FGCOL 0xb8b515 |
| 13 | #define FGSEL 0x12120f |
| 14 | #define BGSEL 0xf2ea57 |
| 15 | #define BGCOL 0x232320 |
| 16 | #elif defined(__FreeBSD__) |
| 17 | #define FGCOL 0xb61729 |
| 18 | #define FGSEL 0x120f0f |
| 19 | #define BGSEL 0xf35869 |
| 20 | #define BGCOL 0x232020 |
| 21 | #endif |
| 22 | |
| 23 | typedef struct { |
| 24 | char name[MAX_NAME_LEN]; |
| 25 | char keys[MAX_NAME_LEN]; |
| 26 | char exec[MAX_NAME_LEN]; |
| 27 | char term[MAX_NAME_LEN]; |
| 28 | int x, y, width, height; |
| 29 | } Program; |
| 30 | |
| 31 | void fetch_programs(); |
| 32 | void launch_program(const char *exec, const char *term); |
| 33 | int filtercount(const char *input); |
| 34 | void calculate_dimensions(int win_width, int win_height); |
| 35 | |
| 36 | extern Program programs[MAX_ITEMS]; |
| 37 | extern int programcount; |
| 38 | extern int window_width; |
| 39 | extern int window_height; |
| 40 | extern int item_height; |
| 41 | extern int display_items; |
| 42 | |
| 43 | #endif |