Changeset 694

Show
Ignore:
Timestamp:
12/03/08 15:05:16 (1 month ago)
Author:
gbooker
Message:

Readd a bunch of things that were lost in server failure

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/SapphireCompatibilityClasses/BRMetadataPreviewController.h

    r490 r694  
    3636 */ 
    3737@interface BRMetadataPreviewController : BRMetadataPreviewControl { 
     38        int             padding[16]; 
    3839} 
    3940 
  • trunk/SapphireCompatibilityClasses/BRVideoPlayerController.m

    r678 r694  
    2121#import "BRVideoPlayerController.h" 
    2222 
     23@interface BRMediaPlayerController (compat) 
     24-(void)setResumeMenuDisabled:(BOOL)yn; 
     25@end 
     26 
    2327 
    2428@implementation BRVideoPlayerController 
    2529 
     30- (void)setAllowsResume:(BOOL)yn 
     31{ 
     32        [super setResumeMenuDisabled:!yn]; 
     33} 
     34 
     35- (void)setVideoPlayer:(id)fp8 
     36{ 
     37} 
     38 
    2639@end 
  • trunk/SapphireCompatibilityClasses/SapphireCenteredMenuController.h

    r436 r694  
    2424 * 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. 
    2525 */ 
    26 @protocol SapphireLayoutDelegate <NSObject> 
     26@protocol SapphireListLayoutDelegate <NSObject> 
    2727/*! 
    2828 * @brief Get the rect of the list 
     
    4040 * 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. 
    4141 * 
    42  * This class also intercepts the layout of the list and calls itself to find the real layout of the list.  See SapphireLayoutDelegate. 
     42 * This class also intercepts the layout of the list and calls itself to find the real layout of the list.  See SapphireListLayoutDelegate. 
    4343 */ 
    44 @interface SapphireCenteredMenuController : BRCenteredMenuController <SapphireLayoutDelegate>{ 
     44@interface SapphireCenteredMenuController : BRCenteredMenuController <SapphireListLayoutDelegate>{ 
    4545        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*/ 
    4646} 
  • trunk/SapphireCompatibilityClasses/SapphireCenteredMenuController.m

    r489 r694  
    2424@interface SapphireWideCenteredLayout : NSObject 
    2525{ 
    26         id                                                      realLayout; 
    27         id <SapphireLayoutDelegate>   delegate; 
     26        id                                                             realLayout; 
     27        id <SapphireListLayoutDelegate>       delegate; 
    2828} 
     29@end 
     30 
     31@interface BRLayerController (compat) 
     32- (void)wasBuried; 
     33- (void)wasExhumed; 
    2934@end 
    3035 
     
    4651} 
    4752 
    48 - (void)setDelegate:(id <SapphireLayoutDelegate>)del 
     53- (void)setDelegate:(id <SapphireListLayoutDelegate>)del 
    4954{ 
    5055        delegate = [del retain]; 
     
    134139} 
    135140 
     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 
    136173@end 
  • trunk/SapphireCompatibilityClasses/SapphireCompatibilityClasses.xcodeproj/project.pbxproj

    r684 r694  
    4848                F585A9DC0D74ED780043AB22 /* BRMusicNowPlayingController.h in Headers */ = {isa = PBXBuildFile; fileRef = F585A9DA0D74ED770043AB22 /* BRMusicNowPlayingController.h */; }; 
    4949                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 */; }; 
    5052/* End PBXBuildFile section */ 
    5153 
     
    98100                F585A9DA0D74ED770043AB22 /* BRMusicNowPlayingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BRMusicNowPlayingController.h; sourceTree = "<group>"; }; 
    99101                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>"; }; 
    100104/* End PBXFileReference section */ 
    101105 
     
    170174                                F51BFCDD0D26BB3900E22363 /* SapphireLayerController.h */, 
    171175                                F51BFCDE0D26BB3900E22363 /* SapphireLayerController.m */, 
     176                                F59FF28E0EDB97680052012E /* SapphireLayoutManager.h */, 
     177                                F59FF28F0EDB97680052012E /* SapphireLayoutManager.m */, 
    172178                                F51BFCDF0D26BB3900E22363 /* SapphireMediaMenuController.h */, 
    173179                                F51BFCE00D26BB3900E22363 /* SapphireMediaMenuController.m */, 
     
    237243                                F51BFD550D26BEF900E22363 /* BackRowUtils.h in Headers */, 
    238244                                F580E8740D31288400F2225A /* SapphireButtonControl.h in Headers */, 
     245                                F59FF2900EDB97680052012E /* SapphireLayoutManager.h in Headers */, 
    239246                        ); 
    240247                        runOnlyForDeploymentPostprocessing = 0; 
     
    407414                                F51BFCF20D26BB3900E22363 /* SapphireTextWithSpinnerController.m in Sources */, 
    408415                                F580E8750D31288400F2225A /* SapphireButtonControl.m in Sources */, 
     416                                F59FF2910EDB97680052012E /* SapphireLayoutManager.m in Sources */, 
    409417                        ); 
    410418                        runOnlyForDeploymentPostprocessing = 0; 
  • trunk/SapphireCompatibilityClasses/SapphireFrontRowCompat.h

    r686 r694  
    6060 */ 
    6161+ (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; 
    6269 
    6370/*! 
  • trunk/SapphireCompatibilityClasses/SapphireFrontRowCompat.m

    r686 r694  
    8989static BOOL usingTakeTwo = NO; 
    9090static BOOL usingTakeTwoDotTwo = NO; 
     91static BOOL usingTakeTwoDotThree = NO; 
    9192 
    9293+ (void)initialize 
     
    9495        if(NSClassFromString(@"BRAdornedMenuItemLayer") == nil) 
    9596                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; 
    102106} 
    103107 
     
    109113+ (BOOL)usingTakeTwo 
    110114{ 
    111   return usingTakeTwo; 
     115       return usingTakeTwo; 
    112116} 
    113117 
    114118+ (BOOL)usingTakeTwoDotTwo 
    115119{ 
    116   return usingTakeTwoDotTwo; 
     120        return usingTakeTwoDotTwo; 
     121
     122 
     123+ (BOOL)usingTakeTwoDotThree 
     124
     125        return usingTakeTwoDotThree; 
    117126} 
    118127 
  • trunk/SapphireCompatibilityClasses/SapphireMediaMenuController.h

    r503 r694  
    2626 * 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. 
    2727 */ 
    28 @interface SapphireMediaMenuController : BRMediaMenuController <SapphireLayoutDelegate> { 
     28@interface SapphireMediaMenuController : BRMediaMenuController <SapphireListLayoutDelegate> { 
    2929        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*/ 
    3030} 
  • trunk/SapphireCompatibilityClasses/SapphireMediaMenuController.m

    r686 r694  
    2929@end 
    3030 
     31@interface BRLayerController (compat) 
     32- (void)wasBuried; 
     33- (void)wasExhumed; 
     34@end 
     35 
     36 
    3137@interface SapphireCustomMediaLayout : NSObject 
    3238{ 
    33         id                                                      realLayout; 
    34         id <SapphireLayoutDelegate>   delegate; 
     39        id                                                             realLayout; 
     40        id <SapphireListLayoutDelegate>       delegate; 
    3541} 
    3642@end 
     
    4652} 
    4753 
    48 - (void)setDelegate:(id <SapphireLayoutDelegate>)del 
     54- (void)setDelegate:(id <SapphireListLayoutDelegate>)del 
    4955{ 
    5056        delegate = [del retain]; 
     
    198204        return [super brEventAction:event]; 
    199205} 
    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