~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-05-01 10:14:38 UTC
  • mfrom: (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090501101438-6qlr6rsdxgyzrg2z
Tags: 1:13.b-dfsg-2
* Cleaned up patches: removed unneeded patch which helped to support
  different SCTP library versions, made sure that changes for m68k
  architecture applied only when building on this architecture.
* Removed duplicated information from binary packages descriptions.
* Don't require libsctp-dev build-dependency on solaris-i386 architecture
  which allows to build Erlang on Nexenta (thanks to Tim Spriggs for
  the suggestion).

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_wxbrush.html">wxBrush</a>.
 
21
%% @type wxBrush().  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(wxBrush).
 
26
-include("wxe.hrl").
 
27
-export([destroy/1,getColour/1,getStipple/1,getStyle/1,isHatch/1,isOk/1,new/0,
 
28
  new/1,new/2,setColour/2,setColour/4,setStipple/2,setStyle/2]).
 
29
 
 
30
%% inherited exports
 
31
-export([parent_class/1]).
 
32
 
 
33
%% @hidden
 
34
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
 
35
 
 
36
%% @spec () -> wxBrush()
 
37
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushwxbrush">external documentation</a>.
 
38
new() ->
 
39
  wxe_util:construct(?wxBrush_new_0,
 
40
  <<>>).
 
41
 
 
42
%% @spec (X::term()) -> wxBrush()
 
43
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushwxbrush">external documentation</a>.
 
44
%% <br /> Alternatives: 
 
45
%% <p><c>
 
46
%% new(Colour::wx:colour()) -> new(Colour, []) </c></p>
 
47
%% <p><c>
 
48
%% new(StippleBitmap::wxBitmap:wxBitmap()) -> wxBrush() </c>
 
49
%% </p>
 
50
 
 
51
new(Colour)
 
52
 when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
 
53
  new(Colour, []);
 
54
new(#wx_ref{type=StippleBitmapT,ref=StippleBitmapRef}) ->
 
55
  ?CLASS(StippleBitmapT,wxBitmap),
 
56
  wxe_util:construct(?wxBrush_new_1,
 
57
  <<StippleBitmapRef:32/?UI>>).
 
58
 
 
59
%% @spec (Colour::wx:colour(), [Option]) -> wxBrush()
 
60
%% Option = {style, integer()}
 
61
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushwxbrush">external documentation</a>.
 
62
new(Colour, Options)
 
63
 when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4,is_list(Options) ->
 
64
  MOpts = fun({style, Style}, Acc) -> [<<1:32/?UI,Style:32/?UI>>|Acc];
 
65
          (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
 
66
  BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
 
67
  wxe_util:construct(?wxBrush_new_2,
 
68
  <<(wxe_util:colour_bin(Colour)):16/binary, BinOpt/binary>>).
 
69
 
 
70
%% @spec (This::wxBrush()) -> wx:colour()
 
71
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushgetcolour">external documentation</a>.
 
72
getColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
 
73
  ?CLASS(ThisT,wxBrush),
 
74
  wxe_util:call(?wxBrush_GetColour,
 
75
  <<ThisRef:32/?UI>>).
 
76
 
 
77
%% @spec (This::wxBrush()) -> wxBitmap:wxBitmap()
 
78
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushgetstipple">external documentation</a>.
 
79
getStipple(#wx_ref{type=ThisT,ref=ThisRef}) ->
 
80
  ?CLASS(ThisT,wxBrush),
 
81
  wxe_util:call(?wxBrush_GetStipple,
 
82
  <<ThisRef:32/?UI>>).
 
83
 
 
84
%% @spec (This::wxBrush()) -> integer()
 
85
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushgetstyle">external documentation</a>.
 
86
getStyle(#wx_ref{type=ThisT,ref=ThisRef}) ->
 
87
  ?CLASS(ThisT,wxBrush),
 
88
  wxe_util:call(?wxBrush_GetStyle,
 
89
  <<ThisRef:32/?UI>>).
 
90
 
 
91
%% @spec (This::wxBrush()) -> bool()
 
92
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushishatch">external documentation</a>.
 
93
isHatch(#wx_ref{type=ThisT,ref=ThisRef}) ->
 
94
  ?CLASS(ThisT,wxBrush),
 
95
  wxe_util:call(?wxBrush_IsHatch,
 
96
  <<ThisRef:32/?UI>>).
 
97
 
 
98
%% @spec (This::wxBrush()) -> bool()
 
99
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushisok">external documentation</a>.
 
100
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
 
101
  ?CLASS(ThisT,wxBrush),
 
102
  wxe_util:call(?wxBrush_IsOk,
 
103
  <<ThisRef:32/?UI>>).
 
104
 
 
105
%% @spec (This::wxBrush(), Col::wx:colour()) -> ok
 
106
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushsetcolour">external documentation</a>.
 
107
setColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
 
108
 when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
 
109
  ?CLASS(ThisT,wxBrush),
 
110
  wxe_util:cast(?wxBrush_SetColour_1,
 
111
  <<ThisRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
 
112
 
 
113
%% @spec (This::wxBrush(), R::integer(), G::integer(), B::integer()) -> ok
 
114
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushsetcolour">external documentation</a>.
 
115
setColour(#wx_ref{type=ThisT,ref=ThisRef},R,G,B)
 
116
 when is_integer(R),is_integer(G),is_integer(B) ->
 
117
  ?CLASS(ThisT,wxBrush),
 
118
  wxe_util:cast(?wxBrush_SetColour_3,
 
119
  <<ThisRef:32/?UI,R:32/?UI,G:32/?UI,B:32/?UI>>).
 
120
 
 
121
%% @spec (This::wxBrush(), Stipple::wxBitmap:wxBitmap()) -> ok
 
122
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushsetstipple">external documentation</a>.
 
123
setStipple(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=StippleT,ref=StippleRef}) ->
 
124
  ?CLASS(ThisT,wxBrush),
 
125
  ?CLASS(StippleT,wxBitmap),
 
126
  wxe_util:cast(?wxBrush_SetStipple,
 
127
  <<ThisRef:32/?UI,StippleRef:32/?UI>>).
 
128
 
 
129
%% @spec (This::wxBrush(), Style::integer()) -> ok
 
130
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushsetstyle">external documentation</a>.
 
131
setStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
 
132
 when is_integer(Style) ->
 
133
  ?CLASS(ThisT,wxBrush),
 
134
  wxe_util:cast(?wxBrush_SetStyle,
 
135
  <<ThisRef:32/?UI,Style:32/?UI>>).
 
136
 
 
137
%% @spec (This::wxBrush()) -> ok
 
138
%% @doc Destroys this object, do not use object again
 
139
destroy(Obj=#wx_ref{type=Type}) -> 
 
140
  ?CLASS(Type,wxBrush),
 
141
  wxe_util:destroy(?DESTROY_OBJECT,Obj),
 
142
  ok.