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 /*****************************************************************************
29 * NSImage (VLCAddition)
30 *****************************************************************************/
32 @interface NSImage (VLCAdditions)
33 + (id)imageWithWarningIcon;
34 + (id)imageWithErrorIcon;
37 /*****************************************************************************
38 * NSAnimation (VLCAddition)
39 *****************************************************************************/
41 @interface NSAnimation (VLCAdditions)
42 - (void)setUserInfo: (void *)userInfo;
46 /*****************************************************************************
47 * NSScreen (VLCAdditions)
49 * Missing extension to NSScreen
50 *****************************************************************************/
52 @interface NSScreen (VLCAdditions)
54 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
56 - (BOOL)isScreen: (NSScreen*)screen;
57 - (CGDirectDisplayID)displayID;
58 - (void)blackoutOtherScreens;
59 + (void)unblackoutScreens;
62 /*****************************************************************************
65 * Missing extension to NSWindow
66 *****************************************************************************/
68 @interface VLCWindow : NSWindow
70 BOOL b_canBecomeKeyWindow;
71 BOOL b_isset_canBecomeKeyWindow;
72 NSViewAnimation *animation;
75 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
77 /* animate mode is only supported in >=10.4 */
78 - (void)orderFront: (id)sender animate: (BOOL)animate;
80 /* animate mode is only supported in >=10.4 */
81 - (void)orderOut: (id)sender animate: (BOOL)animate;
83 /* animate mode is only supported in >=10.4 */
84 - (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
86 /* animate mode is only supported in >=10.4 */
87 - (void)closeAndAnimate: (BOOL)animate;
91 /*****************************************************************************
93 *****************************************************************************/
96 @interface VLCControllerWindow : NSWindow
102 /*****************************************************************************
104 *****************************************************************************/
106 @interface VLCControllerView : NSView
112 /*****************************************************************************
113 * VLBrushedMetalImageView
114 *****************************************************************************/
116 @interface VLBrushedMetalImageView : NSImageView
124 /*****************************************************************************
126 *****************************************************************************/
128 @interface MPSlider : NSSlider
134 /*****************************************************************************
136 *****************************************************************************/
138 @interface TimeLineSlider : NSSlider
142 - (void)drawRect:(NSRect)rect;
143 - (void)drawKnobInRect:(NSRect)knobRect;
147 /*****************************************************************************
149 *****************************************************************************/
151 @interface ITSlider : NSSlider
155 - (void)drawRect:(NSRect)rect;
156 - (void)drawKnobInRect:(NSRect)knobRect;