File: dat.h

package info (click to toggle)
w9wm 0.4.2-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 280 kB
  • ctags: 393
  • sloc: ansic: 4,886; makefile: 11
file content (130 lines) | stat: -rw-r--r-- 3,095 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/* Copyright (c) 1994 David Hogan, 2000 Benjamin Drieu, see README for licence details */

#define BORDER      _border
#define MAXHIDDEN   32
#define B3FIXED     5
#define NUMVIRTUALS 12
#define NUMMENUITEMS 32

#define AllButtonMask   (Button1Mask|Button2Mask|Button3Mask \
            |Button4Mask|Button5Mask)
#define ButtonMask  (ButtonPressMask|ButtonReleaseMask)
#define MenuMask    (ButtonMask|ButtonMotionMask|ExposureMask)
#define MenuGrabMask    (ButtonMask|ButtonMotionMask|StructureNotifyMask)

#ifdef  Plan9
#define DEFSHELL    "/bin/rc"
#else
#define DEFSHELL    "/bin/sh"
#endif

typedef struct Client   Client;
typedef struct Menu Menu;

struct Client {
    Window      window;
    Window      parent;
    Window      trans;
    Client      *next;
    Client      *revert;

    int         x;
    int         y;
    int         dx;
    int         dy;
    int         border;

    XSizeHints  size;
    int         min_dx;
    int         min_dy;

    int         state;
    int         init;
    int         reparenting;
    int         is9term;
    int         hold;
    int         proto;

    char        *label;
    char        *instance;
    char        *class;
    char        *name;
    char        *iconname;

    Colormap    cmap;
    int         ncmapwins;
    Window      *cmapwins;
    Colormap    *wmcmaps;

    /* benj: virtual screen */
    int		virtual;
};

#define hidden(c)       ((c)->state == IconicState)
#define withdrawn(c)    ((c)->state == WithdrawnState)
#define normal(c)       ((c)->state == NormalState)

/* c->proto */
#define Pdelete     1
#define Ptakefocus  2

struct Menu {
    char    **item;
    char    *(*gen)();
    int lasthit;
};

/* 9wm.c */
extern Display      *dpy;
extern int          screen;
extern Window       root;
extern Window       menuwin;
extern Colormap     def_cmap;
extern int          initting;
extern GC           gc;
extern XFontStruct  *font;
extern int          nostalgia;
extern Atom	    exit_9wm;
extern Atom	    restart_9wm;
extern Atom         wm_state;
extern Atom         _9wm_hold_mode;
extern Atom         wm_protocols;
extern Atom         wm_delete;
extern Atom         wm_take_focus;
extern Atom         wm_colormaps;
extern unsigned long    black;
extern unsigned long    white;
extern Bool         shape;
extern char         *termprog;
extern char         *shell;
extern char         *version[];
extern int          _border;
extern int          min_cmaps;
extern int          curtime;
extern int          debug;
extern int	    click_passes;
extern int	    use_keys;
/* client.c */
extern Client       *clients;
extern Client       *current;

/* menu.c */
extern Client       *hiddenc[];
extern int          numhidden;
extern char         *b3items[];
extern Menu         b3menu;
extern int	    virtual;
extern Client *	    currents[];
extern Menu	    progs;
extern char *	    progsnames[];

/* cursor.c */
extern Cursor       target;
extern Cursor       sweep0;
extern Cursor       boxcurs;
extern Cursor       arrow;
extern Pixmap       root_pixmap;

/* error.c */
extern int          ignore_badwindow;