void S60VideoPlayerSession::MvpuoPrepareComplete(TInt aError) { setError(aError); // if we have some playback errors, handle them if (m_displayWindow) { m_player->RemoveDisplayWindow(*m_displayWindow); m_displayWindow = NULL; } RWindow *window = static_cast<RWindow *>(m_window); if (window) { /* Get the window size */ TRect rect; if (m_videoOutput && m_videoOutput->inherits("S60VideoWidgetControl")) { S60VideoWidgetControl* widgetControl = qobject_cast<S60VideoWidgetControl *>(m_videoOutput); const QSize size = widgetControl->videoWidgetSize(); rect.SetSize(TSize(size.width(), size.height())); } else if (m_videoOutput && m_videoOutput->inherits("S60VideoOverlay")) { S60VideoOverlay* videoOverlay = qobject_cast<S60VideoOverlay *>(m_videoOutput); const QSize size = videoOverlay->displayRect().size(); rect.SetSize(TSize(size.width(), size.height())); } m_rect = rect; window->SetBackgroundColor(TRgb(0, 0, 0, 255)); TRAPD(error, m_player->AddDisplayWindowL(m_wsSession, m_screenDevice, *window, m_rect, m_rect);) setError(error); // if we can't add window it an error at this point TSize originalSize; TRAP_IGNORE( m_player->VideoFrameSizeL(originalSize); m_originalSize = QSize(originalSize.iWidth, originalSize.iHeight); m_player->SetScaleFactorL(*window, scaleFactor().first, scaleFactor().second);)
void CWsGceCscBase::SetBackgroundColorWindow(RWindow& aWindow, const TRgb& aColor) { aWindow.Invalidate(); aWindow.SetBackgroundColor(aColor); aWindow.BeginRedraw(); iGc->Activate(aWindow); iGc->Deactivate(); aWindow.EndRedraw(); }
void CTestContainer::ConstructL() { iColor = KRgbBlack; CreateWindowL(); RWindow window = Window(); window.SetTransparencyAlphaChannel(); window.SetBackgroundColor(TRgb(150,150,150,150)); iAnimationsArray=new(ELeave) CArrayPtrFlat<CAnimation>(KArrayGranularity); //Set the background of the container window to the default. iBackgroundType = EBackgroundBlackRedGreenYellowStripes; ActivateL(); //Construct a window that can be used in test cases. iCoveringWindowControl = new (ELeave) CTestWindowControl; iCoveringWindowControl->ConstructL(); }
/** Creates a RWindow @param aWinGroup The window group object @param aWin The window object @param aPos The Position of the window @param aBkgdColor The background color of the window @param aSize The size of the window @param aHandle The handle of the window */ void CT_WServGenericpluginStepLoad::CreateRWindowL(const RWindowGroup& aWinGroup, RWindow& aWin, const TPoint& aPos, const TRgb& aBkgdColor, const TSize& aWinSize, const TUint32 aHandle) { aWin = RWindow( iWsSession ); CleanupClosePushL( aWin ); User::LeaveIfError( aWin.Construct( aWinGroup, aHandle ) ); CleanupStack::Pop(&aWin); aWin.SetRequiredDisplayMode(iDisplayMode); aWin.SetExtent(aPos, aWinSize); aWin.SetBackgroundColor( aBkgdColor ); aWin.Activate(); aWin.SetVisible( ETrue ); }
void CWsGceCscBase::ConstructOpaqueWindowL(RWindow& aWindow, const TRgb& aColor, TInt aPos, const TPoint &aPoint, const TSize &aSize) { ASSERT_EQUALS_X(aWindow.Construct(iGroup, ++iWindowHandle), KErrNone); aWindow.SetRequiredDisplayMode(iDisplayMode); aWindow.SetExtent(aPoint, aSize); aWindow.SetBackgroundColor(aColor); aWindow.SetOrdinalPosition(aPos); aWindow.Activate(); aWindow.BeginRedraw(); iGc->Activate(aWindow); iGc->Deactivate(); aWindow.EndRedraw(); }