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_SDADAPTERIMP_H_ | 7 #ifndef XFA_FWL_CORE_FWL_SDADAPTERIMP_H_ |
8 #define XFA_FWL_CORE_FWL_SDADAPTERIMP_H_ | 8 #define XFA_FWL_CORE_FWL_SDADAPTERIMP_H_ |
9 | 9 |
10 #include "xfa/fwl/core/ifwl_adapterthreadmgr.h" | 10 #include "xfa/fwl/core/ifwl_adapterthreadmgr.h" |
11 #include "xfa/fwl/core/ifwl_adapterwidgetmgr.h" | 11 #include "xfa/fwl/core/ifwl_adapterwidgetmgr.h" |
12 | 12 |
13 class CFWL_SDAdapterWidgetMgr : public IFWL_AdapterWidgetMgr { | 13 class CFWL_SDAdapterWidgetMgr : public IFWL_AdapterWidgetMgr { |
14 public: | 14 public: |
15 CFWL_SDAdapterWidgetMgr(); | 15 CFWL_SDAdapterWidgetMgr(); |
16 ~CFWL_SDAdapterWidgetMgr(); | 16 ~CFWL_SDAdapterWidgetMgr(); |
17 virtual FWL_ERR CreateWidget(IFWL_Widget* pWidget, | 17 virtual FWL_Error CreateWidget(IFWL_Widget* pWidget, |
18 IFWL_Widget* pParent = NULL); | 18 IFWL_Widget* pParent = NULL); |
19 virtual FWL_ERR DestroyWidget(IFWL_Widget* pWidget); | 19 virtual FWL_Error DestroyWidget(IFWL_Widget* pWidget); |
20 virtual FWL_ERR SetWidgetRect(IFWL_Widget* pWidget, const CFX_RectF& rect); | 20 virtual FWL_Error SetWidgetRect(IFWL_Widget* pWidget, const CFX_RectF& rect); |
21 virtual FWL_ERR SetWidgetPosition(IFWL_Widget* pWidget, | 21 virtual FWL_Error SetWidgetPosition(IFWL_Widget* pWidget, |
22 FX_FLOAT fx, | 22 FX_FLOAT fx, |
23 FX_FLOAT fy); | 23 FX_FLOAT fy); |
24 virtual FWL_ERR SetParentWidget(IFWL_Widget* pWidget, IFWL_Widget* pParent); | 24 virtual FWL_Error SetParentWidget(IFWL_Widget* pWidget, IFWL_Widget* pParent); |
25 virtual FWL_ERR ShowWidget(IFWL_Widget* pWidget); | 25 virtual FWL_Error ShowWidget(IFWL_Widget* pWidget); |
26 virtual FWL_ERR HideWidget(IFWL_Widget* pWidget); | 26 virtual FWL_Error HideWidget(IFWL_Widget* pWidget); |
27 virtual FWL_ERR SetNormal(IFWL_Widget* pWidget); | 27 virtual FWL_Error SetNormal(IFWL_Widget* pWidget); |
28 virtual FWL_ERR SetMaximize(IFWL_Widget* pWidget); | 28 virtual FWL_Error SetMaximize(IFWL_Widget* pWidget); |
29 virtual FWL_ERR SetMinimize(IFWL_Widget* pWidget); | 29 virtual FWL_Error SetMinimize(IFWL_Widget* pWidget); |
30 virtual FWL_ERR RunWidget(IFWL_Widget* pWidget); | 30 virtual FWL_Error RunWidget(IFWL_Widget* pWidget); |
31 virtual FWL_ERR RepaintWidget(IFWL_Widget* pWidget, const CFX_RectF* pRect); | 31 virtual FWL_Error RepaintWidget(IFWL_Widget* pWidget, const CFX_RectF* pRect); |
32 virtual FWL_ERR Exit(int32_t iExitCode); | 32 virtual FWL_Error Exit(int32_t iExitCode); |
33 virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget* pWidget, void* vp); | 33 virtual FWL_Error CreateWidgetWithNativeId(IFWL_Widget* pWidget, void* vp); |
34 virtual FX_BOOL GetPopupPos(IFWL_Widget* pWidget, | 34 virtual FX_BOOL GetPopupPos(IFWL_Widget* pWidget, |
35 FX_FLOAT fMinHeight, | 35 FX_FLOAT fMinHeight, |
36 FX_FLOAT fMaxHeight, | 36 FX_FLOAT fMaxHeight, |
37 const CFX_RectF& rtAnchor, | 37 const CFX_RectF& rtAnchor, |
38 CFX_RectF& rtPopup); | 38 CFX_RectF& rtPopup); |
39 | 39 |
40 public: | 40 public: |
41 virtual FWL_ERR GetWidgetRect(IFWL_Widget* pWidget, CFX_RectF& rect); | 41 virtual FWL_Error GetWidgetRect(IFWL_Widget* pWidget, CFX_RectF& rect); |
42 virtual FWL_ERR SetWidgetIcon(IFWL_Widget* pWidget, | 42 virtual FWL_Error SetWidgetIcon(IFWL_Widget* pWidget, |
43 const CFX_DIBitmap* pIcon, | 43 const CFX_DIBitmap* pIcon, |
44 FX_BOOL bBig); | 44 FX_BOOL bBig); |
45 virtual FWL_ERR SetWidgetCaption(IFWL_Widget* pWidget, | 45 virtual FWL_Error SetWidgetCaption(IFWL_Widget* pWidget, |
46 const CFX_WideStringC& wsCaption); | 46 const CFX_WideStringC& wsCaption); |
47 virtual FWL_ERR SetBorderRegion(IFWL_Widget* pWidget, CFX_Path* pPath); | 47 virtual FWL_Error SetBorderRegion(IFWL_Widget* pWidget, CFX_Path* pPath); |
48 virtual FWL_ERR SetTransparent(IFWL_Widget* pWidget, uint32_t dwAlpha); | 48 virtual FWL_Error SetTransparent(IFWL_Widget* pWidget, uint32_t dwAlpha); |
49 virtual FX_BOOL CheckMessage(); | 49 virtual FX_BOOL CheckMessage(); |
50 virtual FX_BOOL IsIdleMessage(); | 50 virtual FX_BOOL IsIdleMessage(); |
51 virtual FWL_ERR DispatchMessage(); | 51 virtual FWL_Error DispatchMessage(); |
52 virtual FWL_ERR GetWidgetDC(IFWL_Widget* pWidget, void*& pDC); | 52 virtual FWL_Error GetWidgetDC(IFWL_Widget* pWidget, void*& pDC); |
53 virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget* pWidget, | 53 virtual FWL_Error ReleaseWidgetDC(IFWL_Widget* pWidget, |
54 void* pDC, | 54 void* pDC, |
55 CFX_RectF* pClip = 0); | 55 CFX_RectF* pClip = 0); |
56 virtual void* GetWindow(IFWL_Widget* pWidget); | 56 virtual void* GetWindow(IFWL_Widget* pWidget); |
57 virtual uint32_t GetKeyState(uint32_t dwVirtKey); | 57 virtual uint32_t GetKeyState(uint32_t dwVirtKey); |
58 virtual FWL_ERR RunLoop(IFWL_Widget* widget); | 58 virtual FWL_Error RunLoop(IFWL_Widget* widget); |
59 virtual FWL_ERR EndLoop(); | 59 virtual FWL_Error EndLoop(); |
60 virtual FWL_ERR InitMenu(IFWL_Menu* pMenu, IFWL_MenuDP* pMenuData); | 60 virtual FWL_Error InitMenu(IFWL_Menu* pMenu, IFWL_MenuDP* pMenuData); |
61 virtual FWL_ERR UpdateMenu(IFWL_Menu* pMenu, | 61 virtual FWL_Error UpdateMenu(IFWL_Menu* pMenu, |
62 const void* hItem, | 62 const void* hItem, |
63 int32_t iType); | 63 int32_t iType); |
64 virtual FWL_ERR SetMessageHook(IFWL_AdapterMessageHook* hook); | 64 virtual FWL_Error SetMessageHook(IFWL_AdapterMessageHook* hook); |
65 virtual FWL_ERR GetSystemBorder(FX_FLOAT& l, | 65 virtual FWL_Error GetSystemBorder(FX_FLOAT& l, |
66 FX_FLOAT& t, | 66 FX_FLOAT& t, |
67 FX_FLOAT& r, | 67 FX_FLOAT& r, |
68 FX_FLOAT& b); | 68 FX_FLOAT& b); |
69 }; | 69 }; |
70 | 70 |
71 class CFWL_SDAdapterThreadMgr : public IFWL_AdapterThreadMgr { | 71 class CFWL_SDAdapterThreadMgr : public IFWL_AdapterThreadMgr { |
72 public: | 72 public: |
73 CFWL_SDAdapterThreadMgr(); | 73 CFWL_SDAdapterThreadMgr(); |
74 ~CFWL_SDAdapterThreadMgr(); | 74 ~CFWL_SDAdapterThreadMgr(); |
75 | 75 |
76 public: | 76 public: |
77 virtual IFWL_App* GetCurrentThread(); | 77 virtual IFWL_App* GetCurrentThread(); |
78 }; | 78 }; |
79 | 79 |
80 #endif // XFA_FWL_CORE_FWL_SDADAPTERIMP_H_ | 80 #endif // XFA_FWL_CORE_FWL_SDADAPTERIMP_H_ |
OLD | NEW |