Mercurial > projects > dstep
comparison dstep/applicationservices/coregraphics/CGDirectDisplay.d @ 12:9f0b49a2f64e
Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 03 Aug 2009 14:00:21 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
11:07194b026fa4 | 12:9f0b49a2f64e |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Aug 1, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.applicationservices.coregraphics.CGDirectDisplay; | |
8 | |
9 //import dstep.AvailabilityMacros; | |
10 import dstep.corefoundation.CoreFoundation; | |
11 | |
12 import dstep.applicationservices.coregraphics.CGBase; | |
13 import dstep.applicationservices.coregraphics.CGContext; | |
14 import dstep.applicationservices.coregraphics.CGError; | |
15 import dstep.applicationservices.coregraphics.CGGeometry; | |
16 /*import dstep.mach.boolean; | |
17 import dstep.stdint;*/ | |
18 | |
19 struct _CGDirectPaletteRef; | |
20 | |
21 alias uint CGDirectDisplayID; | |
22 alias _CGDirectPaletteRef* CGDirectPaletteRef; | |
23 alias uint CGDisplayCount; | |
24 alias uint CGTableCount; | |
25 alias int CGDisplayCoord; | |
26 alias ubyte CGByteValue; | |
27 alias uint CGOpenGLDisplayMask; | |
28 alias uint CGBeamPosition; | |
29 alias int CGMouseDelta; | |
30 alias double CGRefreshRate; | |
31 alias uint CGCaptureOptions; | |
32 alias int CGDisplayErr; | |
33 alias float CGGammaValue; | |
34 | |
35 enum | |
36 { | |
37 kCGCaptureNoOptions = 0, | |
38 kCGCaptureNoFill = (1 << 0) | |
39 } | |
40 | |
41 extern (C) | |
42 { | |
43 uint CGMainDisplayID (); | |
44 int CGGetDisplaysWithPoint (CGPoint point, uint maxDisplays, CGDirectDisplayID* dspys, CGDisplayCount* dspyCnt); | |
45 int CGGetDisplaysWithRect (CGRect rect, uint maxDisplays, CGDirectDisplayID* dspys, CGDisplayCount* dspyCnt); | |
46 int CGGetDisplaysWithOpenGLDisplayMask (uint mask, uint maxDisplays, CGDirectDisplayID* dspys, CGDisplayCount* dspyCnt); | |
47 int CGGetActiveDisplayList (uint maxDisplays, CGDirectDisplayID* activeDspys, CGDisplayCount* dspyCnt); | |
48 int CGGetOnlineDisplayList (uint maxDisplays, CGDirectDisplayID* onlineDspys, CGDisplayCount* dspyCnt); | |
49 uint CGDisplayIDToOpenGLDisplayMask (uint display); | |
50 uint CGOpenGLDisplayMaskToDisplayID (uint mask); | |
51 CGRect CGDisplayBounds (uint display); | |
52 uint CGDisplayPixelsWide (uint display); | |
53 uint CGDisplayPixelsHigh (uint display); | |
54 CFArrayRef CGDisplayAvailableModes (uint display); | |
55 CFDictionaryRef CGDisplayBestModeForParameters (uint display, uint bitsPerPixel, uint width, uint height, bool* exactMatch); | |
56 CFDictionaryRef CGDisplayBestModeForParametersAndRefreshRate (uint display, uint bitsPerPixel, uint width, uint height, double refresh, bool* exactMatch); | |
57 CFDictionaryRef CGDisplayBestModeForParametersAndRefreshRateWithProperty (uint display, uint bitsPerPixel, uint width, uint height, double refresh, CFStringRef property, bool* exactMatch); | |
58 CFDictionaryRef CGDisplayCurrentMode (uint display); | |
59 int CGDisplaySwitchToMode (uint display, CFDictionaryRef mode); | |
60 uint CGDisplayBitsPerPixel (uint display); | |
61 uint CGDisplayBitsPerSample (uint display); | |
62 uint CGDisplaySamplesPerPixel (uint display); | |
63 uint CGDisplayBytesPerRow (uint display); | |
64 int CGSetDisplayTransferByFormula (uint display, float redMin, float redMax, float redGamma, float greenMin, float greenMax, float greenGamma, float blueMin, float blueMax, float blueGamma); | |
65 int CGGetDisplayTransferByFormula (uint display, CGGammaValue* redMin, CGGammaValue* redMax, CGGammaValue* redGamma, CGGammaValue* greenMin, CGGammaValue* greenMax, CGGammaValue* greenGamma, CGGammaValue* blueMin, CGGammaValue* blueMax, CGGammaValue* blueGamma); | |
66 uint CGDisplayGammaTableCapacity (uint display); | |
67 int CGSetDisplayTransferByTable (uint display, uint tableSize, CGGammaValue* redTable, CGGammaValue* greenTable, CGGammaValue* blueTable); | |
68 int CGGetDisplayTransferByTable (uint display, uint capacity, CGGammaValue* redTable, CGGammaValue* greenTable, CGGammaValue* blueTable, CGTableCount* sampleCount); | |
69 int CGSetDisplayTransferByByteTable (uint display, uint tableSize, char* redTable, char* greenTable, char* blueTable); | |
70 void CGDisplayRestoreColorSyncSettings (); | |
71 int CGDisplayIsCaptured (uint display); | |
72 int CGDisplayCapture (uint display); | |
73 int CGDisplayCaptureWithOptions (uint display, uint options); | |
74 int CGDisplayRelease (uint display); | |
75 int CGCaptureAllDisplays (); | |
76 int CGCaptureAllDisplaysWithOptions (uint options); | |
77 int CGReleaseAllDisplays (); | |
78 uint CGShieldingWindowID (uint display); | |
79 int CGShieldingWindowLevel (); | |
80 void* CGDisplayBaseAddress (uint display); | |
81 void* CGDisplayAddressForPosition (uint display, int x, int y); | |
82 int CGDisplayHideCursor (uint display); | |
83 int CGDisplayShowCursor (uint display); | |
84 int CGDisplayMoveCursorToPoint (uint display, CGPoint point); | |
85 void CGGetLastMouseDelta (CGMouseDelta* deltaX, CGMouseDelta* deltaY); | |
86 int CGDisplayCanSetPalette (uint display); | |
87 int CGDisplaySetPalette (uint display, CGDirectPaletteRef palette); | |
88 int CGDisplayWaitForBeamPositionOutsideLines (uint display, uint upperScanLine, uint lowerScanLine); | |
89 uint CGDisplayBeamPosition (uint display); | |
90 CGContextRef CGDisplayGetDrawingContext (uint display); | |
91 } |