add SceneVisualElement, Camera prototype class
authorDae Young Ryu <karzia@samsung.com>
Fri, 22 Nov 2013 08:34:44 +0000 (17:34 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Fri, 22 Nov 2013 08:45:42 +0000 (08:45 +0000)
Change-Id: I72ca2910eb6c828bd754f31beffc24922defc320
Signed-off-by: Dae Young Ryu <karzia@samsung.com>
21 files changed:
inc/FUiAnimCamera.h [new file with mode: 0644]
inc/FUiAnimSceneVisualElement.h [new file with mode: 0644]
src/ui/CMakeLists.txt
src/ui/FUi_Control.cpp
src/ui/FUi_Window.cpp
src/ui/FUi_XUiEventManager.cpp
src/ui/animations/FUiAnimCamera.cpp [new file with mode: 0644]
src/ui/animations/FUiAnimSceneVisualElement.cpp [new file with mode: 0644]
src/ui/animations/FUiAnimVisualElement.cpp
src/ui/animations/FUiAnim_CameraImpl.cpp [new file with mode: 0644]
src/ui/animations/FUiAnim_CameraImpl.h [new file with mode: 0644]
src/ui/animations/FUiAnim_GlRenderManager.cpp
src/ui/animations/FUiAnim_Looper.cpp
src/ui/animations/FUiAnim_NativeLayer.cpp
src/ui/animations/FUiAnim_RootVisualElement.cpp
src/ui/animations/FUiAnim_View.cpp [new file with mode: 0644]
src/ui/animations/FUiAnim_View.h [new file with mode: 0644]
src/ui/animations/platform/FUiAnim_X11Window.cpp
src/ui/inc/FUiAnim_Looper.h
src/ui/inc/FUiAnim_NativeLayer.h
src/ui/inc/FUiAnim_RootVisualElement.h

diff --git a/inc/FUiAnimCamera.h b/inc/FUiAnimCamera.h
new file mode 100644 (file)
index 0000000..51b4376
--- /dev/null
@@ -0,0 +1,165 @@
+//
+// Open Service Platform
+// Copyright (c) 2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       FUiAnimCamera.h
+ * @brief      This is the header file for the Camera class.
+ *
+ * This header file contains the declarations of the Camera class.
+ */
+
+#ifndef _FUI_ANIM_CAMERA_H_
+#define _FUI_ANIM_CAMERA_H_
+
+#include <FBaseObject.h>
+
+namespace Tizen { namespace Base { class String; }}
+namespace Tizen { namespace Graphics { class FloatPoint3; }}
+
+namespace Tizen { namespace Ui { namespace Animations {
+/**
+ * @class      Camera
+ * @brief      This class is a declaration of the camera on rendering system.
+ *
+ * @since      3.0
+ *
+ * The %Camera class is is for a declaration of the camera on rendering system..
+ *
+ */
+class _OSP_EXPORT_ Camera
+       : public Tizen::Base::Object
+{
+public:
+       /**
+        * This is the default constructor for this class.
+        *
+        * @since               3.0
+        */
+       Camera(void);
+
+       /**
+        * This is copy constructor for this class.
+        * The infomation of @c rhs is shared with a copyed instance.
+        * @since               3.0
+        */
+       Camera(const Camera& rhs);
+
+       /**
+        * This is the constructor for this class.
+        *
+        * @since               3.0
+        */
+       Camera(const Tizen::Graphics::FloatPoint3& eye, const Tizen::Graphics::FloatPoint3& center, const Tizen::Graphics::FloatPoint3& up);
+
+       /**
+       * This is the destructor for this class
+       *
+       * @since 3.0
+       *
+       */
+       virtual ~Camera(void);
+
+       /**
+       * Sets the name of this instance.
+       *
+       * @since 3.0
+       *
+       * @param [in]           name                              A name of camera
+       */
+       void SetName(const Tizen::Base::String& name);
+
+       /**
+       * Sets the camera information which is the eye position, center postion and up vector.
+       *
+       * @since 3.0
+       *
+       * @param [in]           eye                               Position of eye
+       */
+       void Set(Tizen::Graphics::FloatPoint3& eye, Tizen::Graphics::FloatPoint3& center, Tizen::Graphics::FloatPoint3& up);
+
+
+       /**
+       * Sets the eye position of the camera.
+       *
+       * @since 3.0
+       *
+       * @param [in]           eye                               Position of eye
+       */
+       void SetEye(Tizen::Graphics::FloatPoint3& eye);
+
+       /**
+       * Sets the center position of the camera.
+       *
+       * @since 3.0
+       *
+       * @param [in]           center                            Position of center
+       */
+       void SetCenter(Tizen::Graphics::FloatPoint3& center);
+
+       /**
+       * Sets the up vector of the camera.
+       *
+       * @since 3.0
+       *
+       * @param [in]           up                                Position of up vector
+       */
+       void SetUp(Tizen::Graphics::FloatPoint3& up);
+
+       /**
+       * Gets the name of this instance.
+       *
+       * @since 3.0
+       *
+       * @return  The name of this instance
+       */
+       const Tizen::Base::String GetName(void) const;
+
+       /**
+       * Gets the eye position of this instance.
+       *
+       * @since 3.0
+       *
+       * @return  The eye position of this instance
+       */
+       Tizen::Graphics::FloatPoint3 GetEye(void) const;
+
+       /**
+       * Gets the center position of this instance.
+       *
+       * @since 3.0
+       *
+       * @return  The cetner position of this instance
+       */
+       Tizen::Graphics::FloatPoint3 GetCenter(void) const;
+
+       /**
+       * Gets the up vector of this instance.
+       *
+       * @since 3.0
+       *
+       * @return  The up vector of this instance
+       */
+       Tizen::Graphics::FloatPoint3 GetUp(void) const;
+
+protected:
+       class _CameraImpl* _pCameraImpl;
+       friend class _CameraImpl;
+};
+
+}}} //Tizen::Ui::Animations
+
+#endif //_FUI_ANIM_SCENE_H_
diff --git a/inc/FUiAnimSceneVisualElement.h b/inc/FUiAnimSceneVisualElement.h
new file mode 100644 (file)
index 0000000..adb0b41
--- /dev/null
@@ -0,0 +1,383 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       FUiAnimSceneVisualElement.h
+ * @brief      This is the header file for the %SceneVisualElement class.
+ *
+ * This header file contains the declarations of the %SceneVisualElement class.
+ */
+
+#ifndef _FUI_ANIM_SCENE_VISUAL_ELEMENT_H_
+#define _FUI_ANIM_SCENE_VISUAL_ELEMENT_H_
+
+#include <FBaseObject.h>
+#include <FBaseString.h>
+
+
+namespace Tizen { namespace Graphics {
+class FloatRectangle;
+class FloatMatrix4;
+class FloatPoint3;
+}}
+
+namespace Tizen { namespace Ui { namespace Animations
+{
+class DisplayContext;
+class VisualElement;
+class VisualElementSurface;
+class Camera;
+class Light;
+
+/**
+ * @class      SceneVisualElement
+ * @brief      This class is for a declaration of a new scene.
+ *
+ * @since      3.0
+ *
+ * The %SceneVisualElement class is is for a declaration of a new scene.
+ * This class has information for rendering that is the projection, camera, viewport, rendering target.
+ *
+ *
+ */
+
+class _OSP_EXPORT_ SceneVisualElement
+       : public Tizen::Base::Object
+{
+public:
+       /**
+        * This is the default constructor for this class.
+        *
+        * @since               3.0
+        */
+       SceneVisualElement(void);
+
+
+public:
+       /**
+        * Initializes this instance of %VisualElementSurface with the specified parameters.
+        * This instance is attached to the @c parent by this function.
+        * @since               3.0
+        *
+        * @param[in]   parent                          An instance of %VisualElement
+        * @exception   E_SUCCESS                       The method is successful.
+        * @remarks
+        */
+       result Construct(VisualElement& parent);
+
+       /**
+        * Initializes this instance of %VisualElementSurface with the specified parameters.
+        * This instance is attached to the @c parent by this function.
+        * @since               3.0
+        *
+        * @param[in]   parent                          An instance of %VisualElement
+        * @exception   E_SUCCESS                       The method is successful.
+        * @remarks
+        */
+       result Construct(SceneVisualElement& parent);
+
+       /**
+        * Initializes this instance of %VisualElementSurface with the specified parameters.
+        * This instance is attached to the @c display by this function.
+        * @since               3.0
+        *
+        * @param[in]   display                         An instance of %DisplayContext
+        * @exception   E_SUCCESS                       The method is successful.
+        * @remarks
+        */
+       result Construct(DisplayContext& display);
+
+       /**
+        * Set @c light of this instance.
+        *
+        * @since               3.0
+        *
+        * @param[in]   bounds                          An instance of the viewport area for rendering.
+        * @exception   E_SUCCESS                       The method is successful.
+        * @remarks
+        */
+//     void SetGlobalLight(const Light* light);
+//     const Light* GetGlobalLight(void) const;
+
+       /**
+        * Set @c projection to this instance. It is for user defined projection.
+        *
+        * @since               3.0
+        *
+        * @param[in]   projection                      A custom projection matrix.
+        * @exception   E_SUCCESS                       The method is successful.
+        * @remarks
+        */
+       result SetCustomProjection(const Tizen::Graphics::FloatMatrix4* pProjection);
+
+       /**
+        * Set camera position to this instance.
+        *
+        * @since               3.0
+        *
+        * @param[in]   eye                     A eye position.
+        * @param[in]   center          A center position.
+        * @param[in]   up                      A up vector for up-direction of the camera.
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result SetLookAt(const Tizen::Graphics::FloatPoint3& eye,const Tizen::Graphics::FloatPoint3& center, const Tizen::Graphics::FloatPoint3& up);
+
+       /**
+        * Make a orthogonal projection with the specified parameters.
+        *
+        * @since               3.0
+        *
+        * @param[in]   left            A left position
+        * @param[in]   right           A right position
+        * @param[in]   bottom          A bottom position
+        * @param[in]   top                     A top position
+        * @param[in]   near            A near position
+        * @param[in]   far                     A far position
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result MakeOrthogonalProjeciton(float left, float right, float bottom, float top, float near, float far);
+
+       /**
+        * Make a frustum projection with the specified parameters.
+        *
+        * @since               3.0
+        *
+        * @param[in]   left            A left position
+        * @param[in]   right           A right position
+        * @param[in]   bottom          A bottom position
+        * @param[in]   top                     A top position
+        * @param[in]   near            A near position
+        * @param[in]   far                     A far position
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result MakeFrustumProjeciton(float left, float right, float bottom, float top, float near, float far);
+
+       /**
+        * Make a perspective projection with the specified parameters.
+        *
+        * @since               3.0
+        *
+        * @param[in]   fovy            A angle which is field of view-y
+        * @param[in]   aspect          A aspect ratio of the top of the frustum is width/height
+        * @param[in]   nearZ           A near distance on z-axis
+        * @param[in]   farZ            A far distance on z-axis
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result MakePerspectiveProjeciton(float fovy, float aspect, float nearZ, float farZ);
+
+       /**
+        * Set a @c surface for rendering scene.
+        *
+        * @since               3.0
+        *
+        * @param[in]   surface         A surface for rendering
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result SetRenderTarget(const VisualElementSurface* surface);
+
+       /**
+        * Get a @c surface for rendering scene.
+        *
+        * @since               3.0
+        *
+        * @return a instance of the VisualElementSurface for rendering
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       VisualElementSurface* GetRenderTargetN(void) const;
+
+
+       /**
+        * Set a viewport area on the rendering target.
+        *
+        * @since               3.0
+        *
+        * @param[in]   bounds          A viewport area
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result SetViewport(const Tizen::Graphics::FloatRectangle* bounds);
+
+       /**
+        * Get a viewport area on the rendering target.
+        *
+        * @since               3.0
+        *
+        * @return      a viewport area
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       Tizen::Graphics::FloatRectangle* GetViewport(void) const;
+
+       /**
+        * Add a new view which is initialized with the specified parameters.
+        *
+        * @since               3.0
+        *
+        * @param[in]   name                    A name of a view
+        * @param[in]   camera                  A camera of a view
+        * @param[in]   viewport                A viewport area
+        * @param[in]   pRenderTarget   A surface for rendering
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result AddSubView(const Tizen::Base::String& name, const Camera* pCamera, const Tizen::Graphics::FloatMatrix4* pProjection, const Tizen::Graphics::FloatRectangle* pViewport, const VisualElementSurface* pRenderTarget);
+
+       /**
+        * Remove a view from view list.
+        *
+        * @since               3.0
+        *
+        * @param[in]   name                    A name of a view
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result RemoveSubView(const Tizen::Base::String& name);
+
+       /**
+        * Set a viewport of the specified view.
+        *
+        * @since               3.0
+        *
+        * @param[in]   name                    A view's name
+        * @param[in]   bounds                  A viewport area
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result SetSubViewViewport(const Tizen::Base::String& name, const Tizen::Graphics::FloatRectangle* pBounds);
+
+       /**
+        * Get a viewport of the specified view.
+        *
+        * @since               3.0
+        *
+        * @param[in]   name                    A view's name
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       Tizen::Graphics::FloatRectangle* GetSubViewViewport(const Tizen::Base::String& name) const;
+
+       /**
+        * Set a render target of the specified view.
+        *
+        * @since               3.0
+        *
+        * @param[in]   name                    A view's name
+        * @param[in]   surface                 A surface for rendering
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result SetSubViewRenderTarget(const Tizen::Base::String& name, const VisualElementSurface* surface);
+
+       /**
+        * Get a render target of the specified view.
+        *
+        * @since               3.0
+        *
+        * @param[in]   name                    A view's name
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       VisualElementSurface* GetSubViewRenderTargetN(const Tizen::Base::String& name) const;
+
+       /**
+        * Set a camera of the specified view.
+        *
+        * @since               3.0
+        *
+        * @param[in]   name                    A view's name
+        * @param[in]   camera                  A camera
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result SetSubViewCamera(const Tizen::Base::String& name, const Camera* camera);
+
+       /**
+        * Get a camera of the specified view.
+        *
+        * @since               3.0
+        *
+        * @param[in]   name                    A view's name
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       Camera* GetSubViewCameraN(const Tizen::Base::String& name) const;
+
+       /**
+        * Set a projection of the specified view.
+        *
+        * @since               3.0
+        *
+        * @param[in]   name                    A view's name
+        * @param[in]   pProjection             A projection
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       result SetViewProjection(const Tizen::Base::String& name, const Tizen::Graphics::FloatMatrix4* pProjection);
+
+       /**
+        * Get a projection of the specified view.
+        *
+        * @since               3.0
+        *
+        * @param[in]   name                    A view's name
+        *
+        * @exception   E_SUCCESS       The method is successful.
+        * @remarks
+        */
+       Tizen::Graphics::FloatMatrix4* GetViewProjection(const Tizen::Base::String& name) const;
+private:
+       virtual ~SceneVisualElement(void);
+
+       //
+       // The implementation of this assignment constructor is intentionally blank to prohibit assignment of objects.
+       //
+       // @since               3.0
+       //
+       SceneVisualElement& operator =(const SceneVisualElement& rhs);
+       SceneVisualElement(const SceneVisualElement& rhs);
+
+
+protected:
+       class _SceneVisualElementImpl* _pSceneVisualElementImpl;
+};             // VisualElement
+
+
+}}}            // Tizen::Ui::Animations
+
+#endif //_FUIANIMVISUALELEMENT_H_
index ce34ba3..b783c69 100644 (file)
@@ -76,9 +76,13 @@ SET (${this_target}_SOURCE_FILES
        animations/FUiAnim_INativeNode.cpp
        animations/FUiAnim_NativeLayer.cpp
        animations/FUiAnim_RootVisualElement.cpp
+       animations/FUiAnimSceneVisualElement.cpp
        animations/FUiAnim_AnimationManager.cpp
        animations/FUiAnim_TransactionNode.cpp
        animations/FUiAnim_AnimationGroupNode.cpp
+       animations/FUiAnim_CameraImpl.cpp
+       animations/FUiAnimCamera.cpp
+       animations/FUiAnim_View.cpp
        animations/FUiAnim_VisualElement.cpp
        animations/FUiAnim_VisualElementEnvironment.cpp
        animations/FUiAnim_VisualElementAnimationGroupImpl.cpp
index 74646dc..3458831 100644 (file)
@@ -3874,8 +3874,8 @@ _Control::DisposeControl(void)
        if (__pVisualElement)
        {
                __pVisualElement->Destroy();
+               __pVisualElement = null;
        }
-       __pVisualElement = null;
 
        delete __pVisualElementContentProvider;
        __pVisualElementContentProvider = null;
index bda657a..e98b7e8 100644 (file)
@@ -97,6 +97,7 @@ _Window::~_Window(void)
                __pDisplayContext = null;
        }
 
+
        if(__pLayer)
        {
                //_EflLayer* pLayer = static_cast<_EflLayer*>(__pLayer);
@@ -107,8 +108,8 @@ _Window::~_Window(void)
                {
                        __pRootVisualElement->DetachChild(*GetVisualElement());
                }
-               //__pVisualElement->Destroy();
-               //__pVisualElement = null;
+               __pVisualElement->Destroy();
+               __pVisualElement = null;
                                
                delete __pLayer;
                __pLayer = NULL;
@@ -488,8 +489,10 @@ _Window::GetNativeHandle(void) const
 #endif
        if(__pLayer)
        {
-               return static_cast<_GlLayer*>(__pLayer)->GetNativeWindow();
+       //      return static_cast<_GlLayer*>(__pLayer)->GetNativeWindow();
+               return __pLayer->GetWindowHandle();
        }
+       return 0;
 }
 
 void
index 457be2d..09d091b 100644 (file)
@@ -727,7 +727,7 @@ public:
                        {
                                _NativeLayer* pLayer = null;
                                PRINT("RAWEVENT_FLUSH() \n");
-                               if(rawEvent.data.flush.layerHandle)
+                               if(rawEvent.data.flush.layerWindowHandle)
                                {
                                        pLayer = _DisplayManager::GetInstance()->GetLayerById(rawEvent.data.flush.layerId);
 
diff --git a/src/ui/animations/FUiAnimCamera.cpp b/src/ui/animations/FUiAnimCamera.cpp
new file mode 100644 (file)
index 0000000..15ffc4c
--- /dev/null
@@ -0,0 +1,117 @@
+//
+// Open Service Platform
+// Copyright (c) 2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       FUiAnimScene.h
+ * @brief      This is the header file for the Scene class.
+ *
+ * This header file contains the declarations of the Scene class.
+ */
+
+#include <FBaseString.h>
+#include <FGrpFloatPoint3.h>
+
+#include "FUiAnim_CameraImpl.h"
+#include <FUiAnimCamera.h>
+
+
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+
+namespace Tizen { namespace Ui { namespace Animations {
+
+
+Camera::Camera(void)
+{
+       _pCameraImpl = new (std::nothrow) _CameraImpl();
+}
+
+Camera::Camera(const Camera& rhs)
+{
+       _pCameraImpl = rhs._pCameraImpl;
+       _pCameraImpl->AddRef();
+}
+
+Camera::Camera(const FloatPoint3& eye, const FloatPoint3& center, const FloatPoint3& up)
+{
+       _pCameraImpl = new (std::nothrow) _CameraImpl();
+       _pCameraImpl->Set(eye, center, up);
+}
+
+Camera::~Camera(void)
+{
+       _pCameraImpl->Release();
+       _pCameraImpl = null;
+
+}
+
+void
+Camera::SetName(const Tizen::Base::String& name)
+{
+       _pCameraImpl->SetName(name);
+}
+
+void
+Camera::Set(FloatPoint3& eye, FloatPoint3& center, FloatPoint3& up)
+{
+       _pCameraImpl->Set(eye,center,up);
+}
+
+void
+Camera::SetEye(FloatPoint3& eye)
+{
+       _pCameraImpl->SetEye(eye);
+}
+
+void
+Camera::SetCenter(FloatPoint3& center)
+{
+       _pCameraImpl->SetCenter(center);
+}
+
+void
+Camera::SetUp(FloatPoint3& up)
+{
+       _pCameraImpl->SetUp(up);
+}
+
+const Tizen::Base::String
+Camera::GetName(void) const
+{
+       return _pCameraImpl->GetName();
+}
+
+FloatPoint3
+Camera::GetEye(void) const
+{
+       return _pCameraImpl->GetEye();
+}
+
+FloatPoint3
+Camera::GetCenter(void) const
+{
+       return _pCameraImpl->GetCenter();
+}
+
+FloatPoint3
+Camera::GetUp(void) const
+{
+       return _pCameraImpl->GetUp();
+}
+
+
+}}} //Tizen::Ui::Animations
diff --git a/src/ui/animations/FUiAnimSceneVisualElement.cpp b/src/ui/animations/FUiAnimSceneVisualElement.cpp
new file mode 100644 (file)
index 0000000..86cf15c
--- /dev/null
@@ -0,0 +1,335 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       FUiAnimSceneVisualElement.h
+ * @brief      This is the header file for the %SceneVisualElement class.
+ *
+ * This header file contains the declarations of the %SceneVisualElement class.
+ */
+
+#include <FBaseObject.h>
+#include <FBaseString.h>
+#include <FGrpFloatMatrix4.h>
+#include <FGrpFloatPoint3.h>
+#include <FGrpFloatRectangle.h>
+#include <FUiAnimCamera.h>
+#include "FUiAnim_TransformMatrix3Df.h"
+#include "FUiAnim_View.h"
+#include "FUiAnim_RootVisualElement.h"
+
+#include <FUiAnimSceneVisualElement.h>
+
+#define CHECK_CONSTRUCTED \
+       SysAssertf(_pSceneVisualElementImpl != null, "Not yet constructed! Construct() should be called before use.");
+#define CHECK_NOT_CONSTRUCTED \
+       SysAssertf(_pSceneVisualElementImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class.");
+
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+
+
+
+namespace Tizen { namespace Ui { namespace Animations
+{
+
+class _SceneVisualElementImpl : public _RootVisualElement
+{
+
+};
+
+SceneVisualElement::SceneVisualElement(void)
+       :_pSceneVisualElementImpl(null)
+{
+
+}
+
+SceneVisualElement::~SceneVisualElement(void)
+{
+       delete _pSceneVisualElementImpl;
+       _pSceneVisualElementImpl = null;
+}
+
+result
+SceneVisualElement::Construct(VisualElement& parent)
+{
+       CHECK_NOT_CONSTRUCTED;
+
+       _pSceneVisualElementImpl = new (std::nothrow) _SceneVisualElementImpl;
+
+       _pSceneVisualElementImpl->Construct();
+
+       return E_SUCCESS;
+}
+
+result
+SceneVisualElement::Construct(SceneVisualElement& parent)
+{
+       CHECK_NOT_CONSTRUCTED;
+
+       _pSceneVisualElementImpl = new (std::nothrow) _SceneVisualElementImpl;
+
+       _pSceneVisualElementImpl->Construct();
+       return E_SUCCESS;
+}
+
+result
+SceneVisualElement::Construct(DisplayContext& display)
+{
+       CHECK_NOT_CONSTRUCTED;
+
+       _pSceneVisualElementImpl = new (std::nothrow) _SceneVisualElementImpl;
+
+       _pSceneVisualElementImpl->Construct();
+       return E_SUCCESS;
+}
+
+
+//result
+//SceneVisualElement::SetGlobalLight(const Light* light)
+//{
+
+//     return E_SUCCESS;
+//}
+
+result
+SceneVisualElement::SetCustomProjection(const FloatMatrix4* pProjection)
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               pView->SetProjection(pProjection);
+       }
+       return E_SUCCESS;
+}
+
+result
+SceneVisualElement::SetLookAt(const FloatPoint3& eye,const FloatPoint3& center, const FloatPoint3& up)
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               Camera camera(eye, center, up);
+               pView->SetCamera(&camera);
+       }
+       return E_SUCCESS;
+}
+
+result
+SceneVisualElement::MakeOrthogonalProjeciton(float left, float right, float bottom, float top, float near, float far)
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               _ProjectionMatrix4f proj;
+               proj.MakeToOrthogonal(left, right, bottom, top, near, far);
+               FloatMatrix4 matrix;
+               proj.CopyTo(matrix);
+
+               pView->SetProjection(&matrix);
+       }
+       return E_SUCCESS;
+}
+
+result
+SceneVisualElement::MakeFrustumProjeciton(float left, float right, float bottom, float top, float near, float far)
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+
+               _ProjectionMatrix4f proj;
+               proj.MakeToFrustum(left, right, bottom, top, near, far);
+               FloatMatrix4 matrix;
+               proj.CopyTo(matrix);
+
+               pView->SetProjection(&matrix);
+       }
+       return E_SUCCESS;
+}
+
+result
+SceneVisualElement::MakePerspectiveProjeciton(float fovy, float aspect, float nearZ, float farZ)
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               _ProjectionMatrix4f proj;
+               proj.MakeToPerspective(fovy, aspect, nearZ, farZ);
+               FloatMatrix4 matrix;
+               proj.CopyTo(matrix);
+
+               pView->SetProjection(&matrix);
+       }
+       return E_SUCCESS;
+}
+
+result
+SceneVisualElement::SetRenderTarget(const VisualElementSurface* pSurface)
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               pView->SetRenderTarget(pSurface);
+       }
+       return E_SUCCESS;
+}
+
+VisualElementSurface*
+SceneVisualElement::GetRenderTargetN(void) const
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               return pView->GetRenderTargetN();
+       }
+       return null;
+}
+
+result
+SceneVisualElement::SetViewport(const FloatRectangle* pBounds)
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               pView->SetViewport(pBounds);
+       }
+       return E_SUCCESS;
+}
+
+FloatRectangle*
+SceneVisualElement::GetViewport(void) const
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               return pView->GetViewport();
+       }
+       return null;
+}
+
+result
+SceneVisualElement::AddSubView(const String& name, const Camera* pCamera, const FloatMatrix4* pProjection, const FloatRectangle* pViewport, const VisualElementSurface* pRenderTarget)
+{
+       result r = E_SUCCESS;
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               _View* pView = new _View;
+               pView->SetCamera(pCamera);
+               pView->SetProjection(pProjection);
+               pView->SetViewport(pViewport);
+               pView->SetRenderTarget(pRenderTarget);
+
+               r = pView->AddSubView(name, pView);
+
+               pView->Release();
+       }
+       return r;
+}
+
+result
+SceneVisualElement::RemoveSubView(const String& name)
+{
+       result r = E_SUCCESS;
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               r = pView->RemoveSubView(name);
+       }
+       return r;
+}
+
+result
+SceneVisualElement::SetSubViewViewport(const String& name, const FloatRectangle* pBounds)
+{
+       result r = E_SUCCESS;
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               _View* pSubView = pView->GetSubView(name);
+               pSubView->SetViewport(pBounds);
+       }
+       return r;
+}
+
+FloatRectangle*
+SceneVisualElement::GetSubViewViewport(const String& name) const
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               _View* pSubView = pView->GetSubView(name);
+               return pSubView->GetViewport();
+       }
+       return null;
+}
+
+result
+SceneVisualElement::SetSubViewRenderTarget(const String& name, const VisualElementSurface* pSurface)
+{
+       result r = E_SUCCESS;
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               _View* pSubView = pView->GetSubView(name);
+               pSubView->SetRenderTarget(pSurface);
+       }
+       return r;
+}
+
+VisualElementSurface*
+SceneVisualElement::GetSubViewRenderTargetN(const String& name) const
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               _View* pSubView = pView->GetSubView(name);
+               return pSubView->GetRenderTargetN();
+       }
+       return null;
+}
+
+result
+SceneVisualElement::SetSubViewCamera(const String& name, const Camera* pCamera)
+{
+       result r = E_SUCCESS;
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               _View* pSubView = pView->GetSubView(name);
+               pSubView->SetCamera(pCamera);
+       }
+       return r;
+}
+
+Camera*
+SceneVisualElement::GetSubViewCameraN(const String& name) const
+{
+       _View* pView = _pSceneVisualElementImpl->GetView();
+       if(pView)
+       {
+               _View* pSubView = pView->GetSubView(name);
+               return pSubView->GetCameraN();
+       }
+       return null;
+
+}
+
+
+}}}            // Tizen::Ui::Animations
+
index cb0848d..637c9ec 100644 (file)
@@ -873,10 +873,8 @@ VisualElement::AcquirePresentationInstance(void)
         }
         if(!isUpdated)
         {
-
             // todo: when Ve isn't attached to the maintree, just update presentation without sync.(use UpdatePropertiesForRender infomation)
             //_pVisualElementImpl->Update() Sync(_pVisualElementImpl->Sync());
-
         }
 
 
