X-Git-Url: http://nitlanguage.org diff --git a/lib/app.nit b/lib/app.nit index 7f6c1b6..7ee9493 100644 --- a/lib/app.nit +++ b/lib/app.nit @@ -27,6 +27,10 @@ module app class App protected init do end + # Starts the internal setup of graphical and other stuff + # Is called just before run + fun setup do end + # Main entry point of your application fun run do end @@ -38,7 +42,16 @@ class App # Helper function for logging warnings fun log_warning(msg: String) do sys.stderr.write "{log_prefix} warn: {msg}\n" + + # Main init method for graphical stuff + # Is called when display is ready so graphical assets + # can be loaded at this time. + fun window_created do end + + # Called before destroying the window + fun window_closing do end end protected fun app: App do return once new App +app.setup app.run