2 * Copyright (c) 2009 Nokia Corporation.
\r
5 #ifndef __CAMERAWRAPPEREXAMPLEAPPUI_h__
\r
6 #define __CAMERAWRAPPEREXAMPLEAPPUI_h__
\r
9 #include <aknappui.h>
\r
11 //#define EKeyZoomIn EKeyApplicationC
\r
12 //#define EKeyZoomOut EKeyApplicationD
\r
13 //#define EKeyVolumeUp EKeyIncVolume
\r
14 //#define EKeyVolumeDown EKeyDecVolume
\r
17 #ifdef ENABLE_CAMERA_SHUTTER
\r
18 // Focus key events (shutter key pressed half-way down)
\r
19 const TInt KStdKeyCameraFocus = 0xe2;
\r
20 const TInt KStdKeyCameraFocus2 = 0xeb; // S60 3.2 and onwards
\r
22 // All known event codes used for the camera shutter key on S60 3.x devices
\r
23 const TUint KKeyCameraShutter1 = 0xf883;
\r
24 const TUint KKeyCameraShutter2 = 0xf849; // S60 3.2
\r
25 const TUint KKeyCameraNseries1 = 0xf881; // S60 3.2 Nseries
\r
26 const TUint KKeyCameraNseries2 = 0xf88c;
\r
28 const TUint KCameraShutterKeyEventCodes[6] = {
\r
29 EKeyCamera, // general camera key
\r
38 // FORWARD DECLARATIONS
\r
39 class CZXingBarcodeReaderAppView;
\r
41 // CLASS DECLARATION
\r
42 class CZXingBarcodeReaderAppUi : public CAknAppUi,
\r
43 public MCoeForegroundObserver
\r
46 // Constructors and destructor
\r
48 CZXingBarcodeReaderAppUi ();
\r
49 virtual ~CZXingBarcodeReaderAppUi ();
\r
52 TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
\r
53 void HandleCommandL (TInt aCommand );
\r
54 void HandleResourceChangeL(TInt aType);
\r
56 #ifdef ENABLE_CAMERA_SHUTTER
\r
57 void CaptureCameraShutter(TBool aEnable);
\r
61 void UseOptionsExitCbaL();
\r
62 void UseOptionsBackCbaL();
\r
65 private: // From MCoeForegroundObserver
\r
66 void HandleGainingForeground();
\r
67 void HandleLosingForeground();
\r
71 CZXingBarcodeReaderAppView* iAppView;
\r
72 RArray<TInt32> iShutterKeyHandles;
\r
73 TBool iCameraKeyCaptured;
\r
77 #endif // __CAMERAWRAPPEREXAMPLEAPPUI_h__
\r