void ZWindow::Show(bool inShown) { switch (fOSWindow->GetShownState()) { case eZShownStateHidden: { if (inShown) fOSWindow->SetShownState(eZShownStateShown); break; } case eZShownStateMinimized: { if (!inShown) fOSWindow->SetShownState(eZShownStateHidden); break; } case eZShownStateShown: { if (!inShown) fOSWindow->SetShownState(eZShownStateHidden); break; } default: ZUnimplemented(); } }
static void spExtractConstraint(const ZTName& iPropName, vector<const ZTBSpec::Criterion*>& ioCriteria, string16& oValue) { for (vector<const ZTBSpec::Criterion*>::iterator critIter = ioCriteria.begin(); critIter != ioCriteria.end(); /*no increment*/) { // It's a criteria on the current property. if (1 == (*critIter)->GetComparator().fStrength && ZTBSpec::eRel_Equal == (*critIter)->GetComparator().fRel && (*critIter)->GetTValue().PGet<string8>() && (*critIter)->GetPropName() == iPropName) { // It's a 1-strength equality search on our property name, // so we can handle it. Remove the criteria from ioCriteria // and return success. oValue = ZUnicode::sAsUTF16((*critIter)->GetTValue().Get<string8>()); ioCriteria.erase(critIter); return; } ++critIter; } // Can't get here. ZUnimplemented(); }
void Visitor_DoMakeWalker::Visit(const ZRef<ZVisitee>& iRep) { if (ZLOGPF(w, eDebug)) w << "Unimplemented for visitee: " << typeid(*iRep.Get()).name(); ZUnimplemented(); }
bool ZBlackBerryServer::Handler_ManagerChanged::Read(const ZStreamR& r) { const bool req = r.ReadBool(); ZGuardRMtxR locker(fMutex); if (!req) { fState = eState_SendClosed; locker.Release(); //##ZStreamerWriter::Wake(); return false; } switch (fState) { case eState_Quiet: { fState = eState_Waiting; return true; } case eState_Changed: { fState = eState_SendChanged; locker.Release(); //##ZStreamerWriter::Wake(); return true; } } ZUnimplemented(); return false; }
ZUITextPane* ZUIFactory::Make_TextPane(ZSuperPane* inSuperPane, ZPaneLocator* inLocator) { #if UseZUITextEngine_Z return new ZUITextPane_TextEngine(inSuperPane, inLocator, new ZUITextEngine_Z(ZDCFont())); #elif ZCONFIG(OS, MacOS7) || ZCONFIG(OS, Carbon) return new ZUITextPane_TextEngine(inSuperPane, inLocator, new ZUITextEngine_TextEdit(ZDCFont())); #elif ZCONFIG(OS, Win32) // return new ZUITextPane_Win_EditControl(inSuperPane, inLocator); #else ZUnimplemented(); return nil; #endif }
bool ZWindow::GetShown() { switch (fOSWindow->GetShownState()) { case eZShownStateHidden: return false; case eZShownStateMinimized: case eZShownStateShown: return true; default: ZUnimplemented(); } return false; }
ZDCInkRep::ZDCInkRep(const ZDCInkRep& inOther) { if (inOther.fType == ZDCInk::eTypeSolidColor) { fAsSolidColor.fColor = inOther.fAsSolidColor.fColor; } else if (inOther.fType == ZDCInk::eTypeTwoColor) { fAsTwoColor.fForeColor = inOther.fAsTwoColor.fForeColor; fAsTwoColor.fBackColor = inOther.fAsTwoColor.fBackColor; fAsTwoColor.fPattern = inOther.fAsTwoColor.fPattern; } else if (inOther.fType == ZDCInk::eTypeMultiColor) { fAsMultiColor.fPixmap = new ZDCPixmap(*inOther.fAsMultiColor.fPixmap); } else { ZUnimplemented(); } fType = inOther.fType; }
ZString Value::GetFunctionName() { ZUnimplemented(); return ZString(); }
bool ZDCInk::Internal_IsSameAs(const ZDCInk& inOther) const { if (!fRep || !inOther.fRep) { // The easy case. One or other of the reps is nil, and thus they can't be equivalent. return false; } // Neither rep is nil. IsSameAs has already determined they're not the same rep. if (fRep->fType == inOther.fRep->fType) { if (fRep->fType == eTypeSolidColor) { return sSameColors(fRep->fAsSolidColor.fColor, inOther.fRep->fAsSolidColor.fColor); } else if (fRep->fType == eTypeTwoColor) { bool identical; bool identicalInverse; bool pattern1SolidFore; bool pattern1SolidBack; bool pattern2SolidFore; bool pattern2SolidBack; ::sExaminePatterns(fRep->fAsTwoColor.fPattern, inOther.fRep->fAsTwoColor.fPattern, identical, identicalInverse, pattern1SolidFore, pattern1SolidBack, pattern2SolidFore, pattern2SolidBack); bool sameForeColors = sSameColors(fRep->fAsTwoColor.fForeColor, inOther.fRep->fAsTwoColor.fForeColor); bool sameBackColors = sSameColors(fRep->fAsTwoColor.fBackColor, inOther.fRep->fAsTwoColor.fBackColor); bool sameForeColorsInverse = sSameColors(fRep->fAsTwoColor.fForeColor, inOther.fRep->fAsTwoColor.fBackColor); bool sameBackColorsInverse = sSameColors(fRep->fAsTwoColor.fBackColor, inOther.fRep->fAsTwoColor.fForeColor); if (identical && sameForeColors && sameBackColors) return true; if (identicalInverse && sameForeColorsInverse && sameBackColorsInverse) return true; if (pattern1SolidFore && pattern2SolidFore && sameForeColors) return true; if (pattern1SolidBack && pattern2SolidBack && sameBackColors) return true; if (pattern1SolidFore && pattern2SolidBack && sameForeColorsInverse) return true; if (pattern1SolidBack && pattern2SolidFore && sameBackColorsInverse) return true; return false; } else if (fRep->fType == eTypeMultiColor) { // I'm not going to bother checking pixmap exact pixel equivalence, // just if they share a rep. return fRep->fAsMultiColor.fPixmap->GetRep() == inOther.fRep->fAsMultiColor.fPixmap->GetRep(); } ZUnimplemented(); return false; } else if (fRep->fType == eTypeSolidColor && inOther.fRep->fType == eTypeTwoColor) { bool solidFore, solidBack; ::sExaminePattern(inOther.fRep->fAsTwoColor.fPattern, solidFore, solidBack); if (solidFore && sSameColors(fRep->fAsSolidColor.fColor, inOther.fRep->fAsTwoColor.fForeColor)) { return true; } if (solidBack && sSameColors(fRep->fAsSolidColor.fColor, inOther.fRep->fAsTwoColor.fBackColor)) { return true; } } else if (fRep->fType == eTypeTwoColor && inOther.fRep->fType == eTypeSolidColor) { bool solidFore, solidBack; ::sExaminePattern(fRep->fAsTwoColor.fPattern, solidFore, solidBack); if (solidFore && sSameColors(fRep->fAsTwoColor.fForeColor, inOther.fRep->fAsSolidColor.fColor)) { return true; } if (solidBack && sSameColors(fRep->fAsTwoColor.fBackColor, inOther.fRep->fAsSolidColor.fColor)) { return true; } } return false; }
bool ZTextDecoder_Win::Decode( const void* iSource, size_t iSourceBytes, size_t* oSourceBytes, size_t* oSourceBytesSkipped, UTF32* oDest, size_t iDestCU, size_t* oDestCU) { WCHAR utf16Buffer[kBufSize]; const CHAR* localSource = static_cast<const CHAR*>(iSource); UTF32* localDest = oDest; if (oSourceBytesSkipped) *oSourceBytesSkipped = 0; while (iSourceBytes && iDestCU) { size_t sourceConsumed; size_t utf16Generated; if (oSourceBytesSkipped) { spMBToWC_CanFail(fSourceCodePage, localSource, iSourceBytes, sourceConsumed, utf16Buffer, min(iDestCU, kBufSize), utf16Generated); if (sourceConsumed == 0) { // We failed to consume any of the source, so we must have moved localSource // until it's pointing at a bad byte. Skip over it. ++localSource; --iSourceBytes; ++*oSourceBytesSkipped; } } else { spMBToWC(fSourceCodePage, localSource, iSourceBytes, sourceConsumed, utf16Buffer, min(iDestCU, kBufSize), utf16Generated); } size_t utf16Consumed; size_t utf32Generated; ZUnicode::sUTF16ToUTF32( reinterpret_cast<const UTF16*>(utf16Buffer), utf16Generated, &utf16Consumed, nullptr, localDest, iDestCU, &utf32Generated); if (utf16Generated > utf16Consumed) { // We were not able to consume all the utf16 data generated by spMBToWC. So // the number of source code units consumed is *not* sourceConsumed, but some // lesser number. This would likely only occur if the UTF-16 had decomposed // CP sequences, which we ask that MultiByteToWideChar not generate. ZUnimplemented(); } localSource += sourceConsumed; iSourceBytes -= sourceConsumed; localDest += utf32Generated; iDestCU -= utf32Generated; } if (oSourceBytes) *oSourceBytes = localSource - static_cast<const CHAR*>(iSource); if (oDestCU) *oDestCU = localDest - oDest; return true; }
size_t ChanW_UTF_Native8::Write(const UTF16* iSource, size_t iCountCU) { ZUnimplemented(); }
size_t ChanW_UTF_Native16::Write(const UTF32* iSource, size_t iCount) { ZUnimplemented(); }
ButtonEvent::Source* GetEventSource() { ZUnimplemented(); return NULL; }
void ZDCPixmapDecoder_JPEGLib::Imp_Read(const ZStreamR& iStream, ZDCPixmap& oPixmap) { struct jpeg_decompress_struct theJDS; JPEGErrorMgr theEM; theJDS.err = &theEM; ::jpeg_create_decompress(&theJDS); JPEGReader theJR(iStream); theJDS.src = &theJR; try { ::jpeg_read_header(&theJDS, TRUE); ::jpeg_start_decompress(&theJDS); ZDCPixmapNS::PixelDesc sourcePixelDesc; ZDCPixmapNS::PixvalDesc sourcePixvalDesc; vector<uint8> rowBufferVector; if (theJDS.out_color_space == JCS_GRAYSCALE) { sourcePixelDesc = ZDCPixmapNS::PixelDesc(ZDCPixmapNS::eFormatStandard_Gray_8); rowBufferVector.resize(theJDS.image_width); sourcePixvalDesc.fDepth = 8; sourcePixvalDesc.fBigEndian = true; oPixmap = ZDCPixmap(ZPoint(theJDS.image_width, theJDS.image_height), ZDCPixmapNS::eFormatEfficient_Gray_8); } else if (theJDS.out_color_space == JCS_RGB) { sourcePixelDesc = ZDCPixmapNS::PixelDesc(ZDCPixmapNS::eFormatStandard_RGB_24); rowBufferVector.resize(3 * theJDS.image_width); sourcePixvalDesc.fDepth = 24; sourcePixvalDesc.fBigEndian = true; oPixmap = ZDCPixmap(ZPoint(theJDS.image_width, theJDS.image_height), ZDCPixmapNS::eFormatEfficient_Color_24); } else { // TODO. What about other color spaces? ZUnimplemented(); } ZDCPixmapNS::PixelDesc destPixelDesc = oPixmap.GetPixelDesc(); ZDCPixmapNS::RasterDesc destRasterDesc = oPixmap.GetRasterDesc(); void* destBaseAddress = oPixmap.GetBaseAddress(); JSAMPROW rowPtr[1]; rowPtr[0] = &rowBufferVector[0]; while (theJDS.output_scanline < theJDS.output_height) { int scanlinesRead = ::jpeg_read_scanlines(&theJDS, rowPtr, 1); ZAssertStop(1, scanlinesRead == 1); void* destRowAddress = destRasterDesc.CalcRowAddress(destBaseAddress, theJDS.output_scanline - 1); ZDCPixmapNS::sBlitRow( rowPtr[0], sourcePixvalDesc, sourcePixelDesc, 0, destRowAddress, destRasterDesc.fPixvalDesc, destPixelDesc, 0, theJDS.image_width); } ::jpeg_finish_decompress(&theJDS); } catch (...) { ::jpeg_destroy_decompress(&theJDS); throw; } ::jpeg_destroy_decompress(&theJDS); }
void Window::ShowCursor(bool bShow) { ZUnimplemented(); }