added wxGetProcessId()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -114,6 +114,7 @@ the corresponding topic.
|
|||||||
\helpref{wxGetPrinterPreviewCommand}{wxgetprinterpreviewcommand}\\
|
\helpref{wxGetPrinterPreviewCommand}{wxgetprinterpreviewcommand}\\
|
||||||
\helpref{wxGetPrinterScaling}{wxgetprinterscaling}\\
|
\helpref{wxGetPrinterScaling}{wxgetprinterscaling}\\
|
||||||
\helpref{wxGetPrinterTranslation}{wxgetprintertranslation}\\
|
\helpref{wxGetPrinterTranslation}{wxgetprintertranslation}\\
|
||||||
|
\helpref{wxGetProcessId}{wxgetprocessid}\\
|
||||||
\helpref{wxGetResource}{wxgetresource}\\
|
\helpref{wxGetResource}{wxgetresource}\\
|
||||||
\helpref{wxGetSingleChoiceData}{wxgetsinglechoicedata}\\
|
\helpref{wxGetSingleChoiceData}{wxgetsinglechoicedata}\\
|
||||||
\helpref{wxGetSingleChoiceIndex}{wxgetsinglechoiceindex}\\
|
\helpref{wxGetSingleChoiceIndex}{wxgetsinglechoiceindex}\\
|
||||||
@@ -584,6 +585,18 @@ enum wxKillError
|
|||||||
|
|
||||||
<wx/utils.h>
|
<wx/utils.h>
|
||||||
|
|
||||||
|
\membersection{::wxGetProcessId}\label{wxgetprocessid}
|
||||||
|
|
||||||
|
\func{unsigned long}{wxGetProcessId}{\void}
|
||||||
|
|
||||||
|
Returns the number uniquely identifying the current process in the system.
|
||||||
|
|
||||||
|
If an error occurs, $0$ is returned.
|
||||||
|
|
||||||
|
\wxheading{Include files}
|
||||||
|
|
||||||
|
<wx/utils.h>
|
||||||
|
|
||||||
\membersection{::wxShell}\label{wxshell}
|
\membersection{::wxShell}\label{wxshell}
|
||||||
|
|
||||||
\func{bool}{wxShell}{\param{const wxString\& }{command = NULL}}
|
\func{bool}{wxShell}{\param{const wxString\& }{command = NULL}}
|
||||||
|
@@ -251,6 +251,9 @@ WXDLLEXPORT void wxSleep(int nSecs);
|
|||||||
// Sleep for a given amount of milliseconds
|
// Sleep for a given amount of milliseconds
|
||||||
WXDLLEXPORT void wxUsleep(unsigned long milliseconds);
|
WXDLLEXPORT void wxUsleep(unsigned long milliseconds);
|
||||||
|
|
||||||
|
// Get the process id of the current process
|
||||||
|
WXDLLEXPORT unsigned long wxGetProcessId();
|
||||||
|
|
||||||
// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
|
// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
|
||||||
WXDLLEXPORT long wxGetFreeMemory();
|
WXDLLEXPORT long wxGetFreeMemory();
|
||||||
|
|
||||||
@@ -356,6 +359,8 @@ WXDLLEXPORT wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent
|
|||||||
// Message/event queue helpers
|
// Message/event queue helpers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// NB: these functions are obsolete, please use wxApp methods instead!
|
||||||
|
|
||||||
// Yield to other apps/messages
|
// Yield to other apps/messages
|
||||||
WXDLLEXPORT bool wxYield();
|
WXDLLEXPORT bool wxYield();
|
||||||
|
|
||||||
@@ -379,14 +384,14 @@ WXDLLEXPORT void wxFlushEvents();
|
|||||||
// ctor and enables them back in its dtor
|
// ctor and enables them back in its dtor
|
||||||
class WXDLLEXPORT wxWindowDisabler
|
class WXDLLEXPORT wxWindowDisabler
|
||||||
{
|
{
|
||||||
DECLARE_NO_COPY_CLASS(wxWindowDisabler)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxWindowDisabler(wxWindow *winToSkip = (wxWindow *)NULL);
|
wxWindowDisabler(wxWindow *winToSkip = (wxWindow *)NULL);
|
||||||
~wxWindowDisabler();
|
~wxWindowDisabler();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxWindowList *m_winDisabled;
|
wxWindowList *m_winDisabled;
|
||||||
|
|
||||||
|
DECLARE_NO_COPY_CLASS(wxWindowDisabler)
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -40,6 +40,12 @@
|
|||||||
|
|
||||||
#include "wx/msw/private.h" // includes <windows.h>
|
#include "wx/msw/private.h" // includes <windows.h>
|
||||||
|
|
||||||
|
#ifdef __GNUWIN32_OLD__
|
||||||
|
// apparently we need to include winsock.h to get WSADATA and other stuff
|
||||||
|
// used in wxGetFullHostName() with the old mingw32 versions
|
||||||
|
#include <winsock.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/timer.h"
|
#include "wx/timer.h"
|
||||||
|
|
||||||
#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__)
|
#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__)
|
||||||
@@ -941,6 +947,15 @@ long wxGetFreeMemory()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned long wxGetProcessId()
|
||||||
|
{
|
||||||
|
#ifdef __WIN32__
|
||||||
|
return ::GetCurrentProcessId();
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Emit a beeeeeep
|
// Emit a beeeeeep
|
||||||
void wxBell()
|
void wxBell()
|
||||||
{
|
{
|
||||||
|
@@ -1018,6 +1018,11 @@ int wxGetOsVersion(int *majorVsn, int *minorVsn)
|
|||||||
|
|
||||||
#endif // !wxUSE_GUI
|
#endif // !wxUSE_GUI
|
||||||
|
|
||||||
|
unsigned long wxGetProcessId()
|
||||||
|
{
|
||||||
|
return (unsigned long)getpid();
|
||||||
|
}
|
||||||
|
|
||||||
long wxGetFreeMemory()
|
long wxGetFreeMemory()
|
||||||
{
|
{
|
||||||
#if defined(__LINUX__)
|
#if defined(__LINUX__)
|
||||||
|
Reference in New Issue
Block a user