summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLOpenGLStyleLayer.h
blob: ad854eac4da9b3db22784d076a86d5e5f2936dec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

#import "MGLFoundation.h"
#import "MGLStyleValue.h"
#import "MGLStyleLayer.h"

NS_ASSUME_NONNULL_BEGIN

@class MGLMapView;
@class MGLStyle;

@class MGLOpenGLStyleLayer;

MGL_EXPORT
@interface MGLOpenGLStyleLayerRetainer: NSObject
@property (nonatomic, weak, readonly) MGLOpenGLStyleLayer *layer;
@property (nonatomic, assign, readonly) NSInteger layerRetainCount;
@property (nonatomic, unsafe_unretained, nullable) void *owner;
- (instancetype)initWithLayer:(MGLStyleLayer*)styleLayer;
- (void)retainLayer;
- (void)releaseLayer;
@end




typedef struct MGLStyleLayerDrawingContext {
    CGSize size;
    CLLocationCoordinate2D centerCoordinate;
    double zoomLevel;
    CLLocationDirection direction;
    CGFloat pitch;
    CGFloat fieldOfView;
} MGLStyleLayerDrawingContext;

MGL_EXPORT
@interface MGLOpenGLStyleLayer : MGLStyleLayer
@property (nonatomic, weak, readonly) MGLStyle *style;

- (BOOL)isBeingManaged;

- (instancetype)initWithIdentifier:(NSString *)identifier;

- (void)didMoveToMapView:(MGLMapView *)mapView;

- (void)willMoveFromMapView:(MGLMapView *)mapView;

- (void)drawInMapView:(MGLMapView *)mapView withContext:(MGLStyleLayerDrawingContext)context;

- (void)setNeedsDisplay;

@end

NS_ASSUME_NONNULL_END