Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef XFA_FWL_CORE_CFWL_EVENTTARGET_H_ | |
| 8 #define XFA_FWL_CORE_CFWL_EVENTTARGET_H_ | |
| 9 | |
| 10 #include "core/fxcrt/fx_basic.h" | |
| 11 #include "xfa/fwl/core/cfwl_event.h" | |
| 12 | |
| 13 class CFWL_Event; | |
| 14 class IFWL_Widget; | |
| 15 | |
| 16 class CFWL_EventTarget { | |
| 17 public: | |
| 18 explicit CFWL_EventTarget(IFWL_Widget* pListener); | |
| 19 ~CFWL_EventTarget(); | |
| 20 | |
| 21 int32_t SetEventSource(IFWL_Widget* pSource, | |
| 22 uint32_t dwFilter = FWL_EVENT_ALL_MASK); | |
|
npm
2016/11/21 21:21:46
Is default parameter needed?
dsinclair
2016/11/21 21:57:07
Followup.
| |
| 23 bool ProcessEvent(CFWL_Event* pEvent); | |
| 24 | |
| 25 bool IsInvalid() const { return m_bInvalid; } | |
| 26 void FlagInvalid() { m_bInvalid = true; } | |
| 27 | |
| 28 private: | |
| 29 bool IsFilterEvent(CFWL_Event* pEvent, uint32_t dwFilter) const; | |
| 30 | |
| 31 CFX_MapPtrTemplate<void*, uint32_t> m_eventSources; | |
| 32 IFWL_Widget* m_pListener; | |
| 33 bool m_bInvalid; | |
| 34 }; | |
| 35 | |
| 36 #endif // XFA_FWL_CORE_CFWL_EVENTTARGET_H_ | |
| OLD | NEW |