1 /*****************************************************************************
2 * misc.h: code not specific to vlc
3 *****************************************************************************
4 * Copyright (C) 2003-2011 the VideoLAN team
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>
28 #ifndef MAC_OS_X_VERSION_10_6
29 @protocol NSWindowDelegate <NSObject> @end
32 /*****************************************************************************
33 * NSAnimation (VLCAddition)
34 *****************************************************************************/
36 @interface NSAnimation (VLCAdditions)
37 - (void)setUserInfo: (void *)userInfo;
41 /*****************************************************************************
42 * NSScreen (VLCAdditions)
44 * Missing extension to NSScreen
45 *****************************************************************************/
47 @interface NSScreen (VLCAdditions)
49 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
51 - (BOOL)isScreen: (NSScreen*)screen;
52 - (CGDirectDisplayID)displayID;
53 - (void)blackoutOtherScreens;
54 + (void)unblackoutScreens;
57 /*****************************************************************************
60 * Missing extension to NSWindow
61 *****************************************************************************/
63 @interface VLCWindow : NSWindow <NSWindowDelegate>
65 BOOL b_canBecomeKeyWindow;
66 BOOL b_isset_canBecomeKeyWindow;
67 NSViewAnimation *animation;
70 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
72 /* animate mode is only supported in >=10.4 */
73 - (void)orderFront: (id)sender animate: (BOOL)animate;
75 /* animate mode is only supported in >=10.4 */
76 - (void)orderOut: (id)sender animate: (BOOL)animate;
78 /* animate mode is only supported in >=10.4 */
79 - (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
81 /* animate mode is only supported in >=10.4 */
82 - (void)closeAndAnimate: (BOOL)animate;
86 /*****************************************************************************
88 *****************************************************************************/
90 @interface VLCControllerView : NSView
96 /*****************************************************************************
97 * VLBrushedMetalImageView
98 *****************************************************************************/
100 @interface VLBrushedMetalImageView : NSImageView
108 /*****************************************************************************
110 *****************************************************************************/
112 @interface MPSlider : NSSlider
118 /*****************************************************************************
120 *****************************************************************************/
122 @interface TimeLineSlider : NSSlider
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;