forked from opa334/CCSupport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CCSupport.h
118 lines (93 loc) · 3.92 KB
/
CCSupport.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
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <Preferences/PSListController.h>
#import <ControlCenterUI/CCUIModuleSettings.h>
#import <ControlCenterUI/CCUIModuleInstance.h>
#import <ControlCenterUI/CCUIModuleInstanceManager.h>
#import <ControlCenterUI/CCUIModuleCollectionViewController.h>
#import <ControlCenterUI/CCUIModularControlCenterViewController.h>
#import <ControlCenterUI/CCUIModuleSettingsManager.h>
#import <ControlCenterUI/CCUIContentModuleContainerViewController.h>
#import <ControlCenterServices/CCSModuleMetadata.h>
#import <ControlCenterServices/CCSModuleRepository.h>
#import <ControlCenterServices/CCSModuleSettingsProvider.h>
#import <ControlCenterUIKit/CCUIContentModuleContext.h>
#import <ControlCenterUIKit/CCUIContentModule.h>
#import "CCSModuleProvider.h"
#if defined __cplusplus
extern "C" {
#endif
CGImageRef LICreateIconForImage(CGImageRef image, int variant, int precomposed);
#if defined __cplusplus
};
#endif
enum
{
CCOrientationPortrait = 0,
CCOrientationLandscape = 1
};
@protocol DynamicSizeModule
@optional
- (CCUILayoutSize)moduleSizeForOrientation:(int)orientation;
@end
@interface CCUIModuleInstanceManager (CCSupport)
- (CCUIModuleInstance *)instanceForModuleIdentifier:(NSString *)moduleIdentifier;
@end
@interface CCUIModuleSettings (CCSupport)
@property (nonatomic, assign) BOOL ccs_usesDynamicSize;
@end
@interface CCSModuleMetadata (CCSupport)
@property(nonatomic, assign) BOOL ccs_moduleFromProvider;
@end
@interface CCUISettingsModuleDescription : NSObject
- (void)ccs_applyModificationsForIdentifier:(NSString *)identifier displayName:(NSString* *)displayName iconImage:(UIImage* *)iconImage;
@property(readonly, copy, nonatomic) NSString *displayName;
@end
@interface CCSModuleRepository (iOS12Up)
- (void)_queue_updateAllModuleMetadata;
@end
@interface CCSModuleRepository (CCSupport)
- (NSArray *)ccshook_loadAllModuleMetadataWithOrig:(NSArray *)orig;
@end
//CCUISettingsModulesController on iOS 11-13
//CCUISettingsListController on iOS 13
@protocol SettingsControllerSharedAcrossVersions
@property(nonatomic) NSDictionary* ccsp_additionalModuleIcons; //NEW
@property(nonatomic, retain) NSDictionary* preferenceClassForModuleIdentifiers; //NEW
- (void)_repopulateModuleData;
- (id)_identifierAtIndexPath:(id)arg1;
- (UITableView *)ccs_getTableView;
- (void)ccs_unselectSelectedRow;
- (void)ccs_resetButtonPressed;
- (CCUISettingsModuleDescription *)_descriptionForIdentifier:(NSString *)identifier;
@end
@interface CCUISettingsModulesController : UITableViewController <SettingsControllerSharedAcrossVersions>
@end
@interface CCUISettingsListController : PSListController <SettingsControllerSharedAcrossVersions>
@end
@interface SBHomeScreenViewController : UIViewController
@end
@interface CCSModuleProviderManager : NSObject
@property (nonatomic) NSDictionary* moduleProvidersByIdentifier;
@property (nonatomic) NSDictionary* providerToModuleCache;
+ (instancetype)sharedInstance;
- (void)_reloadProviders;
- (void)_populateProviderToModuleCache;
- (NSObject<CCSModuleProvider> *)_moduleProviderForModuleWithIdentifier:(NSString *)moduleIdentifier;
- (CCSModuleMetadata *)_metadataForProvidedModuleWithIdentifier:(NSString *)identifier fromProvider:(NSObject<CCSModuleProvider> *)provider;
- (NSMutableSet *)_allProvidedModuleIdentifiers;
- (BOOL)doesProvideModule:(NSString *)moduleIdentifier;
- (NSMutableArray *)metadataForAllProvidedModules;
- (id)moduleInstanceForModuleIdentifier:(NSString *)identifier;
- (BOOL)providesListControllerForModuleIdentifier:(NSString *)identifier;
- (id)listControllerForModuleIdentifier:(NSString *)identifier;
- (NSString *)displayNameForModuleIdentifier:(NSString *)identifier;
- (UIImage *)settingsIconForModuleIdentifier:(NSString *)identifier;
- (void)reload;
@end
@interface CCSProvidedListController : NSObject //placeholder
@end
@interface NSValue (ControlCenterUI)
+ (NSValue *)ccui_valueWithLayoutSize:(CCUILayoutSize)layoutSize;
- (CCUILayoutSize)ccui_sizeValue;
@end