X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2Fvout.h;h=6b57f7a523e0f5303fae5698c55162bc7f1551c6;hb=2e14304591c94e3911f4983b1d4eb4a995bdd5f9;hp=2e072b6a47da875f28b84ba10320ab9448d3203a;hpb=19ea8feb6db01c1deafb19f35ecee8eff81aeb02;p=vlc diff --git a/modules/gui/macosx/vout.h b/modules/gui/macosx/vout.h index 2e072b6a47..6b57f7a523 100644 --- a/modules/gui/macosx/vout.h +++ b/modules/gui/macosx/vout.h @@ -1,18 +1,20 @@ /***************************************************************************** - * vout.h: MacOS X interface plugin + * vout.h: MacOS X interface module ***************************************************************************** - * Copyright (C) 2001, 2002 VideoLAN - * $Id: vout.h,v 1.1 2002/08/04 17:23:43 sam Exp $ + * Copyright (C) 2001-2007 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 @@ -20,73 +22,110 @@ * * 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. *****************************************************************************/ +#import "misc.h" /***************************************************************************** - * 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; - -- (void)toggleFullscreen; -- (BOOL)isFullscreen; +- (id)embeddedVout; +- (void)releaseEmbeddedVout: (id)o_vout_view; +- (void)addEmbeddedVout: (id)o_vout_view; +- (BOOL)windowContainsEmbedded: (id)o_window; +- (id)viewForWindow: (id)o_window; @end /***************************************************************************** - * VLCView interface + * VLCVoutView interface *****************************************************************************/ -@interface VLCView : NSQuickDrawView +@protocol VLCVoutViewResetting ++ (void)resetVout: (vout_thread_t *)p_vout; +@end + +@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)snapshot; +- (id)voutWindow; -- (void)setVout:(vout_thread_t *)_p_vout; ++ (id)voutView: (vout_thread_t *)p_vout subView: (NSView *) view + frame: (NSRect *) s_frame; ++ (vout_thread_t *)realVout: (vout_thread_t *)p_vout; +- (void)enterFullscreen; +- (void)leaveFullscreen; @end /***************************************************************************** - * vout_sys_t: MacOS X video output method descriptor + * VLCVoutDetachedView interface *****************************************************************************/ -struct vout_sys_t -{ - intf_thread_t * p_intf; - VLCWindow * o_window; - - NSRect s_rect; - int b_pos_saved; - vlc_bool_t b_mouse_moved; - vlc_bool_t b_mouse_pointer_visible; +@interface VLCDetachedVoutView : VLCVoutView +{ mtime_t i_time_mouse_last_moved; +} + +- (void)hideMouse: (BOOL)b_hide; -#ifdef __QUICKTIME__ - CodecType i_codec; - CGrafPtr p_qdport; - ImageSequence i_seq; - MatrixRecordPtr p_matrix; - DecompressorComponent img_dc; - ImageDescriptionHandle h_img_descr; -#endif -}; +@end /***************************************************************************** - * vout_req_t: MacOS X video output request + * VLCEmbeddedView interface *****************************************************************************/ -#define VOUT_REQ_CREATE_WINDOW 0x00000001 -#define VOUT_REQ_DESTROY_WINDOW 0x00000002 -typedef struct vout_req_t +@interface VLCEmbeddedVoutView : VLCVoutView { - int i_type; - int i_result; + BOOL b_used; + id o_embeddedwindow; +} - NSConditionLock * o_lock; +- (void)setUsed: (BOOL)b_new_used; +- (BOOL)isUsed; +@end + +/***************************************************************************** + * VLCVoutWindow interface + *****************************************************************************/ +@interface VLCVoutWindow : VLCWindow +{ vout_thread_t * p_vout; -} vout_req_t; + VLCVoutView * o_view; + NSRect * s_frame; + + bool b_init_ok; + BOOL fullscreen; + NSRect initialFrame; +} + +- (id) initWithVout: (vout_thread_t *) p_vout view: (VLCVoutView *) view + frame: (NSRect *) s_frame; +- (id)initMainThread: (id) sender; +- (void)leaveFullscreen; +- (void)enterFullscreen; +- (id)voutView; +@end