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/wxListItem.erl | 89 +++++++++++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 32 deletions(-) (limited to 'lib/wx/src/gen/wxListItem.erl') diff --git a/lib/wx/src/gen/wxListItem.erl b/lib/wx/src/gen/wxListItem.erl index 326f674b28..f5662f8942 100644 --- a/lib/wx/src/gen/wxListItem.erl +++ b/lib/wx/src/gen/wxListItem.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 @@ -33,184 +33,207 @@ %% inherited exports -export([parent_class/1]). +-export_type([wxListItem/0]). %% @hidden parent_class(_Class) -> erlang:error({badtype, ?MODULE}). -%% @spec () -> wxListItem() +-type wxListItem() :: wx:wx_object(). %% @doc See external documentation. +-spec new() -> wxListItem(). new() -> wxe_util:construct(?wxListItem_new_0, <<>>). -%% @spec (Item::wxListItem()) -> wxListItem() %% @doc See external documentation. +-spec new(Item) -> wxListItem() when + Item::wxListItem(). new(#wx_ref{type=ItemT,ref=ItemRef}) -> ?CLASS(ItemT,wxListItem), wxe_util:construct(?wxListItem_new_1, <>). -%% @spec (This::wxListItem()) -> ok %% @doc See external documentation. +-spec clear(This) -> ok when + This::wxListItem(). clear(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:cast(?wxListItem_Clear, <>). -%% @spec (This::wxListItem()) -> WxListColumnFormat -%% WxListColumnFormat = integer() %% @doc See external documentation. -%%
WxListColumnFormat is one of ?wxLIST_FORMAT_LEFT | ?wxLIST_FORMAT_RIGHT | ?wxLIST_FORMAT_CENTRE | ?wxLIST_FORMAT_CENTER +%%
Res = ?wxLIST_FORMAT_LEFT | ?wxLIST_FORMAT_RIGHT | ?wxLIST_FORMAT_CENTRE | ?wxLIST_FORMAT_CENTER +-spec getAlign(This) -> wx:wx_enum() when + This::wxListItem(). getAlign(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:call(?wxListItem_GetAlign, <>). -%% @spec (This::wxListItem()) -> wx:colour() %% @doc See external documentation. +-spec getBackgroundColour(This) -> wx:wx_colour() when + This::wxListItem(). getBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:call(?wxListItem_GetBackgroundColour, <>). -%% @spec (This::wxListItem()) -> integer() %% @doc See external documentation. +-spec getColumn(This) -> integer() when + This::wxListItem(). getColumn(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:call(?wxListItem_GetColumn, <>). -%% @spec (This::wxListItem()) -> wxFont:wxFont() %% @doc See external documentation. +-spec getFont(This) -> wxFont:wxFont() when + This::wxListItem(). getFont(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:call(?wxListItem_GetFont, <>). -%% @spec (This::wxListItem()) -> integer() %% @doc See external documentation. +-spec getId(This) -> integer() when + This::wxListItem(). getId(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:call(?wxListItem_GetId, <>). -%% @spec (This::wxListItem()) -> integer() %% @doc See external documentation. +-spec getImage(This) -> integer() when + This::wxListItem(). getImage(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:call(?wxListItem_GetImage, <>). -%% @spec (This::wxListItem()) -> integer() %% @doc See external documentation. +-spec getMask(This) -> integer() when + This::wxListItem(). getMask(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:call(?wxListItem_GetMask, <>). -%% @spec (This::wxListItem()) -> integer() %% @doc See external documentation. +-spec getState(This) -> integer() when + This::wxListItem(). getState(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:call(?wxListItem_GetState, <>). -%% @spec (This::wxListItem()) -> string() %% @doc See external documentation. +-spec getText(This) -> string() when + This::wxListItem(). getText(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:call(?wxListItem_GetText, <>). -%% @spec (This::wxListItem()) -> wx:colour() %% @doc See external documentation. +-spec getTextColour(This) -> wx:wx_colour() when + This::wxListItem(). getTextColour(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:call(?wxListItem_GetTextColour, <>). -%% @spec (This::wxListItem()) -> integer() %% @doc See external documentation. +-spec getWidth(This) -> integer() when + This::wxListItem(). getWidth(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), wxe_util:call(?wxListItem_GetWidth, <>). -%% @spec (This::wxListItem(), Align::WxListColumnFormat) -> ok -%% WxListColumnFormat = integer() %% @doc See external documentation. -%%
WxListColumnFormat is one of ?wxLIST_FORMAT_LEFT | ?wxLIST_FORMAT_RIGHT | ?wxLIST_FORMAT_CENTRE | ?wxLIST_FORMAT_CENTER +%%
Align = ?wxLIST_FORMAT_LEFT | ?wxLIST_FORMAT_RIGHT | ?wxLIST_FORMAT_CENTRE | ?wxLIST_FORMAT_CENTER +-spec setAlign(This, Align) -> ok when + This::wxListItem(), Align::wx:wx_enum(). setAlign(#wx_ref{type=ThisT,ref=ThisRef},Align) when is_integer(Align) -> ?CLASS(ThisT,wxListItem), wxe_util:cast(?wxListItem_SetAlign, <>). -%% @spec (This::wxListItem(), ColBack::wx:colour()) -> ok %% @doc See external documentation. +-spec setBackgroundColour(This, ColBack) -> ok when + This::wxListItem(), ColBack::wx:wx_colour(). setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack) when tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 -> ?CLASS(ThisT,wxListItem), wxe_util:cast(?wxListItem_SetBackgroundColour, <>). -%% @spec (This::wxListItem(), Col::integer()) -> ok %% @doc See external documentation. +-spec setColumn(This, Col) -> ok when + This::wxListItem(), Col::integer(). setColumn(#wx_ref{type=ThisT,ref=ThisRef},Col) when is_integer(Col) -> ?CLASS(ThisT,wxListItem), wxe_util:cast(?wxListItem_SetColumn, <>). -%% @spec (This::wxListItem(), Font::wxFont:wxFont()) -> ok %% @doc See external documentation. +-spec setFont(This, Font) -> ok when + This::wxListItem(), Font::wxFont:wxFont(). setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) -> ?CLASS(ThisT,wxListItem), ?CLASS(FontT,wxFont), wxe_util:cast(?wxListItem_SetFont, <>). -%% @spec (This::wxListItem(), Id::integer()) -> ok %% @doc See external documentation. +-spec setId(This, Id) -> ok when + This::wxListItem(), Id::integer(). setId(#wx_ref{type=ThisT,ref=ThisRef},Id) when is_integer(Id) -> ?CLASS(ThisT,wxListItem), wxe_util:cast(?wxListItem_SetId, <>). -%% @spec (This::wxListItem(), Image::integer()) -> ok %% @doc See external documentation. +-spec setImage(This, Image) -> ok when + This::wxListItem(), Image::integer(). setImage(#wx_ref{type=ThisT,ref=ThisRef},Image) when is_integer(Image) -> ?CLASS(ThisT,wxListItem), wxe_util:cast(?wxListItem_SetImage, <>). -%% @spec (This::wxListItem(), Mask::integer()) -> ok %% @doc See external documentation. +-spec setMask(This, Mask) -> ok when + This::wxListItem(), Mask::integer(). setMask(#wx_ref{type=ThisT,ref=ThisRef},Mask) when is_integer(Mask) -> ?CLASS(ThisT,wxListItem), wxe_util:cast(?wxListItem_SetMask, <>). -%% @spec (This::wxListItem(), State::integer()) -> ok %% @doc See external documentation. +-spec setState(This, State) -> ok when + This::wxListItem(), State::integer(). setState(#wx_ref{type=ThisT,ref=ThisRef},State) when is_integer(State) -> ?CLASS(ThisT,wxListItem), wxe_util:cast(?wxListItem_SetState, <>). -%% @spec (This::wxListItem(), StateMask::integer()) -> ok %% @doc See external documentation. +-spec setStateMask(This, StateMask) -> ok when + This::wxListItem(), StateMask::integer(). setStateMask(#wx_ref{type=ThisT,ref=ThisRef},StateMask) when is_integer(StateMask) -> ?CLASS(ThisT,wxListItem), wxe_util:cast(?wxListItem_SetStateMask, <>). -%% @spec (This::wxListItem(), Text::string()) -> ok %% @doc See external documentation. +-spec setText(This, Text) -> ok when + This::wxListItem(), Text::string(). setText(#wx_ref{type=ThisT,ref=ThisRef},Text) when is_list(Text) -> ?CLASS(ThisT,wxListItem), @@ -218,24 +241,26 @@ setText(#wx_ref{type=ThisT,ref=ThisRef},Text) wxe_util:cast(?wxListItem_SetText, <>). -%% @spec (This::wxListItem(), ColText::wx:colour()) -> ok %% @doc See external documentation. +-spec setTextColour(This, ColText) -> ok when + This::wxListItem(), ColText::wx:wx_colour(). setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText) when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 -> ?CLASS(ThisT,wxListItem), wxe_util:cast(?wxListItem_SetTextColour, <>). -%% @spec (This::wxListItem(), Width::integer()) -> ok %% @doc See external documentation. +-spec setWidth(This, Width) -> ok when + This::wxListItem(), Width::integer(). setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width) when is_integer(Width) -> ?CLASS(ThisT,wxListItem), wxe_util:cast(?wxListItem_SetWidth, <>). -%% @spec (This::wxListItem()) -> ok %% @doc Destroys this object, do not use object again +-spec destroy(This::wxListItem) -> ok. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxListItem), wxe_util:destroy(?DESTROY_OBJECT,Obj), -- cgit v1.2.3 From 217343d158afe60a5a6a15e8b894b6fd62611ad3 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 21 Feb 2012 16:05:37 +0100 Subject: [wx] Fix spec errors --- lib/wx/src/gen/wxListItem.erl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/wx/src/gen/wxListItem.erl') diff --git a/lib/wx/src/gen/wxListItem.erl b/lib/wx/src/gen/wxListItem.erl index f5662f8942..787d686135 100644 --- a/lib/wx/src/gen/wxListItem.erl +++ b/lib/wx/src/gen/wxListItem.erl @@ -70,7 +70,7 @@ getAlign(#wx_ref{type=ThisT,ref=ThisRef}) -> <>). %% @doc See external documentation. --spec getBackgroundColour(This) -> wx:wx_colour() when +-spec getBackgroundColour(This) -> wx:wx_colour4() when This::wxListItem(). getBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), @@ -126,7 +126,7 @@ getState(#wx_ref{type=ThisT,ref=ThisRef}) -> <>). %% @doc See external documentation. --spec getText(This) -> string() when +-spec getText(This) -> unicode:charlist() when This::wxListItem(). getText(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), @@ -134,7 +134,7 @@ getText(#wx_ref{type=ThisT,ref=ThisRef}) -> <>). %% @doc See external documentation. --spec getTextColour(This) -> wx:wx_colour() when +-spec getTextColour(This) -> wx:wx_colour4() when This::wxListItem(). getTextColour(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxListItem), @@ -233,7 +233,7 @@ setStateMask(#wx_ref{type=ThisT,ref=ThisRef},StateMask) %% @doc See external documentation. -spec setText(This, Text) -> ok when - This::wxListItem(), Text::string(). + This::wxListItem(), Text::unicode:chardata(). setText(#wx_ref{type=ThisT,ref=ThisRef},Text) when is_list(Text) -> ?CLASS(ThisT,wxListItem), @@ -260,7 +260,7 @@ setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width) <>). %% @doc Destroys this object, do not use object again --spec destroy(This::wxListItem) -> ok. +-spec destroy(This::wxListItem()) -> ok. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxListItem), wxe_util:destroy(?DESTROY_OBJECT,Obj), -- cgit v1.2.3