diff --git a/src/ui/animations/FUiAnim_CameraImpl.cpp b/src/ui/animations/FUiAnim_CameraImpl.cpp
new file mode 100644 (file)
index 0000000..dd12725
--- /dev/null
@@ -0,0 +1,70 @@
+//
+// Open Service Platform
+// Copyright (c) 2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       FUiAnimScene.h
+ * @brief      This is the header file for the Scene class.
+ *
+ * This header file contains the declarations of the Scene class.
+ */
+
+#include <FBaseString.h>
+#include <FGrpFloatPoint3.h>
+
+#include <FUiAnimCamera.h>
+#include "FUiAnim_CameraImpl.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+
+namespace Tizen { namespace Ui { namespace Animations {
+
+
+_CameraImpl::_CameraImpl(void)
+{
+
+
+}
+
+_CameraImpl::_CameraImpl(const _CameraImpl& rhs)
+       : __name(rhs.__name)
+       , __eye(rhs.__eye)
+       , __center(rhs.__center)
+       , __up(rhs.__up)
+{
+
+}
+
+
+_CameraImpl::~_CameraImpl()
+{
+}
+
+_CameraImpl* _CameraImpl::GetInstance(Camera& rhs)
+{
+       return rhs._pCameraImpl;
+}
+
+const _CameraImpl*
+_CameraImpl::GetInstance(const Camera& rhs)
+{
+       return rhs._pCameraImpl;
+}
+
+
+}}} //Tizen::Ui::Animations
+
diff --git a/src/ui/animations/FUiAnim_CameraImpl.h b/src/ui/animations/FUiAnim_CameraImpl.h
new file mode 100644 (file)
index 0000000..225119a
--- /dev/null
@@ -0,0 +1,68 @@
+//
+// Open Service Platform
+// Copyright (c) 2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _FUI_ANIM_CAMERAIMPL_H_
+#define _FUI_ANIM_CAMERAIMPL_H_
+
+
+#include <FOspConfig.h>
+#include <FBaseString.h>
+#include <FGrpFloatPoint3.h>
+
+#include "FUiAnim_RefObject.h"
+
+
+namespace Tizen { namespace Ui { namespace Animations {
+
+class Camera;
+
+class _CameraImpl : RefObject
+{
+public:
+
+       _CameraImpl();
+       _CameraImpl(const _CameraImpl& rhs);
+       virtual ~_CameraImpl();
+       static _CameraImpl* GetInstance(Camera& rhs);
+       static const _CameraImpl* GetInstance(const Camera& rhs);
+
+       void SetName(const Tizen::Base::String& name){__name =  name;}
+       void Set(const Tizen::Graphics::FloatPoint3& eye, const Tizen::Graphics::FloatPoint3& center, const Tizen::Graphics::FloatPoint3& up)
+       {
+               __eye = eye;
+               __center = center;
+               __up = up;
+       }
+       void SetEye(const Tizen::Graphics::FloatPoint3& eye){__eye = eye;}
+       void SetCenter(const Tizen::Graphics::FloatPoint3& center){__center = __center;}
+       void SetUp(const Tizen::Graphics::FloatPoint3& up){__up = __up;}
+       const Tizen::Base::String GetName(void) const{return __name;}
+       const Tizen::Graphics::FloatPoint3& GetEye(void) const{return __eye;}
+       const Tizen::Graphics::FloatPoint3& GetCenter(void) const{return __center;}
+       const Tizen::Graphics::FloatPoint3& GetUp(void) const{return __up;}
+private:
+       Tizen::Base::String __name;
+       Tizen::Graphics::FloatPoint3 __eye;
+       Tizen::Graphics::FloatPoint3 __center;
+       Tizen::Graphics::FloatPoint3 __up;
+
+       friend class Camera;
+};
+
+}}} //namespace Tizen { namespace Ui { namespace Animations {
+
+#endif // _FUI_ANIM_CAMERAIMPL_H_
index a7afdcd..a100dc8 100644 (file)
@@ -1213,7 +1213,7 @@ _GlRenderManager::CommandHandlerInitializeGLLayer(_GlLayer* pGlLayer)
 
        // TODO: jinstar
        //////////pGlLayer->__surface = __pGlContext->CreateWindowSurface( (EGLNativeWindowType)pGlLayer->GetNativeWindow() );
