<% const properties = locals.properties; const type = locals.type; const doc = locals.doc; -%> // This file is generated. // Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`. #import #import "MGLFoundation.h" #import "MGLStyleValue.h" NS_ASSUME_NONNULL_BEGIN <% for (const property of properties) { -%> <% if (property.type == "enum") { -%> /** <%- propertyDoc(property.name, property, type, 'enum').wrap(80, 1) %> */ typedef NS_ENUM(NSUInteger, MGLLight<%- camelize(property.name) %>) { <% for (const value in property.values) { -%> /** <%- propertyDoc(property.name, property.values[value], type, 'enum').wrap(80, 4+1) %> */ MGLLightAnchor<%- camelize(value) %>, <% } -%> }; <% } -%> <% } -%> /** A structure containing information about the position of the light source relative to lit geometries. */ typedef struct MGLSphericalPosition { /** Distance from the center of the base of an object to its light. */ CGFloat radial; /** Position of the light relative to 0° (0° when `MGLLight.anchor` is set to viewport corresponds to the top of the viewport, or 0° when `MGLLight.anchor` is set to map corresponds to due north, and degrees proceed clockwise). */ CLLocationDirection azimuthal; /** Indicates the height of the light (from 0°, directly above, to 180°, directly below). */ CLLocationDirection polar; } MGLSphericalPosition; /** Creates a new `MGLSphericalPosition` from the given radial, azimuthal, polar. @param radial The radial coordinate. @param azimuthal The azimuthal angle. @param polar The polar angle. @return Returns a `MGLSphericalPosition` struct containing the position attributes. */ NS_INLINE MGLSphericalPosition MGLSphericalPositionMake(CGFloat radial, CLLocationDirection azimuthal, CLLocationDirection polar) { MGLSphericalPosition position; position.radial = radial; position.azimuthal = azimuthal; position.polar = polar; return position; } /** <%- doc %> */ MGL_EXPORT @interface MGLLight : NSObject <% if (properties.length) { -%> <% for (const property of properties) { -%> /** <%- propertyDoc(property.name, property, type, 'light').wrap(80, 1) %> This property corresponds to the <%- originalPropertyName(property) %> light property in the Mapbox Style Specification. */ @property (nonatomic<% if (property.getter) { %>, getter=<%- objCGetter(property) -%><% } %>) MGLStyleValue<<%- propertyType(property, true) %>> *<%- camelizeWithLeadingLowercase(property.name) %>; <% if (property.transition) { -%> /** The transition affecting any changes to this layer’s `<%- camelizeWithLeadingLowercase(property.name) %>` property. This property corresponds to the `<%- originalPropertyName(property) %>-transition` property in the style JSON file format. */ @property (nonatomic) MGLTransition <%- camelizeWithLeadingLowercase(property.name) %>Transition; <% } -%> <% if (property.original) { -%> @property (nonatomic<% if (!property.required) { %>, null_resettable<% } %>) MGLStyleValue<<%- propertyType(property, true) %>> *<%- camelizeWithLeadingLowercase(originalPropertyName(property)) %> __attribute__((unavailable("Use <%- camelizeWithLeadingLowercase(property.name) %> instead."))); <% } -%> <% } -%> <% } -%> @end NS_ASSUME_NONNULL_END