]> git.sesse.net Git - vlc/commitdiff
MacOSX/Framework/VLCVideoView.m: Code clean up & implement Objective-C 2.0 @property.
authorFaustino Osuna <riquedafreak@videolan.org>
Fri, 4 Jan 2008 17:16:46 +0000 (17:16 +0000)
committerFaustino Osuna <riquedafreak@videolan.org>
Fri, 4 Jan 2008 17:16:46 +0000 (17:16 +0000)
extras/MacOSX/Framework/Headers/Public/VLCVideoView.h
extras/MacOSX/Framework/Sources/VLCVideoView.m

index 66f782a827f9377349be943a0da7f1cb9211fb5a..9ba42b3cb9f4d3dd5465f32c531761f176492140 100644 (file)
     // with the video?
 }
 
+@property (assign) id delegate;
+@property (copy) NSColor *backColor;
 @property BOOL fillScreen;
-
-- (void)setDelegate:(id)value;
-- (id)delegate;
-
-- (void)setBackColor:(NSColor *)value;
-- (NSColor *)backColor;
 @end
index f58c4edcd6204aa941ce27f50bd7a06cddd848a4..3326f11bc6f575b37a2e634385fba920895b36ba 100644 (file)
 
 @implementation VLCVideoView
 
-- (BOOL)fillScreen
-{
-    return [layoutManager fillScreenEntirely];
-}
-- (void)setFillScreen:(BOOL)fillScreen
-{
-    [layoutManager setFillScreenEntirely:fillScreen];
-    [[self layer] setNeedsLayout];
-}
-
 - (id)initWithFrame:(NSRect)rect
 {
     if (self = [super initWithFrame:rect]) 
     [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
 {
     [self lockFocus];
 {
     return YES;
 }
+
+@synthesize delegate;
+@synthesize backColor;
+
+- (BOOL)fillScreen
+{
+    return [layoutManager fillScreenEntirely];
+}
+
+- (void)setFillScreen:(BOOL)fillScreen
+{
+    [layoutManager setFillScreenEntirely:fillScreen];
+    [[self layer] setNeedsLayout];
+}
 @end
 
 /******************************************************************************