Skip to content

Commit

Permalink
Performed initial conversion to Swift 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
BradLarson committed Jun 21, 2016
1 parent 4991dbe commit c55ee85
Show file tree
Hide file tree
Showing 85 changed files with 988 additions and 932 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0720;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Sunset Lake Software LLC";
TargetAttributes = {
BC1E133A1C9F82B4008F844F = {
CreatedOnToolsVersion = 7.2.1;
LastSwiftMigration = 0800;
};
};
};
Expand Down Expand Up @@ -381,6 +382,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.sunsetlakesoftware.FilterShowcase;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -393,6 +395,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.sunsetlakesoftware.FilterShowcase;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {

var windowController:FilterShowcaseWindowController?

func applicationDidFinishLaunching(aNotification: NSNotification) {
func applicationDidFinishLaunching(_ aNotification: Notification) {
self.windowController = FilterShowcaseWindowController(windowNibName:"FilterShowcaseWindowController")
self.windowController?.showWindow(self)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import Foundation
import GPUImage

enum FilterSliderSetting {
case Disabled
case Enabled(minimumValue:Float, maximumValue:Float, initialValue:Float)
case disabled
case enabled(minimumValue:Float, maximumValue:Float, initialValue:Float)
}

typealias FilterSetupFunction = (camera:Camera, filter:ImageProcessingOperation, outputView:RenderView) -> ImageSource?

enum FilterOperationType {
case SingleInput
case Blend
case Custom(filterSetupFunction:FilterSetupFunction)
case singleInput
case blend
case custom(filterSetupFunction:FilterSetupFunction)
}

protocol FilterOperationInterface {
Expand All @@ -22,8 +22,8 @@ protocol FilterOperationInterface {
var sliderConfiguration: FilterSliderSetting { get }
var filterOperationType: FilterOperationType { get }

func configureCustomFilter(secondInput:ImageSource?)
func updateBasedOnSliderValue(sliderValue:Float)
func configureCustomFilter(_ secondInput:ImageSource?)
func updateBasedOnSliderValue(_ sliderValue:Float)
}

class FilterOperation<FilterClass: ImageProcessingOperation>: FilterOperationInterface {
Expand All @@ -50,11 +50,11 @@ class FilterOperation<FilterClass: ImageProcessingOperation>: FilterOperationInt
return internalFilter
}

func configureCustomFilter(secondInput:ImageSource?) {
func configureCustomFilter(_ secondInput:ImageSource?) {
self.secondInput = secondInput
}

func updateBasedOnSliderValue(sliderValue:Float) {
func updateBasedOnSliderValue(_ sliderValue:Float) {
sliderUpdateCallback?(filter:internalFilter, sliderValue:sliderValue)
}
}
}
Loading

0 comments on commit c55ee85

Please sign in to comment.