blob: eb0c9c85a125fc32c7f3b2b4173e4344dd38cbc9 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 2001-2004 Sun Microsystems, Inc. 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. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any 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 */
37enum 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
51extern void awt_wm_init(void);
52
53extern enum wmgr_t awt_wm_getRunningWM(void);
54extern Boolean awt_wm_configureGravityBuggy(void);
55extern Boolean awt_wm_supportsExtendedState(jint state);
56
57/* XWMHints.flags is declared long, so 'mask' argument is declared long too */
58extern void awt_wm_removeSizeHints(Widget shell, long mask);
59
60extern void awt_wm_setShellDecor(struct FrameData *wdata, Boolean resizable);
61extern void awt_wm_setShellResizable(struct FrameData *wdata);
62extern void awt_wm_setShellNotResizable(struct FrameData *wdata,
63 int32_t width, int32_t height,
64 Boolean justChangeSize);
65
66extern 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 */
73extern int awt_wm_getWMState(Window w);
74
75extern void awt_wm_setExtendedState(struct FrameData *wdata, jint state);
76extern Boolean awt_wm_isStateChange(struct FrameData *wdata, XPropertyEvent *e,
77 jint *pstate);
78
79extern void awt_wm_unshadeKludge(struct FrameData *wdata);
80extern void awt_wm_updateAlwaysOnTop(struct FrameData *wdata, jboolean bLayerState);
81extern Boolean awt_wm_supportsAlwaysOnTop();
82
83#endif /* !HEADLESS */
84#endif /* _AWT_WM_H_ */