summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl_cocoa.mm12
-rw-r--r--src/fl_ask.cxx14
2 files changed, 12 insertions, 14 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index fb15cf539..2ad315037 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -71,7 +71,6 @@ extern "C" {
#include <FL/Fl_Printer.H>
#include <FL/Fl_Input_.H>
#include <FL/Fl_Text_Display.H>
-#include <FL/fl_ask.H>
#include <stdio.h>
#include <stdlib.h>
#include "flstring.h"
@@ -3272,17 +3271,6 @@ Window fl_xid(const Fl_Window* w)
return Fl_X::i(w)->xid;
}
-void fl_beep(int type) {
- switch (type) {
- case FL_BEEP_DEFAULT :
- case FL_BEEP_ERROR :
- NSBeep();
- break;
- default :
- break;
- }
-}
-
#endif // __APPLE__
//
diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx
index 5eedc77ab..63dd98f28 100644
--- a/src/fl_ask.cxx
+++ b/src/fl_ask.cxx
@@ -56,6 +56,9 @@ static int ret_val;
static const char *iconlabel = "?";
Fl_Font fl_message_font_ = FL_HELVETICA;
Fl_Fontsize fl_message_size_ = 14;
+#ifdef __APPLE__
+extern "C" void NSBeep(void);
+#endif
static char avoidRecursion = 0;
@@ -252,7 +255,6 @@ const char* fl_cancel= "Cancel"; ///< string pointer used in common dialogs, you
const char* fl_close= "Close"; ///< string pointer used in common dialogs, you can change it to a foreign language
// fltk functions:
-#ifndef __APPLE__ // the Mac code is in file Fl_cocoa.mm
/**
Emits a system beep message.
\note \#include <FL/fl_ask.H>
@@ -277,6 +279,15 @@ void fl_beep(int type) {
MessageBeep(0xFFFFFFFF);
break;
}
+#elif defined(__APPLE__)
+ switch (type) {
+ case FL_BEEP_DEFAULT :
+ case FL_BEEP_ERROR :
+ NSBeep();
+ break;
+ default :
+ break;
+ }
#else
switch (type) {
case FL_BEEP_DEFAULT :
@@ -293,7 +304,6 @@ void fl_beep(int type) {
}
#endif // WIN32
}
-#endif // __APPLE__
/** Shows an information message dialog box.