-       pGlLayer->__surface = __pGlContext->CreateWindowSurface( (EGLNativeWindowType)pGlLayer->GetHandle() );
+       pGlLayer->__surface = __pGlContext->CreateWindowSurface( (EGLNativeWindowType)pGlLayer->GetWindowHandle() );
 
        PRINT(">> CommandHandlerInitializeGLLayer() surface %p \n", (void*)pGlLayer->__surface);
 #endif
index 7cfae06..d0a5b8c 100644 (file)
@@ -425,7 +425,7 @@ _Looper::PeekRawEvent(_RawEvent& rawEvent, bool consume)
                        rawEvent.type = _RawEvent::RAWEVENT_FLUSH;
                        rawEvent.timeStamp = 0; // FIXME
                        rawEvent.rawWindow = 0;
-                       rawEvent.data.flush.layerHandle = 0;
+                       rawEvent.data.flush.layerWindowHandle = 0;
                        rawEvent.data.flush.layerId = 0;
 
                        if (consume)
index 960ea71..b5744bd 100644 (file)
@@ -366,7 +366,7 @@ _NativeLayer::UpdatePresentation(void)
 }
 
 unsigned long
-_NativeLayer::GetHandle(void) const
+_NativeLayer::GetWindowHandle(void) const
 {
        return (_pWindow)?_pWindow->GetHandle():0;
 }
