diff options
author | nplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-06-16 00:26:47 +0000 |
---|---|---|
committer | nplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-06-16 00:26:47 +0000 |
commit | 1b0c8682c44596669928f5d90b498f07c5c47d4f (patch) | |
tree | ded29fb06931c5a2b96cf9df0d8dd79fa7617248 /libvo | |
parent | 8f7931ee18ca4a65ede1b5646c89bbc882212989 (diff) |
set window alpha
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15732 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_macosx.m | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m index 30447ca99b..d053dfc6c5 100644 --- a/libvo/vo_macosx.m +++ b/libvo/vo_macosx.m @@ -55,6 +55,7 @@ extern float movie_aspect; static float old_movie_aspect; extern float vo_panscan; +static float winAlpha = 1; static int int_pause = 0; static vo_info_t info = @@ -133,7 +134,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32 //config OpenGL View [mpGLView config]; - + return 0; } @@ -412,7 +413,11 @@ static uint32_t control(uint32_t request, void *data, ...) NSRect frame; aspect((int *)&d_width, (int *)&d_height,A_NOZOOM); - //if(sender == kQuitCmd) + + if(sender == kQuitCmd) + { + mplayer_put_key(KEY_ESC); + } if(sender == kHalfScreenCmd) { @@ -764,6 +769,19 @@ static uint32_t control(uint32_t request, void *data, ...) } /* + From NSView, respond to key equivalents. +*/ +- (BOOL)performKeyEquivalent:(NSEvent *)theEvent +{ + switch([theEvent keyCode]) + { + case 0x21: [window setAlphaValue: winAlpha-=0.05]; return YES; + case 0x1e: [window setAlphaValue: winAlpha+=0.05]; return YES; + } + return NO; +} + +/* Process key event */ - (void) keyDown: (NSEvent *) theEvent |