summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2016-10-14 12:35:47 -0400
committerMinh Nguyễn <mxn@1ec5.org>2016-10-17 11:47:22 -0700
commita1d803f5188c5f440da6019d2917ad4ea6a141b9 (patch)
tree02e05ecbdde605a9da26012808ea60104a6f379c
parent4ff1a736d485fcdb823dad7686973e6b031f079f (diff)
downloadqtlocation-mapboxgl-a1d803f5188c5f440da6019d2917ad4ea6a141b9.tar.gz
[ios, macos] Change runtime styling category method prefix to mgl_
This makes runtime styling category method naming consistent with the rest of the SDK.
-rw-r--r--platform/darwin/src/MGLStyleValue_Private.h4
-rw-r--r--platform/ios/src/MGLMapView.mm4
-rw-r--r--platform/ios/src/UIColor+MGLAdditions.h6
-rw-r--r--platform/ios/src/UIColor+MGLAdditions.mm8
-rw-r--r--platform/macos/src/MGLMapView.mm4
-rw-r--r--platform/macos/src/NSColor+MGLAdditions.h6
-rw-r--r--platform/macos/src/NSColor+MGLAdditions.mm8
7 files changed, 20 insertions, 20 deletions
diff --git a/platform/darwin/src/MGLStyleValue_Private.h b/platform/darwin/src/MGLStyleValue_Private.h
index cc3fecec7e..fdad07aafa 100644
--- a/platform/darwin/src/MGLStyleValue_Private.h
+++ b/platform/darwin/src/MGLStyleValue_Private.h
@@ -100,7 +100,7 @@ private:
}
MGLColor *toMGLRawStyleValue(const mbgl::Color mbglStopValue) {
- return [MGLColor mbgl_colorWithColor:mbglStopValue];
+ return [MGLColor mgl_colorWithColor:mbglStopValue];
}
ObjCType toMGLRawStyleValue(const std::vector<MBGLElement> &mbglStopValue) {
@@ -142,7 +142,7 @@ private:
}
void getMBGLValue(MGLColor *rawValue, mbgl::Color &mbglValue) {
- mbglValue = rawValue.mbgl_color;
+ mbglValue = rawValue.mgl_color;
}
void getMBGLValue(ObjCType rawValue, std::vector<MBGLElement> &mbglValue) {
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 06a7684f38..88f4d8a970 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -3080,7 +3080,7 @@ public:
UIColor *color = (_delegateHasStrokeColorsForShapeAnnotations
? [self.delegate mapView:self strokeColorForShapeAnnotation:annotation]
: self.tintColor);
- return color.mbgl_color;
+ return color.mgl_color;
}
- (mbgl::Color)fillColorForPolygonAnnotation:(MGLPolygon *)annotation
@@ -3088,7 +3088,7 @@ public:
UIColor *color = (_delegateHasFillColorsForShapeAnnotations
? [self.delegate mapView:self fillColorForPolygonAnnotation:annotation]
: self.tintColor);
- return color.mbgl_color;
+ return color.mgl_color;
}
- (CGFloat)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation
diff --git a/platform/ios/src/UIColor+MGLAdditions.h b/platform/ios/src/UIColor+MGLAdditions.h
index 7cc291c657..ea415d9db9 100644
--- a/platform/ios/src/UIColor+MGLAdditions.h
+++ b/platform/ios/src/UIColor+MGLAdditions.h
@@ -5,10 +5,10 @@
@interface UIColor (MGLAdditions)
-- (mbgl::Color)mbgl_color;
+- (mbgl::Color)mgl_color;
-- (mbgl::style::PropertyValue<mbgl::Color>)mbgl_colorPropertyValue;
+- (mbgl::style::PropertyValue<mbgl::Color>)mgl_colorPropertyValue;
-+ (UIColor *)mbgl_colorWithColor:(mbgl::Color)color;
++ (UIColor *)mgl_colorWithColor:(mbgl::Color)color;
@end
diff --git a/platform/ios/src/UIColor+MGLAdditions.mm b/platform/ios/src/UIColor+MGLAdditions.mm
index 52ec84ac84..41c066c206 100644
--- a/platform/ios/src/UIColor+MGLAdditions.mm
+++ b/platform/ios/src/UIColor+MGLAdditions.mm
@@ -2,20 +2,20 @@
@implementation UIColor (MGLAdditions)
-- (mbgl::Color)mbgl_color
+- (mbgl::Color)mgl_color
{
CGFloat r, g, b, a;
[self getRed:&r green:&g blue:&b alpha:&a];
return { (float)r, (float)g, (float)b, (float)a };
}
-- (mbgl::style::PropertyValue<mbgl::Color>)mbgl_colorPropertyValue
+- (mbgl::style::PropertyValue<mbgl::Color>)mgl_colorPropertyValue
{
- mbgl::Color color = self.mbgl_color;
+ mbgl::Color color = self.mgl_color;
return {{ color.r, color.g, color.b, color.a }};
}
-+ (UIColor *)mbgl_colorWithColor:(mbgl::Color)color
++ (UIColor *)mgl_colorWithColor:(mbgl::Color)color
{
return [UIColor colorWithRed:color.r green:color.g blue:color.b alpha:color.a];
}
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm
index bd03af509d..a8f91a24e7 100644
--- a/platform/macos/src/MGLMapView.mm
+++ b/platform/macos/src/MGLMapView.mm
@@ -2183,14 +2183,14 @@ public:
NSColor *color = (_delegateHasStrokeColorsForShapeAnnotations
? [self.delegate mapView:self strokeColorForShapeAnnotation:annotation]
: [NSColor selectedMenuItemColor]);
- return color.mbgl_color;
+ return color.mgl_color;
}
- (mbgl::Color)fillColorForPolygonAnnotation:(MGLPolygon *)annotation {
NSColor *color = (_delegateHasFillColorsForShapeAnnotations
? [self.delegate mapView:self fillColorForPolygonAnnotation:annotation]
: [NSColor selectedMenuItemColor]);
- return color.mbgl_color;
+ return color.mgl_color;
}
- (CGFloat)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation {
diff --git a/platform/macos/src/NSColor+MGLAdditions.h b/platform/macos/src/NSColor+MGLAdditions.h
index 2ba38f7d90..8dd8c1c17c 100644
--- a/platform/macos/src/NSColor+MGLAdditions.h
+++ b/platform/macos/src/NSColor+MGLAdditions.h
@@ -8,13 +8,13 @@
/**
Converts the color into an mbgl::Color in calibrated RGB space.
*/
-- (mbgl::Color)mbgl_color;
+- (mbgl::Color)mgl_color;
/**
Instantiates `NSColor` from an `mbgl::Color`
*/
-+ (NSColor *)mbgl_colorWithColor:(mbgl::Color)color;
++ (NSColor *)mgl_colorWithColor:(mbgl::Color)color;
-- (mbgl::style::PropertyValue<mbgl::Color>)mbgl_colorPropertyValue;
+- (mbgl::style::PropertyValue<mbgl::Color>)mgl_colorPropertyValue;
@end
diff --git a/platform/macos/src/NSColor+MGLAdditions.mm b/platform/macos/src/NSColor+MGLAdditions.mm
index a75dc488fd..e347fd1798 100644
--- a/platform/macos/src/NSColor+MGLAdditions.mm
+++ b/platform/macos/src/NSColor+MGLAdditions.mm
@@ -2,7 +2,7 @@
@implementation NSColor (MGLAdditions)
-- (mbgl::Color)mbgl_color
+- (mbgl::Color)mgl_color
{
CGFloat r, g, b, a;
@@ -11,14 +11,14 @@
return { (float)r, (float)g, (float)b, (float)a };
}
-+ (NSColor *)mbgl_colorWithColor:(mbgl::Color)color
++ (NSColor *)mgl_colorWithColor:(mbgl::Color)color
{
return [NSColor colorWithRed:color.r green:color.g blue:color.b alpha:color.a];
}
-- (mbgl::style::PropertyValue<mbgl::Color>)mbgl_colorPropertyValue
+- (mbgl::style::PropertyValue<mbgl::Color>)mgl_colorPropertyValue
{
- mbgl::Color color = self.mbgl_color;
+ mbgl::Color color = self.mgl_color;
return {{ color.r, color.g, color.b, color.a }};
}