Comment out the correct #endif directive.
[mplayer/greg.git] / libvo / vo_macosx.h
blob422a91a4629e649d88122820fc5c56fc1846946a
1 /*
2 vo_macosx.h
4 by Nicolas Plourde <nicolasplourde@gmail.com>
6 Copyright (c) Nicolas Plourde - 2005
8 MPlayer Mac OSX video out module.
9 */
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;
21 - (void) stop;
22 - (void) render;
23 - (void) toggleFullscreen;
24 - (void) ontop;
25 @end
27 @interface MPlayerOpenGLView : NSOpenGLView
29 //Cocoa
30 NSWindow *window;
31 NSOpenGLContext *glContext;
32 NSEvent *event;
34 //CoreVideo
35 CVPixelBufferRef frameBuffers[2];
36 CVOpenGLTextureCacheRef textureCache;
37 CVOpenGLTextureRef texture;
38 NSRect textureFrame;
40 GLfloat lowerLeft[2];
41 GLfloat lowerRight[2];
42 GLfloat upperRight[2];
43 GLfloat upperLeft[2];
45 BOOL mouseHide;
46 float winSizeMult;
48 //menu command id
49 NSMenuItem *kQuitCmd;
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;
65 //window & rendering
66 - (void) preinit;
67 - (void) config;
68 - (void) prepareOpenGL;
69 - (void) render;
70 - (void) reshape;
71 - (void) setCurrentTexture;
72 - (void) drawRect: (NSRect *) bounds;
74 //vo control
75 - (void) fullscreen: (BOOL) animate;
76 - (void) ontop;
77 - (void) panscan;
78 - (void) rootwin;
80 //menu
81 - (void) initMenu;
82 - (void) menuAction:(id)sender;
84 //event
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;
96 @end