]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/vout.h
* Apply changed made to the 0.8.5 branch to trunk.
[vlc] / modules / gui / macosx / vout.h
index 2e072b6a47da875f28b84ba10320ab9448d3203a..373da7fba35025840f82f88340ff5964ad37e937 100644 (file)
@@ -1,12 +1,14 @@
 /*****************************************************************************
- * 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-2005 the VideoLAN team
+ * $Id$
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
+ *          Eric Petit <titer@m0k.org>
+ *          Benjamin Pracht <bigben at videolan dot org>
  *
  * 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
  *****************************************************************************/
 
 /*****************************************************************************
- * 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)getEmbeddedVout;
+- (void)releaseEmbeddedVout: (id)o_vout_view;
+- (void)addEmbeddedVout: (id)o_vout_view;
+- (BOOL)windowContainsEmbedded: (id)o_window;
+- (id)getViewForWindow: (id)o_window;
 
 @end
 
 /*****************************************************************************
- * VLCView interface
+ * VLCVoutView interface
  *****************************************************************************/
-@interface VLCView : NSQuickDrawView
+@interface VLCVoutView : NSView
 {
     vout_thread_t * p_vout;
+    NSView        * o_view;
+    NSRect        * s_frame;
+
+    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)manage;
+- (void)scaleWindowWithFactor: (float)factor;
+- (void)setOnTop:(BOOL)b_on_top;
+- (void)toggleFloatOnTop;
+- (void)toggleFullscreen;
+- (BOOL)isFullscreen;
+- (void)snapshot;
+- (id)getWindow;
 
-- (void)setVout:(vout_thread_t *)_p_vout;
++ (id)getVoutView: (vout_thread_t *)p_vout subView: (NSView *) view
+                            frame: (NSRect *) s_frame;
++ (vout_thread_t *)getRealVout: (vout_thread_t *)p_vout;
 
 @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;
+}
+
+- (void)setUsed: (BOOL)b_new_used;
+- (BOOL)isUsed;
 
-    NSConditionLock * o_lock;
+@end
 
+/*****************************************************************************
+ * VLCWindow interface
+ *****************************************************************************/
+@interface VLCWindow : NSWindow
+{
     vout_thread_t * p_vout;
-} vout_req_t;
+    VLCVoutView   * o_view;
+    NSRect        * s_frame;
+
+    vout_thread_t * p_real_vout;
+    Ptr             p_fullscreen_state;
+    vlc_bool_t      b_init_ok;
+}
+
+- (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;
+- (void)updateTitle;
+
+- (BOOL)windowShouldClose:(id)sender;
+
+@end