1 #############################################################################
3 ## Purpose: XS for Wx::*Config*
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: Config.xs 2299 2007-11-25 17:30:04Z mbarbon $
8 ## Copyright: (c) 2001-2002, 2004, 2007 Mattia Barbon
9 ## Licence: This program is free software; you can redistribute it and/or
10 ## modify it under the same terms as Perl itself
11 #############################################################################
13 #include <wx/confbase.h>
15 MODULE=Wx PACKAGE=Wx::ConfigBase
18 wxConfigBase::Destroy()
25 RETVAL = wxConfigBase::Create();
32 wxConfigBase::DontCreateOnDemand();
35 wxConfigBase::DeleteAll()
38 wxConfigBase::DeleteEntry( key, deleteGroupIfEmpty = true )
40 bool deleteGroupIfEmpty
43 wxConfigBase::DeleteGroup( key )
47 wxConfigBase::Exists( key )
51 wxConfigBase::Flush( currentOnly = false )
55 Get( createOnDemand = true )
58 RETVAL = wxConfigBase::Get( createOnDemand );
63 wxConfigBase::GetAppName()
66 wxConfigBase::GetEntryType( name )
70 wxConfigBase::GetFirstEntry()
76 ret = THIS->GetFirstEntry( name, index );
78 PUSHs( sv_2mortal( newSViv( ret ) ) );
79 SV* tmp = newSViv( 0 );
80 WXSTRING_OUTPUT( name, tmp );
81 PUSHs( sv_2mortal( tmp ) );
82 PUSHs( sv_2mortal( newSViv( index ) ) );
85 wxConfigBase::GetFirstGroup()
91 ret = THIS->GetFirstGroup( name, index );
93 PUSHs( sv_2mortal( newSViv( ret ) ) );
94 SV* tmp = newSViv( 0 );
95 WXSTRING_OUTPUT( name, tmp );
96 PUSHs( sv_2mortal( tmp ) );
97 PUSHs( sv_2mortal( newSViv( index ) ) );
100 wxConfigBase::GetNextEntry( index )
106 ret = THIS->GetNextEntry( name, index );
108 PUSHs( sv_2mortal( newSViv( ret ) ) );
109 SV* tmp = newSViv( 0 );
110 WXSTRING_OUTPUT( name, tmp );
111 PUSHs( sv_2mortal( tmp ) );
112 PUSHs( sv_2mortal( newSViv( index ) ) );
115 wxConfigBase::GetNextGroup( index )
121 ret = THIS->GetNextGroup( name, index );
123 PUSHs( sv_2mortal( newSViv( ret ) ) );
124 SV* tmp = newSViv( 0 );
125 WXSTRING_OUTPUT( name, tmp );
126 PUSHs( sv_2mortal( tmp ) );
127 PUSHs( sv_2mortal( newSViv( index ) ) );
130 wxConfigBase::GetNumberOfEntries( recursive = false )
134 wxConfigBase::GetNumberOfGroups( recursive = false )
138 wxConfigBase::GetPath()
141 wxConfigBase::GetVendorName()
144 wxConfigBase::HasEntry( name )
148 wxConfigBase::HasGroup( name )
152 wxConfigBase::IsExpandingEnvVars()
155 wxConfigBase::IsRecordingDefaults()
158 wxConfigBase::Read( key, def = wxEmptyString )
162 THIS->Read( key, &RETVAL, def );
167 wxConfigBase::ReadInt( key, def = 0 )
171 THIS->Read( key, &RETVAL, def );
175 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
178 wxConfigBase::ReadLong( key, def = 0 )
183 wxConfigBase::ReadDouble( key, def = 0.0 )
188 wxConfigBase::ReadBool( key, def = false )
195 wxConfigBase::ReadBool( key, def = false )
199 THIS->Read( key, &RETVAL, def );
205 #if WXPERL_W_VERSION_GE( 2, 9, 0 ) && wxUSE_BASE64
208 wxConfigBase::ReadBinary( key )
212 THIS->Read( key, &data );
213 RETVAL = newSVpvn( (const char*)data.GetData(), data.GetDataLen() );
220 wxConfigBase::RenameEntry( oldName, newName )
225 wxConfigBase::RenameGroup( oldName, newName )
233 wxConfigBase::Set( config );
236 wxConfigBase::SetExpandEnvVars( doIt = true )
240 wxConfigBase::SetPath( path )
244 wxConfigBase::SetRecordDefaults( doIt = true )
248 wxConfigBase::Write( key, value )
252 THIS->Write( key, value );
255 wxConfigBase::WriteInt( key, value )
259 THIS->Write( key, value );
262 wxConfigBase::WriteFloat( key, value )
266 THIS->Write( key, value );
269 wxConfigBase::WriteBool( key, value )
273 THIS->Write( key, value );
275 #if WXPERL_W_VERSION_GE( 2, 9, 0 ) && wxUSE_BASE64
278 wxConfigBase::WriteBinary( key, value )
283 char* buffer = SvPV( value, len );
284 wxMemoryBuffer data( len );
285 data.SetDataLen( len );
286 memcpy( data.GetData(), buffer, len );
287 THIS->Write( key, data );
291 MODULE=Wx PACKAGE=Wx::RegConfig
293 #if defined(__WXMSW__)
295 #include <wx/msw/regconf.h>
298 wxRegConfig::new( appName = wxEmptyString, vendorName = wxEmptyString, localFilename = wxEmptyString, globalFilename = wxEmptyString, style = 0 )
301 wxString localFilename
302 wxString globalFilename
307 MODULE=Wx PACKAGE=Wx::FileConfig
309 #include <wx/fileconf.h>
312 wxFileConfig::new( appName = wxEmptyString, vendorName = wxEmptyString, localFilename = wxEmptyString, globalFilename = wxEmptyString, style = 0 )
315 wxString localFilename
316 wxString globalFilename
320 wxFileConfig::SetUmask( mode )