当前位置: 首页>>代码示例>>C++>>正文


C++ CFbsBitmap::Handle方法代码示例

本文整理汇总了C++中CFbsBitmap::Handle方法的典型用法代码示例。如果您正苦于以下问题:C++ CFbsBitmap::Handle方法的具体用法?C++ CFbsBitmap::Handle怎么用?C++ CFbsBitmap::Handle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CFbsBitmap的用法示例。


在下文中一共展示了CFbsBitmap::Handle方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetFrameL

/**
 Extracts data from aFrameData, packs them and then it sends this package to the player
*/
void RBitmapAnim::SetFrameL(const CBitmapFrameData& aFrameData, TInt aOpCode)
	{
	TPckgBuf<TFrameData> dataFrameArg;
	CFbsBitmap* bitmap = aFrameData.Bitmap();
	dataFrameArg().iBitmapHandle=( (bitmap) ? bitmap->Handle() : 0 );
	CFbsBitmap* mask = aFrameData.Mask();
	dataFrameArg().iMaskBitmapHandle=( (mask) ? mask->Handle() : 0 );
	dataFrameArg().iIntervalInMilliSeconds=aFrameData.IntervalInMilliSeconds();
	dataFrameArg().iPosition=aFrameData.Position();
	User::LeaveIfError(CommandReply(aOpCode, dataFrameArg));
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:14,代码来源:bmpancli.cpp

示例2: GetAppIcon

EXPORT_C TInt AknsUtils::GetAppIcon(
    MAknsSkinInstance* aInstance, TUid aAppUid, TSize aSize,
    CApaMaskedBitmap& aAppBitmap )
    {
    AKNS_TRACE_OBSOLETE("AknsUtils::GetAppIcon (4 param)");

    __ASSERT_DEBUG( aAppBitmap.Mask(),
        AKNS_DEBUG_PANIC( EAknsDPanicInvalidParameter ) );

    CFbsBitmap* bitmap = NULL;
    CFbsBitmap* mask = NULL;

    TInt ret = KErrNone;
    TBool configuredIcon = EFalse;

    if ( !configuredIcon )
        {
        ret = GetAppIconFromSkin( aInstance, aAppUid, aSize, bitmap, mask );
        if( ret == KErrNone )
            {
            if( bitmap && mask && bitmap->Handle() && mask->Handle() )
                {
                ret = aAppBitmap.Duplicate( bitmap->Handle() );
                ret |= aAppBitmap.Mask()->Duplicate( mask->Handle() );
                delete bitmap;
                delete mask;
                return ret;
                }
            else
                {
                // Delete bitmaps and proceed
                delete bitmap;
                bitmap = NULL; 
                delete mask;
                mask = NULL; 
                }
            }
        }

    RApaLsSession lsSession;
    ret = lsSession.Connect();
    if( ret == KErrNone )
        {
        ret = lsSession.GetAppIcon( aAppUid, aSize, aAppBitmap );
        lsSession.Close();
        if(ret == KErrNone) //icon case
        	AknInternalIconUtils::SetAppIcon(bitmap); //icon case
        }

    return ret;
    } //lint !e1746 GetAppIcon syntax
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:51,代码来源:AknsUtilsAppIcon.cpp

示例3: Copy

// -----------------------------------------------------------------------------
// CMaskedBitmap::Copy
// -----------------------------------------------------------------------------
TInt CMaskedBitmap::Copy( const CFbsBitmap& aBitmap, const CFbsBitmap& aMask, TBool aDuplicate )
    {
    Reset();

    TInt bitmapHandle( aBitmap.Handle() );
    TInt maskHandle( aMask.Handle() );
    if( bitmapHandle && maskHandle &&
        aBitmap.SizeInPixels() != aMask.SizeInPixels() )
        {
        return KErrArgument;
        }

    TInt err( KErrNone );
    if( bitmapHandle )
        {
        if( aDuplicate )
            {
            err = iBitmap->Duplicate( bitmapHandle );
            }
        else
            {
            err = BitmapUtil::CopyBitmap( aBitmap, *iBitmap );
            }
        }

    if( !err && maskHandle )
        {
        if( aDuplicate )
            {
            err = iMask->Duplicate( maskHandle );
            }
        else
            {
            err = BitmapUtil::CopyBitmap( aMask, *iMask );
            }
        if( err )
            {
            iBitmap->Reset();
            }
        }
    return err;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:45,代码来源:MaskedBitmap.cpp

示例4: getThumbnail

int CAfStorageClient::getThumbnail(const TDesC &imagePath, void *userData)
{
    lastMethodCalled = CAfStorageClient::GetThumbnailMethod;
    delete lastCallThumbnailPath;
    lastCallThumbnailPath = imagePath.Alloc();
    lastCallUserData = userData;
    CFbsBitmap *bitmap = new (ELeave)CFbsBitmap();
    CleanupStack::PushL(bitmap);
    User::LeaveIfError(bitmap->Create(TSize(128, 128), EColor4K));
    mObserver.getThumbnailRequestCompleted(CAfStorageClient::expectedReturnCode, bitmap->Handle(), userData);
    CleanupStack::PopAndDestroy(bitmap);
    return CAfStorageClient::expectedReturnCode;
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:13,代码来源:afstorageclient.cpp

示例5: MvpuoFrameReady

void CTestStepVidPlayerDRMGetFrame::MvpuoFrameReady(CFbsBitmap& aFrame, TInt aError)
	{
	iError = aError;
	if (aError==KErrNone)
		{
		if (aFrame.Handle() == NULL || aFrame.SizeInPixels() != TSize(KFrameWidth,KFrameHeight) )
			iError = KErrArgument;
		else
			{
				iError = KErrNone;
				INFO_PRINTF1(_L("MvpuoFrameReady: GetFrameL() COMPLETED OK"));
			}
		}
	CActiveScheduler::Stop();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:15,代码来源:DRMTestVidPlayer.cpp

示例6: CreateMaskedBitmapL

// -----------------------------------------------------------------------------
// AknsUtils::CreateMaskedBitmapL
// -----------------------------------------------------------------------------
//
EXPORT_C CApaMaskedBitmap* AknsUtils::CreateMaskedBitmapL(
    MAknsSkinInstance* aInstance, const TAknsItemID& aID,
    const TDesC& aFilename,
    const TInt aFileIndex, const TInt aFileMaskIndex )
    {
    AKNS_TRACE_OBSOLETE("AknsUtils::CreateMaskedBitmapL (5 param)");

    CFbsBitmap* bitmap = NULL;
    CFbsBitmap* mask = NULL;

    CreateIconLC( aInstance, aID, bitmap, mask,
        aFilename, aFileIndex, aFileMaskIndex );

    // Bitmap and mask always exist here
    CApaMaskedBitmap* maskedBitmap = CApaMaskedBitmap::NewLC();
    // Note that these calls leave with SVG-originating icons
    User::LeaveIfError( maskedBitmap->Duplicate( bitmap->Handle() ) );
    User::LeaveIfError( maskedBitmap->Mask()->Duplicate( mask->Handle() ) );
    CleanupStack::Pop( maskedBitmap );

    CleanupStack::PopAndDestroy( 2 ); // bitmap, mask

    return maskedBitmap;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:28,代码来源:AknsUtils.cpp

示例7: BitmapsL


//.........这里部分代码省略.........
			iBitmap.Reset();
			iBitmap2.Reset();
			if(heapMarkCheckFlag)
				{
				iFbs->SendCommand(EFbsMessDefaultMarkEnd);
				iFbs->SendCommand(EFbsMessUserMarkEnd);
				}
			break;
			}
		else 
			TEST2(ret, KErrNone);
	}

	iFbs->SendCommand(EFbsMessDefaultAllocFail,0);
	iFbs->SendCommand(EFbsMessUserAllocFail,0);
	TEST(iFbs->ResourceCount()==0);
	
	
// Duplicate
	CFbsBitmap bmpalt;
	ret = bmpalt.Create(KSmallSize,EColor256);
	TEST2(ret, KErrNone);

	INFO_PRINTF1(_L("CFbsBitmap::Duplicate()\r\n"));
	for (count = 1; ; count++)
		{
		iFbs->SendCommand(EFbsMessDefaultAllocFail,count);
		if(heapMarkCheckFlag)
			{
			iFbs->SendCommand(EFbsMessDefaultMark);
			iFbs->SendCommand(EFbsMessUserMark);
			}

		ret = iBitmap.Duplicate(bmpalt.Handle());

		if (ret == KErrNoMemory)
			{
			if(heapMarkCheckFlag)
				{
				iFbs->SendCommand(EFbsMessDefaultMarkEnd);
				iFbs->SendCommand(EFbsMessUserMarkEnd);
				}
			}
		else if (ret == KErrNone)
			{
			iBitmap.Reset();
			if(heapMarkCheckFlag)
				{
				iFbs->SendCommand(EFbsMessDefaultMarkEnd);
				iFbs->SendCommand(EFbsMessUserMarkEnd);
				}
			break;
			}
		else 
			TEST2(ret, KErrNone);
		}

	iFbs->SendCommand(EFbsMessDefaultAllocFail,0);
	iFbs->SendCommand(EFbsMessUserAllocFail,0);
	TEST(iFbs->ResourceCount()==1);
	ret = bmpalt.Create(KSmallSize,EColor256);
	TEST2(ret, KErrNone);

	for (count = 1; ; count++)
		{
		iFbs->SendCommand(EFbsMessUserAllocFail,count);
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:67,代码来源:TALLOC.CPP


注:本文中的CFbsBitmap::Handle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。