File: Config.xs

package info (click to toggle)
libwx-perl 0.9702-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,240 kB
  • ctags: 1,812
  • sloc: cpp: 8,988; perl: 6,366; makefile: 38; ansic: 1
file content (321 lines) | stat: -rwxr-xr-x 6,291 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
#############################################################################
## Name:        XS/Config.xs
## Purpose:     XS for Wx::*Config*
## Author:      Mattia Barbon
## Modified by:
## Created:     13/12/2001
## RCS-ID:      $Id: Config.xs 2299 2007-11-25 17:30:04Z mbarbon $
## Copyright:   (c) 2001-2002, 2004, 2007 Mattia Barbon
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

#include <wx/confbase.h>

MODULE=Wx PACKAGE=Wx::ConfigBase

void
wxConfigBase::Destroy()
  CODE:
    delete THIS;

wxConfigBase*
Create()
  CODE:
    RETVAL = wxConfigBase::Create();
  OUTPUT:
    RETVAL

void
DontCreateOnDemand()
  CODE:
    wxConfigBase::DontCreateOnDemand();

bool
wxConfigBase::DeleteAll()

bool
wxConfigBase::DeleteEntry( key, deleteGroupIfEmpty = true )
    wxString key
    bool deleteGroupIfEmpty

bool
wxConfigBase::DeleteGroup( key )
    wxString key

bool
wxConfigBase::Exists( key )
    wxString key

bool
wxConfigBase::Flush( currentOnly = false )
    bool currentOnly

wxConfigBase*
Get( createOnDemand = true )
    bool createOnDemand
  CODE:
    RETVAL = wxConfigBase::Get( createOnDemand );
  OUTPUT:
    RETVAL

wxString
wxConfigBase::GetAppName()

EntryType
wxConfigBase::GetEntryType( name )
    wxString name

void
wxConfigBase::GetFirstEntry()
  PREINIT:
    wxString name;
    long index;
    bool ret;
  PPCODE:
    ret = THIS->GetFirstEntry( name, index );
    EXTEND( SP, 3 );
    PUSHs( sv_2mortal( newSViv( ret ) ) );
    SV* tmp = newSViv( 0 );
    WXSTRING_OUTPUT( name, tmp );
    PUSHs( sv_2mortal( tmp ) );
    PUSHs( sv_2mortal( newSViv( index ) ) );

void
wxConfigBase::GetFirstGroup()
  PREINIT:
    wxString name;
    long index;
    bool ret;
  PPCODE:
    ret = THIS->GetFirstGroup( name, index );
    EXTEND( SP, 3 );
    PUSHs( sv_2mortal( newSViv( ret ) ) );
    SV* tmp = newSViv( 0 );
    WXSTRING_OUTPUT( name, tmp );
    PUSHs( sv_2mortal( tmp ) );
    PUSHs( sv_2mortal( newSViv( index ) ) );

void
wxConfigBase::GetNextEntry( index )
    long index
  PREINIT:
    wxString name;
    bool ret;
  PPCODE:
    ret = THIS->GetNextEntry( name, index );
    EXTEND( SP, 3 );
    PUSHs( sv_2mortal( newSViv( ret ) ) );
    SV* tmp = newSViv( 0 );
    WXSTRING_OUTPUT( name, tmp );
    PUSHs( sv_2mortal( tmp ) );
    PUSHs( sv_2mortal( newSViv( index ) ) );

void
wxConfigBase::GetNextGroup( index )
    long index
  PREINIT:
    wxString name;
    bool ret;
  PPCODE:
    ret = THIS->GetNextGroup( name, index );
    EXTEND( SP, 3 );
    PUSHs( sv_2mortal( newSViv( ret ) ) );
    SV* tmp = newSViv( 0 );
    WXSTRING_OUTPUT( name, tmp );
    PUSHs( sv_2mortal( tmp ) );
    PUSHs( sv_2mortal( newSViv( index ) ) );

unsigned int
wxConfigBase::GetNumberOfEntries( recursive = false )
    bool recursive

unsigned int
wxConfigBase::GetNumberOfGroups( recursive = false )
    bool recursive

