Commit 92875c21 authored by Faustino Osuna's avatar Faustino Osuna

MacOSX/Framework/VLCVideoView.m: Code clean up & implement Objective-C 2.0 @property.

parent 555be297
...@@ -37,11 +37,7 @@ ...@@ -37,11 +37,7 @@
// with the video? // with the video?
} }
@property (assign) id delegate;
@property (copy) NSColor *backColor;
@property BOOL fillScreen; @property BOOL fillScreen;
- (void)setDelegate:(id)value;
- (id)delegate;
- (void)setBackColor:(NSColor *)value;
- (NSColor *)backColor;
@end @end
...@@ -132,16 +132,6 @@ ...@@ -132,16 +132,6 @@
@implementation VLCVideoView @implementation VLCVideoView
- (BOOL)fillScreen
{
return [layoutManager fillScreenEntirely];
}
- (void)setFillScreen:(BOOL)fillScreen
{
[layoutManager setFillScreenEntirely:fillScreen];
[[self layer] setNeedsLayout];
}
- (id)initWithFrame:(NSRect)rect - (id)initWithFrame:(NSRect)rect
{ {
if (self = [super initWithFrame:rect]) if (self = [super initWithFrame:rect])
...@@ -164,30 +154,6 @@ ...@@ -164,30 +154,6 @@
[super dealloc]; [super dealloc];
} }
- (void)setDelegate:(id)value
{
delegate = value;
}
- (id)delegate
{
return delegate;
}
- (void)setBackColor:(NSColor *)value
{
if (backColor != value)
{
[backColor release];
backColor = [value retain];
}
}
- (NSColor *)backColor
{
return backColor;
}
- (void)drawRect:(NSRect)aRect - (void)drawRect:(NSRect)aRect
{ {
[self lockFocus]; [self lockFocus];
...@@ -200,6 +166,20 @@ ...@@ -200,6 +166,20 @@
{ {
return YES; return YES;
} }
@synthesize delegate;
@synthesize backColor;
- (BOOL)fillScreen
{
return [layoutManager fillScreenEntirely];
}
- (void)setFillScreen:(BOOL)fillScreen
{
[layoutManager setFillScreenEntirely:fillScreen];
[[self layer] setNeedsLayout];
}
@end @end
/****************************************************************************** /******************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment