2121using XamCore . CoreGraphics ;
2222using XamCore . CoreVideo ;
2323using XamCore . SceneKit ;
24+ #if ! WATCH
25+ using XamCore . Metal ;
26+ #endif
2427
2528using Vector2 = global ::OpenTK . Vector2 ;
2629using Vector3 = global ::OpenTK . Vector3 ;
2730using Matrix2 = global ::OpenTK . Matrix2 ;
2831using Matrix3 = global ::OpenTK . Matrix3 ;
2932using Matrix4 = global ::OpenTK . Matrix4 ;
3033using Vector4 = global ::OpenTK . Vector4 ;
34+ using Quaternion = global ::OpenTK . Quaternion ;
3135
3236#if MONOMAC
3337using XamCore . AppKit ;
3741using pfloat = System . nfloat ;
3842#else
3943using XamCore . UIKit ;
44+ using NSLineBreakMode = global ::XamCore . UIKit . UILineBreakMode ;
4045using pfloat = System . Single ;
4146#if ! WATCH
4247using UIView = global ::XamCore . UIKit . UIView ;
@@ -51,6 +56,11 @@ interface AVPlayer {}
5156 interface CIFilter { }
5257 interface GKPolygonObstacle { }
5358 interface UIView { }
59+ interface IMTLCommandBuffer { }
60+ interface IMTLCommandQueue { }
61+ interface IMTLDevice { }
62+ interface IMTLRenderCommandEncoder { }
63+ interface MTLRenderPassDescriptor { }
5464#endif
5565
5666 delegate void SKNodeChildEnumeratorHandler ( SKNode node , out bool stop ) ;
@@ -166,6 +176,12 @@ partial interface SKNode : NSCoding, NSCopying {
166176 [ Export ( "userInteractionEnabled" ) ]
167177 bool UserInteractionEnabled { [ Bind ( "isUserInteractionEnabled" ) ] get ; set ; }
168178
179+ [ NoWatch ]
180+ [ NoMac ]
181+ [ TV ( 11 , 0 ) , iOS ( 11 , 0 ) ]
182+ [ Export ( "focusBehavior" , ArgumentSemantic . Assign ) ]
183+ SKNodeFocusBehavior FocusBehavior { get ; set ; }
184+
169185 [ Export ( "parent" ) ]
170186 SKNode Parent { get ; }
171187
@@ -1182,19 +1198,40 @@ partial interface SKLabelNode {
11821198 [ Static , Export ( "labelNodeWithText:" ) ]
11831199 SKLabelNode FromText ( [ NullAllowed ] string text ) ;
11841200
1201+ [ TV ( 11 , 0 ) , Watch ( 4 , 0 ) , Mac ( 13 , 0 ) , iOS ( 11 , 0 ) ]
1202+ [ Static ]
1203+ [ Export ( "labelNodeWithAttributedText:" ) ]
1204+ SKLabelNode FromText ( [ NullAllowed ] NSAttributedString attributedText ) ;
1205+
11851206 [ Export ( "verticalAlignmentMode" ) ]
11861207 SKLabelVerticalAlignmentMode VerticalAlignmentMode { get ; set ; }
11871208
11881209 [ Export ( "horizontalAlignmentMode" ) ]
11891210 SKLabelHorizontalAlignmentMode HorizontalAlignmentMode { get ; set ; }
11901211
1212+ [ TV ( 11 , 0 ) , Watch ( 4 , 0 ) , Mac ( 13 , 0 ) , iOS ( 11 , 0 ) ]
1213+ [ Export ( "numberOfLines" ) ]
1214+ nint NumberOfLines { get ; set ; }
1215+
1216+ [ TV ( 11 , 0 ) , Watch ( 4 , 0 ) , Mac ( 13 , 0 ) , iOS ( 11 , 0 ) ]
1217+ [ Export ( "lineBreakMode" , ArgumentSemantic . Assign ) ]
1218+ NSLineBreakMode LineBreakMode { get ; set ; }
1219+
1220+ [ TV ( 11 , 0 ) , Watch ( 4 , 0 ) , Mac ( 13 , 0 ) , iOS ( 11 , 0 ) ]
1221+ [ Export ( "preferredMaxLayoutWidth" ) ]
1222+ nfloat PreferredMaxLayoutWidth { get ; set ; }
1223+
11911224 [ Export ( "fontName" , ArgumentSemantic . Copy ) ]
11921225 string FontName { get ; set ; }
11931226
11941227 [ Export ( "text" , ArgumentSemantic . Copy ) ]
11951228 [ NullAllowed ] // nullable in Xcode7 headers and caught by introspection tests
11961229 string Text { get ; set ; }
11971230
1231+ [ TV ( 11 , 0 ) , Watch ( 4 , 0 ) , Mac ( 13 , 0 ) , iOS ( 11 , 0 ) ]
1232+ [ NullAllowed , Export ( "attributedText" , ArgumentSemantic . Copy ) ]
1233+ NSAttributedString AttributedText { get ; set ; }
1234+
11981235 [ Export ( "fontSize" ) ]
11991236 nfloat FontSize { get ; set ; }
12001237
@@ -3223,5 +3260,78 @@ interface SKWarpGeometryGrid : NSCoding
32233260 [ Export ( "gridByReplacingDestPositions:" ) ]
32243261 SKWarpGeometryGrid _GridByReplacingDestPositions ( IntPtr destPositions ) ;
32253262 }
3263+
3264+ // SKRenderer is not available for WatchKit apps and the iOS simulator
3265+ [ NoWatch ]
3266+ [ TV ( 11 , 0 ) , Mac ( 10 , 13 ) , iOS ( 11 , 0 ) ]
3267+ [ BaseType ( typeof ( NSObject ) ) ]
3268+ [ DisableDefaultCtor ]
3269+ interface SKRenderer {
3270+ [ Static ]
3271+ [ Export ( "rendererWithDevice:" ) ]
3272+ [ return : NullAllowed ]
3273+ SKRenderer FromDevice ( [ NullAllowed ] IMTLDevice device ) ;
3274+
3275+ [ Export ( "renderWithViewport:commandBuffer:renderPassDescriptor:" ) ]
3276+ void Render ( CGRect viewport , IMTLCommandBuffer commandBuffer , MTLRenderPassDescriptor renderPassDescriptor ) ;
3277+
3278+ [ Export ( "renderWithViewport:renderCommandEncoder:renderPassDescriptor:commandQueue:" ) ]
3279+ void Render ( CGRect viewport , IMTLRenderCommandEncoder renderCommandEncoder , MTLRenderPassDescriptor renderPassDescriptor , IMTLCommandQueue commandQueue ) ;
3280+
3281+ [ Export ( "updateAtTime:" ) ]
3282+ void Update ( double currentTime ) ;
3283+
3284+ [ NullAllowed , Export ( "scene" , ArgumentSemantic . Assign ) ]
3285+ SKScene Scene { get ; set ; }
3286+
3287+ [ Export ( "ignoresSiblingOrder" ) ]
3288+ bool IgnoresSiblingOrder { get ; set ; }
3289+
3290+ [ Export ( "shouldCullNonVisibleNodes" ) ]
3291+ bool ShouldCullNonVisibleNodes { get ; set ; }
3292+
3293+ [ Export ( "showsDrawCount" ) ]
3294+ bool ShowsDrawCount { get ; set ; }
3295+
3296+ [ Export ( "showsNodeCount" ) ]
3297+ bool ShowsNodeCount { get ; set ; }
3298+
3299+ [ Export ( "showsQuadCount" ) ]
3300+ bool ShowsQuadCount { get ; set ; }
3301+
3302+ [ Export ( "showsPhysics" ) ]
3303+ bool ShowsPhysics { get ; set ; }
3304+
3305+ [ Export ( "showsFields" ) ]
3306+ bool ShowsFields { get ; set ; }
3307+ }
3308+
3309+ [ TV ( 11 , 0 ) , Watch ( 4 , 0 ) , Mac ( 13 , 0 ) , iOS ( 11 , 0 ) ]
3310+ [ BaseType ( typeof ( SKNode ) ) ]
3311+ interface SKTransformNode {
3312+ [ Export ( "xRotation" ) ]
3313+ nfloat XRotation { get ; set ; }
3314+
3315+ [ Export ( "yRotation" ) ]
3316+ nfloat YRotation { get ; set ; }
3317+
3318+ [ Export ( "eulerAngles" ) ]
3319+ Vector3 EulerAngles {
3320+ [ MarshalDirective ( NativePrefix = "xamarin_simd__" , Library = "__Internal" ) ] get ;
3321+ [ MarshalDirective ( NativePrefix = "xamarin_simd__" , Library = "__Internal" ) ] set ;
3322+ }
3323+
3324+ [ Export ( "rotationMatrix" ) ]
3325+ Matrix3 RotationMatrix {
3326+ [ MarshalDirective ( NativePrefix = "xamarin_simd__" , Library = "__Internal" ) ] get ;
3327+ [ MarshalDirective ( NativePrefix = "xamarin_simd__" , Library = "__Internal" ) ] set ;
3328+ }
3329+
3330+ [ Export ( "quaternion" ) ]
3331+ Quaternion Quaternion {
3332+ [ MarshalDirective ( NativePrefix = "xamarin_simd__" , Library = "__Internal" ) ] get ;
3333+ [ MarshalDirective ( NativePrefix = "xamarin_simd__" , Library = "__Internal" ) ] set ;
3334+ }
3335+ }
32263336}
32273337#endif
0 commit comments