4 * Copyright (c) 2010 Jan Hauffa.
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
22 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
26 * Except as contained in this notice, the name(s) of the above copyright
27 * holders shall not be used in advertising or otherwise to promote the sale,
28 * use or other dealings in this Software without prior written authorization.
31 #ifndef _QUARTZRANDR_H_
32 #define _QUARTZRANDR_H_
39 RRScreenSizePtr pSize
;
40 void *ref
; /* CGDisplayModeRef or CFDictionaryRef */
41 } QuartzModeInfo
, *QuartzModeInfoPtr
;
43 // Quartz specific per screen storage structure
45 // List of CoreGraphics displays that this X11 screen covers.
46 // This is more than one CG display for video mirroring and
47 // rootless PseudoramiX mode.
48 // No CG display will be covered by more than one X11 screen.
50 CGDirectDisplayID
*displayIDs
;
51 QuartzModeInfo rootlessMode
, fullscreenMode
, currentMode
;
52 } QuartzScreenRec
, *QuartzScreenPtr
;
54 #define QUARTZ_PRIV(pScreen) \
55 ((QuartzScreenPtr)dixLookupPrivate(&pScreen->devPrivates, quartzScreenKey))
58 QuartzCopyDisplayIDs(ScreenPtr pScreen
, int displayCount
,
59 CGDirectDisplayID
*displayIDs
);
62 QuartzRandRUpdateFakeModes(BOOL force_update
);
64 QuartzRandRInit(ScreenPtr pScreen
);
66 /* These two functions provide functionality expected by the legacy
67 * mode switching. They are equivalent to a client requesting one
68 * of the modes corresponding to these "fake" modes.
69 * QuartzRandRSetFakeFullscreen takes an argument which is used to determine
70 * the visibility of the windows after the change.
73 QuartzRandRSetFakeRootless(void);
75 QuartzRandRSetFakeFullscreen(BOOL state
);
77 /* Toggle fullscreen mode. If "fake" fullscreen is the current mode,
78 * this will just show/hide the X11 windows. If we are in a RandR fullscreen
79 * mode, this will toggles us to the default fake mode and hide windows if
83 QuartzRandRToggleFullscreen(void);