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;
85 /*****************************************************************************
87 *****************************************************************************/
89 @interface VLCControllerView : NSView
95 /*****************************************************************************
96 * VLBrushedMetalImageView
97 *****************************************************************************/
99 @interface VLBrushedMetalImageView : NSImageView
107 /*****************************************************************************
109 *****************************************************************************/
111 @interface MPSlider : NSSlider
117 /*****************************************************************************
119 *****************************************************************************/
121 @interface TimeLineSlider : NSSlider
126 - (CGFloat)knobPosition;
128 - (void)drawRect:(NSRect)rect;
129 - (void)drawKnobInRect:(NSRect)knobRect;
133 /*****************************************************************************
135 *****************************************************************************/
137 @interface ITSlider : NSSlider
143 - (void)drawRect:(NSRect)rect;
144 - (void)drawKnobInRect:(NSRect)knobRect;
148 /*****************************************************************************
149 * VLCTimeField interface
150 *****************************************************************************
151 * we need the implementation to catch our click-event in the controller window
152 *****************************************************************************/
154 @interface VLCTimeField : NSTextField
156 NSShadow * o_string_shadow;
157 NSDictionary * o_string_attributes_dict;
160 - (BOOL)timeRemaining;
163 /*****************************************************************************
164 * VLCMainWindowSplitView interface
165 *****************************************************************************/
166 @interface VLCMainWindowSplitView : NSSplitView
172 /*****************************************************************************
173 * VLCThreePartImageView interface
174 *****************************************************************************/
175 @interface VLCThreePartImageView : NSView
177 NSImage * o_left_img;
178 NSImage * o_middle_img;
179 NSImage * o_right_img;
182 - (void)setImagesLeft:(NSImage *)left middle: (NSImage *)middle right:(NSImage *)right;