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