gh-131453: Add additional constants to winsound module (GH-131454)

This commit is contained in:
AN Long 2025-03-21 01:35:52 +09:00 committed by GitHub
parent a2ea417578
commit 00a9844888
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 81 additions and 1 deletions

View file

@ -56,7 +56,10 @@ PyDoc_STRVAR(sound_module_doc,
"SND_NODEFAULT - Do not play a default beep if the sound can not be found\n"
"SND_NOSTOP - Do not interrupt any sounds currently playing\n" // Raising RuntimeError if needed
"SND_NOWAIT - Return immediately if the sound driver is busy\n" // Without any errors
"SND_APPLICATION - sound is an application-specific alias in the registry."
"SND_APPLICATION - sound is an application-specific alias in the registry.\n"
"SND_SENTRY - Triggers a SoundSentry event when the sound is played.\n"
"SND_SYNC - Play the sound synchronously, default behavior.\n"
"SND_SYSTEM - Assign sound to the audio session for system notification sounds.\n"
"\n"
"Beep(frequency, duration) - Make a beep through the PC speaker.\n"
"MessageBeep(type) - Call Windows MessageBeep.");
@ -232,12 +235,19 @@ exec_module(PyObject *module)
ADD_DEFINE(SND_PURGE);
ADD_DEFINE(SND_LOOP);
ADD_DEFINE(SND_APPLICATION);
ADD_DEFINE(SND_SENTRY);
ADD_DEFINE(SND_SYNC);
ADD_DEFINE(SND_SYSTEM);
ADD_DEFINE(MB_OK);
ADD_DEFINE(MB_ICONASTERISK);
ADD_DEFINE(MB_ICONEXCLAMATION);
ADD_DEFINE(MB_ICONHAND);
ADD_DEFINE(MB_ICONQUESTION);
ADD_DEFINE(MB_ICONERROR);
ADD_DEFINE(MB_ICONINFORMATION);
ADD_DEFINE(MB_ICONSTOP);
ADD_DEFINE(MB_ICONWARNING);
#undef ADD_DEFINE