_EcoreEvas* pEcoreEvas = ::GetEcoreEvasMgr()->GetEcoreEvas();
if (pEcoreEvas)
{
+#if !defined(WINDOW_OWNEE_PREFERRED)
window.ChangeLayout(GetOrientation());
pEcoreEvas->RotateWindow(window, ::Convert(__orientationStatus));
// window.SetRotation(::Convert(__orientationStatus));
// window.Invalidate(true);
pEcoreEvas->SetWindowPreferredRotation(window, ::Convert(__orientationStatus));
+#else
+ pEcoreEvas->SetWindowPreferredRotation(window, ::Convert(__orientationStatus));
+#endif
}
#endif
}
int rotation = GetWindowRotation(*pOwnerWindow);
RotateWindow(ownee, rotation);
#else
+#if !defined(WINDOW_OWNEE_PREFERRED)
int* rotations = null;
unsigned int count = 0;
Eina_Bool ret = ecore_evas_wm_rotation_available_rotations_get(pOwnerLayer->GetEcoreEvas(), &rotations, &count);
{
SetWindowPreferredRotation(ownee, -1);
}
+#else
+ // Ownee window
+ // 1. IsLayoutChangable : true
+ // 2. IsRotationSynchronized : true
+ // -> available_set
+
+ if ((ownee.IsLayoutChangable() == true) || (ownee.IsRotationSynchronized() == true))
+ {
+ int* rotations = null;
+ unsigned int count = 0;
+ Eina_Bool ret = ecore_evas_wm_rotation_available_rotations_get(pOwnerLayer->GetEcoreEvas(), &rotations, &count);
+
+ if (ret)
+ {
+ if (rotations)
+ {
+ SetWindowAvailabledRotation(ownee, rotations, count);
+ free(rotations);
+ }
+ }
+
+ bool preferredRoation = pOwnerWindow->GetPreferredRotation();
+ if (preferredRoation == true)
+ {
+ int preferredRotation = ecore_evas_wm_rotation_preferred_rotation_get(pOwnerLayer->GetEcoreEvas());
+ SetWindowPreferredRotation(ownee, preferredRotation);
+ }
+ else
+ {
+ SetWindowPreferredRotation(ownee, -1);
+ }
+ }
+ else
+ {
+ int ownerRotation = GetWindowRotation(*pOwnerWindow);
+ SetWindowPreferredRotation(ownee, ownerRotation);
+ }
+#endif
#endif
SetLastResult(E_SUCCESS);
return;
}
+#if defined(WINDOW_OWNEE_PREFERRED)
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (!pEcoreEvas)
+ {
+ return;
+ }
+#endif
+
_ControlOrientation coreOrientation =
(status == ORIENTATION_STATUS_PORTRAIT || status == ORIENTATION_STATUS_PORTRAIT_REVERSE) ?
_CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE;
}
#endif
+#if defined(WINDOW_OWNEE_PREFERRED)
+ int owneeCount = pImpl->GetCore().GetOwneeCount();
+ for (int i = 0; i < owneeCount; i++)
+ {
+ _Window* pOwnee = pImpl->GetCore().GetOwnee(i);
+ if (pOwnee)
+ {
+ pOwnee->ChangeLayout(coreOrientation); // Need to test
+ pEcoreEvas->SetOwner(*pOwnee, pImpl->GetCore());
+ }
+ }
+
+ _Control* pParent = pImpl->GetCore().GetParent();
+ if (pParent)
+ {
+ int owneeCount = pParent->GetOwneeCount();
+ for (int i = 0; i < owneeCount; i++)
+ {
+ _Window* pOwnee = pParent->GetOwnee(i);
+ if (pOwnee)
+ {
+ pOwnee->ChangeLayout(coreOrientation); // Need to test
+ pEcoreEvas->SetOwner(*pOwnee, *pParent);
+ }
+ }
+ }
+#endif
+
// Public
if (__firePublicEvent && __statusChanged)
{
break;
}
+#if !defined(WINDOW_OWNEE_PREFERRED)
// [Ownee]
// 1. ActivateWindow
// 2. SetOwner
}
}
}
+#endif
}
#endif
}
// <3>
+ SysLog(NID_UI, "[Window Manager Rotation] ---------- Update Ownee Window : START ----------");
+
_ControlOrientation controlOrientation = (rotation == 0 || rotation == 180) ? _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE;
ChangeLayout(controlOrientation);
pEcoreEvas->RotateWindow(*this, __rotation);
Invalidate(true);
+
+ SysLog(NID_UI, "[Window Manager Rotation] ---------- Update Ownee Window : END ----------");
}
void
{
return __preferredRotation;
}
+
+#if defined(WINDOW_OWNEE_PREFERRED)
+bool
+_Window::IsRotationSynchronized(void) const
+{
+ return false;
+}
+#endif
#endif
bool
#if !defined(WINDOW_BASE_ROTATE)
, __orientationEnabled(false)
#else
+#if !defined(WINDOW_OWNEE_PREFERRED)
, __rotation(0)
+#else
+ , __rotation(-1)
+#endif
, __preferredRotation(false)
#endif
{
#define MULTI_WINDOW
#define WINDOW_BASE_ROTATE
+#define WINDOW_OWNEE_PREFERRED
namespace Tizen { namespace Ui
{
void OnWindowStateChanged(void);
void SetPreferredRotation(bool enable);
bool GetPreferredRotation(void) const;
+#if defined(WINDOW_OWNEE_PREFERRED)
+ virtual bool IsRotationSynchronized(void) const;
+#endif
#else
void SetOrientationEnabled(bool enable);
bool IsOrientationEnabled(void);