]> git.decadent.org.uk Git - ion3.git/blob - ioncore/global.h
[svn-upgrade] Integrating new upstream version, ion3 (20070203)
[ion3.git] / ioncore / global.h
1 /*
2  * ion/ioncore/global.h
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2007. 
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 <libtu/stringstore.h>
21
22 #include "rootwin.h"
23 #include "screen.h"
24 #include "window.h"
25 #include "clientwin.h"
26
27
28 enum{
29     IONCORE_INPUTMODE_NORMAL,
30     IONCORE_INPUTMODE_GRAB,
31     IONCORE_INPUTMODE_WAITRELEASE
32 };
33
34 enum{
35     IONCORE_OPMODE_INIT,
36     IONCORE_OPMODE_NORMAL,
37     IONCORE_OPMODE_DEINIT
38 };
39
40 INTRSTRUCT(WGlobal);
41
42
43 DECLSTRUCT(WGlobal){
44     int argc;
45     char **argv;
46     
47     Display *dpy;
48     const char *display;
49     int conn;
50     
51     XContext win_context;
52     Atom atom_wm_state;
53     Atom atom_wm_change_state;
54     Atom atom_wm_protocols;
55     Atom atom_wm_delete;
56     Atom atom_wm_take_focus;
57     Atom atom_wm_colormaps;
58     Atom atom_wm_window_role;
59     Atom atom_checkcode;
60     Atom atom_selection;
61     Atom atom_mwm_hints;
62
63     WRootWin *rootwins;
64     WScreen *screens;
65     WRegion *focus_next;
66     bool warp_next;
67     
68     /* We could have a display WRegion but the screen-link could impose
69      * some problems so these are handled as a special case.
70      */
71     WRegion *focus_current;
72     
73     int input_mode;
74     int opmode;
75     
76     Time dblclick_delay;
77     int opaque_resize;
78     bool warp_enabled;
79     bool switchto_new;
80     bool screen_notify;
81     int frame_default_index;
82     bool framed_transients;
83     
84     /*bool save_enabled;*/
85     
86     bool use_mb; /* use mb routines? */
87     bool enc_sb; /* 8-bit charset? If unset, use_mb must be set. */
88     bool enc_utf8; /* mb encoding is utf8? */
89     
90     const char *sm_client_id;
91     
92     struct{
93         StringId activated,
94                  inactivated,
95                  activity,
96                  sub_activity,
97                  name,
98                  unset_manager,
99                  set_manager,
100                  tag,
101                  set_return,
102                  unset_return,
103                  pseudoactivated,
104                  pseudoinactivated,
105                  deinit;
106     } notifies;
107 };
108
109
110 extern WGlobal ioncore_g;
111
112 #endif /* ION_IONCORE_GLOBAL_H */