sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalComponent sl@0: */ sl@0: sl@0: #ifndef MMFSUBTITLEGRAPHICMESSAGE_H sl@0: #define MMFSUBTITLEGRAPHICMESSAGE_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: /* sl@0: Defines the message classes for communication between the MMF CRP sl@0: subtitle rendering client and the WSERV CRP graphic plug-in sl@0: */ sl@0: sl@0: sl@0: enum TSubtitleGraphicMessage sl@0: { sl@0: ESubtitleCrpMessageInit = 10, sl@0: ESubtitleCrpMessageInitSimple = 20, sl@0: ESubtitleCrpMessageClear = 30, sl@0: ESubtitleCrpMessageDrawFrame = 40, sl@0: ESubtitleCrpMessageSwapFrame = 50 sl@0: }; sl@0: sl@0: /** sl@0: Base class for all CRP messages sl@0: */ sl@0: class TSubtitleGraphicMessageBase sl@0: { sl@0: public: sl@0: TSubtitleGraphicMessageBase(TSubtitleGraphicMessage aMsgType); sl@0: sl@0: protected: sl@0: TInt8 iMsgType; sl@0: }; sl@0: sl@0: /** sl@0: Initialise the CRP sl@0: Passes two bitmap handles to the CRP sl@0: @see CMMFSubtitleGraphic::Initialize(TInt aBuffer1, TInt aBuffer2); sl@0: */ sl@0: class TSubtitleCrpMsgInit : public TSubtitleGraphicMessageBase sl@0: { sl@0: public: sl@0: TSubtitleCrpMsgInit(); sl@0: TSubtitleCrpMsgInit(TInt aBitmapHandle1, TInt aBitmapHandle2); sl@0: sl@0: public: sl@0: TInt iBitmapHandle1; sl@0: TInt iBitmapHandle2; sl@0: }; sl@0: sl@0: /** sl@0: Initialise the CRP sl@0: @see CMMFSubtitleGraphic::Initialize() sl@0: */ sl@0: class TSubtitleCrpMsgInitSimple : public TSubtitleGraphicMessageBase sl@0: { sl@0: public: sl@0: TSubtitleCrpMsgInitSimple(); sl@0: }; sl@0: sl@0: /** sl@0: Request that the CRP clears all content from the window sl@0: @see CMMFSubtitleGraphic::Clear() sl@0: */ sl@0: class TSubtitleCrpMsgClear : public TSubtitleGraphicMessageBase sl@0: { sl@0: public: sl@0: TSubtitleCrpMsgClear(); sl@0: }; sl@0: sl@0: /** sl@0: Requests that the CRP draws a frame indicated by the CFBSBitmap handle provided sl@0: @see CMMFSubtitleGraphic::DrawFrame(TInt aFrameHandle, TRect& aDirtyRegion, sl@0: TTimeIntervalMicroSeconds& aDisplayDuration) sl@0: */ sl@0: class TSubtitleCrpMsgDrawFrame : public TSubtitleGraphicMessageBase sl@0: { sl@0: public: sl@0: TSubtitleCrpMsgDrawFrame(); sl@0: TSubtitleCrpMsgDrawFrame(TInt aBitmapHandle, const TRect& aDirtyRegion, const TTimeIntervalMicroSeconds& aDisplayDuration); sl@0: sl@0: public: sl@0: TInt iBitmapHandle; sl@0: TRect iDirtyRegion; sl@0: TTimeIntervalMicroSeconds iDisplayDuration; sl@0: }; sl@0: sl@0: /** sl@0: Request that the CRP draw the content in the current back buffer. Assumes that the CRP sl@0: has been intialized with TSubtitleCrpMsgInit sl@0: @see CMMFSubtitleGraphic::SwapFrame(TInt aExpectedBuffer, sl@0: TTimeIntervalMicroSeconds& aDisplayDuration, const TRect& aDirtyRegion) sl@0: */ sl@0: class TSubtitleCrpMsgRenderSwapFrame : public TSubtitleGraphicMessageBase sl@0: { sl@0: public: sl@0: TSubtitleCrpMsgRenderSwapFrame(); sl@0: TSubtitleCrpMsgRenderSwapFrame(TInt aExpectedFrame, const TRect& aDirtyRegion, const TTimeIntervalMicroSeconds& aDisplayDuration); sl@0: sl@0: public: sl@0: TInt iExpectedFrame; sl@0: TTimeIntervalMicroSeconds iDisplayDuration; sl@0: TRect iDirtyRegion; sl@0: }; sl@0: sl@0: #endif