]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/misc.h
macosx: playlist: remove unused _other outlets
[vlc] / modules / gui / macosx / misc.h
index 0ef7f4cc7462fef86cb9a4c1feb119abc68e6429..a84437a963f23637b15a89257f11314faba4f05e 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * misc.h: code not specific to vlc
  *****************************************************************************
- * Copyright (C) 2003-2012 VLC authors and VideoLAN
+ * Copyright (C) 2003-2014 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -23,7 +23,6 @@
  *****************************************************************************/
 
 #import <Cocoa/Cocoa.h>
-#import "CompatibilityFixes.h"
 
 /*****************************************************************************
  * NSSound (VLCAdditions)
 
 @interface NSScreen (VLCAdditions)
 
-@property (readonly) BOOL mainScreen;
-
 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
+- (BOOL)hasMenuBar;
+- (BOOL)hasDock;
 - (BOOL)isScreen: (NSScreen*)screen;
 - (CGDirectDisplayID)displayID;
 - (void)blackoutOtherScreens;
 + (void)unblackoutScreens;
+
+- (void)setFullscreenPresentationOptions;
+- (void)setNonFullscreenPresentationOptions;
 @end
 
 /*****************************************************************************
- * VLCWindow
+ * VLCDragDropView
  *
- *  Missing extension to NSWindow
+ * Disables default drag / drop behaviour of an NSImageView.
+ * set it for all sub image views withing an VLCDragDropView.
  *****************************************************************************/
 
-@interface VLCWindow : NSWindow <NSWindowDelegate>
+
+@interface VLCDropDisabledImageView : NSImageView
+
+@end
+
+/*****************************************************************************
+ * VLCDragDropView
+ *****************************************************************************/
+
+@interface VLCDragDropView : NSView
 {
-    BOOL b_canBecomeKeyWindow;
-    BOOL b_isset_canBecomeKeyWindow;
-    BOOL b_canBecomeMainWindow;
-    BOOL b_isset_canBecomeMainWindow;
-    NSViewAnimation *animation;
-}
-@property (readwrite) BOOL canBecomeKeyWindow;
-@property (readwrite) BOOL canBecomeMainWindow;
+    bool b_activeDragAndDrop;
 
-/* animate mode is only supported in >=10.4 */
-- (void)orderFront: (id)sender animate: (BOOL)animate;
+    id _dropHandler;
+}
 
-/* animate mode is only supported in >=10.4 */
-- (void)orderOut: (id)sender animate: (BOOL)animate;
+@property (nonatomic, assign) id dropHandler;
+@property (nonatomic, assign) BOOL drawBorder;
 
-/* animate mode is only supported in >=10.4 */
-- (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
 
-/* animate mode is only supported in >=10.4 */
-- (void)closeAndAnimate: (BOOL)animate;
+- (void)enablePlaylistItems;
 
 @end
 
 
 /*****************************************************************************
- * VLBrushedMetalImageView
+ * MPSlider
  *****************************************************************************/
 
-@interface VLBrushedMetalImageView : NSImageView
+@interface MPSlider : NSSlider
 
 @end
 
-
 /*****************************************************************************
- * MPSlider
+ * ProgressView
  *****************************************************************************/
 
-@interface MPSlider : NSSlider
+@interface VLCProgressView : NSView
+
+- (void)scrollWheel:(NSEvent *)o_event;
 
 @end
 
+
 /*****************************************************************************
  * TimeLineSlider
  *****************************************************************************/
 
 @end
 
+/*****************************************************************************
+ * VLCVolumeSliderCommon
+ *****************************************************************************/
+
+@interface VLCVolumeSliderCommon : NSSlider
+{
+    BOOL _usesBrightArtwork;
+}
+@property (readwrite, nonatomic) BOOL usesBrightArtwork;
+
+- (void)scrollWheel:(NSEvent *)o_event;
+- (void)drawFullVolumeMarker;
+
+- (CGFloat)fullVolumePos;
+
+@end
+
+@interface VolumeSliderCell : NSSliderCell
+@end
+
 /*****************************************************************************
  * ITSlider
  *****************************************************************************/
 
-@interface ITSlider : NSSlider
+@interface ITSlider : VLCVolumeSliderCommon
 {
     NSImage *img;
     NSRect image_rect;
 @interface VLCTimeField : NSTextField
 {
     NSShadow * o_string_shadow;
-    NSDictionary * o_string_attributes_dict;
     NSTextAlignment textAlignment;
+
+    NSString *o_remaining_identifier;
+    BOOL b_time_remaining;
 }
 @property (readonly) BOOL timeRemaining;
+
+-(id)initWithFrame:(NSRect)frameRect;
+
+- (void)setRemainingIdentifier:(NSString *)o_string;
+
 @end
 
 /*****************************************************************************
 - (void)setImagesLeft:(NSImage *)left middle: (NSImage *)middle right:(NSImage *)right;
 @end
 
+
+/*****************************************************************************
+ * PositionFormatter interface
+ *
+ * Formats a text field to only accept decimals and :
+ *****************************************************************************/
+@interface PositionFormatter : NSFormatter
+{
+    NSCharacterSet *o_forbidden_characters;
+}
+- (NSString*)stringForObjectValue:(id)obj;
+
+- (BOOL)getObjectValue:(id*)obj forString:(NSString*)string errorDescription:(NSString**)error;
+
+- (BOOL)isPartialStringValid:(NSString*)partialString newEditingString:(NSString**)newString errorDescription:(NSString**)error;
+
+@end
+
 /*****************************************************************************
- * VLCThreePartDropView interface
+ * NSView addition
  *****************************************************************************/
-@interface VLCThreePartDropView : VLCThreePartImageView
 
+@interface NSView (EnableSubviews)
+- (void)enableSubviews:(BOOL)b_enable;
+@end
+
+/*****************************************************************************
+ * VLCByteCountFormatter addition
+ *****************************************************************************/
+
+#ifndef MAC_OS_X_VERSION_10_8
+enum {
+    // Specifies display of file or storage byte counts. The actual behavior for this is platform-specific; on OS X 10.7 and less, this uses the binary style, but decimal style on 10.8 and above
+    NSByteCountFormatterCountStyleFile   = 0,
+    // Specifies display of memory byte counts. The actual behavior for this is platform-specific; on OS X 10.7 and less, this uses the binary style, but that may change over time.
+    NSByteCountFormatterCountStyleMemory = 1,
+    // The following two allow specifying the number of bytes for KB explicitly. It's better to use one of the above values in most cases.
+    NSByteCountFormatterCountStyleDecimal = 2,    // 1000 bytes are shown as 1 KB
+    NSByteCountFormatterCountStyleBinary  = 3     // 1024 bytes are shown as 1 KB
+};
+typedef NSInteger NSByteCountFormatterCountStyle;
+#endif
+
+@interface VLCByteCountFormatter : NSFormatter {
+}
+
++ (NSString *)stringFromByteCount:(long long)byteCount countStyle:(NSByteCountFormatterCountStyle)countStyle;
 @end