]> git.sesse.net Git - vlc/blob - modules/gui/macosx/misc.h
macosx: remove outdated and unused isFullscreen methods
[vlc] / modules / gui / macosx / misc.h
1 /*****************************************************************************
2  * misc.h: code not specific to vlc
3  *****************************************************************************
4  * Copyright (C) 2003-2012 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 "CompatibilityFixes.h"
27
28 /*****************************************************************************
29  * NSSound (VLCAdditions)
30  *
31  * added code to change the system volume, needed for the apple remote code
32  * this is simplified code, which won't let you set the exact volume
33  * (that's what the audio output is for after all), but just the system volume
34  * in steps of 1/16 (matching the default AR or volume key implementation).
35  *****************************************************************************/
36
37 @interface NSSound (VLCAdditions)
38 + (float)systemVolumeForChannel:(int)channel;
39 + (bool)setSystemVolume:(float)volume forChannel:(int)channel;
40 + (void)increaseSystemVolume;
41 + (void)decreaseSystemVolume;
42 @end
43
44 /*****************************************************************************
45  * NSAnimation (VLCAddition)
46  *****************************************************************************/
47
48 @interface NSAnimation (VLCAdditions)
49 - (void)setUserInfo: (void *)userInfo;
50 - (void *)userInfo;
51 @end
52
53 /*****************************************************************************
54  * NSScreen (VLCAdditions)
55  *
56  *  Missing extension to NSScreen
57  *****************************************************************************/
58
59 @interface NSScreen (VLCAdditions)
60
61 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
62 - (BOOL)isMainScreen;
63 - (BOOL)isScreen: (NSScreen*)screen;
64 - (CGDirectDisplayID)displayID;
65 - (void)blackoutOtherScreens;
66 + (void)unblackoutScreens;
67 @end
68
69 /*****************************************************************************
70  * VLCWindow
71  *
72  *  Missing extension to NSWindow
73  *****************************************************************************/
74
75 @interface VLCWindow : NSWindow <NSWindowDelegate>
76 {
77     BOOL b_canBecomeKeyWindow;
78     BOOL b_isset_canBecomeKeyWindow;
79     BOOL b_canBecomeMainWindow;
80     BOOL b_isset_canBecomeMainWindow;
81     NSViewAnimation *animation;
82 }
83
84 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
85
86 - (void)setCanBecomeMainWindow: (BOOL)canBecomeMain;
87
88 /* animate mode is only supported in >=10.4 */
89 - (void)orderFront: (id)sender animate: (BOOL)animate;
90
91 /* animate mode is only supported in >=10.4 */
92 - (void)orderOut: (id)sender animate: (BOOL)animate;
93
94 /* animate mode is only supported in >=10.4 */
95 - (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
96
97 /* animate mode is only supported in >=10.4 */
98 - (void)closeAndAnimate: (BOOL)animate;
99
100 @end
101
102
103 /*****************************************************************************
104  * VLBrushedMetalImageView
105  *****************************************************************************/
106
107 @interface VLBrushedMetalImageView : NSImageView
108 {
109
110 }
111
112 @end
113
114
115 /*****************************************************************************
116  * MPSlider
117  *****************************************************************************/
118
119 @interface MPSlider : NSSlider
120 {
121 }
122
123 @end
124
125 /*****************************************************************************
126  * TimeLineSlider
127  *****************************************************************************/
128
129 @interface TimeLineSlider : NSSlider
130 {
131     NSImage *o_knob_img;
132     NSRect img_rect;
133     BOOL b_dark;
134 }
135 - (CGFloat)knobPosition;
136
137 - (void)drawRect:(NSRect)rect;
138 - (void)drawKnobInRect:(NSRect)knobRect;
139
140 @end
141
142 /*****************************************************************************
143  * ITSlider
144  *****************************************************************************/
145
146 @interface ITSlider : NSSlider
147 {
148     NSImage *img;
149     NSRect image_rect;
150 }
151
152 - (void)drawRect:(NSRect)rect;
153 - (void)drawKnobInRect:(NSRect)knobRect;
154
155 @end
156
157 /*****************************************************************************
158  * VLCTimeField interface
159  *****************************************************************************
160  * we need the implementation to catch our click-event in the controller window
161  *****************************************************************************/
162
163 @interface VLCTimeField : NSTextField
164 {
165     NSShadow * o_string_shadow;
166     NSDictionary * o_string_attributes_dict;
167     NSTextAlignment textAlignment;
168 }
169
170 - (BOOL)timeRemaining;
171 @end
172
173 /*****************************************************************************
174  * VLCMainWindowSplitView interface
175  *****************************************************************************/
176 @interface VLCMainWindowSplitView : NSSplitView
177 {
178 }
179
180 @end
181
182 /*****************************************************************************
183  * VLCThreePartImageView interface
184  *****************************************************************************/
185 @interface VLCThreePartImageView : NSView
186 {
187     NSImage * o_left_img;
188     NSImage * o_middle_img;
189     NSImage * o_right_img;
190 }
191
192 - (void)setImagesLeft:(NSImage *)left middle: (NSImage *)middle right:(NSImage *)right;
193 @end
194
195 /*****************************************************************************
196  * VLCThreePartDropView interface
197  *****************************************************************************/
198 @interface VLCThreePartDropView : VLCThreePartImageView
199 {
200
201 }
202
203 @end