os/mm/mmplugins/mmfwplugins/src/Plugin/subtitle/common/mmfsubtitlegraphicmessage.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
/**
sl@0
    17
 @file
sl@0
    18
 @internalComponent
sl@0
    19
*/
sl@0
    20
sl@0
    21
#ifndef MMFSUBTITLEGRAPHICMESSAGE_H
sl@0
    22
#define MMFSUBTITLEGRAPHICMESSAGE_H
sl@0
    23
sl@0
    24
#include <e32std.h>
sl@0
    25
#include <s32strm.h>
sl@0
    26
sl@0
    27
/*
sl@0
    28
Defines the message classes for communication between the MMF CRP 
sl@0
    29
subtitle rendering client and the WSERV CRP graphic plug-in
sl@0
    30
*/
sl@0
    31
sl@0
    32
sl@0
    33
enum TSubtitleGraphicMessage
sl@0
    34
	{
sl@0
    35
	ESubtitleCrpMessageInit 		= 10,
sl@0
    36
	ESubtitleCrpMessageInitSimple 	= 20,
sl@0
    37
	ESubtitleCrpMessageClear 		= 30,
sl@0
    38
	ESubtitleCrpMessageDrawFrame 	= 40,	
sl@0
    39
	ESubtitleCrpMessageSwapFrame 	= 50
sl@0
    40
	};
sl@0
    41
sl@0
    42
/**
sl@0
    43
Base class for all CRP messages
sl@0
    44
*/
sl@0
    45
class TSubtitleGraphicMessageBase
sl@0
    46
{
sl@0
    47
public:
sl@0
    48
	TSubtitleGraphicMessageBase(TSubtitleGraphicMessage aMsgType);
sl@0
    49
sl@0
    50
protected:
sl@0
    51
	TInt8 iMsgType;
sl@0
    52
};
sl@0
    53
sl@0
    54
/**
sl@0
    55
Initialise the CRP
sl@0
    56
Passes two bitmap handles to the CRP
sl@0
    57
@see CMMFSubtitleGraphic::Initialize(TInt aBuffer1, TInt aBuffer2);
sl@0
    58
*/
sl@0
    59
class TSubtitleCrpMsgInit : public TSubtitleGraphicMessageBase
sl@0
    60
	{
sl@0
    61
public:
sl@0
    62
	TSubtitleCrpMsgInit();
sl@0
    63
	TSubtitleCrpMsgInit(TInt aBitmapHandle1, TInt aBitmapHandle2);
sl@0
    64
sl@0
    65
public:
sl@0
    66
	TInt iBitmapHandle1;
sl@0
    67
	TInt iBitmapHandle2;
sl@0
    68
	};
sl@0
    69
sl@0
    70
/**
sl@0
    71
Initialise the CRP
sl@0
    72
@see CMMFSubtitleGraphic::Initialize()
sl@0
    73
*/
sl@0
    74
class TSubtitleCrpMsgInitSimple : public TSubtitleGraphicMessageBase
sl@0
    75
	{
sl@0
    76
public:
sl@0
    77
	TSubtitleCrpMsgInitSimple();
sl@0
    78
	};
sl@0
    79
sl@0
    80
/**
sl@0
    81
Request that the CRP clears all content from the window
sl@0
    82
@see CMMFSubtitleGraphic::Clear()
sl@0
    83
*/
sl@0
    84
class TSubtitleCrpMsgClear : public TSubtitleGraphicMessageBase
sl@0
    85
	{
sl@0
    86
public: 
sl@0
    87
	TSubtitleCrpMsgClear();
sl@0
    88
	};
sl@0
    89
sl@0
    90
/**
sl@0
    91
Requests that the CRP draws a frame indicated by the CFBSBitmap handle provided
sl@0
    92
@see CMMFSubtitleGraphic::DrawFrame(TInt aFrameHandle, TRect& aDirtyRegion,
sl@0
    93
     TTimeIntervalMicroSeconds& aDisplayDuration)
sl@0
    94
*/
sl@0
    95
class TSubtitleCrpMsgDrawFrame : public TSubtitleGraphicMessageBase
sl@0
    96
	{
sl@0
    97
public:
sl@0
    98
	TSubtitleCrpMsgDrawFrame();
sl@0
    99
	TSubtitleCrpMsgDrawFrame(TInt aBitmapHandle, const TRect& aDirtyRegion, const TTimeIntervalMicroSeconds& aDisplayDuration);
sl@0
   100
sl@0
   101
public:	
sl@0
   102
	TInt iBitmapHandle;
sl@0
   103
	TRect iDirtyRegion;
sl@0
   104
	TTimeIntervalMicroSeconds iDisplayDuration;
sl@0
   105
	};
sl@0
   106
sl@0
   107
/**
sl@0
   108
Request that the CRP draw the content in the current back buffer.  Assumes that the CRP
sl@0
   109
has been intialized with TSubtitleCrpMsgInit
sl@0
   110
@see CMMFSubtitleGraphic::SwapFrame(TInt aExpectedBuffer, 
sl@0
   111
 	TTimeIntervalMicroSeconds& aDisplayDuration, const TRect& aDirtyRegion)
sl@0
   112
*/
sl@0
   113
class TSubtitleCrpMsgRenderSwapFrame : public TSubtitleGraphicMessageBase
sl@0
   114
	{
sl@0
   115
public:
sl@0
   116
	TSubtitleCrpMsgRenderSwapFrame();
sl@0
   117
	TSubtitleCrpMsgRenderSwapFrame(TInt aExpectedFrame, const TRect& aDirtyRegion, const TTimeIntervalMicroSeconds& aDisplayDuration);
sl@0
   118
	
sl@0
   119
public:
sl@0
   120
	TInt iExpectedFrame;
sl@0
   121
	TTimeIntervalMicroSeconds iDisplayDuration;
sl@0
   122
	TRect iDirtyRegion;
sl@0
   123
	};
sl@0
   124
	
sl@0
   125
#endif