]> git.sesse.net Git - vlc/blob - modules/gui/macosx/misc.h
macosx: make sure that all the tooltips in the sprefs panel are actually displayed...
[vlc] / modules / gui / macosx / misc.h
1 /*****************************************************************************
2  * misc.h: code not specific to vlc
3  *****************************************************************************
4  * Copyright (C) 2003-2011 VLC authors and VideoLAN
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 #import "CompatibilityFixes.h"
28
29 /*****************************************************************************
30  * NSAnimation (VLCAddition)
31  *****************************************************************************/
32
33 @interface NSAnimation (VLCAdditions)
34 - (void)setUserInfo: (void *)userInfo;
35 - (void *)userInfo;
36 @end
37
38 /*****************************************************************************
39  * NSScreen (VLCAdditions)
40  *
41  *  Missing extension to NSScreen
42  *****************************************************************************/
43
44 @interface NSScreen (VLCAdditions)
45
46 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
47 - (BOOL)isMainScreen;
48 - (BOOL)isScreen: (NSScreen*)screen;
49 - (CGDirectDisplayID)displayID;
50 - (void)blackoutOtherScreens;
51 + (void)unblackoutScreens;
52 @end
53
54 /*****************************************************************************
55  * VLCWindow
56  *
57  *  Missing extension to NSWindow
58  *****************************************************************************/
59
60 @interface VLCWindow : NSWindow <NSWindowDelegate>
61 {
62     BOOL b_canBecomeKeyWindow;
63     BOOL b_isset_canBecomeKeyWindow;
64     NSViewAnimation *animation;
65 }
66
67 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
68
69 /* animate mode is only supported in >=10.4 */
70 - (void)orderFront: (id)sender animate: (BOOL)animate;
71
72 /* animate mode is only supported in >=10.4 */
73 - (void)orderOut: (id)sender animate: (BOOL)animate;
74
75 /* animate mode is only supported in >=10.4 */
76 - (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
77
78 /* animate mode is only supported in >=10.4 */
79 - (void)closeAndAnimate: (BOOL)animate;
80
81 - (BOOL)isFullscreen;
82 @end
83
84
85 /*****************************************************************************
86  * VLCControllerView
87  *****************************************************************************/
88
89 @interface VLCControllerView : NSView
90 {
91 }
92
93 @end
94
95 /*****************************************************************************
96  * VLBrushedMetalImageView
97  *****************************************************************************/
98
99 @interface VLBrushedMetalImageView : NSImageView
100 {
101
102 }
103
104 @end
105
106
107 /*****************************************************************************
108  * MPSlider
109  *****************************************************************************/
110
111 @interface MPSlider : NSSlider
112 {
113 }
114
115 @end
116
117 /*****************************************************************************
118  * TimeLineSlider
119  *****************************************************************************/
120
121 @interface TimeLineSlider : NSSlider
122 {
123     NSImage *o_knob_img;
124     NSRect img_rect;
125 }
126 - (CGFloat)knobPosition;
127
128 - (void)drawRect:(NSRect)rect;
129 - (void)drawKnobInRect:(NSRect)knobRect;
130
131 @end
132
133 /*****************************************************************************
134  * ITSlider
135  *****************************************************************************/
136
137 @interface ITSlider : NSSlider
138 {
139     NSImage *img;
140     NSRect image_rect;
141 }
142
143 - (void)drawRect:(NSRect)rect;
144 - (void)drawKnobInRect:(NSRect)knobRect;
145
146 @end
147
148 /*****************************************************************************
149  * VLCTimeField interface
150  *****************************************************************************
151  * we need the implementation to catch our click-event in the controller window
152  *****************************************************************************/
153
154 @interface VLCTimeField : NSTextField
155 {
156     NSShadow * o_string_shadow;
157     NSDictionary * o_string_attributes_dict;
158 }
159
160 - (BOOL)timeRemaining;
161 @end
162
163 /*****************************************************************************
164  * VLCMainWindowSplitView interface
165  *****************************************************************************/
166 @interface VLCMainWindowSplitView : NSSplitView
167 {
168 }
169
170 @end
171
172 /*****************************************************************************
173  * VLCThreePartImageView interface
174  *****************************************************************************/
175 @interface VLCThreePartImageView : NSView
176 {
177     NSImage * o_left_img;
178     NSImage * o_middle_img;
179     NSImage * o_right_img;
180 }
181
182 - (void)setImagesLeft:(NSImage *)left middle: (NSImage *)middle right:(NSImage *)right;
183 @end