| LEFT | RIGHT | 
|---|
| 1 // | 1 // | 
| 2 // FavIcon | 2 // FavIcon | 
| 3 // Copyright © 2016 Leon Breedt | 3 // Copyright © 2016 Leon Breedt | 
| 4 // | 4 // | 
| 5 // Licensed under the Apache License, Version 2.0 (the "License"); | 5 // Licensed under the Apache License, Version 2.0 (the "License"); | 
| 6 // you may not use this file except in compliance with the License. | 6 // you may not use this file except in compliance with the License. | 
| 7 // You may obtain a copy of the License at | 7 // You may obtain a copy of the License at | 
| 8 // | 8 // | 
| 9 // http://www.apache.org/licenses/LICENSE-2.0 | 9 // http://www.apache.org/licenses/LICENSE-2.0 | 
| 10 // | 10 // | 
| 11 // Unless required by applicable law or agreed to in writing, software | 11 // Unless required by applicable law or agreed to in writing, software | 
| 12 // distributed under the License is distributed on an "AS IS" BASIS, | 12 // distributed under the License is distributed on an "AS IS" BASIS, | 
| 13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
| 14 // See the License for the specific language governing permissions and | 14 // See the License for the specific language governing permissions and | 
| 15 // limitations under the License. | 15 // limitations under the License. | 
| 16 // | 16 // | 
| 17 | 17 | 
| 18 // swiftlint:disable file_length | 18 // swiftlint:disable file_length | 
| 19 | 19 | 
| 20 import Foundation | 20 import Foundation | 
|  | 21 | 
| 21 #if os(iOS) | 22 #if os(iOS) | 
| 22     import UIKit | 23     import UIKit | 
| 23     /// Alias for the iOS image type (`UIImage`). | 24     /// Alias for the iOS image type (`UIImage`). | 
| 24     public typealias ImageType = UIImage | 25     public typealias ImageType = UIImage | 
| 25 #elseif os(OSX) | 26 #elseif os(OSX) | 
| 26     import Cocoa | 27     import Cocoa | 
| 27     /// Alias for the OS X image type (`NSImage`). | 28     /// Alias for the OS X image type (`NSImage`). | 
| 28     public typealias ImageType = NSImage | 29     public typealias ImageType = NSImage | 
| 29 #endif | 30 #endif | 
| 30 | 31 | 
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 400 | 401 | 
| 401 extension DetectedIcon { | 402 extension DetectedIcon { | 
| 402     /// The area of a detected icon, if known. | 403     /// The area of a detected icon, if known. | 
| 403     var area: Int? { | 404     var area: Int? { | 
| 404         if let width = width, let height = height { | 405         if let width = width, let height = height { | 
| 405             return width * height | 406             return width * height | 
| 406         } | 407         } | 
| 407         return nil | 408         return nil | 
| 408     } | 409     } | 
| 409 } | 410 } | 
| LEFT | RIGHT | 
|---|