campy.gui.events.window module

Interact with the graphics libraries via window events.

There are only two types of window events to which a caller can subscribe:

  • WindowClosed: The graphical window was closed.
  • WindowResized: The graphical window was resized.
class campy.gui.events.window.GWindowEvent(gwindow, x, y, width, height)[source]

Bases: object

height
width
window
x
y
campy.gui.events.window.onwindowclosed(function)[source]

If it returns a False-y value, the default action is taken. If it returns a Truth-y value, the default action is skipped.

Note that this is OPPOSITE how Javascript does things.

There can be only one window closed handler per window.

campy.gui.events.window.onwindowmoved(function)[source]
campy.gui.events.window.onwindowresized(function)[source]