]> git.sesse.net Git - vlc/blob - modules/gui/macosx/misc.h
Compare two NSScreen using their display id, rather than their pointer values. (point...
[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 - (BOOL)isScreen: (NSScreen*)screen;
46 - (CGDirectDisplayID)displayID;
47 - (void)blackoutOtherScreens;
48 + (void)unblackoutScreens;
49 @end
50
51 /*****************************************************************************
52  * VLCWindow
53  *
54  *  Missing extension to NSWindow
55  *****************************************************************************/
56
57 @interface VLCWindow : NSWindow
58 {
59     BOOL b_canBecomeKeyWindow;
60     BOOL b_isset_canBecomeKeyWindow;
61     NSViewAnimation *animation;
62 }
63
64 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
65
66 /* animate mode is only supported in >=10.4 */
67 - (void)orderFront: (id)sender animate: (BOOL)animate;
68
69 /* animate mode is only supported in >=10.4 */
70 - (void)orderOut: (id)sender animate: (BOOL)animate;
71
72 /* animate mode is only supported in >=10.4 */
73 - (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
74
75 /* animate mode is only supported in >=10.4 */
76 - (void)closeAndAnimate: (BOOL)animate;
77 @end
78
79
80 /*****************************************************************************
81  * VLCControllerWindow
82  *****************************************************************************/
83
84
85 @interface VLCControllerWindow : NSWindow
86 {
87 }
88
89 @end
90
91 /*****************************************************************************
92  * VLCControllerView
93  *****************************************************************************/
94
95 @interface VLCControllerView : NSView
96 {
97 }
98
99 @end
100
101 /*****************************************************************************
102  * VLBrushedMetalImageView
103  *****************************************************************************/
104
105 @interface VLBrushedMetalImageView : NSImageView
106 {
107
108 }
109
110 @end
111
112
113 /*****************************************************************************
114  * MPSlider
115  *****************************************************************************/
116
117 @interface MPSlider : NSSlider
118 {
119 }
120
121 @end
122
123 /*****************************************************************************
124  * ITSliderCell
125  *****************************************************************************/
126  
127 @interface ITSlider : NSSlider
128 {
129 }
130
131 @end
132
133 /*****************************************************************************
134  * ITSliderCell
135  *****************************************************************************/
136  
137 @interface ITSliderCell : NSSliderCell
138 {
139     NSImage *_knobOff;
140     NSImage *_knobOn;
141     BOOL b_mouse_down;
142 }
143
144 @end