Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
BasedOnStyle: WebKit

PointerAlignment: Right
DerivePointerAlignment: false

SpaceAfterCStyleCast: false
SpaceBeforeParens: ControlStatements
SpacesInParentheses: false
SpacesInAngles: false
SpacesInSquareBrackets: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpaceInEmptyParentheses: false
SpaceInEmptyBlock: true

SortIncludes: false
ColumnLimit: 0
UseTab: Never

ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false

BraceWrapping:
AfterClass: false
AfterStruct: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
BeforeElse: false
BeforeCatch: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true

PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60

IncludeCategories:
- Regex: '^"config\.h"'
Priority: -1
- Regex: '^<.*SoftLink.h>'
Priority: 1
8 changes: 4 additions & 4 deletions AddressBookUI/ABMonogrammer.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#import <UIKit/UIImage.h>

typedef NS_ENUM(NSUInteger, ABMonogrammerStyle) {
ABMonogrammerStyleLightGray,
ABMonogrammerStyleWhite,
ABMonogrammerStyleDarkGraySemitransparent,
ABMonogrammerStyleLightGraySemitransparent,
ABMonogrammerStyleLightGray,
ABMonogrammerStyleWhite,
ABMonogrammerStyleDarkGraySemitransparent,
ABMonogrammerStyleLightGraySemitransparent,
};

