Changeset 694
- Timestamp:
- 12/03/08 15:05:16 (1 month ago)
- Files:
-
- trunk/SapphireCompatibilityClasses/BRMetadataPreviewController.h (modified) (1 diff)
- trunk/SapphireCompatibilityClasses/BRVideoPlayerController.m (modified) (1 diff)
- trunk/SapphireCompatibilityClasses/SapphireCenteredMenuController.h (modified) (2 diffs)
- trunk/SapphireCompatibilityClasses/SapphireCenteredMenuController.m (modified) (3 diffs)
- trunk/SapphireCompatibilityClasses/SapphireCompatibilityClasses.xcodeproj/project.pbxproj (modified) (5 diffs)
- trunk/SapphireCompatibilityClasses/SapphireFrontRowCompat.h (modified) (1 diff)
- trunk/SapphireCompatibilityClasses/SapphireFrontRowCompat.m (modified) (3 diffs)
- trunk/SapphireCompatibilityClasses/SapphireMediaMenuController.h (modified) (1 diff)
- trunk/SapphireCompatibilityClasses/SapphireMediaMenuController.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/SapphireCompatibilityClasses/BRMetadataPreviewController.h
r490 r694 36 36 */ 37 37 @interface BRMetadataPreviewController : BRMetadataPreviewControl { 38 int padding[16]; 38 39 } 39 40 trunk/SapphireCompatibilityClasses/BRVideoPlayerController.m
r678 r694 21 21 #import "BRVideoPlayerController.h" 22 22 23 @interface BRMediaPlayerController (compat) 24 -(void)setResumeMenuDisabled:(BOOL)yn; 25 @end 26 23 27 24 28 @implementation BRVideoPlayerController 25 29 30 - (void)setAllowsResume:(BOOL)yn 31 { 32 [super setResumeMenuDisabled:!yn]; 33 } 34 35 - (void)setVideoPlayer:(id)fp8 36 { 37 } 38 26 39 @end trunk/SapphireCompatibilityClasses/SapphireCenteredMenuController.h
r436 r694 24 24 * Frontrow has a completely different way of doing layouts. The two methods for doing a layout of a list both call this method asking how to lay it out. This allows a single location for the list layout to be done and work in both cases. 25 25 */ 26 @protocol SapphireL ayoutDelegate <NSObject>26 @protocol SapphireListLayoutDelegate <NSObject> 27 27 /*! 28 28 * @brief Get the rect of the list … … 40 40 * Frontrow's classes do not have initWithScene since the render scene is completely different. To work around this, Sapphire has a collection of classes which intercept initWithScene, and call the appropriate real function. The scene method is also intercepted as well. 41 41 * 42 * This class also intercepts the layout of the list and calls itself to find the real layout of the list. See SapphireL ayoutDelegate.42 * This class also intercepts the layout of the list and calls itself to find the real layout of the list. See SapphireListLayoutDelegate. 43 43 */ 44 @interface SapphireCenteredMenuController : BRCenteredMenuController <SapphireL ayoutDelegate>{44 @interface SapphireCenteredMenuController : BRCenteredMenuController <SapphireListLayoutDelegate>{ 45 45 int padding[16]; /*!< @brief The classes are of different sizes. This padding prevents a class compiled with one size to overlap when used with a class of a different size*/ 46 46 } trunk/SapphireCompatibilityClasses/SapphireCenteredMenuController.m
r489 r694 24 24 @interface SapphireWideCenteredLayout : NSObject 25 25 { 26 id realLayout;27 id <SapphireL ayoutDelegate> delegate;26 id realLayout; 27 id <SapphireListLayoutDelegate> delegate; 28 28 } 29 @end 30 31 @interface BRLayerController (compat) 32 - (void)wasBuried; 33 - (void)wasExhumed; 29 34 @end 30 35 … … 46 51 } 47 52 48 - (void)setDelegate:(id <SapphireL ayoutDelegate>)del53 - (void)setDelegate:(id <SapphireListLayoutDelegate>)del 49 54 { 50 55 delegate = [del retain]; … … 134 139 } 135 140 141 - (void)wasBuried 142 { 143 [self wasBuriedByPushingController:nil]; 144 } 145 146 - (void) wasBuriedByPushingController: (BRLayerController *) controller 147 { 148 // The user chose an option and this controller is no longer on screen 149 150 // always call super 151 if([SapphireFrontRowCompat usingTakeTwoDotThree]) 152 [super wasBuried]; 153 else 154 [super wasBuriedByPushingController: controller]; 155 } 156 157 - (void)wasExhumed 158 { 159 [self wasExhumedByPoppingController:nil]; 160 } 161 162 - (void) wasExhumedByPoppingController: (BRLayerController *) controller 163 { 164 // handle being revealed when the user presses Menu 165 166 // always call super 167 if([SapphireFrontRowCompat usingTakeTwoDotThree]) 168 [super wasExhumed]; 169 else 170 [super wasExhumedByPoppingController: controller]; 171 } 172 136 173 @end trunk/SapphireCompatibilityClasses/SapphireCompatibilityClasses.xcodeproj/project.pbxproj
r684 r694 48 48 F585A9DC0D74ED780043AB22 /* BRMusicNowPlayingController.h in Headers */ = {isa = PBXBuildFile; fileRef = F585A9DA0D74ED770043AB22 /* BRMusicNowPlayingController.h */; }; 49 49 F585A9DD0D74ED780043AB22 /* BRMusicNowPlayingController.m in Sources */ = {isa = PBXBuildFile; fileRef = F585A9DB0D74ED780043AB22 /* BRMusicNowPlayingController.m */; }; 50 F59FF2900EDB97680052012E /* SapphireLayoutManager.h in Headers */ = {isa = PBXBuildFile; fileRef = F59FF28E0EDB97680052012E /* SapphireLayoutManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51 F59FF2910EDB97680052012E /* SapphireLayoutManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F59FF28F0EDB97680052012E /* SapphireLayoutManager.m */; }; 50 52 /* End PBXBuildFile section */ 51 53 … … 98 100 F585A9DA0D74ED770043AB22 /* BRMusicNowPlayingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BRMusicNowPlayingController.h; sourceTree = "<group>"; }; 99 101 F585A9DB0D74ED780043AB22 /* BRMusicNowPlayingController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BRMusicNowPlayingController.m; sourceTree = "<group>"; }; 102 F59FF28E0EDB97680052012E /* SapphireLayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SapphireLayoutManager.h; sourceTree = "<group>"; }; 103 F59FF28F0EDB97680052012E /* SapphireLayoutManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SapphireLayoutManager.m; sourceTree = "<group>"; }; 100 104 /* End PBXFileReference section */ 101 105 … … 170 174 F51BFCDD0D26BB3900E22363 /* SapphireLayerController.h */, 171 175 F51BFCDE0D26BB3900E22363 /* SapphireLayerController.m */, 176 F59FF28E0EDB97680052012E /* SapphireLayoutManager.h */, 177 F59FF28F0EDB97680052012E /* SapphireLayoutManager.m */, 172 178 F51BFCDF0D26BB3900E22363 /* SapphireMediaMenuController.h */, 173 179 F51BFCE00D26BB3900E22363 /* SapphireMediaMenuController.m */, … … 237 243 F51BFD550D26BEF900E22363 /* BackRowUtils.h in Headers */, 238 244 F580E8740D31288400F2225A /* SapphireButtonControl.h in Headers */, 245 F59FF2900EDB97680052012E /* SapphireLayoutManager.h in Headers */, 239 246 ); 240 247 runOnlyForDeploymentPostprocessing = 0; … … 407 414 F51BFCF20D26BB3900E22363 /* SapphireTextWithSpinnerController.m in Sources */, 408 415 F580E8750D31288400F2225A /* SapphireButtonControl.m in Sources */, 416 F59FF2910EDB97680052012E /* SapphireLayoutManager.m in Sources */, 409 417 ); 410 418 runOnlyForDeploymentPostprocessing = 0; trunk/SapphireCompatibilityClasses/SapphireFrontRowCompat.h
r686 r694 60 60 */ 61 61 + (BOOL)usingTakeTwoDotTwo; 62 63 /*! 64 * @brief Are we on ATV 2.3? 65 * 66 * @return YES if on 2.3, NO otherwise 67 */ 68 + (BOOL)usingTakeTwoDotThree; 62 69 63 70 /*! trunk/SapphireCompatibilityClasses/SapphireFrontRowCompat.m
r686 r694 89 89 static BOOL usingTakeTwo = NO; 90 90 static BOOL usingTakeTwoDotTwo = NO; 91 static BOOL usingTakeTwoDotThree = NO; 91 92 92 93 + (void)initialize … … 94 95 if(NSClassFromString(@"BRAdornedMenuItemLayer") == nil) 95 96 usingFrontRow = YES; 96 97 if(NSClassFromString(@"BRBaseAppliance") != nil) 98 usingTakeTwo = YES; 99 100 if(NSClassFromString(@"BRVideoPlayerController") == nil) 101 usingTakeTwoDotTwo = YES; 97 98 if(NSClassFromString(@"BRBaseAppliance") != nil) 99 usingTakeTwo = YES; 100 101 if(NSClassFromString(@"BRVideoPlayerController") == nil) 102 usingTakeTwoDotTwo = YES; 103 104 if([(Class)NSClassFromString(@"BRController") instancesRespondToSelector:@selector(wasExhumed)]) 105 usingTakeTwoDotThree = YES; 102 106 } 103 107 … … 109 113 + (BOOL)usingTakeTwo 110 114 { 111 return usingTakeTwo;115 return usingTakeTwo; 112 116 } 113 117 114 118 + (BOOL)usingTakeTwoDotTwo 115 119 { 116 return usingTakeTwoDotTwo; 120 return usingTakeTwoDotTwo; 121 } 122 123 + (BOOL)usingTakeTwoDotThree 124 { 125 return usingTakeTwoDotThree; 117 126 } 118 127 trunk/SapphireCompatibilityClasses/SapphireMediaMenuController.h
r503 r694 26 26 * Frontrow's classes do not have initWithScene since the render scene is completely different. To work around this, Sapphire has a collection of classes which intercept initWithScene, and call the appropriate real function. The scene method is also intercepted as well. 27 27 */ 28 @interface SapphireMediaMenuController : BRMediaMenuController <SapphireL ayoutDelegate> {28 @interface SapphireMediaMenuController : BRMediaMenuController <SapphireListLayoutDelegate> { 29 29 int padding[16]; /*!< @brief The classes are of different sizes. This padding prevents a class compiled with one size to overlap when used with a class of a different size*/ 30 30 } trunk/SapphireCompatibilityClasses/SapphireMediaMenuController.m
r686 r694 29 29 @end 30 30 31 @interface BRLayerController (compat) 32 - (void)wasBuried; 33 - (void)wasExhumed; 34 @end 35 36 31 37 @interface SapphireCustomMediaLayout : NSObject 32 38 { 33 id realLayout;34 id <SapphireL ayoutDelegate> delegate;39 id realLayout; 40 id <SapphireListLayoutDelegate> delegate; 35 41 } 36 42 @end … … 46 52 } 47 53 48 - (void)setDelegate:(id <SapphireL ayoutDelegate>)del54 - (void)setDelegate:(id <SapphireListLayoutDelegate>)del 49 55 { 50 56 delegate = [del retain]; … … 198 204 return [super brEventAction:event]; 199 205 } 200 @end 206 207 - (void) wasPushed 208 { 209 // We've just been put on screen, the user can see this controller's content now 210 211 // always call super 212 [super wasPushed]; 213 } 214 215 - (void) wasPopped 216 { 217 // The user pressed Menu, removing us from the screen 218 // always call super 219 220 [super wasPopped]; 221 } 222 223 - (void)wasBuried 224 { 225 [self wasBuriedByPushingController:nil]; 226 } 227 228 - (void) wasBuriedByPushingController: (BRLayerController *) controller 229 { 230 // The user chose an option and this controller is no longer on screen 231 232 // always call super 233 if([SapphireFrontRowCompat usingTakeTwoDotThree]) 234 [super wasBuried]; 235 else 236 [super wasBuriedByPushingController: controller]; 237 } 238 239 - (void)wasExhumed 240 { 241 [self wasExhumedByPoppingController:nil]; 242 } 243 244 - (void) wasExhumedByPoppingController: (BRLayerController *) controller 245 { 246 // handle being revealed when the user presses Menu 247 248 // always call super 249 if([SapphireFrontRowCompat usingTakeTwoDotThree]) 250 [super wasExhumed]; 251 else 252 [super wasExhumedByPoppingController: controller]; 253 } 254 255 @end
