]> git.sesse.net Git - vlc/blob - modules/gui/macosx/misc.h
fe06daaf7c14c330ceba47f53392d38596ed6986
[vlc] / modules / gui / macosx / misc.h
1 /*****************************************************************************
2  * misc.h: code not specific to vlc
3  *****************************************************************************
4  * Copyright (C) 2003-2007 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 <Cocoa/Cocoa.h>
25 #import <ApplicationServices/ApplicationServices.h>
26
27 /*****************************************************************************
28  * NSAnimation (VLCAddition)
29  *****************************************************************************/
30
31 @interface NSAnimation (VLCAdditions)
32 - (void)setUserInfo: (void *)userInfo;
33 - (void *)userInfo;
34 @end
35
36 /*****************************************************************************
37  * NSScreen (VLCAdditions)
38  *
39  *  Missing extension to NSScreen
40  *****************************************************************************/
41
42 @interface NSScreen (VLCAdditions)
43
44 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
45 - (BOOL)isMainScreen;
46 - (BOOL)isScreen: (NSScreen*)screen;
47 - (CGDirectDisplayID)displayID;
48 - (void)blackoutOtherScreens;
49 + (void)unblackoutScreens;
50 @end
51
52 /*****************************************************************************
53  * VLCWindow
54  *
55  *  Missing extension to NSWindow
56  *****************************************************************************/
57
58 @interface VLCWindow : NSWindow
59 {
60     BOOL b_canBecomeKeyWindow;
61     BOOL b_isset_canBecomeKeyWindow;
62     NSViewAnimation *animation;
63 }
64
65 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
66
67 /* animate mode is only supported in >=10.4 */
68 - (void)orderFront: (id)sender animate: (BOOL)animate;
69
70 /* animate mode is only supported in >=10.4 */
71 - (void)orderOut: (id)sender animate: (BOOL)animate;
72
73 /* animate mode is only supported in >=10.4 */
74 - (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
75
76 /* animate mode is only supported in >=10.4 */
77 - (void)closeAndAnimate: (BOOL)animate;
78 @end
79
80
81 /*****************************************************************************
82  * VLCControllerWindow
83  *****************************************************************************/
84
85
86 @interface VLCControllerWindow : NSWindow
87 {
88 }
89
90 @end
91
92 /*****************************************************************************
93  * VLCControllerView
94  *****************************************************************************/
95
96 @interface VLCControllerView : NSView
97 {
98 }
99
100 @end
101
102 /*****************************************************************************
103  * VLBrushedMetalImageView
104  *****************************************************************************/
105
106 @interface VLBrushedMetalImageView : NSImageView
107 {
108
109 }
110
111 @end
112
113
114 /*****************************************************************************
115  * MPSlider
116  *****************************************************************************/
117
118 @interface MPSlider : NSSlider
119 {
120 }
121
122 @end
123
124 /*****************************************************************************
125  * ITSlider
126  *****************************************************************************/
127
128 @interface ITSlider : NSSlider
129 {
130 }
131
132 @end
133
134 /*****************************************************************************
135  * ITSliderCell
136  *****************************************************************************/
137
138 @interface ITSliderCell : NSSliderCell
139 {
140     NSImage *_knobOff;
141     NSImage *_knobOn;
142     BOOL b_mouse_down;
143 }
144 - (void)controlTintChanged;
145
146 @end