1. pygame
  2. pygame
  3. pygame


pygame / docs / pygame_joystick.html

ahvezda 99d32cc 

<body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>

<table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
<tr height=86 align=left><td valign=top><font color=#ffffff size=+5>
	<a href=../>
      <img src=mainlogo.gif width=300 height=100 alt="PyGame Logo" border=0></a></td>
<td valign=middle><tt><font color=#dddddd><br>
</td></tr></table></td><td width=100% height=100% align=center valign=middle>

	<a href=../>Home</a> &nbsp;||&nbsp;
	<a href=index.html>Help Contents</a> &nbsp;||

|| <a href=CD.html>CD</a> || 
<a href=Channel.html>Channel</a> || 
<a href=Font.html>Font</a> || 
<a href=Joystick.html>Joystick</a> || 
<a href=Rect.html>Rect</a> ||<br>
|| <a href=Sound.html>Sound</a> || 
<a href=Surface.html>Surface</a> || 
<a href=pygame.html>pygame</a> || 
<a href=pygame_cdrom.html>cdrom</a> || 
<a href=pygame_display.html>display</a> ||<br>
|| <a href=pygame_event.html>event</a> || 
<a href=pygame_font.html>font</a> || 
<a href=pygame_image.html>image</a> || 
<a href=pygame_joystick.html>joystick</a> || 
<a href=pygame_key.html>key</a> ||<br>
|| <a href=pygame_mixer.html>mixer</a> || 
<a href=pygame_mouse.html>mouse</a> || 
<a href=pygame_music.html>music</a> || 
<a href=pygame_surfarray.html>surfarray</a> || 
<a href=pygame_time.html>time</a> ||<br>

<h2 align=center>pygame.joystick</h2>
Thin wrapper around the SDL joystick interface.
Likely to be changed.


<tr><td><a href=#get_count>get_count</a></td><td> -
number of joysticks in system</td></tr>

<tr><td><a href=#get_init>get_init</a></td><td> -
query initialization of joystick module</td></tr>

<tr><td><a href=#get_name>get_name</a></td><td> -
system name for joystick</td></tr>

<tr><td><a href=#init>init</a></td><td> -
initialize cdrom module</td></tr>

<tr><td><a href=#is_opened>is_opened</a></td><td> -
query opened joystick</td></tr>

<tr><td><a href=#open>open</a></td><td> -
return new joystick object</td></tr>

<tr><td><a href=#quit>quit</a></td><td> -
uninitialize cdrom module</td></tr>



<a name=get_count><font size=+2><b>get_count
</b></font><br><font size=+1><tt>
pygame.joystick.get_count() -> int
Returns the number of joysticks available on the
system. Will be 0 if there are no joysticks.

<a name=get_init><font size=+2><b>get_init
</b></font><br><font size=+1><tt>
pygame.joystick.get_init() -> bool
Returns true when the joystick module is

<a name=get_name><font size=+2><b>get_name
</b></font><br><font size=+1><tt>
pygame.joystick.get_name(id) -> string
Returns a readable name for the joystick device,
given by the system.

<a name=init><font size=+2><b>init
</b></font><br><font size=+1><tt>
pygame.joystick.init() -> None
Initialize the joystick module manually

<a name=is_opened><font size=+2><b>is_opened
</b></font><br><font size=+1><tt>
pygame.joystick.is_opened(id) -> bool
Returns true if the given joystick id has been
previously opened.

<a name=open><font size=+2><b>open
</b></font><br><font size=+1><tt>
pygame.joystick.open(id) -> Joystick
Creates a new joystick object for the given
joystick id. Once a joystick has been opened, it
will start receiving joystick events on the event

<a name=quit><font size=+2><b>quit
</b></font><br><font size=+1><tt>
pygame.joystick.quit() -> None
Uninitialize the joystick module manually