|
1 /* |
|
2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Draws to Canvas. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMMACANVASDISPLAY_H |
|
20 #define CMMACANVASDISPLAY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "cmmadisplay.h" |
|
24 #include "jni.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CFbsBitmap; |
|
28 class CMMABitmapWindow; |
|
29 //class MMAFunctionServer; |
|
30 //class MMIDCanvas; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * Display for MMIDCanvas objects. |
|
35 * |
|
36 * |
|
37 */ |
|
38 |
|
39 NONSHARABLE_CLASS(CMMACanvasDisplay): public CMMADisplay |
|
40 { |
|
41 public: // Constructors and destructors |
|
42 static CMMACanvasDisplay* NewLC(MMAFunctionServer* aEventSource , jobject obj/*MMIDCanvas* aCanvas*/); |
|
43 |
|
44 ~CMMACanvasDisplay(); // Destructor () |
|
45 |
|
46 |
|
47 public: // From MMMADisplay |
|
48 //void SourceSizeChanged(const TSize& aSourceSize); |
|
49 void SetFullScreenL(TBool aFullScreen); |
|
50 void SetDisplayLocationL(const TPoint& aPosition); |
|
51 TPoint DisplayLocation(); |
|
52 void SetWindowL(MMMADisplayWindow* aWindow); |
|
53 void SourceSizeChanged(TInt aJavaControlWidth, TInt aJavaControlHeight,TInt x, TInt y,TRect aBoundsRect); |
|
54 /*void GetWindowResources(MMMADisplayWindow* aConsumer, MMMADisplay::TThreadType aThreadType );*/ |
|
55 |
|
56 private: |
|
57 /** ask java side peer about the bound |
|
58 Returns a rectangle describing the receiver's size |
|
59 and location relative to its parent (or its display if its parent is null), |
|
60 unless the receiver is a shell. In this case, the location is relative to the display |
|
61 */ |
|
62 TRect CMMACanvasDisplay::BoundRect(); |
|
63 TRect CMMACanvasDisplay::ContainerWindowRect(); |
|
64 |
|
65 |
|
66 private: // Data |
|
67 // MMIDCanvas* iCanvas; |
|
68 |
|
69 //MMAFunctionServer* iEventSource; // not owned |
|
70 |
|
71 }; |
|
72 |
|
73 #endif // CMMACANVASDISPLAY_H |