comparison libvo/vo_macosx.m @ 15731:532a351962fb

set window alpha
author nplourde
date Thu, 16 Jun 2005 00:26:47 +0000
parents 55aaeb7b6aae
children a51c5bc51272
comparison
equal deleted inserted replaced
15730:0bc42444c110 15731:532a351962fb
53 extern int vo_keepaspect; 53 extern int vo_keepaspect;
54 extern float movie_aspect; 54 extern float movie_aspect;
55 static float old_movie_aspect; 55 static float old_movie_aspect;
56 extern float vo_panscan; 56 extern float vo_panscan;
57 57
58 static float winAlpha = 1;
58 static int int_pause = 0; 59 static int int_pause = 0;
59 60
60 static vo_info_t info = 61 static vo_info_t info =
61 { 62 {
62 "Mac OSX Core Video", 63 "Mac OSX Core Video",
131 132
132 vo_fs = flags & VOFLAG_FULLSCREEN; 133 vo_fs = flags & VOFLAG_FULLSCREEN;
133 134
134 //config OpenGL View 135 //config OpenGL View
135 [mpGLView config]; 136 [mpGLView config];
136 137
137 return 0; 138 return 0;
138 } 139 }
139 140
140 static void check_events(void) 141 static void check_events(void)
141 { 142 {
410 uint32_t d_width; 411 uint32_t d_width;
411 uint32_t d_height; 412 uint32_t d_height;
412 NSRect frame; 413 NSRect frame;
413 414
414 aspect((int *)&d_width, (int *)&d_height,A_NOZOOM); 415 aspect((int *)&d_width, (int *)&d_height,A_NOZOOM);
415 //if(sender == kQuitCmd) 416
417 if(sender == kQuitCmd)
418 {
419 mplayer_put_key(KEY_ESC);
420 }
416 421
417 if(sender == kHalfScreenCmd) 422 if(sender == kHalfScreenCmd)
418 { 423 {
419 if(isFullscreen) { 424 if(isFullscreen) {
420 vo_fs = (!(vo_fs)); [self fullscreen:YES]; 425 vo_fs = (!(vo_fs)); [self fullscreen:YES];
759 if( ( (curTime - lastTime) >= 60) || (lastTime == 0)) 764 if( ( (curTime - lastTime) >= 60) || (lastTime == 0))
760 { 765 {
761 UpdateSystemActivity(UsrActivity); 766 UpdateSystemActivity(UsrActivity);
762 lastTime = curTime; 767 lastTime = curTime;
763 } 768 }
769 }
770
771 /*
772 From NSView, respond to key equivalents.
773 */
774 - (BOOL)performKeyEquivalent:(NSEvent *)theEvent
775 {
776 switch([theEvent keyCode])
777 {
778 case 0x21: [window setAlphaValue: winAlpha-=0.05]; return YES;
779 case 0x1e: [window setAlphaValue: winAlpha+=0.05]; return YES;
780 }
781 return NO;
764 } 782 }
765 783
766 /* 784 /*
767 Process key event 785 Process key event
768 */ 786 */