OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_FWL_NOTEIMP_H_ | 7 #ifndef XFA_FWL_CORE_FWL_NOTEIMP_H_ |
8 #define XFA_FWL_CORE_FWL_NOTEIMP_H_ | 8 #define XFA_FWL_CORE_FWL_NOTEIMP_H_ |
9 | 9 |
10 #include "xfa/fwl/core/ifwl_notedriver.h" | 10 #include "xfa/fwl/core/ifwl_notedriver.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 FX_BOOL PreProcessMessage(CFWL_Message* pMessage) override; | 35 FX_BOOL PreProcessMessage(CFWL_Message* pMessage) override; |
36 FWL_ERR Idle(int32_t count) override; | 36 FWL_ERR Idle(int32_t count) override; |
37 | 37 |
38 CFWL_WidgetImp* GetForm(); | 38 CFWL_WidgetImp* GetForm(); |
39 FX_BOOL ContinueModal(); | 39 FX_BOOL ContinueModal(); |
40 FWL_ERR EndModalLoop(); | 40 FWL_ERR EndModalLoop(); |
41 FX_BOOL TranslateAccelerator(CFWL_Message* pMessage); | 41 FX_BOOL TranslateAccelerator(CFWL_Message* pMessage); |
42 FWL_ERR SetMainForm(CFWL_WidgetImp* pForm); | 42 FWL_ERR SetMainForm(CFWL_WidgetImp* pForm); |
43 | 43 |
44 protected: | 44 protected: |
45 void GenerateCommondEvent(FX_DWORD dwCommand); | 45 void GenerateCommondEvent(uint32_t dwCommand); |
46 | 46 |
47 CFWL_WidgetImp* m_pForm; | 47 CFWL_WidgetImp* m_pForm; |
48 FX_BOOL m_bContinueModal; | 48 FX_BOOL m_bContinueModal; |
49 }; | 49 }; |
50 | 50 |
51 class CFWL_NoteDriver : public IFWL_NoteDriver { | 51 class CFWL_NoteDriver : public IFWL_NoteDriver { |
52 public: | 52 public: |
53 CFWL_NoteDriver(); | 53 CFWL_NoteDriver(); |
54 ~CFWL_NoteDriver() override; | 54 ~CFWL_NoteDriver() override; |
55 | 55 |
56 // IFWL_NoteDriver: | 56 // IFWL_NoteDriver: |
57 FX_BOOL SendNote(CFWL_Note* pNote) override; | 57 FX_BOOL SendNote(CFWL_Note* pNote) override; |
58 FWL_ERR RegisterEventTarget(IFWL_Widget* pListener, | 58 FWL_ERR RegisterEventTarget(IFWL_Widget* pListener, |
59 IFWL_Widget* pEventSource = NULL, | 59 IFWL_Widget* pEventSource = NULL, |
60 FX_DWORD dwFilter = FWL_EVENT_ALL_MASK) override; | 60 uint32_t dwFilter = FWL_EVENT_ALL_MASK) override; |
61 FWL_ERR UnregisterEventTarget(IFWL_Widget* pListener) override; | 61 FWL_ERR UnregisterEventTarget(IFWL_Widget* pListener) override; |
62 void ClearEventTargets(FX_BOOL bRemoveAll) override; | 62 void ClearEventTargets(FX_BOOL bRemoveAll) override; |
63 int32_t GetQueueMaxSize() const override; | 63 int32_t GetQueueMaxSize() const override; |
64 FWL_ERR SetQueueMaxSize(const int32_t size) override; | 64 FWL_ERR SetQueueMaxSize(const int32_t size) override; |
65 IFWL_NoteThread* GetOwnerThread() const override; | 65 IFWL_NoteThread* GetOwnerThread() const override; |
66 FWL_ERR PushNoteLoop(IFWL_NoteLoop* pNoteLoop) override; | 66 FWL_ERR PushNoteLoop(IFWL_NoteLoop* pNoteLoop) override; |
67 IFWL_NoteLoop* PopNoteLoop() override; | 67 IFWL_NoteLoop* PopNoteLoop() override; |
68 IFWL_Widget* GetFocus() override; | 68 IFWL_Widget* GetFocus() override; |
69 FX_BOOL SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify = FALSE) override; | 69 FX_BOOL SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify = FALSE) override; |
70 void SetGrab(IFWL_Widget* pGrab, FX_BOOL bSet) override; | 70 void SetGrab(IFWL_Widget* pGrab, FX_BOOL bSet) override; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 int32_t m_maxSize; | 109 int32_t m_maxSize; |
110 FX_BOOL m_bFullScreen; | 110 FX_BOOL m_bFullScreen; |
111 IFWL_Widget* m_pHover; | 111 IFWL_Widget* m_pHover; |
112 IFWL_Widget* m_pFocus; | 112 IFWL_Widget* m_pFocus; |
113 IFWL_Widget* m_pGrab; | 113 IFWL_Widget* m_pGrab; |
114 CFWL_NoteLoop* m_pNoteLoop; | 114 CFWL_NoteLoop* m_pNoteLoop; |
115 FWLMessageHookCallback m_hook; | 115 FWLMessageHookCallback m_hook; |
116 void* m_hookInfo; | 116 void* m_hookInfo; |
117 }; | 117 }; |
118 | 118 |
119 typedef CFX_MapPtrTemplate<void*, FX_DWORD> CFWL_EventSource; | 119 typedef CFX_MapPtrTemplate<void*, uint32_t> CFWL_EventSource; |
120 | 120 |
121 class CFWL_EventTarget { | 121 class CFWL_EventTarget { |
122 public: | 122 public: |
123 CFWL_EventTarget(CFWL_NoteDriver* pNoteDriver, IFWL_Widget* pListener) | 123 CFWL_EventTarget(CFWL_NoteDriver* pNoteDriver, IFWL_Widget* pListener) |
124 : m_pListener(pListener), m_pNoteDriver(pNoteDriver), m_bInvalid(FALSE) {} | 124 : m_pListener(pListener), m_pNoteDriver(pNoteDriver), m_bInvalid(FALSE) {} |
125 ~CFWL_EventTarget(); | 125 ~CFWL_EventTarget(); |
126 int32_t SetEventSource(IFWL_Widget* pSource, | 126 int32_t SetEventSource(IFWL_Widget* pSource, |
127 FX_DWORD dwFilter = FWL_EVENT_ALL_MASK); | 127 uint32_t dwFilter = FWL_EVENT_ALL_MASK); |
128 FX_BOOL ProcessEvent(CFWL_Event* pEvent); | 128 FX_BOOL ProcessEvent(CFWL_Event* pEvent); |
129 FX_BOOL IsFilterEvent(CFWL_Event* pEvent, FX_DWORD dwFilter); | 129 FX_BOOL IsFilterEvent(CFWL_Event* pEvent, uint32_t dwFilter); |
130 FX_BOOL IsInvalid() { return m_bInvalid; } | 130 FX_BOOL IsInvalid() { return m_bInvalid; } |
131 void FlagInvalid() { m_bInvalid = TRUE; } | 131 void FlagInvalid() { m_bInvalid = TRUE; } |
132 | 132 |
133 protected: | 133 protected: |
134 CFWL_EventSource m_eventSources; | 134 CFWL_EventSource m_eventSources; |
135 IFWL_Widget* m_pListener; | 135 IFWL_Widget* m_pListener; |
136 CFWL_NoteDriver* m_pNoteDriver; | 136 CFWL_NoteDriver* m_pNoteDriver; |
137 FX_BOOL m_bInvalid; | 137 FX_BOOL m_bInvalid; |
138 }; | 138 }; |
139 | 139 |
(...skipping 21 matching lines...) Expand all Loading... |
161 IFWL_ToolTipTarget* pCurTarget; | 161 IFWL_ToolTipTarget* pCurTarget; |
162 CFWL_ToolTipImp* m_pToolTipImp; | 162 CFWL_ToolTipImp* m_pToolTipImp; |
163 CFWL_CoreToolTipDP* m_ToolTipDp; | 163 CFWL_CoreToolTipDP* m_ToolTipDp; |
164 CFX_PtrArray m_arrWidget; | 164 CFX_PtrArray m_arrWidget; |
165 | 165 |
166 private: | 166 private: |
167 static CFWL_ToolTipContainer* s_pInstance; | 167 static CFWL_ToolTipContainer* s_pInstance; |
168 }; | 168 }; |
169 | 169 |
170 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ | 170 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ |
OLD | NEW |