• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "xfa/src/foxitlib.h"
8 #include "xfa/src/fwl/src/core/include/fwl_targetimp.h"
9 #include "xfa/src/fwl/src/core/include/fwl_threadimp.h"
10 #include "xfa/src/fwl/src/core/include/fwl_noteimp.h"
11 #include "xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h"
CFWL_SDAdapterWidgetMgr()12 CFWL_SDAdapterWidgetMgr::CFWL_SDAdapterWidgetMgr() {}
~CFWL_SDAdapterWidgetMgr()13 CFWL_SDAdapterWidgetMgr::~CFWL_SDAdapterWidgetMgr() {}
CreateWidget(IFWL_Widget * pWidget,IFWL_Widget * pParent)14 FWL_ERR CFWL_SDAdapterWidgetMgr::CreateWidget(IFWL_Widget* pWidget,
15                                               IFWL_Widget* pParent) {
16   return FWL_ERR_Succeeded;
17 }
DestroyWidget(IFWL_Widget * pWidget)18 FWL_ERR CFWL_SDAdapterWidgetMgr::DestroyWidget(IFWL_Widget* pWidget) {
19   return FWL_ERR_Succeeded;
20 }
SetWidgetRect(IFWL_Widget * pWidget,const CFX_RectF & rect)21 FWL_ERR CFWL_SDAdapterWidgetMgr::SetWidgetRect(IFWL_Widget* pWidget,
22                                                const CFX_RectF& rect) {
23   return FWL_ERR_Succeeded;
24 }
SetWidgetPosition(IFWL_Widget * pWidget,FX_FLOAT fx,FX_FLOAT fy)25 FWL_ERR CFWL_SDAdapterWidgetMgr::SetWidgetPosition(IFWL_Widget* pWidget,
26                                                    FX_FLOAT fx,
27                                                    FX_FLOAT fy) {
28   return FWL_ERR_Succeeded;
29 }
SetParentWidget(IFWL_Widget * pWidget,IFWL_Widget * pParent)30 FWL_ERR CFWL_SDAdapterWidgetMgr::SetParentWidget(IFWL_Widget* pWidget,
31                                                  IFWL_Widget* pParent) {
32   return FWL_ERR_Succeeded;
33 }
ShowWidget(IFWL_Widget * pWidget)34 FWL_ERR CFWL_SDAdapterWidgetMgr::ShowWidget(IFWL_Widget* pWidget) {
35   return FWL_ERR_Succeeded;
36 }
HideWidget(IFWL_Widget * pWidget)37 FWL_ERR CFWL_SDAdapterWidgetMgr::HideWidget(IFWL_Widget* pWidget) {
38   return FWL_ERR_Succeeded;
39 }
SetNormal(IFWL_Widget * pWidget)40 FWL_ERR CFWL_SDAdapterWidgetMgr::SetNormal(IFWL_Widget* pWidget) {
41   return FWL_ERR_Succeeded;
42 }
SetMaximize(IFWL_Widget * pWidget)43 FWL_ERR CFWL_SDAdapterWidgetMgr::SetMaximize(IFWL_Widget* pWidget) {
44   return FWL_ERR_Succeeded;
45 }
SetMinimize(IFWL_Widget * pWidget)46 FWL_ERR CFWL_SDAdapterWidgetMgr::SetMinimize(IFWL_Widget* pWidget) {
47   return FWL_ERR_Succeeded;
48 }
RunWidget(IFWL_Widget * pWidget)49 FWL_ERR CFWL_SDAdapterWidgetMgr::RunWidget(IFWL_Widget* pWidget) {
50   return FWL_ERR_Succeeded;
51 }
RepaintWidget(IFWL_Widget * pWidget,const CFX_RectF * pRect)52 FWL_ERR CFWL_SDAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
53                                                const CFX_RectF* pRect) {
54   return FWL_ERR_Succeeded;
55 }
Exit(int32_t iExitCode)56 FWL_ERR CFWL_SDAdapterWidgetMgr::Exit(int32_t iExitCode) {
57   return FWL_ERR_Succeeded;
58 }
CreateWidgetWithNativeId(IFWL_Widget * pWidget,void * vp)59 FWL_ERR CFWL_SDAdapterWidgetMgr::CreateWidgetWithNativeId(IFWL_Widget* pWidget,
60                                                           void* vp) {
61   return FWL_ERR_Succeeded;
62 }
GetWidgetRect(IFWL_Widget * pWidget,CFX_RectF & rect)63 FWL_ERR CFWL_SDAdapterWidgetMgr::GetWidgetRect(IFWL_Widget* pWidget,
64                                                CFX_RectF& rect) {
65   return FWL_ERR_Succeeded;
66 }
SetWidgetIcon(IFWL_Widget * pWidget,const CFX_DIBitmap * pIcon,FX_BOOL bBig)67 FWL_ERR CFWL_SDAdapterWidgetMgr::SetWidgetIcon(IFWL_Widget* pWidget,
68                                                const CFX_DIBitmap* pIcon,
69                                                FX_BOOL bBig) {
70   return FWL_ERR_Succeeded;
71 }
SetWidgetCaption(IFWL_Widget * pWidget,const CFX_WideStringC & wsCaption)72 FWL_ERR CFWL_SDAdapterWidgetMgr::SetWidgetCaption(
73     IFWL_Widget* pWidget,
74     const CFX_WideStringC& wsCaption) {
75   return FWL_ERR_Succeeded;
76 }
SetBorderRegion(IFWL_Widget * pWidget,CFX_Path * pPath)77 FWL_ERR CFWL_SDAdapterWidgetMgr::SetBorderRegion(IFWL_Widget* pWidget,
78                                                  CFX_Path* pPath) {
79   return FWL_ERR_Succeeded;
80 }
SetTransparent(IFWL_Widget * pWidget,FX_DWORD dwAlpha)81 FWL_ERR CFWL_SDAdapterWidgetMgr::SetTransparent(IFWL_Widget* pWidget,
82                                                 FX_DWORD dwAlpha) {
83   return FWL_ERR_Succeeded;
84 }
SetFullScreen(IFWL_Widget * pWidget,FX_BOOL bFullScreen)85 FWL_ERR CFWL_SDAdapterWidgetMgr::SetFullScreen(IFWL_Widget* pWidget,
86                                                FX_BOOL bFullScreen) {
87   return FWL_ERR_Succeeded;
88 }
CheckMessage()89 FX_BOOL CFWL_SDAdapterWidgetMgr::CheckMessage() {
90   return TRUE;
91 }
IsIdleMessage()92 FX_BOOL CFWL_SDAdapterWidgetMgr::IsIdleMessage() {
93   return TRUE;
94 }
DispatchMessage()95 FWL_ERR CFWL_SDAdapterWidgetMgr::DispatchMessage() {
96   return FWL_ERR_Succeeded;
97 }
GetWidgetDC(IFWL_Widget * pWidget,void * & pDC)98 FWL_ERR CFWL_SDAdapterWidgetMgr::GetWidgetDC(IFWL_Widget* pWidget, void*& pDC) {
99   return FWL_ERR_Succeeded;
100 }
ReleaseWidgetDC(IFWL_Widget * pWidget,void * pDC,CFX_RectF * pClip)101 FWL_ERR CFWL_SDAdapterWidgetMgr::ReleaseWidgetDC(IFWL_Widget* pWidget,
102                                                  void* pDC,
103                                                  CFX_RectF* pClip) {
104   return FWL_ERR_Succeeded;
105 }
GetWindow(IFWL_Widget * pWidget)106 void* CFWL_SDAdapterWidgetMgr::GetWindow(IFWL_Widget* pWidget) {
107   return NULL;
108 }
GetKeyState(FX_DWORD dwVirtKey)109 FX_DWORD CFWL_SDAdapterWidgetMgr::GetKeyState(FX_DWORD dwVirtKey) {
110   return 0;
111 }
RunLoop(IFWL_Widget * widget)112 FWL_ERR CFWL_SDAdapterWidgetMgr::RunLoop(IFWL_Widget* widget) {
113   return FWL_ERR_Succeeded;
114 }
EndLoop()115 FWL_ERR CFWL_SDAdapterWidgetMgr::EndLoop() {
116   return FWL_ERR_Succeeded;
117 }
InitMenu(IFWL_Menu * pMenu,IFWL_MenuDP * pMenuData)118 FWL_ERR CFWL_SDAdapterWidgetMgr::InitMenu(IFWL_Menu* pMenu,
119                                           IFWL_MenuDP* pMenuData) {
120   return FWL_ERR_Succeeded;
121 }
UpdateMenu(IFWL_Menu * pMenu,const void * hItem,int32_t iType)122 FWL_ERR CFWL_SDAdapterWidgetMgr::UpdateMenu(IFWL_Menu* pMenu,
123                                             const void* hItem,
124                                             int32_t iType) {
125   return FWL_ERR_Succeeded;
126 }
TrackPopupMenu(IFWL_Menu * pMenu,IFWL_MenuDP * pMenuData)127 int32_t CFWL_SDAdapterWidgetMgr::TrackPopupMenu(IFWL_Menu* pMenu,
128                                                 IFWL_MenuDP* pMenuData) {
129   return 0;
130 }
SetMessageHook(IFWL_AdapterMessageHook * hook)131 FWL_ERR CFWL_SDAdapterWidgetMgr::SetMessageHook(IFWL_AdapterMessageHook* hook) {
132   return FWL_ERR_Succeeded;
133 }
GetSystemBorder(FX_FLOAT & l,FX_FLOAT & t,FX_FLOAT & r,FX_FLOAT & b)134 FWL_ERR CFWL_SDAdapterWidgetMgr::GetSystemBorder(FX_FLOAT& l,
135                                                  FX_FLOAT& t,
136                                                  FX_FLOAT& r,
137                                                  FX_FLOAT& b) {
138   return FWL_ERR_Succeeded;
139 }
GetPopupPos(IFWL_Widget * pWidget,FX_FLOAT fMinHeight,FX_FLOAT fMaxHeight,const CFX_RectF & rtAnchor,CFX_RectF & rtPopup)140 FX_BOOL CFWL_SDAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget,
141                                              FX_FLOAT fMinHeight,
142                                              FX_FLOAT fMaxHeight,
143                                              const CFX_RectF& rtAnchor,
144                                              CFX_RectF& rtPopup) {
145   return FWL_ERR_Succeeded;
146 }
CFWL_SDAdapterThreadMgr()147 CFWL_SDAdapterThreadMgr::CFWL_SDAdapterThreadMgr() {}
~CFWL_SDAdapterThreadMgr()148 CFWL_SDAdapterThreadMgr::~CFWL_SDAdapterThreadMgr() {}
Start(IFWL_Thread * pThread,FWL_HTHREAD & hThread,FX_BOOL bSuspended)149 FWL_ERR CFWL_SDAdapterThreadMgr::Start(IFWL_Thread* pThread,
150                                        FWL_HTHREAD& hThread,
151                                        FX_BOOL bSuspended) {
152   return FWL_ERR_Succeeded;
153 }
Resume(FWL_HTHREAD hThread)154 FWL_ERR CFWL_SDAdapterThreadMgr::Resume(FWL_HTHREAD hThread) {
155   return FWL_ERR_Succeeded;
156 }
Suspend(FWL_HTHREAD hThread)157 FWL_ERR CFWL_SDAdapterThreadMgr::Suspend(FWL_HTHREAD hThread) {
158   return FWL_ERR_Succeeded;
159 }
Kill(FWL_HTHREAD hThread,int32_t iExitCode)160 FWL_ERR CFWL_SDAdapterThreadMgr::Kill(FWL_HTHREAD hThread, int32_t iExitCode) {
161   return FWL_ERR_Succeeded;
162 }
Stop(FWL_HTHREAD hThread,int32_t iExitCode)163 FWL_ERR CFWL_SDAdapterThreadMgr::Stop(FWL_HTHREAD hThread, int32_t iExitCode) {
164   return FWL_ERR_Succeeded;
165 }
GetCurrentThread()166 IFWL_Thread* CFWL_SDAdapterThreadMgr::GetCurrentThread() {
167   return FWL_GetApp();
168 }
169