Modified GlesVideoTexture
authorIlji Seo <ijclaire.seo@samsung.com>
Mon, 24 Jun 2013 07:50:55 +0000 (16:50 +0900)
committerIlji Seo <ijclaire.seo@samsung.com>
Mon, 24 Jun 2013 07:50:55 +0000 (16:50 +0900)
Change-Id: I3cd2c0fb0ded358fd993cb27360445e7ad6d816e
Signed-off-by: Ilji Seo <ijclaire.seo@samsung.com>
project/inc/GlesVideoTexture.h
project/src/GlesVideoTexture.cpp

index db44200..5940b9f 100644 (file)
@@ -38,7 +38,6 @@ class GlesVideoTexture
        , public Tizen::Base::Runtime::ITimerEventListener
        , public Tizen::Media::IPlayerEventListener
        , public Tizen::Graphics::Opengl::IVideoTextureUpdateListener
-       , public Tizen::Ui::Controls::IFormBackEventListener
 {
 public:
        static Tizen::App::Application* CreateInstance(void);
@@ -61,8 +60,6 @@ public:
 
        virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
 
-       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
-
        bool Draw(void);
        void Update(void);
        virtual void OnTextureUpdated(Tizen::Graphics::Opengl::VideoTexture* pVideoTexture);
@@ -112,3 +109,4 @@ private:
 };
 
 #endif // _GLES_VIDEO_TEXTURE_H_
+
index a8cdfd0..f489d51 100644 (file)
@@ -193,7 +193,7 @@ GlesVideoTexture::OnAppInitializing(AppRegistry& appRegistry)
        r = GetAppFrame()->GetFrame()->AddControl(__pForm);
        TryCatch(!IsFailed(r), delete __pForm, "GetAppFrame()->GetFrame()->AddControl(__pForm) failed.");
 
-       __pForm->SetFormBackEventListener(this);
+       __pForm->AddKeyEventListener(*this);
 
        TryCatch(InitEGL(), , "InitEGL() failed.");
 
@@ -285,6 +285,10 @@ GlesVideoTexture::OnKeyPressed(const Control& source, KeyCode keyCode)
 void
 GlesVideoTexture::OnKeyReleased(const Control& source, KeyCode keyCode)
 {
+       if (keyCode == Tizen::Ui::KEY_BACK)
+       {
+               Terminate();
+       }
 }
 
 
@@ -333,12 +337,6 @@ GlesVideoTexture::OnTimerExpired(Timer& timer)
        }
 }
 
-void
-GlesVideoTexture::OnFormBackRequested(Form& source)
-{
-       Terminate();
-}
-
 bool
 GlesVideoTexture::InitEGL(void)
 {
@@ -752,3 +750,4 @@ GlesVideoTexture::OnTextureUpdated(Tizen::Graphics::Opengl::VideoTexture* pVideo
 {
        __isVideoTextureReady = true;
 }
+