increase max glyph and lines limit
[mplayer/glamo.git] / libvo / vo_macosx.h
blob6320b4965113d977cdfcd89f286c938a78a6a102
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;
60 //timestamps for disabling screensaver and mouse hiding
61 int lastMouseHide;
62 int lastScreensaverUpdate;
65 - (BOOL) acceptsFirstResponder;
66 - (BOOL) becomeFirstResponder;
67 - (BOOL) resignFirstResponder;
69 //window & rendering
70 - (void) preinit;
71 - (void) config;
72 - (void) prepareOpenGL;
73 - (void) render;
74 - (void) reshape;
75 - (void) setCurrentTexture;
76 - (void) drawRect: (NSRect *) bounds;
78 //vo control
79 - (void) fullscreen: (BOOL) animate;
80 - (void) ontop;
81 - (void) panscan;
82 - (void) rootwin;
84 //menu
85 - (void) initMenu;
86 - (void) menuAction:(id)sender;
88 //event
89 - (void) keyDown: (NSEvent *) theEvent;
90 - (void) mouseMoved: (NSEvent *) theEvent;
91 - (void) mouseDown: (NSEvent *) theEvent;
92 - (void) mouseUp: (NSEvent *) theEvent;
93 - (void) rightMouseDown: (NSEvent *) theEvent;
94 - (void) rightMouseUp: (NSEvent *) theEvent;
95 - (void) otherMouseDown: (NSEvent *) theEvent;
96 - (void) otherMouseUp: (NSEvent *) theEvent;
97 - (void) scrollWheel: (NSEvent *) theEvent;
98 - (void) mouseEvent: (NSEvent *) theEvent;
99 - (void) check_events;
100 @end