1 #############################################################################
3 ## Purpose: XS for Wx::Log and derived classes
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: Log.xs 2626 2009-10-18 22:48:17Z mbarbon $
8 ## Copyright: (c) 2000-2003, 2005-2007, 2009 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 #############################################################################
16 MODULE=Wx PACKAGE=Wx::Log
27 wxLog::AddTraceMask( mask );
32 wxLog::ClearTraceMasks();
35 RemoveTraceMask( mask )
38 wxLog::RemoveTraceMask( mask );
41 IsAllowedTraceMask( mask )
44 RETVAL = wxLog::IsAllowedTraceMask( mask );
51 RETVAL = wxLog::GetActiveTarget();
56 SetActiveTarget( target )
59 RETVAL = wxLog::SetActiveTarget( target );
66 wxLog::DontCreateOnDemand();
75 wxLog::HasPendingMessages()
78 wxLog::SetVerbose( verbose = true )
84 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
87 _SetTimestamp( format, buffer )
91 wxLog::SetTimestamp( format );
94 wxLog::GetTimestamp();
99 _SetTimestamp( format, buffer )
103 if( SvOK( ST(0) ) ) {
104 const wxString format_tmp = ( SvUTF8( format ) ) ?
105 ( wxString( SvPVutf8_nolen( format ), wxConvUTF8 ) )
106 : ( wxString( SvPV_nolen( format ), wxConvLibc ) );
107 const wxChar* fmt = (const wxChar*)format_tmp.c_str();
108 STRLEN size = wxStrlen( fmt ) * sizeof(wxChar) + sizeof(wxChar);
109 SvUPGRADE( buffer, SVt_PV );
110 wxLog::SetTimestamp( wxStrcpy( (wxChar*)SvGROW( buffer, size ),
113 wxLog::SetTimestamp( NULL );
117 wxLog::GetTimestamp()
125 wxLog::SetTraceMask( mask );
130 RETVAL = wxLog::GetTraceMask();
134 MODULE=Wx PACKAGE=Wx::PlLog
139 RETVAL = new wxPlLog( CLASS );
143 MODULE=Wx PACKAGE=Wx::LogTextCtrl
146 wxLogTextCtrl::new( ctrl )
149 MODULE=Wx PACKAGE=Wx::LogNull
157 wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
163 wxPli_thread_sv_unregister( aTHX_ "Wx::LogNull", THIS, ST(0) );
166 MODULE=Wx PACKAGE=Wx::LogGui
171 MODULE=Wx PACKAGE=Wx::LogWindow
174 wxLogWindow::new( parent, title, show = true, passtoold = true )
182 # this is a test for INTERFACE:
183 # in this specific case it saves around 256 bytes / function,
184 # more for more complex typemaps / longer parameter lists
188 #define XSINTERFACE__wxstring( _ret, _cv, _f ) \
189 ( ( void (*)( const wxString& ) ) _f)
191 #define XSINTERFACE__wxstring_SET( _cv, _f ) \
192 ( CvXSUBANY( _cv ).any_ptr = (void*) _f )
195 #define dXSFUNCTION( a ) \
196 void (*XSFUNCTION)( const wxString& )
199 interface__wxstring( string )
202 XSINTERFACE__wxstring
203 XSINTERFACE__wxstring_SET
205 wxLogError wxLogFatalError wxLogWarning
206 wxLogVerbose wxLogDebug
211 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
218 wxLogFatalError( string )
222 wxLogWarning( string )
226 wxLogMessage( string )
230 wxLogVerbose( string )
244 wxLogFatalError( string )
248 wxLogWarning( string )
252 wxLogMessage( string )
256 wxLogVerbose( string )
268 wxLogStatusFrame( frame, string )
272 wxLogStatus( frame, string );
275 wxLogStatus( string )
278 #if WXPERL_W_VERSION_LE( 2, 5, 0 )
287 wxLogTraceMask( mask, string )
291 wxLogTrace( mask, string );
294 wxLogSysError( string )
297 MODULE=Wx PACKAGE=Wx PREFIX=wx
303 wxSysErrorMsg( errCode = 0 )
304 unsigned long errCode
306 MODULE=Wx PACKAGE=Wx::LogChain
309 wxLogChain::new( logger )
313 wxLogChain::GetOldLog()
316 wxLogChain::IsPassingMessages()
319 wxLogChain::PassMessages( passMessages )
323 wxLogChain::SetLog( logger )
326 MODULE=Wx PACKAGE=Wx::LogPassThrough
329 wxLogPassThrough::new()
331 MODULE=Wx PACKAGE=Wx::PlLogPassThrough
334 wxPlLogPassThrough::new()
336 RETVAL = new wxPlLogPassThrough( CLASS );
340 MODULE=Wx PACKAGE=Wx::LogStderr
343 wxLogStderr::new( fp = NULL )