Пример #1
0
// -----------------------------------------------------------------------------
// CTestSDKSkins::TestEQIDCreateCommandIteratorL
// -----------------------------------------------------------------------------
TInt CTestSDKSkins::TestEQIDCreateCommandIteratorL( CStifItemParser& /*aItem*/ )
    {
    CAknsEffectQueueItemData* itemData = CAknsEffectQueueItemData::NewL();
    CleanupStack::PushL( itemData );
    STIF_ASSERT_NOT_NULL( itemData );
    
    MAknsRlCommandIterator* iterator = itemData->CreateCommandIteratorL();
    STIF_ASSERT_NOT_NULL( iterator );
    
    CleanupStack::PopAndDestroy( itemData );
    
    return KErrNone;
    
    }
Пример #2
0
// -----------------------------------------------------------------------------
// CTestSDKSkins::TestEQIDSetOutputLayerModeL
// -----------------------------------------------------------------------------
TInt CTestSDKSkins::TestEQIDSetOutputLayerModeL( CStifItemParser& /*aItem*/ )
    {
    CAknsEffectQueueItemData* itemData = CAknsEffectQueueItemData::NewL();
    CleanupStack::PushL( itemData );
    STIF_ASSERT_NOT_NULL( itemData );
    
    itemData->SetOutputLayerMode( 1 );
    TInt outputLayerModeGet = itemData->OutputLayerMode();
    STIF_ASSERT_TRUE( 1 == outputLayerModeGet );
    
    CleanupStack::PopAndDestroy( itemData );
    
    return KErrNone;
    
    }
Пример #3
0
// -----------------------------------------------------------------------------
// CTestSDKSkins::TestEQIDSetRefItemL
// -----------------------------------------------------------------------------
TInt CTestSDKSkins::TestEQIDSetRefItemL( CStifItemParser& /*aItem*/ )
    {
    CAknsEffectQueueItemData* itemData = CAknsEffectQueueItemData::NewL();
    CleanupStack::PushL( itemData );
    STIF_ASSERT_NOT_NULL( itemData );
    
    TAknsItemID itemID( KAknsIIDQsnCpScrollBgTop );
    itemData->SetRefItem( itemID );
    TAknsItemID itemIDGet = itemData->RefItem();
    STIF_ASSERT_TRUE( itemID.iMajor == itemID.iMajor );
    STIF_ASSERT_TRUE( itemID.iMinor == itemID.iMinor );
    
    CleanupStack::PopAndDestroy( itemData );
    
    return KErrNone;
    
    }
Пример #4
0
// -----------------------------------------------------------------------------
// CTestSDKSkins::TestEQIDAppendCommandL
// -----------------------------------------------------------------------------
TInt CTestSDKSkins::TestEQIDAppendCommandL( CStifItemParser& /*aItem*/ )
    {
    CAknsEffectQueueItemData* itemData = CAknsEffectQueueItemData::NewL();
    CleanupStack::PushL( itemData );
    STIF_ASSERT_NOT_NULL( itemData );
    
    CAknsEffectCommand* command = CAknsEffectCommand::NewL();
    CleanupStack::PushL( command );
    STIF_ASSERT_NOT_NULL( command );

    itemData->AppendCommandL( command );
    
    CleanupStack::Pop( command );
    CleanupStack::PopAndDestroy( itemData );
    
    return KErrNone;
    
    }
// -----------------------------------------------------------------------------
// CSkinningModule::TestCaseMasterLayoutOpsL
//
// -----------------------------------------------------------------------------
//
TInt CSkinningModule::TestCaseMasterLayoutOpsL( TTestResult& aResult )
    {
    TInt err = KErrNone;
    // starting CDL engine.
    /*CActiveScheduler* activeScheduler = new CActiveScheduler;
    CActiveScheduler::Install( activeScheduler );

    iClient.Connect( this );
    CCdlEngineRef* myCDLEngine = CdlEngine::CreateCdlEngineL();
    CdlEngine::StartGlobalCustomisationL();

    CAknsRlMasterLayout* master = CAknsRlMasterLayout::NewL();
    TAknsItemID id2 = master->GetParent( KAknsIIDQsnBgAreaMain );
    if ( id2 != KAknsIIDQsnBgScreen )
        {
        err = KErrGeneral;
        }
    TRect rect;
    TRect parentRect;
    TBool found = master->GetItemLayout( KAknsIIDQsnBgAreaMain, parentRect, rect );
    if ( !found )
        {
        err = KErrGeneral;
        }

    TAknsItemID nonValidId;
    nonValidId.Set( 0xFFFFFF, 0xFFFFFF );
    found = master->GetItemLayout( nonValidId, parentRect, rect );
    if ( found )
        {
        err = KErrGeneral;
        }
    TInt currentLayoutId = master->CurrentLayoutType();
    TSize currentLayoutSize = master->CurrentLayoutSize();

    iClient.Close();
    CActiveScheduler::Install( NULL );
    delete activeScheduler;*/
    OpenSessionWithNoObserver();
    CAknsRlDefaultRenderer* defaultRenderer = CAknsRlDefaultRenderer::NewL( &iClient );
    if ( !defaultRenderer )
        {
        err = KErrNoMemory;
        }

    CAknsEffectQueueItemData* effectQueue = CAknsEffectQueueItemData::NewL();
    MAknsRlCommandIterator* myCommandIterator = effectQueue->CreateCommandIteratorL();
    TInt* i = 0;
    myCommandIterator->CleanupOperation( i );

    TAknsRlRenderOpParam myOpParams;
    myOpParams.iInputLayerAStatus = KAknsRlLayerRGBOnly;
    myOpParams.iInputLayerAIndex = 0;
    myOpParams.iInputLayerBStatus = KAknsRlLayerAlphaOnly;
    myOpParams.iInputLayerBIndex = 1;
    myOpParams.iOutputLayerStatus = KAknsRlLayerRGBA;
    myOpParams.iOutputLayerIndex = 0;
    effectQueue->SetRefItem( KAknsIIDQsnBgAreaMain );
    effectQueue->SetInputLayer( 0 );
    effectQueue->SetInputLayerMode( KAknsRlLayerRGBOnly );
    effectQueue->SetOutputLayer( 1 );
    effectQueue->SetOutputLayerMode( KAknsRlLayerRGBA  );

    CAknsEffectCommand* effectCmd = CreateEffectCommandLC( myOpParams );
    effectQueue->AppendCommandL( effectCmd );
    CleanupStack::PopAndDestroy( effectCmd );

    if( effectQueue->RefItem() != KAknsIIDQsnBgAreaMain ||
        effectQueue->InputLayer() != 0 ||
        effectQueue->InputLayerMode() != KAknsRlLayerRGBOnly ||
        effectQueue->OutputLayer() != 1 ||
        effectQueue->OutputLayerMode() != KAknsRlLayerRGBA )
        {
        err = KErrGeneral;
        }

    CloseSession();

    // Sets test case result and description(Maximum size is KStifMaxResultDes)
    _LIT( KDescription, "MasterLayoutOps finished" );
    aResult.SetResult( err, KDescription );
    return err;
    }