Move wxLaunchDefaultBrowser from BASE to CORE per wx-dev discussion.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott 2007-05-08 19:13:49 +00:00
parent 8329541967
commit c5f0d1f903
2 changed files with 57 additions and 53 deletions

View File

@ -447,15 +447,6 @@ WXDLLIMPEXP_BASE bool wxHandleFatalExceptions(bool doit = true);
#endif // wxUSE_ON_FATAL_EXCEPTION
// flags for wxLaunchDefaultBrowser
enum
{
wxBROWSER_NEW_WINDOW = 1
};
// Launch url in the user's default internet browser
WXDLLIMPEXP_BASE bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0);
// ----------------------------------------------------------------------------
// Environment variables
// ----------------------------------------------------------------------------
@ -521,6 +512,19 @@ WXDLLIMPEXP_BASE bool wxGetDiskSpace(const wxString& path,
#if wxUSE_GUI // GUI only things from now on
// ----------------------------------------------------------------------------
// Launch default browser
// ----------------------------------------------------------------------------
// flags for wxLaunchDefaultBrowser
enum
{
wxBROWSER_NEW_WINDOW = 1
};
// Launch url in the user's default internet browser
WXDLLIMPEXP_CORE bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0);
// ----------------------------------------------------------------------------
// Menu accelerators related things
// ----------------------------------------------------------------------------

View File

@ -630,6 +630,50 @@ long wxExecute(const wxString& command,
return wxDoExecuteWithCapture(command, output, &error, flags);
}
// ----------------------------------------------------------------------------
// wxApp::Yield() wrappers for backwards compatibility
// ----------------------------------------------------------------------------
bool wxYield()
{
return wxTheApp && wxTheApp->Yield();
}
bool wxYieldIfNeeded()
{
return wxTheApp && wxTheApp->Yield(true);
}
// Id generation
static long wxCurrentId = 100;
long wxNewId()
{
// skip the part of IDs space that contains hard-coded values:
if (wxCurrentId == wxID_LOWEST)
wxCurrentId = wxID_HIGHEST + 1;
return wxCurrentId++;
}
long
wxGetCurrentId(void) { return wxCurrentId; }
void
wxRegisterId (long id)
{
if (id >= wxCurrentId)
wxCurrentId = id + 1;
}
#endif // wxUSE_BASE
// ============================================================================
// GUI-only functions from now on
// ============================================================================
#if wxUSE_GUI
// ----------------------------------------------------------------------------
// Launch default browser
// ----------------------------------------------------------------------------
@ -834,50 +878,6 @@ bool wxLaunchDefaultBrowser(const wxString& urlOrig, int flags)
return false;
}
// ----------------------------------------------------------------------------
// wxApp::Yield() wrappers for backwards compatibility
// ----------------------------------------------------------------------------
bool wxYield()
{
return wxTheApp && wxTheApp->Yield();
}
bool wxYieldIfNeeded()
{
return wxTheApp && wxTheApp->Yield(true);
}
// Id generation
static long wxCurrentId = 100;
long wxNewId()
{
// skip the part of IDs space that contains hard-coded values:
if (wxCurrentId == wxID_LOWEST)
wxCurrentId = wxID_HIGHEST + 1;
return wxCurrentId++;
}
long
wxGetCurrentId(void) { return wxCurrentId; }
void
wxRegisterId (long id)
{
if (id >= wxCurrentId)
wxCurrentId = id + 1;
}
#endif // wxUSE_BASE
// ============================================================================
// GUI-only functions from now on
// ============================================================================
#if wxUSE_GUI
// ----------------------------------------------------------------------------
// Menu accelerators related functions
// ----------------------------------------------------------------------------