14642e01fSmrg/*
24642e01fSmrg * Xplugin rootless implementation
34642e01fSmrg *
44642e01fSmrg * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
535c4bbdfSmrg * Copyright (c) 2002-2012 Apple Inc. All rights reserved.
64642e01fSmrg *
74642e01fSmrg * Permission is hereby granted, free of charge, to any person obtaining a
84642e01fSmrg * copy of this software and associated documentation files (the "Software"),
94642e01fSmrg * to deal in the Software without restriction, including without limitation
104642e01fSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
114642e01fSmrg * and/or sell copies of the Software, and to permit persons to whom the
124642e01fSmrg * Software is furnished to do so, subject to the following conditions:
134642e01fSmrg *
144642e01fSmrg * The above copyright notice and this permission notice shall be included in
154642e01fSmrg * all copies or substantial portions of the Software.
164642e01fSmrg *
174642e01fSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
184642e01fSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
194642e01fSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
204642e01fSmrg * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
214642e01fSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
224642e01fSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
234642e01fSmrg * DEALINGS IN THE SOFTWARE.
244642e01fSmrg *
254642e01fSmrg * Except as contained in this notice, the name(s) of the above copyright
264642e01fSmrg * holders shall not be used in advertising or otherwise to promote the sale,
274642e01fSmrg * use or other dealings in this Software without prior written authorization.
284642e01fSmrg */
294642e01fSmrg
304642e01fSmrg#ifndef XPR_H
314642e01fSmrg#define XPR_H
324642e01fSmrg
334642e01fSmrg#include "windowstr.h"
344642e01fSmrg#include "screenint.h"
354642e01fSmrg#include <Xplugin.h>
364642e01fSmrg
3735c4bbdfSmrg#include "darwin.h"
384642e01fSmrg
3935c4bbdfSmrg#undef DEBUG_LOG
4035c4bbdfSmrg#define DEBUG_LOG(msg, args ...) ASL_LOG(ASL_LEVEL_DEBUG, "xpr", msg, ## args)
414642e01fSmrg
4235c4bbdfSmrgBool
4335c4bbdfSmrgQuartzModeBundleInit(void);
444642e01fSmrg
4535c4bbdfSmrgvoid
4635c4bbdfSmrgAppleDRIExtensionInit(void);
4735c4bbdfSmrgvoid
4835c4bbdfSmrgxprAppleWMInit(void);
4935c4bbdfSmrgBool
5035c4bbdfSmrgxprInit(ScreenPtr pScreen);
5135c4bbdfSmrgBool
5235c4bbdfSmrgxprIsX11Window(int windowNumber);
5335c4bbdfSmrgWindowPtr
5435c4bbdfSmrgxprGetXWindow(xp_window_id wid);
5535c4bbdfSmrg
5635c4bbdfSmrgvoid
5735c4bbdfSmrgxprHideWindows(Bool hide);
5835c4bbdfSmrg
5935c4bbdfSmrgBool
6035c4bbdfSmrgQuartzInitCursor(ScreenPtr pScreen);
6135c4bbdfSmrgvoid
6235c4bbdfSmrgQuartzSuspendXCursor(ScreenPtr pScreen);
6335c4bbdfSmrgvoid
6435c4bbdfSmrgQuartzResumeXCursor(ScreenPtr pScreen);
656747b715Smrg
666747b715Smrg/* If we are rooted, we need the root window and desktop levels to be below
676747b715Smrg * the menubar (24) but above native windows.  Normal window level is 0.
686747b715Smrg * Floating window level is 3.  The rest are filled in as appropriate.
696747b715Smrg * See CGWindowLevel.h
706747b715Smrg */
716747b715Smrg
726747b715Smrg#include <X11/extensions/applewmconst.h>
7335c4bbdfSmrgstatic const int normal_window_levels[AppleWMNumWindowLevels + 1] = {
7435c4bbdfSmrg    0, 3, 4, 5, INT_MIN + 30, INT_MIN + 29,
756747b715Smrg};
7635c4bbdfSmrgstatic const int rooted_window_levels[AppleWMNumWindowLevels + 1] = {
7735c4bbdfSmrg    20, 21, 22, 23, 19, 18,
786747b715Smrg};
794642e01fSmrg
804642e01fSmrg#endif /* XPR_H */
81