]> git.saurik.com Git - wxWidgets.git/commitdiff
pass wxIntPtr, not wxUIntPtr, to wxListCtrl::SortItems() callback as it's more compat...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 16 Apr 2009 13:00:40 +0000 (13:00 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 16 Apr 2009 13:00:40 +0000 (13:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 files changed:
docs/changes.txt
include/wx/generic/listctrl.h
include/wx/generic/private/listctrl.h
include/wx/listbase.h
include/wx/msw/listctrl.h
include/wx/osx/listctrl.h
interface/wx/listctrl.h
samples/listctrl/listtest.cpp
src/generic/filectrlg.cpp
src/generic/listctrl.cpp
src/msw/listctrl.cpp
src/osx/carbon/listctrl_mac.cpp

index c25f3149a5ba3aa784fe01168d0d55fb1ac3a99d..0a8aa80c388b9648fd293585e4ce6b099e5d69ea 100644 (file)
@@ -227,7 +227,7 @@ Changes in behaviour which may result in compilation errors
   be vetoed any more, use the new wxEVT_GRID_CELL_CHANGING event to do it.
 
 - wxListCtrlCompare function used with wxListCtrl::SortItems() must now declare
-  its third parameter as wxUIntPtr and not long (this allows passing pointers
+  its third parameter as wxIntPtr and not long (this allows passing pointers
   to it under 64 bit platforms too).
 
 - Global wxPendingEvents and wxPendingEventsLocker objects were removed.
index 3f0c175cb5d47d95b65782641fb7afbaf835c758..9fdc58788d9bc9e12832b82da2c0c3515d8162e0 100644 (file)
@@ -138,7 +138,7 @@ public:
     long InsertColumn( long col, const wxString& heading,
                        int format = wxLIST_FORMAT_LEFT, int width = -1 );
     bool ScrollList( int dx, int dy );
-    bool SortItems( wxListCtrlCompare fn, wxUIntPtr data );
+    bool SortItems( wxListCtrlCompare fn, wxIntPtr data );
     bool Update( long item );
     // Must provide overload to avoid hiding it (and warnings about it)
     virtual void Update() { wxControl::Update(); }
index 5ec6272b828abb945ea1b0e76cc85a1df4dc803d..35125d78d184938fdae61a26bc6256c2acc39028 100644 (file)
@@ -610,7 +610,7 @@ public:
     void InsertItem( wxListItem &item );
     void InsertColumn( long col, wxListItem &item );
     int GetItemWidthWithImage(wxListItem * item);
-    void SortItems( wxListCtrlCompare fn, wxUIntPtr data );
+    void SortItems( wxListCtrlCompare fn, wxIntPtr data );
 
     size_t GetItemCount() const;
     bool IsEmpty() const { return GetItemCount() == 0; }
index 15221d940a1ca90e347094fa9879746d51f020fe..ef32584e180ba3980a9153e91a9330ebc40004b9 100644 (file)
@@ -23,7 +23,7 @@
 
 // type of compare function for wxListCtrl sort operation
 typedef
-int (wxCALLBACK *wxListCtrlCompare)(long item1, long item2, wxUIntPtr sortData);
+int (wxCALLBACK *wxListCtrlCompare)(long item1, long item2, wxIntPtr sortData);
 
 // ----------------------------------------------------------------------------
 // wxListCtrl constants
index fa74009fc9e47626873a28d60949833a64cbfb29..c4b9b5cb6d90ac9a5184883bedcb2ae030e7c308 100644 (file)
@@ -353,7 +353,7 @@ public:
     // or zero if the two items are equivalent.
 
     // data is arbitrary data to be passed to the sort function.
-    bool SortItems(wxListCtrlCompare fn, wxUIntPtr data);
+    bool SortItems(wxListCtrlCompare fn, wxIntPtr data);
 
     // IMPLEMENTATION
     virtual bool MSWCommand(WXUINT param, WXWORD id);
index 7c3b67cbdf0bfe1259f0b237fe3869d062ec32a0..88520f0376011e7e51551d74de17c85f5e4897f4 100644 (file)
@@ -281,7 +281,7 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxControl
   // or zero if the two items are equivalent.
 
   // data is arbitrary data to be passed to the sort function.
-  bool SortItems(wxListCtrlCompare fn, wxUIntPtr data);
+  bool SortItems(wxListCtrlCompare fn, wxIntPtr data);
 
   wxMacDataBrowserListCtrlControl* GetListPeer() const;
 
@@ -317,7 +317,7 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxControl
   void Command(wxCommandEvent& event) { ProcessCommand(event); };
 
   wxListCtrlCompare GetCompareFunc() { return m_compareFunc; };
-  wxUIntPtr GetCompareFuncData() { return m_compareFuncData; };
+  wxIntPtr GetCompareFuncData() { return m_compareFuncData; };
 
 
   // public overrides needed for pimpl approach
@@ -391,7 +391,7 @@ protected:
   void*  m_macListCtrlEventHandler;
   void*  m_cgContext;
   wxListCtrlCompare m_compareFunc;
-  wxUIntPtr m_compareFuncData;
+  wxIntPtr m_compareFuncData;
 
   wxTextCtrl*       m_textCtrl;        // The control used for editing a label
   wxImageList *     m_imageListNormal; // The image list for normal icons
index 2ba301aeec77bca3ac8ca053a54754329dab1a51..d194d8ad6158a46d204ef5344ef621f5410d429a 100644 (file)
@@ -842,7 +842,7 @@ public:
         using the specified @a fnSortCallBack function. This function must have the
         following prototype:
         @code
-        int wxCALLBACK wxListCompareFunction(long item1, long item2, wxUIntPtr sortData)
+        int wxCALLBACK wxListCompareFunction(long item1, long item2, wxIntPtr sortData)
         @endcode
 
         It is called each time when the two items must be compared and should return 0
@@ -860,7 +860,7 @@ public:
 
         Please see the @ref page_samples_listctrl for an example of using this function.
     */
-    bool SortItems(wxListCtrlCompare fnSortCallBack, wxUIntPtr data);
+    bool SortItems(wxListCtrlCompare fnSortCallBack, wxIntPtr data);
 
 protected:
 
index 45d84e0596215794f05b8ac2cda1fa2e301ea687..33dc23898daf96e6edea2da17b430ab0e3a98401 100644 (file)
@@ -72,7 +72,7 @@ static const int NUM_ITEMS = 10;
 static const int NUM_ICONS = 9;
 
 int wxCALLBACK
-MyCompareFunction(long item1, long item2, wxUIntPtr WXUNUSED(sortData))
+MyCompareFunction(long item1, long item2, wxIntPtr WXUNUSED(sortData))
 {
     // inverse the order
     if (item1 < item2)
index 1de3b1ad83a8eeb6fed0410e5eafb525e1bca4d3..4e3730f466002c46e86d66743827c7c484809e2e 100644 (file)
@@ -52,7 +52,7 @@
 // ----------------------------------------------------------------------------
 
 static
-int wxCALLBACK wxFileDataNameCompare( long data1, long data2, wxUIntPtr sortOrder)
+int wxCALLBACK wxFileDataNameCompare( long data1, long data2, wxIntPtr sortOrder)
 {
      wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1);
      wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2);
@@ -70,7 +70,7 @@ int wxCALLBACK wxFileDataNameCompare( long data1, long data2, wxUIntPtr sortOrde
 }
 
 static
-int wxCALLBACK wxFileDataSizeCompare(long data1, long data2, wxUIntPtr sortOrder)
+int wxCALLBACK wxFileDataSizeCompare(long data1, long data2, wxIntPtr sortOrder)
 {
      wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1);
      wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2);
