int main( int argc, char **argv ) { int i; SetSystemLog( SYSLOG_FILE, stdout ); g.pdi = GetDisplayInterface(); g.pii = GetImageInterface(); g.x = 10; g.y = 10; for( i = 1; i < argc; i++ ) { AddImage( argv[i] ); } while( !g.flags.exit ) Relinquish(); // hmm what do we have to do here? { PIMAGE_DISPLAY pdi; pdi = g.images; while( pdi ) { CloseDisplay( pdi->display ); UnmakeImageFile( pdi->Loaded ); pdi = pdi->next; } } return 0; }
SaneWinMain( argc, argv ) { int port = SackOpenComm( argv[1], 0, 0 ); SetSystemLog( SYSLOG_FILE, stdout ); SackSetReadCallback( port, callback, 0 ); while( 1 ) WakeableSleep( 100000 ); return 0; }
int main( void ) { void *info = NULL; uint32_t free, used, chuncks, freechunks; SetSystemLog( SYSLOG_FILE, stdout ); printf( WIDE("Lets see... ini files...") ); while( ScanFiles( WIDE("."), WIDE("*.ini"), &info, ParseINI, 0, 0 ) ); GetMemStats( &free, &used, &chuncks, &freechunks ); printf( WIDE("Memory result : free:%ld used:%ld chuncks:%ld freechunks:%ld\n") , free, used, chuncks, freechunks ); DumpRegisteredNames(); SaveTree(); LoadTree(); DumpRegisteredNames(); return 0; }
int main( void ) { int32_t x, y; uint32_t w, h; PRENDERER renderer; l.pii = GetImageInterface(); l.pri = GetDisplayInterface(); SetSystemLog( SYSLOG_FILE, stdout ); GetDisplaySizeEx( 0, &x, &y, &w, &h ); renderer = OpenDisplaySizedAt( 0, w, h, x, y ); SetTouchHandler( renderer, touch_events, 0 ); UpdateDisplay( renderer ); while( 1 ) { WakeableSleep( 1000 ); } #if 0 HOOKPROC hkprcSysMsg; static HINSTANCE hinstDLL; static HHOOK hhookSysMsg; hinstDLL = LoadLibrary(TEXT("c:\\myapp\\sysmsg.dll")); hkprcSysMsg = (HOOKPROC)GetProcAddress(hinstDLL, "SysMessageProc"); hhookSysMsg = SetWindowsHookEx( WH_SYSMSGFILTER, hkprcSysMsg, hinstDLL, 0); SetWindowsHookEx( #endif return 0; }