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