Changeset 6837b438b92d581165056c93c4f1972757496f78
- 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
| rb3372f1 |
r6837b43 |
|
| 1 | 1 | /***************************************************************************** |
|---|
| 2 | | * VLCVideoView.h: VLC.framework VLCVideoView implementation |
|---|
| | 2 | * VLCVideoView.m: VLCKit.framework VLCVideoView implementation |
|---|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2007 Pierre d'Herbemont |
|---|
| … | … | |
| 68 | 68 | |
|---|
| 69 | 69 | @interface VLCVideoView () |
|---|
| | 70 | /* Proeprties */ |
|---|
| 70 | 71 | @property (readwrite) BOOL hasVideo; |
|---|
| 71 | 72 | @end |
|---|
| … | … | |
| 77 | 78 | @implementation VLCVideoView |
|---|
| 78 | 79 | |
|---|
| | 80 | /* Initializers */ |
|---|
| 79 | 81 | - (id)initWithFrame:(NSRect)rect |
|---|
| 80 | 82 | { |
|---|
| 81 | 83 | if (self = [super initWithFrame:rect]) |
|---|
| 82 | 84 | { |
|---|
| 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 | |
|---|
| 85 | 90 | [self setStretchesVideo:NO]; |
|---|
| 86 | 91 | [self setAutoresizesSubviews:YES]; |
|---|
| 87 | | [self setFillScreen: NO]; |
|---|
| 88 | | self.hasVideo = NO; |
|---|
| 89 | 92 | layoutManager = [[VLCVideoLayoutManager layoutManager] retain]; |
|---|
| 90 | 93 | } |
|---|
| … | … | |
| 94 | 97 | - (void)dealloc |
|---|
| 95 | 98 | { |
|---|
| | 99 | self.delegate = nil; |
|---|
| | 100 | self.backColor = nil; |
|---|
| 96 | 101 | [layoutManager release]; |
|---|
| 97 | | delegate = nil; |
|---|
| 98 | | [backColor release]; |
|---|
| 99 | 102 | [super dealloc]; |
|---|
| 100 | 103 | } |
|---|
| 101 | 104 | |
|---|
| | 105 | /* NSView Overrides */ |
|---|
| 102 | 106 | - (void)drawRect:(NSRect)aRect |
|---|
| 103 | 107 | { |
|---|
| … | … | |
| 113 | 117 | } |
|---|
| 114 | 118 | |
|---|
| | 119 | /* Properties */ |
|---|
| 115 | 120 | @synthesize delegate; |
|---|
| 116 | 121 | @synthesize backColor; |
|---|
| … | … | |
| 124 | 129 | - (void)setFillScreen:(BOOL)fillScreen |
|---|
| 125 | 130 | { |
|---|
| 126 | | [layoutManager setFillScreenEntirely:fillScreen]; |
|---|
| | 131 | [(VLCVideoLayoutManager *)layoutManager setFillScreenEntirely:fillScreen]; |
|---|
| 127 | 132 | [[self layer] setNeedsLayout]; |
|---|
| 128 | 133 | } |
|---|
| … | … | |
| 149 | 154 | [rootLayer setLayoutManager:layoutManager]; |
|---|
| 150 | 155 | [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 | |
|---|
| 158 | 158 | [CATransaction commit]; |
|---|
| 159 | 159 | self.hasVideo = YES; |
|---|
| 160 | 160 | } |
|---|
| 161 | 161 | |
|---|
| 162 | | - (void)removeVoutLayer:(CALayer*)voutLayer |
|---|
| | 162 | - (void)removeVoutLayer:(CALayer *)voutLayer |
|---|
| 163 | 163 | { |
|---|
| 164 | 164 | [CATransaction begin]; |
|---|