Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(964)

Side by Side Diff: xfa/fwl/core/fwl_widgetmgrimp.cpp

Issue 1921853006: More FWL interface cleanup. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fwl/core/fwl_widgetmgrimp.h" 7 #include "xfa/fwl/core/fwl_widgetmgrimp.h"
8 8
9 #include "xfa/fwl/core/cfwl_message.h" 9 #include "xfa/fwl/core/cfwl_message.h"
10 #include "xfa/fwl/core/fwl_appimp.h" 10 #include "xfa/fwl/core/fwl_appimp.h"
11 #include "xfa/fwl/core/fwl_noteimp.h" 11 #include "xfa/fwl/core/fwl_noteimp.h"
12 #include "xfa/fwl/core/fwl_targetimp.h"
13 #include "xfa/fwl/core/fwl_threadimp.h"
14 #include "xfa/fwl/core/fwl_widgetimp.h" 12 #include "xfa/fwl/core/fwl_widgetimp.h"
15 #include "xfa/fwl/core/ifwl_adapternative.h" 13 #include "xfa/fwl/core/ifwl_adapternative.h"
16 #include "xfa/fwl/core/ifwl_adapterwidgetmgr.h" 14 #include "xfa/fwl/core/ifwl_adapterwidgetmgr.h"
17 #include "xfa/fwl/core/ifwl_app.h" 15 #include "xfa/fwl/core/ifwl_app.h"
18 #include "xfa/fwl/core/ifwl_form.h" 16 #include "xfa/fwl/core/ifwl_form.h"
19 17
20 FX_BOOL FWL_UseOffscreen(IFWL_Widget* pWidget) { 18 FX_BOOL FWL_UseOffscreen(IFWL_Widget* pWidget) {
21 #if (_FX_OS_ == _FX_MACOSX_) 19 #if (_FX_OS_ == _FX_MACOSX_)
22 return FALSE; 20 return FALSE;
23 #else 21 #else
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 FWL_ERR CFWL_WidgetMgrDelegate::OnSetCapability(uint32_t dwCapability) { 687 FWL_ERR CFWL_WidgetMgrDelegate::OnSetCapability(uint32_t dwCapability) {
690 m_pWidgetMgr->m_dwCapability = dwCapability; 688 m_pWidgetMgr->m_dwCapability = dwCapability;
691 return FWL_ERR_Succeeded; 689 return FWL_ERR_Succeeded;
692 } 690 }
693 int32_t CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) { 691 int32_t CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) {
694 if (!pMessage) 692 if (!pMessage)
695 return 0; 693 return 0;
696 if (!pMessage->m_pDstTarget) 694 if (!pMessage->m_pDstTarget)
697 return 0; 695 return 0;
698 IFWL_Widget* pDstWidget = pMessage->m_pDstTarget; 696 IFWL_Widget* pDstWidget = pMessage->m_pDstTarget;
699 IFWL_Thread* pThread = pDstWidget->GetOwnerThread(); 697 IFWL_App* pThread = pDstWidget->GetOwnerThread();
700 if (!pThread) 698 if (!pThread)
701 return 0; 699 return 0;
702 CFWL_NoteDriver* pNoteDriver = 700 CFWL_NoteDriver* pNoteDriver =
703 static_cast<CFWL_NoteDriver*>(pThread->GetNoteDriver()); 701 static_cast<CFWL_NoteDriver*>(pThread->GetNoteDriver());
704 if (!pNoteDriver) 702 if (!pNoteDriver)
705 return 0; 703 return 0;
706 if (m_pWidgetMgr->IsThreadEnabled()) { 704 if (m_pWidgetMgr->IsThreadEnabled()) {
707 pMessage = static_cast<CFWL_Message*>(pMessage->Clone()); 705 pMessage = static_cast<CFWL_Message*>(pMessage->Clone());
708 } 706 }
709 if (m_pWidgetMgr->IsFormDisabled()) { 707 if (m_pWidgetMgr->IsFormDisabled()) {
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 CFX_RectF temp(m_pWidgetMgr->m_rtScreen); 998 CFX_RectF temp(m_pWidgetMgr->m_rtScreen);
1001 temp.Deflate(50, 50); 999 temp.Deflate(50, 50);
1002 if (!temp.Contains(r)) { 1000 if (!temp.Contains(r)) {
1003 return FALSE; 1001 return FALSE;
1004 } 1002 }
1005 pItem->bOutsideChanged = FALSE; 1003 pItem->bOutsideChanged = FALSE;
1006 } 1004 }
1007 #endif 1005 #endif
1008 return pItem->iRedrawCounter == 0; 1006 return pItem->iRedrawCounter == 0;
1009 } 1007 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698