diff options
author | Dan Gudmundsson <[email protected]> | 2012-02-28 12:21:15 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2012-02-28 12:21:15 +0100 |
commit | 77426493dc04593cc00c166e6fb17dd5fc985255 (patch) | |
tree | 868060b6e16d4e9f6a347202ac1ba9c78761f404 /lib/wx/src/gen/wxImageList.erl | |
parent | 6510ee4abddbecf10b41d0474a35af1e780ea5be (diff) | |
parent | 6628dbe4ba097a5abed4ca7439a5b515adb0f556 (diff) | |
download | otp-77426493dc04593cc00c166e6fb17dd5fc985255.tar.gz otp-77426493dc04593cc00c166e6fb17dd5fc985255.tar.bz2 otp-77426493dc04593cc00c166e6fb17dd5fc985255.zip |
Merge branch 'dgud/wx/misc-improvements/OTP-9947' into maint
* dgud/wx/misc-improvements/OTP-9947:
[wx] Add simple taskbaricon test
[wx] Add missing stc function
[wx] Add wxTaskBarIcon class
[wx] Doc overloaded functions
[wx] Fix spec errors
[wx] Fix api bugs in wxDC
[wx] Fix wxGraphicContext bugs
[wx] Remove redundant erts version check
[wx] Generated types for all wx classes
[wx] Generate GL api from latest version
[wx] Cleanup Makefiles
Diffstat (limited to 'lib/wx/src/gen/wxImageList.erl')
-rw-r--r-- | lib/wx/src/gen/wxImageList.erl | 82 |
1 files changed, 53 insertions, 29 deletions
diff --git a/lib/wx/src/gen/wxImageList.erl b/lib/wx/src/gen/wxImageList.erl index f805a234df..e9d936d129 100644 --- a/lib/wx/src/gen/wxImageList.erl +++ b/lib/wx/src/gen/wxImageList.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 @@ -31,24 +31,30 @@ %% inherited exports -export([parent_class/1]). +-export_type([wxImageList/0]). %% @hidden parent_class(_Class) -> erlang:error({badtype, ?MODULE}). -%% @spec () -> wxImageList() +-type wxImageList() :: wx:wx_object(). %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistwximagelist">external documentation</a>. +-spec new() -> wxImageList(). new() -> wxe_util:construct(?wxImageList_new_0, <<>>). -%% @spec (Width::integer(), Height::integer()) -> wxImageList() %% @equiv new(Width,Height, []) +-spec new(Width, Height) -> wxImageList() when + Width::integer(), Height::integer(). + new(Width,Height) when is_integer(Width),is_integer(Height) -> new(Width,Height, []). -%% @spec (Width::integer(), Height::integer(), [Option]) -> wxImageList() -%% Option = {mask, bool()} | {initialCount, integer()} %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistwximagelist">external documentation</a>. +-spec new(Width, Height, [Option]) -> wxImageList() when + Width::integer(), Height::integer(), + Option :: {mask, boolean()} + | {initialCount, integer()}. new(Width,Height, Options) when is_integer(Width),is_integer(Height),is_list(Options) -> MOpts = fun({mask, Mask}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Mask)):32/?UI>>|Acc]; @@ -58,23 +64,24 @@ new(Width,Height, Options) wxe_util:construct(?wxImageList_new_3, <<Width:32/?UI,Height:32/?UI, BinOpt/binary>>). -%% @spec (This::wxImageList(), Bitmap::wxBitmap:wxBitmap()) -> integer() %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistadd">external documentation</a>. +-spec add(This, Bitmap) -> integer() when + This::wxImageList(), Bitmap::wxBitmap:wxBitmap(). add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) -> ?CLASS(ThisT,wxImageList), ?CLASS(BitmapT,wxBitmap), wxe_util:call(?wxImageList_Add_1, <<ThisRef:32/?UI,BitmapRef:32/?UI>>). -%% @spec (This::wxImageList(),Bitmap::wxBitmap:wxBitmap(),X::term()) -> integer() %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistadd">external documentation</a>. -%% <br /> Alternatives: -%% <p><c> -%% add(This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), Mask::wxBitmap:wxBitmap()) -> integer() </c> -%% </p> -%% <p><c> -%% add(This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), MaskColour::wx:colour()) -> integer() </c> -%% </p> +%% <br /> Also:<br /> +%% add(This, Bitmap, MaskColour) -> integer() when<br /> +%% This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), MaskColour::wx:wx_colour().<br /> +%% +-spec add(This, Bitmap, Mask) -> integer() when + This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), Mask::wxBitmap:wxBitmap(); + (This, Bitmap, MaskColour) -> integer() when + This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), MaskColour::wx:wx_colour(). add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef},#wx_ref{type=MaskT,ref=MaskRef}) -> ?CLASS(ThisT,wxImageList), ?CLASS(BitmapT,wxBitmap), @@ -88,15 +95,19 @@ add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef},MaskColo wxe_util:call(?wxImageList_Add_2_1, <<ThisRef:32/?UI,BitmapRef:32/?UI,(wxe_util:colour_bin(MaskColour)):16/binary>>). -%% @spec (This::wxImageList(), Width::integer(), Height::integer()) -> bool() %% @equiv create(This,Width,Height, []) +-spec create(This, Width, Height) -> boolean() when + This::wxImageList(), Width::integer(), Height::integer(). + create(This,Width,Height) when is_record(This, wx_ref),is_integer(Width),is_integer(Height) -> create(This,Width,Height, []). -%% @spec (This::wxImageList(), Width::integer(), Height::integer(), [Option]) -> bool() -%% Option = {mask, bool()} | {initialCount, integer()} %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistcreate">external documentation</a>. +-spec create(This, Width, Height, [Option]) -> boolean() when + This::wxImageList(), Width::integer(), Height::integer(), + Option :: {mask, boolean()} + | {initialCount, integer()}. create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options) when is_integer(Width),is_integer(Height),is_list(Options) -> ?CLASS(ThisT,wxImageList), @@ -107,15 +118,19 @@ create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options) wxe_util:call(?wxImageList_Create, <<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>). -%% @spec (This::wxImageList(), Index::integer(), Dc::wxDC:wxDC(), X::integer(), Y::integer()) -> bool() %% @equiv draw(This,Index,Dc,X,Y, []) +-spec draw(This, Index, Dc, X, Y) -> boolean() when + This::wxImageList(), Index::integer(), Dc::wxDC:wxDC(), X::integer(), Y::integer(). + draw(This,Index,Dc,X,Y) when is_record(This, wx_ref),is_integer(Index),is_record(Dc, wx_ref),is_integer(X),is_integer(Y) -> draw(This,Index,Dc,X,Y, []). -%% @spec (This::wxImageList(), Index::integer(), Dc::wxDC:wxDC(), X::integer(), Y::integer(), [Option]) -> bool() -%% Option = {flags, integer()} | {solidBackground, bool()} %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistdraw">external documentation</a>. +-spec draw(This, Index, Dc, X, Y, [Option]) -> boolean() when + This::wxImageList(), Index::integer(), Dc::wxDC:wxDC(), X::integer(), Y::integer(), + Option :: {flags, integer()} + | {solidBackground, boolean()}. draw(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=DcT,ref=DcRef},X,Y, Options) when is_integer(Index),is_integer(X),is_integer(Y),is_list(Options) -> ?CLASS(ThisT,wxImageList), @@ -127,54 +142,62 @@ draw(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=DcT,ref=DcRef},X,Y, Opti wxe_util:call(?wxImageList_Draw, <<ThisRef:32/?UI,Index:32/?UI,DcRef:32/?UI,X:32/?UI,Y:32/?UI, 0:32,BinOpt/binary>>). -%% @spec (This::wxImageList(), Index::integer()) -> wxBitmap:wxBitmap() %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistgetbitmap">external documentation</a>. +-spec getBitmap(This, Index) -> wxBitmap:wxBitmap() when + This::wxImageList(), Index::integer(). getBitmap(#wx_ref{type=ThisT,ref=ThisRef},Index) when is_integer(Index) -> ?CLASS(ThisT,wxImageList), wxe_util:call(?wxImageList_GetBitmap, <<ThisRef:32/?UI,Index:32/?UI>>). -%% @spec (This::wxImageList(), Index::integer()) -> wxIcon:wxIcon() %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistgeticon">external documentation</a>. +-spec getIcon(This, Index) -> wxIcon:wxIcon() when + This::wxImageList(), Index::integer(). getIcon(#wx_ref{type=ThisT,ref=ThisRef},Index) when is_integer(Index) -> ?CLASS(ThisT,wxImageList), wxe_util:call(?wxImageList_GetIcon, <<ThisRef:32/?UI,Index:32/?UI>>). -%% @spec (This::wxImageList()) -> integer() %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistgetimagecount">external documentation</a>. +-spec getImageCount(This) -> integer() when + This::wxImageList(). getImageCount(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxImageList), wxe_util:call(?wxImageList_GetImageCount, <<ThisRef:32/?UI>>). -%% @spec (This::wxImageList(), Index::integer()) -> {bool(), Width::integer(), Height::integer()} %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistgetsize">external documentation</a>. +-spec getSize(This, Index) -> Result when + Result ::{Res ::boolean(), Width::integer(), Height::integer()}, + This::wxImageList(), Index::integer(). getSize(#wx_ref{type=ThisT,ref=ThisRef},Index) when is_integer(Index) -> ?CLASS(ThisT,wxImageList), wxe_util:call(?wxImageList_GetSize, <<ThisRef:32/?UI,Index:32/?UI>>). -%% @spec (This::wxImageList(), Index::integer()) -> bool() %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistremove">external documentation</a>. +-spec remove(This, Index) -> boolean() when + This::wxImageList(), Index::integer(). remove(#wx_ref{type=ThisT,ref=ThisRef},Index) when is_integer(Index) -> ?CLASS(ThisT,wxImageList), wxe_util:call(?wxImageList_Remove, <<ThisRef:32/?UI,Index:32/?UI>>). -%% @spec (This::wxImageList()) -> bool() %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistremoveall">external documentation</a>. +-spec removeAll(This) -> boolean() when + This::wxImageList(). removeAll(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxImageList), wxe_util:call(?wxImageList_RemoveAll, <<ThisRef:32/?UI>>). -%% @spec (This::wxImageList(), Index::integer(), Bitmap::wxBitmap:wxBitmap()) -> bool() %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistreplace">external documentation</a>. +-spec replace(This, Index, Bitmap) -> boolean() when + This::wxImageList(), Index::integer(), Bitmap::wxBitmap:wxBitmap(). replace(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=BitmapT,ref=BitmapRef}) when is_integer(Index) -> ?CLASS(ThisT,wxImageList), @@ -182,8 +205,9 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=BitmapT,ref=BitmapRef wxe_util:call(?wxImageList_Replace_2, <<ThisRef:32/?UI,Index:32/?UI,BitmapRef:32/?UI>>). -%% @spec (This::wxImageList(), Index::integer(), Bitmap::wxBitmap:wxBitmap(), Mask::wxBitmap:wxBitmap()) -> bool() %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistreplace">external documentation</a>. +-spec replace(This, Index, Bitmap, Mask) -> boolean() when + This::wxImageList(), Index::integer(), Bitmap::wxBitmap:wxBitmap(), Mask::wxBitmap:wxBitmap(). replace(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=BitmapT,ref=BitmapRef},#wx_ref{type=MaskT,ref=MaskRef}) when is_integer(Index) -> ?CLASS(ThisT,wxImageList), @@ -192,8 +216,8 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=BitmapT,ref=BitmapRef wxe_util:call(?wxImageList_Replace_3, <<ThisRef:32/?UI,Index:32/?UI,BitmapRef:32/?UI,MaskRef:32/?UI>>). -%% @spec (This::wxImageList()) -> ok %% @doc Destroys this object, do not use object again +-spec destroy(This::wxImageList()) -> ok. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxImageList), wxe_util:destroy(?DESTROY_OBJECT,Obj), |