summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLAttributionInfo_Private.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-12-20 12:41:40 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-12-20 12:41:40 -0800
commita6b1773a44d4ef086eb30967cb041cb64312650a (patch)
treeec293e38c9ec3ef1f32195f0d5071f73b88497ed /platform/darwin/src/MGLAttributionInfo_Private.h
parentdad57df38ef86363da9bff2e62f3fddc5688f0cf (diff)
parente2fde9cc4eff3de5ab2f513d0c24ad5471d147e6 (diff)
downloadqtlocation-mapboxgl-a6b1773a44d4ef086eb30967cb041cb64312650a.tar.gz
Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.5-master
Also reran make style-code and manually discarded anything related to fill extrusion layers.
Diffstat (limited to 'platform/darwin/src/MGLAttributionInfo_Private.h')
-rw-r--r--platform/darwin/src/MGLAttributionInfo_Private.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLAttributionInfo_Private.h b/platform/darwin/src/MGLAttributionInfo_Private.h
new file mode 100644
index 0000000000..c9a428b571
--- /dev/null
+++ b/platform/darwin/src/MGLAttributionInfo_Private.h
@@ -0,0 +1,48 @@
+#import <Foundation/Foundation.h>
+#import <CoreGraphics/CoreGraphics.h>
+#import <CoreLocation/CoreLocation.h>
+
+#import "MGLAttributionInfo.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MGLAttributionInfo (Private)
+
+/**
+ Parses and returns the attribution infos contained in the given HTML source
+ code string.
+
+ @param htmlString The HTML source code to parse.
+ @param fontSize The default text size in points.
+ @param linkColor The default link color.
+ */
++ (NS_ARRAY_OF(MGLAttributionInfo *) *)attributionInfosFromHTMLString:(nullable NSString *)htmlString fontSize:(CGFloat)fontSize linkColor:(nullable MGLColor *)linkColor;
+
++ (NSAttributedString *)attributedStringForAttributionInfos:(NS_ARRAY_OF(MGLAttributionInfo *) *)attributionInfos;
+
+@end
+
+@interface NSMutableArray (MGLAttributionInfoAdditions)
+
+/**
+ Adds the given attribution info object to the receiver as long as it isn’t
+ redundant to any object already in the receiver. Any existing object that is
+ redundant to the given object is replaced by the given object.
+
+ @param info The info object to add to the receiver.
+ @return True if the given info object was added to the receiver.
+ */
+- (void)growArrayByAddingAttributionInfo:(MGLAttributionInfo *)info;
+
+/**
+ Adds each of the given attribution info objects to the receiver as long as it
+ isn’t redundant to any object already in the receiver. Any existing object that
+ is redundant to the given object is replaced by the given object.
+
+ @param infos An array of info objects to add to the receiver.
+ */
+- (void)growArrayByAddingAttributionInfosFromArray:(NS_ARRAY_OF(MGLAttributionInfo *) *)infos;
+
+@end
+
+NS_ASSUME_NONNULL_END