]> git.sesse.net Git - vlc/blob - modules/gui/macosx/vout.h
All: attempt for an OpenGL video output for OS X. Enable --macosx-opengl
[vlc] / modules / gui / macosx / vout.h
1 /*****************************************************************************
2  * vout.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2001-2003 VideoLAN
5  * $Id: vout.h,v 1.18 2004/01/26 18:30:37 titer Exp $
6  *
7  * Authors: Colin Delacroix <colin@zoy.org>
8  *          Florian G. Pflug <fgp@phlo.org>
9  *          Jon Lech Johansen <jon-vl@nanocrew.net>
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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
24  *****************************************************************************/
25
26 /*****************************************************************************
27  * VLCWindow interface
28  *****************************************************************************/
29 @interface VLCWindow : NSWindow
30 {
31     vout_thread_t * p_vout;
32 }
33
34 - (void)setVout:(vout_thread_t *)_p_vout;
35 - (vout_thread_t *)getVout;
36
37 - (void)scaleWindowWithFactor: (float)factor;
38 - (void)toggleFloatOnTop;
39 - (void)toggleFullscreen;
40 - (BOOL)isFullscreen;
41 - (void)updateTitle;
42
43 - (BOOL)windowShouldClose:(id)sender;
44
45 @end
46
47 /*****************************************************************************
48  * VLCView interface
49  *****************************************************************************/
50 @interface VLCQTView : NSQuickDrawView
51 {
52 }
53
54 @end
55
56 /*****************************************************************************
57  * VLCView interface
58  *****************************************************************************/
59 @interface VLCGLView : NSOpenGLView
60 {
61     @public
62     int           i_init_done;
63     int           i_textures_loaded;
64     int           i_index;
65     unsigned long pi_textures[3];
66 }
67
68 @end
69
70 /*****************************************************************************
71  * VLCVout interface
72  *****************************************************************************/
73 @interface VLCVout : NSObject
74 {
75 }
76
77 - (void)createWindow:(NSValue *)o_value;
78 - (void)destroyWindow:(NSValue *)o_value;
79
80 @end
81
82 /*****************************************************************************
83  * vout_sys_t: MacOS X video output method descriptor
84  *****************************************************************************/
85 struct vout_sys_t
86 {
87     int i_opengl;
88     
89     NSRect s_rect;
90     int b_pos_saved;
91     VLCWindow * o_window;
92     VLCGLView * o_glview;
93
94     vlc_bool_t b_mouse_moved;
95     mtime_t i_time_mouse_last_moved;
96
97 #ifdef __QUICKTIME__
98     CodecType i_codec;
99     CGrafPtr p_qdport;
100     ImageSequence i_seq;
101     MatrixRecordPtr p_matrix;
102     DecompressorComponent img_dc;
103     ImageDescriptionHandle h_img_descr;
104     Ptr p_fullscreen_state;
105 #endif
106 };