本文整理汇总了C++中CGUIWindow::IsAnimating方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIWindow::IsAnimating方法的具体用法?C++ CGUIWindow::IsAnimating怎么用?C++ CGUIWindow::IsAnimating使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIWindow
的用法示例。
在下文中一共展示了CGUIWindow::IsAnimating方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsWindowActive
bool CGUIWindowManager::IsWindowActive(int id, bool ignoreClosing /* = true */) const
{
/*
参数:
1、
返回:
1、
说明:
1、
*/
// mask out multiple instances of the same window
id &= WINDOW_ID_MASK;
if ((GetActiveWindow() & WINDOW_ID_MASK) == id)
return true;
// run through the dialogs
CSingleLock lock(g_graphicsContext);
for (ciDialog it = m_activeDialogs.begin(); it != m_activeDialogs.end(); ++it)
{
CGUIWindow *window = *it;
if ((window->GetID() & WINDOW_ID_MASK) == id && (!ignoreClosing || !window->IsAnimating(ANIM_TYPE_WINDOW_CLOSE)))
return true;
}
return false; // window isn't active
}
示例2: OnAction
bool CGUIWindowManager::OnAction(const CAction &action) const
{
CSingleLock lock(g_graphicsContext);
unsigned int topMost = m_activeDialogs.size();
while (topMost)
{
CGUIWindow *dialog = m_activeDialogs[--topMost];
lock.Leave();
if (dialog->IsModalDialog())
{ // we have the topmost modal dialog
if (!dialog->IsAnimating(ANIM_TYPE_WINDOW_CLOSE))
{
bool fallThrough = (dialog->GetID() == WINDOW_DIALOG_FULLSCREEN_INFO);
if (dialog->OnAction(action))
return true;
// dialog didn't want the action - we'd normally return false
// but for some dialogs we want to drop the actions through
if (fallThrough)
break;
return false;
}
return true; // do nothing with the action until the anim is finished
}
lock.Enter();
if (topMost > m_activeDialogs.size())
topMost = m_activeDialogs.size();
}
lock.Leave();
CGUIWindow* window = GetWindow(GetActiveWindow());
if (window)
return window->OnAction(action);
return false;
}
示例3: OnAction
bool CGUIWindowManager::OnAction(const CAction &action)
{
if (g_powerManager.IsSuspended())
{
g_powerManager.Resume();
return true;
}
// If the screen saver is active, it is on top of
// existing dialogs. Pass the actions to the screen
// saver and not to the dialogs
if (!g_application.GetInSlideshowScreensaver())
{
CSingleLock lock(g_graphicsContext);
unsigned int topMost = m_activeDialogs.size();
while (topMost)
{
CGUIWindow *dialog = m_activeDialogs[--topMost];
lock.Leave();
if (dialog->IsModalDialog())
{ // we have the topmost modal dialog
if (!dialog->IsAnimating(ANIM_TYPE_WINDOW_CLOSE))
{
bool fallThrough = (dialog->GetID() == WINDOW_DIALOG_FULLSCREEN_INFO);
if (dialog->OnAction(action))
return true;
// dialog didn't want the action - we'd normally return false
// but for some dialogs we want to drop the actions through
if (fallThrough)
break;
return false;
}
return true; // do nothing with the action until the anim is finished
}
// music or video overlay are handled as a special case, as they're modeless, but we allow
// clicking on them with the mouse.
if (action.id == ACTION_MOUSE && (dialog->GetID() == WINDOW_VIDEO_OVERLAY ||
dialog->GetID() == WINDOW_MUSIC_OVERLAY))
{
if (dialog->OnAction(action))
return true;
}
lock.Enter();
if (topMost > m_activeDialogs.size())
topMost = m_activeDialogs.size();
}
lock.Leave();
}
CGUIWindow* window = GetWindow(GetActiveWindow());
if (window)
return window->OnAction(action);
return false;
}
示例4: OnAction
bool CGUIWindowManager::OnAction(const CAction &action)
{
/*
参数:
1、
返回:
1、
说明:
1、
*/
CSingleLock lock(g_graphicsContext);
unsigned int topMost = m_activeDialogs.size();
while (topMost)
{
CGUIWindow *dialog = m_activeDialogs[--topMost];
lock.Leave();
if (dialog->IsModalDialog())
{ // we have the topmost modal dialog
if (!dialog->IsAnimating(ANIM_TYPE_WINDOW_CLOSE))
{
bool fallThrough = (dialog->GetID() == WINDOW_DIALOG_FULLSCREEN_INFO);
if (dialog->OnAction(action))
return true;
// dialog didn't want the action - we'd normally return false
// but for some dialogs we want to drop the actions through
if (fallThrough)
break;
return false;
}
return true; // do nothing with the action until the anim is finished
}
// music or video overlay are handled as a special case, as they're modeless, but we allow
// clicking on them with the mouse.
if (action.IsMouse() && (dialog->GetID() == WINDOW_DIALOG_VIDEO_OVERLAY || dialog->GetID() == WINDOW_DIALOG_MUSIC_OVERLAY))
{
if (dialog->OnAction(action))
return true;
}
lock.Enter();
if (topMost > m_activeDialogs.size())
topMost = m_activeDialogs.size();
}
lock.Leave();
CGUIWindow* window = GetWindow(GetActiveWindow());
if (window)
return window->OnAction(action);
return false;
}
示例5: GetTopMostModalDialogID
/// \brief Get the ID of the top most routed window
/// \return id ID of the window or WINDOW_INVALID if no routed window available
int CGUIWindowManager::GetTopMostModalDialogID(bool ignoreClosing /*= false*/) const
{
CSingleLock lock(g_graphicsContext);
for (crDialog it = m_activeDialogs.rbegin(); it != m_activeDialogs.rend(); ++it)
{
CGUIWindow *dialog = *it;
if (dialog->IsModalDialog() && (!ignoreClosing || !dialog->IsAnimating(ANIM_TYPE_WINDOW_CLOSE)))
{ // have a modal window
return dialog->GetID();
}
}
return WINDOW_INVALID;
}
示例6: HasModalDialog
bool CGUIWindowManager::HasModalDialog() const
{
CSingleLock lock(g_graphicsContext);
for (ciDialog it = m_activeDialogs.begin(); it != m_activeDialogs.end(); ++it)
{
CGUIWindow *window = *it;
if (window->IsModalDialog())
{ // have a modal window
if (!window->IsAnimating(ANIM_TYPE_WINDOW_CLOSE))
return true;
}
}
return false;
}
示例7: IsWindowActive
bool CGUIWindowManager::IsWindowActive(const std::string &xmlFile, bool ignoreClosing /* = true */) const
{
CSingleLock lock(g_graphicsContext);
CGUIWindow *window = GetWindow(GetActiveWindow());
if (window && StringUtils::EqualsNoCase(URIUtils::GetFileName(window->GetProperty("xmlfile").asString()), xmlFile))
return true;
// run through the dialogs
for (const auto& window : m_activeDialogs)
{
if (StringUtils::EqualsNoCase(URIUtils::GetFileName(window->GetProperty("xmlfile").asString()), xmlFile) &&
(!ignoreClosing || !window->IsAnimating(ANIM_TYPE_WINDOW_CLOSE)))
return true;
}
return false; // window isn't active
}
示例8: HasModalDialog
bool CGUIWindowManager::HasModalDialog() const
{
// If the screen saver is active, don't tell anyone that there
// are any dialogs open, so the window will get the events and
// not the dialogs
if (g_application.GetInSlideshowScreensaver())
return false;
CSingleLock lock(g_graphicsContext);
for (ciDialog it = m_activeDialogs.begin(); it != m_activeDialogs.end(); ++it)
{
CGUIWindow *window = *it;
if (window->IsModalDialog())
{ // have a modal window
if (!window->IsAnimating(ANIM_TYPE_WINDOW_CLOSE))
return true;
}
}
return false;
}
示例9: IsColorBufferActive
bool CGUIWindowManager::IsColorBufferActive()
{
CGUIWindow* pWindow = GetWindow(GetActiveWindow());
if(!pWindow)
return false;
if(pWindow->HasDynamicContents())
return false;
if(pWindow->IsAnimating())
return false;
int mode3d = MODE_3D_NONE;
#ifdef HAS_EMBEDDED
mode3d = g_guiSettings.GetInt("videoscreen.mode3d");
#endif
if(mode3d != MODE_3D_NONE)
return false;
// find the window with the lowest render order
vector<CGUIWindow *> renderList = m_activeDialogs;
stable_sort(renderList.begin(), renderList.end(), RenderOrderSortFunction);
// iterate through all dialogs. If the dialog enable color buffer return true;
for (iDialog it = renderList.begin(); it != renderList.end(); ++it)
{
if ((*it)->IsDialogRunning())
{
if ((*it)->IsAnimating())
{
return false;
}
else if((*it)->HasColorBufferActive())
return true;
}
}
return false;
}
示例10: IsWindowActive
bool CGUIWindowManager::IsWindowActive(const CStdString &xmlFile, bool ignoreClosing /* = true */) const
{
CSingleLock lock(g_graphicsContext);
CGUIWindow *window = GetWindow(GetActiveWindow());
if (window && URIUtils::GetFileName(window->GetProperty("xmlfile").asString()).Equals(xmlFile)) return true;
// run through the dialogs
for (ciDialog it = m_activeDialogs.begin(); it != m_activeDialogs.end(); ++it)
{
CGUIWindow *window = *it;
if (URIUtils::GetFileName(window->GetProperty("xmlfile").asString()).Equals(xmlFile) && (!ignoreClosing || !window->IsAnimating(ANIM_TYPE_WINDOW_CLOSE)))
return true;
}
return false; // window isn't active
}