This allows to get rid of ugly preprocessor checks due to the fact that this
function could be defined in one or the other library depending on the port
used and also fix a problem with it being defined differently in the base
library depending on which GUI port (Carbon or Cocoa) was used under OS X.
It also fixes the problem with wxBell() in wxGTK under Windows.
Closes #14406.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71797
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// ----------------------------------------------------------------------------
// Sound the bell
-#if !defined __EMX__ && \
- (defined __WXMOTIF__ || defined __WXGTK__ || defined __WXX11__)
WXDLLIMPEXP_CORE void wxBell();
-#else
-WXDLLIMPEXP_BASE void wxBell();
-#endif
#if wxUSE_MSGDLG
// Show wxWidgets information
@note This function is categorized as a GUI one and so is not thread-safe.
@header{wx/utils.h}
+
+ @library{wxcore}
*/
void wxBell();
//----------------------------------------------------------------------------
// misc.
//----------------------------------------------------------------------------
-#ifndef __EMX__
-// on OS/2, we use the wxBell from wxBase library
void wxBell()
{
gdk_beep();
}
-#endif
// ----------------------------------------------------------------------------
// display characterstics
//----------------------------------------------------------------------------
// misc.
//----------------------------------------------------------------------------
-#ifndef __EMX__
-// on OS/2, we use the wxBell from wxBase library
void wxBell()
{
gdk_beep();
}
-#endif
/* Don't synthesize KeyUp events holding down a key and producing
KeyDown events with autorepeat. */
// ----------------------------------------------------------------------------
// Emit a beeeeeep
-#ifndef __EMX__
-// on OS/2, we use the wxBell from wxBase library (src/os2/utils.cpp)
void wxBell()
{
// Use current setting for the bell
XBell (wxGlobalDisplay(), 0);
}
-#endif
wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const
{
return ::GetCurrentProcessId();
}
-// Emit a beeeeeep
-void wxBell()
-{
- ::MessageBeep((UINT)-1); // default sound
-}
-
bool wxIsDebuggerRunning()
{
#if wxUSE_DYNLIB_CLASS
// implementation
// ============================================================================
+// Emit a beeeeeep
+void wxBell()
+{
+ ::MessageBeep((UINT)-1); // default sound
+}
+
// ---------------------------------------------------------------------------
// helper functions for showing a "busy" cursor
// ---------------------------------------------------------------------------
// wxYield();
}
-// Emit a beeeeeep
-void wxBell()
-{
- DosBeep(1000,1000); // 1kHz during 1 sec.
-}
-
wxString wxGetOsDescription()
{
wxString strVer(wxT("OS/2"));
// implementation
// ============================================================================
+// Emit a beeeeeep
+void wxBell()
+{
+ DosBeep(1000,1000); // 1kHz during 1 sec.
+}
+
// ----------------------------------------------------------------------------
// functions to work with .INI files
// ----------------------------------------------------------------------------
#include "wx/evtloop.h"
-#if wxUSE_BASE
+#if wxUSE_GUI
// Emit a beeeeeep
void wxBell()
#endif
}
-#endif // wxUSE_BASE
-
-#if wxUSE_GUI
-
wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer *timer)
{
return new wxOSXTimerImpl(timer);
#if wxOSX_USE_COCOA
-#if wxUSE_BASE
+#if wxUSE_GUI
// Emit a beeeeeep
void wxBell()
NSBeep();
}
-#endif // wxUSE_BASE
-
-#if wxUSE_GUI
-
@implementation wxNSAppController
- (void)applicationWillFinishLaunching:(NSNotification *)application {
#if 1 // wxUSE_BASE
-// Emit a beeeeeep
-void wxBell()
-{
- // would be kSystemSoundID_UserPreferredAlert but since the headers aren't correct, add it manually
- AudioServicesPlayAlertSound(0x00001000 );
-}
-
// ----------------------------------------------------------------------------
// Common Event Support
// ----------------------------------------------------------------------------
#if wxUSE_GUI
+// Emit a beeeeeep
+void wxBell()
+{
+ // would be kSystemSoundID_UserPreferredAlert but since the headers aren't correct, add it manually
+ AudioServicesPlayAlertSound(0x00001000 );
+}
+
// ----------------------------------------------------------------------------
// Launch default browser
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Emit a beeeeeep
-#ifndef __EMX__
-// on OS/2, we use the wxBell from wxBase library (src/os2/utils.cpp)
void wxBell()
{
// Use current setting for the bell
XBell ((Display*) wxGetDisplay(), 0);
}
-#endif
wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const
{