]> git.sesse.net Git - vlc/blob - modules/gui/macosx/misc.h
macosx: fill the side bar with SDs, etc.
[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 #ifndef MAC_OS_X_VERSION_10_6
29 @protocol NSWindowDelegate <NSObject> @end
30 #endif
31
32 /*****************************************************************************
33  * NSAnimation (VLCAddition)
34  *****************************************************************************/
35
36 @interface NSAnimation (VLCAdditions)
37 - (void)setUserInfo: (void *)userInfo;
38 - (void *)userInfo;
39 @end
40
41 /*****************************************************************************
42  * NSScreen (VLCAdditions)
43  *
44  *  Missing extension to NSScreen
45  *****************************************************************************/
46
47 @interface NSScreen (VLCAdditions)
48
49 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
50 - (BOOL)isMainScreen;
51 - (BOOL)isScreen: (NSScreen*)screen;
52 - (CGDirectDisplayID)displayID;
53 - (void)blackoutOtherScreens;
54 + (void)unblackoutScreens;
55 @end
56
57 /*****************************************************************************
58  * VLCWindow
59  *
60  *  Missing extension to NSWindow
61  *****************************************************************************/
62
63 @interface VLCWindow : NSWindow <NSWindowDelegate>
64 {
65     BOOL b_canBecomeKeyWindow;
66     BOOL b_isset_canBecomeKeyWindow;
67     NSViewAnimation *animation;
68 }
69
70 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
71
72 /* animate mode is only supported in >=10.4 */
73 - (void)orderFront: (id)sender animate: (BOOL)animate;
74
75 /* animate mode is only supported in >=10.4 */
76 - (void)orderOut: (id)sender animate: (BOOL)animate;
77
78 /* animate mode is only supported in >=10.4 */
79 - (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
80
81 /* animate mode is only supported in >=10.4 */
82 - (void)closeAndAnimate: (BOOL)animate;
83 @end
84
85
86 /*****************************************************************************
87  * VLCControllerView
88  *****************************************************************************/
89
90 @interface VLCControllerView : NSView
91 {
92 }
93
94 @end
95
96 /*****************************************************************************
97  * VLBrushedMetalImageView
98  *****************************************************************************/
99
100 @interface VLBrushedMetalImageView : NSImageView
101 {
102
103 }
104
105 @end
106
107
108 /*****************************************************************************
109  * MPSlider
110  *****************************************************************************/
111
112 @interface MPSlider : NSSlider
113 {
114 }
115
116 @end
117
118 /*****************************************************************************
119  * TimeLineSlider
120  *****************************************************************************/
121
122 @interface TimeLineSlider : NSSlider
123 {
124 }
125
126 - (void)drawRect:(NSRect)rect;
127 - (void)drawKnobInRect:(NSRect)knobRect;
128
129 @end
130
131 /*****************************************************************************
132  * ITSlider
133  *****************************************************************************/
134
135 @interface ITSlider : NSSlider
136 {
137 }
138
139 - (void)drawRect:(NSRect)rect;
140 - (void)drawKnobInRect:(NSRect)knobRect;
141
142 @end
143
144 /*****************************************************************************
145  * VLCTimeField interface
146  *****************************************************************************
147  * we need the implementation to catch our click-event in the controller window
148  *****************************************************************************/
149
150 @interface VLCTimeField : NSTextField
151 {
152 }
153 - (BOOL)timeRemaining;
154 @end