1 /* |
|
2 * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. Oracle designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Oracle in the LICENSE file that accompanied this code. |
|
10 * |
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 * version 2 for more details (a copy is included in the LICENSE file that |
|
15 * accompanied this code). |
|
16 * |
|
17 * You should have received a copy of the GNU General Public License version |
|
18 * 2 along with this work; if not, write to the Free Software Foundation, |
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 * |
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 * or visit www.oracle.com if you need additional information or have any |
|
23 * questions. |
|
24 */ |
|
25 |
|
26 #ifndef _AWT_WM_H_ |
|
27 #define _AWT_WM_H_ |
|
28 |
|
29 #ifndef HEADLESS |
|
30 |
|
31 #include "awt_p.h" |
|
32 |
|
33 /* |
|
34 * Window Managers we care to distinguish. |
|
35 * See awt_wm_getRunningWM() |
|
36 */ |
|
37 enum wmgr_t { |
|
38 UNDETERMINED_WM, |
|
39 NO_WM, |
|
40 OTHER_WM, |
|
41 OPENLOOK_WM, |
|
42 MOTIF_WM, |
|
43 CDE_WM, |
|
44 ENLIGHTEN_WM, |
|
45 KDE2_WM, |
|
46 SAWFISH_WM, |
|
47 ICE_WM, |
|
48 METACITY_WM |
|
49 }; |
|
50 |
|
51 extern void awt_wm_init(void); |
|
52 |
|
53 extern enum wmgr_t awt_wm_getRunningWM(void); |
|
54 extern Boolean awt_wm_configureGravityBuggy(void); |
|
55 extern Boolean awt_wm_supportsExtendedState(jint state); |
|
56 |
|
57 /* XWMHints.flags is declared long, so 'mask' argument is declared long too */ |
|
58 extern void awt_wm_removeSizeHints(Widget shell, long mask); |
|
59 |
|
60 extern void awt_wm_setShellDecor(struct FrameData *wdata, Boolean resizable); |
|
61 extern void awt_wm_setShellResizable(struct FrameData *wdata); |
|
62 extern void awt_wm_setShellNotResizable(struct FrameData *wdata, |
|
63 int32_t width, int32_t height, |
|
64 Boolean justChangeSize); |
|
65 |
|
66 extern Boolean awt_wm_getInsetsFromProp(Window w, |
|
67 int32_t *top, int32_t *left, int32_t *bottom, int32_t *right); |
|
68 |
|
69 /* |
|
70 * WM_STATE: WithdrawnState, NormalState, IconicState. |
|
71 * Absence of WM_STATE is treated as WithdrawnState. |
|
72 */ |
|
73 extern int awt_wm_getWMState(Window w); |
|
74 |
|
75 extern void awt_wm_setExtendedState(struct FrameData *wdata, jint state); |
|
76 extern Boolean awt_wm_isStateChange(struct FrameData *wdata, XPropertyEvent *e, |
|
77 jint *pstate); |
|
78 |
|
79 extern void awt_wm_unshadeKludge(struct FrameData *wdata); |
|
80 extern void awt_wm_updateAlwaysOnTop(struct FrameData *wdata, jboolean bLayerState); |
|
81 extern Boolean awt_wm_supportsAlwaysOnTop(); |
|
82 |
|
83 #endif /* !HEADLESS */ |
|
84 #endif /* _AWT_WM_H_ */ |
|