MacOS: fixes memory management issue. closes #3807
[vlc/solaris.git] / modules / gui / macosx / misc.h
bloba27f87cc529a7763bfbc3ef0eea13067d4466c31
1 /*****************************************************************************
2 * misc.h: code not specific to vlc
3 *****************************************************************************
4 * Copyright (C) 2003-2007 the VideoLAN team
5 * $Id$
7 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
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.
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.
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 *****************************************************************************/
24 #import <Cocoa/Cocoa.h>
25 #import <ApplicationServices/ApplicationServices.h>
27 /*****************************************************************************
28 * NSImage (VLCAddition)
29 *****************************************************************************/
31 @interface NSImage (VLCAdditions)
32 + (id)imageWithWarningIcon;
33 + (id)imageWithErrorIcon;
34 @end
36 /*****************************************************************************
37 * NSAnimation (VLCAddition)
38 *****************************************************************************/
40 @interface NSAnimation (VLCAdditions)
41 - (void)setUserInfo: (void *)userInfo;
42 - (void *)userInfo;
43 @end
45 /*****************************************************************************
46 * NSScreen (VLCAdditions)
48 * Missing extension to NSScreen
49 *****************************************************************************/
51 @interface NSScreen (VLCAdditions)
53 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
54 - (BOOL)isMainScreen;
55 - (BOOL)isScreen: (NSScreen*)screen;
56 - (CGDirectDisplayID)displayID;
57 - (void)blackoutOtherScreens;
58 + (void)unblackoutScreens;
59 @end
61 /*****************************************************************************
62 * VLCWindow
64 * Missing extension to NSWindow
65 *****************************************************************************/
67 @interface VLCWindow : NSWindow
69 BOOL b_canBecomeKeyWindow;
70 BOOL b_isset_canBecomeKeyWindow;
71 NSViewAnimation *animation;
74 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
76 /* animate mode is only supported in >=10.4 */
77 - (void)orderFront: (id)sender animate: (BOOL)animate;
79 /* animate mode is only supported in >=10.4 */
80 - (void)orderOut: (id)sender animate: (BOOL)animate;
82 /* animate mode is only supported in >=10.4 */
83 - (void)orderOut: (id)sender animate: (BOOL)animate callback:(NSInvocation *)callback;
85 /* animate mode is only supported in >=10.4 */
86 - (void)closeAndAnimate: (BOOL)animate;
87 @end
90 /*****************************************************************************
91 * VLCControllerWindow
92 *****************************************************************************/
95 @interface VLCControllerWindow : NSWindow
99 @end
101 /*****************************************************************************
102 * VLCControllerView
103 *****************************************************************************/
105 @interface VLCControllerView : NSView
109 @end
111 /*****************************************************************************
112 * VLBrushedMetalImageView
113 *****************************************************************************/
115 @interface VLBrushedMetalImageView : NSImageView
120 @end
123 /*****************************************************************************
124 * MPSlider
125 *****************************************************************************/
127 @interface MPSlider : NSSlider
131 @end
133 /*****************************************************************************
134 * ITSlider
135 *****************************************************************************/
137 @interface ITSlider : NSSlider
141 @end
143 /*****************************************************************************
144 * ITSliderCell
145 *****************************************************************************/
147 @interface ITSliderCell : NSSliderCell
149 NSImage *_knobOff;
150 NSImage *_knobOn;
151 BOOL b_mouse_down;
153 - (void)controlTintChanged;
155 @end