Mercurial > mplayer.hg
comparison libvo/vo_quartz.c @ 12785:33f58bfc8a1b
make mplayer capable of being in the foreground by Dan Christiansen
author | nplourde |
---|---|
date | Fri, 09 Jul 2004 16:54:57 +0000 |
parents | 730fc470a30c |
children | fb55f94f3001 |
comparison
equal
deleted
inserted
replaced
12784:e66787b22dbd | 12785:33f58bfc8a1b |
---|---|
7 | 7 |
8 YUV support Copyright (C) 2004 Romain Dolbeau <romain@dolbeau.org> | 8 YUV support Copyright (C) 2004 Romain Dolbeau <romain@dolbeau.org> |
9 | 9 |
10 MPlayer Mac OSX Quartz video out module. | 10 MPlayer Mac OSX Quartz video out module. |
11 | 11 |
12 todo: -'plist' resource | 12 todo: -RGB32 color space support |
13 -RGB32 color space support | |
14 -rootwin | 13 -rootwin |
15 -screen overlay output | 14 -screen overlay output |
16 -while mouse button down event mplayer is locked, fix that | 15 -while mouse button down event mplayer is locked, fix that |
17 -(add sugestion here) | 16 -(add sugestion here) |
18 */ | 17 */ |
300 SetRect(&dstRect, 0, 0, d_width, d_height); | 299 SetRect(&dstRect, 0, 0, d_width, d_height); |
301 | 300 |
302 CreateNewWindow(kDocumentWindowClass, windowAttrs, &winRect, &theWindow); | 301 CreateNewWindow(kDocumentWindowClass, windowAttrs, &winRect, &theWindow); |
303 | 302 |
304 //Set window title | 303 //Set window title |
305 titleKey = CFSTR("MPlayer"); | 304 titleKey = CFSTR("MPlayer - The Movie Player"); |
306 windowTitle = CFCopyLocalizedString(titleKey, NULL); | 305 windowTitle = CFCopyLocalizedString(titleKey, NULL); |
307 result = SetWindowTitleWithCFString(theWindow, windowTitle); | 306 result = SetWindowTitleWithCFString(theWindow, windowTitle); |
308 CFRelease(titleKey); | 307 CFRelease(titleKey); |
309 CFRelease(windowTitle); | 308 CFRelease(windowTitle); |
310 | 309 |
715 } | 714 } |
716 if (parse_pos[0] == ':') parse_pos = &parse_pos[1]; | 715 if (parse_pos[0] == ':') parse_pos = &parse_pos[1]; |
717 else if (parse_pos[0]) parse_err = 1; | 716 else if (parse_pos[0]) parse_err = 1; |
718 } | 717 } |
719 } | 718 } |
719 | |
720 //this chunk of code is heavily based off SDL_macosx.m from SDL | |
721 //it uses an Apple private function to request foreground operation | |
722 | |
723 void CPSEnableForegroundOperation(ProcessSerialNumber* psn); | |
724 ProcessSerialNumber myProc, frProc; | |
725 Boolean sameProc; | |
726 | |
727 if (GetFrontProcess(&frProc) == noErr) | |
728 { | |
729 if (GetCurrentProcess(&myProc) == noErr) | |
730 { | |
731 if (SameProcess(&frProc, &myProc, &sameProc) == noErr && !sameProc) | |
732 { | |
733 CPSEnableForegroundOperation(&myProc); | |
734 } | |
735 SetFrontProcess(&myProc); | |
736 } | |
737 } | |
738 | |
720 return 0; | 739 return 0; |
721 } | 740 } |
722 | 741 |
723 static uint32_t draw_yuv_image(mp_image_t *mpi) | 742 static uint32_t draw_yuv_image(mp_image_t *mpi) |
724 { | 743 { |