diff options
author | Nico Weber <thakis@chromium.org> | 2015-08-04 13:00:21 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2015-08-04 13:00:21 -0700 |
commit | 9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f (patch) | |
tree | c97037f398d714665aefccb6eb54d0969ad7030c /xfa/include/fwl/adapter | |
parent | 780cee82236d1b3b0f9b01a22424e4b8ec9a6f12 (diff) | |
download | pdfium-9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f.tar.xz |
XFA: clang-format all pdfium code.
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \
xargs ../../buildtools/mac/clang-format -i
Then manually merged https://codereview.chromium.org/1269223002/
See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion.
BUG=none
Diffstat (limited to 'xfa/include/fwl/adapter')
-rw-r--r-- | xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h | 43 | ||||
-rw-r--r-- | xfa/include/fwl/adapter/fwl_adaptercursormgr.h | 47 | ||||
-rw-r--r-- | xfa/include/fwl/adapter/fwl_adaptermonitormgr.h | 25 | ||||
-rw-r--r-- | xfa/include/fwl/adapter/fwl_adapternative.h | 22 | ||||
-rw-r--r-- | xfa/include/fwl/adapter/fwl_adapterthreadmgr.h | 40 | ||||
-rw-r--r-- | xfa/include/fwl/adapter/fwl_adaptertimermgr.h | 14 | ||||
-rw-r--r-- | xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h | 96 | ||||
-rw-r--r-- | xfa/include/fwl/adapter/fwl_sdadapterimp.h | 125 |
8 files changed, 224 insertions, 188 deletions
diff --git a/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h b/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h index 55250f30de..6fb6292ad0 100644 --- a/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h +++ b/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h @@ -8,30 +8,27 @@ #define _FWL_ADAPTER_CLIPBOARDMGR_H
enum FWL_CLIPBOARDFORMAT {
- FWL_CLIPBOARDFORMAT_Dib,
- FWL_CLIPBOARDFORMAT_Text,
- FWL_CLIPBOARDFORMAT_UncodeText,
+ FWL_CLIPBOARDFORMAT_Dib,
+ FWL_CLIPBOARDFORMAT_Text,
+ FWL_CLIPBOARDFORMAT_UncodeText,
};
-typedef struct _FWL_HCLIPBOARDDATA {
- void* pData;
-} * FWL_HCLIPBOARDDATA;
+typedef struct _FWL_HCLIPBOARDDATA { void* pData; } * FWL_HCLIPBOARDDATA;
-class IFWL_AdapterClipboardMgr
-{
-public:
- virtual ~IFWL_AdapterClipboardMgr() {}
- virtual FWL_ERR Empty() = 0;
- virtual FX_BOOL IsDataAvailable(FX_DWORD dwFormat) = 0;
- virtual FWL_HCLIPBOARDDATA GetData(FX_DWORD dwFormat) = 0;
- virtual FWL_ERR SetData(FX_DWORD dwFormat, uint8_t *pBuf, int32_t iSize) = 0;
- virtual int32_t GetDataSize(FWL_HCLIPBOARDDATA hData) = 0;
- virtual void* LockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0;
- virtual FX_BOOL UnLockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0;
- virtual FWL_ERR SetStringData(const CFX_WideStringC& ws) = 0;
- virtual FWL_ERR SetStringData(const CFX_ByteStringC& bs) = 0;
- virtual FWL_ERR GetStringData(CFX_WideString &ws) = 0;
- virtual FWL_ERR GetStringData(CFX_ByteString &bs) = 0;
- virtual FWL_ERR EnumFormats(CFX_DWordArray &formats) = 0;
- virtual FX_DWORD RegisterFormat(const CFX_WideStringC& wsFormat) = 0;
+class IFWL_AdapterClipboardMgr {
+ public:
+ virtual ~IFWL_AdapterClipboardMgr() {}
+ virtual FWL_ERR Empty() = 0;
+ virtual FX_BOOL IsDataAvailable(FX_DWORD dwFormat) = 0;
+ virtual FWL_HCLIPBOARDDATA GetData(FX_DWORD dwFormat) = 0;
+ virtual FWL_ERR SetData(FX_DWORD dwFormat, uint8_t* pBuf, int32_t iSize) = 0;
+ virtual int32_t GetDataSize(FWL_HCLIPBOARDDATA hData) = 0;
+ virtual void* LockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0;
+ virtual FX_BOOL UnLockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0;
+ virtual FWL_ERR SetStringData(const CFX_WideStringC& ws) = 0;
+ virtual FWL_ERR SetStringData(const CFX_ByteStringC& bs) = 0;
+ virtual FWL_ERR GetStringData(CFX_WideString& ws) = 0;
+ virtual FWL_ERR GetStringData(CFX_ByteString& bs) = 0;
+ virtual FWL_ERR EnumFormats(CFX_DWordArray& formats) = 0;
+ virtual FX_DWORD RegisterFormat(const CFX_WideStringC& wsFormat) = 0;
};
#endif
diff --git a/xfa/include/fwl/adapter/fwl_adaptercursormgr.h b/xfa/include/fwl/adapter/fwl_adaptercursormgr.h index b03be66cca..de3a533647 100644 --- a/xfa/include/fwl/adapter/fwl_adaptercursormgr.h +++ b/xfa/include/fwl/adapter/fwl_adaptercursormgr.h @@ -9,31 +9,30 @@ class CFX_DIBitmap;
class IFWL_AdapterCursorMgr;
enum FWL_CURSORTYPE {
- FWL_CURSORTYPE_Arrow = 0,
- FWL_CURSORTYPE_Cross,
- FWL_CURSORTYPE_Hand,
- FWL_CURSORTYPE_InputBeam,
- FWL_CURSORTYPE_Wait,
- FWL_CURSORTYPE_SizeAll,
- FWL_CURSORTYPE_SizeNWSE,
- FWL_CURSORTYPE_SizeNESW,
- FWL_CURSORTYPE_SizeWE,
- FWL_CURSORTYPE_SizeNS,
- FWL_CURSORTYPE_Prohibition,
- FWL_CURSORTYPE_Help
+ FWL_CURSORTYPE_Arrow = 0,
+ FWL_CURSORTYPE_Cross,
+ FWL_CURSORTYPE_Hand,
+ FWL_CURSORTYPE_InputBeam,
+ FWL_CURSORTYPE_Wait,
+ FWL_CURSORTYPE_SizeAll,
+ FWL_CURSORTYPE_SizeNWSE,
+ FWL_CURSORTYPE_SizeNESW,
+ FWL_CURSORTYPE_SizeWE,
+ FWL_CURSORTYPE_SizeNS,
+ FWL_CURSORTYPE_Prohibition,
+ FWL_CURSORTYPE_Help
};
-typedef struct _FWL_HCURSOR {
- void* pData;
-} *FWL_HCURSOR;
+typedef struct _FWL_HCURSOR { void* pData; } * FWL_HCURSOR;
-class IFWL_AdapterCursorMgr
-{
-public:
- virtual ~IFWL_AdapterCursorMgr() {}
- virtual FWL_HCURSOR GetSystemCursor(FWL_CURSORTYPE eCursorType) = 0;
- virtual FWL_HCURSOR GetCustomCursor(const CFX_DIBitmap *pBitmap, FX_FLOAT xHotspot = 0, FX_FLOAT yHotspot = 0) = 0;
- virtual FWL_ERR SetCursor(FWL_HCURSOR hCursor) = 0;
- virtual FWL_ERR ShowCursor(FX_BOOL bShow) = 0;
- virtual FWL_ERR GetCursorPos(CFX_PointF &pt) = 0;
+class IFWL_AdapterCursorMgr {
+ public:
+ virtual ~IFWL_AdapterCursorMgr() {}
+ virtual FWL_HCURSOR GetSystemCursor(FWL_CURSORTYPE eCursorType) = 0;
+ virtual FWL_HCURSOR GetCustomCursor(const CFX_DIBitmap* pBitmap,
+ FX_FLOAT xHotspot = 0,
+ FX_FLOAT yHotspot = 0) = 0;
+ virtual FWL_ERR SetCursor(FWL_HCURSOR hCursor) = 0;
+ virtual FWL_ERR ShowCursor(FX_BOOL bShow) = 0;
+ virtual FWL_ERR GetCursorPos(CFX_PointF& pt) = 0;
};
#endif
diff --git a/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h b/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h index 77822543d0..36c9d9267a 100644 --- a/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h +++ b/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h @@ -7,19 +7,18 @@ #ifndef _FWL_ADAPTER_MONITORMGR_H
#define _FWL_ADAPTER_MONITORMGR_H
-typedef struct _FWL_HMONITOR {
- void* pData;
-} *FWL_HMONITOR;
+typedef struct _FWL_HMONITOR { void* pData; } * FWL_HMONITOR;
-class IFWL_AdapterMonitorMgr
-{
-public:
- virtual ~IFWL_AdapterMonitorMgr() {}
- virtual int32_t CountMonitors() = 0;
- virtual FWL_HMONITOR GetMonitor(int32_t nIndex) = 0;
- virtual FWL_HMONITOR GetCurrentMonitor() = 0;
- virtual FWL_HMONITOR GetMonitorByRect(const CFX_RectF &rect) = 0;
- virtual FWL_HMONITOR GetMonitorByPoint(FX_FLOAT fx, FX_FLOAT fy) = 0;
- virtual FWL_ERR GetMonitorSize(FWL_HMONITOR hMonitor, FX_FLOAT &fx, FX_FLOAT &fy) = 0;
+class IFWL_AdapterMonitorMgr {
+ public:
+ virtual ~IFWL_AdapterMonitorMgr() {}
+ virtual int32_t CountMonitors() = 0;
+ virtual FWL_HMONITOR GetMonitor(int32_t nIndex) = 0;
+ virtual FWL_HMONITOR GetCurrentMonitor() = 0;
+ virtual FWL_HMONITOR GetMonitorByRect(const CFX_RectF& rect) = 0;
+ virtual FWL_HMONITOR GetMonitorByPoint(FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FWL_ERR GetMonitorSize(FWL_HMONITOR hMonitor,
+ FX_FLOAT& fx,
+ FX_FLOAT& fy) = 0;
};
#endif
diff --git a/xfa/include/fwl/adapter/fwl_adapternative.h b/xfa/include/fwl/adapter/fwl_adapternative.h index cc348bf833..c1973e4288 100644 --- a/xfa/include/fwl/adapter/fwl_adapternative.h +++ b/xfa/include/fwl/adapter/fwl_adapternative.h @@ -14,17 +14,17 @@ class IFWL_AdapterCursorMgr; class IFWL_AdapterMonitorMgr;
class IFWL_AdapterClipboardMgr;
-class IFWL_AdapterNative
-{
-public:
- virtual ~IFWL_AdapterNative() {}
- virtual IFWL_AdapterWidgetMgr* GetWidgetMgr(IFWL_WidgetMgrDelegate *pDelegate) = 0;
- virtual IFWL_AdapterThreadMgr* GetThreadMgr() = 0;
- virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0;
- virtual IFWL_AdapterCursorMgr* GetCursorMgr() = 0;
- virtual IFWL_AdapterMonitorMgr* GetMonitorMgr() = 0;
- virtual IFWL_AdapterClipboardMgr* GetClipboardMgr() = 0;
+class IFWL_AdapterNative {
+ public:
+ virtual ~IFWL_AdapterNative() {}
+ virtual IFWL_AdapterWidgetMgr* GetWidgetMgr(
+ IFWL_WidgetMgrDelegate* pDelegate) = 0;
+ virtual IFWL_AdapterThreadMgr* GetThreadMgr() = 0;
+ virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0;
+ virtual IFWL_AdapterCursorMgr* GetCursorMgr() = 0;
+ virtual IFWL_AdapterMonitorMgr* GetMonitorMgr() = 0;
+ virtual IFWL_AdapterClipboardMgr* GetClipboardMgr() = 0;
};
IFWL_AdapterNative* FWL_CreateFuelAdapterNative();
-void FWL_ReleaseFuelAdapterNative(IFWL_AdapterNative *pAdapterNative);
+void FWL_ReleaseFuelAdapterNative(IFWL_AdapterNative* pAdapterNative);
#endif
diff --git a/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h b/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h index ba2febfdb4..12b155db90 100644 --- a/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h +++ b/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h @@ -10,26 +10,26 @@ class IFWL_Thread; class IFWL_AdapterMutex;
class IFWL_AdapterSemaphore;
-class IFWL_AdapterThreadMgr
-{
-public:
- virtual ~IFWL_AdapterThreadMgr() {}
- virtual FWL_ERR Start(IFWL_Thread *pThread, FWL_HTHREAD &hThread, FX_BOOL bSuspended = FALSE) = 0;
- virtual FWL_ERR Resume(FWL_HTHREAD hThread) = 0;
- virtual FWL_ERR Suspend(FWL_HTHREAD hThread) = 0;
- virtual FWL_ERR Kill(FWL_HTHREAD hThread, int32_t iExitCode) = 0;
- virtual FWL_ERR Stop(FWL_HTHREAD hThread, int32_t iExitCode) = 0;
- virtual IFWL_Thread* GetCurrentThread() = 0;
+class IFWL_AdapterThreadMgr {
+ public:
+ virtual ~IFWL_AdapterThreadMgr() {}
+ virtual FWL_ERR Start(IFWL_Thread* pThread,
+ FWL_HTHREAD& hThread,
+ FX_BOOL bSuspended = FALSE) = 0;
+ virtual FWL_ERR Resume(FWL_HTHREAD hThread) = 0;
+ virtual FWL_ERR Suspend(FWL_HTHREAD hThread) = 0;
+ virtual FWL_ERR Kill(FWL_HTHREAD hThread, int32_t iExitCode) = 0;
+ virtual FWL_ERR Stop(FWL_HTHREAD hThread, int32_t iExitCode) = 0;
+ virtual IFWL_Thread* GetCurrentThread() = 0;
};
-class IFWL_AdapterSemaphore
-{
-public:
- virtual ~IFWL_AdapterSemaphore() {}
- static IFWL_AdapterSemaphore * Create();
- virtual FWL_ERR Destroy() = 0;
- virtual FWL_ERR Wait() const = 0;
- virtual FWL_ERR Post() = 0;
- virtual FWL_ERR Value(FX_DWORD &val) const = 0;
- virtual FWL_ERR Reset(int32_t init) = 0;
+class IFWL_AdapterSemaphore {
+ public:
+ virtual ~IFWL_AdapterSemaphore() {}
+ static IFWL_AdapterSemaphore* Create();
+ virtual FWL_ERR Destroy() = 0;
+ virtual FWL_ERR Wait() const = 0;
+ virtual FWL_ERR Post() = 0;
+ virtual FWL_ERR Value(FX_DWORD& val) const = 0;
+ virtual FWL_ERR Reset(int32_t init) = 0;
};
#endif
diff --git a/xfa/include/fwl/adapter/fwl_adaptertimermgr.h b/xfa/include/fwl/adapter/fwl_adaptertimermgr.h index d0e9f0ee59..3c862aabf8 100644 --- a/xfa/include/fwl/adapter/fwl_adaptertimermgr.h +++ b/xfa/include/fwl/adapter/fwl_adaptertimermgr.h @@ -12,11 +12,13 @@ class IFWL_Timer;
-class IFWL_AdapterTimerMgr
-{
-public:
- virtual ~IFWL_AdapterTimerMgr() {}
- virtual FWL_ERR Start(IFWL_Timer *pTimer, FX_DWORD dwElapse, FWL_HTIMER &hTimer, FX_BOOL bImmediately = TRUE) = 0;
- virtual FWL_ERR Stop(FWL_HTIMER hTimer) = 0;
+class IFWL_AdapterTimerMgr {
+ public:
+ virtual ~IFWL_AdapterTimerMgr() {}
+ virtual FWL_ERR Start(IFWL_Timer* pTimer,
+ FX_DWORD dwElapse,
+ FWL_HTIMER& hTimer,
+ FX_BOOL bImmediately = TRUE) = 0;
+ virtual FWL_ERR Stop(FWL_HTIMER hTimer) = 0;
};
#endif
diff --git a/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h b/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h index 29e91bab8c..d3bdd6f68b 100644 --- a/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h +++ b/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h @@ -14,43 +14,63 @@ class CFX_DIBitmap; class IFWL_AdapterMessageHook;
class IFWL_AppDelegate;
-class IFWL_AdapterWidgetMgr
-{
-public:
- virtual ~IFWL_AdapterWidgetMgr() {}
- virtual FWL_ERR CreateWidget(IFWL_Widget *pWidget, IFWL_Widget *pParent = NULL) = 0;
- virtual FWL_ERR DestroyWidget(IFWL_Widget *pWidget) = 0;
- virtual FWL_ERR GetWidgetRect(IFWL_Widget *pWidget, CFX_RectF &rect) = 0;
- virtual FWL_ERR SetWidgetRect(IFWL_Widget *pWidget, const CFX_RectF &rect) = 0;
- virtual FWL_ERR SetWidgetPosition(IFWL_Widget *pWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;
- virtual FWL_ERR SetParentWidget(IFWL_Widget *pWidget, IFWL_Widget *pParent) = 0;
- virtual FWL_ERR SetWidgetIcon(IFWL_Widget *pWidget, const CFX_DIBitmap *pIcon, FX_BOOL bBig) = 0;
- virtual FWL_ERR SetWidgetCaption(IFWL_Widget *pWidget, const CFX_WideStringC& wsCaption) = 0;
- virtual FWL_ERR SetBorderRegion(IFWL_Widget *pWidget, CFX_Path *pPath) = 0;
- virtual FWL_ERR SetTransparent(IFWL_Widget *pWidget, FX_DWORD dwAlpha) = 0;
- virtual FWL_ERR ShowWidget(IFWL_Widget *pWidget) = 0;
- virtual FWL_ERR HideWidget(IFWL_Widget *pWidget) = 0;
- virtual FWL_ERR SetNormal(IFWL_Widget *pWidget) = 0;
- virtual FWL_ERR SetMaximize(IFWL_Widget *pWidget) = 0;
- virtual FWL_ERR SetMinimize(IFWL_Widget *pWidget) = 0;
- virtual FWL_ERR SetFullScreen(IFWL_Widget *pWidget, FX_BOOL bFullScreen) = 0;
- virtual FX_BOOL CheckMessage() = 0;
- virtual FX_BOOL IsIdleMessage() = 0;
- virtual FWL_ERR DispatchMessage() = 0;
- virtual FWL_ERR RepaintWidget(IFWL_Widget *pWidget, const CFX_RectF *pRect) = 0;
- virtual FWL_ERR Exit(int32_t iExitCode) = 0;
- virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget *pWidget, void* UserData) = 0;
- virtual FWL_ERR GetWidgetDC(IFWL_Widget *pWidget, void* &pDC) = 0;
- virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget *pWidget, void* pDC, CFX_RectF *pClip = 0) = 0;
- virtual void* GetWindow(IFWL_Widget *pWidget) = 0;
- virtual FX_DWORD GetKeyState(FX_DWORD dwVirtKey) = 0;
- virtual FWL_ERR RunLoop(IFWL_Widget *widget) = 0;
- virtual FWL_ERR EndLoop() = 0;
- virtual FWL_ERR InitMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData) = 0;
- virtual FWL_ERR UpdateMenu(IFWL_Menu *pMenu, const void* hItem, int32_t iType) = 0;
- virtual int32_t TrackPopupMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData) = 0;
- virtual FWL_ERR SetMessageHook(IFWL_AdapterMessageHook *hook) = 0;
- virtual FWL_ERR GetSystemBorder(FX_FLOAT &l, FX_FLOAT &t, FX_FLOAT &r, FX_FLOAT &b) = 0;
- virtual FX_BOOL GetPopupPos(IFWL_Widget* pWidget, FX_FLOAT fMinHeight, FX_FLOAT fMaxHeight, const CFX_RectF &rtAnchor, CFX_RectF &rtPopup) = 0;
+class IFWL_AdapterWidgetMgr {
+ public:
+ virtual ~IFWL_AdapterWidgetMgr() {}
+ virtual FWL_ERR CreateWidget(IFWL_Widget* pWidget,
+ IFWL_Widget* pParent = NULL) = 0;
+ virtual FWL_ERR DestroyWidget(IFWL_Widget* pWidget) = 0;
+ virtual FWL_ERR GetWidgetRect(IFWL_Widget* pWidget, CFX_RectF& rect) = 0;
+ virtual FWL_ERR SetWidgetRect(IFWL_Widget* pWidget,
+ const CFX_RectF& rect) = 0;
+ virtual FWL_ERR SetWidgetPosition(IFWL_Widget* pWidget,
+ FX_FLOAT fx,
+ FX_FLOAT fy) = 0;
+ virtual FWL_ERR SetParentWidget(IFWL_Widget* pWidget,
+ IFWL_Widget* pParent) = 0;
+ virtual FWL_ERR SetWidgetIcon(IFWL_Widget* pWidget,
+ const CFX_DIBitmap* pIcon,
+ FX_BOOL bBig) = 0;
+ virtual FWL_ERR SetWidgetCaption(IFWL_Widget* pWidget,
+ const CFX_WideStringC& wsCaption) = 0;
+ virtual FWL_ERR SetBorderRegion(IFWL_Widget* pWidget, CFX_Path* pPath) = 0;
+ virtual FWL_ERR SetTransparent(IFWL_Widget* pWidget, FX_DWORD dwAlpha) = 0;
+ virtual FWL_ERR ShowWidget(IFWL_Widget* pWidget) = 0;
+ virtual FWL_ERR HideWidget(IFWL_Widget* pWidget) = 0;
+ virtual FWL_ERR SetNormal(IFWL_Widget* pWidget) = 0;
+ virtual FWL_ERR SetMaximize(IFWL_Widget* pWidget) = 0;
+ virtual FWL_ERR SetMinimize(IFWL_Widget* pWidget) = 0;
+ virtual FWL_ERR SetFullScreen(IFWL_Widget* pWidget, FX_BOOL bFullScreen) = 0;
+ virtual FX_BOOL CheckMessage() = 0;
+ virtual FX_BOOL IsIdleMessage() = 0;
+ virtual FWL_ERR DispatchMessage() = 0;
+ virtual FWL_ERR RepaintWidget(IFWL_Widget* pWidget,
+ const CFX_RectF* pRect) = 0;
+ virtual FWL_ERR Exit(int32_t iExitCode) = 0;
+ virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget* pWidget,
+ void* UserData) = 0;
+ virtual FWL_ERR GetWidgetDC(IFWL_Widget* pWidget, void*& pDC) = 0;
+ virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget* pWidget,
+ void* pDC,
+ CFX_RectF* pClip = 0) = 0;
+ virtual void* GetWindow(IFWL_Widget* pWidget) = 0;
+ virtual FX_DWORD GetKeyState(FX_DWORD dwVirtKey) = 0;
+ virtual FWL_ERR RunLoop(IFWL_Widget* widget) = 0;
+ virtual FWL_ERR EndLoop() = 0;
+ virtual FWL_ERR InitMenu(IFWL_Menu* pMenu, IFWL_MenuDP* pMenuData) = 0;
+ virtual FWL_ERR UpdateMenu(IFWL_Menu* pMenu,
+ const void* hItem,
+ int32_t iType) = 0;
+ virtual int32_t TrackPopupMenu(IFWL_Menu* pMenu, IFWL_MenuDP* pMenuData) = 0;
+ virtual FWL_ERR SetMessageHook(IFWL_AdapterMessageHook* hook) = 0;
+ virtual FWL_ERR GetSystemBorder(FX_FLOAT& l,
+ FX_FLOAT& t,
+ FX_FLOAT& r,
+ FX_FLOAT& b) = 0;
+ virtual FX_BOOL GetPopupPos(IFWL_Widget* pWidget,
+ FX_FLOAT fMinHeight,
+ FX_FLOAT fMaxHeight,
+ const CFX_RectF& rtAnchor,
+ CFX_RectF& rtPopup) = 0;
};
#endif
diff --git a/xfa/include/fwl/adapter/fwl_sdadapterimp.h b/xfa/include/fwl/adapter/fwl_sdadapterimp.h index 733a14da33..86a17286eb 100644 --- a/xfa/include/fwl/adapter/fwl_sdadapterimp.h +++ b/xfa/include/fwl/adapter/fwl_sdadapterimp.h @@ -14,59 +14,78 @@ class IFWL_WidgetMgrDelegate; class CFWL_SDAdatperNative;
class CFWL_SDAdapterWidgetMgr;
class CFWL_SDAdapterTimerMgr;
-class CFWL_SDAdapterWidgetMgr : public IFWL_AdapterWidgetMgr
-{
-public:
- CFWL_SDAdapterWidgetMgr();
- ~CFWL_SDAdapterWidgetMgr();
- virtual FWL_ERR CreateWidget(IFWL_Widget *pWidget, IFWL_Widget *pParent = NULL);
- virtual FWL_ERR DestroyWidget(IFWL_Widget *pWidget);
- virtual FWL_ERR SetWidgetRect(IFWL_Widget *pWidget, const CFX_RectF &rect);
- virtual FWL_ERR SetWidgetPosition(IFWL_Widget *pWidget, FX_FLOAT fx, FX_FLOAT fy);
- virtual FWL_ERR SetParentWidget(IFWL_Widget *pWidget, IFWL_Widget *pParent);
- virtual FWL_ERR ShowWidget(IFWL_Widget *pWidget);
- virtual FWL_ERR HideWidget(IFWL_Widget *pWidget);
- virtual FWL_ERR SetNormal(IFWL_Widget *pWidget);
- virtual FWL_ERR SetMaximize(IFWL_Widget *pWidget);
- virtual FWL_ERR SetMinimize(IFWL_Widget *pWidget);
- virtual FWL_ERR RunWidget(IFWL_Widget *pWidget);
- virtual FWL_ERR RepaintWidget(IFWL_Widget *pWidget, const CFX_RectF *pRect);
- virtual FWL_ERR Exit(int32_t iExitCode);
- virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget *pWidget, void *vp);
- virtual FX_BOOL GetPopupPos(IFWL_Widget* pWidget, FX_FLOAT fMinHeight, FX_FLOAT fMaxHeight, const CFX_RectF &rtAnchor, CFX_RectF &rtPopup);
-public:
- virtual FWL_ERR GetWidgetRect(IFWL_Widget *pWidget, CFX_RectF &rect);
- virtual FWL_ERR SetWidgetIcon(IFWL_Widget *pWidget, const CFX_DIBitmap *pIcon, FX_BOOL bBig);
- virtual FWL_ERR SetWidgetCaption(IFWL_Widget *pWidget, const CFX_WideStringC& wsCaption);
- virtual FWL_ERR SetBorderRegion(IFWL_Widget *pWidget, CFX_Path *pPath);
- virtual FWL_ERR SetTransparent(IFWL_Widget *pWidget, FX_DWORD dwAlpha);
- virtual FWL_ERR SetFullScreen(IFWL_Widget *pWidget, FX_BOOL bFullScreen);
- virtual FX_BOOL CheckMessage();
- virtual FX_BOOL IsIdleMessage();
- virtual FWL_ERR DispatchMessage();
- virtual FWL_ERR GetWidgetDC(IFWL_Widget *pWidget, void* &pDC);
- virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget *pWidget, void* pDC, CFX_RectF *pClip = 0);
- virtual void* GetWindow(IFWL_Widget *pWidget);
- virtual FX_DWORD GetKeyState(FX_DWORD dwVirtKey);
- virtual FWL_ERR RunLoop(IFWL_Widget *widget);
- virtual FWL_ERR EndLoop();
- virtual FWL_ERR InitMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData);
- virtual FWL_ERR UpdateMenu(IFWL_Menu *pMenu, const void* hItem, int32_t iType);
- virtual int32_t TrackPopupMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData);
- virtual FWL_ERR SetMessageHook(IFWL_AdapterMessageHook *hook);
- virtual FWL_ERR GetSystemBorder(FX_FLOAT &l, FX_FLOAT &t, FX_FLOAT &r, FX_FLOAT &b);
+class CFWL_SDAdapterWidgetMgr : public IFWL_AdapterWidgetMgr {
+ public:
+ CFWL_SDAdapterWidgetMgr();
+ ~CFWL_SDAdapterWidgetMgr();
+ virtual FWL_ERR CreateWidget(IFWL_Widget* pWidget,
+ IFWL_Widget* pParent = NULL);
+ virtual FWL_ERR DestroyWidget(IFWL_Widget* pWidget);
+ virtual FWL_ERR SetWidgetRect(IFWL_Widget* pWidget, const CFX_RectF& rect);
+ virtual FWL_ERR SetWidgetPosition(IFWL_Widget* pWidget,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ virtual FWL_ERR SetParentWidget(IFWL_Widget* pWidget, IFWL_Widget* pParent);
+ virtual FWL_ERR ShowWidget(IFWL_Widget* pWidget);
+ virtual FWL_ERR HideWidget(IFWL_Widget* pWidget);
+ virtual FWL_ERR SetNormal(IFWL_Widget* pWidget);
+ virtual FWL_ERR SetMaximize(IFWL_Widget* pWidget);
+ virtual FWL_ERR SetMinimize(IFWL_Widget* pWidget);
+ virtual FWL_ERR RunWidget(IFWL_Widget* pWidget);
+ virtual FWL_ERR RepaintWidget(IFWL_Widget* pWidget, const CFX_RectF* pRect);
+ virtual FWL_ERR Exit(int32_t iExitCode);
+ virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget* pWidget, void* vp);
+ virtual FX_BOOL GetPopupPos(IFWL_Widget* pWidget,
+ FX_FLOAT fMinHeight,
+ FX_FLOAT fMaxHeight,
+ const CFX_RectF& rtAnchor,
+ CFX_RectF& rtPopup);
+
+ public:
+ virtual FWL_ERR GetWidgetRect(IFWL_Widget* pWidget, CFX_RectF& rect);
+ virtual FWL_ERR SetWidgetIcon(IFWL_Widget* pWidget,
+ const CFX_DIBitmap* pIcon,
+ FX_BOOL bBig);
+ virtual FWL_ERR SetWidgetCaption(IFWL_Widget* pWidget,
+ const CFX_WideStringC& wsCaption);
+ virtual FWL_ERR SetBorderRegion(IFWL_Widget* pWidget, CFX_Path* pPath);
+ virtual FWL_ERR SetTransparent(IFWL_Widget* pWidget, FX_DWORD dwAlpha);
+ virtual FWL_ERR SetFullScreen(IFWL_Widget* pWidget, FX_BOOL bFullScreen);
+ virtual FX_BOOL CheckMessage();
+ virtual FX_BOOL IsIdleMessage();
+ virtual FWL_ERR DispatchMessage();
+ virtual FWL_ERR GetWidgetDC(IFWL_Widget* pWidget, void*& pDC);
+ virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget* pWidget,
+ void* pDC,
+ CFX_RectF* pClip = 0);
+ virtual void* GetWindow(IFWL_Widget* pWidget);
+ virtual FX_DWORD GetKeyState(FX_DWORD dwVirtKey);
+ virtual FWL_ERR RunLoop(IFWL_Widget* widget);
+ virtual FWL_ERR EndLoop();
+ virtual FWL_ERR InitMenu(IFWL_Menu* pMenu, IFWL_MenuDP* pMenuData);
+ virtual FWL_ERR UpdateMenu(IFWL_Menu* pMenu,
+ const void* hItem,
+ int32_t iType);
+ virtual int32_t TrackPopupMenu(IFWL_Menu* pMenu, IFWL_MenuDP* pMenuData);
+ virtual FWL_ERR SetMessageHook(IFWL_AdapterMessageHook* hook);
+ virtual FWL_ERR GetSystemBorder(FX_FLOAT& l,
+ FX_FLOAT& t,
+ FX_FLOAT& r,
+ FX_FLOAT& b);
};
-class CFWL_SDAdapterThreadMgr : public IFWL_AdapterThreadMgr
-{
-public:
- CFWL_SDAdapterThreadMgr();
- ~CFWL_SDAdapterThreadMgr();
-public:
- virtual FWL_ERR Start(IFWL_Thread *pThread, FWL_HTHREAD &hThread, FX_BOOL bSuspended = FALSE);
- virtual FWL_ERR Resume(FWL_HTHREAD hThread);
- virtual FWL_ERR Suspend(FWL_HTHREAD hThread);
- virtual FWL_ERR Kill(FWL_HTHREAD hThread, int32_t iExitCode);
- virtual FWL_ERR Stop(FWL_HTHREAD hThread, int32_t iExitCode);
- virtual IFWL_Thread* GetCurrentThread();
+class CFWL_SDAdapterThreadMgr : public IFWL_AdapterThreadMgr {
+ public:
+ CFWL_SDAdapterThreadMgr();
+ ~CFWL_SDAdapterThreadMgr();
+
+ public:
+ virtual FWL_ERR Start(IFWL_Thread* pThread,
+ FWL_HTHREAD& hThread,
+ FX_BOOL bSuspended = FALSE);
+ virtual FWL_ERR Resume(FWL_HTHREAD hThread);
+ virtual FWL_ERR Suspend(FWL_HTHREAD hThread);
+ virtual FWL_ERR Kill(FWL_HTHREAD hThread, int32_t iExitCode);
+ virtual FWL_ERR Stop(FWL_HTHREAD hThread, int32_t iExitCode);
+ virtual IFWL_Thread* GetCurrentThread();
};
#endif
|