comparison dstep/qtkit/QTCaptureConnection.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents
children b9de51448c6b
comparison
equal deleted inserted replaced
15:7ff919f595d5 16:19885b43130e
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Sep 28, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.qtkit.QTCaptureConnection;
8
9 import dstep.foundation.Foundation;
10 import dstep.objc.bridge.Bridge;
11 import dstep.objc.objc;
12 import dstep.qtkit.QTFormatDescription;
13 import dstep.qtkit.QTKitDefines;
14
15 import bindings = dstep.qtkit.QTCaptureConnection_bindings;
16
17 private
18 {
19 NSString QTCaptureConnectionFormatDescriptionWillChangeNotification_;
20 NSString QTCaptureConnectionFormatDescriptionDidChangeNotification_;
21 NSString QTCaptureConnectionAttributeWillChangeNotification_;
22 NSString QTCaptureConnectionAttributeDidChangeNotification_;
23 NSString QTCaptureConnectionChangedAttributeKey_;
24 NSString QTCaptureConnectionAudioAveragePowerLevelsAttribute_;
25 NSString QTCaptureConnectionAudioPeakHoldLevelsAttribute_;
26 NSString QTCaptureConnectionAudioMasterVolumeAttribute_;
27 NSString QTCaptureConnectionAudioVolumesAttribute_;
28 NSString QTCaptureConnectionEnabledAudioChannelsAttribute_;
29 }
30
31 NSString QTCaptureConnectionFormatDescriptionWillChangeNotification ()
32 {
33 if (QTCaptureConnectionFormatDescriptionWillChangeNotification_)
34 return QTCaptureConnectionFormatDescriptionWillChangeNotification_;
35
36 return QTCaptureConnectionFormatDescriptionWillChangeNotification_ = new NSString(bindings.QTCaptureConnectionFormatDescriptionWillChangeNotification);
37 }
38
39 NSString QTCaptureConnectionFormatDescriptionDidChangeNotification ()
40 {
41 if (QTCaptureConnectionFormatDescriptionDidChangeNotification_)
42 return QTCaptureConnectionFormatDescriptionDidChangeNotification_;
43
44 return QTCaptureConnectionFormatDescriptionDidChangeNotification_ = new NSString(bindings.QTCaptureConnectionFormatDescriptionDidChangeNotification);
45 }
46
47 NSString QTCaptureConnectionAttributeWillChangeNotification ()
48 {
49 if (QTCaptureConnectionAttributeWillChangeNotification_)
50 return QTCaptureConnectionAttributeWillChangeNotification_;
51
52 return QTCaptureConnectionAttributeWillChangeNotification_ = new NSString(bindings.QTCaptureConnectionAttributeWillChangeNotification);
53 }
54
55 NSString QTCaptureConnectionAttributeDidChangeNotification ()
56 {
57 if (QTCaptureConnectionAttributeDidChangeNotification_)
58 return QTCaptureConnectionAttributeDidChangeNotification_;
59
60 return QTCaptureConnectionAttributeDidChangeNotification_ = new NSString(bindings.QTCaptureConnectionAttributeDidChangeNotification);
61 }
62
63 NSString QTCaptureConnectionChangedAttributeKey ()
64 {
65 if (QTCaptureConnectionChangedAttributeKey_)
66 return QTCaptureConnectionChangedAttributeKey_;
67
68 return QTCaptureConnectionChangedAttributeKey_ = new NSString(bindings.QTCaptureConnectionChangedAttributeKey);
69 }
70
71 NSString QTCaptureConnectionAudioAveragePowerLevelsAttribute ()
72 {
73 if (QTCaptureConnectionAudioAveragePowerLevelsAttribute_)
74 return QTCaptureConnectionAudioAveragePowerLevelsAttribute_;
75
76 return QTCaptureConnectionAudioAveragePowerLevelsAttribute_ = new NSString(bindings.QTCaptureConnectionAudioAveragePowerLevelsAttribute);
77 }
78
79 NSString QTCaptureConnectionAudioPeakHoldLevelsAttribute ()
80 {
81 if (QTCaptureConnectionAudioPeakHoldLevelsAttribute_)
82 return QTCaptureConnectionAudioPeakHoldLevelsAttribute_;
83
84 return QTCaptureConnectionAudioPeakHoldLevelsAttribute_ = new NSString(bindings.QTCaptureConnectionAudioPeakHoldLevelsAttribute);
85 }
86
87 NSString QTCaptureConnectionAudioMasterVolumeAttribute ()
88 {
89 if (QTCaptureConnectionAudioMasterVolumeAttribute_)
90 return QTCaptureConnectionAudioMasterVolumeAttribute_;
91
92 return QTCaptureConnectionAudioMasterVolumeAttribute_ = new NSString(bindings.QTCaptureConnectionAudioMasterVolumeAttribute);
93 }
94
95 NSString QTCaptureConnectionAudioVolumesAttribute ()
96 {
97 if (QTCaptureConnectionAudioVolumesAttribute_)
98 return QTCaptureConnectionAudioVolumesAttribute_;
99
100 return QTCaptureConnectionAudioVolumesAttribute_ = new NSString(bindings.QTCaptureConnectionAudioVolumesAttribute);
101 }
102
103 NSString QTCaptureConnectionEnabledAudioChannelsAttribute ()
104 {
105 if (QTCaptureConnectionEnabledAudioChannelsAttribute_)
106 return QTCaptureConnectionEnabledAudioChannelsAttribute_;
107
108 return QTCaptureConnectionEnabledAudioChannelsAttribute_ = new NSString(bindings.QTCaptureConnectionEnabledAudioChannelsAttribute);
109 }
110
111 class QTCaptureConnection : NSObject
112 {
113 mixin (ObjcWrap);
114
115 Object owner ()
116 {
117 return invokeObjcSelf!(Object, "owner");
118 }
119
120 NSString mediaType ()
121 {
122 return invokeObjcSelf!(NSString, "mediaType");
123 }
124
125 QTFormatDescription formatDescription ()
126 {
127 return invokeObjcSelf!(QTFormatDescription, "formatDescription");
128 }
129
130 bool isEnabled ()
131 {
132 return invokeObjcSelf!(bool, "isEnabled");
133 }
134
135 void setEnabled (bool enabled)
136 {
137 return invokeObjcSelf!(void, "setEnabled:", bool)(enabled);
138 }
139
140 NSDictionary connectionAttributes ()
141 {
142 return invokeObjcSelf!(NSDictionary, "connectionAttributes");
143 }
144
145 void setConnectionAttributes (NSDictionary connectionAttributes)
146 {
147 return invokeObjcSelf!(void, "setConnectionAttributes:", NSDictionary)(connectionAttributes);
148 }
149
150 bool attributeIsReadOnly (NSString attributeKey)
151 {
152 return invokeObjcSelf!(bool, "attributeIsReadOnly:", NSString)(attributeKey);
153 }
154
155 Object attributeForKey (NSString attributeKey)
156 {
157 return invokeObjcSelf!(Object, "attributeForKey:", NSString)(attributeKey);
158 }
159
160 void setAttribute (Object attribute, NSString key)
161 {
162 return invokeObjcSelf!(void, "setAttribute:forKey:", Object, NSString)(attribute, key);
163 }
164 }
165