Files
swift-mirror/stdlib/public/Darwin/AVFoundation/NSValue.swift.gyb
Saleem Abdulrasool 41d9c2cc59 stdlib: restructure for OS family layout of SDK overlay
The SDK directory is now confusing as the Windows target also has a SDK
overlay.  In order to make this more uniform, move the SDK directory to
Darwin which covers the fact that this covers the XNU family of OSes.
The Windows directory contains the SDK overlay for the Windows target.
2018-12-06 11:32:05 -08:00

30 lines
930 B
Plaintext

@_exported import AVFoundation // Clang module
import CoreMedia
import Foundation
%{
from gyb_foundation_support import \
ObjectiveCBridgeableImplementationForNSValueWithCategoryMethods
}%
// Bridge CoreMedia structs to NSValue.
// AVFoundation provides internal NSValue subclasses for these structures that
// are incompatible with the NSConcreteValue subclasses you get using
// -[NSValue valueWithBytes:objCType:].
${ ObjectiveCBridgeableImplementationForNSValueWithCategoryMethods(
Type="CMTime",
initializer="{ NSValue(time: $0) }",
getter="{ $0.timeValue }",
) }
${ ObjectiveCBridgeableImplementationForNSValueWithCategoryMethods(
Type="CMTimeRange",
initializer="{ NSValue(timeRange: $0) }",
getter="{ $0.timeRangeValue }",
) }
${ ObjectiveCBridgeableImplementationForNSValueWithCategoryMethods(
Type="CMTimeMapping",
initializer="{ NSValue(timeMapping: $0) }",
getter="{ $0.timeMappingValue }",
) }