main - part-cw/lambdanative GitHub Wiki

(main p1 p2 p3 . px)

main defines the structure of programs, with initiation, main loop and termination functions, as well as optional suspension and resume functions for some mobile platforms.

Parameter Description
p1 Function to be run before main loop is initialized, e.g. GUI setup
p2 Main loop function, which is called constantly throughout the application's life
p3 Function to be run when the application is to be terminated
p4 Optional: Function, which is called when the application is suspended (e.g. to disable gui rendering)
p5 Optional: Function, which is called when the application is resumed (e.g. to re-establish gui rendering)

Example

For an example please see the bottom of either apps/DemoHelloWorld/main.scm or apps/uSquish/main.scm