Mercurial > mplayer.hg
annotate libvo/vo_macosx.h @ 26003:a506a6ab14e1
Add standard license header and make copyright notices consistent.
author | diego |
---|---|
date | Tue, 19 Feb 2008 23:27:23 +0000 |
parents | 48fe4b6e3bab |
children | 0a0f63090e60 |
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 |
25157
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
15 // MPlayer OS X VO Protocol |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
16 @protocol MPlayerOSXVOProto |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
17 - (int) startWithWidth: (bycopy int)width |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
18 withHeight: (bycopy int)height |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
19 withBytes: (bycopy int)bytes |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
20 withAspect: (bycopy int)aspect; |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
21 - (void) stop; |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
22 - (void) render; |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
23 - (void) toggleFullscreen; |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
24 - (void) ontop; |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
25 @end |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
26 |
15611 | 27 @interface MPlayerOpenGLView : NSOpenGLView |
15289 | 28 { |
29 //Cocoa | |
30 NSWindow *window; | |
31 NSOpenGLContext *glContext; | |
32 NSEvent *event; | |
33 | |
34 //CoreVideo | |
25180 | 35 CVPixelBufferRef frameBuffers[2]; |
15289 | 36 CVOpenGLTextureCacheRef textureCache; |
37 CVOpenGLTextureRef texture; | |
15729 | 38 NSRect textureFrame; |
15289 | 39 |
40 GLfloat lowerLeft[2]; | |
41 GLfloat lowerRight[2]; | |
42 GLfloat upperRight[2]; | |
43 GLfloat upperLeft[2]; | |
44 | |
45 BOOL mouseHide; | |
15855 | 46 float winSizeMult; |
15570 | 47 |
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; | |
15289 | 59 } |
60 | |
61 - (BOOL) acceptsFirstResponder; | |
62 - (BOOL) becomeFirstResponder; | |
63 - (BOOL) resignFirstResponder; | |
64 | |
65 //window & rendering | |
24076 | 66 - (void) preinit; |
67 - (void) config; | |
15289 | 68 - (void) prepareOpenGL; |
69 - (void) render; | |
70 - (void) reshape; | |
71 - (void) setCurrentTexture; | |
72 - (void) drawRect: (NSRect *) bounds; | |
15611 | 73 |
74 //vo control | |
15289 | 75 - (void) fullscreen: (BOOL) animate; |
76 - (void) ontop; | |
77 - (void) panscan; | |
15327 | 78 - (void) rootwin; |
15289 | 79 |
15611 | 80 //menu |
81 - (void) initMenu; | |
82 - (void) menuAction:(id)sender; | |
83 | |
15289 | 84 //event |
85 - (void) keyDown: (NSEvent *) theEvent; | |
86 - (void) mouseMoved: (NSEvent *) theEvent; | |
87 - (void) mouseDown: (NSEvent *) theEvent; | |
24077
9ce03980ed0c
added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents:
24076
diff
changeset
|
88 - (void) mouseUp: (NSEvent *) theEvent; |
15289 | 89 - (void) rightMouseDown: (NSEvent *) theEvent; |
24077
9ce03980ed0c
added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents:
24076
diff
changeset
|
90 - (void) rightMouseUp: (NSEvent *) theEvent; |
15289 | 91 - (void) otherMouseDown: (NSEvent *) theEvent; |
24077
9ce03980ed0c
added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents:
24076
diff
changeset
|
92 - (void) otherMouseUp: (NSEvent *) theEvent; |
15289 | 93 - (void) scrollWheel: (NSEvent *) theEvent; |
94 - (void) mouseEvent: (NSEvent *) theEvent; | |
95 - (void) check_events; | |
24075 | 96 @end |