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" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 }; | 63 }; |
64 | 64 |
65 #define BEGIN_FWL_EVENT_DEF(classname, eventhashcode) \ | 65 #define BEGIN_FWL_EVENT_DEF(classname, eventhashcode) \ |
66 class classname : public CFWL_Event { \ | 66 class classname : public CFWL_Event { \ |
67 public: \ | 67 public: \ |
68 classname() : CFWL_Event() {} \ | 68 classname() : CFWL_Event() {} \ |
69 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const { \ | 69 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const { \ |
70 wsClass = L## #classname; \ | 70 wsClass = L## #classname; \ |
71 return FWL_ERR_Succeeded; \ | 71 return FWL_ERR_Succeeded; \ |
72 } \ | 72 } \ |
73 virtual FX_DWORD GetClassID() const { return eventhashcode; } | 73 virtual uint32_t GetClassID() const { return eventhashcode; } |
74 | 74 |
75 #define END_FWL_EVENT_DEF \ | 75 #define END_FWL_EVENT_DEF \ |
76 } \ | 76 } \ |
77 ; // NOLINT | 77 ; // NOLINT |
78 | 78 |
79 BEGIN_FWL_EVENT_DEF(CFWL_EvtMouse, FWL_EVTHASH_Mouse) | 79 BEGIN_FWL_EVENT_DEF(CFWL_EvtMouse, FWL_EVTHASH_Mouse) |
80 FX_FLOAT m_fx; | 80 FX_FLOAT m_fx; |
81 FX_FLOAT m_fy; | 81 FX_FLOAT m_fy; |
82 FX_DWORD m_dwFlags; | 82 uint32_t m_dwFlags; |
83 FX_DWORD m_dwCmd; | 83 uint32_t m_dwCmd; |
84 END_FWL_EVENT_DEF | 84 END_FWL_EVENT_DEF |
85 | 85 |
86 BEGIN_FWL_EVENT_DEF(CFWL_EvtMouseWheel, FWL_EVTHASH_MouseWheel) | 86 BEGIN_FWL_EVENT_DEF(CFWL_EvtMouseWheel, FWL_EVTHASH_MouseWheel) |
87 FX_FLOAT m_fx; | 87 FX_FLOAT m_fx; |
88 FX_FLOAT m_fy; | 88 FX_FLOAT m_fy; |
89 FX_FLOAT m_fDeltaX; | 89 FX_FLOAT m_fDeltaX; |
90 FX_FLOAT m_fDeltaY; | 90 FX_FLOAT m_fDeltaY; |
91 FX_DWORD m_dwFlags; | 91 uint32_t m_dwFlags; |
92 END_FWL_EVENT_DEF | 92 END_FWL_EVENT_DEF |
93 | 93 |
94 BEGIN_FWL_EVENT_DEF(CFWL_EvtKey, FWL_EVTHASH_Key) | 94 BEGIN_FWL_EVENT_DEF(CFWL_EvtKey, FWL_EVTHASH_Key) |
95 FX_DWORD m_dwKeyCode; | 95 uint32_t m_dwKeyCode; |
96 FX_DWORD m_dwFlags; | 96 uint32_t m_dwFlags; |
97 FX_DWORD m_dwCmd; | 97 uint32_t m_dwCmd; |
98 END_FWL_EVENT_DEF | 98 END_FWL_EVENT_DEF |
99 | 99 |
100 BEGIN_FWL_EVENT_DEF(CFWL_EvtSetFocus, FWL_EVTHASH_SetFocus) | 100 BEGIN_FWL_EVENT_DEF(CFWL_EvtSetFocus, FWL_EVTHASH_SetFocus) |
101 IFWL_Widget* m_pSetFocus; | 101 IFWL_Widget* m_pSetFocus; |
102 END_FWL_EVENT_DEF | 102 END_FWL_EVENT_DEF |
103 | 103 |
104 BEGIN_FWL_EVENT_DEF(CFWL_EvtKillFocus, FWL_EVTHASH_KillFocus) | 104 BEGIN_FWL_EVENT_DEF(CFWL_EvtKillFocus, FWL_EVTHASH_KillFocus) |
105 IFWL_Widget* m_pKillFocus; | 105 IFWL_Widget* m_pKillFocus; |
106 END_FWL_EVENT_DEF | 106 END_FWL_EVENT_DEF |
107 | 107 |
108 BEGIN_FWL_EVENT_DEF(CFWL_EvtDraw, FWL_EVTHASH_Draw) | 108 BEGIN_FWL_EVENT_DEF(CFWL_EvtDraw, FWL_EVTHASH_Draw) |
109 CFX_Graphics* m_pGraphics; | 109 CFX_Graphics* m_pGraphics; |
110 IFWL_Widget* m_pWidget; | 110 IFWL_Widget* m_pWidget; |
111 END_FWL_EVENT_DEF | 111 END_FWL_EVENT_DEF |
112 | 112 |
113 BEGIN_FWL_EVENT_DEF(CFWL_EvtClick, FWL_EVTHASH_Click) | 113 BEGIN_FWL_EVENT_DEF(CFWL_EvtClick, FWL_EVTHASH_Click) |
114 END_FWL_EVENT_DEF | 114 END_FWL_EVENT_DEF |
115 | 115 |
116 BEGIN_FWL_EVENT_DEF(CFWL_EvtScroll, FWL_EVTHASH_Scroll) | 116 BEGIN_FWL_EVENT_DEF(CFWL_EvtScroll, FWL_EVTHASH_Scroll) |
117 FX_DWORD m_iScrollCode; | 117 uint32_t m_iScrollCode; |
118 FX_FLOAT m_fPos; | 118 FX_FLOAT m_fPos; |
119 FX_BOOL* m_pRet; | 119 FX_BOOL* m_pRet; |
120 END_FWL_EVENT_DEF | 120 END_FWL_EVENT_DEF |
121 | 121 |
122 BEGIN_FWL_EVENT_DEF(CFWL_EvtClose, FWL_EVTHASH_Close) | 122 BEGIN_FWL_EVENT_DEF(CFWL_EvtClose, FWL_EVTHASH_Close) |
123 END_FWL_EVENT_DEF | 123 END_FWL_EVENT_DEF |
124 | 124 |
125 BEGIN_FWL_EVENT_DEF(CFWL_EvtContextMenu, FWL_EVTHASH_ContextMenu) | 125 BEGIN_FWL_EVENT_DEF(CFWL_EvtContextMenu, FWL_EVTHASH_ContextMenu) |
126 FX_FLOAT m_fPosX; | 126 FX_FLOAT m_fPosX; |
127 FX_FLOAT m_fPosY; | 127 FX_FLOAT m_fPosY; |
128 IFWL_Widget* m_pOwner; | 128 IFWL_Widget* m_pOwner; |
129 END_FWL_EVENT_DEF | 129 END_FWL_EVENT_DEF |
130 | 130 |
131 BEGIN_FWL_EVENT_DEF(CFWL_EvtMenuCommand, FWL_EVTHASH_MenuCommand) | 131 BEGIN_FWL_EVENT_DEF(CFWL_EvtMenuCommand, FWL_EVTHASH_MenuCommand) |
132 int32_t m_iCommand; | 132 int32_t m_iCommand; |
133 void* m_pData; | 133 void* m_pData; |
134 END_FWL_EVENT_DEF | 134 END_FWL_EVENT_DEF |
135 | 135 |
136 BEGIN_FWL_EVENT_DEF(CFWL_EvtSizeChanged, FWL_EVTHASH_SizeChanged) | 136 BEGIN_FWL_EVENT_DEF(CFWL_EvtSizeChanged, FWL_EVTHASH_SizeChanged) |
137 IFWL_Widget* m_pWidget; | 137 IFWL_Widget* m_pWidget; |
138 CFX_RectF m_rtOld; | 138 CFX_RectF m_rtOld; |
139 CFX_RectF m_rtNew; | 139 CFX_RectF m_rtNew; |
140 END_FWL_EVENT_DEF | 140 END_FWL_EVENT_DEF |
141 | 141 |
142 BEGIN_FWL_EVENT_DEF(CFWL_EvtIdle, FWL_EVTHASH_Idle) | 142 BEGIN_FWL_EVENT_DEF(CFWL_EvtIdle, FWL_EVTHASH_Idle) |
143 END_FWL_EVENT_DEF | 143 END_FWL_EVENT_DEF |
144 | 144 |
145 #endif // XFA_FWL_CORE_CFWL_EVENT_H_ | 145 #endif // XFA_FWL_CORE_CFWL_EVENT_H_ |
OLD | NEW |