aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/wx_gen.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-10-05 16:05:08 +0200
committerDan Gudmundsson <[email protected]>2016-10-05 16:05:08 +0200
commit1de609cb262ff34216dce8fbefdb9a153bdd2c93 (patch)
tree1d852d320dc26d002263e8fef4eda72e5291b021 /lib/wx/api_gen/wx_gen.erl
parent497330a828089b465ac026551edf33fb947ae2f6 (diff)
parentb8339d7edf63c8745be4be092e63f46bc4e63b91 (diff)
downloadotp-1de609cb262ff34216dce8fbefdb9a153bdd2c93.tar.gz
otp-1de609cb262ff34216dce8fbefdb9a153bdd2c93.tar.bz2
otp-1de609cb262ff34216dce8fbefdb9a153bdd2c93.zip
Merge branch 'dgud/wx/drop-files/OTP-13933' into maint
* dgud/wx/drop-files/OTP-13933: wx: add wxWindowDragAcceptFiles wx: Add simple dropfiles support
Diffstat (limited to 'lib/wx/api_gen/wx_gen.erl')
-rw-r--r--lib/wx/api_gen/wx_gen.erl34
1 files changed, 16 insertions, 18 deletions
diff --git a/lib/wx/api_gen/wx_gen.erl b/lib/wx/api_gen/wx_gen.erl
index cfae2197f8..6979a600f3 100644
--- a/lib/wx/api_gen/wx_gen.erl
+++ b/lib/wx/api_gen/wx_gen.erl
@@ -271,33 +271,31 @@ parse_attr1([{{attr,_}, #xmlElement{content=C, attributes=Attrs}}|R], AttrList0,
#param{where=nowhere} ->
parse_attr1(R,AttrList0,Opts,Res);
_ ->
- case keysearch(prot, #xmlAttribute.name, Attrs) of
- {value, #xmlAttribute{value = "public"}} ->
- {Acc,AttrList} = attr_acc(Param0, AttrList0),
- parse_attr1(R,AttrList,Opts,
- [Param0#param{in=false,prot=public,acc=Acc}|Res]);
- {value, #xmlAttribute{value = "protected"}} ->
- {Acc,AttrList} = attr_acc(Param0, AttrList0),
- parse_attr1(R,AttrList,Opts,
- [Param0#param{in=false,prot=protected,acc=Acc}|Res]);
- {value, #xmlAttribute{value = "private"}} ->
- {Acc,AttrList} = attr_acc(Param0, AttrList0),
- parse_attr1(R,AttrList,Opts,
- [Param0#param{in=false,prot=private,acc=Acc}|Res])
- end
+ {value, #xmlAttribute{value=Type}} =
+ keysearch(prot, #xmlAttribute.name, Attrs),
+ {Param,AttrList} = attr_acc(Param0, list_to_atom(Type), AttrList0),
+ parse_attr1(R,AttrList,Opts,[Param|Res])
end;
parse_attr1([{_Id,_}|R],AttrList,Info, Res) ->
parse_attr1(R,AttrList,Info, Res);
parse_attr1([],Left,_, Res) ->
{reverse(Res), Left}.
-attr_acc(#param{name=N}, List) ->
+attr_acc(#param{name=N}=P, Type, List) ->
Name = list_to_atom(N),
case get_value(Name, List, undefined) of
- undefined -> {undefined, List};
- Val -> {Val, lists:keydelete(Name,1,List)}
+ undefined -> {P#param{in=false,prot=Type,acc=undefined}, List};
+ Val when is_list(Val), is_integer(hd(Val)) ->
+ %% Function String
+ {P#param{in=false,prot=Type,acc=Val}, lists:keydelete(Name,1,List)};
+ OptList when is_list(OptList) ->
+ Param = foldl(fun handle_param_opt/2,P,OptList),
+ {Param#param{in=false,prot=Type,acc=undefined},
+ lists:keydelete(Name,1,List)};
+ Val ->
+ {P#param{in=false,prot=Type,acc=Val}, lists:keydelete(Name,1,List)}
end.
-
+
load_members(FileName, Class, Defs, Tab, Type,Opts) ->
File = filename:join(["wx_xml",FileName ++ ".xml"]),
put({loaded, FileName}, true),