]> git.sesse.net Git - vlc/blob - modules/gui/macosx/MainWindowTitle.h
macosx: also cache old native fullscreen images and move to better place
[vlc] / modules / gui / macosx / MainWindowTitle.h
1 /*****************************************************************************
2  * MainWindowTitle.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2011-2012 Felix Paul Kühne
5  * $Id$
6  *
7  * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
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 "misc.h"
26
27 /*****************************************************************************
28  * VLCMainWindowTitleView
29  *****************************************************************************/
30
31 @interface VLCMainWindowTitleView : VLCThreePartImageView
32 {
33     NSImage * o_red_img;
34     NSImage * o_red_over_img;
35     NSImage * o_red_on_img;
36     NSImage * o_yellow_img;
37     NSImage * o_yellow_over_img;
38     NSImage * o_yellow_on_img;
39     NSImage * o_green_img;
40     NSImage * o_green_over_img;
41     NSImage * o_green_on_img;
42     // yosemite fullscreen images
43     NSImage * o_fullscreen_img;
44     NSImage * o_fullscreen_over_img;
45     NSImage * o_fullscreen_on_img;
46     // old native fullscreen images
47     NSImage * o_old_fullscreen_img;
48     NSImage * o_old_fullscreen_over_img;
49     NSImage * o_old_fullscreen_on_img;
50
51     NSShadow * o_window_title_shadow;
52     NSDictionary * o_window_title_attributes_dict;
53
54     IBOutlet id o_red_btn;
55     IBOutlet id o_yellow_btn;
56     IBOutlet id o_green_btn;
57     IBOutlet id o_fullscreen_btn;
58     IBOutlet id o_title_lbl;
59
60     BOOL b_nativeFullscreenMode;
61
62     // state to determine correct image for green bubble
63     BOOL b_alt_pressed;
64     BOOL b_mouse_over;
65 }
66 @property (readonly) NSButton * closeButton;
67 @property (readonly) NSButton * minimizeButton;
68 @property (readonly) NSButton * zoomButton;
69
70 - (void)informModifierPressed:(BOOL)b_is_altkey;
71 - (void)loadButtonIcons;
72 - (IBAction)buttonAction:(id)sender;
73 - (void)setWindowTitle:(NSString *)title;
74 - (void)setWindowButtonOver:(BOOL)b_value;
75 - (void)setWindowFullscreenButtonOver:(BOOL)b_value;
76
77 @end
78
79 @interface VLCWindowButtonCell : NSButtonCell
80
81 @end
82
83 @interface VLCResizeControl : NSImageView
84
85 @end
86
87 @interface VLCColorView : NSView
88
89 @end
90
91 @interface VLCCustomWindowButtonPrototype: NSButton
92 - (NSArray*)extendedAccessibilityAttributeNames: (NSArray*)theAttributeNames;
93 - (id)extendedAccessibilityAttributeValue: (NSString*)theAttributeName;
94 - (NSNumber*)extendedAccessibilityIsAttributeSettable: (NSString*)theAttributeName;
95
96 @end
97
98 @interface VLCCustomWindowCloseButton: VLCCustomWindowButtonPrototype
99
100 @end
101
102
103 @interface VLCCustomWindowMinimizeButton: VLCCustomWindowButtonPrototype
104
105 @end
106
107
108 @interface VLCCustomWindowZoomButton: VLCCustomWindowButtonPrototype
109
110 @end
111
112 @interface VLCCustomWindowFullscreenButton : VLCCustomWindowButtonPrototype
113
114 @end
115
116 @interface VLCWindowTitleTextField : NSTextField
117 {
118     NSMenu * contextMenu;
119 }
120
121 @end