1 /*--------------------------------*/
2 /* a simple dockapp library */
3 /* made from scratch */
4 /*--------------------------------*/
7 functions were written by following People:
13 --- built-in Dock module for WindowMaker
16 --- wmgeneral (taken from wmppp)
17 Martijn Pieterse (pieterse@xs4all.nl)
24 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
25 # define INLINE inline
30 typedef struct LinkedList
{
32 struct LinkedList
*tail
;
35 INLINE LinkedList
* list_cons(void* head
, LinkedList
* tail
);
37 INLINE
int list_length(LinkedList
* list
);
39 INLINE
void* list_nth(int index
, LinkedList
* list
);
41 INLINE
void list_remove_head(LinkedList
** list
);
43 INLINE LinkedList
*list_remove_elem(LinkedList
* list
, void* elem
);
45 INLINE
void list_mapcar(LinkedList
* list
, void(*function
)(void*));
47 INLINE LinkedList
*list_find(LinkedList
* list
, void* elem
);
49 INLINE
void list_free(LinkedList
* list
);
52 extern void parse_command(char *, char ***, int *);
54 extern pid_t
execCommand(char *);
61 #define MAX_MOUSE_REGION (8)
67 typedef struct _rckeys rckeys
;
77 XpmAttributes attributes
;
91 /***********************/
92 /* Function Prototypes */
93 /***********************/
95 void AddMouseRegion(unsigned index
, int left
, int top
, int right
, int bottom
);
96 int CheckMouseRegion(int x
, int y
);
98 void openXwindow(int argc
, char *argv
[], char **, char *, int, int);
99 void RedrawWindow(void);
100 void RedrawWindowXY(int x
, int y
);
102 void copyXPMArea(int, int, int, int, int, int);
103 void copyXBMArea(int, int, int, int, int, int);
104 void setMaskXY(int, int);
106 void parse_rcfile(const char *, rckeys
*);
112 #define null_char '\0'
113 #define crlf_char '\n'
116 #define MAX_LINE_LEN 512
117 #define MAX_VALUE_LEN 256
119 #define MAX_PATH 1024
121 char* p_getfilename_config (char *config_dir
, char *config_filename
);
122 void* p_prefs_openfile (char *filename
, int openmode
);
123 void p_prefs_closefile (void);
124 void p_prefs_put_int (char *tagname
, int value
);
125 void p_prefs_put_float (char *tagname
, float value
);
126 void p_prefs_put_string (char *tagname
, char *value
);
127 void p_prefs_put_lf (void);
128 void p_prefs_put_comment (char *comment
);
129 int p_prefs_get_int (char *tagname
);
130 float p_prefs_get_float (char *tagname
);
131 char* p_prefs_get_string (char *tagname
);