| Index: xfa/fwl/core/fwl_widgetmgrimp.cpp
|
| diff --git a/xfa/fwl/core/fwl_widgetmgrimp.cpp b/xfa/fwl/core/fwl_widgetmgrimp.cpp
|
| index 730cf57aaa7b3b27ddead61c923b423f16e8f81d..8183bbe86079218818bc7c981b389f2cc4ad2a5d 100644
|
| --- a/xfa/fwl/core/fwl_widgetmgrimp.cpp
|
| +++ b/xfa/fwl/core/fwl_widgetmgrimp.cpp
|
| @@ -220,10 +220,10 @@ FX_BOOL CFWL_WidgetMgr::SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex) {
|
| }
|
| return TRUE;
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
|
| - const CFX_RectF* pRect) {
|
| +FWL_Error CFWL_WidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
|
| + const CFX_RectF* pRect) {
|
| if (!m_pAdapter)
|
| - return FWL_ERR_Indefinite;
|
| + return FWL_Error::Indefinite;
|
| IFWL_Widget* pNative = pWidget;
|
| CFX_RectF rect(*pRect);
|
| if (IsFormDisabled()) {
|
| @@ -239,7 +239,7 @@ FWL_ERR CFWL_WidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
|
| } else if (!IsAbleNative(pWidget)) {
|
| pNative = GetWidget(pWidget, FWL_WGTRELATION_SystemForm);
|
| if (!pNative)
|
| - return FWL_ERR_Indefinite;
|
| + return FWL_Error::Indefinite;
|
| pWidget->TransformTo(pNative, rect.left, rect.top);
|
| }
|
| AddRedrawCounts(pNative);
|
| @@ -374,27 +374,27 @@ FX_BOOL CFWL_WidgetMgr::IsChild(IFWL_Widget* pChild, IFWL_Widget* pParent) {
|
| } while (pTemp);
|
| return FALSE;
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::CreateWidget_Native(IFWL_Widget* pWidget) {
|
| +FWL_Error CFWL_WidgetMgr::CreateWidget_Native(IFWL_Widget* pWidget) {
|
| if (!IsAbleNative(pWidget)) {
|
| - return FWL_ERR_Succeeded;
|
| + return FWL_Error::Succeeded;
|
| }
|
| return m_pAdapter->CreateWidget(pWidget, pWidget->GetOwner());
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::DestroyWidget_Native(IFWL_Widget* pWidget) {
|
| +FWL_Error CFWL_WidgetMgr::DestroyWidget_Native(IFWL_Widget* pWidget) {
|
| if (!IsAbleNative(pWidget)) {
|
| - return FWL_ERR_Succeeded;
|
| + return FWL_Error::Succeeded;
|
| }
|
| return m_pAdapter->DestroyWidget(pWidget);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::GetWidgetRect_Native(IFWL_Widget* pWidget,
|
| - CFX_RectF& rect) {
|
| +FWL_Error CFWL_WidgetMgr::GetWidgetRect_Native(IFWL_Widget* pWidget,
|
| + CFX_RectF& rect) {
|
| if (!IsAbleNative(pWidget)) {
|
| - return FWL_ERR_Succeeded;
|
| + return FWL_Error::Succeeded;
|
| }
|
| return m_pAdapter->GetWidgetRect(pWidget, rect);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::SetWidgetRect_Native(IFWL_Widget* pWidget,
|
| - const CFX_RectF& rect) {
|
| +FWL_Error CFWL_WidgetMgr::SetWidgetRect_Native(IFWL_Widget* pWidget,
|
| + const CFX_RectF& rect) {
|
| if (FWL_UseOffscreen(pWidget)) {
|
| CFWL_WidgetMgrItem* pItem = GetWidgetMgrItem(pWidget);
|
| pItem->iRedrawCounter++;
|
| @@ -415,54 +415,54 @@ FWL_ERR CFWL_WidgetMgr::SetWidgetRect_Native(IFWL_Widget* pWidget,
|
| }
|
| return m_pAdapter->SetWidgetRect(pWidget, rect);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::SetWidgetPosition_Native(IFWL_Widget* pWidget,
|
| - FX_FLOAT fx,
|
| - FX_FLOAT fy) {
|
| +FWL_Error CFWL_WidgetMgr::SetWidgetPosition_Native(IFWL_Widget* pWidget,
|
| + FX_FLOAT fx,
|
| + FX_FLOAT fy) {
|
| return m_pAdapter->SetWidgetPosition(pWidget, fx, fy);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::SetWidgetIcon_Native(IFWL_Widget* pWidget,
|
| - const CFX_DIBitmap* pIcon,
|
| - FX_BOOL bBig) {
|
| +FWL_Error CFWL_WidgetMgr::SetWidgetIcon_Native(IFWL_Widget* pWidget,
|
| + const CFX_DIBitmap* pIcon,
|
| + FX_BOOL bBig) {
|
| return m_pAdapter->SetWidgetIcon(pWidget, pIcon, bBig);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::SetWidgetCaption_Native(
|
| +FWL_Error CFWL_WidgetMgr::SetWidgetCaption_Native(
|
| IFWL_Widget* pWidget,
|
| const CFX_WideStringC& wsCaption) {
|
| return m_pAdapter->SetWidgetCaption(pWidget, wsCaption);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::SetBorderRegion_Native(IFWL_Widget* pWidget,
|
| - CFX_Path* pPath) {
|
| +FWL_Error CFWL_WidgetMgr::SetBorderRegion_Native(IFWL_Widget* pWidget,
|
| + CFX_Path* pPath) {
|
| return m_pAdapter->SetBorderRegion(pWidget, pPath);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::ShowWidget_Native(IFWL_Widget* pWidget) {
|
| +FWL_Error CFWL_WidgetMgr::ShowWidget_Native(IFWL_Widget* pWidget) {
|
| return m_pAdapter->ShowWidget(pWidget);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::HideWidget_Native(IFWL_Widget* pWidget) {
|
| +FWL_Error CFWL_WidgetMgr::HideWidget_Native(IFWL_Widget* pWidget) {
|
| return m_pAdapter->HideWidget(pWidget);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::SetNormal_Native(IFWL_Widget* pWidget) {
|
| +FWL_Error CFWL_WidgetMgr::SetNormal_Native(IFWL_Widget* pWidget) {
|
| return m_pAdapter->SetNormal(pWidget);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::SetMaximize_Native(IFWL_Widget* pWidget) {
|
| +FWL_Error CFWL_WidgetMgr::SetMaximize_Native(IFWL_Widget* pWidget) {
|
| return m_pAdapter->SetMaximize(pWidget);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::SetMinimize_Native(IFWL_Widget* pWidget) {
|
| +FWL_Error CFWL_WidgetMgr::SetMinimize_Native(IFWL_Widget* pWidget) {
|
| return m_pAdapter->SetMinimize(pWidget);
|
| }
|
| FX_BOOL CFWL_WidgetMgr::CheckMessage_Native() {
|
| return m_pAdapter->CheckMessage();
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::DispatchMessage_Native() {
|
| +FWL_Error CFWL_WidgetMgr::DispatchMessage_Native() {
|
| return m_pAdapter->DispatchMessage();
|
| }
|
| FX_BOOL CFWL_WidgetMgr::IsIdleMessage_Native() {
|
| return m_pAdapter->IsIdleMessage();
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::Exit_Native(int32_t iExitCode) {
|
| +FWL_Error CFWL_WidgetMgr::Exit_Native(int32_t iExitCode) {
|
| return m_pAdapter->Exit(iExitCode);
|
| }
|
| -FWL_ERR CFWL_WidgetMgr::CreateWidgetWithNativeId_Native(IFWL_Widget* pWidget,
|
| - void* vp) {
|
| +FWL_Error CFWL_WidgetMgr::CreateWidgetWithNativeId_Native(IFWL_Widget* pWidget,
|
| + void* vp) {
|
| return m_pAdapter->CreateWidgetWithNativeId(pWidget, vp);
|
| }
|
| IFWL_Widget* CFWL_WidgetMgr::GetWidgetAtPoint(IFWL_Widget* parent,
|
| @@ -700,25 +700,26 @@ FX_BOOL CFWL_WidgetMgr::GetAdapterPopupPos(IFWL_Widget* pWidget,
|
| }
|
| CFWL_WidgetMgrDelegate::CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr)
|
| : m_pWidgetMgr(pWidgetMgr) {}
|
| -FWL_ERR CFWL_WidgetMgrDelegate::OnSetCapability(uint32_t dwCapability) {
|
| +FWL_Error CFWL_WidgetMgrDelegate::OnSetCapability(uint32_t dwCapability) {
|
| m_pWidgetMgr->m_dwCapability = dwCapability;
|
| - return FWL_ERR_Succeeded;
|
| + return FWL_Error::Succeeded;
|
| }
|
| -int32_t CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) {
|
| +
|
| +void CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) {
|
| if (!pMessage)
|
| - return 0;
|
| + return;
|
| if (!pMessage->m_pDstTarget)
|
| - return 0;
|
| + return;
|
|
|
| IFWL_Widget* pDstWidget = pMessage->m_pDstTarget;
|
| IFWL_App* pApp = pDstWidget->GetOwnerApp();
|
| if (!pApp)
|
| - return 0;
|
| + return;
|
|
|
| CFWL_NoteDriver* pNoteDriver =
|
| static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver());
|
| if (!pNoteDriver)
|
| - return 0;
|
| + return;
|
|
|
| if (m_pWidgetMgr->IsThreadEnabled())
|
| pMessage = static_cast<CFWL_Message*>(pMessage->Clone());
|
| @@ -729,23 +730,23 @@ int32_t CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) {
|
|
|
| #if (_FX_OS_ == _FX_MACOSX_)
|
| CFWL_NoteLoop* pTopLoop = pNoteDriver->GetTopLoop();
|
| - if (pTopLoop) {
|
| + if (pTopLoop)
|
| pNoteDriver->UnqueueMessage(pTopLoop);
|
| - }
|
| #endif
|
| - if (m_pWidgetMgr->IsThreadEnabled()) {
|
| +
|
| + if (m_pWidgetMgr->IsThreadEnabled())
|
| pMessage->Release();
|
| - }
|
| - return FWL_ERR_Succeeded;
|
| +
|
| + return;
|
| }
|
|
|
| -FWL_ERR CFWL_WidgetMgrDelegate::OnDrawWidget(IFWL_Widget* pWidget,
|
| - CFX_Graphics* pGraphics,
|
| - const CFX_Matrix* pMatrix) {
|
| +FWL_Error CFWL_WidgetMgrDelegate::OnDrawWidget(IFWL_Widget* pWidget,
|
| + CFX_Graphics* pGraphics,
|
| + const CFX_Matrix* pMatrix) {
|
| if (!pWidget)
|
| - return FWL_ERR_Indefinite;
|
| + return FWL_Error::Indefinite;
|
| if (!pGraphics)
|
| - return FWL_ERR_Indefinite;
|
| + return FWL_Error::Indefinite;
|
|
|
| CFX_Graphics* pTemp = DrawWidgetBefore(pWidget, pGraphics, pMatrix);
|
| CFX_RectF clipCopy;
|
| @@ -753,7 +754,7 @@ FWL_ERR CFWL_WidgetMgrDelegate::OnDrawWidget(IFWL_Widget* pWidget,
|
| clipCopy.left = clipCopy.top = 0;
|
| if (bUseOffscreenDirect(pWidget)) {
|
| DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix);
|
| - return FWL_ERR_Succeeded;
|
| + return FWL_Error::Succeeded;
|
| }
|
| CFX_RectF clipBounds;
|
|
|
| @@ -787,7 +788,7 @@ FWL_ERR CFWL_WidgetMgrDelegate::OnDrawWidget(IFWL_Widget* pWidget,
|
|
|
| DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix);
|
| m_pWidgetMgr->ResetRedrawCounts(pWidget);
|
| - return FWL_ERR_Succeeded;
|
| + return FWL_Error::Succeeded;
|
| }
|
|
|
| void CFWL_WidgetMgrDelegate::DrawChild(IFWL_Widget* parent,
|
|
|