#include "FUiAnim_ControlVisualElement.h"
#include "FUiAnim_RootVisualElement.h"
#include "FUiAnim_VisualElementImpl.h"
-#include "FUiCtrl_Indicator.h"
#include "FUiCtrl_Popup.h"
using namespace Tizen::Graphics;
FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF();
- _Popup* pPopup = dynamic_cast<_Popup*>(__pControl);
- _Indicator* pIndicator = null;
- if (pPopup)
- {
- pIndicator = pPopup->GetIndicator();
- }
-
_VisualElement* pControlVisualElement = __pControl->GetVisualElement();
SysTryReturnResult(NID_UI, pControlVisualElement, E_SYSTEM, "A system error has been occurred.");
{
pParent->InsertChild(*__pDimmingElement, pControlVisualElement, false);
}
- r = __pDimmingElement->AttachChild(*pIndicator);
- _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*pIndicator);
-
- r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 4);
-
DrawBackground();
}
else
{
- r = __pDimmingElement->DetachChild(*pIndicator);
_Window* pWindow = __pControl->GetRootWindow();
_RootVisualElement* pParent = pWindow->GetRootVisualElement();
if (pParent)
#include "FUi_ControlManager.h"
#include "FUi_ControlImplManager.h"
#include "FUiCtrl_Popup.h"
+#include "FUiCtrl_Keypad.h"
#include "FUiCtrl_ContextMenu.h"
#include "FUiAnim_DisplayContextImpl.h"
#include "FUiAnimDisplayContext.h"
const char* windowName = _StringConverter::CopyToCharArrayN(name);
if (windowName)
{
- elm_win_title_set(pWinObj, windowName);
- ecore_evas_name_class_set(pEcoreEvas, windowName, windowName);
-
// For indicator active window
bool changeName = false;
if (window.IsLayoutChangable() == true)
{
- _Window* pWindow = _ControlManager::GetInstance()->GetCurrentFrame();
- if (pWindow)
+ _Keypad* pKeypad = dynamic_cast<_Keypad*>(&const_cast<_Window&>(window));
+ if (pKeypad == null)
{
- _Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
- if (pFrame)
- {
- FrameShowMode showMode = pFrame->GetShowMode(false);
- if (showMode != FRAME_SHOW_MODE_FULL_SCREEN)
- {
- changeName = true;
- }
- }
+ changeName = true;
}
}
{
SysLog(NID_UI, "[WM ROTATION]<M>");
// ecore_evas_name_class_set(pEcoreEvas, "APP_SELECTOR", "APP_SELECTOR");
+ elm_win_title_set(pWinObj, "APP_POPUP");
ecore_evas_name_class_set(pEcoreEvas, "APP_POPUP", "APP_POPUP");
}
+ else
+ {
+ elm_win_title_set(pWinObj, windowName);
+ ecore_evas_name_class_set(pEcoreEvas, windowName, windowName);
+ }
delete[] windowName;
}
r = pIndicator->ConstructControlVisualElement();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ pIndicator->__pClientMessageReceived = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _Indicator::OnClientMessageReceived, (void*) pIndicator);
+ SysTryCatch(NID_UI_CTRL, pIndicator->__pClientMessageReceived, ,E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
pIndicator->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
return pIndicator;
, __animationing(false)
, __touchPressed(false)
, __quickpanelOpened(false)
+ , __pClientMessageReceived(null)
{
}
_Indicator::~_Indicator(void)
{
+
+ if (__pClientMessageReceived)
+ {
+ ecore_event_handler_del(__pClientMessageReceived);
+ __pClientMessageReceived = null;
+ }
if (__pConnectionTimer != null)
{
__pConnectionTimer->Cancel();
}
}
+Eina_Bool
+_Indicator::OnClientMessageReceived(void* pData, int type, void* pEvent)
+{
+ SysTryReturn(NID_UI, pData, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid.");
+ SysTryReturn(NID_UI, pEvent, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid.");
+
+ _Indicator* pIndicator = static_cast<_Indicator*>(pData);
+ SysTryReturn(NID_UI_CTRL, pIndicator, EINA_FALSE, E_SYSTEM, "[E_SYSTEM] Unable to get Indicator Object.");
+
+ Ecore_X_Event_Client_Message *pClientEvent = (Ecore_X_Event_Client_Message*)(pEvent);
+
+ if (pClientEvent->message_type == ECORE_X_ATOM_E_INDICATOR_FLICK_DONE)
+ {
+ if (pIndicator->__orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (pIndicator->__portraitautohide)
+ {
+ pIndicator->ShowIndicatorEffect(true, ANIMATION_DURATION);
+ }
+ }
+ else
+ {
+ if (pIndicator->__landscapeautohide)
+ {
+ pIndicator->ShowIndicatorEffect(true, ANIMATION_DURATION);
+ }
+ }
+ }
+ return EINA_TRUE;
+}
+
HitTestResult
_Indicator::OnHitTest(const Tizen::Graphics::FloatPoint& point)
{
bool
_Indicator::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
- bool r = false;
if (IsVisible() ==false)
{
return false;
bool
_Indicator::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
{
- if (IsVisible() ==false)
+ if (IsVisible() == false)
{
return false;
}
}
FloatPoint touchPosition = source.ConvertToScreenPosition(touchinfo.GetCurrentPosition());
- int indicatorHeight = 0;
+ float indicatorHeight = 0.0f;
if (__pWindow)
{
GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorHeight);
{
_UiEventManager::GetInstance()->RemoveTouchEventListener(*this);
- if (__pAnimationTimer)
- {
- __pAnimationTimer->Cancel();
- }
- RemoveAllAnimations();
-
- Ecore_X_Window win = 0;
- if (__pWindow)
- {
- win = (Ecore_X_Window)__pWindow->GetNativeHandle();
- }
-
- if (__orientation == _CONTROL_ORIENTATION_PORTRAIT)
- {
- if (__portraitautohide)
- {
- Color bgColor(0x00000000);
- SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
-
- if (__pPortraitVisualElement)
- {
- __pPortraitVisualElement->SetShowState(false);
- ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2);
- }
- __animationing = false;
- }
- }
- else
- {
- if (__landscapeautohide)
- {
- Color bgColor(0x00000000);
- SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
-
- if (__pLandscapeVisualElement)
- {
- __pLandscapeVisualElement->SetShowState(false);
- ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2);
- }
- __animationing = false;
- }
- }
-
return;
}
#include "FUiCtrl_IndicatorManager.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_Frame.h"
-#include "FUiCtrl_Popup.h"
#include "FUiCtrl_Keypad.h"
using namespace Tizen::Base::Collection;
result r = E_SUCCESS;
_Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
- _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
_Keypad* pKeypad = dynamic_cast<_Keypad*>(pWindow);
- if ((pFrame == null) && (pPopup == null) && (pKeypad ==null))
+ if ((pFrame == null) && (pKeypad == null))
{
return E_SUCCESS;
}
IndicatorComponent* pIndicatorComponentArray = null;
_Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
- _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
_Keypad* pKeypad = dynamic_cast<_Keypad*>(pWindow);
- if ((pFrame == null) && (pPopup == null) && (pKeypad ==null))
+ if ((pFrame == null) && (pKeypad == null))
{
return E_SUCCESS;
}
#include "FUiCtrl_FrameImpl.h"
#include "FUiCtrl_MessageBoxImpl.h"
#include "FUiCtrl_Form.h"
-#include "FUiCtrl_Indicator.h"
using namespace Tizen::Graphics;
#include "FUiCtrl_PopupPresenter.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_Frame.h"
-#include "FUiCtrl_Indicator.h"
using namespace Tizen::Graphics;
, __pPopupPresenter(null)
, __bounds(0.0f, 0.0f, 0.0f, 0.0f)
, __popupResult(POPUP_RESULT_NONE)
- , __pIndicator(null)
{
- __pIndicator = _Indicator::CreateIndicator();
- SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
}
_Popup::~_Popup(void)
_pTitleTextAccessibilityElement->Activate(false);
_pTitleTextAccessibilityElement = null;
}
-
- if (__pIndicator)
- {
- __pIndicator->Destroy();
- __pIndicator = null;
- }
}
_Popup*
return _pTitleTextAccessibilityElement;
}
-_Indicator*
-_Popup::GetIndicator(void) const
-{
- return __pIndicator;
-}
-
void
_Popup::OnDraw(void)
{
SetTouchCapture(false, false);
}
- bool showstate = false;
- bool opacity = false;
- unsigned long formstyle = 0x00000000;
-
_Control* pOwner = GetOwner();
if (pOwner == null)
{
if (pForm != null)
{
SetOwner(pForm);
-
- showstate = pForm->IsIndicatorVisible();
- opacity = pForm->IsIndicatorTranslucent();
- formstyle = pForm->GetFormStyle();
}
else
{
}
else
{
- _Form* pForm = dynamic_cast<_Form*>(pOwner);
- if (pForm != null)
- {
- showstate = pForm->IsIndicatorVisible();
- opacity = pForm->IsIndicatorTranslucent();
- formstyle = pForm->GetFormStyle();
- }
- else
- {
- _Control* pParent = pOwner->GetParent();
-
- while(pParent)
- {
- pForm = dynamic_cast<_Form*>(pParent);
- if (pForm)
- {
- _Frame* pFrame = dynamic_cast<_Frame*>(pForm->GetParent());
- if (pFrame)
- {
- showstate = pForm->IsIndicatorVisible();
- opacity = pForm->IsIndicatorTranslucent();
- formstyle = pForm->GetFormStyle();
- break;
- }
- }
- pParent = pParent->GetParent();
- }
- }
-
pOwner->LockInputEvent();
}
- if (__pIndicator)
- {
- __pIndicator->AddIndicatorObject(this, GetRootWindow());
-
-
- float indicatorwidth = 0.0f;
- float indicatorheight = 0.0f;
-
- if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
- {
- indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().width;
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
- }
- else
- {
- indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().height;
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
- }
- __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, indicatorwidth, indicatorheight));
- __pIndicator->SetIndicatorShowState(showstate);
- if (opacity)
- {
- __pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_TRANSLUCENT);
- }
- else
- {
- __pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE);
- }
-
- if (formstyle & FORM_STYLE_PORTRAIT_INDICATOR)
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- __pIndicator->SetIndicatorAutoHide(false, true);
- }
- else
- {
- __pIndicator->SetIndicatorAutoHide(false, false);
- }
- }
- else if (formstyle & FORM_STYLE_INDICATOR_AUTO_HIDE)
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- __pIndicator->SetIndicatorAutoHide(true, true);
- }
- else
- {
- __pIndicator->SetIndicatorAutoHide(true, false);
- }
- }
- else
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- __pIndicator->SetIndicatorAutoHide(false, true);
- }
- else
- {
- __pIndicator->SetIndicatorAutoHide(false, false);
- }
- }
-
- __pIndicator->Activate();
- }
-
_Window::OnActivated();
}
ReleaseTouchCapture();
- if (__pIndicator)
- {
- __pIndicator->Deactivate();
- }
-
_Window::OnDeactivated();
}
result
_Popup::OnAttachingToMainTree(const _Control* pParent)
{
- _Control* pOwner = GetOwner();
- if (pOwner != null)
- {
- GetEcoreEvasMgr()->GetEcoreEvas()->SetOwner(*this, *pOwner);
- }
return _Window::OnAttachingToMainTree(pParent);
}
SysTryReturn(NID_UI_CTRL, GetVisibleState() != false, E_INVALID_OPERATION,
E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control is not 'displayable'");
- if (__pIndicator)
- {
- __pIndicator->OnAttachedToMainTree();
- }
InitializeAccessibilityElement();
result
_Popup::OnDetachingFromMainTree(void)
{
- if (__pIndicator)
- {
- __pIndicator->DeleteIndicatorObject();
- }
return _Window::OnDetachingFromMainTree();
}
_Popup::OnChangeLayout(_ControlOrientation orientation)
{
_Window::OnChangeLayout(orientation);
-
- float indicatorheight = 0.0f;
-
- const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
- const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
-
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
-
- _Form* pForm = dynamic_cast<_Form*>(GetOwner());
- if (pForm)
- {
- if (__pIndicator)
- {
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
- {
- __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, portraitSize.width, indicatorheight));
- if ((FORM_STYLE_INDICATOR & pForm->GetFormStyle()) || (FORM_STYLE_INDICATOR_AUTO_HIDE & pForm->GetFormStyle()))
- {
- __pIndicator->SetIndicatorShowState(true);
- }
- else
- {
- __pIndicator->SetIndicatorShowState(false);
- }
- }
- else
- {
- __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, landscapeSize.width, indicatorheight));
- if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & pForm->GetFormStyle())
- {
- __pIndicator->SetIndicatorShowState(true);
- }
- else
- {
- __pIndicator->SetIndicatorShowState(false);
- }
- }
- __pIndicator->OnChangeLayout(orientation);
- }
- }
}
}}} // Tizen::Ui::Controls
#include "FUiCtrl_PopupImpl.h"
#include "FUiCtrl_Popup.h"
#include "FUiCtrl_Form.h"
-#include "FUiCtrl_Indicator.h"
using namespace Tizen::Ui::Animations;
#include "FUiCtrl_Frame.h"
#include "FUiCtrl_ProgressPopup.h"
#include "FUiCtrl_ProgressPopupPresenter.h"
-#include "FUiCtrl_Indicator.h"
using namespace Tizen::Graphics;
SetTouchCapture(false, false);
}
- bool showstate = false;
- bool opacity = false;
- unsigned long formstyle = 0x00000000;
-
_Control* pOwner = GetOwner();
if (pOwner == null)
{
if (pForm != null)
{
SetOwner(pForm);
-
- showstate = pForm->IsIndicatorVisible();
- opacity = pForm->IsIndicatorTranslucent();
- formstyle = pForm->GetFormStyle();
}
else
{
}
else
{
- _Form* pForm = dynamic_cast<_Form*>(pOwner);
- if (pForm != null)
- {
- showstate = pForm->IsIndicatorVisible();
- opacity = pForm->IsIndicatorTranslucent();
- formstyle = pForm->GetFormStyle();
- }
- else
- {
- _Control* pParent = pOwner->GetParent();
-
- while(pParent)
- {
- pForm = dynamic_cast<_Form*>(pParent);
- if (pForm)
- {
- _Frame* pFrame = dynamic_cast<_Frame*>(pForm->GetParent());
- if (pFrame)
- {
- showstate = pForm->IsIndicatorVisible();
- opacity = pForm->IsIndicatorTranslucent();
- formstyle = pForm->GetFormStyle();
- break;
- }
- }
- pParent = pParent->GetParent();
- }
- }
-
pOwner->LockInputEvent();
}
- _Indicator* pIndicator = GetIndicator();
- if (pIndicator)
- {
- pIndicator->AddIndicatorObject(this, GetRootWindow());
-
- float indicatorwidth = 0.0f;
- float indicatorheight = 0.0f;
-
- if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
- {
- indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().width;
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
- }
- else
- {
- indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().height;
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
- }
-
- pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, indicatorwidth, indicatorheight));
- pIndicator->SetIndicatorShowState(showstate);
- if (opacity)
- {
- pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_TRANSLUCENT);
- }
- else
- {
- pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE);
- }
-
- if (formstyle & FORM_STYLE_PORTRAIT_INDICATOR)
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- pIndicator->SetIndicatorAutoHide(false, true);
- }
- else
- {
- pIndicator->SetIndicatorAutoHide(false, false);
- }
- }
- else if (formstyle & FORM_STYLE_INDICATOR_AUTO_HIDE)
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- pIndicator->SetIndicatorAutoHide(true, true);
- }
- else
- {
- pIndicator->SetIndicatorAutoHide(true, false);
- }
- }
- else
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- pIndicator->SetIndicatorAutoHide(false, true);
- }
- else
- {
- pIndicator->SetIndicatorAutoHide(false, false);
- }
- }
- }
-
-
if (__isTransparent)
{
_DimmingLayer* pDimmingLayer = GetDimmingLayer();
#include "FUiCtrl_FrameImpl.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_ProgressPopupImpl.h"
-#include "FUiCtrl_Indicator.h"
+
using namespace Tizen::Ui::Animations;
virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
static void OnDisconnected(Ecore_Evas *pEe);
static void OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *data, int size);
+ static Eina_Bool OnClientMessageReceived(void* pData, int type, void* pEvent);
virtual Animations::HitTestResult OnHitTest(const Tizen::Graphics::FloatPoint& point);
bool __touchPressed;
int __pointId;
int __quickpanelOpened;
+
+ Ecore_Event_Handler* __pClientMessageReceived;
}; // _Indicator
}}} // Tizen::Ui::Controls
namespace Tizen { namespace Ui { namespace Controls
{
-class _Indicator;
class _PopupPresenter;
enum PopupModalResult
Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const;
- _Indicator* GetIndicator(void) const;
Tizen::Graphics::Bitmap* GetTitleBackgroundBitmap(void);
Tizen::Graphics::Bitmap* GetTitleBackgroundEffectBitmap(void);
Tizen::Graphics::FloatRectangle __bounds;
PopupModalResult __popupResult;
-
- _Indicator* __pIndicator;
}; // _Popup