]> git.decadent.org.uk Git - ion3.git/blob - ioncore/global.h
[svn-inject] Installing original source of ion3
[ion3.git] / ioncore / global.h
1 /*
2  * ion/ioncore/global.h
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2006. 
5  *
6  * Ion is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  */
11
12 #ifndef ION_IONCORE_GLOBAL_H
13 #define ION_IONCORE_GLOBAL_H
14
15 #include "common.h"
16
17 #include <X11/Xutil.h>
18 #include <X11/Xresource.h>
19
20 #include "rootwin.h"
21 #include "screen.h"
22 #include "window.h"
23 #include "clientwin.h"
24
25
26 enum{
27     IONCORE_INPUTMODE_NORMAL,
28     IONCORE_INPUTMODE_GRAB,
29     IONCORE_INPUTMODE_WAITRELEASE
30 };
31
32 enum{
33     IONCORE_OPMODE_INIT,
34     IONCORE_OPMODE_NORMAL,
35     IONCORE_OPMODE_DEINIT
36 };
37
38 INTRSTRUCT(WGlobal);
39
40 DECLSTRUCT(WGlobal){
41     int argc;
42     char **argv;
43     
44     Display *dpy;
45     const char *display;
46     int conn;
47     
48     XContext win_context;
49     Atom atom_wm_state;
50     Atom atom_wm_change_state;
51     Atom atom_wm_protocols;
52     Atom atom_wm_delete;
53     Atom atom_wm_take_focus;
54     Atom atom_wm_colormaps;
55     Atom atom_wm_window_role;
56     Atom atom_checkcode;
57     Atom atom_selection;
58     Atom atom_mwm_hints;
59
60     WRootWin *rootwins;
61     WScreen *screens;
62     WRegion *focus_next;
63     bool warp_next;
64     
65     /* We could have a display WRegion but the screen-link could impose
66      * some problems so these are handled as a special case.
67      */
68     WRegion *focus_current;
69     
70     int input_mode;
71     int opmode;
72     
73     Time dblclick_delay;
74     int opaque_resize;
75     bool warp_enabled;
76     bool switchto_new;
77     bool screen_notify;
78     int frame_default_index;
79     bool framed_transients;
80     
81     /*bool save_enabled;*/
82     
83     bool use_mb; /* use mb routines? */
84     bool enc_sb; /* 8-bit charset? If unset, use_mb must be set. */
85     bool enc_utf8; /* mb encoding is utf8? */
86     
87     const char *sm_client_id;
88 };
89
90
91 extern WGlobal ioncore_g;
92
93 #endif /* ION_IONCORE_GLOBAL_H */