summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleValue.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLStyleValue.h')
-rw-r--r--platform/darwin/src/MGLStyleValue.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLStyleValue.h b/platform/darwin/src/MGLStyleValue.h
new file mode 100644
index 0000000000..1f19a5e028
--- /dev/null
+++ b/platform/darwin/src/MGLStyleValue.h
@@ -0,0 +1,32 @@
+#import <Foundation/Foundation.h>
+#import <CoreGraphics/CoreGraphics.h>
+
+@interface MGLStyleValue<T> : NSObject
+
++ (instancetype)valueWithRawValue:(T)rawValue;
++ (instancetype)valueWithBase:(CGFloat)base stops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;
++ (instancetype)valueWithStops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;
+
+@end
+
+@interface MGLStyleConstantValue<T> : MGLStyleValue
+
++ (instancetype)valueWithRawValue:(T)rawValue;
+
+- (instancetype)initWithRawValue:(T)rawValue;
+
+@property (nonatomic) T rawValue;
+
+@end
+
+@interface MGLStyleFunction<T> : MGLStyleValue
+
++ (instancetype)functionWithBase:(CGFloat)base stops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;
++ (instancetype)functionWithStops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;
+
+- (instancetype)initWithBase:(CGFloat)base stops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;
+
+@property (nonatomic) CGFloat base;
+@property (nonatomic, copy) NSDictionary<NSNumber *, MGLStyleValue<T> *> *stops;
+
+@end