1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-15 19:35:49 +00:00
mpv/libvo/vo_macosx.h
nplourde 2b56be8a44 create menu
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15571 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-05-25 23:38:59 +00:00

74 lines
1.6 KiB
Objective-C

/*
vo_macosx.h
by Nicolas Plourde <nicolasplourde@gmail.com>
Copyright (c) Nicolas Plourde - 2005
MPlayer Mac OSX video out module.
*/
#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>
#import <QuickTime/QuickTime.h>
@interface CustomOpenGLView : NSOpenGLView
{
//Cocoa
NSWindow *window;
NSOpenGLContext *glContext;
NSEvent *event;
//CoreVideo
CVPixelBufferRef currentFrameBuffer;
CVOpenGLTextureCacheRef textureCache;
CVOpenGLTextureRef texture;
GLfloat lowerLeft[2];
GLfloat lowerRight[2];
GLfloat upperRight[2];
GLfloat upperLeft[2];
BOOL mouseHide;
//menu command id
NSMenuItem *kQuitCmd;
NSMenuItem *kHalfScreenCmd;
NSMenuItem *kNormalScreenCmd;
NSMenuItem *kDoubleScreenCmd;
NSMenuItem *kFullScreenCmd;
NSMenuItem *kKeepAspectCmd;
NSMenuItem *kAspectOrgCmd;
NSMenuItem *kAspectFullCmd;
NSMenuItem *kAspectWideCmd;
NSMenuItem *kPanScanCmd;
}
- (BOOL) acceptsFirstResponder;
- (BOOL) becomeFirstResponder;
- (BOOL) resignFirstResponder;
//window & rendering
- (void) initOpenGLView;
- (void) initMenu;
- (void) menuAction:(id)sender;
- (void) prepareOpenGL;
- (void) render;
- (void) reshape;
- (void) setCurrentTexture;
- (void) drawRect: (NSRect *) bounds;
- (void) fullscreen: (BOOL) animate;
- (void) ontop;
- (void) panscan;
- (void) rootwin;
//event
- (void) keyDown: (NSEvent *) theEvent;
- (void) mouseMoved: (NSEvent *) theEvent;
- (void) mouseDown: (NSEvent *) theEvent;
- (void) rightMouseDown: (NSEvent *) theEvent;
- (void) otherMouseDown: (NSEvent *) theEvent;
- (void) scrollWheel: (NSEvent *) theEvent;
- (void) mouseEvent: (NSEvent *) theEvent;
- (void) check_events;
@end