-
-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2056 from zoldalma999/controller-c
Port the controller module to C.
- Loading branch information
Showing
14 changed files
with
653 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from typing import final | ||
from pygame.joystick import JoystickType | ||
|
||
def init() -> None: ... | ||
def get_init() -> bool: ... | ||
def quit() -> None: ... | ||
def is_controller(device_index: int) -> bool: ... | ||
def get_count() -> int: ... | ||
@final | ||
class Controller: | ||
def __new__(cls, device_index: int) -> Controller: ... | ||
def __init__(self, device_index: int) -> None: ... | ||
@classmethod | ||
def from_joystick(cls, joystick: JoystickType) -> Controller: ... | ||
def get_init(self) -> bool: ... | ||
def init(self) -> None: ... | ||
def quit(self) -> None: ... | ||
@property | ||
def id(self) -> int: ... | ||
@property | ||
def name(self) -> str: ... | ||
def attached(self) -> bool: ... | ||
def as_joystick(self) -> JoystickType: ... | ||
def get_axis(self, axis: int) -> int: ... | ||
def get_button(self, button: int) -> bool: ... | ||
def get_mapping(self) -> dict: ... | ||
def set_mapping(self, mapping: dict) -> int: ... | ||
def rumble(self, ___) -> bool: ... | ||
def stop_rumble( | ||
self, low_frequency: float, high_frequency: float, duration: int | ||
) -> bool: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.