@@ -92,7 +92,7 @@ int wxCALLBACK wxFileDataSizeCompare(long data1, long data2, wxUIntPtr sortOrder
 }
 
 static
-int wxCALLBACK wxFileDataTypeCompare(long data1, long data2, wxUIntPtr sortOrder)
+int wxCALLBACK wxFileDataTypeCompare(long data1, long data2, wxIntPtr sortOrder)
 {
      wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1);
      wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2);
@@ -114,7 +114,7 @@ int wxCALLBACK wxFileDataTypeCompare(long data1, long data2, wxUIntPtr sortOrder
 }
 
 static
-int wxCALLBACK wxFileDataTimeCompare(long data1, long data2, wxUIntPtr sortOrder)
+int wxCALLBACK wxFileDataTimeCompare(long data1, long data2, wxIntPtr sortOrder)
 {
      wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1);
      wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2);
index 5ca7580a98311c8b6b9164457d1eed2733e8a7d0..5f7adb2fd1d692eb73d76e28cc602d0bece4409a 100644 (file)
@@ -4152,7 +4152,7 @@ int wxListMainWindow::GetItemWidthWithImage(wxListItem * item)
 // ----------------------------------------------------------------------------
 
 static wxListCtrlCompare list_ctrl_compare_func_2;
-static wxUIntPtr         list_ctrl_compare_data;
+static wxIntPtr          list_ctrl_compare_data;
 
 int LINKAGEMODE list_ctrl_compare_func_1( wxListLineData **arg1, wxListLineData **arg2 )
 {
@@ -4166,7 +4166,7 @@ int LINKAGEMODE list_ctrl_compare_func_1( wxListLineData **arg1, wxListLineData
     return list_ctrl_compare_func_2( data1, data2, list_ctrl_compare_data );
 }
 
-void wxListMainWindow::SortItems( wxListCtrlCompare fn, wxUIntPtr data )
+void wxListMainWindow::SortItems( wxListCtrlCompare fn, wxIntPtr data )
 {
     // selections won't make sense any more after sorting the items so reset
     // them
@@ -4918,7 +4918,7 @@ bool wxGenericListCtrl::ScrollList( int dx, int dy )
 // or zero if the two items are equivalent.
 // data is arbitrary data to be passed to the sort function.
 
-bool wxGenericListCtrl::SortItems( wxListCtrlCompare fn, wxUIntPtr data )
+bool wxGenericListCtrl::SortItems( wxListCtrlCompare fn, wxIntPtr data )
 {
     m_mainWin->SortItems( fn, data );
     return true;
index 31b1ef7054049f558f5cf6e9ba17a67dd9f0136d..baf52465add37cf90e254a1c0b16d13a1e3f4535 100644 (file)
@@ -1865,7 +1865,7 @@ bool wxListCtrl::ScrollList(int dx, int dy)
 struct wxInternalDataSort
 {
     wxListCtrlCompare user_fn;
-    wxUIntPtr data;
+    wxIntPtr data;
 };
 
 int CALLBACK wxInternalDataCompareFunc(LPARAM lParam1, LPARAM lParam2,  LPARAM lParamSort)
@@ -1882,7 +1882,7 @@ int CALLBACK wxInternalDataCompareFunc(LPARAM lParam1, LPARAM lParam2,  LPARAM l
 
 }
 
-bool wxListCtrl::SortItems(wxListCtrlCompare fn, wxUIntPtr data)
+bool wxListCtrl::SortItems(wxListCtrlCompare fn, wxIntPtr data)
 {
     wxInternalDataSort internalData;
     internalData.user_fn = fn;
index 7002c7abaebaa2575c9e0d8e446540e28d37ca80..d2e4faf977cc7f504e3f2d4fc77d7d95cf5fdad4 100644 (file)
@@ -2205,7 +2205,7 @@ bool wxListCtrl::ScrollList(int dx, int dy)
 }
 
 
-bool wxListCtrl::SortItems(wxListCtrlCompare fn, wxUIntPtr data)
+bool wxListCtrl::SortItems(wxListCtrlCompare fn, wxIntPtr data)
 {
     if (m_genericImpl)
         return m_genericImpl->SortItems(fn, data);