├── Touch Bar Shot 2017-02-20 at 4.19.12 PM.png ├── iTunesTouch.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── project.pbxproj ├── README.md ├── iTunesTouch ├── ViewController.h ├── main.m ├── AppDelegate.h ├── TouchBarViewController.h ├── ViewController.m ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── Spotify.h ├── TouchBarViewController.m ├── iTunes.h └── Base.lproj │ └── Main.storyboard └── .gitignore /Touch Bar Shot 2017-02-20 at 4.19.12 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanrauch/iTunesTouch/HEAD/Touch Bar Shot 2017-02-20 at 4.19.12 PM.png -------------------------------------------------------------------------------- /iTunesTouch.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # iTunesTouch 2 | Displays the currently playing track in the TouchBar (for new MacBook Pros) 3 | 4 | Works for both iTunes and Spotify 5 | 6 | ![TouchBarShot](https://github.com/jonathanrauch/iTunesTouch/blob/master/Touch%20Bar%20Shot%202017-02-20%20at%204.19.12%20PM.png) 7 | -------------------------------------------------------------------------------- /iTunesTouch/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // iTunesTouch 4 | // 5 | // Created by Jonathan Rauch on 2/20/17. 6 | // Copyright © 2017 Jonathan Rauch. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : NSViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /iTunesTouch/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // iTunesTouch 4 | // 5 | // Created by Jonathan Rauch on 2/20/17. 6 | // Copyright © 2017 Jonathan Rauch. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /iTunesTouch/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // iTunesTouch 4 | // 5 | // Created by Jonathan Rauch on 2/20/17. 6 | // Copyright © 2017 Jonathan Rauch. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /iTunesTouch/TouchBarViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TouchBarViewController.h 3 | // iTunesTouch 4 | // 5 | // Created by Jonathan Rauch on 2/20/17. 6 | // Copyright © 2017 Jonathan Rauch. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TouchBarViewController : NSViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /iTunesTouch/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // iTunesTouch 4 | // 5 | // Created by Jonathan Rauch on 2/20/17. 6 | // Copyright © 2017 Jonathan Rauch. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @implementation ViewController 12 | 13 | - (void)viewDidLoad { 14 | [super viewDidLoad]; 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | 20 | - (void)setRepresentedObject:(id)representedObject { 21 | [super setRepresentedObject:representedObject]; 22 | 23 | // Update the view, if already loaded. 24 | } 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /iTunesTouch/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // iTunesTouch 4 | // 5 | // Created by Jonathan Rauch on 2/20/17. 6 | // Copyright © 2017 Jonathan Rauch. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 18 | // Insert code here to initialize your application 19 | } 20 | 21 | 22 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 23 | // Insert code here to tear down your application 24 | } 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | .AppleDouble 3 | .LSOverride 4 | 5 | # Icon must end with two \r 6 | Icon 7 | 8 | 9 | # Thumbnails 10 | ._* 11 | 12 | # Files that might appear in the root of a volume 13 | .DocumentRevisions-V100 14 | .fseventsd 15 | .Spotlight-V100 16 | .TemporaryItems 17 | .Trashes 18 | .VolumeIcon.icns 19 | .com.apple.timemachine.donotpresent 20 | 21 | # Directories potentially created on remote AFP share 22 | .AppleDB 23 | .AppleDesktop 24 | Network Trash Folder 25 | Temporary Items 26 | .apdisk 27 | 28 | # Xcode 29 | # 30 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 31 | 32 | ## Build generated 33 | build/ 34 | DerivedData/ 35 | 36 | ## Various settings 37 | *.pbxuser 38 | !default.pbxuser 39 | *.mode1v3 40 | !default.mode1v3 41 | *.mode2v3 42 | !default.mode2v3 43 | *.perspectivev3 44 | !default.perspectivev3 45 | xcuserdata/ 46 | 47 | ## Other 48 | *.moved-aside 49 | *.xccheckout 50 | *.xcscmblueprint -------------------------------------------------------------------------------- /iTunesTouch/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /iTunesTouch/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 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | NSExceptionDomains 30 | 31 | http://i.scdn.co 32 | 33 | NSIncludesSubdomains 34 | 35 | NSTemporaryExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSHumanReadableCopyright 41 | Copyright © 2017 Jonathan Rauch. All rights reserved. 42 | NSMainStoryboardFile 43 | Main 44 | NSPrincipalClass 45 | NSApplication 46 | 47 | 48 | -------------------------------------------------------------------------------- /iTunesTouch/Spotify.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Spotify.h 3 | */ 4 | 5 | #import 6 | #import 7 | 8 | 9 | @class SpotifyApplication, SpotifyTrack, SpotifyApplication; 10 | 11 | enum SpotifyEPlS { 12 | SpotifyEPlSStopped = 'kPSS', 13 | SpotifyEPlSPlaying = 'kPSP', 14 | SpotifyEPlSPaused = 'kPSp' 15 | }; 16 | typedef enum SpotifyEPlS SpotifyEPlS; 17 | 18 | 19 | 20 | /* 21 | * Spotify Suite 22 | */ 23 | 24 | // The Spotify application. 25 | @interface SpotifyApplication : SBApplication 26 | 27 | @property (copy, readonly) SpotifyTrack *currentTrack; // The current playing track. 28 | @property NSInteger soundVolume; // The sound output volume (0 = minimum, 100 = maximum) 29 | @property (readonly) SpotifyEPlS playerState; // Is Spotify stopped, paused, or playing? 30 | @property double playerPosition; // The player’s position within the currently playing track in seconds. 31 | @property (readonly) BOOL repeatingEnabled; // Is repeating enabled in the current playback context? 32 | @property BOOL repeating; // Is repeating on or off? 33 | @property (readonly) BOOL shufflingEnabled; // Is shuffling enabled in the current playback context? 34 | @property BOOL shuffling; // Is shuffling on or off? 35 | 36 | - (void) nextTrack; // Skip to the next track. 37 | - (void) previousTrack; // Skip to the previous track. 38 | - (void) playpause; // Toggle play/pause. 39 | - (void) pause; // Pause playback. 40 | - (void) play; // Resume playback. 41 | - (void) playTrack:(NSString *)x inContext:(NSString *)inContext; // Start playback of a track in the given context. 42 | 43 | @end 44 | 45 | // A Spotify track. 46 | @interface SpotifyTrack : SBObject 47 | 48 | @property (copy, readonly) NSString *artist; // The artist of the track. 49 | @property (copy, readonly) NSString *album; // The album of the track. 50 | @property (readonly) NSInteger discNumber; // The disc number of the track. 51 | @property (readonly) NSInteger duration; // The length of the track in seconds. 52 | @property (readonly) NSInteger playedCount; // The number of times this track has been played. 53 | @property (readonly) NSInteger trackNumber; // The index of the track in its album. 54 | @property (readonly) BOOL starred; // Is the track starred? 55 | @property (readonly) NSInteger popularity; // How popular is this track? 0-100 56 | - (NSString *) id; // The ID of the item. 57 | @property (copy, readonly) NSString *name; // The name of the track. 58 | @property (copy, readonly) NSString *artworkUrl; // The URL of the track%apos;s album cover. 59 | @property (copy, readonly) NSImage *artwork; // The property is deprecated and will never be set. Use the 'artwork url' instead. 60 | @property (copy, readonly) NSString *albumArtist; // That album artist of the track. 61 | @property (copy) NSString *spotifyUrl; // The URL of the track. 62 | 63 | 64 | @end 65 | 66 | 67 | 68 | /* 69 | * Standard Suite 70 | */ 71 | 72 | // The application's top level scripting object. 73 | @interface SpotifyApplication (StandardSuite) 74 | 75 | @property (copy, readonly) NSString *name; // The name of the application. 76 | @property (readonly) BOOL frontmost; // Is this the frontmost (active) application? 77 | @property (copy, readonly) NSString *version; // The version of the application. 78 | 79 | @end 80 | 81 | -------------------------------------------------------------------------------- /iTunesTouch/TouchBarViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TouchBarViewController.m 3 | // iTunesTouch 4 | // 5 | // Created by Jonathan Rauch on 2/20/17. 6 | // Copyright © 2017 Jonathan Rauch. All rights reserved. 7 | // 8 | 9 | #import "TouchBarViewController.h" 10 | #import "iTunes.h" 11 | #import "Spotify.h" 12 | 13 | @interface TouchBarViewController () 14 | 15 | @property NSString *currentTrackText; 16 | @property NSTimer *repeatingTimer; 17 | @property NSImage *artwork; 18 | 19 | @end 20 | 21 | @implementation TouchBarViewController 22 | 23 | static NSString *iTunesBundleId = @"com.apple.iTunes"; 24 | static NSString *spotifyBundleId = @"com.spotify.client"; 25 | static NSImage *grayPlaceholderImage; 26 | 27 | - (void)viewDidLoad { 28 | [super viewDidLoad]; 29 | 30 | self.currentTrackText = @""; 31 | grayPlaceholderImage = placeholderImage(CGSizeMake(30, 30), [NSColor lightGrayColor]); 32 | self.artwork = grayPlaceholderImage; 33 | 34 | self.repeatingTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(updateLabel) userInfo:nil repeats:YES]; 35 | } 36 | 37 | 38 | BOOL isRunning(NSString *bundleId) { 39 | NSArray *apps = [[NSWorkspace sharedWorkspace] runningApplications]; 40 | for (NSRunningApplication *app in apps) { 41 | if ([app.bundleIdentifier isEqualToString:bundleId]) 42 | return true; 43 | } 44 | return false; 45 | } 46 | 47 | - (void)updateLabel { 48 | 49 | if (isRunning(iTunesBundleId)) { 50 | [self updateFromiTunes]; 51 | } 52 | else if (isRunning(spotifyBundleId)) { 53 | [self updateFromSpotify]; 54 | return; 55 | } 56 | } 57 | 58 | - (void)updateFromSpotify { 59 | SpotifyApplication *spotify = [SBApplication applicationWithBundleIdentifier:spotifyBundleId]; 60 | SpotifyTrack *currentTrack = [spotify currentTrack]; 61 | if (currentTrack != nil) { 62 | self.currentTrackText = [NSString stringWithFormat:@"%@ - %@", [currentTrack artist], [currentTrack name]]; 63 | 64 | NSURL *url = [NSURL URLWithString:[currentTrack artworkUrl]]; 65 | 66 | NSURLSessionDownloadTask *downloadPhotoTask = [[NSURLSession sharedSession] 67 | downloadTaskWithURL:url completionHandler:^(NSURL *location, NSURLResponse *response, NSError *error) { 68 | 69 | NSImage *downloadedImage = [[NSImage alloc] initWithData:[NSData dataWithContentsOfURL:location]]; 70 | NSImage *resizedImage = resizeImageForTouchBar(downloadedImage); 71 | dispatch_async(dispatch_get_main_queue(), ^{ 72 | self.artwork = resizedImage; 73 | }); 74 | }]; 75 | [downloadPhotoTask resume]; 76 | } 77 | else { 78 | self.currentTrackText = @""; 79 | } 80 | } 81 | 82 | NSImage *resizeImageForTouchBar(NSImage *image) { 83 | CGSize destinationSize = CGSizeMake(30, 30); 84 | NSImage *scaleToFillImage = [NSImage imageWithSize:destinationSize 85 | flipped:NO 86 | drawingHandler:^BOOL(NSRect dstRect) { 87 | 88 | NSSize imageSize = [image size]; 89 | NSRect srcRect = NSMakeRect(0, 0, imageSize.width, imageSize.height); 90 | 91 | [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationHigh]; 92 | 93 | [image drawInRect:dstRect 94 | fromRect:srcRect 95 | operation:NSCompositingOperationCopy 96 | fraction:1.0 97 | respectFlipped:YES 98 | hints:@{NSImageHintInterpolation: @(NSImageInterpolationHigh)}]; 99 | 100 | return YES; 101 | }]; 102 | return scaleToFillImage; 103 | } 104 | 105 | NSImage *placeholderImage(CGSize size, NSColor *color) { 106 | NSImage *image = [[NSImage alloc] initWithSize:size]; 107 | [image lockFocus]; 108 | [color drawSwatchInRect:NSMakeRect(0, 0, size.width, size.height)]; 109 | [image unlockFocus]; 110 | return image; 111 | } 112 | 113 | - (void)updateFromiTunes { 114 | iTunesApplication *iTunes = [SBApplication applicationWithBundleIdentifier:iTunesBundleId]; 115 | iTunesTrack *currentTrack = [iTunes currentTrack]; 116 | if (currentTrack != nil) { 117 | self.currentTrackText = [NSString stringWithFormat:@"%@ - %@", [currentTrack artist], [currentTrack name]]; 118 | 119 | NSArray * artworks = [[currentTrack artworks] get]; 120 | NSImage *originalArtwork = [[artworks lastObject] data]; 121 | if (!originalArtwork) { 122 | self.artwork = grayPlaceholderImage; 123 | } 124 | else { 125 | self.artwork = resizeImageForTouchBar(originalArtwork); 126 | } 127 | 128 | return; 129 | } 130 | } 131 | 132 | @end 133 | -------------------------------------------------------------------------------- /iTunesTouch.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0F1EF0B31E5AE35100EED4CA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1EF0B21E5AE35100EED4CA /* AppDelegate.m */; }; 11 | 0F1EF0B61E5AE35100EED4CA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1EF0B51E5AE35100EED4CA /* main.m */; }; 12 | 0F1EF0B91E5AE35100EED4CA /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1EF0B81E5AE35100EED4CA /* ViewController.m */; }; 13 | 0F1EF0BB1E5AE35100EED4CA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0F1EF0BA1E5AE35100EED4CA /* Assets.xcassets */; }; 14 | 0F1EF0BE1E5AE35100EED4CA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F1EF0BC1E5AE35100EED4CA /* Main.storyboard */; }; 15 | 0F1EF0CC1E5AE63400EED4CA /* TouchBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1EF0CB1E5AE63400EED4CA /* TouchBarViewController.m */; }; 16 | 0F1EF0D41E5AEEC700EED4CA /* ScriptingBridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F1EF0D31E5AEEC700EED4CA /* ScriptingBridge.framework */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 0F1EF0AE1E5AE35100EED4CA /* iTunesTouch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iTunesTouch.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 0F1EF0B11E5AE35100EED4CA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 22 | 0F1EF0B21E5AE35100EED4CA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 23 | 0F1EF0B51E5AE35100EED4CA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 24 | 0F1EF0B71E5AE35100EED4CA /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 25 | 0F1EF0B81E5AE35100EED4CA /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 26 | 0F1EF0BA1E5AE35100EED4CA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 27 | 0F1EF0BD1E5AE35100EED4CA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 28 | 0F1EF0BF1E5AE35100EED4CA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | 0F1EF0CA1E5AE63400EED4CA /* TouchBarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TouchBarViewController.h; sourceTree = ""; }; 30 | 0F1EF0CB1E5AE63400EED4CA /* TouchBarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TouchBarViewController.m; sourceTree = ""; }; 31 | 0F1EF0D11E5AE72F00EED4CA /* iTunesLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iTunesLibrary.framework; path = ../../../../Library/Frameworks/iTunesLibrary.framework; sourceTree = ""; }; 32 | 0F1EF0D31E5AEEC700EED4CA /* ScriptingBridge.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ScriptingBridge.framework; path = ../../../../System/Library/Frameworks/ScriptingBridge.framework; sourceTree = ""; }; 33 | 0F1EF0D51E5AEF3300EED4CA /* iTunes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTunes.h; sourceTree = ""; }; 34 | 0F597B781E5B3ABB0031E7E6 /* Spotify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Spotify.h; sourceTree = ""; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | 0F1EF0AB1E5AE35100EED4CA /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | 0F1EF0D41E5AEEC700EED4CA /* ScriptingBridge.framework in Frameworks */, 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | /* End PBXFrameworksBuildPhase section */ 47 | 48 | /* Begin PBXGroup section */ 49 | 0F1EF0A51E5AE35100EED4CA = { 50 | isa = PBXGroup; 51 | children = ( 52 | 0F1EF0B01E5AE35100EED4CA /* iTunesTouch */, 53 | 0F1EF0AF1E5AE35100EED4CA /* Products */, 54 | 0F1EF0D01E5AE72F00EED4CA /* Frameworks */, 55 | ); 56 | sourceTree = ""; 57 | }; 58 | 0F1EF0AF1E5AE35100EED4CA /* Products */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 0F1EF0AE1E5AE35100EED4CA /* iTunesTouch.app */, 62 | ); 63 | name = Products; 64 | sourceTree = ""; 65 | }; 66 | 0F1EF0B01E5AE35100EED4CA /* iTunesTouch */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 0F1EF0B41E5AE35100EED4CA /* Supporting Files */, 70 | 0F1EF0B11E5AE35100EED4CA /* AppDelegate.h */, 71 | 0F1EF0B21E5AE35100EED4CA /* AppDelegate.m */, 72 | 0F1EF0B71E5AE35100EED4CA /* ViewController.h */, 73 | 0F1EF0B81E5AE35100EED4CA /* ViewController.m */, 74 | 0F1EF0BC1E5AE35100EED4CA /* Main.storyboard */, 75 | 0F1EF0CA1E5AE63400EED4CA /* TouchBarViewController.h */, 76 | 0F1EF0CB1E5AE63400EED4CA /* TouchBarViewController.m */, 77 | ); 78 | path = iTunesTouch; 79 | sourceTree = ""; 80 | }; 81 | 0F1EF0B41E5AE35100EED4CA /* Supporting Files */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 0F1EF0D51E5AEF3300EED4CA /* iTunes.h */, 85 | 0F597B781E5B3ABB0031E7E6 /* Spotify.h */, 86 | 0F1EF0BA1E5AE35100EED4CA /* Assets.xcassets */, 87 | 0F1EF0B51E5AE35100EED4CA /* main.m */, 88 | 0F1EF0BF1E5AE35100EED4CA /* Info.plist */, 89 | ); 90 | name = "Supporting Files"; 91 | sourceTree = ""; 92 | }; 93 | 0F1EF0D01E5AE72F00EED4CA /* Frameworks */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 0F1EF0D31E5AEEC700EED4CA /* ScriptingBridge.framework */, 97 | 0F1EF0D11E5AE72F00EED4CA /* iTunesLibrary.framework */, 98 | ); 99 | name = Frameworks; 100 | sourceTree = ""; 101 | }; 102 | /* End PBXGroup section */ 103 | 104 | /* Begin PBXNativeTarget section */ 105 | 0F1EF0AD1E5AE35100EED4CA /* iTunesTouch */ = { 106 | isa = PBXNativeTarget; 107 | buildConfigurationList = 0F1EF0C21E5AE35100EED4CA /* Build configuration list for PBXNativeTarget "iTunesTouch" */; 108 | buildPhases = ( 109 | 0F1EF0AA1E5AE35100EED4CA /* Sources */, 110 | 0F1EF0AB1E5AE35100EED4CA /* Frameworks */, 111 | 0F1EF0AC1E5AE35100EED4CA /* Resources */, 112 | ); 113 | buildRules = ( 114 | ); 115 | dependencies = ( 116 | ); 117 | name = iTunesTouch; 118 | productName = iTunesTouch; 119 | productReference = 0F1EF0AE1E5AE35100EED4CA /* iTunesTouch.app */; 120 | productType = "com.apple.product-type.application"; 121 | }; 122 | /* End PBXNativeTarget section */ 123 | 124 | /* Begin PBXProject section */ 125 | 0F1EF0A61E5AE35100EED4CA /* Project object */ = { 126 | isa = PBXProject; 127 | attributes = { 128 | LastUpgradeCheck = 0820; 129 | ORGANIZATIONNAME = "Jonathan Rauch"; 130 | TargetAttributes = { 131 | 0F1EF0AD1E5AE35100EED4CA = { 132 | CreatedOnToolsVersion = 8.2.1; 133 | DevelopmentTeam = NPU2FZFY6H; 134 | LastSwiftMigration = 0820; 135 | ProvisioningStyle = Automatic; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 0F1EF0A91E5AE35100EED4CA /* Build configuration list for PBXProject "iTunesTouch" */; 140 | compatibilityVersion = "Xcode 3.2"; 141 | developmentRegion = English; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 0F1EF0A51E5AE35100EED4CA; 148 | productRefGroup = 0F1EF0AF1E5AE35100EED4CA /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 0F1EF0AD1E5AE35100EED4CA /* iTunesTouch */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 0F1EF0AC1E5AE35100EED4CA /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 0F1EF0BB1E5AE35100EED4CA /* Assets.xcassets in Resources */, 163 | 0F1EF0BE1E5AE35100EED4CA /* Main.storyboard in Resources */, 164 | ); 165 | runOnlyForDeploymentPostprocessing = 0; 166 | }; 167 | /* End PBXResourcesBuildPhase section */ 168 | 169 | /* Begin PBXSourcesBuildPhase section */ 170 | 0F1EF0AA1E5AE35100EED4CA /* Sources */ = { 171 | isa = PBXSourcesBuildPhase; 172 | buildActionMask = 2147483647; 173 | files = ( 174 | 0F1EF0B91E5AE35100EED4CA /* ViewController.m in Sources */, 175 | 0F1EF0B61E5AE35100EED4CA /* main.m in Sources */, 176 | 0F1EF0CC1E5AE63400EED4CA /* TouchBarViewController.m in Sources */, 177 | 0F1EF0B31E5AE35100EED4CA /* AppDelegate.m in Sources */, 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | }; 181 | /* End PBXSourcesBuildPhase section */ 182 | 183 | /* Begin PBXVariantGroup section */ 184 | 0F1EF0BC1E5AE35100EED4CA /* Main.storyboard */ = { 185 | isa = PBXVariantGroup; 186 | children = ( 187 | 0F1EF0BD1E5AE35100EED4CA /* Base */, 188 | ); 189 | name = Main.storyboard; 190 | sourceTree = ""; 191 | }; 192 | /* End PBXVariantGroup section */ 193 | 194 | /* Begin XCBuildConfiguration section */ 195 | 0F1EF0C01E5AE35100EED4CA /* Debug */ = { 196 | isa = XCBuildConfiguration; 197 | buildSettings = { 198 | ALWAYS_SEARCH_USER_PATHS = NO; 199 | CLANG_ANALYZER_NONNULL = YES; 200 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 201 | CLANG_CXX_LIBRARY = "libc++"; 202 | CLANG_ENABLE_MODULES = YES; 203 | CLANG_ENABLE_OBJC_ARC = YES; 204 | CLANG_WARN_BOOL_CONVERSION = YES; 205 | CLANG_WARN_CONSTANT_CONVERSION = YES; 206 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 207 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 208 | CLANG_WARN_EMPTY_BODY = YES; 209 | CLANG_WARN_ENUM_CONVERSION = YES; 210 | CLANG_WARN_INFINITE_RECURSION = YES; 211 | CLANG_WARN_INT_CONVERSION = YES; 212 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 213 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 214 | CLANG_WARN_UNREACHABLE_CODE = YES; 215 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 216 | CODE_SIGN_IDENTITY = "-"; 217 | COPY_PHASE_STRIP = NO; 218 | DEBUG_INFORMATION_FORMAT = dwarf; 219 | ENABLE_STRICT_OBJC_MSGSEND = YES; 220 | ENABLE_TESTABILITY = YES; 221 | GCC_C_LANGUAGE_STANDARD = gnu99; 222 | GCC_DYNAMIC_NO_PIC = NO; 223 | GCC_NO_COMMON_BLOCKS = YES; 224 | GCC_OPTIMIZATION_LEVEL = 0; 225 | GCC_PREPROCESSOR_DEFINITIONS = ( 226 | "DEBUG=1", 227 | "$(inherited)", 228 | ); 229 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 230 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 231 | GCC_WARN_UNDECLARED_SELECTOR = YES; 232 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 233 | GCC_WARN_UNUSED_FUNCTION = YES; 234 | GCC_WARN_UNUSED_VARIABLE = YES; 235 | MACOSX_DEPLOYMENT_TARGET = 10.12; 236 | MTL_ENABLE_DEBUG_INFO = YES; 237 | ONLY_ACTIVE_ARCH = YES; 238 | SDKROOT = macosx; 239 | }; 240 | name = Debug; 241 | }; 242 | 0F1EF0C11E5AE35100EED4CA /* Release */ = { 243 | isa = XCBuildConfiguration; 244 | buildSettings = { 245 | ALWAYS_SEARCH_USER_PATHS = NO; 246 | CLANG_ANALYZER_NONNULL = YES; 247 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 248 | CLANG_CXX_LIBRARY = "libc++"; 249 | CLANG_ENABLE_MODULES = YES; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_WARN_BOOL_CONVERSION = YES; 252 | CLANG_WARN_CONSTANT_CONVERSION = YES; 253 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 254 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 255 | CLANG_WARN_EMPTY_BODY = YES; 256 | CLANG_WARN_ENUM_CONVERSION = YES; 257 | CLANG_WARN_INFINITE_RECURSION = YES; 258 | CLANG_WARN_INT_CONVERSION = YES; 259 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 260 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 261 | CLANG_WARN_UNREACHABLE_CODE = YES; 262 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 263 | CODE_SIGN_IDENTITY = "-"; 264 | COPY_PHASE_STRIP = NO; 265 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 266 | ENABLE_NS_ASSERTIONS = NO; 267 | ENABLE_STRICT_OBJC_MSGSEND = YES; 268 | GCC_C_LANGUAGE_STANDARD = gnu99; 269 | GCC_NO_COMMON_BLOCKS = YES; 270 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 271 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 272 | GCC_WARN_UNDECLARED_SELECTOR = YES; 273 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 274 | GCC_WARN_UNUSED_FUNCTION = YES; 275 | GCC_WARN_UNUSED_VARIABLE = YES; 276 | MACOSX_DEPLOYMENT_TARGET = 10.12; 277 | MTL_ENABLE_DEBUG_INFO = NO; 278 | SDKROOT = macosx; 279 | }; 280 | name = Release; 281 | }; 282 | 0F1EF0C31E5AE35100EED4CA /* Debug */ = { 283 | isa = XCBuildConfiguration; 284 | buildSettings = { 285 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 286 | CLANG_ENABLE_MODULES = YES; 287 | CODE_SIGN_IDENTITY = "Mac Developer"; 288 | COMBINE_HIDPI_IMAGES = YES; 289 | DEFINES_MODULE = YES; 290 | DEVELOPMENT_TEAM = NPU2FZFY6H; 291 | FRAMEWORK_SEARCH_PATHS = ( 292 | "$(inherited)", 293 | "$(LOCAL_LIBRARY_DIR)/Frameworks", 294 | ); 295 | INFOPLIST_FILE = iTunesTouch/Info.plist; 296 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 297 | PRODUCT_BUNDLE_IDENTIFIER = com.rauch.jonathan.iTunesTouch; 298 | PRODUCT_NAME = "$(TARGET_NAME)"; 299 | SWIFT_OBJC_BRIDGING_HEADER = "iTunesTouch-Bridging-Header.h"; 300 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 301 | SWIFT_VERSION = 3.0; 302 | }; 303 | name = Debug; 304 | }; 305 | 0F1EF0C41E5AE35100EED4CA /* Release */ = { 306 | isa = XCBuildConfiguration; 307 | buildSettings = { 308 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 309 | CLANG_ENABLE_MODULES = YES; 310 | CODE_SIGN_IDENTITY = "Mac Developer"; 311 | COMBINE_HIDPI_IMAGES = YES; 312 | DEFINES_MODULE = YES; 313 | DEVELOPMENT_TEAM = NPU2FZFY6H; 314 | FRAMEWORK_SEARCH_PATHS = ( 315 | "$(inherited)", 316 | "$(LOCAL_LIBRARY_DIR)/Frameworks", 317 | ); 318 | INFOPLIST_FILE = iTunesTouch/Info.plist; 319 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 320 | PRODUCT_BUNDLE_IDENTIFIER = com.rauch.jonathan.iTunesTouch; 321 | PRODUCT_NAME = "$(TARGET_NAME)"; 322 | SWIFT_OBJC_BRIDGING_HEADER = "iTunesTouch-Bridging-Header.h"; 323 | SWIFT_VERSION = 3.0; 324 | }; 325 | name = Release; 326 | }; 327 | /* End XCBuildConfiguration section */ 328 | 329 | /* Begin XCConfigurationList section */ 330 | 0F1EF0A91E5AE35100EED4CA /* Build configuration list for PBXProject "iTunesTouch" */ = { 331 | isa = XCConfigurationList; 332 | buildConfigurations = ( 333 | 0F1EF0C01E5AE35100EED4CA /* Debug */, 334 | 0F1EF0C11E5AE35100EED4CA /* Release */, 335 | ); 336 | defaultConfigurationIsVisible = 0; 337 | defaultConfigurationName = Release; 338 | }; 339 | 0F1EF0C21E5AE35100EED4CA /* Build configuration list for PBXNativeTarget "iTunesTouch" */ = { 340 | isa = XCConfigurationList; 341 | buildConfigurations = ( 342 | 0F1EF0C31E5AE35100EED4CA /* Debug */, 343 | 0F1EF0C41E5AE35100EED4CA /* Release */, 344 | ); 345 | defaultConfigurationIsVisible = 0; 346 | defaultConfigurationName = Release; 347 | }; 348 | /* End XCConfigurationList section */ 349 | }; 350 | rootObject = 0F1EF0A61E5AE35100EED4CA /* Project object */; 351 | } 352 | -------------------------------------------------------------------------------- /iTunesTouch/iTunes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * iTunes.h 3 | */ 4 | 5 | #import 6 | #import 7 | 8 | 9 | @class iTunesApplication, iTunesItem, iTunesAirPlayDevice, iTunesArtwork, iTunesEncoder, iTunesEQPreset, iTunesPlaylist, iTunesAudioCDPlaylist, iTunesLibraryPlaylist, iTunesRadioTunerPlaylist, iTunesSource, iTunesSubscriptionPlaylist, iTunesTrack, iTunesAudioCDTrack, iTunesFileTrack, iTunesSharedTrack, iTunesURLTrack, iTunesUserPlaylist, iTunesFolderPlaylist, iTunesVisual, iTunesWindow, iTunesBrowserWindow, iTunesEQWindow, iTunesMiniplayerWindow, iTunesPlaylistWindow, iTunesVideoWindow; 10 | 11 | enum iTunesEKnd { 12 | iTunesEKndTrackListing = 'kTrk' /* a basic listing of tracks within a playlist */, 13 | iTunesEKndAlbumListing = 'kAlb' /* a listing of a playlist grouped by album */, 14 | iTunesEKndCdInsert = 'kCDi' /* a printout of the playlist for jewel case inserts */ 15 | }; 16 | typedef enum iTunesEKnd iTunesEKnd; 17 | 18 | enum iTunesEnum { 19 | iTunesEnumStandard = 'lwst' /* Standard PostScript error handling */, 20 | iTunesEnumDetailed = 'lwdt' /* print a detailed report of PostScript errors */ 21 | }; 22 | typedef enum iTunesEnum iTunesEnum; 23 | 24 | enum iTunesEPlS { 25 | iTunesEPlSStopped = 'kPSS', 26 | iTunesEPlSPlaying = 'kPSP', 27 | iTunesEPlSPaused = 'kPSp', 28 | iTunesEPlSFastForwarding = 'kPSF', 29 | iTunesEPlSRewinding = 'kPSR' 30 | }; 31 | typedef enum iTunesEPlS iTunesEPlS; 32 | 33 | enum iTunesERpt { 34 | iTunesERptOff = 'kRpO', 35 | iTunesERptOne = 'kRp1', 36 | iTunesERptAll = 'kAll' 37 | }; 38 | typedef enum iTunesERpt iTunesERpt; 39 | 40 | enum iTunesEShM { 41 | iTunesEShMSongs = 'kShS', 42 | iTunesEShMAlbums = 'kShA', 43 | iTunesEShMGroupings = 'kShG' 44 | }; 45 | typedef enum iTunesEShM iTunesEShM; 46 | 47 | enum iTunesEVSz { 48 | iTunesEVSzSmall = 'kVSS', 49 | iTunesEVSzMedium = 'kVSM', 50 | iTunesEVSzLarge = 'kVSL' 51 | }; 52 | typedef enum iTunesEVSz iTunesEVSz; 53 | 54 | enum iTunesESrc { 55 | iTunesESrcLibrary = 'kLib', 56 | iTunesESrcIPod = 'kPod', 57 | iTunesESrcAudioCD = 'kACD', 58 | iTunesESrcMP3CD = 'kMCD', 59 | iTunesESrcRadioTuner = 'kTun', 60 | iTunesESrcSharedLibrary = 'kShd', 61 | iTunesESrcITunesStore = 'kITS', 62 | iTunesESrcUnknown = 'kUnk' 63 | }; 64 | typedef enum iTunesESrc iTunesESrc; 65 | 66 | enum iTunesESrA { 67 | iTunesESrAAlbums = 'kSrL' /* albums only */, 68 | iTunesESrAAll = 'kAll' /* all text fields */, 69 | iTunesESrAArtists = 'kSrR' /* artists only */, 70 | iTunesESrAComposers = 'kSrC' /* composers only */, 71 | iTunesESrADisplayed = 'kSrV' /* visible text fields */, 72 | iTunesESrASongs = 'kSrS' /* song names only */ 73 | }; 74 | typedef enum iTunesESrA iTunesESrA; 75 | 76 | enum iTunesESpK { 77 | iTunesESpKNone = 'kNon', 78 | iTunesESpKBooks = 'kSpA', 79 | iTunesESpKFolder = 'kSpF', 80 | iTunesESpKGenius = 'kSpG', 81 | iTunesESpKITunesU = 'kSpU', 82 | iTunesESpKLibrary = 'kSpL', 83 | iTunesESpKMovies = 'kSpI', 84 | iTunesESpKMusic = 'kSpZ', 85 | iTunesESpKPodcasts = 'kSpP', 86 | iTunesESpKPurchasedMusic = 'kSpM', 87 | iTunesESpKTVShows = 'kSpT' 88 | }; 89 | typedef enum iTunesESpK iTunesESpK; 90 | 91 | enum iTunesEMdK { 92 | iTunesEMdKAlertTone = 'kMdL' /* alert tone track */, 93 | iTunesEMdKAudiobook = 'kMdA' /* audiobook track */, 94 | iTunesEMdKBook = 'kMdB' /* book track */, 95 | iTunesEMdKHomeVideo = 'kVdH' /* home video track */, 96 | iTunesEMdKITunesU = 'kMdI' /* iTunes U track */, 97 | iTunesEMdKMovie = 'kVdM' /* movie track */, 98 | iTunesEMdKSong = 'kMdS' /* music track */, 99 | iTunesEMdKMusicVideo = 'kVdV' /* music video track */, 100 | iTunesEMdKPodcast = 'kMdP' /* podcast track */, 101 | iTunesEMdKRingtone = 'kMdR' /* ringtone track */, 102 | iTunesEMdKTVShow = 'kVdT' /* TV show track */, 103 | iTunesEMdKVoiceMemo = 'kMdO' /* voice memo track */, 104 | iTunesEMdKUnknown = 'kUnk' 105 | }; 106 | typedef enum iTunesEMdK iTunesEMdK; 107 | 108 | enum iTunesEVdK { 109 | iTunesEVdKNone = 'kNon' /* not a video or unknown video kind */, 110 | iTunesEVdKHomeVideo = 'kVdH' /* home video track */, 111 | iTunesEVdKMovie = 'kVdM' /* movie track */, 112 | iTunesEVdKMusicVideo = 'kVdV' /* music video track */, 113 | iTunesEVdKTVShow = 'kVdT' /* TV show track */ 114 | }; 115 | typedef enum iTunesEVdK iTunesEVdK; 116 | 117 | enum iTunesERtK { 118 | iTunesERtKUser = 'kRtU' /* user-specified rating */, 119 | iTunesERtKComputed = 'kRtC' /* iTunes-computed rating */ 120 | }; 121 | typedef enum iTunesERtK iTunesERtK; 122 | 123 | enum iTunesEAPD { 124 | iTunesEAPDComputer = 'kAPC', 125 | iTunesEAPDAirPortExpress = 'kAPX', 126 | iTunesEAPDAppleTV = 'kAPT', 127 | iTunesEAPDAirPlayDevice = 'kAPO', 128 | iTunesEAPDUnknown = 'kAPU' 129 | }; 130 | typedef enum iTunesEAPD iTunesEAPD; 131 | 132 | enum iTunesEClS { 133 | iTunesEClSUnknown = 'kUnk', 134 | iTunesEClSPurchased = 'kPur', 135 | iTunesEClSMatched = 'kMat', 136 | iTunesEClSUploaded = 'kUpl', 137 | iTunesEClSIneligible = 'kRej', 138 | iTunesEClSRemoved = 'kRem', 139 | iTunesEClSError = 'kErr', 140 | iTunesEClSDuplicate = 'kDup', 141 | iTunesEClSSubscription = 'kSub', 142 | iTunesEClSNoLongerAvailable = 'kRev', 143 | iTunesEClSNotUploaded = 'kUpP' 144 | }; 145 | typedef enum iTunesEClS iTunesEClS; 146 | 147 | @protocol iTunesGenericMethods 148 | 149 | - (void) printPrintDialog:(BOOL)printDialog withProperties:(NSDictionary *)withProperties kind:(iTunesEKnd)kind theme:(NSString *)theme; // Print the specified object(s) 150 | - (void) close; // Close an object 151 | - (void) delete; // Delete an element from an object 152 | - (SBObject *) duplicateTo:(SBObject *)to; // Duplicate one or more object(s) 153 | - (BOOL) exists; // Verify if an object exists 154 | - (void) open; // Open the specified object(s) 155 | - (void) save; // Save the specified object(s) 156 | - (void) playOnce:(BOOL)once; // play the current track or the specified track or file. 157 | - (void) select; // select the specified object(s) 158 | 159 | @end 160 | 161 | 162 | 163 | /* 164 | * iTunes Suite 165 | */ 166 | 167 | // The application program 168 | @interface iTunesApplication : SBApplication 169 | 170 | - (SBElementArray *) AirPlayDevices; 171 | - (SBElementArray *) browserWindows; 172 | - (SBElementArray *) encoders; 173 | - (SBElementArray *) EQPresets; 174 | - (SBElementArray *) EQWindows; 175 | - (SBElementArray *) miniplayerWindows; 176 | - (SBElementArray *) playlists; 177 | - (SBElementArray *) playlistWindows; 178 | - (SBElementArray *) sources; 179 | - (SBElementArray *) tracks; 180 | - (SBElementArray *) videoWindows; 181 | - (SBElementArray *) visuals; 182 | - (SBElementArray *) windows; 183 | 184 | @property (readonly) BOOL AirPlayEnabled; // is AirPlay currently enabled? 185 | @property (readonly) BOOL converting; // is a track currently being converted? 186 | @property (copy) NSArray *currentAirPlayDevices; // the currently selected AirPlay device(s) 187 | @property (copy) iTunesEncoder *currentEncoder; // the currently selected encoder (MP3, AIFF, WAV, etc.) 188 | @property (copy) iTunesEQPreset *currentEQPreset; // the currently selected equalizer preset 189 | @property (copy, readonly) iTunesPlaylist *currentPlaylist; // the playlist containing the currently targeted track 190 | @property (copy, readonly) NSString *currentStreamTitle; // the name of the current song in the playing stream (provided by streaming server) 191 | @property (copy, readonly) NSString *currentStreamURL; // the URL of the playing stream or streaming web site (provided by streaming server) 192 | @property (copy, readonly) iTunesTrack *currentTrack; // the current targeted track 193 | @property (copy) iTunesVisual *currentVisual; // the currently selected visual plug-in 194 | @property BOOL EQEnabled; // is the equalizer enabled? 195 | @property BOOL fixedIndexing; // true if all AppleScript track indices should be independent of the play order of the owning playlist. 196 | @property BOOL frontmost; // is iTunes the frontmost application? 197 | @property BOOL fullScreen; // are visuals displayed using the entire screen? 198 | @property (copy, readonly) NSString *name; // the name of the application 199 | @property BOOL mute; // has the sound output been muted? 200 | @property double playerPosition; // the player’s position within the currently playing track in seconds. 201 | @property (readonly) iTunesEPlS playerState; // is iTunes stopped, paused, or playing? 202 | @property (copy, readonly) SBObject *selection; // the selection visible to the user 203 | @property BOOL shuffleEnabled; // are songs played in random order? 204 | @property iTunesEShM shuffleMode; // the playback shuffle mode 205 | @property iTunesERpt songRepeat; // the playback repeat mode 206 | @property NSInteger soundVolume; // the sound output volume (0 = minimum, 100 = maximum) 207 | @property (copy, readonly) NSString *version; // the version of iTunes 208 | @property BOOL visualsEnabled; // are visuals currently being displayed? 209 | @property iTunesEVSz visualSize; // the size of the displayed visual 210 | 211 | - (void) printPrintDialog:(BOOL)printDialog withProperties:(NSDictionary *)withProperties kind:(iTunesEKnd)kind theme:(NSString *)theme; // Print the specified object(s) 212 | - (void) run; // Run iTunes 213 | - (void) quit; // Quit iTunes 214 | - (iTunesTrack *) add:(NSArray *)x to:(SBObject *)to; // add one or more files to a playlist 215 | - (void) backTrack; // reposition to beginning of current track or go to previous track if already at start of current track 216 | - (iTunesTrack *) convert:(NSArray *)x; // convert one or more files or tracks 217 | - (void) eject; // eject the specified iPod 218 | - (void) fastForward; // skip forward in a playing track 219 | - (void) nextTrack; // advance to the next track in the current playlist 220 | - (void) pause; // pause playback 221 | - (void) playOnce:(BOOL)once; // play the current track or the specified track or file. 222 | - (void) playpause; // toggle the playing/paused state of the current track 223 | - (void) previousTrack; // return to the previous track in the current playlist 224 | - (void) resume; // disable fast forward/rewind and resume playback, if playing. 225 | - (void) rewind; // skip backwards in a playing track 226 | - (void) stop; // stop playback 227 | - (void) subscribe:(NSString *)x; // subscribe to a podcast feed 228 | - (void) update; // update the specified iPod 229 | - (void) updateAllPodcasts; // update all subscribed podcast feeds 230 | - (void) updatePodcast; // update podcast feed 231 | - (void) openLocation:(NSString *)x; // Opens a Music Store or audio stream URL 232 | 233 | @end 234 | 235 | // an item 236 | @interface iTunesItem : SBObject 237 | 238 | @property (copy, readonly) SBObject *container; // the container of the item 239 | - (NSInteger) id; // the id of the item 240 | @property (readonly) NSInteger index; // The index of the item in internal application order. 241 | @property (copy) NSString *name; // the name of the item 242 | @property (copy, readonly) NSString *persistentID; // the id of the item as a hexadecimal string. This id does not change over time. 243 | @property (copy) NSDictionary *properties; // every property of the item 244 | 245 | - (void) download; // download a cloud track or playlist, or a podcast episode 246 | - (void) reveal; // reveal and select a track or playlist 247 | 248 | @end 249 | 250 | // an AirPlay device 251 | @interface iTunesAirPlayDevice : iTunesItem 252 | 253 | @property (readonly) BOOL active; // is the device currently being played to? 254 | @property (readonly) BOOL available; // is the device currently available? 255 | @property (readonly) iTunesEAPD kind; // the kind of the device 256 | @property (copy, readonly) NSString *networkAddress; // the network (MAC) address of the device 257 | - (BOOL) protected; // is the device password- or passcode-protected? 258 | @property BOOL selected; // is the device currently selected? 259 | @property (readonly) BOOL supportsAudio; // does the device support audio playback? 260 | @property (readonly) BOOL supportsVideo; // does the device support video playback? 261 | @property NSInteger soundVolume; // the output volume for the device (0 = minimum, 100 = maximum) 262 | 263 | 264 | @end 265 | 266 | // a piece of art within a track or playlist 267 | @interface iTunesArtwork : iTunesItem 268 | 269 | @property (copy) NSImage *data; // data for this artwork, in the form of a picture 270 | @property (copy) NSString *objectDescription; // description of artwork as a string 271 | @property (readonly) BOOL downloaded; // was this artwork downloaded by iTunes? 272 | @property (copy, readonly) NSNumber *format; // the data format for this piece of artwork 273 | @property NSInteger kind; // kind or purpose of this piece of artwork 274 | @property (copy) NSData *rawData; // data for this artwork, in original format 275 | 276 | 277 | @end 278 | 279 | // converts a track to a specific file format 280 | @interface iTunesEncoder : iTunesItem 281 | 282 | @property (copy, readonly) NSString *format; // the data format created by the encoder 283 | 284 | 285 | @end 286 | 287 | // equalizer preset configuration 288 | @interface iTunesEQPreset : iTunesItem 289 | 290 | @property double band1; // the equalizer 32 Hz band level (-12.0 dB to +12.0 dB) 291 | @property double band2; // the equalizer 64 Hz band level (-12.0 dB to +12.0 dB) 292 | @property double band3; // the equalizer 125 Hz band level (-12.0 dB to +12.0 dB) 293 | @property double band4; // the equalizer 250 Hz band level (-12.0 dB to +12.0 dB) 294 | @property double band5; // the equalizer 500 Hz band level (-12.0 dB to +12.0 dB) 295 | @property double band6; // the equalizer 1 kHz band level (-12.0 dB to +12.0 dB) 296 | @property double band7; // the equalizer 2 kHz band level (-12.0 dB to +12.0 dB) 297 | @property double band8; // the equalizer 4 kHz band level (-12.0 dB to +12.0 dB) 298 | @property double band9; // the equalizer 8 kHz band level (-12.0 dB to +12.0 dB) 299 | @property double band10; // the equalizer 16 kHz band level (-12.0 dB to +12.0 dB) 300 | @property (readonly) BOOL modifiable; // can this preset be modified? 301 | @property double preamp; // the equalizer preamp level (-12.0 dB to +12.0 dB) 302 | @property BOOL updateTracks; // should tracks which refer to this preset be updated when the preset is renamed or deleted? 303 | 304 | 305 | @end 306 | 307 | // a list of songs/streams 308 | @interface iTunesPlaylist : iTunesItem 309 | 310 | - (SBElementArray *) tracks; 311 | - (SBElementArray *) artworks; 312 | 313 | @property (copy) NSString *objectDescription; // the description of the playlist 314 | @property BOOL disliked; // is this playlist disliked? 315 | @property (readonly) NSInteger duration; // the total length of all songs (in seconds) 316 | @property (copy) NSString *name; // the name of the playlist 317 | @property BOOL loved; // is this playlist loved? 318 | @property (copy, readonly) iTunesPlaylist *parent; // folder which contains this playlist (if any) 319 | @property BOOL shuffle; // play the songs in this playlist in random order? (obsolete; always false) 320 | @property (readonly) NSInteger size; // the total size of all songs (in bytes) 321 | @property iTunesERpt songRepeat; // playback repeat mode (obsolete; always off) 322 | @property (readonly) iTunesESpK specialKind; // special playlist kind 323 | @property (copy, readonly) NSString *time; // the length of all songs in MM:SS format 324 | @property (readonly) BOOL visible; // is this playlist visible in the Source list? 325 | 326 | - (void) moveTo:(SBObject *)to; // Move playlist(s) to a new location 327 | - (iTunesTrack *) searchFor:(NSString *)for_ only:(iTunesESrA)only; // search a playlist for tracks matching the search string. Identical to entering search text in the Search field in iTunes. 328 | 329 | @end 330 | 331 | // a playlist representing an audio CD 332 | @interface iTunesAudioCDPlaylist : iTunesPlaylist 333 | 334 | - (SBElementArray *) audioCDTracks; 335 | 336 | @property (copy) NSString *artist; // the artist of the CD 337 | @property BOOL compilation; // is this CD a compilation album? 338 | @property (copy) NSString *composer; // the composer of the CD 339 | @property NSInteger discCount; // the total number of discs in this CD’s album 340 | @property NSInteger discNumber; // the index of this CD disc in the source album 341 | @property (copy) NSString *genre; // the genre of the CD 342 | @property NSInteger year; // the year the album was recorded/released 343 | 344 | 345 | @end 346 | 347 | // the master music library playlist 348 | @interface iTunesLibraryPlaylist : iTunesPlaylist 349 | 350 | - (SBElementArray *) fileTracks; 351 | - (SBElementArray *) URLTracks; 352 | - (SBElementArray *) sharedTracks; 353 | 354 | 355 | @end 356 | 357 | // the radio tuner playlist 358 | @interface iTunesRadioTunerPlaylist : iTunesPlaylist 359 | 360 | - (SBElementArray *) URLTracks; 361 | 362 | 363 | @end 364 | 365 | // a music source (music library, CD, device, etc.) 366 | @interface iTunesSource : iTunesItem 367 | 368 | - (SBElementArray *) audioCDPlaylists; 369 | - (SBElementArray *) libraryPlaylists; 370 | - (SBElementArray *) playlists; 371 | - (SBElementArray *) radioTunerPlaylists; 372 | - (SBElementArray *) subscriptionPlaylists; 373 | - (SBElementArray *) userPlaylists; 374 | 375 | @property (readonly) long long capacity; // the total size of the source if it has a fixed size 376 | @property (readonly) long long freeSpace; // the free space on the source if it has a fixed size 377 | @property (readonly) iTunesESrc kind; 378 | 379 | - (void) eject; // eject the specified iPod 380 | - (void) update; // update the specified iPod 381 | 382 | @end 383 | 384 | // a subscription playlist from Apple Music 385 | @interface iTunesSubscriptionPlaylist : iTunesPlaylist 386 | 387 | - (SBElementArray *) fileTracks; 388 | - (SBElementArray *) URLTracks; 389 | 390 | 391 | @end 392 | 393 | // playable audio source 394 | @interface iTunesTrack : iTunesItem 395 | 396 | - (SBElementArray *) artworks; 397 | 398 | @property (copy) NSString *album; // the album name of the track 399 | @property (copy) NSString *albumArtist; // the album artist of the track 400 | @property BOOL albumDisliked; // is the album for this track disliked? 401 | @property BOOL albumLoved; // is the album for this track loved? 402 | @property NSInteger albumRating; // the rating of the album for this track (0 to 100) 403 | @property (readonly) iTunesERtK albumRatingKind; // the rating kind of the album rating for this track 404 | @property (copy) NSString *artist; // the artist/source of the track 405 | @property (readonly) NSInteger bitRate; // the bit rate of the track (in kbps) 406 | @property double bookmark; // the bookmark time of the track in seconds 407 | @property BOOL bookmarkable; // is the playback position for this track remembered? 408 | @property NSInteger bpm; // the tempo of this track in beats per minute 409 | @property (copy) NSString *category; // the category of the track 410 | @property (readonly) iTunesEClS cloudStatus; // the iCloud status of the track 411 | @property (copy) NSString *comment; // freeform notes about the track 412 | @property BOOL compilation; // is this track from a compilation album? 413 | @property (copy) NSString *composer; // the composer of the track 414 | @property (readonly) NSInteger databaseID; // the common, unique ID for this track. If two tracks in different playlists have the same database ID, they are sharing the same data. 415 | @property (copy, readonly) NSDate *dateAdded; // the date the track was added to the playlist 416 | @property (copy) NSString *objectDescription; // the description of the track 417 | @property NSInteger discCount; // the total number of discs in the source album 418 | @property NSInteger discNumber; // the index of the disc containing this track on the source album 419 | @property BOOL disliked; // is this track disliked? 420 | @property (copy, readonly) NSString *downloaderAppleID; // the Apple ID of the person who downloaded this track 421 | @property (copy, readonly) NSString *downloaderName; // the name of the person who downloaded this track 422 | @property (readonly) double duration; // the length of the track in seconds 423 | @property BOOL enabled; // is this track checked for playback? 424 | @property (copy) NSString *episodeID; // the episode ID of the track 425 | @property NSInteger episodeNumber; // the episode number of the track 426 | @property (copy) NSString *EQ; // the name of the EQ preset of the track 427 | @property double finish; // the stop time of the track in seconds 428 | @property BOOL gapless; // is this track from a gapless album? 429 | @property (copy) NSString *genre; // the music/audio genre (category) of the track 430 | @property (copy) NSString *grouping; // the grouping (piece) of the track. Generally used to denote movements within a classical work. 431 | @property (copy, readonly) NSString *kind; // a text description of the track 432 | @property (copy) NSString *longDescription; 433 | @property BOOL loved; // is this track loved? 434 | @property (copy) NSString *lyrics; // the lyrics of the track 435 | @property iTunesEMdK mediaKind; // the media kind of the track 436 | @property (copy, readonly) NSDate *modificationDate; // the modification date of the content of this track 437 | @property (copy) NSString *movement; // the movement name of the track 438 | @property NSInteger movementCount; // the total number of movements in the work 439 | @property NSInteger movementNumber; // the index of the movement in the work 440 | @property NSInteger playedCount; // number of times this track has been played 441 | @property (copy) NSDate *playedDate; // the date and time this track was last played 442 | @property (copy, readonly) NSString *purchaserAppleID; // the Apple ID of the person who purchased this track 443 | @property (copy, readonly) NSString *purchaserName; // the name of the person who purchased this track 444 | @property NSInteger rating; // the rating of this track (0 to 100) 445 | @property (readonly) iTunesERtK ratingKind; // the rating kind of this track 446 | @property (copy, readonly) NSDate *releaseDate; // the release date of this track 447 | @property (readonly) NSInteger sampleRate; // the sample rate of the track (in Hz) 448 | @property NSInteger seasonNumber; // the season number of the track 449 | @property BOOL shufflable; // is this track included when shuffling? 450 | @property NSInteger skippedCount; // number of times this track has been skipped 451 | @property (copy) NSDate *skippedDate; // the date and time this track was last skipped 452 | @property (copy) NSString *show; // the show name of the track 453 | @property (copy) NSString *sortAlbum; // override string to use for the track when sorting by album 454 | @property (copy) NSString *sortArtist; // override string to use for the track when sorting by artist 455 | @property (copy) NSString *sortAlbumArtist; // override string to use for the track when sorting by album artist 456 | @property (copy) NSString *sortName; // override string to use for the track when sorting by name 457 | @property (copy) NSString *sortComposer; // override string to use for the track when sorting by composer 458 | @property (copy) NSString *sortShow; // override string to use for the track when sorting by show name 459 | @property (readonly) long long size; // the size of the track (in bytes) 460 | @property double start; // the start time of the track in seconds 461 | @property (copy, readonly) NSString *time; // the length of the track in MM:SS format 462 | @property NSInteger trackCount; // the total number of tracks on the source album 463 | @property NSInteger trackNumber; // the index of the track on the source album 464 | @property BOOL unplayed; // is this track unplayed? 465 | @property iTunesEVdK videoKind; // kind of video track 466 | @property NSInteger volumeAdjustment; // relative volume adjustment of the track (-100% to 100%) 467 | @property (copy) NSString *work; // the work name of the track 468 | @property NSInteger year; // the year the track was recorded/released 469 | 470 | 471 | @end 472 | 473 | // a track on an audio CD 474 | @interface iTunesAudioCDTrack : iTunesTrack 475 | 476 | @property (copy, readonly) NSURL *location; // the location of the file represented by this track 477 | 478 | 479 | @end 480 | 481 | // a track representing an audio file (MP3, AIFF, etc.) 482 | @interface iTunesFileTrack : iTunesTrack 483 | 484 | @property (copy) NSURL *location; // the location of the file represented by this track 485 | 486 | - (void) refresh; // update file track information from the current information in the track’s file 487 | 488 | @end 489 | 490 | // a track residing in a shared library 491 | @interface iTunesSharedTrack : iTunesTrack 492 | 493 | 494 | @end 495 | 496 | // a track representing a network stream 497 | @interface iTunesURLTrack : iTunesTrack 498 | 499 | @property (copy) NSString *address; // the URL for this track 500 | 501 | 502 | @end 503 | 504 | // custom playlists created by the user 505 | @interface iTunesUserPlaylist : iTunesPlaylist 506 | 507 | - (SBElementArray *) fileTracks; 508 | - (SBElementArray *) URLTracks; 509 | - (SBElementArray *) sharedTracks; 510 | 511 | @property BOOL shared; // is this playlist shared? 512 | @property (readonly) BOOL smart; // is this a Smart Playlist? 513 | @property (readonly) BOOL genius; // is this a Genius Playlist? 514 | 515 | 516 | @end 517 | 518 | // a folder that contains other playlists 519 | @interface iTunesFolderPlaylist : iTunesUserPlaylist 520 | 521 | 522 | @end 523 | 524 | // a visual plug-in 525 | @interface iTunesVisual : iTunesItem 526 | 527 | 528 | @end 529 | 530 | // any window 531 | @interface iTunesWindow : iTunesItem 532 | 533 | @property NSRect bounds; // the boundary rectangle for the window 534 | @property (readonly) BOOL closeable; // does the window have a close button? 535 | @property (readonly) BOOL collapseable; // does the window have a collapse button? 536 | @property BOOL collapsed; // is the window collapsed? 537 | @property BOOL fullScreen; // is the window full screen? 538 | @property NSPoint position; // the upper left position of the window 539 | @property (readonly) BOOL resizable; // is the window resizable? 540 | @property BOOL visible; // is the window visible? 541 | @property (readonly) BOOL zoomable; // is the window zoomable? 542 | @property BOOL zoomed; // is the window zoomed? 543 | 544 | 545 | @end 546 | 547 | // the main iTunes window 548 | @interface iTunesBrowserWindow : iTunesWindow 549 | 550 | @property (copy, readonly) SBObject *selection; // the selected songs 551 | @property (copy) iTunesPlaylist *view; // the playlist currently displayed in the window 552 | 553 | 554 | @end 555 | 556 | // the iTunes equalizer window 557 | @interface iTunesEQWindow : iTunesWindow 558 | 559 | 560 | @end 561 | 562 | // the miniplayer window 563 | @interface iTunesMiniplayerWindow : iTunesWindow 564 | 565 | 566 | @end 567 | 568 | // a sub-window showing a single playlist 569 | @interface iTunesPlaylistWindow : iTunesWindow 570 | 571 | @property (copy, readonly) SBObject *selection; // the selected songs 572 | @property (copy, readonly) iTunesPlaylist *view; // the playlist displayed in the window 573 | 574 | 575 | @end 576 | 577 | // the video window 578 | @interface iTunesVideoWindow : iTunesWindow 579 | 580 | 581 | @end 582 | 583 | -------------------------------------------------------------------------------- /iTunesTouch/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | Default 514 | 515 | 516 | 517 | 518 | 519 | 520 | Left to Right 521 | 522 | 523 | 524 | 525 | 526 | 527 | Right to Left 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | Default 539 | 540 | 541 | 542 | 543 | 544 | 545 | Left to Right 546 | 547 | 548 | 549 | 550 | 551 | 552 | Right to Left 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | --------------------------------------------------------------------------------