FullScreen API For Processing
v 0.97 (changes)
Javadocs
Online
javadoc reference here.
Short Reference
fs = new FullScreen(this)
Creates a new fullscreen object.
fs = new SoftFullScreen(this)
Will create a big window without frames that overlays the screen.
This will allow you create a sketch that is dual screen.
However, be aware that you'll have to disable screensaver, app notifications and active corners yourself!
Also you won't be able to change the resolution.
fs.enter() / fs.leave()
Enters / leaves fullscreen mode.
fs.setResolution(x, y)
Changes the resolution if you are in fullscreen mode.
If not it memorizes the resolution and sets it the next time
you enter fullscreen mode.
By default it will try to use the sketch size as resolution.
fs.setShortcutsEnabled(true/false)
Enables/disables keyboard shortcuts.
To enter/leave fullscreen mode
Windows: Alt+Enter, Ctrl+F
Linux: Ctrl+F
OS X: ⌘+F
ESC: leave fullscreen / exit application
Shortcuts are enabled by default!
Install
Download the file
fullscreen.zip and
extract it to <processing-sketches>/libraries/.
You can also download
fullscreen-src.zip
if you wanna take a look at the sourcecode. Remember: It's GPL, if you
make usefull changes let the world know about it!
Example Usage
import fullscreen.*;
FullScreen fs;
void setup(){
// set size to 640x480
size(640, 480);
// 5 fps
frameRate(5);
// Create the fullscreen object
fs = new FullScreen(this);
// enter fullscreen mode
fs.enter();
}
void draw(){
background(0);
// Do your fancy drawing here...
for(int i = 0; i < 10; i++){
fill(
random(255),
random(255),
random(255)
);
rect(
i*10, i*10,
width - i*20, height - i*20
);
}
}