src: transform all old writable in annotations
[nit.git] / lib / mnit / mnit_app.nit
index bc91c38..9987b8c 100644 (file)
@@ -25,16 +25,15 @@ import mnit_display
 # This class is redefed by plateforme modules and so
 # App can be specialized directly in the user app.
 redef class App
-       type IE: InputEvent
        type D: Display
        type I: Image
 
        # Display to use by apps
        # Is null if the display is not available or not yet ready
-       var display: nullable D protected writable = null
+       var display: nullable D = null is protected writable
 
        # Received quit order
-       var quit: Bool writable = false
+       var quit: Bool = false is writable
 
        # App is visible? (vs minimized or in background)
        fun visible: Bool is abstract
@@ -53,7 +52,7 @@ redef class App
 
        # Main frame method to redef
        # Is called between readying display and flipping it
-       fun frame_core( display: D ) is abstract
+       fun frame_core( display: D ) do end
 
        # Receive and deal with all inputs
        fun input( event: InputEvent ): Bool
@@ -62,7 +61,12 @@ redef class App
        end
 
        # Internal method to generate inputs
-       protected fun generate_input is abstract
+       protected fun generate_input
+       do
+               if "NIT_TESTING".environ == "true" then exit 0
+               print "Compiled without platform"
+               exit 1
+       end
 
        # Main app loop
        # Usually you want to redef frame_core instead of this