2 * Copyright (C) 2007-2008 Alacatia Labs
4 * This software is provided 'as-is', without any express or implied
5 * warranty. In no event will the authors be held liable for any damages
6 * arising from the use of this software.
8 * Permission is granted to anyone to use this software for any purpose,
9 * including commercial applications, and to alter it and redistribute it
10 * freely, subject to the following restrictions:
12 * 1. The origin of this software must not be misrepresented; you must not
13 * claim that you wrote the original software. If you use this software
14 * in a product, an acknowledgment in the product documentation would be
15 * appreciated but is not required.
16 * 2. Altered source versions must be plainly marked as such, and must not be
17 * misrepresented as being the original software.
18 * 3. This notice may not be removed or altered from any source distribution.
20 * Joe Ranieri joe@alacatia.com
21 * Ryan Govostes ryan@alacatia.com
29 /*! Begins a new display configuration transacation. */
30 CG_EXTERN CGDisplayErr CGSBeginDisplayConfiguration(CGDisplayConfigRef *config);
32 /*! Sets the origin of a display relative to the main display. The main display is at (0, 0) and contains the menubar. */
33 CG_EXTERN CGDisplayErr CGSConfigureDisplayOrigin(CGDisplayConfigRef config, CGDirectDisplayID display, CGDisplayCoord x, CGDisplayCoord y);
35 /*! Applies the configuration changes made in this transaction. */
36 CG_EXTERN CGDisplayErr CGSCompleteDisplayConfiguration(CGDisplayConfigRef config);
38 /*! Gets the main display. */
39 CG_EXTERN CGDirectDisplayID CGSMainDisplayID(void);
41 /*! Drops the configuration changes made in this transaction. */
42 CG_EXTERN CGDisplayErr CGSCancelDisplayConfiguration(CGDisplayConfigRef config);
44 /*! Gets a list of on line displays */
45 CG_EXTERN CGDisplayErr CGSGetOnlineDisplayList(CGDisplayCount maxDisplays, CGDirectDisplayID *displays, CGDisplayCount *outDisplayCount);
47 /*! Gets a list of active displays */
48 CG_EXTERN CGDisplayErr CGSGetActiveDisplayList(CGDisplayCount maxDisplays, CGDirectDisplayID *displays, CGDisplayCount *outDisplayCount);
50 /*! Gets the depth of a display. */
51 CG_EXTERN CGError CGSGetDisplayDepth(CGDirectDisplayID display, int *outDepth);
53 /*! Gets the displays at a point. Note that multiple displays can have the same point - think mirroring. */
54 CG_EXTERN CGError CGSGetDisplaysWithPoint(const CGPoint *point, int maxDisplayCount, CGDirectDisplayID *outDisplays, int *outDisplayCount);
56 /*! Gets the displays which contain a rect. Note that multiple displays can have the same bounds - think mirroring. */
57 CG_EXTERN CGError CGSGetDisplaysWithRect(const CGRect *point, int maxDisplayCount, CGDirectDisplayID *outDisplays, int *outDisplayCount);
59 /*! Gets the bounds for the display. Note that multiple displays can have the same bounds - think mirroring. */
60 CG_EXTERN CGError CGSGetDisplayRegion(CGDirectDisplayID display, CGSRegionObj *outRegion);
61 CG_EXTERN CGError CGSGetDisplayBounds(CGDirectDisplayID display, CGRect *outRect);
63 /*! Gets the number of bytes per row. */
64 CG_EXTERN CGError CGSGetDisplayRowBytes(CGDirectDisplayID display, int *outRowBytes);