Changeset 6837b438b92d581165056c93c4f1972757496f78

Show
Ignore:
Timestamp:
04/01/08 00:58:30 (3 months ago)
Author:
Faustino Osuna <enrique.osuna@gmail.com>
git-committer:
Faustino Osuna <enrique.osuna@gmail.com> 1207004310 +0100
git-parent:

[f87ebe5bfc9ad2842bc428a04d458f95183c300c]

git-author:
Faustino Osuna <enrique.osuna@gmail.com> 1207004310 +0100
Message:

VLCKit.framework: Update documentation, clean up whitespace, reorganize code, and remove dead code.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • projects/macosx/framework/Sources/VLCVideoView.m

    rb3372f1 r6837b43  
    11/***************************************************************************** 
    2  * VLCVideoView.h: VLC.framework VLCVideoView implementation 
     2 * VLCVideoView.m: VLCKit.framework VLCVideoView implementation 
    33 ***************************************************************************** 
    44 * Copyright (C) 2007 Pierre d'Herbemont 
     
    6868 
    6969@interface VLCVideoView () 
     70/* Proeprties */ 
    7071@property (readwrite) BOOL hasVideo; 
    7172@end 
     
    7778@implementation VLCVideoView 
    7879 
     80/* Initializers */ 
    7981- (id)initWithFrame:(NSRect)rect 
    8082{ 
    8183    if (self = [super initWithFrame:rect])  
    8284    { 
    83         delegate = nil; 
    84         [self setBackColor:[NSColor blackColor]]; 
     85        self.delegate = nil; 
     86        self.backColor = [NSColor blackColor]; 
     87        self.fillScreen = NO; 
     88        self.hasVideo = NO; 
     89         
    8590        [self setStretchesVideo:NO]; 
    8691        [self setAutoresizesSubviews:YES]; 
    87         [self setFillScreen: NO]; 
    88         self.hasVideo = NO; 
    8992        layoutManager = [[VLCVideoLayoutManager layoutManager] retain]; 
    9093    } 
     
    9497- (void)dealloc 
    9598{ 
     99    self.delegate = nil; 
     100    self.backColor = nil; 
    96101    [layoutManager release]; 
    97     delegate = nil; 
    98     [backColor release]; 
    99102    [super dealloc]; 
    100103} 
    101104 
     105/* NSView Overrides */ 
    102106- (void)drawRect:(NSRect)aRect 
    103107{ 
     
    113117} 
    114118 
     119/* Properties */ 
    115120@synthesize delegate; 
    116121@synthesize backColor; 
     
    124129- (void)setFillScreen:(BOOL)fillScreen 
    125130{ 
    126     [layoutManager setFillScreenEntirely:fillScreen]; 
     131    [(VLCVideoLayoutManager *)layoutManager setFillScreenEntirely:fillScreen]; 
    127132    [[self layer] setNeedsLayout]; 
    128133} 
     
    149154    [rootLayer setLayoutManager:layoutManager]; 
    150155    [rootLayer insertSublayer:aLayer atIndex:0]; 
    151  
    152     [aLayer setNeedsLayout]; 
    153     [aLayer setNeedsDisplay]; 
    154  
    155     [rootLayer setNeedsDisplayOnBoundsChange:YES]; 
    156     [rootLayer setNeedsDisplay]; 
    157     [rootLayer layoutIfNeeded]; 
     156    [self setNeedsDisplayOnBoundsChange:YES]; 
     157 
    158158    [CATransaction commit]; 
    159159    self.hasVideo = YES; 
    160160} 
    161161 
    162 - (void)removeVoutLayer:(CALayer*)voutLayer 
     162- (void)removeVoutLayer:(CALayer *)voutLayer 
    163163{ 
    164164    [CATransaction begin];