annotate dstep/applicationservices/coregraphics/CGWindow.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
1 /**
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
3 * Authors: Jacob Carlborg
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
4 * Version: Initial created: Aug 1, 2009
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
6 */
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
7 module dstep.applicationservices.coregraphics.CGWindow;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
8
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
9 import dstep.corefoundation.CFArray;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
10 import dstep.corefoundation.CFBase;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 import dstep.corefoundation.CFDictionary;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
12 import dstep.applicationservices.coregraphics.CGBase;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
13 import dstep.applicationservices.coregraphics.CGImage;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
14 import dstep.applicationservices.coregraphics.CGGeometry;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
15
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
16 alias uint CGWindowID;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17 alias uint CGWindowListOption;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
18 alias uint CGWindowImageOption;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19 alias uint CGWindowSharingType;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
20 alias uint CGWindowBackingType;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
22 extern (C)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
23 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
24 extern
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
25 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
26 const CFStringRef kCGWindowNumber;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
27 const CFStringRef kCGWindowStoreType;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
28 const CFStringRef kCGWindowLayer;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
29 const CFStringRef kCGWindowBounds;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
30 const CFStringRef kCGWindowSharingState;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
31 const CFStringRef kCGWindowAlpha;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
32 const CFStringRef kCGWindowOwnerPID;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
33 const CFStringRef kCGWindowMemoryUsage;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34 const CFStringRef kCGWindowWorkspace;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 const CFStringRef kCGWindowOwnerName;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 const CFStringRef kCGWindowName;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37 const CFStringRef kCGWindowIsOnscreen;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38 const CFStringRef kCGWindowBackingLocationVideoMemory;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
39 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
40 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
41
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
42 enum
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
43 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
44 kCGWindowSharingNone = 0,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
45 kCGWindowSharingReadOnly = 1,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
46 kCGWindowSharingReadWrite = 2
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
47 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
49 enum
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
50 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
51 kCGBackingStoreRetained = 0,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
52 kCGBackingStoreNonretained = 1,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
53 kCGBackingStoreBuffered = 2
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
54 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
55
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
56 enum
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
57 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
58 kCGWindowListOptionAll = 0,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
59 kCGWindowListOptionOnScreenOnly = (1 << 0),
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
60 kCGWindowListOptionOnScreenAboveWindow = (1 << 1),
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
61 kCGWindowListOptionOnScreenBelowWindow = (1 << 2),
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
62 kCGWindowListOptionIncludingWindow = (1 << 3),
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
63 kCGWindowListExcludeDesktopElements = (1 << 4)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
64 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
65
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
66 enum
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
67 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
68 kCGWindowImageDefault = 0,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
69 kCGWindowImageBoundsIgnoreFraming = (1 << 0),
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
70 kCGWindowImageShouldBeOpaque = (1 << 1),
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
71 kCGWindowImageOnlyShadows = (1 << 2)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
72 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
73
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
74 extern (C)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
75 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
76 CFArrayRef CGWindowListCopyWindowInfo (uint option, uint relativeToWindow);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
77 CFArrayRef CGWindowListCreate (uint option, uint relativeToWindow);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
78 CFArrayRef CGWindowListCreateDescriptionFromArray (CFArrayRef windowArray);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
79 CGImageRef CGWindowListCreateImage (CGRect screenBounds, uint windowOption, uint windowID, uint imageOption);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
80 CGImageRef CGWindowListCreateImageFromArray (CGRect screenBounds, CFArrayRef windowArray, uint imageOption);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
81 }