index 35a633c..cd84e9e 100644 (file)
@@ -31,6 +31,7 @@
 #endif
 #include "FUiAnim_Mutex.h"
 #include "FUiAnim_VisualElementEnvironment.h"
+#include "FUiAnim_View.h"
 #include "FUiAnim_RootVisualElement.h"
 #include "FUiAnim_NativeLayer.h"
 #include "FUiAnim_VisualElementImpl.h"
@@ -50,6 +51,7 @@ _RootVisualElement::_RootVisualElement(void)
        _pVisualElementImpl->__isRoot = true;
        _pVisualElementImpl->__isInternal = true;
        _pVisualElementImpl->__isImplicitAnimationEnabled = false;
+       __pView = new _View();
 }
 
 _RootVisualElement::_RootVisualElement(const _RootVisualElement& rhs)
@@ -58,16 +60,18 @@ _RootVisualElement::_RootVisualElement(const _RootVisualElement& rhs)
        , __isModel(false)
        , __pLayer(rhs.__pLayer)
 {
-
+       __pView = rhs.__pView;
+       __pView->AddRef();
 }
 
 _RootVisualElement::~_RootVisualElement(void)
 {
+       __pView->Release();
+       __pView = null;
 
        if(__pLayer)
        {
                SysLogException(NID_UI_ANIM, E_INVALID_STATE,"[E_INVALID_STATE] The RootVisualElement instance has been destroyed, but the layer information was not cleaned.");
-//             __pLayer->_pRootVisualElement = NULL;
        }
        __pLayer = NULL;
 }
