1
/*****************************************************************************
2
* VLCOpenGLVoutView.h: MacOS X OpenGL provider
3
*****************************************************************************
4
* Copyright (C) 2001-2007 the VideoLAN team
7
* Authors: Colin Delacroix <colin@zoy.org>
8
* Florian G. Pflug <fgp@phlo.org>
9
* Jon Lech Johansen <jon-vl@nanocrew.net>
10
* Derk-Jan Hartman <hartman at videolan dot org>
11
* Eric Petit <titer@m0k.org>
12
* Benjamin Pracht <bigben at videolan dot org>
13
* Damien Fouilleul <damienf at videolan dot org>
15
* This program is free software; you can redistribute it and/or modify
16
* it under the terms of the GNU General Public License as published by
17
* the Free Software Foundation; either version 2 of the License, or
18
* (at your option) any later version.
20
* This program is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
* GNU General Public License for more details.
25
* You should have received a copy of the GNU General Public License
26
* along with this program; if not, write to the Free Software
27
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
28
*****************************************************************************/
30
#import <Cocoa/Cocoa.h>
32
#include <OpenGL/OpenGL.h>
33
#include <OpenGL/gl.h>
35
#include <vlc_common.h>
38
int cocoaglvoutviewInit( vout_thread_t * p_vout );
39
void cocoaglvoutviewEnd( vout_thread_t * p_vout );
40
int cocoaglvoutviewManage( vout_thread_t * p_vout );
41
int cocoaglvoutviewControl( vout_thread_t *p_vout, int i_query, va_list args );
42
void cocoaglvoutviewSwap( vout_thread_t * p_vout );
43
int cocoaglvoutviewLock( vout_thread_t * p_vout );
44
void cocoaglvoutviewUnlock( vout_thread_t * p_vout );
46
/* To commmunicate with the VLC.framework */
47
@protocol VLCOpenGLVoutEmbedding
48
- (void)addVoutSubview:(NSView *)view;
49
- (void)removeVoutSubview:(NSView *)view;
51
- (void)enterFullscreen;
52
- (void)leaveFullscreen;
54
- (BOOL)stretchesVideo;
56
- (void)setOnTop: (BOOL)ontop; /* Do we really want that in protocol? */
59
/* VLCOpenGLVoutView */
60
@interface VLCOpenGLVoutView : NSOpenGLView
62
id <VLCOpenGLVoutEmbedding> container;
63
vout_thread_t * p_vout;
66
/* Init a new gl view and register it to both the framework and the
67
* vout_thread_t. Must be called from main thread */
68
+ (void) autoinitOpenGLVoutViewIntVoutWithContainer: (NSData *) args;
70
- (id) initWithVout: (vout_thread_t *) vout container: (id <VLCOpenGLVoutEmbedding>) container;
72
- (void) detachFromVout;
73
- (id <VLCOpenGLVoutEmbedding>) container;
77
- (void) drawRect: (NSRect) rect;