1 /*****************************************************************************
2 * misc.h: code not specific to vlc
3 *****************************************************************************
4 * Copyright (C) 2003-2011 VLC authors and VideoLAN
7 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8 * Felix Paul Kühne <fkuehne at videolan dot org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #import <Cocoa/Cocoa.h>
26 #import <ApplicationServices/ApplicationServices.h>
27 #import "CompatibilityFixes.h"
29 /*****************************************************************************
30 * NSAnimation (VLCAddition)
31 *****************************************************************************/
33 @interface NSAnimation (VLCAdditions)
34 - (void)setUserInfo: (void *)userInfo;
38 /*****************************************************************************
39 * NSScreen (VLCAdditions)
41 * Missing extension to NSScreen
42 *****************************************************************************/
44 @interface NSScreen (VLCAdditions)
46 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
48 - (BOOL)isScreen: (NSScreen*)screen;
49 - (CGDirectDisplayID)displayID;
50 - (void)blackoutOtherScreens;
51 + (void)unblackoutScreens;
54 /*****************************************************************************
57 * Missing extension to NSWindow
58 *****************************************************************************/
60 @interface VLCWindow : NSWindow <NSWindowDelegate>
62 BOOL b_canBecomeKeyWindow;
63 BOOL b_isset_canBecomeKeyWindow;
64 NSViewAnimation *animation;
67 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
69 /* animate mode is only supported in >=10.4 */
70 - (void)orderFront: (id)sender animate: (BOOL)animate;
72 /* animate mode is only supported in >=10.4 */
73 - (void)orderOut: (id)sender animate: (BOOL)animate;
75 /* animate mode is only supported in >=10.4 */
76 - (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
78 /* animate mode is only supported in >=10.4 */
79 - (void)closeAndAnimate: (BOOL)animate;
83 /*****************************************************************************
85 *****************************************************************************/
87 @interface VLCControllerView : NSView
93 /*****************************************************************************
94 * VLBrushedMetalImageView
95 *****************************************************************************/
97 @interface VLBrushedMetalImageView : NSImageView
105 /*****************************************************************************
107 *****************************************************************************/
109 @interface MPSlider : NSSlider
115 /*****************************************************************************
117 *****************************************************************************/
119 @interface TimeLineSlider : NSSlider
124 - (CGFloat)knobPosition;
126 - (void)drawRect:(NSRect)rect;
127 - (void)drawKnobInRect:(NSRect)knobRect;
131 /*****************************************************************************
133 *****************************************************************************/
135 @interface ITSlider : NSSlider
139 - (void)drawRect:(NSRect)rect;
140 - (void)drawKnobInRect:(NSRect)knobRect;
144 /*****************************************************************************
145 * VLCTimeField interface
146 *****************************************************************************
147 * we need the implementation to catch our click-event in the controller window
148 *****************************************************************************/
150 @interface VLCTimeField : NSTextField
153 - (BOOL)timeRemaining;
156 /*****************************************************************************
157 * VLCMainWindowSplitView interface
158 *****************************************************************************/
159 @interface VLCMainWindowSplitView : NSSplitView
165 /*****************************************************************************
166 * VLCThreePartImageView interface
167 *****************************************************************************/
168 @interface VLCThreePartImageView : NSView
170 NSImage * o_left_img;
171 NSImage * o_middle_img;
172 NSImage * o_right_img;
175 - (void)setImagesLeft:(NSImage *)left middle: (NSImage *)middle right:(NSImage *)right;