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