00001
00002
00003
00004
00005 #ifndef __CAMERAWRAPPEREXAMPLEAPPUI_h__
00006 #define __CAMERAWRAPPEREXAMPLEAPPUI_h__
00007
00008
00009 #include <aknappui.h>
00010
00011
00012
00013
00014
00015
00016
00017 #ifdef ENABLE_CAMERA_SHUTTER
00018
00019 const TInt KStdKeyCameraFocus = 0xe2;
00020 const TInt KStdKeyCameraFocus2 = 0xeb;
00021
00022
00023 const TUint KKeyCameraShutter1 = 0xf883;
00024 const TUint KKeyCameraShutter2 = 0xf849;
00025 const TUint KKeyCameraNseries1 = 0xf881;
00026 const TUint KKeyCameraNseries2 = 0xf88c;
00027
00028 const TUint KCameraShutterKeyEventCodes[6] = {
00029 EKeyCamera,
00030 KKeyCameraShutter1,
00031 KKeyCameraShutter2,
00032 KKeyCameraNseries1,
00033 KKeyCameraNseries2,
00034 0 };
00035 #endif
00036
00037
00038
00039 class CCameraWrapperExampleAppView;
00040
00041
00042 class CCameraWrapperExampleAppUi : public CAknAppUi,
00043 public MCoeForegroundObserver
00044 {
00045 public:
00046
00047 void ConstructL ();
00048 CCameraWrapperExampleAppUi ();
00049 virtual ~CCameraWrapperExampleAppUi ();
00050
00051 private:
00052 TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
00053 void HandleCommandL (TInt aCommand );
00054 void HandleResourceChangeL(TInt aType);
00055
00056 #ifdef ENABLE_CAMERA_SHUTTER
00057 void CaptureCameraShutter(TBool aEnable);
00058 #endif
00059
00060 public:
00061 void UseOptionsExitCbaL();
00062 void UseOptionsBackCbaL();
00063 TBool IsBackCBA();
00064
00065 private:
00066 void HandleGainingForeground();
00067 void HandleLosingForeground();
00068
00069 private:
00070
00071 CCameraWrapperExampleAppView* iAppView;
00072 RArray<TInt32> iShutterKeyHandles;
00073 TBool iCameraKeyCaptured;
00074
00075 };
00076
00077 #endif // __CAMERAWRAPPEREXAMPLEAPPUI_h__
00078
00079