wxString
wxConfigBase::GetPath()

wxString
wxConfigBase::GetVendorName()

bool
wxConfigBase::HasEntry( name )
    wxString name

bool
wxConfigBase::HasGroup( name )
    wxString name

bool
wxConfigBase::IsExpandingEnvVars()

bool
wxConfigBase::IsRecordingDefaults()

wxString
wxConfigBase::Read( key, def = wxEmptyString )
    wxString key
    wxString def
  CODE:
    THIS->Read( key, &RETVAL, def );
  OUTPUT:
    RETVAL

long
wxConfigBase::ReadInt( key, def = 0 )
    wxString key
    long def
  CODE:
    THIS->Read( key, &RETVAL, def );
  OUTPUT:
    RETVAL

#if WXPERL_W_VERSION_GE( 2, 9, 0 )

long
wxConfigBase::ReadLong( key, def = 0 )
    wxString key
    long def

double
wxConfigBase::ReadDouble( key, def = 0.0 )
    wxString key
    double def

bool
wxConfigBase::ReadBool( key, def = false )
    wxString key
    bool def

#else

bool
wxConfigBase::ReadBool( key, def = false )
    wxString key
    bool def
  CODE:
    THIS->Read( key, &RETVAL, def );
  OUTPUT:
    RETVAL

#endif

#if WXPERL_W_VERSION_GE( 2, 9, 0 ) && wxUSE_BASE64

SV*
wxConfigBase::ReadBinary( key )
    wxString key
  CODE:
    wxMemoryBuffer data;
    THIS->Read( key, &data );
    RETVAL = newSVpvn( (const char*)data.GetData(), data.GetDataLen() );
  OUTPUT:
    RETVAL

#endif

bool
wxConfigBase::RenameEntry( oldName, newName )
     wxString oldName
     wxString newName

bool
wxConfigBase::RenameGroup( oldName, newName )
     wxString oldName
     wxString newName

void
Set( config )
    wxConfigBase* config
  CODE:
    wxConfigBase::Set( config );

void
wxConfigBase::SetExpandEnvVars( doIt = true )
    bool doIt

void
wxConfigBase::SetPath( path )
    wxString path

void
wxConfigBase::SetRecordDefaults( doIt = true )
    bool doIt

void
wxConfigBase::Write( key, value )
    wxString key
    wxString value
  CODE:
    THIS->Write( key, value );

void
wxConfigBase::WriteInt( key, value )
    wxString key
    long value
  CODE:
    THIS->Write( key, value );

void
wxConfigBase::WriteFloat( key, value )
    wxString key
    double value
  CODE:
    THIS->Write( key, value );

void
wxConfigBase::WriteBool( key, value )
    wxString key
    bool value
  CODE:
    THIS->Write( key, value );

#if WXPERL_W_VERSION_GE( 2, 9, 0 ) && wxUSE_BASE64

void
wxConfigBase::WriteBinary( key, value )
    wxString key
    SV* value
  CODE:
    STRLEN len;
    char* buffer = SvPV( value, len );
    wxMemoryBuffer data( len );
    data.SetDataLen( len );
    memcpy( data.GetData(), buffer, len );
    THIS->Write( key, data );

#endif

MODULE=Wx PACKAGE=Wx::RegConfig

#if defined(__WXMSW__)

#include <wx/msw/regconf.h>

wxConfigBase*
wxRegConfig::new( appName = wxEmptyString, vendorName = wxEmptyString, localFilename = wxEmptyString, globalFilename = wxEmptyString, style = 0 )
    wxString appName
    wxString vendorName
    wxString localFilename
    wxString globalFilename
    long style

#endif

MODULE=Wx PACKAGE=Wx::FileConfig

#include <wx/fileconf.h>

wxConfigBase*
wxFileConfig::new( appName = wxEmptyString, vendorName = wxEmptyString, localFilename = wxEmptyString, globalFilename = wxEmptyString, style = 0 )
    wxString appName
    wxString vendorName
    wxString localFilename
    wxString globalFilename
    long style

void
wxFileConfig::SetUmask( mode )
    int mode