summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/fwl_widgetimp.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-04 17:57:03 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-04 17:57:03 -0700
commitc777f486f84611d2fdd2d03af661b14955f9efb6 (patch)
tree679012454d82e885f749d17f75fd12735efec29a /xfa/fwl/core/fwl_widgetimp.h
parent41aad19ba366540bd4efa20a9009ac1c70a81403 (diff)
downloadpdfium-c777f486f84611d2fdd2d03af661b14955f9efb6.tar.xz
Convert FWL_ERR into an enum class.
This Cl updates FWL_ERR to be an FWL_Error enum class. It removes FX_ERR and replaces it with FWL_Error as well as the values were the same. There were many places where we either returned other values for FWL_ERR results. This Cl is the same as: https://codereview.chromium.org/1943413002/ but I seem to have messed up the base URL in that one. TBR=tsepez@chromium.org Review-Url: https://codereview.chromium.org/1952693003
Diffstat (limited to 'xfa/fwl/core/fwl_widgetimp.h')
-rw-r--r--xfa/fwl/core/fwl_widgetimp.h66
1 files changed, 34 insertions, 32 deletions
diff --git a/xfa/fwl/core/fwl_widgetimp.h b/xfa/fwl/core/fwl_widgetimp.h
index d20fe0d75e..4af2872f41 100644
--- a/xfa/fwl/core/fwl_widgetimp.h
+++ b/xfa/fwl/core/fwl_widgetimp.h
@@ -28,49 +28,51 @@ class CFWL_WidgetImp {
public:
virtual ~CFWL_WidgetImp();
- virtual FWL_ERR Initialize();
- virtual FWL_ERR Finalize();
- virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const;
+ virtual FWL_Error Initialize();
+ virtual FWL_Error Finalize();
+ virtual FWL_Error GetClassName(CFX_WideString& wsClass) const;
virtual uint32_t GetClassID() const;
virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
- virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
- virtual FWL_ERR GetGlobalRect(CFX_RectF& rect);
- virtual FWL_ERR SetWidgetRect(const CFX_RectF& rect);
- virtual FWL_ERR GetClientRect(CFX_RectF& rect);
+ virtual FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
+ virtual FWL_Error GetGlobalRect(CFX_RectF& rect);
+ virtual FWL_Error SetWidgetRect(const CFX_RectF& rect);
+ virtual FWL_Error GetClientRect(CFX_RectF& rect);
virtual IFWL_Widget* GetParent();
- virtual FWL_ERR SetParent(IFWL_Widget* pParent);
+ virtual FWL_Error SetParent(IFWL_Widget* pParent);
virtual IFWL_Widget* GetOwner();
- virtual FWL_ERR SetOwner(IFWL_Widget* pOwner);
+ virtual FWL_Error SetOwner(IFWL_Widget* pOwner);
virtual IFWL_Widget* GetOuter();
virtual uint32_t GetStyles();
- virtual FWL_ERR ModifyStyles(uint32_t dwStylesAdded,
- uint32_t dwStylesRemoved);
+ virtual FWL_Error ModifyStyles(uint32_t dwStylesAdded,
+ uint32_t dwStylesRemoved);
virtual uint32_t GetStylesEx();
- virtual FWL_ERR ModifyStylesEx(uint32_t dwStylesExAdded,
- uint32_t dwStylesExRemoved);
+ virtual FWL_Error ModifyStylesEx(uint32_t dwStylesExAdded,
+ uint32_t dwStylesExRemoved);
virtual uint32_t GetStates();
virtual void SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE);
- virtual FWL_ERR SetPrivateData(void* module_id,
- void* pData,
- PD_CALLBACK_FREEDATA callback);
+ virtual FWL_Error SetPrivateData(void* module_id,
+ void* pData,
+ PD_CALLBACK_FREEDATA callback);
virtual void* GetPrivateData(void* module_id);
- virtual FWL_ERR Update();
- virtual FWL_ERR LockUpdate();
- virtual FWL_ERR UnlockUpdate();
+ virtual FWL_Error Update();
+ virtual FWL_Error LockUpdate();
+ virtual FWL_Error UnlockUpdate();
virtual FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy);
- virtual FWL_ERR TransformTo(IFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy);
- virtual FWL_ERR TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt);
- virtual FWL_ERR GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE);
- virtual FWL_ERR SetMatrix(const CFX_Matrix& matrix);
- virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix = NULL);
+ virtual FWL_Error TransformTo(IFWL_Widget* pWidget,
+ FX_FLOAT& fx,
+ FX_FLOAT& fy);
+ virtual FWL_Error TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt);
+ virtual FWL_Error GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE);
+ virtual FWL_Error SetMatrix(const CFX_Matrix& matrix);
+ virtual FWL_Error DrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix = NULL);
virtual IFWL_ThemeProvider* GetThemeProvider();
- virtual FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
- virtual FWL_ERR SetDataProvider(IFWL_DataProvider* pDataProvider);
+ virtual FWL_Error SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
+ virtual FWL_Error SetDataProvider(IFWL_DataProvider* pDataProvider);
virtual IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate);
virtual IFWL_App* GetOwnerApp() const;
- FWL_ERR SetOwnerApp(CFWL_AppImp* pOwnerApp);
+ FWL_Error SetOwnerApp(CFWL_AppImp* pOwnerApp);
IFWL_Widget* GetInterface() const;
void SetInterface(IFWL_Widget* pInterface);
CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent);
@@ -163,10 +165,10 @@ class CFWL_WidgetImpDelegate : public IFWL_WidgetDelegate {
public:
CFWL_WidgetImpDelegate();
~CFWL_WidgetImpDelegate() override {}
- int32_t OnProcessMessage(CFWL_Message* pMessage) override;
- FWL_ERR OnProcessEvent(CFWL_Event* pEvent) override;
- FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix = NULL) override;
+ void OnProcessMessage(CFWL_Message* pMessage) override;
+ void OnProcessEvent(CFWL_Event* pEvent) override;
+ void OnDrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix = NULL) override;
};
#endif // XFA_FWL_CORE_FWL_WIDGETIMP_H_