当前位置: 首页>>代码示例>>C++>>正文


C++ dcguard函数代码示例

本文整理汇总了C++中dcguard函数的典型用法代码示例。如果您正苦于以下问题:C++ dcguard函数的具体用法?C++ dcguard怎么用?C++ dcguard使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dcguard函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: show

    void Window::doModal()
    {
      TRACE;
      if (!existingWindow)
      {
        bModal = true;

        if(iWindowId != ACTIVE_WINDOW) 
          show();

        while (bModal && !g_application.m_bStop)
        {
// TODO: garbear added this code to the pythin window.cpp class and
//  commented in XBPyThread.cpp. I'm not sure how to handle this 
//  in this native implementation.
//          // Check if XBPyThread::stop() raised a SystemExit exception
//          if (PyThreadState_Get()->async_exc == PyExc_SystemExit)
//          {
//            CLog::Log(LOGDEBUG, "PYTHON: doModal() encountered a SystemExit exception, closing window and returning");
//            Window_Close(self, NULL);
//            break;
//          }
          languageHook->makePendingCalls(); // MakePendingCalls
          {
            DelayedCallGuard dcguard(languageHook);            
            WaitForActionEvent();
          }
        }
      }
    }
开发者ID:A600,项目名称:xbmc,代码行数:30,代码来源:Window.cpp

示例2: dcguard

 void Addon::setSetting(const char* id, const String& value)
 {
   DelayedCallGuard dcguard(languageHook);
   ADDON::AddonPtr addon(pAddon);
   bool save=true;
   if (g_windowManager.IsWindowActive(WINDOW_DIALOG_ADDON_SETTINGS))
   {
     CGUIDialogAddonSettings* dialog = (CGUIDialogAddonSettings*)g_windowManager.GetWindow(WINDOW_DIALOG_ADDON_SETTINGS);
     if (dialog->GetCurrentID() == addon->ID())
     {
       CGUIMessage message(GUI_MSG_SETTING_UPDATED,0,0);
       std::vector<std::string> params;
       params.push_back(id);
       params.push_back(value);
       message.SetStringParams(params);
       g_windowManager.SendThreadMessage(message,WINDOW_DIALOG_ADDON_SETTINGS);
       save=false;
     }
   }
   if (save)
   {
     addon->UpdateSetting(id, value);
     addon->SaveSettings();
   }
 }
开发者ID:The-Yak,项目名称:boxeebox-xbmc,代码行数:25,代码来源:Addon.cpp

示例3: dcguard

    bool Dialog::yesno(const String& heading, const String& line1, 
                       const String& line2,
                       const String& line3,
                       const String& nolabel,
                       const String& yeslabel,
                       int autoclose)
    {
      DelayedCallGuard dcguard(languageHook);
      CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
      if (pDialog == NULL)
        throw WindowException("Error: Window is NULL, this is not possible :-)");

      // get lines, last 4 lines are optional.
      if (!heading.empty())
        pDialog->SetHeading(CVariant{heading});
      if (!line1.empty())
        pDialog->SetLine(0, CVariant{line1});
      if (!line2.empty())
        pDialog->SetLine(1, CVariant{line2});
      if (!line3.empty())
        pDialog->SetLine(2, CVariant{line3});

      if (!nolabel.empty())
        pDialog->SetChoice(0, CVariant{nolabel});
      if (!yeslabel.empty())
        pDialog->SetChoice(1, CVariant{yeslabel});

      if (autoclose > 0)
        pDialog->SetAutoClose(autoclose);

      pDialog->Open();

      return pDialog->IsConfirmed();
    }
开发者ID:KeTao,项目名称:kodi-cmake,代码行数:34,代码来源:Dialog.cpp

示例4: dcguard

 void Control::setEnabled(bool enabled)
 {
   DelayedCallGuard dcguard(languageHook);
   LOCKGUI;
   if (pGUIControl)
     pGUIControl->SetEnabled(enabled);
 }
开发者ID:Saner2oo2,项目名称:xbmc,代码行数:7,代码来源:Control.cpp

示例5: throw

    bool Dialog::yesno(const String& heading, const String& line1, 
                       const String& line2,
                       const String& line3,
                       const String& nolabel,
                       const String& yeslabel) throw (WindowException)
    {
      DelayedCallGuard dcguard(languageHook);
      const int window = WINDOW_DIALOG_YES_NO;
      CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(window);
      if (pDialog == NULL)
        throw WindowException("Error: Window is NULL, this is not possible :-)");

      // get lines, last 4 lines are optional.
      if (!heading.empty())
        pDialog->SetHeading(heading);
      if (!line1.empty())
        pDialog->SetLine(0, line1);
      if (!line2.empty())
        pDialog->SetLine(1, line2);
      if (!line3.empty())
        pDialog->SetLine(2, line3);

      if (!nolabel.empty())
        pDialog->SetChoice(0,nolabel);
      if (!yeslabel.empty())
        pDialog->SetChoice(1,yeslabel);

      //send message and wait for user input
      XBMCWaitForThreadMessage(TMSG_DIALOG_DOMODAL, window, ACTIVE_WINDOW);

      return pDialog->IsConfirmed();
    }
开发者ID:Pulfer,项目名称:xbmc,代码行数:32,代码来源:Dialog.cpp

示例6: dcguard

    void Window::show()
    {
      XBMC_TRACE;
      DelayedCallGuard dcguard(languageHook);
      popActiveWindowId();

      CApplicationMessenger::GetInstance().SendMsg(TMSG_GUI_ACTIVATE_WINDOW, iWindowId, 0);
    }
开发者ID:FLyrfors,项目名称:xbmc,代码行数:8,代码来源:Window.cpp

示例7: dcguard

    void Window::show()
    {
      TRACE;
      DelayedCallGuard dcguard(languageHook);
      popActiveWindowId();

      std::vector<CStdString> params;
      CApplicationMessenger::Get().ActivateWindow(iWindowId, params, false);
    }
开发者ID:A600,项目名称:xbmc,代码行数:9,代码来源:Window.cpp

示例8: dcguard

    void Addon::openSettings()
    {
      AddonPtr temp;
      if (!ADDON::CAddonMgr::Get().GetAddon(pAddon->ID(), temp))
        return;

      DelayedCallGuard dcguard(languageHook);
      // show settings dialog
      ADDON::AddonPtr addon(pAddon);
      CGUIDialogAddonSettings::ShowAndGetInput(addon);
    }
开发者ID:pixl-project,项目名称:xbmc,代码行数:11,代码来源:Addon.cpp

示例9: PulseActionEvent

    void Window::close()
    {
      XBMC_TRACE;
      bModal = false;

      if (!existingWindow)
        PulseActionEvent();

      {
        DelayedCallGuard dcguard(languageHook);
        CApplicationMessenger::GetInstance().SendMsg(TMSG_GUI_PREVIOUS_WINDOW, iOldWindowId, 0);
      }

      iOldWindowId = 0;
    }
开发者ID:FLyrfors,项目名称:xbmc,代码行数:15,代码来源:Window.cpp

示例10: PulseActionEvent

    void Window::close()
    {
      XBMC_TRACE;
      bModal = false;

      if (!existingWindow)
        PulseActionEvent();

      std::vector<std::string> params;
      {
        DelayedCallGuard dcguard(languageHook);
        CApplicationMessenger::Get().ActivateWindow(iOldWindowId, params, false);
      }

      iOldWindowId = 0;
    }
开发者ID:Distrotech,项目名称:xbmc,代码行数:16,代码来源:Window.cpp


注:本文中的dcguard函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。