X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2Fvout.h;h=90fa8aef3df1cfb610f7a29ce2fb6fd250cf4b08;hb=6ee1e193fd896ab9a4729fde14f009d9ce629815;hp=f48f0a5226eafea15c33271ff978891fc9ff29ee;hpb=e4ceccd32365e7199085f248fb09454d8e989054;p=vlc diff --git a/modules/gui/macosx/vout.h b/modules/gui/macosx/vout.h index f48f0a5226..90fa8aef3d 100644 --- a/modules/gui/macosx/vout.h +++ b/modules/gui/macosx/vout.h @@ -1,19 +1,20 @@ /***************************************************************************** * vout.h: MacOS X interface module ***************************************************************************** - * Copyright (C) 2001-2003 VideoLAN + * Copyright (C) 2001-2006 the VideoLAN team * $Id$ * * Authors: Colin Delacroix * Florian G. Pflug * Jon Lech Johansen * Eric Petit + * Benjamin Pracht * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -21,87 +22,127 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ /***************************************************************************** - * VLCWindow interface + * VLCEmbeddedList interface *****************************************************************************/ -@interface VLCWindow : NSWindow +@interface VLCEmbeddedList : NSObject { - vout_thread_t * p_vout; + NSMutableArray * o_embedded_array; } -- (void)setVout:(vout_thread_t *)_p_vout; -- (vout_thread_t *)getVout; +- (id)getEmbeddedVout; +- (void)releaseEmbeddedVout: (id)o_vout_view; +- (void)addEmbeddedVout: (id)o_vout_view; +- (BOOL)windowContainsEmbedded: (id)o_window; +- (id)getViewForWindow: (id)o_window; + +@end + +/***************************************************************************** + * VLCVoutView interface + *****************************************************************************/ +@protocol VLCVoutViewResetting ++ (void)resetVout: (vout_thread_t *)p_vout; +@end -- (void)scaleWindowWithFactor: (float)factor; +@interface VLCVoutView : NSView +{ + vout_thread_t * p_vout; + NSRect * s_frame; + + NSView * o_view; + + vout_thread_t * p_real_vout; + id o_window; +} +- (BOOL)setVout: (vout_thread_t *) p_arg_vout subView: (NSView *) view + frame: (NSRect *) s_arg_frame; +- (void)closeVout; +- (void)updateTitle; +- (void)manage; +- (void)scaleWindowWithFactor: (float)factor animate: (BOOL)animate; +- (void)setOnTop:(BOOL)b_on_top; - (void)toggleFloatOnTop; - (void)toggleFullscreen; - (BOOL)isFullscreen; -- (void)updateTitle; +- (void)snapshot; +- (id)getWindow; -- (BOOL)windowShouldClose:(id)sender; ++ (id)getVoutView: (vout_thread_t *)p_vout subView: (NSView *) view + frame: (NSRect *) s_frame; ++ (vout_thread_t *)getRealVout: (vout_thread_t *)p_vout; +- (void)enterFullscreen; +- (void)leaveFullscreen; @end /***************************************************************************** - * VLCView interface + * VLCVoutDetachedView interface *****************************************************************************/ -@interface VLCQTView : NSQuickDrawView + +@interface VLCDetachedVoutView : VLCVoutView { + mtime_t i_time_mouse_last_moved; } +- (void)hideMouse: (BOOL)b_hide; + @end /***************************************************************************** - * VLCView interface + * VLCEmbeddedView interface *****************************************************************************/ -@interface VLCGLView : NSOpenGLView + +@interface VLCEmbeddedVoutView : VLCVoutView { - vout_thread_t * p_vout; - int i_effect; - unsigned long pi_textures[2]; - float f_x; - float f_y; - int initDone; + BOOL b_used; } -- (id) initWithFrame: (NSRect) frame vout: (vout_thread_t*) p_vout; -- (void) initTextures; -- (void) reloadTexture: (int) index; -- (void) cleanUp; +- (BOOL)setVout: (vout_thread_t *) p_arg_vout subView: (NSView *) view + frame: (NSRect *)s_arg_frame showWindow: (BOOL)b_show_window; + +- (void)setUsed: (BOOL)b_new_used; +- (BOOL)isUsed; @end /***************************************************************************** - * vout_sys_t: MacOS X video output method descriptor + * VLCDetachedEmbeddedView interface *****************************************************************************/ -struct vout_sys_t + +@interface VLCDetachedEmbeddedVoutView : VLCEmbeddedVoutView { - NSAutoreleasePool *o_pool; - NSRect s_rect; - VLCWindow * o_window; - - int i_opengl; - int b_pos_saved; - - vlc_bool_t b_mouse_moved; - mtime_t i_time_mouse_last_moved; + id o_embeddedwindow; +} + +@end + +/***************************************************************************** + * VLCVoutWindow interface + *****************************************************************************/ +@interface VLCVoutWindow : NSWindow +{ + vout_thread_t * p_vout; + VLCVoutView * o_view; + NSRect * s_frame; + + vout_thread_t * p_real_vout; + vlc_bool_t b_init_ok; + vlc_bool_t b_black; + vlc_bool_t b_embedded; +} -#ifdef __QUICKTIME__ - CodecType i_codec; - CGrafPtr p_qdport; - ImageSequence i_seq; - MatrixRecordPtr p_matrix; - DecompressorComponent img_dc; - ImageDescriptionHandle h_img_descr; - Ptr p_fullscreen_state; -#endif - - /* OpenGL */ - VLCGLView * o_glview; - uint8_t * p_data[2]; - uint8_t * p_data_orig[2]; - int i_cur_pic; -}; +- (id) initWithVout: (vout_thread_t *) p_vout view: (VLCVoutView *) view + frame: (NSRect *) s_frame; +- (id)initReal: (id) sender; +- (void)close; +- (void)closeWindow; +- (id)closeReal: (id) sender; +- (id)getVoutView; + +- (BOOL)windowShouldClose:(id)sender; + +@end