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_noteimp.h" | 7 #include "xfa/fwl/core/fwl_noteimp.h" |
8 | 8 |
9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
10 #include "xfa/fwl/basewidget/fwl_tooltipctrlimp.h" | 10 #include "xfa/fwl/basewidget/fwl_tooltipctrlimp.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 return FWL_ERR_Succeeded; | 57 return FWL_ERR_Succeeded; |
58 } | 58 } |
59 | 59 |
60 FWL_ERR CFWL_NoteLoop::SetMainForm(CFWL_WidgetImp* pForm) { | 60 FWL_ERR CFWL_NoteLoop::SetMainForm(CFWL_WidgetImp* pForm) { |
61 m_pForm = pForm; | 61 m_pForm = pForm; |
62 return FWL_ERR_Succeeded; | 62 return FWL_ERR_Succeeded; |
63 } | 63 } |
64 void CFWL_NoteLoop::GenerateCommondEvent(uint32_t dwCommand) { | 64 void CFWL_NoteLoop::GenerateCommondEvent(uint32_t dwCommand) { |
65 CFWL_EvtMenuCommand ev; | 65 CFWL_EvtMenuCommand ev; |
66 ev.m_iCommand = dwCommand; | 66 ev.m_iCommand = dwCommand; |
67 IFWL_NoteThread* pThread = m_pForm->GetOwnerThread(); | 67 IFWL_Thread* pThread = m_pForm->GetOwnerThread(); |
68 if (!pThread) | 68 if (!pThread) |
69 return; | 69 return; |
70 IFWL_NoteDriver* pDriver = pThread->GetNoteDriver(); | 70 IFWL_NoteDriver* pDriver = pThread->GetNoteDriver(); |
71 if (!pDriver) | 71 if (!pDriver) |
72 return; | 72 return; |
73 pDriver->SendNote(&ev); | 73 pDriver->SendNote(&ev); |
74 } | 74 } |
75 CFWL_NoteDriver::CFWL_NoteDriver() | 75 CFWL_NoteDriver::CFWL_NoteDriver() |
76 : m_sendEventCalled(0), | 76 : m_sendEventCalled(0), |
77 m_bFullScreen(FALSE), | 77 m_bFullScreen(FALSE), |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } | 158 } |
159 CFWL_EventTarget* value = NULL; | 159 CFWL_EventTarget* value = NULL; |
160 if (m_eventTargets.Lookup((void*)(uintptr_t)dwkey, (void*&)value)) { | 160 if (m_eventTargets.Lookup((void*)(uintptr_t)dwkey, (void*&)value)) { |
161 value->FlagInvalid(); | 161 value->FlagInvalid(); |
162 } | 162 } |
163 return FWL_ERR_Succeeded; | 163 return FWL_ERR_Succeeded; |
164 } | 164 } |
165 void CFWL_NoteDriver::ClearEventTargets(FX_BOOL bRemoveAll) { | 165 void CFWL_NoteDriver::ClearEventTargets(FX_BOOL bRemoveAll) { |
166 ClearInvalidEventTargets(bRemoveAll); | 166 ClearInvalidEventTargets(bRemoveAll); |
167 } | 167 } |
168 IFWL_NoteThread* CFWL_NoteDriver::GetOwnerThread() const { | 168 IFWL_Thread* CFWL_NoteDriver::GetOwnerThread() const { |
169 return FWL_GetApp(); | 169 return FWL_GetApp(); |
170 } | 170 } |
171 FWL_ERR CFWL_NoteDriver::PushNoteLoop(IFWL_NoteLoop* pNoteLoop) { | 171 FWL_ERR CFWL_NoteDriver::PushNoteLoop(IFWL_NoteLoop* pNoteLoop) { |
172 m_noteLoopQueue.Add(pNoteLoop); | 172 m_noteLoopQueue.Add(pNoteLoop); |
173 return FWL_ERR_Succeeded; | 173 return FWL_ERR_Succeeded; |
174 } | 174 } |
175 IFWL_NoteLoop* CFWL_NoteDriver::PopNoteLoop() { | 175 IFWL_NoteLoop* CFWL_NoteDriver::PopNoteLoop() { |
176 int32_t pos = m_noteLoopQueue.GetSize(); | 176 int32_t pos = m_noteLoopQueue.GetSize(); |
177 if (pos <= 0) | 177 if (pos <= 0) |
178 return NULL; | 178 return NULL; |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 if (HasToolTip(pEvt->m_pDstTarget) && NULL != m_pToolTipImp) { | 987 if (HasToolTip(pEvt->m_pDstTarget) && NULL != m_pToolTipImp) { |
988 m_pToolTipImp->Hide(); | 988 m_pToolTipImp->Hide(); |
989 pCurTarget = NULL; | 989 pCurTarget = NULL; |
990 return TRUE; | 990 return TRUE; |
991 } | 991 } |
992 return FALSE; | 992 return FALSE; |
993 } | 993 } |
994 IFWL_ToolTipTarget* CFWL_ToolTipContainer::GetCurrentToolTipTarget() { | 994 IFWL_ToolTipTarget* CFWL_ToolTipContainer::GetCurrentToolTipTarget() { |
995 return pCurTarget; | 995 return pCurTarget; |
996 } | 996 } |
OLD | NEW |