Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: xfa/fwl/core/cfwl_message.h

Issue 1827923002: Move xfa/include/fwl/{core,basewidget} to xfa/fwl/{core,basewidget}. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/cfwl_event.h ('k') | xfa/fwl/core/cfwl_note.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_MESSAGE_H_
8 #define XFA_FWL_CORE_CFWL_MESSAGE_H_
9
10 #include "core/fxcrt/include/fx_string.h"
11 #include "core/fxcrt/include/fx_system.h"
12 #include "xfa/fwl/core/cfwl_note.h"
13 #include "xfa/fwl/core/fwl_error.h"
14
15 #define FWL_MSGHASH_Activate 2410369469
16 #define FWL_MSGHASH_Deactivate 1184214790
17 #define FWL_MSGHASH_SetFocus 4174512504
18 #define FWL_MSGHASH_KillFocus 1557903832
19 #define FWL_MSGHASH_Mouse 706128309
20 #define FWL_MSGHASH_MouseWheel 893703466
21 #define FWL_MSGHASH_Key 3751372405
22 #define FWL_MSGHASH_Cursor 3182626218
23 #define FWL_MSGHASH_Size 160077735
24 #define FWL_MSGHASH_WindowMove 1032269377
25 #define FWL_MSGHASH_DropFiles 2004165236
26 #define FWL_MSGHASH_TaskClicked 3128231086
27 #define FWL_MSGHASH_Close 2977563906
28 #define FWL_MSGHASH_Post 1969633074
29 #define FWL_MSGHASH_WindowWillMove 2229175763
30
31 #define FWL_MSG_Activate L"FWL_MESSAGE_Activate"
32 #define FWL_MSG_Deactivate L"FWL_MESSAGE_Deactivate"
33 #define FWL_MSG_SetFocus L"FWL_MESSAGE_SetFocus"
34 #define FWL_MSG_KillFocus L"FWL_MESSAGE_KillFocus"
35 #define FWL_MSG_Mouse L"FWL_MESSAGE_Mouse"
36 #define FWL_MSG_MouseWheel L"FWL_MESSAGE_MouseWheel"
37 #define FWL_MSG_Key L"FWL_MESSAGE_Key"
38 #define FWL_MSG_Cursor L"FWL_MESSAGE_Cursor"
39 #define FWL_MSG_Size L"FWL_MESSAGE_Size"
40 #define FWL_MSG_WindowMove L"FWL_MESSAGE_WindowMove"
41 #define FWL_MSG_DropFiles L"FWL_MESSAGE_DropFiles"
42 #define FWL_MSG_TaskClicked L"FWL_MESSAGE_TaskClicked"
43 #define FWL_MSG_Close L"FWL_MESSAGE_Close"
44 #define FWL_MSG_Post L"FWL_MESSAGE_Post"
45 #define FWL_MSG_WindowWillMove L"FWL_MESSAGE_WindowWillMove"
46
47 #define FWL_MSGMOUSECMD_LButtonDown 1
48 #define FWL_MSGMOUSECMD_LButtonUp 2
49 #define FWL_MSGMOUSECMD_LButtonDblClk 3
50 #define FWL_MSGMOUSECMD_RButtonDown 4
51 #define FWL_MSGMOUSECMD_RButtonUp 5
52 #define FWL_MSGMOUSECMD_RButtonDblClk 6
53 #define FWL_MSGMOUSECMD_MButtonDown 7
54 #define FWL_MSGMOUSECMD_MButtonUp 8
55 #define FWL_MSGMOUSECMD_MButtonDblClk 9
56 #define FWL_MSGMOUSECMD_MouseMove 10
57 #define FWL_MSGMOUSECMD_MouseEnter 11
58 #define FWL_MSGMOUSECMD_MouseLeave 12
59 #define FWL_MSGMOUSECMD_MouseHover 13
60 #define FWL_MSGKEYCMD_KeyDown 1
61 #define FWL_MSGKEYCMD_KeyUp 2
62 #define FWL_MSGKEYCMD_Char 3
63
64 class IFWL_Widget;
65
66 class CFWL_Message : public CFWL_Note {
67 public:
68 CFWL_Message() : CFWL_Note(FALSE) {}
69 virtual ~CFWL_Message() {}
70 };
71
72 #define BEGIN_FWL_MESSAGE_DEF(classname, msghashcode) \
73 class classname : public CFWL_Message { \
74 public: \
75 classname() : CFWL_Message() {} \
76 virtual CFWL_Note* Clone() { return new classname(*this); } \
77 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const { \
78 wsClass = L## #classname; \
79 return FWL_ERR_Succeeded; \
80 } \
81 virtual FX_DWORD GetClassID() const { return msghashcode; }
82
83 #define END_FWL_MESSAGE_DEF \
84 } \
85 ; // NOLINT
86
87 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgActivate, FWL_MSGHASH_Activate)
88 END_FWL_MESSAGE_DEF
89
90 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgDeactivate, FWL_MSGHASH_Deactivate)
91 END_FWL_MESSAGE_DEF
92
93 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgMouse, FWL_MSGHASH_Mouse)
94 FX_FLOAT m_fx;
95 FX_FLOAT m_fy;
96 FX_DWORD m_dwFlags;
97 FX_DWORD m_dwCmd;
98 END_FWL_MESSAGE_DEF
99
100 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgMouseWheel, FWL_MSGHASH_MouseWheel)
101 FX_FLOAT m_fx;
102 FX_FLOAT m_fy;
103 FX_FLOAT m_fDeltaX;
104 FX_FLOAT m_fDeltaY;
105 FX_DWORD m_dwFlags;
106 END_FWL_MESSAGE_DEF
107
108 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgSetFocus, FWL_MSGHASH_SetFocus)
109 IFWL_Widget* m_pKillFocus;
110 END_FWL_MESSAGE_DEF
111
112 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgKillFocus, FWL_MSGHASH_KillFocus)
113 IFWL_Widget* m_pSetFocus;
114 END_FWL_MESSAGE_DEF
115
116 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgKey, FWL_MSGHASH_Key)
117 FX_DWORD m_dwKeyCode;
118 FX_DWORD m_dwFlags;
119 FX_DWORD m_dwCmd;
120 END_FWL_MESSAGE_DEF
121
122 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgCursor, FWL_MSGHASH_Cursor)
123 END_FWL_MESSAGE_DEF
124
125 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgSize, FWL_MSGHASH_Size)
126 int32_t m_iWidth;
127 int32_t m_iHeight;
128 END_FWL_MESSAGE_DEF
129
130 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgWindowMove, FWL_MSGHASH_WindowMove)
131 FX_FLOAT m_fx;
132 FX_FLOAT m_fy;
133 END_FWL_MESSAGE_DEF
134
135 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgDropFiles, FWL_MSGHASH_DropFiles)
136 CFWL_MsgDropFiles(const CFWL_MsgDropFiles& copy) {
137 m_pDstTarget = copy.m_pDstTarget;
138 m_pSrcTarget = copy.m_pSrcTarget;
139 m_fx = copy.m_fx;
140 m_fy = copy.m_fy;
141 m_files.Append(copy.m_files);
142 }
143 FX_FLOAT m_fx;
144 FX_FLOAT m_fy;
145 CFX_WideStringArray m_files;
146 END_FWL_MESSAGE_DEF
147
148 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgTaskClicked, FWL_MSGHASH_TaskClicked)
149 FX_FLOAT m_fx;
150 FX_FLOAT m_fy;
151 END_FWL_MESSAGE_DEF
152
153 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgClose, FWL_MSGHASH_Close)
154 END_FWL_MESSAGE_DEF
155
156 BEGIN_FWL_MESSAGE_DEF(CFWL_MsgWindowWillMove, FWL_MSGHASH_WindowWillMove)
157 END_FWL_MESSAGE_DEF
158
159 #endif // XFA_FWL_CORE_CFWL_MESSAGE_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_event.h ('k') | xfa/fwl/core/cfwl_note.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698