]> git.sesse.net Git - vlc/blob - projects/macosx/vlc_app/Sources/VLCBrowsableVideoView.h
Rework of vout_OSDEpg.
[vlc] / projects / macosx / vlc_app / Sources / VLCBrowsableVideoView.h
1 /*****************************************************************************
2  * VLCBrowsableVideoView.h: VideoView subclasses that allow fullscreen
3  * browsing
4  *****************************************************************************
5  * Copyright (C) 2007 Pierre d'Herbemont
6  * Copyright (C) 2007 the VideoLAN team
7  * $Id$
8  *
9  * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24  *****************************************************************************/
25
26 #import <QuartzCore/QuartzCore.h>
27 #import <VLCKit/VLCKit.h>
28 #import "VLCAppAdditions.h"
29
30 @class VLCMainWindowController;
31 @class VLCMediaListLayer;
32
33 @interface VLCBrowsableVideoView : NSView {
34     BOOL            menuDisplayed;
35     NSArray *       itemsTree;
36     NSRange         displayedItems;
37     NSInteger       selectedIndex;
38     CALayer *       selectionLayer;
39     CALayer *       backLayer;
40     CALayer *       menuLayer;
41     NSIndexPath *   selectedPath;
42     NSString *      nodeKeyPath;
43     NSString *      contentKeyPath;
44     id              selectedObject;
45     BOOL            fullScreen;
46     
47     /* Actions on non-node items*/
48     id target;
49     SEL action;
50
51     /* FullScreenTransition */
52     VLCWindow * fullScreenWindow;
53     NSViewAnimation * fullScreenAnim1;
54     NSViewAnimation * fullScreenAnim2;
55     NSView * tempFullScreenView;
56     IBOutlet VLCMainWindowController * mainWindowController;
57     VLCVideoLayer * videoLayer;
58     VLCMediaListLayer * mediaListLayer;
59 }
60
61 /* Binds an nsarray to that property. But don't forget the set the access keys. */
62 @property (retain) NSArray * itemsTree;
63 @property (copy) NSString * nodeKeyPath;
64 @property (copy) NSString * contentKeyPath;
65
66 @property (readonly, retain) id selectedObject;
67
68 @property (readwrite) BOOL fullScreen;
69 @property (readonly) BOOL hasVideo;
70
71 @property (readonly) VLCVideoLayer * videoLayer;
72
73 /* Set up a specific action to do, on items that don't have node.
74  * action first argument is the browsableVideoView. You can get the selected object,
75  * with -selectedObject */
76 @property (retain) id target;
77 @property  SEL action;
78
79 - (void)toggleMenu;
80 - (void)displayMenu;
81 - (void)hideMenu;
82
83 - (IBAction)backToMediaListView:(id)sender;
84 @end