Package processing.core
Class ThinkDifferent
java.lang.Object
processing.core.ThinkDifferent
Deal with issues related to macOS application behavior.
We have to register a quit handler to safely shut down the sketch,
otherwise OS X will just kill the sketch when a user hits Cmd-Q.
In addition, we have a method to set the dock icon image,
so we look more like a native application.
This is a stripped-down version of what's in processing.app.platform to fix
3301.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
cleanup()
Remove the quit handler.static void
static void
Initialize the sketch with the quit handler.static void
setIconImage
(Image image) Called via reflection from PSurfaceAWT and others, set the dock icon image.static void
-
Constructor Details
-
ThinkDifferent
public ThinkDifferent()
-
-
Method Details
-
init
Initialize the sketch with the quit handler. Initialize the sketch with the quit handler such that, if there is no known crash, the application will not exit on its own if this is the first quit attempt.- Parameters:
sketch
- The sketch whose quit handler callback should be set.
-
cleanup
public static void cleanup()Remove the quit handler. -
setIconImage
Called via reflection from PSurfaceAWT and others, set the dock icon image.- Parameters:
image
- The image to provide for Processing icon.
-
hideMenuBar
public static void hideMenuBar() -
showMenuBar
public static void showMenuBar() -
activateIgnoringOtherApps
public static void activateIgnoringOtherApps()
-