-
Notifications
You must be signed in to change notification settings - Fork 10
/
PSEmojiUtilities.h
141 lines (115 loc) · 5.89 KB
/
PSEmojiUtilities.h
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#import <CoreGraphics/CoreGraphics.h>
#import "Header.h"
#import "PSEmojiType.h"
#define ZWJ @""
#define FE0F @"️"
#define FEMALE @"♀"
#define MALE @"♂"
#define ZWJ2640 @"♀"
#define ZWJ2642 @"♂"
#define ZWJ2640FE0F @"♀️"
#define ZWJ2642FE0F @"♂️"
#define ZWJ27A1FE0F @"➡️"
#define HANDSHAKE @"🤝"
#define HANDSHAKE_JOINER @"🤝"
#define LEFTHAND @"🫱"
#define RIGHTHAND @"🫲"
#define HEART_JOINER @"❤️"
#define HEART_KISS_JOINER @"❤️💋"
#define WOMAN @"👩"
#define MAN @"👨"
#define NEUTRAL @"🧑"
#define FM @"👫"
#define FF @"👭"
#define MM @"👬"
#define NN @"🧑🤝🧑"
#define CATEGORIES_COUNT 9
@interface PSEmojiUtilities : NSObject
@end
@interface PSEmojiUtilities (Emoji)
+ (NSArray <NSString *> *)PeopleEmoji;
+ (NSArray <NSString *> *)NatureEmoji;
+ (NSArray <NSString *> *)FoodAndDrinkEmoji;
+ (NSArray <NSString *> *)CelebrationEmoji;
+ (NSArray <NSString *> *)ActivityEmoji;
+ (NSArray <NSString *> *)TravelAndPlacesEmoji;
+ (NSArray <NSString *> *)ObjectsEmoji;
+ (NSArray <NSString *> *)SymbolsEmoji;
+ (NSArray <NSString *> *)FlagsEmoji;
+ (NSArray <NSString *> *)OtherFlagsEmoji;
+ (NSArray <NSString *> *)DingbatVariantsEmoji;
+ (NSArray <NSString *> *)SkinToneEmoji;
+ (NSArray <NSString *> *)GenderEmoji;
+ (NSArray <NSString *> *)NoneVariantEmoji;
+ (NSArray <NSString *> *)ProfessionEmoji;
+ (NSArray <NSString *> *)PrepolulatedEmoji;
+ (NSArray <NSString *> *)PrepopulatedEmoji;
+ (NSArray <NSString *> *)ProfessionWithoutSkinToneEmoji;
+ (NSArray <NSString *> *)CoupleMultiSkinToneEmoji;
+ (NSArray <NSString *> *)MultiPersonFamilySkinToneEmoji;
+ (NSArray <NSString *> *)ExtendedCoupleMultiSkinToneEmoji;
@end
@interface PSEmojiUtilities (Functions)
+ (NSArray <NSString *> *)skinModifiers;
+ (NSArray <NSString *> *)genderEmojiBaseStringsNeedVariantSelector;
+ (NSArray <NSString *> *)dingbatEmojiBaseStringsNeedVariantSelector;
+ (NSArray <NSArray <NSString *> *> *)coupleSkinToneChooserVariantsForString:(NSString *)emojiString;
+ (NSArray <NSArray <NSString *> *> *)skinToneChooserVariantsForString:(NSString *)emojiString;
+ (NSArray <NSArray <NSString *> *> *)skinToneChooserVariantsForString:(NSString *)emojiString usesSilhouetteSpecifiers:(BOOL)silhouette;
+ (NSArray <NSArray <NSString *> *> *)skinToneChooserVariantsForHandHoldingCoupleType:(PSEmojiMultiSkinType)coupleType;
+ (NSArray <NSArray <NSString *> *> *)skinToneChooserArraysForCoupleType:(PSEmojiMultiSkinType)multiSkinType joiner:(NSString *)joiner;
+ (UChar32)firstLongCharacter:(NSString *)string;
+ (NSString *)getGender:(NSString *)emojiString;
+ (NSString *)getSkin:(NSString *)emojiString;
+ (NSString *)changeEmojiSkin:(NSString *)emojiString toSkin:(NSString *)skin;
+ (NSString *)emojiBaseFirstCharacterString:(NSString *)emojiString;
+ (NSString *)professionSkinToneEmojiBaseKey:(NSString *)emojiString;
+ (NSString *)emojiBaseString:(NSString *)emojiString;
+ (NSString *)skinToneSpecifierTypeFromEmojiFitzpatrickModifier:(int)modifier;
+ (NSString *)multiPersonStringForString:(NSString *)emojiString skinToneVariantSpecifier:(NSArray <NSString *> *)specifier;
+ (NSString *)joiningStringForCoupleString:(NSString *)emojiString;
+ (BOOL)genderEmojiBaseStringNeedVariantSelector:(NSString *)emojiBaseString;
+ (BOOL)emojiString:(NSString *)emojiString inGroup:(NSArray <NSString *> *)group;
+ (BOOL)hasSkinToneVariants:(NSString *)emojiString;
+ (BOOL)hasGender:(NSString *)emojiString;
+ (BOOL)hasSkin:(NSString *)emojiString;
+ (BOOL)hasDingbat:(NSString *)emojiString;
+ (BOOL)isNoneVariantEmoji:(NSString *)emojiString;
+ (BOOL)isSkinToneEmoji:(NSString *)emojiString;
+ (BOOL)isGenderEmoji:(NSString *)emojiString;
+ (BOOL)isProfessionEmoji:(NSString *)emojiString;
+ (BOOL)isFlagEmoji:(NSString *)emojiString;
+ (BOOL)isDingbatVariantsEmoji:(NSString *)emojiString;
+ (BOOL)isCoupleMultiSkinToneEmoji:(NSString *)emojiString;
+ (BOOL)isComposedCoupleMultiSkinToneEmoji:(NSString *)emojiString;
+ (BOOL)isHandholingCoupleEmoji:(NSString *)emojiString;
+ (BOOL)isBaseHandshakeOrHandshakeWithSkintonesEmoji:(NSString *)emojiString;
+ (BOOL)isMultiPersonFamilySkinToneEmoji:(NSString *)emojiString;
+ (BOOL)supportsCoupleSkinToneSelection:(NSString *)emojiString;
+ (PSEmojiMultiSkinType)multiPersonTypeForString:(NSString *)emojiString;
+ (NSUInteger)hasVariantsForEmoji:(NSString *)emojiString;
+ (NSArray <NSString *> *)tokenizedMultiPersonFromString:(NSString *)emojiString;
+ (NSArray <NSString *> *)tokenizedHandshakeFromString:(NSString *)emojiString;
+ (NSArray <NSString *> *)skinToneSpecifiersForString:(NSString *)emojiString;
+ (NSMutableArray <NSString *> *)skinToneVariantsForCouple:(PSEmojiMultiSkinType)multiSkinType joiner:(NSString *)joiner;
+ (NSMutableArray <NSString *> *)skinToneVariantsForString:(NSString *)emojiString;
+ (NSMutableArray <NSString *> *)skinToneVariantsForString:(NSString *)emojiString withSelf:(BOOL)withSelf;
#if TARGET_OS_IOS
#if !__arm64e__
+ (NSString *)overrideKBTreeEmoji:(NSString *)emojiString;
+ (BOOL)sectionHasSkin:(NSInteger)section;
+ (UIKeyboardEmojiCollectionViewCell *)collectionView:(UICollectionView *)collectionView_ cellForItemAtIndexPath:(NSIndexPath *)indexPath inputView:(UIKeyboardEmojiCollectionInputView *)inputView;
+ (UIKeyboardEmojiCategory *)prepopulatedCategory;
+ (UIKeyboardEmoji *)emojiWithString:(NSString *)emojiString;
+ (UIKeyboardEmoji *)emojiWithString:(NSString *)emojiString withVariantMask:(NSInteger)variantMask;
+ (UIKeyboardEmoji *)emojiWithStringUniversal:(NSString *)emojiString;
+ (void)addEmoji:(NSMutableArray <UIKeyboardEmoji *> *)emojiArray emojiString:(NSString *)emojiString withVariantMask:(NSInteger)variantMask;
+ (void)addEmoji:(NSMutableArray <UIKeyboardEmoji *> *)emojiArray emojiString:(NSString *)emojiString;
#endif
+ (void)resetEmojiPreferences;
#if !__LP64__
+ (CGGlyph)emojiGlyphShift:(CGGlyph)glyph;
#endif
#endif
@end
#define SoftPSEmojiUtilities NSClassFromString(@"PSEmojiUtilities")