/* Removed in iOS 11
Expand Down
2 changes: 1 addition & 1 deletion AlienBlue/AlienBlueAppDelegate.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import <UIKit/UIApplication.h>
#import <UIKit/UIWindow.h>

@interface AlienBlueAppDelegate : NSObject <UIApplicationDelegate>
@interface AlienBlueAppDelegate : NSObject<UIApplicationDelegate>

@property (nonatomic, retain) UIWindow *window;

Expand Down
2 changes: 1 addition & 1 deletion Anemone/ANEMSettingsManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

+ (instancetype)sharedManager;

@property (nonatomic, retain, readonly) NSArray <NSString *> *themeSettings;
@property (nonatomic, retain, readonly) NSArray<NSString *> *themeSettings;

@end
8 changes: 4 additions & 4 deletions AppList/ALApplicationList.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#import <libkern/OSAtomic.h>

enum {
ALApplicationIconSizeSmall = 29,
ALApplicationIconSizeLarge = 59
ALApplicationIconSizeSmall = 29,
ALApplicationIconSizeLarge = 59
};
typedef NSUInteger ALApplicationIconSize;

@interface ALApplicationList : NSObject {
@private
NSMutableDictionary *cachedIcons;
OSSpinLock spinLock;
NSMutableDictionary *cachedIcons;
OSSpinLock spinLock;
}
+ (ALApplicationList *)sharedApplicationList;

Expand Down
10 changes: 5 additions & 5 deletions AppList/ALApplicationTableDataSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

@class ALApplicationList;

@interface ALApplicationTableDataSource : NSObject <UITableViewDataSource> {
@interface ALApplicationTableDataSource : NSObject<UITableViewDataSource> {
@private
NSMutableArray *_sectionDescriptors;
UITableView *_tableView;
NSBundle *_localizationBundle;
BOOL _loadsAsynchronously;
NSMutableArray *_sectionDescriptors;
UITableView *_tableView;
NSBundle *_localizationBundle;
BOOL _loadsAsynchronously;
}

+ (NSArray *)standardSectionDescriptors;
Expand Down
7 changes: 3 additions & 4 deletions AppList/ALValueCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@interface ALValueCell : UITableViewCell {
@private
id<ALValueCellDelegate> delegate;
id<ALValueCellDelegate> delegate;
}

@property (nonatomic, assign) id<ALValueCellDelegate> delegate;
Expand All @@ -16,14 +16,14 @@

@end

@protocol ALValueCellDelegate <NSObject>
@protocol ALValueCellDelegate<NSObject>
@required
- (void)valueCell:(ALValueCell *)valueCell didChangeToValue:(id)newValue;
@end

@interface ALSwitchCell : ALValueCell {
@private
UISwitch *switchView;
UISwitch *switchView;
}

@property (nonatomic, readonly) UISwitch *switchView;
Expand All @@ -37,4 +37,3 @@
@interface ALDisclosureIndicatedCell : ALValueCell

@end

8 changes: 4 additions & 4 deletions ApplePushService/APSMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#import <Foundation/NSString.h>
#import <Foundation/NSObjCRuntime.h>

@interface APSMessage : NSObject <NSCoding>
@interface APSMessage : NSObject<NSCoding>

- (id)initWithDictionary:(NSDictionary *)dictionary;
- (id)initWithDictionary:(NSDictionary *)dictionary xpcMessage:(id)xpcMessage;
Expand All @@ -13,8 +13,8 @@
@property (nonatomic, retain) NSString *topic;
@property (nonatomic, retain) NSDictionary *userInfo;

- (NSDictionary <NSString *, id> *)dictionaryRepresentation;
- (id <NSCoding>)objectForKey:(NSString *)key;
- (void)setObject:(id <NSCoding>)object forKey:(NSString *)key;
- (NSDictionary<NSString *, id> *)dictionaryRepresentation;
- (id<NSCoding>)objectForKey:(NSString *)key;
- (void)setObject:(id<NSCoding>)object forKey:(NSString *)key;

@end
106 changes: 53 additions & 53 deletions AssertionServices/BKSProcessAssertion.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,64 @@
#import <Foundation/NSString.h>

#define kBKSBackgroundModeUnboundedTaskCompletion @"unboundedTaskCompletion"
#define kBKSBackgroundModeContinuous @"continuous"
#define kBKSBackgroundModeFetch @"fetch"
#define kBKSBackgroundModeRemoteNotification @"remote-notification"
#define kBKSBackgroundModeExternalAccessory @"external-accessory"
#define kBKSBackgroundModeVoIP @"voip"
#define kBKSBackgroundModeLocation @"location"
#define kBKSBackgroundModeAudio @"audio"
#define kBKSBackgroundModeBluetoothCentral @"bluetooth-central"
#define kBKSBackgroundModeBluetoothPeripheral @"bluetooth-peripheral"
#define kBKSBackgroundModeContinuous @"continuous"
#define kBKSBackgroundModeFetch @"fetch"
#define kBKSBackgroundModeRemoteNotification @"remote-notification"
#define kBKSBackgroundModeExternalAccessory @"external-accessory"
#define kBKSBackgroundModeVoIP @"voip"
#define kBKSBackgroundModeLocation @"location"
#define kBKSBackgroundModeAudio @"audio"
#define kBKSBackgroundModeBluetoothCentral @"bluetooth-central"
#define kBKSBackgroundModeBluetoothPeripheral @"bluetooth-peripheral"

typedef NS_ENUM(NSUInteger, BKSProcessAssertionReason) {
BKSProcessAssertionReasonNone = 0,
BKSProcessAssertionReasonAudio = 1,
BKSProcessAssertionReasonLocation = 2,
BKSProcessAssertionReasonExternalAccessory = 3,
BKSProcessAssertionReasonFinishTask = 4,
BKSProcessAssertionReasonBluetooth = 5,
BKSProcessAssertionReasonNetworkAuthentication = 6,
BKSProcessAssertionReasonBackgroundUI = 7,
BKSProcessAssertionReasonInterAppAudioStreaming = 8,
BKSProcessAssertionReasonViewServices = 9,
BKSProcessAssertionReasonNewsstandDownload = 10,
BKSProcessAssertionReasonBackgroundDownload = 11,
BKSProcessAssertionReasonVOiP = 12,
BKSProcessAssertionReasonExtension = 13,
BKSProcessAssertionReasonContinuityStreams = 14,
BKSProcessAssertionReasonHealthKit = 15,
BKSProcessAssertionReasonWatchConnectivity = 16,
BKSProcessAssertionReasonSnapshot = 17,
BKSProcessAssertionReasonComplicationUpdate = 18,
BKSProcessAssertionReasonWorkoutProcessing = 19,
BKSProcessAssertionReasonComplicationPushUpdate = 20,
// 21-9999 unknown
BKSProcessAssertionReasonActivation = 10000,
BKSProcessAssertionReasonSuspend = 10001,
BKSProcessAssertionReasonTransientWakeup = 10002,
BKSProcessAssertionReasonVOiP_PreiOS8 = 10003,
BKSProcessAssertionReasonPeriodicTask_iOS8 = BKSProcessAssertionReasonVOiP_PreiOS8,
BKSProcessAssertionReasonFinishTaskUnbounded = 10004,
BKSProcessAssertionReasonContinuous = 10005,
BKSProcessAssertionReasonBackgroundContentFetching = 10006,
BKSProcessAssertionReasonNotificationAction = 10007,
BKSProcessAssertionReasonPIP = 10008,
// 10009-49999 unknown
BKSProcessAssertionReasonFinishTaskAfterBackgroundContentFetching = 50000,
BKSProcessAssertionReasonFinishTaskAfterBackgroundDownload = 50001,
BKSProcessAssertionReasonFinishTaskAfterPeriodicTask = 50002,
BKSProcessAssertionReasonAfterNoficationAction = 50003,
BKSProcessAssertionReasonFinishTaskAfterWatchConnectivity = 50004,
// 50005+ unknown
BKSProcessAssertionReasonNone = 0,
BKSProcessAssertionReasonAudio = 1,
BKSProcessAssertionReasonLocation = 2,
BKSProcessAssertionReasonExternalAccessory = 3,
BKSProcessAssertionReasonFinishTask = 4,
BKSProcessAssertionReasonBluetooth = 5,
BKSProcessAssertionReasonNetworkAuthentication = 6,
BKSProcessAssertionReasonBackgroundUI = 7,
BKSProcessAssertionReasonInterAppAudioStreaming = 8,
BKSProcessAssertionReasonViewServices = 9,
BKSProcessAssertionReasonNewsstandDownload = 10,
BKSProcessAssertionReasonBackgroundDownload = 11,
BKSProcessAssertionReasonVOiP = 12,
BKSProcessAssertionReasonExtension = 13,
BKSProcessAssertionReasonContinuityStreams = 14,
BKSProcessAssertionReasonHealthKit = 15,
BKSProcessAssertionReasonWatchConnectivity = 16,
BKSProcessAssertionReasonSnapshot = 17,
BKSProcessAssertionReasonComplicationUpdate = 18,
BKSProcessAssertionReasonWorkoutProcessing = 19,
BKSProcessAssertionReasonComplicationPushUpdate = 20,
// 21-9999 unknown
BKSProcessAssertionReasonActivation = 10000,
BKSProcessAssertionReasonSuspend = 10001,
BKSProcessAssertionReasonTransientWakeup = 10002,
BKSProcessAssertionReasonVOiP_PreiOS8 = 10003,
BKSProcessAssertionReasonPeriodicTask_iOS8 = BKSProcessAssertionReasonVOiP_PreiOS8,
BKSProcessAssertionReasonFinishTaskUnbounded = 10004,
BKSProcessAssertionReasonContinuous = 10005,
BKSProcessAssertionReasonBackgroundContentFetching = 10006,
BKSProcessAssertionReasonNotificationAction = 10007,
BKSProcessAssertionReasonPIP = 10008,
// 10009-49999 unknown
BKSProcessAssertionReasonFinishTaskAfterBackgroundContentFetching = 50000,
BKSProcessAssertionReasonFinishTaskAfterBackgroundDownload = 50001,
BKSProcessAssertionReasonFinishTaskAfterPeriodicTask = 50002,
BKSProcessAssertionReasonAfterNoficationAction = 50003,
BKSProcessAssertionReasonFinishTaskAfterWatchConnectivity = 50004,
// 50005+ unknown
};

typedef NS_ENUM(NSUInteger, ProcessAssertionFlags) {
BKSProcessAssertionFlagNone = 0,
BKSProcessAssertionFlagPreventSuspend = 1 << 0,
BKSProcessAssertionFlagPreventThrottleDownCPU = 1 << 1,
BKSProcessAssertionFlagAllowIdleSleep = 1 << 2,
BKSProcessAssertionFlagWantsForegroundResourcePriority = 1 << 3
BKSProcessAssertionFlagNone = 0,
BKSProcessAssertionFlagPreventSuspend = 1 << 0,
BKSProcessAssertionFlagPreventThrottleDownCPU = 1 << 1,
BKSProcessAssertionFlagAllowIdleSleep = 1 << 2,
BKSProcessAssertionFlagWantsForegroundResourcePriority = 1 << 3
};

@interface BKSProcessAssertion : NSObject
Expand Down
Loading