Interface EngineWindowEventReceiver


public interface EngineWindowEventReceiver
This class is designed to be the class that implementors of EngineWindowBroadcaster use to fire window events to the engine.

This is because there might be different implementations of windowing toolkits, and the engine would still need to have a consistent way to hear window events.

Basically, if a EngineElement is supposed to spawn the main window of the application, it should fire all of its main window events through this object so that it is broadcast to all listening components.

Author:
Matthew Tropiano
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Should be called when the window loses focus in the desktop for whatever reason.
    void
    Should be called when the window receives a signal to be closed (by OS - usually is a shortcut like Alt-F4 in Windows or clicking the close button in the corner of the window in most window systems).
    void
    Should be called when the window receives focus in the desktop.
    void
    Should be called when the window is minimizing (sometimes called "shrinking" or "iconifying").
    void
    Should be called when the mouse enters the main canvas of the window.
    void
    Should be called when the mouse leaves the main canvas of the window.
    void
    fireMouseMove(int canvasX, int canvasY)
    Should be called when the mouse moves on the main canvas.
    void
    fireMove(int positionX, int positionY)
    Should be called when the canvas is moved.
    void
    fireResize(int width, int height)
    Should be called when the canvas is resized.
    void
    Should be called when the window is restored from minimization.
  • Method Details

    • fireClosing

      void fireClosing()
      Should be called when the window receives a signal to be closed (by OS - usually is a shortcut like Alt-F4 in Windows or clicking the close button in the corner of the window in most window systems).
    • fireMinimize

      void fireMinimize()
      Should be called when the window is minimizing (sometimes called "shrinking" or "iconifying").
    • fireRestore

      void fireRestore()
      Should be called when the window is restored from minimization.
    • fireFocus

      void fireFocus()
      Should be called when the window receives focus in the desktop.
    • fireBlur

      void fireBlur()
      Should be called when the window loses focus in the desktop for whatever reason.
    • fireMouseEnter

      void fireMouseEnter()
      Should be called when the mouse enters the main canvas of the window.
    • fireMouseExit

      void fireMouseExit()
      Should be called when the mouse leaves the main canvas of the window.
    • fireMouseMove

      void fireMouseMove(int canvasX, int canvasY)
      Should be called when the mouse moves on the main canvas.
      Parameters:
      canvasX - the new canvas-local x-coordinate.
      canvasY - the new canvas-local y-coordinate.
    • fireResize

      void fireResize(int width, int height)
      Should be called when the canvas is resized.
      Parameters:
      width - the new canvas width.
      height - the new canvas height.
    • fireMove

      void fireMove(int positionX, int positionY)
      Should be called when the canvas is moved.
      Parameters:
      positionX - the new canvas ABSOLUTE POSITION X on the screen.
      positionY - the new canvas ABSOLUTE POSITION Y on the screen.