Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / blib / man3 / Wx::Api.3pm
1 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sh \" Subsection heading
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
12 ..
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
16 ..
17 .de Vb \" Begin verbatim text
18 .ft CW
19 .nf
20 .ne \\$1
21 ..
22 .de Ve \" End verbatim text
23 .ft R
24 .fi
25 ..
26 .\" Set up some character translations and predefined strings.  \*(-- will
27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28 .\" double quote, and \*(R" will give a right double quote.  | will give a
29 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
30 .\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
31 .\" expand to `' in nroff, nothing in troff, for use with C<>.
32 .tr \(*W-|\(bv\*(Tr
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34 .ie n \{\
35 .    ds -- \(*W-
36 .    ds PI pi
37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39 .    ds L" ""
40 .    ds R" ""
41 .    ds C` ""
42 .    ds C' ""
43 'br\}
44 .el\{\
45 .    ds -- \|\(em\|
46 .    ds PI \(*p
47 .    ds L" ``
48 .    ds R" ''
49 'br\}
50 .\"
51 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
55 .if \nF \{\
56 .    de IX
57 .    tm Index:\\$1\t\\n%\t"\\$2"
58 ..
59 .    nr % 0
60 .    rr F
61 .\}
62 .\"
63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
65 .hy 0
66 .if n .na
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "Wx::Api 3"
132 .TH Wx::Api 3 "2007-04-29" "perl v5.8.3" "User Contributed Perl Documentation"
133 .SH "NAME"
134 API \- wxPerl extension API documentation
135 .SH "DESCRIPTION"
136 .IX Header "DESCRIPTION"
137 .Sh "\s-1WXPL_API_VERSION\s0"
138 .IX Subsection "WXPL_API_VERSION"
139 An integer value used to differentiate wxPerl versions, it is guaranteed to
140 be non\-decreasing. wxPerl 0.15 value is 0150; wxPerl 1.00 value will be
141 1000, wxPerl 2.12 value will be 2120.
142 .PP
143 \&\fIIntroduced in wxPerl 0.15\fR
144 .Sh "wxPli_create_evthandler"
145 .IX Subsection "wxPli_create_evthandler"
146 .Vb 2
147 \&  SV* wxPli_create_evthandler( pTHX_ wxEvtHandler* object,
148 \&                               const char* classname );
149 .Ve
150 .PP
151 Creates a new hash reference, blessed into \f(CW\*(C`classname\*(C'\fR,
152 and binds\f(CW\*(C`object\*(C'\fR to it.
153 .PP
154 \&\fIIntroduced in wxPerl 0.16\fR
155 .Sh "wxPli_evthandler_2_sv"
156 .IX Subsection "wxPli_evthandler_2_sv"
157 .Vb 1
158 \&  SV* wxPli_evthandler_2_sv( pTHX_ SV* var, wxEvtHandler* evth );
159 .Ve
160 .PP
161 Same as wxPli_object_2_sv, but works with \f(CW\*(C`wxEvtHandler\*(C'\fR\-derived
162 classes, which includes all \f(CW\*(C`wxWindow\*(C'\fR\-derived classes.
163 .PP
164 \&\fIIntroduced in wxPerl 0.16\fR
165 .Sh "wxPli_get_class"
166 .IX Subsection "wxPli_get_class"
167 .Vb 1
168 \&  const char* wxPli_get_class( pTHX_ SV* ref );
169 .Ve
170 .PP
171 The \*(C+ equivalent of \f(CW\*(C`$class = ref( $obj ) || $obj\*(C'\fR; the pointer
172 returned by the function is potentially temporary.
173 .Sh "wxPli_non_object_2_sv"
174 .IX Subsection "wxPli_non_object_2_sv"
175 .Vb 1
176 \&  SV* wxPli_non_object_2_sv( pTHX_ SV* var, void* data, const char* package );
177 .Ve
178 .PP
179 Binds a generic pointer to an \f(CW\*(C`SV*\*(C'\fR, and returns it; the new binding
180 is blessed into the given \f(CW\*(C`package\*(C'\fR.
181 .PP
182 \&\fIIntroduced before wxPerl 0.14\fR
183 .Sh "wxPli_object_2_sv"
184 .IX Subsection "wxPli_object_2_sv"
185 .Vb 1
186 \&  SV* wxPli_object_2_sv( pTHX_ SV* var, wxObject* object );
187 .Ve
188 .PP
189 Binds a \f(CW\*(C`wxObject*\*(C'\fR pointer to an \f(CW\*(C`SV*\*(C'\fR, and returns it.  If the
190 object is already bound to an \f(CW\*(C`SV*\*(C'\fR, returns a reference to the
191 existing \f(CW\*(C`SV*\*(C'\fR, otherwise, it creates a new binding; in the latter
192 case, the new \f(CW\*(C`SV*\*(C'\fR is blessed into a package obtained through the
193 wxWidgets \s-1RTTI\s0 system.
194 .PP
195 \&\fIIntroduced before wxPerl 0.14\fR
196 .Sh "wxPli_push_arguments"
197 .IX Subsection "wxPli_push_arguments"
198 .Vb 1
199 \&  void wxPli_push_arguments( pTHX_ SV*** stack, const char* argtypes, ... );
200 .Ve
201 .PP
202 .Vb 2
203 \&  // example
204 \&  wxPli_push_arguments( aTHX_ SP, "iP", 12, "foo" );
205 .Ve
206 .PP
207 Pushes a variable number of arguments on the perl stack,
208 it is useful for passing parameters to a Perl function. The
209 \&\f(CW\*(C`argtypes\*(C'\fR string describes the types of subsequent arguments, each
210 character of the string specifying the type of a single
211 argument. Possible values are:
212 .IP "b" 4
213 .IX Item "b"
214 a \f(CW\*(C`bool\*(C'\fR value
215 .IP "i" 4
216 .IX Item "i"
217 an \f(CW\*(C`int\*(C'\fR value
218 .IP "l" 4
219 .IX Item "l"
220 a \f(CW\*(C`long\*(C'\fR value
221 .IP "L" 4
222 .IX Item "L"
223 an \f(CW\*(C`unsigned long\*(C'\fR value
224 .IP "d" 4
225 .IX Item "d"
226 a \f(CW\*(C`double\*(C'\fR value
227 .IP "p" 4
228 .IX Item "p"
229 a \f(CW\*(C`char*\*(C'\fR value
230 .IP "w" 4
231 .IX Item "w"
232 a \f(CW\*(C`wxChar*\*(C'\fR value
233 .IP "P" 4
234 .IX Item "P"
235 a \f(CW\*(C`wxString*\*(C'\fR value
236 .IP "S" 4
237 .IX Item "S"
238 a \f(CW\*(C`SV*\*(C'\fR, a \fBcopy\fR of the \s-1SV\s0 is pushed on the stack
239 .IP "s" 4
240 .IX Item "s"
241 a \f(CW\*(C`SV*\*(C'\fR, the pointer itself is pushed on the stack
242 .IP "O" 4
243 .IX Item "O"
244 a \f(CW\*(C`wxObject*\*(C'\fR, the function will internally call \f(CW\*(C`wxPli_object_2_sv\*(C'\fR
245 and push the result on the stack.
246 .IP "o" 4
247 this is the only type that uses 2 parameters: the first is a \f(CW\*(C`void*\*(C'\fR,
248 the second a \f(CW\*(C`char*\*(C'\fR; the function will internally call
249 \&\f(CW\*(C`wxPli_non_object_2_sv\*(C'\fR and push the result on the stack.
250 .PP
251 \&\fIIntroduced before wxPerl 0.14\fR
252 .Sh "wxPli_sv_2_object"
253 .IX Subsection "wxPli_sv_2_object"
254 .Vb 1
255 \&  void* wxPli_sv_2_object( pTHX_ SV* scalar, const char* classname );
256 .Ve
257 .PP
258 Extracts a bound pointer from a perl reference, checking that
259 the reference belongs to the correct class (\fIdie()\fRs on failure),
260 and returns it. If \f(CW\*(C`classname\*(C'\fR is \f(CW\*(C`NULL\*(C'\fR, the check is not done.
261 .PP
262 \&\fIIntroduced before wxPerl 0.14\fR
263 .Sh "wxPli_wxChar_2_sv"
264 .IX Subsection "wxPli_wxChar_2_sv"
265 .Vb 1
266 \&  SV* wxPli_wxChar_2_sv( pTHX_ const wxChar* str, SV* out );
267 .Ve
268 .PP
269 Stores a string into a \f(CW\*(C`SV*\*(C'\fR, and returns the \f(CW\*(C`SV*\*(C'\fR.
270 .PP
271 \&\fIIntroduced before wxPerl 0.14\fR
272 .Sh "wxPli_wxString_2_sv"
273 .IX Subsection "wxPli_wxString_2_sv"
274 .Vb 1
275 \&  SV* wxPli_wxString_2_sv( pTHX_ const wxString& str, SV* out );
276 .Ve
277 .PP
278 Stores a string into a \f(CW\*(C`SV*\*(C'\fR, and returns the \f(CW\*(C`SV*\*(C'\fR.
279 .PP
280 \&\fIIntroduced before wxPerl 0.14\fR
281 .SH "AUTHOR"
282 .IX Header "AUTHOR"
283 Mattia Barbon <mbarbon at cpan dot org>