]> git.decadent.org.uk Git - ion3.git/blob - ioncore/global.h
7ac78419c0c699063946ff9ca13b66f2206cad49
[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 enum{
41     IONCORE_FOCUSNEXT_OTHER,
42     IONCORE_FOCUSNEXT_POINTERHACK,
43     IONCORE_FOCUSNEXT_ENTERWINDOW,
44     IONCORE_FOCUSNEXT_FALLBACK
45 };
46
47
48 INTRSTRUCT(WGlobal);
49
50
51 DECLSTRUCT(WGlobal){
52     int argc;
53     char **argv;
54     
55     Display *dpy;
56     const char *display;
57     int conn;
58     
59     XContext win_context;
60     Atom atom_wm_state;
61     Atom atom_wm_change_state;
62     Atom atom_wm_protocols;
63     Atom atom_wm_delete;
64     Atom atom_wm_take_focus;
65     Atom atom_wm_colormaps;
66     Atom atom_wm_window_role;
67     Atom atom_checkcode;
68     Atom atom_selection;
69     Atom atom_mwm_hints;
70
71     WRootWin *rootwins;
72     WScreen *screens;
73     WRegion *focus_next;
74     bool warp_next;
75     int focus_next_source;
76     
77     /* We could have a display WRegion but the screen-link could impose
78      * some problems so these are handled as a special case.
79      */
80     WRegion *focus_current;
81     
82     int input_mode;
83     int opmode;
84     
85     Time dblclick_delay;
86     int opaque_resize;
87     bool warp_enabled;
88     bool switchto_new;
89     bool screen_notify;
90     int frame_default_index;
91     bool framed_transients;
92     bool no_mousefocus;
93     bool unsqueeze_enabled;
94     bool autoraise;
95     
96     bool use_mb; /* use mb routines? */
97     bool enc_sb; /* 8-bit charset? If unset, use_mb must be set. */
98     bool enc_utf8; /* mb encoding is utf8? */
99     
100     const char *sm_client_id;
101     
102     struct{
103         StringId activated,
104                  inactivated,
105                  activity,
106                  sub_activity,
107                  name,
108                  unset_manager,
109                  set_manager,
110                  tag,
111                  set_return,
112                  unset_return,
113                  pseudoactivated,
114                  pseudoinactivated,
115                  deinit,
116                  map,
117                  unmap;
118     } notifies;
119 };
120
121
122 extern WGlobal ioncore_g;
123
124 #endif /* ION_IONCORE_GLOBAL_H */