Mac OS X: keep Mac-specific fl_beep() code in file src/fl_ask.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8136 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
dbb7be0fee
commit
24758b5cd6
@ -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__
|
||||
|
||||
//
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user