Use LONG for OLE IAccessible methods parameters

This is another fix for 64 bit Cygwin build: LONG is defined as a 32 bit
type in it, but not long, which is 64 bits, so use the former instead of
the latter.
This commit is contained in:
Vadim Zeitlin
2018-01-13 14:26:00 +01:00
parent ebb06fbeaf
commit d55d5b1dd7

View File

@@ -47,7 +47,7 @@
int wxConvertToWindowsRole(wxAccRole wxrole); int wxConvertToWindowsRole(wxAccRole wxrole);
// Convert to Windows state // Convert to Windows state
long wxConvertToWindowsState(long wxstate); LONG wxConvertToWindowsState(long wxstate);
// Convert to Windows selection flag // Convert to Windows selection flag
int wxConvertToWindowsSelFlag(wxAccSelectionFlags sel); int wxConvertToWindowsSelFlag(wxAccSelectionFlags sel);
@@ -191,17 +191,17 @@ public:
// Retrieves the child element or child object at a given point on the screen. // Retrieves the child element or child object at a given point on the screen.
// All visual objects support this method; sound objects do not support it. // All visual objects support this method; sound objects do not support it.
STDMETHODIMP accHitTest(long xLeft, long yLeft, VARIANT* pVarID); STDMETHODIMP accHitTest(LONG xLeft, LONG yLeft, VARIANT* pVarID);
// Retrieves the specified object's current screen location. All visual objects must // Retrieves the specified object's current screen location. All visual objects must
// support this method; sound objects do not support it. // support this method; sound objects do not support it.
STDMETHODIMP accLocation ( long* pxLeft, long* pyTop, long* pcxWidth, long* pcyHeight, VARIANT varID); STDMETHODIMP accLocation ( LONG* pxLeft, LONG* pyTop, LONG* pcxWidth, LONG* pcyHeight, VARIANT varID);
// Traverses to another user interface element within a container and retrieves the object. // Traverses to another user interface element within a container and retrieves the object.
// All visual objects must support this method. // All visual objects must support this method.
STDMETHODIMP accNavigate ( long navDir, VARIANT varStart, VARIANT* pVarEnd); STDMETHODIMP accNavigate ( LONG navDir, VARIANT varStart, VARIANT* pVarEnd);
// Retrieves the address of an IDispatch interface for the specified child. // Retrieves the address of an IDispatch interface for the specified child.
// All objects must support this property. // All objects must support this property.
@@ -211,7 +211,7 @@ public:
// Retrieves the number of children that belong to this object. // Retrieves the number of children that belong to this object.
// All objects must support this property. // All objects must support this property.
STDMETHODIMP get_accChildCount ( long* pCountChildren); STDMETHODIMP get_accChildCount ( LONG* pCountChildren);
// Retrieves the IDispatch interface of the object's parent. // Retrieves the IDispatch interface of the object's parent.
// All objects support this property. // All objects support this property.
@@ -244,7 +244,7 @@ public:
// object and the identifier of the appropriate topic within that file. // object and the identifier of the appropriate topic within that file.
// Not all objects support this property. // Not all objects support this property.
STDMETHODIMP get_accHelpTopic ( BSTR* pszHelpFile, VARIANT varChild, long* pidTopic); STDMETHODIMP get_accHelpTopic ( BSTR* pszHelpFile, VARIANT varChild, LONG* pidTopic);
// Retrieves the specified object's shortcut key or access key, also known as // Retrieves the specified object's shortcut key or access key, also known as
// the mnemonic. All objects that have a shortcut key or access key support // the mnemonic. All objects that have a shortcut key or access key support
@@ -278,7 +278,7 @@ public:
// specified object. All objects that select or receive the // specified object. All objects that select or receive the
// keyboard focus must support this method. // keyboard focus must support this method.
STDMETHODIMP accSelect ( long flagsSelect, VARIANT varID ); STDMETHODIMP accSelect ( LONG flagsSelect, VARIANT varID );
// Retrieves the object that has the keyboard focus. All objects // Retrieves the object that has the keyboard focus. All objects
// that receive the keyboard focus must support this property. // that receive the keyboard focus must support this property.
@@ -368,7 +368,7 @@ void wxIAccessible::Quiesce()
// Retrieves the child element or child object at a given point on the screen. // Retrieves the child element or child object at a given point on the screen.
// All visual objects support this method; sound objects do not support it. // All visual objects support this method; sound objects do not support it.
STDMETHODIMP wxIAccessible::accHitTest(long xLeft, long yLeft, VARIANT* pVarID) STDMETHODIMP wxIAccessible::accHitTest(LONG xLeft, LONG yLeft, VARIANT* pVarID)
{ {
wxLogTrace(wxT("access"), wxT("accHitTest")); wxLogTrace(wxT("access"), wxT("accHitTest"));
wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) ); wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) );
@@ -441,7 +441,7 @@ STDMETHODIMP wxIAccessible::accHitTest(long xLeft, long yLeft, VARIANT* pVarID)
// Retrieves the specified object's current screen location. All visual objects must // Retrieves the specified object's current screen location. All visual objects must
// support this method; sound objects do not support it. // support this method; sound objects do not support it.
STDMETHODIMP wxIAccessible::accLocation ( long* pxLeft, long* pyTop, long* pcxWidth, long* pcyHeight, VARIANT varID) STDMETHODIMP wxIAccessible::accLocation ( LONG* pxLeft, LONG* pyTop, LONG* pcxWidth, LONG* pcyHeight, VARIANT varID)
{ {
wxLogTrace(wxT("access"), wxT("accLocation")); wxLogTrace(wxT("access"), wxT("accLocation"));
wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) ); wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) );
@@ -492,7 +492,7 @@ STDMETHODIMP wxIAccessible::accLocation ( long* pxLeft, long* pyTop, long* pcxWi
// Traverses to another user interface element within a container and retrieves the object. // Traverses to another user interface element within a container and retrieves the object.
// All visual objects must support this method. // All visual objects must support this method.
STDMETHODIMP wxIAccessible::accNavigate ( long navDir, VARIANT varStart, VARIANT* pVarEnd) STDMETHODIMP wxIAccessible::accNavigate ( LONG navDir, VARIANT varStart, VARIANT* pVarEnd)
{ {
wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) ); wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) );
if (!m_pAccessible) if (!m_pAccessible)
@@ -727,7 +727,7 @@ STDMETHODIMP wxIAccessible::get_accChild ( VARIANT varChildID, IDispatch** ppDis
// Retrieves the number of children that belong to this object. // Retrieves the number of children that belong to this object.
// All objects must support this property. // All objects must support this property.
STDMETHODIMP wxIAccessible::get_accChildCount ( long* pCountChildren) STDMETHODIMP wxIAccessible::get_accChildCount ( LONG* pCountChildren)
{ {
wxLogTrace(wxT("access"), wxT("get_accChildCount")); wxLogTrace(wxT("access"), wxT("get_accChildCount"));
wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) ); wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) );
@@ -757,7 +757,7 @@ STDMETHODIMP wxIAccessible::get_accChildCount ( long* pCountChildren)
} }
else else
{ {
* pCountChildren = (long) childCount; * pCountChildren = (LONG) childCount;
return S_OK; return S_OK;
} }
@@ -1071,7 +1071,7 @@ STDMETHODIMP wxIAccessible::get_accHelp ( VARIANT varID, BSTR* pszHelp)
// NOTE: not supported by wxWidgets at this time. Use // NOTE: not supported by wxWidgets at this time. Use
// GetHelpText instead. // GetHelpText instead.
STDMETHODIMP wxIAccessible::get_accHelpTopic ( BSTR* pszHelpFile, VARIANT varChild, long* pidTopic) STDMETHODIMP wxIAccessible::get_accHelpTopic ( BSTR* pszHelpFile, VARIANT varChild, LONG* pidTopic)
{ {
wxLogTrace(wxT("access"), wxT("get_accHelpTopic")); wxLogTrace(wxT("access"), wxT("get_accHelpTopic"));
wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) ); wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) );
@@ -1346,7 +1346,7 @@ STDMETHODIMP wxIAccessible::get_accState ( VARIANT varID, VARIANT* pVarState)
} }
else else
{ {
long state = wxConvertToWindowsState(wxstate); LONG state = wxConvertToWindowsState(wxstate);
pVarState->lVal = state; pVarState->lVal = state;
pVarState->vt = VT_I4; pVarState->vt = VT_I4;
return S_OK; return S_OK;
@@ -1422,7 +1422,7 @@ STDMETHODIMP wxIAccessible::get_accValue ( VARIANT varID, BSTR* pszValue)
// specified object. All objects that select or receive the // specified object. All objects that select or receive the
// keyboard focus must support this method. // keyboard focus must support this method.
STDMETHODIMP wxIAccessible::accSelect ( long flagsSelect, VARIANT varID ) STDMETHODIMP wxIAccessible::accSelect ( LONG flagsSelect, VARIANT varID )
{ {
wxLogTrace(wxT("access"), wxT("get_accSelect")); wxLogTrace(wxT("access"), wxT("get_accSelect"));
wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) ); wxASSERT( ( m_pAccessible != NULL ) || ( m_bQuiescing == true ) );
@@ -1693,13 +1693,13 @@ IAccessible* wxIAccessible::GetChildStdAccessible(int id)
#if 0 #if 0
{ {
// Loop until we find the right id // Loop until we find the right id
long nChildren = 0; LONG nChildren = 0;
this->get_accChildCount(& nChildren); this->get_accChildCount(& nChildren);
int i; int i;
for (i = 0; i < nChildren; i++) for (i = 0; i < nChildren; i++)
{ {
long obtained = 0; LONG obtained = 0;
VARIANT var; VARIANT var;
VariantInit(& var); VariantInit(& var);
var.vt = VT_I4; var.vt = VT_I4;
@@ -1983,9 +1983,9 @@ int wxConvertToWindowsRole(wxAccRole wxrole)
} }
// Convert to Windows state // Convert to Windows state
long wxConvertToWindowsState(long wxstate) LONG wxConvertToWindowsState(long wxstate)
{ {
long state = 0; LONG state = 0;
if (wxstate & wxACC_STATE_SYSTEM_ALERT_HIGH) if (wxstate & wxACC_STATE_SYSTEM_ALERT_HIGH)
state |= STATE_SYSTEM_ALERT_HIGH; state |= STATE_SYSTEM_ALERT_HIGH;