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 "../../../foxitlib.h" | 7 #include "../../../foxitlib.h" |
8 #include "include/fwl_targetimp.h" | 8 #include "include/fwl_targetimp.h" |
9 #include "include/fwl_widgetimp.h" | 9 #include "include/fwl_widgetimp.h" |
10 #include "include/fwl_widgetmgrimp.h" | 10 #include "include/fwl_widgetmgrimp.h" |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 FX_BOOL CFWL_NoteDriver::DoWindowMove(CFWL_MsgWindowMove* pMsg, | 685 FX_BOOL CFWL_NoteDriver::DoWindowMove(CFWL_MsgWindowMove* pMsg, |
686 IFWL_Widget* pMessageForm) { | 686 IFWL_Widget* pMessageForm) { |
687 return pMsg->m_pDstTarget == pMessageForm; | 687 return pMsg->m_pDstTarget == pMessageForm; |
688 } | 688 } |
689 FX_BOOL CFWL_NoteDriver::DoDragFiles(CFWL_MsgDropFiles* pMsg, | 689 FX_BOOL CFWL_NoteDriver::DoDragFiles(CFWL_MsgDropFiles* pMsg, |
690 IFWL_Widget* pMessageForm) { | 690 IFWL_Widget* pMessageForm) { |
691 return pMsg->m_pDstTarget == pMessageForm; | 691 return pMsg->m_pDstTarget == pMessageForm; |
692 } | 692 } |
693 FX_BOOL CFWL_NoteDriver::DoMouseEx(CFWL_MsgMouse* pMsg, | 693 FX_BOOL CFWL_NoteDriver::DoMouseEx(CFWL_MsgMouse* pMsg, |
694 IFWL_Widget* pMessageForm) { | 694 IFWL_Widget* pMessageForm) { |
695 CFWL_WidgetMgr* pWidgetMgr = (CFWL_WidgetMgr*)FWL_GetWidgetMgr(); | 695 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); |
696 if (!pWidgetMgr) | 696 if (!pWidgetMgr) |
697 return FALSE; | 697 return FALSE; |
698 IFWL_Widget* pTarget = NULL; | 698 IFWL_Widget* pTarget = NULL; |
699 if (m_pGrab) | 699 if (m_pGrab) |
700 pTarget = m_pGrab; | 700 pTarget = m_pGrab; |
701 if (!pTarget) { | 701 if (!pTarget) { |
702 pTarget = | 702 pTarget = |
703 pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy); | 703 pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy); |
704 while (pTarget && pTarget->GetClassID() == FWL_CLASSHASH_Grid) { | 704 while (pTarget && pTarget->GetClassID() == FWL_CLASSHASH_Grid) { |
705 pTarget = pTarget->GetParent(); | 705 pTarget = pTarget->GetParent(); |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 return NULL; | 1086 return NULL; |
1087 return widget->GetInterface(); | 1087 return widget->GetInterface(); |
1088 } | 1088 } |
1089 FWL_ERR FWL_SetHook(IFWL_NoteDriver* driver, | 1089 FWL_ERR FWL_SetHook(IFWL_NoteDriver* driver, |
1090 FWLMessageHookCallback callback, | 1090 FWLMessageHookCallback callback, |
1091 void* info) { | 1091 void* info) { |
1092 CFWL_NoteDriver* noteDriver = static_cast<CFWL_NoteDriver*>(driver); | 1092 CFWL_NoteDriver* noteDriver = static_cast<CFWL_NoteDriver*>(driver); |
1093 noteDriver->SetHook(callback, info); | 1093 noteDriver->SetHook(callback, info); |
1094 return FWL_ERR_Succeeded; | 1094 return FWL_ERR_Succeeded; |
1095 } | 1095 } |
OLD | NEW |