4 by Nicolas Plourde <nicolasplourde@gmail.com>
6 Copyright (c) Nicolas Plourde - 2005
8 MPlayer Mac OSX video out module.
11 #import <Cocoa/Cocoa.h>
12 #import <QuartzCore/QuartzCore.h>
13 #import <QuickTime/QuickTime.h>
15 // MPlayer OS X VO Protocol
16 @protocol MPlayerOSXVOProto
17 - (int) startWithWidth
: (bycopy
int)width
18 withHeight
: (bycopy
int)height
19 withBytes
: (bycopy
int)bytes
20 withAspect
: (bycopy
int)aspect
;
23 - (void) toggleFullscreen
;
27 @interface MPlayerOpenGLView
: NSOpenGLView
31 NSOpenGLContext
*glContext
;
35 CVPixelBufferRef frameBuffers
[2];
36 CVOpenGLTextureCacheRef textureCache
;
37 CVOpenGLTextureRef texture
;
41 GLfloat lowerRight
[2];
42 GLfloat upperRight
[2];
50 NSMenuItem
*kHalfScreenCmd
;
51 NSMenuItem
*kNormalScreenCmd
;
52 NSMenuItem
*kDoubleScreenCmd
;
53 NSMenuItem
*kFullScreenCmd
;
54 NSMenuItem
*kKeepAspectCmd
;
55 NSMenuItem
*kAspectOrgCmd
;
56 NSMenuItem
*kAspectFullCmd
;
57 NSMenuItem
*kAspectWideCmd
;
58 NSMenuItem
*kPanScanCmd
;
61 - (BOOL
) acceptsFirstResponder
;
62 - (BOOL
) becomeFirstResponder
;
63 - (BOOL
) resignFirstResponder
;
68 - (void) prepareOpenGL
;
71 - (void) setCurrentTexture
;
72 - (void) drawRect
: (NSRect
*) bounds
;
75 - (void) fullscreen
: (BOOL
) animate
;
82 - (void) menuAction
:(id
)sender
;
85 - (void) keyDown
: (NSEvent
*) theEvent
;
86 - (void) mouseMoved
: (NSEvent
*) theEvent
;
87 - (void) mouseDown
: (NSEvent
*) theEvent
;
88 - (void) mouseUp
: (NSEvent
*) theEvent
;
89 - (void) rightMouseDown
: (NSEvent
*) theEvent
;
90 - (void) rightMouseUp
: (NSEvent
*) theEvent
;
91 - (void) otherMouseDown
: (NSEvent
*) theEvent
;
92 - (void) otherMouseUp
: (NSEvent
*) theEvent
;
93 - (void) scrollWheel
: (NSEvent
*) theEvent
;
94 - (void) mouseEvent
: (NSEvent
*) theEvent
;
95 - (void) check_events
;