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/wxIconBundle.erl | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'lib/wx/src/gen/wxIconBundle.erl') diff --git a/lib/wx/src/gen/wxIconBundle.erl b/lib/wx/src/gen/wxIconBundle.erl index 011b2dd1ac..4d4614f171 100644 --- a/lib/wx/src/gen/wxIconBundle.erl +++ b/lib/wx/src/gen/wxIconBundle.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2011. 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 @@ -29,17 +29,20 @@ %% inherited exports -export([parent_class/1]). +-export_type([wxIconBundle/0]). %% @hidden parent_class(_Class) -> erlang:error({badtype, ?MODULE}). -%% @spec () -> wxIconBundle() +-type wxIconBundle() :: wx:wx_object(). %% @doc See external documentation. +-spec new() -> wxIconBundle(). new() -> wxe_util:construct(?wxIconBundle_new_0, <<>>). -%% @spec (Ic::wxIconBundle() | wxIcon:wxIcon()) -> wxIconBundle() %% @doc See external documentation. +-spec new(Ic) -> wxIconBundle() when + Ic::wxIconBundle() | wxIcon:wxIcon(). new(#wx_ref{type=IcT,ref=IcRef}) -> IcOP = case ?CLASS_T(IcT,wxIconBundle) of true -> @@ -50,24 +53,27 @@ new(#wx_ref{type=IcT,ref=IcRef}) -> wxe_util:construct(IcOP, <>). -%% @spec (File::string(), Type::integer()) -> wxIconBundle() %% @doc See external documentation. +-spec new(File, Type) -> wxIconBundle() when + File::string(), Type::integer(). new(File,Type) when is_list(File),is_integer(Type) -> File_UC = unicode:characters_to_binary([File,0]), wxe_util:construct(?wxIconBundle_new_2, <<(byte_size(File_UC)):32/?UI,(File_UC)/binary, 0:(((8- ((4+byte_size(File_UC)) band 16#7)) band 16#7))/unit:8,Type:32/?UI>>). -%% @spec (This::wxIconBundle(), Icon::wxIcon:wxIcon()) -> ok %% @doc See external documentation. +-spec addIcon(This, Icon) -> ok when + This::wxIconBundle(), Icon::wxIcon:wxIcon(). addIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}) -> ?CLASS(ThisT,wxIconBundle), ?CLASS(IconT,wxIcon), wxe_util:cast(?wxIconBundle_AddIcon_1, <>). -%% @spec (This::wxIconBundle(), File::string(), Type::integer()) -> ok %% @doc See external documentation. +-spec addIcon(This, File, Type) -> ok when + This::wxIconBundle(), File::string(), Type::integer(). addIcon(#wx_ref{type=ThisT,ref=ThisRef},File,Type) when is_list(File),is_integer(Type) -> ?CLASS(ThisT,wxIconBundle), @@ -75,22 +81,20 @@ addIcon(#wx_ref{type=ThisT,ref=ThisRef},File,Type) wxe_util:cast(?wxIconBundle_AddIcon_2, <>). -%% @spec (This::wxIconBundle()) -> wxIcon:wxIcon() %% @equiv getIcon(This, []) +-spec getIcon(This) -> wxIcon:wxIcon() when + This::wxIconBundle(). + getIcon(This) when is_record(This, wx_ref) -> getIcon(This, []). -%% @spec (This::wxIconBundle(),X::term()) -> wxIcon:wxIcon() %% @doc See external documentation. -%%
Alternatives: -%%

-%% getIcon(This::wxIconBundle(), [Option]) -> wxIcon:wxIcon() -%%
Option = {size, integer()} -%%

-%%

-%% getIcon(This::wxIconBundle(), Size::{W::integer(), H::integer()}) -> wxIcon:wxIcon() -%%

+-spec getIcon(This, [Option]) -> wxIcon:wxIcon() when + This::wxIconBundle(), + Option :: {size, integer()}; + (This, Size) -> wxIcon:wxIcon() when + This::wxIconBundle(), Size::{W::integer(), H::integer()}. getIcon(#wx_ref{type=ThisT,ref=ThisRef}, Options) when is_list(Options) -> ?CLASS(ThisT,wxIconBundle), @@ -105,8 +109,8 @@ getIcon(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH}) wxe_util:call(?wxIconBundle_GetIcon_1_1, <>). -%% @spec (This::wxIconBundle()) -> ok %% @doc Destroys this object, do not use object again +-spec destroy(This::wxIconBundle) -> ok. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxIconBundle), wxe_util:destroy(?wxIconBundle_destruct,Obj), -- cgit v1.2.3