Mercurial > mplayer.hg
annotate libvo/vo_macosx.h @ 24490:2074d81d4142
Revert r24446 since it breaks mingw32 build: _WINGDI_H is defined in wingdi.h
author | zuxy |
---|---|
date | Sat, 15 Sep 2007 07:46:38 +0000 |
parents | 9ce03980ed0c |
children | cf3b6015735d |
rev | line source |
---|---|
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 |
15611 | 15 @interface MPlayerOpenGLView : NSOpenGLView |
15289 | 16 { |
17 //Cocoa | |
18 NSWindow *window; | |
19 NSOpenGLContext *glContext; | |
20 NSEvent *event; | |
21 | |
22 //CoreVideo | |
23 CVPixelBufferRef currentFrameBuffer; | |
24 CVOpenGLTextureCacheRef textureCache; | |
25 CVOpenGLTextureRef texture; | |
15729 | 26 NSRect textureFrame; |
15289 | 27 |
28 GLfloat lowerLeft[2]; | |
29 GLfloat lowerRight[2]; | |
30 GLfloat upperRight[2]; | |
31 GLfloat upperLeft[2]; | |
32 | |
33 BOOL mouseHide; | |
15855 | 34 float winSizeMult; |
15570 | 35 |
36 //menu command id | |
37 NSMenuItem *kQuitCmd; | |
38 NSMenuItem *kHalfScreenCmd; | |
39 NSMenuItem *kNormalScreenCmd; | |
40 NSMenuItem *kDoubleScreenCmd; | |
41 NSMenuItem *kFullScreenCmd; | |
42 NSMenuItem *kKeepAspectCmd; | |
43 NSMenuItem *kAspectOrgCmd; | |
44 NSMenuItem *kAspectFullCmd; | |
45 NSMenuItem *kAspectWideCmd; | |
46 NSMenuItem *kPanScanCmd; | |
15289 | 47 } |
48 | |
49 - (BOOL) acceptsFirstResponder; | |
50 - (BOOL) becomeFirstResponder; | |
51 - (BOOL) resignFirstResponder; | |
52 | |
53 //window & rendering | |
24076 | 54 - (void) preinit; |
55 - (void) config; | |
15289 | 56 - (void) prepareOpenGL; |
57 - (void) render; | |
58 - (void) reshape; | |
59 - (void) setCurrentTexture; | |
60 - (void) drawRect: (NSRect *) bounds; | |
15611 | 61 |
62 //vo control | |
15289 | 63 - (void) fullscreen: (BOOL) animate; |
64 - (void) ontop; | |
65 - (void) panscan; | |
15327 | 66 - (void) rootwin; |
15289 | 67 |
15611 | 68 //menu |
69 - (void) initMenu; | |
70 - (void) menuAction:(id)sender; | |
71 | |
15289 | 72 //event |
73 - (void) keyDown: (NSEvent *) theEvent; | |
74 - (void) mouseMoved: (NSEvent *) theEvent; | |
75 - (void) mouseDown: (NSEvent *) theEvent; | |
24077
9ce03980ed0c
added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents:
24076
diff
changeset
|
76 - (void) mouseUp: (NSEvent *) theEvent; |
15289 | 77 - (void) rightMouseDown: (NSEvent *) theEvent; |
24077
9ce03980ed0c
added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents:
24076
diff
changeset
|
78 - (void) rightMouseUp: (NSEvent *) theEvent; |
15289 | 79 - (void) otherMouseDown: (NSEvent *) theEvent; |
24077
9ce03980ed0c
added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents:
24076
diff
changeset
|
80 - (void) otherMouseUp: (NSEvent *) theEvent; |
15289 | 81 - (void) scrollWheel: (NSEvent *) theEvent; |
82 - (void) mouseEvent: (NSEvent *) theEvent; | |
83 - (void) check_events; | |
24075 | 84 @end |