All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface org.ifarchive.glk.InterruptListener

public interface InterruptListener
The InterruptListener is called if the Glk library is asked to shut down.

Most platforms have some provision for interrupting a program -- command-period on the Macintosh, control-C in Unix, possibly a window manager menu item, or other possibilities. This can happen at any time, including while execution is nested inside one of your own functions, or inside a Glk library function.

If you need to clean up critical resources, you can specify an interrupt handler function.

In Java, do this by implementing the InterruptListener interface, and calling Glk.setInterruptHandler().

See Also:
setInterruptHandler

Method Index

 o interrupt()
This function is called when Glk receives an interrupt.

Methods

 o interrupt
 public abstract void interrupt()
This function is called when Glk receives an interrupt.

This handler will be called before the process is shut down.

You should not try to interact with the player in your interrupt handler. Do not call Glk.select() or Glk.selectPoll(). Anything you print to a window may not be visible to the player.


All Packages  Class Hierarchy  This Package  Previous  Next  Index