diff options
Diffstat (limited to 'src/video_out/macosx/video_window.h')
-rw-r--r-- | src/video_out/macosx/video_window.h | 105 |
1 files changed, 8 insertions, 97 deletions
diff --git a/src/video_out/macosx/video_window.h b/src/video_out/macosx/video_window.h index b1874672a..07405b8fe 100644 --- a/src/video_out/macosx/video_window.h +++ b/src/video_out/macosx/video_window.h @@ -17,106 +17,17 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * + * Written by Daniel Mack <xine@zonque.org> + * + * Most parts of this code were taken from VLC, http://www.videolan.org + * Thanks for the good research! */ + #ifndef HAVE_VIDEO_WINDOW_H #define HAVE_VIDEO_WINDOW_H -#import <Cocoa/Cocoa.h> - -@protocol XineOpenGLViewDelegate; - -typedef enum { - XINE_FULLSCREEN_OVERSCAN, - XINE_FULLSCREEN_CROP -} XineVideoWindowFullScreenMode; - -@interface XineOpenGLView : NSOpenGLView { - IBOutlet id <NSObject, XineOpenGLViewDelegate> delegate; - int video_width, video_height; - char *texture_buffer; - unsigned long i_texture; - BOOL initDone; - BOOL isFullScreen; - XineVideoWindowFullScreenMode fullscreen_mode; - NSOpenGLContext *fullScreenContext; - NSOpenGLContext *currentContext; - NSLock *mutex; - BOOL keepsVideoAspectRatio; - BOOL resizeViewOnVideoSizeChange; - NSCursor *currentCursor; - id <NSObject, XineOpenGLViewDelegate> _xineController; -} - -- (void) displayTexture; -- (void) drawQuad; -- (void) drawRect: (NSRect) rect; -- (void) goFullScreen: (XineVideoWindowFullScreenMode) mode; -- (void) exitFullScreen; -- (BOOL) isFullScreen; -- (void) reshape; -- (void) initTextures; -- (void) reloadTexture; -- (char *) getTextureBuffer; -- (void) setVideoSize:(NSSize)size; -- (void) setViewSizeInMainThread:(NSSize)size; -/* TODO: replace set...Size below with setSize:(double)videoSizeMultiplier */ -- (void) setNormalSize; -- (void) setHalfSize; -- (void) setDoubleSize; -- (NSSize) videoSize; -- (void) setKeepsVideoAspectRatio:(BOOL)flag; -- (BOOL) keepsVideoAspectRatio; -- (void) setResizeViewOnVideoSizeChange:(BOOL)flag; -- (BOOL) resizeViewOnVideoSizeChange; -- (void) setCurrentCursor:(NSCursor *)cursor; -- (NSCursor *) currentCursor; -- (void) resetCursorRectsInMainThread; -- (void) setXineController:(id)controller; -- (id) xineController; - -/* Delegate methods */ -- (id) delegate; -- (void) setDelegate:(id)aDelegate; - -@end - - -@interface XineVideoWindow : NSWindow { - int width, height; - XineOpenGLView * xineView; -} - -- (id) initWithContentSize:(NSSize)size; -- (XineOpenGLView *) xineView; -@end - - -/* XineOpenGLView delegate methods */ - -@interface NSObject (XineOpenGLViewDelegate) - -- (NSSize)xineViewWillResize:(NSSize)previousSize - toSize:(NSSize)proposedFrameSize; -- (void)xineViewDidResize:(NSNotification *)aNotification; - -@end - - -/* XineOpenGLView notifications */ - -extern NSString *XineViewDidResizeNotification; - - -/* NSWindow aspect ratio convenience methods */ - -@interface NSWindow (AspectRatioAdditions) - -- (void) setKeepsAspectRatio:(BOOL)flag; -- (BOOL) keepsAspectRatio; - -@end - - -#endif /* HAVE_VIDEO_WINDOW_H */ +#include "XineOpenGLView.h" +#include "XineVideoWindow.h" +#endif |