diff options
author | Dan Gudmundsson <[email protected]> | 2016-03-21 12:15:34 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2016-04-04 13:26:31 +0200 |
commit | 25ea1f62b6ce9cff26d9353881b799f9dd76fe53 (patch) | |
tree | 7fd48b90e916b37155a565267ed967855ff0664b | |
parent | ad5c3ec15cf751e0edd9330b4ffb430959432ed5 (diff) | |
download | otp-25ea1f62b6ce9cff26d9353881b799f9dd76fe53.tar.gz otp-25ea1f62b6ce9cff26d9353881b799f9dd76fe53.tar.bz2 otp-25ea1f62b6ce9cff26d9353881b799f9dd76fe53.zip |
wx: Fix wxListCtrl:hitTest arguments and delivered results
May cause incompatibility for applications but the flags argument is
out only in C++.
-rw-r--r-- | lib/wx/api_gen/wxapi.conf | 2 | ||||
-rw-r--r-- | lib/wx/c_src/gen/wxe_funcs.cpp | 8 | ||||
-rw-r--r-- | lib/wx/src/gen/wxListCtrl.erl | 13 | ||||
-rw-r--r-- | lib/wx/src/gen/wxe_debug.hrl | 2 |
4 files changed, 15 insertions, 10 deletions
diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf index b8458e901b..c6a2df29d7 100644 --- a/lib/wx/api_gen/wxapi.conf +++ b/lib/wx/api_gen/wxapi.conf @@ -844,7 +844,7 @@ 'GetItemSpacing','GetItemState', 'GetItemText','GetItemTextColour', 'GetNextItem','GetSelectedItemCount','GetTextColour','GetTopItem', - 'GetViewRect',{'HitTest',[{"pSubItem",nowhere}, {"flags", in}]}, + 'GetViewRect',{'HitTest',[{"pSubItem",out}]}, 'InsertColumn','InsertItem', %%'OnGetItemAttr', 'OnGetItemImage','OnGetItemText', 'RefreshItem','RefreshItems','ScrollList', diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp index 03b0baf875..059cee59f4 100644 --- a/lib/wx/c_src/gen/wxe_funcs.cpp +++ b/lib/wx/c_src/gen/wxe_funcs.cpp @@ -15631,14 +15631,18 @@ case wxListCtrl_GetViewRect: { // wxListCtrl::GetViewRect break; } case wxListCtrl_HitTest: { // wxListCtrl::HitTest + int flags; + long pSubItem; wxListCtrl *This = (wxListCtrl *) getPtr(bp,memenv); bp += 4; int * pointX = (int *) bp; bp += 4; int * pointY = (int *) bp; bp += 4; wxPoint point = wxPoint(*pointX,*pointY); - int * flags = (int *) bp; bp += 4; if(!This) throw wxe_badarg(0); - long Result = This->HitTest(point,*flags); + long Result = This->HitTest(point,flags,&pSubItem); rt.addInt(Result); + rt.addInt(flags); + rt.addInt(pSubItem); + rt.addTupleCount(3); break; } case wxListCtrl_InsertColumn_2: { // wxListCtrl::InsertColumn diff --git a/lib/wx/src/gen/wxListCtrl.erl b/lib/wx/src/gen/wxListCtrl.erl index 6750931fdb..ed997710c8 100644 --- a/lib/wx/src/gen/wxListCtrl.erl +++ b/lib/wx/src/gen/wxListCtrl.erl @@ -38,7 +38,7 @@ getItemData/2,getItemFont/2,getItemPosition/2,getItemRect/2,getItemRect/3, getItemSpacing/1,getItemState/3,getItemText/2,getItemTextColour/2, getNextItem/2,getNextItem/3,getSelectedItemCount/1,getTextColour/1, - getTopItem/1,getViewRect/1,hitTest/3,insertColumn/3,insertColumn/4, + getTopItem/1,getViewRect/1,hitTest/2,insertColumn/3,insertColumn/4, insertItem/2,insertItem/3,insertItem/4,refreshItem/2,refreshItems/3, scrollList/3,setBackgroundColour/2,setColumn/3,setColumnWidth/3,setImageList/3, setItem/2,setItem/4,setItem/5,setItemBackgroundColour/3,setItemColumnImage/4, @@ -516,13 +516,14 @@ getViewRect(#wx_ref{type=ThisT,ref=ThisRef}) -> <<ThisRef:32/?UI>>). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlhittest">external documentation</a>. --spec hitTest(This, Point, Flags) -> integer() when - This::wxListCtrl(), Point::{X::integer(), Y::integer()}, Flags::integer(). -hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PointX,PointY},Flags) - when is_integer(PointX),is_integer(PointY),is_integer(Flags) -> +-spec hitTest(This, Point) -> Result when + Result ::{Res ::integer(), Flags::integer(), PSubItem::integer()}, + This::wxListCtrl(), Point::{X::integer(), Y::integer()}. +hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PointX,PointY}) + when is_integer(PointX),is_integer(PointY) -> ?CLASS(ThisT,wxListCtrl), wxe_util:call(?wxListCtrl_HitTest, - <<ThisRef:32/?UI,PointX:32/?UI,PointY:32/?UI,Flags:32/?UI>>). + <<ThisRef:32/?UI,PointX:32/?UI,PointY:32/?UI>>). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlinsertcolumn">external documentation</a>. %% <br /> Also:<br /> diff --git a/lib/wx/src/gen/wxe_debug.hrl b/lib/wx/src/gen/wxe_debug.hrl index a2462a6fb2..2ec485cd52 100644 --- a/lib/wx/src/gen/wxe_debug.hrl +++ b/lib/wx/src/gen/wxe_debug.hrl @@ -1544,7 +1544,7 @@ wxdebug_table() -> {1695, {wxListCtrl, getTextColour, 0}}, {1696, {wxListCtrl, getTopItem, 0}}, {1697, {wxListCtrl, getViewRect, 0}}, - {1698, {wxListCtrl, hitTest, 2}}, + {1698, {wxListCtrl, hitTest, 3}}, {1699, {wxListCtrl, insertColumn_2, 2}}, {1700, {wxListCtrl, insertColumn_3, 3}}, {1701, {wxListCtrl, insertItem_1, 1}}, |