void GraphicsManager::takeScreenshot() { lockFrame(); _takeScreenshot = true; unlockFrame(); }
void GraphicsManager::setCursor(Cursor *cursor) { lockFrame(); _cursor = cursor; unlockFrame(); }
StereoCubemap* onNextCubemap(CubemapSource* source, StereoCubemap* cubemap) { CubemapStereoFrame* new_frame_ = new CubemapStereoFrame(cubemap); lockFrame(); if(cached_frame_) delete cached_frame_; cached_frame_ = new_frame_; unlockFrame(); return nullptr; }
virtual bool nextFrame() { lockFrame(); bool result; if (cached_frame_) { result = true; } else { result = false; } unlockFrame(); return result; }
char *XFE_ReadAttachDrag::getTargetData(Atom target) { // WARNING - data *must* be allocated with Xt malloc API, or Xt // will spring a leak! if (!_dragDataURL || !_dragDataName) return NULL; if (target==_XA_NETSCAPE_URL) { // translate drag data to NetscapeURL format XFE_URLDesktopType urlData; urlData.createItemList(1); urlData.url(0,_dragDataURL); return (char*) XtNewString(urlData.getString()); } if (target==_XA_FILE_NAME) { // save url as appropriately named file in a tmp // directory. if ((_tmpDirectory=XFE_DesktopType::createTmpDirectory())==NULL) return NULL; _tmpFileName=new char[strlen(_tmpDirectory)+1+strlen(_dragDataName)+1]; sprintf(_tmpFileName,"%s/%s",_tmpDirectory,_dragDataName); URL_Struct *urlStruct=NET_CreateURLStruct(_dragDataURL,NET_DONT_RELOAD); if (urlStruct) { lockFrame(); fe_SaveSynchronousURL(_attachPanel->context(),urlStruct,_tmpFileName); unlockFrame(); } // return file name return (char*) XtNewString(_tmpFileName); } if (target==XA_STRING) { // return the URL return (char*) XtNewString(_dragDataURL); } return NULL; }