Main entry point of your application

Property definitions

app $ App :: run
	# Main entry point of your application
	fun run do end
lib/app/app_base.nit:38,2--39,15

linux :: linux $ App :: run
	redef fun run
	do
		super

		on_pause
		on_save_state
		on_stop
	end
lib/linux/linux.nit:39,2--46,4

gamnit :: gamnit $ App :: run
	redef fun run
	do
		# TODO manage exit condition
		loop frame_full
	end
lib/gamnit/gamnit.nit:90,2--94,4

gamnit :: gamnit_ios $ App :: run
	# Disable the game loop to rely on the GLKView callbacks on each frame instead
	redef fun run do end
lib/gamnit/gamnit_ios.nit:31,2--32,21

linux :: ui $ App :: run
	# On GNU/Linux, we go through all the callbacks once,
	# there is no complex life-cycle.
	redef fun run
	do
		app.on_create
		app.on_restore_state
		app.on_resume

		gtk_main

		app.on_pause
		app.on_stop
		app.on_save_state
	end
lib/linux/ui.nit:61,2--74,4

gamnit :: gamnit_android $ App :: run
	redef fun run
	do
		if debug_gamnit then print "run: start"
		scene_created = false

		while not destroyed do
			if not active then
				if debug_gamnit then print "run: wait"
				app.poll_looper_pause -1

			else
				if debug_gamnit then print "run: frame"

				var native_window = app.native_app_glue.window
				assert not native_window.address_is_null

				var display = display
				assert display != null

				var needs_recreate = display.check_egl_context(native_window)
				if needs_recreate then
					if display.native_window_is_invalid then
						# This should be rare and may cause more issues, log it
						print "The native window is invalid, skip frame"
						set_inactive
						continue
					end

					# The context was lost, reload everything
					create_gamnit
					recreate_gamnit
				end

				assert scene_created
				frame_full
			end
		end

		if debug_gamnit then print "run: exit"
		exit 0
	end
lib/gamnit/gamnit_android.nit:235,2--275,4

android :: sensors $ App :: run
	redef fun run
	do
		enable_sensors

		super
	end
lib/android/sensors.nit:327,2--332,4