~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/wx/src/gen/wxIconBundle.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-05-07 15:07:37 UTC
  • mfrom: (1.2.1 upstream) (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090507150737-i4yb5elwinm7r0hc
Tags: 1:13.b-dfsg1-1
* Removed another bunch of non-free RFCs from original tarball
  (closes: #527053).
* Fixed build-dependencies list by adding missing comma. This requires
  libsctp-dev again. Also, added libsctp1 dependency to erlang-base and
  erlang-base-hipe packages because the shared library is loaded via
  dlopen now and cannot be added using dh_slibdeps (closes: #526682).
* Weakened dependency of erlang-webtool on erlang-observer to recommends
  to avoid circular dependencies (closes: #526627).
* Added solaris-i386 to HiPE enabled architectures.
* Made script sources in /usr/lib/erlang/erts-*/bin directory executable,
  which is more convenient if a user wants to create a target Erlang system.
* Shortened extended description line for erlang-dev package to make it
  fit 80x25 terminals.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%%
 
2
%% %CopyrightBegin%
 
3
%% 
 
4
%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
 
5
%% 
 
6
%% The contents of this file are subject to the Erlang Public License,
 
7
%% Version 1.1, (the "License"); you may not use this file except in
 
8
%% compliance with the License. You should have received a copy of the
 
9
%% Erlang Public License along with this software. If not, it can be
 
10
%% retrieved online at http://www.erlang.org/.
 
11
%% 
 
12
%% Software distributed under the License is distributed on an "AS IS"
 
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
14
%% the License for the specific language governing rights and limitations
 
15
%% under the License.
 
16
%% 
 
17
%% %CopyrightEnd%
 
18
%% This file is generated DO NOT EDIT
 
19
 
 
20
%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html">wxIconBundle</a>.
 
21
%% @type wxIconBundle().  An object reference, The representation is internal
 
22
%% and can be changed without notice. It can't be used for comparsion
 
23
%% stored on disc or distributed for use on other nodes.
 
24
 
 
25
-module(wxIconBundle).
 
26
-include("wxe.hrl").
 
27
-export([addIcon/2,addIcon/3,destroy/1,getIcon/1,getIcon/2,new/0,new/1,new/2]).
 
28
 
 
29
%% inherited exports
 
30
-export([parent_class/1]).
 
31
 
 
32
%% @hidden
 
33
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
 
34
 
 
35
%% @spec () -> wxIconBundle()
 
36
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlewxiconbundle">external documentation</a>.
 
37
new() ->
 
38
  wxe_util:construct(?wxIconBundle_new_0,
 
39
  <<>>).
 
40
 
 
41
%% @spec (Ic::wxIconBundle() | wxIcon:wxIcon()) -> wxIconBundle()
 
42
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlewxiconbundle">external documentation</a>.
 
43
new(#wx_ref{type=IcT,ref=IcRef}) ->
 
44
  IcOP = case ?CLASS_T(IcT,wxIconBundle) of
 
45
     true ->
 
46
       ?wxIconBundle_new_1_1;
 
47
     _ -> ?CLASS(IcT,wxIcon),
 
48
       ?wxIconBundle_new_1_0
 
49
     end,
 
50
  wxe_util:construct(IcOP,
 
51
  <<IcRef:32/?UI>>).
 
52
 
 
53
%% @spec (File::string(), Type::integer()) -> wxIconBundle()
 
54
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlewxiconbundle">external documentation</a>.
 
55
new(File,Type)
 
56
 when is_list(File),is_integer(Type) ->
 
57
  File_UC = unicode:characters_to_binary([File,0]),
 
58
  wxe_util:construct(?wxIconBundle_new_2,
 
59
  <<(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>>).
 
60
 
 
61
%% @spec (This::wxIconBundle(), Icon::wxIcon:wxIcon()) -> ok
 
62
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundleaddicon">external documentation</a>.
 
63
addIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}) ->
 
64
  ?CLASS(ThisT,wxIconBundle),
 
65
  ?CLASS(IconT,wxIcon),
 
66
  wxe_util:cast(?wxIconBundle_AddIcon_1,
 
67
  <<ThisRef:32/?UI,IconRef:32/?UI>>).
 
68
 
 
69
%% @spec (This::wxIconBundle(), File::string(), Type::integer()) -> ok
 
70
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundleaddicon">external documentation</a>.
 
71
addIcon(#wx_ref{type=ThisT,ref=ThisRef},File,Type)
 
72
 when is_list(File),is_integer(Type) ->
 
73
  ?CLASS(ThisT,wxIconBundle),
 
74
  File_UC = unicode:characters_to_binary([File,0]),
 
75
  wxe_util:cast(?wxIconBundle_AddIcon_2,
 
76
  <<ThisRef:32/?UI,(byte_size(File_UC)):32/?UI,(File_UC)/binary, 0:(((8- ((0+byte_size(File_UC)) band 16#7)) band 16#7))/unit:8,Type:32/?UI>>).
 
77
 
 
78
%% @spec (This::wxIconBundle()) -> wxIcon:wxIcon()
 
79
%% @equiv getIcon(This, [])
 
80
getIcon(This)
 
81
 when is_record(This, wx_ref) ->
 
82
  getIcon(This, []).
 
83
 
 
84
%% @spec (This::wxIconBundle(),X::term()) -> wxIcon:wxIcon()
 
85
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlegeticon">external documentation</a>.
 
86
%% <br /> Alternatives: 
 
87
%% <p><c>
 
88
%% getIcon(This::wxIconBundle(), [Option]) -> wxIcon:wxIcon() </c>
 
89
%%<br /> Option = {size, integer()}
 
90
%% </p>
 
91
%% <p><c>
 
92
%% getIcon(This::wxIconBundle(), Size::{W::integer(),H::integer()}) -> wxIcon:wxIcon() </c>
 
93
%% </p>
 
94
getIcon(#wx_ref{type=ThisT,ref=ThisRef}, Options)
 
95
 when is_list(Options) ->
 
96
  ?CLASS(ThisT,wxIconBundle),
 
97
  MOpts = fun({size, Size}, Acc) -> [<<1:32/?UI,Size:32/?UI>>|Acc];
 
98
          (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
 
99
  BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
 
100
  wxe_util:call(?wxIconBundle_GetIcon_1_0,
 
101
  <<ThisRef:32/?UI, 0:32,BinOpt/binary>>);
 
102
getIcon(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
 
103
 when is_integer(SizeW),is_integer(SizeH) ->
 
104
  ?CLASS(ThisT,wxIconBundle),
 
105
  wxe_util:call(?wxIconBundle_GetIcon_1_1,
 
106
  <<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
 
107
 
 
108
%% @spec (This::wxIconBundle()) -> ok
 
109
%% @doc Destroys this object, do not use object again
 
110
destroy(Obj=#wx_ref{type=Type}) -> 
 
111
  ?CLASS(Type,wxIconBundle),
 
112
  wxe_util:destroy(?wxIconBundle_destruct,Obj),
 
113
  ok.