Files
typeshed/stdlib/winsound.pyi
Alex Waygood 33a62ae42d Add more defaults to the stdlib (#9606)
Continuing work towards #8988.

The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are:

- Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine)
- Defaults in non-py311 branches
- Defaults for float parameters
- Defaults for overloads
2023-01-29 01:51:23 +00:00

29 lines
951 B
Python

import sys
from _typeshed import ReadableBuffer
from typing import overload
from typing_extensions import Literal
if sys.platform == "win32":
SND_FILENAME: Literal[131072]
SND_ALIAS: Literal[65536]
SND_LOOP: Literal[8]
SND_MEMORY: Literal[4]
SND_PURGE: Literal[64]
SND_ASYNC: Literal[1]
SND_NODEFAULT: Literal[2]
SND_NOSTOP: Literal[16]
SND_NOWAIT: Literal[8192]
MB_ICONASTERISK: Literal[64]
MB_ICONEXCLAMATION: Literal[48]
MB_ICONHAND: Literal[16]
MB_ICONQUESTION: Literal[32]
MB_OK: Literal[0]
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: ReadableBuffer | None, flags: Literal[4]) -> None: ...
@overload
def PlaySound(sound: str | ReadableBuffer | None, flags: int) -> None: ...
def MessageBeep(type: int = 0) -> None: ...