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

« back to all changes in this revision

Viewing changes to lib/wx/src/gen/wxRegion.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_wxregion.html">wxRegion</a>.
 
21
%% @type wxRegion().  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(wxRegion).
 
26
-include("wxe.hrl").
 
27
-export(['Xor'/2,'Xor'/5,clear/1,contains/2,contains/3,contains/5,convertToBitmap/1,
 
28
  destroy/1,getBox/1,intersect/2,intersect/5,isEmpty/1,new/0,new/1,new/2,
 
29
  new/4,offset/2,offset/3,subtract/2,subtract/5,union/2,union/3,union/4,
 
30
  union/5]).
 
31
 
 
32
%% inherited exports
 
33
-export([parent_class/1]).
 
34
 
 
35
%% @hidden
 
36
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
 
37
 
 
38
%% @spec () -> wxRegion()
 
39
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionwxregion">external documentation</a>.
 
40
new() ->
 
41
  wxe_util:construct(?wxRegion_new_0,
 
42
  <<>>).
 
43
 
 
44
%% @spec (X::term()) -> wxRegion()
 
45
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionwxregion">external documentation</a>.
 
46
%% <br /> Alternatives: 
 
47
%% <p><c>
 
48
%% new(Bmp::wxBitmap:wxBitmap()) -> wxRegion() </c>
 
49
%% </p>
 
50
%% <p><c>
 
