Kamaelia docs : Kamaelia.UI.Pygame.Display.PygameDisplay

Kamaelia.UI.Pygame.Display.PygameDisplay

For examples and more explanations, see the module level docs.


class PygameDisplay(Axon.AdaptiveCommsComponent.AdaptiveCommsComponent)

PygameDisplay(...) -> new PygameDisplay component

Use PygameDisplay.getDisplayService(...) in preference as it returns an existing instance, or automatically creates a new one.

Or create your own and register it with setDisplayService(...)

Keyword arguments (all optional):

  • width -- pixels width (default=800)
  • height -- pixels height (default=600)
  • background_colour -- (r,g,b) background colour (default=(255,255,255))
  • fullscreen -- set to True to start up fullscreen, not windowed (default=False)

Inboxes

  • control : NOT USED
  • events : Receive events from source of pygame events
  • inbox : Default inbox, not currently used
  • notify : Receive requests for surfaces, overlays and events

Outboxes

  • outbox : NOT USED
  • signal : NOT USED

Methods defined here

__init__(self, **argd)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

handleDisplayRequest(self)

Check "notify" inbox for requests for surfaces, events and overlays and process them.

main(self)

Main loop.

surfacePosition(self, surface)

Returns a suggested position for a surface. No guarantees its any good!

updateDisplay(self, display)

Render all surfaces and overlays onto the specified display surface.

Also dispatches events to event handlers.

Feedback

Got a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!

Please leave you feedback here in reply to the documentation thread in the Kamaelia blog.

-- Automatic documentation generator, 19 Oct 2008 at 14:29:09 UTC/GMT

This is a page from the Kamaelia website. You can find the original here: