author | Shimizu Satoshi <s_shimizu@isb.co.jp> |
Tue, 19 Oct 2010 11:48:59 +0900 | |
branch | RCL_3 |
changeset 64 | 92a82bc706f7 |
parent 9 | 9ae0fe04e757 |
permissions | -rw-r--r-- |
64
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
2 |
// All rights reserved. |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
3 |
// This component and the accompanying materials are made available |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
4 |
// under the terms of the License "Symbian Foundation License v1.0" |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
5 |
// which accompanies this distribution, and is available |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
7 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
8 |
// Initial Contributors: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
9 |
// Nokia Corporation - initial contribution. |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
10 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
11 |
// Contributors: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
12 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
13 |
// Description: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
14 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
15 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
16 |
#include <eikenv.h> |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
17 |
#include <TestCameraApp.rsg> |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
18 |
#include "TestCameraApp.h" |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
19 |
#include "TestCameraApp.hrh" |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
20 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
21 |
const TInt KMaxErrLength=50; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
22 |
_LIT(KErrorFormat,"Error - %d (%S)"); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
23 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
24 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
25 |
// CTCamAppUi |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
26 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
27 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
28 |
void CTCamAppUi::ConstructL() |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
29 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
30 |
RDebug::Print(_L("CTCamAppUi::ConstructL()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
31 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
32 |
BaseConstructL(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
33 |
iAppView = new(ELeave) CTCamAppView; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
34 |
iAppView->ConstructL(ClientRect()); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
35 |
AddToStackL(iAppView); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
36 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
37 |
RDebug::Print(_L("CTCamAppUi::ConstructL() CCamera::NewL()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
38 |
iCamera = CCamera::NewL(*this,0); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
39 |
RDebug::Print(_L("CTCamAppUi::ConstructL() CCamera::NewL()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
40 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
41 |
RDebug::Print(_L("CTCamAppUi::ConstructL() iCamera->Reserve()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
42 |
iCamera->Reserve(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
43 |
RDebug::Print(_L("CTCamAppUi::ConstructL() iCamera->Reserve()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
44 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
45 |
RDebug::Print(_L("CTCamAppUi::ConstructL()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
46 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
47 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
48 |
CTCamAppUi::~CTCamAppUi() |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
49 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
50 |
RDebug::Print(_L("CTCamAppUi::~CTCamAppUi()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
51 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
52 |
RDebug::Print(_L("CTCamAppUi::~CTCamAppUi() iCamera->Release()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
53 |
iCamera->Release(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
54 |
RDebug::Print(_L("CTCamAppUi::~CTCamAppUi() iCamera->Release()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
55 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
56 |
RDebug::Print(_L("CTCamAppUi::~CTCamAppUi() delete iCamera_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
57 |
delete iCamera; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
58 |
RDebug::Print(_L("CTCamAppUi::~CTCamAppUi() delete iCamera_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
59 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
60 |
if (iAppView) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
61 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
62 |
RemoveFromStack(iAppView); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
63 |
delete iAppView; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
64 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
65 |
RDebug::Print(_L("CTCamAppUi::~CTCamAppUi()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
66 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
67 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
68 |
void CTCamAppUi::HandleCommandL(TInt aCommand) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
69 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
70 |
switch (aCommand) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
71 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
72 |
case ETCamCmdPowerOn: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
73 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdPowerOn)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
74 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
75 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->PowerOn()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
76 |
iCamera->PowerOn(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
77 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->PowerOn()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
78 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
79 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
80 |
case ETCamCmdPowerOff: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
81 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdPowerOff)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
82 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
83 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->PowerOff()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
84 |
iCamera->PowerOff(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
85 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->PowerOff()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
86 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
87 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
88 |
case ETCamCmdViewFinder: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
89 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdViewFinder)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
90 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
91 |
ViewFinderL(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
92 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
93 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
94 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
95 |
case ETCamCmdCaptureImage: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
96 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdCaptureImage)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
97 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
98 |
CaptureImageL(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
99 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
100 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
101 |
case ETCamCmdCaptureVideo: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
102 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdCaptureVideo)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
103 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
104 |
CaptureVideoL(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
105 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
106 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
107 |
case ETCamCmdIncBrightness: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
108 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdIncBrightness)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
109 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
110 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
111 |
iCamera->SetBrightnessL(iCamera->Brightness() + 10); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
112 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
113 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
114 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
115 |
case ETCamCmdIncContrast: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
116 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdIncContrast)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
117 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
118 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
119 |
iCamera->SetContrastL(iCamera->Contrast() + 10); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
120 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
121 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
122 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
123 |
case ETCamCmdDecBrightness: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
124 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdDecBrightness)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
125 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
126 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
127 |
iCamera->SetBrightnessL(iCamera->Brightness() - 10); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
128 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
129 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
130 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
131 |
case ETCamCmdDecContrast: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
132 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdDecContrast)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
133 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
134 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
135 |
iCamera->SetContrastL(iCamera->Contrast() - 10); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
136 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
137 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
138 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
139 |
case ETCamCmdResetBrightness: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
140 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdResetBrightness)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
141 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
142 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
143 |
iCamera->SetBrightnessL(0); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
144 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
145 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
146 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
147 |
case ETCamCmdResetContrast: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
148 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdResetContrast)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
149 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
150 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
151 |
iCamera->SetContrastL(0); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
152 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
153 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
154 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
155 |
case EAknSoftkeyBack: |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
156 |
RDebug::Print(_L("CTCamAppUi::HandleCommandL(EAknSoftkeyBack)")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
157 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
158 |
Exit(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
159 |
break; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
160 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
161 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
162 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
163 |
void CTCamAppUi::ViewFinderL() |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
164 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
165 |
TSize imageSize; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
166 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
167 |
RDebug::Print(_L("CTCamAppUi::ViewFinderL() iCamera->EnumerateCaptureSizes()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
168 |
iCamera->EnumerateCaptureSizes(imageSize,1,CCamera::EFormatFbsBitmapColor16M); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
169 |
RDebug::Print(_L("CTCamAppUi::ViewFinderL() iCamera->EnumerateCaptureSizes()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
170 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
171 |
const TPoint pos = iAppView->DrawBorders(imageSize); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
172 |
iScreenRect.SetRect(pos, imageSize); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
173 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
174 |
TRect clipRect; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
175 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
176 |
if (!iCamera->ViewFinderActive()) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
177 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
178 |
iCamera->StartViewFinderDirectL(iCoeEnv->WsSession(),*iCoeEnv->ScreenDevice(),*iAppView->DrawableWindow(),iScreenRect, clipRect); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
179 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
180 |
else |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
181 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
182 |
// RDebug::Print(_L("CTCamAppUi::ViewFinderL() iCamera->StopViewFinder()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
183 |
// iCamera->StopViewFinder(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
184 |
// RDebug::Print(_L("CTCamAppUi::ViewFinderL() iCamera->StopViewFinder()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
185 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
186 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
187 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
188 |
void CTCamAppUi::CaptureImageL() |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
189 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
190 |
TSize size; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
191 |
RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->EnumerateCaptureSizes()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
192 |
iCamera->EnumerateCaptureSizes(size,1,CCamera::EFormatFbsBitmapColor16M); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
193 |
RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->EnumerateCaptureSizes()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
194 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
195 |
RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->PrepareImageCaptureL()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
196 |
iCamera->PrepareImageCaptureL(CCamera::EFormatFbsBitmapColor16M,1); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
197 |
RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->PrepareImageCaptureL()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
198 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
199 |
RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->CaptureImage()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
200 |
iCamera->CaptureImage(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
201 |
RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->CaptureImage()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
202 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
203 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
204 |
void CTCamAppUi::CaptureVideoL() |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
205 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
206 |
if (!iCamera->VideoCaptureActive()) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
207 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
208 |
TSize size; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
209 |
TReal32 rate = 0; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
210 |
iCamera->EnumerateVideoFrameSizes(size,0,CCamera::EFormatFbsBitmapColor16M); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
211 |
iCamera->EnumerateVideoFrameRates(rate,0,CCamera::EFormatFbsBitmapColor16M,0); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
212 |
iCamera->PrepareVideoCaptureL(CCamera::EFormatFbsBitmapColor16M,0,0,2,1); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
213 |
iCamera->StartVideoCapture(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
214 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
215 |
else |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
216 |
iCamera->StopVideoCapture(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
217 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
218 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
219 |
void CTCamAppUi::ReserveComplete(TInt /*aError*/) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
220 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
221 |
RDebug::Print(_L("CTCamAppUi::ReserveComplete()")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
222 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
223 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
224 |
void CTCamAppUi::PowerOnComplete(TInt /*aError*/) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
225 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
226 |
RDebug::Print(_L("CTCamAppUi::PowerOnComplete()")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
227 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
228 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
229 |
void CTCamAppUi::ViewFinderFrameReady(CFbsBitmap& /*aFrame*/) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
230 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
231 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
232 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
233 |
void CTCamAppUi::ImageReady(CFbsBitmap* aBitmap,HBufC8* /*aData*/,TInt aError) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
234 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
235 |
RDebug::Print(_L("CTCamAppUi::ImageReady()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
236 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
237 |
TBuf<KMaxErrLength> msgBuffer; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
238 |
_LIT(KErrMessage,"CTCamAppUi::ImageReady"); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
239 |
if (aBitmap) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
240 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
241 |
iAppView->DrawImage(aBitmap, iScreenRect); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
242 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
243 |
if (aError) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
244 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
245 |
msgBuffer.Format(KErrorFormat,aError,&KErrMessage); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
246 |
iEikonEnv->InfoMsg(msgBuffer); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
247 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
248 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
249 |
RDebug::Print(_L("CTCamAppUi::ImageReady()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
250 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
251 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
252 |
void CTCamAppUi::FrameBufferReady(MFrameBuffer* aFrameBuffer,TInt aError) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
253 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
254 |
RDebug::Print(_L("CTCamAppUi::FrameBufferReady()_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
255 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
256 |
TBuf<KMaxErrLength> msgBuffer; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
257 |
_LIT(KErrMessage,"CTCamAppUi::FrameBufferReady"); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
258 |
if (aError) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
259 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
260 |
msgBuffer.Format(KErrorFormat,aError,&KErrMessage); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
261 |
iEikonEnv->InfoMsg(msgBuffer); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
262 |
return; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
263 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
264 |
TRAPD(error,iAppView->DrawImage(aFrameBuffer->FrameL(0), iScreenRect)); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
265 |
aFrameBuffer->Release(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
266 |
if (error) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
267 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
268 |
msgBuffer.Format(KErrorFormat,error,&KErrMessage); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
269 |
iEikonEnv->InfoMsg(msgBuffer); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
270 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
271 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
272 |
RDebug::Print(_L("CTCamAppUi::FrameBufferReady()_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
273 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
274 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
275 |
//_LIT(KContrastDialogTitle,"Contrast"); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
276 |
//_LIT(KBrightnessDialogTitle,"Brightness"); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
277 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
278 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
279 |
// CTCamAppView |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
280 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
281 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
282 |
CTCamAppView::CTCamAppView(): |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
283 |
CCoeControl() |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
284 |
{} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
285 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
286 |
void CTCamAppView::ConstructL(const TRect& aRect) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
287 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
288 |
CreateWindowL(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
289 |
SetRect(aRect); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
290 |
EnableDragEvents(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
291 |
ActivateL(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
292 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
293 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
294 |
CTCamAppView::~CTCamAppView() |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
295 |
{} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
296 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
297 |
void CTCamAppView::DrawImage(CFbsBitmap* aImage, TRect aScreenRect) const |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
298 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
299 |
RDebug::Print(_L("aImage->DataAddress() = %d"),aImage->DataAddress()); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
300 |
// view position setting for test application |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
301 |
RDebug::Print(_L("Set view position_S")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
302 |
TRect wRect = aScreenRect; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
303 |
wRect.iTl.iY = 123; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
304 |
wRect.iBr.iY = 244; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
305 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
306 |
RDebug::Print(_L("Set view position_E")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
307 |
// draw bitmap |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
308 |
CWindowGc& gc = SystemGc(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
309 |
if (IsReadyToDraw()) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
310 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
311 |
gc.Activate(Window()); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
312 |
TBool back = IsBackedUp(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
313 |
if (!back) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
314 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
315 |
Window().Invalidate(wRect); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
316 |
Window().BeginRedraw(wRect); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
317 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
318 |
gc.DrawBitmap(wRect, aImage); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
319 |
if (!back) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
320 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
321 |
Window().EndRedraw(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
322 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
323 |
gc.Deactivate(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
324 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
325 |
iCoeEnv->WsSession().Flush(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
326 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
327 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
328 |
void CTCamAppView::Draw(const TRect& /*aRect*/) const |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
329 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
330 |
CWindowGc& gc = SystemGc(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
331 |
TRect drawRect(Rect()); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
332 |
drawRect.Shrink(1,1); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
333 |
gc.DrawRect(drawRect); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
334 |
gc.Clear(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
335 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
336 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
337 |
TPoint CTCamAppView::DrawBorders(const TSize& aSize) const |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
338 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
339 |
CWindowGc& gc = SystemGc(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
340 |
gc.Activate(Window()); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
341 |
TRect drawRect(Rect()); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
342 |
TPoint pos; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
343 |
pos.iX = (drawRect.iBr.iX - aSize.iWidth) / 2; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
344 |
pos.iY = ((drawRect.iBr.iY + 122) - aSize.iHeight) / 2; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
345 |
TRect border(pos,aSize); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
346 |
border.Grow(1,1); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
347 |
gc.SetPenColor(KRgbBlack); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
348 |
gc.DrawRect(border); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
349 |
gc.Deactivate(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
350 |
iCoeEnv->WsSession().Flush(); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
351 |
return pos; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
352 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
353 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
354 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
355 |
// CTCamDocument |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
356 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
357 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
358 |
CTCamDocument::CTCamDocument(CEikApplication& aApp) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
359 |
: CAknDocument(aApp) |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
360 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
361 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
362 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
363 |
CEikAppUi* CTCamDocument::CreateAppUiL() |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
364 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
365 |
RDebug::Print(_L("CTCamDocument::CreateAppUiL()")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
366 |
return (static_cast<CEikAppUi*>(new (ELeave) CTCamAppUi)); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
367 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
368 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
369 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
370 |
// CTCamApp |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
371 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
372 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
373 |
TUid CTCamApp::AppDllUid() const |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
374 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
375 |
return TUid::Uid(KUidTestCameraApp); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
376 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
377 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
378 |
CApaDocument* CTCamApp::CreateDocumentL() |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
379 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
380 |
// return new(ELeave) CTCamDocument(*this); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
381 |
RDebug::Print(_L("CTCamApp::CreateDocumentL()")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
382 |
return (static_cast<CApaDocument*>(new(ELeave) CTCamDocument(*this))); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
383 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
384 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
385 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
386 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
387 |
// Base factory function |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
388 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
389 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
390 |
#include <eikstart.h> |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
391 |
LOCAL_C CApaApplication* NewApplication() |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
392 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
393 |
RDebug::Print(_L("CApaApplication* NewApplication()")); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
394 |
return new CTCamApp; |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
395 |
} |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
396 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
397 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
398 |
// EXE Entry point |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
399 |
// |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
400 |
|
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
401 |
GLDEF_C TInt E32Main() |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
402 |
{ |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
403 |
return EikStart::RunApplication(NewApplication); |
92a82bc706f7
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents:
9
diff
changeset
|
404 |
} |