本文整理汇总了C++中CGUIAddonWindow::IsDialog方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIAddonWindow::IsDialog方法的具体用法?C++ CGUIAddonWindow::IsDialog怎么用?C++ CGUIAddonWindow::IsDialog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIAddonWindow
的用法示例。
在下文中一共展示了CGUIAddonWindow::IsDialog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: close
bool Interface_GUIWindow::close(void* kodiBase, void* handle)
{
CAddonDll* addon = static_cast<CAddonDll*>(kodiBase);
CGUIAddonWindow* pAddonWindow = static_cast<CGUIAddonWindow*>(handle);
if (!addon || !pAddonWindow)
{
CLog::Log(LOGERROR, "Interface_GUIWindow::%s - invalid handler data (handle='%p') on addon '%s'",
__FUNCTION__, handle, addon ? addon->ID().c_str() : "unknown");
return false;
}
pAddonWindow->PulseActionEvent();
Interface_GUIGeneral::lock();
// if it's a dialog, we have to close it a bit different
if (pAddonWindow->IsDialog())
dynamic_cast<CGUIAddonWindowDialog*>(pAddonWindow)->Show(false);
else
g_windowManager.ActivateWindow(pAddonWindow->m_oldWindowId);
pAddonWindow->m_oldWindowId = 0;
Interface_GUIGeneral::unlock();
return true;
}
示例2: do_modal
bool Interface_GUIWindow::do_modal(void* kodiBase, void* handle)
{
CAddonDll* addon = static_cast<CAddonDll*>(kodiBase);
CGUIAddonWindow* pAddonWindow = static_cast<CGUIAddonWindow*>(handle);
if (!addon || !pAddonWindow)
{
CLog::Log(LOGERROR, "Interface_GUIWindow::%s - invalid handler data (handle='%p') on addon '%s'",
__FUNCTION__, handle, addon ? addon->ID().c_str() : "unknown");
return false;
}
if (pAddonWindow->GetID() == g_windowManager.GetActiveWindow())
return true;
if (pAddonWindow->m_oldWindowId != pAddonWindow->m_windowId &&
pAddonWindow->m_windowId != g_windowManager.GetActiveWindow())
pAddonWindow->m_oldWindowId = g_windowManager.GetActiveWindow();
Interface_GUIGeneral::lock();
if (pAddonWindow->IsDialog())
dynamic_cast<CGUIAddonWindowDialog*>(pAddonWindow)->Show(true, true);
else
g_windowManager.ActivateWindow(pAddonWindow->GetID());
Interface_GUIGeneral::unlock();
return true;
}