mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Add stubs for winsound module (#3535)
This commit is contained in:
committed by
Sebastian Rittau
parent
772f7a48e6
commit
4ed19cdaf5
32
stdlib/2and3/winsound.pyi
Normal file
32
stdlib/2and3/winsound.pyi
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
import sys
|
||||
from typing import Optional, Union, overload
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import Literal
|
||||
else:
|
||||
from typing_extensions import Literal
|
||||
|
||||
if sys.platform == "win32":
|
||||
SND_FILENAME: int
|
||||
SND_ALIAS: int
|
||||
SND_LOOP: int
|
||||
SND_MEMORY: int
|
||||
SND_PURGE: int
|
||||
SND_ASYNC: int
|
||||
SND_NODEFAULT: int
|
||||
SND_NOSTOP: int
|
||||
SND_NOWAIT: int
|
||||
|
||||
MB_ICONASTERISK: int
|
||||
MB_ICONEXCLAMATION: int
|
||||
MB_ICONHAND: int
|
||||
MB_ICONQUESTION: int
|
||||
MB_OK: int
|
||||
|
||||
def Beep(frequency: int, duration: int) -> None: ...
|
||||
# Can actually accept anything ORed with 4, and if not it's definitely str, but that's inexpressible
|
||||
@overload
|
||||
def PlaySound(sound: Optional[bytes], flags: Literal[4]) -> None: ...
|
||||
@overload
|
||||
def PlaySound(sound: Optional[Union[str, bytes]], flags: int) -> None: ...
|
||||
def MessageBeep(type: int = ...) -> None: ...
|
||||
Reference in New Issue
Block a user