* Introduced is_app_showing_modal_window(). Not implemented yet. Maybe

someone with app server insight wants to do that. :-)
* Simplified main_thread_for() for Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13538 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2005-07-07 15:30:44 +00:00
parent c256c1905a
commit c39d6b9737
2 changed files with 24 additions and 0 deletions
+2
View File
@@ -43,6 +43,8 @@ thread_id main_thread_for(team_id team);
bool is_running_on_haiku();
bool is_app_showing_modal_window(team_id team);
} // namespace BPrivate
// _get_object_token_
+22
View File
@@ -117,6 +117,13 @@ current_team()
thread_id
main_thread_for(team_id team)
{
#ifdef __HAIKU__
// Under Haiku the team ID is equal to it's main thread ID. We just get
// a team info to verify the existence of the team.
team_info info;
status_t error = get_team_info(team, &info);
return (error == B_OK ? team : error);
#else
// For I can't find any trace of how to explicitly get the main thread,
// I assume the main thread is the one with the least thread ID.
thread_id thread = B_BAD_TEAM_ID;
@@ -127,6 +134,7 @@ main_thread_for(team_id team)
thread = info.thread;
}
return thread;
#endif
}
// is_running_on_haiku
@@ -146,5 +154,19 @@ is_running_on_haiku()
return (uname(&info) == 0 && strcmp(info.sysname, "Haiku") == 0);
}
// is_app_showing_modal_window
/*! \brief Returns whether the application identified by the supplied
\c team_id is currently showing a modal window.
\param team the ID of the application in question.
\return \c true, if the application is showing a modal window, \c false
otherwise.
*/
bool
is_app_showing_modal_window(team_id team)
{
// TODO: Implement!
return true;
}
} // namespace BPrivate