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
13 files changed:
// ----------------------------------------------------------------------------
// Sound the bell
// ----------------------------------------------------------------------------
// Sound the bell
-#if !defined __EMX__ && \
- (defined __WXMOTIF__ || defined __WXGTK__ || defined __WXX11__)
WXDLLIMPEXP_CORE void wxBell();
WXDLLIMPEXP_CORE void wxBell();
-#else
-WXDLLIMPEXP_BASE void wxBell();
-#endif
#if wxUSE_MSGDLG
// Show wxWidgets information
#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}
@note This function is categorized as a GUI one and so is not thread-safe.
@header{wx/utils.h}
//----------------------------------------------------------------------------
// misc.
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// misc.
//----------------------------------------------------------------------------
-#ifndef __EMX__
-// on OS/2, we use the wxBell from wxBase library
void wxBell()
{
gdk_beep();
}
void wxBell()
{
gdk_beep();
}
// ----------------------------------------------------------------------------
// display characterstics
// ----------------------------------------------------------------------------
// display characterstics
//----------------------------------------------------------------------------
// misc.
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// misc.
//----------------------------------------------------------------------------
-#ifndef __EMX__
-// on OS/2, we use the wxBell from wxBase library
void wxBell()
{
gdk_beep();
}
void wxBell()
{
gdk_beep();
}
/* Don't synthesize KeyUp events holding down a key and producing
KeyDown events with autorepeat. */
/* Don't synthesize KeyUp events holding down a key and producing
KeyDown events with autorepeat. */
// ----------------------------------------------------------------------------
// Emit a beeeeeep
// ----------------------------------------------------------------------------
// 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);
}
void wxBell()
{
// Use current setting for the bell
XBell (wxGlobalDisplay(), 0);
}
wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const
{
wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const
{
return ::GetCurrentProcessId();
}
return ::GetCurrentProcessId();
}
-// Emit a beeeeeep
-void wxBell()
-{
- ::MessageBeep((UINT)-1); // default sound
-}
-
bool wxIsDebuggerRunning()
{
#if wxUSE_DYNLIB_CLASS
bool wxIsDebuggerRunning()
{
#if wxUSE_DYNLIB_CLASS
// implementation
// ============================================================================
// implementation
// ============================================================================
+// Emit a beeeeeep
+void wxBell()
+{
+ ::MessageBeep((UINT)-1); // default sound
+}
+
// ---------------------------------------------------------------------------
// helper functions for showing a "busy" cursor
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// helper functions for showing a "busy" cursor
// ---------------------------------------------------------------------------
-// Emit a beeeeeep
-void wxBell()
-{
- DosBeep(1000,1000); // 1kHz during 1 sec.
-}
-
wxString wxGetOsDescription()
{
wxString strVer(wxT("OS/2"));
wxString wxGetOsDescription()
{
wxString strVer(wxT("OS/2"));
// implementation
// ============================================================================
// implementation
// ============================================================================
+// Emit a beeeeeep
+void wxBell()
+{
+ DosBeep(1000,1000); // 1kHz during 1 sec.
+}
+
// ----------------------------------------------------------------------------
// functions to work with .INI files
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// functions to work with .INI files
// ----------------------------------------------------------------------------
// Emit a beeeeeep
void wxBell()
// Emit a beeeeeep
void wxBell()
-#endif // wxUSE_BASE
-
-#if wxUSE_GUI
-
wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer *timer)
{
return new wxOSXTimerImpl(timer);
wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer *timer)
{
return new wxOSXTimerImpl(timer);
// Emit a beeeeeep
void wxBell()
// Emit a beeeeeep
void wxBell()
-#endif // wxUSE_BASE
-
-#if wxUSE_GUI
-
@implementation wxNSAppController
- (void)applicationWillFinishLaunching:(NSNotification *)application {
@implementation wxNSAppController
- (void)applicationWillFinishLaunching:(NSNotification *)application {
-// Emit a beeeeeep
-void wxBell()
-{
- // would be kSystemSoundID_UserPreferredAlert but since the headers aren't correct, add it manually
- AudioServicesPlayAlertSound(0x00001000 );
-}
-
// ----------------------------------------------------------------------------
// Common Event Support
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Common Event Support
// ----------------------------------------------------------------------------
+// Emit a beeeeeep
+void wxBell()
+{
+ // would be kSystemSoundID_UserPreferredAlert but since the headers aren't correct, add it manually
+ AudioServicesPlayAlertSound(0x00001000 );
+}
+
// ----------------------------------------------------------------------------
// Launch default browser
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Launch default browser
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Emit a beeeeeep
// ----------------------------------------------------------------------------
// 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);
}
void wxBell()
{
// Use current setting for the bell
XBell ((Display*) wxGetDisplay(), 0);
}
wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const
{
wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const
{