OLD | NEW |
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" |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 FWL_ERR CFWL_WidgetMgrDelegate::OnSetCapability(uint32_t dwCapability) { | 689 FWL_ERR CFWL_WidgetMgrDelegate::OnSetCapability(uint32_t dwCapability) { |
690 m_pWidgetMgr->m_dwCapability = dwCapability; | 690 m_pWidgetMgr->m_dwCapability = dwCapability; |
691 return FWL_ERR_Succeeded; | 691 return FWL_ERR_Succeeded; |
692 } | 692 } |
693 int32_t CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) { | 693 int32_t CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) { |
694 if (!pMessage) | 694 if (!pMessage) |
695 return 0; | 695 return 0; |
696 if (!pMessage->m_pDstTarget) | 696 if (!pMessage->m_pDstTarget) |
697 return 0; | 697 return 0; |
698 IFWL_Widget* pDstWidget = pMessage->m_pDstTarget; | 698 IFWL_Widget* pDstWidget = pMessage->m_pDstTarget; |
699 IFWL_NoteThread* pNoteThread = pDstWidget->GetOwnerThread(); | 699 IFWL_Thread* pThread = pDstWidget->GetOwnerThread(); |
700 if (!pNoteThread) | 700 if (!pThread) |
701 return 0; | 701 return 0; |
702 CFWL_NoteDriver* pNoteDriver = | 702 CFWL_NoteDriver* pNoteDriver = |
703 static_cast<CFWL_NoteDriver*>(pNoteThread->GetNoteDriver()); | 703 static_cast<CFWL_NoteDriver*>(pThread->GetNoteDriver()); |
704 if (!pNoteDriver) | 704 if (!pNoteDriver) |
705 return 0; | 705 return 0; |
706 if (m_pWidgetMgr->IsThreadEnabled()) { | 706 if (m_pWidgetMgr->IsThreadEnabled()) { |
707 pMessage = static_cast<CFWL_Message*>(pMessage->Clone()); | 707 pMessage = static_cast<CFWL_Message*>(pMessage->Clone()); |
708 } | 708 } |
709 if (m_pWidgetMgr->IsFormDisabled()) { | 709 if (m_pWidgetMgr->IsFormDisabled()) { |
710 pNoteDriver->ProcessMessage(pMessage); | 710 pNoteDriver->ProcessMessage(pMessage); |
711 } else { | 711 } else { |
712 pNoteDriver->QueueMessage(pMessage); | 712 pNoteDriver->QueueMessage(pMessage); |
713 } | 713 } |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 CFX_RectF temp(m_pWidgetMgr->m_rtScreen); | 1000 CFX_RectF temp(m_pWidgetMgr->m_rtScreen); |
1001 temp.Deflate(50, 50); | 1001 temp.Deflate(50, 50); |
1002 if (!temp.Contains(r)) { | 1002 if (!temp.Contains(r)) { |
1003 return FALSE; | 1003 return FALSE; |
1004 } | 1004 } |
1005 pItem->bOutsideChanged = FALSE; | 1005 pItem->bOutsideChanged = FALSE; |
1006 } | 1006 } |
1007 #endif | 1007 #endif |
1008 return pItem->iRedrawCounter == 0; | 1008 return pItem->iRedrawCounter == 0; |
1009 } | 1009 } |
OLD | NEW |