Haiku API Bindings
Beep
Not logged in

Documentation | SupportKit | Beep

SYNOPSIS

Perl

use HaikuR1::Beep qw(beep system_beep add_system_beep_event);

beep(); # emit a standard beep
system_beep("Startup"); # emit the Startup "beep"

Python

from HaikuR1.SupportKit import beep, system_beep, add_system_beep_event

beep() # emit a standard beep
system_beep("Startup") # emit the Startup "beep"

Python

Note that Beep does not actually exist as a submodule; instead, the constants are imported from SupportKit.

DESCRIPTION

Exposes the beep functions.

For more information on the functions, see the Be Book descriptions and the Haiku Book page.

FUNCTIONS

add_system_beep_event

Adds a new system beep event, configurable by the user from the Sounds preflet, or signals an error.

Perl

add_system_beep_event($eventName, $flags);

Python

add_system_beep_event(eventName, flags)

beep

Plays a basic system beep. Signals B_ERROR if it can't contact the Media Server, B_BAD_REPLY if it doesn't get the right reply from the Media Server, or no error if all went well. It does not wait for the Media Server to play the beep before returning.

Perl

beep();

Python

beep()

system_beep

Plays the system beep configured for the given event. Signals the same errors as beep(). (A "beep" can be any sound, depending on what the user has configured.)

Perl

system_beep($eventName);

Python

system_beep(eventName)