Use C-style comments rather than C++-style
[notion.git] / ioncore / global.h
blob0a97120cdceb1f022207876c3d741106ee7405a5
1 /*
2 * ion/ioncore/global.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #ifndef ION_IONCORE_GLOBAL_H
10 #define ION_IONCORE_GLOBAL_H
12 #include "common.h"
14 #include <X11/Xutil.h>
15 #include <X11/Xresource.h>
17 #include <libtu/stringstore.h>
19 #include "rootwin.h"
20 #include "screen.h"
21 #include "window.h"
22 #include "clientwin.h"
25 enum{
26 IONCORE_INPUTMODE_NORMAL,
27 IONCORE_INPUTMODE_GRAB,
28 IONCORE_INPUTMODE_WAITRELEASE
31 enum{
32 IONCORE_OPMODE_INIT,
33 IONCORE_OPMODE_NORMAL,
34 IONCORE_OPMODE_DEINIT
37 enum{
38 IONCORE_FOCUSNEXT_OTHER,
39 IONCORE_FOCUSNEXT_POINTERHACK,
40 IONCORE_FOCUSNEXT_ENTERWINDOW,
41 IONCORE_FOCUSNEXT_FALLBACK
44 enum{
45 IONCORE_WINDOWSTACKINGREQUEST_IGNORE,
46 IONCORE_WINDOWSTACKINGREQUEST_ACTIVATE
50 INTRSTRUCT(WGlobal);
53 DECLSTRUCT(WGlobal){
54 int argc;
55 char **argv;
57 Display *dpy;
58 const char *display;
59 int conn;
61 XContext win_context;
62 Atom atom_wm_state;
63 Atom atom_wm_change_state;
64 Atom atom_wm_protocols;
65 Atom atom_wm_delete;
66 Atom atom_wm_take_focus;
67 Atom atom_wm_colormaps;
68 Atom atom_wm_window_role;
69 Atom atom_checkcode;
70 Atom atom_selection;
71 Atom atom_mwm_hints;
72 Atom atom_dockapp_hack;
74 WRootWin *rootwins;
75 WScreen *screens;
76 WRegion *focus_next;
77 bool warp_next;
78 int focus_next_source;
80 /* We could have a display WRegion but the screen-link could impose
81 * some problems so these are handled as a special case.
83 * This is a doubly-linked list with links 'active_next' and 'active_prev'
85 * This is the list of previously-focused windows, in order of recent
86 * usefulness. The currently-focussed window is deemed most important (first
87 * item on this list) if focuslist_insert_delay is disabled, or if
88 * focuslist_insert_delay is enabled and its timer has expired
90 WRegion* focuslist;
92 /* This is the region that is currently focused. It is usually the first
93 * item in the focuslist, but not always. It isn't the first item if
94 * focuslist_insert_delay is enabled, and the corresponding timer is active */
95 WRegion* focus_current;
98 int input_mode;
99 int opmode;
101 Time dblclick_delay;
102 int opaque_resize;
103 bool warp_enabled;
104 bool switchto_new;
105 bool screen_notify;
106 int frame_default_index;
107 bool framed_transients;
108 bool no_mousefocus;
109 bool unsqueeze_enabled;
110 bool autoraise;
111 bool autosave_layout;
112 int window_stacking_request;
113 Time usertime_diff_current;
114 Time usertime_diff_new;
115 Time focuslist_insert_delay;
116 Time workspace_indicator_timeout;
117 bool activity_notification_on_all_screens;
119 bool use_mb; /* use mb routines? */
120 bool enc_sb; /* 8-bit charset? If unset, use_mb must be set. */
121 bool enc_utf8; /* mb encoding is utf8? */
123 const char *sm_client_id;
125 struct{
126 StringId activated,
127 inactivated,
128 activity,
129 sub_activity,
130 name,
131 unset_manager,
132 set_manager,
133 tag,
134 set_return,
135 unset_return,
136 pseudoactivated,
137 pseudoinactivated,
138 deinit,
139 map,
140 unmap;
141 } notifies;
143 /** XShape extension presence */
144 bool shape_extension;
145 int shape_event_basep;
146 int shape_error_basep;
150 extern WGlobal ioncore_g;
152 #endif /* ION_IONCORE_GLOBAL_H */