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_MESSAGE_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_MESSAGE_H_ |
8 #define XFA_FWL_CORE_CFWL_MESSAGE_H_ | 8 #define XFA_FWL_CORE_CFWL_MESSAGE_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_string.h" | 10 #include "core/fxcrt/include/fx_string.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 Mouse, | 24 Mouse, |
25 MouseWheel, | 25 MouseWheel, |
26 Post, | 26 Post, |
27 SetFocus, | 27 SetFocus, |
28 Size, | 28 Size, |
29 TaskClicked, | 29 TaskClicked, |
30 WindowMove, | 30 WindowMove, |
31 WindowWillMove | 31 WindowWillMove |
32 }; | 32 }; |
33 | 33 |
34 #define FWL_MSG_Activate L"FWL_MESSAGE_Activate" | 34 enum class FWL_MouseCommand { |
35 #define FWL_MSG_Deactivate L"FWL_MESSAGE_Deactivate" | 35 LeftButtonDown, |
36 #define FWL_MSG_SetFocus L"FWL_MESSAGE_SetFocus" | 36 LeftButtonUp, |
37 #define FWL_MSG_KillFocus L"FWL_MESSAGE_KillFocus" | 37 LeftButtonDblClk, |
38 #define FWL_MSG_Mouse L"FWL_MESSAGE_Mouse" | 38 RightButtonDown, |
39 #define FWL_MSG_MouseWheel L"FWL_MESSAGE_MouseWheel" | 39 RightButtonUp, |
40 #define FWL_MSG_Key L"FWL_MESSAGE_Key" | 40 RightButtonDblClk, |
41 #define FWL_MSG_Cursor L"FWL_MESSAGE_Cursor" | 41 MiddleButtonDown, |
42 #define FWL_MSG_Size L"FWL_MESSAGE_Size" | 42 MiddleButtonUp, |
43 #define FWL_MSG_WindowMove L"FWL_MESSAGE_WindowMove" | 43 MiddleButtonDblClk, |
44 #define FWL_MSG_DropFiles L"FWL_MESSAGE_DropFiles" | 44 Move, |
45 #define FWL_MSG_TaskClicked L"FWL_MESSAGE_TaskClicked" | 45 Enter, |
46 #define FWL_MSG_Close L"FWL_MESSAGE_Close" | 46 Leave, |
47 #define FWL_MSG_Post L"FWL_MESSAGE_Post" | 47 Hover |
48 #define FWL_MSG_WindowWillMove L"FWL_MESSAGE_WindowWillMove" | 48 }; |
49 | 49 |
50 #define FWL_MSGMOUSECMD_LButtonDown 1 | 50 enum class FWL_KeyCommand { KeyDown, KeyUp, Char }; |
51 #define FWL_MSGMOUSECMD_LButtonUp 2 | |
52 #define FWL_MSGMOUSECMD_LButtonDblClk 3 | |
53 #define FWL_MSGMOUSECMD_RButtonDown 4 | |
54 #define FWL_MSGMOUSECMD_RButtonUp 5 | |
55 #define FWL_MSGMOUSECMD_RButtonDblClk 6 | |
56 #define FWL_MSGMOUSECMD_MButtonDown 7 | |
57 #define FWL_MSGMOUSECMD_MButtonUp 8 | |
58 #define FWL_MSGMOUSECMD_MButtonDblClk 9 | |
59 #define FWL_MSGMOUSECMD_MouseMove 10 | |
60 #define FWL_MSGMOUSECMD_MouseEnter 11 | |
61 #define FWL_MSGMOUSECMD_MouseLeave 12 | |
62 #define FWL_MSGMOUSECMD_MouseHover 13 | |
63 #define FWL_MSGKEYCMD_KeyDown 1 | |
64 #define FWL_MSGKEYCMD_KeyUp 2 | |
65 #define FWL_MSGKEYCMD_Char 3 | |
66 | 51 |
67 class IFWL_Widget; | 52 class IFWL_Widget; |
68 | 53 |
69 class CFWL_Message { | 54 class CFWL_Message { |
70 public: | 55 public: |
71 CFWL_Message() | 56 CFWL_Message() |
72 : m_pSrcTarget(nullptr), | 57 : m_pSrcTarget(nullptr), |
73 m_pDstTarget(nullptr), | 58 m_pDstTarget(nullptr), |
74 m_dwExtend(0), | 59 m_dwExtend(0), |
75 m_dwRefCount(1) {} | 60 m_dwRefCount(1) {} |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgActivate, CFWL_MessageType::Activate) | 105 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgActivate, CFWL_MessageType::Activate) |
121 END_FWL_MESSAGE_DEF | 106 END_FWL_MESSAGE_DEF |
122 | 107 |
123 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgDeactivate, CFWL_MessageType::Deactivate) | 108 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgDeactivate, CFWL_MessageType::Deactivate) |
124 END_FWL_MESSAGE_DEF | 109 END_FWL_MESSAGE_DEF |
125 | 110 |
126 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgMouse, CFWL_MessageType::Mouse) | 111 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgMouse, CFWL_MessageType::Mouse) |
127 FX_FLOAT m_fx; | 112 FX_FLOAT m_fx; |
128 FX_FLOAT m_fy; | 113 FX_FLOAT m_fy; |
129 uint32_t m_dwFlags; | 114 uint32_t m_dwFlags; |
130 uint32_t m_dwCmd; | 115 FWL_MouseCommand m_dwCmd; |
131 END_FWL_MESSAGE_DEF | 116 END_FWL_MESSAGE_DEF |
132 | 117 |
133 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgMouseWheel, CFWL_MessageType::MouseWheel) | 118 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgMouseWheel, CFWL_MessageType::MouseWheel) |
134 FX_FLOAT m_fx; | 119 FX_FLOAT m_fx; |
135 FX_FLOAT m_fy; | 120 FX_FLOAT m_fy; |
136 FX_FLOAT m_fDeltaX; | 121 FX_FLOAT m_fDeltaX; |
137 FX_FLOAT m_fDeltaY; | 122 FX_FLOAT m_fDeltaY; |
138 uint32_t m_dwFlags; | 123 uint32_t m_dwFlags; |
139 END_FWL_MESSAGE_DEF | 124 END_FWL_MESSAGE_DEF |
140 | 125 |
141 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgSetFocus, CFWL_MessageType::SetFocus) | 126 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgSetFocus, CFWL_MessageType::SetFocus) |
142 IFWL_Widget* m_pKillFocus; | 127 IFWL_Widget* m_pKillFocus; |
143 END_FWL_MESSAGE_DEF | 128 END_FWL_MESSAGE_DEF |
144 | 129 |
145 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgKillFocus, CFWL_MessageType::KillFocus) | 130 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgKillFocus, CFWL_MessageType::KillFocus) |
146 IFWL_Widget* m_pSetFocus; | 131 IFWL_Widget* m_pSetFocus; |
147 END_FWL_MESSAGE_DEF | 132 END_FWL_MESSAGE_DEF |
148 | 133 |
149 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgKey, CFWL_MessageType::Key) | 134 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgKey, CFWL_MessageType::Key) |
150 uint32_t m_dwKeyCode; | 135 uint32_t m_dwKeyCode; |
151 uint32_t m_dwFlags; | 136 uint32_t m_dwFlags; |
152 uint32_t m_dwCmd; | 137 FWL_KeyCommand m_dwCmd; |
153 END_FWL_MESSAGE_DEF | 138 END_FWL_MESSAGE_DEF |
154 | 139 |
155 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgCursor, CFWL_MessageType::Cursor) | 140 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgCursor, CFWL_MessageType::Cursor) |
156 END_FWL_MESSAGE_DEF | 141 END_FWL_MESSAGE_DEF |
157 | 142 |
158 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgSize, CFWL_MessageType::Size) | 143 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgSize, CFWL_MessageType::Size) |
159 int32_t m_iWidth; | 144 int32_t m_iWidth; |
160 int32_t m_iHeight; | 145 int32_t m_iHeight; |
161 END_FWL_MESSAGE_DEF | 146 END_FWL_MESSAGE_DEF |
162 | 147 |
(...skipping 20 matching lines...) Expand all Loading... |
183 FX_FLOAT m_fy; | 168 FX_FLOAT m_fy; |
184 END_FWL_MESSAGE_DEF | 169 END_FWL_MESSAGE_DEF |
185 | 170 |
186 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgClose, CFWL_MessageType::Close) | 171 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgClose, CFWL_MessageType::Close) |
187 END_FWL_MESSAGE_DEF | 172 END_FWL_MESSAGE_DEF |
188 | 173 |
189 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgWindowWillMove, CFWL_MessageType::WindowWillMove) | 174 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgWindowWillMove, CFWL_MessageType::WindowWillMove) |
190 END_FWL_MESSAGE_DEF | 175 END_FWL_MESSAGE_DEF |
191 | 176 |
192 #endif // XFA_FWL_CORE_CFWL_MESSAGE_H_ | 177 #endif // XFA_FWL_CORE_CFWL_MESSAGE_H_ |
OLD | NEW |