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