Mercurial > projects > dstep
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dstep/qtkit/QTCaptureConnection.d Sun Jan 03 22:06:11 2010 +0100 @@ -0,0 +1,165 @@ +/** + * Copyright: Copyright (c) 2009 Jacob Carlborg. + * Authors: Jacob Carlborg + * Version: Initial created: Sep 28, 2009 + * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) + */ +module dstep.qtkit.QTCaptureConnection; + +import dstep.foundation.Foundation; +import dstep.objc.bridge.Bridge; +import dstep.objc.objc; +import dstep.qtkit.QTFormatDescription; +import dstep.qtkit.QTKitDefines; + +import bindings = dstep.qtkit.QTCaptureConnection_bindings; + +private +{ + NSString QTCaptureConnectionFormatDescriptionWillChangeNotification_; + NSString QTCaptureConnectionFormatDescriptionDidChangeNotification_; + NSString QTCaptureConnectionAttributeWillChangeNotification_; + NSString QTCaptureConnectionAttributeDidChangeNotification_; + NSString QTCaptureConnectionChangedAttributeKey_; + NSString QTCaptureConnectionAudioAveragePowerLevelsAttribute_; + NSString QTCaptureConnectionAudioPeakHoldLevelsAttribute_; + NSString QTCaptureConnectionAudioMasterVolumeAttribute_; + NSString QTCaptureConnectionAudioVolumesAttribute_; + NSString QTCaptureConnectionEnabledAudioChannelsAttribute_; +} + +NSString QTCaptureConnectionFormatDescriptionWillChangeNotification () +{ + if (QTCaptureConnectionFormatDescriptionWillChangeNotification_) + return QTCaptureConnectionFormatDescriptionWillChangeNotification_; + + return QTCaptureConnectionFormatDescriptionWillChangeNotification_ = new NSString(bindings.QTCaptureConnectionFormatDescriptionWillChangeNotification); +} + +NSString QTCaptureConnectionFormatDescriptionDidChangeNotification () +{ + if (QTCaptureConnectionFormatDescriptionDidChangeNotification_) + return QTCaptureConnectionFormatDescriptionDidChangeNotification_; + + return QTCaptureConnectionFormatDescriptionDidChangeNotification_ = new NSString(bindings.QTCaptureConnectionFormatDescriptionDidChangeNotification); +} + +NSString QTCaptureConnectionAttributeWillChangeNotification () +{ + if (QTCaptureConnectionAttributeWillChangeNotification_) + return QTCaptureConnectionAttributeWillChangeNotification_; + + return QTCaptureConnectionAttributeWillChangeNotification_ = new NSString(bindings.QTCaptureConnectionAttributeWillChangeNotification); +} + +NSString QTCaptureConnectionAttributeDidChangeNotification () +{ + if (QTCaptureConnectionAttributeDidChangeNotification_) + return QTCaptureConnectionAttributeDidChangeNotification_; + + return QTCaptureConnectionAttributeDidChangeNotification_ = new NSString(bindings.QTCaptureConnectionAttributeDidChangeNotification); +} + +NSString QTCaptureConnectionChangedAttributeKey () +{ + if (QTCaptureConnectionChangedAttributeKey_) + return QTCaptureConnectionChangedAttributeKey_; + + return QTCaptureConnectionChangedAttributeKey_ = new NSString(bindings.QTCaptureConnectionChangedAttributeKey); +} + +NSString QTCaptureConnectionAudioAveragePowerLevelsAttribute () +{ + if (QTCaptureConnectionAudioAveragePowerLevelsAttribute_) + return QTCaptureConnectionAudioAveragePowerLevelsAttribute_; + + return QTCaptureConnectionAudioAveragePowerLevelsAttribute_ = new NSString(bindings.QTCaptureConnectionAudioAveragePowerLevelsAttribute); +} + +NSString QTCaptureConnectionAudioPeakHoldLevelsAttribute () +{ + if (QTCaptureConnectionAudioPeakHoldLevelsAttribute_) + return QTCaptureConnectionAudioPeakHoldLevelsAttribute_; + + return QTCaptureConnectionAudioPeakHoldLevelsAttribute_ = new NSString(bindings.QTCaptureConnectionAudioPeakHoldLevelsAttribute); +} + +NSString QTCaptureConnectionAudioMasterVolumeAttribute () +{ + if (QTCaptureConnectionAudioMasterVolumeAttribute_) + return QTCaptureConnectionAudioMasterVolumeAttribute_; + + return QTCaptureConnectionAudioMasterVolumeAttribute_ = new NSString(bindings.QTCaptureConnectionAudioMasterVolumeAttribute); +} + +NSString QTCaptureConnectionAudioVolumesAttribute () +{ + if (QTCaptureConnectionAudioVolumesAttribute_) + return QTCaptureConnectionAudioVolumesAttribute_; + + return QTCaptureConnectionAudioVolumesAttribute_ = new NSString(bindings.QTCaptureConnectionAudioVolumesAttribute); +} + +NSString QTCaptureConnectionEnabledAudioChannelsAttribute () +{ + if (QTCaptureConnectionEnabledAudioChannelsAttribute_) + return QTCaptureConnectionEnabledAudioChannelsAttribute_; + + return QTCaptureConnectionEnabledAudioChannelsAttribute_ = new NSString(bindings.QTCaptureConnectionEnabledAudioChannelsAttribute); +} + +class QTCaptureConnection : NSObject +{ + mixin (ObjcWrap); + + Object owner () + { + return invokeObjcSelf!(Object, "owner"); + } + + NSString mediaType () + { + return invokeObjcSelf!(NSString, "mediaType"); + } + + QTFormatDescription formatDescription () + { + return invokeObjcSelf!(QTFormatDescription, "formatDescription"); + } + + bool isEnabled () + { + return invokeObjcSelf!(bool, "isEnabled"); + } + + void setEnabled (bool enabled) + { + return invokeObjcSelf!(void, "setEnabled:", bool)(enabled); + } + + NSDictionary connectionAttributes () + { + return invokeObjcSelf!(NSDictionary, "connectionAttributes"); + } + + void setConnectionAttributes (NSDictionary connectionAttributes) + { + return invokeObjcSelf!(void, "setConnectionAttributes:", NSDictionary)(connectionAttributes); + } + + bool attributeIsReadOnly (NSString attributeKey) + { + return invokeObjcSelf!(bool, "attributeIsReadOnly:", NSString)(attributeKey); + } + + Object attributeForKey (NSString attributeKey) + { + return invokeObjcSelf!(Object, "attributeForKey:", NSString)(attributeKey); + } + + void setAttribute (Object attribute, NSString key) + { + return invokeObjcSelf!(void, "setAttribute:forKey:", Object, NSString)(attribute, key); + } +} +