From a181c06152a3c935fdf63659322020fb7625b577 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 16 Feb 2012 11:04:18 +0100 Subject: [wx] Generated types for all wx classes --- lib/wx/src/gen/wxProgressDialog.erl | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'lib/wx/src/gen/wxProgressDialog.erl') diff --git a/lib/wx/src/gen/wxProgressDialog.erl b/lib/wx/src/gen/wxProgressDialog.erl index 69e73454b5..679e87aab2 100644 --- a/lib/wx/src/gen/wxProgressDialog.erl +++ b/lib/wx/src/gen/wxProgressDialog.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2010. All Rights Reserved. +%% Copyright Ericsson AB 2008-2012. 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 @@ -77,6 +77,7 @@ transferDataFromWindow/1,transferDataToWindow/1,updateWindowUI/1, updateWindowUI/2,validate/1,warpPointer/3]). +-export_type([wxProgressDialog/0]). %% @hidden parent_class(wxDialog) -> true; parent_class(wxTopLevelWindow) -> true; @@ -84,15 +85,21 @@ parent_class(wxWindow) -> true; parent_class(wxEvtHandler) -> true; parent_class(_Class) -> erlang:error({badtype, ?MODULE}). -%% @spec (Title::string(), Message::string()) -> wxProgressDialog() +-type wxProgressDialog() :: wx:wx_object(). %% @equiv new(Title,Message, []) +-spec new(Title, Message) -> wxProgressDialog() when + Title::string(), Message::string(). + new(Title,Message) when is_list(Title),is_list(Message) -> new(Title,Message, []). -%% @spec (Title::string(), Message::string(), [Option]) -> wxProgressDialog() -%% Option = {maximum, integer()} | {parent, wxWindow:wxWindow()} | {style, integer()} %% @doc See external documentation. +-spec new(Title, Message, [Option]) -> wxProgressDialog() when + Title::string(), Message::string(), + Option :: {maximum, integer()} + | {parent, wxWindow:wxWindow()} + | {style, integer()}. new(Title,Message, Options) when is_list(Title),is_list(Message),is_list(Options) -> Title_UC = unicode:characters_to_binary([Title,0]), @@ -105,29 +112,34 @@ new(Title,Message, Options) wxe_util:construct(?wxProgressDialog_new, <<(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((4+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>). -%% @spec (This::wxProgressDialog()) -> ok %% @doc See external documentation. +-spec resume(This) -> ok when + This::wxProgressDialog(). resume(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxProgressDialog), wxe_util:cast(?wxProgressDialog_Resume, <>). -%% @spec (This::wxProgressDialog()) -> ok %% @doc See external documentation. +-spec update(This) -> ok when + This::wxProgressDialog(). update(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxProgressDialog), wxe_util:cast(?wxProgressDialog_Update_0, <>). -%% @spec (This::wxProgressDialog(), Value::integer()) -> bool() %% @equiv update(This,Value, []) +-spec update(This, Value) -> boolean() when + This::wxProgressDialog(), Value::integer(). + update(This,Value) when is_record(This, wx_ref),is_integer(Value) -> update(This,Value, []). -%% @spec (This::wxProgressDialog(), Value::integer(), [Option]) -> bool() -%% Option = {newmsg, string()} %% @doc See external documentation. +-spec update(This, Value, [Option]) -> boolean() when + This::wxProgressDialog(), Value::integer(), + Option :: {newmsg, string()}. update(#wx_ref{type=ThisT,ref=ThisRef},Value, Options) when is_integer(Value),is_list(Options) -> ?CLASS(ThisT,wxProgressDialog), @@ -137,8 +149,8 @@ update(#wx_ref{type=ThisT,ref=ThisRef},Value, Options) wxe_util:call(?wxProgressDialog_Update_2, <>). -%% @spec (This::wxProgressDialog()) -> ok %% @doc Destroys this object, do not use object again +-spec destroy(This::wxProgressDialog) -> ok. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxProgressDialog), wxe_util:destroy(?DESTROY_OBJECT,Obj), -- cgit v1.2.3