Mercurial > projects > dstep
comparison dstep/qtkit/QTMovie.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 | f8a3b67adfcb |
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.QTMovie; | |
8 | |
9 import dstep.cocoa.Cocoa; | |
10 import dstep.appkit.NSImage; | |
11 import dstep.appkit.NSPasteboard; | |
12 import dstep.foundation.NSArray; | |
13 import dstep.foundation.NSCoder; | |
14 import dstep.foundation.NSData; | |
15 import dstep.foundation.NSDictionary; | |
16 import dstep.foundation.NSError; | |
17 import dstep.foundation.NSObjCRuntime; | |
18 import dstep.foundation.NSObject; | |
19 import dstep.foundation.NSString; | |
20 import dstep.foundation.NSURL; | |
21 import dstep.foundation.NSZone; | |
22 import dstep.objc.bridge.Bridge; | |
23 import dstep.objc.objc; | |
24 import dstep.qtkit.QTDataReference; | |
25 import dstep.qtkit.QTKitDefines; | |
26 import dstep.qtkit.QTTime; | |
27 import dstep.qtkit.QTTimeRange; | |
28 import dstep.qtkit.QTTrack; | |
29 | |
30 import bindings = dstep.qtkit.QTMovie_bindings; | |
31 | |
32 alias NSInteger QTMovieLoadState; | |
33 | |
34 private | |
35 { | |
36 NSString QTMoviePasteboardType_; | |
37 NSString QTMovieEditabilityDidChangeNotification_; | |
38 NSString QTMovieEditedNotification_; | |
39 NSString QTMovieLoadStateDidChangeNotification_; | |
40 NSString QTMovieLoopModeDidChangeNotification_; | |
41 NSString QTMovieMessageStringPostedNotification_; | |
42 NSString QTMovieRateDidChangeNotification_; | |
43 NSString QTMovieSelectionDidChangeNotification_; | |
44 NSString QTMovieSizeDidChangeNotification_; | |
45 NSString QTMovieStatusStringPostedNotification_; | |
46 NSString QTMovieTimeDidChangeNotification_; | |
47 NSString QTMovieVolumeDidChangeNotification_; | |
48 NSString QTMovieDidEndNotification_; | |
49 NSString QTMovieChapterDidChangeNotification_; | |
50 NSString QTMovieChapterListDidChangeNotification_; | |
51 NSString QTMovieEnterFullScreenRequestNotification_; | |
52 NSString QTMovieExitFullScreenRequestNotification_; | |
53 NSString QTMovieCloseWindowRequestNotification_; | |
54 NSString QTMovieApertureModeDidChangeNotification_; | |
55 NSString QTMovieMessageNotificationParameter_; | |
56 NSString QTMovieRateDidChangeNotificationParameter_; | |
57 NSString QTMovieStatusFlagsNotificationParameter_; | |
58 NSString QTMovieStatusCodeNotificationParameter_; | |
59 NSString QTMovieStatusStringNotificationParameter_; | |
60 NSString QTMovieTargetIDNotificationParameter_; | |
61 NSString QTMovieTargetNameNotificationParameter_; | |
62 NSString QTMovieExport_; | |
63 NSString QTMovieExportType_; | |
64 NSString QTMovieFlatten_; | |
65 NSString QTMovieExportSettings_; | |
66 NSString QTMovieExportManufacturer_; | |
67 NSString QTAddImageCodecType_; | |
68 NSString QTAddImageCodecQuality_; | |
69 NSString QTMovieDataReferenceAttribute_; | |
70 NSString QTMoviePasteboardAttribute_; | |
71 NSString QTMovieDataAttribute_; | |
72 NSString QTMovieFileOffsetAttribute_; | |
73 NSString QTMovieResolveDataRefsAttribute_; | |
74 NSString QTMovieAskUnresolvedDataRefsAttribute_; | |
75 NSString QTMovieOpenAsyncOKAttribute_; | |
76 NSString QTMovieApertureModeAttribute_; | |
77 NSString QTMovieAutoAlternatesAttribute_; | |
78 NSString QTMovieCopyrightAttribute_; | |
79 NSString QTMovieCreationTimeAttribute_; | |
80 NSString QTMovieCurrentSizeAttribute_; | |
81 NSString QTMovieCurrentTimeAttribute_; | |
82 NSString QTMovieDataSizeAttribute_; | |
83 NSString QTMovieDelegateAttribute_; | |
84 NSString QTMovieDisplayNameAttribute_; | |
85 NSString QTMovieDontInteractWithUserAttribute_; | |
86 NSString QTMovieDurationAttribute_; | |
87 NSString QTMovieEditableAttribute_; | |
88 NSString QTMovieFileNameAttribute_; | |
89 NSString QTMovieHasApertureModeDimensionsAttribute_; | |
90 NSString QTMovieHasAudioAttribute_; | |
91 NSString QTMovieHasDurationAttribute_; | |
92 NSString QTMovieHasVideoAttribute_; | |
93 NSString QTMovieIsActiveAttribute_; | |
94 NSString QTMovieIsInteractiveAttribute_; | |
95 NSString QTMovieIsLinearAttribute_; | |
96 NSString QTMovieIsSteppableAttribute_; | |
97 NSString QTMovieLoadStateAttribute_; | |
98 NSString QTMovieLoopsAttribute_; | |
99 NSString QTMovieLoopsBackAndForthAttribute_; | |
100 NSString QTMovieModificationTimeAttribute_; | |
101 NSString QTMovieMutedAttribute_; | |
102 NSString QTMovieNaturalSizeAttribute_; | |
103 NSString QTMoviePlaysAllFramesAttribute_; | |
104 NSString QTMoviePlaysSelectionOnlyAttribute_; | |
105 NSString QTMoviePosterTimeAttribute_; | |
106 NSString QTMoviePreferredMutedAttribute_; | |
107 NSString QTMoviePreferredRateAttribute_; | |
108 NSString QTMoviePreferredVolumeAttribute_; | |
109 NSString QTMoviePreviewModeAttribute_; | |
110 NSString QTMoviePreviewRangeAttribute_; | |
111 NSString QTMovieRateAttribute_; | |
112 NSString QTMovieSelectionAttribute_; | |
113 NSString QTMovieTimeScaleAttribute_; | |
114 NSString QTMovieURLAttribute_; | |
115 NSString QTMovieVolumeAttribute_; | |
116 NSString QTMovieRateChangesPreservePitchAttribute_; | |
117 NSString QTMovieApertureModeClassic_; | |
118 NSString QTMovieApertureModeClean_; | |
119 NSString QTMovieApertureModeProduction_; | |
120 NSString QTMovieApertureModeEncodedPixels_; | |
121 NSString QTMovieFrameImageSize_; | |
122 NSString QTMovieFrameImageType_; | |
123 NSString QTMovieFrameImageTypeNSImage_; | |
124 NSString QTMovieFrameImageTypeCGImageRef_; | |
125 NSString QTMovieFrameImageTypeCIImage_; | |
126 NSString QTMovieFrameImageTypeCVPixelBufferRef_; | |
127 NSString QTMovieFrameImageTypeCVOpenGLTextureRef_; | |
128 NSString QTMovieFrameImageOpenGLContext_; | |
129 NSString QTMovieFrameImagePixelFormat_; | |
130 NSString QTMovieFrameImageRepresentationsType_; | |
131 NSString QTMovieFrameImageDeinterlaceFields_; | |
132 NSString QTMovieFrameImageHighQuality_; | |
133 NSString QTMovieFrameImageSingleField_; | |
134 NSString QTMovieUneditableException_; | |
135 NSString QTMovieChapterName_; | |
136 NSString QTMovieChapterStartTime_; | |
137 NSString QTMovieChapterTargetTrackAttribute_; | |
138 } | |
139 | |
140 NSString QTMoviePasteboardType () | |
141 { | |
142 if (QTMoviePasteboardType_) | |
143 return QTMoviePasteboardType_; | |
144 | |
145 return QTMoviePasteboardType_ = new NSString(bindings.QTMoviePasteboardType); | |
146 } | |
147 | |
148 NSString QTMovieEditabilityDidChangeNotification () | |
149 { | |
150 if (QTMovieEditabilityDidChangeNotification_) | |
151 return QTMovieEditabilityDidChangeNotification_; | |
152 | |
153 return QTMovieEditabilityDidChangeNotification_ = new NSString(bindings.QTMovieEditabilityDidChangeNotification); | |
154 } | |
155 | |
156 NSString QTMovieEditedNotification () | |
157 { | |
158 if (QTMovieEditedNotification_) | |
159 return QTMovieEditedNotification_; | |
160 | |
161 return QTMovieEditedNotification_ = new NSString(bindings.QTMovieEditedNotification); | |
162 } | |
163 | |
164 NSString QTMovieLoadStateDidChangeNotification () | |
165 { | |
166 if (QTMovieLoadStateDidChangeNotification_) | |
167 return QTMovieLoadStateDidChangeNotification_; | |
168 | |
169 return QTMovieLoadStateDidChangeNotification_ = new NSString(bindings.QTMovieLoadStateDidChangeNotification); | |
170 } | |
171 | |
172 NSString QTMovieLoopModeDidChangeNotification () | |
173 { | |
174 if (QTMovieLoopModeDidChangeNotification_) | |
175 return QTMovieLoopModeDidChangeNotification_; | |
176 | |
177 return QTMovieLoopModeDidChangeNotification_ = new NSString(bindings.QTMovieLoopModeDidChangeNotification); | |
178 } | |
179 | |
180 NSString QTMovieMessageStringPostedNotification () | |
181 { | |
182 if (QTMovieMessageStringPostedNotification_) | |
183 return QTMovieMessageStringPostedNotification_; | |
184 | |
185 return QTMovieMessageStringPostedNotification_ = new NSString(bindings.QTMovieMessageStringPostedNotification); | |
186 } | |
187 | |
188 NSString QTMovieRateDidChangeNotification () | |
189 { | |
190 if (QTMovieRateDidChangeNotification_) | |
191 return QTMovieRateDidChangeNotification_; | |
192 | |
193 return QTMovieRateDidChangeNotification_ = new NSString(bindings.QTMovieRateDidChangeNotification); | |
194 } | |
195 | |
196 NSString QTMovieSelectionDidChangeNotification () | |
197 { | |
198 if (QTMovieSelectionDidChangeNotification_) | |
199 return QTMovieSelectionDidChangeNotification_; | |
200 | |
201 return QTMovieSelectionDidChangeNotification_ = new NSString(bindings.QTMovieSelectionDidChangeNotification); | |
202 } | |
203 | |
204 NSString QTMovieSizeDidChangeNotification () | |
205 { | |
206 if (QTMovieSizeDidChangeNotification_) | |
207 return QTMovieSizeDidChangeNotification_; | |
208 | |
209 return QTMovieSizeDidChangeNotification_ = new NSString(bindings.QTMovieSizeDidChangeNotification); | |
210 } | |
211 | |
212 NSString QTMovieStatusStringPostedNotification () | |
213 { | |
214 if (QTMovieStatusStringPostedNotification_) | |
215 return QTMovieStatusStringPostedNotification_; | |
216 | |
217 return QTMovieStatusStringPostedNotification_ = new NSString(bindings.QTMovieStatusStringPostedNotification); | |
218 } | |
219 | |
220 NSString QTMovieTimeDidChangeNotification () | |
221 { | |
222 if (QTMovieTimeDidChangeNotification_) | |
223 return QTMovieTimeDidChangeNotification_; | |
224 | |
225 return QTMovieTimeDidChangeNotification_ = new NSString(bindings.QTMovieTimeDidChangeNotification); | |
226 } | |
227 | |
228 NSString QTMovieVolumeDidChangeNotification () | |
229 { | |
230 if (QTMovieVolumeDidChangeNotification_) | |
231 return QTMovieVolumeDidChangeNotification_; | |
232 | |
233 return QTMovieVolumeDidChangeNotification_ = new NSString(bindings.QTMovieVolumeDidChangeNotification); | |
234 } | |
235 | |
236 NSString QTMovieDidEndNotification () | |
237 { | |
238 if (QTMovieDidEndNotification_) | |
239 return QTMovieDidEndNotification_; | |
240 | |
241 return QTMovieDidEndNotification_ = new NSString(bindings.QTMovieDidEndNotification); | |
242 } | |
243 | |
244 NSString QTMovieChapterDidChangeNotification () | |
245 { | |
246 if (QTMovieChapterDidChangeNotification_) | |
247 return QTMovieChapterDidChangeNotification_; | |
248 | |
249 return QTMovieChapterDidChangeNotification_ = new NSString(bindings.QTMovieChapterDidChangeNotification); | |
250 } | |
251 | |
252 NSString QTMovieChapterListDidChangeNotification () | |
253 { | |
254 if (QTMovieChapterListDidChangeNotification_) | |
255 return QTMovieChapterListDidChangeNotification_; | |
256 | |
257 return QTMovieChapterListDidChangeNotification_ = new NSString(bindings.QTMovieChapterListDidChangeNotification); | |
258 } | |
259 | |
260 NSString QTMovieEnterFullScreenRequestNotification () | |
261 { | |
262 if (QTMovieEnterFullScreenRequestNotification_) | |
263 return QTMovieEnterFullScreenRequestNotification_; | |
264 | |
265 return QTMovieEnterFullScreenRequestNotification_ = new NSString(bindings.QTMovieEnterFullScreenRequestNotification); | |
266 } | |
267 | |
268 NSString QTMovieExitFullScreenRequestNotification () | |
269 { | |
270 if (QTMovieExitFullScreenRequestNotification_) | |
271 return QTMovieExitFullScreenRequestNotification_; | |
272 | |
273 return QTMovieExitFullScreenRequestNotification_ = new NSString(bindings.QTMovieExitFullScreenRequestNotification); | |
274 } | |
275 | |
276 NSString QTMovieCloseWindowRequestNotification () | |
277 { | |
278 if (QTMovieCloseWindowRequestNotification_) | |
279 return QTMovieCloseWindowRequestNotification_; | |
280 | |
281 return QTMovieCloseWindowRequestNotification_ = new NSString(bindings.QTMovieCloseWindowRequestNotification); | |
282 } | |
283 | |
284 NSString QTMovieApertureModeDidChangeNotification () | |
285 { | |
286 if (QTMovieApertureModeDidChangeNotification_) | |
287 return QTMovieApertureModeDidChangeNotification_; | |
288 | |
289 return QTMovieApertureModeDidChangeNotification_ = new NSString(bindings.QTMovieApertureModeDidChangeNotification); | |
290 } | |
291 | |
292 NSString QTMovieMessageNotificationParameter () | |
293 { | |
294 if (QTMovieMessageNotificationParameter_) | |
295 return QTMovieMessageNotificationParameter_; | |
296 | |
297 return QTMovieMessageNotificationParameter_ = new NSString(bindings.QTMovieMessageNotificationParameter); | |
298 } | |
299 | |
300 NSString QTMovieRateDidChangeNotificationParameter () | |
301 { | |
302 if (QTMovieRateDidChangeNotificationParameter_) | |
303 return QTMovieRateDidChangeNotificationParameter_; | |
304 | |
305 return QTMovieRateDidChangeNotificationParameter_ = new NSString(bindings.QTMovieRateDidChangeNotificationParameter); | |
306 } | |
307 | |
308 NSString QTMovieStatusFlagsNotificationParameter () | |
309 { | |
310 if (QTMovieStatusFlagsNotificationParameter_) | |
311 return QTMovieStatusFlagsNotificationParameter_; | |
312 | |
313 return QTMovieStatusFlagsNotificationParameter_ = new NSString(bindings.QTMovieStatusFlagsNotificationParameter); | |
314 } | |
315 | |
316 NSString QTMovieStatusCodeNotificationParameter () | |
317 { | |
318 if (QTMovieStatusCodeNotificationParameter_) | |
319 return QTMovieStatusCodeNotificationParameter_; | |
320 | |
321 return QTMovieStatusCodeNotificationParameter_ = new NSString(bindings.QTMovieStatusCodeNotificationParameter); | |
322 } | |
323 | |
324 NSString QTMovieStatusStringNotificationParameter () | |
325 { | |
326 if (QTMovieStatusStringNotificationParameter_) | |
327 return QTMovieStatusStringNotificationParameter_; | |
328 | |
329 return QTMovieStatusStringNotificationParameter_ = new NSString(bindings.QTMovieStatusStringNotificationParameter); | |
330 } | |
331 | |
332 NSString QTMovieTargetIDNotificationParameter () | |
333 { | |
334 if (QTMovieTargetIDNotificationParameter_) | |
335 return QTMovieTargetIDNotificationParameter_; | |
336 | |
337 return QTMovieTargetIDNotificationParameter_ = new NSString(bindings.QTMovieTargetIDNotificationParameter); | |
338 } | |
339 | |
340 NSString QTMovieTargetNameNotificationParameter () | |
341 { | |
342 if (QTMovieTargetNameNotificationParameter_) | |
343 return QTMovieTargetNameNotificationParameter_; | |
344 | |
345 return QTMovieTargetNameNotificationParameter_ = new NSString(bindings.QTMovieTargetNameNotificationParameter); | |
346 } | |
347 | |
348 NSString QTMovieExport () | |
349 { | |
350 if (QTMovieExport_) | |
351 return QTMovieExport_; | |
352 | |
353 return QTMovieExport_ = new NSString(bindings.QTMovieExport); | |
354 } | |
355 | |
356 NSString QTMovieExportType () | |
357 { | |
358 if (QTMovieExportType_) | |
359 return QTMovieExportType_; | |
360 | |
361 return QTMovieExportType_ = new NSString(bindings.QTMovieExportType); | |
362 } | |
363 | |
364 NSString QTMovieFlatten () | |
365 { | |
366 if (QTMovieFlatten_) | |
367 return QTMovieFlatten_; | |
368 | |
369 return QTMovieFlatten_ = new NSString(bindings.QTMovieFlatten); | |
370 } | |
371 | |
372 NSString QTMovieExportSettings () | |
373 { | |
374 if (QTMovieExportSettings_) | |
375 return QTMovieExportSettings_; | |
376 | |
377 return QTMovieExportSettings_ = new NSString(bindings.QTMovieExportSettings); | |
378 } | |
379 | |
380 NSString QTMovieExportManufacturer () | |
381 { | |
382 if (QTMovieExportManufacturer_) | |
383 return QTMovieExportManufacturer_; | |
384 | |
385 return QTMovieExportManufacturer_ = new NSString(bindings.QTMovieExportManufacturer); | |
386 } | |
387 | |
388 NSString QTAddImageCodecType () | |
389 { | |
390 if (QTAddImageCodecType_) | |
391 return QTAddImageCodecType_; | |
392 | |
393 return QTAddImageCodecType_ = new NSString(bindings.QTAddImageCodecType); | |
394 } | |
395 | |
396 NSString QTAddImageCodecQuality () | |
397 { | |
398 if (QTAddImageCodecQuality_) | |
399 return QTAddImageCodecQuality_; | |
400 | |
401 return QTAddImageCodecQuality_ = new NSString(bindings.QTAddImageCodecQuality); | |
402 } | |
403 | |
404 NSString QTMovieDataReferenceAttribute () | |
405 { | |
406 if (QTMovieDataReferenceAttribute_) | |
407 return QTMovieDataReferenceAttribute_; | |
408 | |
409 return QTMovieDataReferenceAttribute_ = new NSString(bindings.QTMovieDataReferenceAttribute); | |
410 } | |
411 | |
412 NSString QTMoviePasteboardAttribute () | |
413 { | |
414 if (QTMoviePasteboardAttribute_) | |
415 return QTMoviePasteboardAttribute_; | |
416 | |
417 return QTMoviePasteboardAttribute_ = new NSString(bindings.QTMoviePasteboardAttribute); | |
418 } | |
419 | |
420 NSString QTMovieDataAttribute () | |
421 { | |
422 if (QTMovieDataAttribute_) | |
423 return QTMovieDataAttribute_; | |
424 | |
425 return QTMovieDataAttribute_ = new NSString(bindings.QTMovieDataAttribute); | |
426 } | |
427 | |
428 NSString QTMovieFileOffsetAttribute () | |
429 { | |
430 if (QTMovieFileOffsetAttribute_) | |
431 return QTMovieFileOffsetAttribute_; | |
432 | |
433 return QTMovieFileOffsetAttribute_ = new NSString(bindings.QTMovieFileOffsetAttribute); | |
434 } | |
435 | |
436 NSString QTMovieResolveDataRefsAttribute () | |
437 { | |
438 if (QTMovieResolveDataRefsAttribute_) | |
439 return QTMovieResolveDataRefsAttribute_; | |
440 | |
441 return QTMovieResolveDataRefsAttribute_ = new NSString(bindings.QTMovieResolveDataRefsAttribute); | |
442 } | |
443 | |
444 NSString QTMovieAskUnresolvedDataRefsAttribute () | |
445 { | |
446 if (QTMovieAskUnresolvedDataRefsAttribute_) | |
447 return QTMovieAskUnresolvedDataRefsAttribute_; | |
448 | |
449 return QTMovieAskUnresolvedDataRefsAttribute_ = new NSString(bindings.QTMovieAskUnresolvedDataRefsAttribute); | |
450 } | |
451 | |
452 NSString QTMovieOpenAsyncOKAttribute () | |
453 { | |
454 if (QTMovieOpenAsyncOKAttribute_) | |
455 return QTMovieOpenAsyncOKAttribute_; | |
456 | |
457 return QTMovieOpenAsyncOKAttribute_ = new NSString(bindings.QTMovieOpenAsyncOKAttribute); | |
458 } | |
459 | |
460 NSString QTMovieApertureModeAttribute () | |
461 { | |
462 if (QTMovieApertureModeAttribute_) | |
463 return QTMovieApertureModeAttribute_; | |
464 | |
465 return QTMovieApertureModeAttribute_ = new NSString(bindings.QTMovieApertureModeAttribute); | |
466 } | |
467 | |
468 NSString QTMovieAutoAlternatesAttribute () | |
469 { | |
470 if (QTMovieAutoAlternatesAttribute_) | |
471 return QTMovieAutoAlternatesAttribute_; | |
472 | |
473 return QTMovieAutoAlternatesAttribute_ = new NSString(bindings.QTMovieAutoAlternatesAttribute); | |
474 } | |
475 | |
476 NSString QTMovieCopyrightAttribute () | |
477 { | |
478 if (QTMovieCopyrightAttribute_) | |
479 return QTMovieCopyrightAttribute_; | |
480 | |
481 return QTMovieCopyrightAttribute_ = new NSString(bindings.QTMovieCopyrightAttribute); | |
482 } | |
483 | |
484 NSString QTMovieCreationTimeAttribute () | |
485 { | |
486 if (QTMovieCreationTimeAttribute_) | |
487 return QTMovieCreationTimeAttribute_; | |
488 | |
489 return QTMovieCreationTimeAttribute_ = new NSString(bindings.QTMovieCreationTimeAttribute); | |
490 } | |
491 | |
492 NSString QTMovieCurrentSizeAttribute () | |
493 { | |
494 if (QTMovieCurrentSizeAttribute_) | |
495 return QTMovieCurrentSizeAttribute_; | |
496 | |
497 return QTMovieCurrentSizeAttribute_ = new NSString(bindings.QTMovieCurrentSizeAttribute); | |
498 } | |
499 | |
500 NSString QTMovieCurrentTimeAttribute () | |
501 { | |
502 if (QTMovieCurrentTimeAttribute_) | |
503 return QTMovieCurrentTimeAttribute_; | |
504 | |
505 return QTMovieCurrentTimeAttribute_ = new NSString(bindings.QTMovieCurrentTimeAttribute); | |
506 } | |
507 | |
508 NSString QTMovieDataSizeAttribute () | |
509 { | |
510 if (QTMovieDataSizeAttribute_) | |
511 return QTMovieDataSizeAttribute_; | |
512 | |
513 return QTMovieDataSizeAttribute_ = new NSString(bindings.QTMovieDataSizeAttribute); | |
514 } | |
515 | |
516 NSString QTMovieDelegateAttribute () | |
517 { | |
518 if (QTMovieDelegateAttribute_) | |
519 return QTMovieDelegateAttribute_; | |
520 | |
521 return QTMovieDelegateAttribute_ = new NSString(bindings.QTMovieDelegateAttribute); | |
522 } | |
523 | |
524 NSString QTMovieDisplayNameAttribute () | |
525 { | |
526 if (QTMovieDisplayNameAttribute_) | |
527 return QTMovieDisplayNameAttribute_; | |
528 | |
529 return QTMovieDisplayNameAttribute_ = new NSString(bindings.QTMovieDisplayNameAttribute); | |
530 } | |
531 | |
532 NSString QTMovieDontInteractWithUserAttribute () | |
533 { | |
534 if (QTMovieDontInteractWithUserAttribute_) | |
535 return QTMovieDontInteractWithUserAttribute_; | |
536 | |
537 return QTMovieDontInteractWithUserAttribute_ = new NSString(bindings.QTMovieDontInteractWithUserAttribute); | |
538 } | |
539 | |
540 NSString QTMovieDurationAttribute () | |
541 { | |
542 if (QTMovieDurationAttribute_) | |
543 return QTMovieDurationAttribute_; | |
544 | |
545 return QTMovieDurationAttribute_ = new NSString(bindings.QTMovieDurationAttribute); | |
546 } | |
547 | |
548 NSString QTMovieEditableAttribute () | |
549 { | |
550 if (QTMovieEditableAttribute_) | |
551 return QTMovieEditableAttribute_; | |
552 | |
553 return QTMovieEditableAttribute_ = new NSString(bindings.QTMovieEditableAttribute); | |
554 } | |
555 | |
556 NSString QTMovieFileNameAttribute () | |
557 { | |
558 if (QTMovieFileNameAttribute_) | |
559 return QTMovieFileNameAttribute_; | |
560 | |
561 return QTMovieFileNameAttribute_ = new NSString(bindings.QTMovieFileNameAttribute); | |
562 } | |
563 | |
564 NSString QTMovieHasApertureModeDimensionsAttribute () | |
565 { | |
566 if (QTMovieHasApertureModeDimensionsAttribute_) | |
567 return QTMovieHasApertureModeDimensionsAttribute_; | |
568 | |
569 return QTMovieHasApertureModeDimensionsAttribute_ = new NSString(bindings.QTMovieHasApertureModeDimensionsAttribute); | |
570 } | |
571 | |
572 NSString QTMovieHasAudioAttribute () | |
573 { | |
574 if (QTMovieHasAudioAttribute_) | |
575 return QTMovieHasAudioAttribute_; | |
576 | |
577 return QTMovieHasAudioAttribute_ = new NSString(bindings.QTMovieHasAudioAttribute); | |
578 } | |
579 | |
580 NSString QTMovieHasDurationAttribute () | |
581 { | |
582 if (QTMovieHasDurationAttribute_) | |
583 return QTMovieHasDurationAttribute_; | |
584 | |
585 return QTMovieHasDurationAttribute_ = new NSString(bindings.QTMovieHasDurationAttribute); | |
586 } | |
587 | |
588 NSString QTMovieHasVideoAttribute () | |
589 { | |
590 if (QTMovieHasVideoAttribute_) | |
591 return QTMovieHasVideoAttribute_; | |
592 | |
593 return QTMovieHasVideoAttribute_ = new NSString(bindings.QTMovieHasVideoAttribute); | |
594 } | |
595 | |
596 NSString QTMovieIsActiveAttribute () | |
597 { | |
598 if (QTMovieIsActiveAttribute_) | |
599 return QTMovieIsActiveAttribute_; | |
600 | |
601 return QTMovieIsActiveAttribute_ = new NSString(bindings.QTMovieIsActiveAttribute); | |
602 } | |
603 | |
604 NSString QTMovieIsInteractiveAttribute () | |
605 { | |
606 if (QTMovieIsInteractiveAttribute_) | |
607 return QTMovieIsInteractiveAttribute_; | |
608 | |
609 return QTMovieIsInteractiveAttribute_ = new NSString(bindings.QTMovieIsInteractiveAttribute); | |
610 } | |
611 | |
612 NSString QTMovieIsLinearAttribute () | |
613 { | |
614 if (QTMovieIsLinearAttribute_) | |
615 return QTMovieIsLinearAttribute_; | |
616 | |
617 return QTMovieIsLinearAttribute_ = new NSString(bindings.QTMovieIsLinearAttribute); | |
618 } | |
619 | |
620 NSString QTMovieIsSteppableAttribute () | |
621 { | |
622 if (QTMovieIsSteppableAttribute_) | |
623 return QTMovieIsSteppableAttribute_; | |
624 | |
625 return QTMovieIsSteppableAttribute_ = new NSString(bindings.QTMovieIsSteppableAttribute); | |
626 } | |
627 | |
628 NSString QTMovieLoadStateAttribute () | |
629 { | |
630 if (QTMovieLoadStateAttribute_) | |
631 return QTMovieLoadStateAttribute_; | |
632 | |
633 return QTMovieLoadStateAttribute_ = new NSString(bindings.QTMovieLoadStateAttribute); | |
634 } | |
635 | |
636 NSString QTMovieLoopsAttribute () | |
637 { | |
638 if (QTMovieLoopsAttribute_) | |
639 return QTMovieLoopsAttribute_; | |
640 | |
641 return QTMovieLoopsAttribute_ = new NSString(bindings.QTMovieLoopsAttribute); | |
642 } | |
643 | |
644 NSString QTMovieLoopsBackAndForthAttribute () | |
645 { | |
646 if (QTMovieLoopsBackAndForthAttribute_) | |
647 return QTMovieLoopsBackAndForthAttribute_; | |
648 | |
649 return QTMovieLoopsBackAndForthAttribute_ = new NSString(bindings.QTMovieLoopsBackAndForthAttribute); | |
650 } | |
651 | |
652 NSString QTMovieModificationTimeAttribute () | |
653 { | |
654 if (QTMovieModificationTimeAttribute_) | |
655 return QTMovieModificationTimeAttribute_; | |
656 | |
657 return QTMovieModificationTimeAttribute_ = new NSString(bindings.QTMovieModificationTimeAttribute); | |
658 } | |
659 | |
660 NSString QTMovieMutedAttribute () | |
661 { | |
662 if (QTMovieMutedAttribute_) | |
663 return QTMovieMutedAttribute_; | |
664 | |
665 return QTMovieMutedAttribute_ = new NSString(bindings.QTMovieMutedAttribute); | |
666 } | |
667 | |
668 NSString QTMovieNaturalSizeAttribute () | |
669 { | |
670 if (QTMovieNaturalSizeAttribute_) | |
671 return QTMovieNaturalSizeAttribute_; | |
672 | |
673 return QTMovieNaturalSizeAttribute_ = new NSString(bindings.QTMovieNaturalSizeAttribute); | |
674 } | |
675 | |
676 NSString QTMoviePlaysAllFramesAttribute () | |
677 { | |
678 if (QTMoviePlaysAllFramesAttribute_) | |
679 return QTMoviePlaysAllFramesAttribute_; | |
680 | |
681 return QTMoviePlaysAllFramesAttribute_ = new NSString(bindings.QTMoviePlaysAllFramesAttribute); | |
682 } | |
683 | |
684 NSString QTMoviePlaysSelectionOnlyAttribute () | |
685 { | |
686 if (QTMoviePlaysSelectionOnlyAttribute_) | |
687 return QTMoviePlaysSelectionOnlyAttribute_; | |
688 | |
689 return QTMoviePlaysSelectionOnlyAttribute_ = new NSString(bindings.QTMoviePlaysSelectionOnlyAttribute); | |
690 } | |
691 | |
692 NSString QTMoviePosterTimeAttribute () | |
693 { | |
694 if (QTMoviePosterTimeAttribute_) | |
695 return QTMoviePosterTimeAttribute_; | |
696 | |
697 return QTMoviePosterTimeAttribute_ = new NSString(bindings.QTMoviePosterTimeAttribute); | |
698 } | |
699 | |
700 NSString QTMoviePreferredMutedAttribute () | |
701 { | |
702 if (QTMoviePreferredMutedAttribute_) | |
703 return QTMoviePreferredMutedAttribute_; | |
704 | |
705 return QTMoviePreferredMutedAttribute_ = new NSString(bindings.QTMoviePreferredMutedAttribute); | |
706 } | |
707 | |
708 NSString QTMoviePreferredRateAttribute () | |
709 { | |
710 if (QTMoviePreferredRateAttribute_) | |
711 return QTMoviePreferredRateAttribute_; | |
712 | |
713 return QTMoviePreferredRateAttribute_ = new NSString(bindings.QTMoviePreferredRateAttribute); | |
714 } | |
715 | |
716 NSString QTMoviePreferredVolumeAttribute () | |
717 { | |
718 if (QTMoviePreferredVolumeAttribute_) | |
719 return QTMoviePreferredVolumeAttribute_; | |
720 | |
721 return QTMoviePreferredVolumeAttribute_ = new NSString(bindings.QTMoviePreferredVolumeAttribute); | |
722 } | |
723 | |
724 NSString QTMoviePreviewModeAttribute () | |
725 { | |
726 if (QTMoviePreviewModeAttribute_) | |
727 return QTMoviePreviewModeAttribute_; | |
728 | |
729 return QTMoviePreviewModeAttribute_ = new NSString(bindings.QTMoviePreviewModeAttribute); | |
730 } | |
731 | |
732 NSString QTMoviePreviewRangeAttribute () | |
733 { | |
734 if (QTMoviePreviewRangeAttribute_) | |
735 return QTMoviePreviewRangeAttribute_; | |
736 | |
737 return QTMoviePreviewRangeAttribute_ = new NSString(bindings.QTMoviePreviewRangeAttribute); | |
738 } | |
739 | |
740 NSString QTMovieRateAttribute () | |
741 { | |
742 if (QTMovieRateAttribute_) | |
743 return QTMovieRateAttribute_; | |
744 | |
745 return QTMovieRateAttribute_ = new NSString(bindings.QTMovieRateAttribute); | |
746 } | |
747 | |
748 NSString QTMovieSelectionAttribute () | |
749 { | |
750 if (QTMovieSelectionAttribute_) | |
751 return QTMovieSelectionAttribute_; | |
752 | |
753 return QTMovieSelectionAttribute_ = new NSString(bindings.QTMovieSelectionAttribute); | |
754 } | |
755 | |
756 NSString QTMovieTimeScaleAttribute () | |
757 { | |
758 if (QTMovieTimeScaleAttribute_) | |
759 return QTMovieTimeScaleAttribute_; | |
760 | |
761 return QTMovieTimeScaleAttribute_ = new NSString(bindings.QTMovieTimeScaleAttribute); | |
762 } | |
763 | |
764 NSString QTMovieURLAttribute () | |
765 { | |
766 if (QTMovieURLAttribute_) | |
767 return QTMovieURLAttribute_; | |
768 | |
769 return QTMovieURLAttribute_ = new NSString(bindings.QTMovieURLAttribute); | |
770 } | |
771 | |
772 NSString QTMovieVolumeAttribute () | |
773 { | |
774 if (QTMovieVolumeAttribute_) | |
775 return QTMovieVolumeAttribute_; | |
776 | |
777 return QTMovieVolumeAttribute_ = new NSString(bindings.QTMovieVolumeAttribute); | |
778 } | |
779 | |
780 NSString QTMovieRateChangesPreservePitchAttribute () | |
781 { | |
782 if (QTMovieRateChangesPreservePitchAttribute_) | |
783 return QTMovieRateChangesPreservePitchAttribute_; | |
784 | |
785 return QTMovieRateChangesPreservePitchAttribute_ = new NSString(bindings.QTMovieRateChangesPreservePitchAttribute); | |
786 } | |
787 | |
788 NSString QTMovieApertureModeClassic () | |
789 { | |
790 if (QTMovieApertureModeClassic_) | |
791 return QTMovieApertureModeClassic_; | |
792 | |
793 return QTMovieApertureModeClassic_ = new NSString(bindings.QTMovieApertureModeClassic); | |
794 } | |
795 | |
796 NSString QTMovieApertureModeClean () | |
797 { | |
798 if (QTMovieApertureModeClean_) | |
799 return QTMovieApertureModeClean_; | |
800 | |
801 return QTMovieApertureModeClean_ = new NSString(bindings.QTMovieApertureModeClean); | |
802 } | |
803 | |
804 NSString QTMovieApertureModeProduction () | |
805 { | |
806 if (QTMovieApertureModeProduction_) | |
807 return QTMovieApertureModeProduction_; | |
808 | |
809 return QTMovieApertureModeProduction_ = new NSString(bindings.QTMovieApertureModeProduction); | |
810 } | |
811 | |
812 NSString QTMovieApertureModeEncodedPixels () | |
813 { | |
814 if (QTMovieApertureModeEncodedPixels_) | |
815 return QTMovieApertureModeEncodedPixels_; | |
816 | |
817 return QTMovieApertureModeEncodedPixels_ = new NSString(bindings.QTMovieApertureModeEncodedPixels); | |
818 } | |
819 | |
820 NSString QTMovieFrameImageSize () | |
821 { | |
822 if (QTMovieFrameImageSize_) | |
823 return QTMovieFrameImageSize_; | |
824 | |
825 return QTMovieFrameImageSize_ = new NSString(bindings.QTMovieFrameImageSize); | |
826 } | |
827 | |
828 NSString QTMovieFrameImageType () | |
829 { | |
830 if (QTMovieFrameImageType_) | |
831 return QTMovieFrameImageType_; | |
832 | |
833 return QTMovieFrameImageType_ = new NSString(bindings.QTMovieFrameImageType); | |
834 } | |
835 | |
836 NSString QTMovieFrameImageTypeNSImage () | |
837 { | |
838 if (QTMovieFrameImageTypeNSImage_) | |
839 return QTMovieFrameImageTypeNSImage_; | |
840 | |
841 return QTMovieFrameImageTypeNSImage_ = new NSString(bindings.QTMovieFrameImageTypeNSImage); | |
842 } | |
843 | |
844 NSString QTMovieFrameImageTypeCGImageRef () | |
845 { | |
846 if (QTMovieFrameImageTypeCGImageRef_) | |
847 return QTMovieFrameImageTypeCGImageRef_; | |
848 | |
849 return QTMovieFrameImageTypeCGImageRef_ = new NSString(bindings.QTMovieFrameImageTypeCGImageRef); | |
850 } | |
851 | |
852 NSString QTMovieFrameImageTypeCIImage () | |
853 { | |
854 if (QTMovieFrameImageTypeCIImage_) | |
855 return QTMovieFrameImageTypeCIImage_; | |
856 | |
857 return QTMovieFrameImageTypeCIImage_ = new NSString(bindings.QTMovieFrameImageTypeCIImage); | |
858 } | |
859 | |
860 NSString QTMovieFrameImageTypeCVPixelBufferRef () | |
861 { | |
862 if (QTMovieFrameImageTypeCVPixelBufferRef_) | |
863 return QTMovieFrameImageTypeCVPixelBufferRef_; | |
864 | |
865 return QTMovieFrameImageTypeCVPixelBufferRef_ = new NSString(bindings.QTMovieFrameImageTypeCVPixelBufferRef); | |
866 } | |
867 | |
868 NSString QTMovieFrameImageTypeCVOpenGLTextureRef () | |
869 { | |
870 if (QTMovieFrameImageTypeCVOpenGLTextureRef_) | |
871 return QTMovieFrameImageTypeCVOpenGLTextureRef_; | |
872 | |
873 return QTMovieFrameImageTypeCVOpenGLTextureRef_ = new NSString(bindings.QTMovieFrameImageTypeCVOpenGLTextureRef); | |
874 } | |
875 | |
876 NSString QTMovieFrameImageOpenGLContext () | |
877 { | |
878 if (QTMovieFrameImageOpenGLContext_) | |
879 return QTMovieFrameImageOpenGLContext_; | |
880 | |
881 return QTMovieFrameImageOpenGLContext_ = new NSString(bindings.QTMovieFrameImageOpenGLContext); | |
882 } | |
883 | |
884 NSString QTMovieFrameImagePixelFormat () | |
885 { | |
886 if (QTMovieFrameImagePixelFormat_) | |
887 return QTMovieFrameImagePixelFormat_; | |
888 | |
889 return QTMovieFrameImagePixelFormat_ = new NSString(bindings.QTMovieFrameImagePixelFormat); | |
890 } | |
891 | |
892 NSString QTMovieFrameImageRepresentationsType () | |
893 { | |
894 if (QTMovieFrameImageRepresentationsType_) | |
895 return QTMovieFrameImageRepresentationsType_; | |
896 | |
897 return QTMovieFrameImageRepresentationsType_ = new NSString(bindings.QTMovieFrameImageRepresentationsType); | |
898 } | |
899 | |
900 NSString QTMovieFrameImageDeinterlaceFields () | |
901 { | |
902 if (QTMovieFrameImageDeinterlaceFields_) | |
903 return QTMovieFrameImageDeinterlaceFields_; | |
904 | |
905 return QTMovieFrameImageDeinterlaceFields_ = new NSString(bindings.QTMovieFrameImageDeinterlaceFields); | |
906 } | |
907 | |
908 NSString QTMovieFrameImageHighQuality () | |
909 { | |
910 if (QTMovieFrameImageHighQuality_) | |
911 return QTMovieFrameImageHighQuality_; | |
912 | |
913 return QTMovieFrameImageHighQuality_ = new NSString(bindings.QTMovieFrameImageHighQuality); | |
914 } | |
915 | |
916 NSString QTMovieFrameImageSingleField () | |
917 { | |
918 if (QTMovieFrameImageSingleField_) | |
919 return QTMovieFrameImageSingleField_; | |
920 | |
921 return QTMovieFrameImageSingleField_ = new NSString(bindings.QTMovieFrameImageSingleField); | |
922 } | |
923 | |
924 NSString QTMovieUneditableException () | |
925 { | |
926 if (QTMovieUneditableException_) | |
927 return QTMovieUneditableException_; | |
928 | |
929 return QTMovieUneditableException_ = new NSString(bindings.QTMovieUneditableException); | |
930 } | |
931 | |
932 NSString QTMovieChapterName () | |
933 { | |
934 if (QTMovieChapterName_) | |
935 return QTMovieChapterName_; | |
936 | |
937 return QTMovieChapterName_ = new NSString(bindings.QTMovieChapterName); | |
938 } | |
939 | |
940 NSString QTMovieChapterStartTime () | |
941 { | |
942 if (QTMovieChapterStartTime_) | |
943 return QTMovieChapterStartTime_; | |
944 | |
945 return QTMovieChapterStartTime_ = new NSString(bindings.QTMovieChapterStartTime); | |
946 } | |
947 | |
948 NSString QTMovieChapterTargetTrackAttribute () | |
949 { | |
950 if (QTMovieChapterTargetTrackAttribute_) | |
951 return QTMovieChapterTargetTrackAttribute_; | |
952 | |
953 return QTMovieChapterTargetTrackAttribute_ = new NSString(bindings.QTMovieChapterTargetTrackAttribute); | |
954 } | |
955 | |
956 enum | |
957 { | |
958 QTIncludeStillImageTypes = 1 << 0, | |
959 QTIncludeTranslatableTypes = 1 << 1, | |
960 QTIncludeAggressiveTypes = 1 << 2, | |
961 QTIncludeDynamicTypes = 1 << 3, | |
962 QTIncludeCommonTypes = 0, | |
963 QTIncludeAllTypes = 0xffff | |
964 } | |
965 | |
966 enum | |
967 { | |
968 QTMovieOperationBeginPhase = 0, | |
969 QTMovieOperationUpdatePercentPhase = 1, | |
970 QTMovieOperationEndPhase = 2 | |
971 } | |
972 | |
973 enum | |
974 { | |
975 QTMovieLoadStateError = -1L, | |
976 QTMovieLoadStateLoading = 1000, | |
977 QTMovieLoadStateLoaded = 2000, | |
978 QTMovieLoadStatePlayable = 10000, | |
979 QTMovieLoadStatePlaythroughOK = 20000, | |
980 QTMovieLoadStateComplete = 100000L | |
981 } | |
982 | |
983 const TQTMovieDelegate = ` | |
984 | |
985 bool movie (QTMovie movie, NSURL url) | |
986 { | |
987 return invokeObjcSelf!(bool, "movie:linkToURL:", QTMovie, NSURL)(movie, url); | |
988 } | |
989 | |
990 bool movieShouldLoadData (Object sender) | |
991 { | |
992 return invokeObjcSelf!(bool, "movieShouldLoadData:", Object)(sender); | |
993 } | |
994 | |
995 bool movieShouldTask (Object movie) | |
996 { | |
997 return invokeObjcSelf!(bool, "movieShouldTask:", Object)(movie); | |
998 } | |
999 | |
1000 QTMovie externalMovie (NSDictionary dictionary) | |
1001 { | |
1002 return invokeObjcSelf!(QTMovie, "externalMovie:", NSDictionary)(dictionary); | |
1003 } | |
1004 | |
1005 bool movie (QTMovie movie, NSString op, int phase, NSNumber percent, NSDictionary attributes) | |
1006 { | |
1007 return invokeObjcSelf!(bool, "movie:shouldContinueOperation:withPhase:atPercent:withAttributes:", QTMovie, NSString, int, NSNumber, NSDictionary)(movie, op, phase, percent, attributes); | |
1008 } | |
1009 | |
1010 //mixin ObjcBindMethod!(movie, "movie:linkToURL:"); | |
1011 //mixin ObjcBindMethod!(movieShouldLoadData, "movieShouldLoadData:"); | |
1012 //mixin ObjcBindMethod!(movieShouldTask, "movieShouldTask:"); | |
1013 //mixin ObjcBindMethod!(externalMovie, "externalMovie:"); | |
1014 //mixin ObjcBindMethod!(movie, "movie:shouldContinueOperation:withPhase:atPercent:withAttributes:"); | |
1015 | |
1016 `; | |
1017 | |
1018 const TQTMovieThreading = ` | |
1019 | |
1020 static void enterQTKitOnThread () | |
1021 { | |
1022 return invokeObjcSelfClass!(void, "enterQTKitOnThread"); | |
1023 } | |
1024 | |
1025 static void enterQTKitOnThreadDisablingThreadSafetyProtection () | |
1026 { | |
1027 return invokeObjcSelfClass!(void, "enterQTKitOnThreadDisablingThreadSafetyProtection"); | |
1028 } | |
1029 | |
1030 static void exitQTKitOnThread () | |
1031 { | |
1032 return invokeObjcSelfClass!(void, "exitQTKitOnThread"); | |
1033 } | |
1034 | |
1035 bool attachToCurrentThread () | |
1036 { | |
1037 return invokeObjcSelf!(bool, "attachToCurrentThread"); | |
1038 } | |
1039 | |
1040 bool detachFromCurrentThread () | |
1041 { | |
1042 return invokeObjcSelf!(bool, "detachFromCurrentThread"); | |
1043 } | |
1044 | |
1045 void setIdling (bool state) | |
1046 { | |
1047 return invokeObjcSelf!(void, "setIdling:", bool)(state); | |
1048 } | |
1049 | |
1050 bool isIdling () | |
1051 { | |
1052 return invokeObjcSelf!(bool, "isIdling"); | |
1053 } | |
1054 | |
1055 //mixin ObjcBindClassMethod!(enterQTKitOnThread, "enterQTKitOnThread"); | |
1056 //mixin ObjcBindClassMethod!(enterQTKitOnThreadDisablingThreadSafetyProtection, "enterQTKitOnThreadDisablingThreadSafetyProtection"); | |
1057 //mixin ObjcBindClassMethod!(exitQTKitOnThread, "exitQTKitOnThread"); | |
1058 //mixin ObjcBindMethod!(attachToCurrentThread, "attachToCurrentThread"); | |
1059 //mixin ObjcBindMethod!(detachFromCurrentThread, "detachFromCurrentThread"); | |
1060 //mixin ObjcBindMethod!(setIdling, "setIdling:"); | |
1061 //mixin ObjcBindMethod!(isIdling, "isIdling"); | |
1062 | |
1063 `; | |
1064 | |
1065 const TQTMovieInspection = ` | |
1066 | |
1067 QTTime currentTime () | |
1068 { | |
1069 return invokeObjcSelf!(QTTime, "currentTime"); | |
1070 } | |
1071 | |
1072 float rate () | |
1073 { | |
1074 return invokeObjcSelf!(float, "rate"); | |
1075 } | |
1076 | |
1077 float volume () | |
1078 { | |
1079 return invokeObjcSelf!(float, "volume"); | |
1080 } | |
1081 | |
1082 bool muted () | |
1083 { | |
1084 return invokeObjcSelf!(bool, "muted"); | |
1085 } | |
1086 | |
1087 NSDictionary movieAttributes () | |
1088 { | |
1089 return invokeObjcSelf!(NSDictionary, "movieAttributes"); | |
1090 } | |
1091 | |
1092 void setMovieAttributes (NSDictionary attributes) | |
1093 { | |
1094 return invokeObjcSelf!(void, "setMovieAttributes:", NSDictionary)(attributes); | |
1095 } | |
1096 | |
1097 Object attributeForKey (NSString attributeKey) | |
1098 { | |
1099 return invokeObjcSelf!(Object, "attributeForKey:", NSString)(attributeKey); | |
1100 } | |
1101 | |
1102 void setAttribute (Object value, NSString attributeKey) | |
1103 { | |
1104 return invokeObjcSelf!(void, "setAttribute:forKey:", Object, NSString)(value, attributeKey); | |
1105 } | |
1106 | |
1107 NSArray tracks () | |
1108 { | |
1109 return invokeObjcSelf!(NSArray, "tracks"); | |
1110 } | |
1111 | |
1112 NSArray tracksOfMediaType (NSString type) | |
1113 { | |
1114 return invokeObjcSelf!(NSArray, "tracksOfMediaType:", NSString)(type); | |
1115 } | |
1116 | |
1117 //mixin ObjcBindMethod!(currentTime, "currentTime"); | |
1118 //mixin ObjcBindMethod!(rate, "rate"); | |
1119 //mixin ObjcBindMethod!(volume, "volume"); | |
1120 //mixin ObjcBindMethod!(muted, "muted"); | |
1121 //mixin ObjcBindMethod!(movieAttributes, "movieAttributes"); | |
1122 //mixin ObjcBindMethod!(setMovieAttributes, "setMovieAttributes:"); | |
1123 //mixin ObjcBindMethod!(attributeForKey, "attributeForKey:"); | |
1124 //mixin ObjcBindMethod!(setAttribute, "setAttribute:forKey:"); | |
1125 //mixin ObjcBindMethod!(tracks, "tracks"); | |
1126 //mixin ObjcBindMethod!(tracksOfMediaType, "tracksOfMediaType:"); | |
1127 | |
1128 `; | |
1129 | |
1130 const TQTMovieChapters = ` | |
1131 | |
1132 bool hasChapters () | |
1133 { | |
1134 return invokeObjcSelf!(bool, "hasChapters"); | |
1135 } | |
1136 | |
1137 NSInteger chapterCount () | |
1138 { | |
1139 return invokeObjcSelf!(NSInteger, "chapterCount"); | |
1140 } | |
1141 | |
1142 NSArray chapters () | |
1143 { | |
1144 return invokeObjcSelf!(NSArray, "chapters"); | |
1145 } | |
1146 | |
1147 void addChapters (NSArray chapters, NSDictionary attributes, ref NSError errorPtr) | |
1148 { | |
1149 id __arg2; | |
1150 | |
1151 if (errorPtr) | |
1152 __arg2 = errorPtr.objcObject; | |
1153 | |
1154 invokeObjcSelf!(void, "addChapters:withAttributes:error:", NSArray, NSDictionary, id*)(chapters, attributes, &__arg2); | |
1155 | |
1156 if (__arg2) | |
1157 errorPtr = new NSError(__arg2); | |
1158 } | |
1159 | |
1160 bool removeChapters () | |
1161 { | |
1162 return invokeObjcSelf!(bool, "removeChapters"); | |
1163 } | |
1164 | |
1165 QTTime startTimeOfChapter (NSInteger chapterIndex) | |
1166 { | |
1167 return invokeObjcSelf!(QTTime, "startTimeOfChapter:", NSInteger)(chapterIndex); | |
1168 } | |
1169 | |
1170 NSInteger chapterIndexForTime (QTTime time) | |
1171 { | |
1172 return invokeObjcSelf!(NSInteger, "chapterIndexForTime:", QTTime)(time); | |
1173 } | |
1174 | |
1175 //mixin ObjcBindMethod!(hasChapters, "hasChapters"); | |
1176 //mixin ObjcBindMethod!(chapterCount, "chapterCount"); | |
1177 //mixin ObjcBindMethod!(chapters, "chapters"); | |
1178 ////mixin ObjcBindMethod!(addChapters, "addChapters:withAttributes:error:"); | |
1179 //mixin ObjcBindMethod!(removeChapters, "removeChapters"); | |
1180 //mixin ObjcBindMethod!(startTimeOfChapter, "startTimeOfChapter:"); | |
1181 //mixin ObjcBindMethod!(chapterIndexForTime, "chapterIndexForTime:"); | |
1182 | |
1183 `; | |
1184 | |
1185 const TQTMovieVisualSupport = ` | |
1186 | |
1187 void generateApertureModeDimensions () | |
1188 { | |
1189 return invokeObjcSelf!(void, "generateApertureModeDimensions"); | |
1190 } | |
1191 | |
1192 void removeApertureModeDimensions () | |
1193 { | |
1194 return invokeObjcSelf!(void, "removeApertureModeDimensions"); | |
1195 } | |
1196 | |
1197 //mixin ObjcBindMethod!(generateApertureModeDimensions, "generateApertureModeDimensions"); | |
1198 //mixin ObjcBindMethod!(removeApertureModeDimensions, "removeApertureModeDimensions"); | |
1199 | |
1200 `; | |
1201 | |
1202 const TQTEditing = ` | |
1203 | |
1204 void replaceSelectionWithSelectionFromMovie (Object movie) | |
1205 { | |
1206 return invokeObjcSelf!(void, "replaceSelectionWithSelectionFromMovie:", Object)(movie); | |
1207 } | |
1208 | |
1209 void appendSelectionFromMovie (Object movie) | |
1210 { | |
1211 return invokeObjcSelf!(void, "appendSelectionFromMovie:", Object)(movie); | |
1212 } | |
1213 | |
1214 void insertSegmentOfMovie (QTMovie movie, QTTimeRange range, QTTime time) | |
1215 { | |
1216 return invokeObjcSelf!(void, "insertSegmentOfMovie:timeRange:atTime:", QTMovie, QTTimeRange, QTTime)(movie, range, time); | |
1217 } | |
1218 | |
1219 void insertSegmentOfMovie (QTMovie movie, QTTimeRange srcRange, QTTimeRange dstRange) | |
1220 { | |
1221 return invokeObjcSelf!(void, "insertSegmentOfMovie:fromRange:scaledToRange:", QTMovie, QTTimeRange, QTTimeRange)(movie, srcRange, dstRange); | |
1222 } | |
1223 | |
1224 void insertEmptySegmentAt (QTTimeRange range) | |
1225 { | |
1226 return invokeObjcSelf!(void, "insertEmptySegmentAt:", QTTimeRange)(range); | |
1227 } | |
1228 | |
1229 void deleteSegment (QTTimeRange segment) | |
1230 { | |
1231 return invokeObjcSelf!(void, "deleteSegment:", QTTimeRange)(segment); | |
1232 } | |
1233 | |
1234 void scaleSegment (QTTimeRange segment, QTTime newDuration) | |
1235 { | |
1236 return invokeObjcSelf!(void, "scaleSegment:newDuration:", QTTimeRange, QTTime)(segment, newDuration); | |
1237 } | |
1238 | |
1239 void addImage (NSImage image, QTTime duration, NSDictionary attributes) | |
1240 { | |
1241 return invokeObjcSelf!(void, "addImage:forDuration:withAttributes:", NSImage, QTTime, NSDictionary)(image, duration, attributes); | |
1242 } | |
1243 | |
1244 QTTrack insertSegmentOfTrack (QTTrack track, QTTimeRange range, QTTime time) | |
1245 { | |
1246 return invokeObjcSelf!(QTTrack, "insertSegmentOfTrack:timeRange:atTime:", QTTrack, QTTimeRange, QTTime)(track, range, time); | |
1247 } | |
1248 | |
1249 QTTrack insertSegmentOfTrack (QTTrack track, QTTimeRange srcRange, QTTimeRange dstRange) | |
1250 { | |
1251 return invokeObjcSelf!(QTTrack, "insertSegmentOfTrack:fromRange:scaledToRange:", QTTrack, QTTimeRange, QTTimeRange)(track, srcRange, dstRange); | |
1252 } | |
1253 | |
1254 void removeTrack (QTTrack track) | |
1255 { | |
1256 return invokeObjcSelf!(void, "removeTrack:", QTTrack)(track); | |
1257 } | |
1258 | |
1259 //mixin ObjcBindMethod!(replaceSelectionWithSelectionFromMovie, "replaceSelectionWithSelectionFromMovie:"); | |
1260 //mixin ObjcBindMethod!(appendSelectionFromMovie, "appendSelectionFromMovie:"); | |
1261 //mixin ObjcBindMethod!(insertSegmentOfMovie, "insertSegmentOfMovie:timeRange:atTime:"); | |
1262 //mixin ObjcBindMethod!(insertSegmentOfMovie, "insertSegmentOfMovie:fromRange:scaledToRange:"); | |
1263 //mixin ObjcBindMethod!(insertEmptySegmentAt, "insertEmptySegmentAt:"); | |
1264 //mixin ObjcBindMethod!(deleteSegment, "deleteSegment:"); | |
1265 //mixin ObjcBindMethod!(scaleSegment, "scaleSegment:newDuration:"); | |
1266 //mixin ObjcBindMethod!(addImage, "addImage:forDuration:withAttributes:"); | |
1267 //mixin ObjcBindMethod!(insertSegmentOfTrack, "insertSegmentOfTrack:timeRange:atTime:"); | |
1268 //mixin ObjcBindMethod!(insertSegmentOfTrack, "insertSegmentOfTrack:fromRange:scaledToRange:"); | |
1269 //mixin ObjcBindMethod!(removeTrack, "removeTrack:"); | |
1270 | |
1271 `; | |
1272 | |
1273 const TQTMovieInitialization = ` | |
1274 | |
1275 static bool canInitWithPasteboard (NSPasteboard pasteboard) | |
1276 { | |
1277 return invokeObjcSelfClass!(bool, "canInitWithPasteboard:", NSPasteboard)(pasteboard); | |
1278 } | |
1279 | |
1280 static bool canInitWithFile (NSString fileName) | |
1281 { | |
1282 return invokeObjcSelfClass!(bool, "canInitWithFile:", NSString)(fileName); | |
1283 } | |
1284 | |
1285 static bool canInitWithURL (NSURL url) | |
1286 { | |
1287 return invokeObjcSelfClass!(bool, "canInitWithURL:", NSURL)(url); | |
1288 } | |
1289 | |
1290 static bool canInitWithDataReference (QTDataReference dataReference) | |
1291 { | |
1292 return invokeObjcSelfClass!(bool, "canInitWithDataReference:", QTDataReference)(dataReference); | |
1293 } | |
1294 | |
1295 static NSArray movieFileTypes (int types) | |
1296 { | |
1297 return invokeObjcSelfClass!(NSArray, "movieFileTypes:", int)(types); | |
1298 } | |
1299 | |
1300 static NSArray movieUnfilteredFileTypes () | |
1301 { | |
1302 return invokeObjcSelfClass!(NSArray, "movieUnfilteredFileTypes"); | |
1303 } | |
1304 | |
1305 static NSArray movieUnfilteredPasteboardTypes () | |
1306 { | |
1307 return invokeObjcSelfClass!(NSArray, "movieUnfilteredPasteboardTypes"); | |
1308 } | |
1309 | |
1310 static NSArray movieTypesWithOptions (int types) | |
1311 { | |
1312 return invokeObjcSelfClass!(NSArray, "movieTypesWithOptions:", int)(types); | |
1313 } | |
1314 | |
1315 static Object movie () | |
1316 { | |
1317 return invokeObjcSelfClass!(Object, "movie"); | |
1318 } | |
1319 | |
1320 static Object movieWithFile (NSString fileName, ref NSError errorPtr) | |
1321 { | |
1322 id __arg1; | |
1323 | |
1324 if (errorPtr) | |
1325 __arg1 = errorPtr.objcObject; | |
1326 | |
1327 Object result = invokeObjcSelfClass!(Object, "movieWithFile:error:", NSString, id*)(fileName, &__arg1); | |
1328 | |
1329 if (__arg1) | |
1330 errorPtr = new NSError(__arg1); | |
1331 | |
1332 return result; | |
1333 } | |
1334 | |
1335 static Object movieWithURL (NSURL url, ref NSError errorPtr) | |
1336 { | |
1337 id __arg1; | |
1338 | |
1339 if (errorPtr) | |
1340 __arg1 = errorPtr.objcObject; | |
1341 | |
1342 Object result = invokeObjcSelfClass!(Object, "movieWithURL:error:", NSURL, id*)(url, &__arg1); | |
1343 | |
1344 if (__arg1) | |
1345 errorPtr = new NSError(__arg1); | |
1346 | |
1347 return result; | |
1348 } | |
1349 | |
1350 static Object movieWithDataReference (QTDataReference dataReference, ref NSError errorPtr) | |
1351 { | |
1352 id __arg1; | |
1353 | |
1354 if (errorPtr) | |
1355 __arg1 = errorPtr.objcObject; | |
1356 | |
1357 Object result = invokeObjcSelfClass!(Object, "movieWithDataReference:error:", QTDataReference, id*)(dataReference, &__arg1); | |
1358 | |
1359 if (__arg1) | |
1360 errorPtr = new NSError(__arg1); | |
1361 | |
1362 return result; | |
1363 } | |
1364 | |
1365 static Object movieWithPasteboard (NSPasteboard pasteboard, ref NSError errorPtr) | |
1366 { | |
1367 id __arg1; | |
1368 | |
1369 if (errorPtr) | |
1370 __arg1 = errorPtr.objcObject; | |
1371 | |
1372 Object result = invokeObjcSelfClass!(Object, "movieWithPasteboard:error:", NSPasteboard, id*)(pasteboard, &__arg1); | |
1373 | |
1374 if (__arg1) | |
1375 errorPtr = new NSError(__arg1); | |
1376 | |
1377 return result; | |
1378 } | |
1379 | |
1380 static Object movieWithData (NSData data, ref NSError errorPtr) | |
1381 { | |
1382 id __arg1; | |
1383 | |
1384 if (errorPtr) | |
1385 __arg1 = errorPtr.objcObject; | |
1386 | |
1387 Object result = invokeObjcSelfClass!(Object, "movieWithData:error:", NSData, id*)(data, &__arg1); | |
1388 | |
1389 if (__arg1) | |
1390 errorPtr = new NSError(__arg1); | |
1391 | |
1392 return result; | |
1393 } | |
1394 | |
1395 static Object movieWithAttributes (NSDictionary attributes, ref NSError errorPtr) | |
1396 { | |
1397 id __arg1; | |
1398 | |
1399 if (errorPtr) | |
1400 __arg1 = errorPtr.objcObject; | |
1401 | |
1402 Object result = invokeObjcSelfClass!(Object, "movieWithAttributes:error:", NSDictionary, id*)(attributes, &__arg1); | |
1403 | |
1404 if (__arg1) | |
1405 errorPtr = new NSError(__arg1); | |
1406 | |
1407 return result; | |
1408 } | |
1409 | |
1410 static Object movieNamed (NSString name, ref NSError errorPtr) | |
1411 { | |
1412 id __arg1; | |
1413 | |
1414 if (errorPtr) | |
1415 __arg1 = errorPtr.objcObject; | |
1416 | |
1417 Object result = invokeObjcSelfClass!(Object, "movieNamed:error:", NSString, id*)(name, &__arg1); | |
1418 | |
1419 if (__arg1) | |
1420 errorPtr = new NSError(__arg1); | |
1421 | |
1422 return result; | |
1423 } | |
1424 | |
1425 typeof(this) initWithFile (NSString fileName, ref NSError errorPtr) | |
1426 { | |
1427 id __arg1; | |
1428 | |
1429 if (errorPtr) | |
1430 __arg1 = errorPtr.objcObject; | |
1431 | |
1432 id result = invokeObjcSelf!(id, "initWithFile:error:", NSString, id*)(fileName, &__arg1); | |
1433 | |
1434 if (__arg1) | |
1435 errorPtr = new NSError(__arg1); | |
1436 | |
1437 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
1438 } | |
1439 | |
1440 this (NSString fileName, ref NSError errorPtr) | |
1441 { | |
1442 super(typeof(this).alloc.initWithFile(fileName, errorPtr).objcObject); | |
1443 } | |
1444 | |
1445 typeof(this) initWithURL (NSURL url, ref NSError errorPtr) | |
1446 { | |
1447 id __arg1; | |
1448 | |
1449 if (errorPtr) | |
1450 __arg1 = errorPtr.objcObject; | |
1451 | |
1452 id result = invokeObjcSelf!(id, "initWithURL:error:", NSURL, id*)(url, &__arg1); | |
1453 | |
1454 if (__arg1) | |
1455 errorPtr = new NSError(__arg1); | |
1456 | |
1457 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
1458 } | |
1459 | |
1460 this (NSURL url, ref NSError errorPtr) | |
1461 { | |
1462 super(typeof(this).alloc.initWithURL(url, errorPtr).objcObject); | |
1463 } | |
1464 | |
1465 typeof(this) initWithDataReference (QTDataReference dataReference, ref NSError errorPtr) | |
1466 { | |
1467 id __arg1; | |
1468 | |
1469 if (errorPtr) | |
1470 __arg1 = errorPtr.objcObject; | |
1471 | |
1472 id result = invokeObjcSelf!(id, "initWithDataReference:error:", QTDataReference, id*)(dataReference, &__arg1); | |
1473 | |
1474 if (__arg1) | |
1475 errorPtr = new NSError(__arg1); | |
1476 | |
1477 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
1478 } | |
1479 | |
1480 this (QTDataReference dataReference, ref NSError errorPtr) | |
1481 { | |
1482 super(typeof(this).alloc.initWithDataReference(dataReference, errorPtr).objcObject); | |
1483 } | |
1484 | |
1485 typeof(this) initWithPasteboard (NSPasteboard pasteboard, ref NSError errorPtr) | |
1486 { | |
1487 id __arg1; | |
1488 | |
1489 if (errorPtr) | |
1490 __arg1 = errorPtr.objcObject; | |
1491 | |
1492 id result = invokeObjcSelf!(id, "initWithPasteboard:error:", NSPasteboard, id*)(pasteboard, &__arg1); | |
1493 | |
1494 if (__arg1) | |
1495 errorPtr = new NSError(__arg1); | |
1496 | |
1497 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
1498 } | |
1499 | |
1500 this (NSPasteboard pasteboard, ref NSError errorPtr) | |
1501 { | |
1502 super(typeof(this).alloc.initWithPasteboard(pasteboard, errorPtr).objcObject); | |
1503 } | |
1504 | |
1505 typeof(this) initWithData (NSData data, ref NSError errorPtr) | |
1506 { | |
1507 id __arg1; | |
1508 | |
1509 if (errorPtr) | |
1510 __arg1 = errorPtr.objcObject; | |
1511 | |
1512 id result = invokeObjcSelf!(id, "initWithData:error:", NSData, id*)(data, &__arg1); | |
1513 | |
1514 if (__arg1) | |
1515 errorPtr = new NSError(__arg1); | |
1516 | |
1517 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
1518 } | |
1519 | |
1520 this (NSData data, ref NSError errorPtr) | |
1521 { | |
1522 super(typeof(this).alloc.initWithData(data, errorPtr).objcObject); | |
1523 } | |
1524 | |
1525 typeof(this) initWithMovie (QTMovie movie, QTTimeRange range, ref NSError errorPtr) | |
1526 { | |
1527 id __arg2; | |
1528 | |
1529 if (errorPtr) | |
1530 __arg2 = errorPtr.objcObject; | |
1531 | |
1532 id result = invokeObjcSelf!(id, "initWithMovie:timeRange:error:", QTMovie, QTTimeRange, id*)(movie, range, &__arg2); | |
1533 | |
1534 if (__arg2) | |
1535 errorPtr = new NSError(__arg2); | |
1536 | |
1537 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
1538 } | |
1539 | |
1540 this (QTMovie movie, QTTimeRange range, ref NSError errorPtr) | |
1541 { | |
1542 super(typeof(this).alloc.initWithMovie(movie, range, errorPtr).objcObject); | |
1543 } | |
1544 | |
1545 typeof(this) initWithAttributes (NSDictionary attributes, ref NSError errorPtr) | |
1546 { | |
1547 id __arg1; | |
1548 | |
1549 if (errorPtr) | |
1550 __arg1 = errorPtr.objcObject; | |
1551 | |
1552 id result = invokeObjcSelf!(id, "initWithAttributes:error:", NSDictionary, id*)(attributes, &__arg1); | |
1553 | |
1554 if (__arg1) | |
1555 errorPtr = new NSError(__arg1); | |
1556 | |
1557 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
1558 } | |
1559 | |
1560 this (NSDictionary attributes, ref NSError errorPtr) | |
1561 { | |
1562 super(typeof(this).alloc.initWithAttributes(attributes, errorPtr).objcObject); | |
1563 } | |
1564 | |
1565 Object movieWithTimeRange (QTTimeRange range, ref NSError errorPtr) | |
1566 { | |
1567 id __arg1; | |
1568 | |
1569 if (errorPtr) | |
1570 __arg1 = errorPtr.objcObject; | |
1571 | |
1572 Object result = invokeObjcSelf!(Object, "movieWithTimeRange:error:", QTTimeRange, id*)(range, &__arg1); | |
1573 | |
1574 if (__arg1) | |
1575 errorPtr = new NSError(__arg1); | |
1576 | |
1577 return result; | |
1578 } | |
1579 | |
1580 typeof(this) initToWritableFile (NSString filename, ref NSError errorPtr) | |
1581 { | |
1582 id __arg1; | |
1583 | |
1584 if (errorPtr) | |
1585 __arg1 = errorPtr.objcObject; | |
1586 | |
1587 id result = invokeObjcSelf!(id, "initToWritableFile:error:", NSString, id*)(filename, &__arg1); | |
1588 | |
1589 if (__arg1) | |
1590 errorPtr = new NSError(__arg1); | |
1591 | |
1592 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
1593 } | |
1594 | |
1595 this (NSString filename, ref NSError errorPtr) | |
1596 { | |
1597 super(typeof(this).alloc.initToWritableFile(filename, errorPtr).objcObject); | |
1598 } | |
1599 | |
1600 typeof(this) initToWritableData (NSMutableData data, ref NSError errorPtr) | |
1601 { | |
1602 id __arg1; | |
1603 | |
1604 if (errorPtr) | |
1605 __arg1 = errorPtr.objcObject; | |
1606 | |
1607 id result = invokeObjcSelf!(id, "initToWritableData:error:", NSMutableData, id*)(data, &__arg1); | |
1608 | |
1609 if (__arg1) | |
1610 errorPtr = new NSError(__arg1); | |
1611 | |
1612 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
1613 } | |
1614 | |
1615 this (NSMutableData data, ref NSError errorPtr) | |
1616 { | |
1617 super(typeof(this).alloc.initToWritableData(data, errorPtr).objcObject); | |
1618 } | |
1619 | |
1620 typeof(this) initToWritableDataReference (QTDataReference dataReference, ref NSError errorPtr) | |
1621 { | |
1622 id __arg1; | |
1623 | |
1624 if (errorPtr) | |
1625 __arg1 = errorPtr.objcObject; | |
1626 | |
1627 id result = invokeObjcSelf!(id, "initToWritableDataReference:error:", QTDataReference, id*)(dataReference, &__arg1); | |
1628 | |
1629 if (__arg1) | |
1630 errorPtr = new NSError(__arg1); | |
1631 | |
1632 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
1633 } | |
1634 | |
1635 this (QTDataReference dataReference, ref NSError errorPtr) | |
1636 { | |
1637 super(typeof(this).alloc.initToWritableDataReference(dataReference, errorPtr).objcObject); | |
1638 } | |
1639 | |
1640 void invalidate () | |
1641 { | |
1642 return invokeObjcSelf!(void, "invalidate"); | |
1643 } | |
1644 | |
1645 //mixin ObjcBindClassMethod!(canInitWithPasteboard, "canInitWithPasteboard:"); | |
1646 //mixin ObjcBindClassMethod!(canInitWithFile, "canInitWithFile:"); | |
1647 //mixin ObjcBindClassMethod!(canInitWithURL, "canInitWithURL:"); | |
1648 //mixin ObjcBindClassMethod!(canInitWithDataReference, "canInitWithDataReference:"); | |
1649 //mixin ObjcBindClassMethod!(movieFileTypes, "movieFileTypes:"); | |
1650 //mixin ObjcBindClassMethod!(movieUnfilteredFileTypes, "movieUnfilteredFileTypes"); | |
1651 //mixin ObjcBindClassMethod!(movieUnfilteredPasteboardTypes, "movieUnfilteredPasteboardTypes"); | |
1652 //mixin ObjcBindClassMethod!(movieTypesWithOptions, "movieTypesWithOptions:"); | |
1653 //mixin ObjcBindClassMethod!(movie, "movie"); | |
1654 /*//mixin ObjcBindClassMethod!(movieWithFile, "movieWithFile:error:"); | |
1655 //mixin ObjcBindClassMethod!(movieWithURL, "movieWithURL:error:"); | |
1656 //mixin ObjcBindClassMethod!(movieWithDataReference, "movieWithDataReference:error:"); | |
1657 //mixin ObjcBindClassMethod!(movieWithPasteboard, "movieWithPasteboard:error:"); | |
1658 //mixin ObjcBindClassMethod!(movieWithData, "movieWithData:error:"); | |
1659 //mixin ObjcBindClassMethod!(movieWithAttributes, "movieWithAttributes:error:"); | |
1660 //mixin ObjcBindClassMethod!(movieNamed, "movieNamed:error:"); | |
1661 //mixin ObjcBindMethod!(initWithFile, "initWithFile:error:"); | |
1662 //mixin ObjcBindMethod!(initWithURL, "initWithURL:error:"); | |
1663 //mixin ObjcBindMethod!(initWithDataReference, "initWithDataReference:error:"); | |
1664 //mixin ObjcBindMethod!(initWithPasteboard, "initWithPasteboard:error:"); | |
1665 //mixin ObjcBindMethod!(initWithData, "initWithData:error:"); | |
1666 //mixin ObjcBindMethod!(initWithMovie, "initWithMovie:timeRange:error:"); | |
1667 //mixin ObjcBindMethod!(initWithAttributes, "initWithAttributes:error:"); | |
1668 //mixin ObjcBindMethod!(movieWithTimeRange, "movieWithTimeRange:error:"); | |
1669 //mixin ObjcBindMethod!(initToWritableFile, "initToWritableFile:error:"); | |
1670 //mixin ObjcBindMethod!(initToWritableData, "initToWritableData:error:"); | |
1671 //mixin ObjcBindMethod!(initToWritableDataReference, "initToWritableDataReference:error:");*/ | |
1672 //mixin ObjcBindMethod!(invalidate, "invalidate"); | |
1673 | |
1674 `; | |
1675 | |
1676 const TQTMovieImage = ` | |
1677 | |
1678 NSImage posterImage () | |
1679 { | |
1680 return invokeObjcSelf!(NSImage, "posterImage"); | |
1681 } | |
1682 | |
1683 NSImage currentFrameImage () | |
1684 { | |
1685 return invokeObjcSelf!(NSImage, "currentFrameImage"); | |
1686 } | |
1687 | |
1688 NSImage frameImageAtTime (QTTime time) | |
1689 { | |
1690 return invokeObjcSelf!(NSImage, "frameImageAtTime:", QTTime)(time); | |
1691 } | |
1692 | |
1693 void* frameImageAtTime (QTTime time, NSDictionary attributes, ref NSError errorPtr) | |
1694 { | |
1695 id __arg2; | |
1696 | |
1697 if (errorPtr) | |
1698 __arg2 = errorPtr.objcObject; | |
1699 | |
1700 void* result = invokeObjcSelf!(void*, "frameImageAtTime:withAttributes:error:", QTTime, NSDictionary, id*)(time, attributes, &__arg2); | |
1701 | |
1702 if (__arg2) | |
1703 errorPtr = new NSError(__arg2); | |
1704 | |
1705 return result; | |
1706 } | |
1707 | |
1708 //mixin ObjcBindMethod!(posterImage, "posterImage"); | |
1709 //mixin ObjcBindMethod!(currentFrameImage, "currentFrameImage"); | |
1710 //mixin ObjcBindMethod!(frameImageAtTime, "frameImageAtTime:"); | |
1711 //mixin ObjcBindMethod!(frameImageAtTime, "frameImageAtTime:withAttributes:error:"); | |
1712 | |
1713 `; | |
1714 | |
1715 const TQTDelegate = ` | |
1716 | |
1717 Object delegate_ () | |
1718 { | |
1719 return invokeObjcSelf!(Object, "delegate"); | |
1720 } | |
1721 | |
1722 void setDelegate (Object delegate_) | |
1723 { | |
1724 return invokeObjcSelf!(void, "setDelegate:", Object)(delegate_); | |
1725 } | |
1726 | |
1727 //mixin ObjcBindMethod!(delegate_, "delegate"); | |
1728 //mixin ObjcBindMethod!(setDelegate, "setDelegate:"); | |
1729 | |
1730 `; | |
1731 | |
1732 const TQTMovieTime = ` | |
1733 | |
1734 void autoplay () | |
1735 { | |
1736 return invokeObjcSelf!(void, "autoplay"); | |
1737 } | |
1738 | |
1739 void play () | |
1740 { | |
1741 return invokeObjcSelf!(void, "play"); | |
1742 } | |
1743 | |
1744 void stop () | |
1745 { | |
1746 return invokeObjcSelf!(void, "stop"); | |
1747 } | |
1748 | |
1749 void setCurrentTime (QTTime time) | |
1750 { | |
1751 return invokeObjcSelf!(void, "setCurrentTime:", QTTime)(time); | |
1752 } | |
1753 | |
1754 void gotoBeginning () | |
1755 { | |
1756 return invokeObjcSelf!(void, "gotoBeginning"); | |
1757 } | |
1758 | |
1759 void gotoEnd () | |
1760 { | |
1761 return invokeObjcSelf!(void, "gotoEnd"); | |
1762 } | |
1763 | |
1764 void gotoNextSelectionPoint () | |
1765 { | |
1766 return invokeObjcSelf!(void, "gotoNextSelectionPoint"); | |
1767 } | |
1768 | |
1769 void gotoPreviousSelectionPoint () | |
1770 { | |
1771 return invokeObjcSelf!(void, "gotoPreviousSelectionPoint"); | |
1772 } | |
1773 | |
1774 void gotoPosterTime () | |
1775 { | |
1776 return invokeObjcSelf!(void, "gotoPosterTime"); | |
1777 } | |
1778 | |
1779 void stepForward () | |
1780 { | |
1781 return invokeObjcSelf!(void, "stepForward"); | |
1782 } | |
1783 | |
1784 void stepBackward () | |
1785 { | |
1786 return invokeObjcSelf!(void, "stepBackward"); | |
1787 } | |
1788 | |
1789 //mixin ObjcBindMethod!(autoplay, "autoplay"); | |
1790 //mixin ObjcBindMethod!(play, "play"); | |
1791 //mixin ObjcBindMethod!(stop, "stop"); | |
1792 //mixin ObjcBindMethod!(setCurrentTime, "setCurrentTime:"); | |
1793 //mixin ObjcBindMethod!(gotoBeginning, "gotoBeginning"); | |
1794 //mixin ObjcBindMethod!(gotoEnd, "gotoEnd"); | |
1795 //mixin ObjcBindMethod!(gotoNextSelectionPoint, "gotoNextSelectionPoint"); | |
1796 //mixin ObjcBindMethod!(gotoPreviousSelectionPoint, "gotoPreviousSelectionPoint"); | |
1797 //mixin ObjcBindMethod!(gotoPosterTime, "gotoPosterTime"); | |
1798 //mixin ObjcBindMethod!(stepForward, "stepForward"); | |
1799 //mixin ObjcBindMethod!(stepBackward, "stepBackward"); | |
1800 | |
1801 `; | |
1802 | |
1803 const TQTMovieFormat = ` | |
1804 | |
1805 NSData movieFormatRepresentation () | |
1806 { | |
1807 return invokeObjcSelf!(NSData, "movieFormatRepresentation"); | |
1808 } | |
1809 | |
1810 bool writeToFile (NSString fileName, NSDictionary attributes) | |
1811 { | |
1812 return invokeObjcSelf!(bool, "writeToFile:withAttributes:", NSString, NSDictionary)(fileName, attributes); | |
1813 } | |
1814 | |
1815 bool writeToFile (NSString fileName, NSDictionary attributes, ref NSError errorPtr) | |
1816 { | |
1817 id __arg2; | |
1818 | |
1819 if (errorPtr) | |
1820 __arg2 = errorPtr.objcObject; | |
1821 | |
1822 bool result = invokeObjcSelf!(bool, "writeToFile:withAttributes:error:", NSString, NSDictionary, id*)(fileName, attributes, &__arg2); | |
1823 | |
1824 if (__arg2) | |
1825 errorPtr = new NSError(__arg2); | |
1826 | |
1827 return result; | |
1828 } | |
1829 | |
1830 bool canUpdateMovieFile () | |
1831 { | |
1832 return invokeObjcSelf!(bool, "canUpdateMovieFile"); | |
1833 } | |
1834 | |
1835 bool updateMovieFile () | |
1836 { | |
1837 return invokeObjcSelf!(bool, "updateMovieFile"); | |
1838 } | |
1839 | |
1840 //mixin ObjcBindMethod!(movieFormatRepresentation, "movieFormatRepresentation"); | |
1841 //mixin ObjcBindMethod!(writeToFile, "writeToFile:withAttributes:"); | |
1842 //mixin ObjcBindMethod!(writeToFile, "writeToFile:withAttributes:error:"); | |
1843 //mixin ObjcBindMethod!(canUpdateMovieFile, "canUpdateMovieFile"); | |
1844 //mixin ObjcBindMethod!(updateMovieFile, "updateMovieFile"); | |
1845 | |
1846 `; | |
1847 | |
1848 const TQTSelection = ` | |
1849 | |
1850 void setSelection (QTTimeRange selection) | |
1851 { | |
1852 return invokeObjcSelf!(void, "setSelection:", QTTimeRange)(selection); | |
1853 } | |
1854 | |
1855 QTTime selectionStart () | |
1856 { | |
1857 return invokeObjcSelf!(QTTime, "selectionStart"); | |
1858 } | |
1859 | |
1860 QTTime selectionEnd () | |
1861 { | |
1862 return invokeObjcSelf!(QTTime, "selectionEnd"); | |
1863 } | |
1864 | |
1865 QTTime selectionDuration () | |
1866 { | |
1867 return invokeObjcSelf!(QTTime, "selectionDuration"); | |
1868 } | |
1869 | |
1870 //mixin ObjcBindMethod!(setSelection, "setSelection:"); | |
1871 //mixin ObjcBindMethod!(selectionStart, "selectionStart"); | |
1872 //mixin ObjcBindMethod!(selectionEnd, "selectionEnd"); | |
1873 //mixin ObjcBindMethod!(selectionDuration, "selectionDuration"); | |
1874 | |
1875 `; | |
1876 | |
1877 const TQTMoviePlaybackControl = ` | |
1878 | |
1879 void setRate (float rate) | |
1880 { | |
1881 return invokeObjcSelf!(void, "setRate:", float)(rate); | |
1882 } | |
1883 | |
1884 void setVolume (float volume) | |
1885 { | |
1886 return invokeObjcSelf!(void, "setVolume:", float)(volume); | |
1887 } | |
1888 | |
1889 void setMuted (bool mute) | |
1890 { | |
1891 return invokeObjcSelf!(void, "setMuted:", bool)(mute); | |
1892 } | |
1893 | |
1894 //mixin ObjcBindMethod!(setRate, "setRate:"); | |
1895 //mixin ObjcBindMethod!(setVolume, "setVolume:"); | |
1896 //mixin ObjcBindMethod!(setMuted, "setMuted:"); | |
1897 | |
1898 `; | |
1899 | |
1900 class QTMovie : NSObject, INSCoding, INSCopying | |
1901 { | |
1902 mixin (ObjcWrap); | |
1903 | |
1904 this (NSCoder aDecoder) | |
1905 { | |
1906 super(typeof(this).alloc.initWithCoder(aDecoder).objcObject); | |
1907 } | |
1908 | |
1909 void encodeWithCoder (NSCoder aCoder) | |
1910 { | |
1911 return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder); | |
1912 } | |
1913 | |
1914 typeof(this) initWithCoder (NSCoder aDecoder) | |
1915 { | |
1916 return invokeObjcSelf!(typeof(this), "initWithCoder:", NSCoder)(aDecoder); | |
1917 } | |
1918 | |
1919 typeof(this) copyWithZone (NSZone* zone) | |
1920 { | |
1921 return invokeObjcSelf!(typeof(this), "copyWithZone:", NSZone*)(zone); | |
1922 } | |
1923 | |
1924 QTTime duration () | |
1925 { | |
1926 return invokeObjcSelf!(QTTime, "duration"); | |
1927 } | |
1928 | |
1929 // QTMovieThreading | |
1930 static void enterQTKitOnThread () | |
1931 { | |
1932 return invokeObjcSelfClass!(void, "enterQTKitOnThread"); | |
1933 } | |
1934 | |
1935 static void enterQTKitOnThreadDisablingThreadSafetyProtection () | |
1936 { | |
1937 return invokeObjcSelfClass!(void, "enterQTKitOnThreadDisablingThreadSafetyProtection"); | |
1938 } | |
1939 | |
1940 static void exitQTKitOnThread () | |
1941 { | |
1942 return invokeObjcSelfClass!(void, "exitQTKitOnThread"); | |
1943 } | |
1944 | |
1945 bool attachToCurrentThread () | |
1946 { | |
1947 return invokeObjcSelf!(bool, "attachToCurrentThread"); | |
1948 } | |
1949 | |
1950 bool detachFromCurrentThread () | |
1951 { | |
1952 return invokeObjcSelf!(bool, "detachFromCurrentThread"); | |
1953 } | |
1954 | |
1955 void setIdling (bool state) | |
1956 { | |
1957 return invokeObjcSelf!(void, "setIdling:", bool)(state); | |
1958 } | |
1959 | |
1960 bool isIdling () | |
1961 { | |
1962 return invokeObjcSelf!(bool, "isIdling"); | |
1963 } | |
1964 | |
1965 // QTMovieInspection | |
1966 QTTime currentTime () | |
1967 { | |
1968 return invokeObjcSelf!(QTTime, "currentTime"); | |
1969 } | |
1970 | |
1971 float rate () | |
1972 { | |
1973 return invokeObjcSelf!(float, "rate"); | |
1974 } | |
1975 | |
1976 float volume () | |
1977 { | |
1978 return invokeObjcSelf!(float, "volume"); | |
1979 } | |
1980 | |
1981 bool muted () | |
1982 { | |
1983 return invokeObjcSelf!(bool, "muted"); | |
1984 } | |
1985 | |
1986 NSDictionary movieAttributes () | |
1987 { | |
1988 return invokeObjcSelf!(NSDictionary, "movieAttributes"); | |
1989 } | |
1990 | |
1991 void setMovieAttributes (NSDictionary attributes) | |
1992 { | |
1993 return invokeObjcSelf!(void, "setMovieAttributes:", NSDictionary)(attributes); | |
1994 } | |
1995 | |
1996 Object attributeForKey (NSString attributeKey) | |
1997 { | |
1998 return invokeObjcSelf!(Object, "attributeForKey:", NSString)(attributeKey); | |
1999 } | |
2000 | |
2001 void setAttribute (Object value, NSString attributeKey) | |
2002 { | |
2003 return invokeObjcSelf!(void, "setAttribute:forKey:", Object, NSString)(value, attributeKey); | |
2004 } | |
2005 | |
2006 NSArray tracks () | |
2007 { | |
2008 return invokeObjcSelf!(NSArray, "tracks"); | |
2009 } | |
2010 | |
2011 NSArray tracksOfMediaType (NSString type) | |
2012 { | |
2013 return invokeObjcSelf!(NSArray, "tracksOfMediaType:", NSString)(type); | |
2014 } | |
2015 | |
2016 // QTMovieChapters | |
2017 bool hasChapters () | |
2018 { | |
2019 return invokeObjcSelf!(bool, "hasChapters"); | |
2020 } | |
2021 | |
2022 NSInteger chapterCount () | |
2023 { | |
2024 return invokeObjcSelf!(NSInteger, "chapterCount"); | |
2025 } | |
2026 | |
2027 NSArray chapters () | |
2028 { | |
2029 return invokeObjcSelf!(NSArray, "chapters"); | |
2030 } | |
2031 | |
2032 void addChapters (NSArray chapters, NSDictionary attributes, ref NSError errorPtr) | |
2033 { | |
2034 id __arg2; | |
2035 | |
2036 if (errorPtr) | |
2037 __arg2 = errorPtr.objcObject; | |
2038 | |
2039 invokeObjcSelf!(void, "addChapters:withAttributes:error:", NSArray, NSDictionary, id*)(chapters, attributes, &__arg2); | |
2040 | |
2041 if (__arg2) | |
2042 errorPtr = new NSError(__arg2); | |
2043 } | |
2044 | |
2045 bool removeChapters () | |
2046 { | |
2047 return invokeObjcSelf!(bool, "removeChapters"); | |
2048 } | |
2049 | |
2050 QTTime startTimeOfChapter (NSInteger chapterIndex) | |
2051 { | |
2052 return invokeObjcSelf!(QTTime, "startTimeOfChapter:", NSInteger)(chapterIndex); | |
2053 } | |
2054 | |
2055 NSInteger chapterIndexForTime (QTTime time) | |
2056 { | |
2057 return invokeObjcSelf!(NSInteger, "chapterIndexForTime:", QTTime)(time); | |
2058 } | |
2059 | |
2060 // QTMovieVisualSupport | |
2061 void generateApertureModeDimensions () | |
2062 { | |
2063 return invokeObjcSelf!(void, "generateApertureModeDimensions"); | |
2064 } | |
2065 | |
2066 void removeApertureModeDimensions () | |
2067 { | |
2068 return invokeObjcSelf!(void, "removeApertureModeDimensions"); | |
2069 } | |
2070 | |
2071 // QTEditing | |
2072 void replaceSelectionWithSelectionFromMovie (Object movie) | |
2073 { | |
2074 return invokeObjcSelf!(void, "replaceSelectionWithSelectionFromMovie:", Object)(movie); | |
2075 } | |
2076 | |
2077 void appendSelectionFromMovie (Object movie) | |
2078 { | |
2079 return invokeObjcSelf!(void, "appendSelectionFromMovie:", Object)(movie); | |
2080 } | |
2081 | |
2082 void insertSegmentOfMovie (QTMovie movie, QTTimeRange range, QTTime time) | |
2083 { | |
2084 return invokeObjcSelf!(void, "insertSegmentOfMovie:timeRange:atTime:", QTMovie, QTTimeRange, QTTime)(movie, range, time); | |
2085 } | |
2086 | |
2087 void insertSegmentOfMovie (QTMovie movie, QTTimeRange srcRange, QTTimeRange dstRange) | |
2088 { | |
2089 return invokeObjcSelf!(void, "insertSegmentOfMovie:fromRange:scaledToRange:", QTMovie, QTTimeRange, QTTimeRange)(movie, srcRange, dstRange); | |
2090 } | |
2091 | |
2092 void insertEmptySegmentAt (QTTimeRange range) | |
2093 { | |
2094 return invokeObjcSelf!(void, "insertEmptySegmentAt:", QTTimeRange)(range); | |
2095 } | |
2096 | |
2097 void deleteSegment (QTTimeRange segment) | |
2098 { | |
2099 return invokeObjcSelf!(void, "deleteSegment:", QTTimeRange)(segment); | |
2100 } | |
2101 | |
2102 void scaleSegment (QTTimeRange segment, QTTime newDuration) | |
2103 { | |
2104 return invokeObjcSelf!(void, "scaleSegment:newDuration:", QTTimeRange, QTTime)(segment, newDuration); | |
2105 } | |
2106 | |
2107 void addImage (NSImage image, QTTime duration, NSDictionary attributes) | |
2108 { | |
2109 return invokeObjcSelf!(void, "addImage:forDuration:withAttributes:", NSImage, QTTime, NSDictionary)(image, duration, attributes); | |
2110 } | |
2111 | |
2112 QTTrack insertSegmentOfTrack (QTTrack track, QTTimeRange range, QTTime time) | |
2113 { | |
2114 return invokeObjcSelf!(QTTrack, "insertSegmentOfTrack:timeRange:atTime:", QTTrack, QTTimeRange, QTTime)(track, range, time); | |
2115 } | |
2116 | |
2117 QTTrack insertSegmentOfTrack (QTTrack track, QTTimeRange srcRange, QTTimeRange dstRange) | |
2118 { | |
2119 return invokeObjcSelf!(QTTrack, "insertSegmentOfTrack:fromRange:scaledToRange:", QTTrack, QTTimeRange, QTTimeRange)(track, srcRange, dstRange); | |
2120 } | |
2121 | |
2122 void removeTrack (QTTrack track) | |
2123 { | |
2124 return invokeObjcSelf!(void, "removeTrack:", QTTrack)(track); | |
2125 } | |
2126 | |
2127 // QTMovieInitialization | |
2128 static bool canInitWithPasteboard (NSPasteboard pasteboard) | |
2129 { | |
2130 return invokeObjcSelfClass!(bool, "canInitWithPasteboard:", NSPasteboard)(pasteboard); | |
2131 } | |
2132 | |
2133 static bool canInitWithFile (NSString fileName) | |
2134 { | |
2135 return invokeObjcSelfClass!(bool, "canInitWithFile:", NSString)(fileName); | |
2136 } | |
2137 | |
2138 static bool canInitWithURL (NSURL url) | |
2139 { | |
2140 return invokeObjcSelfClass!(bool, "canInitWithURL:", NSURL)(url); | |
2141 } | |
2142 | |
2143 static bool canInitWithDataReference (QTDataReference dataReference) | |
2144 { | |
2145 return invokeObjcSelfClass!(bool, "canInitWithDataReference:", QTDataReference)(dataReference); | |
2146 } | |
2147 | |
2148 static NSArray movieFileTypes (int types) | |
2149 { | |
2150 return invokeObjcSelfClass!(NSArray, "movieFileTypes:", int)(types); | |
2151 } | |
2152 | |
2153 static NSArray movieUnfilteredFileTypes () | |
2154 { | |
2155 return invokeObjcSelfClass!(NSArray, "movieUnfilteredFileTypes"); | |
2156 } | |
2157 | |
2158 static NSArray movieUnfilteredPasteboardTypes () | |
2159 { | |
2160 return invokeObjcSelfClass!(NSArray, "movieUnfilteredPasteboardTypes"); | |
2161 } | |
2162 | |
2163 static NSArray movieTypesWithOptions (int types) | |
2164 { | |
2165 return invokeObjcSelfClass!(NSArray, "movieTypesWithOptions:", int)(types); | |
2166 } | |
2167 | |
2168 static Object movie () | |
2169 { | |
2170 return invokeObjcSelfClass!(Object, "movie"); | |
2171 } | |
2172 | |
2173 static Object movieWithFile (NSString fileName, ref NSError errorPtr) | |
2174 { | |
2175 id __arg1; | |
2176 | |
2177 if (errorPtr) | |
2178 __arg1 = errorPtr.objcObject; | |
2179 | |
2180 Object result = invokeObjcSelfClass!(Object, "movieWithFile:error:", NSString, id*)(fileName, &__arg1); | |
2181 | |
2182 if (__arg1) | |
2183 errorPtr = new NSError(__arg1); | |
2184 | |
2185 return result; | |
2186 } | |
2187 | |
2188 static Object movieWithURL (NSURL url, ref NSError errorPtr) | |
2189 { | |
2190 id __arg1; | |
2191 | |
2192 if (errorPtr) | |
2193 __arg1 = errorPtr.objcObject; | |
2194 | |
2195 Object result = invokeObjcSelfClass!(Object, "movieWithURL:error:", NSURL, id*)(url, &__arg1); | |
2196 | |
2197 if (__arg1) | |
2198 errorPtr = new NSError(__arg1); | |
2199 | |
2200 return result; | |
2201 } | |
2202 | |
2203 static Object movieWithDataReference (QTDataReference dataReference, ref NSError errorPtr) | |
2204 { | |
2205 id __arg1; | |
2206 | |
2207 if (errorPtr) | |
2208 __arg1 = errorPtr.objcObject; | |
2209 | |
2210 Object result = invokeObjcSelfClass!(Object, "movieWithDataReference:error:", QTDataReference, id*)(dataReference, &__arg1); | |
2211 | |
2212 if (__arg1) | |
2213 errorPtr = new NSError(__arg1); | |
2214 | |
2215 return result; | |
2216 } | |
2217 | |
2218 static Object movieWithPasteboard (NSPasteboard pasteboard, ref NSError errorPtr) | |
2219 { | |
2220 id __arg1; | |
2221 | |
2222 if (errorPtr) | |
2223 __arg1 = errorPtr.objcObject; | |
2224 | |
2225 Object result = invokeObjcSelfClass!(Object, "movieWithPasteboard:error:", NSPasteboard, id*)(pasteboard, &__arg1); | |
2226 | |
2227 if (__arg1) | |
2228 errorPtr = new NSError(__arg1); | |
2229 | |
2230 return result; | |
2231 } | |
2232 | |
2233 static Object movieWithData (NSData data, ref NSError errorPtr) | |
2234 { | |
2235 id __arg1; | |
2236 | |
2237 if (errorPtr) | |
2238 __arg1 = errorPtr.objcObject; | |
2239 | |
2240 Object result = invokeObjcSelfClass!(Object, "movieWithData:error:", NSData, id*)(data, &__arg1); | |
2241 | |
2242 if (__arg1) | |
2243 errorPtr = new NSError(__arg1); | |
2244 | |
2245 return result; | |
2246 } | |
2247 | |
2248 static Object movieWithAttributes (NSDictionary attributes, ref NSError errorPtr) | |
2249 { | |
2250 id __arg1; | |
2251 | |
2252 if (errorPtr) | |
2253 __arg1 = errorPtr.objcObject; | |
2254 | |
2255 Object result = invokeObjcSelfClass!(Object, "movieWithAttributes:error:", NSDictionary, id*)(attributes, &__arg1); | |
2256 | |
2257 if (__arg1) | |
2258 errorPtr = new NSError(__arg1); | |
2259 | |
2260 return result; | |
2261 } | |
2262 | |
2263 static Object movieNamed (NSString name, ref NSError errorPtr) | |
2264 { | |
2265 id __arg1; | |
2266 | |
2267 if (errorPtr) | |
2268 __arg1 = errorPtr.objcObject; | |
2269 | |
2270 Object result = invokeObjcSelfClass!(Object, "movieNamed:error:", NSString, id*)(name, &__arg1); | |
2271 | |
2272 if (__arg1) | |
2273 errorPtr = new NSError(__arg1); | |
2274 | |
2275 return result; | |
2276 } | |
2277 | |
2278 typeof(this) initWithFile (NSString fileName, ref NSError errorPtr) | |
2279 { | |
2280 id __arg1; | |
2281 | |
2282 if (errorPtr) | |
2283 __arg1 = errorPtr.objcObject; | |
2284 | |
2285 id result = invokeObjcSelf!(id, "initWithFile:error:", NSString, id*)(fileName, &__arg1); | |
2286 | |
2287 if (__arg1) | |
2288 errorPtr = new NSError(__arg1); | |
2289 | |
2290 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
2291 } | |
2292 | |
2293 this (NSString fileName, ref NSError errorPtr) | |
2294 { | |
2295 super(typeof(this).alloc.initWithFile(fileName, errorPtr).objcObject); | |
2296 } | |
2297 | |
2298 typeof(this) initWithURL (NSURL url, ref NSError errorPtr) | |
2299 { | |
2300 id __arg1; | |
2301 | |
2302 if (errorPtr) | |
2303 __arg1 = errorPtr.objcObject; | |
2304 | |
2305 id result = invokeObjcSelf!(id, "initWithURL:error:", NSURL, id*)(url, &__arg1); | |
2306 | |
2307 if (__arg1) | |
2308 errorPtr = new NSError(__arg1); | |
2309 | |
2310 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
2311 } | |
2312 | |
2313 this (NSURL url, ref NSError errorPtr) | |
2314 { | |
2315 super(typeof(this).alloc.initWithURL(url, errorPtr).objcObject); | |
2316 } | |
2317 | |
2318 typeof(this) initWithDataReference (QTDataReference dataReference, ref NSError errorPtr) | |
2319 { | |
2320 id __arg1; | |
2321 | |
2322 if (errorPtr) | |
2323 __arg1 = errorPtr.objcObject; | |
2324 | |
2325 id result = invokeObjcSelf!(id, "initWithDataReference:error:", QTDataReference, id*)(dataReference, &__arg1); | |
2326 | |
2327 if (__arg1) | |
2328 errorPtr = new NSError(__arg1); | |
2329 | |
2330 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
2331 } | |
2332 | |
2333 this (QTDataReference dataReference, ref NSError errorPtr) | |
2334 { | |
2335 super(typeof(this).alloc.initWithDataReference(dataReference, errorPtr).objcObject); | |
2336 } | |
2337 | |
2338 typeof(this) initWithPasteboard (NSPasteboard pasteboard, ref NSError errorPtr) | |
2339 { | |
2340 id __arg1; | |
2341 | |
2342 if (errorPtr) | |
2343 __arg1 = errorPtr.objcObject; | |
2344 | |
2345 id result = invokeObjcSelf!(id, "initWithPasteboard:error:", NSPasteboard, id*)(pasteboard, &__arg1); | |
2346 | |
2347 if (__arg1) | |
2348 errorPtr = new NSError(__arg1); | |
2349 | |
2350 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
2351 } | |
2352 | |
2353 this (NSPasteboard pasteboard, ref NSError errorPtr) | |
2354 { | |
2355 super(typeof(this).alloc.initWithPasteboard(pasteboard, errorPtr).objcObject); | |
2356 } | |
2357 | |
2358 typeof(this) initWithData (NSData data, ref NSError errorPtr) | |
2359 { | |
2360 id __arg1; | |
2361 | |
2362 if (errorPtr) | |
2363 __arg1 = errorPtr.objcObject; | |
2364 | |
2365 id result = invokeObjcSelf!(id, "initWithData:error:", NSData, id*)(data, &__arg1); | |
2366 | |
2367 if (__arg1) | |
2368 errorPtr = new NSError(__arg1); | |
2369 | |
2370 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
2371 } | |
2372 | |
2373 this (NSData data, ref NSError errorPtr) | |
2374 { | |
2375 super(typeof(this).alloc.initWithData(data, errorPtr).objcObject); | |
2376 } | |
2377 | |
2378 typeof(this) initWithMovie (QTMovie movie, QTTimeRange range, ref NSError errorPtr) | |
2379 { | |
2380 id __arg2; | |
2381 | |
2382 if (errorPtr) | |
2383 __arg2 = errorPtr.objcObject; | |
2384 | |
2385 id result = invokeObjcSelf!(id, "initWithMovie:timeRange:error:", QTMovie, QTTimeRange, id*)(movie, range, &__arg2); | |
2386 | |
2387 if (__arg2) | |
2388 errorPtr = new NSError(__arg2); | |
2389 | |
2390 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
2391 } | |
2392 | |
2393 this (QTMovie movie, QTTimeRange range, ref NSError errorPtr) | |
2394 { | |
2395 super(typeof(this).alloc.initWithMovie(movie, range, errorPtr).objcObject); | |
2396 } | |
2397 | |
2398 typeof(this) initWithAttributes (NSDictionary attributes, ref NSError errorPtr) | |
2399 { | |
2400 id __arg1; | |
2401 | |
2402 if (errorPtr) | |
2403 __arg1 = errorPtr.objcObject; | |
2404 | |
2405 id result = invokeObjcSelf!(id, "initWithAttributes:error:", NSDictionary, id*)(attributes, &__arg1); | |
2406 | |
2407 if (__arg1) | |
2408 errorPtr = new NSError(__arg1); | |
2409 | |
2410 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
2411 } | |
2412 | |
2413 this (NSDictionary attributes, ref NSError errorPtr) | |
2414 { | |
2415 super(typeof(this).alloc.initWithAttributes(attributes, errorPtr).objcObject); | |
2416 } | |
2417 | |
2418 Object movieWithTimeRange (QTTimeRange range, ref NSError errorPtr) | |
2419 { | |
2420 id __arg1; | |
2421 | |
2422 if (errorPtr) | |
2423 __arg1 = errorPtr.objcObject; | |
2424 | |
2425 Object result = invokeObjcSelf!(Object, "movieWithTimeRange:error:", QTTimeRange, id*)(range, &__arg1); | |
2426 | |
2427 if (__arg1) | |
2428 errorPtr = new NSError(__arg1); | |
2429 | |
2430 return result; | |
2431 } | |
2432 | |
2433 typeof(this) initToWritableFile (NSString filename, ref NSError errorPtr) | |
2434 { | |
2435 id __arg1; | |
2436 | |
2437 if (errorPtr) | |
2438 __arg1 = errorPtr.objcObject; | |
2439 | |
2440 id result = invokeObjcSelf!(id, "initToWritableFile:error:", NSString, id*)(filename, &__arg1); | |
2441 | |
2442 if (__arg1) | |
2443 errorPtr = new NSError(__arg1); | |
2444 | |
2445 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
2446 } | |
2447 | |
2448 this (NSString filename, ref NSError errorPtr) | |
2449 { | |
2450 super(typeof(this).alloc.initToWritableFile(filename, errorPtr).objcObject); | |
2451 } | |
2452 | |
2453 typeof(this) initToWritableData (NSMutableData data, ref NSError errorPtr) | |
2454 { | |
2455 id __arg1; | |
2456 | |
2457 if (errorPtr) | |
2458 __arg1 = errorPtr.objcObject; | |
2459 | |
2460 id result = invokeObjcSelf!(id, "initToWritableData:error:", NSMutableData, id*)(data, &__arg1); | |
2461 | |
2462 if (__arg1) | |
2463 errorPtr = new NSError(__arg1); | |
2464 | |
2465 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
2466 } | |
2467 | |
2468 this (NSMutableData data, ref NSError errorPtr) | |
2469 { | |
2470 super(typeof(this).alloc.initToWritableData(data, errorPtr).objcObject); | |
2471 } | |
2472 | |
2473 typeof(this) initToWritableDataReference (QTDataReference dataReference, ref NSError errorPtr) | |
2474 { | |
2475 id __arg1; | |
2476 | |
2477 if (errorPtr) | |
2478 __arg1 = errorPtr.objcObject; | |
2479 | |
2480 id result = invokeObjcSelf!(id, "initToWritableDataReference:error:", QTDataReference, id*)(dataReference, &__arg1); | |
2481 | |
2482 if (__arg1) | |
2483 errorPtr = new NSError(__arg1); | |
2484 | |
2485 return result is this.objcObject ? this : (result !is null ? new typeof(this)(result) : null); | |
2486 } | |
2487 | |
2488 this (QTDataReference dataReference, ref NSError errorPtr) | |
2489 { | |
2490 super(typeof(this).alloc.initToWritableDataReference(dataReference, errorPtr).objcObject); | |
2491 } | |
2492 | |
2493 void invalidate () | |
2494 { | |
2495 return invokeObjcSelf!(void, "invalidate"); | |
2496 } | |
2497 | |
2498 // QTMovieImage | |
2499 NSImage posterImage () | |
2500 { | |
2501 return invokeObjcSelf!(NSImage, "posterImage"); | |
2502 } | |
2503 | |
2504 NSImage currentFrameImage () | |
2505 { | |
2506 return invokeObjcSelf!(NSImage, "currentFrameImage"); | |
2507 } | |
2508 | |
2509 NSImage frameImageAtTime (QTTime time) | |
2510 { | |
2511 return invokeObjcSelf!(NSImage, "frameImageAtTime:", QTTime)(time); | |
2512 } | |
2513 | |
2514 void* frameImageAtTime (QTTime time, NSDictionary attributes, ref NSError errorPtr) | |
2515 { | |
2516 id __arg2; | |
2517 | |
2518 if (errorPtr) | |
2519 __arg2 = errorPtr.objcObject; | |
2520 | |
2521 void* result = invokeObjcSelf!(void*, "frameImageAtTime:withAttributes:error:", QTTime, NSDictionary, id*)(time, attributes, &__arg2); | |
2522 | |
2523 if (__arg2) | |
2524 errorPtr = new NSError(__arg2); | |
2525 | |
2526 return result; | |
2527 } | |
2528 | |
2529 // QTDelegate | |
2530 Object delegate_ () | |
2531 { | |
2532 return invokeObjcSelf!(Object, "delegate"); | |
2533 } | |
2534 | |
2535 void setDelegate (Object delegate_) | |
2536 { | |
2537 return invokeObjcSelf!(void, "setDelegate:", Object)(delegate_); | |
2538 } | |
2539 | |
2540 // QTMovieTime | |
2541 void autoplay () | |
2542 { | |
2543 return invokeObjcSelf!(void, "autoplay"); | |
2544 } | |
2545 | |
2546 void play () | |
2547 { | |
2548 return invokeObjcSelf!(void, "play"); | |
2549 } | |
2550 | |
2551 void stop () | |
2552 { | |
2553 return invokeObjcSelf!(void, "stop"); | |
2554 } | |
2555 | |
2556 void setCurrentTime (QTTime time) | |
2557 { | |
2558 return invokeObjcSelf!(void, "setCurrentTime:", QTTime)(time); | |
2559 } | |
2560 | |
2561 void gotoBeginning () | |
2562 { | |
2563 return invokeObjcSelf!(void, "gotoBeginning"); | |
2564 } | |
2565 | |
2566 void gotoEnd () | |
2567 { | |
2568 return invokeObjcSelf!(void, "gotoEnd"); | |
2569 } | |
2570 | |
2571 void gotoNextSelectionPoint () | |
2572 { | |
2573 return invokeObjcSelf!(void, "gotoNextSelectionPoint"); | |
2574 } | |
2575 | |
2576 void gotoPreviousSelectionPoint () | |
2577 { | |
2578 return invokeObjcSelf!(void, "gotoPreviousSelectionPoint"); | |
2579 } | |
2580 | |
2581 void gotoPosterTime () | |
2582 { | |
2583 return invokeObjcSelf!(void, "gotoPosterTime"); | |
2584 } | |
2585 | |
2586 void stepForward () | |
2587 { | |
2588 return invokeObjcSelf!(void, "stepForward"); | |
2589 } | |
2590 | |
2591 void stepBackward () | |
2592 { | |
2593 return invokeObjcSelf!(void, "stepBackward"); | |
2594 } | |
2595 | |
2596 // QTMovieFormat | |
2597 NSData movieFormatRepresentation () | |
2598 { | |
2599 return invokeObjcSelf!(NSData, "movieFormatRepresentation"); | |
2600 } | |
2601 | |
2602 bool writeToFile (NSString fileName, NSDictionary attributes) | |
2603 { | |
2604 return invokeObjcSelf!(bool, "writeToFile:withAttributes:", NSString, NSDictionary)(fileName, attributes); | |
2605 } | |
2606 | |
2607 bool writeToFile (NSString fileName, NSDictionary attributes, ref NSError errorPtr) | |
2608 { | |
2609 id __arg2; | |
2610 | |
2611 if (errorPtr) | |
2612 __arg2 = errorPtr.objcObject; | |
2613 | |
2614 bool result = invokeObjcSelf!(bool, "writeToFile:withAttributes:error:", NSString, NSDictionary, id*)(fileName, attributes, &__arg2); | |
2615 | |
2616 if (__arg2) | |
2617 errorPtr = new NSError(__arg2); | |
2618 | |
2619 return result; | |
2620 } | |
2621 | |
2622 bool canUpdateMovieFile () | |
2623 { | |
2624 return invokeObjcSelf!(bool, "canUpdateMovieFile"); | |
2625 } | |
2626 | |
2627 bool updateMovieFile () | |
2628 { | |
2629 return invokeObjcSelf!(bool, "updateMovieFile"); | |
2630 } | |
2631 | |
2632 // QTSelection | |
2633 void setSelection (QTTimeRange selection) | |
2634 { | |
2635 return invokeObjcSelf!(void, "setSelection:", QTTimeRange)(selection); | |
2636 } | |
2637 | |
2638 QTTime selectionStart () | |
2639 { | |
2640 return invokeObjcSelf!(QTTime, "selectionStart"); | |
2641 } | |
2642 | |
2643 QTTime selectionEnd () | |
2644 { | |
2645 return invokeObjcSelf!(QTTime, "selectionEnd"); | |
2646 } | |
2647 | |
2648 QTTime selectionDuration () | |
2649 { | |
2650 return invokeObjcSelf!(QTTime, "selectionDuration"); | |
2651 } | |
2652 | |
2653 // QTMoviePlaybackControl | |
2654 void setRate (float rate) | |
2655 { | |
2656 return invokeObjcSelf!(void, "setRate:", float)(rate); | |
2657 } | |
2658 | |
2659 void setVolume (float volume) | |
2660 { | |
2661 return invokeObjcSelf!(void, "setVolume:", float)(volume); | |
2662 } | |
2663 | |
2664 void setMuted (bool mute) | |
2665 { | |
2666 return invokeObjcSelf!(void, "setMuted:", bool)(mute); | |
2667 } | |
2668 } |