https://github.com/processing/processing/blob/master/core/src/processing/core/PApplet.java