1 #define MCMD_NOP 1
2 #define MCMD_GET_VERSION 2
3 #define MCMD_SEND_EVENT 4
4 #define MCMD_SET_BROKER 5
5 #define MCMD_ROTATE_SCREEN 6
6 #define MCMD_ADD_KEYGRAB 7
7 #define MCMD_DEL_KEYGRAB 8
8 #define MCMD_FRONT 9
9 #define MCMD_BACK 10
10 #define MCMD_ICONIFY 11
11 #define MCMD_CREATEAPPICON 12
12 #define MCMD_ERRORMSG 14
13 #define MCMD_SETAPPWINDOW 15
14 #define MCMD_GETICONDIR 16
15 #define MCMD_GETICONPALETTE 17
16 #define MCMD_MANAGEMENU 18
17 
18 struct mcmd_header {
19   XID id;
20   int cmd;
21   int len;
22 };
23 
24 struct mcmd_event {
25   unsigned long mask;
26   XEvent event;
27 };
28 
29 struct mcmd_keygrab {
30   struct mcmd_keygrab *next;
31   int id;
32   struct module *owner;
33   int keycode;
34   unsigned int modifiers;
35 };
36 
37 struct NewAppIcon {
38   int x, y;
39   Pixmap pm1, pm2, pmm;
40   char name[1];
41 };
42 
43 extern struct module {
44   struct module *next;
45   int in_fd, out_fd;
46   pid_t pid;
47   struct mcmd_header mcmd;
48   char *in_ptr;
49   int in_left;
50   int in_phase;
51   char *in_buf;
52   int in_buf_size;
53   struct {
54     int exists;
55     unsigned long mask;
56   } broker;
57   struct Item *menuitems;
58 } *modules;
59