* wxThread: new functions: wxThread::Pause/Resume, wxThread::GetThreadFromID

* Updates and new objects in utils/serialize
* wxLayout*_Serialize are friends of wxLayout* (so I can access to the
internal fields)
* wxMenu (GTK):  SetTitle/GetTitle (basic implementation)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
1998-08-18 17:22:15 +00:00
parent c86f1403c3
commit c2dd8380ba
21 changed files with 569 additions and 37 deletions

View File

@@ -141,10 +141,22 @@ wxThreadError wxThread::Create()
return THREAD_NO_ERROR;
}
void wxThread::Destroy()
wxThreadError wxThread::Destroy()
{
if (p_internal->state == STATE_RUNNING)
p_internal->state = STATE_CANCELED;
return THREAD_NO_ERROR;
}
wxThreadError wxThread::Pause()
{
return THREAD_NO_ERROR;
}
wxThreadError wxThread::Resume()
{
return THREAD_NO_ERROR;
}
void *wxThread::Join()
@@ -188,11 +200,21 @@ int wxThread::GetPriority() const
return 0;
}
bool wxThreadIsMain()
bool wxThread::IsMain()
{
return (int)getpid() == main_id;
}
bool wxThread::IsAlive() const
{
return (p_internal->state == STATE_RUNNING);
}
bool wxThread::IsRunning() const
{
return (p_internal->state == STATE_RUNNING);
}
wxThread::wxThread()
{
p_internal = new wxThreadPrivate();