"; } if( $text == "" ){ $error .= "Please fill something in the textbox.
"; } if( $email == "" ){ $error .= "Please fill in your email address.
"; } if( strtoupper( $_POST["captcha"] ) != $_SESSION["ANTI_SPAM"] ){ $error .= "You seem to be a spammer. Sorry if that's wrong. Please re-enter the captcha code!
"; } $name = str_replace( ",", ",-", $name ); $url = str_replace( ",", ",-", $url ); $text = str_replace( ",", ",-", $text ); $email = str_replace( ",", ",-", $email ); if( $error == "" ){ mail( "hansiraber@yahoo.de", "fsp5/new comment", "$name\n$email\n$url\n$text\n" ); $file = fopen( "comments.txt", "a" ); fwrite( $file, str_replace( "\n", "
", str_replace( "\r", "", time() . ",,$name,,$url,,$text,,$email" ) ) . "\n" ); fclose( $file ); $code = ""; for( $i = 0; $i < 4; $i++ ){ $code .= chr( rand( 65, 90 ) ); } $_SESSION["ANTI_SPAM"] = $code; // clear the post array $_POST = array(); $error = "Your comment was added!"; } else{ // hm... error will be displayed below //mail( "hansiraber@yahoo.de", "fsp5/comment-error", "$name\n$url\n$text\n" ); } } ?> FullScreen API for Processing
OMG... this project is semi-dead!!!
I maintained this project for quite a while and it should still be usable for up to processing 1.5.x.

The future however is uncertain, read more about this in the processing forums: https://forum.processing.org/topic/fullscreen-library-development-suspended

-->

FullScreen API For Processing v 0.98.4 (changes)

Download!

Hey there! I am a library for Processing for better fullscreen support. Download me now!  → all versions
p.s. i do crash sometimes. if you think you can help just send me a message in the processing discourse section.


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. It's MIT licensed, 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
    ); 
  }
}


Feedback

Does the fullscreen api sometimes make your sketch crash? Do you wish it'd be easier to use? Any other annoying things you noticed? Suggestions? Or are you just happy? Leave a message!

$url"; echo "
$date $name $text
"; } } echo " "; comments( "comments.txt" ); ?>



$img = imagecreate( 100, 35 ); $white = imagecolorallocate( $img, 255, 255, 255 ); $black = imagecolorallocate( $img, 0, 0, 0 ); imagefill( $img, $white, 0, 0 ); imagettftext( $img, 22, 0, 15, 35, $black, realpath( "f_bm_neco.ttf" ), $_SESSION["ANTI_SPAM"] ); ob_start(); imagepng( $img ); $content = ob_get_contents(); ob_end_clean(); echo ""; ?>




Warnings & Limitations

  • Only works for applications (not for applets)
  • This size of the sketch can not be scaled to screen size in fullscreen mode
  • Fonts are sometimes corrupted, use this as a workaround.
  • A list of bugs can be found here.

  • The ESC key exists the application, not fullscreen mode
  • It seems not every implementation of Java on Linux gives you proper fullscreen support, you might not be able to switch resolution
  • This package conflicts with processings "present" option

Thanks!

Thanks to github.com for providing a source repository and a big thanks to everybody who sent problems and suggestions to me!

Developers welcome!

If you're interrested in helping develop this api further or you wanna help testing new experimental versions please visit the github project page at http://github.com/kritzikratzi/fullscreen-p5/. You'll also find git access and a wiki there.

My Amazon.com Wish List hansi raber, www.superduper.org Last updated: Mar 31, 2014