diff --git a/src/ui/animations/FUiAnim_View.cpp b/src/ui/animations/FUiAnim_View.cpp
new file mode 100644 (file)
index 0000000..76dc201
--- /dev/null
@@ -0,0 +1,222 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <FBaseStringHashCodeProvider.h>
+#include <FUiAnimCamera.h>
+#include <FUiAnimVisualElementSurface.h>
+#include "FUiAnim_View.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+
+namespace Tizen { namespace Ui { namespace Animations {
+
+_View::_View()
+{
+       static StringHashCodeProvider strHashCodeProvider;
+       static ComparerT<String> comparer;
+
+       __subViews.Construct(16,0.7,strHashCodeProvider, comparer);
+}
+
+_View::~_View(void)
+{
+       IListT<_View*>* pList = __subViews.GetValuesN();
+       if(pList)
+       {
+               int count = pList->GetCount();
+               for(int i = 0 ; i < count; i++)
+               {
+                       _View* pView = null;
+                       if(pList->GetAt(i,pView) == E_SUCCESS)
+                       {
+                               if(pView)
+                               {
+                                       pView->Release();
+                               }
+                       }
+               }
+               pList->RemoveAll();
+       }
+       __subViews.RemoveAll();
+}
+
+void
+_View::SetCamera(const Camera* pCamera)
+{
+       if(pCamera) // set
+       {
+               if(__pCamera)
+               {
+                       *__pCamera = *pCamera;
+               }
+               else
+               {
+                       __pCamera = new (std::nothrow)Camera(*pCamera);
+               }
+       }
+       else // remove
+       {
+               if(__pCamera)
+               {
+                       delete __pCamera;
+                       __pCamera = null;
+               }
+       }
+}
+
+Camera*
+_View::GetCameraN(void) const
+{
+       if(__pCamera)
+       {
+               return new Camera(*__pCamera);
+       }
+       return null;
+}
+
+void
+_View::SetProjection(const Tizen::Graphics::FloatMatrix4* pProjection)
+{
+       if(pProjection) // set
+       {
+               if(__pProjection)
+               {
+                       *__pProjection = *pProjection;
+               }
+               else
+               {
+                       __pProjection = new FloatMatrix4(*pProjection);
+               }
+       }
+       else // remove
+       {
+               if(__pProjection)
+               {
+                       delete __pProjection;
+                       __pProjection = null;
+               }
+       }
+}
+
+Tizen::Graphics::FloatMatrix4*
+_View::GetProjection(void) const
+{
+       return __pProjection;
+}
+
+void
+_View::SetViewport(const Tizen::Graphics::FloatRectangle* pBounds)
+{
+       if(pBounds) // set
+       {
+               if(__pViewport)
+               {
+                       *__pViewport = *pBounds;
+               }
+               else
+               {
+                       __pViewport = new FloatRectangle(*pBounds);
+               }
+       }
+       else // remove
+       {
+               if(__pViewport)
+               {
+                       delete __pViewport;
+                       __pViewport = null;
+               }
+       }
+}
+
+Tizen::Graphics::FloatRectangle*
+_View::GetViewport(void) const
+{
+       return __pViewport;
+}
+
+result
+_View::SetRenderTarget(const VisualElementSurface* pSurface)
+{
+       if(pSurface) // set
+       {
+               if(__pRenderTarget)
+               {
+                       delete __pRenderTarget;
+               }
+               __pRenderTarget = new (std::nothrow) VisualElementSurface(*pSurface);
+
+       }
+       else // remove
+       {
+               if(__pRenderTarget)
+               {
+                       delete __pRenderTarget;
+                       __pRenderTarget = null;
+               }
+       }
+       return E_SUCCESS;
+}
+
+VisualElementSurface*
+_View::GetRenderTargetN(void)
+{
+       if(__pRenderTarget)
+       {
+               return new (std::nothrow) VisualElementSurface(*__pRenderTarget);
+       }
+       return null;
+}
+
+result
+_View::AddSubView(const Tizen::Base::String& name, _View* pView)
+{
+       if(__subViews.Add(name,pView) == E_SUCCESS)
+       {
+               pView->AddRef();
+       }
+       return E_SUCCESS;
+}
+
+result
+_View::RemoveSubView(const Tizen::Base::String& name)
+{
+       _View* pView = null;
+       if(__subViews.GetValue(name, pView) == E_SUCCESS)
+       {
+               __subViews.Remove(name);
+               if(pView)
+               {
+                       pView->Release();
+               }
+       }
+       return E_SUCCESS;
+}
+
+_View*
+_View::GetSubView(const Tizen::Base::String& name) const
+{
+       _View* pView = null;
+       if(__subViews.GetValue(name, pView) == E_SUCCESS)
+       {
+               return pView;
+       }
+       return null;
+}
+
+}}}//namespace Tizen { namespace Ui { namespace Animations {
diff --git a/src/ui/animations/FUiAnim_View.h b/src/ui/animations/FUiAnim_View.h
new file mode 100644 (file)
index 0000000..2b4c810
--- /dev/null
@@ -0,0 +1,79 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+/**
+ * @file               FUiAnim__View.h
+ * @brief              This is the header file for the _View class.
+ *
+ * This header file contains the declarations of the _View class.
+ */
+
+
+#ifndef _FUI_ANIM_INTERNAL_VIEW_H_
+#define _FUI_ANIM_INTERNAL_VIEW_H_
+
+#include <FBaseString.h>
+#include <FBaseColHashMapT.h>
+#include <FGrpFloatRectangle.h>
+#include <FGrpFloatMatrix4.h>
+
+#include "FUiAnim_RefObject.h"
+
+
+namespace Tizen { namespace Ui { namespace Animations {
+
+class VisualElementSurface;
+class Camera;
+
+class _View : public RefObject
+{
+public:
+       _View();
+
+       void SetCamera(const Camera* pCamera);
+       Camera* GetCameraN(void) const;
+
+       void SetProjection(const Tizen::Graphics::FloatMatrix4* pProjection);
+       Tizen::Graphics::FloatMatrix4* GetProjection(void) const;
+
+       void SetViewport(const Tizen::Graphics::FloatRectangle* pBounds);
+       Tizen::Graphics::FloatRectangle* GetViewport(void) const;
+
+       result SetRenderTarget(const VisualElementSurface* pSurface);
+       VisualElementSurface* GetRenderTargetN(void);
+
+       result AddSubView(const Tizen::Base::String& name, _View* pView);
+       result RemoveSubView(const Tizen::Base::String& name);
+       _View* GetSubView(const Tizen::Base::String& name) const;
+
+       bool IsValid(void){     return (__pCamera)?true:false; }
+
+protected:
+       virtual ~_View(void);
+
+private:
+       Camera* __pCamera;
+       Tizen::Graphics::FloatMatrix4* __pProjection;
+       Tizen::Graphics::FloatRectangle* __pViewport;
+       VisualElementSurface* __pRenderTarget;
+private:
+       Tizen::Base::Collection::HashMapT<Tizen::Base::String, _View*> __subViews;
+};
+
+
+}}}//namespace Tizen { namespace Ui { namespace Animations {
+
+#endif // _FUI_ANIM_INTERNAL_VIEW_H_
index 5148954..1e00ea2 100644 (file)
@@ -791,7 +791,7 @@ public:
                                if(xEvent.type == MapNotify /*|| xEvent.type == ColormapNotify*/)
                                {
                                        rawEvent.type = _RawEvent::RAWEVENT_FLUSH;
-                                       rawEvent.data.flush.layerHandle = pGlLayer->GetHandle();
+                                       rawEvent.data.flush.layerWindowHandle = pGlLayer->GetWindowHandle();
                                        rawEvent.data.flush.layerId = pGlLayer->GetId();
 
                                        sendRawEvent = true;
@@ -822,7 +822,7 @@ public:
                        _NativeLayer* pLayer = pDisplayManager->GetLayer(i);
                        if (likely(pLayer))
                        {
-                               if (pLayer->GetHandle() == window)
+                               if (pLayer->GetWindowHandle() == window)
                                {
                                        return dynamic_cast<_GlLayer*>(pLayer);
                                }
index 340bd87..ea823fe 100644 (file)
@@ -114,7 +114,7 @@ public:
                struct
                {
                        unsigned long layerId;
-                       unsigned long layerHandle;
+                       unsigned long layerWindowHandle;
                }flush;
 
        } data;
index e7812ef..e457ffb 100644 (file)
@@ -124,7 +124,7 @@ public:
     bool UpdatePresentation(void);
 
 
-       unsigned long GetHandle(void) const;
+       unsigned long GetWindowHandle(void) const;
 
        unsigned long GetId(void) const;
 
index f4dac42..28622c9 100644 (file)
@@ -18,7 +18,7 @@
  * @file               FUiAnim_RootVisualElement.h
  * @brief              This is the header file for the _RootVisualElement class.
  *
- * This header file contains the declarations of the _RotateAnimationImpl class.
+ * This header file contains the declarations of the _RootVisualElement class.
  */
 
 
@@ -36,6 +36,7 @@ class FloatPoint3;
 namespace Tizen { namespace Ui { namespace Animations
 {
 class _NativeLayer;
+class _View;
 
 class _OSP_EXPORT_ _RootVisualElement
        : public _VisualElement
@@ -94,6 +95,8 @@ public:
        Tizen::Graphics::FloatMatrix4 GetProjectionMatrix(void) const;
 
 
+       _View* GetView() const {return __pView;}
+
 protected:
        _RootVisualElement(const _RootVisualElement& rhs);
 
@@ -106,6 +109,7 @@ private:
        bool __needsSurfaceUpdate;
        bool __isModel;
        _NativeLayer* __pLayer;
+       _View* __pView;
 
 };             // _RootVisualElement