15289
|
1 /*
|
|
2 vo_macosx.h
|
|
3
|
|
4 by Nicolas Plourde <nicolasplourde@gmail.com>
|
|
5
|
|
6 Copyright (c) Nicolas Plourde - 2005
|
|
7
|
|
8 MPlayer Mac OSX video out module.
|
|
9 */
|
|
10
|
|
11 #import <Cocoa/Cocoa.h>
|
|
12 #import <QuartzCore/QuartzCore.h>
|
15327
|
13 #import <QuickTime/QuickTime.h>
|
15289
|
14
|
|
15 @interface CustomOpenGLView : NSOpenGLView
|
|
16 {
|
|
17 //Cocoa
|
|
18 NSWindow *window;
|
|
19 NSOpenGLContext *glContext;
|
|
20 NSEvent *event;
|
|
21
|
|
22 //CoreVideo
|
|
23 CVPixelBufferRef currentFrameBuffer;
|
|
24 CVOpenGLTextureCacheRef textureCache;
|
|
25 CVOpenGLTextureRef texture;
|
|
26
|
|
27 GLfloat lowerLeft[2];
|
|
28 GLfloat lowerRight[2];
|
|
29 GLfloat upperRight[2];
|
|
30 GLfloat upperLeft[2];
|
|
31
|
|
32 BOOL mouseHide;
|
|
33 }
|
|
34
|
|
35 - (BOOL) acceptsFirstResponder;
|
|
36 - (BOOL) becomeFirstResponder;
|
|
37 - (BOOL) resignFirstResponder;
|
|
38
|
|
39 //window & rendering
|
|
40 - (void) initOpenGLView;
|
|
41 - (void) prepareOpenGL;
|
|
42 - (void) render;
|
|
43 - (void) reshape;
|
|
44 - (void) setCurrentTexture;
|
|
45 - (void) drawRect: (NSRect *) bounds;
|
|
46 - (void) fullscreen: (BOOL) animate;
|
|
47 - (void) ontop;
|
|
48 - (void) panscan;
|
15327
|
49 - (void) rootwin;
|
15289
|
50
|
|
51 //event
|
|
52 - (void) keyDown: (NSEvent *) theEvent;
|
|
53 - (void) mouseMoved: (NSEvent *) theEvent;
|
|
54 - (void) mouseDown: (NSEvent *) theEvent;
|
|
55 - (void) rightMouseDown: (NSEvent *) theEvent;
|
|
56 - (void) otherMouseDown: (NSEvent *) theEvent;
|
|
57 - (void) scrollWheel: (NSEvent *) theEvent;
|
|
58 - (void) mouseEvent: (NSEvent *) theEvent;
|
|
59 - (void) check_events;
|
|
60 @end |