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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "xfa/src/foxitlib.h" | 9 #include "xfa/src/foxitlib.h" |
10 #include "xfa/src/fwl/src/core/include/fwl_targetimp.h" | 10 #include "xfa/src/fwl/src/core/include/fwl_targetimp.h" |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 rtPopup.Set(rtAnchor.left, rtAnchor.top - rtPopup.height, rtPopup.width, | 796 rtPopup.Set(rtAnchor.left, rtAnchor.top - rtPopup.height, rtPopup.width, |
797 rtPopup.height); | 797 rtPopup.height); |
798 } else { | 798 } else { |
799 rtPopup.Set(rtAnchor.left, rtAnchor.bottom(), rtPopup.width, | 799 rtPopup.Set(rtAnchor.left, rtAnchor.bottom(), rtPopup.width, |
800 rtPopup.height); | 800 rtPopup.height); |
801 } | 801 } |
802 rtPopup.Offset(fx, fy); | 802 rtPopup.Offset(fx, fy); |
803 return TRUE; | 803 return TRUE; |
804 } | 804 } |
805 FX_BOOL CFWL_WidgetImp::GetScreenSize(FX_FLOAT& fx, FX_FLOAT& fy) { | 805 FX_BOOL CFWL_WidgetImp::GetScreenSize(FX_FLOAT& fx, FX_FLOAT& fy) { |
806 IFWL_AdapterNative* pNative = FWL_GetAdapterNative(); | 806 return FALSE; |
807 IFWL_AdapterMonitorMgr* pMonitorMgr = pNative->GetMonitorMgr(); | |
808 if (!pMonitorMgr) | |
809 return FALSE; | |
810 FWL_HMONITOR hMonitor = pMonitorMgr->GetMonitorByPoint(fx, fy); | |
811 pMonitorMgr->GetMonitorSize(hMonitor, fx, fy); | |
812 return TRUE; | |
813 } | 807 } |
814 void CFWL_WidgetImp::RegisterEventTarget(IFWL_Widget* pEventSource, | 808 void CFWL_WidgetImp::RegisterEventTarget(IFWL_Widget* pEventSource, |
815 FX_DWORD dwFilter) { | 809 FX_DWORD dwFilter) { |
816 IFWL_NoteThread* pThread = GetOwnerThread(); | 810 IFWL_NoteThread* pThread = GetOwnerThread(); |
817 if (!pThread) | 811 if (!pThread) |
818 return; | 812 return; |
819 IFWL_NoteDriver* pNoteDriver = pThread->GetNoteDriver(); | 813 IFWL_NoteDriver* pNoteDriver = pThread->GetNoteDriver(); |
820 if (!pNoteDriver) | 814 if (!pNoteDriver) |
821 return; | 815 return; |
822 pNoteDriver->RegisterEventTarget(m_pInterface, pEventSource, dwFilter); | 816 pNoteDriver->RegisterEventTarget(m_pInterface, pEventSource, dwFilter); |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 FWL_ERR FWL_EnabelWidget(IFWL_Widget* widget, FX_BOOL bEnable) { | 1084 FWL_ERR FWL_EnabelWidget(IFWL_Widget* widget, FX_BOOL bEnable) { |
1091 widget->SetStates(FWL_WGTSTATE_Disabled, !bEnable); | 1085 widget->SetStates(FWL_WGTSTATE_Disabled, !bEnable); |
1092 IFWL_WidgetMgr* widgetMgr = FWL_GetWidgetMgr(); | 1086 IFWL_WidgetMgr* widgetMgr = FWL_GetWidgetMgr(); |
1093 IFWL_Widget* child = widgetMgr->GetWidget(widget, FWL_WGTRELATION_FirstChild); | 1087 IFWL_Widget* child = widgetMgr->GetWidget(widget, FWL_WGTRELATION_FirstChild); |
1094 while (child) { | 1088 while (child) { |
1095 FWL_EnabelWidget(child, bEnable); | 1089 FWL_EnabelWidget(child, bEnable); |
1096 child = widgetMgr->GetWidget(child, FWL_WGTRELATION_NextSibling); | 1090 child = widgetMgr->GetWidget(child, FWL_WGTRELATION_NextSibling); |
1097 } | 1091 } |
1098 return FWL_ERR_Succeeded; | 1092 return FWL_ERR_Succeeded; |
1099 } | 1093 } |
OLD | NEW |