pygame / doc / src / sdlextfastevent.xml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE module SYSTEM "api.dtd">

<module name="pygame2.sdlext.fastevent">
  <short>fast SDL event handling module</short>
  <desc>fast SDL event handling module</desc>

  <class name="Event">
    <constructor>Event (type, dict) -> Event</constructor>
      Creates a new event to be used in the event messaging system.

      This is exactly the same type as the
      :class:`pygame2.sdl.event.Event` class. Take a look at its
      documentation for more details.
    <attr name="name"><desc>Gets the name of the Event.</desc></attr>
    <attr name="type"><desc>Gets type id of the Event.</desc></attr>

  <func name="get">
    <call>get () -> [Event, Event, ...]</call>
      Gets events from the event queue.

      Gets the current events from the event queue. If no argument is
      passed, all currently available events are received from the event
      queue and returned as list. Otherwise, the argument can be a
      sequence or a bitmask combination of event types to receive from
      the queue.

      If no matching events are found on the queue, an empty list will be
  <func name="init">
    <call>init () -> None</call>
      Initializes the underlying fastevents system.
  <func name="poll">
    <call>poll () -> Event</call>
      Gets a single event from the event queue.

      Returns a single event from the queue. If the event queue is
      empty, None will be returned. If an event is available and
      returned, it will be removed from the queue.
  <func name="push">
    <call>push (event) -> None</call>
      Places a new event at the end of the event queue.

      This is usually used for placing user defined events on the event
      queue. You also can push user created device events on the queue,
      but this will not change the state of the device itself.
  <func name="quit">
    <call>quit () -> None</call>
      Quits the underlying fastevents system and releases all hold resources.
  <func name="wait">
    <call>wait () -> Event</call>
      Waits indefinitely for the next available event.

      This is a blocking method, that only returns, if an event occurs
      on the event queue. Once an event occurs, it will be returned to
      the caller and removed from the queue. While the program is
      waiting it will sleep in an idle state.