1Wx::Api(3) User Contributed Perl Documentation Wx::Api(3)
2
3
4
6 API - wxPerl extension API documentation
7
9 WXPL_API_VERSION
10
11 An integer value used to differentiate wxPerl versions, it is guaran‐
12 teed to be non-decreasing. wxPerl 0.15 value is 0150; wxPerl 1.00 value
13 will be 1000, wxPerl 2.12 value will be 2120.
14
15 Introduced in wxPerl 0.15
16
17 wxPli_create_evthandler
18
19 SV* wxPli_create_evthandler( pTHX_ wxEvtHandler* object,
20 const char* classname );
21
22 Creates a new hash reference, blessed into "classname", and
23 binds"object" to it.
24
25 Introduced in wxPerl 0.16
26
27 wxPli_evthandler_2_sv
28
29 SV* wxPli_evthandler_2_sv( pTHX_ SV* var, wxEvtHandler* evth );
30
31 Same as wxPli_object_2_sv, but works with "wxEvtHandler"-derived
32 classes, which includes all "wxWindow"-derived classes.
33
34 Introduced in wxPerl 0.16
35
36 wxPli_get_class
37
38 const char* wxPli_get_class( pTHX_ SV* ref );
39
40 The C++ equivalent of "$class = ref( $obj ) ⎪⎪ $obj"; the pointer
41 returned by the function is potentially temporary.
42
43 wxPli_non_object_2_sv
44
45 SV* wxPli_non_object_2_sv( pTHX_ SV* var, void* data, const char* package );
46
47 Binds a generic pointer to an "SV*", and returns it; the new binding is
48 blessed into the given "package".
49
50 Introduced before wxPerl 0.14
51
52 wxPli_object_2_sv
53
54 SV* wxPli_object_2_sv( pTHX_ SV* var, wxObject* object );
55
56 Binds a "wxObject*" pointer to an "SV*", and returns it. If the object
57 is already bound to an "SV*", returns a reference to the existing
58 "SV*", otherwise, it creates a new binding; in the latter case, the new
59 "SV*" is blessed into a package obtained through the wxWidgets RTTI
60 system.
61
62 Introduced before wxPerl 0.14
63
64 wxPli_push_arguments
65
66 void wxPli_push_arguments( pTHX_ SV*** stack, const char* argtypes, ... );
67
68 // example
69 wxPli_push_arguments( aTHX_ SP, "iP", 12, "foo" );
70
71 Pushes a variable number of arguments on the perl stack, it is useful
72 for passing parameters to a Perl function. The "argtypes" string
73 describes the types of subsequent arguments, each character of the
74 string specifying the type of a single argument. Possible values are:
75
76 b a "bool" value
77
78 i an "int" value
79
80 l a "long" value
81
82 L an "unsigned long" value
83
84 d a "double" value
85
86 p a "char*" value
87
88 w a "wxChar*" value
89
90 P a "wxString*" value
91
92 S a "SV*", a copy of the SV is pushed on the stack
93
94 s a "SV*", the pointer itself is pushed on the stack
95
96 O a "wxObject*", the function will internally call
97 "wxPli_object_2_sv" and push the result on the stack.
98
99 o this is the only type that uses 2 parameters: the first is a
100 "void*", the second a "char*"; the function will internally call
101 "wxPli_non_object_2_sv" and push the result on the stack.
102
103 Introduced before wxPerl 0.14
104
105 wxPli_sv_2_object
106
107 void* wxPli_sv_2_object( pTHX_ SV* scalar, const char* classname );
108
109 Extracts a bound pointer from a perl reference, checking that the ref‐
110 erence belongs to the correct class (die()s on failure), and returns
111 it. If "classname" is "NULL", the check is not done.
112
113 Introduced before wxPerl 0.14
114
115 wxPli_wxChar_2_sv
116
117 SV* wxPli_wxChar_2_sv( pTHX_ const wxChar* str, SV* out );
118
119 Stores a string into a "SV*", and returns the "SV*".
120
121 Introduced before wxPerl 0.14
122
123 wxPli_wxString_2_sv
124
125 SV* wxPli_wxString_2_sv( pTHX_ const wxString& str, SV* out );
126
127 Stores a string into a "SV*", and returns the "SV*".
128
129 Introduced before wxPerl 0.14
130
132 Mattia Barbon <mbarbon at cpan dot org>
133
134
135
136perl v5.8.8 2007-03-10 Wx::Api(3)