[vlc-devel] commit: VLCKit.framework: Update documentation, clean up whitespace, reorganize code, and remove dead code. (Faustino Osuna )
git version control
git at videolan.org
Tue Apr 1 01:00:21 CEST 2008
vlc | branch: master | Faustino Osuna <enrique.osuna at gmail.com> | Mon Mar 31 23:58:30 2008 +0100| [6837b438b92d581165056c93c4f1972757496f78]
VLCKit.framework: Update documentation, clean up whitespace, reorganize code, and remove dead code.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6837b438b92d581165056c93c4f1972757496f78
---
projects/macosx/framework/Sources/VLCVideoView.m | 30 +++++++++++-----------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/projects/macosx/framework/Sources/VLCVideoView.m b/projects/macosx/framework/Sources/VLCVideoView.m
index 87f3c4f..da94d99 100644
--- a/projects/macosx/framework/Sources/VLCVideoView.m
+++ b/projects/macosx/framework/Sources/VLCVideoView.m
@@ -1,5 +1,5 @@
/*****************************************************************************
- * VLCVideoView.h: VLC.framework VLCVideoView implementation
+ * VLCVideoView.m: VLCKit.framework VLCVideoView implementation
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 the VideoLAN team
@@ -67,6 +67,7 @@
@end
@interface VLCVideoView ()
+/* Proeprties */
@property (readwrite) BOOL hasVideo;
@end
@@ -76,16 +77,18 @@
@implementation VLCVideoView
+/* Initializers */
- (id)initWithFrame:(NSRect)rect
{
if (self = [super initWithFrame:rect])
{
- delegate = nil;
- [self setBackColor:[NSColor blackColor]];
+ self.delegate = nil;
+ self.backColor = [NSColor blackColor];
+ self.fillScreen = NO;
+ self.hasVideo = NO;
+
[self setStretchesVideo:NO];
[self setAutoresizesSubviews:YES];
- [self setFillScreen: NO];
- self.hasVideo = NO;
layoutManager = [[VLCVideoLayoutManager layoutManager] retain];
}
return self;
@@ -93,12 +96,13 @@
- (void)dealloc
{
+ self.delegate = nil;
+ self.backColor = nil;
[layoutManager release];
- delegate = nil;
- [backColor release];
[super dealloc];
}
+/* NSView Overrides */
- (void)drawRect:(NSRect)aRect
{
[self lockFocus];
@@ -112,6 +116,7 @@
return YES;
}
+/* Properties */
@synthesize delegate;
@synthesize backColor;
@synthesize hasVideo;
@@ -123,7 +128,7 @@
- (void)setFillScreen:(BOOL)fillScreen
{
- [layoutManager setFillScreenEntirely:fillScreen];
+ [(VLCVideoLayoutManager *)layoutManager setFillScreenEntirely:fillScreen];
[[self layer] setNeedsLayout];
}
@end
@@ -148,18 +153,13 @@
[layoutManager setOriginalVideoSize:aLayer.bounds.size];
[rootLayer setLayoutManager:layoutManager];
[rootLayer insertSublayer:aLayer atIndex:0];
+ [self setNeedsDisplayOnBoundsChange:YES];
- [aLayer setNeedsLayout];
- [aLayer setNeedsDisplay];
-
- [rootLayer setNeedsDisplayOnBoundsChange:YES];
- [rootLayer setNeedsDisplay];
- [rootLayer layoutIfNeeded];
[CATransaction commit];
self.hasVideo = YES;
}
-- (void)removeVoutLayer:(CALayer*)voutLayer
+- (void)removeVoutLayer:(CALayer *)voutLayer
{
[CATransaction begin];
[voutLayer removeFromSuperlayer];
More information about the vlc-devel
mailing list