wxCALLBACK added, wxCOMPFUNC_CONV moved to defs.h

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-10-01 18:27:51 +00:00
parent ddc8c2e3ab
commit 0661ec3993
3 changed files with 36 additions and 13 deletions

View File

@ -297,9 +297,40 @@ typedef int wxWindowID;
#define WXUNUSED(identifier) identifier
#endif
/*
* Making or using wxWindows as a Windows DLL
*/
// ----------------------------------------------------------------------------
// portable calling conventions macros
// ----------------------------------------------------------------------------
// wxCALLBACK should be used for the functions which are called back by
// Windows (such as compare function for wxListCtrl)
#if defined(__WXMSW__)
#if defined(__MINGW32__)
#define wxCALLBACK __attribute__((stdcall))
#else
// both VC++ and Borland understand this
#define wxCALLBACK _stdcall
#endif
#else
// no stdcall under Unix
#define wxCALLBACK
#endif // platform
// callling convention for the qsort(3) callback
#if defined(__VISUALC__)
#define wxCMPFUNC_CONV _cdecl
#elif defined(__VISAGECPP__)
#define wxCMPFUNC_CONV _Optlink
#else // !Visual C++
#define wxCMPFUNC_CONV
#endif // compiler
// compatibility :-(
#define CMPFUNC_CONV wxCMPFUNC_CONV
// ----------------------------------------------------------------------------
// Making or using wxWindows as a Windows DLL
// ----------------------------------------------------------------------------
#if defined(__WXMSW__)

View File

@ -43,15 +43,7 @@
callback compare function for quick sort
must return negative value, 0 or positive value if pItem1 <, = or > pItem2
*/
#if defined(__VISUALC__)
#define CMPFUNC_CONV _cdecl
#elif defined(__VISAGECPP__)
#define CMPFUNC_CONV _Optlink
#else // !Visual C++
#define CMPFUNC_CONV
#endif // compiler
typedef int (CMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2);
typedef int (wxCMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2);
// ----------------------------------------------------------------------------
/**

View File

@ -173,7 +173,7 @@ public:
};
// type of compare function for wxListCtrl sort operation
typedef int (CALLBACK *wxListCtrlCompare)(long item1, long item2, long sortData);
typedef int (wxCALLBACK *wxListCtrlCompare)(long item1, long item2, long sortData);
class WXDLLEXPORT wxListCtrl: public wxControl
{