51
%% new(Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> wxRegion() </c>
 
52
%% </p>
 
53
new(#wx_ref{type=BmpT,ref=BmpRef}) ->
 
54
  ?CLASS(BmpT,wxBitmap),
 
55
  wxe_util:construct(?wxRegion_new_1_0,
 
56
  <<BmpRef:32/?UI>>);
 
57
new({RectX,RectY,RectW,RectH})
 
58
 when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
 
59
  wxe_util:construct(?wxRegion_new_1_1,
 
60
  <<RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
 
61
 
 
62
%% @spec (TopLeft::{X::integer(),Y::integer()}, BottomRight::{X::integer(),Y::integer()}) -> wxRegion()
 
63
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionwxregion">external documentation</a>.
 
64
new({TopLeftX,TopLeftY},{BottomRightX,BottomRightY})
 
65
 when is_integer(TopLeftX),is_integer(TopLeftY),is_integer(BottomRightX),is_integer(BottomRightY) ->
 
66
  wxe_util:construct(?wxRegion_new_2,
 
67
  <<TopLeftX:32/?UI,TopLeftY:32/?UI,BottomRightX:32/?UI,BottomRightY:32/?UI>>).
 
68
 
 
69
%% @spec (X::integer(), Y::integer(), W::integer(), H::integer()) -> wxRegion()
 
70
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionwxregion">external documentation</a>.
 
71
new(X,Y,W,H)
 
72
 when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
 
73
  wxe_util:construct(?wxRegion_new_4,
 
74
  <<X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
 
75
 
 
76
%% @spec (This::wxRegion()) -> ok
 
77
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionclear">external documentation</a>.
 
78
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
 
79
  ?CLASS(ThisT,wxRegion),
 
80
  wxe_util:cast(?wxRegion_Clear,
 
81
  <<ThisRef:32/?UI>>).
 
82
 
 
83
%% @spec (This::wxRegion(),X::term()) -> WxRegionContain
 
84
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregioncontains">external documentation</a>.
 
85
%% <br /> Alternatives: 
 
86
%% <p><c>
 
87
%% contains(This::wxRegion(), Pt::{X::integer(),Y::integer()}) -> WxRegionContain </c>
 
88
%%<br /> WxRegionContain = integer()
 
89
%%<br /> WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion
 
90
%% </p>
 
91
%% <p><c>
 
92
%% contains(This::wxRegion(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> WxRegionContain </c>
 
93
%%<br /> WxRegionContain = integer()
 
94
%%<br /> WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion
 
95
%% </p>
 
96
contains(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
 
97
 when is_integer(PtX),is_integer(PtY) ->
 
98
  ?CLASS(ThisT,wxRegion),
 
99
  wxe_util:call(?wxRegion_Contains_1_0,
 
100
  <<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>);
 
101
contains(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
 
102
 when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
 
103
  ?CLASS(ThisT,wxRegion),
 
104
  wxe_util:call(?wxRegion_Contains_1_1,
 
105
  <<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
 
106
 
 
107
%% @spec (This::wxRegion(), X::integer(), Y::integer()) -> WxRegionContain
 
108
%% WxRegionContain = integer()
 
109
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregioncontains">external documentation</a>.
 
110
%%<br /> WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion
 
111
contains(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
 
112
 when is_integer(X),is_integer(Y) ->
 
113
  ?CLASS(ThisT,wxRegion),
 
114
  wxe_util:call(?wxRegion_Contains_2,
 
115
  <<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
 
116
 
 
117
%% @spec (This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> WxRegionContain
 
118
%% WxRegionContain = integer()
 
119
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregioncontains">external documentation</a>.
 
120
%%<br /> WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion
 
121
contains(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
 
122
 when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
 
123
  ?CLASS(ThisT,wxRegion),
 
124
  wxe_util:call(?wxRegion_Contains_4,
 
125
  <<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
 
126
 
 
127
%% @spec (This::wxRegion()) -> wxBitmap:wxBitmap()
 
128
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionconverttobitmap">external documentation</a>.
 
129
convertToBitmap(#wx_ref{type=ThisT,ref=ThisRef}) ->
 
130
  ?CLASS(ThisT,wxRegion),
 
131
  wxe_util:call(?wxRegion_ConvertToBitmap,
 
132
  <<ThisRef:32/?UI>>).
 
133
 
 
134
%% @spec (This::wxRegion()) -> {X::integer(),Y::integer(),W::integer(),H::integer()}
 
135
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregiongetbox">external documentation</a>.
 
136
getBox(#wx_ref{type=ThisT,ref=ThisRef}) ->
 
137
  ?CLASS(ThisT,wxRegion),
 
138
  wxe_util:call(?wxRegion_GetBox,
 
139
  <<ThisRef:32/?UI>>).
 
140
 
 
141
%% @spec (This::wxRegion(),X::wxRegion()|term()) -> bool()
 
142
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionintersect">external documentation</a>.
 
143
%% <br /> Alternatives: 
 
144
%% <p><c>
 
145
%% intersect(This::wxRegion(), Region::wxRegion()) -> bool() </c>
 
146
%% </p>
 
147
%% <p><c>
 
148
%% intersect(This::wxRegion(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> bool() </c>
 
149
%% </p>
 
150
intersect(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
 
151
  ?CLASS(ThisT,wxRegion),
 
152
  ?CLASS(RegionT,wxRegion),
 
153
  wxe_util:call(?wxRegion_Intersect_1_0,
 
154
  <<ThisRef:32/?UI,RegionRef:32/?UI>>);
 
155
intersect(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
 
156
 when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
 
157
  ?CLASS(ThisT,wxRegion),
 
158
  wxe_util:call(?wxRegion_Intersect_1_1,
 
159
  <<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
 
160
 
 
161
%% @spec (This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool()
 
162
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionintersect">external documentation</a>.
 
163
intersect(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
 
164
 when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
 
165
  ?CLASS(ThisT,wxRegion),
 
166
  wxe_util:call(?wxRegion_Intersect_4,
 
167
  <<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
 
168
 
 
169
%% @spec (This::wxRegion()) -> bool()
 
170
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionisempty">external documentation</a>.
 
171
isEmpty(#wx_ref{type=ThisT,ref=ThisRef}) ->
 
172
  ?CLASS(ThisT,wxRegion),
 
173
  wxe_util:call(?wxRegion_IsEmpty,
 
174
  <<ThisRef:32/?UI>>).
 
175
 
 
176
%% @spec (This::wxRegion(),X::wxRegion()|term()) -> bool()
 
177
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionsubtract">external documentation</a>.
 
178
%% <br /> Alternatives: 
 
179
%% <p><c>
 
180
%% subtract(This::wxRegion(), Region::wxRegion()) -> bool() </c>
 
181
%% </p>
 
182
%% <p><c>
 
183
%% subtract(This::wxRegion(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> bool() </c>
 
184
%% </p>
 
185
subtract(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
 
186
  ?CLASS(ThisT,wxRegion),
 
187
  ?CLASS(RegionT,wxRegion),
 
188
  wxe_util:call(?wxRegion_Subtract_1_0,
 
189
  <<ThisRef:32/?UI,RegionRef:32/?UI>>);
 
190
subtract(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
 
191
 when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
 
192
  ?CLASS(ThisT,wxRegion),
 
193
  wxe_util:call(?wxRegion_Subtract_1_1,
 
194
  <<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
 
195
 
 
196
%% @spec (This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool()
 
197
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionsubtract">external documentation</a>.
 
198
subtract(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
 
199
 when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
 
200
  ?CLASS(ThisT,wxRegion),
 
201
  wxe_util:call(?wxRegion_Subtract_4,
 
202
  <<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
 
203
 
 
204
%% @spec (This::wxRegion(), Pt::{X::integer(),Y::integer()}) -> bool()
 
205
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionoffset">external documentation</a>.
 
206
offset(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
 
207
 when is_integer(PtX),is_integer(PtY) ->
 
208
  ?CLASS(ThisT,wxRegion),
 
209
  wxe_util:call(?wxRegion_Offset_1,
 
210
  <<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
 
211
 
 
212
%% @spec (This::wxRegion(), X::integer(), Y::integer()) -> bool()
 
213
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionoffset">external documentation</a>.
 
214
offset(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
 
215
 when is_integer(X),is_integer(Y) ->
 
216
  ?CLASS(ThisT,wxRegion),
 
217
  wxe_util:call(?wxRegion_Offset_2,
 
218
  <<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
 
219
 
 
220
%% @spec (This::wxRegion(),X::term()) -> bool()
 
221
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionunion">external documentation</a>.
 
222
%% <br /> Alternatives: 
 
223
%% <p><c>
 
224
%% union(This::wxRegion(), Region::wxRegion() | wxBitmap:wxBitmap()) -> bool() </c>
 
225
%% </p>
 
226
%% <p><c>
 
227
%% union(This::wxRegion(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> bool() </c>
 
228
%% </p>
 
229
union(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
 
230
  ?CLASS(ThisT,wxRegion),
 
231
  RegionOP = case ?CLASS_T(RegionT,wxRegion) of
 
232
     true ->
 
233
       ?wxRegion_Union_1_1;
 
234
     _ -> ?CLASS(RegionT,wxBitmap),
 
235
       ?wxRegion_Union_1_0
 
236
     end,
 
237
  wxe_util:call(RegionOP,
 
238
  <<ThisRef:32/?UI,RegionRef:32/?UI>>);
 
239
union(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
 
240
 when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
 
241
  ?CLASS(ThisT,wxRegion),
 
242
  wxe_util:call(?wxRegion_Union_1_2,
 
243
  <<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
 
244
 
 
245
%% @spec (This::wxRegion(), Bmp::wxBitmap:wxBitmap(), Transp::wx:colour()) -> bool()
 
246
%% @equiv union(This,Bmp,Transp, [])
 
247
union(This,Bmp,Transp)
 
248
 when is_record(This, wx_ref),is_record(Bmp, wx_ref),tuple_size(Transp) =:= 3; tuple_size(Transp) =:= 4 ->
 
249
  union(This,Bmp,Transp, []).
 
250
 
 
251
%% @spec (This::wxRegion(), Bmp::wxBitmap:wxBitmap(), Transp::wx:colour(), [Option]) -> bool()
 
252
%% Option = {tolerance, integer()}
 
253
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionunion">external documentation</a>.
 
254
union(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},Transp, Options)
 
255
 when tuple_size(Transp) =:= 3; tuple_size(Transp) =:= 4,is_list(Options) ->
 
256
  ?CLASS(ThisT,wxRegion),
 
257
  ?CLASS(BmpT,wxBitmap),
 
258
  MOpts = fun({tolerance, Tolerance}, Acc) -> [<<1:32/?UI,Tolerance:32/?UI>>|Acc];
 
259
          (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
 
260
  BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
 
261
  wxe_util:call(?wxRegion_Union_3,
 
262
  <<ThisRef:32/?UI,BmpRef:32/?UI,(wxe_util:colour_bin(Transp)):16/binary, BinOpt/binary>>).
 
263
 
 
264
%% @spec (This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool()
 
265
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionunion">external documentation</a>.
 
266
union(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
 
267
 when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
 
268
  ?CLASS(ThisT,wxRegion),
 
269
  wxe_util:call(?wxRegion_Union_4,
 
270
  <<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
 
271
 
 
272
%% @spec (This::wxRegion(),X::wxRegion()|term()) -> bool()
 
273
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionxor">external documentation</a>.
 
274
%% <br /> Alternatives: 
 
275
%% <p><c>
 
276
%% 'Xor'(This::wxRegion(), Region::wxRegion()) -> bool() </c>
 
277
%% </p>
 
278
%% <p><c>
 
279
%% 'Xor'(This::wxRegion(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> bool() </c>
 
280
%% </p>
 
281
'Xor'(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
 
282
  ?CLASS(ThisT,wxRegion),
 
283
  ?CLASS(RegionT,wxRegion),
 
284
  wxe_util:call(?wxRegion_Xor_1_0,
 
285
  <<ThisRef:32/?UI,RegionRef:32/?UI>>);
 
286
'Xor'(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
 
287
 when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
 
288
  ?CLASS(ThisT,wxRegion),
 
289
  wxe_util:call(?wxRegion_Xor_1_1,
 
290
  <<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
 
291
 
 
292
%% @spec (This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool()
 
293
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionxor">external documentation</a>.
 
294
'Xor'(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
 
295
 when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
 
296
  ?CLASS(ThisT,wxRegion),
 
297
  wxe_util:call(?wxRegion_Xor_4,
 
298
  <<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
 
299
 
 
300
%% @spec (This::wxRegion()) -> ok
 
301
%% @doc Destroys this object, do not use object again
 
302
destroy(Obj=#wx_ref{type=Type}) -> 
 
303
  ?CLASS(Type,wxRegion),
 
304
  wxe_util:destroy(?DESTROY_OBJECT,Obj),
 
305
  ok.