else
#endif
{
- __pLayer = _NativeLayer::CreateInstanceN();
+ __pLayer = _NativeLayer::CreateInstanceN(true);
SysAssert(__pLayer);
_GlLayer* pLayer = static_cast<_GlLayer*>(__pLayer);
, _bounds(0.0f, 0.0f, 0.0f, 0.0f)
, _pDisplayContext(null)
, __needFlush(false)
+ , __isTransparent(false)
// , __needUpdateRenderObjects(false)
// , __didSyncPresentation(false)
, __type(_LAYER_TYPE_GL)
}
_NativeLayer*
-_NativeLayer::CreateInstanceN(void)
+_NativeLayer::CreateInstanceN(bool isTransparent)
{
_GlLayer* pLayer = new (std::nothrow) _GlLayer();
if (pLayer)
{
- pLayer->Construct();
+ pLayer->Construct(isTransparent);
}
return pLayer;
}
#if defined (ENABLE_VE_EFL)
-_NativeLayer*
-_NativeLayer::CreateInstanceN(bool isMainType)
-{
- _EflLayer* pLayer = new (std::nothrow) _EflLayer(isMainType);
-
- if (pLayer)
- {
- pLayer->Construct(null);
- }
- return pLayer;
-}
+//_NativeLayer*
+//_NativeLayer::CreateInstanceN(bool isMainType)
+//{
+// _EflLayer* pLayer = new (std::nothrow) _EflLayer(isMainType);
+//
+// if (pLayer)
+// {
+// pLayer->Construct(null);
+// }
+// return pLayer;
+//}
#endif
result
-_NativeLayer::Construct(void)
+_NativeLayer::Construct(bool isTransparent)
{
FloatRectangle bounds(0.0f ,0.0f ,10.0f ,10.0f);
- _NativeWindow* pWindow = _NativeWindow::CreateNativeWindow(null, bounds, null, 0);
+ __isTransparent = isTransparent;
+ _NativeWindow* pWindow = _NativeWindow::CreateNativeWindow(null, bounds, null, 0, __isTransparent);
_isWindowOwner = true;
return Construct(pWindow);
class _NativeWindow
{
public:
- static _NativeWindow* CreateNativeWindow(const _NativeWindow* pParent, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String* pExtension, Handle handle);
+ static _NativeWindow* CreateNativeWindow(const _NativeWindow* pParent, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String* pExtension, Handle handle, bool isTransparent);
static result DestroyNativeWindow(_NativeWindow* pWindow);
Handle GetDisplay(void);
bool GetShowState(void) const;
result SetOpacity(float opacity);
float GetOpacity(void) const;
+ result SetTransparent(bool value);
bool IsMapped(void) const {return __isMapped;}
Handle GetHandle(void) const;
bool __showState;
float __opacity;
bool __isMapped;
+ bool __isTransparent;
};
namespace Tizen { namespace Ui { namespace Animations {
_NativeWindow*
-_NativeWindow::CreateNativeWindow(const _NativeWindow* pParent, const FloatRectangle& bounds, const String* pExtension, Handle handle)
+_NativeWindow::CreateNativeWindow(const _NativeWindow* pParent, const FloatRectangle& bounds, const String* pExtension, Handle handle, bool isTransparent)
{
_NativeWindow* pWindow = null;
else
{
pWindow = new (std::nothrow) _EcoreXWindow;
+ pWindow->SetTransparent(isTransparent);
pWindow->SetBounds(bounds);
pWindow->Construct();
}
, __showState(false)
, __opacity(0)
, __isMapped(false)
+ , __isTransparent(false)
{
}
return __opacity;
}
+result
+_NativeWindow::SetTransparent(bool value)
+{
+ __isTransparent = value;
+ return E_SUCCESS;
+}
+
Handle
_NativeWindow::GetHandle() const
{
Handle
_X11Window::OnConstructing()
{
-//#ifndef BUILD_UI_CORE
- Handle window = XCreateArgbWindow(null, __bounds.x, __bounds.y, __bounds.width, __bounds.height, true);
-//#else
-// Handle window = XCreateWindow(null, __bounds.x, __bounds.y, __bounds.width, __bounds.height, true);
-//#endif
+ Handle window = None;
+ if (__isTransparent == true)
+ {
+ window = XCreateArgbWindow(null, __bounds.x, __bounds.y, __bounds.width, __bounds.height, true);
+ }
+ else
+ {
+ window = XCreateWindow(null, __bounds.x, __bounds.y, __bounds.width, __bounds.height, true);
+ }
+
if (window == None)
{
return (Handle)0;
#include "FUiAnim_EflLayer.h"
#endif
#include "FUi_AccessibilityManager.h"
+#include "FUiAnim_DisplayManager.h"
+#include "FUiAnim_GlLayer.h"
using namespace Tizen::App;
using namespace Tizen::Ui::Animations;
__changingBoundsEnabled = enable;
}
+result
+_Frame::CreateLayer(void)
+{
+ _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
+ SysAssert(pDisplayManager);
+
+#if 0
+//#ifdef ENABLE_VE_EFL
+ if (__type == _WINDOW_TYPE_EFL)
+ {
+ __pLayer = _NativeLayer::CreateInstanceN(true);
+
+ SysAssert(__pLayer);
+
+ _EflLayer* pLayer = static_cast<_EflLayer*>(__pLayer);
+ SysAssert(pLayer);
+
+ int rootWindowW = 0;
+ int rootWindowH = 0;
+ ecore_x_window_size_get(ecore_x_window_root_get((Ecore_X_Window)ecore_evas_window_get(pLayer->GetEcoreEvas())), &rootWindowW, &rootWindowH);
+
+ if (IsOrientationRoot())
+ {
+ pLayer->SetSize(FloatDimension((float)rootWindowW, (float)rootWindowH));
+ }
+ else
+ {
+ pLayer->SetBounds(FloatRectangle(0.0f, 0.0f, (float)rootWindowW, (float)rootWindowH));
+ }
+
+ pLayer->SetOpacity(0);
+
+ __pRootVisualElement = __pLayer->GetRootVisualElement();
+ __pRootVisualElement->SetName(L"Root");
+
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (pEcoreEvas)
+ {
+ String osp(L"OSP_");
+ String appName = _AppInfo::GetAppName();
+ osp.Append(appName);
+
+ pEcoreEvas->SetWindowName(*this, osp);
+ }
+
+ }
+ else
+#endif
+ {
+ _NativeLayer* pLayer = _NativeLayer::CreateInstanceN(false);
+ SysAssert(pLayer);
+
+ _GlLayer* pGlLayer = static_cast<_GlLayer*>(pLayer);
+ SysAssert(pGlLayer);
+
+ int rootWindowW = 720;
+ int rootWindowH = 1280;
+
+ pGlLayer->SetBounds(FloatRectangle(0.0f, 0.0f, (float)rootWindowW, (float)rootWindowH));
+ pGlLayer->SetOpacity(0);
+
+ _RootVisualElement* pRootVE = pLayer->GetRootVisualElement();
+ pRootVE->SetName(L"Root");
+
+ SetRootVisualElement(*pRootVE);
+ SetLayer(*pLayer);
+ }
+ //need to add sub type?
+
+ return E_SUCCESS;
+}
+
Tizen::Base::Collection::IListT<_Control*>*
_Frame::GetFocusList(void) const
{
* @return instance of the native layer.
* @remarks This method make a instance of native layer by configuration.And call the Construct() method.
*/
- static _NativeLayer* CreateInstanceN(void);
+ static _NativeLayer* CreateInstanceN(bool isTransparent = false);
#if defined (ENABLE_VE_EFL)
/**
* @return instance of the native layer.
* @remarks This method make a instance of native layer by configuration.And call the Construct() method.
*/
- static _NativeLayer* CreateInstanceN(bool isMainType);
+// static _NativeLayer* CreateInstanceN(bool isMainType);
#endif
public:
*
* @see OnConstructed()
*/
- result Construct(void);
+ result Construct(bool isTransparent);
result Construct(_NativeWindow* pNativeWindow);
private:
unsigned long __id;
bool __needFlush;
+ bool __isTransparent;
// bool __needUpdateRenderObjects;
// bool __didSyncPresentation;
// Internal
void SetChangingBoundsEnabled(bool enable);
+ virtual result CreateLayer(void);
protected:
result SetPresenter(const _FramePresenter& framePresenter);