summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FL/fl_ask.H15
-rw-r--r--src/fl_ask.cxx24
2 files changed, 31 insertions, 8 deletions
diff --git a/FL/fl_ask.H b/FL/fl_ask.H
index 44980132f..a315fb1f2 100644
--- a/FL/fl_ask.H
+++ b/FL/fl_ask.H
@@ -1,7 +1,7 @@
//
// Standard dialog header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2021 by Bill Spitzak and others.
+// Copyright 1998-2022 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -15,8 +15,8 @@
//
/** \file fl_ask.H
- API for common dialogs.
- */
+ API for common dialogs.
+*/
#ifndef _FL_fl_ask_H_
#define _FL_fl_ask_H_
@@ -27,8 +27,13 @@
class Fl_Widget;
-/** Different system beeps available.
- \sa fl_beep(int) */
+/** Defines the different system beeps available.
+
+ Some systems may play different sounds or use different sound volume
+ depending on the Fl_Beep value. The implementation is platform dependent.
+
+ \sa fl_beep(int)
+*/
enum Fl_Beep {
FL_BEEP_DEFAULT = 0, ///< Default beep.
FL_BEEP_MESSAGE, ///< Message beep.
diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx
index 99cf6da90..3735eab88 100644
--- a/src/fl_ask.cxx
+++ b/src/fl_ask.cxx
@@ -1,7 +1,7 @@
//
// Standard dialog functions for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2021 by Bill Spitzak and others.
+// Copyright 1998-2022 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -69,9 +69,27 @@ const char *fl_close = "Close"; ///< string pointer used in common dialogs, yo
// fltk functions:
/**
- Emits a system beep message.
+ Emits a system beep.
- \param[in] type The beep type from the \ref Fl_Beep enumeration.
+ This function is platform specific. Depending on the input \p type a different
+ sound may be played or the system speaker may beep with a different volume.
+
+ On X the system speaker is used which may not work at all on newer systems
+ that don't have a speaker. Since 1.4.0 \c FL_BEEP_DEFAULT and other types
+ honor the system or user settings whereas \c FL_BEEP_ERROR uses 100% volume.
+ This may be changed in a future version.
+
+ On Wayland an ASCII \p BEL (0x07) is output to stderr.
+
+ On Windows the \c MessageBeep() function is used to play different sounds
+ depending on the \p type argument.
+
+ On macOS the system beep function \c NSBeep() is used for \c FL_BEEP_DEFAULT
+ and \c FL_BEEP_ERROR. Other types are ignored.
+
+ On other platforms the behavior is undefined and may change in the future.
+
+ \param[in] type The beep type from the \ref Fl_Beep enumeration (optional)
\code #include <FL/fl_ask.H> \endcode
*/