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/wxTopLevelWindow.erl | 91 +++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 30 deletions(-) (limited to 'lib/wx/src/gen/wxTopLevelWindow.erl') diff --git a/lib/wx/src/gen/wxTopLevelWindow.erl b/lib/wx/src/gen/wxTopLevelWindow.erl index e0551b480f..b315429bb6 100644 --- a/lib/wx/src/gen/wxTopLevelWindow.erl +++ b/lib/wx/src/gen/wxTopLevelWindow.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 @@ -72,48 +72,57 @@ show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1, update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]). +-export_type([wxTopLevelWindow/0]). %% @hidden parent_class(wxWindow) -> true; parent_class(wxEvtHandler) -> true; parent_class(_Class) -> erlang:error({badtype, ?MODULE}). -%% @spec (This::wxTopLevelWindow()) -> wxIcon:wxIcon() +-type wxTopLevelWindow() :: wx:wx_object(). %% @doc See external documentation. +-spec getIcon(This) -> wxIcon:wxIcon() when + This::wxTopLevelWindow(). getIcon(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxTopLevelWindow), wxe_util:call(?wxTopLevelWindow_GetIcon, <>). -%% @spec (This::wxTopLevelWindow()) -> wxIconBundle:wxIconBundle() %% @doc See external documentation. +-spec getIcons(This) -> wxIconBundle:wxIconBundle() when + This::wxTopLevelWindow(). getIcons(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxTopLevelWindow), wxe_util:call(?wxTopLevelWindow_GetIcons, <>). -%% @spec (This::wxTopLevelWindow()) -> string() %% @doc See external documentation. +-spec getTitle(This) -> string() when + This::wxTopLevelWindow(). getTitle(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxTopLevelWindow), wxe_util:call(?wxTopLevelWindow_GetTitle, <>). -%% @spec (This::wxTopLevelWindow()) -> bool() %% @doc See external documentation. +-spec isActive(This) -> boolean() when + This::wxTopLevelWindow(). isActive(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxTopLevelWindow), wxe_util:call(?wxTopLevelWindow_IsActive, <>). -%% @spec (This::wxTopLevelWindow()) -> ok %% @equiv iconize(This, []) +-spec iconize(This) -> ok when + This::wxTopLevelWindow(). + iconize(This) when is_record(This, wx_ref) -> iconize(This, []). -%% @spec (This::wxTopLevelWindow(), [Option]) -> ok -%% Option = {iconize, bool()} %% @doc See external documentation. +-spec iconize(This, [Option]) -> ok when + This::wxTopLevelWindow(), + Option :: {iconize, boolean()}. iconize(#wx_ref{type=ThisT,ref=ThisRef}, Options) when is_list(Options) -> ?CLASS(ThisT,wxTopLevelWindow), @@ -123,36 +132,42 @@ iconize(#wx_ref{type=ThisT,ref=ThisRef}, Options) wxe_util:cast(?wxTopLevelWindow_Iconize, <>). -%% @spec (This::wxTopLevelWindow()) -> bool() %% @doc See external documentation. +-spec isFullScreen(This) -> boolean() when + This::wxTopLevelWindow(). isFullScreen(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxTopLevelWindow), wxe_util:call(?wxTopLevelWindow_IsFullScreen, <>). -%% @spec (This::wxTopLevelWindow()) -> bool() %% @doc See external documentation. +-spec isIconized(This) -> boolean() when + This::wxTopLevelWindow(). isIconized(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxTopLevelWindow), wxe_util:call(?wxTopLevelWindow_IsIconized, <>). -%% @spec (This::wxTopLevelWindow()) -> bool() %% @doc See external documentation. +-spec isMaximized(This) -> boolean() when + This::wxTopLevelWindow(). isMaximized(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxTopLevelWindow), wxe_util:call(?wxTopLevelWindow_IsMaximized, <>). -%% @spec (This::wxTopLevelWindow()) -> ok %% @equiv maximize(This, []) +-spec maximize(This) -> ok when + This::wxTopLevelWindow(). + maximize(This) when is_record(This, wx_ref) -> maximize(This, []). -%% @spec (This::wxTopLevelWindow(), [Option]) -> ok -%% Option = {maximize, bool()} %% @doc See external documentation. +-spec maximize(This, [Option]) -> ok when + This::wxTopLevelWindow(), + Option :: {maximize, boolean()}. maximize(#wx_ref{type=ThisT,ref=ThisRef}, Options) when is_list(Options) -> ?CLASS(ThisT,wxTopLevelWindow), @@ -162,15 +177,18 @@ maximize(#wx_ref{type=ThisT,ref=ThisRef}, Options) wxe_util:cast(?wxTopLevelWindow_Maximize, <>). -%% @spec (This::wxTopLevelWindow()) -> ok %% @equiv requestUserAttention(This, []) +-spec requestUserAttention(This) -> ok when + This::wxTopLevelWindow(). + requestUserAttention(This) when is_record(This, wx_ref) -> requestUserAttention(This, []). -%% @spec (This::wxTopLevelWindow(), [Option]) -> ok -%% Option = {flags, integer()} %% @doc See external documentation. +-spec requestUserAttention(This, [Option]) -> ok when + This::wxTopLevelWindow(), + Option :: {flags, integer()}. requestUserAttention(#wx_ref{type=ThisT,ref=ThisRef}, Options) when is_list(Options) -> ?CLASS(ThisT,wxTopLevelWindow), @@ -180,31 +198,36 @@ requestUserAttention(#wx_ref{type=ThisT,ref=ThisRef}, Options) wxe_util:cast(?wxTopLevelWindow_RequestUserAttention, <>). -%% @spec (This::wxTopLevelWindow(), Icon::wxIcon:wxIcon()) -> ok %% @doc See external documentation. +-spec setIcon(This, Icon) -> ok when + This::wxTopLevelWindow(), Icon::wxIcon:wxIcon(). setIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}) -> ?CLASS(ThisT,wxTopLevelWindow), ?CLASS(IconT,wxIcon), wxe_util:cast(?wxTopLevelWindow_SetIcon, <>). -%% @spec (This::wxTopLevelWindow(), Icons::wxIconBundle:wxIconBundle()) -> ok %% @doc See external documentation. +-spec setIcons(This, Icons) -> ok when + This::wxTopLevelWindow(), Icons::wxIconBundle:wxIconBundle(). setIcons(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconsT,ref=IconsRef}) -> ?CLASS(ThisT,wxTopLevelWindow), ?CLASS(IconsT,wxIconBundle), wxe_util:cast(?wxTopLevelWindow_SetIcons, <>). -%% @spec (This::wxTopLevelWindow()) -> ok %% @equiv centerOnScreen(This, []) +-spec centerOnScreen(This) -> ok when + This::wxTopLevelWindow(). + centerOnScreen(This) when is_record(This, wx_ref) -> centerOnScreen(This, []). -%% @spec (This::wxTopLevelWindow(), [Option]) -> ok -%% Option = {dir, integer()} %% @doc See external documentation. +-spec centerOnScreen(This, [Option]) -> ok when + This::wxTopLevelWindow(), + Option :: {dir, integer()}. centerOnScreen(#wx_ref{type=ThisT,ref=ThisRef}, Options) when is_list(Options) -> ?CLASS(ThisT,wxTopLevelWindow), @@ -214,15 +237,18 @@ centerOnScreen(#wx_ref{type=ThisT,ref=ThisRef}, Options) wxe_util:cast(?wxTopLevelWindow_CenterOnScreen, <>). -%% @spec (This::wxTopLevelWindow()) -> ok %% @equiv centreOnScreen(This, []) +-spec centreOnScreen(This) -> ok when + This::wxTopLevelWindow(). + centreOnScreen(This) when is_record(This, wx_ref) -> centreOnScreen(This, []). -%% @spec (This::wxTopLevelWindow(), [Option]) -> ok -%% Option = {dir, integer()} %% @doc See external documentation. +-spec centreOnScreen(This, [Option]) -> ok when + This::wxTopLevelWindow(), + Option :: {dir, integer()}. centreOnScreen(#wx_ref{type=ThisT,ref=ThisRef}, Options) when is_list(Options) -> ?CLASS(ThisT,wxTopLevelWindow), @@ -232,16 +258,18 @@ centreOnScreen(#wx_ref{type=ThisT,ref=ThisRef}, Options) wxe_util:cast(?wxTopLevelWindow_CentreOnScreen, <>). -%% @spec (This::wxTopLevelWindow(), Region::wxRegion:wxRegion()) -> bool() %% @doc See external documentation. +-spec setShape(This, Region) -> boolean() when + This::wxTopLevelWindow(), Region::wxRegion:wxRegion(). setShape(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) -> ?CLASS(ThisT,wxTopLevelWindow), ?CLASS(RegionT,wxRegion), wxe_util:call(?wxTopLevelWindow_SetShape, <>). -%% @spec (This::wxTopLevelWindow(), Title::string()) -> ok %% @doc See external documentation. +-spec setTitle(This, Title) -> ok when + This::wxTopLevelWindow(), Title::string(). setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title) when is_list(Title) -> ?CLASS(ThisT,wxTopLevelWindow), @@ -249,15 +277,18 @@ setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title) wxe_util:cast(?wxTopLevelWindow_SetTitle, <>). -%% @spec (This::wxTopLevelWindow(), Show::bool()) -> bool() %% @equiv showFullScreen(This,Show, []) +-spec showFullScreen(This, Show) -> boolean() when + This::wxTopLevelWindow(), Show::boolean(). + showFullScreen(This,Show) when is_record(This, wx_ref),is_boolean(Show) -> showFullScreen(This,Show, []). -%% @spec (This::wxTopLevelWindow(), Show::bool(), [Option]) -> bool() -%% Option = {style, integer()} %% @doc See external documentation. +-spec showFullScreen(This, Show, [Option]) -> boolean() when + This::wxTopLevelWindow(), Show::boolean(), + Option :: {style, integer()}. showFullScreen(#wx_ref{type=ThisT,ref=ThisRef},Show, Options) when is_boolean(Show),is_list(Options) -> ?CLASS(ThisT,wxTopLevelWindow), -- 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/wxTopLevelWindow.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/wx/src/gen/wxTopLevelWindow.erl') diff --git a/lib/wx/src/gen/wxTopLevelWindow.erl b/lib/wx/src/gen/wxTopLevelWindow.erl index b315429bb6..5659c0927f 100644 --- a/lib/wx/src/gen/wxTopLevelWindow.erl +++ b/lib/wx/src/gen/wxTopLevelWindow.erl @@ -96,7 +96,7 @@ getIcons(#wx_ref{type=ThisT,ref=ThisRef}) -> <>). %% @doc See external documentation. --spec getTitle(This) -> string() when +-spec getTitle(This) -> unicode:charlist() when This::wxTopLevelWindow(). getTitle(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxTopLevelWindow), @@ -269,7 +269,7 @@ setShape(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) -> %% @doc See external documentation. -spec setTitle(This, Title) -> ok when - This::wxTopLevelWindow(), Title::string(). + This::wxTopLevelWindow(), Title::unicode:chardata(). setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title) when is_list(Title) -> ?CLASS(ThisT,wxTopLevelWindow), -- cgit v1.2.3