| OLD | NEW | 
|    1 // Copyright 2016 PDFium Authors. All rights reserved. |    1 // Copyright 2016 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 #ifndef XFA_FWL_CORE_CFWL_EVENT_H_ |    7 #ifndef XFA_FWL_CORE_CFWL_EVENT_H_ | 
|    8 #define XFA_FWL_CORE_CFWL_EVENT_H_ |    8 #define XFA_FWL_CORE_CFWL_EVENT_H_ | 
|    9  |    9  | 
|   10 #include "core/fxcrt/include/fx_coordinates.h" |   10 #include "core/fxcrt/include/fx_coordinates.h" | 
|   11 #include "core/fxcrt/include/fx_string.h" |   11 #include "core/fxcrt/include/fx_string.h" | 
|   12 #include "core/fxcrt/include/fx_system.h" |   12 #include "core/fxcrt/include/fx_system.h" | 
 |   13 #include "xfa/fwl/core/cfwl_message.h" | 
|   13 #include "xfa/fwl/core/fwl_error.h" |   14 #include "xfa/fwl/core/fwl_error.h" | 
|   14  |   15  | 
|   15 enum class CFWL_EventType { |   16 enum class CFWL_EventType { | 
|   16   None = 0, |   17   None = 0, | 
|   17  |   18  | 
|   18   CheckStateChanged, |   19   CheckStateChanged, | 
|   19   CheckWord, |   20   CheckWord, | 
|   20   Click, |   21   Click, | 
|   21   Close, |   22   Close, | 
|   22   CloseUp, |   23   CloseUp, | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
|   40   PreSelfAdaption, |   41   PreSelfAdaption, | 
|   41   Scroll, |   42   Scroll, | 
|   42   SelectChanged, |   43   SelectChanged, | 
|   43   SetFocus, |   44   SetFocus, | 
|   44   SizeChanged, |   45   SizeChanged, | 
|   45   TextChanged, |   46   TextChanged, | 
|   46   TextFull, |   47   TextFull, | 
|   47   Validate |   48   Validate | 
|   48 }; |   49 }; | 
|   49  |   50  | 
|   50 typedef enum { |   51 enum FWLEventMask { | 
|   51   FWL_EVENT_MOUSE_MASK = 1 << 0, |   52   FWL_EVENT_MOUSE_MASK = 1 << 0, | 
|   52   FWL_EVENT_MOUSEWHEEL_MASK = 1 << 1, |   53   FWL_EVENT_MOUSEWHEEL_MASK = 1 << 1, | 
|   53   FWL_EVENT_KEY_MASK = 1 << 2, |   54   FWL_EVENT_KEY_MASK = 1 << 2, | 
|   54   FWL_EVENT_FOCUSCHANGED_MASK = 1 << 3, |   55   FWL_EVENT_FOCUSCHANGED_MASK = 1 << 3, | 
|   55   FWL_EVENT_DRAW_MASK = 1 << 4, |   56   FWL_EVENT_DRAW_MASK = 1 << 4, | 
|   56   FWL_EVENT_CLOSE_MASK = 1 << 5, |   57   FWL_EVENT_CLOSE_MASK = 1 << 5, | 
|   57   FWL_EVENT_SIZECHANGED_MASK = 1 << 6, |   58   FWL_EVENT_SIZECHANGED_MASK = 1 << 6, | 
|   58   FWL_EVENT_IDLE_MASK = 1 << 7, |   59   FWL_EVENT_IDLE_MASK = 1 << 7, | 
|   59   FWL_EVENT_CONTROL_MASK = 1 << 8, |   60   FWL_EVENT_CONTROL_MASK = 1 << 8, | 
|   60   FWL_EVENT_ALL_MASK = 0xFF |   61   FWL_EVENT_ALL_MASK = 0xFF | 
|   61 } FWLEventMask; |   62 }; | 
|   62  |   63  | 
|   63 class CFX_Graphics; |   64 class CFX_Graphics; | 
|   64 class IFWL_Widget; |   65 class IFWL_Widget; | 
|   65  |   66  | 
|   66 class CFWL_Event { |   67 class CFWL_Event { | 
|   67  public: |   68  public: | 
|   68   CFWL_Event() |   69   CFWL_Event() | 
|   69       : m_pSrcTarget(nullptr), m_pDstTarget(nullptr), m_dwRefCount(1) {} |   70       : m_pSrcTarget(nullptr), m_pDstTarget(nullptr), m_dwRefCount(1) {} | 
|   70   virtual ~CFWL_Event() {} |   71   virtual ~CFWL_Event() {} | 
|   71  |   72  | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
|  100     virtual CFWL_EventType GetClassID() const { return eventType; } |  101     virtual CFWL_EventType GetClassID() const { return eventType; } | 
|  101  |  102  | 
|  102 #define END_FWL_EVENT_DEF \ |  103 #define END_FWL_EVENT_DEF \ | 
|  103   }                       \ |  104   }                       \ | 
|  104   ;  // NOLINT |  105   ;  // NOLINT | 
|  105  |  106  | 
|  106 BEGIN_FWL_EVENT_DEF(CFWL_EvtMouse, CFWL_EventType::Mouse) |  107 BEGIN_FWL_EVENT_DEF(CFWL_EvtMouse, CFWL_EventType::Mouse) | 
|  107 FX_FLOAT m_fx; |  108 FX_FLOAT m_fx; | 
|  108 FX_FLOAT m_fy; |  109 FX_FLOAT m_fy; | 
|  109 uint32_t m_dwFlags; |  110 uint32_t m_dwFlags; | 
|  110 uint32_t m_dwCmd; |  111 FWL_MouseCommand m_dwCmd; | 
|  111 END_FWL_EVENT_DEF |  112 END_FWL_EVENT_DEF | 
|  112  |  113  | 
|  113 BEGIN_FWL_EVENT_DEF(CFWL_EvtMouseWheel, CFWL_EventType::MouseWheel) |  114 BEGIN_FWL_EVENT_DEF(CFWL_EvtMouseWheel, CFWL_EventType::MouseWheel) | 
|  114 FX_FLOAT m_fx; |  115 FX_FLOAT m_fx; | 
|  115 FX_FLOAT m_fy; |  116 FX_FLOAT m_fy; | 
|  116 FX_FLOAT m_fDeltaX; |  117 FX_FLOAT m_fDeltaX; | 
|  117 FX_FLOAT m_fDeltaY; |  118 FX_FLOAT m_fDeltaY; | 
|  118 uint32_t m_dwFlags; |  119 uint32_t m_dwFlags; | 
|  119 END_FWL_EVENT_DEF |  120 END_FWL_EVENT_DEF | 
|  120  |  121  | 
|  121 BEGIN_FWL_EVENT_DEF(CFWL_EvtKey, CFWL_EventType::Key) |  122 BEGIN_FWL_EVENT_DEF(CFWL_EvtKey, CFWL_EventType::Key) | 
|  122 uint32_t m_dwKeyCode; |  123 uint32_t m_dwKeyCode; | 
|  123 uint32_t m_dwFlags; |  124 uint32_t m_dwFlags; | 
|  124 uint32_t m_dwCmd; |  125 FWL_KeyCommand m_dwCmd; | 
|  125 END_FWL_EVENT_DEF |  126 END_FWL_EVENT_DEF | 
|  126  |  127  | 
|  127 BEGIN_FWL_EVENT_DEF(CFWL_EvtSetFocus, CFWL_EventType::SetFocus) |  128 BEGIN_FWL_EVENT_DEF(CFWL_EvtSetFocus, CFWL_EventType::SetFocus) | 
|  128 IFWL_Widget* m_pSetFocus; |  129 IFWL_Widget* m_pSetFocus; | 
|  129 END_FWL_EVENT_DEF |  130 END_FWL_EVENT_DEF | 
|  130  |  131  | 
|  131 BEGIN_FWL_EVENT_DEF(CFWL_EvtKillFocus, CFWL_EventType::KillFocus) |  132 BEGIN_FWL_EVENT_DEF(CFWL_EvtKillFocus, CFWL_EventType::KillFocus) | 
|  132 IFWL_Widget* m_pKillFocus; |  133 IFWL_Widget* m_pKillFocus; | 
|  133 END_FWL_EVENT_DEF |  134 END_FWL_EVENT_DEF | 
|  134  |  135  | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
|  163 BEGIN_FWL_EVENT_DEF(CFWL_EvtSizeChanged, CFWL_EventType::SizeChanged) |  164 BEGIN_FWL_EVENT_DEF(CFWL_EvtSizeChanged, CFWL_EventType::SizeChanged) | 
|  164 IFWL_Widget* m_pWidget; |  165 IFWL_Widget* m_pWidget; | 
|  165 CFX_RectF m_rtOld; |  166 CFX_RectF m_rtOld; | 
|  166 CFX_RectF m_rtNew; |  167 CFX_RectF m_rtNew; | 
|  167 END_FWL_EVENT_DEF |  168 END_FWL_EVENT_DEF | 
|  168  |  169  | 
|  169 BEGIN_FWL_EVENT_DEF(CFWL_EvtIdle, CFWL_EventType::Idle) |  170 BEGIN_FWL_EVENT_DEF(CFWL_EvtIdle, CFWL_EventType::Idle) | 
|  170 END_FWL_EVENT_DEF |  171 END_FWL_EVENT_DEF | 
|  171  |  172  | 
|  172 #endif  // XFA_FWL_CORE_CFWL_EVENT_H_ |  173 #endif  // XFA_FWL_CORE_CFWL_EVENT_H_ | 
| OLD | NEW |