annotate libvo/vo_macosx.h @ 21280:db66f5bdb5cd

Remove unnecessary variable indirection.
author diego
date Sun, 26 Nov 2006 22:53:57 +0000
parents 1ca8b5873c3f
children 8595d6dbd0ed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
1 /*
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
2 vo_macosx.h
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
3
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
4 by Nicolas Plourde <nicolasplourde@gmail.com>
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
5
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
6 Copyright (c) Nicolas Plourde - 2005
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
7
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
8 MPlayer Mac OSX video out module.
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
9 */
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
10
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
11 #import <Cocoa/Cocoa.h>
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
12 #import <QuartzCore/QuartzCore.h>
15327
8e21844c8a4c enable rootwin
nplourde
parents: 15289
diff changeset
13 #import <QuickTime/QuickTime.h>
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
14
15611
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
15 @interface MPlayerOpenGLView : NSOpenGLView
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
16 {
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
17 //Cocoa
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
18 NSWindow *window;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
19 NSOpenGLContext *glContext;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
20 NSEvent *event;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
21
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
22 //CoreVideo
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
23 CVPixelBufferRef currentFrameBuffer;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
24 CVOpenGLTextureCacheRef textureCache;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
25 CVOpenGLTextureRef texture;
15729
55aaeb7b6aae new texture frame
nplourde
parents: 15726
diff changeset
26 NSRect textureFrame;
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
27
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
28 GLfloat lowerLeft[2];
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
29 GLfloat lowerRight[2];
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
30 GLfloat upperRight[2];
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
31 GLfloat upperLeft[2];
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
32
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
33 BOOL mouseHide;
15855
1ca8b5873c3f keep window size when changing aspect
nplourde
parents: 15729
diff changeset
34 float winSizeMult;
15570
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
35
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
36 //menu command id
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
37 NSMenuItem *kQuitCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
38 NSMenuItem *kHalfScreenCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
39 NSMenuItem *kNormalScreenCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
40 NSMenuItem *kDoubleScreenCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
41 NSMenuItem *kFullScreenCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
42 NSMenuItem *kKeepAspectCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
43 NSMenuItem *kAspectOrgCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
44 NSMenuItem *kAspectFullCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
45 NSMenuItem *kAspectWideCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
46 NSMenuItem *kPanScanCmd;
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
47 }
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
48
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
49 - (BOOL) acceptsFirstResponder;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
50 - (BOOL) becomeFirstResponder;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
51 - (BOOL) resignFirstResponder;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
52
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
53 //window & rendering
15726
25ee208c6da9 do not realloc window while playing playlist
nplourde
parents: 15611
diff changeset
54 - (id) preinit;
25ee208c6da9 do not realloc window while playing playlist
nplourde
parents: 15611
diff changeset
55 - (id) config;
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
56 - (void) prepareOpenGL;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
57 - (void) render;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
58 - (void) reshape;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
59 - (void) setCurrentTexture;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
60 - (void) drawRect: (NSRect *) bounds;
15611
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
61
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
62 //vo control
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
63 - (void) fullscreen: (BOOL) animate;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
64 - (void) ontop;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
65 - (void) panscan;
15327
8e21844c8a4c enable rootwin
nplourde
parents: 15289
diff changeset
66 - (void) rootwin;
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
67
15611
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
68 //menu
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
69 - (void) initMenu;
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
70 - (void) menuAction:(id)sender;
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
71
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
72 //event
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
73 - (void) keyDown: (NSEvent *) theEvent;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
74 - (void) mouseMoved: (NSEvent *) theEvent;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
75 - (void) mouseDown: (NSEvent *) theEvent;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
76 - (void) rightMouseDown: (NSEvent *) theEvent;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
77 - (void) otherMouseDown: (NSEvent *) theEvent;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
78 - (void) scrollWheel: (NSEvent *) theEvent;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
79 - (void) mouseEvent: (NSEvent *) theEvent;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
80 - (void) check_events;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
81 @end