processing.core

## Interface PSurface

- All Known Implementing Classes:
    PSurfaceAWT, PSurfaceDanger, PSurfaceFX, PSurfaceJOGL, PSurfaceNone

      public interface PSurface

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `MIN_WINDOW_HEIGHT`
    `static int` | `MIN_WINDOW_WIDTH` Minimum dimensions for the window holding an applet.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `hideCursor()`
    `void` | `initFrame(PApplet sketch)`
    `void` | `initOffscreen(PApplet sketch)`
    `boolean` | `isStopped()`
    `void` | `pauseThread()` On the next trip through the animation thread, things should go sleepy-bye.
    `void` | `placePresent(int stopColor)`
    `void` | `placeWindow(int[] location, int[] editorLocation)`
    `void` | `resumeThread()`
    `void` | `setCursor(int kind)`
    `void` | `setCursor(PImage image, int hotspotX, int hotspotY)`
    `void` | `setFrameRate(float fps)`
    `void` | `setResizable(boolean resizable)` Set true if we want to resize things (default is not resizable)
    `void` | `setSize(int width, int height)`
    `void` | `setSmooth(int level)` Sometimes smoothing must be set at the drawing surface level not just inside the renderer itself.
    `void` | `setTitle(String title)` Set the window (and dock, or whatever necessary) title.
    `void` | `setupExternalMessages()`
    `void` | `setVisible(boolean visible)` Show or hide the window.
    `void` | `showCursor()`
    `void` | `startThread()` Start the animation thread
    `boolean` | `stopThread()` Stop the animation thread (set it null)

- - ### Field Detail

    - #### MIN_WINDOW_WIDTH

          static final int MIN_WINDOW_WIDTH

      Minimum dimensions for the window holding an applet. This varies between platforms, Mac OS X 10.3 (confirmed with 10.7 and Java 6) can do any height but requires at least 128 pixels width. Windows XP has another set of limitations. And for all I know, Linux probably allows window sizes to be negative numbers.
      See Also:
        Constant Field Values

    - #### MIN_WINDOW_HEIGHT

          static final int MIN_WINDOW_HEIGHT

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### initOffscreen

          void initOffscreen(PApplet sketch)

    - #### initFrame

          void initFrame(PApplet sketch)

    - #### setTitle

          void setTitle(String title)

      Set the window (and dock, or whatever necessary) title.

    - #### setVisible

          void setVisible(boolean visible)

      Show or hide the window.

    - #### setResizable

          void setResizable(boolean resizable)

      Set true if we want to resize things (default is not resizable)

    - #### placeWindow

          void placeWindow(int[] location,
                           int[] editorLocation)

    - #### placePresent

          void placePresent(int stopColor)

    - #### setupExternalMessages

          void setupExternalMessages()

    - #### setSize

          void setSize(int width,
                       int height)

    - #### setSmooth

          void setSmooth(int level)

      Sometimes smoothing must be set at the drawing surface level not just inside the renderer itself.

    - #### setFrameRate

          void setFrameRate(float fps)

    - #### setCursor

          void setCursor(int kind)

    - #### setCursor

          void setCursor(PImage image,
                         int hotspotX,
                         int hotspotY)

    - #### showCursor

          void showCursor()

    - #### hideCursor

          void hideCursor()

    - #### startThread

          void startThread()

      Start the animation thread

    - #### pauseThread

          void pauseThread()

      On the next trip through the animation thread, things should go sleepy-bye. Does not pause the thread immediately because that needs to happen on the animation thread itself, so fires on the next trip through draw().

    - #### resumeThread

          void resumeThread()

    - #### stopThread

          boolean stopThread()

      Stop the animation thread (set it null)
      Returns:
        false if already stopped

    - #### isStopped

          boolean isStopped()