/*****************************************************************************
* misc.h: code not specific to vlc
*****************************************************************************
- * Copyright (C) 2003-2013 VLC authors and VideoLAN
+ * Copyright (C) 2003-2014 VLC authors and VideoLAN
* $Id$
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*****************************************************************************/
#import <Cocoa/Cocoa.h>
-#import "CompatibilityFixes.h"
/*****************************************************************************
* NSSound (VLCAdditions)
- (void)setNonFullscreenPresentationOptions;
@end
+/*****************************************************************************
+ * VLCDragDropView
+ *
+ * Disables default drag / drop behaviour of an NSImageView.
+ * set it for all sub image views withing an VLCDragDropView.
+ *****************************************************************************/
+
+
+@interface VLCDropDisabledImageView : NSImageView
+
+@end
/*****************************************************************************
- * VLBrushedMetalImageView
+ * VLCDragDropView
*****************************************************************************/
-@interface VLBrushedMetalImageView : NSImageView
+@interface VLCDragDropView : NSView
+{
+ bool b_activeDragAndDrop;
+
+ id _dropHandler;
+}
+
+@property (nonatomic, assign) id dropHandler;
+@property (nonatomic, assign) BOOL drawBorder;
+
+
+- (void)enablePlaylistItems;
@end
- (void)scrollWheel:(NSEvent *)o_event;
- (void)drawFullVolumeMarker;
+- (CGFloat)fullVolumePos;
+
+@end
+
+@interface VolumeSliderCell : NSSliderCell
@end
/*****************************************************************************
- (void)setImagesLeft:(NSImage *)left middle: (NSImage *)middle right:(NSImage *)right;
@end
-/*****************************************************************************
- * VLCThreePartDropView interface
- *****************************************************************************/
-@interface VLCThreePartDropView : VLCThreePartImageView
-
-@end
/*****************************************************************************
* PositionFormatter interface
- (BOOL)getObjectValue:(id*)obj forString:(NSString*)string errorDescription:(NSString**)error;
-- (bool)isPartialStringValid:(NSString*)partialString newEditingString:(NSString**)newString errorDescription:(NSString**)error;
+- (BOOL)isPartialStringValid:(NSString*)partialString newEditingString:(NSString**)newString errorDescription:(NSString**)error;
+
+@end
+
+/*****************************************************************************
+ * NSView addition
+ *****************************************************************************/
+
+@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