void QTApp_Idle (WindowReference theWindow) { WindowObject myWindowObject = NULL; GrafPtr mySavedPort; GetPort(&mySavedPort); MacSetPort(QTFrame_GetPortFromWindowReference(theWindow)); myWindowObject = QTFrame_GetWindowObjectFromWindow(theWindow); if (myWindowObject != NULL) { MovieController myMC = NULL; myMC = (**myWindowObject).fController; if (myMC != NULL) { // run any idle-time tasks for the movie #if TARGET_OS_MAC // restore the cursor to the arrow // if it's outside the front movie window or outside the window's visible region if (theWindow == QTFrame_GetFrontMovieWindow()) { Rect myRect; Point myPoint; RgnHandle myVisRegion; Cursor myArrow; GetMouse(&myPoint); myVisRegion = NewRgn(); GetPortVisibleRegion(QTFrame_GetPortFromWindowReference(theWindow), myVisRegion); GetWindowPortBounds(theWindow, &myRect); if (!MacPtInRect(myPoint, &myRect) || !PtInRgn(myPoint, myVisRegion)) MacSetCursor(GetQDGlobalsArrow(&myArrow)); DisposeRgn(myVisRegion); } #endif // TARGET_OS_MAC } } // grant the sequence grabber some processor time if (gSeqGrabber != NULL) SGIdle(gSeqGrabber); MacSetPort(mySavedPort); }
void QTApp_Idle (WindowReference theWindow) { WindowObject myWindowObject = NULL; GrafPtr mySavedPort; GetPort(&mySavedPort); MacSetPort(QTFrame_GetPortFromWindowReference(theWindow)); myWindowObject = QTFrame_GetWindowObjectFromWindow(theWindow); if (myWindowObject != NULL) { MovieController myMC = NULL; myMC = (**myWindowObject).fController; if (myMC != NULL) { // run any idle-time tasks for the movie #if TARGET_OS_MAC // restore the cursor to the arrow // if it's outside the front movie window or outside the window's visible region if (theWindow == QTFrame_GetFrontMovieWindow()) { Rect myRect; Point myPoint; RgnHandle myVisRegion; Cursor myArrow; GetMouse(&myPoint); myVisRegion = NewRgn(); GetPortVisibleRegion(QTFrame_GetPortFromWindowReference(theWindow), myVisRegion); GetWindowPortBounds(theWindow, &myRect); if (!MacPtInRect(myPoint, &myRect) || !PtInRgn(myPoint, myVisRegion)) MacSetCursor(GetQDGlobalsArrow(&myArrow)); DisposeRgn(myVisRegion); } #endif // TARGET_OS_MAC } // see whether the user has added a text track behind our backs (e.g. by pasting some text) QTText_SyncWindowData(myWindowObject); } MacSetPort(mySavedPort); }
GDHandle AFXAPI _AfxFindDevice(int x, int y) { long lResult; Point pt; GDHandle hgd; if (Gestalt(gestaltQuickdrawVersion, &lResult) != noErr || lResult < gestalt8BitQD) return NULL; pt.h = (short) x; pt.v = (short) y; hgd = GetDeviceList(); while (hgd != NULL) { if (MacPtInRect(pt, &(*hgd)->gdRect)) return hgd; hgd = GetNextDevice(hgd); } return NULL; }