├── .gitignore ├── Examples └── Circles │ ├── Circles.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── Circles │ ├── Common │ ├── CirclesView.swift │ └── ViewController.swift │ ├── Mac │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── 128x128.png │ │ │ ├── 16x16.png │ │ │ ├── 256x256-1.png │ │ │ ├── 256x256.png │ │ │ ├── 32x32-1.png │ │ │ ├── 32x32.png │ │ │ ├── 512x512.png │ │ │ ├── 64x64.png │ │ │ └── Contents.json │ ├── Base.lproj │ │ └── Main.storyboard │ └── Info.plist │ └── iOS │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon-40@2x.png │ │ ├── icon-40@3x.png │ │ ├── icon-60@2x.png │ │ └── icon-60@3x.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ └── Info.plist ├── HISTORY.md ├── LICENSE ├── MAIKit.podspec ├── MAIKit ├── MAIKit.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ ├── MAIKit-ios.xcscheme │ │ └── MAIKit-mac.xcscheme └── MAIKit │ ├── Info.plist │ ├── MAIAccessibilityElement.h │ ├── MAIAccessibilityElement.m │ ├── MAIApplication.h │ ├── MAIApplication.m │ ├── MAIApplicationDelegate.h │ ├── MAIBezierPath.h │ ├── MAIBezierPath.m │ ├── MAIButton.h │ ├── MAIButton.m │ ├── MAICollectionView.h │ ├── MAICollectionView.m │ ├── MAICollectionViewDataSource.h │ ├── MAICollectionViewDelegate.h │ ├── MAICollectionViewDelegateFlowLayout.h │ ├── MAICollectionViewFlowLayout.h │ ├── MAICollectionViewFlowLayout.m │ ├── MAICollectionViewFlowLayoutInvalidationContext.h │ ├── MAICollectionViewFlowLayoutInvalidationContext.m │ ├── MAICollectionViewLayout.h │ ├── MAICollectionViewLayout.m │ ├── MAICollectionViewLayoutAttributes.h │ ├── MAICollectionViewLayoutAttributes.m │ ├── MAICollectionViewLayoutInvalidationContext.h │ ├── MAICollectionViewLayoutInvalidationContext.m │ ├── MAICollectionViewTransitionLayout.h │ ├── MAICollectionViewTransitionLayout.m │ ├── MAICollectionViewUpdateItem.h │ ├── MAICollectionViewUpdateItem.m │ ├── MAIColor.h │ ├── MAIColor.m │ ├── MAIControl.h │ ├── MAIControl.m │ ├── MAIDataAsset.h │ ├── MAIDataAsset.m │ ├── MAIDatePicker.h │ ├── MAIDatePicker.m │ ├── MAIDeclarations.h │ ├── MAIDocument.h │ ├── MAIDocument.m │ ├── MAIEnums.h │ ├── MAIEvent.h │ ├── MAIEvent.m │ ├── MAIFont.h │ ├── MAIFont.m │ ├── MAIFontDescriptor.h │ ├── MAIFontDescriptor.m │ ├── MAIGestureRecognizer.h │ ├── MAIGestureRecognizer.m │ ├── MAIGestureRecognizerDelegate.h │ ├── MAIImage.h │ ├── MAIImage.m │ ├── MAIImageView.h │ ├── MAIImageView.m │ ├── MAIKit.h │ ├── MAILayoutConstraint.h │ ├── MAILayoutConstraint.m │ ├── MAILayoutDimension.h │ ├── MAILayoutDimension.m │ ├── MAILayoutGuide.h │ ├── MAILayoutGuide.m │ ├── MAILayoutManager.h │ ├── MAILayoutManager.m │ ├── MAILayoutManagerDelegate.h │ ├── MAILayoutXAxisAnchor.h │ ├── MAILayoutXAxisAnchor.m │ ├── MAILayoutYAxisAnchor.h │ ├── MAILayoutYAxisAnchor.m │ ├── MAIMenuItem.h │ ├── MAIMenuItem.m │ ├── MAIMutableParagraphStyle.h │ ├── MAIMutableParagraphStyle.m │ ├── MAINib.h │ ├── MAINib.m │ ├── MAIPanGestureRecognizer.h │ ├── MAIPanGestureRecognizer.m │ ├── MAIParagraphStyle.h │ ├── MAIParagraphStyle.m │ ├── MAIPasteboard.h │ ├── MAIPasteboard.m │ ├── MAIPrintInfo.h │ ├── MAIPrintInfo.m │ ├── MAIPrinter.h │ ├── MAIPrinter.m │ ├── MAIResponder.h │ ├── MAIResponder.m │ ├── MAIRotationGestureRecognizer.h │ ├── MAIRotationGestureRecognizer.m │ ├── MAIScreen.h │ ├── MAIScreen.m │ ├── MAIScrollView.h │ ├── MAIScrollView.m │ ├── MAISegmentedControl.h │ ├── MAISegmentedControl.m │ ├── MAIShadow.h │ ├── MAIShadow.m │ ├── MAISlider.h │ ├── MAISlider.m │ ├── MAISplitViewController.h │ ├── MAISplitViewController.m │ ├── MAIStackView.h │ ├── MAIStackView.m │ ├── MAIStepper.h │ ├── MAIStepper.m │ ├── MAIStoryboard.h │ ├── MAIStoryboard.m │ ├── MAIStoryboardSegue.h │ ├── MAIStoryboardSegue.m │ ├── MAIStringDrawingContext.h │ ├── MAIStringDrawingContext.m │ ├── MAITableView.h │ ├── MAITableView.m │ ├── MAITableViewDataSource.h │ ├── MAITableViewDelegate.h │ ├── MAITableViewRowAction.h │ ├── MAITableViewRowAction.m │ ├── MAITextAttachment.h │ ├── MAITextAttachment.m │ ├── MAITextAttachmentContainer.h │ ├── MAITextContainer.h │ ├── MAITextContainer.m │ ├── MAITextField.h │ ├── MAITextField.m │ ├── MAITextFieldDelegate.h │ ├── MAITextInput.h │ ├── MAITextLayoutOrientationProvider.h │ ├── MAITextStorage.h │ ├── MAITextStorage.m │ ├── MAITextStorageDelegate.h │ ├── MAITextTab.h │ ├── MAITextTab.m │ ├── MAITextView.h │ ├── MAITextView.m │ ├── MAITextViewDelegate.h │ ├── MAIToolbar.h │ ├── MAIToolbar.m │ ├── MAIToolbarDelegate.h │ ├── MAITouch.h │ ├── MAITouch.m │ ├── MAIView.h │ ├── MAIView.m │ ├── MAIViewController.h │ ├── MAIViewController.m │ ├── MAIVisualEffectView.h │ ├── MAIVisualEffectView.m │ ├── MAIWindow.h │ └── MAIWindow.m └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | # 3 | *.DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # CocoaPods 25 | # 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Pods/ 31 | 32 | # Carthage 33 | # 34 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 35 | # Carthage/Checkouts 36 | 37 | Carthage/Build 38 | -------------------------------------------------------------------------------- /Examples/Circles/Circles.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Circles/Circles/Common/CirclesView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CirclesView.swift 3 | // Circles 4 | // 5 | // Created by Buckley on 7/9/15. 6 | // Copyright © 2015 Buckleyisms. All rights reserved. 7 | // 8 | 9 | import MAIKit 10 | 11 | var colors = [ 12 | MAIColor.blueColor(), 13 | MAIColor.redColor(), 14 | MAIColor.yellowColor(), 15 | MAIColor.greenColor(), 16 | MAIColor.orangeColor(), 17 | MAIColor.purpleColor() 18 | ] 19 | 20 | struct Circle 21 | { 22 | var center: CGPoint = CGPoint.zero 23 | var radius: CGFloat = 0.0 24 | var color: MAIColorProtocol = MAIColor.blackColor() 25 | } 26 | 27 | class CirclesView: MAIView { 28 | 29 | var circles: [ Circle ] = [] 30 | var currentCircle = Circle() 31 | var dragging = false 32 | 33 | override func draw(_ dirtyRect: CGRect) { 34 | super.draw(dirtyRect) 35 | 36 | #if os(OSX) 37 | MAIColor.blackColor().set() 38 | NSRectFill(self.bounds) 39 | #endif 40 | 41 | #if os(iOS) 42 | let context = UIGraphicsGetCurrentContext(); 43 | #else 44 | let context = NSGraphicsContext.current()?.cgContext 45 | #endif 46 | 47 | context!.saveGState(); 48 | 49 | for circle in self.circles 50 | { 51 | context!.setFillColor(circle.color.cgColor); 52 | 53 | context!.addArc(centerX: circle.center.x, 54 | y: circle.center.y, 55 | radius: circle.radius, 56 | startAngle: CGFloat(0.0), 57 | endAngle: CGFloat(M_PI * 2), 58 | clockwise: 1); 59 | 60 | context!.drawPath(using: .fill); 61 | } 62 | 63 | if self.dragging 64 | { 65 | context!.setFillColor(self.currentCircle.color.cgColor); 66 | 67 | context!.addArc(centerX: self.currentCircle.center.x, 68 | y: self.currentCircle.center.y, 69 | radius: self.currentCircle.radius, 70 | startAngle: CGFloat(0.0), 71 | endAngle: CGFloat(M_PI * 2), 72 | clockwise: 1); 73 | 74 | context!.drawPath(using: .fill); 75 | } 76 | 77 | context!.restoreGState(); 78 | } 79 | 80 | func clear() 81 | { 82 | circles = [] 83 | self.setNeedsDisplay(self.bounds) 84 | } 85 | 86 | func dragStarted(_ point: CGPoint) 87 | { 88 | self.dragging = true 89 | self.currentCircle.center = point 90 | self.currentCircle.radius = 0.0 91 | self.currentCircle.color = colors[self.circles.count % colors.count] 92 | } 93 | 94 | func draggedTo(_ point: CGPoint) 95 | { 96 | if (self.currentCircle.center.x != point.x) 97 | { 98 | self.currentCircle.radius = sqrt( 99 | pow(self.currentCircle.center.y - point.y, 2) + 100 | pow(self.currentCircle.center.x - point.x, 2) 101 | ) 102 | } 103 | 104 | self.setNeedsDisplay(self.bounds) 105 | } 106 | 107 | func dragEnded() 108 | { 109 | self.dragging = false; 110 | self.setNeedsDisplay(self.bounds) 111 | NotificationCenter.default().post(name: "circleDrawn" as NSNotification.Name, object: self); 112 | } 113 | 114 | func saveCurrentCircle() 115 | { 116 | self.circles.append(self.currentCircle) 117 | } 118 | 119 | #if os(iOS) 120 | 121 | override func touchesBegan(_ touches: Set, with event: UIEvent?) 122 | { 123 | self.dragStarted(touches.first!.location(in: self)) 124 | } 125 | 126 | override func touchesMoved(_ touches: Set, with event: UIEvent?) 127 | { 128 | self.draggedTo(touches.first!.location(in: self)) 129 | } 130 | 131 | override func touchesEnded(_ touches: Set, with event: UIEvent?) { 132 | self.saveCurrentCircle() 133 | self.dragEnded() 134 | } 135 | 136 | override func touchesCancelled(_ touches: Set?, with event: UIEvent?) { 137 | self.dragEnded() 138 | } 139 | 140 | #else 141 | 142 | override func mouseDown(_ event: NSEvent?) 143 | { 144 | self.dragStarted(self.convert(event!.locationInWindow, from: nil)) 145 | } 146 | 147 | override func mouseDragged(_ event: NSEvent?) 148 | { 149 | self.draggedTo(self.convert(event!.locationInWindow, from: nil)) 150 | } 151 | 152 | override func mouseUp(_ event: NSEvent?) 153 | { 154 | self.saveCurrentCircle() 155 | self.dragEnded() 156 | } 157 | 158 | #endif 159 | 160 | } 161 | -------------------------------------------------------------------------------- /Examples/Circles/Circles/Common/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Circles 4 | // 5 | // Created by Buckley on 6/14/15. 6 | // Copyright © 2015 Buckleyisms. All rights reserved. 7 | // 8 | 9 | import MAIKit 10 | 11 | class ViewController: MAIViewController { 12 | 13 | weak var circlesView : CirclesView? = nil 14 | @IBOutlet weak var clearButton : MAIButtonProtocol? = nil 15 | 16 | override func viewDidLoad() 17 | { 18 | super.viewDidLoad() 19 | 20 | self.clearButton?.isEnabled = false 21 | 22 | NotificationCenter.default().addObserver( 23 | self, 24 | selector: #selector(ViewController.circleDrawn(_:)), 25 | name: "circleDrawn", 26 | object: nil 27 | ) 28 | } 29 | 30 | @IBAction func clear(_ sender: AnyObject) 31 | { 32 | self.circlesView?.clear() 33 | self.clearButton?.isEnabled = false 34 | } 35 | 36 | @objc func circleDrawn(_ notification: NSNotification?) 37 | { 38 | self.clearButton?.isEnabled = true 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /Examples/Circles/Circles/Mac/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Circles 4 | // 5 | // Created by Buckley on 6/14/15. 6 | // Copyright © 2015 Buckleyisms. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(aNotification: NSNotification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(aNotification: NSNotification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/128x128.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/16x16.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/256x256-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/256x256-1.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/256x256.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/32x32-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/32x32-1.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/32x32.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/512x512.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/64x64.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/Mac/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "16x16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "32x32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "32x32-1.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "64x64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "128x128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "256x256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "256x256-1.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "512x512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "idiom" : "mac", 53 | "size" : "512x512", 54 | "scale" : "1x" 55 | }, 56 | { 57 | "idiom" : "mac", 58 | "size" : "512x512", 59 | "scale" : "2x" 60 | } 61 | ], 62 | "info" : { 63 | "version" : 1, 64 | "author" : "xcode" 65 | } 66 | } -------------------------------------------------------------------------------- /Examples/Circles/Circles/Mac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2015 Buckleyisms. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /Examples/Circles/Circles/iOS/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Circles-ios 4 | // 5 | // Created by Buckley on 7/5/15. 6 | // Copyright © 2015 Buckleyisms. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Examples/Circles/Circles/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "size" : "40x40", 15 | "idiom" : "iphone", 16 | "filename" : "icon-40@2x.png", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "size" : "40x40", 21 | "idiom" : "iphone", 22 | "filename" : "icon-40@3x.png", 23 | "scale" : "3x" 24 | }, 25 | { 26 | "size" : "60x60", 27 | "idiom" : "iphone", 28 | "filename" : "icon-60@2x.png", 29 | "scale" : "2x" 30 | }, 31 | { 32 | "size" : "60x60", 33 | "idiom" : "iphone", 34 | "filename" : "icon-60@3x.png", 35 | "scale" : "3x" 36 | } 37 | ], 38 | "info" : { 39 | "version" : 1, 40 | "author" : "xcode" 41 | } 42 | } -------------------------------------------------------------------------------- /Examples/Circles/Circles/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelBuckley/MAIKit/2788993c45d27298c7a868ba7196d951c05ebc4c/Examples/Circles/Circles/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /Examples/Circles/Circles/iOS/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Examples/Circles/Circles/iOS/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 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 | -------------------------------------------------------------------------------- /Examples/Circles/Circles/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | # Version History 2 | 3 | ### 80.0.0 - 2016-06-14 4 | 5 | * Updated to Xcode 8 Beta 1 6 | * Some methods and properties, including initializers, are no longer nullable 7 | * `gestureRecognizers` was added to `MAIControl` and its subclasses 8 | * `backgroundColor` was added to `MAIDatePicker`, `MAIScrollView`, `MAITableView`, `MAITableViewRowAction`, and `MAIWindow` 9 | * `view` was added to `MAIViewController` and `MAISplitViewController` 10 | * `dataSource` was added to `MAITableView` 11 | * `firstAnchor` and `secondAnchor` were added to `MAILayoutConstraint` 12 | * `hasAmbiguousLayout` was added to `MAILayoutGuide` 13 | * `NS_SWIFT_UNAVAILABLE` was added to `MAILayoutAttributeBaseline` and `MAILayoutFormatAlignAllBaseline` 14 | * `layoutManager`, `textStorage` and `linkTextAttributes` were added to `MAITextView` 15 | * `+colorWithDisplayP3Red:green:blue:alpha:` was added to `MAIColor` 16 | * `-application:userAcceptedCloudKitSharing:` was added to `MAIApplicationDelegate` 17 | * `sectionHeadersPinToVisibleBounds` and `sectionFootersPinToVisibleBounds` were added to `MAICollectionViewFlowLayout` 18 | * `indexPath` was added to `MAICollectionViewLayoutAttributes` 19 | * `indexPathBeforeUpdate` and `indexPathAfterUpdate` were added to `MAICollectionViewUpdateItem` 20 | * `calendar` was added to `MAIDatePicker` 21 | * `familyName` was added to `MAIFont` 22 | * `postscriptName` was added to `MAIFontDescriptor` 23 | * `action` was added to `MAIMenuItem` 24 | * `-initWithCoder:` was added to `MAIPrintInfo` 25 | * `title` was added to `MAITableViewRowAction` 26 | * Additional `__kindof` annotations 27 | * Some properties and methods are marked `__TVOS_PROHIBITED` 28 | * There are no common properties or methods between iOS and macOS marked `__WATCHOS_PROHIBITED` 29 | * `NS_NOESCAPE` was added to some block parameters 30 | 31 | 32 | ### 71.0.0 - 2015-09-13 33 | 34 | * Updated to Xcode 7 Beta 1, which added many `__kindof` annotations 35 | 36 | ### 70.0.6 - 2015-09-13 37 | 38 | * Updated to Xcode 7 GM, which introduced the following changes 39 | * Many nullability annotations were added 40 | * The `action` property was removed from `MAIMenuItem`, since is is nullable on OS X, but not on iOS 41 | * The `bezierPathByReversingPath` property was added to `MAIBezierPath` 42 | * The `viewLoaded` property was added to `MAIViewController` and `MAISplitViewController` 43 | * The `firstResponder` property was added to `MAICollectionView` 44 | * `numberOfSections` has been changed from a method to a property on `MAICollectionView` 45 | 46 | 47 | ### 70.0.5 — 2015-07-21 48 | 49 | * Moved class and protocol declarations to their own header 50 | * Updated to Xcode 7 Beta 4, which added the following method to MAILayoutManagerDelegate 51 | 52 | ```Objective-C 53 | - (BOOL)layoutManager:(id)layoutManager 54 | shouldSetLineFragmentRect:(inout CGRect *)lineFragmentRect 55 | lineFragmentUsedRect:(inout CGRect *)lineFragmentUsedRect 56 | baselineOffset:(inout CGFloat *)baselineOffset 57 | inTextContainer:(id)textContainer 58 | forGlyphRange:(NSRange)glyphRange 59 | ``` 60 | 61 | ### 70.0.4 — 2015-07-12 62 | 63 | * Initial public release 64 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Michael Buckley 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /MAIKit.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint MAIKit.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | use_frameworks! 11 | 12 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 13 | # 14 | # These will help people to find your library, and whilst it 15 | # can feel like a chore to fill in it's definitely to your advantage. The 16 | # summary should be tweet-length, and the description more in depth. 17 | # 18 | 19 | s.name = "MAIKit" 20 | s.version = "80.0.0" 21 | s.summary = "A framework for sharing code between iOS and OS X" 22 | 23 | s.description = <<-DESC 24 | MAIKit speeds up cross-platform development by defining protocols which 25 | contain the intersection of methods and properties of UIKit and AppKit 26 | classes. It also defines classes which implement these protocols, and 27 | can be used in both iOS and OS X code. These classes inherit from their 28 | UIKit and Appkit counterparts, and can be safely subclassed. 29 | DESC 30 | 31 | s.homepage = "https://github.com/MichaelBuckley/MAIKit" 32 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 33 | 34 | 35 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 36 | # 37 | # Licensing your code is important. See http://choosealicense.com for more info. 38 | # CocoaPods will detect a license file if there is a named LICENSE* 39 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 40 | # 41 | 42 | s.license = { :type => "MIT", :file => "LICENSE" } 43 | 44 | 45 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 46 | # 47 | # Specify the authors of the library, with email addresses. Email addresses 48 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 49 | # accepts just a name if you'd rather not provide an email address. 50 | # 51 | # Specify a social_media_url where others can refer to, for example a twitter 52 | # profile URL. 53 | # 54 | 55 | s.author = { "Michael Buckley" => "michael@buckleyisms.com" } 56 | s.social_media_url = "http://twitter.com/thebuckley" 57 | 58 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 59 | # 60 | # If this Pod runs only on iOS or OS X, then specify the platform and 61 | # the deployment target. You can optionally include the target after the platform. 62 | # 63 | 64 | # s.platform = :ios 65 | # s.platform = :ios, "5.0" 66 | 67 | # When using multiple platforms 68 | s.ios.deployment_target = "8.0" 69 | s.osx.deployment_target = "10.10" 70 | s.tvos.deployment_target = "10.0" 71 | s.watchos.deployment_target = "3.0" 72 | 73 | 74 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 75 | # 76 | # Specify the location from where the source should be retrieved. 77 | # Supports git, hg, bzr, svn and HTTP. 78 | # 79 | 80 | s.source = { :git => "https://github.com/MichaelBuckley/MAIKit.git", :tag => "80.0.0" } 81 | 82 | 83 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 84 | # 85 | # CocoaPods is smart about how it includes source code. For source files 86 | # giving a folder will include any h, m, mm, c & cpp files. For header 87 | # files it will include any header in the folder. 88 | # Not including the public_header_files will make all headers public. 89 | # 90 | 91 | s.source_files = "MAIKit/MAIKit", "MAIKit/MAIKit/*.{h,m}" 92 | 93 | # s.public_header_files = "MAIKit/MAIKit/*.h" 94 | 95 | 96 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 97 | # 98 | # A list of resources included with the Pod. These are copied into the 99 | # target bundle with a build phase script. Anything else will be cleaned. 100 | # You can preserve files from being cleaned, please don't preserve 101 | # non-essential files like tests, examples and documentation. 102 | # 103 | 104 | # s.resource = "icon.png" 105 | # s.resources = "Resources/*.png" 106 | 107 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 108 | 109 | 110 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 111 | # 112 | # Link your library with frameworks, or libraries. Libraries do not include 113 | # the lib prefix of their name. 114 | # 115 | 116 | # s.framework = "SomeFramework" 117 | # s.frameworks = "SomeFramework", "AnotherFramework" 118 | 119 | # s.library = "iconv" 120 | # s.libraries = "iconv", "xml2" 121 | 122 | 123 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 124 | # 125 | # If your library depends on compiler flags you can set them in the xcconfig hash 126 | # where they will only apply to your library. If you depend on other Podspecs 127 | # you can include multiple dependencies to ensure it works. 128 | 129 | s.requires_arc = true 130 | 131 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 132 | # s.dependency "JSONKit", "~> 1.4" 133 | 134 | end 135 | -------------------------------------------------------------------------------- /MAIKit/MAIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MAIKit/MAIKit.xcodeproj/xcshareddata/xcschemes/MAIKit-ios.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /MAIKit/MAIKit.xcodeproj/xcshareddata/xcschemes/MAIKit-mac.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 79 | 85 | 86 | 87 | 88 | 89 | 90 | 96 | 97 | 103 | 104 | 105 | 106 | 108 | 109 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIAccessibilityElement.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIAccessibilityElementProtocol 18 | 19 | #if TARGET_OS_IPHONE 20 | -(instancetype)initWithAccessibilityContainer:(id)container NS_UNAVAILABLE; 21 | #else 22 | +(id)accessibilityElementWithRole:(NSString*)role frame:(CGRect)frame label:(nullable NSString*)label parent:(nullable id)parent NS_UNAVAILABLE; 23 | #endif 24 | 25 | @end 26 | 27 | #if TARGET_OS_IPHONE 28 | @interface MAIAccessibilityElement : UIAccessibilityElement 29 | #else 30 | @interface MAIAccessibilityElement : NSAccessibilityElement 31 | #endif 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | 36 | #pragma clang diagnostic pop 37 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIAccessibilityElement.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIAccessibilityElement.h" 5 | 6 | @implementation MAIAccessibilityElement 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIApplication.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIApplicationProtocol 18 | +(id)sharedApplication; 19 | -(void)sendEvent:(id)event; 20 | -(void)unregisterForRemoteNotifications; 21 | -(void)extendStateRestoration; 22 | -(void)completeStateRestoration; 23 | -(BOOL)becomeFirstResponder; 24 | -(BOOL)resignFirstResponder; 25 | -(void)updateUserActivityState:(NSUserActivity*)activity; 26 | -(void)restoreUserActivityState:(NSUserActivity*)activity; 27 | @property(nullable, setter=setDelegate:, getter=delegate) id delegate; 28 | @property(readonly, nullable, getter=keyWindow) id keyWindow; 29 | @property(readonly, getter=userInterfaceLayoutDirection) MAIUserInterfaceLayoutDirection userInterfaceLayoutDirection; 30 | @property(readonly, nullable, getter=undoManager) NSUndoManager* undoManager; 31 | @property(nullable, setter=setUserActivity:, getter=userActivity) NSUserActivity* userActivity; 32 | 33 | #if TARGET_OS_IPHONE 34 | +(void)registerObjectForStateRestoration:(id)object restorationIdentifier:(NSString*)restorationIdentifier NS_UNAVAILABLE; 35 | +(void)clearTextInputContextIdentifier:(NSString*)identifier NS_UNAVAILABLE; 36 | #else 37 | +(void)detachDrawingThread:(SEL)selector toTarget:(id)target withObject:(nullable id)argument NS_UNAVAILABLE; 38 | -(instancetype)init NS_UNAVAILABLE; 39 | -(nullable instancetype)initWithCoder:(NSCoder*)coder NS_UNAVAILABLE; 40 | #endif 41 | 42 | @end 43 | 44 | #if TARGET_OS_IPHONE 45 | @interface MAIApplication : UIApplication 46 | #else 47 | @interface MAIApplication : NSApplication 48 | #endif 49 | @end 50 | 51 | NS_ASSUME_NONNULL_END 52 | 53 | #pragma clang diagnostic pop 54 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIApplication.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIApplication.h" 5 | 6 | @implementation MAIApplication 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIBezierPath.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIBezierPathProtocol 18 | -(void)moveToPoint:(CGPoint)point; 19 | -(void)closePath; 20 | -(void)removeAllPoints; 21 | -(BOOL)containsPoint:(CGPoint)point; 22 | -(void)setLineDash:(nullable const CGFloat*)pattern count:(NSInteger)count phase:(CGFloat)phase; 23 | -(void)getLineDash:(nullable CGFloat*)pattern count:(nullable NSInteger*)count phase:(nullable CGFloat*)phase; 24 | -(void)fill; 25 | -(void)stroke; 26 | -(void)addClip; 27 | @property(readonly, getter=isEmpty) BOOL empty; 28 | @property(readonly, getter=bounds) CGRect bounds; 29 | @property(readonly, getter=currentPoint) CGPoint currentPoint; 30 | @property(setter=setLineWidth:, getter=lineWidth) CGFloat lineWidth; 31 | @property(setter=setMiterLimit:, getter=miterLimit) CGFloat miterLimit; 32 | @property(setter=setFlatness:, getter=flatness) CGFloat flatness; 33 | @property(readonly, getter=bezierPathByReversingPath) id bezierPathByReversingPath; 34 | 35 | #if TARGET_OS_IPHONE 36 | +(instancetype)bezierPathWithRoundedRect:(CGRect)rect cornerRadius:(CGFloat)cornerRadius NS_UNAVAILABLE; 37 | +(instancetype)bezierPathWithRoundedRect:(CGRect)rect byRoundingCorners:(UIRectCorner)corners cornerRadii:(CGSize)cornerRadii NS_UNAVAILABLE; 38 | +(instancetype)bezierPathWithArcCenter:(CGPoint)center radius:(CGFloat)radius startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle clockwise:(BOOL)clockwise NS_UNAVAILABLE; 39 | +(instancetype)bezierPathWithCGPath:(CGPathRef)CGPath NS_UNAVAILABLE; 40 | -(instancetype)init NS_UNAVAILABLE; 41 | -(nullable instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; 42 | #else 43 | +(id)bezierPathWithRoundedRect:(CGRect)rect xRadius:(CGFloat)xRadius yRadius:(CGFloat)yRadius NS_UNAVAILABLE; 44 | +(void)fillRect:(CGRect)rect NS_UNAVAILABLE; 45 | +(void)strokeRect:(CGRect)rect NS_UNAVAILABLE; 46 | +(void)clipRect:(CGRect)rect NS_UNAVAILABLE; 47 | +(void)strokeLineFromPoint:(CGPoint)point1 toPoint:(CGPoint)point2 NS_UNAVAILABLE; 48 | +(void)drawPackedGlyphs:(const char*)packedGlyphs atPoint:(CGPoint)point NS_UNAVAILABLE; 49 | +(void)setDefaultMiterLimit:(CGFloat)limit NS_UNAVAILABLE; 50 | +(CGFloat)defaultMiterLimit NS_UNAVAILABLE; 51 | +(void)setDefaultFlatness:(CGFloat)flatness NS_UNAVAILABLE; 52 | +(CGFloat)defaultFlatness NS_UNAVAILABLE; 53 | +(void)setDefaultWindingRule:(NSWindingRule)windingRule NS_UNAVAILABLE; 54 | +(NSWindingRule)defaultWindingRule NS_UNAVAILABLE; 55 | +(void)setDefaultLineCapStyle:(NSLineCapStyle)lineCapStyle NS_UNAVAILABLE; 56 | +(NSLineCapStyle)defaultLineCapStyle NS_UNAVAILABLE; 57 | +(void)setDefaultLineJoinStyle:(NSLineJoinStyle)lineJoinStyle NS_UNAVAILABLE; 58 | +(NSLineJoinStyle)defaultLineJoinStyle NS_UNAVAILABLE; 59 | +(void)setDefaultLineWidth:(CGFloat)lineWidth NS_UNAVAILABLE; 60 | +(CGFloat)defaultLineWidth NS_UNAVAILABLE; 61 | #endif 62 | 63 | @end 64 | 65 | #if TARGET_OS_IPHONE 66 | @interface MAIBezierPath : UIBezierPath 67 | #else 68 | @interface MAIBezierPath : NSBezierPath 69 | #endif 70 | @end 71 | 72 | NS_ASSUME_NONNULL_END 73 | 74 | #pragma clang diagnostic pop 75 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIBezierPath.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIBezierPath.h" 5 | 6 | @implementation MAIBezierPath 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIButton.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIButton.h" 5 | 6 | @implementation MAIButton 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionView.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAICollectionView.h" 5 | 6 | @implementation MAICollectionView 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewDataSource.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_IPHONE 2 | @import UIKit; 3 | #else 4 | @import AppKit; 5 | #endif 6 | 7 | #import "MAIEnums.h" 8 | 9 | @protocol MAILayoutManagerDelegate; 10 | @protocol MAITextLayoutOrientationProvider; 11 | @protocol MAITextAttachmentContainer; 12 | @protocol MAITextStorageDelegate; 13 | @protocol MAIApplicationDelegate; 14 | @protocol MAICollectionViewDelegate; 15 | @protocol MAICollectionViewDelegateFlowLayout; 16 | @protocol MAIGestureRecognizerDelegate; 17 | @protocol MAITableViewDataSource; 18 | @protocol MAITableViewDelegate; 19 | @protocol MAITextFieldDelegate; 20 | @protocol MAITextInput; 21 | @protocol MAITextViewDelegate; 22 | @protocol MAIToolbarDelegate; 23 | 24 | @class MAIDataAsset; 25 | @protocol MAIDataAssetProtocol; 26 | @class MAILayoutXAxisAnchor; 27 | @protocol MAILayoutXAxisAnchorProtocol; 28 | @class MAILayoutYAxisAnchor; 29 | @protocol MAILayoutYAxisAnchorProtocol; 30 | @class MAILayoutDimension; 31 | @protocol MAILayoutDimensionProtocol; 32 | @class MAILayoutConstraint; 33 | @protocol MAILayoutConstraintProtocol; 34 | @class MAILayoutManager; 35 | @protocol MAILayoutManagerProtocol; 36 | @class MAITextTab; 37 | @protocol MAITextTabProtocol; 38 | @class MAIParagraphStyle; 39 | @protocol MAIParagraphStyleProtocol; 40 | @class MAIMutableParagraphStyle; 41 | @protocol MAIMutableParagraphStyleProtocol; 42 | @class MAIShadow; 43 | @protocol MAIShadowProtocol; 44 | @class MAIStringDrawingContext; 45 | @protocol MAIStringDrawingContextProtocol; 46 | @class MAITextAttachment; 47 | @protocol MAITextAttachmentProtocol; 48 | @class MAITextContainer; 49 | @protocol MAITextContainerProtocol; 50 | @class MAITextStorage; 51 | @protocol MAITextStorageProtocol; 52 | @class MAIAccessibilityElement; 53 | @protocol MAIAccessibilityElementProtocol; 54 | @class MAIApplication; 55 | @protocol MAIApplicationProtocol; 56 | @class MAIBezierPath; 57 | @protocol MAIBezierPathProtocol; 58 | @class MAIButton; 59 | @protocol MAIButtonProtocol; 60 | @class MAICollectionView; 61 | @protocol MAICollectionViewProtocol; 62 | @class MAICollectionViewFlowLayoutInvalidationContext; 63 | @protocol MAICollectionViewFlowLayoutInvalidationContextProtocol; 64 | @class MAICollectionViewFlowLayout; 65 | @protocol MAICollectionViewFlowLayoutProtocol; 66 | @class MAICollectionViewLayoutAttributes; 67 | @protocol MAICollectionViewLayoutAttributesProtocol; 68 | @class MAICollectionViewUpdateItem; 69 | @protocol MAICollectionViewUpdateItemProtocol; 70 | @class MAICollectionViewLayoutInvalidationContext; 71 | @protocol MAICollectionViewLayoutInvalidationContextProtocol; 72 | @class MAICollectionViewLayout; 73 | @protocol MAICollectionViewLayoutProtocol; 74 | @class MAICollectionViewTransitionLayout; 75 | @protocol MAICollectionViewTransitionLayoutProtocol; 76 | @class MAIColor; 77 | @protocol MAIColorProtocol; 78 | @class MAIControl; 79 | @protocol MAIControlProtocol; 80 | @class MAIDatePicker; 81 | @protocol MAIDatePickerProtocol; 82 | @class MAIDocument; 83 | @protocol MAIDocumentProtocol; 84 | @class MAIEvent; 85 | @protocol MAIEventProtocol; 86 | @class MAIFont; 87 | @protocol MAIFontProtocol; 88 | @class MAIFontDescriptor; 89 | @protocol MAIFontDescriptorProtocol; 90 | @class MAIGestureRecognizer; 91 | @protocol MAIGestureRecognizerProtocol; 92 | @class MAIImage; 93 | @protocol MAIImageProtocol; 94 | @class MAIImageView; 95 | @protocol MAIImageViewProtocol; 96 | @class MAILayoutGuide; 97 | @protocol MAILayoutGuideProtocol; 98 | @class MAIMenuItem; 99 | @protocol MAIMenuItemProtocol; 100 | @class MAINib; 101 | @protocol MAINibProtocol; 102 | @class MAIPanGestureRecognizer; 103 | @protocol MAIPanGestureRecognizerProtocol; 104 | @class MAIPasteboard; 105 | @protocol MAIPasteboardProtocol; 106 | @class MAIPrinter; 107 | @protocol MAIPrinterProtocol; 108 | @class MAIPrintInfo; 109 | @protocol MAIPrintInfoProtocol; 110 | @class MAIResponder; 111 | @protocol MAIResponderProtocol; 112 | @class MAIRotationGestureRecognizer; 113 | @protocol MAIRotationGestureRecognizerProtocol; 114 | @class MAIScreen; 115 | @protocol MAIScreenProtocol; 116 | @class MAIScrollView; 117 | @protocol MAIScrollViewProtocol; 118 | @class MAISegmentedControl; 119 | @protocol MAISegmentedControlProtocol; 120 | @class MAISlider; 121 | @protocol MAISliderProtocol; 122 | @class MAISplitViewController; 123 | @protocol MAISplitViewControllerProtocol; 124 | @class MAIStackView; 125 | @protocol MAIStackViewProtocol; 126 | @class MAIStepper; 127 | @protocol MAIStepperProtocol; 128 | @class MAIStoryboard; 129 | @protocol MAIStoryboardProtocol; 130 | @class MAIStoryboardSegue; 131 | @protocol MAIStoryboardSegueProtocol; 132 | @class MAITableViewRowAction; 133 | @protocol MAITableViewRowActionProtocol; 134 | @class MAITableView; 135 | @protocol MAITableViewProtocol; 136 | @class MAITextField; 137 | @protocol MAITextFieldProtocol; 138 | @class MAITextView; 139 | @protocol MAITextViewProtocol; 140 | @class MAIToolbar; 141 | @protocol MAIToolbarProtocol; 142 | @class MAITouch; 143 | @protocol MAITouchProtocol; 144 | @class MAIView; 145 | @protocol MAIViewProtocol; 146 | @class MAIViewController; 147 | @protocol MAIViewControllerProtocol; 148 | @class MAIVisualEffectView; 149 | @protocol MAIVisualEffectViewProtocol; 150 | @class MAIWindow; 151 | @protocol MAIWindowProtocol; 152 | 153 | NS_ASSUME_NONNULL_BEGIN 154 | 155 | @protocol MAICollectionViewDataSource 156 | @optional 157 | -(NSInteger)numberOfSectionsInCollectionView:(id)collectionView; 158 | 159 | 160 | @required 161 | 162 | -(NSInteger)collectionView:(id)collectionView numberOfItemsInSection:(NSInteger)section; 163 | 164 | 165 | 166 | @end 167 | 168 | NS_ASSUME_NONNULL_END 169 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewDelegate.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_IPHONE 2 | @import UIKit; 3 | #else 4 | @import AppKit; 5 | #endif 6 | 7 | #import "MAIEnums.h" 8 | 9 | @protocol MAILayoutManagerDelegate; 10 | @protocol MAITextLayoutOrientationProvider; 11 | @protocol MAITextAttachmentContainer; 12 | @protocol MAITextStorageDelegate; 13 | @protocol MAIApplicationDelegate; 14 | @protocol MAICollectionViewDataSource; 15 | @protocol MAICollectionViewDelegateFlowLayout; 16 | @protocol MAIGestureRecognizerDelegate; 17 | @protocol MAITableViewDataSource; 18 | @protocol MAITableViewDelegate; 19 | @protocol MAITextFieldDelegate; 20 | @protocol MAITextInput; 21 | @protocol MAITextViewDelegate; 22 | @protocol MAIToolbarDelegate; 23 | 24 | @class MAIDataAsset; 25 | @protocol MAIDataAssetProtocol; 26 | @class MAILayoutXAxisAnchor; 27 | @protocol MAILayoutXAxisAnchorProtocol; 28 | @class MAILayoutYAxisAnchor; 29 | @protocol MAILayoutYAxisAnchorProtocol; 30 | @class MAILayoutDimension; 31 | @protocol MAILayoutDimensionProtocol; 32 | @class MAILayoutConstraint; 33 | @protocol MAILayoutConstraintProtocol; 34 | @class MAILayoutManager; 35 | @protocol MAILayoutManagerProtocol; 36 | @class MAITextTab; 37 | @protocol MAITextTabProtocol; 38 | @class MAIParagraphStyle; 39 | @protocol MAIParagraphStyleProtocol; 40 | @class MAIMutableParagraphStyle; 41 | @protocol MAIMutableParagraphStyleProtocol; 42 | @class MAIShadow; 43 | @protocol MAIShadowProtocol; 44 | @class MAIStringDrawingContext; 45 | @protocol MAIStringDrawingContextProtocol; 46 | @class MAITextAttachment; 47 | @protocol MAITextAttachmentProtocol; 48 | @class MAITextContainer; 49 | @protocol MAITextContainerProtocol; 50 | @class MAITextStorage; 51 | @protocol MAITextStorageProtocol; 52 | @class MAIAccessibilityElement; 53 | @protocol MAIAccessibilityElementProtocol; 54 | @class MAIApplication; 55 | @protocol MAIApplicationProtocol; 56 | @class MAIBezierPath; 57 | @protocol MAIBezierPathProtocol; 58 | @class MAIButton; 59 | @protocol MAIButtonProtocol; 60 | @class MAICollectionView; 61 | @protocol MAICollectionViewProtocol; 62 | @class MAICollectionViewFlowLayoutInvalidationContext; 63 | @protocol MAICollectionViewFlowLayoutInvalidationContextProtocol; 64 | @class MAICollectionViewFlowLayout; 65 | @protocol MAICollectionViewFlowLayoutProtocol; 66 | @class MAICollectionViewLayoutAttributes; 67 | @protocol MAICollectionViewLayoutAttributesProtocol; 68 | @class MAICollectionViewUpdateItem; 69 | @protocol MAICollectionViewUpdateItemProtocol; 70 | @class MAICollectionViewLayoutInvalidationContext; 71 | @protocol MAICollectionViewLayoutInvalidationContextProtocol; 72 | @class MAICollectionViewLayout; 73 | @protocol MAICollectionViewLayoutProtocol; 74 | @class MAICollectionViewTransitionLayout; 75 | @protocol MAICollectionViewTransitionLayoutProtocol; 76 | @class MAIColor; 77 | @protocol MAIColorProtocol; 78 | @class MAIControl; 79 | @protocol MAIControlProtocol; 80 | @class MAIDatePicker; 81 | @protocol MAIDatePickerProtocol; 82 | @class MAIDocument; 83 | @protocol MAIDocumentProtocol; 84 | @class MAIEvent; 85 | @protocol MAIEventProtocol; 86 | @class MAIFont; 87 | @protocol MAIFontProtocol; 88 | @class MAIFontDescriptor; 89 | @protocol MAIFontDescriptorProtocol; 90 | @class MAIGestureRecognizer; 91 | @protocol MAIGestureRecognizerProtocol; 92 | @class MAIImage; 93 | @protocol MAIImageProtocol; 94 | @class MAIImageView; 95 | @protocol MAIImageViewProtocol; 96 | @class MAILayoutGuide; 97 | @protocol MAILayoutGuideProtocol; 98 | @class MAIMenuItem; 99 | @protocol MAIMenuItemProtocol; 100 | @class MAINib; 101 | @protocol MAINibProtocol; 102 | @class MAIPanGestureRecognizer; 103 | @protocol MAIPanGestureRecognizerProtocol; 104 | @class MAIPasteboard; 105 | @protocol MAIPasteboardProtocol; 106 | @class MAIPrinter; 107 | @protocol MAIPrinterProtocol; 108 | @class MAIPrintInfo; 109 | @protocol MAIPrintInfoProtocol; 110 | @class MAIResponder; 111 | @protocol MAIResponderProtocol; 112 | @class MAIRotationGestureRecognizer; 113 | @protocol MAIRotationGestureRecognizerProtocol; 114 | @class MAIScreen; 115 | @protocol MAIScreenProtocol; 116 | @class MAIScrollView; 117 | @protocol MAIScrollViewProtocol; 118 | @class MAISegmentedControl; 119 | @protocol MAISegmentedControlProtocol; 120 | @class MAISlider; 121 | @protocol MAISliderProtocol; 122 | @class MAISplitViewController; 123 | @protocol MAISplitViewControllerProtocol; 124 | @class MAIStackView; 125 | @protocol MAIStackViewProtocol; 126 | @class MAIStepper; 127 | @protocol MAIStepperProtocol; 128 | @class MAIStoryboard; 129 | @protocol MAIStoryboardProtocol; 130 | @class MAIStoryboardSegue; 131 | @protocol MAIStoryboardSegueProtocol; 132 | @class MAITableViewRowAction; 133 | @protocol MAITableViewRowActionProtocol; 134 | @class MAITableView; 135 | @protocol MAITableViewProtocol; 136 | @class MAITextField; 137 | @protocol MAITextFieldProtocol; 138 | @class MAITextView; 139 | @protocol MAITextViewProtocol; 140 | @class MAIToolbar; 141 | @protocol MAIToolbarProtocol; 142 | @class MAITouch; 143 | @protocol MAITouchProtocol; 144 | @class MAIView; 145 | @protocol MAIViewProtocol; 146 | @class MAIViewController; 147 | @protocol MAIViewControllerProtocol; 148 | @class MAIVisualEffectView; 149 | @protocol MAIVisualEffectViewProtocol; 150 | @class MAIWindow; 151 | @protocol MAIWindowProtocol; 152 | 153 | NS_ASSUME_NONNULL_BEGIN 154 | 155 | @protocol MAICollectionViewDelegate 156 | @optional 157 | 158 | 159 | 160 | @end 161 | 162 | NS_ASSUME_NONNULL_END 163 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewFlowLayout.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAICollectionViewFlowLayoutProtocol 18 | -(void)invalidateLayout; 19 | -(void)invalidateLayoutWithContext:(id)context; 20 | -(void)registerClass:(nullable Class)viewClass forDecorationViewOfKind:(NSString*)elementKind; 21 | -(void)registerNib:(nullable id)nib forDecorationViewOfKind:(NSString*)elementKind; 22 | +(Class)layoutAttributesClass; 23 | +(Class)invalidationContextClass; 24 | -(void)prepareLayout; 25 | -(nullable id)layoutAttributesForItemAtIndexPath:(NSIndexPath*)indexPath; 26 | -(nullable id)layoutAttributesForSupplementaryViewOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)indexPath; 27 | -(nullable id)layoutAttributesForDecorationViewOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)indexPath; 28 | -(BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds; 29 | -(id)invalidationContextForBoundsChange:(CGRect)newBounds; 30 | -(BOOL)shouldInvalidateLayoutForPreferredLayoutAttributes:(id)preferredAttributes withOriginalAttributes:(id)originalAttributes; 31 | -(id)invalidationContextForPreferredLayoutAttributes:(id)preferredAttributes withOriginalAttributes:(id)originalAttributes; 32 | -(CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset withScrollingVelocity:(CGPoint)velocity; 33 | -(CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset; 34 | -(void)prepareForCollectionViewUpdates:(NSArray*)updateItems; 35 | -(void)finalizeCollectionViewUpdates; 36 | -(void)prepareForAnimatedBoundsChange:(CGRect)oldBounds; 37 | -(void)finalizeAnimatedBoundsChange; 38 | -(void)prepareForTransitionToLayout:(id)newLayout; 39 | -(void)prepareForTransitionFromLayout:(id)oldLayout; 40 | -(void)finalizeLayoutTransition; 41 | -(nullable id)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath*)itemIndexPath; 42 | -(nullable id)finalLayoutAttributesForDisappearingItemAtIndexPath:(NSIndexPath*)itemIndexPath; 43 | -(nullable id)initialLayoutAttributesForAppearingSupplementaryElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)elementIndexPath; 44 | -(nullable id)finalLayoutAttributesForDisappearingSupplementaryElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)elementIndexPath; 45 | -(nullable id)initialLayoutAttributesForAppearingDecorationElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)decorationIndexPath; 46 | -(nullable id)finalLayoutAttributesForDisappearingDecorationElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)decorationIndexPath; 47 | @property(setter=setMinimumLineSpacing:, getter=minimumLineSpacing) CGFloat minimumLineSpacing; 48 | @property(setter=setMinimumInteritemSpacing:, getter=minimumInteritemSpacing) CGFloat minimumInteritemSpacing; 49 | @property(setter=setScrollDirection:, getter=scrollDirection) MAICollectionViewScrollDirection scrollDirection; 50 | @property(setter=setSectionHeadersPinToVisibleBounds:, getter=sectionHeadersPinToVisibleBounds) BOOL sectionHeadersPinToVisibleBounds; 51 | @property(setter=setSectionFootersPinToVisibleBounds:, getter=sectionFootersPinToVisibleBounds) BOOL sectionFootersPinToVisibleBounds; 52 | @property(readonly, nullable, getter=collectionView) id collectionView; 53 | 54 | #if TARGET_OS_IPHONE 55 | -(instancetype)init NS_UNAVAILABLE; 56 | -(nullable instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; 57 | #else 58 | #endif 59 | 60 | @end 61 | 62 | #if TARGET_OS_IPHONE 63 | @interface MAICollectionViewFlowLayout : UICollectionViewFlowLayout 64 | #else 65 | @interface MAICollectionViewFlowLayout : NSCollectionViewFlowLayout 66 | #endif 67 | @end 68 | 69 | NS_ASSUME_NONNULL_END 70 | 71 | #pragma clang diagnostic pop 72 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewFlowLayout.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAICollectionViewFlowLayout.h" 5 | 6 | @implementation MAICollectionViewFlowLayout 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewFlowLayoutInvalidationContext.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAICollectionViewFlowLayoutInvalidationContextProtocol 18 | @property(setter=setInvalidateFlowLayoutDelegateMetrics:, getter=invalidateFlowLayoutDelegateMetrics) BOOL invalidateFlowLayoutDelegateMetrics; 19 | @property(setter=setInvalidateFlowLayoutAttributes:, getter=invalidateFlowLayoutAttributes) BOOL invalidateFlowLayoutAttributes; 20 | @property(readonly, getter=invalidateEverything) BOOL invalidateEverything; 21 | @property(readonly, getter=invalidateDataSourceCounts) BOOL invalidateDataSourceCounts; 22 | @property(setter=setContentOffsetAdjustment:, getter=contentOffsetAdjustment) CGPoint contentOffsetAdjustment; 23 | 24 | #if TARGET_OS_IPHONE 25 | #else 26 | #endif 27 | 28 | @end 29 | 30 | #if TARGET_OS_IPHONE 31 | @interface MAICollectionViewFlowLayoutInvalidationContext : UICollectionViewFlowLayoutInvalidationContext 32 | #else 33 | @interface MAICollectionViewFlowLayoutInvalidationContext : NSCollectionViewFlowLayoutInvalidationContext 34 | #endif 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | 39 | #pragma clang diagnostic pop 40 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewFlowLayoutInvalidationContext.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAICollectionViewFlowLayoutInvalidationContext.h" 5 | 6 | @implementation MAICollectionViewFlowLayoutInvalidationContext 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewLayout.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAICollectionViewLayoutProtocol 18 | -(void)invalidateLayout; 19 | -(void)invalidateLayoutWithContext:(id)context; 20 | -(void)registerClass:(nullable Class)viewClass forDecorationViewOfKind:(NSString*)elementKind; 21 | -(void)registerNib:(nullable id)nib forDecorationViewOfKind:(NSString*)elementKind; 22 | +(Class)layoutAttributesClass; 23 | +(Class)invalidationContextClass; 24 | -(void)prepareLayout; 25 | -(nullable id)layoutAttributesForItemAtIndexPath:(NSIndexPath*)indexPath; 26 | -(nullable id)layoutAttributesForSupplementaryViewOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)indexPath; 27 | -(nullable id)layoutAttributesForDecorationViewOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)indexPath; 28 | -(BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds; 29 | -(id)invalidationContextForBoundsChange:(CGRect)newBounds; 30 | -(BOOL)shouldInvalidateLayoutForPreferredLayoutAttributes:(id)preferredAttributes withOriginalAttributes:(id)originalAttributes; 31 | -(id)invalidationContextForPreferredLayoutAttributes:(id)preferredAttributes withOriginalAttributes:(id)originalAttributes; 32 | -(CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset withScrollingVelocity:(CGPoint)velocity; 33 | -(CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset; 34 | -(void)prepareForCollectionViewUpdates:(NSArray*)updateItems; 35 | -(void)finalizeCollectionViewUpdates; 36 | -(void)prepareForAnimatedBoundsChange:(CGRect)oldBounds; 37 | -(void)finalizeAnimatedBoundsChange; 38 | -(void)prepareForTransitionToLayout:(id)newLayout; 39 | -(void)prepareForTransitionFromLayout:(id)oldLayout; 40 | -(void)finalizeLayoutTransition; 41 | -(nullable id)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath*)itemIndexPath; 42 | -(nullable id)finalLayoutAttributesForDisappearingItemAtIndexPath:(NSIndexPath*)itemIndexPath; 43 | -(nullable id)initialLayoutAttributesForAppearingSupplementaryElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)elementIndexPath; 44 | -(nullable id)finalLayoutAttributesForDisappearingSupplementaryElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)elementIndexPath; 45 | -(nullable id)initialLayoutAttributesForAppearingDecorationElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)decorationIndexPath; 46 | -(nullable id)finalLayoutAttributesForDisappearingDecorationElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)decorationIndexPath; 47 | @property(readonly, nullable, getter=collectionView) id collectionView; 48 | 49 | #if TARGET_OS_IPHONE 50 | -(instancetype)init NS_UNAVAILABLE; 51 | -(nullable instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; 52 | #else 53 | #endif 54 | 55 | @end 56 | 57 | #if TARGET_OS_IPHONE 58 | @interface MAICollectionViewLayout : UICollectionViewLayout 59 | #else 60 | @interface MAICollectionViewLayout : NSCollectionViewLayout 61 | #endif 62 | @end 63 | 64 | NS_ASSUME_NONNULL_END 65 | 66 | #pragma clang diagnostic pop 67 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewLayout.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAICollectionViewLayout.h" 5 | 6 | @implementation MAICollectionViewLayout 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewLayoutAttributes.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAICollectionViewLayoutAttributesProtocol 18 | +(instancetype)layoutAttributesForSupplementaryViewOfKind:(NSString*)elementKind withIndexPath:(NSIndexPath*)indexPath; 19 | +(instancetype)layoutAttributesForDecorationViewOfKind:(NSString*)decorationViewKind withIndexPath:(NSIndexPath*)indexPath; 20 | @property(setter=setFrame:, getter=frame) CGRect frame; 21 | @property(setter=setAlpha:, getter=alpha) CGFloat alpha; 22 | @property(setter=setZIndex:, getter=zIndex) NSInteger zIndex; 23 | @property(setter=setHidden:, getter=isHidden) BOOL hidden; 24 | @property(setter=setIndexPath:, getter=indexPath) NSIndexPath* indexPath; 25 | @property(readonly, nullable, getter=representedElementKind) NSString* representedElementKind; 26 | 27 | #if TARGET_OS_IPHONE 28 | +(instancetype)layoutAttributesForCellWithIndexPath:(NSIndexPath*)indexPath NS_UNAVAILABLE; 29 | #else 30 | +(instancetype)layoutAttributesForItemWithIndexPath:(NSIndexPath*)indexPath NS_UNAVAILABLE; 31 | +(instancetype)layoutAttributesForInterItemGapBeforeIndexPath:(NSIndexPath*)indexPath NS_UNAVAILABLE; 32 | #endif 33 | 34 | @end 35 | 36 | #if TARGET_OS_IPHONE 37 | @interface MAICollectionViewLayoutAttributes : UICollectionViewLayoutAttributes 38 | #else 39 | @interface MAICollectionViewLayoutAttributes : NSCollectionViewLayoutAttributes 40 | #endif 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | 45 | #pragma clang diagnostic pop 46 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewLayoutAttributes.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAICollectionViewLayoutAttributes.h" 5 | 6 | @implementation MAICollectionViewLayoutAttributes 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewLayoutInvalidationContext.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAICollectionViewLayoutInvalidationContextProtocol 18 | @property(readonly, getter=invalidateEverything) BOOL invalidateEverything; 19 | @property(readonly, getter=invalidateDataSourceCounts) BOOL invalidateDataSourceCounts; 20 | @property(setter=setContentOffsetAdjustment:, getter=contentOffsetAdjustment) CGPoint contentOffsetAdjustment; 21 | 22 | #if TARGET_OS_IPHONE 23 | #else 24 | #endif 25 | 26 | @end 27 | 28 | #if TARGET_OS_IPHONE 29 | @interface MAICollectionViewLayoutInvalidationContext : UICollectionViewLayoutInvalidationContext 30 | #else 31 | @interface MAICollectionViewLayoutInvalidationContext : NSCollectionViewLayoutInvalidationContext 32 | #endif 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | 37 | #pragma clang diagnostic pop 38 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewLayoutInvalidationContext.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAICollectionViewLayoutInvalidationContext.h" 5 | 6 | @implementation MAICollectionViewLayoutInvalidationContext 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewTransitionLayout.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAICollectionViewTransitionLayoutProtocol 18 | -(instancetype)initWithCurrentLayout:(id)currentLayout nextLayout:(id)newLayout; 19 | -(void)updateValue:(CGFloat)value forAnimatedKey:(NSString*)key; 20 | -(CGFloat)valueForAnimatedKey:(NSString*)key; 21 | -(void)invalidateLayout; 22 | -(void)invalidateLayoutWithContext:(id)context; 23 | -(void)registerClass:(nullable Class)viewClass forDecorationViewOfKind:(NSString*)elementKind; 24 | -(void)registerNib:(nullable id)nib forDecorationViewOfKind:(NSString*)elementKind; 25 | +(Class)layoutAttributesClass; 26 | +(Class)invalidationContextClass; 27 | -(void)prepareLayout; 28 | -(nullable id)layoutAttributesForItemAtIndexPath:(NSIndexPath*)indexPath; 29 | -(nullable id)layoutAttributesForSupplementaryViewOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)indexPath; 30 | -(nullable id)layoutAttributesForDecorationViewOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)indexPath; 31 | -(BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds; 32 | -(id)invalidationContextForBoundsChange:(CGRect)newBounds; 33 | -(BOOL)shouldInvalidateLayoutForPreferredLayoutAttributes:(id)preferredAttributes withOriginalAttributes:(id)originalAttributes; 34 | -(id)invalidationContextForPreferredLayoutAttributes:(id)preferredAttributes withOriginalAttributes:(id)originalAttributes; 35 | -(CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset withScrollingVelocity:(CGPoint)velocity; 36 | -(CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset; 37 | -(void)prepareForCollectionViewUpdates:(NSArray*)updateItems; 38 | -(void)finalizeCollectionViewUpdates; 39 | -(void)prepareForAnimatedBoundsChange:(CGRect)oldBounds; 40 | -(void)finalizeAnimatedBoundsChange; 41 | -(void)prepareForTransitionToLayout:(id)newLayout; 42 | -(void)prepareForTransitionFromLayout:(id)oldLayout; 43 | -(void)finalizeLayoutTransition; 44 | -(nullable id)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath*)itemIndexPath; 45 | -(nullable id)finalLayoutAttributesForDisappearingItemAtIndexPath:(NSIndexPath*)itemIndexPath; 46 | -(nullable id)initialLayoutAttributesForAppearingSupplementaryElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)elementIndexPath; 47 | -(nullable id)finalLayoutAttributesForDisappearingSupplementaryElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)elementIndexPath; 48 | -(nullable id)initialLayoutAttributesForAppearingDecorationElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)decorationIndexPath; 49 | -(nullable id)finalLayoutAttributesForDisappearingDecorationElementOfKind:(NSString*)elementKind atIndexPath:(NSIndexPath*)decorationIndexPath; 50 | @property(setter=setTransitionProgress:, getter=transitionProgress) CGFloat transitionProgress; 51 | @property(readonly, getter=currentLayout) id currentLayout; 52 | @property(readonly, getter=nextLayout) id nextLayout; 53 | @property(readonly, nullable, getter=collectionView) id collectionView; 54 | 55 | #if TARGET_OS_IPHONE 56 | -(nullable instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; 57 | -(instancetype)init NS_UNAVAILABLE; 58 | #else 59 | #endif 60 | 61 | @end 62 | 63 | #if TARGET_OS_IPHONE 64 | @interface MAICollectionViewTransitionLayout : UICollectionViewTransitionLayout 65 | #else 66 | @interface MAICollectionViewTransitionLayout : NSCollectionViewTransitionLayout 67 | #endif 68 | @end 69 | 70 | NS_ASSUME_NONNULL_END 71 | 72 | #pragma clang diagnostic pop 73 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewTransitionLayout.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAICollectionViewTransitionLayout.h" 5 | 6 | @implementation MAICollectionViewTransitionLayout 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewUpdateItem.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAICollectionViewUpdateItemProtocol 18 | @property(readonly, nullable, getter=indexPathBeforeUpdate) NSIndexPath* indexPathBeforeUpdate; 19 | @property(readonly, nullable, getter=indexPathAfterUpdate) NSIndexPath* indexPathAfterUpdate; 20 | @property(readonly, getter=updateAction) MAICollectionUpdateAction updateAction; 21 | 22 | #if TARGET_OS_IPHONE 23 | #else 24 | #endif 25 | 26 | @end 27 | 28 | #if TARGET_OS_IPHONE 29 | @interface MAICollectionViewUpdateItem : UICollectionViewUpdateItem 30 | #else 31 | @interface MAICollectionViewUpdateItem : NSCollectionViewUpdateItem 32 | #endif 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | 37 | #pragma clang diagnostic pop 38 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAICollectionViewUpdateItem.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAICollectionViewUpdateItem.h" 5 | 6 | @implementation MAICollectionViewUpdateItem 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIColor.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIColor.h" 5 | 6 | @implementation MAIColor 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIControl.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIControl.h" 5 | 6 | @implementation MAIControl 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIDataAsset.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIDataAssetProtocol 18 | -(instancetype)init NS_UNAVAILABLE; 19 | -(nullable instancetype)initWithName:(NSString*)name; 20 | -(nullable instancetype)initWithName:(NSString*)name bundle:(NSBundle*)bundle; 21 | @property(readonly, getter=name) NSString* name; 22 | @property(readonly, getter=data) NSData* data; 23 | @property(readonly, getter=typeIdentifier) NSString* typeIdentifier; 24 | 25 | #if TARGET_OS_IPHONE 26 | #else 27 | #endif 28 | 29 | @end 30 | 31 | #if TARGET_OS_IPHONE 32 | @interface MAIDataAsset : NSDataAsset 33 | #else 34 | @interface MAIDataAsset : NSDataAsset 35 | #endif 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | 40 | #pragma clang diagnostic pop 41 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIDataAsset.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIDataAsset.h" 5 | 6 | @implementation MAIDataAsset 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIDatePicker.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIDatePicker.h" 5 | 6 | @implementation MAIDatePicker 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIDeclarations.h: -------------------------------------------------------------------------------- 1 | @protocol MAILayoutManagerDelegate; 2 | @protocol MAITextLayoutOrientationProvider; 3 | @protocol MAITextAttachmentContainer; 4 | @protocol MAITextStorageDelegate; 5 | @protocol MAIApplicationDelegate; 6 | @protocol MAICollectionViewDataSource; 7 | @protocol MAICollectionViewDelegate; 8 | @protocol MAICollectionViewDelegateFlowLayout; 9 | @protocol MAIGestureRecognizerDelegate; 10 | @protocol MAITableViewDataSource; 11 | @protocol MAITableViewDelegate; 12 | @protocol MAITextFieldDelegate; 13 | @protocol MAITextInput; 14 | @protocol MAITextViewDelegate; 15 | @protocol MAIToolbarDelegate; 16 | 17 | @class MAIDataAsset; 18 | @protocol MAIDataAssetProtocol; 19 | @class MAILayoutXAxisAnchor; 20 | @protocol MAILayoutXAxisAnchorProtocol; 21 | @class MAILayoutYAxisAnchor; 22 | @protocol MAILayoutYAxisAnchorProtocol; 23 | @class MAILayoutDimension; 24 | @protocol MAILayoutDimensionProtocol; 25 | @class MAILayoutConstraint; 26 | @protocol MAILayoutConstraintProtocol; 27 | @class MAILayoutManager; 28 | @protocol MAILayoutManagerProtocol; 29 | @class MAITextTab; 30 | @protocol MAITextTabProtocol; 31 | @class MAIParagraphStyle; 32 | @protocol MAIParagraphStyleProtocol; 33 | @class MAIMutableParagraphStyle; 34 | @protocol MAIMutableParagraphStyleProtocol; 35 | @class MAIShadow; 36 | @protocol MAIShadowProtocol; 37 | @class MAIStringDrawingContext; 38 | @protocol MAIStringDrawingContextProtocol; 39 | @class MAITextAttachment; 40 | @protocol MAITextAttachmentProtocol; 41 | @class MAITextContainer; 42 | @protocol MAITextContainerProtocol; 43 | @class MAITextStorage; 44 | @protocol MAITextStorageProtocol; 45 | @class MAIAccessibilityElement; 46 | @protocol MAIAccessibilityElementProtocol; 47 | @class MAIApplication; 48 | @protocol MAIApplicationProtocol; 49 | @class MAIBezierPath; 50 | @protocol MAIBezierPathProtocol; 51 | @class MAIButton; 52 | @protocol MAIButtonProtocol; 53 | @class MAICollectionView; 54 | @protocol MAICollectionViewProtocol; 55 | @class MAICollectionViewFlowLayoutInvalidationContext; 56 | @protocol MAICollectionViewFlowLayoutInvalidationContextProtocol; 57 | @class MAICollectionViewFlowLayout; 58 | @protocol MAICollectionViewFlowLayoutProtocol; 59 | @class MAICollectionViewLayoutAttributes; 60 | @protocol MAICollectionViewLayoutAttributesProtocol; 61 | @class MAICollectionViewUpdateItem; 62 | @protocol MAICollectionViewUpdateItemProtocol; 63 | @class MAICollectionViewLayoutInvalidationContext; 64 | @protocol MAICollectionViewLayoutInvalidationContextProtocol; 65 | @class MAICollectionViewLayout; 66 | @protocol MAICollectionViewLayoutProtocol; 67 | @class MAICollectionViewTransitionLayout; 68 | @protocol MAICollectionViewTransitionLayoutProtocol; 69 | @class MAIColor; 70 | @protocol MAIColorProtocol; 71 | @class MAIControl; 72 | @protocol MAIControlProtocol; 73 | @class MAIDatePicker; 74 | @protocol MAIDatePickerProtocol; 75 | @class MAIDocument; 76 | @protocol MAIDocumentProtocol; 77 | @class MAIEvent; 78 | @protocol MAIEventProtocol; 79 | @class MAIFont; 80 | @protocol MAIFontProtocol; 81 | @class MAIFontDescriptor; 82 | @protocol MAIFontDescriptorProtocol; 83 | @class MAIGestureRecognizer; 84 | @protocol MAIGestureRecognizerProtocol; 85 | @class MAIImage; 86 | @protocol MAIImageProtocol; 87 | @class MAIImageView; 88 | @protocol MAIImageViewProtocol; 89 | @class MAILayoutGuide; 90 | @protocol MAILayoutGuideProtocol; 91 | @class MAIMenuItem; 92 | @protocol MAIMenuItemProtocol; 93 | @class MAINib; 94 | @protocol MAINibProtocol; 95 | @class MAIPanGestureRecognizer; 96 | @protocol MAIPanGestureRecognizerProtocol; 97 | @class MAIPasteboard; 98 | @protocol MAIPasteboardProtocol; 99 | @class MAIPrinter; 100 | @protocol MAIPrinterProtocol; 101 | @class MAIPrintInfo; 102 | @protocol MAIPrintInfoProtocol; 103 | @class MAIResponder; 104 | @protocol MAIResponderProtocol; 105 | @class MAIRotationGestureRecognizer; 106 | @protocol MAIRotationGestureRecognizerProtocol; 107 | @class MAIScreen; 108 | @protocol MAIScreenProtocol; 109 | @class MAIScrollView; 110 | @protocol MAIScrollViewProtocol; 111 | @class MAISegmentedControl; 112 | @protocol MAISegmentedControlProtocol; 113 | @class MAISlider; 114 | @protocol MAISliderProtocol; 115 | @class MAISplitViewController; 116 | @protocol MAISplitViewControllerProtocol; 117 | @class MAIStackView; 118 | @protocol MAIStackViewProtocol; 119 | @class MAIStepper; 120 | @protocol MAIStepperProtocol; 121 | @class MAIStoryboard; 122 | @protocol MAIStoryboardProtocol; 123 | @class MAIStoryboardSegue; 124 | @protocol MAIStoryboardSegueProtocol; 125 | @class MAITableViewRowAction; 126 | @protocol MAITableViewRowActionProtocol; 127 | @class MAITableView; 128 | @protocol MAITableViewProtocol; 129 | @class MAITextField; 130 | @protocol MAITextFieldProtocol; 131 | @class MAITextView; 132 | @protocol MAITextViewProtocol; 133 | @class MAIToolbar; 134 | @protocol MAIToolbarProtocol; 135 | @class MAITouch; 136 | @protocol MAITouchProtocol; 137 | @class MAIView; 138 | @protocol MAIViewProtocol; 139 | @class MAIViewController; 140 | @protocol MAIViewControllerProtocol; 141 | @class MAIVisualEffectView; 142 | @protocol MAIVisualEffectViewProtocol; 143 | @class MAIWindow; 144 | @protocol MAIWindowProtocol; 145 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIDocument.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIDocumentProtocol 18 | -(void)updateUserActivityState:(NSUserActivity*)userActivity __TVOS_PROHIBITED; 19 | -(void)restoreUserActivityState:(NSUserActivity*)userActivity __TVOS_PROHIBITED; 20 | @property(nullable, setter=setFileModificationDate:, getter=fileModificationDate) NSDate* fileModificationDate __TVOS_PROHIBITED; 21 | @property(setter=setUndoManager:, getter=undoManager) NSUndoManager* undoManager __TVOS_PROHIBITED; 22 | @property(nullable, setter=setUserActivity:, getter=userActivity) NSUserActivity* userActivity __TVOS_PROHIBITED; 23 | 24 | #if TARGET_OS_IPHONE 25 | -(instancetype)initWithFileURL:(NSURL*)url NS_UNAVAILABLE; 26 | #else 27 | -(instancetype)init NS_UNAVAILABLE; 28 | -(nullable instancetype)initWithType:(NSString*)typeName error:(NSError**)outError NS_UNAVAILABLE; 29 | +(BOOL)canConcurrentlyReadDocumentsOfType:(NSString*)typeName NS_UNAVAILABLE; 30 | -(nullable instancetype)initWithContentsOfURL:(NSURL*)url ofType:(NSString*)typeName error:(NSError**)outError NS_UNAVAILABLE; 31 | -(nullable instancetype)initForURL:(nullable NSURL*)urlOrNil withContentsOfURL:(NSURL*)contentsURL ofType:(NSString*)typeName error:(NSError**)outError NS_UNAVAILABLE; 32 | +(BOOL)autosavesInPlace NS_UNAVAILABLE; 33 | +(BOOL)preservesVersions NS_UNAVAILABLE; 34 | +(BOOL)autosavesDrafts NS_UNAVAILABLE; 35 | +(BOOL)isNativeType:(NSString*)type NS_UNAVAILABLE; 36 | +(BOOL)usesUbiquitousStorage NS_UNAVAILABLE; 37 | #endif 38 | 39 | @end 40 | 41 | #if TARGET_OS_IPHONE 42 | @interface MAIDocument : UIDocument 43 | #else 44 | @interface MAIDocument : NSDocument 45 | #endif 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | 50 | #pragma clang diagnostic pop 51 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIDocument.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIDocument.h" 5 | 6 | @implementation MAIDocument 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIEvent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIEventProtocol 18 | @property(readonly, getter=timestamp) NSTimeInterval timestamp; 19 | 20 | #if TARGET_OS_IPHONE 21 | #else 22 | +(nullable id)eventWithEventRef:(const void*)eventRef NS_UNAVAILABLE; 23 | +(nullable id)eventWithCGEvent:(CGEventRef)cgEvent NS_UNAVAILABLE; 24 | +(void)setMouseCoalescingEnabled:(BOOL)flag NS_UNAVAILABLE; 25 | +(BOOL)isMouseCoalescingEnabled NS_UNAVAILABLE; 26 | +(BOOL)isSwipeTrackingFromScrollEventsEnabled NS_UNAVAILABLE; 27 | +(void)startPeriodicEventsAfterDelay:(NSTimeInterval)delay withPeriod:(NSTimeInterval)period NS_UNAVAILABLE; 28 | +(void)stopPeriodicEvents NS_UNAVAILABLE; 29 | +(nullable id)mouseEventWithType:(NSEventType)type location:(CGPoint)location modifierFlags:(NSEventModifierFlags)flags timestamp:(NSTimeInterval)time windowNumber:(NSInteger)wNum context:(nullable NSGraphicsContext* __unused)unusedPassNil eventNumber:(NSInteger)eNum clickCount:(NSInteger)cNum pressure:(float)pressure NS_UNAVAILABLE; 30 | +(nullable id)keyEventWithType:(NSEventType)type location:(CGPoint)location modifierFlags:(NSEventModifierFlags)flags timestamp:(NSTimeInterval)time windowNumber:(NSInteger)wNum context:(nullable NSGraphicsContext* __unused)unusedPassNil characters:(NSString*)keys charactersIgnoringModifiers:(NSString*)ukeys isARepeat:(BOOL)flag keyCode:(unsigned short)code NS_UNAVAILABLE; 31 | +(nullable id)enterExitEventWithType:(NSEventType)type location:(CGPoint)location modifierFlags:(NSEventModifierFlags)flags timestamp:(NSTimeInterval)time windowNumber:(NSInteger)wNum context:(nullable NSGraphicsContext* __unused)unusedPassNil eventNumber:(NSInteger)eNum trackingNumber:(NSInteger)tNum userData:(nullable void*)data NS_UNAVAILABLE; 32 | +(nullable id)otherEventWithType:(NSEventType)type location:(CGPoint)location modifierFlags:(NSEventModifierFlags)flags timestamp:(NSTimeInterval)time windowNumber:(NSInteger)wNum context:(nullable NSGraphicsContext* __unused)unusedPassNil subtype:(short)subtype data1:(NSInteger)d1 data2:(NSInteger)d2 NS_UNAVAILABLE; 33 | +(CGPoint)mouseLocation NS_UNAVAILABLE; 34 | +(NSEventModifierFlags)modifierFlags NS_UNAVAILABLE; 35 | +(NSUInteger)pressedMouseButtons NS_UNAVAILABLE; 36 | +(NSTimeInterval)doubleClickInterval NS_UNAVAILABLE; 37 | +(NSTimeInterval)keyRepeatDelay NS_UNAVAILABLE; 38 | +(NSTimeInterval)keyRepeatInterval NS_UNAVAILABLE; 39 | +(nullable id)addGlobalMonitorForEventsMatchingMask:(NSEventMask)mask handler:(void (^)(MAIEvent*))block NS_UNAVAILABLE; 40 | +(nullable id)addLocalMonitorForEventsMatchingMask:(NSEventMask)mask handler:(MAIEvent* __nullable (^)(MAIEvent*))block NS_UNAVAILABLE; 41 | +(void)removeMonitor:(id)eventMonitor NS_UNAVAILABLE; 42 | #endif 43 | 44 | @end 45 | 46 | #if TARGET_OS_IPHONE 47 | @interface MAIEvent : UIEvent 48 | #else 49 | @interface MAIEvent : NSEvent 50 | #endif 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | 55 | #pragma clang diagnostic pop 56 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIEvent.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIEvent.h" 5 | 6 | @implementation MAIEvent 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIFont.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIFontProtocol 18 | +(nullable id)fontWithName:(NSString*)fontName size:(CGFloat)fontSize; 19 | +(id)systemFontOfSize:(CGFloat)fontSize; 20 | +(id)boldSystemFontOfSize:(CGFloat)fontSize; 21 | +(id)systemFontOfSize:(CGFloat)fontSize weight:(CGFloat)weight; 22 | +(id)monospacedDigitSystemFontOfSize:(CGFloat)fontSize weight:(CGFloat)weight; 23 | +(id)fontWithDescriptor:(id)descriptor size:(CGFloat)pointSize; 24 | +(CGFloat)labelFontSize __TVOS_PROHIBITED; 25 | +(CGFloat)smallSystemFontSize __TVOS_PROHIBITED; 26 | +(CGFloat)systemFontSize __TVOS_PROHIBITED; 27 | @property(readonly, getter=familyName) NSString* familyName; 28 | @property(readonly, getter=fontName) NSString* fontName; 29 | @property(readonly, getter=pointSize) CGFloat pointSize; 30 | @property(readonly, getter=ascender) CGFloat ascender; 31 | @property(readonly, getter=descender) CGFloat descender; 32 | @property(readonly, getter=capHeight) CGFloat capHeight; 33 | @property(readonly, getter=xHeight) CGFloat xHeight; 34 | @property(readonly, getter=leading) CGFloat leading; 35 | @property(readonly, getter=fontDescriptor) id fontDescriptor; 36 | 37 | #if TARGET_OS_IPHONE 38 | +(id)preferredFontForTextStyle:(NSString*)style NS_UNAVAILABLE; 39 | +(id)preferredFontForTextStyle:(NSString*)style compatibleWithTraitCollection:(nullable UITraitCollection*)traitCollection NS_UNAVAILABLE; 40 | +(id)italicSystemFontOfSize:(CGFloat)fontSize NS_UNAVAILABLE; 41 | +(CGFloat)buttonFontSize NS_UNAVAILABLE; 42 | #else 43 | +(nullable id)fontWithName:(NSString*)fontName matrix:(const CGFloat*)fontMatrix NS_UNAVAILABLE; 44 | +(nullable id)fontWithDescriptor:(id)fontDescriptor textTransform:(nullable NSAffineTransform*)textTransform NS_UNAVAILABLE; 45 | +(nullable id)userFontOfSize:(CGFloat)fontSize NS_UNAVAILABLE; 46 | +(nullable id)userFixedPitchFontOfSize:(CGFloat)fontSize NS_UNAVAILABLE; 47 | +(void)setUserFont:(nullable id)font NS_UNAVAILABLE; 48 | +(void)setUserFixedPitchFont:(nullable id)font NS_UNAVAILABLE; 49 | +(id)labelFontOfSize:(CGFloat)fontSize NS_UNAVAILABLE; 50 | +(id)titleBarFontOfSize:(CGFloat)fontSize NS_UNAVAILABLE; 51 | +(id)menuFontOfSize:(CGFloat)fontSize NS_UNAVAILABLE; 52 | +(id)menuBarFontOfSize:(CGFloat)fontSize NS_UNAVAILABLE; 53 | +(id)messageFontOfSize:(CGFloat)fontSize NS_UNAVAILABLE; 54 | +(id)paletteFontOfSize:(CGFloat)fontSize NS_UNAVAILABLE; 55 | +(id)toolTipsFontOfSize:(CGFloat)fontSize NS_UNAVAILABLE; 56 | +(id)controlContentFontOfSize:(CGFloat)fontSize NS_UNAVAILABLE; 57 | +(CGFloat)systemFontSizeForControlSize:(NSControlSize)controlSize NS_UNAVAILABLE; 58 | #endif 59 | 60 | @end 61 | 62 | #if TARGET_OS_IPHONE 63 | @interface MAIFont : UIFont 64 | #else 65 | @interface MAIFont : NSFont 66 | #endif 67 | @end 68 | 69 | NS_ASSUME_NONNULL_END 70 | 71 | #pragma clang diagnostic pop 72 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIFont.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIFont.h" 5 | 6 | @implementation MAIFont 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIFontDescriptor.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIFontDescriptorProtocol 18 | -(nullable id)objectForKey:(NSString*)anAttribute; 19 | +(id)fontDescriptorWithName:(NSString*)fontName size:(CGFloat)size; 20 | -(id)fontDescriptorByAddingAttributes:(NSDictionary*)attributes; 21 | -(id)fontDescriptorWithSize:(CGFloat)newPointSize; 22 | -(id)fontDescriptorWithFace:(NSString*)newFace; 23 | -(id)fontDescriptorWithFamily:(NSString*)newFamily; 24 | @property(readonly, getter=postscriptName) NSString* postscriptName; 25 | @property(readonly, getter=pointSize) CGFloat pointSize; 26 | 27 | #if TARGET_OS_IPHONE 28 | -(instancetype)init NS_UNAVAILABLE; 29 | -(nullable instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; 30 | +(id)preferredFontDescriptorWithTextStyle:(NSString*)style NS_UNAVAILABLE; 31 | +(id)preferredFontDescriptorWithTextStyle:(NSString*)style compatibleWithTraitCollection:(nullable UITraitCollection*)traitCollection NS_UNAVAILABLE; 32 | #else 33 | #endif 34 | 35 | @end 36 | 37 | #if TARGET_OS_IPHONE 38 | @interface MAIFontDescriptor : UIFontDescriptor 39 | #else 40 | @interface MAIFontDescriptor : NSFontDescriptor 41 | #endif 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | 46 | #pragma clang diagnostic pop 47 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIFontDescriptor.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIFontDescriptor.h" 5 | 6 | @implementation MAIFontDescriptor 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIGestureRecognizer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIGestureRecognizerProtocol 18 | -(CGPoint)locationInView:(nullable id)view; 19 | @property(nullable, setter=setDelegate:, getter=delegate) id delegate; 20 | @property(setter=setEnabled:, getter=isEnabled) BOOL enabled; 21 | @property(readonly, nullable, getter=view) id view; 22 | 23 | #if TARGET_OS_IPHONE 24 | #else 25 | -(nullable instancetype)initWithCoder:(NSCoder*)coder NS_UNAVAILABLE; 26 | #endif 27 | 28 | @end 29 | 30 | #if TARGET_OS_IPHONE 31 | @interface MAIGestureRecognizer : UIGestureRecognizer 32 | #else 33 | @interface MAIGestureRecognizer : NSGestureRecognizer 34 | #endif 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | 39 | #pragma clang diagnostic pop 40 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIGestureRecognizer.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIGestureRecognizer.h" 5 | 6 | @implementation MAIGestureRecognizer 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIImage.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIImageProtocol 18 | +(nullable id)imageNamed:(NSString*)name; 19 | -(nullable instancetype)initWithContentsOfFile:(NSString*)path; 20 | -(nullable instancetype)initWithData:(NSData*)data; 21 | -(void)drawInRect:(CGRect)rect; 22 | 23 | #if TARGET_OS_IPHONE 24 | +(nullable id)imageNamed:(NSString*)name inBundle:(nullable NSBundle*)bundle compatibleWithTraitCollection:(nullable UITraitCollection*)traitCollection NS_UNAVAILABLE; 25 | +(nullable id)imageWithContentsOfFile:(NSString*)path NS_UNAVAILABLE; 26 | +(nullable id)imageWithData:(NSData*)data NS_UNAVAILABLE; 27 | +(nullable id)imageWithData:(NSData*)data scale:(CGFloat)scale NS_UNAVAILABLE; 28 | +(id)imageWithCGImage:(CGImageRef)cgImage NS_UNAVAILABLE; 29 | +(id)imageWithCGImage:(CGImageRef)cgImage scale:(CGFloat)scale orientation:(UIImageOrientation)orientation NS_UNAVAILABLE; 30 | +(id)imageWithCIImage:(CIImage*)ciImage NS_UNAVAILABLE; 31 | +(id)imageWithCIImage:(CIImage*)ciImage scale:(CGFloat)scale orientation:(UIImageOrientation)orientation NS_UNAVAILABLE; 32 | -(nullable instancetype)initWithData:(NSData*)data scale:(CGFloat)scale NS_UNAVAILABLE; 33 | -(instancetype)initWithCGImage:(CGImageRef)cgImage NS_UNAVAILABLE; 34 | -(instancetype)initWithCGImage:(CGImageRef)cgImage scale:(CGFloat)scale orientation:(UIImageOrientation)orientation NS_UNAVAILABLE; 35 | -(instancetype)initWithCIImage:(CIImage*)ciImage NS_UNAVAILABLE; 36 | -(instancetype)initWithCIImage:(CIImage*)ciImage scale:(CGFloat)scale orientation:(UIImageOrientation)orientation NS_UNAVAILABLE; 37 | +(nullable id)animatedImageNamed:(NSString*)name duration:(NSTimeInterval)duration NS_UNAVAILABLE; 38 | +(nullable id)animatedResizableImageNamed:(NSString*)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration NS_UNAVAILABLE; 39 | +(nullable id)animatedResizableImageNamed:(NSString*)name capInsets:(UIEdgeInsets)capInsets resizingMode:(UIImageResizingMode)resizingMode duration:(NSTimeInterval)duration NS_UNAVAILABLE; 40 | +(nullable id)animatedImageWithImages:(NSArray*)images duration:(NSTimeInterval)duration NS_UNAVAILABLE; 41 | #else 42 | -(instancetype)initWithSize:(NSSize)size NS_UNAVAILABLE; 43 | -(nullable instancetype)initWithContentsOfURL:(NSURL*)url NS_UNAVAILABLE; 44 | -(nullable instancetype)initByReferencingFile:(NSString*)fileName NS_UNAVAILABLE; 45 | -(instancetype)initByReferencingURL:(NSURL*)url NS_UNAVAILABLE; 46 | -(instancetype)initWithIconRef:(IconRef)iconRef NS_UNAVAILABLE; 47 | -(nullable instancetype)initWithPasteboard:(id)pasteboard NS_UNAVAILABLE; 48 | -(nullable instancetype)initWithDataIgnoringOrientation:(NSData*)data NS_UNAVAILABLE; 49 | +(id)imageWithSize:(NSSize)size flipped:(BOOL)drawingHandlerShouldBeCalledWithFlippedContext drawingHandler:(BOOL (^)(CGRect dstRect))drawingHandler NS_UNAVAILABLE; 50 | +(BOOL)canInitWithPasteboard:(id)pasteboard NS_UNAVAILABLE; 51 | -(instancetype)initWithCGImage:(CGImageRef)cgImage size:(NSSize)size NS_UNAVAILABLE; 52 | #endif 53 | 54 | @end 55 | 56 | #if TARGET_OS_IPHONE 57 | @interface MAIImage : UIImage 58 | #else 59 | @interface MAIImage : NSImage 60 | #endif 61 | @end 62 | 63 | NS_ASSUME_NONNULL_END 64 | 65 | #pragma clang diagnostic pop 66 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIImage.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIImage.h" 5 | 6 | @implementation MAIImage 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIImageView.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIImageView.h" 5 | 6 | @implementation MAIImageView 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIKit.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if TARGET_OS_IPHONE 4 | @import UIKit; 5 | #else 6 | @import Cocoa; 7 | #endif 8 | 9 | FOUNDATION_EXPORT double MAIKitVersionNumber; 10 | 11 | FOUNDATION_EXPORT const unsigned char MAIKitVersionString[]; 12 | 13 | #import "MAIDataAsset.h" 14 | #import "MAILayoutXAxisAnchor.h" 15 | #import "MAILayoutYAxisAnchor.h" 16 | #import "MAILayoutDimension.h" 17 | #import "MAILayoutConstraint.h" 18 | #import "MAILayoutManager.h" 19 | #import "MAITextTab.h" 20 | #import "MAIParagraphStyle.h" 21 | #import "MAIMutableParagraphStyle.h" 22 | #import "MAIShadow.h" 23 | #import "MAIStringDrawingContext.h" 24 | #import "MAITextAttachment.h" 25 | #import "MAITextContainer.h" 26 | #import "MAITextStorage.h" 27 | #import "MAIAccessibilityElement.h" 28 | #import "MAIApplication.h" 29 | #import "MAIBezierPath.h" 30 | #import "MAIButton.h" 31 | #import "MAICollectionView.h" 32 | #import "MAICollectionViewFlowLayoutInvalidationContext.h" 33 | #import "MAICollectionViewFlowLayout.h" 34 | #import "MAICollectionViewLayoutAttributes.h" 35 | #import "MAICollectionViewUpdateItem.h" 36 | #import "MAICollectionViewLayoutInvalidationContext.h" 37 | #import "MAICollectionViewLayout.h" 38 | #import "MAICollectionViewTransitionLayout.h" 39 | #import "MAIColor.h" 40 | #import "MAIControl.h" 41 | #import "MAIDatePicker.h" 42 | #import "MAIDocument.h" 43 | #import "MAIEvent.h" 44 | #import "MAIFont.h" 45 | #import "MAIFontDescriptor.h" 46 | #import "MAIGestureRecognizer.h" 47 | #import "MAIImage.h" 48 | #import "MAIImageView.h" 49 | #import "MAILayoutGuide.h" 50 | #import "MAIMenuItem.h" 51 | #import "MAINib.h" 52 | #import "MAIPanGestureRecognizer.h" 53 | #import "MAIPasteboard.h" 54 | #import "MAIPrinter.h" 55 | #import "MAIPrintInfo.h" 56 | #import "MAIResponder.h" 57 | #import "MAIRotationGestureRecognizer.h" 58 | #import "MAIScreen.h" 59 | #import "MAIScrollView.h" 60 | #import "MAISegmentedControl.h" 61 | #import "MAISlider.h" 62 | #import "MAISplitViewController.h" 63 | #import "MAIStackView.h" 64 | #import "MAIStepper.h" 65 | #import "MAIStoryboard.h" 66 | #import "MAIStoryboardSegue.h" 67 | #import "MAITableViewRowAction.h" 68 | #import "MAITableView.h" 69 | #import "MAITextField.h" 70 | #import "MAITextView.h" 71 | #import "MAIToolbar.h" 72 | #import "MAITouch.h" 73 | #import "MAIView.h" 74 | #import "MAIViewController.h" 75 | #import "MAIVisualEffectView.h" 76 | #import "MAIWindow.h" 77 | 78 | #import "MAILayoutManagerDelegate.h" 79 | #import "MAITextLayoutOrientationProvider.h" 80 | #import "MAITextAttachmentContainer.h" 81 | #import "MAITextStorageDelegate.h" 82 | #import "MAIApplicationDelegate.h" 83 | #import "MAICollectionViewDataSource.h" 84 | #import "MAICollectionViewDelegate.h" 85 | #import "MAICollectionViewDelegateFlowLayout.h" 86 | #import "MAIGestureRecognizerDelegate.h" 87 | #import "MAITableViewDataSource.h" 88 | #import "MAITableViewDelegate.h" 89 | #import "MAITextFieldDelegate.h" 90 | #import "MAITextInput.h" 91 | #import "MAITextViewDelegate.h" 92 | #import "MAIToolbarDelegate.h" 93 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAILayoutConstraint.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAILayoutConstraintProtocol 18 | +(instancetype)constraintWithItem:(id)view1 attribute:(MAILayoutAttribute)attr1 relatedBy:(MAILayoutRelation)relation toItem:(nullable id)view2 attribute:(MAILayoutAttribute)attr2 multiplier:(CGFloat)multiplier constant:(CGFloat)c; 19 | +(void)activateConstraints:(NSArray*)constraints; 20 | +(void)deactivateConstraints:(NSArray*)constraints; 21 | @property(setter=setShouldBeArchived:, getter=shouldBeArchived) BOOL shouldBeArchived; 22 | @property(readonly, getter=firstItem) id firstItem; 23 | @property(readonly, getter=firstAttribute) MAILayoutAttribute firstAttribute; 24 | @property(readonly, nullable, getter=secondItem) id secondItem; 25 | @property(readonly, getter=secondAttribute) MAILayoutAttribute secondAttribute; 26 | @property(readonly, getter=firstAnchor) NSLayoutAnchor* firstAnchor; 27 | @property(readonly, nullable, getter=secondAnchor) NSLayoutAnchor* secondAnchor; 28 | @property(readonly, getter=relation) MAILayoutRelation relation; 29 | @property(readonly, getter=multiplier) CGFloat multiplier; 30 | @property(setter=setConstant:, getter=constant) CGFloat constant; 31 | @property(setter=setActive:, getter=isActive) BOOL active; 32 | @property(nullable, setter=setIdentifier:, getter=identifier) NSString* identifier; 33 | 34 | #if TARGET_OS_IPHONE 35 | #else 36 | #endif 37 | 38 | @end 39 | 40 | #if TARGET_OS_IPHONE 41 | @interface MAILayoutConstraint : NSLayoutConstraint 42 | #else 43 | @interface MAILayoutConstraint : NSLayoutConstraint 44 | #endif 45 | @end 46 | 47 | NS_ASSUME_NONNULL_END 48 | 49 | #pragma clang diagnostic pop 50 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAILayoutConstraint.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAILayoutConstraint.h" 5 | 6 | @implementation MAILayoutConstraint 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAILayoutDimension.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAILayoutDimensionProtocol 18 | -(id)constraintEqualToConstant:(CGFloat)c; 19 | -(id)constraintGreaterThanOrEqualToConstant:(CGFloat)c; 20 | -(id)constraintLessThanOrEqualToConstant:(CGFloat)c; 21 | -(id)constraintEqualToAnchor:(id)anchor multiplier:(CGFloat)m; 22 | -(id)constraintGreaterThanOrEqualToAnchor:(id)anchor multiplier:(CGFloat)m; 23 | -(id)constraintLessThanOrEqualToAnchor:(id)anchor multiplier:(CGFloat)m; 24 | -(id)constraintEqualToAnchor:(id)anchor multiplier:(CGFloat)m constant:(CGFloat)c; 25 | -(id)constraintGreaterThanOrEqualToAnchor:(id)anchor multiplier:(CGFloat)m constant:(CGFloat)c; 26 | -(id)constraintLessThanOrEqualToAnchor:(id)anchor multiplier:(CGFloat)m constant:(CGFloat)c; 27 | 28 | #if TARGET_OS_IPHONE 29 | #else 30 | #endif 31 | 32 | @end 33 | 34 | #if TARGET_OS_IPHONE 35 | @interface MAILayoutDimension : NSLayoutDimension 36 | #else 37 | @interface MAILayoutDimension : NSLayoutDimension 38 | #endif 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | 43 | #pragma clang diagnostic pop 44 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAILayoutDimension.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAILayoutDimension.h" 5 | 6 | @implementation MAILayoutDimension 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAILayoutGuide.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAILayoutGuideProtocol 18 | @property(nullable, setter=setOwningView:, getter=owningView) id owningView; 19 | @property(setter=setIdentifier:, getter=identifier) NSString* identifier; 20 | @property(readonly, getter=leadingAnchor) id leadingAnchor; 21 | @property(readonly, getter=trailingAnchor) id trailingAnchor; 22 | @property(readonly, getter=leftAnchor) id leftAnchor; 23 | @property(readonly, getter=rightAnchor) id rightAnchor; 24 | @property(readonly, getter=topAnchor) id topAnchor; 25 | @property(readonly, getter=bottomAnchor) id bottomAnchor; 26 | @property(readonly, getter=widthAnchor) id widthAnchor; 27 | @property(readonly, getter=heightAnchor) id heightAnchor; 28 | @property(readonly, getter=centerXAnchor) id centerXAnchor; 29 | @property(readonly, getter=centerYAnchor) id centerYAnchor; 30 | @property(readonly, getter=hasAmbiguousLayout) BOOL hasAmbiguousLayout; 31 | 32 | #if TARGET_OS_IPHONE 33 | #else 34 | #endif 35 | 36 | @end 37 | 38 | #if TARGET_OS_IPHONE 39 | @interface MAILayoutGuide : UILayoutGuide 40 | #else 41 | @interface MAILayoutGuide : NSLayoutGuide 42 | #endif 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | 47 | #pragma clang diagnostic pop 48 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAILayoutGuide.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAILayoutGuide.h" 5 | 6 | @implementation MAILayoutGuide 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAILayoutManager.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAILayoutManager.h" 5 | 6 | @implementation MAILayoutManager 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAILayoutXAxisAnchor.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAILayoutXAxisAnchorProtocol 18 | 19 | #if TARGET_OS_IPHONE 20 | #else 21 | #endif 22 | 23 | @end 24 | 25 | #if TARGET_OS_IPHONE 26 | @interface MAILayoutXAxisAnchor : NSLayoutXAxisAnchor 27 | #else 28 | @interface MAILayoutXAxisAnchor : NSLayoutXAxisAnchor 29 | #endif 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | 34 | #pragma clang diagnostic pop 35 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAILayoutXAxisAnchor.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAILayoutXAxisAnchor.h" 5 | 6 | @implementation MAILayoutXAxisAnchor 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAILayoutYAxisAnchor.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAILayoutYAxisAnchorProtocol 18 | 19 | #if TARGET_OS_IPHONE 20 | #else 21 | #endif 22 | 23 | @end 24 | 25 | #if TARGET_OS_IPHONE 26 | @interface MAILayoutYAxisAnchor : NSLayoutYAxisAnchor 27 | #else 28 | @interface MAILayoutYAxisAnchor : NSLayoutYAxisAnchor 29 | #endif 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | 34 | #pragma clang diagnostic pop 35 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAILayoutYAxisAnchor.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAILayoutYAxisAnchor.h" 5 | 6 | @implementation MAILayoutYAxisAnchor 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIMenuItem.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIMenuItemProtocol 18 | @property(setter=setTitle:, getter=title) NSString* title; 19 | @property(setter=setAction:, getter=action) SEL action; 20 | 21 | #if TARGET_OS_IPHONE 22 | -(instancetype)initWithTitle:(NSString*)title action:(SEL)action NS_UNAVAILABLE; 23 | #else 24 | +(void)setUsesUserKeyEquivalents:(BOOL)flag NS_UNAVAILABLE; 25 | +(BOOL)usesUserKeyEquivalents NS_UNAVAILABLE; 26 | +(id)separatorItem NS_UNAVAILABLE; 27 | -(instancetype)initWithTitle:(NSString*)string action:(nullable SEL)selector keyEquivalent:(NSString*)charCode NS_UNAVAILABLE; 28 | -(instancetype)initWithCoder:(NSCoder*)decoder NS_UNAVAILABLE; 29 | #endif 30 | 31 | @end 32 | 33 | #if TARGET_OS_IPHONE 34 | @interface MAIMenuItem : UIMenuItem 35 | #else 36 | @interface MAIMenuItem : NSMenuItem 37 | #endif 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | 42 | #pragma clang diagnostic pop 43 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIMenuItem.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIMenuItem.h" 5 | 6 | @implementation MAIMenuItem 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIMutableParagraphStyle.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIMutableParagraphStyleProtocol 18 | -(void)addTabStop:(id)anObject; 19 | -(void)removeTabStop:(id)anObject; 20 | -(void)setParagraphStyle:(id)obj; 21 | +(id)defaultParagraphStyle; 22 | +(MAIWritingDirection)defaultWritingDirectionForLanguage:(nullable NSString*)languageName; 23 | @property(readonly, getter=lineSpacing) CGFloat lineSpacing; 24 | @property(readonly, getter=paragraphSpacing) CGFloat paragraphSpacing; 25 | @property(readonly, getter=alignment) NSTextAlignment alignment; 26 | @property(readonly, getter=firstLineHeadIndent) CGFloat firstLineHeadIndent; 27 | @property(readonly, getter=headIndent) CGFloat headIndent; 28 | @property(readonly, getter=tailIndent) CGFloat tailIndent; 29 | @property(readonly, getter=lineBreakMode) NSLineBreakMode lineBreakMode; 30 | @property(readonly, getter=minimumLineHeight) CGFloat minimumLineHeight; 31 | @property(readonly, getter=maximumLineHeight) CGFloat maximumLineHeight; 32 | @property(readonly, getter=baseWritingDirection) MAIWritingDirection baseWritingDirection; 33 | @property(readonly, getter=lineHeightMultiple) CGFloat lineHeightMultiple; 34 | @property(readonly, getter=paragraphSpacingBefore) CGFloat paragraphSpacingBefore; 35 | @property(readonly, getter=hyphenationFactor) float hyphenationFactor; 36 | @property(readonly, getter=tabStops) NSArray* tabStops; 37 | @property(readonly, getter=defaultTabInterval) CGFloat defaultTabInterval; 38 | @property(readonly, getter=allowsDefaultTighteningForTruncation) BOOL allowsDefaultTighteningForTruncation; 39 | 40 | #if TARGET_OS_IPHONE 41 | #else 42 | #endif 43 | 44 | @end 45 | 46 | #if TARGET_OS_IPHONE 47 | @interface MAIMutableParagraphStyle : NSMutableParagraphStyle 48 | #else 49 | @interface MAIMutableParagraphStyle : NSMutableParagraphStyle 50 | #endif 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | 55 | #pragma clang diagnostic pop 56 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIMutableParagraphStyle.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIMutableParagraphStyle.h" 5 | 6 | @implementation MAIMutableParagraphStyle 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAINib.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAINibProtocol 18 | 19 | #if TARGET_OS_IPHONE 20 | +(id)nibWithNibName:(NSString*)name bundle:(nullable NSBundle*)bundleOrNil NS_UNAVAILABLE; 21 | +(id)nibWithData:(NSData*)data bundle:(nullable NSBundle*)bundleOrNil NS_UNAVAILABLE; 22 | #else 23 | -(nullable instancetype)initWithNibNamed:(NSString*)nibName bundle:(nullable NSBundle*)bundle NS_UNAVAILABLE; 24 | -(instancetype)initWithNibData:(NSData*)nibData bundle:(nullable NSBundle*)bundle NS_UNAVAILABLE; 25 | #endif 26 | 27 | @end 28 | 29 | #if TARGET_OS_IPHONE 30 | @interface MAINib : UINib 31 | #else 32 | @interface MAINib : NSNib 33 | #endif 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | 38 | #pragma clang diagnostic pop 39 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAINib.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAINib.h" 5 | 6 | @implementation MAINib 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIPanGestureRecognizer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIPanGestureRecognizerProtocol 18 | -(CGPoint)translationInView:(nullable id)view; 19 | -(void)setTranslation:(CGPoint)translation inView:(nullable id)view; 20 | -(CGPoint)velocityInView:(nullable id)view; 21 | -(CGPoint)locationInView:(nullable id)view; 22 | @property(nullable, setter=setDelegate:, getter=delegate) id delegate; 23 | @property(setter=setEnabled:, getter=isEnabled) BOOL enabled; 24 | @property(readonly, nullable, getter=view) id view; 25 | 26 | #if TARGET_OS_IPHONE 27 | #else 28 | -(nullable instancetype)initWithCoder:(NSCoder*)coder NS_UNAVAILABLE; 29 | #endif 30 | 31 | @end 32 | 33 | #if TARGET_OS_IPHONE 34 | @interface MAIPanGestureRecognizer : UIPanGestureRecognizer 35 | #else 36 | @interface MAIPanGestureRecognizer : NSPanGestureRecognizer 37 | #endif 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | 42 | #pragma clang diagnostic pop 43 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIPanGestureRecognizer.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIPanGestureRecognizer.h" 5 | 6 | @implementation MAIPanGestureRecognizer 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIParagraphStyle.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIParagraphStyleProtocol 18 | +(id)defaultParagraphStyle; 19 | +(MAIWritingDirection)defaultWritingDirectionForLanguage:(nullable NSString*)languageName; 20 | @property(readonly, getter=lineSpacing) CGFloat lineSpacing; 21 | @property(readonly, getter=paragraphSpacing) CGFloat paragraphSpacing; 22 | @property(readonly, getter=alignment) NSTextAlignment alignment; 23 | @property(readonly, getter=headIndent) CGFloat headIndent; 24 | @property(readonly, getter=tailIndent) CGFloat tailIndent; 25 | @property(readonly, getter=firstLineHeadIndent) CGFloat firstLineHeadIndent; 26 | @property(readonly, getter=minimumLineHeight) CGFloat minimumLineHeight; 27 | @property(readonly, getter=maximumLineHeight) CGFloat maximumLineHeight; 28 | @property(readonly, getter=lineBreakMode) NSLineBreakMode lineBreakMode; 29 | @property(readonly, getter=baseWritingDirection) MAIWritingDirection baseWritingDirection; 30 | @property(readonly, getter=lineHeightMultiple) CGFloat lineHeightMultiple; 31 | @property(readonly, getter=paragraphSpacingBefore) CGFloat paragraphSpacingBefore; 32 | @property(readonly, getter=hyphenationFactor) float hyphenationFactor; 33 | @property(readonly, getter=tabStops) NSArray* tabStops; 34 | @property(readonly, getter=defaultTabInterval) CGFloat defaultTabInterval; 35 | @property(readonly, getter=allowsDefaultTighteningForTruncation) BOOL allowsDefaultTighteningForTruncation; 36 | 37 | #if TARGET_OS_IPHONE 38 | #else 39 | #endif 40 | 41 | @end 42 | 43 | #if TARGET_OS_IPHONE 44 | @interface MAIParagraphStyle : NSParagraphStyle 45 | #else 46 | @interface MAIParagraphStyle : NSParagraphStyle 47 | #endif 48 | @end 49 | 50 | NS_ASSUME_NONNULL_END 51 | 52 | #pragma clang diagnostic pop 53 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIParagraphStyle.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIParagraphStyle.h" 5 | 6 | @implementation MAIParagraphStyle 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIPasteboard.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIPasteboardProtocol 18 | +(id)generalPasteboard; 19 | +(id)pasteboardWithUniqueName; 20 | @property(readonly, getter=name) NSString* name; 21 | @property(readonly, getter=changeCount) NSInteger changeCount; 22 | 23 | #if TARGET_OS_IPHONE 24 | +(nullable id)pasteboardWithName:(NSString*)pasteboardName create:(BOOL)create NS_UNAVAILABLE; 25 | +(void)removePasteboardWithName:(NSString*)pasteboardName NS_UNAVAILABLE; 26 | #else 27 | +(id)pasteboardWithName:(NSString*)name NS_UNAVAILABLE; 28 | +(id)pasteboardByFilteringFile:(NSString*)filename NS_UNAVAILABLE; 29 | +(id)pasteboardByFilteringData:(NSData*)data ofType:(NSString*)type NS_UNAVAILABLE; 30 | +(id)pasteboardByFilteringTypesInPasteboard:(id)pboard NS_UNAVAILABLE; 31 | #endif 32 | 33 | @end 34 | 35 | #if TARGET_OS_IPHONE 36 | @interface MAIPasteboard : UIPasteboard 37 | #else 38 | @interface MAIPasteboard : NSPasteboard 39 | #endif 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | 44 | #pragma clang diagnostic pop 45 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIPasteboard.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIPasteboard.h" 5 | 6 | @implementation MAIPasteboard 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIPrintInfo.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIPrintInfoProtocol 18 | -(nullable instancetype)initWithCoder:(NSCoder*)aDecoder; 19 | 20 | #if TARGET_OS_IPHONE 21 | +(id)printInfo NS_UNAVAILABLE; 22 | +(id)printInfoWithDictionary:(nullable NSDictionary*)dictionary NS_UNAVAILABLE; 23 | #else 24 | +(void)setSharedPrintInfo:(id)printInfo NS_UNAVAILABLE; 25 | +(id)sharedPrintInfo NS_UNAVAILABLE; 26 | -(instancetype)initWithDictionary:(NSDictionary*)attributes NS_UNAVAILABLE; 27 | -(instancetype)init NS_UNAVAILABLE; 28 | +(nullable id)defaultPrinter NS_UNAVAILABLE; 29 | #endif 30 | 31 | @end 32 | 33 | #if TARGET_OS_IPHONE 34 | @interface MAIPrintInfo : UIPrintInfo 35 | #else 36 | @interface MAIPrintInfo : NSPrintInfo 37 | #endif 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | 42 | #pragma clang diagnostic pop 43 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIPrintInfo.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIPrintInfo.h" 5 | 6 | @implementation MAIPrintInfo 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIPrinter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIPrinterProtocol 18 | 19 | #if TARGET_OS_IPHONE 20 | +(id)printerWithURL:(NSURL*)url NS_UNAVAILABLE; 21 | #else 22 | +(nullable id)printerWithName:(NSString*)name NS_UNAVAILABLE; 23 | +(nullable id)printerWithType:(NSString*)type NS_UNAVAILABLE; 24 | #endif 25 | 26 | @end 27 | 28 | #if TARGET_OS_IPHONE 29 | @interface MAIPrinter : UIPrinter 30 | #else 31 | @interface MAIPrinter : NSPrinter 32 | #endif 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | 37 | #pragma clang diagnostic pop 38 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIPrinter.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIPrinter.h" 5 | 6 | @implementation MAIPrinter 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIResponder.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIResponderProtocol 18 | -(BOOL)becomeFirstResponder; 19 | -(BOOL)resignFirstResponder; 20 | -(void)updateUserActivityState:(NSUserActivity*)activity; 21 | -(void)restoreUserActivityState:(NSUserActivity*)activity; 22 | @property(readonly, nullable, getter=undoManager) NSUndoManager* undoManager; 23 | @property(nullable, setter=setUserActivity:, getter=userActivity) NSUserActivity* userActivity; 24 | 25 | #if TARGET_OS_IPHONE 26 | +(void)clearTextInputContextIdentifier:(NSString*)identifier NS_UNAVAILABLE; 27 | #else 28 | -(instancetype)init NS_UNAVAILABLE; 29 | -(nullable instancetype)initWithCoder:(NSCoder*)coder NS_UNAVAILABLE; 30 | #endif 31 | 32 | @end 33 | 34 | #if TARGET_OS_IPHONE 35 | @interface MAIResponder : UIResponder 36 | #else 37 | @interface MAIResponder : NSResponder 38 | #endif 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | 43 | #pragma clang diagnostic pop 44 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIResponder.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIResponder.h" 5 | 6 | @implementation MAIResponder 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIRotationGestureRecognizer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIRotationGestureRecognizerProtocol 18 | -(CGPoint)locationInView:(nullable id)view; 19 | @property(setter=setRotation:, getter=rotation) CGFloat rotation; 20 | @property(nullable, setter=setDelegate:, getter=delegate) id delegate; 21 | @property(setter=setEnabled:, getter=isEnabled) BOOL enabled; 22 | @property(readonly, nullable, getter=view) id view; 23 | 24 | #if TARGET_OS_IPHONE 25 | #else 26 | -(nullable instancetype)initWithCoder:(NSCoder*)coder NS_UNAVAILABLE; 27 | #endif 28 | 29 | @end 30 | 31 | #if TARGET_OS_IPHONE 32 | @interface MAIRotationGestureRecognizer : UIRotationGestureRecognizer 33 | #else 34 | @interface MAIRotationGestureRecognizer : NSRotationGestureRecognizer 35 | #endif 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | 40 | #pragma clang diagnostic pop 41 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIRotationGestureRecognizer.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIRotationGestureRecognizer.h" 5 | 6 | @implementation MAIRotationGestureRecognizer 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIScreen.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIScreenProtocol 18 | +(id)mainScreen; 19 | 20 | #if TARGET_OS_IPHONE 21 | #else 22 | +(nullable id)deepestScreen NS_UNAVAILABLE; 23 | +(BOOL)screensHaveSeparateSpaces NS_UNAVAILABLE; 24 | #endif 25 | 26 | @end 27 | 28 | #if TARGET_OS_IPHONE 29 | @interface MAIScreen : UIScreen 30 | #else 31 | @interface MAIScreen : NSScreen 32 | #endif 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | 37 | #pragma clang diagnostic pop 38 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIScreen.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIScreen.h" 5 | 6 | @implementation MAIScreen 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIScrollView.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIScrollView.h" 5 | 6 | @implementation MAIScrollView 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAISegmentedControl.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAISegmentedControl.h" 5 | 6 | @implementation MAISegmentedControl 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIShadow.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIShadowProtocol 18 | -(instancetype)init; 19 | @property(setter=setShadowBlurRadius:, getter=shadowBlurRadius) CGFloat shadowBlurRadius; 20 | 21 | #if TARGET_OS_IPHONE 22 | -(nullable instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; 23 | #else 24 | #endif 25 | 26 | @end 27 | 28 | #if TARGET_OS_IPHONE 29 | @interface MAIShadow : NSShadow 30 | #else 31 | @interface MAIShadow : NSShadow 32 | #endif 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | 37 | #pragma clang diagnostic pop 38 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIShadow.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIShadow.h" 5 | 6 | @implementation MAIShadow 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAISlider.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAISlider.h" 5 | 6 | @implementation MAISlider 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAISplitViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAISplitViewControllerProtocol 18 | -(instancetype)initWithNibName:(nullable NSString*)nibNameOrNil bundle:(nullable NSBundle*)nibBundleOrNil; 19 | -(nullable instancetype)initWithCoder:(NSCoder*)aDecoder; 20 | -(void)loadView; 21 | -(void)viewDidLoad; 22 | -(void)encodeRestorableStateWithCoder:(NSCoder*)coder; 23 | -(void)updateViewConstraints; 24 | -(BOOL)becomeFirstResponder; 25 | -(BOOL)resignFirstResponder; 26 | -(void)updateUserActivityState:(NSUserActivity*)activity; 27 | -(void)restoreUserActivityState:(NSUserActivity*)activity; 28 | @property(setter=setView:, getter=view) id view; 29 | @property(readonly, nullable, getter=nibName) NSString* nibName; 30 | @property(readonly, nullable, getter=nibBundle) NSBundle* nibBundle; 31 | @property(readonly, nullable, getter=storyboard) id storyboard; 32 | @property(nullable, setter=setTitle:, getter=title) NSString* title; 33 | @property(readonly, nullable, getter=parentViewController) id parentViewController; 34 | @property(readonly, nullable, getter=presentingViewController) id presentingViewController; 35 | @property(readonly, nullable, getter=extensionContext) NSExtensionContext* extensionContext; 36 | @property(readonly, nullable, getter=undoManager) NSUndoManager* undoManager; 37 | @property(nullable, setter=setUserActivity:, getter=userActivity) NSUserActivity* userActivity; 38 | @property(readonly, getter=isViewLoaded) BOOL viewLoaded; 39 | 40 | #if TARGET_OS_IPHONE 41 | +(void)clearTextInputContextIdentifier:(NSString*)identifier NS_UNAVAILABLE; 42 | #else 43 | -(instancetype)init NS_UNAVAILABLE; 44 | #endif 45 | 46 | @end 47 | 48 | #if TARGET_OS_IPHONE 49 | @interface MAISplitViewController : UISplitViewController 50 | #else 51 | @interface MAISplitViewController : NSSplitViewController 52 | #endif 53 | @end 54 | 55 | NS_ASSUME_NONNULL_END 56 | 57 | #pragma clang diagnostic pop 58 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAISplitViewController.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAISplitViewController.h" 5 | 6 | @implementation MAISplitViewController 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIStackView.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIStackView.h" 5 | 6 | @implementation MAIStackView 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIStepper.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIStepper.h" 5 | 6 | @implementation MAIStepper 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIStoryboard.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIStoryboardProtocol 18 | 19 | #if TARGET_OS_IPHONE 20 | #else 21 | #endif 22 | 23 | @end 24 | 25 | #if TARGET_OS_IPHONE 26 | @interface MAIStoryboard : UIStoryboard 27 | #else 28 | @interface MAIStoryboard : NSStoryboard 29 | #endif 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | 34 | #pragma clang diagnostic pop 35 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIStoryboard.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIStoryboard.h" 5 | 6 | @implementation MAIStoryboard 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIStoryboardSegue.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIStoryboardSegueProtocol 18 | -(void)perform; 19 | @property(readonly, nullable, getter=identifier) NSString* identifier; 20 | 21 | #if TARGET_OS_IPHONE 22 | -(instancetype)init NS_UNAVAILABLE; 23 | #else 24 | #endif 25 | 26 | @end 27 | 28 | #if TARGET_OS_IPHONE 29 | @interface MAIStoryboardSegue : UIStoryboardSegue 30 | #else 31 | @interface MAIStoryboardSegue : NSStoryboardSegue 32 | #endif 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | 37 | #pragma clang diagnostic pop 38 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIStoryboardSegue.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIStoryboardSegue.h" 5 | 6 | @implementation MAIStoryboardSegue 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIStringDrawingContext.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIStringDrawingContextProtocol 18 | @property(setter=setMinimumScaleFactor:, getter=minimumScaleFactor) CGFloat minimumScaleFactor; 19 | @property(readonly, getter=actualScaleFactor) CGFloat actualScaleFactor; 20 | @property(readonly, getter=totalBounds) CGRect totalBounds; 21 | 22 | #if TARGET_OS_IPHONE 23 | #else 24 | #endif 25 | 26 | @end 27 | 28 | #if TARGET_OS_IPHONE 29 | @interface MAIStringDrawingContext : NSStringDrawingContext 30 | #else 31 | @interface MAIStringDrawingContext : NSStringDrawingContext 32 | #endif 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | 37 | #pragma clang diagnostic pop 38 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIStringDrawingContext.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIStringDrawingContext.h" 5 | 6 | @implementation MAIStringDrawingContext 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITableView.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAITableView.h" 5 | 6 | @implementation MAITableView 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITableViewDataSource.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_IPHONE 2 | @import UIKit; 3 | #else 4 | @import AppKit; 5 | #endif 6 | 7 | #import "MAIEnums.h" 8 | 9 | @protocol MAILayoutManagerDelegate; 10 | @protocol MAITextLayoutOrientationProvider; 11 | @protocol MAITextAttachmentContainer; 12 | @protocol MAITextStorageDelegate; 13 | @protocol MAIApplicationDelegate; 14 | @protocol MAICollectionViewDataSource; 15 | @protocol MAICollectionViewDelegate; 16 | @protocol MAICollectionViewDelegateFlowLayout; 17 | @protocol MAIGestureRecognizerDelegate; 18 | @protocol MAITableViewDelegate; 19 | @protocol MAITextFieldDelegate; 20 | @protocol MAITextInput; 21 | @protocol MAITextViewDelegate; 22 | @protocol MAIToolbarDelegate; 23 | 24 | @class MAIDataAsset; 25 | @protocol MAIDataAssetProtocol; 26 | @class MAILayoutXAxisAnchor; 27 | @protocol MAILayoutXAxisAnchorProtocol; 28 | @class MAILayoutYAxisAnchor; 29 | @protocol MAILayoutYAxisAnchorProtocol; 30 | @class MAILayoutDimension; 31 | @protocol MAILayoutDimensionProtocol; 32 | @class MAILayoutConstraint; 33 | @protocol MAILayoutConstraintProtocol; 34 | @class MAILayoutManager; 35 | @protocol MAILayoutManagerProtocol; 36 | @class MAITextTab; 37 | @protocol MAITextTabProtocol; 38 | @class MAIParagraphStyle; 39 | @protocol MAIParagraphStyleProtocol; 40 | @class MAIMutableParagraphStyle; 41 | @protocol MAIMutableParagraphStyleProtocol; 42 | @class MAIShadow; 43 | @protocol MAIShadowProtocol; 44 | @class MAIStringDrawingContext; 45 | @protocol MAIStringDrawingContextProtocol; 46 | @class MAITextAttachment; 47 | @protocol MAITextAttachmentProtocol; 48 | @class MAITextContainer; 49 | @protocol MAITextContainerProtocol; 50 | @class MAITextStorage; 51 | @protocol MAITextStorageProtocol; 52 | @class MAIAccessibilityElement; 53 | @protocol MAIAccessibilityElementProtocol; 54 | @class MAIApplication; 55 | @protocol MAIApplicationProtocol; 56 | @class MAIBezierPath; 57 | @protocol MAIBezierPathProtocol; 58 | @class MAIButton; 59 | @protocol MAIButtonProtocol; 60 | @class MAICollectionView; 61 | @protocol MAICollectionViewProtocol; 62 | @class MAICollectionViewFlowLayoutInvalidationContext; 63 | @protocol MAICollectionViewFlowLayoutInvalidationContextProtocol; 64 | @class MAICollectionViewFlowLayout; 65 | @protocol MAICollectionViewFlowLayoutProtocol; 66 | @class MAICollectionViewLayoutAttributes; 67 | @protocol MAICollectionViewLayoutAttributesProtocol; 68 | @class MAICollectionViewUpdateItem; 69 | @protocol MAICollectionViewUpdateItemProtocol; 70 | @class MAICollectionViewLayoutInvalidationContext; 71 | @protocol MAICollectionViewLayoutInvalidationContextProtocol; 72 | @class MAICollectionViewLayout; 73 | @protocol MAICollectionViewLayoutProtocol; 74 | @class MAICollectionViewTransitionLayout; 75 | @protocol MAICollectionViewTransitionLayoutProtocol; 76 | @class MAIColor; 77 | @protocol MAIColorProtocol; 78 | @class MAIControl; 79 | @protocol MAIControlProtocol; 80 | @class MAIDatePicker; 81 | @protocol MAIDatePickerProtocol; 82 | @class MAIDocument; 83 | @protocol MAIDocumentProtocol; 84 | @class MAIEvent; 85 | @protocol MAIEventProtocol; 86 | @class MAIFont; 87 | @protocol MAIFontProtocol; 88 | @class MAIFontDescriptor; 89 | @protocol MAIFontDescriptorProtocol; 90 | @class MAIGestureRecognizer; 91 | @protocol MAIGestureRecognizerProtocol; 92 | @class MAIImage; 93 | @protocol MAIImageProtocol; 94 | @class MAIImageView; 95 | @protocol MAIImageViewProtocol; 96 | @class MAILayoutGuide; 97 | @protocol MAILayoutGuideProtocol; 98 | @class MAIMenuItem; 99 | @protocol MAIMenuItemProtocol; 100 | @class MAINib; 101 | @protocol MAINibProtocol; 102 | @class MAIPanGestureRecognizer; 103 | @protocol MAIPanGestureRecognizerProtocol; 104 | @class MAIPasteboard; 105 | @protocol MAIPasteboardProtocol; 106 | @class MAIPrinter; 107 | @protocol MAIPrinterProtocol; 108 | @class MAIPrintInfo; 109 | @protocol MAIPrintInfoProtocol; 110 | @class MAIResponder; 111 | @protocol MAIResponderProtocol; 112 | @class MAIRotationGestureRecognizer; 113 | @protocol MAIRotationGestureRecognizerProtocol; 114 | @class MAIScreen; 115 | @protocol MAIScreenProtocol; 116 | @class MAIScrollView; 117 | @protocol MAIScrollViewProtocol; 118 | @class MAISegmentedControl; 119 | @protocol MAISegmentedControlProtocol; 120 | @class MAISlider; 121 | @protocol MAISliderProtocol; 122 | @class MAISplitViewController; 123 | @protocol MAISplitViewControllerProtocol; 124 | @class MAIStackView; 125 | @protocol MAIStackViewProtocol; 126 | @class MAIStepper; 127 | @protocol MAIStepperProtocol; 128 | @class MAIStoryboard; 129 | @protocol MAIStoryboardProtocol; 130 | @class MAIStoryboardSegue; 131 | @protocol MAIStoryboardSegueProtocol; 132 | @class MAITableViewRowAction; 133 | @protocol MAITableViewRowActionProtocol; 134 | @class MAITableView; 135 | @protocol MAITableViewProtocol; 136 | @class MAITextField; 137 | @protocol MAITextFieldProtocol; 138 | @class MAITextView; 139 | @protocol MAITextViewProtocol; 140 | @class MAIToolbar; 141 | @protocol MAIToolbarProtocol; 142 | @class MAITouch; 143 | @protocol MAITouchProtocol; 144 | @class MAIView; 145 | @protocol MAIViewProtocol; 146 | @class MAIViewController; 147 | @protocol MAIViewControllerProtocol; 148 | @class MAIVisualEffectView; 149 | @protocol MAIVisualEffectViewProtocol; 150 | @class MAIWindow; 151 | @protocol MAIWindowProtocol; 152 | 153 | NS_ASSUME_NONNULL_BEGIN 154 | 155 | @protocol MAITableViewDataSource 156 | @optional 157 | 158 | 159 | 160 | @end 161 | 162 | NS_ASSUME_NONNULL_END 163 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITableViewDelegate.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_IPHONE 2 | @import UIKit; 3 | #else 4 | @import AppKit; 5 | #endif 6 | 7 | #import "MAIEnums.h" 8 | 9 | @protocol MAILayoutManagerDelegate; 10 | @protocol MAITextLayoutOrientationProvider; 11 | @protocol MAITextAttachmentContainer; 12 | @protocol MAITextStorageDelegate; 13 | @protocol MAIApplicationDelegate; 14 | @protocol MAICollectionViewDataSource; 15 | @protocol MAICollectionViewDelegate; 16 | @protocol MAICollectionViewDelegateFlowLayout; 17 | @protocol MAIGestureRecognizerDelegate; 18 | @protocol MAITableViewDataSource; 19 | @protocol MAITextFieldDelegate; 20 | @protocol MAITextInput; 21 | @protocol MAITextViewDelegate; 22 | @protocol MAIToolbarDelegate; 23 | 24 | @class MAIDataAsset; 25 | @protocol MAIDataAssetProtocol; 26 | @class MAILayoutXAxisAnchor; 27 | @protocol MAILayoutXAxisAnchorProtocol; 28 | @class MAILayoutYAxisAnchor; 29 | @protocol MAILayoutYAxisAnchorProtocol; 30 | @class MAILayoutDimension; 31 | @protocol MAILayoutDimensionProtocol; 32 | @class MAILayoutConstraint; 33 | @protocol MAILayoutConstraintProtocol; 34 | @class MAILayoutManager; 35 | @protocol MAILayoutManagerProtocol; 36 | @class MAITextTab; 37 | @protocol MAITextTabProtocol; 38 | @class MAIParagraphStyle; 39 | @protocol MAIParagraphStyleProtocol; 40 | @class MAIMutableParagraphStyle; 41 | @protocol MAIMutableParagraphStyleProtocol; 42 | @class MAIShadow; 43 | @protocol MAIShadowProtocol; 44 | @class MAIStringDrawingContext; 45 | @protocol MAIStringDrawingContextProtocol; 46 | @class MAITextAttachment; 47 | @protocol MAITextAttachmentProtocol; 48 | @class MAITextContainer; 49 | @protocol MAITextContainerProtocol; 50 | @class MAITextStorage; 51 | @protocol MAITextStorageProtocol; 52 | @class MAIAccessibilityElement; 53 | @protocol MAIAccessibilityElementProtocol; 54 | @class MAIApplication; 55 | @protocol MAIApplicationProtocol; 56 | @class MAIBezierPath; 57 | @protocol MAIBezierPathProtocol; 58 | @class MAIButton; 59 | @protocol MAIButtonProtocol; 60 | @class MAICollectionView; 61 | @protocol MAICollectionViewProtocol; 62 | @class MAICollectionViewFlowLayoutInvalidationContext; 63 | @protocol MAICollectionViewFlowLayoutInvalidationContextProtocol; 64 | @class MAICollectionViewFlowLayout; 65 | @protocol MAICollectionViewFlowLayoutProtocol; 66 | @class MAICollectionViewLayoutAttributes; 67 | @protocol MAICollectionViewLayoutAttributesProtocol; 68 | @class MAICollectionViewUpdateItem; 69 | @protocol MAICollectionViewUpdateItemProtocol; 70 | @class MAICollectionViewLayoutInvalidationContext; 71 | @protocol MAICollectionViewLayoutInvalidationContextProtocol; 72 | @class MAICollectionViewLayout; 73 | @protocol MAICollectionViewLayoutProtocol; 74 | @class MAICollectionViewTransitionLayout; 75 | @protocol MAICollectionViewTransitionLayoutProtocol; 76 | @class MAIColor; 77 | @protocol MAIColorProtocol; 78 | @class MAIControl; 79 | @protocol MAIControlProtocol; 80 | @class MAIDatePicker; 81 | @protocol MAIDatePickerProtocol; 82 | @class MAIDocument; 83 | @protocol MAIDocumentProtocol; 84 | @class MAIEvent; 85 | @protocol MAIEventProtocol; 86 | @class MAIFont; 87 | @protocol MAIFontProtocol; 88 | @class MAIFontDescriptor; 89 | @protocol MAIFontDescriptorProtocol; 90 | @class MAIGestureRecognizer; 91 | @protocol MAIGestureRecognizerProtocol; 92 | @class MAIImage; 93 | @protocol MAIImageProtocol; 94 | @class MAIImageView; 95 | @protocol MAIImageViewProtocol; 96 | @class MAILayoutGuide; 97 | @protocol MAILayoutGuideProtocol; 98 | @class MAIMenuItem; 99 | @protocol MAIMenuItemProtocol; 100 | @class MAINib; 101 | @protocol MAINibProtocol; 102 | @class MAIPanGestureRecognizer; 103 | @protocol MAIPanGestureRecognizerProtocol; 104 | @class MAIPasteboard; 105 | @protocol MAIPasteboardProtocol; 106 | @class MAIPrinter; 107 | @protocol MAIPrinterProtocol; 108 | @class MAIPrintInfo; 109 | @protocol MAIPrintInfoProtocol; 110 | @class MAIResponder; 111 | @protocol MAIResponderProtocol; 112 | @class MAIRotationGestureRecognizer; 113 | @protocol MAIRotationGestureRecognizerProtocol; 114 | @class MAIScreen; 115 | @protocol MAIScreenProtocol; 116 | @class MAIScrollView; 117 | @protocol MAIScrollViewProtocol; 118 | @class MAISegmentedControl; 119 | @protocol MAISegmentedControlProtocol; 120 | @class MAISlider; 121 | @protocol MAISliderProtocol; 122 | @class MAISplitViewController; 123 | @protocol MAISplitViewControllerProtocol; 124 | @class MAIStackView; 125 | @protocol MAIStackViewProtocol; 126 | @class MAIStepper; 127 | @protocol MAIStepperProtocol; 128 | @class MAIStoryboard; 129 | @protocol MAIStoryboardProtocol; 130 | @class MAIStoryboardSegue; 131 | @protocol MAIStoryboardSegueProtocol; 132 | @class MAITableViewRowAction; 133 | @protocol MAITableViewRowActionProtocol; 134 | @class MAITableView; 135 | @protocol MAITableViewProtocol; 136 | @class MAITextField; 137 | @protocol MAITextFieldProtocol; 138 | @class MAITextView; 139 | @protocol MAITextViewProtocol; 140 | @class MAIToolbar; 141 | @protocol MAIToolbarProtocol; 142 | @class MAITouch; 143 | @protocol MAITouchProtocol; 144 | @class MAIView; 145 | @protocol MAIViewProtocol; 146 | @class MAIViewController; 147 | @protocol MAIViewControllerProtocol; 148 | @class MAIVisualEffectView; 149 | @protocol MAIVisualEffectViewProtocol; 150 | @class MAIWindow; 151 | @protocol MAIWindowProtocol; 152 | 153 | NS_ASSUME_NONNULL_BEGIN 154 | 155 | @protocol MAITableViewDelegate 156 | @optional 157 | 158 | 159 | 160 | @end 161 | 162 | NS_ASSUME_NONNULL_END 163 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITableViewRowAction.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAITableViewRowActionProtocol 18 | @property(setter=setTitle:, getter=title) NSString* title; 19 | @property(setter=setBackgroundColor:, getter=backgroundColor) id backgroundColor; 20 | 21 | #if TARGET_OS_IPHONE 22 | #else 23 | #endif 24 | 25 | @end 26 | 27 | #if TARGET_OS_IPHONE 28 | @interface MAITableViewRowAction : UITableViewRowAction 29 | #else 30 | @interface MAITableViewRowAction : NSTableViewRowAction 31 | #endif 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | 36 | #pragma clang diagnostic pop 37 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITableViewRowAction.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAITableViewRowAction.h" 5 | 6 | @implementation MAITableViewRowAction 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextAttachment.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAITextAttachmentProtocol 18 | -(instancetype)initWithData:(nullable NSData*)contentData ofType:(nullable NSString*)uti; 19 | @property(nullable, setter=setContents:, getter=contents) NSData* contents; 20 | @property(nullable, setter=setFileType:, getter=fileType) NSString* fileType; 21 | @property(nullable, setter=setImage:, getter=image) id image; 22 | @property(setter=setBounds:, getter=bounds) CGRect bounds; 23 | @property(nullable, setter=setFileWrapper:, getter=fileWrapper) NSFileWrapper* fileWrapper; 24 | 25 | #if TARGET_OS_IPHONE 26 | #else 27 | -(instancetype)initWithFileWrapper:(nullable NSFileWrapper*)fileWrapper NS_UNAVAILABLE; 28 | #endif 29 | 30 | @end 31 | 32 | #if TARGET_OS_IPHONE 33 | @interface MAITextAttachment : NSTextAttachment 34 | #else 35 | @interface MAITextAttachment : NSTextAttachment 36 | #endif 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | 41 | #pragma clang diagnostic pop 42 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextAttachment.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAITextAttachment.h" 5 | 6 | @implementation MAITextAttachment 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextContainer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAITextContainerProtocol 18 | -(instancetype)initWithCoder:(NSCoder*)coder; 19 | -(void)replaceLayoutManager:(id)newLayoutManager; 20 | -(CGRect)lineFragmentRectForProposedRect:(CGRect)proposedRect atIndex:(NSUInteger)characterIndex writingDirection:(MAIWritingDirection)baseWritingDirection remainingRect:(nullable CGRect*)remainingRect; 21 | @property(nullable, setter=setLayoutManager:, getter=layoutManager) id layoutManager; 22 | @property(setter=setExclusionPaths:, getter=exclusionPaths) NSArray* exclusionPaths; 23 | @property(setter=setLineBreakMode:, getter=lineBreakMode) NSLineBreakMode lineBreakMode; 24 | @property(setter=setLineFragmentPadding:, getter=lineFragmentPadding) CGFloat lineFragmentPadding; 25 | @property(setter=setMaximumNumberOfLines:, getter=maximumNumberOfLines) NSUInteger maximumNumberOfLines; 26 | @property(readonly, getter=isSimpleRectangularTextContainer) BOOL simpleRectangularTextContainer; 27 | @property(setter=setWidthTracksTextView:, getter=widthTracksTextView) BOOL widthTracksTextView; 28 | @property(setter=setHeightTracksTextView:, getter=heightTracksTextView) BOOL heightTracksTextView; 29 | 30 | #if TARGET_OS_IPHONE 31 | #else 32 | -(instancetype)initWithContainerSize:(NSSize)aContainerSize NS_UNAVAILABLE; 33 | #endif 34 | 35 | @end 36 | 37 | #if TARGET_OS_IPHONE 38 | @interface MAITextContainer : NSTextContainer 39 | #else 40 | @interface MAITextContainer : NSTextContainer 41 | #endif 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | 46 | #pragma clang diagnostic pop 47 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextContainer.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAITextContainer.h" 5 | 6 | @implementation MAITextContainer 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextField.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAITextField.h" 5 | 6 | @implementation MAITextField 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextFieldDelegate.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_IPHONE 2 | @import UIKit; 3 | #else 4 | @import AppKit; 5 | #endif 6 | 7 | #import "MAIEnums.h" 8 | 9 | @protocol MAILayoutManagerDelegate; 10 | @protocol MAITextLayoutOrientationProvider; 11 | @protocol MAITextAttachmentContainer; 12 | @protocol MAITextStorageDelegate; 13 | @protocol MAIApplicationDelegate; 14 | @protocol MAICollectionViewDataSource; 15 | @protocol MAICollectionViewDelegate; 16 | @protocol MAICollectionViewDelegateFlowLayout; 17 | @protocol MAIGestureRecognizerDelegate; 18 | @protocol MAITableViewDataSource; 19 | @protocol MAITableViewDelegate; 20 | @protocol MAITextInput; 21 | @protocol MAITextViewDelegate; 22 | @protocol MAIToolbarDelegate; 23 | 24 | @class MAIDataAsset; 25 | @protocol MAIDataAssetProtocol; 26 | @class MAILayoutXAxisAnchor; 27 | @protocol MAILayoutXAxisAnchorProtocol; 28 | @class MAILayoutYAxisAnchor; 29 | @protocol MAILayoutYAxisAnchorProtocol; 30 | @class MAILayoutDimension; 31 | @protocol MAILayoutDimensionProtocol; 32 | @class MAILayoutConstraint; 33 | @protocol MAILayoutConstraintProtocol; 34 | @class MAILayoutManager; 35 | @protocol MAILayoutManagerProtocol; 36 | @class MAITextTab; 37 | @protocol MAITextTabProtocol; 38 | @class MAIParagraphStyle; 39 | @protocol MAIParagraphStyleProtocol; 40 | @class MAIMutableParagraphStyle; 41 | @protocol MAIMutableParagraphStyleProtocol; 42 | @class MAIShadow; 43 | @protocol MAIShadowProtocol; 44 | @class MAIStringDrawingContext; 45 | @protocol MAIStringDrawingContextProtocol; 46 | @class MAITextAttachment; 47 | @protocol MAITextAttachmentProtocol; 48 | @class MAITextContainer; 49 | @protocol MAITextContainerProtocol; 50 | @class MAITextStorage; 51 | @protocol MAITextStorageProtocol; 52 | @class MAIAccessibilityElement; 53 | @protocol MAIAccessibilityElementProtocol; 54 | @class MAIApplication; 55 | @protocol MAIApplicationProtocol; 56 | @class MAIBezierPath; 57 | @protocol MAIBezierPathProtocol; 58 | @class MAIButton; 59 | @protocol MAIButtonProtocol; 60 | @class MAICollectionView; 61 | @protocol MAICollectionViewProtocol; 62 | @class MAICollectionViewFlowLayoutInvalidationContext; 63 | @protocol MAICollectionViewFlowLayoutInvalidationContextProtocol; 64 | @class MAICollectionViewFlowLayout; 65 | @protocol MAICollectionViewFlowLayoutProtocol; 66 | @class MAICollectionViewLayoutAttributes; 67 | @protocol MAICollectionViewLayoutAttributesProtocol; 68 | @class MAICollectionViewUpdateItem; 69 | @protocol MAICollectionViewUpdateItemProtocol; 70 | @class MAICollectionViewLayoutInvalidationContext; 71 | @protocol MAICollectionViewLayoutInvalidationContextProtocol; 72 | @class MAICollectionViewLayout; 73 | @protocol MAICollectionViewLayoutProtocol; 74 | @class MAICollectionViewTransitionLayout; 75 | @protocol MAICollectionViewTransitionLayoutProtocol; 76 | @class MAIColor; 77 | @protocol MAIColorProtocol; 78 | @class MAIControl; 79 | @protocol MAIControlProtocol; 80 | @class MAIDatePicker; 81 | @protocol MAIDatePickerProtocol; 82 | @class MAIDocument; 83 | @protocol MAIDocumentProtocol; 84 | @class MAIEvent; 85 | @protocol MAIEventProtocol; 86 | @class MAIFont; 87 | @protocol MAIFontProtocol; 88 | @class MAIFontDescriptor; 89 | @protocol MAIFontDescriptorProtocol; 90 | @class MAIGestureRecognizer; 91 | @protocol MAIGestureRecognizerProtocol; 92 | @class MAIImage; 93 | @protocol MAIImageProtocol; 94 | @class MAIImageView; 95 | @protocol MAIImageViewProtocol; 96 | @class MAILayoutGuide; 97 | @protocol MAILayoutGuideProtocol; 98 | @class MAIMenuItem; 99 | @protocol MAIMenuItemProtocol; 100 | @class MAINib; 101 | @protocol MAINibProtocol; 102 | @class MAIPanGestureRecognizer; 103 | @protocol MAIPanGestureRecognizerProtocol; 104 | @class MAIPasteboard; 105 | @protocol MAIPasteboardProtocol; 106 | @class MAIPrinter; 107 | @protocol MAIPrinterProtocol; 108 | @class MAIPrintInfo; 109 | @protocol MAIPrintInfoProtocol; 110 | @class MAIResponder; 111 | @protocol MAIResponderProtocol; 112 | @class MAIRotationGestureRecognizer; 113 | @protocol MAIRotationGestureRecognizerProtocol; 114 | @class MAIScreen; 115 | @protocol MAIScreenProtocol; 116 | @class MAIScrollView; 117 | @protocol MAIScrollViewProtocol; 118 | @class MAISegmentedControl; 119 | @protocol MAISegmentedControlProtocol; 120 | @class MAISlider; 121 | @protocol MAISliderProtocol; 122 | @class MAISplitViewController; 123 | @protocol MAISplitViewControllerProtocol; 124 | @class MAIStackView; 125 | @protocol MAIStackViewProtocol; 126 | @class MAIStepper; 127 | @protocol MAIStepperProtocol; 128 | @class MAIStoryboard; 129 | @protocol MAIStoryboardProtocol; 130 | @class MAIStoryboardSegue; 131 | @protocol MAIStoryboardSegueProtocol; 132 | @class MAITableViewRowAction; 133 | @protocol MAITableViewRowActionProtocol; 134 | @class MAITableView; 135 | @protocol MAITableViewProtocol; 136 | @class MAITextField; 137 | @protocol MAITextFieldProtocol; 138 | @class MAITextView; 139 | @protocol MAITextViewProtocol; 140 | @class MAIToolbar; 141 | @protocol MAIToolbarProtocol; 142 | @class MAITouch; 143 | @protocol MAITouchProtocol; 144 | @class MAIView; 145 | @protocol MAIViewProtocol; 146 | @class MAIViewController; 147 | @protocol MAIViewControllerProtocol; 148 | @class MAIVisualEffectView; 149 | @protocol MAIVisualEffectViewProtocol; 150 | @class MAIWindow; 151 | @protocol MAIWindowProtocol; 152 | 153 | NS_ASSUME_NONNULL_BEGIN 154 | 155 | @protocol MAITextFieldDelegate 156 | @optional 157 | 158 | 159 | 160 | @end 161 | 162 | NS_ASSUME_NONNULL_END 163 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextInput.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_IPHONE 2 | @import UIKit; 3 | #else 4 | @import AppKit; 5 | #endif 6 | 7 | #import "MAIEnums.h" 8 | 9 | @protocol MAILayoutManagerDelegate; 10 | @protocol MAITextLayoutOrientationProvider; 11 | @protocol MAITextAttachmentContainer; 12 | @protocol MAITextStorageDelegate; 13 | @protocol MAIApplicationDelegate; 14 | @protocol MAICollectionViewDataSource; 15 | @protocol MAICollectionViewDelegate; 16 | @protocol MAICollectionViewDelegateFlowLayout; 17 | @protocol MAIGestureRecognizerDelegate; 18 | @protocol MAITableViewDataSource; 19 | @protocol MAITableViewDelegate; 20 | @protocol MAITextFieldDelegate; 21 | @protocol MAITextViewDelegate; 22 | @protocol MAIToolbarDelegate; 23 | 24 | @class MAIDataAsset; 25 | @protocol MAIDataAssetProtocol; 26 | @class MAILayoutXAxisAnchor; 27 | @protocol MAILayoutXAxisAnchorProtocol; 28 | @class MAILayoutYAxisAnchor; 29 | @protocol MAILayoutYAxisAnchorProtocol; 30 | @class MAILayoutDimension; 31 | @protocol MAILayoutDimensionProtocol; 32 | @class MAILayoutConstraint; 33 | @protocol MAILayoutConstraintProtocol; 34 | @class MAILayoutManager; 35 | @protocol MAILayoutManagerProtocol; 36 | @class MAITextTab; 37 | @protocol MAITextTabProtocol; 38 | @class MAIParagraphStyle; 39 | @protocol MAIParagraphStyleProtocol; 40 | @class MAIMutableParagraphStyle; 41 | @protocol MAIMutableParagraphStyleProtocol; 42 | @class MAIShadow; 43 | @protocol MAIShadowProtocol; 44 | @class MAIStringDrawingContext; 45 | @protocol MAIStringDrawingContextProtocol; 46 | @class MAITextAttachment; 47 | @protocol MAITextAttachmentProtocol; 48 | @class MAITextContainer; 49 | @protocol MAITextContainerProtocol; 50 | @class MAITextStorage; 51 | @protocol MAITextStorageProtocol; 52 | @class MAIAccessibilityElement; 53 | @protocol MAIAccessibilityElementProtocol; 54 | @class MAIApplication; 55 | @protocol MAIApplicationProtocol; 56 | @class MAIBezierPath; 57 | @protocol MAIBezierPathProtocol; 58 | @class MAIButton; 59 | @protocol MAIButtonProtocol; 60 | @class MAICollectionView; 61 | @protocol MAICollectionViewProtocol; 62 | @class MAICollectionViewFlowLayoutInvalidationContext; 63 | @protocol MAICollectionViewFlowLayoutInvalidationContextProtocol; 64 | @class MAICollectionViewFlowLayout; 65 | @protocol MAICollectionViewFlowLayoutProtocol; 66 | @class MAICollectionViewLayoutAttributes; 67 | @protocol MAICollectionViewLayoutAttributesProtocol; 68 | @class MAICollectionViewUpdateItem; 69 | @protocol MAICollectionViewUpdateItemProtocol; 70 | @class MAICollectionViewLayoutInvalidationContext; 71 | @protocol MAICollectionViewLayoutInvalidationContextProtocol; 72 | @class MAICollectionViewLayout; 73 | @protocol MAICollectionViewLayoutProtocol; 74 | @class MAICollectionViewTransitionLayout; 75 | @protocol MAICollectionViewTransitionLayoutProtocol; 76 | @class MAIColor; 77 | @protocol MAIColorProtocol; 78 | @class MAIControl; 79 | @protocol MAIControlProtocol; 80 | @class MAIDatePicker; 81 | @protocol MAIDatePickerProtocol; 82 | @class MAIDocument; 83 | @protocol MAIDocumentProtocol; 84 | @class MAIEvent; 85 | @protocol MAIEventProtocol; 86 | @class MAIFont; 87 | @protocol MAIFontProtocol; 88 | @class MAIFontDescriptor; 89 | @protocol MAIFontDescriptorProtocol; 90 | @class MAIGestureRecognizer; 91 | @protocol MAIGestureRecognizerProtocol; 92 | @class MAIImage; 93 | @protocol MAIImageProtocol; 94 | @class MAIImageView; 95 | @protocol MAIImageViewProtocol; 96 | @class MAILayoutGuide; 97 | @protocol MAILayoutGuideProtocol; 98 | @class MAIMenuItem; 99 | @protocol MAIMenuItemProtocol; 100 | @class MAINib; 101 | @protocol MAINibProtocol; 102 | @class MAIPanGestureRecognizer; 103 | @protocol MAIPanGestureRecognizerProtocol; 104 | @class MAIPasteboard; 105 | @protocol MAIPasteboardProtocol; 106 | @class MAIPrinter; 107 | @protocol MAIPrinterProtocol; 108 | @class MAIPrintInfo; 109 | @protocol MAIPrintInfoProtocol; 110 | @class MAIResponder; 111 | @protocol MAIResponderProtocol; 112 | @class MAIRotationGestureRecognizer; 113 | @protocol MAIRotationGestureRecognizerProtocol; 114 | @class MAIScreen; 115 | @protocol MAIScreenProtocol; 116 | @class MAIScrollView; 117 | @protocol MAIScrollViewProtocol; 118 | @class MAISegmentedControl; 119 | @protocol MAISegmentedControlProtocol; 120 | @class MAISlider; 121 | @protocol MAISliderProtocol; 122 | @class MAISplitViewController; 123 | @protocol MAISplitViewControllerProtocol; 124 | @class MAIStackView; 125 | @protocol MAIStackViewProtocol; 126 | @class MAIStepper; 127 | @protocol MAIStepperProtocol; 128 | @class MAIStoryboard; 129 | @protocol MAIStoryboardProtocol; 130 | @class MAIStoryboardSegue; 131 | @protocol MAIStoryboardSegueProtocol; 132 | @class MAITableViewRowAction; 133 | @protocol MAITableViewRowActionProtocol; 134 | @class MAITableView; 135 | @protocol MAITableViewProtocol; 136 | @class MAITextField; 137 | @protocol MAITextFieldProtocol; 138 | @class MAITextView; 139 | @protocol MAITextViewProtocol; 140 | @class MAIToolbar; 141 | @protocol MAIToolbarProtocol; 142 | @class MAITouch; 143 | @protocol MAITouchProtocol; 144 | @class MAIView; 145 | @protocol MAIViewProtocol; 146 | @class MAIViewController; 147 | @protocol MAIViewControllerProtocol; 148 | @class MAIVisualEffectView; 149 | @protocol MAIVisualEffectViewProtocol; 150 | @class MAIWindow; 151 | @protocol MAIWindowProtocol; 152 | 153 | NS_ASSUME_NONNULL_BEGIN 154 | 155 | @protocol MAITextInput 156 | @optional 157 | 158 | 159 | 160 | @end 161 | 162 | NS_ASSUME_NONNULL_END 163 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextLayoutOrientationProvider.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_IPHONE 2 | @import UIKit; 3 | #else 4 | @import AppKit; 5 | #endif 6 | 7 | #import "MAIEnums.h" 8 | 9 | @protocol MAILayoutManagerDelegate; 10 | @protocol MAITextAttachmentContainer; 11 | @protocol MAITextStorageDelegate; 12 | @protocol MAIApplicationDelegate; 13 | @protocol MAICollectionViewDataSource; 14 | @protocol MAICollectionViewDelegate; 15 | @protocol MAICollectionViewDelegateFlowLayout; 16 | @protocol MAIGestureRecognizerDelegate; 17 | @protocol MAITableViewDataSource; 18 | @protocol MAITableViewDelegate; 19 | @protocol MAITextFieldDelegate; 20 | @protocol MAITextInput; 21 | @protocol MAITextViewDelegate; 22 | @protocol MAIToolbarDelegate; 23 | 24 | @class MAIDataAsset; 25 | @protocol MAIDataAssetProtocol; 26 | @class MAILayoutXAxisAnchor; 27 | @protocol MAILayoutXAxisAnchorProtocol; 28 | @class MAILayoutYAxisAnchor; 29 | @protocol MAILayoutYAxisAnchorProtocol; 30 | @class MAILayoutDimension; 31 | @protocol MAILayoutDimensionProtocol; 32 | @class MAILayoutConstraint; 33 | @protocol MAILayoutConstraintProtocol; 34 | @class MAILayoutManager; 35 | @protocol MAILayoutManagerProtocol; 36 | @class MAITextTab; 37 | @protocol MAITextTabProtocol; 38 | @class MAIParagraphStyle; 39 | @protocol MAIParagraphStyleProtocol; 40 | @class MAIMutableParagraphStyle; 41 | @protocol MAIMutableParagraphStyleProtocol; 42 | @class MAIShadow; 43 | @protocol MAIShadowProtocol; 44 | @class MAIStringDrawingContext; 45 | @protocol MAIStringDrawingContextProtocol; 46 | @class MAITextAttachment; 47 | @protocol MAITextAttachmentProtocol; 48 | @class MAITextContainer; 49 | @protocol MAITextContainerProtocol; 50 | @class MAITextStorage; 51 | @protocol MAITextStorageProtocol; 52 | @class MAIAccessibilityElement; 53 | @protocol MAIAccessibilityElementProtocol; 54 | @class MAIApplication; 55 | @protocol MAIApplicationProtocol; 56 | @class MAIBezierPath; 57 | @protocol MAIBezierPathProtocol; 58 | @class MAIButton; 59 | @protocol MAIButtonProtocol; 60 | @class MAICollectionView; 61 | @protocol MAICollectionViewProtocol; 62 | @class MAICollectionViewFlowLayoutInvalidationContext; 63 | @protocol MAICollectionViewFlowLayoutInvalidationContextProtocol; 64 | @class MAICollectionViewFlowLayout; 65 | @protocol MAICollectionViewFlowLayoutProtocol; 66 | @class MAICollectionViewLayoutAttributes; 67 | @protocol MAICollectionViewLayoutAttributesProtocol; 68 | @class MAICollectionViewUpdateItem; 69 | @protocol MAICollectionViewUpdateItemProtocol; 70 | @class MAICollectionViewLayoutInvalidationContext; 71 | @protocol MAICollectionViewLayoutInvalidationContextProtocol; 72 | @class MAICollectionViewLayout; 73 | @protocol MAICollectionViewLayoutProtocol; 74 | @class MAICollectionViewTransitionLayout; 75 | @protocol MAICollectionViewTransitionLayoutProtocol; 76 | @class MAIColor; 77 | @protocol MAIColorProtocol; 78 | @class MAIControl; 79 | @protocol MAIControlProtocol; 80 | @class MAIDatePicker; 81 | @protocol MAIDatePickerProtocol; 82 | @class MAIDocument; 83 | @protocol MAIDocumentProtocol; 84 | @class MAIEvent; 85 | @protocol MAIEventProtocol; 86 | @class MAIFont; 87 | @protocol MAIFontProtocol; 88 | @class MAIFontDescriptor; 89 | @protocol MAIFontDescriptorProtocol; 90 | @class MAIGestureRecognizer; 91 | @protocol MAIGestureRecognizerProtocol; 92 | @class MAIImage; 93 | @protocol MAIImageProtocol; 94 | @class MAIImageView; 95 | @protocol MAIImageViewProtocol; 96 | @class MAILayoutGuide; 97 | @protocol MAILayoutGuideProtocol; 98 | @class MAIMenuItem; 99 | @protocol MAIMenuItemProtocol; 100 | @class MAINib; 101 | @protocol MAINibProtocol; 102 | @class MAIPanGestureRecognizer; 103 | @protocol MAIPanGestureRecognizerProtocol; 104 | @class MAIPasteboard; 105 | @protocol MAIPasteboardProtocol; 106 | @class MAIPrinter; 107 | @protocol MAIPrinterProtocol; 108 | @class MAIPrintInfo; 109 | @protocol MAIPrintInfoProtocol; 110 | @class MAIResponder; 111 | @protocol MAIResponderProtocol; 112 | @class MAIRotationGestureRecognizer; 113 | @protocol MAIRotationGestureRecognizerProtocol; 114 | @class MAIScreen; 115 | @protocol MAIScreenProtocol; 116 | @class MAIScrollView; 117 | @protocol MAIScrollViewProtocol; 118 | @class MAISegmentedControl; 119 | @protocol MAISegmentedControlProtocol; 120 | @class MAISlider; 121 | @protocol MAISliderProtocol; 122 | @class MAISplitViewController; 123 | @protocol MAISplitViewControllerProtocol; 124 | @class MAIStackView; 125 | @protocol MAIStackViewProtocol; 126 | @class MAIStepper; 127 | @protocol MAIStepperProtocol; 128 | @class MAIStoryboard; 129 | @protocol MAIStoryboardProtocol; 130 | @class MAIStoryboardSegue; 131 | @protocol MAIStoryboardSegueProtocol; 132 | @class MAITableViewRowAction; 133 | @protocol MAITableViewRowActionProtocol; 134 | @class MAITableView; 135 | @protocol MAITableViewProtocol; 136 | @class MAITextField; 137 | @protocol MAITextFieldProtocol; 138 | @class MAITextView; 139 | @protocol MAITextViewProtocol; 140 | @class MAIToolbar; 141 | @protocol MAIToolbarProtocol; 142 | @class MAITouch; 143 | @protocol MAITouchProtocol; 144 | @class MAIView; 145 | @protocol MAIViewProtocol; 146 | @class MAIViewController; 147 | @protocol MAIViewControllerProtocol; 148 | @class MAIVisualEffectView; 149 | @protocol MAIVisualEffectViewProtocol; 150 | @class MAIWindow; 151 | @protocol MAIWindowProtocol; 152 | 153 | NS_ASSUME_NONNULL_BEGIN 154 | 155 | @protocol MAITextLayoutOrientationProvider 156 | @optional 157 | 158 | @property(readonly, getter=layoutOrientation) MAITextLayoutOrientation layoutOrientation; 159 | 160 | 161 | @end 162 | 163 | NS_ASSUME_NONNULL_END 164 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextStorage.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAITextStorageProtocol 18 | -(void)addLayoutManager:(id)aLayoutManager; 19 | -(void)removeLayoutManager:(id)aLayoutManager; 20 | -(void)edited:(MAITextStorageEditActions)editedMask range:(NSRange)editedRange changeInLength:(NSInteger)delta; 21 | -(void)processEditing; 22 | -(void)invalidateAttributesInRange:(NSRange)range; 23 | -(void)ensureAttributesAreFixedInRange:(NSRange)range; 24 | @property(readonly, getter=layoutManagers) NSArray* layoutManagers; 25 | @property(readonly, getter=editedMask) MAITextStorageEditActions editedMask; 26 | @property(readonly, getter=editedRange) NSRange editedRange; 27 | @property(readonly, getter=changeInLength) NSInteger changeInLength; 28 | @property(nullable, setter=setDelegate:, getter=delegate) id delegate; 29 | @property(readonly, getter=fixesAttributesLazily) BOOL fixesAttributesLazily; 30 | 31 | #if TARGET_OS_IPHONE 32 | #else 33 | #endif 34 | 35 | @end 36 | 37 | #if TARGET_OS_IPHONE 38 | @interface MAITextStorage : NSTextStorage 39 | #else 40 | @interface MAITextStorage : NSTextStorage 41 | #endif 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | 46 | #pragma clang diagnostic pop 47 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextStorage.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAITextStorage.h" 5 | 6 | @implementation MAITextStorage 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextTab.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAITextTabProtocol 18 | +(NSCharacterSet*)columnTerminatorsForLocale:(nullable NSLocale*)aLocale; 19 | -(instancetype)initWithTextAlignment:(NSTextAlignment)alignment location:(CGFloat)loc options:(NSDictionary*)options; 20 | @property(readonly, getter=alignment) NSTextAlignment alignment; 21 | @property(readonly, getter=location) CGFloat location; 22 | @property(readonly, getter=options) NSDictionary* options; 23 | 24 | #if TARGET_OS_IPHONE 25 | #else 26 | -(instancetype)initWithType:(NSTextTabType)type location:(CGFloat)loc NS_UNAVAILABLE; 27 | #endif 28 | 29 | @end 30 | 31 | #if TARGET_OS_IPHONE 32 | @interface MAITextTab : NSTextTab 33 | #else 34 | @interface MAITextTab : NSTextTab 35 | #endif 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | 40 | #pragma clang diagnostic pop 41 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextTab.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAITextTab.h" 5 | 6 | @implementation MAITextTab 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextView.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAITextView.h" 5 | 6 | @implementation MAITextView 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITextViewDelegate.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_IPHONE 2 | @import UIKit; 3 | #else 4 | @import AppKit; 5 | #endif 6 | 7 | #import "MAIEnums.h" 8 | 9 | @protocol MAILayoutManagerDelegate; 10 | @protocol MAITextLayoutOrientationProvider; 11 | @protocol MAITextAttachmentContainer; 12 | @protocol MAITextStorageDelegate; 13 | @protocol MAIApplicationDelegate; 14 | @protocol MAICollectionViewDataSource; 15 | @protocol MAICollectionViewDelegate; 16 | @protocol MAICollectionViewDelegateFlowLayout; 17 | @protocol MAIGestureRecognizerDelegate; 18 | @protocol MAITableViewDataSource; 19 | @protocol MAITableViewDelegate; 20 | @protocol MAITextFieldDelegate; 21 | @protocol MAITextInput; 22 | @protocol MAIToolbarDelegate; 23 | 24 | @class MAIDataAsset; 25 | @protocol MAIDataAssetProtocol; 26 | @class MAILayoutXAxisAnchor; 27 | @protocol MAILayoutXAxisAnchorProtocol; 28 | @class MAILayoutYAxisAnchor; 29 | @protocol MAILayoutYAxisAnchorProtocol; 30 | @class MAILayoutDimension; 31 | @protocol MAILayoutDimensionProtocol; 32 | @class MAILayoutConstraint; 33 | @protocol MAILayoutConstraintProtocol; 34 | @class MAILayoutManager; 35 | @protocol MAILayoutManagerProtocol; 36 | @class MAITextTab; 37 | @protocol MAITextTabProtocol; 38 | @class MAIParagraphStyle; 39 | @protocol MAIParagraphStyleProtocol; 40 | @class MAIMutableParagraphStyle; 41 | @protocol MAIMutableParagraphStyleProtocol; 42 | @class MAIShadow; 43 | @protocol MAIShadowProtocol; 44 | @class MAIStringDrawingContext; 45 | @protocol MAIStringDrawingContextProtocol; 46 | @class MAITextAttachment; 47 | @protocol MAITextAttachmentProtocol; 48 | @class MAITextContainer; 49 | @protocol MAITextContainerProtocol; 50 | @class MAITextStorage; 51 | @protocol MAITextStorageProtocol; 52 | @class MAIAccessibilityElement; 53 | @protocol MAIAccessibilityElementProtocol; 54 | @class MAIApplication; 55 | @protocol MAIApplicationProtocol; 56 | @class MAIBezierPath; 57 | @protocol MAIBezierPathProtocol; 58 | @class MAIButton; 59 | @protocol MAIButtonProtocol; 60 | @class MAICollectionView; 61 | @protocol MAICollectionViewProtocol; 62 | @class MAICollectionViewFlowLayoutInvalidationContext; 63 | @protocol MAICollectionViewFlowLayoutInvalidationContextProtocol; 64 | @class MAICollectionViewFlowLayout; 65 | @protocol MAICollectionViewFlowLayoutProtocol; 66 | @class MAICollectionViewLayoutAttributes; 67 | @protocol MAICollectionViewLayoutAttributesProtocol; 68 | @class MAICollectionViewUpdateItem; 69 | @protocol MAICollectionViewUpdateItemProtocol; 70 | @class MAICollectionViewLayoutInvalidationContext; 71 | @protocol MAICollectionViewLayoutInvalidationContextProtocol; 72 | @class MAICollectionViewLayout; 73 | @protocol MAICollectionViewLayoutProtocol; 74 | @class MAICollectionViewTransitionLayout; 75 | @protocol MAICollectionViewTransitionLayoutProtocol; 76 | @class MAIColor; 77 | @protocol MAIColorProtocol; 78 | @class MAIControl; 79 | @protocol MAIControlProtocol; 80 | @class MAIDatePicker; 81 | @protocol MAIDatePickerProtocol; 82 | @class MAIDocument; 83 | @protocol MAIDocumentProtocol; 84 | @class MAIEvent; 85 | @protocol MAIEventProtocol; 86 | @class MAIFont; 87 | @protocol MAIFontProtocol; 88 | @class MAIFontDescriptor; 89 | @protocol MAIFontDescriptorProtocol; 90 | @class MAIGestureRecognizer; 91 | @protocol MAIGestureRecognizerProtocol; 92 | @class MAIImage; 93 | @protocol MAIImageProtocol; 94 | @class MAIImageView; 95 | @protocol MAIImageViewProtocol; 96 | @class MAILayoutGuide; 97 | @protocol MAILayoutGuideProtocol; 98 | @class MAIMenuItem; 99 | @protocol MAIMenuItemProtocol; 100 | @class MAINib; 101 | @protocol MAINibProtocol; 102 | @class MAIPanGestureRecognizer; 103 | @protocol MAIPanGestureRecognizerProtocol; 104 | @class MAIPasteboard; 105 | @protocol MAIPasteboardProtocol; 106 | @class MAIPrinter; 107 | @protocol MAIPrinterProtocol; 108 | @class MAIPrintInfo; 109 | @protocol MAIPrintInfoProtocol; 110 | @class MAIResponder; 111 | @protocol MAIResponderProtocol; 112 | @class MAIRotationGestureRecognizer; 113 | @protocol MAIRotationGestureRecognizerProtocol; 114 | @class MAIScreen; 115 | @protocol MAIScreenProtocol; 116 | @class MAIScrollView; 117 | @protocol MAIScrollViewProtocol; 118 | @class MAISegmentedControl; 119 | @protocol MAISegmentedControlProtocol; 120 | @class MAISlider; 121 | @protocol MAISliderProtocol; 122 | @class MAISplitViewController; 123 | @protocol MAISplitViewControllerProtocol; 124 | @class MAIStackView; 125 | @protocol MAIStackViewProtocol; 126 | @class MAIStepper; 127 | @protocol MAIStepperProtocol; 128 | @class MAIStoryboard; 129 | @protocol MAIStoryboardProtocol; 130 | @class MAIStoryboardSegue; 131 | @protocol MAIStoryboardSegueProtocol; 132 | @class MAITableViewRowAction; 133 | @protocol MAITableViewRowActionProtocol; 134 | @class MAITableView; 135 | @protocol MAITableViewProtocol; 136 | @class MAITextField; 137 | @protocol MAITextFieldProtocol; 138 | @class MAITextView; 139 | @protocol MAITextViewProtocol; 140 | @class MAIToolbar; 141 | @protocol MAIToolbarProtocol; 142 | @class MAITouch; 143 | @protocol MAITouchProtocol; 144 | @class MAIView; 145 | @protocol MAIViewProtocol; 146 | @class MAIViewController; 147 | @protocol MAIViewControllerProtocol; 148 | @class MAIVisualEffectView; 149 | @protocol MAIVisualEffectViewProtocol; 150 | @class MAIWindow; 151 | @protocol MAIWindowProtocol; 152 | 153 | NS_ASSUME_NONNULL_BEGIN 154 | 155 | @protocol MAITextViewDelegate 156 | @optional 157 | 158 | 159 | 160 | @end 161 | 162 | NS_ASSUME_NONNULL_END 163 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIToolbar.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIToolbarProtocol 18 | @property(nullable, setter=setDelegate:, getter=delegate) id delegate; 19 | 20 | #if TARGET_OS_IPHONE 21 | +(Class)layerClass NS_UNAVAILABLE; 22 | -(instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; 23 | -(nullable instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; 24 | +(MAIUserInterfaceLayoutDirection)userInterfaceLayoutDirectionForSemanticContentAttribute:(UISemanticContentAttribute)attribute NS_UNAVAILABLE; 25 | +(MAIUserInterfaceLayoutDirection)userInterfaceLayoutDirectionForSemanticContentAttribute:(UISemanticContentAttribute)semanticContentAttribute relativeToLayoutDirection:(MAIUserInterfaceLayoutDirection)layoutDirection NS_UNAVAILABLE; 26 | +(void)beginAnimations:(nullable NSString*)animationID context:(nullable void*)context NS_UNAVAILABLE; 27 | +(void)commitAnimations NS_UNAVAILABLE; 28 | +(void)setAnimationDelegate:(nullable id)delegate NS_UNAVAILABLE; 29 | +(void)setAnimationWillStartSelector:(nullable SEL)selector NS_UNAVAILABLE; 30 | +(void)setAnimationDidStopSelector:(nullable SEL)selector NS_UNAVAILABLE; 31 | +(void)setAnimationDuration:(NSTimeInterval)duration NS_UNAVAILABLE; 32 | +(void)setAnimationDelay:(NSTimeInterval)delay NS_UNAVAILABLE; 33 | +(void)setAnimationStartDate:(NSDate*)startDate NS_UNAVAILABLE; 34 | +(void)setAnimationCurve:(UIViewAnimationCurve)curve NS_UNAVAILABLE; 35 | +(void)setAnimationRepeatCount:(float)repeatCount NS_UNAVAILABLE; 36 | +(void)setAnimationRepeatAutoreverses:(BOOL)repeatAutoreverses NS_UNAVAILABLE; 37 | +(void)setAnimationBeginsFromCurrentState:(BOOL)fromCurrentState NS_UNAVAILABLE; 38 | +(void)setAnimationTransition:(UIViewAnimationTransition)transition forView:(id)view cache:(BOOL)cache NS_UNAVAILABLE; 39 | +(void)setAnimationsEnabled:(BOOL)enabled NS_UNAVAILABLE; 40 | +(BOOL)areAnimationsEnabled NS_UNAVAILABLE; 41 | +(void)performWithoutAnimation:(void (NS_NOESCAPE ^)(void))actionsWithoutAnimation NS_UNAVAILABLE; 42 | +(NSTimeInterval)inheritedAnimationDuration NS_UNAVAILABLE; 43 | +(void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^ __nullable)(BOOL finished))completion NS_UNAVAILABLE; 44 | +(void)animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations completion:(void (^ __nullable)(BOOL finished))completion NS_UNAVAILABLE; 45 | +(void)animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations NS_UNAVAILABLE; 46 | +(void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay usingSpringWithDamping:(CGFloat)dampingRatio initialSpringVelocity:(CGFloat)velocity options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^ __nullable)(BOOL finished))completion NS_UNAVAILABLE; 47 | +(void)transitionWithView:(id)view duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options animations:(void (^ __nullable)(void))animations completion:(void (^ __nullable)(BOOL finished))completion NS_UNAVAILABLE; 48 | +(void)transitionFromView:(id)fromView toView:(id)toView duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options completion:(void (^ __nullable)(BOOL finished))completion NS_UNAVAILABLE; 49 | +(void)performSystemAnimation:(UISystemAnimation)animation onViews:(NSArray<__kindof MAIView*>*)views options:(UIViewAnimationOptions)options animations:(void (^ __nullable)(void))parallelAnimations completion:(void (^ __nullable)(BOOL finished))completion NS_UNAVAILABLE; 50 | +(void)animateKeyframesWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewKeyframeAnimationOptions)options animations:(void (^)(void))animations completion:(void (^ __nullable)(BOOL finished))completion NS_UNAVAILABLE; 51 | +(void)addKeyframeWithRelativeStartTime:(double)frameStartTime relativeDuration:(double)frameDuration animations:(void (^)(void))animations NS_UNAVAILABLE; 52 | +(BOOL)requiresConstraintBasedLayout NS_UNAVAILABLE; 53 | +(void)clearTextInputContextIdentifier:(NSString*)identifier NS_UNAVAILABLE; 54 | #else 55 | -(instancetype)initWithIdentifier:(NSString*)identifier NS_UNAVAILABLE; 56 | #endif 57 | 58 | @end 59 | 60 | #if TARGET_OS_IPHONE 61 | @interface MAIToolbar : UIToolbar 62 | #else 63 | @interface MAIToolbar : NSToolbar 64 | #endif 65 | @end 66 | 67 | NS_ASSUME_NONNULL_END 68 | 69 | #pragma clang diagnostic pop 70 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIToolbar.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIToolbar.h" 5 | 6 | @implementation MAIToolbar 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIToolbarDelegate.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_IPHONE 2 | @import UIKit; 3 | #else 4 | @import AppKit; 5 | #endif 6 | 7 | #import "MAIEnums.h" 8 | 9 | @protocol MAILayoutManagerDelegate; 10 | @protocol MAITextLayoutOrientationProvider; 11 | @protocol MAITextAttachmentContainer; 12 | @protocol MAITextStorageDelegate; 13 | @protocol MAIApplicationDelegate; 14 | @protocol MAICollectionViewDataSource; 15 | @protocol MAICollectionViewDelegate; 16 | @protocol MAICollectionViewDelegateFlowLayout; 17 | @protocol MAIGestureRecognizerDelegate; 18 | @protocol MAITableViewDataSource; 19 | @protocol MAITableViewDelegate; 20 | @protocol MAITextFieldDelegate; 21 | @protocol MAITextInput; 22 | @protocol MAITextViewDelegate; 23 | 24 | @class MAIDataAsset; 25 | @protocol MAIDataAssetProtocol; 26 | @class MAILayoutXAxisAnchor; 27 | @protocol MAILayoutXAxisAnchorProtocol; 28 | @class MAILayoutYAxisAnchor; 29 | @protocol MAILayoutYAxisAnchorProtocol; 30 | @class MAILayoutDimension; 31 | @protocol MAILayoutDimensionProtocol; 32 | @class MAILayoutConstraint; 33 | @protocol MAILayoutConstraintProtocol; 34 | @class MAILayoutManager; 35 | @protocol MAILayoutManagerProtocol; 36 | @class MAITextTab; 37 | @protocol MAITextTabProtocol; 38 | @class MAIParagraphStyle; 39 | @protocol MAIParagraphStyleProtocol; 40 | @class MAIMutableParagraphStyle; 41 | @protocol MAIMutableParagraphStyleProtocol; 42 | @class MAIShadow; 43 | @protocol MAIShadowProtocol; 44 | @class MAIStringDrawingContext; 45 | @protocol MAIStringDrawingContextProtocol; 46 | @class MAITextAttachment; 47 | @protocol MAITextAttachmentProtocol; 48 | @class MAITextContainer; 49 | @protocol MAITextContainerProtocol; 50 | @class MAITextStorage; 51 | @protocol MAITextStorageProtocol; 52 | @class MAIAccessibilityElement; 53 | @protocol MAIAccessibilityElementProtocol; 54 | @class MAIApplication; 55 | @protocol MAIApplicationProtocol; 56 | @class MAIBezierPath; 57 | @protocol MAIBezierPathProtocol; 58 | @class MAIButton; 59 | @protocol MAIButtonProtocol; 60 | @class MAICollectionView; 61 | @protocol MAICollectionViewProtocol; 62 | @class MAICollectionViewFlowLayoutInvalidationContext; 63 | @protocol MAICollectionViewFlowLayoutInvalidationContextProtocol; 64 | @class MAICollectionViewFlowLayout; 65 | @protocol MAICollectionViewFlowLayoutProtocol; 66 | @class MAICollectionViewLayoutAttributes; 67 | @protocol MAICollectionViewLayoutAttributesProtocol; 68 | @class MAICollectionViewUpdateItem; 69 | @protocol MAICollectionViewUpdateItemProtocol; 70 | @class MAICollectionViewLayoutInvalidationContext; 71 | @protocol MAICollectionViewLayoutInvalidationContextProtocol; 72 | @class MAICollectionViewLayout; 73 | @protocol MAICollectionViewLayoutProtocol; 74 | @class MAICollectionViewTransitionLayout; 75 | @protocol MAICollectionViewTransitionLayoutProtocol; 76 | @class MAIColor; 77 | @protocol MAIColorProtocol; 78 | @class MAIControl; 79 | @protocol MAIControlProtocol; 80 | @class MAIDatePicker; 81 | @protocol MAIDatePickerProtocol; 82 | @class MAIDocument; 83 | @protocol MAIDocumentProtocol; 84 | @class MAIEvent; 85 | @protocol MAIEventProtocol; 86 | @class MAIFont; 87 | @protocol MAIFontProtocol; 88 | @class MAIFontDescriptor; 89 | @protocol MAIFontDescriptorProtocol; 90 | @class MAIGestureRecognizer; 91 | @protocol MAIGestureRecognizerProtocol; 92 | @class MAIImage; 93 | @protocol MAIImageProtocol; 94 | @class MAIImageView; 95 | @protocol MAIImageViewProtocol; 96 | @class MAILayoutGuide; 97 | @protocol MAILayoutGuideProtocol; 98 | @class MAIMenuItem; 99 | @protocol MAIMenuItemProtocol; 100 | @class MAINib; 101 | @protocol MAINibProtocol; 102 | @class MAIPanGestureRecognizer; 103 | @protocol MAIPanGestureRecognizerProtocol; 104 | @class MAIPasteboard; 105 | @protocol MAIPasteboardProtocol; 106 | @class MAIPrinter; 107 | @protocol MAIPrinterProtocol; 108 | @class MAIPrintInfo; 109 | @protocol MAIPrintInfoProtocol; 110 | @class MAIResponder; 111 | @protocol MAIResponderProtocol; 112 | @class MAIRotationGestureRecognizer; 113 | @protocol MAIRotationGestureRecognizerProtocol; 114 | @class MAIScreen; 115 | @protocol MAIScreenProtocol; 116 | @class MAIScrollView; 117 | @protocol MAIScrollViewProtocol; 118 | @class MAISegmentedControl; 119 | @protocol MAISegmentedControlProtocol; 120 | @class MAISlider; 121 | @protocol MAISliderProtocol; 122 | @class MAISplitViewController; 123 | @protocol MAISplitViewControllerProtocol; 124 | @class MAIStackView; 125 | @protocol MAIStackViewProtocol; 126 | @class MAIStepper; 127 | @protocol MAIStepperProtocol; 128 | @class MAIStoryboard; 129 | @protocol MAIStoryboardProtocol; 130 | @class MAIStoryboardSegue; 131 | @protocol MAIStoryboardSegueProtocol; 132 | @class MAITableViewRowAction; 133 | @protocol MAITableViewRowActionProtocol; 134 | @class MAITableView; 135 | @protocol MAITableViewProtocol; 136 | @class MAITextField; 137 | @protocol MAITextFieldProtocol; 138 | @class MAITextView; 139 | @protocol MAITextViewProtocol; 140 | @class MAIToolbar; 141 | @protocol MAIToolbarProtocol; 142 | @class MAITouch; 143 | @protocol MAITouchProtocol; 144 | @class MAIView; 145 | @protocol MAIViewProtocol; 146 | @class MAIViewController; 147 | @protocol MAIViewControllerProtocol; 148 | @class MAIVisualEffectView; 149 | @protocol MAIVisualEffectViewProtocol; 150 | @class MAIWindow; 151 | @protocol MAIWindowProtocol; 152 | 153 | NS_ASSUME_NONNULL_BEGIN 154 | 155 | @protocol MAIToolbarDelegate 156 | @optional 157 | 158 | 159 | 160 | @end 161 | 162 | NS_ASSUME_NONNULL_END 163 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITouch.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAITouchProtocol 18 | 19 | #if TARGET_OS_IPHONE 20 | #else 21 | #endif 22 | 23 | @end 24 | 25 | #if TARGET_OS_IPHONE 26 | @interface MAITouch : UITouch 27 | #else 28 | @interface MAITouch : NSTouch 29 | #endif 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | 34 | #pragma clang diagnostic pop 35 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAITouch.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAITouch.h" 5 | 6 | @implementation MAITouch 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIView.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIView.h" 5 | 6 | @implementation MAIView 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wobjc-property-no-attribute" 5 | 6 | #if TARGET_OS_IPHONE 7 | @import UIKit; 8 | #else 9 | @import AppKit; 10 | #endif 11 | 12 | #import "MAIEnums.h" 13 | #import "MAIDeclarations.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol MAIViewControllerProtocol 18 | -(instancetype)initWithNibName:(nullable NSString*)nibNameOrNil bundle:(nullable NSBundle*)nibBundleOrNil; 19 | -(nullable instancetype)initWithCoder:(NSCoder*)aDecoder; 20 | -(void)loadView; 21 | -(void)viewDidLoad; 22 | -(void)encodeRestorableStateWithCoder:(NSCoder*)coder; 23 | -(void)updateViewConstraints; 24 | -(BOOL)becomeFirstResponder; 25 | -(BOOL)resignFirstResponder; 26 | -(void)updateUserActivityState:(NSUserActivity*)activity; 27 | -(void)restoreUserActivityState:(NSUserActivity*)activity; 28 | @property(setter=setView:, getter=view) id view; 29 | @property(readonly, nullable, getter=nibName) NSString* nibName; 30 | @property(readonly, nullable, getter=nibBundle) NSBundle* nibBundle; 31 | @property(readonly, nullable, getter=storyboard) id storyboard; 32 | @property(nullable, setter=setTitle:, getter=title) NSString* title; 33 | @property(readonly, nullable, getter=parentViewController) id parentViewController; 34 | @property(readonly, nullable, getter=presentingViewController) id presentingViewController; 35 | @property(readonly, nullable, getter=extensionContext) NSExtensionContext* extensionContext; 36 | @property(readonly, nullable, getter=undoManager) NSUndoManager* undoManager; 37 | @property(nullable, setter=setUserActivity:, getter=userActivity) NSUserActivity* userActivity; 38 | @property(readonly, getter=isViewLoaded) BOOL viewLoaded; 39 | 40 | #if TARGET_OS_IPHONE 41 | +(void)clearTextInputContextIdentifier:(NSString*)identifier NS_UNAVAILABLE; 42 | #else 43 | -(instancetype)init NS_UNAVAILABLE; 44 | #endif 45 | 46 | @end 47 | 48 | #if TARGET_OS_IPHONE 49 | @interface MAIViewController : UIViewController 50 | #else 51 | @interface MAIViewController : NSViewController 52 | #endif 53 | @end 54 | 55 | NS_ASSUME_NONNULL_END 56 | 57 | #pragma clang diagnostic pop 58 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIViewController.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIViewController.h" 5 | 6 | @implementation MAIViewController 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIVisualEffectView.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIVisualEffectView.h" 5 | 6 | @implementation MAIVisualEffectView 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /MAIKit/MAIKit/MAIWindow.m: -------------------------------------------------------------------------------- 1 | #pragma clang diagnostic push 2 | #pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis" 3 | 4 | #import "MAIWindow.h" 5 | 6 | @implementation MAIWindow 7 | @end 8 | 9 | #pragma clang diagnostic pop 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MAIKit 2 | 3 | MAIKit (Mac and iOS Kit) is a framework for sharing code between OS X and iOS. 4 | 5 | UIKit contains many classes which have counterparts in Appkit. These classes contain many, but not all of the same methods and properties. For example, UIColor and NSColor are nearly identical, but NSColor contains constructors for creating colors from calibrated and device values, which UIColor does not, and UIColor has a CIColor property, which NSColor does not. 6 | 7 | Many projects use @compatibility_alias to alias UIColor to NSColor in order to share code between iOS and OS X apps. However, this approach has some drawbacks. One such drawback is that it is still possible to write and compile code that works on one platform but not the other. For example, the following code would compile for iOS, but not OS X. 8 | 9 | ```Swift 10 | let ciColor = NSColor.blackColor().CIColor 11 | ``` 12 | 13 | Of course, this error would be easily caught the next time the code was compiled for OS X, but constantly compiling for both platforms slows down development. Furthermore, it takes longer to correct problems than to prevent them, and when working on a team, if the build error is not caught before it is committed, could prevent other team members from completing their work until it is fixed. The @compatibility_alias method also exposes platform-specific methods and properties to autocomplete, leaving to the developer the responsibility of remembering which APIs are available on both platforms, and which APIs are not. 14 | 15 | MAIKit aims to prevent these problems, speeding up cross-platform development. It does so by defining protocols which contain the intersection of methods and properties of UIKit and AppKit classes. It also defines classes which implement these protocols, and can be used in both iOS and OS X code. These classes inherit from their UIKit and Appkit counterparts, and can be safely subclassed. 16 | 17 | Continuing the NSColor example, MAIKit defines a class named MAIColor, and a protocol named MAIColorProtocol. The same pattern applies to all UIKit and AppKit classes. 18 | 19 | When declaring variables, you will need to declare them as MAIKit-defined protocols in Swift, or as Objective-C objects conforming to those protocols. You cannot instantiate protocols, however, so you will need to initialize them using MAIKit-defined classes. 20 | 21 | ```Swift 22 | let maiColor : MAIColorProtocol = MAIColor.blackColor() 23 | let cgColor = maiColor.CGColor 24 | ``` 25 | 26 | ```Objective-C 27 | id maiColor = [MAIColor blackColor]; 28 | CGColorRef cgColor = [maiColor CGColor]; 29 | ``` 30 | 31 | 32 | ## Examples 33 | 34 | The MAIKit/Examples folder contains an example project which demonstrates how to subclass views and viewcontrollers and how to handle events in mostly cross-platform code. 35 | 36 | If you wish to contribute additional examples, please open a pull request. I will be happy to include them. 37 | 38 | ## Versioning 39 | 40 | MAIKit attempts to remain compatible with [semantic versioning](http://semver.org) by only introducing API-incompatible changes in major versions. Because iOS SDK versions are usually tied to Xcode versions, MAIKit's major version changes whenever Xcode's major or minor version changes. MAIKit's minor version corresponds to Xcode's patch version, and MAIKit's patch version is independant of Xcode's version. 41 | 42 | For example, Xcode 7.0.0, which contains iOS SDK 9.0 and OS X SDK 10.10, corresponds to MAIKit versions 70.0.x. If MAIKit releases 3 versions total during Xcode 7.0.0's life, then MAIKit will be at 70.0.2. If Xcode 7.0.1 is then released with minor API changes, MAIKit will incorporate those changes in a version 70.1.0. When Xcode 7.1.0 is released, MAIKit's version will increase to 71.0.0. 43 | 44 | During Xcode betas, MAIKit may introduce API-incompatible changes without increasing the major version number, because Xcode builds with the same version number may introduce API-breaking changes. 45 | 46 | ## Installation 47 | 48 | ### [Carthage](https://github.com/Carthage/Carthage) ### 49 | 50 | 51 | Start by adding the following line to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile). 52 | ``` 53 | github "MichaelBuckley/MAIKit" ~> 70.0.0 54 | ``` 55 | 56 | Full instructions on installing dependencies with Carthage can be found in [Carthage's README](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application). 57 | 58 | ### [CocoaPods](http://cocoapods.org) ### 59 | 60 | Add the following line to your [Podfile](http://guides.cocoapods.org/using/the-podfile.html). 61 | 62 | ```ruby 63 | pod 'MAIKit', '~> 70.0.0' 64 | ``` 65 | Then, run `pod update`. 66 | 67 | ## License 68 | 69 | MAIKit is released under the [MIT license](http://opensource.org/licenses/MIT). 70 | --------------------------------------------------------------------------------