]> git.sesse.net Git - vlc/blob - modules/gui/macosx/misc.h
Fix main screen detection on Mac OS X.
[vlc] / modules / gui / macosx / misc.h
1 /*****************************************************************************
2  * misc.h: code not specific to vlc
3  *****************************************************************************
4  * Copyright (C) 2003 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #import <ApplicationServices/ApplicationServices.h>
25
26 /*****************************************************************************
27  * NSAnimation (VLCAddition)
28  *****************************************************************************/
29
30 @interface NSAnimation (VLCAdditions)
31 - (void)setUserInfo: (void *)userInfo;
32 - (void *)userInfo;
33 @end
34
35 /*****************************************************************************
36  * NSScreen (VLCAdditions)
37  *
38  *  Missing extension to NSScreen
39  *****************************************************************************/
40
41 @interface NSScreen (VLCAdditions)
42
43 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
44 - (BOOL)isMainScreen;
45 - (CGDirectDisplayID)displayID;
46 - (void)blackoutOtherScreens;
47 + (void)unblackoutScreens;
48 @end
49
50 /*****************************************************************************
51  * VLCWindow
52  *
53  *  Missing extension to NSWindow
54  *****************************************************************************/
55
56 @interface VLCWindow : NSWindow
57 {
58     BOOL b_canBecomeKeyWindow;
59     BOOL b_isset_canBecomeKeyWindow;
60     NSViewAnimation *animation;
61 }
62
63 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
64
65 /* animate mode is only supported in >=10.4 */
66 - (void)orderFront: (id)sender animate: (BOOL)animate;
67
68 /* animate mode is only supported in >=10.4 */
69 - (void)orderOut: (id)sender animate: (BOOL)animate;
70
71 /* animate mode is only supported in >=10.4 */
72 - (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
73
74 /* animate mode is only supported in >=10.4 */
75 - (void)closeAndAnimate: (BOOL)animate;
76 @end
77
78
79 /*****************************************************************************
80  * VLCControllerWindow
81  *****************************************************************************/
82
83
84 @interface VLCControllerWindow : NSWindow
85 {
86 }
87
88 @end
89
90 /*****************************************************************************
91  * VLCControllerView
92  *****************************************************************************/
93
94 @interface VLCControllerView : NSView
95 {
96 }
97
98 @end
99
100 /*****************************************************************************
101  * VLBrushedMetalImageView
102  *****************************************************************************/
103
104 @interface VLBrushedMetalImageView : NSImageView
105 {
106
107 }
108
109 @end
110
111
112 /*****************************************************************************
113  * MPSlider
114  *****************************************************************************/
115
116 @interface MPSlider : NSSlider
117 {
118 }
119
120 @end
121
122 /*****************************************************************************
123  * ITSliderCell
124  *****************************************************************************/
125  
126 @interface ITSlider : NSSlider
127 {
128 }
129
130 @end
131
132 /*****************************************************************************
133  * ITSliderCell
134  *****************************************************************************/
135  
136 @interface ITSliderCell : NSSliderCell
137 {
138     NSImage *_knobOff;
139     NSImage *_knobOn;
140     BOOL b_mouse_down;
141 }
142
143 @end