aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-08-21 15:20:27 +0200
committerDan Gudmundsson <[email protected]>2013-08-21 15:20:27 +0200
commitd7ade924b9227cf6b6f0cac7a0d19f9b4909ce60 (patch)
tree00597913e016529206a90b9fcb571c3b2e36aa1e /lib
parent51258174f9f56f6f5149459f0025f8da030321f5 (diff)
downloadotp-d7ade924b9227cf6b6f0cac7a0d19f9b4909ce60.tar.gz
otp-d7ade924b9227cf6b6f0cac7a0d19f9b4909ce60.tar.bz2
otp-d7ade924b9227cf6b6f0cac7a0d19f9b4909ce60.zip
wx: Fix bug in wxStatusBar:getFieldRect/2
Diffstat (limited to 'lib')
-rw-r--r--lib/wx/api_gen/wxapi.conf3
-rw-r--r--lib/wx/c_src/gen/wxe_funcs.cpp8
-rw-r--r--lib/wx/src/gen/wxStatusBar.erl15
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf
index 81f2a389ab..c1fe597e01 100644
--- a/lib/wx/api_gen/wxapi.conf
+++ b/lib/wx/api_gen/wxapi.conf
@@ -504,7 +504,8 @@
[{'wxStatusBar',[{"size", skip_member}]},
'~wxStatusBar',
{'Create',[{"size", skip_member}]},
- 'GetFieldRect','GetFieldsCount','GetStatusText','PopStatusText',
+ {'GetFieldRect', [{"rect", out}]},
+ 'GetFieldsCount','GetStatusText','PopStatusText',
'PushStatusText',
{'SetFieldsCount', [{"number", {def,none}},
{"widths", [{single, array}, {def, "(int *) NULL"}]}]},
diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp
index 2d55f34346..74fddc2133 100644
--- a/lib/wx/c_src/gen/wxe_funcs.cpp
+++ b/lib/wx/c_src/gen/wxe_funcs.cpp
@@ -8849,16 +8849,14 @@ case wxStatusBar_Create: { // wxStatusBar::Create
break;
}
case wxStatusBar_GetFieldRect: { // wxStatusBar::GetFieldRect
+ wxRect rect;
wxStatusBar *This = (wxStatusBar *) getPtr(bp,memenv); bp += 4;
int * i = (int *) bp; bp += 4;
- int * rectX = (int *) bp; bp += 4;
- int * rectY = (int *) bp; bp += 4;
- int * rectW = (int *) bp; bp += 4;
- int * rectH = (int *) bp; bp += 4;
- wxRect rect = wxRect(*rectX,*rectY,*rectW,*rectH);
if(!This) throw wxe_badarg(0);
bool Result = This->GetFieldRect(*i,rect);
rt.addBool(Result);
+ rt.add(rect);
+ rt.addTupleCount(2);
break;
}
case wxStatusBar_GetFieldsCount: { // wxStatusBar::GetFieldsCount
diff --git a/lib/wx/src/gen/wxStatusBar.erl b/lib/wx/src/gen/wxStatusBar.erl
index 31dab03b56..5e8a707c22 100644
--- a/lib/wx/src/gen/wxStatusBar.erl
+++ b/lib/wx/src/gen/wxStatusBar.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -28,7 +28,7 @@
-module(wxStatusBar).
-include("wxe.hrl").
--export([create/2,create/3,destroy/1,getFieldRect/3,getFieldsCount/1,getStatusText/1,
+-export([create/2,create/3,destroy/1,getFieldRect/2,getFieldsCount/1,getStatusText/1,
getStatusText/2,new/0,new/1,new/2,popStatusText/1,popStatusText/2,pushStatusText/2,
pushStatusText/3,setFieldsCount/2,setFieldsCount/3,setMinHeight/2,
setStatusStyles/2,setStatusText/2,setStatusText/3,setStatusWidths/2]).
@@ -132,13 +132,14 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbargetfieldrect">external documentation</a>.
--spec getFieldRect(This, I, Rect) -> boolean() when
- This::wxStatusBar(), I::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
-getFieldRect(#wx_ref{type=ThisT,ref=ThisRef},I,{RectX,RectY,RectW,RectH})
- when is_integer(I),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
+-spec getFieldRect(This, I) -> Result when
+ Result ::{Res ::boolean(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}},
+ This::wxStatusBar(), I::integer().
+getFieldRect(#wx_ref{type=ThisT,ref=ThisRef},I)
+ when is_integer(I) ->
?CLASS(ThisT,wxStatusBar),
wxe_util:call(?wxStatusBar_GetFieldRect,
- <<ThisRef:32/?UI,I:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
+ <<ThisRef:32/?UI,I:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbargetfieldscount">external documentation</a>.
-spec getFieldsCount(This) -> integer() when