Mercurial > mplayer.hg
diff libvo/vo_macosx.h @ 15289:e985d786c5f1
macosx core video module
author | nplourde |
---|---|
date | Fri, 29 Apr 2005 11:05:16 +0000 |
parents | |
children | 8e21844c8a4c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libvo/vo_macosx.h Fri Apr 29 11:05:16 2005 +0000 @@ -0,0 +1,58 @@ +/* + vo_macosx.h + + by Nicolas Plourde <nicolasplourde@gmail.com> + + Copyright (c) Nicolas Plourde - 2005 + + MPlayer Mac OSX video out module. +*/ + +#import <Cocoa/Cocoa.h> +#import <QuartzCore/QuartzCore.h> + +@interface CustomOpenGLView : NSOpenGLView +{ + //Cocoa + NSWindow *window; + NSOpenGLContext *glContext; + NSEvent *event; + + //CoreVideo + CVPixelBufferRef currentFrameBuffer; + CVOpenGLTextureCacheRef textureCache; + CVOpenGLTextureRef texture; + + GLfloat lowerLeft[2]; + GLfloat lowerRight[2]; + GLfloat upperRight[2]; + GLfloat upperLeft[2]; + + BOOL mouseHide; +} + +- (BOOL) acceptsFirstResponder; +- (BOOL) becomeFirstResponder; +- (BOOL) resignFirstResponder; + +//window & rendering +- (void) initOpenGLView; +- (void) prepareOpenGL; +- (void) render; +- (void) reshape; +- (void) setCurrentTexture; +- (void) drawRect: (NSRect *) bounds; +- (void) fullscreen: (BOOL) animate; +- (void) ontop; +- (void) panscan; + +//event +- (void) keyDown: (NSEvent *) theEvent; +- (void) mouseMoved: (NSEvent *) theEvent; +- (void) mouseDown: (NSEvent *) theEvent; +- (void) rightMouseDown: (NSEvent *) theEvent; +- (void) otherMouseDown: (NSEvent *) theEvent; +- (void) scrollWheel: (NSEvent *) theEvent; +- (void) mouseEvent: (NSEvent *) theEvent; +- (void) check_events; +@end \ No newline at end of file