os/mm/mmplugins/mmfwplugins/src/Plugin/subtitle/common/mmfsubtitlegraphicmessage.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmplugins/mmfwplugins/src/Plugin/subtitle/common/mmfsubtitlegraphicmessage.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,125 @@
     1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +/**
    1.20 + @file
    1.21 + @internalComponent
    1.22 +*/
    1.23 +
    1.24 +#ifndef MMFSUBTITLEGRAPHICMESSAGE_H
    1.25 +#define MMFSUBTITLEGRAPHICMESSAGE_H
    1.26 +
    1.27 +#include <e32std.h>
    1.28 +#include <s32strm.h>
    1.29 +
    1.30 +/*
    1.31 +Defines the message classes for communication between the MMF CRP 
    1.32 +subtitle rendering client and the WSERV CRP graphic plug-in
    1.33 +*/
    1.34 +
    1.35 +
    1.36 +enum TSubtitleGraphicMessage
    1.37 +	{
    1.38 +	ESubtitleCrpMessageInit 		= 10,
    1.39 +	ESubtitleCrpMessageInitSimple 	= 20,
    1.40 +	ESubtitleCrpMessageClear 		= 30,
    1.41 +	ESubtitleCrpMessageDrawFrame 	= 40,	
    1.42 +	ESubtitleCrpMessageSwapFrame 	= 50
    1.43 +	};
    1.44 +
    1.45 +/**
    1.46 +Base class for all CRP messages
    1.47 +*/
    1.48 +class TSubtitleGraphicMessageBase
    1.49 +{
    1.50 +public:
    1.51 +	TSubtitleGraphicMessageBase(TSubtitleGraphicMessage aMsgType);
    1.52 +
    1.53 +protected:
    1.54 +	TInt8 iMsgType;
    1.55 +};
    1.56 +
    1.57 +/**
    1.58 +Initialise the CRP
    1.59 +Passes two bitmap handles to the CRP
    1.60 +@see CMMFSubtitleGraphic::Initialize(TInt aBuffer1, TInt aBuffer2);
    1.61 +*/
    1.62 +class TSubtitleCrpMsgInit : public TSubtitleGraphicMessageBase
    1.63 +	{
    1.64 +public:
    1.65 +	TSubtitleCrpMsgInit();
    1.66 +	TSubtitleCrpMsgInit(TInt aBitmapHandle1, TInt aBitmapHandle2);
    1.67 +
    1.68 +public:
    1.69 +	TInt iBitmapHandle1;
    1.70 +	TInt iBitmapHandle2;
    1.71 +	};
    1.72 +
    1.73 +/**
    1.74 +Initialise the CRP
    1.75 +@see CMMFSubtitleGraphic::Initialize()
    1.76 +*/
    1.77 +class TSubtitleCrpMsgInitSimple : public TSubtitleGraphicMessageBase
    1.78 +	{
    1.79 +public:
    1.80 +	TSubtitleCrpMsgInitSimple();
    1.81 +	};
    1.82 +
    1.83 +/**
    1.84 +Request that the CRP clears all content from the window
    1.85 +@see CMMFSubtitleGraphic::Clear()
    1.86 +*/
    1.87 +class TSubtitleCrpMsgClear : public TSubtitleGraphicMessageBase
    1.88 +	{
    1.89 +public: 
    1.90 +	TSubtitleCrpMsgClear();
    1.91 +	};
    1.92 +
    1.93 +/**
    1.94 +Requests that the CRP draws a frame indicated by the CFBSBitmap handle provided
    1.95 +@see CMMFSubtitleGraphic::DrawFrame(TInt aFrameHandle, TRect& aDirtyRegion,
    1.96 +     TTimeIntervalMicroSeconds& aDisplayDuration)
    1.97 +*/
    1.98 +class TSubtitleCrpMsgDrawFrame : public TSubtitleGraphicMessageBase
    1.99 +	{
   1.100 +public:
   1.101 +	TSubtitleCrpMsgDrawFrame();
   1.102 +	TSubtitleCrpMsgDrawFrame(TInt aBitmapHandle, const TRect& aDirtyRegion, const TTimeIntervalMicroSeconds& aDisplayDuration);
   1.103 +
   1.104 +public:	
   1.105 +	TInt iBitmapHandle;
   1.106 +	TRect iDirtyRegion;
   1.107 +	TTimeIntervalMicroSeconds iDisplayDuration;
   1.108 +	};
   1.109 +
   1.110 +/**
   1.111 +Request that the CRP draw the content in the current back buffer.  Assumes that the CRP
   1.112 +has been intialized with TSubtitleCrpMsgInit
   1.113 +@see CMMFSubtitleGraphic::SwapFrame(TInt aExpectedBuffer, 
   1.114 + 	TTimeIntervalMicroSeconds& aDisplayDuration, const TRect& aDirtyRegion)
   1.115 +*/
   1.116 +class TSubtitleCrpMsgRenderSwapFrame : public TSubtitleGraphicMessageBase
   1.117 +	{
   1.118 +public:
   1.119 +	TSubtitleCrpMsgRenderSwapFrame();
   1.120 +	TSubtitleCrpMsgRenderSwapFrame(TInt aExpectedFrame, const TRect& aDirtyRegion, const TTimeIntervalMicroSeconds& aDisplayDuration);
   1.121 +	
   1.122 +public:
   1.123 +	TInt iExpectedFrame;
   1.124 +	TTimeIntervalMicroSeconds iDisplayDuration;
   1.125 +	TRect iDirtyRegion;
   1.126 +	};
   1.127 +	
   1.128 +#endif