1 /* -*- tab-width: 4; c-basic-offset: 4; -*- */
2 
3 #define	MAX_GROUP       4
4 
5 #define	When_create         (1<<0)
6 #define	When_change         (1<<1)
7 #define	When_start          (1<<2)
8 #define	Focus_out           (1<<3)
9 #define	Two_state           (1<<4)
10 #define	Button_enable       (1<<5)
11 #define	Main_enable         (1<<6)
12 #define	WMaker              (1<<7)
13 #define	Button_delete       (1<<8)
14 #define	Main_delete         (1<<9)
15 #define	Bell_enable         (1<<10)
16 #define	Ignore_reverse      (1<<11)
17 
18 #define	But1_reverse        (1<<12)
19 #define	But3_reverse        (1<<13)
20 
21 #define	Forget_window       (1<<14)
22 #define	Label_enable        (1<<15)
23 #define	Main_tray           (1<<16)
24 #define	Main_ontop          (1<<17)
25 
26 #define	SYSTEM_TRAY_REQUEST_DOCK    0
27 #define	SYSTEM_TRAY_BEGIN_MESSAGE   1
28 #define	SYSTEM_TRAY_CANCEL_MESSAGE  2
29 
30 #define	GrpMask             (0x3)
31 #define	AltGrp              (1<<2)
32 #define	InitAltGrp          (1<<3)
33 #define	Ignore              (1<<4)
34 
35 typedef struct {
36 	int	mask;
37 	int	x,y;
38 	unsigned int width, height;
39 	int	gravity;
40 } Geometry;
41 
42 typedef enum { T_string, T_bool, T_int, T_ulong } ResType;
43 typedef enum { WMClassClass = 0, WMClassName, WMName, Prop } MatchType;
44 typedef int  ListAction;
45 
46 typedef struct __SearchList {
47 	ListAction	action;
48 	MatchType	type;
49 	int		num;
50 	char		**idx;
51 	char		*list;
52 	struct __SearchList *next;
53 } SearchList;
54 
55 typedef	struct {
56 	Geometry geometry;
57 	Pixmap   pictures[MAX_GROUP];
58 	Pixmap   shapemask[MAX_GROUP];
59 #ifdef SHAPE_EXT
60 	Pixmap   boundmask[MAX_GROUP];
61 #endif
62 	unsigned int  border_width, border_color;
63 } XXkbElement;
64 
65 typedef struct {
66 	unsigned long controls;
67 	int          Base_group, Alt_group, Bell_percent;
68 	char*        user_config; /* filename */
69 	XXkbElement  mainwindow, button;
70 	SearchList*  app_lists[sizeof(MatchType)];
71 } XXkbConfig;
72 
73 
74 /* Implemented in xxkb.c */
75 extern void ErrHandler(Display *dpy, XErrorEvent *err);
76 extern char* PrependProgramName(char *string);
77 
78 /* Implemented in resource.c */
79 extern int GetConfig(Display *dpy, XXkbConfig *conf);
80 extern void AddAppToIgnoreList(XXkbConfig *conf, char* app_ident, MatchType type);
81 
82 extern Display *dpy;
83 
84 #ifdef SHAPE_EXT
85 extern Bool shape_ext;
86 #endif
87