chiark / gitweb /
Imported Upstream version 1.0.0
[e16] / src / hints.h
1 /*
2  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
3  * Copyright (C) 2004-2008 Kim Woelders
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to
7  * deal in the Software without restriction, including without limitation the
8  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9  * sell copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies of the Software, its documentation and marketing & publicity
14  * materials, and acknowledgment shall be given in the documentation, materials
15  * and software packages that this Software was used.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20  * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _HINTS_H_
25 #define _HINTS_H_
26
27 #include <X11/Xlib.h>
28 #include "etypes.h"
29 #include "xwin.h"
30
31 void                AtomListIntern(const char *const *names, unsigned int num,
32                                    unsigned int *atoms);
33
34 /* Misc atoms */
35
36 extern unsigned int atoms_misc[];
37
38 #define E_XA_MANAGER                    atoms_misc[0]
39
40 #define E_XROOTPMAP_ID                  atoms_misc[1]
41 #define E_XROOTCOLOR_PIXEL              atoms_misc[2]
42
43 #define E16_ATOM_VERSION                atoms_misc[3]
44
45 #define E16_ATOM_COMMS_WIN              atoms_misc[4]
46 #define E16_ATOM_COMMS_MSG              atoms_misc[5]
47
48 #define E16_ATOM_INTERNAL_AREA_DATA     atoms_misc[6]
49 #define E16_ATOM_INTERNAL_DESK_DATA     atoms_misc[7]
50 #define E16_ATOM_WIN_DATA               atoms_misc[8]
51 #define E16_ATOM_WIN_BORDER             atoms_misc[9]
52
53 /* ewmh.c */
54 void                EWMH_Init(Window win_wm_check);
55 void                EWMH_SetDesktopCount(void);
56 void                EWMH_SetDesktopRoots(void);
57 void                EWMH_SetDesktopNames(void);
58 void                EWMH_SetDesktopSize(void);
59 void                EWMH_SetCurrentDesktop(void);
60 void                EWMH_SetDesktopViewport(void);
61 void                EWMH_SetWorkArea(void);
62 void                EWMH_SetClientList(void);
63 void                EWMH_SetClientStacking(void);
64 void                EWMH_SetActiveWindow(Window win);
65 void                EWMH_SetShowingDesktop(int on);
66 void                EWMH_SetWindowName(Window win, const char *name);
67 void                EWMH_SetWindowDesktop(const EWin * ewin);
68 void                EWMH_SetWindowState(const EWin * ewin);
69 void                EWMH_SetWindowBorder(const EWin * ewin);
70 void                EWMH_SetWindowOpacity(const EWin * ewin);
71 void                EWMH_SetWindowActions(const EWin * ewin);
72 void                EWMH_GetWindowHints(EWin * ewin);
73 void                EWMH_DelWindowHints(const EWin * ewin);
74 int                 EWMH_ProcessPropertyChange(EWin * ewin, Atom atom_change);
75 int                 EWMH_ProcessClientClientMessage(EWin * ewin,
76                                                     XClientMessageEvent *
77                                                     event);
78 int                 EWMH_ProcessRootClientMessage(XClientMessageEvent * event);
79
80 #if ENABLE_GNOME
81 /* gnome.c */
82 void                GNOME_SetCurrentDesk(void);
83 void                GNOME_SetDeskCount(void);
84 void                GNOME_SetDeskNames(void);
85 void                GNOME_SetClientList(void);
86 void                GNOME_SetEwinDesk(const EWin * ewin);
87 void                GNOME_SetEwinArea(const EWin * ewin);
88 void                GNOME_SetHint(const EWin * ewin);
89 void                GNOME_SetCurrentArea(void);
90 void                GNOME_SetAreaCount(void);
91 void                GNOME_GetHints(EWin * ewin, Atom atom_change);
92 void                GNOME_DelHints(const EWin * ewin);
93 void                GNOME_SetHints(Window win_wm_check);
94 int                 GNOME_ProcessClientClientMessage(EWin * ewin,
95                                                      XClientMessageEvent *
96                                                      event);
97 int                 GNOME_ProcessRootClientMessage(XClientMessageEvent * event);
98 #endif
99
100 /* hints.c */
101 void                HintsInit(void);
102 void                HintsSetDesktopConfig(void);
103 void                HintsSetViewportConfig(void);
104 void                HintsSetCurrentDesktop(void);
105 void                HintsSetDesktopViewport(void);
106 void                HintsSetClientList(void);
107 void                HintsSetClientStacking(void);
108 void                HintsSetActiveWindow(Window win);
109 void                HintsSetWindowName(Win win, const char *name);
110 void                HintsSetWindowClass(Win win, const char *name,
111                                         const char *clss);
112 void                HintsSetWindowDesktop(const EWin * ewin);
113 void                HintsSetWindowArea(const EWin * ewin);
114 void                HintsSetWindowState(const EWin * ewin);
115 void                HintsSetWindowOpacity(const EWin * ewin);
116 void                HintsSetWindowBorder(const EWin * ewin);
117 void                HintsGetWindowHints(EWin * ewin);
118 void                HintsDelWindowHints(const EWin * ewin);
119 void                HintsProcessPropertyChange(EWin * ewin, XEvent * ev);
120 void                HintsProcessClientClientMessage(EWin * ewin,
121                                                     XClientMessageEvent *
122                                                     event);
123 void                HintsProcessRootClientMessage(XClientMessageEvent * event);
124
125 Pixmap              HintsGetRootPixmap(Win win);
126 void                HintsSetRootHints(Win win);
127 void                HintsSetRootInfo(Win win, Pixmap pmap, unsigned int color);
128
129 void                EHintsSetInfo(const EWin * ewin);
130 void                EHintsGetInfo(EWin * ewin);
131 void                EHintsSetDeskInfo(void);
132 void                EHintsGetDeskInfo(void);
133 void                EHintsSetInfoOnAll(void);
134
135 typedef struct _selection ESelection;
136 ESelection         *SelectionAcquire(const char *name, EventCallbackFunc * func,
137                                      void *data);
138 void                SelectionRelease(ESelection * sel);
139
140 /* icccm.c */
141 void                ICCCM_Init(void);
142 int                 ICCCM_ProcessClientClientMessage(EWin * ewin,
143                                                      XClientMessageEvent *
144                                                      event);
145 int                 ICCCM_ProcessRootClientMessage(XClientMessageEvent * event);
146 void                ICCCM_GetTitle(EWin * ewin);
147 void                ICCCM_Delete(const EWin * ewin);
148 void                ICCCM_Iconify(const EWin * ewin);
149 void                ICCCM_DeIconify(const EWin * ewin);
150 void                ICCCM_SizeMatch(const EWin * ewin, int wi, int hi, int *pwo,
151                                     int *pho);
152 void                ICCCM_GetIncrementalSize(EWin * ewin, unsigned int w,
153                                              unsigned int h, unsigned int *wi,
154                                              unsigned int *hi);
155 void                ICCCM_SetSizeConstraints(EWin * ewin, unsigned int wmin,
156                                              unsigned int hmin,
157                                              unsigned int wmax,
158                                              unsigned int hmax,
159                                              unsigned int wbase,
160                                              unsigned int hbase,
161                                              unsigned int winc,
162                                              unsigned int hinc, double amin,
163                                              double amax);
164 void                ICCCM_Configure(EWin * ewin);
165 void                ICCCM_AdoptStart(const EWin * ewin);
166 void                ICCCM_Adopt(const EWin * ewin);
167 void                ICCCM_Withdraw(const EWin * ewin);
168 void                ICCCM_Cmap(EWin * ewin);
169 void                ICCCM_Focus(const EWin * ewin);
170 void                ICCCM_GetGeoms(EWin * ewin);
171 void                ICCCM_GetInfo(EWin * ewin);
172 void                ICCCM_GetHints(EWin * ewin);
173 int                 ICCCM_ProcessPropertyChange(EWin * ewin, Atom atom_change);
174
175 /* mwm.c */
176 void                MWM_GetHints(EWin * ewin, Atom atom_change);
177 void                MWM_SetInfo(void);
178
179 /* session.c */
180 void                SessionGetInfo(EWin * ewin);
181
182 #endif /* _HINTS_H_ */