tests: adds sav file for pep8analysis_web
[nit.git] / lib / app.nit
index b896dad..7ee9493 100644 (file)
@@ -25,7 +25,11 @@ module app
 # This class is redefed by plateform modules and so
 # App can be specialized directly in the user app.
 class App
-       private init do end
+       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