1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Copyright 2011-2014 Alexis Laferrière <alexis.laf@xymus.net>
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
18 new_annotation app_name
19 new_annotation app_namespace
20 new_annotation app_version
23 # App subclasses are cross-platform applications
25 # This class is redefed by plateform modules and so
26 # App can be specialized directly in the user app.
30 # Starts the internal setup of graphical and other stuff
31 # Is called just before run
34 # Main entry point of your application
37 # Main init method for graphical stuff
38 # Is called when display is ready so graphical assets
39 # can be loaded at this time.
40 fun window_created
do end
42 # Called before destroying the window
43 fun window_closing
do end
47 fun print_warning
(object
: Object)
49 sys
.stderr
.write object
.to_s
54 fun app
: App do return once
new App