diff options
author | dsinclair <dsinclair@chromium.org> | 2016-05-03 13:00:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-03 13:00:25 -0700 |
commit | 89fcde88f0c03da77d7fd83dece7726d66fd190e (patch) | |
tree | 509e8ee5c74480d1c60892c5868f0b888808f6b9 /xfa/fxfa/include | |
parent | 5fc4f31285c3a88fc157fd2d9b9cf2eb5c7cabed (diff) | |
download | pdfium-89fcde88f0c03da77d7fd83dece7726d66fd190e.tar.xz |
Remove FWL_WGTHITTEST_* defines in favour of enum class.
This Cl updates the FWL_WGTHITTEST_ defines to an enum class and fixes up any
code issues.
Review-Url: https://codereview.chromium.org/1948583002
Diffstat (limited to 'xfa/fxfa/include')
-rw-r--r-- | xfa/fxfa/include/xfa_ffwidget.h | 3 | ||||
-rw-r--r-- | xfa/fxfa/include/xfa_ffwidgethandler.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxfa/include/xfa_ffwidget.h b/xfa/fxfa/include/xfa_ffwidget.h index a6ab999485..74e4c84c4d 100644 --- a/xfa/fxfa/include/xfa_ffwidget.h +++ b/xfa/fxfa/include/xfa_ffwidget.h @@ -18,6 +18,7 @@ class CXFA_FFPageView; class CXFA_FFDocView; class CXFA_FFDoc; class CXFA_FFApp; +enum class FWL_WidgetHit; inline FX_FLOAT XFA_UnitPx2Pt(FX_FLOAT fPx, FX_FLOAT fDpi) { return fPx * 72.0f / fDpi; @@ -84,7 +85,7 @@ class CXFA_FFWidget : public CFX_PrivateData, public CXFA_ContentLayoutItem { virtual FX_BOOL OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags); virtual FX_BOOL OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags); virtual FX_BOOL OnChar(uint32_t dwChar, uint32_t dwFlags); - virtual uint32_t OnHitTest(FX_FLOAT fx, FX_FLOAT fy); + virtual FWL_WidgetHit OnHitTest(FX_FLOAT fx, FX_FLOAT fy); virtual FX_BOOL OnSetCursor(FX_FLOAT fx, FX_FLOAT fy); virtual FX_BOOL CanUndo() { return FALSE; } virtual FX_BOOL CanRedo() { return FALSE; } diff --git a/xfa/fxfa/include/xfa_ffwidgethandler.h b/xfa/fxfa/include/xfa_ffwidgethandler.h index f6cd2170a5..8159d87cf0 100644 --- a/xfa/fxfa/include/xfa_ffwidgethandler.h +++ b/xfa/fxfa/include/xfa_ffwidgethandler.h @@ -13,6 +13,7 @@ #include "xfa/fxfa/parser/xfa_document.h" class CXFA_FFDocView; +enum class FWL_WidgetHit; class CXFA_FFWidgetHandler { public: @@ -64,7 +65,7 @@ class CXFA_FFWidgetHandler { uint32_t dwFlags); FX_BOOL OnKeyUp(CXFA_FFWidget* hWidget, uint32_t dwKeyCode, uint32_t dwFlags); FX_BOOL OnChar(CXFA_FFWidget* hWidget, uint32_t dwChar, uint32_t dwFlags); - uint32_t OnHitTest(CXFA_FFWidget* hWidget, FX_FLOAT fx, FX_FLOAT fy); + FWL_WidgetHit OnHitTest(CXFA_FFWidget* hWidget, FX_FLOAT fx, FX_FLOAT fy); FX_BOOL OnSetCursor(CXFA_FFWidget* hWidget, FX_FLOAT fx, FX_FLOAT fy); void RenderWidget(CXFA_FFWidget* hWidget, CFX_Graphics* pGS, |