[vlc-commits] macosx/misc: simplify header

Felix Paul Kühne git at videolan.org
Fri Aug 24 18:34:27 CEST 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Aug 24 18:16:24 2012 +0200| [3b4a5339e01773e552a04b7145e87c1f07969b36] | committer: Felix Paul Kühne

macosx/misc: simplify header

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3b4a5339e01773e552a04b7145e87c1f07969b36
---

 modules/gui/macosx/MainWindow.m |    4 ++--
 modules/gui/macosx/misc.h       |   28 ++++++++--------------------
 modules/gui/macosx/misc.m       |    4 ++--
 3 files changed, 12 insertions(+), 24 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index a88623f..852525f 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -2121,7 +2121,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
                 CGDisplayFade( token, 0.5, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
             }
 
-            if ([screen isMainScreen])
+            if ([screen mainScreen])
                 [NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
 
             [[o_video_view superview] replaceSubview:o_video_view with:o_temp_view];
@@ -2176,7 +2176,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         [o_fullscreen_anim2 release];
     }
 
-    if ([screen isMainScreen])
+    if ([screen mainScreen])
         [NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
 
     dict1 = [[NSMutableDictionary alloc] initWithCapacity:2];
diff --git a/modules/gui/macosx/misc.h b/modules/gui/macosx/misc.h
index d5c4a63..0ef7f4c 100644
--- a/modules/gui/macosx/misc.h
+++ b/modules/gui/macosx/misc.h
@@ -46,8 +46,8 @@
  *****************************************************************************/
 
 @interface NSAnimation (VLCAdditions)
-- (void)setUserInfo: (void *)userInfo;
-- (void *)userInfo;
+ at property (readwrite) void * userInfo;
+
 @end
 
 /*****************************************************************************
@@ -58,8 +58,9 @@
 
 @interface NSScreen (VLCAdditions)
 
+ at property (readonly) BOOL mainScreen;
+
 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
-- (BOOL)isMainScreen;
 - (BOOL)isScreen: (NSScreen*)screen;
 - (CGDirectDisplayID)displayID;
 - (void)blackoutOtherScreens;
@@ -80,10 +81,8 @@
     BOOL b_isset_canBecomeMainWindow;
     NSViewAnimation *animation;
 }
-
-- (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
-
-- (void)setCanBecomeMainWindow: (BOOL)canBecomeMain;
+ at property (readwrite) BOOL canBecomeKeyWindow;
+ at property (readwrite) BOOL canBecomeMainWindow;
 
 /* animate mode is only supported in >=10.4 */
 - (void)orderFront: (id)sender animate: (BOOL)animate;
@@ -105,9 +104,6 @@
  *****************************************************************************/
 
 @interface VLBrushedMetalImageView : NSImageView
-{
-
-}
 
 @end
 
@@ -117,8 +113,6 @@
  *****************************************************************************/
 
 @interface MPSlider : NSSlider
-{
-}
 
 @end
 
@@ -132,7 +126,7 @@
     NSRect img_rect;
     BOOL b_dark;
 }
-- (CGFloat)knobPosition;
+ at property (readonly) CGFloat knobPosition;
 
 - (void)drawRect:(NSRect)rect;
 - (void)drawKnobInRect:(NSRect)knobRect;
@@ -166,16 +160,13 @@
     NSDictionary * o_string_attributes_dict;
     NSTextAlignment textAlignment;
 }
-
-- (BOOL)timeRemaining;
+ at property (readonly) BOOL timeRemaining;
 @end
 
 /*****************************************************************************
  * VLCMainWindowSplitView interface
  *****************************************************************************/
 @interface VLCMainWindowSplitView : NSSplitView
-{
-}
 
 @end
 
@@ -196,8 +187,5 @@
  * VLCThreePartDropView interface
  *****************************************************************************/
 @interface VLCThreePartDropView : VLCThreePartImageView
-{
-
-}
 
 @end
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 18ea7ed..6326668 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -184,7 +184,7 @@ static NSMutableArray *blackoutWindows = NULL;
     return nil;
 }
 
-- (BOOL)isMainScreen
+- (BOOL)mainScreen
 {
     return ([self displayID] == [[[NSScreen screens] objectAtIndex:0] displayID]);
 }
@@ -233,7 +233,7 @@ static NSMutableArray *blackoutWindows = NULL;
         [blackoutWindows addObject: blackoutWindow];
         [blackoutWindow release];
 
-        if( [screen isMainScreen] )
+        if( [screen mainScreen] )
             [NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
     }
 }



More information about the vlc-commits mailing list