Anonymous avatar Anonymous committed 621064b

Added missing sources

Comments (0)

Files changed (2)

symbian/common/builtins.c

+#include <Python.h>
+
+extern void initbase(void);
+extern void initconstants(void);
+extern void initrect(void);
+extern void initrwobject(void);
+extern void init_numericsndarray (void);
+extern void init_numericsurfarray (void);
+extern void initbufferproxy (void);
+extern void initcolor (void);
+extern void initconstants (void);
+extern void initdisplay (void);
+extern void initdraw(void);
+extern void initevent (void);
+extern void initfastevent (void);
+extern void initfont (void);
+extern void initimage (void);
+extern void initimageext (void);
+extern void initkey (void);
+extern void initmixer (void);
+extern void initmovie (void);
+extern void initmovieext(void);
+extern void initmixer_music (void);
+extern void initoverlay (void);
+extern void initpixelarray (void);
+extern void initsurface(void);
+extern void initsurflock (void);
+extern void initpygame_time (void);
+extern void inittransform (void);
+
+struct _inittab _PyGame_Inittab[] = {
+    {"pygame_base", initbase},
+    {"pygame_constants", initconstants}, 
+    {"pygame_rect", initrect},
+    {"pygame_rwobject", initrwobject},
+    {"pygame_bufferproxy", initbufferproxy},
+    {"pygame_color", initcolor},
+    {"pygame_constants", initconstants},
+    {"pygame_display", initdisplay},
+    {"pygame_draw", initdraw},
+    {"pygame_event", initevent},
+    {"pygame_fastevent", initfastevent},
+    {"pygame_font", initfont},
+    {"pygame_image", initimage},
+    {"pygame_imageext", initimageext},
+    {"pygame_key", initkey},
+    {"pygame_mixer", initmixer},
+//    {"movie", initmovie},
+//    {"movieext", initmovieext},
+    {"pygame_mixer_music", initmixer_music},
+    {"pygame_overlay", initoverlay},
+    {"pygame_pixelarray", initpixelarray},
+    {"pygame_surface", initsurface},
+    {"pygame_surflock", initsurflock},
+    {"pygame_time", initpygame_time},
+    {"pygame_transform", inittransform},    
+    {0, 0}
+};
+
+    

symbian/common/logmanutils.h

