]> git.sesse.net Git - vlc/blob - modules/gui/macosx/misc.h
macosx: re-implemented time slider to fit the new style
[vlc] / modules / gui / macosx / misc.h
1 /*****************************************************************************
2  * misc.h: code not specific to vlc
3  *****************************************************************************
4  * Copyright (C) 2003-2011 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8  *          Felix Paul Kühne <fkuehne at videolan dot org>
9  *
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.
14  *
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.
19  *
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  *****************************************************************************/
24
25 #import <Cocoa/Cocoa.h>
26 #import <ApplicationServices/ApplicationServices.h>
27
28 /*****************************************************************************
29  * NSImage (VLCAddition)
30  *****************************************************************************/
31
32 @interface NSImage (VLCAdditions)
33 + (id)imageWithWarningIcon;
34 + (id)imageWithErrorIcon;
35 @end
36
37 /*****************************************************************************
38  * NSAnimation (VLCAddition)
39  *****************************************************************************/
40
41 @interface NSAnimation (VLCAdditions)
42 - (void)setUserInfo: (void *)userInfo;
43 - (void *)userInfo;
44 @end
45
46 /*****************************************************************************
47  * NSScreen (VLCAdditions)
48  *
49  *  Missing extension to NSScreen
50  *****************************************************************************/
51
52 @interface NSScreen (VLCAdditions)
53
54 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
55 - (BOOL)isMainScreen;
56 - (BOOL)isScreen: (NSScreen*)screen;
57 - (CGDirectDisplayID)displayID;
58 - (void)blackoutOtherScreens;
59 + (void)unblackoutScreens;
60 @end
61
62 /*****************************************************************************
63  * VLCWindow
64  *
65  *  Missing extension to NSWindow
66  *****************************************************************************/
67
68 @interface VLCWindow : NSWindow
69 {
70     BOOL b_canBecomeKeyWindow;
71     BOOL b_isset_canBecomeKeyWindow;
72     NSViewAnimation *animation;
73 }
74
75 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
76
77 /* animate mode is only supported in >=10.4 */
78 - (void)orderFront: (id)sender animate: (BOOL)animate;
79
80 /* animate mode is only supported in >=10.4 */
81 - (void)orderOut: (id)sender animate: (BOOL)animate;
82
83 /* animate mode is only supported in >=10.4 */
84 - (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
85
86 /* animate mode is only supported in >=10.4 */
87 - (void)closeAndAnimate: (BOOL)animate;
88 @end
89
90
91 /*****************************************************************************
92  * VLCControllerWindow
93  *****************************************************************************/
94
95
96 @interface VLCControllerWindow : NSWindow
97 {
98 }
99
100 @end
101
102 /*****************************************************************************
103  * VLCControllerView
104  *****************************************************************************/
105
106 @interface VLCControllerView : NSView
107 {
108 }
109
110 @end
111
112 /*****************************************************************************
113  * VLBrushedMetalImageView
114  *****************************************************************************/
115
116 @interface VLBrushedMetalImageView : NSImageView
117 {
118
119 }
120
121 @end
122
123
124 /*****************************************************************************
125  * MPSlider
126  *****************************************************************************/
127
128 @interface MPSlider : NSSlider
129 {
130 }
131
132 @end
133
134 /*****************************************************************************
135  * TimeLineSlider
136  *****************************************************************************/
137
138 @interface TimeLineSlider : NSSlider
139 {
140 }
141
142 - (void)drawRect:(NSRect)rect;
143 - (void)drawKnobInRect:(NSRect)knobRect;
144
145 @end
146
147 /*****************************************************************************
148  * ITSlider
149  *****************************************************************************/
150
151 @interface ITSlider : NSSlider
152 {
153 }
154
155 - (void)drawRect:(NSRect)rect;
156 - (void)drawKnobInRect:(NSRect)knobRect;
157
158 @end