summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
commitbfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (patch)
tree4cfbe682869d89900f33751c37f6a84865beeb0a /fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
parentb116136da234afcad018bb44a3ccb64b9ad2a554 (diff)
downloadpdfium-bfa9a824a20f37c2dd7111012b46c929cf2ed8a0.tar.xz
Merge to XFA: Use stdint.h types throughout PDFium.
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_Wnd.cpp')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Wnd.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
index 69535d7d85..c621508885 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
@@ -11,10 +11,10 @@
/* -------------------------- CPWL_Timer -------------------------- */
-static CFX_MapPtrTemplate<FX_INT32, CPWL_Timer*>& GetPWLTimeMap()
+static CFX_MapPtrTemplate<int32_t, CPWL_Timer*>& GetPWLTimeMap()
{
// Leak the object at shutdown.
- static auto timeMap = new CFX_MapPtrTemplate<FX_INT32, CPWL_Timer*>;
+ static auto timeMap = new CFX_MapPtrTemplate<int32_t, CPWL_Timer*>;
return *timeMap;
}
@@ -32,7 +32,7 @@ CPWL_Timer::~CPWL_Timer()
KillPWLTimer();
}
-FX_INT32 CPWL_Timer::SetPWLTimer(FX_INT32 nElapse)
+int32_t CPWL_Timer::SetPWLTimer(int32_t nElapse)
{
if (m_nTimerID != 0) KillPWLTimer();
m_nTimerID = m_pSystemHandler->SetTimer(nElapse, TimerProc);
@@ -50,7 +50,7 @@ void CPWL_Timer::KillPWLTimer()
}
}
-void CPWL_Timer::TimerProc(FX_INT32 idEvent)
+void CPWL_Timer::TimerProc(int32_t idEvent)
{
CPWL_Timer* pTimer = NULL;
if (GetPWLTimeMap().Lookup(idEvent, pTimer))
@@ -74,7 +74,7 @@ CPWL_TimerHandler::~CPWL_TimerHandler()
if (m_pTimer) delete m_pTimer;
}
-void CPWL_TimerHandler::BeginTimer(FX_INT32 nElapse)
+void CPWL_TimerHandler::BeginTimer(int32_t nElapse)
{
if (!m_pTimer)
m_pTimer = new CPWL_Timer(this, GetSystemHandler());
@@ -134,7 +134,7 @@ public:
FX_BOOL IsWndCaptureMouse(const CPWL_Wnd * pWnd) const
{
if (pWnd)
- for( FX_INT32 i=0,sz=m_aMousePath.GetSize(); i<sz; i++)
+ for( int32_t i=0,sz=m_aMousePath.GetSize(); i<sz; i++)
if (m_aMousePath.GetAt(i) == pWnd)
return TRUE;
@@ -150,7 +150,7 @@ public:
FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const
{
if (pWnd)
- for( FX_INT32 i=0,sz=m_aKeyboardPath.GetSize(); i<sz; i++)
+ for( int32_t i=0,sz=m_aKeyboardPath.GetSize(); i<sz; i++)
if (m_aKeyboardPath.GetAt(i) == pWnd)
return TRUE;
@@ -294,7 +294,7 @@ void CPWL_Wnd::Destroy()
if (m_bCreated)
{
- for (FX_INT32 i = m_aChildren.GetSize()-1; i >= 0; i --)
+ for (int32_t i = m_aChildren.GetSize()-1; i >= 0; i --)
{
if (CPWL_Wnd * pChild = m_aChildren[i])
{
@@ -355,7 +355,7 @@ void CPWL_Wnd::InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rc
CPDF_Rect SubArray[4];
rcOld.Substract4(rcNew,SubArray);
- for (FX_INT32 i=0;i<4;i++)
+ for (int32_t i=0;i<4;i++)
{
if (SubArray[i].left == 0 &&
SubArray[i].right == 0 &&
@@ -366,7 +366,7 @@ void CPWL_Wnd::InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rc
}
rcNew.Substract4(rcOld,SubArray);
- for (FX_INT32 j=0;j<4;j++)
+ for (int32_t j=0;j<4;j++)
{
if (SubArray[j].left == 0 &&
SubArray[j].right == 0 &&
@@ -423,7 +423,7 @@ void CPWL_Wnd::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
void CPWL_Wnd::GetChildAppearanceStream(CFX_ByteTextBuf & sAppStream)
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))
{
@@ -468,7 +468,7 @@ void CPWL_Wnd::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2
void CPWL_Wnd::DrawChildAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device)
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))
{
@@ -524,7 +524,7 @@ FX_BOOL CPWL_Wnd::key_method_name(FX_WORD nChar, FX_DWORD nFlag)\
{\
if (IsWndCaptureKeyboard(this))\
{\
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
{\
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))\
{\
@@ -546,7 +546,7 @@ FX_BOOL CPWL_Wnd::mouse_method_name(const CPDF_Point & point, FX_DWORD nFlag)\
{\
if (IsWndCaptureMouse(this))\
{\
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
{\
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))\
{\
@@ -560,7 +560,7 @@ FX_BOOL CPWL_Wnd::mouse_method_name(const CPDF_Point & point, FX_DWORD nFlag)\
}\
else\
{\
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
{\
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))\
{\
@@ -599,7 +599,7 @@ FX_BOOL CPWL_Wnd::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD
SetCursor();
if (IsWndCaptureKeyboard(this))
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))
{
@@ -621,7 +621,7 @@ void CPWL_Wnd::AddChild(CPWL_Wnd * pWnd)
void CPWL_Wnd::RemoveChild(CPWL_Wnd * pWnd)
{
- for (FX_INT32 i = m_aChildren.GetSize()-1; i >= 0; i --)
+ for (int32_t i = m_aChildren.GetSize()-1; i >= 0; i --)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -634,7 +634,7 @@ void CPWL_Wnd::RemoveChild(CPWL_Wnd * pWnd)
}
}
-void CPWL_Wnd::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_Wnd::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
switch (msg)
{
@@ -753,18 +753,18 @@ CPWL_Color CPWL_Wnd::GetTextStrokeColor() const
return m_sPrivateParam.sTextStrokeColor;
}
-FX_INT32 CPWL_Wnd::GetBorderStyle() const
+int32_t CPWL_Wnd::GetBorderStyle() const
{
return m_sPrivateParam.nBorderStyle;
}
-void CPWL_Wnd::SetBorderStyle(FX_INT32 nBorderStyle)
+void CPWL_Wnd::SetBorderStyle(int32_t nBorderStyle)
{
if (HasFlag(PWS_BORDER))
m_sPrivateParam.nBorderStyle = nBorderStyle;
}
-FX_INT32 CPWL_Wnd::GetBorderWidth() const
+int32_t CPWL_Wnd::GetBorderWidth() const
{
if (HasFlag(PWS_BORDER))
return m_sPrivateParam.dwBorderWidth;
@@ -772,7 +772,7 @@ FX_INT32 CPWL_Wnd::GetBorderWidth() const
return 0;
}
-FX_INT32 CPWL_Wnd::GetInnerBorderWidth() const
+int32_t CPWL_Wnd::GetInnerBorderWidth() const
{
/*
switch (GetBorderStyle())
@@ -785,7 +785,7 @@ FX_INT32 CPWL_Wnd::GetInnerBorderWidth() const
return 0;
}
-void CPWL_Wnd::SetBorderWidth(FX_INT32 nBorderWidth)
+void CPWL_Wnd::SetBorderWidth(int32_t nBorderWidth)
{
if (HasFlag(PWS_BORDER))
m_sPrivateParam.dwBorderWidth = nBorderWidth;
@@ -861,7 +861,7 @@ void CPWL_Wnd::SetCapture()
void CPWL_Wnd::ReleaseCapture()
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
pChild->ReleaseCapture();
@@ -918,7 +918,7 @@ void CPWL_Wnd::SetVisible(FX_BOOL bVisible)
{
if (IsValid())
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -975,7 +975,7 @@ void CPWL_Wnd::SetCursor()
{
if (IFX_SystemHandler* pSH = GetSystemHandler())
{
- FX_INT32 nCursorType = this->GetCreationParam().eCursorType;
+ int32_t nCursorType = this->GetCreationParam().eCursorType;
pSH->SetCursor(nCursorType);
}
}
@@ -1063,7 +1063,7 @@ IFX_Edit_FontMap* CPWL_Wnd::GetFontMap() const
return m_sPrivateParam.pFontMap;
}
-CPWL_Color CPWL_Wnd::GetBorderLeftTopColor(FX_INT32 nBorderStyle) const
+CPWL_Color CPWL_Wnd::GetBorderLeftTopColor(int32_t nBorderStyle) const
{
CPWL_Color color;
@@ -1086,7 +1086,7 @@ CPWL_Color CPWL_Wnd::GetBorderLeftTopColor(FX_INT32 nBorderStyle) const
return color;
}
-CPWL_Color CPWL_Wnd::GetBorderRightBottomColor(FX_INT32 nBorderStyle) const
+CPWL_Color CPWL_Wnd::GetBorderRightBottomColor(int32_t nBorderStyle) const
{
CPWL_Color color;
@@ -1111,14 +1111,14 @@ CPWL_Color CPWL_Wnd::GetBorderRightBottomColor(FX_INT32 nBorderStyle) const
/* ----------------------------------------------------------------- */
-FX_INT32 CPWL_Wnd::GetTransparency()
+int32_t CPWL_Wnd::GetTransparency()
{
return m_sPrivateParam.nTransparency;
}
-void CPWL_Wnd::SetTransparency(FX_INT32 nTransparency)
+void CPWL_Wnd::SetTransparency(int32_t nTransparency)
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -1155,13 +1155,13 @@ CPDF_Matrix CPWL_Wnd::GetWindowMatrix() const
return mt;
}
-void CPWL_Wnd::PWLtoWnd(const CPDF_Point& point, FX_INT32& x, FX_INT32& y) const
+void CPWL_Wnd::PWLtoWnd(const CPDF_Point& point, int32_t& x, int32_t& y) const
{
CPDF_Matrix mt = GetWindowMatrix();
CPDF_Point pt = point;
mt.Transform(pt.x,pt.y);
- x = (FX_INT32)(pt.x+0.5);
- y = (FX_INT32)(pt.y+0.5);
+ x = (int32_t)(pt.x+0.5);
+ y = (int32_t)(pt.y+0.5);
}
FX_RECT CPWL_Wnd::PWLtoWnd(const CPDF_Rect & rect) const
@@ -1169,7 +1169,7 @@ FX_RECT CPWL_Wnd::PWLtoWnd(const CPDF_Rect & rect) const
CPDF_Rect rcTemp = rect;
CPDF_Matrix mt = GetWindowMatrix();
mt.TransformRect(rcTemp);
- return FX_RECT((FX_INT32)(rcTemp.left+0.5), (FX_INT32)(rcTemp.bottom+0.5), (FX_INT32)(rcTemp.right+0.5), (FX_INT32)(rcTemp.top+0.5));
+ return FX_RECT((int32_t)(rcTemp.left+0.5), (int32_t)(rcTemp.bottom+0.5), (int32_t)(rcTemp.right+0.5), (int32_t)(rcTemp.top+0.5));
}
FX_HWND CPWL_Wnd::GetAttachedHWnd() const
@@ -1275,7 +1275,7 @@ void CPWL_Wnd::EnableWindow(FX_BOOL bEnable)
{
if (m_bEnabled != bEnable)
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{