+#ifndef LOGMANUTILS_H
+#define LOGMANUTILS_H
+
+#if defined( __LOGMAN_ENABLED__ )
+    #include <logman/LogMan.h>
+
+    #pragma message( RLogMan logging enabled )
+
+    #define __LOGMAN_TOSTR2(a) #a
+    #define __LOGMAN_TOSTR(x) __LOGMAN_TOSTR2(x)
+
+    // Message prefix can be overridden. Default prefix contains the source file and linenumber.
+    #ifndef __LOGMAN_MSG_PREFIX__
+        // Before each message: '(filename):(linenumber) >'
+        #define __LOGMAN_MSG_PREFIX__ __FILE__ ":" __LOGMAN_TOSTR(__LINE__) "> "
+    #endif
+
+    // These are for internal use only, to get parameters expanded correctly
+    #define __LOGMAN_GETMSG( msg ) _L( msg )
+    #define __LOGMAN_GETMSG8( msg ) _L8( msg )
+    #define __LOGMAN_GETMSG16( msg ) _L16( msg )
+
+    // Get message, defined in different sizes if needed
+    // Be aware that TDes16 and TDes8 should not be combined when Formatting
+    #define LOGMAN_GETMSG(msg) __LOGMAN_GETMSG( __LOGMAN_MSG_PREFIX__ msg "\n" )
+    #define LOGMAN_GETMSG8(msg) __LOGMAN_GETMSG8( __LOGMAN_MSG_PREFIX__ msg "\n" )
+    #define LOGMAN_GETMSG16(msg) __LOGMAN_GETMSG16( __LOGMAN_MSG_PREFIX__ msg "\n" )
+
+    // just for backward compatibility
+    #define GETMSG(msg) LOGMAN_GETMSG8(msg)
+
+
+    // Use 'MACRO __LOGMAN_SEND_ASYNC__' in mmp to enable asynchronous sending
+    #ifdef __LOGMAN_SEND_ASYNC__
+
+        #undef __LOGMAN_SEND_ASYNC__
+        #pragma message( RLogMan asynchronous mode used by default )
+        #define __LOGMAN_SEND_ASYNC__ ETrue
+
+    #else
+
+        #pragma message( RLogMan synchronous mode used by default )
+        #define __LOGMAN_SEND_ASYNC__ EFalse
+
+    #endif
+
+    // =========================================================================================
+    // Using static RLogMan functions( a bit slower than using member instance )
+    // =========================================================================================
+    // Easy one line logging
+    #define LOGMAN_SENDLOG( x )  RLogMan::Log( LOGMAN_GETMSG8(x), __LOGMAN_SEND_ASYNC__ );
+    // Easy one line logging, specify async mode explicitly
+    #define LOGMAN_SENDLOG2( x, async )  RLogMan::Log( LOGMAN_GETMSG8(x), async );
+    // Easy one line logging with formatting
+    #define LOGMAN_SENDLOGF( x, args... )  RLogMan::Log( LOGMAN_GETMSG(x), __LOGMAN_SEND_ASYNC__, args );
+    #define LOGMAN_SENDLOGF8( x, args... )  RLogMan::Log( LOGMAN_GETMSG8(x), __LOGMAN_SEND_ASYNC__, args );
+    #define LOGMAN_SENDLOGF16( x, args... )  RLogMan::Log( LOGMAN_GETMSG16(x), __LOGMAN_SEND_ASYNC__, args );
+    // Easy one line logging with formatting, specify async mode explicitly
+    #define LOGMAN_SENDLOGF2( x, async, args... )  RLogMan::Log( LOGMAN_GETMSG(x), async, args );
+    #define LOGMAN_SENDLOGF28( x, async, args... )  RLogMan::Log( LOGMAN_GETMSG(x), async, args );
+    #define LOGMAN_SENDLOGF216( x, async, args... )  RLogMan::Log( LOGMAN_GETMSG(x), async, args );
+    // Log line of code before executing it.
+    #define LOGMAN_SENDLINE( line ) LOGMAN_SENDLOG( #line ); line
+    // Write descriptor directly
+    #define LOGMAN_SENDDESC( desc ) RLogMan::Log( desc );
+    // Easy one liner for logging information about thread's stack usage
+    #define LOGMAN_SEND_STACK_INFO() { RLogMan __logman;__logman.Connect();__logman.StackInfo(); __logman.Close(); }
+    // Easy one liner for logging information about thread's heap usage
+    #define LOGMAN_SEND_HEAP_INFO() { RLogMan __logman;__logman.Connect();__logman.HeapInfo(); __logman.Close(); }
+    // Easy one liner for logging information about thread's memory usage
+    #define LOGMAN_SEND_MEMORY_INFO() { RLogMan __logman;__logman.Connect();__logman.MemoryInfo(); __logman.Close(); }
+
+     // Easy one liner for leaves monitoring
+    #define LOGMAN_SENDLEAVEIFERROR( cmd ) { TInt _Cmd_Err = cmd ; if (_Cmd_Err != KErrNone) { LOGMAN_SENDLOGF("Leave: %d", _Cmd_Err); User::Leave(_Cmd_Err);}; }
+    #define LOGMAN_SENDTRAPD( err, cmd ) TRAPD(err, cmd) ; if ( err != KErrNone) { LOGMAN_SENDLOGF("TRAPD err: %d", err );} else {}
+
+    // Other helpul stuff
+    // Print descriptor in hex format
+    template <class TDescriptor>
+    void LOGMAN_SENDDESC_HEX(const TDescriptor &aDes)
+	{
+	RBuf content;
+	CleanupClosePushL(content);
+	content.Create(KMaxFormatBufferSize);
+	for (TInt i=0; i < aDes.Length(); ++i)
+		content.AppendFormat(_L("%x "), aDes[i]);
+	LOGMAN_SENDDESC(content);LOGMAN_SENDDESC(_L("\n"));
+	CleanupStack::PopAndDestroy(1);
+	};
+
+        
+    // =========================================================================================
+    // Using RLogMan as a member
+    // =========================================================================================
+    // Underscore in _iLogMan to avoid name conflicts.
+    #define LOGMAN_MEMBER_VARIABLE _iLogMan
+    // This goest to class's header
+    #define LOGMAN_MEMBER   RLogMan* LOGMAN_MEMBER_VARIABLE;
+    // This goes to class's ConstructL
+    #define LOGMAN_INIT     LOGMAN_MEMBER_VARIABLE = new (ELeave) RLogMan; LOGMAN_MEMBER_VARIABLE->Connect();
+
+    // Send log
+    #define LOGMAN_LOG( x )         LOGMAN_MEMBER_VARIABLE->Write( LOGMAN_GETMSG8(x), __LOGMAN_SEND_ASYNC__ );
+    #define LOGMAN_LOG2( x, async ) LOGMAN_MEMBER_VARIABLE->Write( LOGMAN_GETMSG8(x), async );
+
+    // Send log with formatting
+    #define LOGMAN_LOGF( x, args... )         LOGMAN_MEMBER_VARIABLE->Writef( LOGMAN_GETMSG(x) , __LOGMAN_SEND_ASYNC__, args );
+    #define LOGMAN_LOGF8( x, args... )         LOGMAN_MEMBER_VARIABLE->Writef( LOGMAN_GETMSG8(x) , __LOGMAN_SEND_ASYNC__, args );
+    #define LOGMAN_LOGF16( x, args... )         LOGMAN_MEMBER_VARIABLE->Writef( LOGMAN_GETMSG16(x) , __LOGMAN_SEND_ASYNC__, args );
+    #define LOGMAN_LOGF2( x, async, args... ) LOGMAN_MEMBER_VARIABLE->Writef( LOGMAN_GETMSG(x) , async, args );
+    #define LOGMAN_LOGF28( x, async, args... ) LOGMAN_MEMBER_VARIABLE->Writef( LOGMAN_GETMSG8(x) , async, args );
+    #define LOGMAN_LOGF216( x, async, args... ) LOGMAN_MEMBER_VARIABLE->Writef( LOGMAN_GETMSG16(x) , async, args );
+
+    #define LOGMAN_STACK_INFO()  LOGMAN_MEMBER_VARIABLE->StackInfo();
+    #define LOGMAN_HEAP_INFO()   LOGMAN_MEMBER_VARIABLE->HeapInfo();
+    #define LOGMAN_MEMORY_INFO() LOGMAN_MEMBER_VARIABLE->MemoryInfo();
+
+    
+    // Log line of code before executing it.
+    #define LOGMAN_LINE( line ) LOGMAN_LOG( #line ); line
+
+    // This goes to class's destructor
+    #define LOGMAN_CLOSE  if( LOGMAN_MEMBER_VARIABLE ) { LOGMAN_MEMBER_VARIABLE->Close(); delete LOGMAN_MEMBER_VARIABLE; }
+
+     // For leaves monitoring
+    #define LOGMAN_LEAVEIFERROR( cmd ) { TInt _Cmd_Err = cmd ; if (_Cmd_Err != KErrNone) { LOGMAN_LOGF("Leave: %d", _Cmd_Err); User::Leave(_Cmd_Err);}; }
+    #define LOGMAN_TRAPD( err, cmd ) TRAPD(err, cmd) ; if ( err != KErrNone) { LOGMAN_LOGF("TRAPD err: %d", err );} else {}
+
+
+#else // not __LOGMAN_ENABLED__
+    #pragma message( RLogMan logging disabled )
+    // Empty defines
+    #define LOGMAN_SENDLOG(  x, args... )
+    #define LOGMAN_SENDLOG2( x, async, args...)
+    #define LOGMAN_SENDLOGF( x, args... )
+    #define LOGMAN_SENDLOGF8( x, args... )
+    #define LOGMAN_SENDLOGF16( x, args... )
+    #define LOGMAN_SENDLOGF2( x, async, args... )
+    #define LOGMAN_SENDLOGF28( x, async, args... )
+    #define LOGMAN_SENDLOGF216( x, async, args... )
+    #define LOGMAN_SENDLINE( line ) line
+    #define LOGMAN_SENDDESC( desc )
+    #define LOGMAN_SEND_STACK_INFO()
+    #define LOGMAN_SEND_HEAP_INFO()
+    #define LOGMAN_SEND_MEMORY_INFO()
+
+    #define LOGMAN_SENDLEAVEIFERROR( cmd ) User::LeaveIfError( cmd )
+    #define LOGMAN_SENDTRAPD( err, cmd ) TRAPD(err, cmd)
+    #define LOGMAN_SENDDESC_HEX( desc )
+    
+    #define LOGMAN_MEMBER
+    #define LOGMAN_INIT
+    #define LOGMAN_LOG( x )
+    #define LOGMAN_LOG2( x, async )
+    #define LOGMAN_LOGF( x, args... )
+    #define LOGMAN_LOGF8( x, args... )
+    #define LOGMAN_LOGF16( x, args... )
+    #define LOGMAN_LOGF2( x, async, args... )
+    #define LOGMAN_LOGF28( x, async, args... )
+    #define LOGMAN_LOGF216( x, async, args... )
+    #define LOGMAN_STACK_INFO() 
+    #define LOGMAN_HEAP_INFO()  
+    #define LOGMAN_MEMORY_INFO()
+
+    #define LOGMAN_LEAVEIFERROR( cmd ) User::LeaveIfError( cmd )
+    #define LOGMAN_TRAPD( err, cmd ) TRAPD(err, cmd)
+    
+    #define LOGMAN_CLOSE
+    #define LOGMAN_LINE( line ) line
+
+
+#endif // __LOGMAN_ENABLED__
+
+#endif
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.