[
  {
    "path": ".gitignore",
    "content": "# Compiled Object files\n*.slo\n*.lo\n*.o\n*.obj\n\n# Precompiled Headers\n*.gch\n*.pch\n\n# Compiled Dynamic libraries\n*.so\n*.dylib\n\n\n# Fortran module files\n*.mod\n*.smod\n\n# Compiled Static libraries\n*.lai\n*.la\n*.a\n\n\n# Executables\n*.exe\n*.out\n*.app\n"
  },
  {
    "path": "BrowserHandlers.cc",
    "content": "#include \"stdafx.h\"\n#include \"BrowserHandlers.h\"\n#include <wrapper/cef_helpers.h>\n#include <base/cef_bind.h>\n\n\n//TID_UI ̡߳߳ӦóڵõCefInitialize()ʱCefSettings.multi_threaded_message_loop = false߳ҲӦó̡߳\n//TID_IO ߳ҪIPCϢԼͨš\n//TID_FILE ̸߳ļϵͳ\n\n\n// 1.  User clicks the window close button which sends an OS close\n//     notification (e.g. WM_CLOSE on Windows, performClose: on OS-X and\n//     \"delete_event\" on Linux).\n// 2.  Application's top-level window receives the close notification and:\n//     A. Calls CefBrowserHost::CloseBrowser(false).\n//     B. Cancels the window close.\n// 3.  JavaScript 'onbeforeunload' handler executes and shows the close\n//     confirmation dialog (which can be overridden via\n//     CefJSDialogHandler::OnBeforeUnloadDialog()).\n// 4.  User approves the close.\n// 5.  JavaScript 'onunload' handler executes.\n// 6.  Application's DoClose() handler is called. Application will:\n//     A. Set a flag to indicate that the next close attempt will be allowed.\n//     B. Return false.\n// 7.  CEF sends an OS close notification.\n// 8.  Application's top-level window receives the OS close notification and\n//     allows the window to close based on the flag from #6B.\n// 9.  Browser OS window is destroyed.\n// 10. Application's CefLifeSpanHandler::OnBeforeClose() handler is called and\n//     the browser object is destroyed.\n// 11. Application exits by calling CefQuitMessageLoop() if no other browsers\n//     exist.\n///\n\n\nCCefClientHandler::CCefClientHandler() :hWnd_(NULL), is_closing_(false)\n{\n}\n\nCCefClientHandler::~CCefClientHandler()\n{\n\n}\n\n\n// CefClient methods:\nCefRefPtr<CefDisplayHandler> CCefClientHandler::GetDisplayHandler()\n{\n\treturn this;\n}\nCefRefPtr<CefLifeSpanHandler> CCefClientHandler::GetLifeSpanHandler()\n{\n\treturn this;\n}\nCefRefPtr<CefLoadHandler> CCefClientHandler::GetLoadHandler()\n{\n\treturn this;\n}\n\nCefRefPtr<CefRequestHandler> CCefClientHandler::GetRequestHandler()\n{\n\treturn this;\n}\n\n// һָbrowser\nvoid CCefClientHandler::OnAfterCreated(CefRefPtr<CefBrowser> browser)\n{\n\t// Add to the list of existing browsers.\n\tbrowser_list_.push_back(browser);\n\n\tint nID = browser->GetIdentifier();\n\t\n\t::PostMessage(hWnd_, UM_CEF_AFTERCREATED, nID, 0);\n\n}\n\n\nbool CCefClientHandler::DoClose(CefRefPtr<CefBrowser> browser)\n{\n\t//TID_UI ̡߳߳\n\tCEF_REQUIRE_UI_THREAD();\n\t//\tAutoLock lock_scope(this);\n\n\tlock_.Acquire();\n\n\n\t// Remove from the list of existing browsers.\n\tBrowserList::iterator bit = browser_list_.begin();\n\n\tfor (; bit != browser_list_.end(); bit++)\n\t{\n\t\tif ((*bit)->IsSame(browser))\n\t\t{\n\t\t\tbrowser_list_.erase(bit);\n\t\t\tbrowser = NULL;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\n\tlock_.Release();\n\n\tif (browser_list_.size() == 0) {\n\t\t// Set a flag to indicate that the window close should be allowed.\n\t\tis_closing_ = true;\n\n\t\t::PostMessage(hWnd_, UM_CEF_POSTQUITMESSAGE, 0, 0);\n\t}\n\n\n\treturn false;\n}\n\n\nvoid CCefClientHandler::OnBeforeClose(CefRefPtr<CefBrowser> browser)\n{\n\tCEF_REQUIRE_UI_THREAD();\n\n\tAutoLock lock_scope(this);\n\t//\tlock_.Acquire();\n\n\tBrowserList::iterator bit = browser_list_.begin();\n\n\tfor (; bit != browser_list_.end(); bit++)\n\t{\n\t\tif ((*bit)->IsSame(browser))\n\t\t{\n\t\t\tbrowser_list_.erase(bit);\n\t\t\tbrowser = NULL;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\n\tif (browser_list_.empty())\n\t{\n\t\tis_closing_ = true;\n\t\t::PostMessage(hWnd_, UM_CEF_POSTQUITMESSAGE, 0, 0);\n\t\t// All browser windows have closed. Quit the application message loop.\n\t\t//CefQuitMessageLoop();\n\t\t//PostQuitMessage(0l);\n\t}\n\n\t//\tlock_.Release();\n}\n\nvoid CCefClientHandler::OnLoadStart(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame)\n{\n\tCEF_REQUIRE_UI_THREAD();\n\n\tCefString* strTmpURL = new CefString(browser->GetMainFrame()->GetURL());\n\tint nID = browser->GetIdentifier();\n\t::PostMessage(hWnd_, UM_CEF_WEBLOADSTART, nID, (LPARAM)strTmpURL);\n\n\t//return __super::OnLoadStart(browser, frame);\n}\nvoid CCefClientHandler::OnLoadEnd(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, int httpStatusCode)\n{\n\tCEF_REQUIRE_UI_THREAD();\n\n\tCefString* strTmpURL = new CefString(browser->GetMainFrame()->GetURL());\n\tint nID = browser->GetIdentifier();\n\t::PostMessage(hWnd_, UM_CEF_WEBLOADEND, nID, (LPARAM)strTmpURL);\n\n}\n\n\n\nvoid CCefClientHandler::OnLoadError(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, ErrorCode errorCode, const CefString& errorText, const CefString& failedUrl)\n{\n\tCEF_REQUIRE_UI_THREAD();\n\n\t// Don't display an error for downloaded files.\n\tif (errorCode == ERR_ABORTED)\n\t\treturn;\n\n\t// Display a load error message.\n\tstd::stringstream ss;\n\tss << \"<html><body bgcolor=\\\"white\\\">\"\n\t\t\"<h2>Failed to load URL \" << std::string(failedUrl) <<\n\t\t\" with error \" << std::string(errorText) << \" (\" << errorCode <<\n\t\t\").</h2></body></html>\";\n\tframe->LoadString(ss.str(), failedUrl);\n}\n\n\n\n\n\nvoid CCefClientHandler::OnTitleChange(CefRefPtr<CefBrowser> browser, const CefString& title)\n{\n\tCEF_REQUIRE_UI_THREAD();\n\n\t// globally unique identifier for this browser\n\tint nID = browser->GetIdentifier();\n\n\tCefString* strTitle = new CefString(title);\n\t::PostMessage(hWnd_, UM_CEF_WEBTITLECHANGE, nID, (LPARAM)strTitle);\n}\n\n\n\nbool CCefClientHandler::OnBeforePopup(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& target_url, const CefString& target_frame_name, CefLifeSpanHandler::WindowOpenDisposition target_disposition,\n\tbool user_gesture, const CefPopupFeatures& popupFeatures, CefWindowInfo& windowInfo, CefRefPtr<CefClient>& client, CefBrowserSettings& settings, bool* no_javascript_access)\n{\n\n\t//ϢǵdeleteַԴ\n\tCefString* strTargetURL = new CefString(target_url);\n\t::PostMessage(hWnd_, UM_CEF_WEBLOADPOPUP, (WPARAM)0, (LPARAM)strTargetURL);\n\treturn true;\n\n}\n\n\nenum MyEnum\n{\n\tMENU_ID_USER_OPENLINK = MENU_ID_USER_FIRST + 200,\n\tMENU_ID_USER_COPYLINK,\n\tMENU_ID_USER_SHOWDEVTOOLS,\n};\n\n\nvoid CCefClientHandler::OnBeforeContextMenu(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefContextMenuParams> params, CefRefPtr<CefMenuModel> model)\n{\n\t//ԼҪĲ˵  \n\tcef_context_menu_type_flags_t flag = params->GetTypeFlags();\n\n\tif (flag&CM_TYPEFLAG_LINK)\n\t{\n\t\tmodel->Clear(); //в˵\n\n\t\tmodel->AddItem(MENU_ID_USER_OPENLINK, L\"±ǩҳд(&T)\");//Ӳ˵\n\t\tmodel->AddSeparator(); //ӷָ\n\t\tmodel->AddItem(MENU_ID_USER_COPYLINK, L\"ӵַ(&C)\");//Ӳ˵\n\t\t//model->SetEnabled(MENU_ID_USER_OPENLINK, false); //ò˵\n\t\treturn;\n\t}\n\n\n\tif (flag & CM_TYPEFLAG_PAGE)\n\t{//ͨҳҼϢ\n\n\t\tmodel->SetLabel(MENU_ID_BACK, L\"\");\n\t\tmodel->SetLabel(MENU_ID_FORWARD, L\"ǰ\");\n\t\tmodel->AddSeparator();\n\t\tmodel->AddItem(MENU_ID_RELOAD, L\"ˢ\");\n\t\tmodel->AddItem(MENU_ID_RELOAD_NOCACHE, L\"ǿˢ\");\n\t\tmodel->AddItem(MENU_ID_STOPLOAD, L\"ֹͣ\");\n\t\t\n\t\tmodel->AddSeparator();\n\t\tmodel->SetLabel(MENU_ID_PRINT, L\"ӡ\");\n\t\tmodel->SetLabel(MENU_ID_VIEW_SOURCE, L\"鿴Դ\");\n\t\tmodel->AddItem(MENU_ID_USER_SHOWDEVTOOLS, L\"߹\"); //\"&Show DevTools\");\t\t\t\t\t\t  \n\n\t}\n\tif (flag & CM_TYPEFLAG_EDITABLE)\n\t{//༭ҼϢ  \n\t\tmodel->SetLabel(MENU_ID_UNDO, L\"\");\n\t\tmodel->SetLabel(MENU_ID_REDO, L\"\");\n\t\tmodel->SetLabel(MENU_ID_CUT, L\"\");\n\t\tmodel->SetLabel(MENU_ID_COPY, L\"\");\n\t\tmodel->SetLabel(MENU_ID_PASTE, L\"ճ\");\n\t\tmodel->SetLabel(MENU_ID_DELETE, L\"ɾ\");\n\t\tmodel->SetLabel(MENU_ID_SELECT_ALL, L\"ȫѡ\");\n\t}\n\n}\n\nbool CCefClientHandler::OnContextMenuCommand(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefContextMenuParams> params, int command_id, EventFlags event_flags)\n{\n\t//CefString strLinkURL;\n\tCefString strURLLink;\n\tCefString* strTargetURL = nullptr;\n\tHGLOBAL hglbCopy;\n\tLPTSTR  lptstrCopy;\n\tint nBuffLength = 0;\n\n\n\tswitch (command_id)\n\t{\n\n\tcase MENU_ID_USER_OPENLINK:\n\n\t\tstrTargetURL = new CefString(params->GetLinkUrl());\n\t\t::PostMessage(hWnd_, UM_CEF_WEBLOADPOPUP, (WPARAM)0, (LPARAM)strTargetURL);\n\t\tbreak;\n\tcase MENU_ID_USER_COPYLINK:\n\n\t\tif (!OpenClipboard(frame->GetBrowser().get()->GetHost().get()->GetWindowHandle()))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tEmptyClipboard();\n\n\t\tstrURLLink = params->GetUnfilteredLinkUrl();\n\n\t\tif (strURLLink.length() != 0)\n\t\t{\n\t\t\tnBuffLength = (strURLLink.length() + 1) * sizeof(TCHAR);\n\n\t\t\thglbCopy = GlobalAlloc(GMEM_MOVEABLE, nBuffLength);\n\n\t\t\tif (hglbCopy == NULL)\n\t\t\t{\n\t\t\t\tCloseClipboard();\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t// Lock the handle and copy the text to the buffer. \n\n\t\t\tlptstrCopy = (LPTSTR)::GlobalLock(hglbCopy);\n\t\t\tmemset(lptstrCopy, '\\0', nBuffLength);\n\t\t\tmemcpy(lptstrCopy, strURLLink.c_str(), nBuffLength - sizeof(TCHAR));\n\n\t\t\tGlobalUnlock(hglbCopy); // \n\t\t\t// Place the handle on the clipboard. \n\n\t\t\t//SetClipboardData(CF_TEXT, hglbCopy);\n\t\t\tSetClipboardData(CF_UNICODETEXT, hglbCopy);// CF_UNICODETEXTΪUnicode  \n\n\t\t}\n\n\t\tCloseClipboard();\n\n\t\tbreak;\n\tcase MENU_ID_USER_SHOWDEVTOOLS:\n\t\tShowDevelopTools(browser, CefPoint());\n\t\treturn true;\n\n\tdefault:\n\t\tbreak;\n\t}\n\n\n\treturn false;\n}\n\n\n\nvoid CCefClientHandler::CloseHostBrowser(CefRefPtr<CefBrowser>browser, bool force_close)\n{\n\n\tif (!CefCurrentlyOn(TID_UI))\n\t{\n\t\t// Execute on the UI thread.\n\t\tCefPostTask(TID_UI, base::Bind(&CCefClientHandler::CloseHostBrowser, this, browser, force_close));\n\t\treturn;\n\t}\n\n\n\tint nID = browser->GetIdentifier();\n\n\t::PostMessage(hWnd_, UM_CEF_BROWSERCLOSE, nID, 0);\n\tbrowser->GetHost()->CloseBrowser(force_close);\n}\n\n\nvoid CCefClientHandler::CloseAllBrowsers(bool force_close)\n{\n\t//if (!CefCurrentlyOn(TID_UI))\n\t//{\n\t//\t// Execute on the UI thread.\n\t//\tCefPostTask(TID_UI, base::Bind(&CCefClientHandler::CloseAllBrowsers, this, force_close));\n\t//\treturn;\n\t//}\n\n\tlock_.Acquire();\n\tif (browser_list_.empty()) {\n\t\treturn;\n\t}\n\tBrowserList::const_iterator it = browser_list_.begin();\n\tfor (; it != browser_list_.end(); ++it)\n\t{\n\t\t(*it)->GetHost()->CloseBrowser(force_close);\n\n\t}\n\tlock_.Release();\n}\n\n\nbool CCefClientHandler::IsClosing() const\n{\n\treturn is_closing_;\n}\n\n\n\nvoid CCefClientHandler::ShowDevelopTools(CefRefPtr<CefBrowser> browser,const CefPoint& inspect_element_at) {CefWindowInfo windowInfo;CefBrowserSettings settings;\n\n#if defined(OS_WIN)\n//windowInfo.SetAsPopup(browser->GetHost()->GetWindowHandle(), \"DevTools\");\nRECT rc = { 0,0,800,600 };\n\twindowInfo.SetAsChild(hWnd_,rc);\n#endif\n\n\tbrowser->GetHost()->ShowDevTools(windowInfo, this, settings,inspect_element_at);\n}\n\nvoid CCefClientHandler::CloseDevelopTools(CefRefPtr<CefBrowser> browser)\n{\n\tbrowser->GetHost()->CloseDevTools();\n}\n"
  },
  {
    "path": "BrowserHandlers.h",
    "content": "#pragma once\n#include \"stdafx.h\"\n#include <list>\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n\n\nclass CCefClientHandler : public CefClient,public CefDisplayHandler,public CefLifeSpanHandler,public CefLoadHandler,public CefRequestHandler, public CefContextMenuHandler\n{\npublic:\n\tCCefClientHandler();\n\t~CCefClientHandler();\n\n\t// CefClient methods:\n\tvirtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() override;\n\n\tvirtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() override;\n\t\n\tvirtual CefRefPtr<CefLoadHandler> GetLoadHandler() override;\n\n\tvirtual CefRefPtr<CefRequestHandler> GetRequestHandler() override;\n\n\tvirtual CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() override{\n\t\treturn this;\n\t}\n\n\t// ----------------CefDisplayHandler methods:-------------------\n\tvirtual void OnTitleChange(CefRefPtr<CefBrowser> browser,const CefString& title) override;\n\n\t//---------------- CefLifeSpanHandler methods:----------------------------\n\tvirtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& target_url, const CefString& target_frame_name,\n\t\tCefLifeSpanHandler::WindowOpenDisposition target_disposition, bool user_gesture, const CefPopupFeatures& popupFeatures, CefWindowInfo& windowInfo, CefRefPtr<CefClient>& client, CefBrowserSettings& settings, bool* no_javascript_access) override;\n\n\tvirtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) override;\n\tvirtual bool DoClose(CefRefPtr<CefBrowser> browser) override;\n\tvirtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) override;\n\n\t// ----------------CefLoadHandler methods:---------------------------\n\tvirtual void OnLoadStart(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame) override;\n\tvirtual void OnLoadEnd(CefRefPtr<CefBrowser> browser,CefRefPtr<CefFrame> frame,int httpStatusCode) override;\n\tvirtual void OnLoadError(CefRefPtr<CefBrowser> browser,CefRefPtr<CefFrame> frame,ErrorCode errorCode,const CefString& errorText,const CefString& failedUrl) override;\n\t//-----------------\n\n\t//˵  \n\tvirtual void OnBeforeContextMenu(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,CefRefPtr<CefContextMenuParams> params, CefRefPtr<CefMenuModel> model) override;\n\n\tvirtual bool OnContextMenuCommand(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,CefRefPtr<CefContextMenuParams> params, int command_id, EventFlags event_flags) override;\n\n\tvoid CloseHostBrowser(CefRefPtr<CefBrowser>browser, bool force_close) ;\n\t// Request that all existing browser windows close.\n\tvoid CloseAllBrowsers(bool force_close);\n\n\tbool IsClosing() const;\n\n\n\tvoid ShowDevelopTools(CefRefPtr<CefBrowser> browser,const CefPoint& inspect_element_at);\n\tvoid CloseDevelopTools(CefRefPtr<CefBrowser> browser);\n\npublic:\n\t//CefRefPtr<CefBrowser> browser_;\n\n\tHWND hWnd_; //Ϣľ\n\tCefString strTitle_; //ַ\n\n\t// List of existing browser windows. Only accessed on the CEF UI thread.\n\ttypedef std::vector<CefRefPtr<CefBrowser> > BrowserList;\n\tBrowserList browser_list_;\n\nprivate:\n\n\tbool is_closing_;\n\n\t// Include the default reference counting implementation.\n\tIMPLEMENT_REFCOUNTING(CCefClientHandler);\n\t//CEFö̼ܹ߳бҪʹͱհ֤ڶ಻̰ͬ߳ȫĴݡIMPLEMENT_LOCKINGṩLock()Unlock()ԼAutoLock֤ͬͬ\n\tIMPLEMENT_LOCKING(CCefClientHandler);\n};\n\n\n"
  },
  {
    "path": "CEF/include/base/cef_atomic_ref_count.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// This is a low level implementation of atomic semantics for reference\n// counting.  Please use cef_ref_counted.h directly instead.\n//\n// The Chromium implementation includes annotations to avoid some false\n// positives when using data race detection tools. Annotations are not\n// currently supported by the CEF implementation.\n\n#ifndef CEF_INCLUDE_BASE_CEF_ATOMIC_REF_COUNT_H_\n#define CEF_INCLUDE_BASE_CEF_ATOMIC_REF_COUNT_H_\n#pragma once\n\n#if defined(BASE_ATOMIC_REF_COUNT_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/atomic_ref_count.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/base/cef_atomicops.h\"\n\n// Annotations are not currently supported.\n#define ANNOTATE_HAPPENS_BEFORE(obj) /* empty */\n#define ANNOTATE_HAPPENS_AFTER(obj) /* empty */\n\nnamespace base {\n\ntypedef subtle::Atomic32 AtomicRefCount;\n\n// Increment a reference count by \"increment\", which must exceed 0.\ninline void AtomicRefCountIncN(volatile AtomicRefCount *ptr,\n                               AtomicRefCount increment) {\n  subtle::NoBarrier_AtomicIncrement(ptr, increment);\n}\n\n// Decrement a reference count by \"decrement\", which must exceed 0,\n// and return whether the result is non-zero.\n// Insert barriers to ensure that state written before the reference count\n// became zero will be visible to a thread that has just made the count zero.\ninline bool AtomicRefCountDecN(volatile AtomicRefCount *ptr,\n                               AtomicRefCount decrement) {\n  ANNOTATE_HAPPENS_BEFORE(ptr);\n  bool res = (subtle::Barrier_AtomicIncrement(ptr, -decrement) != 0);\n  if (!res) {\n    ANNOTATE_HAPPENS_AFTER(ptr);\n  }\n  return res;\n}\n\n// Increment a reference count by 1.\ninline void AtomicRefCountInc(volatile AtomicRefCount *ptr) {\n  base::AtomicRefCountIncN(ptr, 1);\n}\n\n// Decrement a reference count by 1 and return whether the result is non-zero.\n// Insert barriers to ensure that state written before the reference count\n// became zero will be visible to a thread that has just made the count zero.\ninline bool AtomicRefCountDec(volatile AtomicRefCount *ptr) {\n  return base::AtomicRefCountDecN(ptr, 1);\n}\n\n// Return whether the reference count is one.  If the reference count is used\n// in the conventional way, a refrerence count of 1 implies that the current\n// thread owns the reference and no other thread shares it.  This call performs\n// the test for a reference count of one, and performs the memory barrier\n// needed for the owning thread to act on the object, knowing that it has\n// exclusive access to the object.\ninline bool AtomicRefCountIsOne(volatile AtomicRefCount *ptr) {\n  bool res = (subtle::Acquire_Load(ptr) == 1);\n  if (res) {\n    ANNOTATE_HAPPENS_AFTER(ptr);\n  }\n  return res;\n}\n\n// Return whether the reference count is zero.  With conventional object\n// referencing counting, the object will be destroyed, so the reference count\n// should never be zero.  Hence this is generally used for a debug check.\ninline bool AtomicRefCountIsZero(volatile AtomicRefCount *ptr) {\n  bool res = (subtle::Acquire_Load(ptr) == 0);\n  if (res) {\n    ANNOTATE_HAPPENS_AFTER(ptr);\n  }\n  return res;\n}\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_ATOMIC_REF_COUNT_H_\n"
  },
  {
    "path": "CEF/include/base/cef_atomicops.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// For atomic operations on reference counts, see cef_atomic_ref_count.h.\n\n// The routines exported by this module are subtle.  If you use them, even if\n// you get the code right, it will depend on careful reasoning about atomicity\n// and memory ordering; it will be less readable, and harder to maintain.  If\n// you plan to use these routines, you should have a good reason, such as solid\n// evidence that performance would otherwise suffer, or there being no\n// alternative.  You should assume only properties explicitly guaranteed by the\n// specifications in this file.  You are almost certainly _not_ writing code\n// just for the x86; if you assume x86 semantics, x86 hardware bugs and\n// implementations on other archtectures will cause your code to break.  If you\n// do not know what you are doing, avoid these routines, and use a Mutex.\n//\n// It is incorrect to make direct assignments to/from an atomic variable.\n// You should use one of the Load or Store routines.  The NoBarrier\n// versions are provided when no barriers are needed:\n//   NoBarrier_Store()\n//   NoBarrier_Load()\n// Although there are currently no compiler enforcement, you are encouraged\n// to use these.\n//\n\n#ifndef CEF_INCLUDE_BASE_CEF_ATOMICOPS_H_\n#define CEF_INCLUDE_BASE_CEF_ATOMICOPS_H_\n#pragma once\n\n#if defined(BASE_ATOMICOPS_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/atomicops.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include <stdint.h>\n\n#include \"include/base/cef_build.h\"\n\n#if defined(OS_WIN) && defined(ARCH_CPU_64_BITS)\n// windows.h #defines this (only on x64). This causes problems because the\n// public API also uses MemoryBarrier at the public name for this fence. So, on\n// X64, undef it, and call its documented\n// (http://msdn.microsoft.com/en-us/library/windows/desktop/ms684208.aspx)\n// implementation directly.\n#undef MemoryBarrier\n#endif\n\nnamespace base {\nnamespace subtle {\n\ntypedef int32_t Atomic32;\n#ifdef ARCH_CPU_64_BITS\n// We need to be able to go between Atomic64 and AtomicWord implicitly.  This\n// means Atomic64 and AtomicWord should be the same type on 64-bit.\n#if defined(__ILP32__) || defined(OS_NACL)\n// NaCl's intptr_t is not actually 64-bits on 64-bit!\n// http://code.google.com/p/nativeclient/issues/detail?id=1162\ntypedef int64_t Atomic64;\n#else\ntypedef intptr_t Atomic64;\n#endif\n#endif\n\n// Use AtomicWord for a machine-sized pointer.  It will use the Atomic32 or\n// Atomic64 routines below, depending on your architecture.\ntypedef intptr_t AtomicWord;\n\n// Atomically execute:\n//      result = *ptr;\n//      if (*ptr == old_value)\n//        *ptr = new_value;\n//      return result;\n//\n// I.e., replace \"*ptr\" with \"new_value\" if \"*ptr\" used to be \"old_value\".\n// Always return the old value of \"*ptr\"\n//\n// This routine implies no memory barriers.\nAtomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,\n                                  Atomic32 old_value,\n                                  Atomic32 new_value);\n\n// Atomically store new_value into *ptr, returning the previous value held in\n// *ptr.  This routine implies no memory barriers.\nAtomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, Atomic32 new_value);\n\n// Atomically increment *ptr by \"increment\".  Returns the new value of\n// *ptr with the increment applied.  This routine implies no memory barriers.\nAtomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, Atomic32 increment);\n\nAtomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,\n                                 Atomic32 increment);\n\n// These following lower-level operations are typically useful only to people\n// implementing higher-level synchronization operations like spinlocks,\n// mutexes, and condition-variables.  They combine CompareAndSwap(), a load, or\n// a store with appropriate memory-ordering instructions.  \"Acquire\" operations\n// ensure that no later memory access can be reordered ahead of the operation.\n// \"Release\" operations ensure that no previous memory access can be reordered\n// after the operation.  \"Barrier\" operations have both \"Acquire\" and \"Release\"\n// semantics.   A MemoryBarrier() has \"Barrier\" semantics, but does no memory\n// access.\nAtomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,\n                                Atomic32 old_value,\n                                Atomic32 new_value);\nAtomic32 Release_CompareAndSwap(volatile Atomic32* ptr,\n                                Atomic32 old_value,\n                                Atomic32 new_value);\n\nvoid MemoryBarrier();\nvoid NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value);\nvoid Acquire_Store(volatile Atomic32* ptr, Atomic32 value);\nvoid Release_Store(volatile Atomic32* ptr, Atomic32 value);\n\nAtomic32 NoBarrier_Load(volatile const Atomic32* ptr);\nAtomic32 Acquire_Load(volatile const Atomic32* ptr);\nAtomic32 Release_Load(volatile const Atomic32* ptr);\n\n// 64-bit atomic operations (only available on 64-bit processors).\n#ifdef ARCH_CPU_64_BITS\nAtomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,\n                                  Atomic64 old_value,\n                                  Atomic64 new_value);\nAtomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr, Atomic64 new_value);\nAtomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment);\nAtomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment);\n\nAtomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,\n                                Atomic64 old_value,\n                                Atomic64 new_value);\nAtomic64 Release_CompareAndSwap(volatile Atomic64* ptr,\n                                Atomic64 old_value,\n                                Atomic64 new_value);\nvoid NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value);\nvoid Acquire_Store(volatile Atomic64* ptr, Atomic64 value);\nvoid Release_Store(volatile Atomic64* ptr, Atomic64 value);\nAtomic64 NoBarrier_Load(volatile const Atomic64* ptr);\nAtomic64 Acquire_Load(volatile const Atomic64* ptr);\nAtomic64 Release_Load(volatile const Atomic64* ptr);\n#endif  // ARCH_CPU_64_BITS\n\n}  // namespace subtle\n}  // namespace base\n\n// Include our platform specific implementation.\n#if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY)\n#include \"include/base/internal/cef_atomicops_x86_msvc.h\"\n#elif defined(OS_MACOSX)\n#include \"include/base/internal/cef_atomicops_mac.h\"\n#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY)\n#include \"include/base/internal/cef_atomicops_x86_gcc.h\"\n#else\n#error \"Atomic operations are not supported on your platform\"\n#endif\n\n// On some platforms we need additional declarations to make\n// AtomicWord compatible with our other Atomic* types.\n#if defined(OS_MACOSX) || defined(OS_OPENBSD)\n#include \"include/base/internal/cef_atomicops_atomicword_compat.h\"\n#endif\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_ATOMICOPS_H_\n"
  },
  {
    "path": "CEF/include/base/cef_basictypes.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_BASE_CEF_BASICTYPES_H_\n#define CEF_INCLUDE_BASE_CEF_BASICTYPES_H_\n#pragma once\n\n#include <limits.h>         // For UINT_MAX\n#include <stddef.h>         // For size_t\n\n#include \"include/base/cef_build.h\"\n\n// The NSPR system headers define 64-bit as |long| when possible, except on\n// Mac OS X.  In order to not have typedef mismatches, we do the same on LP64.\n//\n// On Mac OS X, |long long| is used for 64-bit types for compatibility with\n// <inttypes.h> format macros even in the LP64 model.\n#if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)\ntypedef long                int64;  // NOLINT(runtime/int)\ntypedef unsigned long       uint64;  // NOLINT(runtime/int)\n#else\ntypedef long long           int64;  // NOLINT(runtime/int)\ntypedef unsigned long long  uint64;  // NOLINT(runtime/int)\n#endif\n\n// TODO: Remove these type guards.  These are to avoid conflicts with\n// obsolete/protypes.h in the Gecko SDK.\n#ifndef _INT32\n#define _INT32\ntypedef int                 int32;\n#endif\n\n// TODO: Remove these type guards.  These are to avoid conflicts with\n// obsolete/protypes.h in the Gecko SDK.\n#ifndef _UINT32\n#define _UINT32\ntypedef unsigned int       uint32;\n#endif\n\n// UTF-16 character type.\n// This should be kept synchronized with base/strings/string16.h\n#ifndef char16\n#if defined(WCHAR_T_IS_UTF16)\ntypedef wchar_t             char16;\n#elif defined(WCHAR_T_IS_UTF32)\ntypedef unsigned short      char16;\n#endif\n#endif\n\n#endif  // CEF_INCLUDE_BASE_CEF_BASICTYPES_H_\n"
  },
  {
    "path": "CEF/include/base/cef_bind.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_BASE_CEF_BIND_H_\n#define CEF_INCLUDE_BASE_CEF_BIND_H_\n#pragma once\n\n#if defined(BASE_BIND_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/bind.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/base/internal/cef_bind_internal.h\"\n#include \"include/base/internal/cef_callback_internal.h\"\n\n// -----------------------------------------------------------------------------\n// Usage documentation\n// -----------------------------------------------------------------------------\n//\n// See base/cef_callback.h for documentation.\n//\n//\n// -----------------------------------------------------------------------------\n// Implementation notes\n// -----------------------------------------------------------------------------\n//\n// If you're reading the implementation, before proceeding further, you should\n// read the top comment of base/bind_internal.h for a definition of common\n// terms and concepts.\n//\n// RETURN TYPES\n//\n// Though Bind()'s result is meant to be stored in a Callback<> type, it\n// cannot actually return the exact type without requiring a large amount\n// of extra template specializations. The problem is that in order to\n// discern the correct specialization of Callback<>, Bind would need to\n// unwrap the function signature to determine the signature's arity, and\n// whether or not it is a method.\n//\n// Each unique combination of (arity, function_type, num_prebound) where\n// function_type is one of {function, method, const_method} would require\n// one specialization.  We eventually have to do a similar number of\n// specializations anyways in the implementation (see the Invoker<>,\n// classes).  However, it is avoidable in Bind if we return the result\n// via an indirection like we do below.\n//\n// TODO(ajwong): We might be able to avoid this now, but need to test.\n//\n// It is possible to move most of the COMPILE_ASSERT asserts into BindState<>,\n// but it feels a little nicer to have the asserts here so people do not\n// need to crack open bind_internal.h.  On the other hand, it makes Bind()\n// harder to read.\n\nnamespace base {\n\ntemplate <typename Functor>\nbase::Callback<\n    typename cef_internal::BindState<\n        typename cef_internal::FunctorTraits<Functor>::RunnableType,\n        typename cef_internal::FunctorTraits<Functor>::RunType,\n        void()>\n            ::UnboundRunType>\nBind(Functor functor) {\n  // Typedefs for how to store and run the functor.\n  typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;\n  typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;\n\n  typedef cef_internal::BindState<RunnableType, RunType, void()> BindState;\n\n\n  return Callback<typename BindState::UnboundRunType>(\n      new BindState(cef_internal::MakeRunnable(functor)));\n}\n\ntemplate <typename Functor, typename P1>\nbase::Callback<\n    typename cef_internal::BindState<\n        typename cef_internal::FunctorTraits<Functor>::RunnableType,\n        typename cef_internal::FunctorTraits<Functor>::RunType,\n        void(typename cef_internal::CallbackParamTraits<P1>::StorageType)>\n            ::UnboundRunType>\nBind(Functor functor, const P1& p1) {\n  // Typedefs for how to store and run the functor.\n  typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;\n  typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;\n\n  // Use RunnableType::RunType instead of RunType above because our\n  // checks should below for bound references need to know what the actual\n  // functor is going to interpret the argument as.\n  typedef cef_internal::FunctionTraits<typename RunnableType::RunType>\n      BoundFunctorTraits;\n\n  // Do not allow binding a non-const reference parameter. Non-const reference\n  // parameters are disallowed by the Google style guide.  Also, binding a\n  // non-const reference parameter can make for subtle bugs because the\n  // invoked function will receive a reference to the stored copy of the\n  // argument and not the original.\n  COMPILE_ASSERT(\n      !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ),\n      do_not_bind_functions_with_nonconst_ref);\n\n  // For methods, we need to be careful for parameter 1.  We do not require\n  // a scoped_refptr because BindState<> itself takes care of AddRef() for\n  // methods. We also disallow binding of an array as the method's target\n  // object.\n  COMPILE_ASSERT(\n      cef_internal::HasIsMethodTag<RunnableType>::value ||\n          !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,\n      p1_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||\n                     !is_array<P1>::value,\n                 first_bound_argument_to_method_cannot_be_array);\n  typedef cef_internal::BindState<RunnableType, RunType,\n      void(typename cef_internal::CallbackParamTraits<P1>::StorageType)> BindState;\n\n\n  return Callback<typename BindState::UnboundRunType>(\n      new BindState(cef_internal::MakeRunnable(functor), p1));\n}\n\ntemplate <typename Functor, typename P1, typename P2>\nbase::Callback<\n    typename cef_internal::BindState<\n        typename cef_internal::FunctorTraits<Functor>::RunnableType,\n        typename cef_internal::FunctorTraits<Functor>::RunType,\n        void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n            typename cef_internal::CallbackParamTraits<P2>::StorageType)>\n            ::UnboundRunType>\nBind(Functor functor, const P1& p1, const P2& p2) {\n  // Typedefs for how to store and run the functor.\n  typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;\n  typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;\n\n  // Use RunnableType::RunType instead of RunType above because our\n  // checks should below for bound references need to know what the actual\n  // functor is going to interpret the argument as.\n  typedef cef_internal::FunctionTraits<typename RunnableType::RunType>\n      BoundFunctorTraits;\n\n  // Do not allow binding a non-const reference parameter. Non-const reference\n  // parameters are disallowed by the Google style guide.  Also, binding a\n  // non-const reference parameter can make for subtle bugs because the\n  // invoked function will receive a reference to the stored copy of the\n  // argument and not the original.\n  COMPILE_ASSERT(\n      !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ),\n      do_not_bind_functions_with_nonconst_ref);\n\n  // For methods, we need to be careful for parameter 1.  We do not require\n  // a scoped_refptr because BindState<> itself takes care of AddRef() for\n  // methods. We also disallow binding of an array as the method's target\n  // object.\n  COMPILE_ASSERT(\n      cef_internal::HasIsMethodTag<RunnableType>::value ||\n          !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,\n      p1_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||\n                     !is_array<P1>::value,\n                 first_bound_argument_to_method_cannot_be_array);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,\n                 p2_is_refcounted_type_and_needs_scoped_refptr);\n  typedef cef_internal::BindState<RunnableType, RunType,\n      void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n      typename cef_internal::CallbackParamTraits<P2>::StorageType)> BindState;\n\n\n  return Callback<typename BindState::UnboundRunType>(\n      new BindState(cef_internal::MakeRunnable(functor), p1, p2));\n}\n\ntemplate <typename Functor, typename P1, typename P2, typename P3>\nbase::Callback<\n    typename cef_internal::BindState<\n        typename cef_internal::FunctorTraits<Functor>::RunnableType,\n        typename cef_internal::FunctorTraits<Functor>::RunType,\n        void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n            typename cef_internal::CallbackParamTraits<P2>::StorageType,\n            typename cef_internal::CallbackParamTraits<P3>::StorageType)>\n            ::UnboundRunType>\nBind(Functor functor, const P1& p1, const P2& p2, const P3& p3) {\n  // Typedefs for how to store and run the functor.\n  typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;\n  typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;\n\n  // Use RunnableType::RunType instead of RunType above because our\n  // checks should below for bound references need to know what the actual\n  // functor is going to interpret the argument as.\n  typedef cef_internal::FunctionTraits<typename RunnableType::RunType>\n      BoundFunctorTraits;\n\n  // Do not allow binding a non-const reference parameter. Non-const reference\n  // parameters are disallowed by the Google style guide.  Also, binding a\n  // non-const reference parameter can make for subtle bugs because the\n  // invoked function will receive a reference to the stored copy of the\n  // argument and not the original.\n  COMPILE_ASSERT(\n      !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A3Type>::value ),\n      do_not_bind_functions_with_nonconst_ref);\n\n  // For methods, we need to be careful for parameter 1.  We do not require\n  // a scoped_refptr because BindState<> itself takes care of AddRef() for\n  // methods. We also disallow binding of an array as the method's target\n  // object.\n  COMPILE_ASSERT(\n      cef_internal::HasIsMethodTag<RunnableType>::value ||\n          !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,\n      p1_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||\n                     !is_array<P1>::value,\n                 first_bound_argument_to_method_cannot_be_array);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,\n                 p2_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,\n                 p3_is_refcounted_type_and_needs_scoped_refptr);\n  typedef cef_internal::BindState<RunnableType, RunType,\n      void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n      typename cef_internal::CallbackParamTraits<P2>::StorageType,\n      typename cef_internal::CallbackParamTraits<P3>::StorageType)> BindState;\n\n\n  return Callback<typename BindState::UnboundRunType>(\n      new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3));\n}\n\ntemplate <typename Functor, typename P1, typename P2, typename P3, typename P4>\nbase::Callback<\n    typename cef_internal::BindState<\n        typename cef_internal::FunctorTraits<Functor>::RunnableType,\n        typename cef_internal::FunctorTraits<Functor>::RunType,\n        void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n            typename cef_internal::CallbackParamTraits<P2>::StorageType,\n            typename cef_internal::CallbackParamTraits<P3>::StorageType,\n            typename cef_internal::CallbackParamTraits<P4>::StorageType)>\n            ::UnboundRunType>\nBind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4) {\n  // Typedefs for how to store and run the functor.\n  typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;\n  typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;\n\n  // Use RunnableType::RunType instead of RunType above because our\n  // checks should below for bound references need to know what the actual\n  // functor is going to interpret the argument as.\n  typedef cef_internal::FunctionTraits<typename RunnableType::RunType>\n      BoundFunctorTraits;\n\n  // Do not allow binding a non-const reference parameter. Non-const reference\n  // parameters are disallowed by the Google style guide.  Also, binding a\n  // non-const reference parameter can make for subtle bugs because the\n  // invoked function will receive a reference to the stored copy of the\n  // argument and not the original.\n  COMPILE_ASSERT(\n      !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A3Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A4Type>::value ),\n      do_not_bind_functions_with_nonconst_ref);\n\n  // For methods, we need to be careful for parameter 1.  We do not require\n  // a scoped_refptr because BindState<> itself takes care of AddRef() for\n  // methods. We also disallow binding of an array as the method's target\n  // object.\n  COMPILE_ASSERT(\n      cef_internal::HasIsMethodTag<RunnableType>::value ||\n          !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,\n      p1_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||\n                     !is_array<P1>::value,\n                 first_bound_argument_to_method_cannot_be_array);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,\n                 p2_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,\n                 p3_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,\n                 p4_is_refcounted_type_and_needs_scoped_refptr);\n  typedef cef_internal::BindState<RunnableType, RunType,\n      void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n      typename cef_internal::CallbackParamTraits<P2>::StorageType,\n      typename cef_internal::CallbackParamTraits<P3>::StorageType,\n      typename cef_internal::CallbackParamTraits<P4>::StorageType)> BindState;\n\n\n  return Callback<typename BindState::UnboundRunType>(\n      new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4));\n}\n\ntemplate <typename Functor, typename P1, typename P2, typename P3, typename P4,\n    typename P5>\nbase::Callback<\n    typename cef_internal::BindState<\n        typename cef_internal::FunctorTraits<Functor>::RunnableType,\n        typename cef_internal::FunctorTraits<Functor>::RunType,\n        void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n            typename cef_internal::CallbackParamTraits<P2>::StorageType,\n            typename cef_internal::CallbackParamTraits<P3>::StorageType,\n            typename cef_internal::CallbackParamTraits<P4>::StorageType,\n            typename cef_internal::CallbackParamTraits<P5>::StorageType)>\n            ::UnboundRunType>\nBind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4,\n    const P5& p5) {\n  // Typedefs for how to store and run the functor.\n  typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;\n  typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;\n\n  // Use RunnableType::RunType instead of RunType above because our\n  // checks should below for bound references need to know what the actual\n  // functor is going to interpret the argument as.\n  typedef cef_internal::FunctionTraits<typename RunnableType::RunType>\n      BoundFunctorTraits;\n\n  // Do not allow binding a non-const reference parameter. Non-const reference\n  // parameters are disallowed by the Google style guide.  Also, binding a\n  // non-const reference parameter can make for subtle bugs because the\n  // invoked function will receive a reference to the stored copy of the\n  // argument and not the original.\n  COMPILE_ASSERT(\n      !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A3Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A4Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A5Type>::value ),\n      do_not_bind_functions_with_nonconst_ref);\n\n  // For methods, we need to be careful for parameter 1.  We do not require\n  // a scoped_refptr because BindState<> itself takes care of AddRef() for\n  // methods. We also disallow binding of an array as the method's target\n  // object.\n  COMPILE_ASSERT(\n      cef_internal::HasIsMethodTag<RunnableType>::value ||\n          !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,\n      p1_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||\n                     !is_array<P1>::value,\n                 first_bound_argument_to_method_cannot_be_array);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,\n                 p2_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,\n                 p3_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,\n                 p4_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,\n                 p5_is_refcounted_type_and_needs_scoped_refptr);\n  typedef cef_internal::BindState<RunnableType, RunType,\n      void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n      typename cef_internal::CallbackParamTraits<P2>::StorageType,\n      typename cef_internal::CallbackParamTraits<P3>::StorageType,\n      typename cef_internal::CallbackParamTraits<P4>::StorageType,\n      typename cef_internal::CallbackParamTraits<P5>::StorageType)> BindState;\n\n\n  return Callback<typename BindState::UnboundRunType>(\n      new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4, p5));\n}\n\ntemplate <typename Functor, typename P1, typename P2, typename P3, typename P4,\n    typename P5, typename P6>\nbase::Callback<\n    typename cef_internal::BindState<\n        typename cef_internal::FunctorTraits<Functor>::RunnableType,\n        typename cef_internal::FunctorTraits<Functor>::RunType,\n        void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n            typename cef_internal::CallbackParamTraits<P2>::StorageType,\n            typename cef_internal::CallbackParamTraits<P3>::StorageType,\n            typename cef_internal::CallbackParamTraits<P4>::StorageType,\n            typename cef_internal::CallbackParamTraits<P5>::StorageType,\n            typename cef_internal::CallbackParamTraits<P6>::StorageType)>\n            ::UnboundRunType>\nBind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4,\n    const P5& p5, const P6& p6) {\n  // Typedefs for how to store and run the functor.\n  typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;\n  typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;\n\n  // Use RunnableType::RunType instead of RunType above because our\n  // checks should below for bound references need to know what the actual\n  // functor is going to interpret the argument as.\n  typedef cef_internal::FunctionTraits<typename RunnableType::RunType>\n      BoundFunctorTraits;\n\n  // Do not allow binding a non-const reference parameter. Non-const reference\n  // parameters are disallowed by the Google style guide.  Also, binding a\n  // non-const reference parameter can make for subtle bugs because the\n  // invoked function will receive a reference to the stored copy of the\n  // argument and not the original.\n  COMPILE_ASSERT(\n      !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A3Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A4Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A5Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A6Type>::value ),\n      do_not_bind_functions_with_nonconst_ref);\n\n  // For methods, we need to be careful for parameter 1.  We do not require\n  // a scoped_refptr because BindState<> itself takes care of AddRef() for\n  // methods. We also disallow binding of an array as the method's target\n  // object.\n  COMPILE_ASSERT(\n      cef_internal::HasIsMethodTag<RunnableType>::value ||\n          !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,\n      p1_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||\n                     !is_array<P1>::value,\n                 first_bound_argument_to_method_cannot_be_array);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,\n                 p2_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,\n                 p3_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,\n                 p4_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,\n                 p5_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P6>::value,\n                 p6_is_refcounted_type_and_needs_scoped_refptr);\n  typedef cef_internal::BindState<RunnableType, RunType,\n      void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n      typename cef_internal::CallbackParamTraits<P2>::StorageType,\n      typename cef_internal::CallbackParamTraits<P3>::StorageType,\n      typename cef_internal::CallbackParamTraits<P4>::StorageType,\n      typename cef_internal::CallbackParamTraits<P5>::StorageType,\n      typename cef_internal::CallbackParamTraits<P6>::StorageType)> BindState;\n\n\n  return Callback<typename BindState::UnboundRunType>(\n      new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6));\n}\n\ntemplate <typename Functor, typename P1, typename P2, typename P3, typename P4,\n    typename P5, typename P6, typename P7>\nbase::Callback<\n    typename cef_internal::BindState<\n        typename cef_internal::FunctorTraits<Functor>::RunnableType,\n        typename cef_internal::FunctorTraits<Functor>::RunType,\n        void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n            typename cef_internal::CallbackParamTraits<P2>::StorageType,\n            typename cef_internal::CallbackParamTraits<P3>::StorageType,\n            typename cef_internal::CallbackParamTraits<P4>::StorageType,\n            typename cef_internal::CallbackParamTraits<P5>::StorageType,\n            typename cef_internal::CallbackParamTraits<P6>::StorageType,\n            typename cef_internal::CallbackParamTraits<P7>::StorageType)>\n            ::UnboundRunType>\nBind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4,\n    const P5& p5, const P6& p6, const P7& p7) {\n  // Typedefs for how to store and run the functor.\n  typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;\n  typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;\n\n  // Use RunnableType::RunType instead of RunType above because our\n  // checks should below for bound references need to know what the actual\n  // functor is going to interpret the argument as.\n  typedef cef_internal::FunctionTraits<typename RunnableType::RunType>\n      BoundFunctorTraits;\n\n  // Do not allow binding a non-const reference parameter. Non-const reference\n  // parameters are disallowed by the Google style guide.  Also, binding a\n  // non-const reference parameter can make for subtle bugs because the\n  // invoked function will receive a reference to the stored copy of the\n  // argument and not the original.\n  COMPILE_ASSERT(\n      !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A3Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A4Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A5Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A6Type>::value ||\n          is_non_const_reference<typename BoundFunctorTraits::A7Type>::value ),\n      do_not_bind_functions_with_nonconst_ref);\n\n  // For methods, we need to be careful for parameter 1.  We do not require\n  // a scoped_refptr because BindState<> itself takes care of AddRef() for\n  // methods. We also disallow binding of an array as the method's target\n  // object.\n  COMPILE_ASSERT(\n      cef_internal::HasIsMethodTag<RunnableType>::value ||\n          !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,\n      p1_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||\n                     !is_array<P1>::value,\n                 first_bound_argument_to_method_cannot_be_array);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,\n                 p2_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,\n                 p3_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,\n                 p4_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,\n                 p5_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P6>::value,\n                 p6_is_refcounted_type_and_needs_scoped_refptr);\n  COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P7>::value,\n                 p7_is_refcounted_type_and_needs_scoped_refptr);\n  typedef cef_internal::BindState<RunnableType, RunType,\n      void(typename cef_internal::CallbackParamTraits<P1>::StorageType,\n      typename cef_internal::CallbackParamTraits<P2>::StorageType,\n      typename cef_internal::CallbackParamTraits<P3>::StorageType,\n      typename cef_internal::CallbackParamTraits<P4>::StorageType,\n      typename cef_internal::CallbackParamTraits<P5>::StorageType,\n      typename cef_internal::CallbackParamTraits<P6>::StorageType,\n      typename cef_internal::CallbackParamTraits<P7>::StorageType)> BindState;\n\n\n  return Callback<typename BindState::UnboundRunType>(\n      new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6,\n          p7));\n}\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_BIND_H_\n"
  },
  {
    "path": "CEF/include/base/cef_bind_helpers.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// This defines a set of argument wrappers and related factory methods that\n// can be used specify the refcounting and reference semantics of arguments\n// that are bound by the Bind() function in base/bind.h.\n//\n// It also defines a set of simple functions and utilities that people want\n// when using Callback<> and Bind().\n//\n//\n// ARGUMENT BINDING WRAPPERS\n//\n// The wrapper functions are base::Unretained(), base::Owned(), base::Passed(),\n// base::ConstRef(), and base::IgnoreResult().\n//\n// Unretained() allows Bind() to bind a non-refcounted class, and to disable\n// refcounting on arguments that are refcounted objects.\n//\n// Owned() transfers ownership of an object to the Callback resulting from\n// bind; the object will be deleted when the Callback is deleted.\n//\n// Passed() is for transferring movable-but-not-copyable types (eg. scoped_ptr)\n// through a Callback. Logically, this signifies a destructive transfer of\n// the state of the argument into the target function.  Invoking\n// Callback::Run() twice on a Callback that was created with a Passed()\n// argument will CHECK() because the first invocation would have already\n// transferred ownership to the target function.\n//\n// ConstRef() allows binding a constant reference to an argument rather\n// than a copy.\n//\n// IgnoreResult() is used to adapt a function or Callback with a return type to\n// one with a void return. This is most useful if you have a function with,\n// say, a pesky ignorable bool return that you want to use with PostTask or\n// something else that expect a Callback with a void return.\n//\n// EXAMPLE OF Unretained():\n//\n//   class Foo {\n//    public:\n//     void func() { cout << \"Foo:f\" << endl; }\n//   };\n//\n//   // In some function somewhere.\n//   Foo foo;\n//   Closure foo_callback =\n//       Bind(&Foo::func, Unretained(&foo));\n//   foo_callback.Run();  // Prints \"Foo:f\".\n//\n// Without the Unretained() wrapper on |&foo|, the above call would fail\n// to compile because Foo does not support the AddRef() and Release() methods.\n//\n//\n// EXAMPLE OF Owned():\n//\n//   void foo(int* arg) { cout << *arg << endl }\n//\n//   int* pn = new int(1);\n//   Closure foo_callback = Bind(&foo, Owned(pn));\n//\n//   foo_callback.Run();  // Prints \"1\"\n//   foo_callback.Run();  // Prints \"1\"\n//   *n = 2;\n//   foo_callback.Run();  // Prints \"2\"\n//\n//   foo_callback.Reset();  // |pn| is deleted.  Also will happen when\n//                          // |foo_callback| goes out of scope.\n//\n// Without Owned(), someone would have to know to delete |pn| when the last\n// reference to the Callback is deleted.\n//\n//\n// EXAMPLE OF ConstRef():\n//\n//   void foo(int arg) { cout << arg << endl }\n//\n//   int n = 1;\n//   Closure no_ref = Bind(&foo, n);\n//   Closure has_ref = Bind(&foo, ConstRef(n));\n//\n//   no_ref.Run();  // Prints \"1\"\n//   has_ref.Run();  // Prints \"1\"\n//\n//   n = 2;\n//   no_ref.Run();  // Prints \"1\"\n//   has_ref.Run();  // Prints \"2\"\n//\n// Note that because ConstRef() takes a reference on |n|, |n| must outlive all\n// its bound callbacks.\n//\n//\n// EXAMPLE OF IgnoreResult():\n//\n//   int DoSomething(int arg) { cout << arg << endl; }\n//\n//   // Assign to a Callback with a void return type.\n//   Callback<void(int)> cb = Bind(IgnoreResult(&DoSomething));\n//   cb->Run(1);  // Prints \"1\".\n//\n//   // Prints \"1\" on |ml|.\n//   ml->PostTask(FROM_HERE, Bind(IgnoreResult(&DoSomething), 1);\n//\n//\n// EXAMPLE OF Passed():\n//\n//   void TakesOwnership(scoped_ptr<Foo> arg) { }\n//   scoped_ptr<Foo> CreateFoo() { return scoped_ptr<Foo>(new Foo()); }\n//\n//   scoped_ptr<Foo> f(new Foo());\n//\n//   // |cb| is given ownership of Foo(). |f| is now NULL.\n//   // You can use f.Pass() in place of &f, but it's more verbose.\n//   Closure cb = Bind(&TakesOwnership, Passed(&f));\n//\n//   // Run was never called so |cb| still owns Foo() and deletes\n//   // it on Reset().\n//   cb.Reset();\n//\n//   // |cb| is given a new Foo created by CreateFoo().\n//   cb = Bind(&TakesOwnership, Passed(CreateFoo()));\n//\n//   // |arg| in TakesOwnership() is given ownership of Foo(). |cb|\n//   // no longer owns Foo() and, if reset, would not delete Foo().\n//   cb.Run();  // Foo() is now transferred to |arg| and deleted.\n//   cb.Run();  // This CHECK()s since Foo() already been used once.\n//\n// Passed() is particularly useful with PostTask() when you are transferring\n// ownership of an argument into a task, but don't necessarily know if the\n// task will always be executed. This can happen if the task is cancellable\n// or if it is posted to a MessageLoopProxy.\n//\n//\n// SIMPLE FUNCTIONS AND UTILITIES.\n//\n//   DoNothing() - Useful for creating a Closure that does nothing when called.\n//   DeletePointer<T>() - Useful for creating a Closure that will delete a\n//                        pointer when invoked. Only use this when necessary.\n//                        In most cases MessageLoop::DeleteSoon() is a better\n//                        fit.\n\n#ifndef CEF_INCLUDE_BASE_CEF_BIND_HELPERS_H_\n#define CEF_INCLUDE_BASE_CEF_BIND_HELPERS_H_\n#pragma once\n\n#if defined(BASE_BIND_HELPERS_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/bind_helpers.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/base/cef_basictypes.h\"\n#include \"include/base/cef_callback.h\"\n#include \"include/base/cef_template_util.h\"\n#include \"include/base/cef_weak_ptr.h\"\n\nnamespace base {\nnamespace cef_internal {\n\n// Use the Substitution Failure Is Not An Error (SFINAE) trick to inspect T\n// for the existence of AddRef() and Release() functions of the correct\n// signature.\n//\n// http://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error\n// http://stackoverflow.com/questions/257288/is-it-possible-to-write-a-c-template-to-check-for-a-functions-existence\n// http://stackoverflow.com/questions/4358584/sfinae-approach-comparison\n// http://stackoverflow.com/questions/1966362/sfinae-to-check-for-inherited-member-functions\n//\n// The last link in particular show the method used below.\n//\n// For SFINAE to work with inherited methods, we need to pull some extra tricks\n// with multiple inheritance.  In the more standard formulation, the overloads\n// of Check would be:\n//\n//   template <typename C>\n//   Yes NotTheCheckWeWant(Helper<&C::TargetFunc>*);\n//\n//   template <typename C>\n//   No NotTheCheckWeWant(...);\n//\n//   static const bool value = sizeof(NotTheCheckWeWant<T>(0)) == sizeof(Yes);\n//\n// The problem here is that template resolution will not match\n// C::TargetFunc if TargetFunc does not exist directly in C.  That is, if\n// TargetFunc in inherited from an ancestor, &C::TargetFunc will not match,\n// |value| will be false.  This formulation only checks for whether or\n// not TargetFunc exist directly in the class being introspected.\n//\n// To get around this, we play a dirty trick with multiple inheritance.\n// First, We create a class BaseMixin that declares each function that we\n// want to probe for.  Then we create a class Base that inherits from both T\n// (the class we wish to probe) and BaseMixin.  Note that the function\n// signature in BaseMixin does not need to match the signature of the function\n// we are probing for; thus it's easiest to just use void(void).\n//\n// Now, if TargetFunc exists somewhere in T, then &Base::TargetFunc has an\n// ambiguous resolution between BaseMixin and T.  This lets us write the\n// following:\n//\n//   template <typename C>\n//   No GoodCheck(Helper<&C::TargetFunc>*);\n//\n//   template <typename C>\n//   Yes GoodCheck(...);\n//\n//   static const bool value = sizeof(GoodCheck<Base>(0)) == sizeof(Yes);\n//\n// Notice here that the variadic version of GoodCheck() returns Yes here\n// instead of No like the previous one. Also notice that we calculate |value|\n// by specializing GoodCheck() on Base instead of T.\n//\n// We've reversed the roles of the variadic, and Helper overloads.\n// GoodCheck(Helper<&C::TargetFunc>*), when C = Base, fails to be a valid\n// substitution if T::TargetFunc exists. Thus GoodCheck<Base>(0) will resolve\n// to the variadic version if T has TargetFunc.  If T::TargetFunc does not\n// exist, then &C::TargetFunc is not ambiguous, and the overload resolution\n// will prefer GoodCheck(Helper<&C::TargetFunc>*).\n//\n// This method of SFINAE will correctly probe for inherited names, but it cannot\n// typecheck those names.  It's still a good enough sanity check though.\n//\n// Works on gcc-4.2, gcc-4.4, and Visual Studio 2008.\n//\n// TODO(ajwong): Move to ref_counted.h or template_util.h when we've vetted\n// this works well.\n//\n// TODO(ajwong): Make this check for Release() as well.\n// See http://crbug.com/82038.\ntemplate <typename T>\nclass SupportsAddRefAndRelease {\n  typedef char Yes[1];\n  typedef char No[2];\n\n  struct BaseMixin {\n    void AddRef();\n  };\n\n// MSVC warns when you try to use Base if T has a private destructor, the\n// common pattern for refcounted types. It does this even though no attempt to\n// instantiate Base is made.  We disable the warning for this definition.\n#if defined(OS_WIN)\n#pragma warning(push)\n#pragma warning(disable:4624)\n#endif\n  struct Base : public T, public BaseMixin {\n  };\n#if defined(OS_WIN)\n#pragma warning(pop)\n#endif\n\n  template <void(BaseMixin::*)(void)> struct Helper {};\n\n  template <typename C>\n  static No& Check(Helper<&C::AddRef>*);\n\n  template <typename >\n  static Yes& Check(...);\n\n public:\n  static const bool value = sizeof(Check<Base>(0)) == sizeof(Yes);\n};\n\n// Helpers to assert that arguments of a recounted type are bound with a\n// scoped_refptr.\ntemplate <bool IsClasstype, typename T>\nstruct UnsafeBindtoRefCountedArgHelper : false_type {\n};\n\ntemplate <typename T>\nstruct UnsafeBindtoRefCountedArgHelper<true, T>\n    : integral_constant<bool, SupportsAddRefAndRelease<T>::value> {\n};\n\ntemplate <typename T>\nstruct UnsafeBindtoRefCountedArg : false_type {\n};\n\ntemplate <typename T>\nstruct UnsafeBindtoRefCountedArg<T*>\n    : UnsafeBindtoRefCountedArgHelper<is_class<T>::value, T> {\n};\n\ntemplate <typename T>\nclass HasIsMethodTag {\n  typedef char Yes[1];\n  typedef char No[2];\n\n  template <typename U>\n  static Yes& Check(typename U::IsMethod*);\n\n  template <typename U>\n  static No& Check(...);\n\n public:\n  static const bool value = sizeof(Check<T>(0)) == sizeof(Yes);\n};\n\ntemplate <typename T>\nclass UnretainedWrapper {\n public:\n  explicit UnretainedWrapper(T* o) : ptr_(o) {}\n  T* get() const { return ptr_; }\n private:\n  T* ptr_;\n};\n\ntemplate <typename T>\nclass ConstRefWrapper {\n public:\n  explicit ConstRefWrapper(const T& o) : ptr_(&o) {}\n  const T& get() const { return *ptr_; }\n private:\n  const T* ptr_;\n};\n\ntemplate <typename T>\nstruct IgnoreResultHelper {\n  explicit IgnoreResultHelper(T functor) : functor_(functor) {}\n\n  T functor_;\n};\n\ntemplate <typename T>\nstruct IgnoreResultHelper<Callback<T> > {\n  explicit IgnoreResultHelper(const Callback<T>& functor) : functor_(functor) {}\n\n  const Callback<T>& functor_;\n};\n\n// An alternate implementation is to avoid the destructive copy, and instead\n// specialize ParamTraits<> for OwnedWrapper<> to change the StorageType to\n// a class that is essentially a scoped_ptr<>.\n//\n// The current implementation has the benefit though of leaving ParamTraits<>\n// fully in callback_internal.h as well as avoiding type conversions during\n// storage.\ntemplate <typename T>\nclass OwnedWrapper {\n public:\n  explicit OwnedWrapper(T* o) : ptr_(o) {}\n  ~OwnedWrapper() { delete ptr_; }\n  T* get() const { return ptr_; }\n  OwnedWrapper(const OwnedWrapper& other) {\n    ptr_ = other.ptr_;\n    other.ptr_ = NULL;\n  }\n\n private:\n  mutable T* ptr_;\n};\n\n// PassedWrapper is a copyable adapter for a scoper that ignores const.\n//\n// It is needed to get around the fact that Bind() takes a const reference to\n// all its arguments.  Because Bind() takes a const reference to avoid\n// unnecessary copies, it is incompatible with movable-but-not-copyable\n// types; doing a destructive \"move\" of the type into Bind() would violate\n// the const correctness.\n//\n// This conundrum cannot be solved without either C++11 rvalue references or\n// a O(2^n) blowup of Bind() templates to handle each combination of regular\n// types and movable-but-not-copyable types.  Thus we introduce a wrapper type\n// that is copyable to transmit the correct type information down into\n// BindState<>. Ignoring const in this type makes sense because it is only\n// created when we are explicitly trying to do a destructive move.\n//\n// Two notes:\n//  1) PassedWrapper supports any type that has a \"Pass()\" function.\n//     This is intentional. The whitelisting of which specific types we\n//     support is maintained by CallbackParamTraits<>.\n//  2) is_valid_ is distinct from NULL because it is valid to bind a \"NULL\"\n//     scoper to a Callback and allow the Callback to execute once.\ntemplate <typename T>\nclass PassedWrapper {\n public:\n  explicit PassedWrapper(T scoper) : is_valid_(true), scoper_(scoper.Pass()) {}\n  PassedWrapper(const PassedWrapper& other)\n      : is_valid_(other.is_valid_), scoper_(other.scoper_.Pass()) {\n  }\n  T Pass() const {\n    CHECK(is_valid_);\n    is_valid_ = false;\n    return scoper_.Pass();\n  }\n\n private:\n  mutable bool is_valid_;\n  mutable T scoper_;\n};\n\n// Unwrap the stored parameters for the wrappers above.\ntemplate <typename T>\nstruct UnwrapTraits {\n  typedef const T& ForwardType;\n  static ForwardType Unwrap(const T& o) { return o; }\n};\n\ntemplate <typename T>\nstruct UnwrapTraits<UnretainedWrapper<T> > {\n  typedef T* ForwardType;\n  static ForwardType Unwrap(UnretainedWrapper<T> unretained) {\n    return unretained.get();\n  }\n};\n\ntemplate <typename T>\nstruct UnwrapTraits<ConstRefWrapper<T> > {\n  typedef const T& ForwardType;\n  static ForwardType Unwrap(ConstRefWrapper<T> const_ref) {\n    return const_ref.get();\n  }\n};\n\ntemplate <typename T>\nstruct UnwrapTraits<scoped_refptr<T> > {\n  typedef T* ForwardType;\n  static ForwardType Unwrap(const scoped_refptr<T>& o) { return o.get(); }\n};\n\ntemplate <typename T>\nstruct UnwrapTraits<WeakPtr<T> > {\n  typedef const WeakPtr<T>& ForwardType;\n  static ForwardType Unwrap(const WeakPtr<T>& o) { return o; }\n};\n\ntemplate <typename T>\nstruct UnwrapTraits<OwnedWrapper<T> > {\n  typedef T* ForwardType;\n  static ForwardType Unwrap(const OwnedWrapper<T>& o) {\n    return o.get();\n  }\n};\n\ntemplate <typename T>\nstruct UnwrapTraits<PassedWrapper<T> > {\n  typedef T ForwardType;\n  static T Unwrap(PassedWrapper<T>& o) {\n    return o.Pass();\n  }\n};\n\n// Utility for handling different refcounting semantics in the Bind()\n// function.\ntemplate <bool is_method, typename T>\nstruct MaybeRefcount;\n\ntemplate <typename T>\nstruct MaybeRefcount<false, T> {\n  static void AddRef(const T&) {}\n  static void Release(const T&) {}\n};\n\ntemplate <typename T, size_t n>\nstruct MaybeRefcount<false, T[n]> {\n  static void AddRef(const T*) {}\n  static void Release(const T*) {}\n};\n\ntemplate <typename T>\nstruct MaybeRefcount<true, T> {\n  static void AddRef(const T&) {}\n  static void Release(const T&) {}\n};\n\ntemplate <typename T>\nstruct MaybeRefcount<true, T*> {\n  static void AddRef(T* o) { o->AddRef(); }\n  static void Release(T* o) { o->Release(); }\n};\n\n// No need to additionally AddRef() and Release() since we are storing a\n// scoped_refptr<> inside the storage object already.\ntemplate <typename T>\nstruct MaybeRefcount<true, scoped_refptr<T> > {\n  static void AddRef(const scoped_refptr<T>& o) {}\n  static void Release(const scoped_refptr<T>& o) {}\n};\n\ntemplate <typename T>\nstruct MaybeRefcount<true, const T*> {\n  static void AddRef(const T* o) { o->AddRef(); }\n  static void Release(const T* o) { o->Release(); }\n};\n\n// IsWeakMethod is a helper that determine if we are binding a WeakPtr<> to a\n// method.  It is used internally by Bind() to select the correct\n// InvokeHelper that will no-op itself in the event the WeakPtr<> for\n// the target object is invalidated.\n//\n// P1 should be the type of the object that will be received of the method.\ntemplate <bool IsMethod, typename P1>\nstruct IsWeakMethod : public false_type {};\n\ntemplate <typename T>\nstruct IsWeakMethod<true, WeakPtr<T> > : public true_type {};\n\ntemplate <typename T>\nstruct IsWeakMethod<true, ConstRefWrapper<WeakPtr<T> > > : public true_type {};\n\n}  // namespace cef_internal\n\ntemplate <typename T>\nstatic inline cef_internal::UnretainedWrapper<T> Unretained(T* o) {\n  return cef_internal::UnretainedWrapper<T>(o);\n}\n\ntemplate <typename T>\nstatic inline cef_internal::ConstRefWrapper<T> ConstRef(const T& o) {\n  return cef_internal::ConstRefWrapper<T>(o);\n}\n\ntemplate <typename T>\nstatic inline cef_internal::OwnedWrapper<T> Owned(T* o) {\n  return cef_internal::OwnedWrapper<T>(o);\n}\n\n// We offer 2 syntaxes for calling Passed().  The first takes a temporary and\n// is best suited for use with the return value of a function. The second\n// takes a pointer to the scoper and is just syntactic sugar to avoid having\n// to write Passed(scoper.Pass()).\ntemplate <typename T>\nstatic inline cef_internal::PassedWrapper<T> Passed(T scoper) {\n  return cef_internal::PassedWrapper<T>(scoper.Pass());\n}\ntemplate <typename T>\nstatic inline cef_internal::PassedWrapper<T> Passed(T* scoper) {\n  return cef_internal::PassedWrapper<T>(scoper->Pass());\n}\n\ntemplate <typename T>\nstatic inline cef_internal::IgnoreResultHelper<T> IgnoreResult(T data) {\n  return cef_internal::IgnoreResultHelper<T>(data);\n}\n\ntemplate <typename T>\nstatic inline cef_internal::IgnoreResultHelper<Callback<T> >\nIgnoreResult(const Callback<T>& data) {\n  return cef_internal::IgnoreResultHelper<Callback<T> >(data);\n}\n\nvoid DoNothing();\n\ntemplate<typename T>\nvoid DeletePointer(T* obj) {\n  delete obj;\n}\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_BIND_HELPERS_H_\n"
  },
  {
    "path": "CEF/include/base/cef_build.h",
    "content": "// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n#ifndef CEF_INCLUDE_BASE_CEF_BUILD_H_\n#define CEF_INCLUDE_BASE_CEF_BUILD_H_\n#pragma once\n\n#if defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/compiler_specific.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#if defined(_WIN32)\n#ifndef OS_WIN\n#define OS_WIN 1\n#endif\n#elif defined(__APPLE__)\n#ifndef OS_MACOSX\n#define OS_MACOSX 1\n#endif\n#elif defined(__linux__)\n#ifndef OS_LINUX\n#define OS_LINUX 1\n#endif\n#else\n#error Please add support for your platform in cef_build.h\n#endif\n\n// For access to standard POSIXish features, use OS_POSIX instead of a\n// more specific macro.\n#if defined(OS_MACOSX) || defined(OS_LINUX)\n#ifndef OS_POSIX\n#define OS_POSIX 1\n#endif\n#endif\n\n// Compiler detection.\n#if defined(__GNUC__)\n#ifndef COMPILER_GCC\n#define COMPILER_GCC 1\n#endif\n#elif defined(_MSC_VER)\n#ifndef COMPILER_MSVC\n#define COMPILER_MSVC 1\n#endif\n#else\n#error Please add support for your compiler in cef_build.h\n#endif\n\n// Processor architecture detection.  For more info on what's defined, see:\n//   http://msdn.microsoft.com/en-us/library/b0084kay.aspx\n//   http://www.agner.org/optimize/calling_conventions.pdf\n//   or with gcc, run: \"echo | gcc -E -dM -\"\n#if defined(_M_X64) || defined(__x86_64__)\n#define ARCH_CPU_X86_FAMILY 1\n#define ARCH_CPU_X86_64 1\n#define ARCH_CPU_64_BITS 1\n#define ARCH_CPU_LITTLE_ENDIAN 1\n#elif defined(_M_IX86) || defined(__i386__)\n#define ARCH_CPU_X86_FAMILY 1\n#define ARCH_CPU_X86 1\n#define ARCH_CPU_32_BITS 1\n#define ARCH_CPU_LITTLE_ENDIAN 1\n#elif defined(__ARMEL__)\n#define ARCH_CPU_ARM_FAMILY 1\n#define ARCH_CPU_ARMEL 1\n#define ARCH_CPU_32_BITS 1\n#define ARCH_CPU_LITTLE_ENDIAN 1\n#elif defined(__aarch64__)\n#define ARCH_CPU_ARM_FAMILY 1\n#define ARCH_CPU_ARM64 1\n#define ARCH_CPU_64_BITS 1\n#define ARCH_CPU_LITTLE_ENDIAN 1\n#elif defined(__pnacl__)\n#define ARCH_CPU_32_BITS 1\n#define ARCH_CPU_LITTLE_ENDIAN 1\n#elif defined(__MIPSEL__)\n#define ARCH_CPU_MIPS_FAMILY 1\n#define ARCH_CPU_MIPSEL 1\n#define ARCH_CPU_32_BITS 1\n#define ARCH_CPU_LITTLE_ENDIAN 1\n#else\n#error Please add support for your architecture in cef_build.h\n#endif\n\n// Type detection for wchar_t.\n#if defined(OS_WIN)\n#define WCHAR_T_IS_UTF16\n#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \\\n    defined(__WCHAR_MAX__) && \\\n    (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)\n#define WCHAR_T_IS_UTF32\n#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \\\n    defined(__WCHAR_MAX__) && \\\n    (__WCHAR_MAX__ == 0x7fff || __WCHAR_MAX__ == 0xffff)\n// On Posix, we'll detect short wchar_t, but projects aren't guaranteed to\n// compile in this mode (in particular, Chrome doesn't). This is intended for\n// other projects using base who manage their own dependencies and make sure\n// short wchar works for them.\n#define WCHAR_T_IS_UTF16\n#else\n#error Please add support for your compiler in cef_build.h\n#endif\n\n// Annotate a function indicating the caller must examine the return value.\n// Use like:\n//   int foo() WARN_UNUSED_RESULT;\n// To explicitly ignore a result, see |ignore_result()| in <base/macros.h>.\n#ifndef WARN_UNUSED_RESULT\n#if defined(COMPILER_GCC)\n#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))\n#else\n#define WARN_UNUSED_RESULT\n#endif\n#endif  // WARN_UNUSED_RESULT\n\n// Annotate a typedef or function indicating it's ok if it's not used.\n// Use like:\n//   typedef Foo Bar ALLOW_UNUSED_TYPE;\n#ifndef ALLOW_UNUSED_TYPE\n#if defined(COMPILER_GCC)\n#define ALLOW_UNUSED_TYPE __attribute__((unused))\n#else\n#define ALLOW_UNUSED_TYPE\n#endif\n#endif  // ALLOW_UNUSED_TYPE\n\n// Annotate a variable indicating it's ok if the variable is not used.\n// (Typically used to silence a compiler warning when the assignment\n// is important for some other reason.)\n// Use like:\n//   int x = ...;\n//   ALLOW_UNUSED_LOCAL(x);\n#ifndef ALLOW_UNUSED_LOCAL\n#define ALLOW_UNUSED_LOCAL(x) false ? (void)x : (void)0\n#endif\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n// Annotate a virtual method indicating it must be overriding a virtual method\n// in the parent class.\n// Use like:\n//   void foo() OVERRIDE;\n// NOTE: This define should only be used in classes exposed to the client since\n// C++11 support may not be enabled in client applications. CEF internal classes\n// should use the `override` keyword directly.\n#ifndef OVERRIDE\n#if defined(__clang__)\n#define OVERRIDE override\n#elif defined(COMPILER_MSVC) && _MSC_VER >= 1600\n// Visual Studio 2010 and later support override.\n#define OVERRIDE override\n#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \\\n      (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700\n// GCC 4.7 supports explicit virtual overrides when C++11 support is enabled.\n#define OVERRIDE override\n#else\n#define OVERRIDE\n#endif\n#endif  // OVERRIDE\n\n#endif  // CEF_INCLUDE_BASE_CEF_BUILD_H_\n"
  },
  {
    "path": "CEF/include/base/cef_callback.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_H_\n#define CEF_INCLUDE_BASE_CEF_CALLBACK_H_\n#pragma once\n\n#if defined(BASE_CALLBACK_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/callback.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/base/internal/cef_callback_internal.h\"\n#include \"include/base/cef_callback_forward.h\"\n#include \"include/base/cef_template_util.h\"\n\n// NOTE: Header files that do not require the full definition of Callback or\n// Closure should #include \"base/cef_callback_forward.h\" instead of this file.\n\n// -----------------------------------------------------------------------------\n// Introduction\n// -----------------------------------------------------------------------------\n//\n// The templated Callback class is a generalized function object. Together\n// with the Bind() function in bind.h, they provide a type-safe method for\n// performing partial application of functions.\n//\n// Partial application (or \"currying\") is the process of binding a subset of\n// a function's arguments to produce another function that takes fewer\n// arguments. This can be used to pass around a unit of delayed execution,\n// much like lexical closures are used in other languages. For example, it\n// is used in Chromium code to schedule tasks on different MessageLoops.\n//\n// A callback with no unbound input parameters (base::Callback<void(void)>)\n// is called a base::Closure. Note that this is NOT the same as what other\n// languages refer to as a closure -- it does not retain a reference to its\n// enclosing environment.\n//\n// MEMORY MANAGEMENT AND PASSING\n//\n// The Callback objects themselves should be passed by const-reference, and\n// stored by copy. They internally store their state via a refcounted class\n// and thus do not need to be deleted.\n//\n// The reason to pass via a const-reference is to avoid unnecessary\n// AddRef/Release pairs to the internal state.\n//\n//\n// -----------------------------------------------------------------------------\n// Quick reference for basic stuff\n// -----------------------------------------------------------------------------\n//\n// BINDING A BARE FUNCTION\n//\n//   int Return5() { return 5; }\n//   base::Callback<int(void)> func_cb = base::Bind(&Return5);\n//   LOG(INFO) << func_cb.Run();  // Prints 5.\n//\n// BINDING A CLASS METHOD\n//\n//   The first argument to bind is the member function to call, the second is\n//   the object on which to call it.\n//\n//   class Ref : public base::RefCountedThreadSafe<Ref> {\n//    public:\n//     int Foo() { return 3; }\n//     void PrintBye() { LOG(INFO) << \"bye.\"; }\n//   };\n//   scoped_refptr<Ref> ref = new Ref();\n//   base::Callback<void(void)> ref_cb = base::Bind(&Ref::Foo, ref);\n//   LOG(INFO) << ref_cb.Run();  // Prints out 3.\n//\n//   By default the object must support RefCounted or you will get a compiler\n//   error. If you're passing between threads, be sure it's\n//   RefCountedThreadSafe! See \"Advanced binding of member functions\" below if\n//   you don't want to use reference counting.\n//\n// RUNNING A CALLBACK\n//\n//   Callbacks can be run with their \"Run\" method, which has the same\n//   signature as the template argument to the callback.\n//\n//   void DoSomething(const base::Callback<void(int, std::string)>& callback) {\n//     callback.Run(5, \"hello\");\n//   }\n//\n//   Callbacks can be run more than once (they don't get deleted or marked when\n//   run). However, this precludes using base::Passed (see below).\n//\n//   void DoSomething(const base::Callback<double(double)>& callback) {\n//     double myresult = callback.Run(3.14159);\n//     myresult += callback.Run(2.71828);\n//   }\n//\n// PASSING UNBOUND INPUT PARAMETERS\n//\n//   Unbound parameters are specified at the time a callback is Run(). They are\n//   specified in the Callback template type:\n//\n//   void MyFunc(int i, const std::string& str) {}\n//   base::Callback<void(int, const std::string&)> cb = base::Bind(&MyFunc);\n//   cb.Run(23, \"hello, world\");\n//\n// PASSING BOUND INPUT PARAMETERS\n//\n//   Bound parameters are specified when you create thee callback as arguments\n//   to Bind(). They will be passed to the function and the Run()ner of the\n//   callback doesn't see those values or even know that the function it's\n//   calling.\n//\n//   void MyFunc(int i, const std::string& str) {}\n//   base::Callback<void(void)> cb = base::Bind(&MyFunc, 23, \"hello world\");\n//   cb.Run();\n//\n//   A callback with no unbound input parameters (base::Callback<void(void)>)\n//   is called a base::Closure. So we could have also written:\n//\n//   base::Closure cb = base::Bind(&MyFunc, 23, \"hello world\");\n//\n//   When calling member functions, bound parameters just go after the object\n//   pointer.\n//\n//   base::Closure cb = base::Bind(&MyClass::MyFunc, this, 23, \"hello world\");\n//\n// PARTIAL BINDING OF PARAMETERS\n//\n//   You can specify some parameters when you create the callback, and specify\n//   the rest when you execute the callback.\n//\n//   void MyFunc(int i, const std::string& str) {}\n//   base::Callback<void(const std::string&)> cb = base::Bind(&MyFunc, 23);\n//   cb.Run(\"hello world\");\n//\n//   When calling a function bound parameters are first, followed by unbound\n//   parameters.\n//\n//\n// -----------------------------------------------------------------------------\n// Quick reference for advanced binding\n// -----------------------------------------------------------------------------\n//\n// BINDING A CLASS METHOD WITH WEAK POINTERS\n//\n//   base::Bind(&MyClass::Foo, GetWeakPtr());\n//\n//   The callback will not be run if the object has already been destroyed.\n//   DANGER: weak pointers are not threadsafe, so don't use this\n//   when passing between threads!\n//\n// BINDING A CLASS METHOD WITH MANUAL LIFETIME MANAGEMENT\n//\n//   base::Bind(&MyClass::Foo, base::Unretained(this));\n//\n//   This disables all lifetime management on the object. You're responsible\n//   for making sure the object is alive at the time of the call. You break it,\n//   you own it!\n//\n// BINDING A CLASS METHOD AND HAVING THE CALLBACK OWN THE CLASS\n//\n//   MyClass* myclass = new MyClass;\n//   base::Bind(&MyClass::Foo, base::Owned(myclass));\n//\n//   The object will be deleted when the callback is destroyed, even if it's\n//   not run (like if you post a task during shutdown). Potentially useful for\n//   \"fire and forget\" cases.\n//\n// IGNORING RETURN VALUES\n//\n//   Sometimes you want to call a function that returns a value in a callback\n//   that doesn't expect a return value.\n//\n//   int DoSomething(int arg) { cout << arg << endl; }\n//   base::Callback<void<int>) cb =\n//       base::Bind(base::IgnoreResult(&DoSomething));\n//\n//\n// -----------------------------------------------------------------------------\n// Quick reference for binding parameters to Bind()\n// -----------------------------------------------------------------------------\n//\n// Bound parameters are specified as arguments to Bind() and are passed to the\n// function. A callback with no parameters or no unbound parameters is called a\n// Closure (base::Callback<void(void)> and base::Closure are the same thing).\n//\n// PASSING PARAMETERS OWNED BY THE CALLBACK\n//\n//   void Foo(int* arg) { cout << *arg << endl; }\n//   int* pn = new int(1);\n//   base::Closure foo_callback = base::Bind(&foo, base::Owned(pn));\n//\n//   The parameter will be deleted when the callback is destroyed, even if it's\n//   not run (like if you post a task during shutdown).\n//\n// PASSING PARAMETERS AS A scoped_ptr\n//\n//   void TakesOwnership(scoped_ptr<Foo> arg) {}\n//   scoped_ptr<Foo> f(new Foo);\n//   // f becomes null during the following call.\n//   base::Closure cb = base::Bind(&TakesOwnership, base::Passed(&f));\n//\n//   Ownership of the parameter will be with the callback until the it is run,\n//   when ownership is passed to the callback function. This means the callback\n//   can only be run once. If the callback is never run, it will delete the\n//   object when it's destroyed.\n//\n// PASSING PARAMETERS AS A scoped_refptr\n//\n//   void TakesOneRef(scoped_refptr<Foo> arg) {}\n//   scoped_refptr<Foo> f(new Foo)\n//   base::Closure cb = base::Bind(&TakesOneRef, f);\n//\n//   This should \"just work.\" The closure will take a reference as long as it\n//   is alive, and another reference will be taken for the called function.\n//\n// PASSING PARAMETERS BY REFERENCE\n//\n//   Const references are *copied* unless ConstRef is used. Example:\n//\n//   void foo(const int& arg) { printf(\"%d %p\\n\", arg, &arg); }\n//   int n = 1;\n//   base::Closure has_copy = base::Bind(&foo, n);\n//   base::Closure has_ref = base::Bind(&foo, base::ConstRef(n));\n//   n = 2;\n//   foo(n);                        // Prints \"2 0xaaaaaaaaaaaa\"\n//   has_copy.Run();                // Prints \"1 0xbbbbbbbbbbbb\"\n//   has_ref.Run();                 // Prints \"2 0xaaaaaaaaaaaa\"\n//\n//   Normally parameters are copied in the closure. DANGER: ConstRef stores a\n//   const reference instead, referencing the original parameter. This means\n//   that you must ensure the object outlives the callback!\n//\n//\n// -----------------------------------------------------------------------------\n// Implementation notes\n// -----------------------------------------------------------------------------\n//\n// WHERE IS THIS DESIGN FROM:\n//\n// The design Callback and Bind is heavily influenced by C++'s\n// tr1::function/tr1::bind, and by the \"Google Callback\" system used inside\n// Google.\n//\n//\n// HOW THE IMPLEMENTATION WORKS:\n//\n// There are three main components to the system:\n//   1) The Callback classes.\n//   2) The Bind() functions.\n//   3) The arguments wrappers (e.g., Unretained() and ConstRef()).\n//\n// The Callback classes represent a generic function pointer. Internally,\n// it stores a refcounted piece of state that represents the target function\n// and all its bound parameters.  Each Callback specialization has a templated\n// constructor that takes an BindState<>*.  In the context of the constructor,\n// the static type of this BindState<> pointer uniquely identifies the\n// function it is representing, all its bound parameters, and a Run() method\n// that is capable of invoking the target.\n//\n// Callback's constructor takes the BindState<>* that has the full static type\n// and erases the target function type as well as the types of the bound\n// parameters.  It does this by storing a pointer to the specific Run()\n// function, and upcasting the state of BindState<>* to a\n// BindStateBase*. This is safe as long as this BindStateBase pointer\n// is only used with the stored Run() pointer.\n//\n// To BindState<> objects are created inside the Bind() functions.\n// These functions, along with a set of internal templates, are responsible for\n//\n//  - Unwrapping the function signature into return type, and parameters\n//  - Determining the number of parameters that are bound\n//  - Creating the BindState storing the bound parameters\n//  - Performing compile-time asserts to avoid error-prone behavior\n//  - Returning an Callback<> with an arity matching the number of unbound\n//    parameters and that knows the correct refcounting semantics for the\n//    target object if we are binding a method.\n//\n// The Bind functions do the above using type-inference, and template\n// specializations.\n//\n// By default Bind() will store copies of all bound parameters, and attempt\n// to refcount a target object if the function being bound is a class method.\n// These copies are created even if the function takes parameters as const\n// references. (Binding to non-const references is forbidden, see bind.h.)\n//\n// To change this behavior, we introduce a set of argument wrappers\n// (e.g., Unretained(), and ConstRef()).  These are simple container templates\n// that are passed by value, and wrap a pointer to argument.  See the\n// file-level comment in base/bind_helpers.h for more info.\n//\n// These types are passed to the Unwrap() functions, and the MaybeRefcount()\n// functions respectively to modify the behavior of Bind().  The Unwrap()\n// and MaybeRefcount() functions change behavior by doing partial\n// specialization based on whether or not a parameter is a wrapper type.\n//\n// ConstRef() is similar to tr1::cref.  Unretained() is specific to Chromium.\n//\n//\n// WHY NOT TR1 FUNCTION/BIND?\n//\n// Direct use of tr1::function and tr1::bind was considered, but ultimately\n// rejected because of the number of copy constructors invocations involved\n// in the binding of arguments during construction, and the forwarding of\n// arguments during invocation.  These copies will no longer be an issue in\n// C++0x because C++0x will support rvalue reference allowing for the compiler\n// to avoid these copies.  However, waiting for C++0x is not an option.\n//\n// Measured with valgrind on gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5), the\n// tr1::bind call itself will invoke a non-trivial copy constructor three times\n// for each bound parameter.  Also, each when passing a tr1::function, each\n// bound argument will be copied again.\n//\n// In addition to the copies taken at binding and invocation, copying a\n// tr1::function causes a copy to be made of all the bound parameters and\n// state.\n//\n// Furthermore, in Chromium, it is desirable for the Callback to take a\n// reference on a target object when representing a class method call.  This\n// is not supported by tr1.\n//\n// Lastly, tr1::function and tr1::bind has a more general and flexible API.\n// This includes things like argument reordering by use of\n// tr1::bind::placeholder, support for non-const reference parameters, and some\n// limited amount of subtyping of the tr1::function object (e.g.,\n// tr1::function<int(int)> is convertible to tr1::function<void(int)>).\n//\n// These are not features that are required in Chromium. Some of them, such as\n// allowing for reference parameters, and subtyping of functions, may actually\n// become a source of errors. Removing support for these features actually\n// allows for a simpler implementation, and a terser Currying API.\n//\n//\n// WHY NOT GOOGLE CALLBACKS?\n//\n// The Google callback system also does not support refcounting.  Furthermore,\n// its implementation has a number of strange edge cases with respect to type\n// conversion of its arguments.  In particular, the argument's constness must\n// at times match exactly the function signature, or the type-inference might\n// break.  Given the above, writing a custom solution was easier.\n//\n//\n// MISSING FUNCTIONALITY\n//  - Invoking the return of Bind.  Bind(&foo).Run() does not work;\n//  - Binding arrays to functions that take a non-const pointer.\n//    Example:\n//      void Foo(const char* ptr);\n//      void Bar(char* ptr);\n//      Bind(&Foo, \"test\");\n//      Bind(&Bar, \"test\");  // This fails because ptr is not const.\n\nnamespace base {\n\n// First, we forward declare the Callback class template. This informs the\n// compiler that the template only has 1 type parameter which is the function\n// signature that the Callback is representing.\n//\n// After this, create template specializations for 0-7 parameters. Note that\n// even though the template typelist grows, the specialization still\n// only has one type: the function signature.\n//\n// If you are thinking of forward declaring Callback in your own header file,\n// please include \"base/callback_forward.h\" instead.\ntemplate <typename Sig>\nclass Callback;\n\nnamespace cef_internal {\ntemplate <typename Runnable, typename RunType, typename BoundArgsType>\nstruct BindState;\n}  // namespace cef_internal\n\ntemplate <typename R>\nclass Callback<R(void)> : public cef_internal::CallbackBase {\n public:\n  typedef R(RunType)();\n\n  Callback() : CallbackBase(NULL) { }\n\n  // Note that this constructor CANNOT be explicit, and that Bind() CANNOT\n  // return the exact Callback<> type.  See base/bind.h for details.\n  template <typename Runnable, typename BindRunType, typename BoundArgsType>\n  Callback(cef_internal::BindState<Runnable, BindRunType,\n           BoundArgsType>* bind_state)\n      : CallbackBase(bind_state) {\n\n    // Force the assignment to a local variable of PolymorphicInvoke\n    // so the compiler will typecheck that the passed in Run() method has\n    // the correct type.\n    PolymorphicInvoke invoke_func =\n        &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>\n            ::InvokerType::Run;\n    polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);\n  }\n\n  bool Equals(const Callback& other) const {\n    return CallbackBase::Equals(other);\n  }\n\n  R Run() const {\n    PolymorphicInvoke f =\n        reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);\n\n    return f(bind_state_.get());\n  }\n\n private:\n  typedef R(*PolymorphicInvoke)(\n      cef_internal::BindStateBase*);\n\n};\n\ntemplate <typename R, typename A1>\nclass Callback<R(A1)> : public cef_internal::CallbackBase {\n public:\n  typedef R(RunType)(A1);\n\n  Callback() : CallbackBase(NULL) { }\n\n  // Note that this constructor CANNOT be explicit, and that Bind() CANNOT\n  // return the exact Callback<> type.  See base/bind.h for details.\n  template <typename Runnable, typename BindRunType, typename BoundArgsType>\n  Callback(cef_internal::BindState<Runnable, BindRunType,\n           BoundArgsType>* bind_state)\n      : CallbackBase(bind_state) {\n\n    // Force the assignment to a local variable of PolymorphicInvoke\n    // so the compiler will typecheck that the passed in Run() method has\n    // the correct type.\n    PolymorphicInvoke invoke_func =\n        &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>\n            ::InvokerType::Run;\n    polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);\n  }\n\n  bool Equals(const Callback& other) const {\n    return CallbackBase::Equals(other);\n  }\n\n  R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1) const {\n    PolymorphicInvoke f =\n        reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);\n\n    return f(bind_state_.get(), cef_internal::CallbackForward(a1));\n  }\n\n private:\n  typedef R(*PolymorphicInvoke)(\n      cef_internal::BindStateBase*,\n          typename cef_internal::CallbackParamTraits<A1>::ForwardType);\n\n};\n\ntemplate <typename R, typename A1, typename A2>\nclass Callback<R(A1, A2)> : public cef_internal::CallbackBase {\n public:\n  typedef R(RunType)(A1, A2);\n\n  Callback() : CallbackBase(NULL) { }\n\n  // Note that this constructor CANNOT be explicit, and that Bind() CANNOT\n  // return the exact Callback<> type.  See base/bind.h for details.\n  template <typename Runnable, typename BindRunType, typename BoundArgsType>\n  Callback(cef_internal::BindState<Runnable, BindRunType,\n           BoundArgsType>* bind_state)\n      : CallbackBase(bind_state) {\n\n    // Force the assignment to a local variable of PolymorphicInvoke\n    // so the compiler will typecheck that the passed in Run() method has\n    // the correct type.\n    PolymorphicInvoke invoke_func =\n        &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>\n            ::InvokerType::Run;\n    polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);\n  }\n\n  bool Equals(const Callback& other) const {\n    return CallbackBase::Equals(other);\n  }\n\n  R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n        typename cef_internal::CallbackParamTraits<A2>::ForwardType a2) const {\n    PolymorphicInvoke f =\n        reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);\n\n    return f(bind_state_.get(), cef_internal::CallbackForward(a1),\n             cef_internal::CallbackForward(a2));\n  }\n\n private:\n  typedef R(*PolymorphicInvoke)(\n      cef_internal::BindStateBase*,\n          typename cef_internal::CallbackParamTraits<A1>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A2>::ForwardType);\n\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3>\nclass Callback<R(A1, A2, A3)> : public cef_internal::CallbackBase {\n public:\n  typedef R(RunType)(A1, A2, A3);\n\n  Callback() : CallbackBase(NULL) { }\n\n  // Note that this constructor CANNOT be explicit, and that Bind() CANNOT\n  // return the exact Callback<> type.  See base/bind.h for details.\n  template <typename Runnable, typename BindRunType, typename BoundArgsType>\n  Callback(cef_internal::BindState<Runnable, BindRunType,\n           BoundArgsType>* bind_state)\n      : CallbackBase(bind_state) {\n\n    // Force the assignment to a local variable of PolymorphicInvoke\n    // so the compiler will typecheck that the passed in Run() method has\n    // the correct type.\n    PolymorphicInvoke invoke_func =\n        &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>\n            ::InvokerType::Run;\n    polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);\n  }\n\n  bool Equals(const Callback& other) const {\n    return CallbackBase::Equals(other);\n  }\n\n  R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n        typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,\n        typename cef_internal::CallbackParamTraits<A3>::ForwardType a3) const {\n    PolymorphicInvoke f =\n        reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);\n\n    return f(bind_state_.get(), cef_internal::CallbackForward(a1),\n             cef_internal::CallbackForward(a2),\n             cef_internal::CallbackForward(a3));\n  }\n\n private:\n  typedef R(*PolymorphicInvoke)(\n      cef_internal::BindStateBase*,\n          typename cef_internal::CallbackParamTraits<A1>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A2>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A3>::ForwardType);\n\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4>\nclass Callback<R(A1, A2, A3, A4)> : public cef_internal::CallbackBase {\n public:\n  typedef R(RunType)(A1, A2, A3, A4);\n\n  Callback() : CallbackBase(NULL) { }\n\n  // Note that this constructor CANNOT be explicit, and that Bind() CANNOT\n  // return the exact Callback<> type.  See base/bind.h for details.\n  template <typename Runnable, typename BindRunType, typename BoundArgsType>\n  Callback(cef_internal::BindState<Runnable, BindRunType,\n           BoundArgsType>* bind_state)\n      : CallbackBase(bind_state) {\n\n    // Force the assignment to a local variable of PolymorphicInvoke\n    // so the compiler will typecheck that the passed in Run() method has\n    // the correct type.\n    PolymorphicInvoke invoke_func =\n        &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>\n            ::InvokerType::Run;\n    polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);\n  }\n\n  bool Equals(const Callback& other) const {\n    return CallbackBase::Equals(other);\n  }\n\n  R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n        typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,\n        typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,\n        typename cef_internal::CallbackParamTraits<A4>::ForwardType a4) const {\n    PolymorphicInvoke f =\n        reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);\n\n    return f(bind_state_.get(), cef_internal::CallbackForward(a1),\n             cef_internal::CallbackForward(a2),\n             cef_internal::CallbackForward(a3),\n             cef_internal::CallbackForward(a4));\n  }\n\n private:\n  typedef R(*PolymorphicInvoke)(\n      cef_internal::BindStateBase*,\n          typename cef_internal::CallbackParamTraits<A1>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A2>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A3>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A4>::ForwardType);\n\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5>\nclass Callback<R(A1, A2, A3, A4, A5)> : public cef_internal::CallbackBase {\n public:\n  typedef R(RunType)(A1, A2, A3, A4, A5);\n\n  Callback() : CallbackBase(NULL) { }\n\n  // Note that this constructor CANNOT be explicit, and that Bind() CANNOT\n  // return the exact Callback<> type.  See base/bind.h for details.\n  template <typename Runnable, typename BindRunType, typename BoundArgsType>\n  Callback(cef_internal::BindState<Runnable, BindRunType,\n           BoundArgsType>* bind_state)\n      : CallbackBase(bind_state) {\n\n    // Force the assignment to a local variable of PolymorphicInvoke\n    // so the compiler will typecheck that the passed in Run() method has\n    // the correct type.\n    PolymorphicInvoke invoke_func =\n        &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>\n            ::InvokerType::Run;\n    polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);\n  }\n\n  bool Equals(const Callback& other) const {\n    return CallbackBase::Equals(other);\n  }\n\n  R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n        typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,\n        typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,\n        typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,\n        typename cef_internal::CallbackParamTraits<A5>::ForwardType a5) const {\n    PolymorphicInvoke f =\n        reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);\n\n    return f(bind_state_.get(), cef_internal::CallbackForward(a1),\n             cef_internal::CallbackForward(a2),\n             cef_internal::CallbackForward(a3),\n             cef_internal::CallbackForward(a4),\n             cef_internal::CallbackForward(a5));\n  }\n\n private:\n  typedef R(*PolymorphicInvoke)(\n      cef_internal::BindStateBase*,\n          typename cef_internal::CallbackParamTraits<A1>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A2>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A3>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A4>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A5>::ForwardType);\n\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6>\nclass Callback<R(A1, A2, A3, A4, A5, A6)> : public cef_internal::CallbackBase {\n public:\n  typedef R(RunType)(A1, A2, A3, A4, A5, A6);\n\n  Callback() : CallbackBase(NULL) { }\n\n  // Note that this constructor CANNOT be explicit, and that Bind() CANNOT\n  // return the exact Callback<> type.  See base/bind.h for details.\n  template <typename Runnable, typename BindRunType, typename BoundArgsType>\n  Callback(cef_internal::BindState<Runnable, BindRunType,\n           BoundArgsType>* bind_state)\n      : CallbackBase(bind_state) {\n\n    // Force the assignment to a local variable of PolymorphicInvoke\n    // so the compiler will typecheck that the passed in Run() method has\n    // the correct type.\n    PolymorphicInvoke invoke_func =\n        &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>\n            ::InvokerType::Run;\n    polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);\n  }\n\n  bool Equals(const Callback& other) const {\n    return CallbackBase::Equals(other);\n  }\n\n  R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n        typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,\n        typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,\n        typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,\n        typename cef_internal::CallbackParamTraits<A5>::ForwardType a5,\n        typename cef_internal::CallbackParamTraits<A6>::ForwardType a6) const {\n    PolymorphicInvoke f =\n        reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);\n\n    return f(bind_state_.get(), cef_internal::CallbackForward(a1),\n             cef_internal::CallbackForward(a2),\n             cef_internal::CallbackForward(a3),\n             cef_internal::CallbackForward(a4),\n             cef_internal::CallbackForward(a5),\n             cef_internal::CallbackForward(a6));\n  }\n\n private:\n  typedef R(*PolymorphicInvoke)(\n      cef_internal::BindStateBase*,\n          typename cef_internal::CallbackParamTraits<A1>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A2>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A3>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A4>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A5>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A6>::ForwardType);\n\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6, typename A7>\nclass Callback<R(A1, A2, A3, A4, A5, A6, A7)> : public cef_internal::CallbackBase {\n public:\n  typedef R(RunType)(A1, A2, A3, A4, A5, A6, A7);\n\n  Callback() : CallbackBase(NULL) { }\n\n  // Note that this constructor CANNOT be explicit, and that Bind() CANNOT\n  // return the exact Callback<> type.  See base/bind.h for details.\n  template <typename Runnable, typename BindRunType, typename BoundArgsType>\n  Callback(cef_internal::BindState<Runnable, BindRunType,\n           BoundArgsType>* bind_state)\n      : CallbackBase(bind_state) {\n\n    // Force the assignment to a local variable of PolymorphicInvoke\n    // so the compiler will typecheck that the passed in Run() method has\n    // the correct type.\n    PolymorphicInvoke invoke_func =\n        &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>\n            ::InvokerType::Run;\n    polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);\n  }\n\n  bool Equals(const Callback& other) const {\n    return CallbackBase::Equals(other);\n  }\n\n  R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n        typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,\n        typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,\n        typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,\n        typename cef_internal::CallbackParamTraits<A5>::ForwardType a5,\n        typename cef_internal::CallbackParamTraits<A6>::ForwardType a6,\n        typename cef_internal::CallbackParamTraits<A7>::ForwardType a7) const {\n    PolymorphicInvoke f =\n        reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);\n\n    return f(bind_state_.get(), cef_internal::CallbackForward(a1),\n             cef_internal::CallbackForward(a2),\n             cef_internal::CallbackForward(a3),\n             cef_internal::CallbackForward(a4),\n             cef_internal::CallbackForward(a5),\n             cef_internal::CallbackForward(a6),\n             cef_internal::CallbackForward(a7));\n  }\n\n private:\n  typedef R(*PolymorphicInvoke)(\n      cef_internal::BindStateBase*,\n          typename cef_internal::CallbackParamTraits<A1>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A2>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A3>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A4>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A5>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A6>::ForwardType,\n          typename cef_internal::CallbackParamTraits<A7>::ForwardType);\n\n};\n\n\n// Syntactic sugar to make Callbacks<void(void)> easier to declare since it\n// will be used in a lot of APIs with delayed execution.\ntypedef Callback<void(void)> Closure;\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_CALLBACK_H_\n"
  },
  {
    "path": "CEF/include/base/cef_callback_forward.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_\n#define INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_\n#pragma once\n\n#if defined(BASE_CALLBACK_FORWARD_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/callback_forward.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\nnamespace base {\n\ntemplate <typename Sig>\nclass Callback;\n\ntypedef Callback<void(void)> Closure;\n\n}  // namespace base\n\n#endif  // !!USING_CHROMIUM_INCLUDES\n\n#endif  // INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_\n"
  },
  {
    "path": "CEF/include/base/cef_callback_helpers.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// This defines helpful methods for dealing with Callbacks.  Because Callbacks\n// are implemented using templates, with a class per callback signature, adding\n// methods to Callback<> itself is unattractive (lots of extra code gets\n// generated).  Instead, consider adding methods here.\n//\n// ResetAndReturn(&cb) is like cb.Reset() but allows executing a callback (via a\n// copy) after the original callback is Reset().  This can be handy if Run()\n// reads/writes the variable holding the Callback.\n\n#ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_\n#define CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_\n#pragma once\n\n#if defined(BASE_CALLBACK_HELPERS_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/callback_helpers.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/base/cef_basictypes.h\"\n#include \"include/base/cef_build.h\"\n#include \"include/base/cef_callback.h\"\n#include \"include/base/cef_macros.h\"\n\nnamespace base {\n\ntemplate <typename Sig>\nbase::Callback<Sig> ResetAndReturn(base::Callback<Sig>* cb) {\n  base::Callback<Sig> ret(*cb);\n  cb->Reset();\n  return ret;\n}\n\n// ScopedClosureRunner is akin to scoped_ptr for Closures. It ensures that the\n// Closure is executed and deleted no matter how the current scope exits.\nclass ScopedClosureRunner {\n public:\n  ScopedClosureRunner();\n  explicit ScopedClosureRunner(const Closure& closure);\n  ~ScopedClosureRunner();\n\n  void Reset();\n  void Reset(const Closure& closure);\n  Closure Release() WARN_UNUSED_RESULT;\n\n private:\n  Closure closure_;\n\n  DISALLOW_COPY_AND_ASSIGN(ScopedClosureRunner);\n};\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_\n"
  },
  {
    "path": "CEF/include/base/cef_callback_list.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2013\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_LIST_H_\n#define CEF_INCLUDE_BASE_CEF_CALLBACK_LIST_H_\n#pragma once\n\n#if defined(BASE_CALLBACK_LIST_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/callback_list.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include <list>\n\n#include \"include/base/cef_basictypes.h\"\n#include \"include/base/cef_callback.h\"\n#include \"include/base/internal/cef_callback_internal.h\"\n#include \"include/base/cef_build.h\"\n#include \"include/base/cef_logging.h\"\n#include \"include/base/cef_macros.h\"\n#include \"include/base/cef_scoped_ptr.h\"\n\n// OVERVIEW:\n//\n// A container for a list of callbacks.  Unlike a normal STL vector or list,\n// this container can be modified during iteration without invalidating the\n// iterator. It safely handles the case of a callback removing itself\n// or another callback from the list while callbacks are being run.\n//\n// TYPICAL USAGE:\n//\n// class MyWidget {\n//  public:\n//   ...\n//\n//   typedef base::Callback<void(const Foo&)> OnFooCallback;\n//\n//   scoped_ptr<base::CallbackList<void(const Foo&)>::Subscription>\n//   RegisterCallback(const OnFooCallback& cb) {\n//     return callback_list_.Add(cb);\n//   }\n//\n//  private:\n//   void NotifyFoo(const Foo& foo) {\n//      callback_list_.Notify(foo);\n//   }\n//\n//   base::CallbackList<void(const Foo&)> callback_list_;\n//\n//   DISALLOW_COPY_AND_ASSIGN(MyWidget);\n// };\n//\n//\n// class MyWidgetListener {\n//  public:\n//   MyWidgetListener::MyWidgetListener() {\n//     foo_subscription_ = MyWidget::GetCurrent()->RegisterCallback(\n//             base::Bind(&MyWidgetListener::OnFoo, this)));\n//   }\n//\n//   MyWidgetListener::~MyWidgetListener() {\n//      // Subscription gets deleted automatically and will deregister\n//      // the callback in the process.\n//   }\n//\n//  private:\n//   void OnFoo(const Foo& foo) {\n//     // Do something.\n//   }\n//\n//   scoped_ptr<base::CallbackList<void(const Foo&)>::Subscription>\n//       foo_subscription_;\n//\n//   DISALLOW_COPY_AND_ASSIGN(MyWidgetListener);\n// };\n\nnamespace base {\n\nnamespace cef_internal {\n\ntemplate <typename CallbackType>\nclass CallbackListBase {\n public:\n  class Subscription {\n   public:\n    Subscription(CallbackListBase<CallbackType>* list,\n                 typename std::list<CallbackType>::iterator iter)\n        : list_(list),\n          iter_(iter) {\n    }\n\n    ~Subscription() {\n      if (list_->active_iterator_count_) {\n        iter_->Reset();\n      } else {\n        list_->callbacks_.erase(iter_);\n        if (!list_->removal_callback_.is_null())\n          list_->removal_callback_.Run();\n      }\n    }\n\n   private:\n    CallbackListBase<CallbackType>* list_;\n    typename std::list<CallbackType>::iterator iter_;\n\n    DISALLOW_COPY_AND_ASSIGN(Subscription);\n  };\n\n  // Add a callback to the list. The callback will remain registered until the\n  // returned Subscription is destroyed, which must occur before the\n  // CallbackList is destroyed.\n  scoped_ptr<Subscription> Add(const CallbackType& cb) WARN_UNUSED_RESULT {\n    DCHECK(!cb.is_null());\n    return scoped_ptr<Subscription>(\n        new Subscription(this, callbacks_.insert(callbacks_.end(), cb)));\n  }\n\n  // Sets a callback which will be run when a subscription list is changed.\n  void set_removal_callback(const Closure& callback) {\n    removal_callback_ = callback;\n  }\n\n  // Returns true if there are no subscriptions. This is only valid to call when\n  // not looping through the list.\n  bool empty() {\n    DCHECK_EQ(0, active_iterator_count_);\n    return callbacks_.empty();\n  }\n\n protected:\n  // An iterator class that can be used to access the list of callbacks.\n  class Iterator {\n   public:\n    explicit Iterator(CallbackListBase<CallbackType>* list)\n        : list_(list),\n          list_iter_(list_->callbacks_.begin()) {\n      ++list_->active_iterator_count_;\n    }\n\n    Iterator(const Iterator& iter)\n        : list_(iter.list_),\n          list_iter_(iter.list_iter_) {\n      ++list_->active_iterator_count_;\n    }\n\n    ~Iterator() {\n      if (list_ && --list_->active_iterator_count_ == 0) {\n        list_->Compact();\n      }\n    }\n\n    CallbackType* GetNext() {\n      while ((list_iter_ != list_->callbacks_.end()) && list_iter_->is_null())\n        ++list_iter_;\n\n      CallbackType* cb = NULL;\n      if (list_iter_ != list_->callbacks_.end()) {\n        cb = &(*list_iter_);\n        ++list_iter_;\n      }\n      return cb;\n    }\n\n   private:\n    CallbackListBase<CallbackType>* list_;\n    typename std::list<CallbackType>::iterator list_iter_;\n  };\n\n  CallbackListBase() : active_iterator_count_(0) {}\n\n  ~CallbackListBase() {\n    DCHECK_EQ(0, active_iterator_count_);\n    DCHECK_EQ(0U, callbacks_.size());\n  }\n\n  // Returns an instance of a CallbackListBase::Iterator which can be used\n  // to run callbacks.\n  Iterator GetIterator() {\n    return Iterator(this);\n  }\n\n  // Compact the list: remove any entries which were NULLed out during\n  // iteration.\n  void Compact() {\n    typename std::list<CallbackType>::iterator it = callbacks_.begin();\n    bool updated = false;\n    while (it != callbacks_.end()) {\n      if ((*it).is_null()) {\n        updated = true;\n        it = callbacks_.erase(it);\n      } else {\n        ++it;\n      }\n\n      if (updated && !removal_callback_.is_null())\n        removal_callback_.Run();\n    }\n  }\n\n private:\n  std::list<CallbackType> callbacks_;\n  int active_iterator_count_;\n  Closure removal_callback_;\n\n  DISALLOW_COPY_AND_ASSIGN(CallbackListBase);\n};\n\n}  // namespace cef_internal\n\ntemplate <typename Sig> class CallbackList;\n\ntemplate <>\nclass CallbackList<void(void)>\n    : public cef_internal::CallbackListBase<Callback<void(void)> > {\n public:\n  typedef Callback<void(void)> CallbackType;\n\n  CallbackList() {}\n\n  void Notify() {\n    cef_internal::CallbackListBase<CallbackType>::Iterator it =\n        this->GetIterator();\n    CallbackType* cb;\n    while ((cb = it.GetNext()) != NULL) {\n      cb->Run();\n    }\n  }\n\n private:\n  DISALLOW_COPY_AND_ASSIGN(CallbackList);\n};\n\ntemplate <typename A1>\nclass CallbackList<void(A1)>\n    : public cef_internal::CallbackListBase<Callback<void(A1)> > {\n public:\n  typedef Callback<void(A1)> CallbackType;\n\n  CallbackList() {}\n\n  void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1) {\n    typename cef_internal::CallbackListBase<CallbackType>::Iterator it =\n        this->GetIterator();\n    CallbackType* cb;\n    while ((cb = it.GetNext()) != NULL) {\n      cb->Run(a1);\n    }\n  }\n\n private:\n  DISALLOW_COPY_AND_ASSIGN(CallbackList);\n};\n\ntemplate <typename A1, typename A2>\nclass CallbackList<void(A1, A2)>\n    : public cef_internal::CallbackListBase<Callback<void(A1, A2)> > {\n public:\n  typedef Callback<void(A1, A2)> CallbackType;\n\n  CallbackList() {}\n\n  void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n              typename cef_internal::CallbackParamTraits<A2>::ForwardType a2) {\n    typename cef_internal::CallbackListBase<CallbackType>::Iterator it =\n        this->GetIterator();\n    CallbackType* cb;\n    while ((cb = it.GetNext()) != NULL) {\n      cb->Run(a1, a2);\n    }\n  }\n\n private:\n  DISALLOW_COPY_AND_ASSIGN(CallbackList);\n};\n\ntemplate <typename A1, typename A2, typename A3>\nclass CallbackList<void(A1, A2, A3)>\n    : public cef_internal::CallbackListBase<Callback<void(A1, A2, A3)> > {\n public:\n  typedef Callback<void(A1, A2, A3)> CallbackType;\n\n  CallbackList() {}\n\n  void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n              typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,\n              typename cef_internal::CallbackParamTraits<A3>::ForwardType a3) {\n    typename cef_internal::CallbackListBase<CallbackType>::Iterator it =\n        this->GetIterator();\n    CallbackType* cb;\n    while ((cb = it.GetNext()) != NULL) {\n      cb->Run(a1, a2, a3);\n    }\n  }\n\n private:\n  DISALLOW_COPY_AND_ASSIGN(CallbackList);\n};\n\ntemplate <typename A1, typename A2, typename A3, typename A4>\nclass CallbackList<void(A1, A2, A3, A4)>\n    : public cef_internal::CallbackListBase<Callback<void(A1, A2, A3, A4)> > {\n public:\n  typedef Callback<void(A1, A2, A3, A4)> CallbackType;\n\n  CallbackList() {}\n\n  void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n              typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,\n              typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,\n              typename cef_internal::CallbackParamTraits<A4>::ForwardType a4) {\n    typename cef_internal::CallbackListBase<CallbackType>::Iterator it =\n        this->GetIterator();\n    CallbackType* cb;\n    while ((cb = it.GetNext()) != NULL) {\n      cb->Run(a1, a2, a3, a4);\n    }\n  }\n\n private:\n  DISALLOW_COPY_AND_ASSIGN(CallbackList);\n};\n\ntemplate <typename A1, typename A2, typename A3, typename A4, typename A5>\nclass CallbackList<void(A1, A2, A3, A4, A5)>\n    : public cef_internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5)> > {\n public:\n  typedef Callback<void(A1, A2, A3, A4, A5)> CallbackType;\n\n  CallbackList() {}\n\n  void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n              typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,\n              typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,\n              typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,\n              typename cef_internal::CallbackParamTraits<A5>::ForwardType a5) {\n    typename cef_internal::CallbackListBase<CallbackType>::Iterator it =\n        this->GetIterator();\n    CallbackType* cb;\n    while ((cb = it.GetNext()) != NULL) {\n      cb->Run(a1, a2, a3, a4, a5);\n    }\n  }\n\n private:\n  DISALLOW_COPY_AND_ASSIGN(CallbackList);\n};\n\ntemplate <typename A1, typename A2, typename A3, typename A4, typename A5,\n    typename A6>\nclass CallbackList<void(A1, A2, A3, A4, A5, A6)>\n    : public cef_internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5,\n        A6)> > {\n public:\n  typedef Callback<void(A1, A2, A3, A4, A5, A6)> CallbackType;\n\n  CallbackList() {}\n\n  void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n              typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,\n              typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,\n              typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,\n              typename cef_internal::CallbackParamTraits<A5>::ForwardType a5,\n              typename cef_internal::CallbackParamTraits<A6>::ForwardType a6) {\n    typename cef_internal::CallbackListBase<CallbackType>::Iterator it =\n        this->GetIterator();\n    CallbackType* cb;\n    while ((cb = it.GetNext()) != NULL) {\n      cb->Run(a1, a2, a3, a4, a5, a6);\n    }\n  }\n\n private:\n  DISALLOW_COPY_AND_ASSIGN(CallbackList);\n};\n\ntemplate <typename A1, typename A2, typename A3, typename A4, typename A5,\n    typename A6, typename A7>\nclass CallbackList<void(A1, A2, A3, A4, A5, A6, A7)>\n    : public cef_internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5, A6,\n        A7)> > {\n public:\n  typedef Callback<void(A1, A2, A3, A4, A5, A6, A7)> CallbackType;\n\n  CallbackList() {}\n\n  void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,\n              typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,\n              typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,\n              typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,\n              typename cef_internal::CallbackParamTraits<A5>::ForwardType a5,\n              typename cef_internal::CallbackParamTraits<A6>::ForwardType a6,\n              typename cef_internal::CallbackParamTraits<A7>::ForwardType a7) {\n    typename cef_internal::CallbackListBase<CallbackType>::Iterator it =\n        this->GetIterator();\n    CallbackType* cb;\n    while ((cb = it.GetNext()) != NULL) {\n      cb->Run(a1, a2, a3, a4, a5, a6, a7);\n    }\n  }\n\n private:\n  DISALLOW_COPY_AND_ASSIGN(CallbackList);\n};\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_CALLBACK_LIST_H_\n"
  },
  {
    "path": "CEF/include/base/cef_cancelable_callback.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// CancelableCallback is a wrapper around base::Callback that allows\n// cancellation of a callback. CancelableCallback takes a reference on the\n// wrapped callback until this object is destroyed or Reset()/Cancel() are\n// called.\n//\n// NOTE:\n//\n// Calling CancelableCallback::Cancel() brings the object back to its natural,\n// default-constructed state, i.e., CancelableCallback::callback() will return\n// a null callback.\n//\n// THREAD-SAFETY:\n//\n// CancelableCallback objects must be created on, posted to, cancelled on, and\n// destroyed on the same thread.\n//\n//\n// EXAMPLE USAGE:\n//\n// In the following example, the test is verifying that RunIntensiveTest()\n// Quit()s the message loop within 4 seconds. The cancelable callback is posted\n// to the message loop, the intensive test runs, the message loop is run,\n// then the callback is cancelled.\n//\n// void TimeoutCallback(const std::string& timeout_message) {\n//   FAIL() << timeout_message;\n//   MessageLoop::current()->QuitWhenIdle();\n// }\n//\n// CancelableClosure timeout(base::Bind(&TimeoutCallback, \"Test timed out.\"));\n// MessageLoop::current()->PostDelayedTask(FROM_HERE, timeout.callback(),\n//                                         4000)  // 4 seconds to run.\n// RunIntensiveTest();\n// MessageLoop::current()->Run();\n// timeout.Cancel();  // Hopefully this is hit before the timeout callback runs.\n//\n\n#ifndef CEF_INCLUDE_BASE_CEF_CANCELABLE_CALLBACK_H_\n#define CEF_INCLUDE_BASE_CEF_CANCELABLE_CALLBACK_H_\n#pragma once\n\n#if defined(BASE_CANCELABLE_CALLBACK_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/cancelable_callback.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/base/cef_bind.h\"\n#include \"include/base/cef_callback.h\"\n#include \"include/base/cef_build.h\"\n#include \"include/base/cef_logging.h\"\n#include \"include/base/cef_macros.h\"\n#include \"include/base/cef_weak_ptr.h\"\n#include \"include/base/internal/cef_callback_internal.h\"\n\nnamespace base {\n\ntemplate <typename Sig>\nclass CancelableCallback;\n\ntemplate <>\nclass CancelableCallback<void(void)> {\n public:\n  CancelableCallback() : weak_factory_(this) {}\n\n  // |callback| must not be null.\n  explicit CancelableCallback(const base::Callback<void(void)>& callback)\n      : weak_factory_(this),\n        callback_(callback) {\n    DCHECK(!callback.is_null());\n    InitializeForwarder();\n  }\n\n  ~CancelableCallback() {}\n\n  // Cancels and drops the reference to the wrapped callback.\n  void Cancel() {\n    weak_factory_.InvalidateWeakPtrs();\n    forwarder_.Reset();\n    callback_.Reset();\n  }\n\n  // Returns true if the wrapped callback has been cancelled.\n  bool IsCancelled() const {\n    return callback_.is_null();\n  }\n\n  // Sets |callback| as the closure that may be cancelled. |callback| may not\n  // be null. Outstanding and any previously wrapped callbacks are cancelled.\n  void Reset(const base::Callback<void(void)>& callback) {\n    DCHECK(!callback.is_null());\n\n    // Outstanding tasks (e.g., posted to a message loop) must not be called.\n    Cancel();\n\n    // |forwarder_| is no longer valid after Cancel(), so re-bind.\n    InitializeForwarder();\n\n    callback_ = callback;\n  }\n\n  // Returns a callback that can be disabled by calling Cancel().\n  const base::Callback<void(void)>& callback() const {\n    return forwarder_;\n  }\n\n private:\n  void Forward() {\n    callback_.Run();\n  }\n\n  // Helper method to bind |forwarder_| using a weak pointer from\n  // |weak_factory_|.\n  void InitializeForwarder() {\n    forwarder_ = base::Bind(&CancelableCallback<void(void)>::Forward,\n                            weak_factory_.GetWeakPtr());\n  }\n\n  // Used to ensure Forward() is not run when this object is destroyed.\n  base::WeakPtrFactory<CancelableCallback<void(void)> > weak_factory_;\n\n  // The wrapper closure.\n  base::Callback<void(void)> forwarder_;\n\n  // The stored closure that may be cancelled.\n  base::Callback<void(void)> callback_;\n\n  DISALLOW_COPY_AND_ASSIGN(CancelableCallback);\n};\n\ntemplate <typename A1>\nclass CancelableCallback<void(A1)> {\n public:\n  CancelableCallback() : weak_factory_(this) {}\n\n  // |callback| must not be null.\n  explicit CancelableCallback(const base::Callback<void(A1)>& callback)\n      : weak_factory_(this),\n        callback_(callback) {\n    DCHECK(!callback.is_null());\n    InitializeForwarder();\n  }\n\n  ~CancelableCallback() {}\n\n  // Cancels and drops the reference to the wrapped callback.\n  void Cancel() {\n    weak_factory_.InvalidateWeakPtrs();\n    forwarder_.Reset();\n    callback_.Reset();\n  }\n\n  // Returns true if the wrapped callback has been cancelled.\n  bool IsCancelled() const {\n    return callback_.is_null();\n  }\n\n  // Sets |callback| as the closure that may be cancelled. |callback| may not\n  // be null. Outstanding and any previously wrapped callbacks are cancelled.\n  void Reset(const base::Callback<void(A1)>& callback) {\n    DCHECK(!callback.is_null());\n\n    // Outstanding tasks (e.g., posted to a message loop) must not be called.\n    Cancel();\n\n    // |forwarder_| is no longer valid after Cancel(), so re-bind.\n    InitializeForwarder();\n\n    callback_ = callback;\n  }\n\n  // Returns a callback that can be disabled by calling Cancel().\n  const base::Callback<void(A1)>& callback() const {\n    return forwarder_;\n  }\n\n private:\n  void Forward(A1 a1) const {\n    callback_.Run(a1);\n  }\n\n  // Helper method to bind |forwarder_| using a weak pointer from\n  // |weak_factory_|.\n  void InitializeForwarder() {\n    forwarder_ = base::Bind(&CancelableCallback<void(A1)>::Forward,\n                            weak_factory_.GetWeakPtr());\n  }\n\n  // Used to ensure Forward() is not run when this object is destroyed.\n  base::WeakPtrFactory<CancelableCallback<void(A1)> > weak_factory_;\n\n  // The wrapper closure.\n  base::Callback<void(A1)> forwarder_;\n\n  // The stored closure that may be cancelled.\n  base::Callback<void(A1)> callback_;\n\n  DISALLOW_COPY_AND_ASSIGN(CancelableCallback);\n};\n\ntemplate <typename A1, typename A2>\nclass CancelableCallback<void(A1, A2)> {\n public:\n  CancelableCallback() : weak_factory_(this) {}\n\n  // |callback| must not be null.\n  explicit CancelableCallback(const base::Callback<void(A1, A2)>& callback)\n      : weak_factory_(this),\n        callback_(callback) {\n    DCHECK(!callback.is_null());\n    InitializeForwarder();\n  }\n\n  ~CancelableCallback() {}\n\n  // Cancels and drops the reference to the wrapped callback.\n  void Cancel() {\n    weak_factory_.InvalidateWeakPtrs();\n    forwarder_.Reset();\n    callback_.Reset();\n  }\n\n  // Returns true if the wrapped callback has been cancelled.\n  bool IsCancelled() const {\n    return callback_.is_null();\n  }\n\n  // Sets |callback| as the closure that may be cancelled. |callback| may not\n  // be null. Outstanding and any previously wrapped callbacks are cancelled.\n  void Reset(const base::Callback<void(A1, A2)>& callback) {\n    DCHECK(!callback.is_null());\n\n    // Outstanding tasks (e.g., posted to a message loop) must not be called.\n    Cancel();\n\n    // |forwarder_| is no longer valid after Cancel(), so re-bind.\n    InitializeForwarder();\n\n    callback_ = callback;\n  }\n\n  // Returns a callback that can be disabled by calling Cancel().\n  const base::Callback<void(A1, A2)>& callback() const {\n    return forwarder_;\n  }\n\n private:\n  void Forward(A1 a1, A2 a2) const {\n    callback_.Run(a1, a2);\n  }\n\n  // Helper method to bind |forwarder_| using a weak pointer from\n  // |weak_factory_|.\n  void InitializeForwarder() {\n    forwarder_ = base::Bind(&CancelableCallback<void(A1, A2)>::Forward,\n                            weak_factory_.GetWeakPtr());\n  }\n\n  // Used to ensure Forward() is not run when this object is destroyed.\n  base::WeakPtrFactory<CancelableCallback<void(A1, A2)> > weak_factory_;\n\n  // The wrapper closure.\n  base::Callback<void(A1, A2)> forwarder_;\n\n  // The stored closure that may be cancelled.\n  base::Callback<void(A1, A2)> callback_;\n\n  DISALLOW_COPY_AND_ASSIGN(CancelableCallback);\n};\n\ntypedef CancelableCallback<void(void)> CancelableClosure;\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_CANCELABLE_CALLBACK_H_\n"
  },
  {
    "path": "CEF/include/base/cef_lock.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_BASE_CEF_LOCK_H_\n#define CEF_INCLUDE_BASE_CEF_LOCK_H_\n#pragma once\n\n#if defined(BASE_SYNCHRONIZATION_LOCK_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/synchronization/lock.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/base/cef_macros.h\"\n#include \"include/base/cef_platform_thread.h\"\n#include \"include/base/internal/cef_lock_impl.h\"\n\nnamespace base {\n\n// A convenient wrapper for an OS specific critical section.  The only real\n// intelligence in this class is in debug mode for the support for the\n// AssertAcquired() method.\nclass Lock {\n public:\n#if defined(NDEBUG)             // Optimized wrapper implementation\n  Lock() : lock_() {}\n  ~Lock() {}\n  void Acquire() { lock_.Lock(); }\n  void Release() { lock_.Unlock(); }\n\n  // If the lock is not held, take it and return true. If the lock is already\n  // held by another thread, immediately return false. This must not be called\n  // by a thread already holding the lock (what happens is undefined and an\n  // assertion may fail).\n  bool Try() { return lock_.Try(); }\n\n  // Null implementation if not debug.\n  void AssertAcquired() const {}\n#else\n  Lock();\n  ~Lock();\n\n  // NOTE: Although windows critical sections support recursive locks, we do not\n  // allow this, and we will commonly fire a DCHECK() if a thread attempts to\n  // acquire the lock a second time (while already holding it).\n  void Acquire() {\n    lock_.Lock();\n    CheckUnheldAndMark();\n  }\n  void Release() {\n    CheckHeldAndUnmark();\n    lock_.Unlock();\n  }\n\n  bool Try() {\n    bool rv = lock_.Try();\n    if (rv) {\n      CheckUnheldAndMark();\n    }\n    return rv;\n  }\n\n  void AssertAcquired() const;\n#endif                          // NDEBUG\n\n private:\n#if !defined(NDEBUG)\n  // Members and routines taking care of locks assertions.\n  // Note that this checks for recursive locks and allows them\n  // if the variable is set.  This is allowed by the underlying implementation\n  // on windows but not on Posix, so we're doing unneeded checks on Posix.\n  // It's worth it to share the code.\n  void CheckHeldAndUnmark();\n  void CheckUnheldAndMark();\n\n  // All private data is implicitly protected by lock_.\n  // Be VERY careful to only access members under that lock.\n  base::PlatformThreadRef owning_thread_ref_;\n#endif  // NDEBUG\n\n  // Platform specific underlying lock implementation.\n  cef_internal::LockImpl lock_;\n\n  DISALLOW_COPY_AND_ASSIGN(Lock);\n};\n\n// A helper class that acquires the given Lock while the AutoLock is in scope.\nclass AutoLock {\n public:\n  struct AlreadyAcquired {};\n\n  explicit AutoLock(Lock& lock) : lock_(lock) {\n    lock_.Acquire();\n  }\n\n  AutoLock(Lock& lock, const AlreadyAcquired&) : lock_(lock) {\n    lock_.AssertAcquired();\n  }\n\n  ~AutoLock() {\n    lock_.AssertAcquired();\n    lock_.Release();\n  }\n\n private:\n  Lock& lock_;\n  DISALLOW_COPY_AND_ASSIGN(AutoLock);\n};\n\n// AutoUnlock is a helper that will Release() the |lock| argument in the\n// constructor, and re-Acquire() it in the destructor.\nclass AutoUnlock {\n public:\n  explicit AutoUnlock(Lock& lock) : lock_(lock) {\n    // We require our caller to have the lock.\n    lock_.AssertAcquired();\n    lock_.Release();\n  }\n\n  ~AutoUnlock() {\n    lock_.Acquire();\n  }\n\n private:\n  Lock& lock_;\n  DISALLOW_COPY_AND_ASSIGN(AutoUnlock);\n};\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_LOCK_H_\n"
  },
  {
    "path": "CEF/include/base/cef_logging.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file are only available to applications that link\n// against the libcef_dll_wrapper target.\n//\n// WARNING: Logging macros should not be used in the main/browser process before\n// calling CefInitialize or in sub-processes before calling CefExecuteProcess.\n//\n// Instructions\n// ------------\n//\n// Make a bunch of macros for logging.  The way to log things is to stream\n// things to LOG(<a particular severity level>).  E.g.,\n//\n//   LOG(INFO) << \"Found \" << num_cookies << \" cookies\";\n//\n// You can also do conditional logging:\n//\n//   LOG_IF(INFO, num_cookies > 10) << \"Got lots of cookies\";\n//\n// The CHECK(condition) macro is active in both debug and release builds and\n// effectively performs a LOG(FATAL) which terminates the process and\n// generates a crashdump unless a debugger is attached.\n//\n// There are also \"debug mode\" logging macros like the ones above:\n//\n//   DLOG(INFO) << \"Found cookies\";\n//\n//   DLOG_IF(INFO, num_cookies > 10) << \"Got lots of cookies\";\n//\n// All \"debug mode\" logging is compiled away to nothing for non-debug mode\n// compiles.  LOG_IF and development flags also work well together\n// because the code can be compiled away sometimes.\n//\n// We also have\n//\n//   LOG_ASSERT(assertion);\n//   DLOG_ASSERT(assertion);\n//\n// which is syntactic sugar for {,D}LOG_IF(FATAL, assert fails) << assertion;\n//\n// There are \"verbose level\" logging macros.  They look like\n//\n//   VLOG(1) << \"I'm printed when you run the program with --v=1 or more\";\n//   VLOG(2) << \"I'm printed when you run the program with --v=2 or more\";\n//\n// These always log at the INFO log level (when they log at all).\n// The verbose logging can also be turned on module-by-module.  For instance,\n//    --vmodule=profile=2,icon_loader=1,browser_*=3,*/chromeos/*=4 --v=0\n// will cause:\n//   a. VLOG(2) and lower messages to be printed from profile.{h,cc}\n//   b. VLOG(1) and lower messages to be printed from icon_loader.{h,cc}\n//   c. VLOG(3) and lower messages to be printed from files prefixed with\n//      \"browser\"\n//   d. VLOG(4) and lower messages to be printed from files under a\n//     \"chromeos\" directory.\n//   e. VLOG(0) and lower messages to be printed from elsewhere\n//\n// The wildcarding functionality shown by (c) supports both '*' (match\n// 0 or more characters) and '?' (match any single character)\n// wildcards.  Any pattern containing a forward or backward slash will\n// be tested against the whole pathname and not just the module.\n// E.g., \"*/foo/bar/*=2\" would change the logging level for all code\n// in source files under a \"foo/bar\" directory.\n//\n// There's also VLOG_IS_ON(n) \"verbose level\" condition macro. To be used as\n//\n//   if (VLOG_IS_ON(2)) {\n//     // do some logging preparation and logging\n//     // that can't be accomplished with just VLOG(2) << ...;\n//   }\n//\n// There is also a VLOG_IF \"verbose level\" condition macro for sample\n// cases, when some extra computation and preparation for logs is not\n// needed.\n//\n//   VLOG_IF(1, (size > 1024))\n//      << \"I'm printed when size is more than 1024 and when you run the \"\n//         \"program with --v=1 or more\";\n//\n// We also override the standard 'assert' to use 'DLOG_ASSERT'.\n//\n// Lastly, there is:\n//\n//   PLOG(ERROR) << \"Couldn't do foo\";\n//   DPLOG(ERROR) << \"Couldn't do foo\";\n//   PLOG_IF(ERROR, cond) << \"Couldn't do foo\";\n//   DPLOG_IF(ERROR, cond) << \"Couldn't do foo\";\n//   PCHECK(condition) << \"Couldn't do foo\";\n//   DPCHECK(condition) << \"Couldn't do foo\";\n//\n// which append the last system error to the message in string form (taken from\n// GetLastError() on Windows and errno on POSIX).\n//\n// The supported severity levels for macros that allow you to specify one\n// are (in increasing order of severity) INFO, WARNING, ERROR, and FATAL.\n//\n// Very important: logging a message at the FATAL severity level causes\n// the program to terminate (after the message is logged).\n//\n// There is the special severity of DFATAL, which logs FATAL in debug mode,\n// ERROR in normal mode.\n//\n\n#ifndef CEF_INCLUDE_BASE_CEF_LOGGING_H_\n#define CEF_INCLUDE_BASE_CEF_LOGGING_H_\n#pragma once\n\n#if defined(DCHECK)\n// Do nothing if the macros provided by this header already exist.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n\n// Always define the DCHECK_IS_ON macro which is used from other CEF headers.\n#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)\n#define DCHECK_IS_ON() 0\n#else\n#define DCHECK_IS_ON() 1\n#endif\n\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/logging.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include <cassert>\n#include <string>\n#include <cstring>\n#include <sstream>\n\n#include \"include/base/cef_build.h\"\n#include \"include/base/cef_macros.h\"\n#include \"include/internal/cef_logging_internal.h\"\n\nnamespace cef {\nnamespace logging {\n\n// Gets the current log level.\ninline int GetMinLogLevel() {\n  return cef_get_min_log_level();\n}\n\n// Gets the current vlog level for the given file (usually taken from\n// __FILE__). Note that |N| is the size *with* the null terminator.\ntemplate <size_t N>\nint GetVlogLevel(const char (&file)[N]) {\n  return cef_get_vlog_level(file, N);\n}\n\ntypedef int LogSeverity;\nconst LogSeverity LOG_VERBOSE = -1;  // This is level 1 verbosity\n// Note: the log severities are used to index into the array of names,\n// see log_severity_names.\nconst LogSeverity LOG_INFO = 0;\nconst LogSeverity LOG_WARNING = 1;\nconst LogSeverity LOG_ERROR = 2;\nconst LogSeverity LOG_FATAL = 3;\nconst LogSeverity LOG_NUM_SEVERITIES = 4;\n\n// LOG_DFATAL is LOG_FATAL in debug mode, ERROR in normal mode\n#ifdef NDEBUG\nconst LogSeverity LOG_DFATAL = LOG_ERROR;\n#else\nconst LogSeverity LOG_DFATAL = LOG_FATAL;\n#endif\n\n// A few definitions of macros that don't generate much code. These are used\n// by LOG() and LOG_IF, etc. Since these are used all over our code, it's\n// better to have compact code for these operations.\n#define COMPACT_GOOGLE_LOG_EX_INFO(ClassName, ...) \\\n  cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_INFO , \\\n                         ##__VA_ARGS__)\n#define COMPACT_GOOGLE_LOG_EX_WARNING(ClassName, ...) \\\n  cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_WARNING , \\\n                         ##__VA_ARGS__)\n#define COMPACT_GOOGLE_LOG_EX_ERROR(ClassName, ...) \\\n  cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_ERROR , \\\n                         ##__VA_ARGS__)\n#define COMPACT_GOOGLE_LOG_EX_FATAL(ClassName, ...) \\\n  cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_FATAL , \\\n                         ##__VA_ARGS__)\n#define COMPACT_GOOGLE_LOG_EX_DFATAL(ClassName, ...) \\\n  cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_DFATAL , \\\n                         ##__VA_ARGS__)\n\n#define COMPACT_GOOGLE_LOG_INFO \\\n  COMPACT_GOOGLE_LOG_EX_INFO(LogMessage)\n#define COMPACT_GOOGLE_LOG_WARNING \\\n  COMPACT_GOOGLE_LOG_EX_WARNING(LogMessage)\n#define COMPACT_GOOGLE_LOG_ERROR \\\n  COMPACT_GOOGLE_LOG_EX_ERROR(LogMessage)\n#define COMPACT_GOOGLE_LOG_FATAL \\\n  COMPACT_GOOGLE_LOG_EX_FATAL(LogMessage)\n#define COMPACT_GOOGLE_LOG_DFATAL \\\n  COMPACT_GOOGLE_LOG_EX_DFATAL(LogMessage)\n\n#if defined(OS_WIN)\n// wingdi.h defines ERROR to be 0. When we call LOG(ERROR), it gets\n// substituted with 0, and it expands to COMPACT_GOOGLE_LOG_0. To allow us\n// to keep using this syntax, we define this macro to do the same thing\n// as COMPACT_GOOGLE_LOG_ERROR, and also define ERROR the same way that\n// the Windows SDK does for consistency.\n#define ERROR 0\n#define COMPACT_GOOGLE_LOG_EX_0(ClassName, ...) \\\n  COMPACT_GOOGLE_LOG_EX_ERROR(ClassName , ##__VA_ARGS__)\n#define COMPACT_GOOGLE_LOG_0 COMPACT_GOOGLE_LOG_ERROR\n// Needed for LOG_IS_ON(ERROR).\nconst LogSeverity LOG_0 = LOG_ERROR;\n#endif\n\n// As special cases, we can assume that LOG_IS_ON(FATAL) always holds. Also,\n// LOG_IS_ON(DFATAL) always holds in debug mode. In particular, CHECK()s will\n// always fire if they fail.\n#define LOG_IS_ON(severity) \\\n  ((::cef::logging::LOG_ ## severity) >= ::cef::logging::GetMinLogLevel())\n\n// We can't do any caching tricks with VLOG_IS_ON() like the\n// google-glog version since it requires GCC extensions.  This means\n// that using the v-logging functions in conjunction with --vmodule\n// may be slow.\n#define VLOG_IS_ON(verboselevel) \\\n  ((verboselevel) <= ::cef::logging::GetVlogLevel(__FILE__))\n\n// Helper macro which avoids evaluating the arguments to a stream if\n// the condition doesn't hold.\n#define LAZY_STREAM(stream, condition)                                  \\\n  !(condition) ? (void) 0 : ::cef::logging::LogMessageVoidify() & (stream)\n\n// We use the preprocessor's merging operator, \"##\", so that, e.g.,\n// LOG(INFO) becomes the token COMPACT_GOOGLE_LOG_INFO.  There's some funny\n// subtle difference between ostream member streaming functions (e.g.,\n// ostream::operator<<(int) and ostream non-member streaming functions\n// (e.g., ::operator<<(ostream&, string&): it turns out that it's\n// impossible to stream something like a string directly to an unnamed\n// ostream. We employ a neat hack by calling the stream() member\n// function of LogMessage which seems to avoid the problem.\n#define LOG_STREAM(severity) COMPACT_GOOGLE_LOG_ ## severity.stream()\n\n#define LOG(severity) LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))\n#define LOG_IF(severity, condition) \\\n  LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity) && (condition))\n\n#define SYSLOG(severity) LOG(severity)\n#define SYSLOG_IF(severity, condition) LOG_IF(severity, condition)\n\n// The VLOG macros log with negative verbosities.\n#define VLOG_STREAM(verbose_level) \\\n  cef::logging::LogMessage(__FILE__, __LINE__, -verbose_level).stream()\n\n#define VLOG(verbose_level) \\\n  LAZY_STREAM(VLOG_STREAM(verbose_level), VLOG_IS_ON(verbose_level))\n\n#define VLOG_IF(verbose_level, condition) \\\n  LAZY_STREAM(VLOG_STREAM(verbose_level), \\\n      VLOG_IS_ON(verbose_level) && (condition))\n\n#if defined (OS_WIN)\n#define VPLOG_STREAM(verbose_level) \\\n  cef::logging::Win32ErrorLogMessage(__FILE__, __LINE__, -verbose_level, \\\n    ::cef::logging::GetLastSystemErrorCode()).stream()\n#elif defined(OS_POSIX)\n#define VPLOG_STREAM(verbose_level) \\\n  cef::logging::ErrnoLogMessage(__FILE__, __LINE__, -verbose_level, \\\n    ::cef::logging::GetLastSystemErrorCode()).stream()\n#endif\n\n#define VPLOG(verbose_level) \\\n  LAZY_STREAM(VPLOG_STREAM(verbose_level), VLOG_IS_ON(verbose_level))\n\n#define VPLOG_IF(verbose_level, condition) \\\n  LAZY_STREAM(VPLOG_STREAM(verbose_level), \\\n    VLOG_IS_ON(verbose_level) && (condition))\n\n// TODO(akalin): Add more VLOG variants, e.g. VPLOG.\n\n#define LOG_ASSERT(condition)  \\\n  LOG_IF(FATAL, !(condition)) << \"Assert failed: \" #condition \". \"\n#define SYSLOG_ASSERT(condition) \\\n  SYSLOG_IF(FATAL, !(condition)) << \"Assert failed: \" #condition \". \"\n\n#if defined(OS_WIN)\n#define PLOG_STREAM(severity) \\\n  COMPACT_GOOGLE_LOG_EX_ ## severity(Win32ErrorLogMessage, \\\n      ::cef::logging::GetLastSystemErrorCode()).stream()\n#elif defined(OS_POSIX)\n#define PLOG_STREAM(severity) \\\n  COMPACT_GOOGLE_LOG_EX_ ## severity(ErrnoLogMessage, \\\n      ::cef::logging::GetLastSystemErrorCode()).stream()\n#endif\n\n#define PLOG(severity)                                          \\\n  LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity))\n\n#define PLOG_IF(severity, condition) \\\n  LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity) && (condition))\n\n// The actual stream used isn't important.\n#define EAT_STREAM_PARAMETERS                                           \\\n  true ? (void) 0 : ::cef::logging::LogMessageVoidify() & LOG_STREAM(FATAL)\n\n// CHECK dies with a fatal error if condition is not true.  It is *not*\n// controlled by NDEBUG, so the check will be executed regardless of\n// compilation mode.\n//\n// We make sure CHECK et al. always evaluates their arguments, as\n// doing CHECK(FunctionWithSideEffect()) is a common idiom.\n\n#define CHECK(condition)                       \\\n  LAZY_STREAM(LOG_STREAM(FATAL), !(condition)) \\\n  << \"Check failed: \" #condition \". \"\n\n#define PCHECK(condition) \\\n  LAZY_STREAM(PLOG_STREAM(FATAL), !(condition)) \\\n  << \"Check failed: \" #condition \". \"\n\n// Helper macro for binary operators.\n// Don't use this macro directly in your code, use CHECK_EQ et al below.\n//\n// TODO(akalin): Rewrite this so that constructs like if (...)\n// CHECK_EQ(...) else { ... } work properly.\n#define CHECK_OP(name, op, val1, val2)                          \\\n  if (std::string* _result =                                    \\\n      cef::logging::Check##name##Impl((val1), (val2),                \\\n                                 #val1 \" \" #op \" \" #val2))      \\\n    cef::logging::LogMessage(__FILE__, __LINE__, _result).stream()\n\n// Build the error message string.  This is separate from the \"Impl\"\n// function template because it is not performance critical and so can\n// be out of line, while the \"Impl\" code should be inline.  Caller\n// takes ownership of the returned string.\ntemplate<class t1, class t2>\nstd::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {\n  std::ostringstream ss;\n  ss << names << \" (\" << v1 << \" vs. \" << v2 << \")\";\n  std::string* msg = new std::string(ss.str());\n  return msg;\n}\n\n// MSVC doesn't like complex extern templates and DLLs.\n#if !defined(COMPILER_MSVC)\n// Commonly used instantiations of MakeCheckOpString<>. Explicitly instantiated\n// in logging.cc.\nextern template std::string* MakeCheckOpString<int, int>(\n    const int&, const int&, const char* names);\nextern template\nstd::string* MakeCheckOpString<unsigned long, unsigned long>(\n    const unsigned long&, const unsigned long&, const char* names);\nextern template\nstd::string* MakeCheckOpString<unsigned long, unsigned int>(\n    const unsigned long&, const unsigned int&, const char* names);\nextern template\nstd::string* MakeCheckOpString<unsigned int, unsigned long>(\n    const unsigned int&, const unsigned long&, const char* names);\nextern template\nstd::string* MakeCheckOpString<std::string, std::string>(\n    const std::string&, const std::string&, const char* name);\n#endif\n\n// Helper functions for CHECK_OP macro.\n// The (int, int) specialization works around the issue that the compiler\n// will not instantiate the template version of the function on values of\n// unnamed enum type - see comment below.\n#define DEFINE_CHECK_OP_IMPL(name, op) \\\n  template <class t1, class t2> \\\n  inline std::string* Check##name##Impl(const t1& v1, const t2& v2, \\\n                                        const char* names) { \\\n    if (v1 op v2) return NULL; \\\n    else return MakeCheckOpString(v1, v2, names); \\\n  } \\\n  inline std::string* Check##name##Impl(int v1, int v2, const char* names) { \\\n    if (v1 op v2) return NULL; \\\n    else return MakeCheckOpString(v1, v2, names); \\\n  }\nDEFINE_CHECK_OP_IMPL(EQ, ==)\nDEFINE_CHECK_OP_IMPL(NE, !=)\nDEFINE_CHECK_OP_IMPL(LE, <=)\nDEFINE_CHECK_OP_IMPL(LT, < )\nDEFINE_CHECK_OP_IMPL(GE, >=)\nDEFINE_CHECK_OP_IMPL(GT, > )\n#undef DEFINE_CHECK_OP_IMPL\n\n#define CHECK_EQ(val1, val2) CHECK_OP(EQ, ==, val1, val2)\n#define CHECK_NE(val1, val2) CHECK_OP(NE, !=, val1, val2)\n#define CHECK_LE(val1, val2) CHECK_OP(LE, <=, val1, val2)\n#define CHECK_LT(val1, val2) CHECK_OP(LT, < , val1, val2)\n#define CHECK_GE(val1, val2) CHECK_OP(GE, >=, val1, val2)\n#define CHECK_GT(val1, val2) CHECK_OP(GT, > , val1, val2)\n\n#if defined(NDEBUG)\n#define ENABLE_DLOG 0\n#else\n#define ENABLE_DLOG 1\n#endif\n\n#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)\n#define DCHECK_IS_ON() 0\n#else\n#define DCHECK_IS_ON() 1\n#endif\n\n// Definitions for DLOG et al.\n\n#if ENABLE_DLOG\n\n#define DLOG_IS_ON(severity) LOG_IS_ON(severity)\n#define DLOG_IF(severity, condition) LOG_IF(severity, condition)\n#define DLOG_ASSERT(condition) LOG_ASSERT(condition)\n#define DPLOG_IF(severity, condition) PLOG_IF(severity, condition)\n#define DVLOG_IF(verboselevel, condition) VLOG_IF(verboselevel, condition)\n#define DVPLOG_IF(verboselevel, condition) VPLOG_IF(verboselevel, condition)\n\n#else  // ENABLE_DLOG\n\n// If ENABLE_DLOG is off, we want to avoid emitting any references to\n// |condition| (which may reference a variable defined only if NDEBUG\n// is not defined).  Contrast this with DCHECK et al., which has\n// different behavior.\n\n#define DLOG_IS_ON(severity) false\n#define DLOG_IF(severity, condition) EAT_STREAM_PARAMETERS\n#define DLOG_ASSERT(condition) EAT_STREAM_PARAMETERS\n#define DPLOG_IF(severity, condition) EAT_STREAM_PARAMETERS\n#define DVLOG_IF(verboselevel, condition) EAT_STREAM_PARAMETERS\n#define DVPLOG_IF(verboselevel, condition) EAT_STREAM_PARAMETERS\n\n#endif  // ENABLE_DLOG\n\n// DEBUG_MODE is for uses like\n//   if (DEBUG_MODE) foo.CheckThatFoo();\n// instead of\n//   #ifndef NDEBUG\n//     foo.CheckThatFoo();\n//   #endif\n//\n// We tie its state to ENABLE_DLOG.\nenum { DEBUG_MODE = ENABLE_DLOG };\n\n#undef ENABLE_DLOG\n\n#define DLOG(severity)                                          \\\n  LAZY_STREAM(LOG_STREAM(severity), DLOG_IS_ON(severity))\n\n#define DPLOG(severity)                                         \\\n  LAZY_STREAM(PLOG_STREAM(severity), DLOG_IS_ON(severity))\n\n#define DVLOG(verboselevel) DVLOG_IF(verboselevel, VLOG_IS_ON(verboselevel))\n\n#define DVPLOG(verboselevel) DVPLOG_IF(verboselevel, VLOG_IS_ON(verboselevel))\n\n// Definitions for DCHECK et al.\n\n#if DCHECK_IS_ON()\n\n#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \\\n  COMPACT_GOOGLE_LOG_EX_FATAL(ClassName , ##__VA_ARGS__)\n#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_FATAL\nconst LogSeverity LOG_DCHECK = LOG_FATAL;\n\n#else  // DCHECK_IS_ON()\n\n// These are just dummy values.\n#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \\\n  COMPACT_GOOGLE_LOG_EX_INFO(ClassName , ##__VA_ARGS__)\n#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_INFO\nconst LogSeverity LOG_DCHECK = LOG_INFO;\n\n#endif  // DCHECK_IS_ON()\n\n// DCHECK et al. make sure to reference |condition| regardless of\n// whether DCHECKs are enabled; this is so that we don't get unused\n// variable warnings if the only use of a variable is in a DCHECK.\n// This behavior is different from DLOG_IF et al.\n\n#define DCHECK(condition)                                           \\\n  LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition))   \\\n      << \"Check failed: \" #condition \". \"\n\n#define DPCHECK(condition)                                          \\\n  LAZY_STREAM(PLOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition))  \\\n      << \"Check failed: \" #condition \". \"\n\n// Helper macro for binary operators.\n// Don't use this macro directly in your code, use DCHECK_EQ et al below.\n#define DCHECK_OP(name, op, val1, val2)                                   \\\n  if (DCHECK_IS_ON())                                                     \\\n    if (std::string* _result = cef::logging::Check##name##Impl(           \\\n            (val1), (val2), #val1 \" \" #op \" \" #val2))                     \\\n  cef::logging::LogMessage(__FILE__, __LINE__,                            \\\n      ::cef::logging::LOG_DCHECK, _result).stream()\n\n// Equality/Inequality checks - compare two values, and log a\n// LOG_DCHECK message including the two values when the result is not\n// as expected.  The values must have operator<<(ostream, ...)\n// defined.\n//\n// You may append to the error message like so:\n//   DCHECK_NE(1, 2) << \": The world must be ending!\";\n//\n// We are very careful to ensure that each argument is evaluated exactly\n// once, and that anything which is legal to pass as a function argument is\n// legal here.  In particular, the arguments may be temporary expressions\n// which will end up being destroyed at the end of the apparent statement,\n// for example:\n//   DCHECK_EQ(string(\"abc\")[1], 'b');\n//\n// WARNING: These may not compile correctly if one of the arguments is a pointer\n// and the other is NULL. To work around this, simply static_cast NULL to the\n// type of the desired pointer.\n\n#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)\n#define DCHECK_NE(val1, val2) DCHECK_OP(NE, !=, val1, val2)\n#define DCHECK_LE(val1, val2) DCHECK_OP(LE, <=, val1, val2)\n#define DCHECK_LT(val1, val2) DCHECK_OP(LT, < , val1, val2)\n#define DCHECK_GE(val1, val2) DCHECK_OP(GE, >=, val1, val2)\n#define DCHECK_GT(val1, val2) DCHECK_OP(GT, > , val1, val2)\n\n#if defined(NDEBUG) && defined(OS_CHROMEOS)\n#define NOTREACHED() LOG(ERROR) << \"NOTREACHED() hit in \" << \\\n    __FUNCTION__ << \". \"\n#else\n#define NOTREACHED() DCHECK(false)\n#endif\n\n// Redefine the standard assert to use our nice log files\n#undef assert\n#define assert(x) DLOG_ASSERT(x)\n\n// This class more or less represents a particular log message.  You\n// create an instance of LogMessage and then stream stuff to it.\n// When you finish streaming to it, ~LogMessage is called and the\n// full message gets streamed to the appropriate destination.\n//\n// You shouldn't actually use LogMessage's constructor to log things,\n// though.  You should use the LOG() macro (and variants thereof)\n// above.\nclass LogMessage {\n public:\n  // Used for LOG(severity).\n  LogMessage(const char* file, int line, LogSeverity severity);\n\n  // Used for CHECK_EQ(), etc. Takes ownership of the given string.\n  // Implied severity = LOG_FATAL.\n  LogMessage(const char* file, int line, std::string* result);\n\n  // Used for DCHECK_EQ(), etc. Takes ownership of the given string.\n  LogMessage(const char* file, int line, LogSeverity severity,\n             std::string* result);\n\n  ~LogMessage();\n\n  std::ostream& stream() { return stream_; }\n\n private:\n  LogSeverity severity_;\n  std::ostringstream stream_;\n\n  // The file and line information passed in to the constructor.\n  const char* file_;\n  const int line_;\n\n#if defined(OS_WIN)\n  // Stores the current value of GetLastError in the constructor and restores\n  // it in the destructor by calling SetLastError.\n  // This is useful since the LogMessage class uses a lot of Win32 calls\n  // that will lose the value of GLE and the code that called the log function\n  // will have lost the thread error value when the log call returns.\n  class SaveLastError {\n   public:\n    SaveLastError();\n    ~SaveLastError();\n\n    unsigned long get_error() const { return last_error_; }\n\n   protected:\n    unsigned long last_error_;\n  };\n\n  SaveLastError last_error_;\n#endif\n\n  DISALLOW_COPY_AND_ASSIGN(LogMessage);\n};\n\n// A non-macro interface to the log facility; (useful\n// when the logging level is not a compile-time constant).\ninline void LogAtLevel(int const log_level, std::string const &msg) {\n  LogMessage(__FILE__, __LINE__, log_level).stream() << msg;\n}\n\n// This class is used to explicitly ignore values in the conditional\n// logging macros.  This avoids compiler warnings like \"value computed\n// is not used\" and \"statement has no effect\".\nclass LogMessageVoidify {\n public:\n  LogMessageVoidify() { }\n  // This has to be an operator with a precedence lower than << but\n  // higher than ?:\n  void operator&(std::ostream&) { }\n};\n\n#if defined(OS_WIN)\ntypedef unsigned long SystemErrorCode;\n#elif defined(OS_POSIX)\ntypedef int SystemErrorCode;\n#endif\n\n// Alias for ::GetLastError() on Windows and errno on POSIX. Avoids having to\n// pull in windows.h just for GetLastError() and DWORD.\nSystemErrorCode GetLastSystemErrorCode();\nstd::string SystemErrorCodeToString(SystemErrorCode error_code);\n\n#if defined(OS_WIN)\n// Appends a formatted system message of the GetLastError() type.\nclass Win32ErrorLogMessage {\n public:\n  Win32ErrorLogMessage(const char* file,\n                       int line,\n                       LogSeverity severity,\n                       SystemErrorCode err);\n\n  // Appends the error message before destructing the encapsulated class.\n  ~Win32ErrorLogMessage();\n\n  std::ostream& stream() { return log_message_.stream(); }\n\n private:\n  SystemErrorCode err_;\n  LogMessage log_message_;\n\n  DISALLOW_COPY_AND_ASSIGN(Win32ErrorLogMessage);\n};\n#elif defined(OS_POSIX)\n// Appends a formatted system message of the errno type\nclass ErrnoLogMessage {\n public:\n  ErrnoLogMessage(const char* file,\n                  int line,\n                  LogSeverity severity,\n                  SystemErrorCode err);\n\n  // Appends the error message before destructing the encapsulated class.\n  ~ErrnoLogMessage();\n\n  std::ostream& stream() { return log_message_.stream(); }\n\n private:\n  SystemErrorCode err_;\n  LogMessage log_message_;\n\n  DISALLOW_COPY_AND_ASSIGN(ErrnoLogMessage);\n};\n#endif  // OS_WIN\n\n}  // namespace logging\n}  // namespace cef\n\n// These functions are provided as a convenience for logging, which is where we\n// use streams (it is against Google style to use streams in other places). It\n// is designed to allow you to emit non-ASCII Unicode strings to the log file,\n// which is normally ASCII. It is relatively slow, so try not to use it for\n// common cases. Non-ASCII characters will be converted to UTF-8 by these\n// operators.\nstd::ostream& operator<<(std::ostream& out, const wchar_t* wstr);\ninline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {\n  return out << wstr.c_str();\n}\n\n// The NOTIMPLEMENTED() macro annotates codepaths which have\n// not been implemented yet.\n//\n// The implementation of this macro is controlled by NOTIMPLEMENTED_POLICY:\n//   0 -- Do nothing (stripped by compiler)\n//   1 -- Warn at compile time\n//   2 -- Fail at compile time\n//   3 -- Fail at runtime (DCHECK)\n//   4 -- [default] LOG(ERROR) at runtime\n//   5 -- LOG(ERROR) at runtime, only once per call-site\n\n#ifndef NOTIMPLEMENTED_POLICY\n#if defined(OS_ANDROID) && defined(OFFICIAL_BUILD)\n#define NOTIMPLEMENTED_POLICY 0\n#else\n// Select default policy: LOG(ERROR)\n#define NOTIMPLEMENTED_POLICY 4\n#endif\n#endif\n\n#if defined(COMPILER_GCC)\n// On Linux, with GCC, we can use __PRETTY_FUNCTION__ to get the demangled name\n// of the current function in the NOTIMPLEMENTED message.\n#define NOTIMPLEMENTED_MSG \"Not implemented reached in \" << __PRETTY_FUNCTION__\n#else\n#define NOTIMPLEMENTED_MSG \"NOT IMPLEMENTED\"\n#endif\n\n#if NOTIMPLEMENTED_POLICY == 0\n#define NOTIMPLEMENTED() EAT_STREAM_PARAMETERS\n#elif NOTIMPLEMENTED_POLICY == 1\n// TODO, figure out how to generate a warning\n#define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED)\n#elif NOTIMPLEMENTED_POLICY == 2\n#define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED)\n#elif NOTIMPLEMENTED_POLICY == 3\n#define NOTIMPLEMENTED() NOTREACHED()\n#elif NOTIMPLEMENTED_POLICY == 4\n#define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG\n#elif NOTIMPLEMENTED_POLICY == 5\n#define NOTIMPLEMENTED() do {\\\n  static bool logged_once = false;\\\n  LOG_IF(ERROR, !logged_once) << NOTIMPLEMENTED_MSG;\\\n  logged_once = true;\\\n} while(0);\\\nEAT_STREAM_PARAMETERS\n#endif\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_LOGGING_H_\n"
  },
  {
    "path": "CEF/include/base/cef_macros.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_BASE_CEF_MACROS_H_\n#define CEF_INCLUDE_BASE_CEF_MACROS_H_\n#pragma once\n\n#if defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/macros.h\"\n\n// Chromium uses movable types.\n#define MOVE_SCOPED_PTR(var) std::move(var)\n\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include <stddef.h>  // For size_t.\n#include \"include/base/cef_build.h\"  // For COMPILER_MSVC\n\n// CEF does not use movable types.\n#define MOVE_SCOPED_PTR(var) var.Pass()\n\n#if !defined(arraysize)\n\n// The arraysize(arr) macro returns the # of elements in an array arr.\n// The expression is a compile-time constant, and therefore can be\n// used in defining new arrays, for example.  If you use arraysize on\n// a pointer by mistake, you will get a compile-time error.\n//\n// One caveat is that arraysize() doesn't accept any array of an\n// anonymous type or a type defined inside a function.  In these rare\n// cases, you have to use the unsafe ARRAYSIZE_UNSAFE() macro below.  This is\n// due to a limitation in C++'s template system.  The limitation might\n// eventually be removed, but it hasn't happened yet.\n\n// This template function declaration is used in defining arraysize.\n// Note that the function doesn't need an implementation, as we only\n// use its type.\ntemplate <typename T, size_t N>\nchar (&ArraySizeHelper(T (&array)[N]))[N];\n\n// That gcc wants both of these prototypes seems mysterious. VC, for\n// its part, can't decide which to use (another mystery). Matching of\n// template overloads: the final frontier.\n#ifndef _MSC_VER\ntemplate <typename T, size_t N>\nchar (&ArraySizeHelper(const T (&array)[N]))[N];\n#endif\n\n#define arraysize(array) (sizeof(ArraySizeHelper(array)))\n\n#endif  // !arraysize\n\n#if !defined(DISALLOW_COPY_AND_ASSIGN)\n\n// A macro to disallow the copy constructor and operator= functions\n// This should be used in the private: declarations for a class\n#define DISALLOW_COPY_AND_ASSIGN(TypeName) \\\n  TypeName(const TypeName&);               \\\n  void operator=(const TypeName&)\n\n#endif  // !DISALLOW_COPY_AND_ASSIGN\n\n#if !defined(DISALLOW_IMPLICIT_CONSTRUCTORS)\n\n// A macro to disallow all the implicit constructors, namely the\n// default constructor, copy constructor and operator= functions.\n//\n// This should be used in the private: declarations for a class\n// that wants to prevent anyone from instantiating it. This is\n// especially useful for classes containing only static methods.\n#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \\\n  TypeName();                                    \\\n  DISALLOW_COPY_AND_ASSIGN(TypeName)\n\n#endif  // !DISALLOW_IMPLICIT_CONSTRUCTORS\n\n#if !defined(COMPILE_ASSERT)\n\n// The COMPILE_ASSERT macro can be used to verify that a compile time\n// expression is true. For example, you could use it to verify the\n// size of a static array:\n//\n//   COMPILE_ASSERT(ARRAYSIZE_UNSAFE(content_type_names) == CONTENT_NUM_TYPES,\n//                  content_type_names_incorrect_size);\n//\n// or to make sure a struct is smaller than a certain size:\n//\n//   COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large);\n//\n// The second argument to the macro is the name of the variable. If\n// the expression is false, most compilers will issue a warning/error\n// containing the name of the variable.\n\n#if __cplusplus >= 201103L\n\n// Under C++11, just use static_assert.\n#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)\n\n#else\n\nnamespace cef {\n\ntemplate <bool>\nstruct CompileAssert {\n};\n\n}  // namespace cef\n\n#define COMPILE_ASSERT(expr, msg) \\\n  typedef cef::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] \\\n      ALLOW_UNUSED_TYPE\n\n// Implementation details of COMPILE_ASSERT:\n//\n// - COMPILE_ASSERT works by defining an array type that has -1\n//   elements (and thus is invalid) when the expression is false.\n//\n// - The simpler definition\n//\n//     #define COMPILE_ASSERT(expr, msg) typedef char msg[(expr) ? 1 : -1]\n//\n//   does not work, as gcc supports variable-length arrays whose sizes\n//   are determined at run-time (this is gcc's extension and not part\n//   of the C++ standard).  As a result, gcc fails to reject the\n//   following code with the simple definition:\n//\n//     int foo;\n//     COMPILE_ASSERT(foo, msg); // not supposed to compile as foo is\n//                               // not a compile-time constant.\n//\n// - By using the type CompileAssert<(bool(expr))>, we ensures that\n//   expr is a compile-time constant.  (Template arguments must be\n//   determined at compile-time.)\n//\n// - The outer parentheses in CompileAssert<(bool(expr))> are necessary\n//   to work around a bug in gcc 3.4.4 and 4.0.1.  If we had written\n//\n//     CompileAssert<bool(expr)>\n//\n//   instead, these compilers will refuse to compile\n//\n//     COMPILE_ASSERT(5 > 0, some_message);\n//\n//   (They seem to think the \">\" in \"5 > 0\" marks the end of the\n//   template argument list.)\n//\n// - The array size is (bool(expr) ? 1 : -1), instead of simply\n//\n//     ((expr) ? 1 : -1).\n//\n//   This is to avoid running into a bug in MS VC 7.1, which\n//   causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.\n\n#endif  // !(__cplusplus >= 201103L)\n\n#endif  // !defined(COMPILE_ASSERT)\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#if !defined(ALLOW_THIS_IN_INITIALIZER_LIST)\n#if defined(COMPILER_MSVC)\n\n// MSVC_PUSH_DISABLE_WARNING pushes |n| onto a stack of warnings to be disabled.\n// The warning remains disabled until popped by MSVC_POP_WARNING.\n#define MSVC_PUSH_DISABLE_WARNING(n) __pragma(warning(push)) \\\n                                     __pragma(warning(disable:n))\n\n// MSVC_PUSH_WARNING_LEVEL pushes |n| as the global warning level.  The level\n// remains in effect until popped by MSVC_POP_WARNING().  Use 0 to disable all\n// warnings.\n#define MSVC_PUSH_WARNING_LEVEL(n) __pragma(warning(push, n))\n\n// Pop effects of innermost MSVC_PUSH_* macro.\n#define MSVC_POP_WARNING() __pragma(warning(pop))\n\n// Allows |this| to be passed as an argument in constructor initializer lists.\n// This uses push/pop instead of the seemingly simpler suppress feature to avoid\n// having the warning be disabled for more than just |code|.\n//\n// Example usage:\n// Foo::Foo() : x(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(y(this)), z(3) {}\n//\n// Compiler warning C4355: 'this': used in base member initializer list:\n// http://msdn.microsoft.com/en-us/library/3c594ae3(VS.80).aspx\n#define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \\\n                                             code \\\n                                             MSVC_POP_WARNING()\n#else  // !COMPILER_MSVC\n\n#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code\n\n#endif  // !COMPILER_MSVC\n#endif  // !ALLOW_THIS_IN_INITIALIZER_LIST\n\n#endif  // CEF_INCLUDE_BASE_CEF_MACROS_H_\n"
  },
  {
    "path": "CEF/include/base/cef_move.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_BASE_CEF_MOVE_H_\n#define CEF_INCLUDE_BASE_CEF_MOVE_H_\n\n#if defined(MOVE_ONLY_TYPE_FOR_CPP_03)\n// Do nothing if the macro in this header has already been defined.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/move.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n// Macro with the boilerplate that makes a type move-only in C++03.\n//\n// USAGE\n//\n// This macro should be used instead of DISALLOW_COPY_AND_ASSIGN to create\n// a \"move-only\" type.  Unlike DISALLOW_COPY_AND_ASSIGN, this macro should be\n// the first line in a class declaration.\n//\n// A class using this macro must call .Pass() (or somehow be an r-value already)\n// before it can be:\n//\n//   * Passed as a function argument\n//   * Used as the right-hand side of an assignment\n//   * Returned from a function\n//\n// Each class will still need to define their own \"move constructor\" and \"move\n// operator=\" to make this useful.  Here's an example of the macro, the move\n// constructor, and the move operator= from the scoped_ptr class:\n//\n//  template <typename T>\n//  class scoped_ptr {\n//     MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue)\n//   public:\n//    scoped_ptr(RValue& other) : ptr_(other.release()) { }\n//    scoped_ptr& operator=(RValue& other) {\n//      swap(other);\n//      return *this;\n//    }\n//  };\n//\n// Note that the constructor must NOT be marked explicit.\n//\n// For consistency, the second parameter to the macro should always be RValue\n// unless you have a strong reason to do otherwise.  It is only exposed as a\n// macro parameter so that the move constructor and move operator= don't look\n// like they're using a phantom type.\n//\n//\n// HOW THIS WORKS\n//\n// For a thorough explanation of this technique, see:\n//\n//   http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Move_Constructor\n//\n// The summary is that we take advantage of 2 properties:\n//\n//   1) non-const references will not bind to r-values.\n//   2) C++ can apply one user-defined conversion when initializing a\n//      variable.\n//\n// The first lets us disable the copy constructor and assignment operator\n// by declaring private version of them with a non-const reference parameter.\n//\n// For l-values, direct initialization still fails like in\n// DISALLOW_COPY_AND_ASSIGN because the copy constructor and assignment\n// operators are private.\n//\n// For r-values, the situation is different. The copy constructor and\n// assignment operator are not viable due to (1), so we are trying to call\n// a non-existent constructor and non-existing operator= rather than a private\n// one.  Since we have not committed an error quite yet, we can provide an\n// alternate conversion sequence and a constructor.  We add\n//\n//   * a private struct named \"RValue\"\n//   * a user-defined conversion \"operator RValue()\"\n//   * a \"move constructor\" and \"move operator=\" that take the RValue& as\n//     their sole parameter.\n//\n// Only r-values will trigger this sequence and execute our \"move constructor\"\n// or \"move operator=.\"  L-values will match the private copy constructor and\n// operator= first giving a \"private in this context\" error.  This combination\n// gives us a move-only type.\n//\n// For signaling a destructive transfer of data from an l-value, we provide a\n// method named Pass() which creates an r-value for the current instance\n// triggering the move constructor or move operator=.\n//\n// Other ways to get r-values is to use the result of an expression like a\n// function call.\n//\n// Here's an example with comments explaining what gets triggered where:\n//\n//    class Foo {\n//      MOVE_ONLY_TYPE_FOR_CPP_03(Foo, RValue);\n//\n//     public:\n//       ... API ...\n//       Foo(RValue other);           // Move constructor.\n//       Foo& operator=(RValue rhs);  // Move operator=\n//    };\n//\n//    Foo MakeFoo();  // Function that returns a Foo.\n//\n//    Foo f;\n//    Foo f_copy(f);  // ERROR: Foo(Foo&) is private in this context.\n//    Foo f_assign;\n//    f_assign = f;   // ERROR: operator=(Foo&) is private in this context.\n//\n//\n//    Foo f(MakeFoo());      // R-value so alternate conversion executed.\n//    Foo f_copy(f.Pass());  // R-value so alternate conversion executed.\n//    f = f_copy.Pass();     // R-value so alternate conversion executed.\n//\n//\n// IMPLEMENTATION SUBTLETIES WITH RValue\n//\n// The RValue struct is just a container for a pointer back to the original\n// object. It should only ever be created as a temporary, and no external\n// class should ever declare it or use it in a parameter.\n//\n// It is tempting to want to use the RValue type in function parameters, but\n// excluding the limited usage here for the move constructor and move\n// operator=, doing so would mean that the function could take both r-values\n// and l-values equially which is unexpected.  See COMPARED To Boost.Move for\n// more details.\n//\n// An alternate, and incorrect, implementation of the RValue class used by\n// Boost.Move makes RValue a fieldless child of the move-only type. RValue&\n// is then used in place of RValue in the various operators.  The RValue& is\n// \"created\" by doing *reinterpret_cast<RValue*>(this).  This has the appeal\n// of never creating a temporary RValue struct even with optimizations\n// disabled.  Also, by virtue of inheritance you can treat the RValue\n// reference as if it were the move-only type itself.  Unfortunately,\n// using the result of this reinterpret_cast<> is actually undefined behavior\n// due to C++98 5.2.10.7. In certain compilers (e.g., NaCl) the optimizer\n// will generate non-working code.\n//\n// In optimized builds, both implementations generate the same assembly so we\n// choose the one that adheres to the standard.\n//\n//\n// WHY HAVE typedef void MoveOnlyTypeForCPP03\n//\n// Callback<>/Bind() needs to understand movable-but-not-copyable semantics\n// to call .Pass() appropriately when it is expected to transfer the value.\n// The cryptic typedef MoveOnlyTypeForCPP03 is added to make this check\n// easy and automatic in helper templates for Callback<>/Bind().\n// See IsMoveOnlyType template and its usage in base/callback_internal.h\n// for more details.\n//\n//\n// COMPARED TO C++11\n//\n// In C++11, you would implement this functionality using an r-value reference\n// and our .Pass() method would be replaced with a call to std::move().\n//\n// This emulation also has a deficiency where it uses up the single\n// user-defined conversion allowed by C++ during initialization.  This can\n// cause problems in some API edge cases.  For instance, in scoped_ptr, it is\n// impossible to make a function \"void Foo(scoped_ptr<Parent> p)\" accept a\n// value of type scoped_ptr<Child> even if you add a constructor to\n// scoped_ptr<> that would make it look like it should work.  C++11 does not\n// have this deficiency.\n//\n//\n// COMPARED TO Boost.Move\n//\n// Our implementation similar to Boost.Move, but we keep the RValue struct\n// private to the move-only type, and we don't use the reinterpret_cast<> hack.\n//\n// In Boost.Move, RValue is the boost::rv<> template.  This type can be used\n// when writing APIs like:\n//\n//   void MyFunc(boost::rv<Foo>& f)\n//\n// that can take advantage of rv<> to avoid extra copies of a type.  However you\n// would still be able to call this version of MyFunc with an l-value:\n//\n//   Foo f;\n//   MyFunc(f);  // Uh oh, we probably just destroyed |f| w/o calling Pass().\n//\n// unless someone is very careful to also declare a parallel override like:\n//\n//   void MyFunc(const Foo& f)\n//\n// that would catch the l-values first.  This was declared unsafe in C++11 and\n// a C++11 compiler will explicitly fail MyFunc(f).  Unfortunately, we cannot\n// ensure this in C++03.\n//\n// Since we have no need for writing such APIs yet, our implementation keeps\n// RValue private and uses a .Pass() method to do the conversion instead of\n// trying to write a version of \"std::move().\" Writing an API like std::move()\n// would require the RValue struct to be public.\n//\n//\n// CAVEATS\n//\n// If you include a move-only type as a field inside a class that does not\n// explicitly declare a copy constructor, the containing class's implicit\n// copy constructor will change from Containing(const Containing&) to\n// Containing(Containing&).  This can cause some unexpected errors.\n//\n//   http://llvm.org/bugs/show_bug.cgi?id=11528\n//\n// The workaround is to explicitly declare your copy constructor.\n//\n#define MOVE_ONLY_TYPE_FOR_CPP_03(type, rvalue_type) \\\n private: \\\n  struct rvalue_type { \\\n    explicit rvalue_type(type* object) : object(object) {} \\\n    type* object; \\\n  }; \\\n  type(type&); \\\n  void operator=(type&); \\\n public: \\\n  operator rvalue_type() { return rvalue_type(this); } \\\n  type Pass() { return type(rvalue_type(this)); } \\\n  typedef void MoveOnlyTypeForCPP03; \\\n private:\n \n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_MOVE_H_\n"
  },
  {
    "path": "CEF/include/base/cef_platform_thread.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// WARNING: You should *NOT* be using this class directly.  PlatformThread is\n// the low-level platform-specific abstraction to the OS's threading interface.\n// You should instead be using a message-loop driven Thread, see thread.h.\n\n#ifndef CEF_INCLUDE_BASE_PLATFORM_THREAD_H_\n#define CEF_INCLUDE_BASE_PLATFORM_THREAD_H_\n\n#if defined(BASE_THREADING_PLATFORM_THREAD_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/threading/platform_thread.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/base/cef_basictypes.h\"\n#include \"include/base/cef_build.h\"\n#include \"include/internal/cef_thread_internal.h\"\n\nnamespace base {\n\n// Used for logging. Always an integer value.\ntypedef cef_platform_thread_id_t PlatformThreadId;\n\n// Used for thread checking and debugging.\n// Meant to be as fast as possible.\n// These are produced by PlatformThread::CurrentRef(), and used to later\n// check if we are on the same thread or not by using ==. These are safe\n// to copy between threads, but can't be copied to another process as they\n// have no meaning there. Also, the internal identifier can be re-used\n// after a thread dies, so a PlatformThreadRef cannot be reliably used\n// to distinguish a new thread from an old, dead thread.\nclass PlatformThreadRef {\n public:\n  typedef cef_platform_thread_handle_t RefType;\n\n  PlatformThreadRef()\n      : id_(0) {\n  }\n\n  explicit PlatformThreadRef(RefType id)\n      : id_(id) {\n  }\n\n  bool operator==(PlatformThreadRef other) const {\n    return id_ == other.id_;\n  }\n\n  bool is_null() const {\n    return id_ == 0;\n  }\n private:\n  RefType id_;\n};\n\n// A namespace for low-level thread functions.\n// Chromium uses a class with static methods but CEF uses an actual namespace\n// to avoid linker problems with the sandbox libaries on Windows.\nnamespace PlatformThread {\n\n// Gets the current thread id, which may be useful for logging purposes.\ninline PlatformThreadId CurrentId() {\n  return cef_get_current_platform_thread_id();\n}\n\n// Gets the current thread reference, which can be used to check if\n// we're on the right thread quickly.\ninline PlatformThreadRef CurrentRef() {\n  return PlatformThreadRef(cef_get_current_platform_thread_handle());\n}\n\n}  // namespace PlatformThread\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_PLATFORM_THREAD_H_\n"
  },
  {
    "path": "CEF/include/base/cef_ref_counted.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n\n#ifndef CEF_INCLUDE_BASE_CEF_REF_COUNTED_H_\n#define CEF_INCLUDE_BASE_CEF_REF_COUNTED_H_\n#pragma once\n\n#if defined(BASE_MEMORY_REF_COUNTED_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/memory/ref_counted.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include <cassert>\n\n#include \"include/base/cef_atomic_ref_count.h\"\n#include \"include/base/cef_build.h\"\n#ifndef NDEBUG\n#include \"include/base/cef_logging.h\"\n#endif\n#include \"include/base/cef_thread_collision_warner.h\"\n\nnamespace base {\n\nnamespace cef_subtle {\n\nclass RefCountedBase {\n public:\n  bool HasOneRef() const { return ref_count_ == 1; }\n\n protected:\n  RefCountedBase()\n      : ref_count_(0)\n  #ifndef NDEBUG\n      , in_dtor_(false)\n  #endif\n      {\n  }\n\n  ~RefCountedBase() {\n  #ifndef NDEBUG\n    DCHECK(in_dtor_) << \"RefCounted object deleted without calling Release()\";\n  #endif\n  }\n\n\n  void AddRef() const {\n    // TODO(maruel): Add back once it doesn't assert 500 times/sec.\n    // Current thread books the critical section \"AddRelease\"\n    // without release it.\n    // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);\n  #ifndef NDEBUG\n    DCHECK(!in_dtor_);\n  #endif\n    ++ref_count_;\n  }\n\n  // Returns true if the object should self-delete.\n  bool Release() const {\n    // TODO(maruel): Add back once it doesn't assert 500 times/sec.\n    // Current thread books the critical section \"AddRelease\"\n    // without release it.\n    // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);\n  #ifndef NDEBUG\n    DCHECK(!in_dtor_);\n  #endif\n    if (--ref_count_ == 0) {\n  #ifndef NDEBUG\n      in_dtor_ = true;\n  #endif\n      return true;\n    }\n    return false;\n  }\n\n private:\n  mutable int ref_count_;\n#ifndef NDEBUG\n  mutable bool in_dtor_;\n#endif\n\n  DFAKE_MUTEX(add_release_);\n\n  DISALLOW_COPY_AND_ASSIGN(RefCountedBase);\n};\n\nclass RefCountedThreadSafeBase {\n public:\n  bool HasOneRef() const;\n\n protected:\n  RefCountedThreadSafeBase();\n  ~RefCountedThreadSafeBase();\n\n  void AddRef() const;\n\n  // Returns true if the object should self-delete.\n  bool Release() const;\n\n private:\n  mutable AtomicRefCount ref_count_;\n#ifndef NDEBUG\n  mutable bool in_dtor_;\n#endif\n\n  DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafeBase);\n};\n\n}  // namespace cef_subtle\n\n//\n// A base class for reference counted classes.  Otherwise, known as a cheap\n// knock-off of WebKit's RefCounted<T> class.  To use this guy just extend your\n// class from it like so:\n//\n//   class MyFoo : public base::RefCounted<MyFoo> {\n//    ...\n//    private:\n//     friend class base::RefCounted<MyFoo>;\n//     ~MyFoo();\n//   };\n//\n// You should always make your destructor private, to avoid any code deleting\n// the object accidently while there are references to it.\ntemplate <class T>\nclass RefCounted : public cef_subtle::RefCountedBase {\n public:\n  RefCounted() {}\n\n  void AddRef() const {\n    cef_subtle::RefCountedBase::AddRef();\n  }\n\n  void Release() const {\n    if (cef_subtle::RefCountedBase::Release()) {\n      delete static_cast<const T*>(this);\n    }\n  }\n\n protected:\n  ~RefCounted() {}\n\n private:\n  DISALLOW_COPY_AND_ASSIGN(RefCounted<T>);\n};\n\n// Forward declaration.\ntemplate <class T, typename Traits> class RefCountedThreadSafe;\n\n// Default traits for RefCountedThreadSafe<T>.  Deletes the object when its ref\n// count reaches 0.  Overload to delete it on a different thread etc.\ntemplate<typename T>\nstruct DefaultRefCountedThreadSafeTraits {\n  static void Destruct(const T* x) {\n    // Delete through RefCountedThreadSafe to make child classes only need to be\n    // friend with RefCountedThreadSafe instead of this struct, which is an\n    // implementation detail.\n    RefCountedThreadSafe<T,\n                         DefaultRefCountedThreadSafeTraits>::DeleteInternal(x);\n  }\n};\n\n//\n// A thread-safe variant of RefCounted<T>\n//\n//   class MyFoo : public base::RefCountedThreadSafe<MyFoo> {\n//    ...\n//   };\n//\n// If you're using the default trait, then you should add compile time\n// asserts that no one else is deleting your object.  i.e.\n//    private:\n//     friend class base::RefCountedThreadSafe<MyFoo>;\n//     ~MyFoo();\ntemplate <class T, typename Traits = DefaultRefCountedThreadSafeTraits<T> >\nclass RefCountedThreadSafe : public cef_subtle::RefCountedThreadSafeBase {\n public:\n  RefCountedThreadSafe() {}\n\n  void AddRef() const {\n    cef_subtle::RefCountedThreadSafeBase::AddRef();\n  }\n\n  void Release() const {\n    if (cef_subtle::RefCountedThreadSafeBase::Release()) {\n      Traits::Destruct(static_cast<const T*>(this));\n    }\n  }\n\n protected:\n  ~RefCountedThreadSafe() {}\n\n private:\n  friend struct DefaultRefCountedThreadSafeTraits<T>;\n  static void DeleteInternal(const T* x) { delete x; }\n\n  DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafe);\n};\n\n//\n// A thread-safe wrapper for some piece of data so we can place other\n// things in scoped_refptrs<>.\n//\ntemplate<typename T>\nclass RefCountedData\n    : public base::RefCountedThreadSafe< base::RefCountedData<T> > {\n public:\n  RefCountedData() : data() {}\n  RefCountedData(const T& in_value) : data(in_value) {}\n\n  T data;\n\n private:\n  friend class base::RefCountedThreadSafe<base::RefCountedData<T> >;\n  ~RefCountedData() {}\n};\n\n}  // namespace base\n\n//\n// A smart pointer class for reference counted objects.  Use this class instead\n// of calling AddRef and Release manually on a reference counted object to\n// avoid common memory leaks caused by forgetting to Release an object\n// reference.  Sample usage:\n//\n//   class MyFoo : public RefCounted<MyFoo> {\n//    ...\n//   };\n//\n//   void some_function() {\n//     scoped_refptr<MyFoo> foo = new MyFoo();\n//     foo->Method(param);\n//     // |foo| is released when this function returns\n//   }\n//\n//   void some_other_function() {\n//     scoped_refptr<MyFoo> foo = new MyFoo();\n//     ...\n//     foo = NULL;  // explicitly releases |foo|\n//     ...\n//     if (foo)\n//       foo->Method(param);\n//   }\n//\n// The above examples show how scoped_refptr<T> acts like a pointer to T.\n// Given two scoped_refptr<T> classes, it is also possible to exchange\n// references between the two objects, like so:\n//\n//   {\n//     scoped_refptr<MyFoo> a = new MyFoo();\n//     scoped_refptr<MyFoo> b;\n//\n//     b.swap(a);\n//     // now, |b| references the MyFoo object, and |a| references NULL.\n//   }\n//\n// To make both |a| and |b| in the above example reference the same MyFoo\n// object, simply use the assignment operator:\n//\n//   {\n//     scoped_refptr<MyFoo> a = new MyFoo();\n//     scoped_refptr<MyFoo> b;\n//\n//     b = a;\n//     // now, |a| and |b| each own a reference to the same MyFoo object.\n//   }\n//\ntemplate <class T>\nclass scoped_refptr {\n public:\n  typedef T element_type;\n\n  scoped_refptr() : ptr_(NULL) {\n  }\n\n  scoped_refptr(T* p) : ptr_(p) {\n    if (ptr_)\n      ptr_->AddRef();\n  }\n\n  scoped_refptr(const scoped_refptr<T>& r) : ptr_(r.ptr_) {\n    if (ptr_)\n      ptr_->AddRef();\n  }\n\n  template <typename U>\n  scoped_refptr(const scoped_refptr<U>& r) : ptr_(r.get()) {\n    if (ptr_)\n      ptr_->AddRef();\n  }\n\n  ~scoped_refptr() {\n    if (ptr_)\n      ptr_->Release();\n  }\n\n  T* get() const { return ptr_; }\n\n  // Allow scoped_refptr<C> to be used in boolean expression\n  // and comparison operations.\n  operator T*() const { return ptr_; }\n\n  T* operator->() const {\n    assert(ptr_ != NULL);\n    return ptr_;\n  }\n\n  scoped_refptr<T>& operator=(T* p) {\n    // AddRef first so that self assignment should work\n    if (p)\n      p->AddRef();\n    T* old_ptr = ptr_;\n    ptr_ = p;\n    if (old_ptr)\n      old_ptr->Release();\n    return *this;\n  }\n\n  scoped_refptr<T>& operator=(const scoped_refptr<T>& r) {\n    return *this = r.ptr_;\n  }\n\n  template <typename U>\n  scoped_refptr<T>& operator=(const scoped_refptr<U>& r) {\n    return *this = r.get();\n  }\n\n  void swap(T** pp) {\n    T* p = ptr_;\n    ptr_ = *pp;\n    *pp = p;\n  }\n\n  void swap(scoped_refptr<T>& r) {\n    swap(&r.ptr_);\n  }\n\n protected:\n  T* ptr_;\n};\n\n// Handy utility for creating a scoped_refptr<T> out of a T* explicitly without\n// having to retype all the template arguments\ntemplate <typename T>\nscoped_refptr<T> make_scoped_refptr(T* t) {\n  return scoped_refptr<T>(t);\n}\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_REF_COUNTED_H_\n"
  },
  {
    "path": "CEF/include/base/cef_scoped_ptr.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Scopers help you manage ownership of a pointer, helping you easily manage a\n// pointer within a scope, and automatically destroying the pointer at the end\n// of a scope.  There are two main classes you will use, which correspond to the\n// operators new/delete and new[]/delete[].\n//\n// Example usage (scoped_ptr<T>):\n//   {\n//     scoped_ptr<Foo> foo(new Foo(\"wee\"));\n//   }  // foo goes out of scope, releasing the pointer with it.\n//\n//   {\n//     scoped_ptr<Foo> foo;          // No pointer managed.\n//     foo.reset(new Foo(\"wee\"));    // Now a pointer is managed.\n//     foo.reset(new Foo(\"wee2\"));   // Foo(\"wee\") was destroyed.\n//     foo.reset(new Foo(\"wee3\"));   // Foo(\"wee2\") was destroyed.\n//     foo->Method();                // Foo::Method() called.\n//     foo.get()->Method();          // Foo::Method() called.\n//     SomeFunc(foo.release());      // SomeFunc takes ownership, foo no longer\n//                                   // manages a pointer.\n//     foo.reset(new Foo(\"wee4\"));   // foo manages a pointer again.\n//     foo.reset();                  // Foo(\"wee4\") destroyed, foo no longer\n//                                   // manages a pointer.\n//   }  // foo wasn't managing a pointer, so nothing was destroyed.\n//\n// Example usage (scoped_ptr<T[]>):\n//   {\n//     scoped_ptr<Foo[]> foo(new Foo[100]);\n//     foo.get()->Method();  // Foo::Method on the 0th element.\n//     foo[10].Method();     // Foo::Method on the 10th element.\n//   }\n//\n// These scopers also implement part of the functionality of C++11 unique_ptr\n// in that they are \"movable but not copyable.\"  You can use the scopers in\n// the parameter and return types of functions to signify ownership transfer\n// in to and out of a function.  When calling a function that has a scoper\n// as the argument type, it must be called with the result of an analogous\n// scoper's Pass() function or another function that generates a temporary;\n// passing by copy will NOT work.  Here is an example using scoped_ptr:\n//\n//   void TakesOwnership(scoped_ptr<Foo> arg) {\n//     // Do something with arg\n//   }\n//   scoped_ptr<Foo> CreateFoo() {\n//     // No need for calling Pass() because we are constructing a temporary\n//     // for the return value.\n//     return scoped_ptr<Foo>(new Foo(\"new\"));\n//   }\n//   scoped_ptr<Foo> PassThru(scoped_ptr<Foo> arg) {\n//     return arg.Pass();\n//   }\n//\n//   {\n//     scoped_ptr<Foo> ptr(new Foo(\"yay\"));  // ptr manages Foo(\"yay\").\n//     TakesOwnership(ptr.Pass());           // ptr no longer owns Foo(\"yay\").\n//     scoped_ptr<Foo> ptr2 = CreateFoo();   // ptr2 owns the return Foo.\n//     scoped_ptr<Foo> ptr3 =                // ptr3 now owns what was in ptr2.\n//         PassThru(ptr2.Pass());            // ptr2 is correspondingly NULL.\n//   }\n//\n// Notice that if you do not call Pass() when returning from PassThru(), or\n// when invoking TakesOwnership(), the code will not compile because scopers\n// are not copyable; they only implement move semantics which require calling\n// the Pass() function to signify a destructive transfer of state. CreateFoo()\n// is different though because we are constructing a temporary on the return\n// line and thus can avoid needing to call Pass().\n//\n// Pass() properly handles upcast in initialization, i.e. you can use a\n// scoped_ptr<Child> to initialize a scoped_ptr<Parent>:\n//\n//   scoped_ptr<Foo> foo(new Foo());\n//   scoped_ptr<FooParent> parent(foo.Pass());\n//\n// PassAs<>() should be used to upcast return value in return statement:\n//\n//   scoped_ptr<Foo> CreateFoo() {\n//     scoped_ptr<FooChild> result(new FooChild());\n//     return result.PassAs<Foo>();\n//   }\n//\n// Note that PassAs<>() is implemented only for scoped_ptr<T>, but not for\n// scoped_ptr<T[]>. This is because casting array pointers may not be safe.\n\n#ifndef CEF_INCLUDE_BASE_CEF_MEMORY_SCOPED_PTR_H_\n#define CEF_INCLUDE_BASE_CEF_MEMORY_SCOPED_PTR_H_\n#pragma once\n\n#if defined(BASE_MEMORY_SCOPED_PTR_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/memory/scoped_ptr.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n// This is an implementation designed to match the anticipated future TR2\n// implementation of the scoped_ptr class.\n\n#include <assert.h>\n#include <stddef.h>\n#include <stdlib.h>\n\n#include <algorithm>  // For std::swap().\n\n#include \"include/base/cef_basictypes.h\"\n#include \"include/base/cef_build.h\"\n#include \"include/base/cef_macros.h\"\n#include \"include/base/cef_move.h\"\n#include \"include/base/cef_template_util.h\"\n\nnamespace base {\n\nnamespace subtle {\nclass RefCountedBase;\nclass RefCountedThreadSafeBase;\n}  // namespace subtle\n\n// Function object which deletes its parameter, which must be a pointer.\n// If C is an array type, invokes 'delete[]' on the parameter; otherwise,\n// invokes 'delete'. The default deleter for scoped_ptr<T>.\ntemplate <class T>\nstruct DefaultDeleter {\n  DefaultDeleter() {}\n  template <typename U> DefaultDeleter(const DefaultDeleter<U>& other) {\n    // IMPLEMENTATION NOTE: C++11 20.7.1.1.2p2 only provides this constructor\n    // if U* is implicitly convertible to T* and U is not an array type.\n    //\n    // Correct implementation should use SFINAE to disable this\n    // constructor. However, since there are no other 1-argument constructors,\n    // using a COMPILE_ASSERT() based on is_convertible<> and requiring\n    // complete types is simpler and will cause compile failures for equivalent\n    // misuses.\n    //\n    // Note, the is_convertible<U*, T*> check also ensures that U is not an\n    // array. T is guaranteed to be a non-array, so any U* where U is an array\n    // cannot convert to T*.\n    enum { T_must_be_complete = sizeof(T) };\n    enum { U_must_be_complete = sizeof(U) };\n    COMPILE_ASSERT((base::is_convertible<U*, T*>::value),\n                   U_ptr_must_implicitly_convert_to_T_ptr);\n  }\n  inline void operator()(T* ptr) const {\n    enum { type_must_be_complete = sizeof(T) };\n    delete ptr;\n  }\n};\n\n// Specialization of DefaultDeleter for array types.\ntemplate <class T>\nstruct DefaultDeleter<T[]> {\n  inline void operator()(T* ptr) const {\n    enum { type_must_be_complete = sizeof(T) };\n    delete[] ptr;\n  }\n\n private:\n  // Disable this operator for any U != T because it is undefined to execute\n  // an array delete when the static type of the array mismatches the dynamic\n  // type.\n  //\n  // References:\n  //   C++98 [expr.delete]p3\n  //   http://cplusplus.github.com/LWG/lwg-defects.html#938\n  template <typename U> void operator()(U* array) const;\n};\n\ntemplate <class T, int n>\nstruct DefaultDeleter<T[n]> {\n  // Never allow someone to declare something like scoped_ptr<int[10]>.\n  COMPILE_ASSERT(sizeof(T) == -1, do_not_use_array_with_size_as_type);\n};\n\n// Function object which invokes 'free' on its parameter, which must be\n// a pointer. Can be used to store malloc-allocated pointers in scoped_ptr:\n//\n// scoped_ptr<int, base::FreeDeleter> foo_ptr(\n//     static_cast<int*>(malloc(sizeof(int))));\nstruct FreeDeleter {\n  inline void operator()(void* ptr) const {\n    free(ptr);\n  }\n};\n\nnamespace cef_internal {\n\ntemplate <typename T> struct IsNotRefCounted {\n  enum {\n    value = !base::is_convertible<T*, base::subtle::RefCountedBase*>::value &&\n        !base::is_convertible<T*, base::subtle::RefCountedThreadSafeBase*>::\n            value\n  };\n};\n\n// Minimal implementation of the core logic of scoped_ptr, suitable for\n// reuse in both scoped_ptr and its specializations.\ntemplate <class T, class D>\nclass scoped_ptr_impl {\n public:\n  explicit scoped_ptr_impl(T* p) : data_(p) { }\n\n  // Initializer for deleters that have data parameters.\n  scoped_ptr_impl(T* p, const D& d) : data_(p, d) {}\n\n  // Templated constructor that destructively takes the value from another\n  // scoped_ptr_impl.\n  template <typename U, typename V>\n  scoped_ptr_impl(scoped_ptr_impl<U, V>* other)\n      : data_(other->release(), other->get_deleter()) {\n    // We do not support move-only deleters.  We could modify our move\n    // emulation to have base::subtle::move() and base::subtle::forward()\n    // functions that are imperfect emulations of their C++11 equivalents,\n    // but until there's a requirement, just assume deleters are copyable.\n  }\n\n  template <typename U, typename V>\n  void TakeState(scoped_ptr_impl<U, V>* other) {\n    // See comment in templated constructor above regarding lack of support\n    // for move-only deleters.\n    reset(other->release());\n    get_deleter() = other->get_deleter();\n  }\n\n  ~scoped_ptr_impl() {\n    if (data_.ptr != NULL) {\n      // Not using get_deleter() saves one function call in non-optimized\n      // builds.\n      static_cast<D&>(data_)(data_.ptr);\n    }\n  }\n\n  void reset(T* p) {\n    // This is a self-reset, which is no longer allowed: http://crbug.com/162971\n    if (p != NULL && p == data_.ptr)\n      abort();\n\n    // Note that running data_.ptr = p can lead to undefined behavior if\n    // get_deleter()(get()) deletes this. In order to prevent this, reset()\n    // should update the stored pointer before deleting its old value.\n    //\n    // However, changing reset() to use that behavior may cause current code to\n    // break in unexpected ways. If the destruction of the owned object\n    // dereferences the scoped_ptr when it is destroyed by a call to reset(),\n    // then it will incorrectly dispatch calls to |p| rather than the original\n    // value of |data_.ptr|.\n    //\n    // During the transition period, set the stored pointer to NULL while\n    // deleting the object. Eventually, this safety check will be removed to\n    // prevent the scenario initially described from occuring and\n    // http://crbug.com/176091 can be closed.\n    T* old = data_.ptr;\n    data_.ptr = NULL;\n    if (old != NULL)\n      static_cast<D&>(data_)(old);\n    data_.ptr = p;\n  }\n\n  T* get() const { return data_.ptr; }\n\n  D& get_deleter() { return data_; }\n  const D& get_deleter() const { return data_; }\n\n  void swap(scoped_ptr_impl& p2) {\n    // Standard swap idiom: 'using std::swap' ensures that std::swap is\n    // present in the overload set, but we call swap unqualified so that\n    // any more-specific overloads can be used, if available.\n    using std::swap;\n    swap(static_cast<D&>(data_), static_cast<D&>(p2.data_));\n    swap(data_.ptr, p2.data_.ptr);\n  }\n\n  T* release() {\n    T* old_ptr = data_.ptr;\n    data_.ptr = NULL;\n    return old_ptr;\n  }\n\n private:\n  // Needed to allow type-converting constructor.\n  template <typename U, typename V> friend class scoped_ptr_impl;\n\n  // Use the empty base class optimization to allow us to have a D\n  // member, while avoiding any space overhead for it when D is an\n  // empty class.  See e.g. http://www.cantrip.org/emptyopt.html for a good\n  // discussion of this technique.\n  struct Data : public D {\n    explicit Data(T* ptr_in) : ptr(ptr_in) {}\n    Data(T* ptr_in, const D& other) : D(other), ptr(ptr_in) {}\n    T* ptr;\n  };\n\n  Data data_;\n\n  DISALLOW_COPY_AND_ASSIGN(scoped_ptr_impl);\n};\n\n}  // namespace cef_internal\n\n}  // namespace base\n\n// A scoped_ptr<T> is like a T*, except that the destructor of scoped_ptr<T>\n// automatically deletes the pointer it holds (if any).\n// That is, scoped_ptr<T> owns the T object that it points to.\n// Like a T*, a scoped_ptr<T> may hold either NULL or a pointer to a T object.\n// Also like T*, scoped_ptr<T> is thread-compatible, and once you\n// dereference it, you get the thread safety guarantees of T.\n//\n// The size of scoped_ptr is small. On most compilers, when using the\n// DefaultDeleter, sizeof(scoped_ptr<T>) == sizeof(T*). Custom deleters will\n// increase the size proportional to whatever state they need to have. See\n// comments inside scoped_ptr_impl<> for details.\n//\n// Current implementation targets having a strict subset of  C++11's\n// unique_ptr<> features. Known deficiencies include not supporting move-only\n// deleteres, function pointers as deleters, and deleters with reference\n// types.\ntemplate <class T, class D = base::DefaultDeleter<T> >\nclass scoped_ptr {\n  MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue)\n\n  COMPILE_ASSERT(base::cef_internal::IsNotRefCounted<T>::value,\n                 T_is_refcounted_type_and_needs_scoped_refptr);\n\n public:\n  // The element and deleter types.\n  typedef T element_type;\n  typedef D deleter_type;\n\n  // Constructor.  Defaults to initializing with NULL.\n  scoped_ptr() : impl_(NULL) { }\n\n  // Constructor.  Takes ownership of p.\n  explicit scoped_ptr(element_type* p) : impl_(p) { }\n\n  // Constructor.  Allows initialization of a stateful deleter.\n  scoped_ptr(element_type* p, const D& d) : impl_(p, d) { }\n\n  // Constructor.  Allows construction from a scoped_ptr rvalue for a\n  // convertible type and deleter.\n  //\n  // IMPLEMENTATION NOTE: C++11 unique_ptr<> keeps this constructor distinct\n  // from the normal move constructor. By C++11 20.7.1.2.1.21, this constructor\n  // has different post-conditions if D is a reference type. Since this\n  // implementation does not support deleters with reference type,\n  // we do not need a separate move constructor allowing us to avoid one\n  // use of SFINAE. You only need to care about this if you modify the\n  // implementation of scoped_ptr.\n  template <typename U, typename V>\n  scoped_ptr(scoped_ptr<U, V> other) : impl_(&other.impl_) {\n    COMPILE_ASSERT(!base::is_array<U>::value, U_cannot_be_an_array);\n  }\n\n  // Constructor.  Move constructor for C++03 move emulation of this type.\n  scoped_ptr(RValue rvalue) : impl_(&rvalue.object->impl_) { }\n\n  // operator=.  Allows assignment from a scoped_ptr rvalue for a convertible\n  // type and deleter.\n  //\n  // IMPLEMENTATION NOTE: C++11 unique_ptr<> keeps this operator= distinct from\n  // the normal move assignment operator. By C++11 20.7.1.2.3.4, this templated\n  // form has different requirements on for move-only Deleters. Since this\n  // implementation does not support move-only Deleters, we do not need a\n  // separate move assignment operator allowing us to avoid one use of SFINAE.\n  // You only need to care about this if you modify the implementation of\n  // scoped_ptr.\n  template <typename U, typename V>\n  scoped_ptr& operator=(scoped_ptr<U, V> rhs) {\n    COMPILE_ASSERT(!base::is_array<U>::value, U_cannot_be_an_array);\n    impl_.TakeState(&rhs.impl_);\n    return *this;\n  }\n\n  // Reset.  Deletes the currently owned object, if any.\n  // Then takes ownership of a new object, if given.\n  void reset(element_type* p = NULL) { impl_.reset(p); }\n\n  // Accessors to get the owned object.\n  // operator* and operator-> will assert() if there is no current object.\n  element_type& operator*() const {\n    assert(impl_.get() != NULL);\n    return *impl_.get();\n  }\n  element_type* operator->() const  {\n    assert(impl_.get() != NULL);\n    return impl_.get();\n  }\n  element_type* get() const { return impl_.get(); }\n\n  // Access to the deleter.\n  deleter_type& get_deleter() { return impl_.get_deleter(); }\n  const deleter_type& get_deleter() const { return impl_.get_deleter(); }\n\n  // Allow scoped_ptr<element_type> to be used in boolean expressions, but not\n  // implicitly convertible to a real bool (which is dangerous).\n  //\n  // Note that this trick is only safe when the == and != operators\n  // are declared explicitly, as otherwise \"scoped_ptr1 ==\n  // scoped_ptr2\" will compile but do the wrong thing (i.e., convert\n  // to Testable and then do the comparison).\n private:\n  typedef base::cef_internal::scoped_ptr_impl<element_type, deleter_type>\n      scoped_ptr::*Testable;\n\n public:\n  operator Testable() const { return impl_.get() ? &scoped_ptr::impl_ : NULL; }\n\n  // Comparison operators.\n  // These return whether two scoped_ptr refer to the same object, not just to\n  // two different but equal objects.\n  bool operator==(const element_type* p) const { return impl_.get() == p; }\n  bool operator!=(const element_type* p) const { return impl_.get() != p; }\n\n  // Swap two scoped pointers.\n  void swap(scoped_ptr& p2) {\n    impl_.swap(p2.impl_);\n  }\n\n  // Release a pointer.\n  // The return value is the current pointer held by this object.\n  // If this object holds a NULL pointer, the return value is NULL.\n  // After this operation, this object will hold a NULL pointer,\n  // and will not own the object any more.\n  element_type* release() WARN_UNUSED_RESULT {\n    return impl_.release();\n  }\n\n  // C++98 doesn't support functions templates with default parameters which\n  // makes it hard to write a PassAs() that understands converting the deleter\n  // while preserving simple calling semantics.\n  //\n  // Until there is a use case for PassAs() with custom deleters, just ignore\n  // the custom deleter.\n  template <typename PassAsType>\n  scoped_ptr<PassAsType> PassAs() {\n    return scoped_ptr<PassAsType>(Pass());\n  }\n\n private:\n  // Needed to reach into |impl_| in the constructor.\n  template <typename U, typename V> friend class scoped_ptr;\n  base::cef_internal::scoped_ptr_impl<element_type, deleter_type> impl_;\n\n  // Forbidden for API compatibility with std::unique_ptr.\n  explicit scoped_ptr(int disallow_construction_from_null);\n\n  // Forbid comparison of scoped_ptr types.  If U != T, it totally\n  // doesn't make sense, and if U == T, it still doesn't make sense\n  // because you should never have the same object owned by two different\n  // scoped_ptrs.\n  template <class U> bool operator==(scoped_ptr<U> const& p2) const;\n  template <class U> bool operator!=(scoped_ptr<U> const& p2) const;\n};\n\ntemplate <class T, class D>\nclass scoped_ptr<T[], D> {\n  MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue)\n\n public:\n  // The element and deleter types.\n  typedef T element_type;\n  typedef D deleter_type;\n\n  // Constructor.  Defaults to initializing with NULL.\n  scoped_ptr() : impl_(NULL) { }\n\n  // Constructor. Stores the given array. Note that the argument's type\n  // must exactly match T*. In particular:\n  // - it cannot be a pointer to a type derived from T, because it is\n  //   inherently unsafe in the general case to access an array through a\n  //   pointer whose dynamic type does not match its static type (eg., if\n  //   T and the derived types had different sizes access would be\n  //   incorrectly calculated). Deletion is also always undefined\n  //   (C++98 [expr.delete]p3). If you're doing this, fix your code.\n  // - it cannot be NULL, because NULL is an integral expression, not a\n  //   pointer to T. Use the no-argument version instead of explicitly\n  //   passing NULL.\n  // - it cannot be const-qualified differently from T per unique_ptr spec\n  //   (http://cplusplus.github.com/LWG/lwg-active.html#2118). Users wanting\n  //   to work around this may use implicit_cast<const T*>().\n  //   However, because of the first bullet in this comment, users MUST\n  //   NOT use implicit_cast<Base*>() to upcast the static type of the array.\n  explicit scoped_ptr(element_type* array) : impl_(array) { }\n\n  // Constructor.  Move constructor for C++03 move emulation of this type.\n  scoped_ptr(RValue rvalue) : impl_(&rvalue.object->impl_) { }\n\n  // operator=.  Move operator= for C++03 move emulation of this type.\n  scoped_ptr& operator=(RValue rhs) {\n    impl_.TakeState(&rhs.object->impl_);\n    return *this;\n  }\n\n  // Reset.  Deletes the currently owned array, if any.\n  // Then takes ownership of a new object, if given.\n  void reset(element_type* array = NULL) { impl_.reset(array); }\n\n  // Accessors to get the owned array.\n  element_type& operator[](size_t i) const {\n    assert(impl_.get() != NULL);\n    return impl_.get()[i];\n  }\n  element_type* get() const { return impl_.get(); }\n\n  // Access to the deleter.\n  deleter_type& get_deleter() { return impl_.get_deleter(); }\n  const deleter_type& get_deleter() const { return impl_.get_deleter(); }\n\n  // Allow scoped_ptr<element_type> to be used in boolean expressions, but not\n  // implicitly convertible to a real bool (which is dangerous).\n private:\n  typedef base::cef_internal::scoped_ptr_impl<element_type, deleter_type>\n      scoped_ptr::*Testable;\n\n public:\n  operator Testable() const { return impl_.get() ? &scoped_ptr::impl_ : NULL; }\n\n  // Comparison operators.\n  // These return whether two scoped_ptr refer to the same object, not just to\n  // two different but equal objects.\n  bool operator==(element_type* array) const { return impl_.get() == array; }\n  bool operator!=(element_type* array) const { return impl_.get() != array; }\n\n  // Swap two scoped pointers.\n  void swap(scoped_ptr& p2) {\n    impl_.swap(p2.impl_);\n  }\n\n  // Release a pointer.\n  // The return value is the current pointer held by this object.\n  // If this object holds a NULL pointer, the return value is NULL.\n  // After this operation, this object will hold a NULL pointer,\n  // and will not own the object any more.\n  element_type* release() WARN_UNUSED_RESULT {\n    return impl_.release();\n  }\n\n private:\n  // Force element_type to be a complete type.\n  enum { type_must_be_complete = sizeof(element_type) };\n\n  // Actually hold the data.\n  base::cef_internal::scoped_ptr_impl<element_type, deleter_type> impl_;\n\n  // Disable initialization from any type other than element_type*, by\n  // providing a constructor that matches such an initialization, but is\n  // private and has no definition. This is disabled because it is not safe to\n  // call delete[] on an array whose static type does not match its dynamic\n  // type.\n  template <typename U> explicit scoped_ptr(U* array);\n  explicit scoped_ptr(int disallow_construction_from_null);\n\n  // Disable reset() from any type other than element_type*, for the same\n  // reasons as the constructor above.\n  template <typename U> void reset(U* array);\n  void reset(int disallow_reset_from_null);\n\n  // Forbid comparison of scoped_ptr types.  If U != T, it totally\n  // doesn't make sense, and if U == T, it still doesn't make sense\n  // because you should never have the same object owned by two different\n  // scoped_ptrs.\n  template <class U> bool operator==(scoped_ptr<U> const& p2) const;\n  template <class U> bool operator!=(scoped_ptr<U> const& p2) const;\n};\n\n// Free functions\ntemplate <class T, class D>\nvoid swap(scoped_ptr<T, D>& p1, scoped_ptr<T, D>& p2) {\n  p1.swap(p2);\n}\n\ntemplate <class T, class D>\nbool operator==(T* p1, const scoped_ptr<T, D>& p2) {\n  return p1 == p2.get();\n}\n\ntemplate <class T, class D>\nbool operator!=(T* p1, const scoped_ptr<T, D>& p2) {\n  return p1 != p2.get();\n}\n\n// A function to convert T* into scoped_ptr<T>\n// Doing e.g. make_scoped_ptr(new FooBarBaz<type>(arg)) is a shorter notation\n// for scoped_ptr<FooBarBaz<type> >(new FooBarBaz<type>(arg))\ntemplate <typename T>\nscoped_ptr<T> make_scoped_ptr(T* ptr) {\n  return scoped_ptr<T>(ptr);\n}\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_MEMORY_SCOPED_PTR_H_\n"
  },
  {
    "path": "CEF/include/base/cef_string16.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2013\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_BASE_CEF_STRING16_H_\n#define CEF_INCLUDE_BASE_CEF_STRING16_H_\n#pragma once\n\n#if defined(BASE_STRINGS_STRING16_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/strings/string16.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n// WHAT:\n// A version of std::basic_string that provides 2-byte characters even when\n// wchar_t is not implemented as a 2-byte type. You can access this class as\n// string16. We also define char16, which string16 is based upon.\n//\n// WHY:\n// On Windows, wchar_t is 2 bytes, and it can conveniently handle UTF-16/UCS-2\n// data. Plenty of existing code operates on strings encoded as UTF-16.\n//\n// On many other platforms, sizeof(wchar_t) is 4 bytes by default. We can make\n// it 2 bytes by using the GCC flag -fshort-wchar. But then std::wstring fails\n// at run time, because it calls some functions (like wcslen) that come from\n// the system's native C library -- which was built with a 4-byte wchar_t!\n// It's wasteful to use 4-byte wchar_t strings to carry UTF-16 data, and it's\n// entirely improper on those systems where the encoding of wchar_t is defined\n// as UTF-32.\n//\n// Here, we define string16, which is similar to std::wstring but replaces all\n// libc functions with custom, 2-byte-char compatible routines. It is capable\n// of carrying UTF-16-encoded data.\n\n#include <stdio.h>\n#include <string>\n\n#include \"include/base/cef_basictypes.h\"\n\n#if defined(WCHAR_T_IS_UTF16)\n\nnamespace base {\n\ntypedef wchar_t char16;\ntypedef std::wstring string16;\ntypedef std::char_traits<wchar_t> string16_char_traits;\n\n}  // namespace base\n\n#elif defined(WCHAR_T_IS_UTF32)\n\n#include <stdint.h>  // For uint16_t\n\n#include \"include/base/cef_macros.h\"\n\nnamespace base {\n\ntypedef uint16_t char16;\n\n// char16 versions of the functions required by string16_char_traits; these\n// are based on the wide character functions of similar names (\"w\" or \"wcs\"\n// instead of \"c16\").\nint c16memcmp(const char16* s1, const char16* s2, size_t n);\nsize_t c16len(const char16* s);\nconst char16* c16memchr(const char16* s, char16 c, size_t n);\nchar16* c16memmove(char16* s1, const char16* s2, size_t n);\nchar16* c16memcpy(char16* s1, const char16* s2, size_t n);\nchar16* c16memset(char16* s, char16 c, size_t n);\n\nstruct string16_char_traits {\n  typedef char16 char_type;\n  typedef int int_type;\n\n  // int_type needs to be able to hold each possible value of char_type, and in\n  // addition, the distinct value of eof().\n  COMPILE_ASSERT(sizeof(int_type) > sizeof(char_type), unexpected_type_width);\n\n  typedef std::streamoff off_type;\n  typedef mbstate_t state_type;\n  typedef std::fpos<state_type> pos_type;\n\n  static void assign(char_type& c1, const char_type& c2) {\n    c1 = c2;\n  }\n\n  static bool eq(const char_type& c1, const char_type& c2) {\n    return c1 == c2;\n  }\n  static bool lt(const char_type& c1, const char_type& c2) {\n    return c1 < c2;\n  }\n\n  static int compare(const char_type* s1, const char_type* s2, size_t n) {\n    return c16memcmp(s1, s2, n);\n  }\n\n  static size_t length(const char_type* s) {\n    return c16len(s);\n  }\n\n  static const char_type* find(const char_type* s, size_t n,\n                               const char_type& a) {\n    return c16memchr(s, a, n);\n  }\n\n  static char_type* move(char_type* s1, const char_type* s2, int_type n) {\n    return c16memmove(s1, s2, n);\n  }\n\n  static char_type* copy(char_type* s1, const char_type* s2, size_t n) {\n    return c16memcpy(s1, s2, n);\n  }\n\n  static char_type* assign(char_type* s, size_t n, char_type a) {\n    return c16memset(s, a, n);\n  }\n\n  static int_type not_eof(const int_type& c) {\n    return eq_int_type(c, eof()) ? 0 : c;\n  }\n\n  static char_type to_char_type(const int_type& c) {\n    return char_type(c);\n  }\n\n  static int_type to_int_type(const char_type& c) {\n    return int_type(c);\n  }\n\n  static bool eq_int_type(const int_type& c1, const int_type& c2) {\n    return c1 == c2;\n  }\n\n  static int_type eof() {\n    return static_cast<int_type>(EOF);\n  }\n};\n\ntypedef std::basic_string<char16, base::string16_char_traits> string16;\n\nextern std::ostream& operator<<(std::ostream& out, const string16& str);\n\n// This is required by googletest to print a readable output on test failures.\nextern void PrintTo(const string16& str, std::ostream* out);\n\n}  // namespace base\n\n// The string class will be explicitly instantiated only once, in string16.cc.\n//\n// std::basic_string<> in GNU libstdc++ contains a static data member,\n// _S_empty_rep_storage, to represent empty strings.  When an operation such\n// as assignment or destruction is performed on a string, causing its existing\n// data member to be invalidated, it must not be freed if this static data\n// member is being used.  Otherwise, it counts as an attempt to free static\n// (and not allocated) data, which is a memory error.\n//\n// Generally, due to C++ template magic, _S_empty_rep_storage will be marked\n// as a coalesced symbol, meaning that the linker will combine multiple\n// instances into a single one when generating output.\n//\n// If a string class is used by multiple shared libraries, a problem occurs.\n// Each library will get its own copy of _S_empty_rep_storage.  When strings\n// are passed across a library boundary for alteration or destruction, memory\n// errors will result.  GNU libstdc++ contains a configuration option,\n// --enable-fully-dynamic-string (_GLIBCXX_FULLY_DYNAMIC_STRING), which\n// disables the static data member optimization, but it's a good optimization\n// and non-STL code is generally at the mercy of the system's STL\n// configuration.  Fully-dynamic strings are not the default for GNU libstdc++\n// libstdc++ itself or for the libstdc++ installations on the systems we care\n// about, such as Mac OS X and relevant flavors of Linux.\n//\n// See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24196 .\n//\n// To avoid problems, string classes need to be explicitly instantiated only\n// once, in exactly one library.  All other string users see it via an \"extern\"\n// declaration.  This is precisely how GNU libstdc++ handles\n// std::basic_string<char> (string) and std::basic_string<wchar_t> (wstring).\n//\n// This also works around a Mac OS X linker bug in ld64-85.2.1 (Xcode 3.1.2),\n// in which the linker does not fully coalesce symbols when dead code\n// stripping is enabled.  This bug causes the memory errors described above\n// to occur even when a std::basic_string<> does not cross shared library\n// boundaries, such as in statically-linked executables.\n//\n// TODO(mark): File this bug with Apple and update this note with a bug number.\n\nextern template\nclass std::basic_string<base::char16, base::string16_char_traits>;\n\n#endif  // WCHAR_T_IS_UTF32\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_STRING16_H_\n"
  },
  {
    "path": "CEF/include/base/cef_template_util.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_BASE_CEF_TEMPLATE_UTIL_H_\n#define CEF_INCLUDE_BASE_CEF_TEMPLATE_UTIL_H_\n#pragma once\n\n#if defined(BASE_TEMPLATE_UTIL_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/template_util.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include <cstddef>  // For size_t.\n\n#include \"include/base/cef_build.h\"\n\nnamespace base {\n\n// template definitions from tr1\n\ntemplate<class T, T v>\nstruct integral_constant {\n  static const T value = v;\n  typedef T value_type;\n  typedef integral_constant<T, v> type;\n};\n\ntemplate <class T, T v> const T integral_constant<T, v>::value;\n\ntypedef integral_constant<bool, true> true_type;\ntypedef integral_constant<bool, false> false_type;\n\ntemplate <class T> struct is_pointer : false_type {};\ntemplate <class T> struct is_pointer<T*> : true_type {};\n\n// Member function pointer detection up to four params. Add more as needed\n// below. This is built-in to C++ 11, and we can remove this when we switch.\ntemplate<typename T>\nstruct is_member_function_pointer : false_type {};\n\ntemplate <typename R, typename Z>\nstruct is_member_function_pointer<R(Z::*)()> : true_type {};\ntemplate <typename R, typename Z>\nstruct is_member_function_pointer<R(Z::*)() const> : true_type {};\n\ntemplate <typename R, typename Z, typename A>\nstruct is_member_function_pointer<R(Z::*)(A)> : true_type {};\ntemplate <typename R, typename Z, typename A>\nstruct is_member_function_pointer<R(Z::*)(A) const> : true_type {};\n\ntemplate <typename R, typename Z, typename A, typename B>\nstruct is_member_function_pointer<R(Z::*)(A, B)> : true_type {};\ntemplate <typename R, typename Z, typename A, typename B>\nstruct is_member_function_pointer<R(Z::*)(A, B) const> : true_type {};\n\ntemplate <typename R, typename Z, typename A, typename B, typename C>\nstruct is_member_function_pointer<R(Z::*)(A, B, C)> : true_type {};\ntemplate <typename R, typename Z, typename A, typename B, typename C>\nstruct is_member_function_pointer<R(Z::*)(A, B, C) const> : true_type {};\n\ntemplate <typename R, typename Z, typename A, typename B, typename C,\n          typename D>\nstruct is_member_function_pointer<R(Z::*)(A, B, C, D)> : true_type {};\ntemplate <typename R, typename Z, typename A, typename B, typename C,\n          typename D>\nstruct is_member_function_pointer<R(Z::*)(A, B, C, D) const> : true_type {};\n\n\ntemplate <class T, class U> struct is_same : public false_type {};\ntemplate <class T> struct is_same<T,T> : true_type {};\n\ntemplate<class> struct is_array : public false_type {};\ntemplate<class T, size_t n> struct is_array<T[n]> : public true_type {};\ntemplate<class T> struct is_array<T[]> : public true_type {};\n\ntemplate <class T> struct is_non_const_reference : false_type {};\ntemplate <class T> struct is_non_const_reference<T&> : true_type {};\ntemplate <class T> struct is_non_const_reference<const T&> : false_type {};\n\ntemplate <class T> struct is_const : false_type {};\ntemplate <class T> struct is_const<const T> : true_type {};\n\ntemplate <class T> struct is_void : false_type {};\ntemplate <> struct is_void<void> : true_type {};\n\nnamespace cef_internal {\n\n// Types YesType and NoType are guaranteed such that sizeof(YesType) <\n// sizeof(NoType).\ntypedef char YesType;\n\nstruct NoType {\n  YesType dummy[2];\n};\n\n// This class is an implementation detail for is_convertible, and you\n// don't need to know how it works to use is_convertible. For those\n// who care: we declare two different functions, one whose argument is\n// of type To and one with a variadic argument list. We give them\n// return types of different size, so we can use sizeof to trick the\n// compiler into telling us which function it would have chosen if we\n// had called it with an argument of type From.  See Alexandrescu's\n// _Modern C++ Design_ for more details on this sort of trick.\n\nstruct ConvertHelper {\n  template <typename To>\n  static YesType Test(To);\n\n  template <typename To>\n  static NoType Test(...);\n\n  template <typename From>\n  static From& Create();\n};\n\n// Used to determine if a type is a struct/union/class. Inspired by Boost's\n// is_class type_trait implementation.\nstruct IsClassHelper {\n  template <typename C>\n  static YesType Test(void(C::*)(void));\n\n  template <typename C>\n  static NoType Test(...);\n};\n\n}  // namespace cef_internal\n\n// Inherits from true_type if From is convertible to To, false_type otherwise.\n//\n// Note that if the type is convertible, this will be a true_type REGARDLESS\n// of whether or not the conversion would emit a warning.\ntemplate <typename From, typename To>\nstruct is_convertible\n    : integral_constant<bool,\n                        sizeof(cef_internal::ConvertHelper::Test<To>(\n                                   cef_internal::ConvertHelper::Create<From>())) ==\n                        sizeof(cef_internal::YesType)> {\n};\n\ntemplate <typename T>\nstruct is_class\n    : integral_constant<bool,\n                        sizeof(cef_internal::IsClassHelper::Test<T>(0)) ==\n                            sizeof(cef_internal::YesType)> {\n};\n\ntemplate<bool B, class T = void>\nstruct enable_if {};\n\ntemplate<class T>\nstruct enable_if<true, T> { typedef T type; };\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_TEMPLATE_UTIL_H_\n"
  },
  {
    "path": "CEF/include/base/cef_thread_checker.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_BASE_THREAD_CHECKER_H_\n#define CEF_INCLUDE_BASE_THREAD_CHECKER_H_\n#pragma once\n\n#if defined(BASE_THREADING_THREAD_CHECKER_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/threading/thread_checker.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/base/cef_logging.h\"\n#include \"include/base/internal/cef_thread_checker_impl.h\"\n\n// Apart from debug builds, we also enable the thread checker in\n// builds with DCHECK_ALWAYS_ON so that trybots and waterfall bots\n// with this define will get the same level of thread checking as\n// debug bots.\n#if DCHECK_IS_ON()\n#define ENABLE_THREAD_CHECKER 1\n#else\n#define ENABLE_THREAD_CHECKER 0\n#endif\n\n\nnamespace base {\n\nnamespace cef_internal {\n\n// Do nothing implementation, for use in release mode.\n//\n// Note: You should almost always use the ThreadChecker class to get the\n// right version for your build configuration.\nclass ThreadCheckerDoNothing {\n public:\n  bool CalledOnValidThread() const {\n    return true;\n  }\n\n  void DetachFromThread() {}\n};\n\n}  // namespace cef_internal\n\n// ThreadChecker is a helper class used to help verify that some methods of a\n// class are called from the same thread. It provides identical functionality to\n// base::NonThreadSafe, but it is meant to be held as a member variable, rather\n// than inherited from base::NonThreadSafe.\n//\n// While inheriting from base::NonThreadSafe may give a clear indication about\n// the thread-safety of a class, it may also lead to violations of the style\n// guide with regard to multiple inheritance. The choice between having a\n// ThreadChecker member and inheriting from base::NonThreadSafe should be based\n// on whether:\n//  - Derived classes need to know the thread they belong to, as opposed to\n//    having that functionality fully encapsulated in the base class.\n//  - Derived classes should be able to reassign the base class to another\n//    thread, via DetachFromThread.\n//\n// If neither of these are true, then having a ThreadChecker member and calling\n// CalledOnValidThread is the preferable solution.\n//\n// Example:\n// class MyClass {\n//  public:\n//   void Foo() {\n//     DCHECK(thread_checker_.CalledOnValidThread());\n//     ... (do stuff) ...\n//   }\n//\n//  private:\n//   ThreadChecker thread_checker_;\n// }\n//\n// In Release mode, CalledOnValidThread will always return true.\n#if ENABLE_THREAD_CHECKER\nclass ThreadChecker : public cef_internal::ThreadCheckerImpl {\n};\n#else\nclass ThreadChecker : public cef_internal::ThreadCheckerDoNothing {\n};\n#endif  // ENABLE_THREAD_CHECKER\n\n#undef ENABLE_THREAD_CHECKER\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_THREAD_CHECKER_H_\n"
  },
  {
    "path": "CEF/include/base/cef_thread_collision_warner.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_BASE_CEF_THREAD_COLLISION_WARNER_H_\n#define CEF_INCLUDE_BASE_CEF_THREAD_COLLISION_WARNER_H_\n#pragma once\n\n#if defined(BASE_THREADING_THREAD_COLLISION_WARNER_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/threading/thread_collision_warner.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include <memory>\n\n#include \"include/base/cef_atomicops.h\"\n#include \"include/base/cef_basictypes.h\"\n#include \"include/base/cef_build.h\"\n#include \"include/base/cef_macros.h\"\n\n// A helper class alongside macros to be used to verify assumptions about thread\n// safety of a class.\n//\n// Example: Queue implementation non thread-safe but still usable if clients\n//          are synchronized somehow.\n//\n//          In this case the macro DFAKE_SCOPED_LOCK has to be\n//          used, it checks that if a thread is inside the push/pop then\n//          noone else is still inside the pop/push\n//\n// class NonThreadSafeQueue {\n//  public:\n//   ...\n//   void push(int) { DFAKE_SCOPED_LOCK(push_pop_); ... }\n//   int pop() { DFAKE_SCOPED_LOCK(push_pop_); ... }\n//   ...\n//  private:\n//   DFAKE_MUTEX(push_pop_);\n// };\n//\n//\n// Example: Queue implementation non thread-safe but still usable if clients\n//          are synchronized somehow, it calls a method to \"protect\" from\n//          a \"protected\" method\n//\n//          In this case the macro DFAKE_SCOPED_RECURSIVE_LOCK\n//          has to be used, it checks that if a thread is inside the push/pop\n//          then noone else is still inside the pop/push\n//\n// class NonThreadSafeQueue {\n//  public:\n//   void push(int) {\n//     DFAKE_SCOPED_LOCK(push_pop_);\n//     ...\n//   }\n//   int pop() {\n//     DFAKE_SCOPED_RECURSIVE_LOCK(push_pop_);\n//     bar();\n//     ...\n//   }\n//   void bar() { DFAKE_SCOPED_RECURSIVE_LOCK(push_pop_); ... }\n//   ...\n//  private:\n//   DFAKE_MUTEX(push_pop_);\n// };\n//\n//\n// Example: Queue implementation not usable even if clients are synchronized,\n//          so only one thread in the class life cycle can use the two members\n//          push/pop.\n//\n//          In this case the macro DFAKE_SCOPED_LOCK_THREAD_LOCKED pins the\n//          specified\n//          critical section the first time a thread enters push or pop, from\n//          that time on only that thread is allowed to execute push or pop.\n//\n// class NonThreadSafeQueue {\n//  public:\n//   ...\n//   void push(int) { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... }\n//   int pop() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... }\n//   ...\n//  private:\n//   DFAKE_MUTEX(push_pop_);\n// };\n//\n//\n// Example: Class that has to be contructed/destroyed on same thread, it has\n//          a \"shareable\" method (with external synchronization) and a not\n//          shareable method (even with external synchronization).\n//\n//          In this case 3 Critical sections have to be defined\n//\n// class ExoticClass {\n//  public:\n//   ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... }\n//   ~ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... }\n//\n//   void Shareable() { DFAKE_SCOPED_LOCK(shareable_section_); ... }\n//   void NotShareable() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... }\n//   ...\n//  private:\n//   DFAKE_MUTEX(ctor_dtor_);\n//   DFAKE_MUTEX(shareable_section_);\n// };\n\n\n#if !defined(NDEBUG)\n\n// Defines a class member that acts like a mutex. It is used only as a\n// verification tool.\n#define DFAKE_MUTEX(obj) \\\n     mutable base::ThreadCollisionWarner obj\n// Asserts the call is never called simultaneously in two threads. Used at\n// member function scope.\n#define DFAKE_SCOPED_LOCK(obj) \\\n     base::ThreadCollisionWarner::ScopedCheck s_check_##obj(&obj)\n// Asserts the call is never called simultaneously in two threads. Used at\n// member function scope. Same as DFAKE_SCOPED_LOCK but allows recursive locks.\n#define DFAKE_SCOPED_RECURSIVE_LOCK(obj) \\\n     base::ThreadCollisionWarner::ScopedRecursiveCheck sr_check_##obj(&obj)\n// Asserts the code is always executed in the same thread.\n#define DFAKE_SCOPED_LOCK_THREAD_LOCKED(obj) \\\n     base::ThreadCollisionWarner::Check check_##obj(&obj)\n\n#else\n\n#define DFAKE_MUTEX(obj) typedef void InternalFakeMutexType##obj\n#define DFAKE_SCOPED_LOCK(obj) ((void)0)\n#define DFAKE_SCOPED_RECURSIVE_LOCK(obj) ((void)0)\n#define DFAKE_SCOPED_LOCK_THREAD_LOCKED(obj) ((void)0)\n\n#endif\n\nnamespace base {\n\n// The class ThreadCollisionWarner uses an Asserter to notify the collision\n// AsserterBase is the interfaces and DCheckAsserter is the default asserter\n// used. During the unit tests is used another class that doesn't \"DCHECK\"\n// in case of collision (check thread_collision_warner_unittests.cc)\nstruct AsserterBase {\n  virtual ~AsserterBase() {}\n  virtual void warn() = 0;\n};\n\nstruct DCheckAsserter : public AsserterBase {\n  virtual ~DCheckAsserter() {}\n  virtual void warn() OVERRIDE;\n};\n\nclass ThreadCollisionWarner {\n public:\n  // The parameter asserter is there only for test purpose\n  explicit ThreadCollisionWarner(AsserterBase* asserter = new DCheckAsserter())\n      : valid_thread_id_(0),\n        counter_(0),\n        asserter_(asserter) {}\n\n  ~ThreadCollisionWarner() {\n    delete asserter_;\n  }\n\n  // This class is meant to be used through the macro\n  // DFAKE_SCOPED_LOCK_THREAD_LOCKED\n  // it doesn't leave the critical section, as opposed to ScopedCheck,\n  // because the critical section being pinned is allowed to be used only\n  // from one thread\n  class Check {\n   public:\n    explicit Check(ThreadCollisionWarner* warner)\n        : warner_(warner) {\n      warner_->EnterSelf();\n    }\n\n    ~Check() {}\n\n   private:\n    ThreadCollisionWarner* warner_;\n\n    DISALLOW_COPY_AND_ASSIGN(Check);\n  };\n\n  // This class is meant to be used through the macro\n  // DFAKE_SCOPED_LOCK\n  class ScopedCheck {\n   public:\n    explicit ScopedCheck(ThreadCollisionWarner* warner)\n        : warner_(warner) {\n      warner_->Enter();\n    }\n\n    ~ScopedCheck() {\n      warner_->Leave();\n    }\n\n   private:\n    ThreadCollisionWarner* warner_;\n\n    DISALLOW_COPY_AND_ASSIGN(ScopedCheck);\n  };\n\n  // This class is meant to be used through the macro\n  // DFAKE_SCOPED_RECURSIVE_LOCK\n  class ScopedRecursiveCheck {\n   public:\n    explicit ScopedRecursiveCheck(ThreadCollisionWarner* warner)\n        : warner_(warner) {\n      warner_->EnterSelf();\n    }\n\n    ~ScopedRecursiveCheck() {\n      warner_->Leave();\n    }\n\n   private:\n    ThreadCollisionWarner* warner_;\n\n    DISALLOW_COPY_AND_ASSIGN(ScopedRecursiveCheck);\n  };\n\n private:\n  // This method stores the current thread identifier and does a DCHECK\n  // if a another thread has already done it, it is safe if same thread\n  // calls this multiple time (recursion allowed).\n  void EnterSelf();\n\n  // Same as EnterSelf but recursion is not allowed.\n  void Enter();\n\n  // Removes the thread_id stored in order to allow other threads to\n  // call EnterSelf or Enter.\n  void Leave();\n\n  // This stores the thread id that is inside the critical section, if the\n  // value is 0 then no thread is inside.\n  volatile subtle::Atomic32 valid_thread_id_;\n\n  // Counter to trace how many time a critical section was \"pinned\"\n  // (when allowed) in order to unpin it when counter_ reaches 0.\n  volatile subtle::Atomic32 counter_;\n\n  // Here only for class unit tests purpose, during the test I need to not\n  // DCHECK but notify the collision with something else.\n  AsserterBase* asserter_;\n\n  DISALLOW_COPY_AND_ASSIGN(ThreadCollisionWarner);\n};\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_THREAD_COLLISION_WARNER_H_\n"
  },
  {
    "path": "CEF/include/base/cef_trace_event.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n///\n// Trace events are for tracking application performance and resource usage.\n// Macros are provided to track:\n//    Begin and end of function calls\n//    Counters\n//\n// Events are issued against categories. Whereas LOG's categories are statically\n// defined, TRACE categories are created implicitly with a string. For example:\n//   TRACE_EVENT_INSTANT0(\"MY_SUBSYSTEM\", \"SomeImportantEvent\")\n//\n// Events can be INSTANT, or can be pairs of BEGIN and END in the same scope:\n//   TRACE_EVENT_BEGIN0(\"MY_SUBSYSTEM\", \"SomethingCostly\")\n//   doSomethingCostly()\n//   TRACE_EVENT_END0(\"MY_SUBSYSTEM\", \"SomethingCostly\")\n// Note: Our tools can't always determine the correct BEGIN/END pairs unless\n// these are used in the same scope. Use ASYNC_BEGIN/ASYNC_END macros if you\n// need them to be in separate scopes.\n//\n// A common use case is to trace entire function scopes. This issues a trace\n// BEGIN and END automatically:\n//   void doSomethingCostly() {\n//     TRACE_EVENT0(\"MY_SUBSYSTEM\", \"doSomethingCostly\");\n//     ...\n//   }\n//\n// Additional parameters can be associated with an event:\n//   void doSomethingCostly2(int howMuch) {\n//     TRACE_EVENT1(\"MY_SUBSYSTEM\", \"doSomethingCostly\",\n//         \"howMuch\", howMuch);\n//     ...\n//   }\n//\n// The trace system will automatically add to this information the current\n// process id, thread id, and a timestamp in microseconds.\n//\n// To trace an asynchronous procedure such as an IPC send/receive, use\n// ASYNC_BEGIN and ASYNC_END:\n//   [single threaded sender code]\n//     static int send_count = 0;\n//     ++send_count;\n//     TRACE_EVENT_ASYNC_BEGIN0(\"ipc\", \"message\", send_count);\n//     Send(new MyMessage(send_count));\n//   [receive code]\n//     void OnMyMessage(send_count) {\n//       TRACE_EVENT_ASYNC_END0(\"ipc\", \"message\", send_count);\n//     }\n// The third parameter is a unique ID to match ASYNC_BEGIN/ASYNC_END pairs.\n// ASYNC_BEGIN and ASYNC_END can occur on any thread of any traced process.\n// Pointers can be used for the ID parameter, and they will be mangled\n// internally so that the same pointer on two different processes will not\n// match. For example:\n//   class MyTracedClass {\n//    public:\n//     MyTracedClass() {\n//       TRACE_EVENT_ASYNC_BEGIN0(\"category\", \"MyTracedClass\", this);\n//     }\n//     ~MyTracedClass() {\n//       TRACE_EVENT_ASYNC_END0(\"category\", \"MyTracedClass\", this);\n//     }\n//   }\n//\n// The trace event also supports counters, which is a way to track a quantity\n// as it varies over time. Counters are created with the following macro:\n//   TRACE_COUNTER1(\"MY_SUBSYSTEM\", \"myCounter\", g_myCounterValue);\n//\n// Counters are process-specific. The macro itself can be issued from any\n// thread, however.\n//\n// Sometimes, you want to track two counters at once. You can do this with two\n// counter macros:\n//   TRACE_COUNTER1(\"MY_SUBSYSTEM\", \"myCounter0\", g_myCounterValue[0]);\n//   TRACE_COUNTER1(\"MY_SUBSYSTEM\", \"myCounter1\", g_myCounterValue[1]);\n// Or you can do it with a combined macro:\n//   TRACE_COUNTER2(\"MY_SUBSYSTEM\", \"myCounter\",\n//       \"bytesPinned\", g_myCounterValue[0],\n//       \"bytesAllocated\", g_myCounterValue[1]);\n// This indicates to the tracing UI that these counters should be displayed\n// in a single graph, as a summed area chart.\n//\n// Since counters are in a global namespace, you may want to disembiguate with a\n// unique ID, by using the TRACE_COUNTER_ID* variations.\n//\n// By default, trace collection is compiled in, but turned off at runtime.\n// Collecting trace data is the responsibility of the embedding application. In\n// CEF's case, calling BeginTracing will turn on tracing on all active\n// processes.\n//\n//\n// Memory scoping note:\n// Tracing copies the pointers, not the string content, of the strings passed\n// in for category, name, and arg_names.  Thus, the following code will cause\n// problems:\n//     char* str = strdup(\"impprtantName\");\n//     TRACE_EVENT_INSTANT0(\"SUBSYSTEM\", str);  // BAD!\n//     free(str);                   // Trace system now has dangling pointer\n//\n// To avoid this issue with the |name| and |arg_name| parameters, use the\n// TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime\n// overhead.\n// Notes: The category must always be in a long-lived char* (i.e. static const).\n//        The |arg_values|, when used, are always deep copied with the _COPY\n//        macros.\n//\n//\n// Thread Safety:\n// All macros are thread safe and can be used from any process.\n///\n\n#ifndef CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_\n#define CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_\n#pragma once\n\n#if defined(TRACE_EVENT0)\n// Do nothing if the macros provided by this header already exist.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/trace_event/trace_event.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/internal/cef_trace_event_internal.h\"\n\n// Records a pair of begin and end events called \"name\" for the current\n// scope, with 0, 1 or 2 associated arguments. If the category is not\n// enabled, then this does nothing.\n// - category and name strings must have application lifetime (statics or\n//   literals). They may not include \" chars.\n#define TRACE_EVENT0(category, name) \\\n  cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false); \\\n  CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name)\n#define TRACE_EVENT1(category, name, arg1_name, arg1_val) \\\n  cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false); \\\n  CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name)\n#define TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, \\\n      arg2_val) \\\n  cef_trace_event_begin(category, name, arg1_name, arg1_val, \\\n                                        arg2_name, arg2_val, false); \\\n  CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name)\n\n// Implementation detail: trace event macros create temporary variable names.\n// These macros give each temporary variable a unique name based on the line\n// number to prevent name collisions.\n#define CEF_INTERNAL_TRACE_EVENT_UID3(a,b) \\\n  cef_trace_event_unique_##a##b\n#define CEF_INTERNAL_TRACE_EVENT_UID2(a,b) \\\n  CEF_INTERNAL_TRACE_EVENT_UID3(a,b)\n#define CEF_INTERNAL_TRACE_EVENT_UID(name_prefix) \\\n  CEF_INTERNAL_TRACE_EVENT_UID2(name_prefix, __LINE__)\n\n// Implementation detail: internal macro to end end event when the scope ends.\n#define CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name) \\\n   cef_trace_event::CefTraceEndOnScopeClose \\\n       CEF_INTERNAL_TRACE_EVENT_UID(profileScope)(category, name)\n\n// Records a single event called \"name\" immediately, with 0, 1 or 2\n// associated arguments. If the category is not enabled, then this\n// does nothing.\n// - category and name strings must have application lifetime (statics or\n//   literals). They may not include \" chars.\n#define TRACE_EVENT_INSTANT0(category, name) \\\n  cef_trace_event_instant(category, name, NULL, 0, NULL, 0, false)\n#define TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \\\n  cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, false)\n#define TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \\\n      arg2_name, arg2_val) \\\n  cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \\\n      arg2_val, false)\n#define TRACE_EVENT_COPY_INSTANT0(category, name) \\\n  cef_trace_event_instant(category, name, NULL, 0, NULL, 0, true)\n#define TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \\\n  cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, true)\n#define TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val, \\\n      arg2_name, arg2_val) \\\n  cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \\\n      arg2_val, true)\n\n// Records a single BEGIN event called \"name\" immediately, with 0, 1 or 2\n// associated arguments. If the category is not enabled, then this\n// does nothing.\n// - category and name strings must have application lifetime (statics or\n//   literals). They may not include \" chars.\n#define TRACE_EVENT_BEGIN0(category, name) \\\n  cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false)\n#define TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \\\n  cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false)\n#define TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, \\\n      arg2_name, arg2_val) \\\n  cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \\\n      arg2_val, false)\n#define TRACE_EVENT_COPY_BEGIN0(category, name) \\\n  cef_trace_event_begin(category, name, NULL, 0, NULL, 0, true)\n#define TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \\\n  cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, true)\n#define TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, \\\n      arg2_name, arg2_val) \\\n  cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \\\n      arg2_val, true)\n\n// Records a single END event for \"name\" immediately. If the category\n// is not enabled, then this does nothing.\n// - category and name strings must have application lifetime (statics or\n//   literals). They may not include \" chars.\n#define TRACE_EVENT_END0(category, name) \\\n  cef_trace_event_end(category, name, NULL, 0, NULL, 0, false)\n#define TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \\\n  cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, false)\n#define TRACE_EVENT_END2(category, name, arg1_name, arg1_val, \\\n      arg2_name, arg2_val) \\\n  cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \\\n      arg2_val, false)\n#define TRACE_EVENT_COPY_END0(category, name) \\\n  cef_trace_event_end(category, name, NULL, 0, NULL, 0, true)\n#define TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \\\n  cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, true)\n#define TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, \\\n      arg2_name, arg2_val) \\\n  cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \\\n      arg2_val, true)\n\n// Records the value of a counter called \"name\" immediately. Value\n// must be representable as a 32 bit integer.\n// - category and name strings must have application lifetime (statics or\n//   literals). They may not include \" chars.\n#define TRACE_COUNTER1(category, name, value) \\\n  cef_trace_counter(category, name, NULL, value, NULL, 0, false)\n#define TRACE_COPY_COUNTER1(category, name, value) \\\n  cef_trace_counter(category, name, NULL, value, NULL, 0, true)\n\n// Records the values of a multi-parted counter called \"name\" immediately.\n// The UI will treat value1 and value2 as parts of a whole, displaying their\n// values as a stacked-bar chart.\n// - category and name strings must have application lifetime (statics or\n//   literals). They may not include \" chars.\n#define TRACE_COUNTER2(category, name, value1_name, value1_val, \\\n      value2_name, value2_val) \\\n  cef_trace_counter(category, name, value1_name, value1_val, value2_name, \\\n      value2_val, false)\n#define TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, \\\n      value2_name, value2_val) \\\n  cef_trace_counter(category, name, value1_name, value1_val, value2_name, \\\n      value2_val, true)\n\n// Records the value of a counter called \"name\" immediately. Value\n// must be representable as a 32 bit integer.\n// - category and name strings must have application lifetime (statics or\n//   literals). They may not include \" chars.\n// - |id| is used to disambiguate counters with the same name. It must either\n//   be a pointer or an integer value up to 64 bits. If it's a pointer, the\n//   bits will be xored with a hash of the process ID so that the same pointer\n//   on two different processes will not collide.\n#define TRACE_COUNTER_ID1(category, name, id, value) \\\n  cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, false)\n#define TRACE_COPY_COUNTER_ID1(category, name, id, value) \\\n  cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, true)\n\n// Records the values of a multi-parted counter called \"name\" immediately.\n// The UI will treat value1 and value2 as parts of a whole, displaying their\n// values as a stacked-bar chart.\n// - category and name strings must have application lifetime (statics or\n//   literals). They may not include \" chars.\n// - |id| is used to disambiguate counters with the same name. It must either\n//   be a pointer or an integer value up to 64 bits. If it's a pointer, the\n//   bits will be xored with a hash of the process ID so that the same pointer\n//   on two different processes will not collide.\n#define TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \\\n      value2_name, value2_val) \\\n  cef_trace_counter_id(category, name, id, value1_name, value1_val, \\\n      value2_name, value2_val, false)\n#define TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, \\\n      value1_val, value2_name, value2_val) \\\n  cef_trace_counter_id(category, name, id, value1_name, value1_val, \\\n      value2_name, value2_val, true)\n\n\n// Records a single ASYNC_BEGIN event called \"name\" immediately, with 0, 1 or 2\n// associated arguments. If the category is not enabled, then this\n// does nothing.\n// - category and name strings must have application lifetime (statics or\n//   literals). They may not include \" chars.\n// - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event.\n//   ASYNC events are considered to match if their category, name and id values\n//   all match. |id| must either be a pointer or an integer value up to 64\n//   bits. If it's a pointer, the bits will be xored with a hash of the process\n//   ID sothat the same pointer on two different processes will not collide.\n// An asynchronous operation can consist of multiple phases. The first phase is\n// defined by the ASYNC_BEGIN calls. Additional phases can be defined using the\n// ASYNC_STEP_BEGIN macros. When the operation completes, call ASYNC_END.\n// An async operation can span threads and processes, but all events in that\n// operation must use the same |name| and |id|. Each event can have its own\n// args.\n#define TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \\\n  cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, false)\n#define TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \\\n  cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \\\n      0, false)\n#define TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \\\n      arg2_name, arg2_val) \\\n  cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \\\n      arg2_name, arg2_val, false)\n#define TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \\\n  cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, true)\n#define TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, \\\n      arg1_val) \\\n  cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \\\n      0, true)\n#define TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, \\\n      arg1_val, arg2_name, arg2_val) \\\n  cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \\\n      arg2_name, arg2_val, true)\n\n// Records a single ASYNC_STEP_INTO event for |step| immediately. If the\n// category is not enabled, then this does nothing. The |name| and |id| must\n// match the ASYNC_BEGIN event above. The |step| param identifies this step\n// within the async event. This should be called at the beginning of the next\n// phase of an asynchronous operation. The ASYNC_BEGIN event must not have any\n// ASYNC_STEP_PAST events.\n#define TRACE_EVENT_ASYNC_STEP_INTO0(category, name, id, step) \\\n  cef_trace_event_async_step_into(category, name, id, step, NULL, 0, false)\n#define TRACE_EVENT_ASYNC_STEP_INTO1(category, name, id, step, \\\n      arg1_name, arg1_val) \\\n  cef_trace_event_async_step_into(category, name, id, step, arg1_name, \\\n      arg1_val, false)\n#define TRACE_EVENT_COPY_ASYNC_STEP_INTO0(category, name, id, step) \\\n  cef_trace_event_async_step_into(category, name, id, step, NULL, 0, true)\n#define TRACE_EVENT_COPY_ASYNC_STEP_INTO1(category, name, id, step, \\\n      arg1_name, arg1_val) \\\n  cef_trace_event_async_step_into(category, name, id, step, arg1_name, \\\n      arg1_val, true)\n\n// Records a single ASYNC_STEP_PAST event for |step| immediately. If the\n// category is not enabled, then this does nothing. The |name| and |id| must\n// match the ASYNC_BEGIN event above. The |step| param identifies this step\n// within the async event. This should be called at the beginning of the next\n// phase of an asynchronous operation. The ASYNC_BEGIN event must not have any\n// ASYNC_STEP_INTO events.\n#define TRACE_EVENT_ASYNC_STEP_PAST0(category, name, id, step) \\\n  cef_trace_event_async_step_past(category, name, id, step, NULL, 0, false)\n#define TRACE_EVENT_ASYNC_STEP_PAST1(category, name, id, step, \\\n      arg1_name, arg1_val) \\\n  cef_trace_event_async_step_past(category, name, id, step, arg1_name, \\\n      arg1_val, false)\n#define TRACE_EVENT_COPY_ASYNC_STEP_PAST0(category, name, id, step) \\\n  cef_trace_event_async_step_past(category, name, id, step, NULL, 0, true)\n#define TRACE_EVENT_COPY_ASYNC_STEP_PAST1(category, name, id, step, \\\n      arg1_name, arg1_val) \\\n  cef_trace_event_async_step_past(category, name, id, step, arg1_name, \\\n      arg1_val, true)\n\n// Records a single ASYNC_END event for \"name\" immediately. If the category\n// is not enabled, then this does nothing.\n#define TRACE_EVENT_ASYNC_END0(category, name, id) \\\n  cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, false)\n#define TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \\\n  cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \\\n      false)\n#define TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \\\n      arg2_name, arg2_val) \\\n  cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \\\n      arg2_name, arg2_val, false)\n#define TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \\\n  cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, true)\n#define TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, \\\n      arg1_val) \\\n  cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \\\n      true)\n#define TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, \\\n      arg1_val, arg2_name, arg2_val) \\\n  cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \\\n      arg2_name, arg2_val, true)\n\nnamespace cef_trace_event {\n\n// Used by TRACE_EVENTx macro. Do not use directly.\nclass CefTraceEndOnScopeClose {\n public:\n  CefTraceEndOnScopeClose(const char* category, const char* name)\n      : category_(category), name_(name) {\n  }\n  ~CefTraceEndOnScopeClose() {\n    cef_trace_event_end(category_, name_, NULL, 0, NULL, 0, false);\n  }\n\n private:\n  const char* category_;\n  const char* name_;\n};\n\n}  // cef_trace_event\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_\n"
  },
  {
    "path": "CEF/include/base/cef_tuple.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// A Tuple is a generic templatized container, similar in concept to std::pair.\n// There are classes Tuple0 to Tuple6, cooresponding to the number of elements\n// it contains.  The convenient MakeTuple() function takes 0 to 6 arguments,\n// and will construct and return the appropriate Tuple object.  The functions\n// DispatchToMethod and DispatchToFunction take a function pointer or instance\n// and method pointer, and unpack a tuple into arguments to the call.\n//\n// Tuple elements are copied by value, and stored in the tuple.  See the unit\n// tests for more details of how/when the values are copied.\n//\n// Example usage:\n//   // These two methods of creating a Tuple are identical.\n//   Tuple2<int, const char*> tuple_a(1, \"wee\");\n//   Tuple2<int, const char*> tuple_b = MakeTuple(1, \"wee\");\n//\n//   void SomeFunc(int a, const char* b) { }\n//   DispatchToFunction(&SomeFunc, tuple_a);  // SomeFunc(1, \"wee\")\n//   DispatchToFunction(\n//       &SomeFunc, MakeTuple(10, \"foo\"));    // SomeFunc(10, \"foo\")\n//\n//   struct { void SomeMeth(int a, int b, int c) { } } foo;\n//   DispatchToMethod(&foo, &Foo::SomeMeth, MakeTuple(1, 2, 3));\n//   // foo->SomeMeth(1, 2, 3);\n\n#ifndef CEF_INCLUDE_BASE_CEF_TUPLE_H_\n#define CEF_INCLUDE_BASE_CEF_TUPLE_H_\n#pragma once\n\n#if defined(BASE_TUPLE_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/tuple.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/base/cef_bind_helpers.h\"\n\nnamespace base {\n\n// Traits ----------------------------------------------------------------------\n//\n// A simple traits class for tuple arguments.\n//\n// ValueType: the bare, nonref version of a type (same as the type for nonrefs).\n// RefType: the ref version of a type (same as the type for refs).\n// ParamType: what type to pass to functions (refs should not be constified).\n\ntemplate <class P>\nstruct TupleTraits {\n  typedef P ValueType;\n  typedef P& RefType;\n  typedef const P& ParamType;\n};\n\ntemplate <class P>\nstruct TupleTraits<P&> {\n  typedef P ValueType;\n  typedef P& RefType;\n  typedef P& ParamType;\n};\n\ntemplate <class P>\nstruct TupleTypes { };\n\n// Tuple -----------------------------------------------------------------------\n//\n// This set of classes is useful for bundling 0 or more heterogeneous data types\n// into a single variable.  The advantage of this is that it greatly simplifies\n// function objects that need to take an arbitrary number of parameters; see\n// RunnableMethod and IPC::MessageWithTuple.\n//\n// Tuple0 is supplied to act as a 'void' type.  It can be used, for example,\n// when dispatching to a function that accepts no arguments (see the\n// Dispatchers below).\n// Tuple1<A> is rarely useful.  One such use is when A is non-const ref that you\n// want filled by the dispatchee, and the tuple is merely a container for that\n// output (a \"tier\").  See MakeRefTuple and its usages.\n\nstruct Tuple0 {\n  typedef Tuple0 ValueTuple;\n  typedef Tuple0 RefTuple;\n  typedef Tuple0 ParamTuple;\n};\n\ntemplate <class A>\nstruct Tuple1 {\n public:\n  typedef A TypeA;\n\n  Tuple1() {}\n  explicit Tuple1(typename TupleTraits<A>::ParamType a) : a(a) {}\n\n  A a;\n};\n\ntemplate <class A, class B>\nstruct Tuple2 {\n public:\n  typedef A TypeA;\n  typedef B TypeB;\n\n  Tuple2() {}\n  Tuple2(typename TupleTraits<A>::ParamType a,\n         typename TupleTraits<B>::ParamType b)\n      : a(a), b(b) {\n  }\n\n  A a;\n  B b;\n};\n\ntemplate <class A, class B, class C>\nstruct Tuple3 {\n public:\n  typedef A TypeA;\n  typedef B TypeB;\n  typedef C TypeC;\n\n  Tuple3() {}\n  Tuple3(typename TupleTraits<A>::ParamType a,\n         typename TupleTraits<B>::ParamType b,\n         typename TupleTraits<C>::ParamType c)\n      : a(a), b(b), c(c){\n  }\n\n  A a;\n  B b;\n  C c;\n};\n\ntemplate <class A, class B, class C, class D>\nstruct Tuple4 {\n public:\n  typedef A TypeA;\n  typedef B TypeB;\n  typedef C TypeC;\n  typedef D TypeD;\n\n  Tuple4() {}\n  Tuple4(typename TupleTraits<A>::ParamType a,\n         typename TupleTraits<B>::ParamType b,\n         typename TupleTraits<C>::ParamType c,\n         typename TupleTraits<D>::ParamType d)\n      : a(a), b(b), c(c), d(d) {\n  }\n\n  A a;\n  B b;\n  C c;\n  D d;\n};\n\ntemplate <class A, class B, class C, class D, class E>\nstruct Tuple5 {\n public:\n  typedef A TypeA;\n  typedef B TypeB;\n  typedef C TypeC;\n  typedef D TypeD;\n  typedef E TypeE;\n\n  Tuple5() {}\n  Tuple5(typename TupleTraits<A>::ParamType a,\n    typename TupleTraits<B>::ParamType b,\n    typename TupleTraits<C>::ParamType c,\n    typename TupleTraits<D>::ParamType d,\n    typename TupleTraits<E>::ParamType e)\n    : a(a), b(b), c(c), d(d), e(e) {\n  }\n\n  A a;\n  B b;\n  C c;\n  D d;\n  E e;\n};\n\ntemplate <class A, class B, class C, class D, class E, class F>\nstruct Tuple6 {\n public:\n  typedef A TypeA;\n  typedef B TypeB;\n  typedef C TypeC;\n  typedef D TypeD;\n  typedef E TypeE;\n  typedef F TypeF;\n\n  Tuple6() {}\n  Tuple6(typename TupleTraits<A>::ParamType a,\n    typename TupleTraits<B>::ParamType b,\n    typename TupleTraits<C>::ParamType c,\n    typename TupleTraits<D>::ParamType d,\n    typename TupleTraits<E>::ParamType e,\n    typename TupleTraits<F>::ParamType f)\n    : a(a), b(b), c(c), d(d), e(e), f(f) {\n  }\n\n  A a;\n  B b;\n  C c;\n  D d;\n  E e;\n  F f;\n};\n\ntemplate <class A, class B, class C, class D, class E, class F, class G>\nstruct Tuple7 {\n public:\n  typedef A TypeA;\n  typedef B TypeB;\n  typedef C TypeC;\n  typedef D TypeD;\n  typedef E TypeE;\n  typedef F TypeF;\n  typedef G TypeG;\n\n  Tuple7() {}\n  Tuple7(typename TupleTraits<A>::ParamType a,\n    typename TupleTraits<B>::ParamType b,\n    typename TupleTraits<C>::ParamType c,\n    typename TupleTraits<D>::ParamType d,\n    typename TupleTraits<E>::ParamType e,\n    typename TupleTraits<F>::ParamType f,\n    typename TupleTraits<G>::ParamType g)\n    : a(a), b(b), c(c), d(d), e(e), f(f), g(g) {\n  }\n\n  A a;\n  B b;\n  C c;\n  D d;\n  E e;\n  F f;\n  G g;\n};\n\ntemplate <class A, class B, class C, class D, class E, class F, class G,\n          class H>\nstruct Tuple8 {\n public:\n  typedef A TypeA;\n  typedef B TypeB;\n  typedef C TypeC;\n  typedef D TypeD;\n  typedef E TypeE;\n  typedef F TypeF;\n  typedef G TypeG;\n  typedef H TypeH;\n\n  Tuple8() {}\n  Tuple8(typename TupleTraits<A>::ParamType a,\n    typename TupleTraits<B>::ParamType b,\n    typename TupleTraits<C>::ParamType c,\n    typename TupleTraits<D>::ParamType d,\n    typename TupleTraits<E>::ParamType e,\n    typename TupleTraits<F>::ParamType f,\n    typename TupleTraits<G>::ParamType g,\n    typename TupleTraits<H>::ParamType h)\n    : a(a), b(b), c(c), d(d), e(e), f(f), g(g), h(h) {\n  }\n\n  A a;\n  B b;\n  C c;\n  D d;\n  E e;\n  F f;\n  G g;\n  H h;\n};\n\n// Tuple types ----------------------------------------------------------------\n//\n// Allows for selection of ValueTuple/RefTuple/ParamTuple without needing the\n// definitions of class types the tuple takes as parameters.\n\ntemplate <>\nstruct TupleTypes< Tuple0 > {\n  typedef Tuple0 ValueTuple;\n  typedef Tuple0 RefTuple;\n  typedef Tuple0 ParamTuple;\n};\n\ntemplate <class A>\nstruct TupleTypes< Tuple1<A> > {\n  typedef Tuple1<typename TupleTraits<A>::ValueType> ValueTuple;\n  typedef Tuple1<typename TupleTraits<A>::RefType> RefTuple;\n  typedef Tuple1<typename TupleTraits<A>::ParamType> ParamTuple;\n};\n\ntemplate <class A, class B>\nstruct TupleTypes< Tuple2<A, B> > {\n  typedef Tuple2<typename TupleTraits<A>::ValueType,\n                 typename TupleTraits<B>::ValueType> ValueTuple;\ntypedef Tuple2<typename TupleTraits<A>::RefType,\n               typename TupleTraits<B>::RefType> RefTuple;\n  typedef Tuple2<typename TupleTraits<A>::ParamType,\n                 typename TupleTraits<B>::ParamType> ParamTuple;\n};\n\ntemplate <class A, class B, class C>\nstruct TupleTypes< Tuple3<A, B, C> > {\n  typedef Tuple3<typename TupleTraits<A>::ValueType,\n                 typename TupleTraits<B>::ValueType,\n                 typename TupleTraits<C>::ValueType> ValueTuple;\ntypedef Tuple3<typename TupleTraits<A>::RefType,\n               typename TupleTraits<B>::RefType,\n               typename TupleTraits<C>::RefType> RefTuple;\n  typedef Tuple3<typename TupleTraits<A>::ParamType,\n                 typename TupleTraits<B>::ParamType,\n                 typename TupleTraits<C>::ParamType> ParamTuple;\n};\n\ntemplate <class A, class B, class C, class D>\nstruct TupleTypes< Tuple4<A, B, C, D> > {\n  typedef Tuple4<typename TupleTraits<A>::ValueType,\n                 typename TupleTraits<B>::ValueType,\n                 typename TupleTraits<C>::ValueType,\n                 typename TupleTraits<D>::ValueType> ValueTuple;\ntypedef Tuple4<typename TupleTraits<A>::RefType,\n               typename TupleTraits<B>::RefType,\n               typename TupleTraits<C>::RefType,\n               typename TupleTraits<D>::RefType> RefTuple;\n  typedef Tuple4<typename TupleTraits<A>::ParamType,\n                 typename TupleTraits<B>::ParamType,\n                 typename TupleTraits<C>::ParamType,\n                 typename TupleTraits<D>::ParamType> ParamTuple;\n};\n\ntemplate <class A, class B, class C, class D, class E>\nstruct TupleTypes< Tuple5<A, B, C, D, E> > {\n  typedef Tuple5<typename TupleTraits<A>::ValueType,\n                 typename TupleTraits<B>::ValueType,\n                 typename TupleTraits<C>::ValueType,\n                 typename TupleTraits<D>::ValueType,\n                 typename TupleTraits<E>::ValueType> ValueTuple;\ntypedef Tuple5<typename TupleTraits<A>::RefType,\n               typename TupleTraits<B>::RefType,\n               typename TupleTraits<C>::RefType,\n               typename TupleTraits<D>::RefType,\n               typename TupleTraits<E>::RefType> RefTuple;\n  typedef Tuple5<typename TupleTraits<A>::ParamType,\n                 typename TupleTraits<B>::ParamType,\n                 typename TupleTraits<C>::ParamType,\n                 typename TupleTraits<D>::ParamType,\n                 typename TupleTraits<E>::ParamType> ParamTuple;\n};\n\ntemplate <class A, class B, class C, class D, class E, class F>\nstruct TupleTypes< Tuple6<A, B, C, D, E, F> > {\n  typedef Tuple6<typename TupleTraits<A>::ValueType,\n                 typename TupleTraits<B>::ValueType,\n                 typename TupleTraits<C>::ValueType,\n                 typename TupleTraits<D>::ValueType,\n                 typename TupleTraits<E>::ValueType,\n                 typename TupleTraits<F>::ValueType> ValueTuple;\ntypedef Tuple6<typename TupleTraits<A>::RefType,\n               typename TupleTraits<B>::RefType,\n               typename TupleTraits<C>::RefType,\n               typename TupleTraits<D>::RefType,\n               typename TupleTraits<E>::RefType,\n               typename TupleTraits<F>::RefType> RefTuple;\n  typedef Tuple6<typename TupleTraits<A>::ParamType,\n                 typename TupleTraits<B>::ParamType,\n                 typename TupleTraits<C>::ParamType,\n                 typename TupleTraits<D>::ParamType,\n                 typename TupleTraits<E>::ParamType,\n                 typename TupleTraits<F>::ParamType> ParamTuple;\n};\n\ntemplate <class A, class B, class C, class D, class E, class F, class G>\nstruct TupleTypes< Tuple7<A, B, C, D, E, F, G> > {\n  typedef Tuple7<typename TupleTraits<A>::ValueType,\n                 typename TupleTraits<B>::ValueType,\n                 typename TupleTraits<C>::ValueType,\n                 typename TupleTraits<D>::ValueType,\n                 typename TupleTraits<E>::ValueType,\n                 typename TupleTraits<F>::ValueType,\n                 typename TupleTraits<G>::ValueType> ValueTuple;\ntypedef Tuple7<typename TupleTraits<A>::RefType,\n               typename TupleTraits<B>::RefType,\n               typename TupleTraits<C>::RefType,\n               typename TupleTraits<D>::RefType,\n               typename TupleTraits<E>::RefType,\n               typename TupleTraits<F>::RefType,\n               typename TupleTraits<G>::RefType> RefTuple;\n  typedef Tuple7<typename TupleTraits<A>::ParamType,\n                 typename TupleTraits<B>::ParamType,\n                 typename TupleTraits<C>::ParamType,\n                 typename TupleTraits<D>::ParamType,\n                 typename TupleTraits<E>::ParamType,\n                 typename TupleTraits<F>::ParamType,\n                 typename TupleTraits<G>::ParamType> ParamTuple;\n};\n\ntemplate <class A, class B, class C, class D, class E, class F, class G,\n          class H>\nstruct TupleTypes< Tuple8<A, B, C, D, E, F, G, H> > {\n  typedef Tuple8<typename TupleTraits<A>::ValueType,\n                 typename TupleTraits<B>::ValueType,\n                 typename TupleTraits<C>::ValueType,\n                 typename TupleTraits<D>::ValueType,\n                 typename TupleTraits<E>::ValueType,\n                 typename TupleTraits<F>::ValueType,\n                 typename TupleTraits<G>::ValueType,\n                 typename TupleTraits<H>::ValueType> ValueTuple;\ntypedef Tuple8<typename TupleTraits<A>::RefType,\n               typename TupleTraits<B>::RefType,\n               typename TupleTraits<C>::RefType,\n               typename TupleTraits<D>::RefType,\n               typename TupleTraits<E>::RefType,\n               typename TupleTraits<F>::RefType,\n               typename TupleTraits<G>::RefType,\n               typename TupleTraits<H>::RefType> RefTuple;\n  typedef Tuple8<typename TupleTraits<A>::ParamType,\n                 typename TupleTraits<B>::ParamType,\n                 typename TupleTraits<C>::ParamType,\n                 typename TupleTraits<D>::ParamType,\n                 typename TupleTraits<E>::ParamType,\n                 typename TupleTraits<F>::ParamType,\n                 typename TupleTraits<G>::ParamType,\n                 typename TupleTraits<H>::ParamType> ParamTuple;\n};\n\n// Tuple creators -------------------------------------------------------------\n//\n// Helper functions for constructing tuples while inferring the template\n// argument types.\n\ninline Tuple0 MakeTuple() {\n  return Tuple0();\n}\n\ntemplate <class A>\ninline Tuple1<A> MakeTuple(const A& a) {\n  return Tuple1<A>(a);\n}\n\ntemplate <class A, class B>\ninline Tuple2<A, B> MakeTuple(const A& a, const B& b) {\n  return Tuple2<A, B>(a, b);\n}\n\ntemplate <class A, class B, class C>\ninline Tuple3<A, B, C> MakeTuple(const A& a, const B& b, const C& c) {\n  return Tuple3<A, B, C>(a, b, c);\n}\n\ntemplate <class A, class B, class C, class D>\ninline Tuple4<A, B, C, D> MakeTuple(const A& a, const B& b, const C& c,\n                                    const D& d) {\n  return Tuple4<A, B, C, D>(a, b, c, d);\n}\n\ntemplate <class A, class B, class C, class D, class E>\ninline Tuple5<A, B, C, D, E> MakeTuple(const A& a, const B& b, const C& c,\n                                       const D& d, const E& e) {\n  return Tuple5<A, B, C, D, E>(a, b, c, d, e);\n}\n\ntemplate <class A, class B, class C, class D, class E, class F>\ninline Tuple6<A, B, C, D, E, F> MakeTuple(const A& a, const B& b, const C& c,\n                                          const D& d, const E& e, const F& f) {\n  return Tuple6<A, B, C, D, E, F>(a, b, c, d, e, f);\n}\n\ntemplate <class A, class B, class C, class D, class E, class F, class G>\ninline Tuple7<A, B, C, D, E, F, G> MakeTuple(const A& a, const B& b, const C& c,\n                                             const D& d, const E& e, const F& f,\n                                             const G& g) {\n  return Tuple7<A, B, C, D, E, F, G>(a, b, c, d, e, f, g);\n}\n\ntemplate <class A, class B, class C, class D, class E, class F, class G,\n          class H>\ninline Tuple8<A, B, C, D, E, F, G, H> MakeTuple(const A& a, const B& b,\n                                                const C& c, const D& d,\n                                                const E& e, const F& f,\n                                                const G& g, const H& h) {\n  return Tuple8<A, B, C, D, E, F, G, H>(a, b, c, d, e, f, g, h);\n}\n\n// The following set of helpers make what Boost refers to as \"Tiers\" - a tuple\n// of references.\n\ntemplate <class A>\ninline Tuple1<A&> MakeRefTuple(A& a) {\n  return Tuple1<A&>(a);\n}\n\ntemplate <class A, class B>\ninline Tuple2<A&, B&> MakeRefTuple(A& a, B& b) {\n  return Tuple2<A&, B&>(a, b);\n}\n\ntemplate <class A, class B, class C>\ninline Tuple3<A&, B&, C&> MakeRefTuple(A& a, B& b, C& c) {\n  return Tuple3<A&, B&, C&>(a, b, c);\n}\n\ntemplate <class A, class B, class C, class D>\ninline Tuple4<A&, B&, C&, D&> MakeRefTuple(A& a, B& b, C& c, D& d) {\n  return Tuple4<A&, B&, C&, D&>(a, b, c, d);\n}\n\ntemplate <class A, class B, class C, class D, class E>\ninline Tuple5<A&, B&, C&, D&, E&> MakeRefTuple(A& a, B& b, C& c, D& d, E& e) {\n  return Tuple5<A&, B&, C&, D&, E&>(a, b, c, d, e);\n}\n\ntemplate <class A, class B, class C, class D, class E, class F>\ninline Tuple6<A&, B&, C&, D&, E&, F&> MakeRefTuple(A& a, B& b, C& c, D& d, E& e,\n                                                   F& f) {\n  return Tuple6<A&, B&, C&, D&, E&, F&>(a, b, c, d, e, f);\n}\n\ntemplate <class A, class B, class C, class D, class E, class F, class G>\ninline Tuple7<A&, B&, C&, D&, E&, F&, G&> MakeRefTuple(A& a, B& b, C& c, D& d,\n                                                       E& e, F& f, G& g) {\n  return Tuple7<A&, B&, C&, D&, E&, F&, G&>(a, b, c, d, e, f, g);\n}\n\ntemplate <class A, class B, class C, class D, class E, class F, class G,\n          class H>\ninline Tuple8<A&, B&, C&, D&, E&, F&, G&, H&> MakeRefTuple(A& a, B& b, C& c,\n                                                           D& d, E& e, F& f,\n                                                           G& g, H& h) {\n  return Tuple8<A&, B&, C&, D&, E&, F&, G&, H&>(a, b, c, d, e, f, g, h);\n}\n\n// Dispatchers ----------------------------------------------------------------\n//\n// Helper functions that call the given method on an object, with the unpacked\n// tuple arguments.  Notice that they all have the same number of arguments,\n// so you need only write:\n//   DispatchToMethod(object, &Object::method, args);\n// This is very useful for templated dispatchers, since they don't need to know\n// what type |args| is.\n\n// Non-Static Dispatchers with no out params.\n\ntemplate <class ObjT, class Method>\ninline void DispatchToMethod(ObjT* obj, Method method, const Tuple0& arg) {\n  (obj->*method)();\n}\n\ntemplate <class ObjT, class Method, class A>\ninline void DispatchToMethod(ObjT* obj, Method method, const A& arg) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg));\n}\n\ntemplate <class ObjT, class Method, class A>\ninline void DispatchToMethod(ObjT* obj, Method method, const Tuple1<A>& arg) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));\n}\n\ntemplate<class ObjT, class Method, class A, class B>\ninline void DispatchToMethod(ObjT* obj,\n                             Method method,\n                             const Tuple2<A, B>& arg) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));\n}\n\ntemplate<class ObjT, class Method, class A, class B, class C>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple3<A, B, C>& arg) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n                 base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c));\n}\n\ntemplate<class ObjT, class Method, class A, class B, class C, class D>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple4<A, B, C, D>& arg) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n                 base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n                 base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d));\n}\n\ntemplate<class ObjT, class Method, class A, class B, class C, class D, class E>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple5<A, B, C, D, E>& arg) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n                 base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n                 base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),\n                 base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e));\n}\n\ntemplate<class ObjT, class Method, class A, class B, class C, class D, class E,\n         class F>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple6<A, B, C, D, E, F>& arg) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n                 base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n                 base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),\n                 base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),\n                 base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f));\n}\n\ntemplate<class ObjT, class Method, class A, class B, class C, class D, class E,\n         class F, class G>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple7<A, B, C, D, E, F, G>& arg) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n                 base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n                 base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),\n                 base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),\n                 base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),\n                 base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g));\n}\n\ntemplate<class ObjT, class Method, class A, class B, class C, class D, class E,\n         class F, class G, class H>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple8<A, B, C, D, E, F, G, H>& arg) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n                 base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n                 base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),\n                 base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),\n                 base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),\n                 base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g),\n                 base::cef_internal::UnwrapTraits<H>::Unwrap(arg.h));\n}\n\n// Static Dispatchers with no out params.\n\ntemplate <class Function>\ninline void DispatchToFunction(Function function, const Tuple0& arg) {\n  (*function)();\n}\n\ntemplate <class Function, class A>\ninline void DispatchToFunction(Function function, const A& arg) {\n  (*function)(arg);\n}\n\ntemplate <class Function, class A>\ninline void DispatchToFunction(Function function, const Tuple1<A>& arg) {\n  (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));\n}\n\ntemplate<class Function, class A, class B>\ninline void DispatchToFunction(Function function, const Tuple2<A, B>& arg) {\n  (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n              base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));\n}\n\ntemplate<class Function, class A, class B, class C>\ninline void DispatchToFunction(Function function, const Tuple3<A, B, C>& arg) {\n  (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n              base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n              base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c));\n}\n\ntemplate<class Function, class A, class B, class C, class D>\ninline void DispatchToFunction(Function function,\n                               const Tuple4<A, B, C, D>& arg) {\n  (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n              base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n              base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n              base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d));\n}\n\ntemplate<class Function, class A, class B, class C, class D, class E>\ninline void DispatchToFunction(Function function,\n                               const Tuple5<A, B, C, D, E>& arg) {\n  (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n              base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n              base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n              base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),\n              base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e));\n}\n\ntemplate<class Function, class A, class B, class C, class D, class E, class F>\ninline void DispatchToFunction(Function function,\n                               const Tuple6<A, B, C, D, E, F>& arg) {\n  (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n              base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n              base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n              base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),\n              base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),\n              base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f));\n}\n\ntemplate<class Function, class A, class B, class C, class D, class E, class F,\n         class G>\ninline void DispatchToFunction(Function function,\n                               const Tuple7<A, B, C, D, E, F, G>& arg) {\n  (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n              base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n              base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n              base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),\n              base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),\n              base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),\n              base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g));\n}\n\ntemplate<class Function, class A, class B, class C, class D, class E, class F,\n         class G, class H>\ninline void DispatchToFunction(Function function,\n                               const Tuple8<A, B, C, D, E, F, G, H>& arg) {\n  (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n              base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n              base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n              base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),\n              base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),\n              base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),\n              base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g),\n              base::cef_internal::UnwrapTraits<H>::Unwrap(arg.h));\n}\n\n// Dispatchers with 0 out param (as a Tuple0).\n\ntemplate <class ObjT, class Method>\ninline void DispatchToMethod(ObjT* obj,\n                             Method method,\n                             const Tuple0& arg, Tuple0*) {\n  (obj->*method)();\n}\n\ntemplate <class ObjT, class Method, class A>\ninline void DispatchToMethod(ObjT* obj, Method method, const A& arg, Tuple0*) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg));\n}\n\ntemplate <class ObjT, class Method, class A>\ninline void DispatchToMethod(ObjT* obj,\n                             Method method,\n                             const Tuple1<A>& arg, Tuple0*) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));\n}\n\ntemplate<class ObjT, class Method, class A, class B>\ninline void DispatchToMethod(ObjT* obj,\n                             Method method,\n                             const Tuple2<A, B>& arg, Tuple0*) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));\n}\n\ntemplate<class ObjT, class Method, class A, class B, class C>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple3<A, B, C>& arg, Tuple0*) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n                 base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c));\n}\n\ntemplate<class ObjT, class Method, class A, class B, class C, class D>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple4<A, B, C, D>& arg, Tuple0*) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n                 base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n                 base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d));\n}\n\ntemplate<class ObjT, class Method, class A, class B, class C, class D, class E>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple5<A, B, C, D, E>& arg, Tuple0*) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n                 base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n                 base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),\n                 base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e));\n}\n\ntemplate<class ObjT, class Method, class A, class B, class C, class D, class E,\n         class F>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple6<A, B, C, D, E, F>& arg, Tuple0*) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),\n                 base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),\n                 base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),\n                 base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),\n                 base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),\n                 base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f));\n}\n\n// Dispatchers with 1 out param.\n\ntemplate<class ObjT, class Method,\n         class OutA>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple0& in,\n                             Tuple1<OutA>* out) {\n  (obj->*method)(&out->a);\n}\n\ntemplate<class ObjT, class Method, class InA,\n         class OutA>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const InA& in,\n                             Tuple1<OutA>* out) {\n  (obj->*method)(in, &out->a);\n}\n\ntemplate<class ObjT, class Method, class InA,\n         class OutA>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple1<InA>& in,\n                             Tuple1<OutA>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB,\n         class OutA>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple2<InA, InB>& in,\n                             Tuple1<OutA>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 &out->a);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB, class InC,\n         class OutA>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple3<InA, InB, InC>& in,\n                             Tuple1<OutA>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 &out->a);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB, class InC, class InD,\n         class OutA>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple4<InA, InB, InC, InD>& in,\n                             Tuple1<OutA>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 &out->a);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB, class InC, class InD,\n         class InE, class OutA>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple5<InA, InB, InC, InD, InE>& in,\n                             Tuple1<OutA>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),\n                 &out->a);\n}\n\ntemplate<class ObjT, class Method,\n         class InA, class InB, class InC, class InD, class InE, class InF,\n         class OutA>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple6<InA, InB, InC, InD, InE, InF>& in,\n                             Tuple1<OutA>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),\n                 base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),\n                 &out->a);\n}\n\n// Dispatchers with 2 out params.\n\ntemplate<class ObjT, class Method,\n         class OutA, class OutB>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple0& in,\n                             Tuple2<OutA, OutB>* out) {\n  (obj->*method)(&out->a, &out->b);\n}\n\ntemplate<class ObjT, class Method, class InA,\n         class OutA, class OutB>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const InA& in,\n                             Tuple2<OutA, OutB>* out) {\n  (obj->*method)(in, &out->a, &out->b);\n}\n\ntemplate<class ObjT, class Method, class InA,\n         class OutA, class OutB>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple1<InA>& in,\n                             Tuple2<OutA, OutB>* out) {\n  (obj->*method)(\n      base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a, &out->b);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB,\n         class OutA, class OutB>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple2<InA, InB>& in,\n                             Tuple2<OutA, OutB>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 &out->a,\n                 &out->b);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB, class InC,\n         class OutA, class OutB>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple3<InA, InB, InC>& in,\n                             Tuple2<OutA, OutB>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 &out->a,\n                 &out->b);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB, class InC, class InD,\n         class OutA, class OutB>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple4<InA, InB, InC, InD>& in,\n                             Tuple2<OutA, OutB>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 &out->a,\n                 &out->b);\n}\n\ntemplate<class ObjT, class Method,\n         class InA, class InB, class InC, class InD, class InE,\n         class OutA, class OutB>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple5<InA, InB, InC, InD, InE>& in,\n                             Tuple2<OutA, OutB>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),\n                 &out->a,\n                 &out->b);\n}\n\ntemplate<class ObjT, class Method,\n         class InA, class InB, class InC, class InD, class InE, class InF,\n         class OutA, class OutB>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple6<InA, InB, InC, InD, InE, InF>& in,\n                             Tuple2<OutA, OutB>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),\n                 base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),\n                 &out->a,\n                 &out->b);\n}\n\n// Dispatchers with 3 out params.\n\ntemplate<class ObjT, class Method,\n         class OutA, class OutB, class OutC>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple0& in,\n                             Tuple3<OutA, OutB, OutC>* out) {\n  (obj->*method)(&out->a, &out->b, &out->c);\n}\n\ntemplate<class ObjT, class Method, class InA,\n         class OutA, class OutB, class OutC>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const InA& in,\n                             Tuple3<OutA, OutB, OutC>* out) {\n  (obj->*method)(in, &out->a, &out->b, &out->c);\n}\n\ntemplate<class ObjT, class Method, class InA,\n         class OutA, class OutB, class OutC>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple1<InA>& in,\n                             Tuple3<OutA, OutB, OutC>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 &out->a,\n                 &out->b,\n                 &out->c);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB,\n         class OutA, class OutB, class OutC>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple2<InA, InB>& in,\n                             Tuple3<OutA, OutB, OutC>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 &out->a,\n                 &out->b,\n                 &out->c);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB, class InC,\n         class OutA, class OutB, class OutC>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple3<InA, InB, InC>& in,\n                             Tuple3<OutA, OutB, OutC>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 &out->a,\n                 &out->b,\n                 &out->c);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB, class InC, class InD,\n         class OutA, class OutB, class OutC>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple4<InA, InB, InC, InD>& in,\n                             Tuple3<OutA, OutB, OutC>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 &out->a,\n                 &out->b,\n                 &out->c);\n}\n\ntemplate<class ObjT, class Method,\n         class InA, class InB, class InC, class InD, class InE,\n         class OutA, class OutB, class OutC>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple5<InA, InB, InC, InD, InE>& in,\n                             Tuple3<OutA, OutB, OutC>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),\n                 &out->a,\n                 &out->b,\n                 &out->c);\n}\n\ntemplate<class ObjT, class Method,\n         class InA, class InB, class InC, class InD, class InE, class InF,\n         class OutA, class OutB, class OutC>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple6<InA, InB, InC, InD, InE, InF>& in,\n                             Tuple3<OutA, OutB, OutC>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),\n                 base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),\n                 &out->a,\n                 &out->b,\n                 &out->c);\n}\n\n// Dispatchers with 4 out params.\n\ntemplate<class ObjT, class Method,\n         class OutA, class OutB, class OutC, class OutD>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple0& in,\n                             Tuple4<OutA, OutB, OutC, OutD>* out) {\n  (obj->*method)(&out->a, &out->b, &out->c, &out->d);\n}\n\ntemplate<class ObjT, class Method, class InA,\n         class OutA, class OutB, class OutC, class OutD>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const InA& in,\n                             Tuple4<OutA, OutB, OutC, OutD>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d);\n}\n\ntemplate<class ObjT, class Method, class InA,\n         class OutA, class OutB, class OutC, class OutD>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple1<InA>& in,\n                             Tuple4<OutA, OutB, OutC, OutD>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB,\n         class OutA, class OutB, class OutC, class OutD>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple2<InA, InB>& in,\n                             Tuple4<OutA, OutB, OutC, OutD>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB, class InC,\n         class OutA, class OutB, class OutC, class OutD>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple3<InA, InB, InC>& in,\n                             Tuple4<OutA, OutB, OutC, OutD>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB, class InC, class InD,\n         class OutA, class OutB, class OutC, class OutD>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple4<InA, InB, InC, InD>& in,\n                             Tuple4<OutA, OutB, OutC, OutD>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d);\n}\n\ntemplate<class ObjT, class Method,\n         class InA, class InB, class InC, class InD, class InE,\n         class OutA, class OutB, class OutC, class OutD>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple5<InA, InB, InC, InD, InE>& in,\n                             Tuple4<OutA, OutB, OutC, OutD>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d);\n}\n\ntemplate<class ObjT, class Method,\n         class InA, class InB, class InC, class InD, class InE, class InF,\n         class OutA, class OutB, class OutC, class OutD>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple6<InA, InB, InC, InD, InE, InF>& in,\n                             Tuple4<OutA, OutB, OutC, OutD>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),\n                 base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d);\n}\n\n// Dispatchers with 5 out params.\n\ntemplate<class ObjT, class Method,\n         class OutA, class OutB, class OutC, class OutD, class OutE>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple0& in,\n                             Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {\n  (obj->*method)(&out->a, &out->b, &out->c, &out->d, &out->e);\n}\n\ntemplate<class ObjT, class Method, class InA,\n         class OutA, class OutB, class OutC, class OutD, class OutE>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const InA& in,\n                             Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d,\n                 &out->e);\n}\n\ntemplate<class ObjT, class Method, class InA,\n         class OutA, class OutB, class OutC, class OutD, class OutE>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple1<InA>& in,\n                             Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d,\n                 &out->e);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB,\n         class OutA, class OutB, class OutC, class OutD, class OutE>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple2<InA, InB>& in,\n                             Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d,\n                 &out->e);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB, class InC,\n         class OutA, class OutB, class OutC, class OutD, class OutE>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple3<InA, InB, InC>& in,\n                             Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d,\n                 &out->e);\n}\n\ntemplate<class ObjT, class Method, class InA, class InB, class InC, class InD,\n         class OutA, class OutB, class OutC, class OutD, class OutE>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple4<InA, InB, InC, InD>& in,\n                             Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d,\n                 &out->e);\n}\n\ntemplate<class ObjT, class Method,\n         class InA, class InB, class InC, class InD, class InE,\n         class OutA, class OutB, class OutC, class OutD, class OutE>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple5<InA, InB, InC, InD, InE>& in,\n                             Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d,\n                 &out->e);\n}\n\ntemplate<class ObjT, class Method,\n         class InA, class InB, class InC, class InD, class InE, class InF,\n         class OutA, class OutB, class OutC, class OutD, class OutE>\ninline void DispatchToMethod(ObjT* obj, Method method,\n                             const Tuple6<InA, InB, InC, InD, InE, InF>& in,\n                             Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {\n  (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),\n                 base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),\n                 base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),\n                 base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),\n                 base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),\n                 base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),\n                 &out->a,\n                 &out->b,\n                 &out->c,\n                 &out->d,\n                 &out->e);\n}\n\n}  // namespace base\n\n#endif // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_TUPLE_H_\n"
  },
  {
    "path": "CEF/include/base/cef_weak_ptr.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Weak pointers are pointers to an object that do not affect its lifetime,\n// and which may be invalidated (i.e. reset to NULL) by the object, or its\n// owner, at any time, most commonly when the object is about to be deleted.\n\n// Weak pointers are useful when an object needs to be accessed safely by one\n// or more objects other than its owner, and those callers can cope with the\n// object vanishing and e.g. tasks posted to it being silently dropped.\n// Reference-counting such an object would complicate the ownership graph and\n// make it harder to reason about the object's lifetime.\n\n// EXAMPLE:\n//\n//  class Controller {\n//   public:\n//    Controller() : weak_factory_(this) {}\n//    void SpawnWorker() { Worker::StartNew(weak_factory_.GetWeakPtr()); }\n//    void WorkComplete(const Result& result) { ... }\n//   private:\n//    // Member variables should appear before the WeakPtrFactory, to ensure\n//    // that any WeakPtrs to Controller are invalidated before its members\n//    // variable's destructors are executed, rendering them invalid.\n//    WeakPtrFactory<Controller> weak_factory_;\n//  };\n//\n//  class Worker {\n//   public:\n//    static void StartNew(const WeakPtr<Controller>& controller) {\n//      Worker* worker = new Worker(controller);\n//      // Kick off asynchronous processing...\n//    }\n//   private:\n//    Worker(const WeakPtr<Controller>& controller)\n//        : controller_(controller) {}\n//    void DidCompleteAsynchronousProcessing(const Result& result) {\n//      if (controller_)\n//        controller_->WorkComplete(result);\n//    }\n//    WeakPtr<Controller> controller_;\n//  };\n//\n// With this implementation a caller may use SpawnWorker() to dispatch multiple\n// Workers and subsequently delete the Controller, without waiting for all\n// Workers to have completed.\n\n// ------------------------- IMPORTANT: Thread-safety -------------------------\n\n// Weak pointers may be passed safely between threads, but must always be\n// dereferenced and invalidated on the same thread otherwise checking the\n// pointer would be racey.\n//\n// To ensure correct use, the first time a WeakPtr issued by a WeakPtrFactory\n// is dereferenced, the factory and its WeakPtrs become bound to the calling\n// thread, and cannot be dereferenced or invalidated on any other thread. Bound\n// WeakPtrs can still be handed off to other threads, e.g. to use to post tasks\n// back to object on the bound thread.\n//\n// If all WeakPtr objects are destroyed or invalidated then the factory is\n// unbound from the SequencedTaskRunner/Thread. The WeakPtrFactory may then be\n// destroyed, or new WeakPtr objects may be used, from a different sequence.\n//\n// Thus, at least one WeakPtr object must exist and have been dereferenced on\n// the correct thread to enforce that other WeakPtr objects will enforce they\n// are used on the desired thread.\n\n#ifndef CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_\n#define CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_\n#pragma once\n\n#if defined(BASE_MEMORY_WEAK_PTR_H_)\n// Do nothing if the Chromium header has already been included.\n// This can happen in cases where Chromium code is used directly by the\n// client application. When using Chromium code directly always include\n// the Chromium header first to avoid type conflicts.\n#elif defined(USING_CHROMIUM_INCLUDES)\n// When building CEF include the Chromium header directly.\n#include \"base/memory/weak_ptr.h\"\n#else  // !USING_CHROMIUM_INCLUDES\n// The following is substantially similar to the Chromium implementation.\n// If the Chromium implementation diverges the below implementation should be\n// updated to match.\n\n#include \"include/base/cef_basictypes.h\"\n#include \"include/base/cef_logging.h\"\n#include \"include/base/cef_ref_counted.h\"\n#include \"include/base/cef_template_util.h\"\n#include \"include/base/cef_thread_checker.h\"\n\nnamespace base {\n\ntemplate <typename T> class SupportsWeakPtr;\ntemplate <typename T> class WeakPtr;\n\nnamespace cef_internal {\n// These classes are part of the WeakPtr implementation.\n// DO NOT USE THESE CLASSES DIRECTLY YOURSELF.\n\nclass WeakReference {\n public:\n  // Although Flag is bound to a specific thread, it may be deleted from another\n  // via base::WeakPtr::~WeakPtr().\n  class Flag : public RefCountedThreadSafe<Flag> {\n   public:\n    Flag();\n\n    void Invalidate();\n    bool IsValid() const;\n\n   private:\n    friend class base::RefCountedThreadSafe<Flag>;\n\n    ~Flag();\n\n    // The current Chromium implementation uses SequenceChecker instead of\n    // ThreadChecker to support SequencedWorkerPools. CEF does not yet expose\n    // the concept of SequencedWorkerPools.\n    ThreadChecker thread_checker_;\n    bool is_valid_;\n  };\n\n  WeakReference();\n  explicit WeakReference(const Flag* flag);\n  ~WeakReference();\n\n  bool is_valid() const;\n\n private:\n  scoped_refptr<const Flag> flag_;\n};\n\nclass WeakReferenceOwner {\n public:\n  WeakReferenceOwner();\n  ~WeakReferenceOwner();\n\n  WeakReference GetRef() const;\n\n  bool HasRefs() const {\n    return flag_.get() && !flag_->HasOneRef();\n  }\n\n  void Invalidate();\n\n private:\n  mutable scoped_refptr<WeakReference::Flag> flag_;\n};\n\n// This class simplifies the implementation of WeakPtr's type conversion\n// constructor by avoiding the need for a public accessor for ref_.  A\n// WeakPtr<T> cannot access the private members of WeakPtr<U>, so this\n// base class gives us a way to access ref_ in a protected fashion.\nclass WeakPtrBase {\n public:\n  WeakPtrBase();\n  ~WeakPtrBase();\n\n protected:\n  explicit WeakPtrBase(const WeakReference& ref);\n\n  WeakReference ref_;\n};\n\n// This class provides a common implementation of common functions that would\n// otherwise get instantiated separately for each distinct instantiation of\n// SupportsWeakPtr<>.\nclass SupportsWeakPtrBase {\n public:\n  // A safe static downcast of a WeakPtr<Base> to WeakPtr<Derived>. This\n  // conversion will only compile if there is exists a Base which inherits\n  // from SupportsWeakPtr<Base>. See base::AsWeakPtr() below for a helper\n  // function that makes calling this easier.\n  template<typename Derived>\n  static WeakPtr<Derived> StaticAsWeakPtr(Derived* t) {\n    typedef\n        is_convertible<Derived, cef_internal::SupportsWeakPtrBase&> convertible;\n    COMPILE_ASSERT(convertible::value,\n                   AsWeakPtr_argument_inherits_from_SupportsWeakPtr);\n    return AsWeakPtrImpl<Derived>(t, *t);\n  }\n\n private:\n  // This template function uses type inference to find a Base of Derived\n  // which is an instance of SupportsWeakPtr<Base>. We can then safely\n  // static_cast the Base* to a Derived*.\n  template <typename Derived, typename Base>\n  static WeakPtr<Derived> AsWeakPtrImpl(\n      Derived* t, const SupportsWeakPtr<Base>&) {\n    WeakPtr<Base> ptr = t->Base::AsWeakPtr();\n    return WeakPtr<Derived>(ptr.ref_, static_cast<Derived*>(ptr.ptr_));\n  }\n};\n\n}  // namespace cef_internal\n\ntemplate <typename T> class WeakPtrFactory;\n\n// The WeakPtr class holds a weak reference to |T*|.\n//\n// This class is designed to be used like a normal pointer.  You should always\n// null-test an object of this class before using it or invoking a method that\n// may result in the underlying object being destroyed.\n//\n// EXAMPLE:\n//\n//   class Foo { ... };\n//   WeakPtr<Foo> foo;\n//   if (foo)\n//     foo->method();\n//\ntemplate <typename T>\nclass WeakPtr : public cef_internal::WeakPtrBase {\n public:\n  WeakPtr() : ptr_(NULL) {\n  }\n\n  // Allow conversion from U to T provided U \"is a\" T. Note that this\n  // is separate from the (implicit) copy constructor.\n  template <typename U>\n  WeakPtr(const WeakPtr<U>& other) : WeakPtrBase(other), ptr_(other.ptr_) {\n  }\n\n  T* get() const { return ref_.is_valid() ? ptr_ : NULL; }\n\n  T& operator*() const {\n    DCHECK(get() != NULL);\n    return *get();\n  }\n  T* operator->() const {\n    DCHECK(get() != NULL);\n    return get();\n  }\n\n  // Allow WeakPtr<element_type> to be used in boolean expressions, but not\n  // implicitly convertible to a real bool (which is dangerous).\n  //\n  // Note that this trick is only safe when the == and != operators\n  // are declared explicitly, as otherwise \"weak_ptr1 == weak_ptr2\"\n  // will compile but do the wrong thing (i.e., convert to Testable\n  // and then do the comparison).\n private:\n  typedef T* WeakPtr::*Testable;\n\n public:\n  operator Testable() const { return get() ? &WeakPtr::ptr_ : NULL; }\n\n  void reset() {\n    ref_ = cef_internal::WeakReference();\n    ptr_ = NULL;\n  }\n\n private:\n  // Explicitly declare comparison operators as required by the bool\n  // trick, but keep them private.\n  template <class U> bool operator==(WeakPtr<U> const&) const;\n  template <class U> bool operator!=(WeakPtr<U> const&) const;\n\n  friend class cef_internal::SupportsWeakPtrBase;\n  template <typename U> friend class WeakPtr;\n  friend class SupportsWeakPtr<T>;\n  friend class WeakPtrFactory<T>;\n\n  WeakPtr(const cef_internal::WeakReference& ref, T* ptr)\n      : WeakPtrBase(ref),\n        ptr_(ptr) {\n  }\n\n  // This pointer is only valid when ref_.is_valid() is true.  Otherwise, its\n  // value is undefined (as opposed to NULL).\n  T* ptr_;\n};\n\n// A class may be composed of a WeakPtrFactory and thereby\n// control how it exposes weak pointers to itself.  This is helpful if you only\n// need weak pointers within the implementation of a class.  This class is also\n// useful when working with primitive types.  For example, you could have a\n// WeakPtrFactory<bool> that is used to pass around a weak reference to a bool.\ntemplate <class T>\nclass WeakPtrFactory {\n public:\n  explicit WeakPtrFactory(T* ptr) : ptr_(ptr) {\n  }\n\n  ~WeakPtrFactory() {\n    ptr_ = NULL;\n  }\n\n  WeakPtr<T> GetWeakPtr() {\n    DCHECK(ptr_);\n    return WeakPtr<T>(weak_reference_owner_.GetRef(), ptr_);\n  }\n\n  // Call this method to invalidate all existing weak pointers.\n  void InvalidateWeakPtrs() {\n    DCHECK(ptr_);\n    weak_reference_owner_.Invalidate();\n  }\n\n  // Call this method to determine if any weak pointers exist.\n  bool HasWeakPtrs() const {\n    DCHECK(ptr_);\n    return weak_reference_owner_.HasRefs();\n  }\n\n private:\n  cef_internal::WeakReferenceOwner weak_reference_owner_;\n  T* ptr_;\n  DISALLOW_IMPLICIT_CONSTRUCTORS(WeakPtrFactory);\n};\n\n// A class may extend from SupportsWeakPtr to let others take weak pointers to\n// it. This avoids the class itself implementing boilerplate to dispense weak\n// pointers.  However, since SupportsWeakPtr's destructor won't invalidate\n// weak pointers to the class until after the derived class' members have been\n// destroyed, its use can lead to subtle use-after-destroy issues.\ntemplate <class T>\nclass SupportsWeakPtr : public cef_internal::SupportsWeakPtrBase {\n public:\n  SupportsWeakPtr() {}\n\n  WeakPtr<T> AsWeakPtr() {\n    return WeakPtr<T>(weak_reference_owner_.GetRef(), static_cast<T*>(this));\n  }\n\n protected:\n  ~SupportsWeakPtr() {}\n\n private:\n  cef_internal::WeakReferenceOwner weak_reference_owner_;\n  DISALLOW_COPY_AND_ASSIGN(SupportsWeakPtr);\n};\n\n// Helper function that uses type deduction to safely return a WeakPtr<Derived>\n// when Derived doesn't directly extend SupportsWeakPtr<Derived>, instead it\n// extends a Base that extends SupportsWeakPtr<Base>.\n//\n// EXAMPLE:\n//   class Base : public base::SupportsWeakPtr<Producer> {};\n//   class Derived : public Base {};\n//\n//   Derived derived;\n//   base::WeakPtr<Derived> ptr = base::AsWeakPtr(&derived);\n//\n// Note that the following doesn't work (invalid type conversion) since\n// Derived::AsWeakPtr() is WeakPtr<Base> SupportsWeakPtr<Base>::AsWeakPtr(),\n// and there's no way to safely cast WeakPtr<Base> to WeakPtr<Derived> at\n// the caller.\n//\n//   base::WeakPtr<Derived> ptr = derived.AsWeakPtr();  // Fails.\n\ntemplate <typename Derived>\nWeakPtr<Derived> AsWeakPtr(Derived* t) {\n  return cef_internal::SupportsWeakPtrBase::StaticAsWeakPtr<Derived>(t);\n}\n\n}  // namespace base\n\n#endif  // !USING_CHROMIUM_INCLUDES\n\n#endif  // CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_\n"
  },
  {
    "path": "CEF/include/base/internal/cef_atomicops_x86_msvc.h",
    "content": "// Copyright (c) 2008 Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Do not include this header file directly. Use base/cef_atomicops.h\n// instead.\n\n#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_MSVC_H_\n#define CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_MSVC_H_\n\n#include <windows.h>\n\n#include <intrin.h>\n\n#include \"include/base/cef_macros.h\"\n\n#if defined(ARCH_CPU_64_BITS)\n// windows.h #defines this (only on x64). This causes problems because the\n// public API also uses MemoryBarrier at the public name for this fence. So, on\n// X64, undef it, and call its documented\n// (http://msdn.microsoft.com/en-us/library/windows/desktop/ms684208.aspx)\n// implementation directly.\n#undef MemoryBarrier\n#endif\n\nnamespace base {\nnamespace subtle {\n\ninline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,\n                                         Atomic32 old_value,\n                                         Atomic32 new_value) {\n  LONG result = _InterlockedCompareExchange(\n      reinterpret_cast<volatile LONG*>(ptr),\n      static_cast<LONG>(new_value),\n      static_cast<LONG>(old_value));\n  return static_cast<Atomic32>(result);\n}\n\ninline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,\n                                         Atomic32 new_value) {\n  LONG result = _InterlockedExchange(\n      reinterpret_cast<volatile LONG*>(ptr),\n      static_cast<LONG>(new_value));\n  return static_cast<Atomic32>(result);\n}\n\ninline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,\n                                        Atomic32 increment) {\n  return _InterlockedExchangeAdd(\n      reinterpret_cast<volatile LONG*>(ptr),\n      static_cast<LONG>(increment)) + increment;\n}\n\ninline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,\n                                          Atomic32 increment) {\n  return Barrier_AtomicIncrement(ptr, increment);\n}\n\n#if !(defined(_MSC_VER) && _MSC_VER >= 1400)\n#error \"We require at least vs2005 for MemoryBarrier\"\n#endif\ninline void MemoryBarrier() {\n#if defined(ARCH_CPU_64_BITS)\n  // See #undef and note at the top of this file.\n  __faststorefence();\n#else\n  // We use MemoryBarrier from WinNT.h\n  ::MemoryBarrier();\n#endif\n}\n\ninline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,\n                                       Atomic32 old_value,\n                                       Atomic32 new_value) {\n  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);\n}\n\ninline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,\n                                       Atomic32 old_value,\n                                       Atomic32 new_value) {\n  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);\n}\n\ninline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {\n  *ptr = value;\n}\n\ninline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {\n  NoBarrier_AtomicExchange(ptr, value);\n              // acts as a barrier in this implementation\n}\n\ninline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {\n  *ptr = value; // works w/o barrier for current Intel chips as of June 2005\n  // See comments in Atomic64 version of Release_Store() below.\n}\n\ninline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {\n  return *ptr;\n}\n\ninline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {\n  Atomic32 value = *ptr;\n  return value;\n}\n\ninline Atomic32 Release_Load(volatile const Atomic32* ptr) {\n  MemoryBarrier();\n  return *ptr;\n}\n\n#if defined(_WIN64)\n\n// 64-bit low-level operations on 64-bit platform.\n\nCOMPILE_ASSERT(sizeof(Atomic64) == sizeof(PVOID), atomic_word_is_atomic);\n\ninline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,\n                                         Atomic64 old_value,\n                                         Atomic64 new_value) {\n  PVOID result = InterlockedCompareExchangePointer(\n    reinterpret_cast<volatile PVOID*>(ptr),\n    reinterpret_cast<PVOID>(new_value), reinterpret_cast<PVOID>(old_value));\n  return reinterpret_cast<Atomic64>(result);\n}\n\ninline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,\n                                         Atomic64 new_value) {\n  PVOID result = InterlockedExchangePointer(\n    reinterpret_cast<volatile PVOID*>(ptr),\n    reinterpret_cast<PVOID>(new_value));\n  return reinterpret_cast<Atomic64>(result);\n}\n\ninline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,\n                                        Atomic64 increment) {\n  return InterlockedExchangeAdd64(\n      reinterpret_cast<volatile LONGLONG*>(ptr),\n      static_cast<LONGLONG>(increment)) + increment;\n}\n\ninline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,\n                                          Atomic64 increment) {\n  return Barrier_AtomicIncrement(ptr, increment);\n}\n\ninline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {\n  *ptr = value;\n}\n\ninline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {\n  NoBarrier_AtomicExchange(ptr, value);\n              // acts as a barrier in this implementation\n}\n\ninline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {\n  *ptr = value; // works w/o barrier for current Intel chips as of June 2005\n\n  // When new chips come out, check:\n  //  IA-32 Intel Architecture Software Developer's Manual, Volume 3:\n  //  System Programming Guide, Chatper 7: Multiple-processor management,\n  //  Section 7.2, Memory Ordering.\n  // Last seen at:\n  //   http://developer.intel.com/design/pentium4/manuals/index_new.htm\n}\n\ninline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {\n  return *ptr;\n}\n\ninline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {\n  Atomic64 value = *ptr;\n  return value;\n}\n\ninline Atomic64 Release_Load(volatile const Atomic64* ptr) {\n  MemoryBarrier();\n  return *ptr;\n}\n\ninline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,\n                                       Atomic64 old_value,\n                                       Atomic64 new_value) {\n  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);\n}\n\ninline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,\n                                       Atomic64 old_value,\n                                       Atomic64 new_value) {\n  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);\n}\n\n\n#endif  // defined(_WIN64)\n\n}  // namespace base::subtle\n}  // namespace base\n\n#endif  // CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_MSVC_H_\n"
  },
  {
    "path": "CEF/include/base/internal/cef_bind_internal.h",
    "content": "// Copyright (c) 2011 Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Do not include this header file directly. Use base/cef_bind.h instead.\n\n#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_H_\n#define CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_H_\n\n#include \"include/base/cef_bind_helpers.h\"\n#include \"include/base/cef_build.h\"\n#include \"include/base/cef_template_util.h\"\n#include \"include/base/cef_weak_ptr.h\"\n#include \"include/base/internal/cef_callback_internal.h\"\n#include \"include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h\"\n\n#if defined(OS_WIN)\n#include \"include/base/internal/cef_bind_internal_win.h\"\n#endif\n\nnamespace base {\nnamespace cef_internal {\n\n// See base/callback.h for user documentation.\n//\n//\n// CONCEPTS:\n//  Runnable -- A type (really a type class) that has a single Run() method\n//              and a RunType typedef that corresponds to the type of Run().\n//              A Runnable can declare that it should treated like a method\n//              call by including a typedef named IsMethod.  The value of\n//              this typedef is NOT inspected, only the existence.  When a\n//              Runnable declares itself a method, Bind() will enforce special\n//              refcounting + WeakPtr handling semantics for the first\n//              parameter which is expected to be an object.\n//  Functor -- A copyable type representing something that should be called.\n//             All function pointers, Callback<>, and Runnables are functors\n//             even if the invocation syntax differs.\n//  RunType -- A function type (as opposed to function _pointer_ type) for\n//             a Run() function.  Usually just a convenience typedef.\n//  (Bound)ArgsType -- A function type that is being (ab)used to store the\n//                     types of set of arguments.  The \"return\" type is always\n//                     void here.  We use this hack so that we do not need\n//                     a new type name for each arity of type. (eg.,\n//                     BindState1, BindState2).  This makes forward\n//                     declarations and friending much much easier.\n//\n// Types:\n//  RunnableAdapter<> -- Wraps the various \"function\" pointer types into an\n//                       object that adheres to the Runnable interface.\n//                       There are |3*ARITY| RunnableAdapter types.\n//  FunctionTraits<> -- Type traits that unwrap a function signature into a\n//                      a set of easier to use typedefs.  Used mainly for\n//                      compile time asserts.\n//                      There are |ARITY| FunctionTraits types.\n//  ForceVoidReturn<> -- Helper class for translating function signatures to\n//                       equivalent forms with a \"void\" return type.\n//                    There are |ARITY| ForceVoidReturn types.\n//  FunctorTraits<> -- Type traits used determine the correct RunType and\n//                     RunnableType for a Functor.  This is where function\n//                     signature adapters are applied.\n//                    There are |ARITY| ForceVoidReturn types.\n//  MakeRunnable<> -- Takes a Functor and returns an object in the Runnable\n//                    type class that represents the underlying Functor.\n//                    There are |O(1)| MakeRunnable types.\n//  InvokeHelper<> -- Take a Runnable + arguments and actully invokes it.\n// Handle the differing syntaxes needed for WeakPtr<> support,\n//                    and for ignoring return values.  This is separate from\n//                    Invoker to avoid creating multiple version of Invoker<>\n//                    which grows at O(n^2) with the arity.\n//                    There are |k*ARITY| InvokeHelper types.\n//  Invoker<> -- Unwraps the curried parameters and executes the Runnable.\n//               There are |(ARITY^2 + ARITY)/2| Invoketypes.\n//  BindState<> -- Stores the curried parameters, and is the main entry point\n//                 into the Bind() system, doing most of the type resolution.\n//                 There are ARITY BindState types.\n\n// RunnableAdapter<>\n//\n// The RunnableAdapter<> templates provide a uniform interface for invoking\n// a function pointer, method pointer, or const method pointer. The adapter\n// exposes a Run() method with an appropriate signature. Using this wrapper\n// allows for writing code that supports all three pointer types without\n// undue repetition.  Without it, a lot of code would need to be repeated 3\n// times.\n//\n// For method pointers and const method pointers the first argument to Run()\n// is considered to be the received of the method.  This is similar to STL's\n// mem_fun().\n//\n// This class also exposes a RunType typedef that is the function type of the\n// Run() function.\n//\n// If and only if the wrapper contains a method or const method pointer, an\n// IsMethod typedef is exposed.  The existence of this typedef (NOT the value)\n// marks that the wrapper should be considered a method wrapper.\n\ntemplate <typename Functor>\nclass RunnableAdapter;\n\n// Function: Arity 0.\ntemplate <typename R>\nclass RunnableAdapter<R(*)()> {\n public:\n  typedef R (RunType)();\n\n  explicit RunnableAdapter(R(*function)())\n      : function_(function) {\n  }\n\n  R Run() {\n    return function_();\n  }\n\n private:\n  R (*function_)();\n};\n\n// Method: Arity 0.\ntemplate <typename R, typename T>\nclass RunnableAdapter<R(T::*)()> {\n public:\n  typedef R (RunType)(T*);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)())\n      : method_(method) {\n  }\n\n  R Run(T* object) {\n    return (object->*method_)();\n  }\n\n private:\n  R (T::*method_)();\n};\n\n// Const Method: Arity 0.\ntemplate <typename R, typename T>\nclass RunnableAdapter<R(T::*)() const> {\n public:\n  typedef R (RunType)(const T*);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)() const)\n      : method_(method) {\n  }\n\n  R Run(const T* object) {\n    return (object->*method_)();\n  }\n\n private:\n  R (T::*method_)() const;\n};\n\n// Function: Arity 1.\ntemplate <typename R, typename A1>\nclass RunnableAdapter<R(*)(A1)> {\n public:\n  typedef R (RunType)(A1);\n\n  explicit RunnableAdapter(R(*function)(A1))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1) {\n    return function_(CallbackForward(a1));\n  }\n\n private:\n  R (*function_)(A1);\n};\n\n// Method: Arity 1.\ntemplate <typename R, typename T, typename A1>\nclass RunnableAdapter<R(T::*)(A1)> {\n public:\n  typedef R (RunType)(T*, A1);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1))\n      : method_(method) {\n  }\n\n  R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1) {\n    return (object->*method_)(CallbackForward(a1));\n  }\n\n private:\n  R (T::*method_)(A1);\n};\n\n// Const Method: Arity 1.\ntemplate <typename R, typename T, typename A1>\nclass RunnableAdapter<R(T::*)(A1) const> {\n public:\n  typedef R (RunType)(const T*, A1);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1) const)\n      : method_(method) {\n  }\n\n  R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1) {\n    return (object->*method_)(CallbackForward(a1));\n  }\n\n private:\n  R (T::*method_)(A1) const;\n};\n\n// Function: Arity 2.\ntemplate <typename R, typename A1, typename A2>\nclass RunnableAdapter<R(*)(A1, A2)> {\n public:\n  typedef R (RunType)(A1, A2);\n\n  explicit RunnableAdapter(R(*function)(A1, A2))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2) {\n    return function_(CallbackForward(a1), CallbackForward(a2));\n  }\n\n private:\n  R (*function_)(A1, A2);\n};\n\n// Method: Arity 2.\ntemplate <typename R, typename T, typename A1, typename A2>\nclass RunnableAdapter<R(T::*)(A1, A2)> {\n public:\n  typedef R (RunType)(T*, A1, A2);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2))\n      : method_(method) {\n  }\n\n  R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2));\n  }\n\n private:\n  R (T::*method_)(A1, A2);\n};\n\n// Const Method: Arity 2.\ntemplate <typename R, typename T, typename A1, typename A2>\nclass RunnableAdapter<R(T::*)(A1, A2) const> {\n public:\n  typedef R (RunType)(const T*, A1, A2);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2) const)\n      : method_(method) {\n  }\n\n  R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2));\n  }\n\n private:\n  R (T::*method_)(A1, A2) const;\n};\n\n// Function: Arity 3.\ntemplate <typename R, typename A1, typename A2, typename A3>\nclass RunnableAdapter<R(*)(A1, A2, A3)> {\n public:\n  typedef R (RunType)(A1, A2, A3);\n\n  explicit RunnableAdapter(R(*function)(A1, A2, A3))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3) {\n    return function_(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3));\n  }\n\n private:\n  R (*function_)(A1, A2, A3);\n};\n\n// Method: Arity 3.\ntemplate <typename R, typename T, typename A1, typename A2, typename A3>\nclass RunnableAdapter<R(T::*)(A1, A2, A3)> {\n public:\n  typedef R (RunType)(T*, A1, A2, A3);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2, A3))\n      : method_(method) {\n  }\n\n  R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3));\n  }\n\n private:\n  R (T::*method_)(A1, A2, A3);\n};\n\n// Const Method: Arity 3.\ntemplate <typename R, typename T, typename A1, typename A2, typename A3>\nclass RunnableAdapter<R(T::*)(A1, A2, A3) const> {\n public:\n  typedef R (RunType)(const T*, A1, A2, A3);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2, A3) const)\n      : method_(method) {\n  }\n\n  R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3));\n  }\n\n private:\n  R (T::*method_)(A1, A2, A3) const;\n};\n\n// Function: Arity 4.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4>\nclass RunnableAdapter<R(*)(A1, A2, A3, A4)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4);\n\n  explicit RunnableAdapter(R(*function)(A1, A2, A3, A4))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4) {\n    return function_(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4));\n  }\n\n private:\n  R (*function_)(A1, A2, A3, A4);\n};\n\n// Method: Arity 4.\ntemplate <typename R, typename T, typename A1, typename A2, typename A3,\n    typename A4>\nclass RunnableAdapter<R(T::*)(A1, A2, A3, A4)> {\n public:\n  typedef R (RunType)(T*, A1, A2, A3, A4);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4))\n      : method_(method) {\n  }\n\n  R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4));\n  }\n\n private:\n  R (T::*method_)(A1, A2, A3, A4);\n};\n\n// Const Method: Arity 4.\ntemplate <typename R, typename T, typename A1, typename A2, typename A3,\n    typename A4>\nclass RunnableAdapter<R(T::*)(A1, A2, A3, A4) const> {\n public:\n  typedef R (RunType)(const T*, A1, A2, A3, A4);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4) const)\n      : method_(method) {\n  }\n\n  R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4));\n  }\n\n private:\n  R (T::*method_)(A1, A2, A3, A4) const;\n};\n\n// Function: Arity 5.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5>\nclass RunnableAdapter<R(*)(A1, A2, A3, A4, A5)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4, A5);\n\n  explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5) {\n    return function_(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5));\n  }\n\n private:\n  R (*function_)(A1, A2, A3, A4, A5);\n};\n\n// Method: Arity 5.\ntemplate <typename R, typename T, typename A1, typename A2, typename A3,\n    typename A4, typename A5>\nclass RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5)> {\n public:\n  typedef R (RunType)(T*, A1, A2, A3, A4, A5);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5))\n      : method_(method) {\n  }\n\n  R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5));\n  }\n\n private:\n  R (T::*method_)(A1, A2, A3, A4, A5);\n};\n\n// Const Method: Arity 5.\ntemplate <typename R, typename T, typename A1, typename A2, typename A3,\n    typename A4, typename A5>\nclass RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5) const> {\n public:\n  typedef R (RunType)(const T*, A1, A2, A3, A4, A5);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5) const)\n      : method_(method) {\n  }\n\n  R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5));\n  }\n\n private:\n  R (T::*method_)(A1, A2, A3, A4, A5) const;\n};\n\n// Function: Arity 6.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6>\nclass RunnableAdapter<R(*)(A1, A2, A3, A4, A5, A6)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4, A5, A6);\n\n  explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5, A6))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5,\n      typename CallbackParamTraits<A6>::ForwardType a6) {\n    return function_(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),\n        CallbackForward(a6));\n  }\n\n private:\n  R (*function_)(A1, A2, A3, A4, A5, A6);\n};\n\n// Method: Arity 6.\ntemplate <typename R, typename T, typename A1, typename A2, typename A3,\n    typename A4, typename A5, typename A6>\nclass RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6)> {\n public:\n  typedef R (RunType)(T*, A1, A2, A3, A4, A5, A6);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6))\n      : method_(method) {\n  }\n\n  R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5,\n      typename CallbackParamTraits<A6>::ForwardType a6) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),\n        CallbackForward(a6));\n  }\n\n private:\n  R (T::*method_)(A1, A2, A3, A4, A5, A6);\n};\n\n// Const Method: Arity 6.\ntemplate <typename R, typename T, typename A1, typename A2, typename A3,\n    typename A4, typename A5, typename A6>\nclass RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6) const> {\n public:\n  typedef R (RunType)(const T*, A1, A2, A3, A4, A5, A6);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6) const)\n      : method_(method) {\n  }\n\n  R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5,\n      typename CallbackParamTraits<A6>::ForwardType a6) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),\n        CallbackForward(a6));\n  }\n\n private:\n  R (T::*method_)(A1, A2, A3, A4, A5, A6) const;\n};\n\n// Function: Arity 7.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6, typename A7>\nclass RunnableAdapter<R(*)(A1, A2, A3, A4, A5, A6, A7)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7);\n\n  explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5, A6, A7))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5,\n      typename CallbackParamTraits<A6>::ForwardType a6,\n      typename CallbackParamTraits<A7>::ForwardType a7) {\n    return function_(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),\n        CallbackForward(a6), CallbackForward(a7));\n  }\n\n private:\n  R (*function_)(A1, A2, A3, A4, A5, A6, A7);\n};\n\n// Method: Arity 7.\ntemplate <typename R, typename T, typename A1, typename A2, typename A3,\n    typename A4, typename A5, typename A6, typename A7>\nclass RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6, A7)> {\n public:\n  typedef R (RunType)(T*, A1, A2, A3, A4, A5, A6, A7);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7))\n      : method_(method) {\n  }\n\n  R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5,\n      typename CallbackParamTraits<A6>::ForwardType a6,\n      typename CallbackParamTraits<A7>::ForwardType a7) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),\n        CallbackForward(a6), CallbackForward(a7));\n  }\n\n private:\n  R (T::*method_)(A1, A2, A3, A4, A5, A6, A7);\n};\n\n// Const Method: Arity 7.\ntemplate <typename R, typename T, typename A1, typename A2, typename A3,\n    typename A4, typename A5, typename A6, typename A7>\nclass RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6, A7) const> {\n public:\n  typedef R (RunType)(const T*, A1, A2, A3, A4, A5, A6, A7);\n  typedef true_type IsMethod;\n\n  explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7) const)\n      : method_(method) {\n  }\n\n  R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5,\n      typename CallbackParamTraits<A6>::ForwardType a6,\n      typename CallbackParamTraits<A7>::ForwardType a7) {\n    return (object->*method_)(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),\n        CallbackForward(a6), CallbackForward(a7));\n  }\n\n private:\n  R (T::*method_)(A1, A2, A3, A4, A5, A6, A7) const;\n};\n\n\n// FunctionTraits<>\n//\n// Breaks a function signature apart into typedefs for easier introspection.\ntemplate <typename Sig>\nstruct FunctionTraits;\n\ntemplate <typename R>\nstruct FunctionTraits<R()> {\n  typedef R ReturnType;\n};\n\ntemplate <typename R, typename A1>\nstruct FunctionTraits<R(A1)> {\n  typedef R ReturnType;\n  typedef A1 A1Type;\n};\n\ntemplate <typename R, typename A1, typename A2>\nstruct FunctionTraits<R(A1, A2)> {\n  typedef R ReturnType;\n  typedef A1 A1Type;\n  typedef A2 A2Type;\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3>\nstruct FunctionTraits<R(A1, A2, A3)> {\n  typedef R ReturnType;\n  typedef A1 A1Type;\n  typedef A2 A2Type;\n  typedef A3 A3Type;\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4>\nstruct FunctionTraits<R(A1, A2, A3, A4)> {\n  typedef R ReturnType;\n  typedef A1 A1Type;\n  typedef A2 A2Type;\n  typedef A3 A3Type;\n  typedef A4 A4Type;\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5>\nstruct FunctionTraits<R(A1, A2, A3, A4, A5)> {\n  typedef R ReturnType;\n  typedef A1 A1Type;\n  typedef A2 A2Type;\n  typedef A3 A3Type;\n  typedef A4 A4Type;\n  typedef A5 A5Type;\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6>\nstruct FunctionTraits<R(A1, A2, A3, A4, A5, A6)> {\n  typedef R ReturnType;\n  typedef A1 A1Type;\n  typedef A2 A2Type;\n  typedef A3 A3Type;\n  typedef A4 A4Type;\n  typedef A5 A5Type;\n  typedef A6 A6Type;\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6, typename A7>\nstruct FunctionTraits<R(A1, A2, A3, A4, A5, A6, A7)> {\n  typedef R ReturnType;\n  typedef A1 A1Type;\n  typedef A2 A2Type;\n  typedef A3 A3Type;\n  typedef A4 A4Type;\n  typedef A5 A5Type;\n  typedef A6 A6Type;\n  typedef A7 A7Type;\n};\n\n\n// ForceVoidReturn<>\n//\n// Set of templates that support forcing the function return type to void.\ntemplate <typename Sig>\nstruct ForceVoidReturn;\n\ntemplate <typename R>\nstruct ForceVoidReturn<R()> {\n  typedef void(RunType)();\n};\n\ntemplate <typename R, typename A1>\nstruct ForceVoidReturn<R(A1)> {\n  typedef void(RunType)(A1);\n};\n\ntemplate <typename R, typename A1, typename A2>\nstruct ForceVoidReturn<R(A1, A2)> {\n  typedef void(RunType)(A1, A2);\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3>\nstruct ForceVoidReturn<R(A1, A2, A3)> {\n  typedef void(RunType)(A1, A2, A3);\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4>\nstruct ForceVoidReturn<R(A1, A2, A3, A4)> {\n  typedef void(RunType)(A1, A2, A3, A4);\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5>\nstruct ForceVoidReturn<R(A1, A2, A3, A4, A5)> {\n  typedef void(RunType)(A1, A2, A3, A4, A5);\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6>\nstruct ForceVoidReturn<R(A1, A2, A3, A4, A5, A6)> {\n  typedef void(RunType)(A1, A2, A3, A4, A5, A6);\n};\n\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6, typename A7>\nstruct ForceVoidReturn<R(A1, A2, A3, A4, A5, A6, A7)> {\n  typedef void(RunType)(A1, A2, A3, A4, A5, A6, A7);\n};\n\n\n// FunctorTraits<>\n//\n// See description at top of file.\ntemplate <typename T>\nstruct FunctorTraits {\n  typedef RunnableAdapter<T> RunnableType;\n  typedef typename RunnableType::RunType RunType;\n};\n\ntemplate <typename T>\nstruct FunctorTraits<IgnoreResultHelper<T> > {\n  typedef typename FunctorTraits<T>::RunnableType RunnableType;\n  typedef typename ForceVoidReturn<\n      typename RunnableType::RunType>::RunType RunType;\n};\n\ntemplate <typename T>\nstruct FunctorTraits<Callback<T> > {\n  typedef Callback<T> RunnableType;\n  typedef typename Callback<T>::RunType RunType;\n};\n\n\n// MakeRunnable<>\n//\n// Converts a passed in functor to a RunnableType using type inference.\n\ntemplate <typename T>\ntypename FunctorTraits<T>::RunnableType MakeRunnable(const T& t) {\n  return RunnableAdapter<T>(t);\n}\n\ntemplate <typename T>\ntypename FunctorTraits<T>::RunnableType\nMakeRunnable(const IgnoreResultHelper<T>& t) {\n  return MakeRunnable(t.functor_);\n}\n\ntemplate <typename T>\nconst typename FunctorTraits<Callback<T> >::RunnableType&\nMakeRunnable(const Callback<T>& t) {\n  DCHECK(!t.is_null());\n  return t;\n}\n\n\n// InvokeHelper<>\n//\n// There are 3 logical InvokeHelper<> specializations: normal, void-return,\n// WeakCalls.\n//\n// The normal type just calls the underlying runnable.\n//\n// We need a InvokeHelper to handle void return types in order to support\n// IgnoreResult().  Normally, if the Runnable's RunType had a void return,\n// the template system would just accept \"return functor.Run()\" ignoring\n// the fact that a void function is being used with return. This piece of\n// sugar breaks though when the Runnable's RunType is not void.  Thus, we\n// need a partial specialization to change the syntax to drop the \"return\"\n// from the invocation call.\n//\n// WeakCalls similarly need special syntax that is applied to the first\n// argument to check if they should no-op themselves.\ntemplate <bool IsWeakCall, typename ReturnType, typename Runnable,\n          typename ArgsType>\nstruct InvokeHelper;\n\ntemplate <typename ReturnType, typename Runnable>\nstruct InvokeHelper<false, ReturnType, Runnable,\n    void()>  {\n  static ReturnType MakeItSo(Runnable runnable) {\n    return runnable.Run();\n  }\n};\n\ntemplate <typename Runnable>\nstruct InvokeHelper<false, void, Runnable,\n    void()>  {\n  static void MakeItSo(Runnable runnable) {\n    runnable.Run();\n  }\n};\n\ntemplate <typename ReturnType, typename Runnable,typename A1>\nstruct InvokeHelper<false, ReturnType, Runnable,\n    void(A1)>  {\n  static ReturnType MakeItSo(Runnable runnable, A1 a1) {\n    return runnable.Run(CallbackForward(a1));\n  }\n};\n\ntemplate <typename Runnable,typename A1>\nstruct InvokeHelper<false, void, Runnable,\n    void(A1)>  {\n  static void MakeItSo(Runnable runnable, A1 a1) {\n    runnable.Run(CallbackForward(a1));\n  }\n};\n\ntemplate <typename Runnable, typename BoundWeakPtr>\nstruct InvokeHelper<true, void, Runnable,\n    void(BoundWeakPtr)>  {\n  static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr) {\n    if (!weak_ptr.get()) {\n      return;\n    }\n    runnable.Run(weak_ptr.get());\n  }\n};\n\ntemplate <typename ReturnType, typename Runnable,typename A1, typename A2>\nstruct InvokeHelper<false, ReturnType, Runnable,\n    void(A1, A2)>  {\n  static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2) {\n    return runnable.Run(CallbackForward(a1), CallbackForward(a2));\n  }\n};\n\ntemplate <typename Runnable,typename A1, typename A2>\nstruct InvokeHelper<false, void, Runnable,\n    void(A1, A2)>  {\n  static void MakeItSo(Runnable runnable, A1 a1, A2 a2) {\n    runnable.Run(CallbackForward(a1), CallbackForward(a2));\n  }\n};\n\ntemplate <typename Runnable, typename BoundWeakPtr, typename A2>\nstruct InvokeHelper<true, void, Runnable,\n    void(BoundWeakPtr, A2)>  {\n  static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2) {\n    if (!weak_ptr.get()) {\n      return;\n    }\n    runnable.Run(weak_ptr.get(), CallbackForward(a2));\n  }\n};\n\ntemplate <typename ReturnType, typename Runnable,typename A1, typename A2,\n    typename A3>\nstruct InvokeHelper<false, ReturnType, Runnable,\n    void(A1, A2, A3)>  {\n  static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) {\n    return runnable.Run(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3));\n  }\n};\n\ntemplate <typename Runnable,typename A1, typename A2, typename A3>\nstruct InvokeHelper<false, void, Runnable,\n    void(A1, A2, A3)>  {\n  static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) {\n    runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3));\n  }\n};\n\ntemplate <typename Runnable, typename BoundWeakPtr, typename A2, typename A3>\nstruct InvokeHelper<true, void, Runnable,\n    void(BoundWeakPtr, A2, A3)>  {\n  static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3) {\n    if (!weak_ptr.get()) {\n      return;\n    }\n    runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3));\n  }\n};\n\ntemplate <typename ReturnType, typename Runnable,typename A1, typename A2,\n    typename A3, typename A4>\nstruct InvokeHelper<false, ReturnType, Runnable,\n    void(A1, A2, A3, A4)>  {\n  static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) {\n    return runnable.Run(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4));\n  }\n};\n\ntemplate <typename Runnable,typename A1, typename A2, typename A3, typename A4>\nstruct InvokeHelper<false, void, Runnable,\n    void(A1, A2, A3, A4)>  {\n  static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) {\n    runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3),\n        CallbackForward(a4));\n  }\n};\n\ntemplate <typename Runnable, typename BoundWeakPtr, typename A2, typename A3,\n    typename A4>\nstruct InvokeHelper<true, void, Runnable,\n    void(BoundWeakPtr, A2, A3, A4)>  {\n  static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3,\n      A4 a4) {\n    if (!weak_ptr.get()) {\n      return;\n    }\n    runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3),\n        CallbackForward(a4));\n  }\n};\n\ntemplate <typename ReturnType, typename Runnable,typename A1, typename A2,\n    typename A3, typename A4, typename A5>\nstruct InvokeHelper<false, ReturnType, Runnable,\n    void(A1, A2, A3, A4, A5)>  {\n  static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4,\n      A5 a5) {\n    return runnable.Run(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5));\n  }\n};\n\ntemplate <typename Runnable,typename A1, typename A2, typename A3, typename A4,\n    typename A5>\nstruct InvokeHelper<false, void, Runnable,\n    void(A1, A2, A3, A4, A5)>  {\n  static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {\n    runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3),\n        CallbackForward(a4), CallbackForward(a5));\n  }\n};\n\ntemplate <typename Runnable, typename BoundWeakPtr, typename A2, typename A3,\n    typename A4, typename A5>\nstruct InvokeHelper<true, void, Runnable,\n    void(BoundWeakPtr, A2, A3, A4, A5)>  {\n  static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3,\n      A4 a4, A5 a5) {\n    if (!weak_ptr.get()) {\n      return;\n    }\n    runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3),\n        CallbackForward(a4), CallbackForward(a5));\n  }\n};\n\ntemplate <typename ReturnType, typename Runnable,typename A1, typename A2,\n    typename A3, typename A4, typename A5, typename A6>\nstruct InvokeHelper<false, ReturnType, Runnable,\n    void(A1, A2, A3, A4, A5, A6)>  {\n  static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4,\n      A5 a5, A6 a6) {\n    return runnable.Run(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),\n        CallbackForward(a6));\n  }\n};\n\ntemplate <typename Runnable,typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6>\nstruct InvokeHelper<false, void, Runnable,\n    void(A1, A2, A3, A4, A5, A6)>  {\n  static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5,\n      A6 a6) {\n    runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3),\n        CallbackForward(a4), CallbackForward(a5), CallbackForward(a6));\n  }\n};\n\ntemplate <typename Runnable, typename BoundWeakPtr, typename A2, typename A3,\n    typename A4, typename A5, typename A6>\nstruct InvokeHelper<true, void, Runnable,\n    void(BoundWeakPtr, A2, A3, A4, A5, A6)>  {\n  static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3,\n      A4 a4, A5 a5, A6 a6) {\n    if (!weak_ptr.get()) {\n      return;\n    }\n    runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3),\n        CallbackForward(a4), CallbackForward(a5), CallbackForward(a6));\n  }\n};\n\ntemplate <typename ReturnType, typename Runnable,typename A1, typename A2,\n    typename A3, typename A4, typename A5, typename A6, typename A7>\nstruct InvokeHelper<false, ReturnType, Runnable,\n    void(A1, A2, A3, A4, A5, A6, A7)>  {\n  static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4,\n      A5 a5, A6 a6, A7 a7) {\n    return runnable.Run(CallbackForward(a1), CallbackForward(a2),\n        CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),\n        CallbackForward(a6), CallbackForward(a7));\n  }\n};\n\ntemplate <typename Runnable,typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6, typename A7>\nstruct InvokeHelper<false, void, Runnable,\n    void(A1, A2, A3, A4, A5, A6, A7)>  {\n  static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5,\n      A6 a6, A7 a7) {\n    runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3),\n        CallbackForward(a4), CallbackForward(a5), CallbackForward(a6),\n        CallbackForward(a7));\n  }\n};\n\ntemplate <typename Runnable, typename BoundWeakPtr, typename A2, typename A3,\n    typename A4, typename A5, typename A6, typename A7>\nstruct InvokeHelper<true, void, Runnable,\n    void(BoundWeakPtr, A2, A3, A4, A5, A6, A7)>  {\n  static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3,\n      A4 a4, A5 a5, A6 a6, A7 a7) {\n    if (!weak_ptr.get()) {\n      return;\n    }\n    runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3),\n        CallbackForward(a4), CallbackForward(a5), CallbackForward(a6),\n        CallbackForward(a7));\n  }\n};\n\n#if !defined(_MSC_VER)\n\ntemplate <typename ReturnType, typename Runnable, typename ArgsType>\nstruct InvokeHelper<true, ReturnType, Runnable, ArgsType> {\n  // WeakCalls are only supported for functions with a void return type.\n  // Otherwise, the function result would be undefined if the the WeakPtr<>\n  // is invalidated.\n  COMPILE_ASSERT(is_void<ReturnType>::value,\n                 weak_ptrs_can_only_bind_to_methods_without_return_values);\n};\n\n#endif\n\n// Invoker<>\n//\n// See description at the top of the file.\ntemplate <int NumBound, typename Storage, typename RunType>\nstruct Invoker;\n\n// Arity 0 -> 0.\ntemplate <typename StorageType, typename R>\nstruct Invoker<0, StorageType, R()> {\n  typedef R(RunType)(BindStateBase*);\n\n  typedef R(UnboundRunType)();\n\n  static R Run(BindStateBase* base) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void()>\n               ::MakeItSo(storage->runnable_);\n  }\n};\n\n// Arity 1 -> 1.\ntemplate <typename StorageType, typename R,typename X1>\nstruct Invoker<0, StorageType, R(X1)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X1>::ForwardType);\n\n  typedef R(UnboundRunType)(X1);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X1>::ForwardType x1) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename CallbackParamTraits<X1>::ForwardType x1)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1));\n  }\n};\n\n// Arity 1 -> 0.\ntemplate <typename StorageType, typename R,typename X1>\nstruct Invoker<1, StorageType, R(X1)> {\n  typedef R(RunType)(BindStateBase*);\n\n  typedef R(UnboundRunType)();\n\n  static R Run(BindStateBase* base) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1));\n  }\n};\n\n// Arity 2 -> 2.\ntemplate <typename StorageType, typename R,typename X1, typename X2>\nstruct Invoker<0, StorageType, R(X1, X2)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X1>::ForwardType,\n      typename CallbackParamTraits<X2>::ForwardType);\n\n  typedef R(UnboundRunType)(X1, X2);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X1>::ForwardType x1,\n      typename CallbackParamTraits<X2>::ForwardType x2) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename CallbackParamTraits<X1>::ForwardType x1,\n               typename CallbackParamTraits<X2>::ForwardType x2)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2));\n  }\n};\n\n// Arity 2 -> 1.\ntemplate <typename StorageType, typename R,typename X1, typename X2>\nstruct Invoker<1, StorageType, R(X1, X2)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X2>::ForwardType);\n\n  typedef R(UnboundRunType)(X2);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X2>::ForwardType x2) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X2>::ForwardType x2)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2));\n  }\n};\n\n// Arity 2 -> 0.\ntemplate <typename StorageType, typename R,typename X1, typename X2>\nstruct Invoker<2, StorageType, R(X1, X2)> {\n  typedef R(RunType)(BindStateBase*);\n\n  typedef R(UnboundRunType)();\n\n  static R Run(BindStateBase* base) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2));\n  }\n};\n\n// Arity 3 -> 3.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3>\nstruct Invoker<0, StorageType, R(X1, X2, X3)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X1>::ForwardType,\n      typename CallbackParamTraits<X2>::ForwardType,\n      typename CallbackParamTraits<X3>::ForwardType);\n\n  typedef R(UnboundRunType)(X1, X2, X3);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X1>::ForwardType x1,\n      typename CallbackParamTraits<X2>::ForwardType x2,\n      typename CallbackParamTraits<X3>::ForwardType x3) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename CallbackParamTraits<X1>::ForwardType x1,\n               typename CallbackParamTraits<X2>::ForwardType x2,\n               typename CallbackParamTraits<X3>::ForwardType x3)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3));\n  }\n};\n\n// Arity 3 -> 2.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3>\nstruct Invoker<1, StorageType, R(X1, X2, X3)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X2>::ForwardType,\n      typename CallbackParamTraits<X3>::ForwardType);\n\n  typedef R(UnboundRunType)(X2, X3);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X2>::ForwardType x2,\n      typename CallbackParamTraits<X3>::ForwardType x3) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X2>::ForwardType x2,\n               typename CallbackParamTraits<X3>::ForwardType x3)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3));\n  }\n};\n\n// Arity 3 -> 1.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3>\nstruct Invoker<2, StorageType, R(X1, X2, X3)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X3>::ForwardType);\n\n  typedef R(UnboundRunType)(X3);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X3>::ForwardType x3) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X3>::ForwardType x3)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3));\n  }\n};\n\n// Arity 3 -> 0.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3>\nstruct Invoker<3, StorageType, R(X1, X2, X3)> {\n  typedef R(RunType)(BindStateBase*);\n\n  typedef R(UnboundRunType)();\n\n  static R Run(BindStateBase* base) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3));\n  }\n};\n\n// Arity 4 -> 4.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4>\nstruct Invoker<0, StorageType, R(X1, X2, X3, X4)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X1>::ForwardType,\n      typename CallbackParamTraits<X2>::ForwardType,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType);\n\n  typedef R(UnboundRunType)(X1, X2, X3, X4);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X1>::ForwardType x1,\n      typename CallbackParamTraits<X2>::ForwardType x2,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename CallbackParamTraits<X1>::ForwardType x1,\n               typename CallbackParamTraits<X2>::ForwardType x2,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4));\n  }\n};\n\n// Arity 4 -> 3.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4>\nstruct Invoker<1, StorageType, R(X1, X2, X3, X4)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X2>::ForwardType,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType);\n\n  typedef R(UnboundRunType)(X2, X3, X4);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X2>::ForwardType x2,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X2>::ForwardType x2,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4));\n  }\n};\n\n// Arity 4 -> 2.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4>\nstruct Invoker<2, StorageType, R(X1, X2, X3, X4)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType);\n\n  typedef R(UnboundRunType)(X3, X4);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4));\n  }\n};\n\n// Arity 4 -> 1.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4>\nstruct Invoker<3, StorageType, R(X1, X2, X3, X4)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X4>::ForwardType);\n\n  typedef R(UnboundRunType)(X4);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X4>::ForwardType x4) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X4>::ForwardType x4)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4));\n  }\n};\n\n// Arity 4 -> 0.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4>\nstruct Invoker<4, StorageType, R(X1, X2, X3, X4)> {\n  typedef R(RunType)(BindStateBase*);\n\n  typedef R(UnboundRunType)();\n\n  static R Run(BindStateBase* base) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n    typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    typename Bound4UnwrapTraits::ForwardType x4 =\n        Bound4UnwrapTraits::Unwrap(storage->p4_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename Bound4UnwrapTraits::ForwardType)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4));\n  }\n};\n\n// Arity 5 -> 5.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5>\nstruct Invoker<0, StorageType, R(X1, X2, X3, X4, X5)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X1>::ForwardType,\n      typename CallbackParamTraits<X2>::ForwardType,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType);\n\n  typedef R(UnboundRunType)(X1, X2, X3, X4, X5);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X1>::ForwardType x1,\n      typename CallbackParamTraits<X2>::ForwardType x2,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename CallbackParamTraits<X1>::ForwardType x1,\n               typename CallbackParamTraits<X2>::ForwardType x2,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5));\n  }\n};\n\n// Arity 5 -> 4.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5>\nstruct Invoker<1, StorageType, R(X1, X2, X3, X4, X5)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X2>::ForwardType,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType);\n\n  typedef R(UnboundRunType)(X2, X3, X4, X5);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X2>::ForwardType x2,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X2>::ForwardType x2,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5));\n  }\n};\n\n// Arity 5 -> 3.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5>\nstruct Invoker<2, StorageType, R(X1, X2, X3, X4, X5)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType);\n\n  typedef R(UnboundRunType)(X3, X4, X5);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5));\n  }\n};\n\n// Arity 5 -> 2.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5>\nstruct Invoker<3, StorageType, R(X1, X2, X3, X4, X5)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType);\n\n  typedef R(UnboundRunType)(X4, X5);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5));\n  }\n};\n\n// Arity 5 -> 1.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5>\nstruct Invoker<4, StorageType, R(X1, X2, X3, X4, X5)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X5>::ForwardType);\n\n  typedef R(UnboundRunType)(X5);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X5>::ForwardType x5) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n    typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    typename Bound4UnwrapTraits::ForwardType x4 =\n        Bound4UnwrapTraits::Unwrap(storage->p4_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename Bound4UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X5>::ForwardType x5)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5));\n  }\n};\n\n// Arity 5 -> 0.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5>\nstruct Invoker<5, StorageType, R(X1, X2, X3, X4, X5)> {\n  typedef R(RunType)(BindStateBase*);\n\n  typedef R(UnboundRunType)();\n\n  static R Run(BindStateBase* base) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n    typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;\n    typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    typename Bound4UnwrapTraits::ForwardType x4 =\n        Bound4UnwrapTraits::Unwrap(storage->p4_);\n    typename Bound5UnwrapTraits::ForwardType x5 =\n        Bound5UnwrapTraits::Unwrap(storage->p5_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename Bound4UnwrapTraits::ForwardType,\n               typename Bound5UnwrapTraits::ForwardType)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5));\n  }\n};\n\n// Arity 6 -> 6.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6>\nstruct Invoker<0, StorageType, R(X1, X2, X3, X4, X5, X6)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X1>::ForwardType,\n      typename CallbackParamTraits<X2>::ForwardType,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType,\n      typename CallbackParamTraits<X6>::ForwardType);\n\n  typedef R(UnboundRunType)(X1, X2, X3, X4, X5, X6);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X1>::ForwardType x1,\n      typename CallbackParamTraits<X2>::ForwardType x2,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5,\n      typename CallbackParamTraits<X6>::ForwardType x6) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename CallbackParamTraits<X1>::ForwardType x1,\n               typename CallbackParamTraits<X2>::ForwardType x2,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5,\n               typename CallbackParamTraits<X6>::ForwardType x6)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6));\n  }\n};\n\n// Arity 6 -> 5.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6>\nstruct Invoker<1, StorageType, R(X1, X2, X3, X4, X5, X6)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X2>::ForwardType,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType,\n      typename CallbackParamTraits<X6>::ForwardType);\n\n  typedef R(UnboundRunType)(X2, X3, X4, X5, X6);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X2>::ForwardType x2,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5,\n      typename CallbackParamTraits<X6>::ForwardType x6) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X2>::ForwardType x2,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5,\n               typename CallbackParamTraits<X6>::ForwardType x6)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6));\n  }\n};\n\n// Arity 6 -> 4.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6>\nstruct Invoker<2, StorageType, R(X1, X2, X3, X4, X5, X6)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType,\n      typename CallbackParamTraits<X6>::ForwardType);\n\n  typedef R(UnboundRunType)(X3, X4, X5, X6);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5,\n      typename CallbackParamTraits<X6>::ForwardType x6) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5,\n               typename CallbackParamTraits<X6>::ForwardType x6)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6));\n  }\n};\n\n// Arity 6 -> 3.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6>\nstruct Invoker<3, StorageType, R(X1, X2, X3, X4, X5, X6)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType,\n      typename CallbackParamTraits<X6>::ForwardType);\n\n  typedef R(UnboundRunType)(X4, X5, X6);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5,\n      typename CallbackParamTraits<X6>::ForwardType x6) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5,\n               typename CallbackParamTraits<X6>::ForwardType x6)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6));\n  }\n};\n\n// Arity 6 -> 2.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6>\nstruct Invoker<4, StorageType, R(X1, X2, X3, X4, X5, X6)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X5>::ForwardType,\n      typename CallbackParamTraits<X6>::ForwardType);\n\n  typedef R(UnboundRunType)(X5, X6);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X5>::ForwardType x5,\n      typename CallbackParamTraits<X6>::ForwardType x6) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n    typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    typename Bound4UnwrapTraits::ForwardType x4 =\n        Bound4UnwrapTraits::Unwrap(storage->p4_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename Bound4UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X5>::ForwardType x5,\n               typename CallbackParamTraits<X6>::ForwardType x6)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6));\n  }\n};\n\n// Arity 6 -> 1.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6>\nstruct Invoker<5, StorageType, R(X1, X2, X3, X4, X5, X6)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X6>::ForwardType);\n\n  typedef R(UnboundRunType)(X6);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X6>::ForwardType x6) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n    typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;\n    typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    typename Bound4UnwrapTraits::ForwardType x4 =\n        Bound4UnwrapTraits::Unwrap(storage->p4_);\n    typename Bound5UnwrapTraits::ForwardType x5 =\n        Bound5UnwrapTraits::Unwrap(storage->p5_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename Bound4UnwrapTraits::ForwardType,\n               typename Bound5UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X6>::ForwardType x6)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6));\n  }\n};\n\n// Arity 6 -> 0.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6>\nstruct Invoker<6, StorageType, R(X1, X2, X3, X4, X5, X6)> {\n  typedef R(RunType)(BindStateBase*);\n\n  typedef R(UnboundRunType)();\n\n  static R Run(BindStateBase* base) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n    typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;\n    typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;\n    typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    typename Bound4UnwrapTraits::ForwardType x4 =\n        Bound4UnwrapTraits::Unwrap(storage->p4_);\n    typename Bound5UnwrapTraits::ForwardType x5 =\n        Bound5UnwrapTraits::Unwrap(storage->p5_);\n    typename Bound6UnwrapTraits::ForwardType x6 =\n        Bound6UnwrapTraits::Unwrap(storage->p6_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename Bound4UnwrapTraits::ForwardType,\n               typename Bound5UnwrapTraits::ForwardType,\n               typename Bound6UnwrapTraits::ForwardType)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6));\n  }\n};\n\n// Arity 7 -> 7.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6, typename X7>\nstruct Invoker<0, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X1>::ForwardType,\n      typename CallbackParamTraits<X2>::ForwardType,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType,\n      typename CallbackParamTraits<X6>::ForwardType,\n      typename CallbackParamTraits<X7>::ForwardType);\n\n  typedef R(UnboundRunType)(X1, X2, X3, X4, X5, X6, X7);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X1>::ForwardType x1,\n      typename CallbackParamTraits<X2>::ForwardType x2,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5,\n      typename CallbackParamTraits<X6>::ForwardType x6,\n      typename CallbackParamTraits<X7>::ForwardType x7) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename CallbackParamTraits<X1>::ForwardType x1,\n               typename CallbackParamTraits<X2>::ForwardType x2,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5,\n               typename CallbackParamTraits<X6>::ForwardType x6,\n               typename CallbackParamTraits<X7>::ForwardType x7)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6), CallbackForward(x7));\n  }\n};\n\n// Arity 7 -> 6.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6, typename X7>\nstruct Invoker<1, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X2>::ForwardType,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType,\n      typename CallbackParamTraits<X6>::ForwardType,\n      typename CallbackParamTraits<X7>::ForwardType);\n\n  typedef R(UnboundRunType)(X2, X3, X4, X5, X6, X7);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X2>::ForwardType x2,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5,\n      typename CallbackParamTraits<X6>::ForwardType x6,\n      typename CallbackParamTraits<X7>::ForwardType x7) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X2>::ForwardType x2,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5,\n               typename CallbackParamTraits<X6>::ForwardType x6,\n               typename CallbackParamTraits<X7>::ForwardType x7)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6), CallbackForward(x7));\n  }\n};\n\n// Arity 7 -> 5.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6, typename X7>\nstruct Invoker<2, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X3>::ForwardType,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType,\n      typename CallbackParamTraits<X6>::ForwardType,\n      typename CallbackParamTraits<X7>::ForwardType);\n\n  typedef R(UnboundRunType)(X3, X4, X5, X6, X7);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X3>::ForwardType x3,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5,\n      typename CallbackParamTraits<X6>::ForwardType x6,\n      typename CallbackParamTraits<X7>::ForwardType x7) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X3>::ForwardType x3,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5,\n               typename CallbackParamTraits<X6>::ForwardType x6,\n               typename CallbackParamTraits<X7>::ForwardType x7)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6), CallbackForward(x7));\n  }\n};\n\n// Arity 7 -> 4.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6, typename X7>\nstruct Invoker<3, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X4>::ForwardType,\n      typename CallbackParamTraits<X5>::ForwardType,\n      typename CallbackParamTraits<X6>::ForwardType,\n      typename CallbackParamTraits<X7>::ForwardType);\n\n  typedef R(UnboundRunType)(X4, X5, X6, X7);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X4>::ForwardType x4,\n      typename CallbackParamTraits<X5>::ForwardType x5,\n      typename CallbackParamTraits<X6>::ForwardType x6,\n      typename CallbackParamTraits<X7>::ForwardType x7) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X4>::ForwardType x4,\n               typename CallbackParamTraits<X5>::ForwardType x5,\n               typename CallbackParamTraits<X6>::ForwardType x6,\n               typename CallbackParamTraits<X7>::ForwardType x7)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6), CallbackForward(x7));\n  }\n};\n\n// Arity 7 -> 3.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6, typename X7>\nstruct Invoker<4, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X5>::ForwardType,\n      typename CallbackParamTraits<X6>::ForwardType,\n      typename CallbackParamTraits<X7>::ForwardType);\n\n  typedef R(UnboundRunType)(X5, X6, X7);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X5>::ForwardType x5,\n      typename CallbackParamTraits<X6>::ForwardType x6,\n      typename CallbackParamTraits<X7>::ForwardType x7) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n    typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    typename Bound4UnwrapTraits::ForwardType x4 =\n        Bound4UnwrapTraits::Unwrap(storage->p4_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename Bound4UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X5>::ForwardType x5,\n               typename CallbackParamTraits<X6>::ForwardType x6,\n               typename CallbackParamTraits<X7>::ForwardType x7)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6), CallbackForward(x7));\n  }\n};\n\n// Arity 7 -> 2.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6, typename X7>\nstruct Invoker<5, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X6>::ForwardType,\n      typename CallbackParamTraits<X7>::ForwardType);\n\n  typedef R(UnboundRunType)(X6, X7);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X6>::ForwardType x6,\n      typename CallbackParamTraits<X7>::ForwardType x7) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n    typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;\n    typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    typename Bound4UnwrapTraits::ForwardType x4 =\n        Bound4UnwrapTraits::Unwrap(storage->p4_);\n    typename Bound5UnwrapTraits::ForwardType x5 =\n        Bound5UnwrapTraits::Unwrap(storage->p5_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename Bound4UnwrapTraits::ForwardType,\n               typename Bound5UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X6>::ForwardType x6,\n               typename CallbackParamTraits<X7>::ForwardType x7)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6), CallbackForward(x7));\n  }\n};\n\n// Arity 7 -> 1.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6, typename X7>\nstruct Invoker<6, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {\n  typedef R(RunType)(BindStateBase*,\n      typename CallbackParamTraits<X7>::ForwardType);\n\n  typedef R(UnboundRunType)(X7);\n\n  static R Run(BindStateBase* base,\n      typename CallbackParamTraits<X7>::ForwardType x7) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n    typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;\n    typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;\n    typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    typename Bound4UnwrapTraits::ForwardType x4 =\n        Bound4UnwrapTraits::Unwrap(storage->p4_);\n    typename Bound5UnwrapTraits::ForwardType x5 =\n        Bound5UnwrapTraits::Unwrap(storage->p5_);\n    typename Bound6UnwrapTraits::ForwardType x6 =\n        Bound6UnwrapTraits::Unwrap(storage->p6_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename Bound4UnwrapTraits::ForwardType,\n               typename Bound5UnwrapTraits::ForwardType,\n               typename Bound6UnwrapTraits::ForwardType,\n               typename CallbackParamTraits<X7>::ForwardType x7)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6), CallbackForward(x7));\n  }\n};\n\n// Arity 7 -> 0.\ntemplate <typename StorageType, typename R,typename X1, typename X2,\n    typename X3, typename X4, typename X5, typename X6, typename X7>\nstruct Invoker<7, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {\n  typedef R(RunType)(BindStateBase*);\n\n  typedef R(UnboundRunType)();\n\n  static R Run(BindStateBase* base) {\n    StorageType* storage = static_cast<StorageType*>(base);\n\n    // Local references to make debugger stepping easier. If in a debugger,\n    // you really want to warp ahead and step through the\n    // InvokeHelper<>::MakeItSo() call below.\n    typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;\n    typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;\n    typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;\n    typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;\n    typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;\n    typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits;\n    typedef typename StorageType::Bound7UnwrapTraits Bound7UnwrapTraits;\n\n    typename Bound1UnwrapTraits::ForwardType x1 =\n        Bound1UnwrapTraits::Unwrap(storage->p1_);\n    typename Bound2UnwrapTraits::ForwardType x2 =\n        Bound2UnwrapTraits::Unwrap(storage->p2_);\n    typename Bound3UnwrapTraits::ForwardType x3 =\n        Bound3UnwrapTraits::Unwrap(storage->p3_);\n    typename Bound4UnwrapTraits::ForwardType x4 =\n        Bound4UnwrapTraits::Unwrap(storage->p4_);\n    typename Bound5UnwrapTraits::ForwardType x5 =\n        Bound5UnwrapTraits::Unwrap(storage->p5_);\n    typename Bound6UnwrapTraits::ForwardType x6 =\n        Bound6UnwrapTraits::Unwrap(storage->p6_);\n    typename Bound7UnwrapTraits::ForwardType x7 =\n        Bound7UnwrapTraits::Unwrap(storage->p7_);\n    return InvokeHelper<StorageType::IsWeakCall::value, R,\n           typename StorageType::RunnableType,\n           void(typename Bound1UnwrapTraits::ForwardType,\n               typename Bound2UnwrapTraits::ForwardType,\n               typename Bound3UnwrapTraits::ForwardType,\n               typename Bound4UnwrapTraits::ForwardType,\n               typename Bound5UnwrapTraits::ForwardType,\n               typename Bound6UnwrapTraits::ForwardType,\n               typename Bound7UnwrapTraits::ForwardType)>\n               ::MakeItSo(storage->runnable_, CallbackForward(x1),\n                   CallbackForward(x2), CallbackForward(x3),\n                   CallbackForward(x4), CallbackForward(x5),\n                   CallbackForward(x6), CallbackForward(x7));\n  }\n};\n\n\n// BindState<>\n//\n// This stores all the state passed into Bind() and is also where most\n// of the template resolution magic occurs.\n//\n// Runnable is the functor we are binding arguments to.\n// RunType is type of the Run() function that the Invoker<> should use.\n// Normally, this is the same as the RunType of the Runnable, but it can\n// be different if an adapter like IgnoreResult() has been used.\n//\n// BoundArgsType contains the storage type for all the bound arguments by\n// (ab)using a function type.\ntemplate <typename Runnable, typename RunType, typename BoundArgsType>\nstruct BindState;\n\ntemplate <typename Runnable, typename RunType>\nstruct BindState<Runnable, RunType, void()> : public BindStateBase {\n  typedef Runnable RunnableType;\n  typedef false_type IsWeakCall;\n  typedef Invoker<0, BindState, RunType> InvokerType;\n  typedef typename InvokerType::UnboundRunType UnboundRunType;\n  explicit BindState(const Runnable& runnable)\n      : BindStateBase(&Destroy),\n        runnable_(runnable) {\n  }\n\n  ~BindState() {  }\n\n  static void Destroy(BindStateBase* self) {\n    delete static_cast<BindState*>(self);\n  }\n\n  RunnableType runnable_;\n};\n\ntemplate <typename Runnable, typename RunType, typename P1>\nstruct BindState<Runnable, RunType, void(P1)> : public BindStateBase {\n  typedef Runnable RunnableType;\n  typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;\n  typedef Invoker<1, BindState, RunType> InvokerType;\n  typedef typename InvokerType::UnboundRunType UnboundRunType;\n\n  // Convenience typedefs for bound argument types.\n  typedef UnwrapTraits<P1> Bound1UnwrapTraits;\n\n  BindState(const Runnable& runnable, const P1& p1)\n      : BindStateBase(&Destroy),\n        runnable_(runnable),\n        p1_(p1) {\n    MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);\n  }\n\n  ~BindState() {    MaybeRefcount<HasIsMethodTag<Runnable>::value,\n      P1>::Release(p1_);  }\n\n  static void Destroy(BindStateBase* self) {\n    delete static_cast<BindState*>(self);\n  }\n\n  RunnableType runnable_;\n  P1 p1_;\n};\n\ntemplate <typename Runnable, typename RunType, typename P1, typename P2>\nstruct BindState<Runnable, RunType, void(P1, P2)> : public BindStateBase {\n  typedef Runnable RunnableType;\n  typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;\n  typedef Invoker<2, BindState, RunType> InvokerType;\n  typedef typename InvokerType::UnboundRunType UnboundRunType;\n\n  // Convenience typedefs for bound argument types.\n  typedef UnwrapTraits<P1> Bound1UnwrapTraits;\n  typedef UnwrapTraits<P2> Bound2UnwrapTraits;\n\n  BindState(const Runnable& runnable, const P1& p1, const P2& p2)\n      : BindStateBase(&Destroy),\n        runnable_(runnable),\n        p1_(p1),\n        p2_(p2) {\n    MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);\n  }\n\n  ~BindState() {    MaybeRefcount<HasIsMethodTag<Runnable>::value,\n      P1>::Release(p1_);  }\n\n  static void Destroy(BindStateBase* self) {\n    delete static_cast<BindState*>(self);\n  }\n\n  RunnableType runnable_;\n  P1 p1_;\n  P2 p2_;\n};\n\ntemplate <typename Runnable, typename RunType, typename P1, typename P2,\n    typename P3>\nstruct BindState<Runnable, RunType, void(P1, P2, P3)>\n    : public BindStateBase {\n  typedef Runnable RunnableType;\n  typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;\n  typedef Invoker<3, BindState, RunType> InvokerType;\n  typedef typename InvokerType::UnboundRunType UnboundRunType;\n\n  // Convenience typedefs for bound argument types.\n  typedef UnwrapTraits<P1> Bound1UnwrapTraits;\n  typedef UnwrapTraits<P2> Bound2UnwrapTraits;\n  typedef UnwrapTraits<P3> Bound3UnwrapTraits;\n\n  BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3)\n      : BindStateBase(&Destroy),\n        runnable_(runnable),\n        p1_(p1),\n        p2_(p2),\n        p3_(p3) {\n    MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);\n  }\n\n  ~BindState() {    MaybeRefcount<HasIsMethodTag<Runnable>::value,\n      P1>::Release(p1_);  }\n\n  static void Destroy(BindStateBase* self) {\n    delete static_cast<BindState*>(self);\n  }\n\n  RunnableType runnable_;\n  P1 p1_;\n  P2 p2_;\n  P3 p3_;\n};\n\ntemplate <typename Runnable, typename RunType, typename P1, typename P2,\n    typename P3, typename P4>\nstruct BindState<Runnable, RunType, void(P1, P2, P3, P4)>\n    : public BindStateBase {\n  typedef Runnable RunnableType;\n  typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;\n  typedef Invoker<4, BindState, RunType> InvokerType;\n  typedef typename InvokerType::UnboundRunType UnboundRunType;\n\n  // Convenience typedefs for bound argument types.\n  typedef UnwrapTraits<P1> Bound1UnwrapTraits;\n  typedef UnwrapTraits<P2> Bound2UnwrapTraits;\n  typedef UnwrapTraits<P3> Bound3UnwrapTraits;\n  typedef UnwrapTraits<P4> Bound4UnwrapTraits;\n\n  BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,\n      const P4& p4)\n      : BindStateBase(&Destroy),\n        runnable_(runnable),\n        p1_(p1),\n        p2_(p2),\n        p3_(p3),\n        p4_(p4) {\n    MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);\n  }\n\n  ~BindState() {    MaybeRefcount<HasIsMethodTag<Runnable>::value,\n      P1>::Release(p1_);  }\n\n  static void Destroy(BindStateBase* self) {\n    delete static_cast<BindState*>(self);\n  }\n\n  RunnableType runnable_;\n  P1 p1_;\n  P2 p2_;\n  P3 p3_;\n  P4 p4_;\n};\n\ntemplate <typename Runnable, typename RunType, typename P1, typename P2,\n    typename P3, typename P4, typename P5>\nstruct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5)>\n    : public BindStateBase {\n  typedef Runnable RunnableType;\n  typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;\n  typedef Invoker<5, BindState, RunType> InvokerType;\n  typedef typename InvokerType::UnboundRunType UnboundRunType;\n\n  // Convenience typedefs for bound argument types.\n  typedef UnwrapTraits<P1> Bound1UnwrapTraits;\n  typedef UnwrapTraits<P2> Bound2UnwrapTraits;\n  typedef UnwrapTraits<P3> Bound3UnwrapTraits;\n  typedef UnwrapTraits<P4> Bound4UnwrapTraits;\n  typedef UnwrapTraits<P5> Bound5UnwrapTraits;\n\n  BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,\n      const P4& p4, const P5& p5)\n      : BindStateBase(&Destroy),\n        runnable_(runnable),\n        p1_(p1),\n        p2_(p2),\n        p3_(p3),\n        p4_(p4),\n        p5_(p5) {\n    MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);\n  }\n\n  ~BindState() {    MaybeRefcount<HasIsMethodTag<Runnable>::value,\n      P1>::Release(p1_);  }\n\n  static void Destroy(BindStateBase* self) {\n    delete static_cast<BindState*>(self);\n  }\n\n  RunnableType runnable_;\n  P1 p1_;\n  P2 p2_;\n  P3 p3_;\n  P4 p4_;\n  P5 p5_;\n};\n\ntemplate <typename Runnable, typename RunType, typename P1, typename P2,\n    typename P3, typename P4, typename P5, typename P6>\nstruct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6)>\n    : public BindStateBase {\n  typedef Runnable RunnableType;\n  typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;\n  typedef Invoker<6, BindState, RunType> InvokerType;\n  typedef typename InvokerType::UnboundRunType UnboundRunType;\n\n  // Convenience typedefs for bound argument types.\n  typedef UnwrapTraits<P1> Bound1UnwrapTraits;\n  typedef UnwrapTraits<P2> Bound2UnwrapTraits;\n  typedef UnwrapTraits<P3> Bound3UnwrapTraits;\n  typedef UnwrapTraits<P4> Bound4UnwrapTraits;\n  typedef UnwrapTraits<P5> Bound5UnwrapTraits;\n  typedef UnwrapTraits<P6> Bound6UnwrapTraits;\n\n  BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,\n      const P4& p4, const P5& p5, const P6& p6)\n      : BindStateBase(&Destroy),\n        runnable_(runnable),\n        p1_(p1),\n        p2_(p2),\n        p3_(p3),\n        p4_(p4),\n        p5_(p5),\n        p6_(p6) {\n    MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);\n  }\n\n  ~BindState() {    MaybeRefcount<HasIsMethodTag<Runnable>::value,\n      P1>::Release(p1_);  }\n\n  static void Destroy(BindStateBase* self) {\n    delete static_cast<BindState*>(self);\n  }\n\n  RunnableType runnable_;\n  P1 p1_;\n  P2 p2_;\n  P3 p3_;\n  P4 p4_;\n  P5 p5_;\n  P6 p6_;\n};\n\ntemplate <typename Runnable, typename RunType, typename P1, typename P2,\n    typename P3, typename P4, typename P5, typename P6, typename P7>\nstruct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6, P7)>\n    : public BindStateBase {\n  typedef Runnable RunnableType;\n  typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;\n  typedef Invoker<7, BindState, RunType> InvokerType;\n  typedef typename InvokerType::UnboundRunType UnboundRunType;\n\n  // Convenience typedefs for bound argument types.\n  typedef UnwrapTraits<P1> Bound1UnwrapTraits;\n  typedef UnwrapTraits<P2> Bound2UnwrapTraits;\n  typedef UnwrapTraits<P3> Bound3UnwrapTraits;\n  typedef UnwrapTraits<P4> Bound4UnwrapTraits;\n  typedef UnwrapTraits<P5> Bound5UnwrapTraits;\n  typedef UnwrapTraits<P6> Bound6UnwrapTraits;\n  typedef UnwrapTraits<P7> Bound7UnwrapTraits;\n\n  BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,\n      const P4& p4, const P5& p5, const P6& p6, const P7& p7)\n      : BindStateBase(&Destroy),\n        runnable_(runnable),\n        p1_(p1),\n        p2_(p2),\n        p3_(p3),\n        p4_(p4),\n        p5_(p5),\n        p6_(p6),\n        p7_(p7) {\n    MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);\n  }\n\n  ~BindState() {    MaybeRefcount<HasIsMethodTag<Runnable>::value,\n      P1>::Release(p1_);  }\n\n  static void Destroy(BindStateBase* self) {\n    delete static_cast<BindState*>(self);\n  }\n\n  RunnableType runnable_;\n  P1 p1_;\n  P2 p2_;\n  P3 p3_;\n  P4 p4_;\n  P5 p5_;\n  P6 p6_;\n  P7 p7_;\n};\n\n}  // namespace cef_internal\n}  // namespace base\n\n#endif  // CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_H_\n"
  },
  {
    "path": "CEF/include/base/internal/cef_bind_internal_win.h",
    "content": "// Copyright (c) 2011 Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Do not include this header file directly. Use base/cef_bind.h instead.\n\n// Specializations of RunnableAdapter<> for Windows specific calling\n// conventions.  Please see base/bind_internal.h for more info.\n\n#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_WIN_H_\n#define CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_WIN_H_\n\n// In the x64 architecture in Windows, __fastcall, __stdcall, etc, are all\n// the same as __cdecl which would turn the following specializations into\n// multiple definitions.\n#if !defined(ARCH_CPU_X86_64)\n\nnamespace base {\nnamespace cef_internal {\n\ntemplate <typename Functor>\nclass RunnableAdapter;\n\n// __stdcall Function: Arity 0.\ntemplate <typename R>\nclass RunnableAdapter<R(__stdcall *)()> {\n public:\n  typedef R (RunType)();\n\n  explicit RunnableAdapter(R(__stdcall *function)())\n      : function_(function) {\n  }\n\n  R Run() {\n    return function_();\n  }\n\n private:\n  R (__stdcall *function_)();\n};\n\n// __fastcall Function: Arity 0.\ntemplate <typename R>\nclass RunnableAdapter<R(__fastcall *)()> {\n public:\n  typedef R (RunType)();\n\n  explicit RunnableAdapter(R(__fastcall *function)())\n      : function_(function) {\n  }\n\n  R Run() {\n    return function_();\n  }\n\n private:\n  R (__fastcall *function_)();\n};\n\n// __stdcall Function: Arity 1.\ntemplate <typename R, typename A1>\nclass RunnableAdapter<R(__stdcall *)(A1)> {\n public:\n  typedef R (RunType)(A1);\n\n  explicit RunnableAdapter(R(__stdcall *function)(A1))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1) {\n    return function_(a1);\n  }\n\n private:\n  R (__stdcall *function_)(A1);\n};\n\n// __fastcall Function: Arity 1.\ntemplate <typename R, typename A1>\nclass RunnableAdapter<R(__fastcall *)(A1)> {\n public:\n  typedef R (RunType)(A1);\n\n  explicit RunnableAdapter(R(__fastcall *function)(A1))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1) {\n    return function_(a1);\n  }\n\n private:\n  R (__fastcall *function_)(A1);\n};\n\n// __stdcall Function: Arity 2.\ntemplate <typename R, typename A1, typename A2>\nclass RunnableAdapter<R(__stdcall *)(A1, A2)> {\n public:\n  typedef R (RunType)(A1, A2);\n\n  explicit RunnableAdapter(R(__stdcall *function)(A1, A2))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2) {\n    return function_(a1, a2);\n  }\n\n private:\n  R (__stdcall *function_)(A1, A2);\n};\n\n// __fastcall Function: Arity 2.\ntemplate <typename R, typename A1, typename A2>\nclass RunnableAdapter<R(__fastcall *)(A1, A2)> {\n public:\n  typedef R (RunType)(A1, A2);\n\n  explicit RunnableAdapter(R(__fastcall *function)(A1, A2))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2) {\n    return function_(a1, a2);\n  }\n\n private:\n  R (__fastcall *function_)(A1, A2);\n};\n\n// __stdcall Function: Arity 3.\ntemplate <typename R, typename A1, typename A2, typename A3>\nclass RunnableAdapter<R(__stdcall *)(A1, A2, A3)> {\n public:\n  typedef R (RunType)(A1, A2, A3);\n\n  explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3) {\n    return function_(a1, a2, a3);\n  }\n\n private:\n  R (__stdcall *function_)(A1, A2, A3);\n};\n\n// __fastcall Function: Arity 3.\ntemplate <typename R, typename A1, typename A2, typename A3>\nclass RunnableAdapter<R(__fastcall *)(A1, A2, A3)> {\n public:\n  typedef R (RunType)(A1, A2, A3);\n\n  explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3) {\n    return function_(a1, a2, a3);\n  }\n\n private:\n  R (__fastcall *function_)(A1, A2, A3);\n};\n\n// __stdcall Function: Arity 4.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4>\nclass RunnableAdapter<R(__stdcall *)(A1, A2, A3, A4)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4);\n\n  explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4) {\n    return function_(a1, a2, a3, a4);\n  }\n\n private:\n  R (__stdcall *function_)(A1, A2, A3, A4);\n};\n\n// __fastcall Function: Arity 4.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4>\nclass RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4);\n\n  explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4) {\n    return function_(a1, a2, a3, a4);\n  }\n\n private:\n  R (__fastcall *function_)(A1, A2, A3, A4);\n};\n\n// __stdcall Function: Arity 5.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5>\nclass RunnableAdapter<R(__stdcall *)(A1, A2, A3, A4, A5)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4, A5);\n\n  explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4, A5))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5) {\n    return function_(a1, a2, a3, a4, a5);\n  }\n\n private:\n  R (__stdcall *function_)(A1, A2, A3, A4, A5);\n};\n\n// __fastcall Function: Arity 5.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5>\nclass RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4, A5)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4, A5);\n\n  explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4, A5))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5) {\n    return function_(a1, a2, a3, a4, a5);\n  }\n\n private:\n  R (__fastcall *function_)(A1, A2, A3, A4, A5);\n};\n\n// __stdcall Function: Arity 6.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6>\nclass RunnableAdapter<R(__stdcall *)(A1, A2, A3, A4, A5, A6)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4, A5, A6);\n\n  explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4, A5, A6))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5,\n      typename CallbackParamTraits<A6>::ForwardType a6) {\n    return function_(a1, a2, a3, a4, a5, a6);\n  }\n\n private:\n  R (__stdcall *function_)(A1, A2, A3, A4, A5, A6);\n};\n\n// __fastcall Function: Arity 6.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6>\nclass RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4, A5, A6)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4, A5, A6);\n\n  explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4, A5, A6))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5,\n      typename CallbackParamTraits<A6>::ForwardType a6) {\n    return function_(a1, a2, a3, a4, a5, a6);\n  }\n\n private:\n  R (__fastcall *function_)(A1, A2, A3, A4, A5, A6);\n};\n\n// __stdcall Function: Arity 7.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6, typename A7>\nclass RunnableAdapter<R(__stdcall *)(A1, A2, A3, A4, A5, A6, A7)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7);\n\n  explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4, A5, A6, A7))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5,\n      typename CallbackParamTraits<A6>::ForwardType a6,\n      typename CallbackParamTraits<A7>::ForwardType a7) {\n    return function_(a1, a2, a3, a4, a5, a6, a7);\n  }\n\n private:\n  R (__stdcall *function_)(A1, A2, A3, A4, A5, A6, A7);\n};\n\n// __fastcall Function: Arity 7.\ntemplate <typename R, typename A1, typename A2, typename A3, typename A4,\n    typename A5, typename A6, typename A7>\nclass RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4, A5, A6, A7)> {\n public:\n  typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7);\n\n  explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4, A5, A6, A7))\n      : function_(function) {\n  }\n\n  R Run(typename CallbackParamTraits<A1>::ForwardType a1,\n      typename CallbackParamTraits<A2>::ForwardType a2,\n      typename CallbackParamTraits<A3>::ForwardType a3,\n      typename CallbackParamTraits<A4>::ForwardType a4,\n      typename CallbackParamTraits<A5>::ForwardType a5,\n      typename CallbackParamTraits<A6>::ForwardType a6,\n      typename CallbackParamTraits<A7>::ForwardType a7) {\n    return function_(a1, a2, a3, a4, a5, a6, a7);\n  }\n\n private:\n  R (__fastcall *function_)(A1, A2, A3, A4, A5, A6, A7);\n};\n\n}  // namespace cef_internal\n}  // namespace base\n\n#endif  // !defined(ARCH_CPU_X86_64)\n\n#endif  // CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_WIN_H_\n"
  },
  {
    "path": "CEF/include/base/internal/cef_callback_internal.h",
    "content": "// Copyright (c) 2012 Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Do not include this header file directly. Use base/cef_bind.h or\n// base/cef_callback.h instead.\n\n// This file contains utility functions and classes that help the\n// implementation, and management of the Callback objects.\n\n#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_\n#define CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_\n\n#include <stddef.h>\n\n#include \"include/base/cef_atomic_ref_count.h\"\n#include \"include/base/cef_macros.h\"\n#include \"include/base/cef_ref_counted.h\"\n#include \"include/base/cef_scoped_ptr.h\"\n#include \"include/base/cef_template_util.h\"\n\ntemplate <typename T>\nclass ScopedVector;\n\nnamespace base {\nnamespace cef_internal {\nclass CallbackBase;\n\n// At the base level, the only task is to add reference counting data. Don't use\n// RefCountedThreadSafe since it requires the destructor to be a virtual method.\n// Creating a vtable for every BindState template instantiation results in a lot\n// of bloat. Its only task is to call the destructor which can be done with a\n// function pointer.\nclass BindStateBase {\n protected:\n  explicit BindStateBase(void (*destructor)(BindStateBase*))\n      : ref_count_(0), destructor_(destructor) {}\n  ~BindStateBase() {}\n\n private:\n  friend class scoped_refptr<BindStateBase>;\n  friend class CallbackBase;\n\n  void AddRef();\n  void Release();\n\n  AtomicRefCount ref_count_;\n\n  // Pointer to a function that will properly destroy |this|.\n  void (*destructor_)(BindStateBase*);\n\n  DISALLOW_COPY_AND_ASSIGN(BindStateBase);\n};\n\n// Holds the Callback methods that don't require specialization to reduce\n// template bloat.\nclass CallbackBase {\n public:\n  // Returns true if Callback is null (doesn't refer to anything).\n  bool is_null() const { return bind_state_.get() == NULL; }\n\n  // Returns the Callback into an uninitialized state.\n  void Reset();\n\n protected:\n  // In C++, it is safe to cast function pointers to function pointers of\n  // another type. It is not okay to use void*. We create a InvokeFuncStorage\n  // that that can store our function pointer, and then cast it back to\n  // the original type on usage.\n  typedef void(*InvokeFuncStorage)(void);\n\n  // Returns true if this callback equals |other|. |other| may be null.\n  bool Equals(const CallbackBase& other) const;\n\n  // Allow initializing of |bind_state_| via the constructor to avoid default\n  // initialization of the scoped_refptr.  We do not also initialize\n  // |polymorphic_invoke_| here because doing a normal assignment in the\n  // derived Callback templates makes for much nicer compiler errors.\n  explicit CallbackBase(BindStateBase* bind_state);\n\n  // Force the destructor to be instantiated inside this translation unit so\n  // that our subclasses will not get inlined versions.  Avoids more template\n  // bloat.\n  ~CallbackBase();\n\n  scoped_refptr<BindStateBase> bind_state_;\n  InvokeFuncStorage polymorphic_invoke_;\n};\n\n// A helper template to determine if given type is non-const move-only-type,\n// i.e. if a value of the given type should be passed via .Pass() in a\n// destructive way.\ntemplate <typename T> struct IsMoveOnlyType {\n  template <typename U>\n  static YesType Test(const typename U::MoveOnlyTypeForCPP03*);\n\n  template <typename U>\n  static NoType Test(...);\n\n  static const bool value = sizeof(Test<T>(0)) == sizeof(YesType) &&\n                            !is_const<T>::value;\n};\n\n// This is a typetraits object that's used to take an argument type, and\n// extract a suitable type for storing and forwarding arguments.\n//\n// In particular, it strips off references, and converts arrays to\n// pointers for storage; and it avoids accidentally trying to create a\n// \"reference of a reference\" if the argument is a reference type.\n//\n// This array type becomes an issue for storage because we are passing bound\n// parameters by const reference. In this case, we end up passing an actual\n// array type in the initializer list which C++ does not allow.  This will\n// break passing of C-string literals.\ntemplate <typename T, bool is_move_only = IsMoveOnlyType<T>::value>\nstruct CallbackParamTraits {\n  typedef const T& ForwardType;\n  typedef T StorageType;\n};\n\n// The Storage should almost be impossible to trigger unless someone manually\n// specifies type of the bind parameters.  However, in case they do,\n// this will guard against us accidentally storing a reference parameter.\n//\n// The ForwardType should only be used for unbound arguments.\ntemplate <typename T>\nstruct CallbackParamTraits<T&, false> {\n  typedef T& ForwardType;\n  typedef T StorageType;\n};\n\n// Note that for array types, we implicitly add a const in the conversion. This\n// means that it is not possible to bind array arguments to functions that take\n// a non-const pointer. Trying to specialize the template based on a \"const\n// T[n]\" does not seem to match correctly, so we are stuck with this\n// restriction.\ntemplate <typename T, size_t n>\nstruct CallbackParamTraits<T[n], false> {\n  typedef const T* ForwardType;\n  typedef const T* StorageType;\n};\n\n// See comment for CallbackParamTraits<T[n]>.\ntemplate <typename T>\nstruct CallbackParamTraits<T[], false> {\n  typedef const T* ForwardType;\n  typedef const T* StorageType;\n};\n\n// Parameter traits for movable-but-not-copyable scopers.\n//\n// Callback<>/Bind() understands movable-but-not-copyable semantics where\n// the type cannot be copied but can still have its state destructively\n// transferred (aka. moved) to another instance of the same type by calling a\n// helper function.  When used with Bind(), this signifies transferal of the\n// object's state to the target function.\n//\n// For these types, the ForwardType must not be a const reference, or a\n// reference.  A const reference is inappropriate, and would break const\n// correctness, because we are implementing a destructive move.  A non-const\n// reference cannot be used with temporaries which means the result of a\n// function or a cast would not be usable with Callback<> or Bind().\ntemplate <typename T>\nstruct CallbackParamTraits<T, true> {\n  typedef T ForwardType;\n  typedef T StorageType;\n};\n\n// CallbackForward() is a very limited simulation of C++11's std::forward()\n// used by the Callback/Bind system for a set of movable-but-not-copyable\n// types.  It is needed because forwarding a movable-but-not-copyable\n// argument to another function requires us to invoke the proper move\n// operator to create a rvalue version of the type.  The supported types are\n// whitelisted below as overloads of the CallbackForward() function. The\n// default template compiles out to be a no-op.\n//\n// In C++11, std::forward would replace all uses of this function.  However, it\n// is impossible to implement a general std::forward with C++11 due to a lack\n// of rvalue references.\n//\n// In addition to Callback/Bind, this is used by PostTaskAndReplyWithResult to\n// simulate std::forward() and forward the result of one Callback as a\n// parameter to another callback. This is to support Callbacks that return\n// the movable-but-not-copyable types whitelisted above.\ntemplate <typename T>\ntypename enable_if<!IsMoveOnlyType<T>::value, T>::type& CallbackForward(T& t) {\n  return t;\n}\n\ntemplate <typename T>\ntypename enable_if<IsMoveOnlyType<T>::value, T>::type CallbackForward(T& t) {\n  return t.Pass();\n}\n\n}  // namespace cef_internal\n}  // namespace base\n\n#endif  // CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_\n"
  },
  {
    "path": "CEF/include/base/internal/cef_lock_impl.h",
    "content": "// Copyright (c) 2011 Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Do not include this header file directly. Use base/cef_lock.h instead.\n\n#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_\n#define CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_\n\n#include \"include/base/cef_build.h\"\n\n#if defined(OS_WIN)\n#include <windows.h>\n#elif defined(OS_POSIX)\n#include <pthread.h>\n#endif\n\n#include \"include/base/cef_macros.h\"\n\nnamespace base {\nnamespace cef_internal {\n\n// This class implements the underlying platform-specific spin-lock mechanism\n// used for the Lock class.  Most users should not use LockImpl directly, but\n// should instead use Lock.\nclass LockImpl {\n public:\n#if defined(OS_WIN)\n  typedef CRITICAL_SECTION NativeHandle;\n#elif defined(OS_POSIX)\n  typedef pthread_mutex_t NativeHandle;\n#endif\n\n  LockImpl();\n  ~LockImpl();\n\n  // If the lock is not held, take it and return true.  If the lock is already\n  // held by something else, immediately return false.\n  bool Try();\n\n  // Take the lock, blocking until it is available if necessary.\n  void Lock();\n\n  // Release the lock.  This must only be called by the lock's holder: after\n  // a successful call to Try, or a call to Lock.\n  void Unlock();\n\n  // Return the native underlying lock.\n  // TODO(awalker): refactor lock and condition variables so that this is\n  // unnecessary.\n  NativeHandle* native_handle() { return &native_handle_; }\n\n private:\n  NativeHandle native_handle_;\n\n  DISALLOW_COPY_AND_ASSIGN(LockImpl);\n};\n\n}  // namespace cef_internal\n}  // namespace base\n\n#endif  // CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_\n"
  },
  {
    "path": "CEF/include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h",
    "content": "// Copyright (c) 2011 Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Do not include this header file directly. Use base/cef_callback.h instead.\n\n#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_\n#define CEF_INCLUDE_BASE_INTERNAL_CEF_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_\n\n#include \"include/base/cef_build.h\"\n#include \"include/base/cef_ref_counted.h\"\n#include \"include/base/cef_template_util.h\"\n#include \"include/base/cef_tuple.h\"\n\n// It is dangerous to post a task with a T* argument where T is a subtype of\n// RefCounted(Base|ThreadSafeBase), since by the time the parameter is used, the\n// object may already have been deleted since it was not held with a\n// scoped_refptr. Example: http://crbug.com/27191\n// The following set of traits are designed to generate a compile error\n// whenever this antipattern is attempted.\n\nnamespace base {\n\nnamespace cef_internal {\n\ntemplate <typename T>\nstruct NeedsScopedRefptrButGetsRawPtr {\n#if defined(OS_WIN)\n  enum {\n    value = base::false_type::value\n  };\n#else\n  enum {\n    // Human readable translation: you needed to be a scoped_refptr if you are a\n    // raw pointer type and are convertible to a RefCounted(Base|ThreadSafeBase)\n    // type.\n    value = (is_pointer<T>::value &&\n             (is_convertible<T, subtle::RefCountedBase*>::value ||\n              is_convertible<T, subtle::RefCountedThreadSafeBase*>::value))\n  };\n#endif\n};\n\ntemplate <typename Params>\nstruct ParamsUseScopedRefptrCorrectly {\n  enum { value = 0 };\n};\n\ntemplate <>\nstruct ParamsUseScopedRefptrCorrectly<Tuple0> {\n  enum { value = 1 };\n};\n\ntemplate <typename A>\nstruct ParamsUseScopedRefptrCorrectly<Tuple1<A> > {\n  enum { value = !NeedsScopedRefptrButGetsRawPtr<A>::value };\n};\n\ntemplate <typename A, typename B>\nstruct ParamsUseScopedRefptrCorrectly<Tuple2<A, B> > {\n  enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<B>::value) };\n};\n\ntemplate <typename A, typename B, typename C>\nstruct ParamsUseScopedRefptrCorrectly<Tuple3<A, B, C> > {\n  enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<B>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<C>::value) };\n};\n\ntemplate <typename A, typename B, typename C, typename D>\nstruct ParamsUseScopedRefptrCorrectly<Tuple4<A, B, C, D> > {\n  enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<B>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<C>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<D>::value) };\n};\n\ntemplate <typename A, typename B, typename C, typename D, typename E>\nstruct ParamsUseScopedRefptrCorrectly<Tuple5<A, B, C, D, E> > {\n  enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<B>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<C>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<D>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<E>::value) };\n};\n\ntemplate <typename A, typename B, typename C, typename D, typename E,\n          typename F>\nstruct ParamsUseScopedRefptrCorrectly<Tuple6<A, B, C, D, E, F> > {\n  enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<B>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<C>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<D>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<E>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<F>::value) };\n};\n\ntemplate <typename A, typename B, typename C, typename D, typename E,\n          typename F, typename G>\nstruct ParamsUseScopedRefptrCorrectly<Tuple7<A, B, C, D, E, F, G> > {\n  enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<B>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<C>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<D>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<E>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<F>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<G>::value) };\n};\n\ntemplate <typename A, typename B, typename C, typename D, typename E,\n          typename F, typename G, typename H>\nstruct ParamsUseScopedRefptrCorrectly<Tuple8<A, B, C, D, E, F, G, H> > {\n  enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<B>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<C>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<D>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<E>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<F>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<G>::value ||\n                   NeedsScopedRefptrButGetsRawPtr<H>::value) };\n};\n\n}  // namespace cef_internal\n\n}  // namespace base\n\n#endif  // CEF_INCLUDE_BASE_INTERNAL_CEF_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_\n"
  },
  {
    "path": "CEF/include/base/internal/cef_thread_checker_impl.h",
    "content": "// Copyright (c) 2011 Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Do not include this header file directly. Use base/cef_thread_checker.h\n// instead.\n\n#ifndef CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_\n#define CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_\n\n#include \"include/base/cef_lock.h\"\n#include \"include/base/cef_platform_thread.h\"\n\nnamespace base {\nnamespace cef_internal {\n\n// Real implementation of ThreadChecker, for use in debug mode, or\n// for temporary use in release mode (e.g. to CHECK on a threading issue\n// seen only in the wild).\n//\n// Note: You should almost always use the ThreadChecker class to get the\n// right version for your build configuration.\nclass ThreadCheckerImpl {\n public:\n  ThreadCheckerImpl();\n  ~ThreadCheckerImpl();\n\n  bool CalledOnValidThread() const;\n\n  // Changes the thread that is checked for in CalledOnValidThread.  This may\n  // be useful when an object may be created on one thread and then used\n  // exclusively on another thread.\n  void DetachFromThread();\n\n private:\n  void EnsureThreadIdAssigned() const;\n\n  mutable base::Lock lock_;\n  // This is mutable so that CalledOnValidThread can set it.\n  // It's guarded by |lock_|.\n  mutable PlatformThreadRef valid_thread_id_;\n};\n\n}  // namespace cef_internal\n}  // namespace base\n\n#endif  // CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_app_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_process_handler_capi.h\"\n#include \"include/capi/cef_command_line_capi.h\"\n#include \"include/capi/cef_render_process_handler_capi.h\"\n#include \"include/capi/cef_resource_bundle_handler_capi.h\"\n#include \"include/capi/cef_scheme_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_app_t;\n\n///\n// Implement this structure to provide handler implementations. Methods will be\n// called by the process and/or thread indicated.\n///\ntypedef struct _cef_app_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Provides an opportunity to view and/or modify command-line arguments before\n  // processing by CEF and Chromium. The |process_type| value will be NULL for\n  // the browser process. Do not keep a reference to the cef_command_line_t\n  // object passed to this function. The CefSettings.command_line_args_disabled\n  // value can be used to start with an NULL command-line object. Any values\n  // specified in CefSettings that equate to command-line arguments will be set\n  // before this function is called. Be cautious when using this function to\n  // modify command-line arguments for non-browser processes as this may result\n  // in undefined behavior including crashes.\n  ///\n  void (CEF_CALLBACK *on_before_command_line_processing)(\n      struct _cef_app_t* self, const cef_string_t* process_type,\n      struct _cef_command_line_t* command_line);\n\n  ///\n  // Provides an opportunity to register custom schemes. Do not keep a reference\n  // to the |registrar| object. This function is called on the main thread for\n  // each process and the registered schemes should be the same across all\n  // processes.\n  ///\n  void (CEF_CALLBACK *on_register_custom_schemes)(struct _cef_app_t* self,\n      struct _cef_scheme_registrar_t* registrar);\n\n  ///\n  // Return the handler for resource bundle events. If\n  // CefSettings.pack_loading_disabled is true (1) a handler must be returned.\n  // If no handler is returned resources will be loaded from pack files. This\n  // function is called by the browser and render processes on multiple threads.\n  ///\n  struct _cef_resource_bundle_handler_t* (\n      CEF_CALLBACK *get_resource_bundle_handler)(struct _cef_app_t* self);\n\n  ///\n  // Return the handler for functionality specific to the browser process. This\n  // function is called on multiple threads in the browser process.\n  ///\n  struct _cef_browser_process_handler_t* (\n      CEF_CALLBACK *get_browser_process_handler)(struct _cef_app_t* self);\n\n  ///\n  // Return the handler for functionality specific to the render process. This\n  // function is called on the render process main thread.\n  ///\n  struct _cef_render_process_handler_t* (\n      CEF_CALLBACK *get_render_process_handler)(struct _cef_app_t* self);\n} cef_app_t;\n\n\n///\n// This function should be called from the application entry point function to\n// execute a secondary process. It can be used to run secondary processes from\n// the browser client executable (default behavior) or from a separate\n// executable specified by the CefSettings.browser_subprocess_path value. If\n// called for the browser process (identified by no \"type\" command-line value)\n// it will return immediately with a value of -1. If called for a recognized\n// secondary process it will block until the process should exit and then return\n// the process exit code. The |application| parameter may be NULL. The\n// |windows_sandbox_info| parameter is only used on Windows and may be NULL (see\n// cef_sandbox_win.h for details).\n///\nCEF_EXPORT int cef_execute_process(const struct _cef_main_args_t* args,\n    cef_app_t* application, void* windows_sandbox_info);\n\n///\n// This function should be called on the main application thread to initialize\n// the CEF browser process. The |application| parameter may be NULL. A return\n// value of true (1) indicates that it succeeded and false (0) indicates that it\n// failed. The |windows_sandbox_info| parameter is only used on Windows and may\n// be NULL (see cef_sandbox_win.h for details).\n///\nCEF_EXPORT int cef_initialize(const struct _cef_main_args_t* args,\n    const struct _cef_settings_t* settings, cef_app_t* application,\n    void* windows_sandbox_info);\n\n///\n// This function should be called on the main application thread to shut down\n// the CEF browser process before the application exits.\n///\nCEF_EXPORT void cef_shutdown();\n\n///\n// Perform a single iteration of CEF message loop processing. This function is\n// used to integrate the CEF message loop into an existing application message\n// loop. Care must be taken to balance performance against excessive CPU usage.\n// This function should only be called on the main application thread and only\n// if cef_initialize() is called with a CefSettings.multi_threaded_message_loop\n// value of false (0). This function will not block.\n///\nCEF_EXPORT void cef_do_message_loop_work();\n\n///\n// Run the CEF message loop. Use this function instead of an application-\n// provided message loop to get the best balance between performance and CPU\n// usage. This function should only be called on the main application thread and\n// only if cef_initialize() is called with a\n// CefSettings.multi_threaded_message_loop value of false (0). This function\n// will block until a quit message is received by the system.\n///\nCEF_EXPORT void cef_run_message_loop();\n\n///\n// Quit the CEF message loop that was started by calling cef_run_message_loop().\n// This function should only be called on the main application thread and only\n// if cef_run_message_loop() was used.\n///\nCEF_EXPORT void cef_quit_message_loop();\n\n///\n// Set to true (1) before calling Windows APIs like TrackPopupMenu that enter a\n// modal message loop. Set to false (0) after exiting the modal message loop.\n///\nCEF_EXPORT void cef_set_osmodal_loop(int osModalLoop);\n\n///\n// Call during process startup to enable High-DPI support on Windows 7 or newer.\n// Older versions of Windows should be left DPI-unaware because they do not\n// support DirectWrite and GDI fonts are kerned very badly.\n///\nCEF_EXPORT void cef_enable_highdpi_support();\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_auth_callback_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Callback structure used for asynchronous continuation of authentication\n// requests.\n///\ntypedef struct _cef_auth_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Continue the authentication request.\n  ///\n  void (CEF_CALLBACK *cont)(struct _cef_auth_callback_t* self,\n      const cef_string_t* username, const cef_string_t* password);\n\n  ///\n  // Cancel the authentication request.\n  ///\n  void (CEF_CALLBACK *cancel)(struct _cef_auth_callback_t* self);\n} cef_auth_callback_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_base_capi.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n#ifndef CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_\n\n#include <stdint.h>\n\n#include \"include/internal/cef_export.h\"\n#include \"include/internal/cef_string.h\"\n#include \"include/internal/cef_string_list.h\"\n#include \"include/internal/cef_string_map.h\"\n#include \"include/internal/cef_string_multimap.h\"\n#include \"include/internal/cef_types.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n///\n// Structure defining the reference count implementation functions. All\n// framework structures must include the cef_base_t structure first.\n///\ntypedef struct _cef_base_t {\n  ///\n  // Size of the data structure.\n  ///\n  size_t size;\n\n  ///\n  // Called to increment the reference count for the object. Should be called\n  // for every new copy of a pointer to a given object.\n  ///\n  void (CEF_CALLBACK *add_ref)(struct _cef_base_t* self);\n\n  ///\n  // Called to decrement the reference count for the object. If the reference\n  // count falls to 0 the object should self-delete. Returns true (1) if the\n  // resulting reference count is 0.\n  ///\n  int (CEF_CALLBACK *release)(struct _cef_base_t* self);\n\n  ///\n  // Returns true (1) if the current reference count is 1.\n  ///\n  int (CEF_CALLBACK *has_one_ref)(struct _cef_base_t* self);\n} cef_base_t;\n\n\n// Check that the structure |s|, which is defined with a cef_base_t member named\n// |base|, is large enough to contain the specified member |f|.\n#define CEF_MEMBER_EXISTS(s, f)   \\\n  ((intptr_t)&((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= \\\n  reinterpret_cast<cef_base_t*>(s)->size)\n\n#define CEF_MEMBER_MISSING(s, f)  (!CEF_MEMBER_EXISTS(s, f) || !((s)->f))\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_browser_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_drag_data_capi.h\"\n#include \"include/capi/cef_frame_capi.h\"\n#include \"include/capi/cef_image_capi.h\"\n#include \"include/capi/cef_navigation_entry_capi.h\"\n#include \"include/capi/cef_process_message_capi.h\"\n#include \"include/capi/cef_request_context_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_browser_host_t;\nstruct _cef_client_t;\n\n///\n// Structure used to represent a browser window. When used in the browser\n// process the functions of this structure may be called on any thread unless\n// otherwise indicated in the comments. When used in the render process the\n// functions of this structure may only be called on the main thread.\n///\ntypedef struct _cef_browser_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns the browser host object. This function can only be called in the\n  // browser process.\n  ///\n  struct _cef_browser_host_t* (CEF_CALLBACK *get_host)(\n      struct _cef_browser_t* self);\n\n  ///\n  // Returns true (1) if the browser can navigate backwards.\n  ///\n  int (CEF_CALLBACK *can_go_back)(struct _cef_browser_t* self);\n\n  ///\n  // Navigate backwards.\n  ///\n  void (CEF_CALLBACK *go_back)(struct _cef_browser_t* self);\n\n  ///\n  // Returns true (1) if the browser can navigate forwards.\n  ///\n  int (CEF_CALLBACK *can_go_forward)(struct _cef_browser_t* self);\n\n  ///\n  // Navigate forwards.\n  ///\n  void (CEF_CALLBACK *go_forward)(struct _cef_browser_t* self);\n\n  ///\n  // Returns true (1) if the browser is currently loading.\n  ///\n  int (CEF_CALLBACK *is_loading)(struct _cef_browser_t* self);\n\n  ///\n  // Reload the current page.\n  ///\n  void (CEF_CALLBACK *reload)(struct _cef_browser_t* self);\n\n  ///\n  // Reload the current page ignoring any cached data.\n  ///\n  void (CEF_CALLBACK *reload_ignore_cache)(struct _cef_browser_t* self);\n\n  ///\n  // Stop loading the page.\n  ///\n  void (CEF_CALLBACK *stop_load)(struct _cef_browser_t* self);\n\n  ///\n  // Returns the globally unique identifier for this browser.\n  ///\n  int (CEF_CALLBACK *get_identifier)(struct _cef_browser_t* self);\n\n  ///\n  // Returns true (1) if this object is pointing to the same handle as |that|\n  // object.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_browser_t* self,\n      struct _cef_browser_t* that);\n\n  ///\n  // Returns true (1) if the window is a popup window.\n  ///\n  int (CEF_CALLBACK *is_popup)(struct _cef_browser_t* self);\n\n  ///\n  // Returns true (1) if a document has been loaded in the browser.\n  ///\n  int (CEF_CALLBACK *has_document)(struct _cef_browser_t* self);\n\n  ///\n  // Returns the main (top-level) frame for the browser window.\n  ///\n  struct _cef_frame_t* (CEF_CALLBACK *get_main_frame)(\n      struct _cef_browser_t* self);\n\n  ///\n  // Returns the focused frame for the browser window.\n  ///\n  struct _cef_frame_t* (CEF_CALLBACK *get_focused_frame)(\n      struct _cef_browser_t* self);\n\n  ///\n  // Returns the frame with the specified identifier, or NULL if not found.\n  ///\n  struct _cef_frame_t* (CEF_CALLBACK *get_frame_byident)(\n      struct _cef_browser_t* self, int64 identifier);\n\n  ///\n  // Returns the frame with the specified name, or NULL if not found.\n  ///\n  struct _cef_frame_t* (CEF_CALLBACK *get_frame)(struct _cef_browser_t* self,\n      const cef_string_t* name);\n\n  ///\n  // Returns the number of frames that currently exist.\n  ///\n  size_t (CEF_CALLBACK *get_frame_count)(struct _cef_browser_t* self);\n\n  ///\n  // Returns the identifiers of all existing frames.\n  ///\n  void (CEF_CALLBACK *get_frame_identifiers)(struct _cef_browser_t* self,\n      size_t* identifiersCount, int64* identifiers);\n\n  ///\n  // Returns the names of all existing frames.\n  ///\n  void (CEF_CALLBACK *get_frame_names)(struct _cef_browser_t* self,\n      cef_string_list_t names);\n\n  ///\n  // Send a message to the specified |target_process|. Returns true (1) if the\n  // message was sent successfully.\n  ///\n  int (CEF_CALLBACK *send_process_message)(struct _cef_browser_t* self,\n      cef_process_id_t target_process,\n      struct _cef_process_message_t* message);\n} cef_browser_t;\n\n\n///\n// Callback structure for cef_browser_host_t::RunFileDialog. The functions of\n// this structure will be called on the browser process UI thread.\n///\ntypedef struct _cef_run_file_dialog_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called asynchronously after the file dialog is dismissed.\n  // |selected_accept_filter| is the 0-based index of the value selected from\n  // the accept filters array passed to cef_browser_host_t::RunFileDialog.\n  // |file_paths| will be a single value or a list of values depending on the\n  // dialog mode. If the selection was cancelled |file_paths| will be NULL.\n  ///\n  void (CEF_CALLBACK *on_file_dialog_dismissed)(\n      struct _cef_run_file_dialog_callback_t* self, int selected_accept_filter,\n      cef_string_list_t file_paths);\n} cef_run_file_dialog_callback_t;\n\n\n///\n// Callback structure for cef_browser_host_t::GetNavigationEntries. The\n// functions of this structure will be called on the browser process UI thread.\n///\ntypedef struct _cef_navigation_entry_visitor_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method that will be executed. Do not keep a reference to |entry| outside of\n  // this callback. Return true (1) to continue visiting entries or false (0) to\n  // stop. |current| is true (1) if this entry is the currently loaded\n  // navigation entry. |index| is the 0-based index of this entry and |total| is\n  // the total number of entries.\n  ///\n  int (CEF_CALLBACK *visit)(struct _cef_navigation_entry_visitor_t* self,\n      struct _cef_navigation_entry_t* entry, int current, int index,\n      int total);\n} cef_navigation_entry_visitor_t;\n\n\n///\n// Callback structure for cef_browser_host_t::PrintToPDF. The functions of this\n// structure will be called on the browser process UI thread.\n///\ntypedef struct _cef_pdf_print_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method that will be executed when the PDF printing has completed. |path| is\n  // the output path. |ok| will be true (1) if the printing completed\n  // successfully or false (0) otherwise.\n  ///\n  void (CEF_CALLBACK *on_pdf_print_finished)(\n      struct _cef_pdf_print_callback_t* self, const cef_string_t* path,\n      int ok);\n} cef_pdf_print_callback_t;\n\n\n///\n// Callback structure for cef_browser_host_t::DownloadImage. The functions of\n// this structure will be called on the browser process UI thread.\n///\ntypedef struct _cef_download_image_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method that will be executed when the image download has completed.\n  // |image_url| is the URL that was downloaded and |http_status_code| is the\n  // resulting HTTP status code. |image| is the resulting image, possibly at\n  // multiple scale factors, or NULL if the download failed.\n  ///\n  void (CEF_CALLBACK *on_download_image_finished)(\n      struct _cef_download_image_callback_t* self,\n      const cef_string_t* image_url, int http_status_code,\n      struct _cef_image_t* image);\n} cef_download_image_callback_t;\n\n\n///\n// Structure used to represent the browser process aspects of a browser window.\n// The functions of this structure can only be called in the browser process.\n// They may be called on any thread in that process unless otherwise indicated\n// in the comments.\n///\ntypedef struct _cef_browser_host_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns the hosted browser object.\n  ///\n  struct _cef_browser_t* (CEF_CALLBACK *get_browser)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // Request that the browser close. The JavaScript 'onbeforeunload' event will\n  // be fired. If |force_close| is false (0) the event handler, if any, will be\n  // allowed to prompt the user and the user can optionally cancel the close. If\n  // |force_close| is true (1) the prompt will not be displayed and the close\n  // will proceed. Results in a call to cef_life_span_handler_t::do_close() if\n  // the event handler allows the close or if |force_close| is true (1). See\n  // cef_life_span_handler_t::do_close() documentation for additional usage\n  // information.\n  ///\n  void (CEF_CALLBACK *close_browser)(struct _cef_browser_host_t* self,\n      int force_close);\n\n  ///\n  // Helper for closing a browser. Call this function from the top-level window\n  // close handler. Internally this calls CloseBrowser(false (0)) if the close\n  // has not yet been initiated. This function returns false (0) while the close\n  // is pending and true (1) after the close has completed. See close_browser()\n  // and cef_life_span_handler_t::do_close() documentation for additional usage\n  // information. This function must be called on the browser process UI thread.\n  ///\n  int (CEF_CALLBACK *try_close_browser)(struct _cef_browser_host_t* self);\n\n  ///\n  // Set whether the browser is focused.\n  ///\n  void (CEF_CALLBACK *set_focus)(struct _cef_browser_host_t* self, int focus);\n\n  ///\n  // Retrieve the window handle for this browser. If this browser is wrapped in\n  // a cef_browser_view_t this function should be called on the browser process\n  // UI thread and it will return the handle for the top-level native window.\n  ///\n  cef_window_handle_t (CEF_CALLBACK *get_window_handle)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // Retrieve the window handle of the browser that opened this browser. Will\n  // return NULL for non-popup windows or if this browser is wrapped in a\n  // cef_browser_view_t. This function can be used in combination with custom\n  // handling of modal windows.\n  ///\n  cef_window_handle_t (CEF_CALLBACK *get_opener_window_handle)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // Returns true (1) if this browser is wrapped in a cef_browser_view_t.\n  ///\n  int (CEF_CALLBACK *has_view)(struct _cef_browser_host_t* self);\n\n  ///\n  // Returns the client for this browser.\n  ///\n  struct _cef_client_t* (CEF_CALLBACK *get_client)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // Returns the request context for this browser.\n  ///\n  struct _cef_request_context_t* (CEF_CALLBACK *get_request_context)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // Get the current zoom level. The default zoom level is 0.0. This function\n  // can only be called on the UI thread.\n  ///\n  double (CEF_CALLBACK *get_zoom_level)(struct _cef_browser_host_t* self);\n\n  ///\n  // Change the zoom level to the specified value. Specify 0.0 to reset the zoom\n  // level. If called on the UI thread the change will be applied immediately.\n  // Otherwise, the change will be applied asynchronously on the UI thread.\n  ///\n  void (CEF_CALLBACK *set_zoom_level)(struct _cef_browser_host_t* self,\n      double zoomLevel);\n\n  ///\n  // Call to run a file chooser dialog. Only a single file chooser dialog may be\n  // pending at any given time. |mode| represents the type of dialog to display.\n  // |title| to the title to be used for the dialog and may be NULL to show the\n  // default title (\"Open\" or \"Save\" depending on the mode). |default_file_path|\n  // is the path with optional directory and/or file name component that will be\n  // initially selected in the dialog. |accept_filters| are used to restrict the\n  // selectable file types and may any combination of (a) valid lower-cased MIME\n  // types (e.g. \"text/*\" or \"image/*\"), (b) individual file extensions (e.g.\n  // \".txt\" or \".png\"), or (c) combined description and file extension delimited\n  // using \"|\" and \";\" (e.g. \"Image Types|.png;.gif;.jpg\").\n  // |selected_accept_filter| is the 0-based index of the filter that will be\n  // selected by default. |callback| will be executed after the dialog is\n  // dismissed or immediately if another dialog is already pending. The dialog\n  // will be initiated asynchronously on the UI thread.\n  ///\n  void (CEF_CALLBACK *run_file_dialog)(struct _cef_browser_host_t* self,\n      cef_file_dialog_mode_t mode, const cef_string_t* title,\n      const cef_string_t* default_file_path, cef_string_list_t accept_filters,\n      int selected_accept_filter,\n      struct _cef_run_file_dialog_callback_t* callback);\n\n  ///\n  // Download the file at |url| using cef_download_handler_t.\n  ///\n  void (CEF_CALLBACK *start_download)(struct _cef_browser_host_t* self,\n      const cef_string_t* url);\n\n  ///\n  // Download |image_url| and execute |callback| on completion with the images\n  // received from the renderer. If |is_favicon| is true (1) then cookies are\n  // not sent and not accepted during download. Images with density independent\n  // pixel (DIP) sizes larger than |max_image_size| are filtered out from the\n  // image results. Versions of the image at different scale factors may be\n  // downloaded up to the maximum scale factor supported by the system. If there\n  // are no image results <= |max_image_size| then the smallest image is resized\n  // to |max_image_size| and is the only result. A |max_image_size| of 0 means\n  // unlimited. If |bypass_cache| is true (1) then |image_url| is requested from\n  // the server even if it is present in the browser cache.\n  ///\n  void (CEF_CALLBACK *download_image)(struct _cef_browser_host_t* self,\n      const cef_string_t* image_url, int is_favicon, uint32 max_image_size,\n      int bypass_cache, struct _cef_download_image_callback_t* callback);\n\n  ///\n  // Print the current browser contents.\n  ///\n  void (CEF_CALLBACK *print)(struct _cef_browser_host_t* self);\n\n  ///\n  // Print the current browser contents to the PDF file specified by |path| and\n  // execute |callback| on completion. The caller is responsible for deleting\n  // |path| when done. For PDF printing to work on Linux you must implement the\n  // cef_print_handler_t::GetPdfPaperSize function.\n  ///\n  void (CEF_CALLBACK *print_to_pdf)(struct _cef_browser_host_t* self,\n      const cef_string_t* path,\n      const struct _cef_pdf_print_settings_t* settings,\n      struct _cef_pdf_print_callback_t* callback);\n\n  ///\n  // Search for |searchText|. |identifier| can be used to have multiple searches\n  // running simultaniously. |forward| indicates whether to search forward or\n  // backward within the page. |matchCase| indicates whether the search should\n  // be case-sensitive. |findNext| indicates whether this is the first request\n  // or a follow-up. The cef_find_handler_t instance, if any, returned via\n  // cef_client_t::GetFindHandler will be called to report find results.\n  ///\n  void (CEF_CALLBACK *find)(struct _cef_browser_host_t* self, int identifier,\n      const cef_string_t* searchText, int forward, int matchCase,\n      int findNext);\n\n  ///\n  // Cancel all searches that are currently going on.\n  ///\n  void (CEF_CALLBACK *stop_finding)(struct _cef_browser_host_t* self,\n      int clearSelection);\n\n  ///\n  // Open developer tools (DevTools) in its own browser. The DevTools browser\n  // will remain associated with this browser. If the DevTools browser is\n  // already open then it will be focused, in which case the |windowInfo|,\n  // |client| and |settings| parameters will be ignored. If |inspect_element_at|\n  // is non-NULL then the element at the specified (x,y) location will be\n  // inspected. The |windowInfo| parameter will be ignored if this browser is\n  // wrapped in a cef_browser_view_t.\n  ///\n  void (CEF_CALLBACK *show_dev_tools)(struct _cef_browser_host_t* self,\n      const struct _cef_window_info_t* windowInfo,\n      struct _cef_client_t* client,\n      const struct _cef_browser_settings_t* settings,\n      const cef_point_t* inspect_element_at);\n\n  ///\n  // Explicitly close the associated DevTools browser, if any.\n  ///\n  void (CEF_CALLBACK *close_dev_tools)(struct _cef_browser_host_t* self);\n\n  ///\n  // Returns true (1) if this browser currently has an associated DevTools\n  // browser. Must be called on the browser process UI thread.\n  ///\n  int (CEF_CALLBACK *has_dev_tools)(struct _cef_browser_host_t* self);\n\n  ///\n  // Retrieve a snapshot of current navigation entries as values sent to the\n  // specified visitor. If |current_only| is true (1) only the current\n  // navigation entry will be sent, otherwise all navigation entries will be\n  // sent.\n  ///\n  void (CEF_CALLBACK *get_navigation_entries)(struct _cef_browser_host_t* self,\n      struct _cef_navigation_entry_visitor_t* visitor, int current_only);\n\n  ///\n  // Set whether mouse cursor change is disabled.\n  ///\n  void (CEF_CALLBACK *set_mouse_cursor_change_disabled)(\n      struct _cef_browser_host_t* self, int disabled);\n\n  ///\n  // Returns true (1) if mouse cursor change is disabled.\n  ///\n  int (CEF_CALLBACK *is_mouse_cursor_change_disabled)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // If a misspelled word is currently selected in an editable node calling this\n  // function will replace it with the specified |word|.\n  ///\n  void (CEF_CALLBACK *replace_misspelling)(struct _cef_browser_host_t* self,\n      const cef_string_t* word);\n\n  ///\n  // Add the specified |word| to the spelling dictionary.\n  ///\n  void (CEF_CALLBACK *add_word_to_dictionary)(struct _cef_browser_host_t* self,\n      const cef_string_t* word);\n\n  ///\n  // Returns true (1) if window rendering is disabled.\n  ///\n  int (CEF_CALLBACK *is_window_rendering_disabled)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // Notify the browser that the widget has been resized. The browser will first\n  // call cef_render_handler_t::GetViewRect to get the new size and then call\n  // cef_render_handler_t::OnPaint asynchronously with the updated regions. This\n  // function is only used when window rendering is disabled.\n  ///\n  void (CEF_CALLBACK *was_resized)(struct _cef_browser_host_t* self);\n\n  ///\n  // Notify the browser that it has been hidden or shown. Layouting and\n  // cef_render_handler_t::OnPaint notification will stop when the browser is\n  // hidden. This function is only used when window rendering is disabled.\n  ///\n  void (CEF_CALLBACK *was_hidden)(struct _cef_browser_host_t* self, int hidden);\n\n  ///\n  // Send a notification to the browser that the screen info has changed. The\n  // browser will then call cef_render_handler_t::GetScreenInfo to update the\n  // screen information with the new values. This simulates moving the webview\n  // window from one display to another, or changing the properties of the\n  // current display. This function is only used when window rendering is\n  // disabled.\n  ///\n  void (CEF_CALLBACK *notify_screen_info_changed)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // Invalidate the view. The browser will call cef_render_handler_t::OnPaint\n  // asynchronously. This function is only used when window rendering is\n  // disabled.\n  ///\n  void (CEF_CALLBACK *invalidate)(struct _cef_browser_host_t* self,\n      cef_paint_element_type_t type);\n\n  ///\n  // Send a key event to the browser.\n  ///\n  void (CEF_CALLBACK *send_key_event)(struct _cef_browser_host_t* self,\n      const struct _cef_key_event_t* event);\n\n  ///\n  // Send a mouse click event to the browser. The |x| and |y| coordinates are\n  // relative to the upper-left corner of the view.\n  ///\n  void (CEF_CALLBACK *send_mouse_click_event)(struct _cef_browser_host_t* self,\n      const struct _cef_mouse_event_t* event, cef_mouse_button_type_t type,\n      int mouseUp, int clickCount);\n\n  ///\n  // Send a mouse move event to the browser. The |x| and |y| coordinates are\n  // relative to the upper-left corner of the view.\n  ///\n  void (CEF_CALLBACK *send_mouse_move_event)(struct _cef_browser_host_t* self,\n      const struct _cef_mouse_event_t* event, int mouseLeave);\n\n  ///\n  // Send a mouse wheel event to the browser. The |x| and |y| coordinates are\n  // relative to the upper-left corner of the view. The |deltaX| and |deltaY|\n  // values represent the movement delta in the X and Y directions respectively.\n  // In order to scroll inside select popups with window rendering disabled\n  // cef_render_handler_t::GetScreenPoint should be implemented properly.\n  ///\n  void (CEF_CALLBACK *send_mouse_wheel_event)(struct _cef_browser_host_t* self,\n      const struct _cef_mouse_event_t* event, int deltaX, int deltaY);\n\n  ///\n  // Send a focus event to the browser.\n  ///\n  void (CEF_CALLBACK *send_focus_event)(struct _cef_browser_host_t* self,\n      int setFocus);\n\n  ///\n  // Send a capture lost event to the browser.\n  ///\n  void (CEF_CALLBACK *send_capture_lost_event)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // Notify the browser that the window hosting it is about to be moved or\n  // resized. This function is only used on Windows and Linux.\n  ///\n  void (CEF_CALLBACK *notify_move_or_resize_started)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // Returns the maximum rate in frames per second (fps) that\n  // cef_render_handler_t:: OnPaint will be called for a windowless browser. The\n  // actual fps may be lower if the browser cannot generate frames at the\n  // requested rate. The minimum value is 1 and the maximum value is 60 (default\n  // 30). This function can only be called on the UI thread.\n  ///\n  int (CEF_CALLBACK *get_windowless_frame_rate)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // Set the maximum rate in frames per second (fps) that cef_render_handler_t::\n  // OnPaint will be called for a windowless browser. The actual fps may be\n  // lower if the browser cannot generate frames at the requested rate. The\n  // minimum value is 1 and the maximum value is 60 (default 30). Can also be\n  // set at browser creation via cef_browser_tSettings.windowless_frame_rate.\n  ///\n  void (CEF_CALLBACK *set_windowless_frame_rate)(\n      struct _cef_browser_host_t* self, int frame_rate);\n\n  ///\n  // Get the NSTextInputContext implementation for enabling IME on Mac when\n  // window rendering is disabled.\n  ///\n  cef_text_input_context_t (CEF_CALLBACK *get_nstext_input_context)(\n      struct _cef_browser_host_t* self);\n\n  ///\n  // Handles a keyDown event prior to passing it through the NSTextInputClient\n  // machinery.\n  ///\n  void (CEF_CALLBACK *handle_key_event_before_text_input_client)(\n      struct _cef_browser_host_t* self, cef_event_handle_t keyEvent);\n\n  ///\n  // Performs any additional actions after NSTextInputClient handles the event.\n  ///\n  void (CEF_CALLBACK *handle_key_event_after_text_input_client)(\n      struct _cef_browser_host_t* self, cef_event_handle_t keyEvent);\n\n  ///\n  // Call this function when the user drags the mouse into the web view (before\n  // calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). |drag_data|\n  // should not contain file contents as this type of data is not allowed to be\n  // dragged into the web view. File contents can be removed using\n  // cef_drag_data_t::ResetFileContents (for example, if |drag_data| comes from\n  // cef_render_handler_t::StartDragging). This function is only used when\n  // window rendering is disabled.\n  ///\n  void (CEF_CALLBACK *drag_target_drag_enter)(struct _cef_browser_host_t* self,\n      struct _cef_drag_data_t* drag_data,\n      const struct _cef_mouse_event_t* event,\n      cef_drag_operations_mask_t allowed_ops);\n\n  ///\n  // Call this function each time the mouse is moved across the web view during\n  // a drag operation (after calling DragTargetDragEnter and before calling\n  // DragTargetDragLeave/DragTargetDrop). This function is only used when window\n  // rendering is disabled.\n  ///\n  void (CEF_CALLBACK *drag_target_drag_over)(struct _cef_browser_host_t* self,\n      const struct _cef_mouse_event_t* event,\n      cef_drag_operations_mask_t allowed_ops);\n\n  ///\n  // Call this function when the user drags the mouse out of the web view (after\n  // calling DragTargetDragEnter). This function is only used when window\n  // rendering is disabled.\n  ///\n  void (CEF_CALLBACK *drag_target_drag_leave)(struct _cef_browser_host_t* self);\n\n  ///\n  // Call this function when the user completes the drag operation by dropping\n  // the object onto the web view (after calling DragTargetDragEnter). The\n  // object being dropped is |drag_data|, given as an argument to the previous\n  // DragTargetDragEnter call. This function is only used when window rendering\n  // is disabled.\n  ///\n  void (CEF_CALLBACK *drag_target_drop)(struct _cef_browser_host_t* self,\n      const struct _cef_mouse_event_t* event);\n\n  ///\n  // Call this function when the drag operation started by a\n  // cef_render_handler_t::StartDragging call has ended either in a drop or by\n  // being cancelled. |x| and |y| are mouse coordinates relative to the upper-\n  // left corner of the view. If the web view is both the drag source and the\n  // drag target then all DragTarget* functions should be called before\n  // DragSource* mthods. This function is only used when window rendering is\n  // disabled.\n  ///\n  void (CEF_CALLBACK *drag_source_ended_at)(struct _cef_browser_host_t* self,\n      int x, int y, cef_drag_operations_mask_t op);\n\n  ///\n  // Call this function when the drag operation started by a\n  // cef_render_handler_t::StartDragging call has completed. This function may\n  // be called immediately without first calling DragSourceEndedAt to cancel a\n  // drag operation. If the web view is both the drag source and the drag target\n  // then all DragTarget* functions should be called before DragSource* mthods.\n  // This function is only used when window rendering is disabled.\n  ///\n  void (CEF_CALLBACK *drag_source_system_drag_ended)(\n      struct _cef_browser_host_t* self);\n} cef_browser_host_t;\n\n\n///\n// Create a new browser window using the window parameters specified by\n// |windowInfo|. All values will be copied internally and the actual window will\n// be created on the UI thread. If |request_context| is NULL the global request\n// context will be used. This function can be called on any browser process\n// thread and will not block.\n///\nCEF_EXPORT int cef_browser_host_create_browser(\n    const cef_window_info_t* windowInfo, struct _cef_client_t* client,\n    const cef_string_t* url, const struct _cef_browser_settings_t* settings,\n    struct _cef_request_context_t* request_context);\n\n///\n// Create a new browser window using the window parameters specified by\n// |windowInfo|. If |request_context| is NULL the global request context will be\n// used. This function can only be called on the browser process UI thread.\n///\nCEF_EXPORT cef_browser_t* cef_browser_host_create_browser_sync(\n    const cef_window_info_t* windowInfo, struct _cef_client_t* client,\n    const cef_string_t* url, const struct _cef_browser_settings_t* settings,\n    struct _cef_request_context_t* request_context);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_browser_process_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_command_line_capi.h\"\n#include \"include/capi/cef_print_handler_capi.h\"\n#include \"include/capi/cef_values_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure used to implement browser process callbacks. The functions of this\n// structure will be called on the browser process main thread unless otherwise\n// indicated.\n///\ntypedef struct _cef_browser_process_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called on the browser process UI thread immediately after the CEF context\n  // has been initialized.\n  ///\n  void (CEF_CALLBACK *on_context_initialized)(\n      struct _cef_browser_process_handler_t* self);\n\n  ///\n  // Called before a child process is launched. Will be called on the browser\n  // process UI thread when launching a render process and on the browser\n  // process IO thread when launching a GPU or plugin process. Provides an\n  // opportunity to modify the child process command line. Do not keep a\n  // reference to |command_line| outside of this function.\n  ///\n  void (CEF_CALLBACK *on_before_child_process_launch)(\n      struct _cef_browser_process_handler_t* self,\n      struct _cef_command_line_t* command_line);\n\n  ///\n  // Called on the browser process IO thread after the main thread has been\n  // created for a new render process. Provides an opportunity to specify extra\n  // information that will be passed to\n  // cef_render_process_handler_t::on_render_thread_created() in the render\n  // process. Do not keep a reference to |extra_info| outside of this function.\n  ///\n  void (CEF_CALLBACK *on_render_process_thread_created)(\n      struct _cef_browser_process_handler_t* self,\n      struct _cef_list_value_t* extra_info);\n\n  ///\n  // Return the handler for printing on Linux. If a print handler is not\n  // provided then printing will not be supported on the Linux platform.\n  ///\n  struct _cef_print_handler_t* (CEF_CALLBACK *get_print_handler)(\n      struct _cef_browser_process_handler_t* self);\n} cef_browser_process_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_callback_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Generic callback structure used for asynchronous continuation.\n///\ntypedef struct _cef_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Continue processing.\n  ///\n  void (CEF_CALLBACK *cont)(struct _cef_callback_t* self);\n\n  ///\n  // Cancel processing.\n  ///\n  void (CEF_CALLBACK *cancel)(struct _cef_callback_t* self);\n} cef_callback_t;\n\n\n///\n// Generic callback structure used for asynchronous completion.\n///\ntypedef struct _cef_completion_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method that will be called once the task is complete.\n  ///\n  void (CEF_CALLBACK *on_complete)(struct _cef_completion_callback_t* self);\n} cef_completion_callback_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_client_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_context_menu_handler_capi.h\"\n#include \"include/capi/cef_dialog_handler_capi.h\"\n#include \"include/capi/cef_display_handler_capi.h\"\n#include \"include/capi/cef_download_handler_capi.h\"\n#include \"include/capi/cef_drag_handler_capi.h\"\n#include \"include/capi/cef_find_handler_capi.h\"\n#include \"include/capi/cef_focus_handler_capi.h\"\n#include \"include/capi/cef_geolocation_handler_capi.h\"\n#include \"include/capi/cef_jsdialog_handler_capi.h\"\n#include \"include/capi/cef_keyboard_handler_capi.h\"\n#include \"include/capi/cef_life_span_handler_capi.h\"\n#include \"include/capi/cef_load_handler_capi.h\"\n#include \"include/capi/cef_process_message_capi.h\"\n#include \"include/capi/cef_render_handler_capi.h\"\n#include \"include/capi/cef_request_handler_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to provide handler implementations.\n///\ntypedef struct _cef_client_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Return the handler for context menus. If no handler is provided the default\n  // implementation will be used.\n  ///\n  struct _cef_context_menu_handler_t* (CEF_CALLBACK *get_context_menu_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for dialogs. If no handler is provided the default\n  // implementation will be used.\n  ///\n  struct _cef_dialog_handler_t* (CEF_CALLBACK *get_dialog_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for browser display state events.\n  ///\n  struct _cef_display_handler_t* (CEF_CALLBACK *get_display_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for download events. If no handler is returned downloads\n  // will not be allowed.\n  ///\n  struct _cef_download_handler_t* (CEF_CALLBACK *get_download_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for drag events.\n  ///\n  struct _cef_drag_handler_t* (CEF_CALLBACK *get_drag_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for find result events.\n  ///\n  struct _cef_find_handler_t* (CEF_CALLBACK *get_find_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for focus events.\n  ///\n  struct _cef_focus_handler_t* (CEF_CALLBACK *get_focus_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for geolocation permissions requests. If no handler is\n  // provided geolocation access will be denied by default.\n  ///\n  struct _cef_geolocation_handler_t* (CEF_CALLBACK *get_geolocation_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for JavaScript dialogs. If no handler is provided the\n  // default implementation will be used.\n  ///\n  struct _cef_jsdialog_handler_t* (CEF_CALLBACK *get_jsdialog_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for keyboard events.\n  ///\n  struct _cef_keyboard_handler_t* (CEF_CALLBACK *get_keyboard_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for browser life span events.\n  ///\n  struct _cef_life_span_handler_t* (CEF_CALLBACK *get_life_span_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for browser load status events.\n  ///\n  struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for off-screen rendering events.\n  ///\n  struct _cef_render_handler_t* (CEF_CALLBACK *get_render_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Return the handler for browser request events.\n  ///\n  struct _cef_request_handler_t* (CEF_CALLBACK *get_request_handler)(\n      struct _cef_client_t* self);\n\n  ///\n  // Called when a new message is received from a different process. Return true\n  // (1) if the message was handled or false (0) otherwise. Do not keep a\n  // reference to or attempt to access the message outside of this callback.\n  ///\n  int (CEF_CALLBACK *on_process_message_received)(struct _cef_client_t* self,\n      struct _cef_browser_t* browser, cef_process_id_t source_process,\n      struct _cef_process_message_t* message);\n} cef_client_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_command_line_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure used to create and/or parse command line arguments. Arguments with\n// '--', '-' and, on Windows, '/' prefixes are considered switches. Switches\n// will always precede any arguments without switch prefixes. Switches can\n// optionally have a value specified using the '=' delimiter (e.g.\n// \"-switch=value\"). An argument of \"--\" will terminate switch parsing with all\n// subsequent tokens, regardless of prefix, being interpreted as non-switch\n// arguments. Switch names are considered case-insensitive. This structure can\n// be used before cef_initialize() is called.\n///\ntypedef struct _cef_command_line_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is valid. Do not call any other functions\n  // if this function returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_command_line_t* self);\n\n  ///\n  // Returns true (1) if the values of this object are read-only. Some APIs may\n  // expose read-only objects.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_command_line_t* self);\n\n  ///\n  // Returns a writable copy of this object.\n  ///\n  struct _cef_command_line_t* (CEF_CALLBACK *copy)(\n      struct _cef_command_line_t* self);\n\n  ///\n  // Initialize the command line with the specified |argc| and |argv| values.\n  // The first argument must be the name of the program. This function is only\n  // supported on non-Windows platforms.\n  ///\n  void (CEF_CALLBACK *init_from_argv)(struct _cef_command_line_t* self,\n      int argc, const char* const* argv);\n\n  ///\n  // Initialize the command line with the string returned by calling\n  // GetCommandLineW(). This function is only supported on Windows.\n  ///\n  void (CEF_CALLBACK *init_from_string)(struct _cef_command_line_t* self,\n      const cef_string_t* command_line);\n\n  ///\n  // Reset the command-line switches and arguments but leave the program\n  // component unchanged.\n  ///\n  void (CEF_CALLBACK *reset)(struct _cef_command_line_t* self);\n\n  ///\n  // Retrieve the original command line string as a vector of strings. The argv\n  // array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* }\n  ///\n  void (CEF_CALLBACK *get_argv)(struct _cef_command_line_t* self,\n      cef_string_list_t argv);\n\n  ///\n  // Constructs and returns the represented command line string. Use this\n  // function cautiously because quoting behavior is unclear.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_command_line_string)(\n      struct _cef_command_line_t* self);\n\n  ///\n  // Get the program part of the command line string (the first item).\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_program)(\n      struct _cef_command_line_t* self);\n\n  ///\n  // Set the program part of the command line string (the first item).\n  ///\n  void (CEF_CALLBACK *set_program)(struct _cef_command_line_t* self,\n      const cef_string_t* program);\n\n  ///\n  // Returns true (1) if the command line has switches.\n  ///\n  int (CEF_CALLBACK *has_switches)(struct _cef_command_line_t* self);\n\n  ///\n  // Returns true (1) if the command line contains the given switch.\n  ///\n  int (CEF_CALLBACK *has_switch)(struct _cef_command_line_t* self,\n      const cef_string_t* name);\n\n  ///\n  // Returns the value associated with the given switch. If the switch has no\n  // value or isn't present this function returns the NULL string.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_switch_value)(\n      struct _cef_command_line_t* self, const cef_string_t* name);\n\n  ///\n  // Returns the map of switch names and values. If a switch has no value an\n  // NULL string is returned.\n  ///\n  void (CEF_CALLBACK *get_switches)(struct _cef_command_line_t* self,\n      cef_string_map_t switches);\n\n  ///\n  // Add a switch to the end of the command line. If the switch has no value\n  // pass an NULL value string.\n  ///\n  void (CEF_CALLBACK *append_switch)(struct _cef_command_line_t* self,\n      const cef_string_t* name);\n\n  ///\n  // Add a switch with the specified value to the end of the command line.\n  ///\n  void (CEF_CALLBACK *append_switch_with_value)(\n      struct _cef_command_line_t* self, const cef_string_t* name,\n      const cef_string_t* value);\n\n  ///\n  // True if there are remaining command line arguments.\n  ///\n  int (CEF_CALLBACK *has_arguments)(struct _cef_command_line_t* self);\n\n  ///\n  // Get the remaining command line arguments.\n  ///\n  void (CEF_CALLBACK *get_arguments)(struct _cef_command_line_t* self,\n      cef_string_list_t arguments);\n\n  ///\n  // Add an argument to the end of the command line.\n  ///\n  void (CEF_CALLBACK *append_argument)(struct _cef_command_line_t* self,\n      const cef_string_t* argument);\n\n  ///\n  // Insert a command before the current command. Common for debuggers, like\n  // \"valgrind\" or \"gdb --args\".\n  ///\n  void (CEF_CALLBACK *prepend_wrapper)(struct _cef_command_line_t* self,\n      const cef_string_t* wrapper);\n} cef_command_line_t;\n\n\n///\n// Create a new cef_command_line_t instance.\n///\nCEF_EXPORT cef_command_line_t* cef_command_line_create();\n\n///\n// Returns the singleton global cef_command_line_t object. The returned object\n// will be read-only.\n///\nCEF_EXPORT cef_command_line_t* cef_command_line_get_global();\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_context_menu_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_frame_capi.h\"\n#include \"include/capi/cef_menu_model_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_context_menu_params_t;\n\n///\n// Callback structure used for continuation of custom context menu display.\n///\ntypedef struct _cef_run_context_menu_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Complete context menu display by selecting the specified |command_id| and\n  // |event_flags|.\n  ///\n  void (CEF_CALLBACK *cont)(struct _cef_run_context_menu_callback_t* self,\n      int command_id, cef_event_flags_t event_flags);\n\n  ///\n  // Cancel context menu display.\n  ///\n  void (CEF_CALLBACK *cancel)(struct _cef_run_context_menu_callback_t* self);\n} cef_run_context_menu_callback_t;\n\n\n///\n// Implement this structure to handle context menu events. The functions of this\n// structure will be called on the UI thread.\n///\ntypedef struct _cef_context_menu_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called before a context menu is displayed. |params| provides information\n  // about the context menu state. |model| initially contains the default\n  // context menu. The |model| can be cleared to show no context menu or\n  // modified to show a custom menu. Do not keep references to |params| or\n  // |model| outside of this callback.\n  ///\n  void (CEF_CALLBACK *on_before_context_menu)(\n      struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser,\n      struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params,\n      struct _cef_menu_model_t* model);\n\n  ///\n  // Called to allow custom display of the context menu. |params| provides\n  // information about the context menu state. |model| contains the context menu\n  // model resulting from OnBeforeContextMenu. For custom display return true\n  // (1) and execute |callback| either synchronously or asynchronously with the\n  // selected command ID. For default display return false (0). Do not keep\n  // references to |params| or |model| outside of this callback.\n  ///\n  int (CEF_CALLBACK *run_context_menu)(struct _cef_context_menu_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      struct _cef_context_menu_params_t* params,\n      struct _cef_menu_model_t* model,\n      struct _cef_run_context_menu_callback_t* callback);\n\n  ///\n  // Called to execute a command selected from the context menu. Return true (1)\n  // if the command was handled or false (0) for the default implementation. See\n  // cef_menu_id_t for the command ids that have default implementations. All\n  // user-defined command ids should be between MENU_ID_USER_FIRST and\n  // MENU_ID_USER_LAST. |params| will have the same values as what was passed to\n  // on_before_context_menu(). Do not keep a reference to |params| outside of\n  // this callback.\n  ///\n  int (CEF_CALLBACK *on_context_menu_command)(\n      struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser,\n      struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params,\n      int command_id, cef_event_flags_t event_flags);\n\n  ///\n  // Called when the context menu is dismissed irregardless of whether the menu\n  // was NULL or a command was selected.\n  ///\n  void (CEF_CALLBACK *on_context_menu_dismissed)(\n      struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser,\n      struct _cef_frame_t* frame);\n} cef_context_menu_handler_t;\n\n\n///\n// Provides information about the context menu state. The ethods of this\n// structure can only be accessed on browser process the UI thread.\n///\ntypedef struct _cef_context_menu_params_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns the X coordinate of the mouse where the context menu was invoked.\n  // Coords are relative to the associated RenderView's origin.\n  ///\n  int (CEF_CALLBACK *get_xcoord)(struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns the Y coordinate of the mouse where the context menu was invoked.\n  // Coords are relative to the associated RenderView's origin.\n  ///\n  int (CEF_CALLBACK *get_ycoord)(struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns flags representing the type of node that the context menu was\n  // invoked on.\n  ///\n  cef_context_menu_type_flags_t (CEF_CALLBACK *get_type_flags)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns the URL of the link, if any, that encloses the node that the\n  // context menu was invoked on.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_link_url)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns the link URL, if any, to be used ONLY for \"copy link address\". We\n  // don't validate this field in the frontend process.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_unfiltered_link_url)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns the source URL, if any, for the element that the context menu was\n  // invoked on. Example of elements with source URLs are img, audio, and video.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_source_url)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns true (1) if the context menu was invoked on an image which has non-\n  // NULL contents.\n  ///\n  int (CEF_CALLBACK *has_image_contents)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns the URL of the top level page that the context menu was invoked on.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_page_url)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns the URL of the subframe that the context menu was invoked on.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_frame_url)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns the character encoding of the subframe that the context menu was\n  // invoked on.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_frame_charset)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns the type of context node that the context menu was invoked on.\n  ///\n  cef_context_menu_media_type_t (CEF_CALLBACK *get_media_type)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns flags representing the actions supported by the media element, if\n  // any, that the context menu was invoked on.\n  ///\n  cef_context_menu_media_state_flags_t (CEF_CALLBACK *get_media_state_flags)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns the text of the selection, if any, that the context menu was\n  // invoked on.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_selection_text)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns the text of the misspelled word, if any, that the context menu was\n  // invoked on.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_misspelled_word)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns true (1) if suggestions exist, false (0) otherwise. Fills in\n  // |suggestions| from the spell check service for the misspelled word if there\n  // is one.\n  ///\n  int (CEF_CALLBACK *get_dictionary_suggestions)(\n      struct _cef_context_menu_params_t* self, cef_string_list_t suggestions);\n\n  ///\n  // Returns true (1) if the context menu was invoked on an editable node.\n  ///\n  int (CEF_CALLBACK *is_editable)(struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns true (1) if the context menu was invoked on an editable node where\n  // spell-check is enabled.\n  ///\n  int (CEF_CALLBACK *is_spell_check_enabled)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns flags representing the actions supported by the editable node, if\n  // any, that the context menu was invoked on.\n  ///\n  cef_context_menu_edit_state_flags_t (CEF_CALLBACK *get_edit_state_flags)(\n      struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns true (1) if the context menu contains items specified by the\n  // renderer process (for example, plugin placeholder or pepper plugin menu\n  // items).\n  ///\n  int (CEF_CALLBACK *is_custom_menu)(struct _cef_context_menu_params_t* self);\n\n  ///\n  // Returns true (1) if the context menu was invoked from a pepper plugin.\n  ///\n  int (CEF_CALLBACK *is_pepper_menu)(struct _cef_context_menu_params_t* self);\n} cef_context_menu_params_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_cookie_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_callback_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_cookie_visitor_t;\nstruct _cef_delete_cookies_callback_t;\nstruct _cef_set_cookie_callback_t;\n\n///\n// Structure used for managing cookies. The functions of this structure may be\n// called on any thread unless otherwise indicated.\n///\ntypedef struct _cef_cookie_manager_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Set the schemes supported by this manager. The default schemes (\"http\",\n  // \"https\", \"ws\" and \"wss\") will always be supported. If |callback| is non-\n  // NULL it will be executed asnychronously on the IO thread after the change\n  // has been applied. Must be called before any cookies are accessed.\n  ///\n  void (CEF_CALLBACK *set_supported_schemes)(struct _cef_cookie_manager_t* self,\n      cef_string_list_t schemes, struct _cef_completion_callback_t* callback);\n\n  ///\n  // Visit all cookies on the IO thread. The returned cookies are ordered by\n  // longest path, then by earliest creation date. Returns false (0) if cookies\n  // cannot be accessed.\n  ///\n  int (CEF_CALLBACK *visit_all_cookies)(struct _cef_cookie_manager_t* self,\n      struct _cef_cookie_visitor_t* visitor);\n\n  ///\n  // Visit a subset of cookies on the IO thread. The results are filtered by the\n  // given url scheme, host, domain and path. If |includeHttpOnly| is true (1)\n  // HTTP-only cookies will also be included in the results. The returned\n  // cookies are ordered by longest path, then by earliest creation date.\n  // Returns false (0) if cookies cannot be accessed.\n  ///\n  int (CEF_CALLBACK *visit_url_cookies)(struct _cef_cookie_manager_t* self,\n      const cef_string_t* url, int includeHttpOnly,\n      struct _cef_cookie_visitor_t* visitor);\n\n  ///\n  // Sets a cookie given a valid URL and explicit user-provided cookie\n  // attributes. This function expects each attribute to be well-formed. It will\n  // check for disallowed characters (e.g. the ';' character is disallowed\n  // within the cookie value attribute) and fail without setting the cookie if\n  // such characters are found. If |callback| is non-NULL it will be executed\n  // asnychronously on the IO thread after the cookie has been set. Returns\n  // false (0) if an invalid URL is specified or if cookies cannot be accessed.\n  ///\n  int (CEF_CALLBACK *set_cookie)(struct _cef_cookie_manager_t* self,\n      const cef_string_t* url, const struct _cef_cookie_t* cookie,\n      struct _cef_set_cookie_callback_t* callback);\n\n  ///\n  // Delete all cookies that match the specified parameters. If both |url| and\n  // |cookie_name| values are specified all host and domain cookies matching\n  // both will be deleted. If only |url| is specified all host cookies (but not\n  // domain cookies) irrespective of path will be deleted. If |url| is NULL all\n  // cookies for all hosts and domains will be deleted. If |callback| is non-\n  // NULL it will be executed asnychronously on the IO thread after the cookies\n  // have been deleted. Returns false (0) if a non-NULL invalid URL is specified\n  // or if cookies cannot be accessed. Cookies can alternately be deleted using\n  // the Visit*Cookies() functions.\n  ///\n  int (CEF_CALLBACK *delete_cookies)(struct _cef_cookie_manager_t* self,\n      const cef_string_t* url, const cef_string_t* cookie_name,\n      struct _cef_delete_cookies_callback_t* callback);\n\n  ///\n  // Sets the directory path that will be used for storing cookie data. If\n  // |path| is NULL data will be stored in memory only. Otherwise, data will be\n  // stored at the specified |path|. To persist session cookies (cookies without\n  // an expiry date or validity interval) set |persist_session_cookies| to true\n  // (1). Session cookies are generally intended to be transient and most Web\n  // browsers do not persist them. If |callback| is non-NULL it will be executed\n  // asnychronously on the IO thread after the manager's storage has been\n  // initialized. Returns false (0) if cookies cannot be accessed.\n  ///\n  int (CEF_CALLBACK *set_storage_path)(struct _cef_cookie_manager_t* self,\n      const cef_string_t* path, int persist_session_cookies,\n      struct _cef_completion_callback_t* callback);\n\n  ///\n  // Flush the backing store (if any) to disk. If |callback| is non-NULL it will\n  // be executed asnychronously on the IO thread after the flush is complete.\n  // Returns false (0) if cookies cannot be accessed.\n  ///\n  int (CEF_CALLBACK *flush_store)(struct _cef_cookie_manager_t* self,\n      struct _cef_completion_callback_t* callback);\n} cef_cookie_manager_t;\n\n\n///\n// Returns the global cookie manager. By default data will be stored at\n// CefSettings.cache_path if specified or in memory otherwise. If |callback| is\n// non-NULL it will be executed asnychronously on the IO thread after the\n// manager's storage has been initialized. Using this function is equivalent to\n// calling cef_request_tContext::cef_request_context_get_global_context()->get_d\n// efault_cookie_manager().\n///\nCEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager(\n    struct _cef_completion_callback_t* callback);\n\n///\n// Creates a new cookie manager. If |path| is NULL data will be stored in memory\n// only. Otherwise, data will be stored at the specified |path|. To persist\n// session cookies (cookies without an expiry date or validity interval) set\n// |persist_session_cookies| to true (1). Session cookies are generally intended\n// to be transient and most Web browsers do not persist them. If |callback| is\n// non-NULL it will be executed asnychronously on the IO thread after the\n// manager's storage has been initialized.\n///\nCEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_create_manager(\n    const cef_string_t* path, int persist_session_cookies,\n    struct _cef_completion_callback_t* callback);\n\n\n///\n// Structure to implement for visiting cookie values. The functions of this\n// structure will always be called on the IO thread.\n///\ntypedef struct _cef_cookie_visitor_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method that will be called once for each cookie. |count| is the 0-based\n  // index for the current cookie. |total| is the total number of cookies. Set\n  // |deleteCookie| to true (1) to delete the cookie currently being visited.\n  // Return false (0) to stop visiting cookies. This function may never be\n  // called if no cookies are found.\n  ///\n  int (CEF_CALLBACK *visit)(struct _cef_cookie_visitor_t* self,\n      const struct _cef_cookie_t* cookie, int count, int total,\n      int* deleteCookie);\n} cef_cookie_visitor_t;\n\n\n///\n// Structure to implement to be notified of asynchronous completion via\n// cef_cookie_manager_t::set_cookie().\n///\ntypedef struct _cef_set_cookie_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method that will be called upon completion. |success| will be true (1) if\n  // the cookie was set successfully.\n  ///\n  void (CEF_CALLBACK *on_complete)(struct _cef_set_cookie_callback_t* self,\n      int success);\n} cef_set_cookie_callback_t;\n\n\n///\n// Structure to implement to be notified of asynchronous completion via\n// cef_cookie_manager_t::delete_cookies().\n///\ntypedef struct _cef_delete_cookies_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method that will be called upon completion. |num_deleted| will be the\n  // number of cookies that were deleted or -1 if unknown.\n  ///\n  void (CEF_CALLBACK *on_complete)(struct _cef_delete_cookies_callback_t* self,\n      int num_deleted);\n} cef_delete_cookies_callback_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_dialog_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Callback structure for asynchronous continuation of file dialog requests.\n///\ntypedef struct _cef_file_dialog_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Continue the file selection. |selected_accept_filter| should be the 0-based\n  // index of the value selected from the accept filters array passed to\n  // cef_dialog_handler_t::OnFileDialog. |file_paths| should be a single value\n  // or a list of values depending on the dialog mode. An NULL |file_paths|\n  // value is treated the same as calling cancel().\n  ///\n  void (CEF_CALLBACK *cont)(struct _cef_file_dialog_callback_t* self,\n      int selected_accept_filter, cef_string_list_t file_paths);\n\n  ///\n  // Cancel the file selection.\n  ///\n  void (CEF_CALLBACK *cancel)(struct _cef_file_dialog_callback_t* self);\n} cef_file_dialog_callback_t;\n\n\n///\n// Implement this structure to handle dialog events. The functions of this\n// structure will be called on the browser process UI thread.\n///\ntypedef struct _cef_dialog_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called to run a file chooser dialog. |mode| represents the type of dialog\n  // to display. |title| to the title to be used for the dialog and may be NULL\n  // to show the default title (\"Open\" or \"Save\" depending on the mode).\n  // |default_file_path| is the path with optional directory and/or file name\n  // component that should be initially selected in the dialog. |accept_filters|\n  // are used to restrict the selectable file types and may any combination of\n  // (a) valid lower-cased MIME types (e.g. \"text/*\" or \"image/*\"), (b)\n  // individual file extensions (e.g. \".txt\" or \".png\"), or (c) combined\n  // description and file extension delimited using \"|\" and \";\" (e.g. \"Image\n  // Types|.png;.gif;.jpg\"). |selected_accept_filter| is the 0-based index of\n  // the filter that should be selected by default. To display a custom dialog\n  // return true (1) and execute |callback| either inline or at a later time. To\n  // display the default dialog return false (0).\n  ///\n  int (CEF_CALLBACK *on_file_dialog)(struct _cef_dialog_handler_t* self,\n      struct _cef_browser_t* browser, cef_file_dialog_mode_t mode,\n      const cef_string_t* title, const cef_string_t* default_file_path,\n      cef_string_list_t accept_filters, int selected_accept_filter,\n      struct _cef_file_dialog_callback_t* callback);\n} cef_dialog_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_display_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_frame_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to handle events related to browser display state.\n// The functions of this structure will be called on the UI thread.\n///\ntypedef struct _cef_display_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called when a frame's address has changed.\n  ///\n  void (CEF_CALLBACK *on_address_change)(struct _cef_display_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      const cef_string_t* url);\n\n  ///\n  // Called when the page title changes.\n  ///\n  void (CEF_CALLBACK *on_title_change)(struct _cef_display_handler_t* self,\n      struct _cef_browser_t* browser, const cef_string_t* title);\n\n  ///\n  // Called when the page icon changes.\n  ///\n  void (CEF_CALLBACK *on_favicon_urlchange)(struct _cef_display_handler_t* self,\n      struct _cef_browser_t* browser, cef_string_list_t icon_urls);\n\n  ///\n  // Called when web content in the page has toggled fullscreen mode. If\n  // |fullscreen| is true (1) the content will automatically be sized to fill\n  // the browser content area. If |fullscreen| is false (0) the content will\n  // automatically return to its original size and position. The client is\n  // responsible for resizing the browser if desired.\n  ///\n  void (CEF_CALLBACK *on_fullscreen_mode_change)(\n      struct _cef_display_handler_t* self, struct _cef_browser_t* browser,\n      int fullscreen);\n\n  ///\n  // Called when the browser is about to display a tooltip. |text| contains the\n  // text that will be displayed in the tooltip. To handle the display of the\n  // tooltip yourself return true (1). Otherwise, you can optionally modify\n  // |text| and then return false (0) to allow the browser to display the\n  // tooltip. When window rendering is disabled the application is responsible\n  // for drawing tooltips and the return value is ignored.\n  ///\n  int (CEF_CALLBACK *on_tooltip)(struct _cef_display_handler_t* self,\n      struct _cef_browser_t* browser, cef_string_t* text);\n\n  ///\n  // Called when the browser receives a status message. |value| contains the\n  // text that will be displayed in the status message.\n  ///\n  void (CEF_CALLBACK *on_status_message)(struct _cef_display_handler_t* self,\n      struct _cef_browser_t* browser, const cef_string_t* value);\n\n  ///\n  // Called to display a console message. Return true (1) to stop the message\n  // from being output to the console.\n  ///\n  int (CEF_CALLBACK *on_console_message)(struct _cef_display_handler_t* self,\n      struct _cef_browser_t* browser, const cef_string_t* message,\n      const cef_string_t* source, int line);\n} cef_display_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_dom_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_domdocument_t;\nstruct _cef_domnode_t;\n\n///\n// Structure to implement for visiting the DOM. The functions of this structure\n// will be called on the render process main thread.\n///\ntypedef struct _cef_domvisitor_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method executed for visiting the DOM. The document object passed to this\n  // function represents a snapshot of the DOM at the time this function is\n  // executed. DOM objects are only valid for the scope of this function. Do not\n  // keep references to or attempt to access any DOM objects outside the scope\n  // of this function.\n  ///\n  void (CEF_CALLBACK *visit)(struct _cef_domvisitor_t* self,\n      struct _cef_domdocument_t* document);\n} cef_domvisitor_t;\n\n\n///\n// Structure used to represent a DOM document. The functions of this structure\n// should only be called on the render process main thread thread.\n///\ntypedef struct _cef_domdocument_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns the document type.\n  ///\n  cef_dom_document_type_t (CEF_CALLBACK *get_type)(\n      struct _cef_domdocument_t* self);\n\n  ///\n  // Returns the root document node.\n  ///\n  struct _cef_domnode_t* (CEF_CALLBACK *get_document)(\n      struct _cef_domdocument_t* self);\n\n  ///\n  // Returns the BODY node of an HTML document.\n  ///\n  struct _cef_domnode_t* (CEF_CALLBACK *get_body)(\n      struct _cef_domdocument_t* self);\n\n  ///\n  // Returns the HEAD node of an HTML document.\n  ///\n  struct _cef_domnode_t* (CEF_CALLBACK *get_head)(\n      struct _cef_domdocument_t* self);\n\n  ///\n  // Returns the title of an HTML document.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_title)(\n      struct _cef_domdocument_t* self);\n\n  ///\n  // Returns the document element with the specified ID value.\n  ///\n  struct _cef_domnode_t* (CEF_CALLBACK *get_element_by_id)(\n      struct _cef_domdocument_t* self, const cef_string_t* id);\n\n  ///\n  // Returns the node that currently has keyboard focus.\n  ///\n  struct _cef_domnode_t* (CEF_CALLBACK *get_focused_node)(\n      struct _cef_domdocument_t* self);\n\n  ///\n  // Returns true (1) if a portion of the document is selected.\n  ///\n  int (CEF_CALLBACK *has_selection)(struct _cef_domdocument_t* self);\n\n  ///\n  // Returns the selection offset within the start node.\n  ///\n  int (CEF_CALLBACK *get_selection_start_offset)(\n      struct _cef_domdocument_t* self);\n\n  ///\n  // Returns the selection offset within the end node.\n  ///\n  int (CEF_CALLBACK *get_selection_end_offset)(struct _cef_domdocument_t* self);\n\n  ///\n  // Returns the contents of this selection as markup.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_selection_as_markup)(\n      struct _cef_domdocument_t* self);\n\n  ///\n  // Returns the contents of this selection as text.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_selection_as_text)(\n      struct _cef_domdocument_t* self);\n\n  ///\n  // Returns the base URL for the document.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_base_url)(\n      struct _cef_domdocument_t* self);\n\n  ///\n  // Returns a complete URL based on the document base URL and the specified\n  // partial URL.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_complete_url)(\n      struct _cef_domdocument_t* self, const cef_string_t* partialURL);\n} cef_domdocument_t;\n\n\n///\n// Structure used to represent a DOM node. The functions of this structure\n// should only be called on the render process main thread.\n///\ntypedef struct _cef_domnode_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns the type for this node.\n  ///\n  cef_dom_node_type_t (CEF_CALLBACK *get_type)(struct _cef_domnode_t* self);\n\n  ///\n  // Returns true (1) if this is a text node.\n  ///\n  int (CEF_CALLBACK *is_text)(struct _cef_domnode_t* self);\n\n  ///\n  // Returns true (1) if this is an element node.\n  ///\n  int (CEF_CALLBACK *is_element)(struct _cef_domnode_t* self);\n\n  ///\n  // Returns true (1) if this is an editable node.\n  ///\n  int (CEF_CALLBACK *is_editable)(struct _cef_domnode_t* self);\n\n  ///\n  // Returns true (1) if this is a form control element node.\n  ///\n  int (CEF_CALLBACK *is_form_control_element)(struct _cef_domnode_t* self);\n\n  ///\n  // Returns the type of this form control element node.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_form_control_element_type)(\n      struct _cef_domnode_t* self);\n\n  ///\n  // Returns true (1) if this object is pointing to the same handle as |that|\n  // object.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_domnode_t* self,\n      struct _cef_domnode_t* that);\n\n  ///\n  // Returns the name of this node.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_name)(struct _cef_domnode_t* self);\n\n  ///\n  // Returns the value of this node.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_value)(struct _cef_domnode_t* self);\n\n  ///\n  // Set the value of this node. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *set_value)(struct _cef_domnode_t* self,\n      const cef_string_t* value);\n\n  ///\n  // Returns the contents of this node as markup.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_as_markup)(\n      struct _cef_domnode_t* self);\n\n  ///\n  // Returns the document associated with this node.\n  ///\n  struct _cef_domdocument_t* (CEF_CALLBACK *get_document)(\n      struct _cef_domnode_t* self);\n\n  ///\n  // Returns the parent node.\n  ///\n  struct _cef_domnode_t* (CEF_CALLBACK *get_parent)(\n      struct _cef_domnode_t* self);\n\n  ///\n  // Returns the previous sibling node.\n  ///\n  struct _cef_domnode_t* (CEF_CALLBACK *get_previous_sibling)(\n      struct _cef_domnode_t* self);\n\n  ///\n  // Returns the next sibling node.\n  ///\n  struct _cef_domnode_t* (CEF_CALLBACK *get_next_sibling)(\n      struct _cef_domnode_t* self);\n\n  ///\n  // Returns true (1) if this node has child nodes.\n  ///\n  int (CEF_CALLBACK *has_children)(struct _cef_domnode_t* self);\n\n  ///\n  // Return the first child node.\n  ///\n  struct _cef_domnode_t* (CEF_CALLBACK *get_first_child)(\n      struct _cef_domnode_t* self);\n\n  ///\n  // Returns the last child node.\n  ///\n  struct _cef_domnode_t* (CEF_CALLBACK *get_last_child)(\n      struct _cef_domnode_t* self);\n\n\n  // The following functions are valid only for element nodes.\n\n  ///\n  // Returns the tag name of this element.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_element_tag_name)(\n      struct _cef_domnode_t* self);\n\n  ///\n  // Returns true (1) if this element has attributes.\n  ///\n  int (CEF_CALLBACK *has_element_attributes)(struct _cef_domnode_t* self);\n\n  ///\n  // Returns true (1) if this element has an attribute named |attrName|.\n  ///\n  int (CEF_CALLBACK *has_element_attribute)(struct _cef_domnode_t* self,\n      const cef_string_t* attrName);\n\n  ///\n  // Returns the element attribute named |attrName|.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_element_attribute)(\n      struct _cef_domnode_t* self, const cef_string_t* attrName);\n\n  ///\n  // Returns a map of all element attributes.\n  ///\n  void (CEF_CALLBACK *get_element_attributes)(struct _cef_domnode_t* self,\n      cef_string_map_t attrMap);\n\n  ///\n  // Set the value for the element attribute named |attrName|. Returns true (1)\n  // on success.\n  ///\n  int (CEF_CALLBACK *set_element_attribute)(struct _cef_domnode_t* self,\n      const cef_string_t* attrName, const cef_string_t* value);\n\n  ///\n  // Returns the inner text of the element.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_element_inner_text)(\n      struct _cef_domnode_t* self);\n} cef_domnode_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_download_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_download_item_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Callback structure used to asynchronously continue a download.\n///\ntypedef struct _cef_before_download_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Call to continue the download. Set |download_path| to the full file path\n  // for the download including the file name or leave blank to use the\n  // suggested name and the default temp directory. Set |show_dialog| to true\n  // (1) if you do wish to show the default \"Save As\" dialog.\n  ///\n  void (CEF_CALLBACK *cont)(struct _cef_before_download_callback_t* self,\n      const cef_string_t* download_path, int show_dialog);\n} cef_before_download_callback_t;\n\n\n///\n// Callback structure used to asynchronously cancel a download.\n///\ntypedef struct _cef_download_item_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Call to cancel the download.\n  ///\n  void (CEF_CALLBACK *cancel)(struct _cef_download_item_callback_t* self);\n\n  ///\n  // Call to pause the download.\n  ///\n  void (CEF_CALLBACK *pause)(struct _cef_download_item_callback_t* self);\n\n  ///\n  // Call to resume the download.\n  ///\n  void (CEF_CALLBACK *resume)(struct _cef_download_item_callback_t* self);\n} cef_download_item_callback_t;\n\n\n///\n// Structure used to handle file downloads. The functions of this structure will\n// called on the browser process UI thread.\n///\ntypedef struct _cef_download_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called before a download begins. |suggested_name| is the suggested name for\n  // the download file. By default the download will be canceled. Execute\n  // |callback| either asynchronously or in this function to continue the\n  // download if desired. Do not keep a reference to |download_item| outside of\n  // this function.\n  ///\n  void (CEF_CALLBACK *on_before_download)(struct _cef_download_handler_t* self,\n      struct _cef_browser_t* browser,\n      struct _cef_download_item_t* download_item,\n      const cef_string_t* suggested_name,\n      struct _cef_before_download_callback_t* callback);\n\n  ///\n  // Called when a download's status or progress information has been updated.\n  // This may be called multiple times before and after on_before_download().\n  // Execute |callback| either asynchronously or in this function to cancel the\n  // download if desired. Do not keep a reference to |download_item| outside of\n  // this function.\n  ///\n  void (CEF_CALLBACK *on_download_updated)(struct _cef_download_handler_t* self,\n      struct _cef_browser_t* browser,\n      struct _cef_download_item_t* download_item,\n      struct _cef_download_item_callback_t* callback);\n} cef_download_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_download_item_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure used to represent a download item.\n///\ntypedef struct _cef_download_item_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is valid. Do not call any other functions\n  // if this function returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_download_item_t* self);\n\n  ///\n  // Returns true (1) if the download is in progress.\n  ///\n  int (CEF_CALLBACK *is_in_progress)(struct _cef_download_item_t* self);\n\n  ///\n  // Returns true (1) if the download is complete.\n  ///\n  int (CEF_CALLBACK *is_complete)(struct _cef_download_item_t* self);\n\n  ///\n  // Returns true (1) if the download has been canceled or interrupted.\n  ///\n  int (CEF_CALLBACK *is_canceled)(struct _cef_download_item_t* self);\n\n  ///\n  // Returns a simple speed estimate in bytes/s.\n  ///\n  int64 (CEF_CALLBACK *get_current_speed)(struct _cef_download_item_t* self);\n\n  ///\n  // Returns the rough percent complete or -1 if the receive total size is\n  // unknown.\n  ///\n  int (CEF_CALLBACK *get_percent_complete)(struct _cef_download_item_t* self);\n\n  ///\n  // Returns the total number of bytes.\n  ///\n  int64 (CEF_CALLBACK *get_total_bytes)(struct _cef_download_item_t* self);\n\n  ///\n  // Returns the number of received bytes.\n  ///\n  int64 (CEF_CALLBACK *get_received_bytes)(struct _cef_download_item_t* self);\n\n  ///\n  // Returns the time that the download started.\n  ///\n  cef_time_t (CEF_CALLBACK *get_start_time)(struct _cef_download_item_t* self);\n\n  ///\n  // Returns the time that the download ended.\n  ///\n  cef_time_t (CEF_CALLBACK *get_end_time)(struct _cef_download_item_t* self);\n\n  ///\n  // Returns the full path to the downloaded or downloading file.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_full_path)(\n      struct _cef_download_item_t* self);\n\n  ///\n  // Returns the unique identifier for this download.\n  ///\n  uint32 (CEF_CALLBACK *get_id)(struct _cef_download_item_t* self);\n\n  ///\n  // Returns the URL.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_url)(\n      struct _cef_download_item_t* self);\n\n  ///\n  // Returns the original URL before any redirections.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_original_url)(\n      struct _cef_download_item_t* self);\n\n  ///\n  // Returns the suggested file name.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_suggested_file_name)(\n      struct _cef_download_item_t* self);\n\n  ///\n  // Returns the content disposition.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_content_disposition)(\n      struct _cef_download_item_t* self);\n\n  ///\n  // Returns the mime type.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_mime_type)(\n      struct _cef_download_item_t* self);\n} cef_download_item_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_drag_data_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_stream_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure used to represent drag data. The functions of this structure may be\n// called on any thread.\n///\ntypedef struct _cef_drag_data_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns a copy of the current object.\n  ///\n  struct _cef_drag_data_t* (CEF_CALLBACK *clone)(struct _cef_drag_data_t* self);\n\n  ///\n  // Returns true (1) if this object is read-only.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_drag_data_t* self);\n\n  ///\n  // Returns true (1) if the drag data is a link.\n  ///\n  int (CEF_CALLBACK *is_link)(struct _cef_drag_data_t* self);\n\n  ///\n  // Returns true (1) if the drag data is a text or html fragment.\n  ///\n  int (CEF_CALLBACK *is_fragment)(struct _cef_drag_data_t* self);\n\n  ///\n  // Returns true (1) if the drag data is a file.\n  ///\n  int (CEF_CALLBACK *is_file)(struct _cef_drag_data_t* self);\n\n  ///\n  // Return the link URL that is being dragged.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_link_url)(\n      struct _cef_drag_data_t* self);\n\n  ///\n  // Return the title associated with the link being dragged.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_link_title)(\n      struct _cef_drag_data_t* self);\n\n  ///\n  // Return the metadata, if any, associated with the link being dragged.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_link_metadata)(\n      struct _cef_drag_data_t* self);\n\n  ///\n  // Return the plain text fragment that is being dragged.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_fragment_text)(\n      struct _cef_drag_data_t* self);\n\n  ///\n  // Return the text/html fragment that is being dragged.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_fragment_html)(\n      struct _cef_drag_data_t* self);\n\n  ///\n  // Return the base URL that the fragment came from. This value is used for\n  // resolving relative URLs and may be NULL.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_fragment_base_url)(\n      struct _cef_drag_data_t* self);\n\n  ///\n  // Return the name of the file being dragged out of the browser window.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_file_name)(\n      struct _cef_drag_data_t* self);\n\n  ///\n  // Write the contents of the file being dragged out of the web view into\n  // |writer|. Returns the number of bytes sent to |writer|. If |writer| is NULL\n  // this function will return the size of the file contents in bytes. Call\n  // get_file_name() to get a suggested name for the file.\n  ///\n  size_t (CEF_CALLBACK *get_file_contents)(struct _cef_drag_data_t* self,\n      struct _cef_stream_writer_t* writer);\n\n  ///\n  // Retrieve the list of file names that are being dragged into the browser\n  // window.\n  ///\n  int (CEF_CALLBACK *get_file_names)(struct _cef_drag_data_t* self,\n      cef_string_list_t names);\n\n  ///\n  // Set the link URL that is being dragged.\n  ///\n  void (CEF_CALLBACK *set_link_url)(struct _cef_drag_data_t* self,\n      const cef_string_t* url);\n\n  ///\n  // Set the title associated with the link being dragged.\n  ///\n  void (CEF_CALLBACK *set_link_title)(struct _cef_drag_data_t* self,\n      const cef_string_t* title);\n\n  ///\n  // Set the metadata associated with the link being dragged.\n  ///\n  void (CEF_CALLBACK *set_link_metadata)(struct _cef_drag_data_t* self,\n      const cef_string_t* data);\n\n  ///\n  // Set the plain text fragment that is being dragged.\n  ///\n  void (CEF_CALLBACK *set_fragment_text)(struct _cef_drag_data_t* self,\n      const cef_string_t* text);\n\n  ///\n  // Set the text/html fragment that is being dragged.\n  ///\n  void (CEF_CALLBACK *set_fragment_html)(struct _cef_drag_data_t* self,\n      const cef_string_t* html);\n\n  ///\n  // Set the base URL that the fragment came from.\n  ///\n  void (CEF_CALLBACK *set_fragment_base_url)(struct _cef_drag_data_t* self,\n      const cef_string_t* base_url);\n\n  ///\n  // Reset the file contents. You should do this before calling\n  // cef_browser_host_t::DragTargetDragEnter as the web view does not allow us\n  // to drag in this kind of data.\n  ///\n  void (CEF_CALLBACK *reset_file_contents)(struct _cef_drag_data_t* self);\n\n  ///\n  // Add a file that is being dragged into the webview.\n  ///\n  void (CEF_CALLBACK *add_file)(struct _cef_drag_data_t* self,\n      const cef_string_t* path, const cef_string_t* display_name);\n} cef_drag_data_t;\n\n\n///\n// Create a new cef_drag_data_t object.\n///\nCEF_EXPORT cef_drag_data_t* cef_drag_data_create();\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_drag_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_drag_data_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to handle events related to dragging. The functions\n// of this structure will be called on the UI thread.\n///\ntypedef struct _cef_drag_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called when an external drag event enters the browser window. |dragData|\n  // contains the drag event data and |mask| represents the type of drag\n  // operation. Return false (0) for default drag handling behavior or true (1)\n  // to cancel the drag event.\n  ///\n  int (CEF_CALLBACK *on_drag_enter)(struct _cef_drag_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_drag_data_t* dragData,\n      cef_drag_operations_mask_t mask);\n\n  ///\n  // Called whenever draggable regions for the browser window change. These can\n  // be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If\n  // draggable regions are never defined in a document this function will also\n  // never be called. If the last draggable region is removed from a document\n  // this function will be called with an NULL vector.\n  ///\n  void (CEF_CALLBACK *on_draggable_regions_changed)(\n      struct _cef_drag_handler_t* self, struct _cef_browser_t* browser,\n      size_t regionsCount, cef_draggable_region_t const* regions);\n} cef_drag_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_find_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to handle events related to find results. The\n// functions of this structure will be called on the UI thread.\n///\ntypedef struct _cef_find_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called to report find results returned by cef_browser_host_t::find().\n  // |identifer| is the identifier passed to find(), |count| is the number of\n  // matches currently identified, |selectionRect| is the location of where the\n  // match was found (in window coordinates), |activeMatchOrdinal| is the\n  // current position in the search results, and |finalUpdate| is true (1) if\n  // this is the last find notification.\n  ///\n  void (CEF_CALLBACK *on_find_result)(struct _cef_find_handler_t* self,\n      struct _cef_browser_t* browser, int identifier, int count,\n      const cef_rect_t* selectionRect, int activeMatchOrdinal,\n      int finalUpdate);\n} cef_find_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_focus_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_dom_capi.h\"\n#include \"include/capi/cef_frame_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to handle events related to focus. The functions of\n// this structure will be called on the UI thread.\n///\ntypedef struct _cef_focus_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called when the browser component is about to loose focus. For instance, if\n  // focus was on the last HTML element and the user pressed the TAB key. |next|\n  // will be true (1) if the browser is giving focus to the next component and\n  // false (0) if the browser is giving focus to the previous component.\n  ///\n  void (CEF_CALLBACK *on_take_focus)(struct _cef_focus_handler_t* self,\n      struct _cef_browser_t* browser, int next);\n\n  ///\n  // Called when the browser component is requesting focus. |source| indicates\n  // where the focus request is originating from. Return false (0) to allow the\n  // focus to be set or true (1) to cancel setting the focus.\n  ///\n  int (CEF_CALLBACK *on_set_focus)(struct _cef_focus_handler_t* self,\n      struct _cef_browser_t* browser, cef_focus_source_t source);\n\n  ///\n  // Called when the browser component has received focus.\n  ///\n  void (CEF_CALLBACK *on_got_focus)(struct _cef_focus_handler_t* self,\n      struct _cef_browser_t* browser);\n} cef_focus_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_frame_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_dom_capi.h\"\n#include \"include/capi/cef_request_capi.h\"\n#include \"include/capi/cef_stream_capi.h\"\n#include \"include/capi/cef_string_visitor_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_browser_t;\nstruct _cef_v8context_t;\n\n///\n// Structure used to represent a frame in the browser window. When used in the\n// browser process the functions of this structure may be called on any thread\n// unless otherwise indicated in the comments. When used in the render process\n// the functions of this structure may only be called on the main thread.\n///\ntypedef struct _cef_frame_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // True if this object is currently attached to a valid frame.\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_frame_t* self);\n\n  ///\n  // Execute undo in this frame.\n  ///\n  void (CEF_CALLBACK *undo)(struct _cef_frame_t* self);\n\n  ///\n  // Execute redo in this frame.\n  ///\n  void (CEF_CALLBACK *redo)(struct _cef_frame_t* self);\n\n  ///\n  // Execute cut in this frame.\n  ///\n  void (CEF_CALLBACK *cut)(struct _cef_frame_t* self);\n\n  ///\n  // Execute copy in this frame.\n  ///\n  void (CEF_CALLBACK *copy)(struct _cef_frame_t* self);\n\n  ///\n  // Execute paste in this frame.\n  ///\n  void (CEF_CALLBACK *paste)(struct _cef_frame_t* self);\n\n  ///\n  // Execute delete in this frame.\n  ///\n  void (CEF_CALLBACK *del)(struct _cef_frame_t* self);\n\n  ///\n  // Execute select all in this frame.\n  ///\n  void (CEF_CALLBACK *select_all)(struct _cef_frame_t* self);\n\n  ///\n  // Save this frame's HTML source to a temporary file and open it in the\n  // default text viewing application. This function can only be called from the\n  // browser process.\n  ///\n  void (CEF_CALLBACK *view_source)(struct _cef_frame_t* self);\n\n  ///\n  // Retrieve this frame's HTML source as a string sent to the specified\n  // visitor.\n  ///\n  void (CEF_CALLBACK *get_source)(struct _cef_frame_t* self,\n      struct _cef_string_visitor_t* visitor);\n\n  ///\n  // Retrieve this frame's display text as a string sent to the specified\n  // visitor.\n  ///\n  void (CEF_CALLBACK *get_text)(struct _cef_frame_t* self,\n      struct _cef_string_visitor_t* visitor);\n\n  ///\n  // Load the request represented by the |request| object.\n  ///\n  void (CEF_CALLBACK *load_request)(struct _cef_frame_t* self,\n      struct _cef_request_t* request);\n\n  ///\n  // Load the specified |url|.\n  ///\n  void (CEF_CALLBACK *load_url)(struct _cef_frame_t* self,\n      const cef_string_t* url);\n\n  ///\n  // Load the contents of |string_val| with the specified dummy |url|. |url|\n  // should have a standard scheme (for example, http scheme) or behaviors like\n  // link clicks and web security restrictions may not behave as expected.\n  ///\n  void (CEF_CALLBACK *load_string)(struct _cef_frame_t* self,\n      const cef_string_t* string_val, const cef_string_t* url);\n\n  ///\n  // Execute a string of JavaScript code in this frame. The |script_url|\n  // parameter is the URL where the script in question can be found, if any. The\n  // renderer may request this URL to show the developer the source of the\n  // error.  The |start_line| parameter is the base line number to use for error\n  // reporting.\n  ///\n  void (CEF_CALLBACK *execute_java_script)(struct _cef_frame_t* self,\n      const cef_string_t* code, const cef_string_t* script_url,\n      int start_line);\n\n  ///\n  // Returns true (1) if this is the main (top-level) frame.\n  ///\n  int (CEF_CALLBACK *is_main)(struct _cef_frame_t* self);\n\n  ///\n  // Returns true (1) if this is the focused frame.\n  ///\n  int (CEF_CALLBACK *is_focused)(struct _cef_frame_t* self);\n\n  ///\n  // Returns the name for this frame. If the frame has an assigned name (for\n  // example, set via the iframe \"name\" attribute) then that value will be\n  // returned. Otherwise a unique name will be constructed based on the frame\n  // parent hierarchy. The main (top-level) frame will always have an NULL name\n  // value.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_name)(struct _cef_frame_t* self);\n\n  ///\n  // Returns the globally unique identifier for this frame or < 0 if the\n  // underlying frame does not yet exist.\n  ///\n  int64 (CEF_CALLBACK *get_identifier)(struct _cef_frame_t* self);\n\n  ///\n  // Returns the parent of this frame or NULL if this is the main (top-level)\n  // frame.\n  ///\n  struct _cef_frame_t* (CEF_CALLBACK *get_parent)(struct _cef_frame_t* self);\n\n  ///\n  // Returns the URL currently loaded in this frame.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_url)(struct _cef_frame_t* self);\n\n  ///\n  // Returns the browser that this frame belongs to.\n  ///\n  struct _cef_browser_t* (CEF_CALLBACK *get_browser)(struct _cef_frame_t* self);\n\n  ///\n  // Get the V8 context associated with the frame. This function can only be\n  // called from the render process.\n  ///\n  struct _cef_v8context_t* (CEF_CALLBACK *get_v8context)(\n      struct _cef_frame_t* self);\n\n  ///\n  // Visit the DOM document. This function can only be called from the render\n  // process.\n  ///\n  void (CEF_CALLBACK *visit_dom)(struct _cef_frame_t* self,\n      struct _cef_domvisitor_t* visitor);\n} cef_frame_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_geolocation_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to receive geolocation updates. The functions of\n// this structure will be called on the browser process UI thread.\n///\ntypedef struct _cef_get_geolocation_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called with the 'best available' location information or, if the location\n  // update failed, with error information.\n  ///\n  void (CEF_CALLBACK *on_location_update)(\n      struct _cef_get_geolocation_callback_t* self,\n      const struct _cef_geoposition_t* position);\n} cef_get_geolocation_callback_t;\n\n\n///\n// Request a one-time geolocation update. This function bypasses any user\n// permission checks so should only be used by code that is allowed to access\n// location information.\n///\nCEF_EXPORT int cef_get_geolocation(cef_get_geolocation_callback_t* callback);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_geolocation_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_GEOLOCATION_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_GEOLOCATION_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Callback structure used for asynchronous continuation of geolocation\n// permission requests.\n///\ntypedef struct _cef_geolocation_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Call to allow or deny geolocation access.\n  ///\n  void (CEF_CALLBACK *cont)(struct _cef_geolocation_callback_t* self,\n      int allow);\n} cef_geolocation_callback_t;\n\n\n///\n// Implement this structure to handle events related to geolocation permission\n// requests. The functions of this structure will be called on the browser\n// process UI thread.\n///\ntypedef struct _cef_geolocation_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called when a page requests permission to access geolocation information.\n  // |requesting_url| is the URL requesting permission and |request_id| is the\n  // unique ID for the permission request. Return true (1) and call\n  // cef_geolocation_callback_t::cont() either in this function or at a later\n  // time to continue or cancel the request. Return false (0) to cancel the\n  // request immediately.\n  ///\n  int (CEF_CALLBACK *on_request_geolocation_permission)(\n      struct _cef_geolocation_handler_t* self, struct _cef_browser_t* browser,\n      const cef_string_t* requesting_url, int request_id,\n      struct _cef_geolocation_callback_t* callback);\n\n  ///\n  // Called when a geolocation access request is canceled. |request_id| is the\n  // unique ID for the permission request.\n  ///\n  void (CEF_CALLBACK *on_cancel_geolocation_permission)(\n      struct _cef_geolocation_handler_t* self, struct _cef_browser_t* browser,\n      int request_id);\n} cef_geolocation_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_GEOLOCATION_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_image_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_values_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Container for a single image represented at different scale factors. All\n// image representations should be the same size in density independent pixel\n// (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels\n// then the image at scale factor 2.0 should be 200x200 pixels -- both images\n// will display with a DIP size of 100x100 units. The functions of this\n// structure must be called on the browser process UI thread.\n///\ntypedef struct _cef_image_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this Image is NULL.\n  ///\n  int (CEF_CALLBACK *is_empty)(struct _cef_image_t* self);\n\n  ///\n  // Returns true (1) if this Image and |that| Image share the same underlying\n  // storage. Will also return true (1) if both images are NULL.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_image_t* self,\n      struct _cef_image_t* that);\n\n  ///\n  // Add a bitmap image representation for |scale_factor|. Only 32-bit RGBA/BGRA\n  // formats are supported. |pixel_width| and |pixel_height| are the bitmap\n  // representation size in pixel coordinates. |pixel_data| is the array of\n  // pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in size.\n  // |color_type| and |alpha_type| values specify the pixel format.\n  ///\n  int (CEF_CALLBACK *add_bitmap)(struct _cef_image_t* self, float scale_factor,\n      int pixel_width, int pixel_height, cef_color_type_t color_type,\n      cef_alpha_type_t alpha_type, const void* pixel_data,\n      size_t pixel_data_size);\n\n  ///\n  // Add a PNG image representation for |scale_factor|. |png_data| is the image\n  // data of size |png_data_size|. Any alpha transparency in the PNG data will\n  // be maintained.\n  ///\n  int (CEF_CALLBACK *add_png)(struct _cef_image_t* self, float scale_factor,\n      const void* png_data, size_t png_data_size);\n\n  ///\n  // Create a JPEG image representation for |scale_factor|. |jpeg_data| is the\n  // image data of size |jpeg_data_size|. The JPEG format does not support\n  // transparency so the alpha byte will be set to 0xFF for all pixels.\n  ///\n  int (CEF_CALLBACK *add_jpeg)(struct _cef_image_t* self, float scale_factor,\n      const void* jpeg_data, size_t jpeg_data_size);\n\n  ///\n  // Returns the image width in density independent pixel (DIP) units.\n  ///\n  size_t (CEF_CALLBACK *get_width)(struct _cef_image_t* self);\n\n  ///\n  // Returns the image height in density independent pixel (DIP) units.\n  ///\n  size_t (CEF_CALLBACK *get_height)(struct _cef_image_t* self);\n\n  ///\n  // Returns true (1) if this image contains a representation for\n  // |scale_factor|.\n  ///\n  int (CEF_CALLBACK *has_representation)(struct _cef_image_t* self,\n      float scale_factor);\n\n  ///\n  // Removes the representation for |scale_factor|. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *remove_representation)(struct _cef_image_t* self,\n      float scale_factor);\n\n  ///\n  // Returns information for the representation that most closely matches\n  // |scale_factor|. |actual_scale_factor| is the actual scale factor for the\n  // representation. |pixel_width| and |pixel_height| are the representation\n  // size in pixel coordinates. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *get_representation_info)(struct _cef_image_t* self,\n      float scale_factor, float* actual_scale_factor, int* pixel_width,\n      int* pixel_height);\n\n  ///\n  // Returns the bitmap representation that most closely matches |scale_factor|.\n  // Only 32-bit RGBA/BGRA formats are supported. |color_type| and |alpha_type|\n  // values specify the desired output pixel format. |pixel_width| and\n  // |pixel_height| are the output representation size in pixel coordinates.\n  // Returns a cef_binary_value_t containing the pixel data on success or NULL\n  // on failure.\n  ///\n  struct _cef_binary_value_t* (CEF_CALLBACK *get_as_bitmap)(\n      struct _cef_image_t* self, float scale_factor,\n      cef_color_type_t color_type, cef_alpha_type_t alpha_type,\n      int* pixel_width, int* pixel_height);\n\n  ///\n  // Returns the PNG representation that most closely matches |scale_factor|. If\n  // |with_transparency| is true (1) any alpha transparency in the image will be\n  // represented in the resulting PNG data. |pixel_width| and |pixel_height| are\n  // the output representation size in pixel coordinates. Returns a\n  // cef_binary_value_t containing the PNG image data on success or NULL on\n  // failure.\n  ///\n  struct _cef_binary_value_t* (CEF_CALLBACK *get_as_png)(\n      struct _cef_image_t* self, float scale_factor, int with_transparency,\n      int* pixel_width, int* pixel_height);\n\n  ///\n  // Returns the JPEG representation that most closely matches |scale_factor|.\n  // |quality| determines the compression level with 0 == lowest and 100 ==\n  // highest. The JPEG format does not support alpha transparency and the alpha\n  // channel, if any, will be discarded. |pixel_width| and |pixel_height| are\n  // the output representation size in pixel coordinates. Returns a\n  // cef_binary_value_t containing the JPEG image data on success or NULL on\n  // failure.\n  ///\n  struct _cef_binary_value_t* (CEF_CALLBACK *get_as_jpeg)(\n      struct _cef_image_t* self, float scale_factor, int quality,\n      int* pixel_width, int* pixel_height);\n} cef_image_t;\n\n\n///\n// Create a new cef_image_t. It will initially be NULL. Use the Add*() functions\n// to add representations at different scale factors.\n///\nCEF_EXPORT cef_image_t* cef_image_create();\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_jsdialog_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Callback structure used for asynchronous continuation of JavaScript dialog\n// requests.\n///\ntypedef struct _cef_jsdialog_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Continue the JS dialog request. Set |success| to true (1) if the OK button\n  // was pressed. The |user_input| value should be specified for prompt dialogs.\n  ///\n  void (CEF_CALLBACK *cont)(struct _cef_jsdialog_callback_t* self, int success,\n      const cef_string_t* user_input);\n} cef_jsdialog_callback_t;\n\n\n///\n// Implement this structure to handle events related to JavaScript dialogs. The\n// functions of this structure will be called on the UI thread.\n///\ntypedef struct _cef_jsdialog_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called to run a JavaScript dialog. If |origin_url| is non-NULL it can be\n  // passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure\n  // and user-friendly display string. The |default_prompt_text| value will be\n  // specified for prompt dialogs only. Set |suppress_message| to true (1) and\n  // return false (0) to suppress the message (suppressing messages is\n  // preferable to immediately executing the callback as this is used to detect\n  // presumably malicious behavior like spamming alert messages in\n  // onbeforeunload). Set |suppress_message| to false (0) and return false (0)\n  // to use the default implementation (the default implementation will show one\n  // modal dialog at a time and suppress any additional dialog requests until\n  // the displayed dialog is dismissed). Return true (1) if the application will\n  // use a custom dialog or if the callback has been executed immediately.\n  // Custom dialogs may be either modal or modeless. If a custom dialog is used\n  // the application must execute |callback| once the custom dialog is\n  // dismissed.\n  ///\n  int (CEF_CALLBACK *on_jsdialog)(struct _cef_jsdialog_handler_t* self,\n      struct _cef_browser_t* browser, const cef_string_t* origin_url,\n      cef_jsdialog_type_t dialog_type, const cef_string_t* message_text,\n      const cef_string_t* default_prompt_text,\n      struct _cef_jsdialog_callback_t* callback, int* suppress_message);\n\n  ///\n  // Called to run a dialog asking the user if they want to leave a page. Return\n  // false (0) to use the default dialog implementation. Return true (1) if the\n  // application will use a custom dialog or if the callback has been executed\n  // immediately. Custom dialogs may be either modal or modeless. If a custom\n  // dialog is used the application must execute |callback| once the custom\n  // dialog is dismissed.\n  ///\n  int (CEF_CALLBACK *on_before_unload_dialog)(\n      struct _cef_jsdialog_handler_t* self, struct _cef_browser_t* browser,\n      const cef_string_t* message_text, int is_reload,\n      struct _cef_jsdialog_callback_t* callback);\n\n  ///\n  // Called to cancel any pending dialogs and reset any saved dialog state. Will\n  // be called due to events like page navigation irregardless of whether any\n  // dialogs are currently pending.\n  ///\n  void (CEF_CALLBACK *on_reset_dialog_state)(\n      struct _cef_jsdialog_handler_t* self, struct _cef_browser_t* browser);\n\n  ///\n  // Called when the default implementation dialog is closed.\n  ///\n  void (CEF_CALLBACK *on_dialog_closed)(struct _cef_jsdialog_handler_t* self,\n      struct _cef_browser_t* browser);\n} cef_jsdialog_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_keyboard_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to handle events related to keyboard input. The\n// functions of this structure will be called on the UI thread.\n///\ntypedef struct _cef_keyboard_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called before a keyboard event is sent to the renderer. |event| contains\n  // information about the keyboard event. |os_event| is the operating system\n  // event message, if any. Return true (1) if the event was handled or false\n  // (0) otherwise. If the event will be handled in on_key_event() as a keyboard\n  // shortcut set |is_keyboard_shortcut| to true (1) and return false (0).\n  ///\n  int (CEF_CALLBACK *on_pre_key_event)(struct _cef_keyboard_handler_t* self,\n      struct _cef_browser_t* browser, const struct _cef_key_event_t* event,\n      cef_event_handle_t os_event, int* is_keyboard_shortcut);\n\n  ///\n  // Called after the renderer and JavaScript in the page has had a chance to\n  // handle the event. |event| contains information about the keyboard event.\n  // |os_event| is the operating system event message, if any. Return true (1)\n  // if the keyboard event was handled or false (0) otherwise.\n  ///\n  int (CEF_CALLBACK *on_key_event)(struct _cef_keyboard_handler_t* self,\n      struct _cef_browser_t* browser, const struct _cef_key_event_t* event,\n      cef_event_handle_t os_event);\n} cef_keyboard_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_life_span_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_client_t;\n\n///\n// Implement this structure to handle events related to browser life span. The\n// functions of this structure will be called on the UI thread unless otherwise\n// indicated.\n///\ntypedef struct _cef_life_span_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called on the IO thread before a new popup browser is created. The\n  // |browser| and |frame| values represent the source of the popup request. The\n  // |target_url| and |target_frame_name| values indicate where the popup\n  // browser should navigate and may be NULL if not specified with the request.\n  // The |target_disposition| value indicates where the user intended to open\n  // the popup (e.g. current tab, new tab, etc). The |user_gesture| value will\n  // be true (1) if the popup was opened via explicit user gesture (e.g.\n  // clicking a link) or false (0) if the popup opened automatically (e.g. via\n  // the DomContentLoaded event). The |popupFeatures| structure contains\n  // additional information about the requested popup window. To allow creation\n  // of the popup browser optionally modify |windowInfo|, |client|, |settings|\n  // and |no_javascript_access| and return false (0). To cancel creation of the\n  // popup browser return true (1). The |client| and |settings| values will\n  // default to the source browser's values. If the |no_javascript_access| value\n  // is set to false (0) the new browser will not be scriptable and may not be\n  // hosted in the same renderer process as the source browser. Any\n  // modifications to |windowInfo| will be ignored if the parent browser is\n  // wrapped in a cef_browser_view_t.\n  ///\n  int (CEF_CALLBACK *on_before_popup)(struct _cef_life_span_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      const cef_string_t* target_url, const cef_string_t* target_frame_name,\n      cef_window_open_disposition_t target_disposition, int user_gesture,\n      const struct _cef_popup_features_t* popupFeatures,\n      struct _cef_window_info_t* windowInfo, struct _cef_client_t** client,\n      struct _cef_browser_settings_t* settings, int* no_javascript_access);\n\n  ///\n  // Called after a new browser is created. This callback will be the first\n  // notification that references |browser|.\n  ///\n  void (CEF_CALLBACK *on_after_created)(struct _cef_life_span_handler_t* self,\n      struct _cef_browser_t* browser);\n\n  ///\n  // Called when a browser has recieved a request to close. This may result\n  // directly from a call to cef_browser_host_t::*close_browser() or indirectly\n  // if the browser is parented to a top-level window created by CEF and the\n  // user attempts to close that window (by clicking the 'X', for example). The\n  // do_close() function will be called after the JavaScript 'onunload' event\n  // has been fired.\n  //\n  // An application should handle top-level owner window close notifications by\n  // calling cef_browser_host_t::Tryclose_browser() or\n  // cef_browser_host_t::CloseBrowser(false (0)) instead of allowing the window\n  // to close immediately (see the examples below). This gives CEF an\n  // opportunity to process the 'onbeforeunload' event and optionally cancel the\n  // close before do_close() is called.\n  //\n  // When windowed rendering is enabled CEF will internally create a window or\n  // view to host the browser. In that case returning false (0) from do_close()\n  // will send the standard close notification to the browser's top-level owner\n  // window (e.g. WM_CLOSE on Windows, performClose: on OS X, \"delete_event\" on\n  // Linux or cef_window_delegate_t::can_close() callback from Views). If the\n  // browser's host window/view has already been destroyed (via view hierarchy\n  // tear-down, for example) then do_close() will not be called for that browser\n  // since is no longer possible to cancel the close.\n  //\n  // When windowed rendering is disabled returning false (0) from do_close()\n  // will cause the browser object to be destroyed immediately.\n  //\n  // If the browser's top-level owner window requires a non-standard close\n  // notification then send that notification from do_close() and return true\n  // (1).\n  //\n  // The cef_life_span_handler_t::on_before_close() function will be called\n  // after do_close() (if do_close() is called) and immediately before the\n  // browser object is destroyed. The application should only exit after\n  // on_before_close() has been called for all existing browsers.\n  //\n  // The below examples describe what should happen during window close when the\n  // browser is parented to an application-provided top-level window.\n  //\n  // Example 1: Using cef_browser_host_t::Tryclose_browser(). This is\n  // recommended for clients using standard close handling and windows created\n  // on the browser process UI thread. 1.  User clicks the window close button\n  // which sends a close notification to\n  //     the application's top-level window.\n  // 2.  Application's top-level window receives the close notification and\n  //     calls TryCloseBrowser() (which internally calls CloseBrowser(false)).\n  //     TryCloseBrowser() returns false so the client cancels the window close.\n  // 3.  JavaScript 'onbeforeunload' handler executes and shows the close\n  //     confirmation dialog (which can be overridden via\n  //     CefJSDialogHandler::OnBeforeUnloadDialog()).\n  // 4.  User approves the close. 5.  JavaScript 'onunload' handler executes. 6.\n  // CEF sends a close notification to the application's top-level window\n  //     (because DoClose() returned false by default).\n  // 7.  Application's top-level window receives the close notification and\n  //     calls TryCloseBrowser(). TryCloseBrowser() returns true so the client\n  //     allows the window close.\n  // 8.  Application's top-level window is destroyed. 9.  Application's\n  // on_before_close() handler is called and the browser object\n  //     is destroyed.\n  // 10. Application exits by calling cef_quit_message_loop() if no other\n  // browsers\n  //     exist.\n  //\n  // Example 2: Using cef_browser_host_t::CloseBrowser(false (0)) and\n  // implementing the do_close() callback. This is recommended for clients using\n  // non-standard close handling or windows that were not created on the browser\n  // process UI thread. 1.  User clicks the window close button which sends a\n  // close notification to\n  //     the application's top-level window.\n  // 2.  Application's top-level window receives the close notification and:\n  //     A. Calls CefBrowserHost::CloseBrowser(false).\n  //     B. Cancels the window close.\n  // 3.  JavaScript 'onbeforeunload' handler executes and shows the close\n  //     confirmation dialog (which can be overridden via\n  //     CefJSDialogHandler::OnBeforeUnloadDialog()).\n  // 4.  User approves the close. 5.  JavaScript 'onunload' handler executes. 6.\n  // Application's do_close() handler is called. Application will:\n  //     A. Set a flag to indicate that the next close attempt will be allowed.\n  //     B. Return false.\n  // 7.  CEF sends an close notification to the application's top-level window.\n  // 8.  Application's top-level window receives the close notification and\n  //     allows the window to close based on the flag from #6B.\n  // 9.  Application's top-level window is destroyed. 10. Application's\n  // on_before_close() handler is called and the browser object\n  //     is destroyed.\n  // 11. Application exits by calling cef_quit_message_loop() if no other\n  // browsers\n  //     exist.\n  ///\n  int (CEF_CALLBACK *do_close)(struct _cef_life_span_handler_t* self,\n      struct _cef_browser_t* browser);\n\n  ///\n  // Called just before a browser is destroyed. Release all references to the\n  // browser object and do not attempt to execute any functions on the browser\n  // object after this callback returns. This callback will be the last\n  // notification that references |browser|. See do_close() documentation for\n  // additional usage information.\n  ///\n  void (CEF_CALLBACK *on_before_close)(struct _cef_life_span_handler_t* self,\n      struct _cef_browser_t* browser);\n} cef_life_span_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_load_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_frame_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to handle events related to browser load status. The\n// functions of this structure will be called on the browser process UI thread\n// or render process main thread (TID_RENDERER).\n///\ntypedef struct _cef_load_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called when the loading state has changed. This callback will be executed\n  // twice -- once when loading is initiated either programmatically or by user\n  // action, and once when loading is terminated due to completion, cancellation\n  // of failure. It will be called before any calls to OnLoadStart and after all\n  // calls to OnLoadError and/or OnLoadEnd.\n  ///\n  void (CEF_CALLBACK *on_loading_state_change)(struct _cef_load_handler_t* self,\n      struct _cef_browser_t* browser, int isLoading, int canGoBack,\n      int canGoForward);\n\n  ///\n  // Called when the browser begins loading a frame. The |frame| value will\n  // never be NULL -- call the is_main() function to check if this frame is the\n  // main frame. Multiple frames may be loading at the same time. Sub-frames may\n  // start or continue loading after the main frame load has ended. This\n  // function will always be called for all frames irrespective of whether the\n  // request completes successfully. For notification of overall browser load\n  // status use OnLoadingStateChange instead.\n  ///\n  void (CEF_CALLBACK *on_load_start)(struct _cef_load_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame);\n\n  ///\n  // Called when the browser is done loading a frame. The |frame| value will\n  // never be NULL -- call the is_main() function to check if this frame is the\n  // main frame. Multiple frames may be loading at the same time. Sub-frames may\n  // start or continue loading after the main frame load has ended. This\n  // function will always be called for all frames irrespective of whether the\n  // request completes successfully. For notification of overall browser load\n  // status use OnLoadingStateChange instead.\n  ///\n  void (CEF_CALLBACK *on_load_end)(struct _cef_load_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      int httpStatusCode);\n\n  ///\n  // Called when the resource load for a navigation fails or is canceled.\n  // |errorCode| is the error code number, |errorText| is the error text and\n  // |failedUrl| is the URL that failed to load. See net\\base\\net_error_list.h\n  // for complete descriptions of the error codes.\n  ///\n  void (CEF_CALLBACK *on_load_error)(struct _cef_load_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      cef_errorcode_t errorCode, const cef_string_t* errorText,\n      const cef_string_t* failedUrl);\n} cef_load_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_menu_model_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_menu_model_delegate_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Supports creation and modification of menus. See cef_menu_id_t for the\n// command ids that have default implementations. All user-defined command ids\n// should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of\n// this structure can only be accessed on the browser process the UI thread.\n///\ntypedef struct _cef_menu_model_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Clears the menu. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *clear)(struct _cef_menu_model_t* self);\n\n  ///\n  // Returns the number of items in this menu.\n  ///\n  int (CEF_CALLBACK *get_count)(struct _cef_menu_model_t* self);\n\n  ///\n  // Add a separator to the menu. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *add_separator)(struct _cef_menu_model_t* self);\n\n  ///\n  // Add an item to the menu. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *add_item)(struct _cef_menu_model_t* self, int command_id,\n      const cef_string_t* label);\n\n  ///\n  // Add a check item to the menu. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *add_check_item)(struct _cef_menu_model_t* self,\n      int command_id, const cef_string_t* label);\n\n  ///\n  // Add a radio item to the menu. Only a single item with the specified\n  // |group_id| can be checked at a time. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *add_radio_item)(struct _cef_menu_model_t* self,\n      int command_id, const cef_string_t* label, int group_id);\n\n  ///\n  // Add a sub-menu to the menu. The new sub-menu is returned.\n  ///\n  struct _cef_menu_model_t* (CEF_CALLBACK *add_sub_menu)(\n      struct _cef_menu_model_t* self, int command_id,\n      const cef_string_t* label);\n\n  ///\n  // Insert a separator in the menu at the specified |index|. Returns true (1)\n  // on success.\n  ///\n  int (CEF_CALLBACK *insert_separator_at)(struct _cef_menu_model_t* self,\n      int index);\n\n  ///\n  // Insert an item in the menu at the specified |index|. Returns true (1) on\n  // success.\n  ///\n  int (CEF_CALLBACK *insert_item_at)(struct _cef_menu_model_t* self, int index,\n      int command_id, const cef_string_t* label);\n\n  ///\n  // Insert a check item in the menu at the specified |index|. Returns true (1)\n  // on success.\n  ///\n  int (CEF_CALLBACK *insert_check_item_at)(struct _cef_menu_model_t* self,\n      int index, int command_id, const cef_string_t* label);\n\n  ///\n  // Insert a radio item in the menu at the specified |index|. Only a single\n  // item with the specified |group_id| can be checked at a time. Returns true\n  // (1) on success.\n  ///\n  int (CEF_CALLBACK *insert_radio_item_at)(struct _cef_menu_model_t* self,\n      int index, int command_id, const cef_string_t* label, int group_id);\n\n  ///\n  // Insert a sub-menu in the menu at the specified |index|. The new sub-menu is\n  // returned.\n  ///\n  struct _cef_menu_model_t* (CEF_CALLBACK *insert_sub_menu_at)(\n      struct _cef_menu_model_t* self, int index, int command_id,\n      const cef_string_t* label);\n\n  ///\n  // Removes the item with the specified |command_id|. Returns true (1) on\n  // success.\n  ///\n  int (CEF_CALLBACK *remove)(struct _cef_menu_model_t* self, int command_id);\n\n  ///\n  // Removes the item at the specified |index|. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *remove_at)(struct _cef_menu_model_t* self, int index);\n\n  ///\n  // Returns the index associated with the specified |command_id| or -1 if not\n  // found due to the command id not existing in the menu.\n  ///\n  int (CEF_CALLBACK *get_index_of)(struct _cef_menu_model_t* self,\n      int command_id);\n\n  ///\n  // Returns the command id at the specified |index| or -1 if not found due to\n  // invalid range or the index being a separator.\n  ///\n  int (CEF_CALLBACK *get_command_id_at)(struct _cef_menu_model_t* self,\n      int index);\n\n  ///\n  // Sets the command id at the specified |index|. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *set_command_id_at)(struct _cef_menu_model_t* self,\n      int index, int command_id);\n\n  ///\n  // Returns the label for the specified |command_id| or NULL if not found.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_label)(\n      struct _cef_menu_model_t* self, int command_id);\n\n  ///\n  // Returns the label at the specified |index| or NULL if not found due to\n  // invalid range or the index being a separator.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_label_at)(\n      struct _cef_menu_model_t* self, int index);\n\n  ///\n  // Sets the label for the specified |command_id|. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *set_label)(struct _cef_menu_model_t* self, int command_id,\n      const cef_string_t* label);\n\n  ///\n  // Set the label at the specified |index|. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *set_label_at)(struct _cef_menu_model_t* self, int index,\n      const cef_string_t* label);\n\n  ///\n  // Returns the item type for the specified |command_id|.\n  ///\n  cef_menu_item_type_t (CEF_CALLBACK *get_type)(struct _cef_menu_model_t* self,\n      int command_id);\n\n  ///\n  // Returns the item type at the specified |index|.\n  ///\n  cef_menu_item_type_t (CEF_CALLBACK *get_type_at)(\n      struct _cef_menu_model_t* self, int index);\n\n  ///\n  // Returns the group id for the specified |command_id| or -1 if invalid.\n  ///\n  int (CEF_CALLBACK *get_group_id)(struct _cef_menu_model_t* self,\n      int command_id);\n\n  ///\n  // Returns the group id at the specified |index| or -1 if invalid.\n  ///\n  int (CEF_CALLBACK *get_group_id_at)(struct _cef_menu_model_t* self,\n      int index);\n\n  ///\n  // Sets the group id for the specified |command_id|. Returns true (1) on\n  // success.\n  ///\n  int (CEF_CALLBACK *set_group_id)(struct _cef_menu_model_t* self,\n      int command_id, int group_id);\n\n  ///\n  // Sets the group id at the specified |index|. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *set_group_id_at)(struct _cef_menu_model_t* self, int index,\n      int group_id);\n\n  ///\n  // Returns the submenu for the specified |command_id| or NULL if invalid.\n  ///\n  struct _cef_menu_model_t* (CEF_CALLBACK *get_sub_menu)(\n      struct _cef_menu_model_t* self, int command_id);\n\n  ///\n  // Returns the submenu at the specified |index| or NULL if invalid.\n  ///\n  struct _cef_menu_model_t* (CEF_CALLBACK *get_sub_menu_at)(\n      struct _cef_menu_model_t* self, int index);\n\n  ///\n  // Returns true (1) if the specified |command_id| is visible.\n  ///\n  int (CEF_CALLBACK *is_visible)(struct _cef_menu_model_t* self,\n      int command_id);\n\n  ///\n  // Returns true (1) if the specified |index| is visible.\n  ///\n  int (CEF_CALLBACK *is_visible_at)(struct _cef_menu_model_t* self, int index);\n\n  ///\n  // Change the visibility of the specified |command_id|. Returns true (1) on\n  // success.\n  ///\n  int (CEF_CALLBACK *set_visible)(struct _cef_menu_model_t* self,\n      int command_id, int visible);\n\n  ///\n  // Change the visibility at the specified |index|. Returns true (1) on\n  // success.\n  ///\n  int (CEF_CALLBACK *set_visible_at)(struct _cef_menu_model_t* self, int index,\n      int visible);\n\n  ///\n  // Returns true (1) if the specified |command_id| is enabled.\n  ///\n  int (CEF_CALLBACK *is_enabled)(struct _cef_menu_model_t* self,\n      int command_id);\n\n  ///\n  // Returns true (1) if the specified |index| is enabled.\n  ///\n  int (CEF_CALLBACK *is_enabled_at)(struct _cef_menu_model_t* self, int index);\n\n  ///\n  // Change the enabled status of the specified |command_id|. Returns true (1)\n  // on success.\n  ///\n  int (CEF_CALLBACK *set_enabled)(struct _cef_menu_model_t* self,\n      int command_id, int enabled);\n\n  ///\n  // Change the enabled status at the specified |index|. Returns true (1) on\n  // success.\n  ///\n  int (CEF_CALLBACK *set_enabled_at)(struct _cef_menu_model_t* self, int index,\n      int enabled);\n\n  ///\n  // Returns true (1) if the specified |command_id| is checked. Only applies to\n  // check and radio items.\n  ///\n  int (CEF_CALLBACK *is_checked)(struct _cef_menu_model_t* self,\n      int command_id);\n\n  ///\n  // Returns true (1) if the specified |index| is checked. Only applies to check\n  // and radio items.\n  ///\n  int (CEF_CALLBACK *is_checked_at)(struct _cef_menu_model_t* self, int index);\n\n  ///\n  // Check the specified |command_id|. Only applies to check and radio items.\n  // Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *set_checked)(struct _cef_menu_model_t* self,\n      int command_id, int checked);\n\n  ///\n  // Check the specified |index|. Only applies to check and radio items. Returns\n  // true (1) on success.\n  ///\n  int (CEF_CALLBACK *set_checked_at)(struct _cef_menu_model_t* self, int index,\n      int checked);\n\n  ///\n  // Returns true (1) if the specified |command_id| has a keyboard accelerator\n  // assigned.\n  ///\n  int (CEF_CALLBACK *has_accelerator)(struct _cef_menu_model_t* self,\n      int command_id);\n\n  ///\n  // Returns true (1) if the specified |index| has a keyboard accelerator\n  // assigned.\n  ///\n  int (CEF_CALLBACK *has_accelerator_at)(struct _cef_menu_model_t* self,\n      int index);\n\n  ///\n  // Set the keyboard accelerator for the specified |command_id|. |key_code| can\n  // be any virtual key or character value. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *set_accelerator)(struct _cef_menu_model_t* self,\n      int command_id, int key_code, int shift_pressed, int ctrl_pressed,\n      int alt_pressed);\n\n  ///\n  // Set the keyboard accelerator at the specified |index|. |key_code| can be\n  // any virtual key or character value. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *set_accelerator_at)(struct _cef_menu_model_t* self,\n      int index, int key_code, int shift_pressed, int ctrl_pressed,\n      int alt_pressed);\n\n  ///\n  // Remove the keyboard accelerator for the specified |command_id|. Returns\n  // true (1) on success.\n  ///\n  int (CEF_CALLBACK *remove_accelerator)(struct _cef_menu_model_t* self,\n      int command_id);\n\n  ///\n  // Remove the keyboard accelerator at the specified |index|. Returns true (1)\n  // on success.\n  ///\n  int (CEF_CALLBACK *remove_accelerator_at)(struct _cef_menu_model_t* self,\n      int index);\n\n  ///\n  // Retrieves the keyboard accelerator for the specified |command_id|. Returns\n  // true (1) on success.\n  ///\n  int (CEF_CALLBACK *get_accelerator)(struct _cef_menu_model_t* self,\n      int command_id, int* key_code, int* shift_pressed, int* ctrl_pressed,\n      int* alt_pressed);\n\n  ///\n  // Retrieves the keyboard accelerator for the specified |index|. Returns true\n  // (1) on success.\n  ///\n  int (CEF_CALLBACK *get_accelerator_at)(struct _cef_menu_model_t* self,\n      int index, int* key_code, int* shift_pressed, int* ctrl_pressed,\n      int* alt_pressed);\n} cef_menu_model_t;\n\n\n///\n// Create a new MenuModel with the specified |delegate|.\n///\nCEF_EXPORT cef_menu_model_t* cef_menu_model_create(\n    struct _cef_menu_model_delegate_t* delegate);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_menu_model_delegate_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_menu_model_t;\n\n///\n// Implement this structure to handle menu model events. The functions of this\n// structure will be called on the browser process UI thread unless otherwise\n// indicated.\n///\ntypedef struct _cef_menu_model_delegate_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Perform the action associated with the specified |command_id| and optional\n  // |event_flags|.\n  ///\n  void (CEF_CALLBACK *execute_command)(struct _cef_menu_model_delegate_t* self,\n      struct _cef_menu_model_t* menu_model, int command_id,\n      cef_event_flags_t event_flags);\n\n  ///\n  // The menu is about to show.\n  ///\n  void (CEF_CALLBACK *menu_will_show)(struct _cef_menu_model_delegate_t* self,\n      struct _cef_menu_model_t* menu_model);\n} cef_menu_model_delegate_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_navigation_entry_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure used to represent an entry in navigation history.\n///\ntypedef struct _cef_navigation_entry_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is valid. Do not call any other functions\n  // if this function returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_navigation_entry_t* self);\n\n  ///\n  // Returns the actual URL of the page. For some pages this may be data: URL or\n  // similar. Use get_display_url() to return a display-friendly version.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_url)(\n      struct _cef_navigation_entry_t* self);\n\n  ///\n  // Returns a display-friendly version of the URL.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_display_url)(\n      struct _cef_navigation_entry_t* self);\n\n  ///\n  // Returns the original URL that was entered by the user before any redirects.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_original_url)(\n      struct _cef_navigation_entry_t* self);\n\n  ///\n  // Returns the title set by the page. This value may be NULL.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_title)(\n      struct _cef_navigation_entry_t* self);\n\n  ///\n  // Returns the transition type which indicates what the user did to move to\n  // this page from the previous page.\n  ///\n  cef_transition_type_t (CEF_CALLBACK *get_transition_type)(\n      struct _cef_navigation_entry_t* self);\n\n  ///\n  // Returns true (1) if this navigation includes post data.\n  ///\n  int (CEF_CALLBACK *has_post_data)(struct _cef_navigation_entry_t* self);\n\n  ///\n  // Returns the time for the last known successful navigation completion. A\n  // navigation may be completed more than once if the page is reloaded. May be\n  // 0 if the navigation has not yet completed.\n  ///\n  cef_time_t (CEF_CALLBACK *get_completion_time)(\n      struct _cef_navigation_entry_t* self);\n\n  ///\n  // Returns the HTTP status code for the last known successful navigation\n  // response. May be 0 if the response has not yet been received or if the\n  // navigation has not yet completed.\n  ///\n  int (CEF_CALLBACK *get_http_status_code)(\n      struct _cef_navigation_entry_t* self);\n} cef_navigation_entry_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_origin_whitelist_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Add an entry to the cross-origin access whitelist.\n//\n// The same-origin policy restricts how scripts hosted from different origins\n// (scheme + domain + port) can communicate. By default, scripts can only access\n// resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes\n// (but no other schemes) can use the \"Access-Control-Allow-Origin\" header to\n// allow cross-origin requests. For example, https://source.example.com can make\n// XMLHttpRequest requests on http://target.example.com if the\n// http://target.example.com request returns an \"Access-Control-Allow-Origin:\n// https://source.example.com\" response header.\n//\n// Scripts in separate frames or iframes and hosted from the same protocol and\n// domain suffix can execute cross-origin JavaScript if both pages set the\n// document.domain value to the same domain suffix. For example,\n// scheme://foo.example.com and scheme://bar.example.com can communicate using\n// JavaScript if both domains set document.domain=\"example.com\".\n//\n// This function is used to allow access to origins that would otherwise violate\n// the same-origin policy. Scripts hosted underneath the fully qualified\n// |source_origin| URL (like http://www.example.com) will be allowed access to\n// all resources hosted on the specified |target_protocol| and |target_domain|.\n// If |target_domain| is non-NULL and |allow_target_subdomains| if false (0)\n// only exact domain matches will be allowed. If |target_domain| contains a top-\n// level domain component (like \"example.com\") and |allow_target_subdomains| is\n// true (1) sub-domain matches will be allowed. If |target_domain| is NULL and\n// |allow_target_subdomains| if true (1) all domains and IP addresses will be\n// allowed.\n//\n// This function cannot be used to bypass the restrictions on local or display\n// isolated schemes. See the comments on CefRegisterCustomScheme for more\n// information.\n//\n// This function may be called on any thread. Returns false (0) if\n// |source_origin| is invalid or the whitelist cannot be accessed.\n///\nCEF_EXPORT int cef_add_cross_origin_whitelist_entry(\n    const cef_string_t* source_origin, const cef_string_t* target_protocol,\n    const cef_string_t* target_domain, int allow_target_subdomains);\n\n///\n// Remove an entry from the cross-origin access whitelist. Returns false (0) if\n// |source_origin| is invalid or the whitelist cannot be accessed.\n///\nCEF_EXPORT int cef_remove_cross_origin_whitelist_entry(\n    const cef_string_t* source_origin, const cef_string_t* target_protocol,\n    const cef_string_t* target_domain, int allow_target_subdomains);\n\n///\n// Remove all entries from the cross-origin access whitelist. Returns false (0)\n// if the whitelist cannot be accessed.\n///\nCEF_EXPORT int cef_clear_cross_origin_whitelist();\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_parser_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Parse the specified |url| into its component parts. Returns false (0) if the\n// URL is NULL or invalid.\n///\nCEF_EXPORT int cef_parse_url(const cef_string_t* url,\n    struct _cef_urlparts_t* parts);\n\n///\n// Creates a URL from the specified |parts|, which must contain a non-NULL spec\n// or a non-NULL host and path (at a minimum), but not both. Returns false (0)\n// if |parts| isn't initialized as described.\n///\nCEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts,\n    cef_string_t* url);\n\n///\n// This is a convenience function for formatting a URL in a concise and human-\n// friendly way to help users make security-related decisions (or in other\n// circumstances when people need to distinguish sites, origins, or otherwise-\n// simplified URLs from each other). Internationalized domain names (IDN) may be\n// presented in Unicode if the conversion is considered safe. The returned value\n// will (a) omit the path for standard schemes, excepting file and filesystem,\n// and (b) omit the port if it is the default for the scheme. Do not use this\n// for URLs which will be parsed or sent to other applications.\n///\n// The resulting string must be freed by calling cef_string_userfree_free().\nCEF_EXPORT cef_string_userfree_t cef_format_url_for_security_display(\n    const cef_string_t* origin_url);\n\n///\n// Returns the mime type for the specified file extension or an NULL string if\n// unknown.\n///\n// The resulting string must be freed by calling cef_string_userfree_free().\nCEF_EXPORT cef_string_userfree_t cef_get_mime_type(\n    const cef_string_t* extension);\n\n///\n// Get the extensions associated with the given mime type. This should be passed\n// in lower case. There could be multiple extensions for a given mime type, like\n// \"html,htm\" for \"text/html\", or \"txt,text,html,...\" for \"text/*\". Any existing\n// elements in the provided vector will not be erased.\n///\nCEF_EXPORT void cef_get_extensions_for_mime_type(const cef_string_t* mime_type,\n    cef_string_list_t extensions);\n\n///\n// Encodes |data| as a base64 string.\n///\n// The resulting string must be freed by calling cef_string_userfree_free().\nCEF_EXPORT cef_string_userfree_t cef_base64encode(const void* data,\n    size_t data_size);\n\n///\n// Decodes the base64 encoded string |data|. The returned value will be NULL if\n// the decoding fails.\n///\nCEF_EXPORT struct _cef_binary_value_t* cef_base64decode(\n    const cef_string_t* data);\n\n///\n// Escapes characters in |text| which are unsuitable for use as a query\n// parameter value. Everything except alphanumerics and -_.!~*'() will be\n// converted to \"%XX\". If |use_plus| is true (1) spaces will change to \"+\". The\n// result is basically the same as encodeURIComponent in Javacript.\n///\n// The resulting string must be freed by calling cef_string_userfree_free().\nCEF_EXPORT cef_string_userfree_t cef_uriencode(const cef_string_t* text,\n    int use_plus);\n\n///\n// Unescapes |text| and returns the result. Unescaping consists of looking for\n// the exact pattern \"%XX\" where each X is a hex digit and converting to the\n// character with the numerical value of those digits (e.g. \"i%20=%203%3b\"\n// unescapes to \"i = 3;\"). If |convert_to_utf8| is true (1) this function will\n// attempt to interpret the initial decoded result as UTF-8. If the result is\n// convertable into UTF-8 it will be returned as converted. Otherwise the\n// initial decoded result will be returned.  The |unescape_rule| parameter\n// supports further customization the decoding process.\n///\n// The resulting string must be freed by calling cef_string_userfree_free().\nCEF_EXPORT cef_string_userfree_t cef_uridecode(const cef_string_t* text,\n    int convert_to_utf8, cef_uri_unescape_rule_t unescape_rule);\n\n///\n// Parses the specified |json_string| and returns a dictionary or list\n// representation. If JSON parsing fails this function returns NULL.\n///\nCEF_EXPORT struct _cef_value_t* cef_parse_json(const cef_string_t* json_string,\n    cef_json_parser_options_t options);\n\n///\n// Parses the specified |json_string| and returns a dictionary or list\n// representation. If JSON parsing fails this function returns NULL and\n// populates |error_code_out| and |error_msg_out| with an error code and a\n// formatted error message respectively.\n///\nCEF_EXPORT struct _cef_value_t* cef_parse_jsonand_return_error(\n    const cef_string_t* json_string, cef_json_parser_options_t options,\n    cef_json_parser_error_t* error_code_out, cef_string_t* error_msg_out);\n\n///\n// Generates a JSON string from the specified root |node| which should be a\n// dictionary or list value. Returns an NULL string on failure. This function\n// requires exclusive access to |node| including any underlying data.\n///\n// The resulting string must be freed by calling cef_string_userfree_free().\nCEF_EXPORT cef_string_userfree_t cef_write_json(struct _cef_value_t* node,\n    cef_json_writer_options_t options);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_path_util_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Retrieve the path associated with the specified |key|. Returns true (1) on\n// success. Can be called on any thread in the browser process.\n///\nCEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_print_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_print_settings_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Callback structure for asynchronous continuation of print dialog requests.\n///\ntypedef struct _cef_print_dialog_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Continue printing with the specified |settings|.\n  ///\n  void (CEF_CALLBACK *cont)(struct _cef_print_dialog_callback_t* self,\n      struct _cef_print_settings_t* settings);\n\n  ///\n  // Cancel the printing.\n  ///\n  void (CEF_CALLBACK *cancel)(struct _cef_print_dialog_callback_t* self);\n} cef_print_dialog_callback_t;\n\n\n///\n// Callback structure for asynchronous continuation of print job requests.\n///\ntypedef struct _cef_print_job_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Indicate completion of the print job.\n  ///\n  void (CEF_CALLBACK *cont)(struct _cef_print_job_callback_t* self);\n} cef_print_job_callback_t;\n\n\n///\n// Implement this structure to handle printing on Linux. The functions of this\n// structure will be called on the browser process UI thread.\n///\ntypedef struct _cef_print_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called when printing has started for the specified |browser|. This function\n  // will be called before the other OnPrint*() functions and irrespective of\n  // how printing was initiated (e.g. cef_browser_host_t::print(), JavaScript\n  // window.print() or PDF extension print button).\n  ///\n  void (CEF_CALLBACK *on_print_start)(struct _cef_print_handler_t* self,\n      struct _cef_browser_t* browser);\n\n  ///\n  // Synchronize |settings| with client state. If |get_defaults| is true (1)\n  // then populate |settings| with the default print settings. Do not keep a\n  // reference to |settings| outside of this callback.\n  ///\n  void (CEF_CALLBACK *on_print_settings)(struct _cef_print_handler_t* self,\n      struct _cef_print_settings_t* settings, int get_defaults);\n\n  ///\n  // Show the print dialog. Execute |callback| once the dialog is dismissed.\n  // Return true (1) if the dialog will be displayed or false (0) to cancel the\n  // printing immediately.\n  ///\n  int (CEF_CALLBACK *on_print_dialog)(struct _cef_print_handler_t* self,\n      int has_selection, struct _cef_print_dialog_callback_t* callback);\n\n  ///\n  // Send the print job to the printer. Execute |callback| once the job is\n  // completed. Return true (1) if the job will proceed or false (0) to cancel\n  // the job immediately.\n  ///\n  int (CEF_CALLBACK *on_print_job)(struct _cef_print_handler_t* self,\n      const cef_string_t* document_name, const cef_string_t* pdf_file_path,\n      struct _cef_print_job_callback_t* callback);\n\n  ///\n  // Reset client state related to printing.\n  ///\n  void (CEF_CALLBACK *on_print_reset)(struct _cef_print_handler_t* self);\n\n  ///\n  // Return the PDF paper size in device units. Used in combination with\n  // cef_browser_host_t::print_to_pdf().\n  ///\n  cef_size_t (CEF_CALLBACK *get_pdf_paper_size)(\n      struct _cef_print_handler_t* self, int device_units_per_inch);\n} cef_print_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_print_settings_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure representing print settings.\n///\ntypedef struct _cef_print_settings_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is valid. Do not call any other functions\n  // if this function returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_print_settings_t* self);\n\n  ///\n  // Returns true (1) if the values of this object are read-only. Some APIs may\n  // expose read-only objects.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_print_settings_t* self);\n\n  ///\n  // Returns a writable copy of this object.\n  ///\n  struct _cef_print_settings_t* (CEF_CALLBACK *copy)(\n      struct _cef_print_settings_t* self);\n\n  ///\n  // Set the page orientation.\n  ///\n  void (CEF_CALLBACK *set_orientation)(struct _cef_print_settings_t* self,\n      int landscape);\n\n  ///\n  // Returns true (1) if the orientation is landscape.\n  ///\n  int (CEF_CALLBACK *is_landscape)(struct _cef_print_settings_t* self);\n\n  ///\n  // Set the printer printable area in device units. Some platforms already\n  // provide flipped area. Set |landscape_needs_flip| to false (0) on those\n  // platforms to avoid double flipping.\n  ///\n  void (CEF_CALLBACK *set_printer_printable_area)(\n      struct _cef_print_settings_t* self,\n      const cef_size_t* physical_size_device_units,\n      const cef_rect_t* printable_area_device_units,\n      int landscape_needs_flip);\n\n  ///\n  // Set the device name.\n  ///\n  void (CEF_CALLBACK *set_device_name)(struct _cef_print_settings_t* self,\n      const cef_string_t* name);\n\n  ///\n  // Get the device name.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_device_name)(\n      struct _cef_print_settings_t* self);\n\n  ///\n  // Set the DPI (dots per inch).\n  ///\n  void (CEF_CALLBACK *set_dpi)(struct _cef_print_settings_t* self, int dpi);\n\n  ///\n  // Get the DPI (dots per inch).\n  ///\n  int (CEF_CALLBACK *get_dpi)(struct _cef_print_settings_t* self);\n\n  ///\n  // Set the page ranges.\n  ///\n  void (CEF_CALLBACK *set_page_ranges)(struct _cef_print_settings_t* self,\n      size_t rangesCount, cef_range_t const* ranges);\n\n  ///\n  // Returns the number of page ranges that currently exist.\n  ///\n  size_t (CEF_CALLBACK *get_page_ranges_count)(\n      struct _cef_print_settings_t* self);\n\n  ///\n  // Retrieve the page ranges.\n  ///\n  void (CEF_CALLBACK *get_page_ranges)(struct _cef_print_settings_t* self,\n      size_t* rangesCount, cef_range_t* ranges);\n\n  ///\n  // Set whether only the selection will be printed.\n  ///\n  void (CEF_CALLBACK *set_selection_only)(struct _cef_print_settings_t* self,\n      int selection_only);\n\n  ///\n  // Returns true (1) if only the selection will be printed.\n  ///\n  int (CEF_CALLBACK *is_selection_only)(struct _cef_print_settings_t* self);\n\n  ///\n  // Set whether pages will be collated.\n  ///\n  void (CEF_CALLBACK *set_collate)(struct _cef_print_settings_t* self,\n      int collate);\n\n  ///\n  // Returns true (1) if pages will be collated.\n  ///\n  int (CEF_CALLBACK *will_collate)(struct _cef_print_settings_t* self);\n\n  ///\n  // Set the color model.\n  ///\n  void (CEF_CALLBACK *set_color_model)(struct _cef_print_settings_t* self,\n      cef_color_model_t model);\n\n  ///\n  // Get the color model.\n  ///\n  cef_color_model_t (CEF_CALLBACK *get_color_model)(\n      struct _cef_print_settings_t* self);\n\n  ///\n  // Set the number of copies.\n  ///\n  void (CEF_CALLBACK *set_copies)(struct _cef_print_settings_t* self,\n      int copies);\n\n  ///\n  // Get the number of copies.\n  ///\n  int (CEF_CALLBACK *get_copies)(struct _cef_print_settings_t* self);\n\n  ///\n  // Set the duplex mode.\n  ///\n  void (CEF_CALLBACK *set_duplex_mode)(struct _cef_print_settings_t* self,\n      cef_duplex_mode_t mode);\n\n  ///\n  // Get the duplex mode.\n  ///\n  cef_duplex_mode_t (CEF_CALLBACK *get_duplex_mode)(\n      struct _cef_print_settings_t* self);\n} cef_print_settings_t;\n\n\n///\n// Create a new cef_print_settings_t object.\n///\nCEF_EXPORT cef_print_settings_t* cef_print_settings_create();\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_process_message_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_values_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure representing a message. Can be used on any process and thread.\n///\ntypedef struct _cef_process_message_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is valid. Do not call any other functions\n  // if this function returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_process_message_t* self);\n\n  ///\n  // Returns true (1) if the values of this object are read-only. Some APIs may\n  // expose read-only objects.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_process_message_t* self);\n\n  ///\n  // Returns a writable copy of this object.\n  ///\n  struct _cef_process_message_t* (CEF_CALLBACK *copy)(\n      struct _cef_process_message_t* self);\n\n  ///\n  // Returns the message name.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_name)(\n      struct _cef_process_message_t* self);\n\n  ///\n  // Returns the list of arguments.\n  ///\n  struct _cef_list_value_t* (CEF_CALLBACK *get_argument_list)(\n      struct _cef_process_message_t* self);\n} cef_process_message_t;\n\n\n///\n// Create a new cef_process_message_t object with the specified name.\n///\nCEF_EXPORT cef_process_message_t* cef_process_message_create(\n    const cef_string_t* name);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_process_util_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Launches the process specified via |command_line|. Returns true (1) upon\n// success. Must be called on the browser process TID_PROCESS_LAUNCHER thread.\n//\n// Unix-specific notes: - All file descriptors open in the parent process will\n// be closed in the\n//   child process except for stdin, stdout, and stderr.\n// - If the first argument on the command line does not contain a slash,\n//   PATH will be searched. (See man execvp.)\n///\nCEF_EXPORT int cef_launch_process(struct _cef_command_line_t* command_line);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_render_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_drag_data_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to handle events when window rendering is disabled.\n// The functions of this structure will be called on the UI thread.\n///\ntypedef struct _cef_render_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called to retrieve the root window rectangle in screen coordinates. Return\n  // true (1) if the rectangle was provided.\n  ///\n  int (CEF_CALLBACK *get_root_screen_rect)(struct _cef_render_handler_t* self,\n      struct _cef_browser_t* browser, cef_rect_t* rect);\n\n  ///\n  // Called to retrieve the view rectangle which is relative to screen\n  // coordinates. Return true (1) if the rectangle was provided.\n  ///\n  int (CEF_CALLBACK *get_view_rect)(struct _cef_render_handler_t* self,\n      struct _cef_browser_t* browser, cef_rect_t* rect);\n\n  ///\n  // Called to retrieve the translation from view coordinates to actual screen\n  // coordinates. Return true (1) if the screen coordinates were provided.\n  ///\n  int (CEF_CALLBACK *get_screen_point)(struct _cef_render_handler_t* self,\n      struct _cef_browser_t* browser, int viewX, int viewY, int* screenX,\n      int* screenY);\n\n  ///\n  // Called to allow the client to fill in the CefScreenInfo object with\n  // appropriate values. Return true (1) if the |screen_info| structure has been\n  // modified.\n  //\n  // If the screen info rectangle is left NULL the rectangle from GetViewRect\n  // will be used. If the rectangle is still NULL or invalid popups may not be\n  // drawn correctly.\n  ///\n  int (CEF_CALLBACK *get_screen_info)(struct _cef_render_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_screen_info_t* screen_info);\n\n  ///\n  // Called when the browser wants to show or hide the popup widget. The popup\n  // should be shown if |show| is true (1) and hidden if |show| is false (0).\n  ///\n  void (CEF_CALLBACK *on_popup_show)(struct _cef_render_handler_t* self,\n      struct _cef_browser_t* browser, int show);\n\n  ///\n  // Called when the browser wants to move or resize the popup widget. |rect|\n  // contains the new location and size in view coordinates.\n  ///\n  void (CEF_CALLBACK *on_popup_size)(struct _cef_render_handler_t* self,\n      struct _cef_browser_t* browser, const cef_rect_t* rect);\n\n  ///\n  // Called when an element should be painted. Pixel values passed to this\n  // function are scaled relative to view coordinates based on the value of\n  // CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type|\n  // indicates whether the element is the view or the popup widget. |buffer|\n  // contains the pixel data for the whole image. |dirtyRects| contains the set\n  // of rectangles in pixel coordinates that need to be repainted. |buffer| will\n  // be |width|*|height|*4 bytes in size and represents a BGRA image with an\n  // upper-left origin.\n  ///\n  void (CEF_CALLBACK *on_paint)(struct _cef_render_handler_t* self,\n      struct _cef_browser_t* browser, cef_paint_element_type_t type,\n      size_t dirtyRectsCount, cef_rect_t const* dirtyRects, const void* buffer,\n      int width, int height);\n\n  ///\n  // Called when the browser's cursor has changed. If |type| is CT_CUSTOM then\n  // |custom_cursor_info| will be populated with the custom cursor information.\n  ///\n  void (CEF_CALLBACK *on_cursor_change)(struct _cef_render_handler_t* self,\n      struct _cef_browser_t* browser, cef_cursor_handle_t cursor,\n      cef_cursor_type_t type,\n      const struct _cef_cursor_info_t* custom_cursor_info);\n\n  ///\n  // Called when the user starts dragging content in the web view. Contextual\n  // information about the dragged content is supplied by |drag_data|. (|x|,\n  // |y|) is the drag start location in screen coordinates. OS APIs that run a\n  // system message loop may be used within the StartDragging call.\n  //\n  // Return false (0) to abort the drag operation. Don't call any of\n  // cef_browser_host_t::DragSource*Ended* functions after returning false (0).\n  //\n  // Return true (1) to handle the drag operation. Call\n  // cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either\n  // synchronously or asynchronously to inform the web view that the drag\n  // operation has ended.\n  ///\n  int (CEF_CALLBACK *start_dragging)(struct _cef_render_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_drag_data_t* drag_data,\n      cef_drag_operations_mask_t allowed_ops, int x, int y);\n\n  ///\n  // Called when the web view wants to update the mouse cursor during a drag &\n  // drop operation. |operation| describes the allowed operation (none, move,\n  // copy, link).\n  ///\n  void (CEF_CALLBACK *update_drag_cursor)(struct _cef_render_handler_t* self,\n      struct _cef_browser_t* browser, cef_drag_operations_mask_t operation);\n\n  ///\n  // Called when the scroll offset has changed.\n  ///\n  void (CEF_CALLBACK *on_scroll_offset_changed)(\n      struct _cef_render_handler_t* self, struct _cef_browser_t* browser,\n      double x, double y);\n} cef_render_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_render_process_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_dom_capi.h\"\n#include \"include/capi/cef_frame_capi.h\"\n#include \"include/capi/cef_load_handler_capi.h\"\n#include \"include/capi/cef_process_message_capi.h\"\n#include \"include/capi/cef_v8_capi.h\"\n#include \"include/capi/cef_values_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure used to implement render process callbacks. The functions of this\n// structure will be called on the render process main thread (TID_RENDERER)\n// unless otherwise indicated.\n///\ntypedef struct _cef_render_process_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called after the render process main thread has been created. |extra_info|\n  // is a read-only value originating from\n  // cef_browser_process_handler_t::on_render_process_thread_created(). Do not\n  // keep a reference to |extra_info| outside of this function.\n  ///\n  void (CEF_CALLBACK *on_render_thread_created)(\n      struct _cef_render_process_handler_t* self,\n      struct _cef_list_value_t* extra_info);\n\n  ///\n  // Called after WebKit has been initialized.\n  ///\n  void (CEF_CALLBACK *on_web_kit_initialized)(\n      struct _cef_render_process_handler_t* self);\n\n  ///\n  // Called after a browser has been created. When browsing cross-origin a new\n  // browser will be created before the old browser with the same identifier is\n  // destroyed.\n  ///\n  void (CEF_CALLBACK *on_browser_created)(\n      struct _cef_render_process_handler_t* self,\n      struct _cef_browser_t* browser);\n\n  ///\n  // Called before a browser is destroyed.\n  ///\n  void (CEF_CALLBACK *on_browser_destroyed)(\n      struct _cef_render_process_handler_t* self,\n      struct _cef_browser_t* browser);\n\n  ///\n  // Return the handler for browser load status events.\n  ///\n  struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)(\n      struct _cef_render_process_handler_t* self);\n\n  ///\n  // Called before browser navigation. Return true (1) to cancel the navigation\n  // or false (0) to allow the navigation to proceed. The |request| object\n  // cannot be modified in this callback.\n  ///\n  int (CEF_CALLBACK *on_before_navigation)(\n      struct _cef_render_process_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      struct _cef_request_t* request, cef_navigation_type_t navigation_type,\n      int is_redirect);\n\n  ///\n  // Called immediately after the V8 context for a frame has been created. To\n  // retrieve the JavaScript 'window' object use the\n  // cef_v8context_t::get_global() function. V8 handles can only be accessed\n  // from the thread on which they are created. A task runner for posting tasks\n  // on the associated thread can be retrieved via the\n  // cef_v8context_t::get_task_runner() function.\n  ///\n  void (CEF_CALLBACK *on_context_created)(\n      struct _cef_render_process_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      struct _cef_v8context_t* context);\n\n  ///\n  // Called immediately before the V8 context for a frame is released. No\n  // references to the context should be kept after this function is called.\n  ///\n  void (CEF_CALLBACK *on_context_released)(\n      struct _cef_render_process_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      struct _cef_v8context_t* context);\n\n  ///\n  // Called for global uncaught exceptions in a frame. Execution of this\n  // callback is disabled by default. To enable set\n  // CefSettings.uncaught_exception_stack_size > 0.\n  ///\n  void (CEF_CALLBACK *on_uncaught_exception)(\n      struct _cef_render_process_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      struct _cef_v8context_t* context, struct _cef_v8exception_t* exception,\n      struct _cef_v8stack_trace_t* stackTrace);\n\n  ///\n  // Called when a new node in the the browser gets focus. The |node| value may\n  // be NULL if no specific node has gained focus. The node object passed to\n  // this function represents a snapshot of the DOM at the time this function is\n  // executed. DOM objects are only valid for the scope of this function. Do not\n  // keep references to or attempt to access any DOM objects outside the scope\n  // of this function.\n  ///\n  void (CEF_CALLBACK *on_focused_node_changed)(\n      struct _cef_render_process_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      struct _cef_domnode_t* node);\n\n  ///\n  // Called when a new message is received from a different process. Return true\n  // (1) if the message was handled or false (0) otherwise. Do not keep a\n  // reference to or attempt to access the message outside of this callback.\n  ///\n  int (CEF_CALLBACK *on_process_message_received)(\n      struct _cef_render_process_handler_t* self,\n      struct _cef_browser_t* browser, cef_process_id_t source_process,\n      struct _cef_process_message_t* message);\n} cef_render_process_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_request_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_post_data_element_t;\nstruct _cef_post_data_t;\n\n///\n// Structure used to represent a web request. The functions of this structure\n// may be called on any thread.\n///\ntypedef struct _cef_request_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is read-only.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_request_t* self);\n\n  ///\n  // Get the fully qualified URL.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_url)(struct _cef_request_t* self);\n\n  ///\n  // Set the fully qualified URL.\n  ///\n  void (CEF_CALLBACK *set_url)(struct _cef_request_t* self,\n      const cef_string_t* url);\n\n  ///\n  // Get the request function type. The value will default to POST if post data\n  // is provided and GET otherwise.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_method)(struct _cef_request_t* self);\n\n  ///\n  // Set the request function type.\n  ///\n  void (CEF_CALLBACK *set_method)(struct _cef_request_t* self,\n      const cef_string_t* method);\n\n  ///\n  // Set the referrer URL and policy. If non-NULL the referrer URL must be fully\n  // qualified with an HTTP or HTTPS scheme component. Any username, password or\n  // ref component will be removed.\n  ///\n  void (CEF_CALLBACK *set_referrer)(struct _cef_request_t* self,\n      const cef_string_t* referrer_url, cef_referrer_policy_t policy);\n\n  ///\n  // Get the referrer URL.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_referrer_url)(\n      struct _cef_request_t* self);\n\n  ///\n  // Get the referrer policy.\n  ///\n  cef_referrer_policy_t (CEF_CALLBACK *get_referrer_policy)(\n      struct _cef_request_t* self);\n\n  ///\n  // Get the post data.\n  ///\n  struct _cef_post_data_t* (CEF_CALLBACK *get_post_data)(\n      struct _cef_request_t* self);\n\n  ///\n  // Set the post data.\n  ///\n  void (CEF_CALLBACK *set_post_data)(struct _cef_request_t* self,\n      struct _cef_post_data_t* postData);\n\n  ///\n  // Get the header values. Will not include the Referer value if any.\n  ///\n  void (CEF_CALLBACK *get_header_map)(struct _cef_request_t* self,\n      cef_string_multimap_t headerMap);\n\n  ///\n  // Set the header values. If a Referer value exists in the header map it will\n  // be removed and ignored.\n  ///\n  void (CEF_CALLBACK *set_header_map)(struct _cef_request_t* self,\n      cef_string_multimap_t headerMap);\n\n  ///\n  // Set all values at one time.\n  ///\n  void (CEF_CALLBACK *set)(struct _cef_request_t* self, const cef_string_t* url,\n      const cef_string_t* method, struct _cef_post_data_t* postData,\n      cef_string_multimap_t headerMap);\n\n  ///\n  // Get the flags used in combination with cef_urlrequest_t. See\n  // cef_urlrequest_flags_t for supported values.\n  ///\n  int (CEF_CALLBACK *get_flags)(struct _cef_request_t* self);\n\n  ///\n  // Set the flags used in combination with cef_urlrequest_t.  See\n  // cef_urlrequest_flags_t for supported values.\n  ///\n  void (CEF_CALLBACK *set_flags)(struct _cef_request_t* self, int flags);\n\n  ///\n  // Set the URL to the first party for cookies used in combination with\n  // cef_urlrequest_t.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_first_party_for_cookies)(\n      struct _cef_request_t* self);\n\n  ///\n  // Get the URL to the first party for cookies used in combination with\n  // cef_urlrequest_t.\n  ///\n  void (CEF_CALLBACK *set_first_party_for_cookies)(struct _cef_request_t* self,\n      const cef_string_t* url);\n\n  ///\n  // Get the resource type for this request. Only available in the browser\n  // process.\n  ///\n  cef_resource_type_t (CEF_CALLBACK *get_resource_type)(\n      struct _cef_request_t* self);\n\n  ///\n  // Get the transition type for this request. Only available in the browser\n  // process and only applies to requests that represent a main frame or sub-\n  // frame navigation.\n  ///\n  cef_transition_type_t (CEF_CALLBACK *get_transition_type)(\n      struct _cef_request_t* self);\n\n  ///\n  // Returns the globally unique identifier for this request or 0 if not\n  // specified. Can be used by cef_request_tHandler implementations in the\n  // browser process to track a single request across multiple callbacks.\n  ///\n  uint64 (CEF_CALLBACK *get_identifier)(struct _cef_request_t* self);\n} cef_request_t;\n\n\n///\n// Create a new cef_request_t object.\n///\nCEF_EXPORT cef_request_t* cef_request_create();\n\n\n///\n// Structure used to represent post data for a web request. The functions of\n// this structure may be called on any thread.\n///\ntypedef struct _cef_post_data_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is read-only.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_post_data_t* self);\n\n  ///\n  // Returns true (1) if the underlying POST data includes elements that are not\n  // represented by this cef_post_data_t object (for example, multi-part file\n  // upload data). Modifying cef_post_data_t objects with excluded elements may\n  // result in the request failing.\n  ///\n  int (CEF_CALLBACK *has_excluded_elements)(struct _cef_post_data_t* self);\n\n  ///\n  // Returns the number of existing post data elements.\n  ///\n  size_t (CEF_CALLBACK *get_element_count)(struct _cef_post_data_t* self);\n\n  ///\n  // Retrieve the post data elements.\n  ///\n  void (CEF_CALLBACK *get_elements)(struct _cef_post_data_t* self,\n      size_t* elementsCount, struct _cef_post_data_element_t** elements);\n\n  ///\n  // Remove the specified post data element.  Returns true (1) if the removal\n  // succeeds.\n  ///\n  int (CEF_CALLBACK *remove_element)(struct _cef_post_data_t* self,\n      struct _cef_post_data_element_t* element);\n\n  ///\n  // Add the specified post data element.  Returns true (1) if the add succeeds.\n  ///\n  int (CEF_CALLBACK *add_element)(struct _cef_post_data_t* self,\n      struct _cef_post_data_element_t* element);\n\n  ///\n  // Remove all existing post data elements.\n  ///\n  void (CEF_CALLBACK *remove_elements)(struct _cef_post_data_t* self);\n} cef_post_data_t;\n\n\n///\n// Create a new cef_post_data_t object.\n///\nCEF_EXPORT cef_post_data_t* cef_post_data_create();\n\n\n///\n// Structure used to represent a single element in the request post data. The\n// functions of this structure may be called on any thread.\n///\ntypedef struct _cef_post_data_element_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is read-only.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_post_data_element_t* self);\n\n  ///\n  // Remove all contents from the post data element.\n  ///\n  void (CEF_CALLBACK *set_to_empty)(struct _cef_post_data_element_t* self);\n\n  ///\n  // The post data element will represent a file.\n  ///\n  void (CEF_CALLBACK *set_to_file)(struct _cef_post_data_element_t* self,\n      const cef_string_t* fileName);\n\n  ///\n  // The post data element will represent bytes.  The bytes passed in will be\n  // copied.\n  ///\n  void (CEF_CALLBACK *set_to_bytes)(struct _cef_post_data_element_t* self,\n      size_t size, const void* bytes);\n\n  ///\n  // Return the type of this post data element.\n  ///\n  cef_postdataelement_type_t (CEF_CALLBACK *get_type)(\n      struct _cef_post_data_element_t* self);\n\n  ///\n  // Return the file name.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_file)(\n      struct _cef_post_data_element_t* self);\n\n  ///\n  // Return the number of bytes.\n  ///\n  size_t (CEF_CALLBACK *get_bytes_count)(struct _cef_post_data_element_t* self);\n\n  ///\n  // Read up to |size| bytes into |bytes| and return the number of bytes\n  // actually read.\n  ///\n  size_t (CEF_CALLBACK *get_bytes)(struct _cef_post_data_element_t* self,\n      size_t size, void* bytes);\n} cef_post_data_element_t;\n\n\n///\n// Create a new cef_post_data_element_t object.\n///\nCEF_EXPORT cef_post_data_element_t* cef_post_data_element_create();\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_request_context_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_callback_capi.h\"\n#include \"include/capi/cef_cookie_capi.h\"\n#include \"include/capi/cef_request_context_handler_capi.h\"\n#include \"include/capi/cef_values_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_scheme_handler_factory_t;\n\n///\n// Callback structure for cef_request_tContext::ResolveHost.\n///\ntypedef struct _cef_resolve_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called after the ResolveHost request has completed. |result| will be the\n  // result code. |resolved_ips| will be the list of resolved IP addresses or\n  // NULL if the resolution failed.\n  ///\n  void (CEF_CALLBACK *on_resolve_completed)(\n      struct _cef_resolve_callback_t* self, cef_errorcode_t result,\n      cef_string_list_t resolved_ips);\n} cef_resolve_callback_t;\n\n\n///\n// A request context provides request handling for a set of related browser or\n// URL request objects. A request context can be specified when creating a new\n// browser via the cef_browser_host_t static factory functions or when creating\n// a new URL request via the cef_urlrequest_t static factory functions. Browser\n// objects with different request contexts will never be hosted in the same\n// render process. Browser objects with the same request context may or may not\n// be hosted in the same render process depending on the process model. Browser\n// objects created indirectly via the JavaScript window.open function or\n// targeted links will share the same render process and the same request\n// context as the source browser. When running in single-process mode there is\n// only a single render process (the main process) and so all browsers created\n// in single-process mode will share the same request context. This will be the\n// first request context passed into a cef_browser_host_t static factory\n// function and all other request context objects will be ignored.\n///\ntypedef struct _cef_request_context_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is pointing to the same context as |that|\n  // object.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_request_context_t* self,\n      struct _cef_request_context_t* other);\n\n  ///\n  // Returns true (1) if this object is sharing the same storage as |that|\n  // object.\n  ///\n  int (CEF_CALLBACK *is_sharing_with)(struct _cef_request_context_t* self,\n      struct _cef_request_context_t* other);\n\n  ///\n  // Returns true (1) if this object is the global context. The global context\n  // is used by default when creating a browser or URL request with a NULL\n  // context argument.\n  ///\n  int (CEF_CALLBACK *is_global)(struct _cef_request_context_t* self);\n\n  ///\n  // Returns the handler for this context if any.\n  ///\n  struct _cef_request_context_handler_t* (CEF_CALLBACK *get_handler)(\n      struct _cef_request_context_t* self);\n\n  ///\n  // Returns the cache path for this object. If NULL an \"incognito mode\" in-\n  // memory cache is being used.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_cache_path)(\n      struct _cef_request_context_t* self);\n\n  ///\n  // Returns the default cookie manager for this object. This will be the global\n  // cookie manager if this object is the global request context. Otherwise,\n  // this will be the default cookie manager used when this request context does\n  // not receive a value via cef_request_tContextHandler::get_cookie_manager().\n  // If |callback| is non-NULL it will be executed asnychronously on the IO\n  // thread after the manager's storage has been initialized.\n  ///\n  struct _cef_cookie_manager_t* (CEF_CALLBACK *get_default_cookie_manager)(\n      struct _cef_request_context_t* self,\n      struct _cef_completion_callback_t* callback);\n\n  ///\n  // Register a scheme handler factory for the specified |scheme_name| and\n  // optional |domain_name|. An NULL |domain_name| value for a standard scheme\n  // will cause the factory to match all domain names. The |domain_name| value\n  // will be ignored for non-standard schemes. If |scheme_name| is a built-in\n  // scheme and no handler is returned by |factory| then the built-in scheme\n  // handler factory will be called. If |scheme_name| is a custom scheme then\n  // you must also implement the cef_app_t::on_register_custom_schemes()\n  // function in all processes. This function may be called multiple times to\n  // change or remove the factory that matches the specified |scheme_name| and\n  // optional |domain_name|. Returns false (0) if an error occurs. This function\n  // may be called on any thread in the browser process.\n  ///\n  int (CEF_CALLBACK *register_scheme_handler_factory)(\n      struct _cef_request_context_t* self, const cef_string_t* scheme_name,\n      const cef_string_t* domain_name,\n      struct _cef_scheme_handler_factory_t* factory);\n\n  ///\n  // Clear all registered scheme handler factories. Returns false (0) on error.\n  // This function may be called on any thread in the browser process.\n  ///\n  int (CEF_CALLBACK *clear_scheme_handler_factories)(\n      struct _cef_request_context_t* self);\n\n  ///\n  // Tells all renderer processes associated with this context to throw away\n  // their plugin list cache. If |reload_pages| is true (1) they will also\n  // reload all pages with plugins.\n  // cef_request_tContextHandler::OnBeforePluginLoad may be called to rebuild\n  // the plugin list cache.\n  ///\n  void (CEF_CALLBACK *purge_plugin_list_cache)(\n      struct _cef_request_context_t* self, int reload_pages);\n\n  ///\n  // Returns true (1) if a preference with the specified |name| exists. This\n  // function must be called on the browser process UI thread.\n  ///\n  int (CEF_CALLBACK *has_preference)(struct _cef_request_context_t* self,\n      const cef_string_t* name);\n\n  ///\n  // Returns the value for the preference with the specified |name|. Returns\n  // NULL if the preference does not exist. The returned object contains a copy\n  // of the underlying preference value and modifications to the returned object\n  // will not modify the underlying preference value. This function must be\n  // called on the browser process UI thread.\n  ///\n  struct _cef_value_t* (CEF_CALLBACK *get_preference)(\n      struct _cef_request_context_t* self, const cef_string_t* name);\n\n  ///\n  // Returns all preferences as a dictionary. If |include_defaults| is true (1)\n  // then preferences currently at their default value will be included. The\n  // returned object contains a copy of the underlying preference values and\n  // modifications to the returned object will not modify the underlying\n  // preference values. This function must be called on the browser process UI\n  // thread.\n  ///\n  struct _cef_dictionary_value_t* (CEF_CALLBACK *get_all_preferences)(\n      struct _cef_request_context_t* self, int include_defaults);\n\n  ///\n  // Returns true (1) if the preference with the specified |name| can be\n  // modified using SetPreference. As one example preferences set via the\n  // command-line usually cannot be modified. This function must be called on\n  // the browser process UI thread.\n  ///\n  int (CEF_CALLBACK *can_set_preference)(struct _cef_request_context_t* self,\n      const cef_string_t* name);\n\n  ///\n  // Set the |value| associated with preference |name|. Returns true (1) if the\n  // value is set successfully and false (0) otherwise. If |value| is NULL the\n  // preference will be restored to its default value. If setting the preference\n  // fails then |error| will be populated with a detailed description of the\n  // problem. This function must be called on the browser process UI thread.\n  ///\n  int (CEF_CALLBACK *set_preference)(struct _cef_request_context_t* self,\n      const cef_string_t* name, struct _cef_value_t* value,\n      cef_string_t* error);\n\n  ///\n  // Clears all certificate exceptions that were added as part of handling\n  // cef_request_tHandler::on_certificate_error(). If you call this it is\n  // recommended that you also call close_all_connections() or you risk not\n  // being prompted again for server certificates if you reconnect quickly. If\n  // |callback| is non-NULL it will be executed on the UI thread after\n  // completion.\n  ///\n  void (CEF_CALLBACK *clear_certificate_exceptions)(\n      struct _cef_request_context_t* self,\n      struct _cef_completion_callback_t* callback);\n\n  ///\n  // Clears all active and idle connections that Chromium currently has. This is\n  // only recommended if you have released all other CEF objects but don't yet\n  // want to call cef_shutdown(). If |callback| is non-NULL it will be executed\n  // on the UI thread after completion.\n  ///\n  void (CEF_CALLBACK *close_all_connections)(\n      struct _cef_request_context_t* self,\n      struct _cef_completion_callback_t* callback);\n\n  ///\n  // Attempts to resolve |origin| to a list of associated IP addresses.\n  // |callback| will be executed on the UI thread after completion.\n  ///\n  void (CEF_CALLBACK *resolve_host)(struct _cef_request_context_t* self,\n      const cef_string_t* origin, struct _cef_resolve_callback_t* callback);\n\n  ///\n  // Attempts to resolve |origin| to a list of associated IP addresses using\n  // cached data. |resolved_ips| will be populated with the list of resolved IP\n  // addresses or NULL if no cached data is available. Returns ERR_NONE on\n  // success. This function must be called on the browser process IO thread.\n  ///\n  cef_errorcode_t (CEF_CALLBACK *resolve_host_cached)(\n      struct _cef_request_context_t* self, const cef_string_t* origin,\n      cef_string_list_t resolved_ips);\n} cef_request_context_t;\n\n\n///\n// Returns the global context object.\n///\nCEF_EXPORT cef_request_context_t* cef_request_context_get_global_context();\n\n///\n// Creates a new context object with the specified |settings| and optional\n// |handler|.\n///\nCEF_EXPORT cef_request_context_t* cef_request_context_create_context(\n    const struct _cef_request_context_settings_t* settings,\n    struct _cef_request_context_handler_t* handler);\n\n///\n// Creates a new context object that shares storage with |other| and uses an\n// optional |handler|.\n///\nCEF_EXPORT cef_request_context_t* cef_create_context_shared(\n    cef_request_context_t* other,\n    struct _cef_request_context_handler_t* handler);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_request_context_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_cookie_capi.h\"\n#include \"include/capi/cef_web_plugin_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to provide handler implementations. The handler\n// instance will not be released until all objects related to the context have\n// been destroyed.\n///\ntypedef struct _cef_request_context_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called on the browser process IO thread to retrieve the cookie manager. If\n  // this function returns NULL the default cookie manager retrievable via\n  // cef_request_tContext::get_default_cookie_manager() will be used.\n  ///\n  struct _cef_cookie_manager_t* (CEF_CALLBACK *get_cookie_manager)(\n      struct _cef_request_context_handler_t* self);\n\n  ///\n  // Called on multiple browser process threads before a plugin instance is\n  // loaded. |mime_type| is the mime type of the plugin that will be loaded.\n  // |plugin_url| is the content URL that the plugin will load and may be NULL.\n  // |top_origin_url| is the URL for the top-level frame that contains the\n  // plugin when loading a specific plugin instance or NULL when building the\n  // initial list of enabled plugins for 'navigator.plugins' JavaScript state.\n  // |plugin_info| includes additional information about the plugin that will be\n  // loaded. |plugin_policy| is the recommended policy. Modify |plugin_policy|\n  // and return true (1) to change the policy. Return false (0) to use the\n  // recommended policy. The default plugin policy can be set at runtime using\n  // the `--plugin-policy=[allow|detect|block]` command-line flag. Decisions to\n  // mark a plugin as disabled by setting |plugin_policy| to\n  // PLUGIN_POLICY_DISABLED may be cached when |top_origin_url| is NULL. To\n  // purge the plugin list cache and potentially trigger new calls to this\n  // function call cef_request_tContext::PurgePluginListCache.\n  ///\n  int (CEF_CALLBACK *on_before_plugin_load)(\n      struct _cef_request_context_handler_t* self,\n      const cef_string_t* mime_type, const cef_string_t* plugin_url,\n      const cef_string_t* top_origin_url,\n      struct _cef_web_plugin_info_t* plugin_info,\n      cef_plugin_policy_t* plugin_policy);\n} cef_request_context_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_request_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_auth_callback_capi.h\"\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_frame_capi.h\"\n#include \"include/capi/cef_request_capi.h\"\n#include \"include/capi/cef_resource_handler_capi.h\"\n#include \"include/capi/cef_response_capi.h\"\n#include \"include/capi/cef_response_filter_capi.h\"\n#include \"include/capi/cef_ssl_info_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Callback structure used for asynchronous continuation of url requests.\n///\ntypedef struct _cef_request_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Continue the url request. If |allow| is true (1) the request will be\n  // continued. Otherwise, the request will be canceled.\n  ///\n  void (CEF_CALLBACK *cont)(struct _cef_request_callback_t* self, int allow);\n\n  ///\n  // Cancel the url request.\n  ///\n  void (CEF_CALLBACK *cancel)(struct _cef_request_callback_t* self);\n} cef_request_callback_t;\n\n\n///\n// Implement this structure to handle events related to browser requests. The\n// functions of this structure will be called on the thread indicated.\n///\ntypedef struct _cef_request_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called on the UI thread before browser navigation. Return true (1) to\n  // cancel the navigation or false (0) to allow the navigation to proceed. The\n  // |request| object cannot be modified in this callback.\n  // cef_load_handler_t::OnLoadingStateChange will be called twice in all cases.\n  // If the navigation is allowed cef_load_handler_t::OnLoadStart and\n  // cef_load_handler_t::OnLoadEnd will be called. If the navigation is canceled\n  // cef_load_handler_t::OnLoadError will be called with an |errorCode| value of\n  // ERR_ABORTED.\n  ///\n  int (CEF_CALLBACK *on_before_browse)(struct _cef_request_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      struct _cef_request_t* request, int is_redirect);\n\n  ///\n  // Called on the UI thread before OnBeforeBrowse in certain limited cases\n  // where navigating a new or different browser might be desirable. This\n  // includes user-initiated navigation that might open in a special way (e.g.\n  // links clicked via middle-click or ctrl + left-click) and certain types of\n  // cross-origin navigation initiated from the renderer process (e.g.\n  // navigating the top-level frame to/from a file URL). The |browser| and\n  // |frame| values represent the source of the navigation. The\n  // |target_disposition| value indicates where the user intended to navigate\n  // the browser based on standard Chromium behaviors (e.g. current tab, new\n  // tab, etc). The |user_gesture| value will be true (1) if the browser\n  // navigated via explicit user gesture (e.g. clicking a link) or false (0) if\n  // it navigated automatically (e.g. via the DomContentLoaded event). Return\n  // true (1) to cancel the navigation or false (0) to allow the navigation to\n  // proceed in the source browser's top-level frame.\n  ///\n  int (CEF_CALLBACK *on_open_urlfrom_tab)(struct _cef_request_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      const cef_string_t* target_url,\n      cef_window_open_disposition_t target_disposition, int user_gesture);\n\n  ///\n  // Called on the IO thread before a resource request is loaded. The |request|\n  // object may be modified. Return RV_CONTINUE to continue the request\n  // immediately. Return RV_CONTINUE_ASYNC and call cef_request_tCallback::\n  // cont() at a later time to continue or cancel the request asynchronously.\n  // Return RV_CANCEL to cancel the request immediately.\n  //\n  ///\n  cef_return_value_t (CEF_CALLBACK *on_before_resource_load)(\n      struct _cef_request_handler_t* self, struct _cef_browser_t* browser,\n      struct _cef_frame_t* frame, struct _cef_request_t* request,\n      struct _cef_request_callback_t* callback);\n\n  ///\n  // Called on the IO thread before a resource is loaded. To allow the resource\n  // to load normally return NULL. To specify a handler for the resource return\n  // a cef_resource_handler_t object. The |request| object should not be\n  // modified in this callback.\n  ///\n  struct _cef_resource_handler_t* (CEF_CALLBACK *get_resource_handler)(\n      struct _cef_request_handler_t* self, struct _cef_browser_t* browser,\n      struct _cef_frame_t* frame, struct _cef_request_t* request);\n\n  ///\n  // Called on the IO thread when a resource load is redirected. The |request|\n  // parameter will contain the old URL and other request-related information.\n  // The |new_url| parameter will contain the new URL and can be changed if\n  // desired. The |request| object cannot be modified in this callback.\n  ///\n  void (CEF_CALLBACK *on_resource_redirect)(struct _cef_request_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      struct _cef_request_t* request, cef_string_t* new_url);\n\n  ///\n  // Called on the IO thread when a resource response is received. To allow the\n  // resource to load normally return false (0). To redirect or retry the\n  // resource modify |request| (url, headers or post body) and return true (1).\n  // The |response| object cannot be modified in this callback.\n  ///\n  int (CEF_CALLBACK *on_resource_response)(struct _cef_request_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      struct _cef_request_t* request, struct _cef_response_t* response);\n\n  ///\n  // Called on the IO thread to optionally filter resource response content.\n  // |request| and |response| represent the request and response respectively\n  // and cannot be modified in this callback.\n  ///\n  struct _cef_response_filter_t* (CEF_CALLBACK *get_resource_response_filter)(\n      struct _cef_request_handler_t* self, struct _cef_browser_t* browser,\n      struct _cef_frame_t* frame, struct _cef_request_t* request,\n      struct _cef_response_t* response);\n\n  ///\n  // Called on the IO thread when a resource load has completed. |request| and\n  // |response| represent the request and response respectively and cannot be\n  // modified in this callback. |status| indicates the load completion status.\n  // |received_content_length| is the number of response bytes actually read.\n  ///\n  void (CEF_CALLBACK *on_resource_load_complete)(\n      struct _cef_request_handler_t* self, struct _cef_browser_t* browser,\n      struct _cef_frame_t* frame, struct _cef_request_t* request,\n      struct _cef_response_t* response, cef_urlrequest_status_t status,\n      int64 received_content_length);\n\n  ///\n  // Called on the IO thread when the browser needs credentials from the user.\n  // |isProxy| indicates whether the host is a proxy server. |host| contains the\n  // hostname and |port| contains the port number. |realm| is the realm of the\n  // challenge and may be NULL. |scheme| is the authentication scheme used, such\n  // as \"basic\" or \"digest\", and will be NULL if the source of the request is an\n  // FTP server. Return true (1) to continue the request and call\n  // cef_auth_callback_t::cont() either in this function or at a later time when\n  // the authentication information is available. Return false (0) to cancel the\n  // request immediately.\n  ///\n  int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy,\n      const cef_string_t* host, int port, const cef_string_t* realm,\n      const cef_string_t* scheme, struct _cef_auth_callback_t* callback);\n\n  ///\n  // Called on the IO thread when JavaScript requests a specific storage quota\n  // size via the webkitStorageInfo.requestQuota function. |origin_url| is the\n  // origin of the page making the request. |new_size| is the requested quota\n  // size in bytes. Return true (1) to continue the request and call\n  // cef_request_tCallback::cont() either in this function or at a later time to\n  // grant or deny the request. Return false (0) to cancel the request\n  // immediately.\n  ///\n  int (CEF_CALLBACK *on_quota_request)(struct _cef_request_handler_t* self,\n      struct _cef_browser_t* browser, const cef_string_t* origin_url,\n      int64 new_size, struct _cef_request_callback_t* callback);\n\n  ///\n  // Called on the UI thread to handle requests for URLs with an unknown\n  // protocol component. Set |allow_os_execution| to true (1) to attempt\n  // execution via the registered OS protocol handler, if any. SECURITY WARNING:\n  // YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR\n  // OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION.\n  ///\n  void (CEF_CALLBACK *on_protocol_execution)(\n      struct _cef_request_handler_t* self, struct _cef_browser_t* browser,\n      const cef_string_t* url, int* allow_os_execution);\n\n  ///\n  // Called on the UI thread to handle requests for URLs with an invalid SSL\n  // certificate. Return true (1) and call cef_request_tCallback::cont() either\n  // in this function or at a later time to continue or cancel the request.\n  // Return false (0) to cancel the request immediately. If\n  // CefSettings.ignore_certificate_errors is set all invalid certificates will\n  // be accepted without calling this function.\n  ///\n  int (CEF_CALLBACK *on_certificate_error)(struct _cef_request_handler_t* self,\n      struct _cef_browser_t* browser, cef_errorcode_t cert_error,\n      const cef_string_t* request_url, struct _cef_sslinfo_t* ssl_info,\n      struct _cef_request_callback_t* callback);\n\n  ///\n  // Called on the browser process UI thread when a plugin has crashed.\n  // |plugin_path| is the path of the plugin that crashed.\n  ///\n  void (CEF_CALLBACK *on_plugin_crashed)(struct _cef_request_handler_t* self,\n      struct _cef_browser_t* browser, const cef_string_t* plugin_path);\n\n  ///\n  // Called on the browser process UI thread when the render view associated\n  // with |browser| is ready to receive/handle IPC messages in the render\n  // process.\n  ///\n  void (CEF_CALLBACK *on_render_view_ready)(struct _cef_request_handler_t* self,\n      struct _cef_browser_t* browser);\n\n  ///\n  // Called on the browser process UI thread when the render process terminates\n  // unexpectedly. |status| indicates how the process terminated.\n  ///\n  void (CEF_CALLBACK *on_render_process_terminated)(\n      struct _cef_request_handler_t* self, struct _cef_browser_t* browser,\n      cef_termination_status_t status);\n} cef_request_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_resource_bundle_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure used for retrieving resources from the resource bundle (*.pak)\n// files loaded by CEF during startup or via the cef_resource_bundle_tHandler\n// returned from cef_app_t::GetResourceBundleHandler. See CefSettings for\n// additional options related to resource bundle loading. The functions of this\n// structure may be called on any thread unless otherwise indicated.\n///\ntypedef struct _cef_resource_bundle_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns the localized string for the specified |string_id| or an NULL\n  // string if the value is not found. Include cef_pack_strings.h for a listing\n  // of valid string ID values.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_localized_string)(\n      struct _cef_resource_bundle_t* self, int string_id);\n\n  ///\n  // Retrieves the contents of the specified scale independent |resource_id|. If\n  // the value is found then |data| and |data_size| will be populated and this\n  // function will return true (1). If the value is not found then this function\n  // will return false (0). The returned |data| pointer will remain resident in\n  // memory and should not be freed. Include cef_pack_resources.h for a listing\n  // of valid resource ID values.\n  ///\n  int (CEF_CALLBACK *get_data_resource)(struct _cef_resource_bundle_t* self,\n      int resource_id, void** data, size_t* data_size);\n\n  ///\n  // Retrieves the contents of the specified |resource_id| nearest the scale\n  // factor |scale_factor|. Use a |scale_factor| value of SCALE_FACTOR_NONE for\n  // scale independent resources or call GetDataResource instead. If the value\n  // is found then |data| and |data_size| will be populated and this function\n  // will return true (1). If the value is not found then this function will\n  // return false (0). The returned |data| pointer will remain resident in\n  // memory and should not be freed. Include cef_pack_resources.h for a listing\n  // of valid resource ID values.\n  ///\n  int (CEF_CALLBACK *get_data_resource_for_scale)(\n      struct _cef_resource_bundle_t* self, int resource_id,\n      cef_scale_factor_t scale_factor, void** data, size_t* data_size);\n} cef_resource_bundle_t;\n\n\n///\n// Returns the global resource bundle instance.\n///\nCEF_EXPORT cef_resource_bundle_t* cef_resource_bundle_get_global();\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_resource_bundle_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure used to implement a custom resource bundle structure. See\n// CefSettings for additional options related to resource bundle loading. The\n// functions of this structure may be called on multiple threads.\n///\ntypedef struct _cef_resource_bundle_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called to retrieve a localized translation for the specified |string_id|.\n  // To provide the translation set |string| to the translation string and\n  // return true (1). To use the default translation return false (0). Include\n  // cef_pack_strings.h for a listing of valid string ID values.\n  ///\n  int (CEF_CALLBACK *get_localized_string)(\n      struct _cef_resource_bundle_handler_t* self, int string_id,\n      cef_string_t* string);\n\n  ///\n  // Called to retrieve data for the specified scale independent |resource_id|.\n  // To provide the resource data set |data| and |data_size| to the data pointer\n  // and size respectively and return true (1). To use the default resource data\n  // return false (0). The resource data will not be copied and must remain\n  // resident in memory. Include cef_pack_resources.h for a listing of valid\n  // resource ID values.\n  ///\n  int (CEF_CALLBACK *get_data_resource)(\n      struct _cef_resource_bundle_handler_t* self, int resource_id, void** data,\n      size_t* data_size);\n\n  ///\n  // Called to retrieve data for the specified |resource_id| nearest the scale\n  // factor |scale_factor|. To provide the resource data set |data| and\n  // |data_size| to the data pointer and size respectively and return true (1).\n  // To use the default resource data return false (0). The resource data will\n  // not be copied and must remain resident in memory. Include\n  // cef_pack_resources.h for a listing of valid resource ID values.\n  ///\n  int (CEF_CALLBACK *get_data_resource_for_scale)(\n      struct _cef_resource_bundle_handler_t* self, int resource_id,\n      cef_scale_factor_t scale_factor, void** data, size_t* data_size);\n} cef_resource_bundle_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_resource_handler_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_callback_capi.h\"\n#include \"include/capi/cef_cookie_capi.h\"\n#include \"include/capi/cef_request_capi.h\"\n#include \"include/capi/cef_response_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure used to implement a custom request handler structure. The functions\n// of this structure will always be called on the IO thread.\n///\ntypedef struct _cef_resource_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Begin processing the request. To handle the request return true (1) and\n  // call cef_callback_t::cont() once the response header information is\n  // available (cef_callback_t::cont() can also be called from inside this\n  // function if header information is available immediately). To cancel the\n  // request return false (0).\n  ///\n  int (CEF_CALLBACK *process_request)(struct _cef_resource_handler_t* self,\n      struct _cef_request_t* request, struct _cef_callback_t* callback);\n\n  ///\n  // Retrieve response header information. If the response length is not known\n  // set |response_length| to -1 and read_response() will be called until it\n  // returns false (0). If the response length is known set |response_length| to\n  // a positive value and read_response() will be called until it returns false\n  // (0) or the specified number of bytes have been read. Use the |response|\n  // object to set the mime type, http status code and other optional header\n  // values. To redirect the request to a new URL set |redirectUrl| to the new\n  // URL. If an error occured while setting up the request you can call\n  // set_error() on |response| to indicate the error condition.\n  ///\n  void (CEF_CALLBACK *get_response_headers)(\n      struct _cef_resource_handler_t* self, struct _cef_response_t* response,\n      int64* response_length, cef_string_t* redirectUrl);\n\n  ///\n  // Read response data. If data is available immediately copy up to\n  // |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of\n  // bytes copied, and return true (1). To read the data at a later time set\n  // |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when the\n  // data is available. To indicate response completion return false (0).\n  ///\n  int (CEF_CALLBACK *read_response)(struct _cef_resource_handler_t* self,\n      void* data_out, int bytes_to_read, int* bytes_read,\n      struct _cef_callback_t* callback);\n\n  ///\n  // Return true (1) if the specified cookie can be sent with the request or\n  // false (0) otherwise. If false (0) is returned for any cookie then no\n  // cookies will be sent with the request.\n  ///\n  int (CEF_CALLBACK *can_get_cookie)(struct _cef_resource_handler_t* self,\n      const struct _cef_cookie_t* cookie);\n\n  ///\n  // Return true (1) if the specified cookie returned with the response can be\n  // set or false (0) otherwise.\n  ///\n  int (CEF_CALLBACK *can_set_cookie)(struct _cef_resource_handler_t* self,\n      const struct _cef_cookie_t* cookie);\n\n  ///\n  // Request processing has been canceled.\n  ///\n  void (CEF_CALLBACK *cancel)(struct _cef_resource_handler_t* self);\n} cef_resource_handler_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_response_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure used to represent a web response. The functions of this structure\n// may be called on any thread.\n///\ntypedef struct _cef_response_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is read-only.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_response_t* self);\n\n  ///\n  // Get the response error code. Returns ERR_NONE if there was no error.\n  ///\n  cef_errorcode_t (CEF_CALLBACK *get_error)(struct _cef_response_t* self);\n\n  ///\n  // Set the response error code. This can be used by custom scheme handlers to\n  // return errors during initial request processing.\n  ///\n  void (CEF_CALLBACK *set_error)(struct _cef_response_t* self,\n      cef_errorcode_t error);\n\n  ///\n  // Get the response status code.\n  ///\n  int (CEF_CALLBACK *get_status)(struct _cef_response_t* self);\n\n  ///\n  // Set the response status code.\n  ///\n  void (CEF_CALLBACK *set_status)(struct _cef_response_t* self, int status);\n\n  ///\n  // Get the response status text.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_status_text)(\n      struct _cef_response_t* self);\n\n  ///\n  // Set the response status text.\n  ///\n  void (CEF_CALLBACK *set_status_text)(struct _cef_response_t* self,\n      const cef_string_t* statusText);\n\n  ///\n  // Get the response mime type.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_mime_type)(\n      struct _cef_response_t* self);\n\n  ///\n  // Set the response mime type.\n  ///\n  void (CEF_CALLBACK *set_mime_type)(struct _cef_response_t* self,\n      const cef_string_t* mimeType);\n\n  ///\n  // Get the value for the specified response header field.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_header)(struct _cef_response_t* self,\n      const cef_string_t* name);\n\n  ///\n  // Get all response header fields.\n  ///\n  void (CEF_CALLBACK *get_header_map)(struct _cef_response_t* self,\n      cef_string_multimap_t headerMap);\n\n  ///\n  // Set all response header fields.\n  ///\n  void (CEF_CALLBACK *set_header_map)(struct _cef_response_t* self,\n      cef_string_multimap_t headerMap);\n} cef_response_t;\n\n\n///\n// Create a new cef_response_t object.\n///\nCEF_EXPORT cef_response_t* cef_response_create();\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_response_filter_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to filter resource response content. The functions\n// of this structure will be called on the browser process IO thread.\n///\ntypedef struct _cef_response_filter_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Initialize the response filter. Will only be called a single time. The\n  // filter will not be installed if this function returns false (0).\n  ///\n  int (CEF_CALLBACK *init_filter)(struct _cef_response_filter_t* self);\n\n  ///\n  // Called to filter a chunk of data. |data_in| is the input buffer containing\n  // |data_in_size| bytes of pre-filter data (|data_in| will be NULL if\n  // |data_in_size| is zero). |data_out| is the output buffer that can accept up\n  // to |data_out_size| bytes of filtered output data. Set |data_in_read| to the\n  // number of bytes that were read from |data_in|. Set |data_out_written| to\n  // the number of bytes that were written into |data_out|. If some or all of\n  // the pre-filter data was read successfully but more data is needed in order\n  // to continue filtering (filtered output is pending) return\n  // RESPONSE_FILTER_NEED_MORE_DATA. If some or all of the pre-filter data was\n  // read successfully and all available filtered output has been written return\n  // RESPONSE_FILTER_DONE. If an error occurs during filtering return\n  // RESPONSE_FILTER_ERROR. This function will be called repeatedly until there\n  // is no more data to filter (resource response is complete), |data_in_read|\n  // matches |data_in_size| (all available pre-filter bytes have been read), and\n  // the function returns RESPONSE_FILTER_DONE or RESPONSE_FILTER_ERROR. Do not\n  // keep a reference to the buffers passed to this function.\n  ///\n  cef_response_filter_status_t (CEF_CALLBACK *filter)(\n      struct _cef_response_filter_t* self, void* data_in, size_t data_in_size,\n      size_t* data_in_read, void* data_out, size_t data_out_size,\n      size_t* data_out_written);\n} cef_response_filter_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_scheme_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_frame_capi.h\"\n#include \"include/capi/cef_request_capi.h\"\n#include \"include/capi/cef_resource_handler_capi.h\"\n#include \"include/capi/cef_response_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_scheme_handler_factory_t;\n\n///\n// Structure that manages custom scheme registrations.\n///\ntypedef struct _cef_scheme_registrar_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Register a custom scheme. This function should not be called for the built-\n  // in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.\n  //\n  // If |is_standard| is true (1) the scheme will be treated as a standard\n  // scheme. Standard schemes are subject to URL canonicalization and parsing\n  // rules as defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1\n  // available at http://www.ietf.org/rfc/rfc1738.txt\n  //\n  // In particular, the syntax for standard scheme URLs must be of the form:\n  // <pre>\n  //  [scheme]://[username]:[password]@[host]:[port]/[url-path]\n  // </pre> Standard scheme URLs must have a host component that is a fully\n  // qualified domain name as defined in Section 3.5 of RFC 1034 [13] and\n  // Section 2.1 of RFC 1123. These URLs will be canonicalized to\n  // \"scheme://host/path\" in the simplest case and\n  // \"scheme://username:password@host:port/path\" in the most explicit case. For\n  // example, \"scheme:host/path\" and \"scheme:///host/path\" will both be\n  // canonicalized to \"scheme://host/path\". The origin of a standard scheme URL\n  // is the combination of scheme, host and port (i.e., \"scheme://host:port\" in\n  // the most explicit case).\n  //\n  // For non-standard scheme URLs only the \"scheme:\" component is parsed and\n  // canonicalized. The remainder of the URL will be passed to the handler as-\n  // is. For example, \"scheme:///some%20text\" will remain the same. Non-standard\n  // scheme URLs cannot be used as a target for form submission.\n  //\n  // If |is_local| is true (1) the scheme will be treated as local (i.e., with\n  // the same security rules as those applied to \"file\" URLs). Normal pages\n  // cannot link to or access local URLs. Also, by default, local URLs can only\n  // perform XMLHttpRequest calls to the same URL (origin + path) that\n  // originated the request. To allow XMLHttpRequest calls from a local URL to\n  // other URLs with the same origin set the\n  // CefSettings.file_access_from_file_urls_allowed value to true (1). To allow\n  // XMLHttpRequest calls from a local URL to all origins set the\n  // CefSettings.universal_access_from_file_urls_allowed value to true (1).\n  //\n  // If |is_display_isolated| is true (1) the scheme will be treated as display-\n  // isolated. This means that pages cannot display these URLs unless they are\n  // from the same scheme. For example, pages in another origin cannot create\n  // iframes or hyperlinks to URLs with this scheme.\n  //\n  // This function may be called on any thread. It should only be called once\n  // per unique |scheme_name| value. If |scheme_name| is already registered or\n  // if an error occurs this function will return false (0).\n  ///\n  int (CEF_CALLBACK *add_custom_scheme)(struct _cef_scheme_registrar_t* self,\n      const cef_string_t* scheme_name, int is_standard, int is_local,\n      int is_display_isolated);\n} cef_scheme_registrar_t;\n\n\n///\n// Structure that creates cef_resource_handler_t instances for handling scheme\n// requests. The functions of this structure will always be called on the IO\n// thread.\n///\ntypedef struct _cef_scheme_handler_factory_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Return a new resource handler instance to handle the request or an NULL\n  // reference to allow default handling of the request. |browser| and |frame|\n  // will be the browser window and frame respectively that originated the\n  // request or NULL if the request did not originate from a browser window (for\n  // example, if the request came from cef_urlrequest_t). The |request| object\n  // passed to this function will not contain cookie data.\n  ///\n  struct _cef_resource_handler_t* (CEF_CALLBACK *create)(\n      struct _cef_scheme_handler_factory_t* self,\n      struct _cef_browser_t* browser, struct _cef_frame_t* frame,\n      const cef_string_t* scheme_name, struct _cef_request_t* request);\n} cef_scheme_handler_factory_t;\n\n\n///\n// Register a scheme handler factory with the global request context. An NULL\n// |domain_name| value for a standard scheme will cause the factory to match all\n// domain names. The |domain_name| value will be ignored for non-standard\n// schemes. If |scheme_name| is a built-in scheme and no handler is returned by\n// |factory| then the built-in scheme handler factory will be called. If\n// |scheme_name| is a custom scheme then you must also implement the\n// cef_app_t::on_register_custom_schemes() function in all processes. This\n// function may be called multiple times to change or remove the factory that\n// matches the specified |scheme_name| and optional |domain_name|. Returns false\n// (0) if an error occurs. This function may be called on any thread in the\n// browser process. Using this function is equivalent to calling cef_request_tCo\n// ntext::cef_request_context_get_global_context()->register_scheme_handler_fact\n// ory().\n///\nCEF_EXPORT int cef_register_scheme_handler_factory(\n    const cef_string_t* scheme_name, const cef_string_t* domain_name,\n    cef_scheme_handler_factory_t* factory);\n\n///\n// Clear all scheme handler factories registered with the global request\n// context. Returns false (0) on error. This function may be called on any\n// thread in the browser process. Using this function is equivalent to calling c\n// ef_request_tContext::cef_request_context_get_global_context()->clear_scheme_h\n// andler_factories().\n///\nCEF_EXPORT int cef_clear_scheme_handler_factories();\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_ssl_info_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_values_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure representing the issuer or subject field of an X.509 certificate.\n///\ntypedef struct _cef_sslcert_principal_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns a name that can be used to represent the issuer.  It tries in this\n  // order: CN, O and OU and returns the first non-NULL one found.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_display_name)(\n      struct _cef_sslcert_principal_t* self);\n\n  ///\n  // Returns the common name.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_common_name)(\n      struct _cef_sslcert_principal_t* self);\n\n  ///\n  // Returns the locality name.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_locality_name)(\n      struct _cef_sslcert_principal_t* self);\n\n  ///\n  // Returns the state or province name.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_state_or_province_name)(\n      struct _cef_sslcert_principal_t* self);\n\n  ///\n  // Returns the country name.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_country_name)(\n      struct _cef_sslcert_principal_t* self);\n\n  ///\n  // Retrieve the list of street addresses.\n  ///\n  void (CEF_CALLBACK *get_street_addresses)(\n      struct _cef_sslcert_principal_t* self, cef_string_list_t addresses);\n\n  ///\n  // Retrieve the list of organization names.\n  ///\n  void (CEF_CALLBACK *get_organization_names)(\n      struct _cef_sslcert_principal_t* self, cef_string_list_t names);\n\n  ///\n  // Retrieve the list of organization unit names.\n  ///\n  void (CEF_CALLBACK *get_organization_unit_names)(\n      struct _cef_sslcert_principal_t* self, cef_string_list_t names);\n\n  ///\n  // Retrieve the list of domain components.\n  ///\n  void (CEF_CALLBACK *get_domain_components)(\n      struct _cef_sslcert_principal_t* self, cef_string_list_t components);\n} cef_sslcert_principal_t;\n\n\n///\n// Structure representing SSL information.\n///\ntypedef struct _cef_sslinfo_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns a bitmask containing any and all problems verifying the server\n  // certificate.\n  ///\n  cef_cert_status_t (CEF_CALLBACK *get_cert_status)(\n      struct _cef_sslinfo_t* self);\n\n  ///\n  // Returns true (1) if the certificate status has any error, major or minor.\n  ///\n  int (CEF_CALLBACK *is_cert_status_error)(struct _cef_sslinfo_t* self);\n\n  ///\n  // Returns true (1) if the certificate status represents only minor errors\n  // (e.g. failure to verify certificate revocation).\n  ///\n  int (CEF_CALLBACK *is_cert_status_minor_error)(struct _cef_sslinfo_t* self);\n\n  ///\n  // Returns the subject of the X.509 certificate. For HTTPS server certificates\n  // this represents the web server.  The common name of the subject should\n  // match the host name of the web server.\n  ///\n  struct _cef_sslcert_principal_t* (CEF_CALLBACK *get_subject)(\n      struct _cef_sslinfo_t* self);\n\n  ///\n  // Returns the issuer of the X.509 certificate.\n  ///\n  struct _cef_sslcert_principal_t* (CEF_CALLBACK *get_issuer)(\n      struct _cef_sslinfo_t* self);\n\n  ///\n  // Returns the DER encoded serial number for the X.509 certificate. The value\n  // possibly includes a leading 00 byte.\n  ///\n  struct _cef_binary_value_t* (CEF_CALLBACK *get_serial_number)(\n      struct _cef_sslinfo_t* self);\n\n  ///\n  // Returns the date before which the X.509 certificate is invalid.\n  // CefTime.GetTimeT() will return 0 if no date was specified.\n  ///\n  cef_time_t (CEF_CALLBACK *get_valid_start)(struct _cef_sslinfo_t* self);\n\n  ///\n  // Returns the date after which the X.509 certificate is invalid.\n  // CefTime.GetTimeT() will return 0 if no date was specified.\n  ///\n  cef_time_t (CEF_CALLBACK *get_valid_expiry)(struct _cef_sslinfo_t* self);\n\n  ///\n  // Returns the DER encoded data for the X.509 certificate.\n  ///\n  struct _cef_binary_value_t* (CEF_CALLBACK *get_derencoded)(\n      struct _cef_sslinfo_t* self);\n\n  ///\n  // Returns the PEM encoded data for the X.509 certificate.\n  ///\n  struct _cef_binary_value_t* (CEF_CALLBACK *get_pemencoded)(\n      struct _cef_sslinfo_t* self);\n\n  ///\n  // Returns the number of certificates in the issuer chain. If 0, the\n  // certificate is self-signed.\n  ///\n  size_t (CEF_CALLBACK *get_issuer_chain_size)(struct _cef_sslinfo_t* self);\n\n  ///\n  // Returns the DER encoded data for the certificate issuer chain. If we failed\n  // to encode a certificate in the chain it is still present in the array but\n  // is an NULL string.\n  ///\n  void (CEF_CALLBACK *get_derencoded_issuer_chain)(struct _cef_sslinfo_t* self,\n      size_t* chainCount, struct _cef_binary_value_t** chain);\n\n  ///\n  // Returns the PEM encoded data for the certificate issuer chain. If we failed\n  // to encode a certificate in the chain it is still present in the array but\n  // is an NULL string.\n  ///\n  void (CEF_CALLBACK *get_pemencoded_issuer_chain)(struct _cef_sslinfo_t* self,\n      size_t* chainCount, struct _cef_binary_value_t** chain);\n} cef_sslinfo_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_stream_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure the client can implement to provide a custom stream reader. The\n// functions of this structure may be called on any thread.\n///\ntypedef struct _cef_read_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Read raw binary data.\n  ///\n  size_t (CEF_CALLBACK *read)(struct _cef_read_handler_t* self, void* ptr,\n      size_t size, size_t n);\n\n  ///\n  // Seek to the specified offset position. |whence| may be any one of SEEK_CUR,\n  // SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.\n  ///\n  int (CEF_CALLBACK *seek)(struct _cef_read_handler_t* self, int64 offset,\n      int whence);\n\n  ///\n  // Return the current offset position.\n  ///\n  int64 (CEF_CALLBACK *tell)(struct _cef_read_handler_t* self);\n\n  ///\n  // Return non-zero if at end of file.\n  ///\n  int (CEF_CALLBACK *eof)(struct _cef_read_handler_t* self);\n\n  ///\n  // Return true (1) if this handler performs work like accessing the file\n  // system which may block. Used as a hint for determining the thread to access\n  // the handler from.\n  ///\n  int (CEF_CALLBACK *may_block)(struct _cef_read_handler_t* self);\n} cef_read_handler_t;\n\n\n///\n// Structure used to read data from a stream. The functions of this structure\n// may be called on any thread.\n///\ntypedef struct _cef_stream_reader_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Read raw binary data.\n  ///\n  size_t (CEF_CALLBACK *read)(struct _cef_stream_reader_t* self, void* ptr,\n      size_t size, size_t n);\n\n  ///\n  // Seek to the specified offset position. |whence| may be any one of SEEK_CUR,\n  // SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.\n  ///\n  int (CEF_CALLBACK *seek)(struct _cef_stream_reader_t* self, int64 offset,\n      int whence);\n\n  ///\n  // Return the current offset position.\n  ///\n  int64 (CEF_CALLBACK *tell)(struct _cef_stream_reader_t* self);\n\n  ///\n  // Return non-zero if at end of file.\n  ///\n  int (CEF_CALLBACK *eof)(struct _cef_stream_reader_t* self);\n\n  ///\n  // Returns true (1) if this reader performs work like accessing the file\n  // system which may block. Used as a hint for determining the thread to access\n  // the reader from.\n  ///\n  int (CEF_CALLBACK *may_block)(struct _cef_stream_reader_t* self);\n} cef_stream_reader_t;\n\n\n///\n// Create a new cef_stream_reader_t object from a file.\n///\nCEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_file(\n    const cef_string_t* fileName);\n\n///\n// Create a new cef_stream_reader_t object from data.\n///\nCEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data,\n    size_t size);\n\n///\n// Create a new cef_stream_reader_t object from a custom handler.\n///\nCEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler(\n    cef_read_handler_t* handler);\n\n\n///\n// Structure the client can implement to provide a custom stream writer. The\n// functions of this structure may be called on any thread.\n///\ntypedef struct _cef_write_handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Write raw binary data.\n  ///\n  size_t (CEF_CALLBACK *write)(struct _cef_write_handler_t* self,\n      const void* ptr, size_t size, size_t n);\n\n  ///\n  // Seek to the specified offset position. |whence| may be any one of SEEK_CUR,\n  // SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.\n  ///\n  int (CEF_CALLBACK *seek)(struct _cef_write_handler_t* self, int64 offset,\n      int whence);\n\n  ///\n  // Return the current offset position.\n  ///\n  int64 (CEF_CALLBACK *tell)(struct _cef_write_handler_t* self);\n\n  ///\n  // Flush the stream.\n  ///\n  int (CEF_CALLBACK *flush)(struct _cef_write_handler_t* self);\n\n  ///\n  // Return true (1) if this handler performs work like accessing the file\n  // system which may block. Used as a hint for determining the thread to access\n  // the handler from.\n  ///\n  int (CEF_CALLBACK *may_block)(struct _cef_write_handler_t* self);\n} cef_write_handler_t;\n\n\n///\n// Structure used to write data to a stream. The functions of this structure may\n// be called on any thread.\n///\ntypedef struct _cef_stream_writer_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Write raw binary data.\n  ///\n  size_t (CEF_CALLBACK *write)(struct _cef_stream_writer_t* self,\n      const void* ptr, size_t size, size_t n);\n\n  ///\n  // Seek to the specified offset position. |whence| may be any one of SEEK_CUR,\n  // SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.\n  ///\n  int (CEF_CALLBACK *seek)(struct _cef_stream_writer_t* self, int64 offset,\n      int whence);\n\n  ///\n  // Return the current offset position.\n  ///\n  int64 (CEF_CALLBACK *tell)(struct _cef_stream_writer_t* self);\n\n  ///\n  // Flush the stream.\n  ///\n  int (CEF_CALLBACK *flush)(struct _cef_stream_writer_t* self);\n\n  ///\n  // Returns true (1) if this writer performs work like accessing the file\n  // system which may block. Used as a hint for determining the thread to access\n  // the writer from.\n  ///\n  int (CEF_CALLBACK *may_block)(struct _cef_stream_writer_t* self);\n} cef_stream_writer_t;\n\n\n///\n// Create a new cef_stream_writer_t object for a file.\n///\nCEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_file(\n    const cef_string_t* fileName);\n\n///\n// Create a new cef_stream_writer_t object for a custom handler.\n///\nCEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler(\n    cef_write_handler_t* handler);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_string_visitor_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to receive string values asynchronously.\n///\ntypedef struct _cef_string_visitor_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method that will be executed.\n  ///\n  void (CEF_CALLBACK *visit)(struct _cef_string_visitor_t* self,\n      const cef_string_t* string);\n} cef_string_visitor_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_task_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure for asynchronous task execution. If the task is\n// posted successfully and if the associated message loop is still running then\n// the execute() function will be called on the target thread. If the task fails\n// to post then the task object may be destroyed on the source thread instead of\n// the target thread. For this reason be cautious when performing work in the\n// task object destructor.\n///\ntypedef struct _cef_task_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method that will be executed on the target thread.\n  ///\n  void (CEF_CALLBACK *execute)(struct _cef_task_t* self);\n} cef_task_t;\n\n\n///\n// Structure that asynchronously executes tasks on the associated thread. It is\n// safe to call the functions of this structure on any thread.\n//\n// CEF maintains multiple internal threads that are used for handling different\n// types of tasks in different processes. The cef_thread_id_t definitions in\n// cef_types.h list the common CEF threads. Task runners are also available for\n// other CEF threads as appropriate (for example, V8 WebWorker threads).\n///\ntypedef struct _cef_task_runner_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is pointing to the same task runner as\n  // |that| object.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_task_runner_t* self,\n      struct _cef_task_runner_t* that);\n\n  ///\n  // Returns true (1) if this task runner belongs to the current thread.\n  ///\n  int (CEF_CALLBACK *belongs_to_current_thread)(\n      struct _cef_task_runner_t* self);\n\n  ///\n  // Returns true (1) if this task runner is for the specified CEF thread.\n  ///\n  int (CEF_CALLBACK *belongs_to_thread)(struct _cef_task_runner_t* self,\n      cef_thread_id_t threadId);\n\n  ///\n  // Post a task for execution on the thread associated with this task runner.\n  // Execution will occur asynchronously.\n  ///\n  int (CEF_CALLBACK *post_task)(struct _cef_task_runner_t* self,\n      struct _cef_task_t* task);\n\n  ///\n  // Post a task for delayed execution on the thread associated with this task\n  // runner. Execution will occur asynchronously. Delayed tasks are not\n  // supported on V8 WebWorker threads and will be executed without the\n  // specified delay.\n  ///\n  int (CEF_CALLBACK *post_delayed_task)(struct _cef_task_runner_t* self,\n      struct _cef_task_t* task, int64 delay_ms);\n} cef_task_runner_t;\n\n\n///\n// Returns the task runner for the current thread. Only CEF threads will have\n// task runners. An NULL reference will be returned if this function is called\n// on an invalid thread.\n///\nCEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_current_thread();\n\n///\n// Returns the task runner for the specified CEF thread.\n///\nCEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_thread(\n    cef_thread_id_t threadId);\n\n\n///\n// Returns true (1) if called on the specified thread. Equivalent to using\n// cef_task_tRunner::GetForThread(threadId)->belongs_to_current_thread().\n///\nCEF_EXPORT int cef_currently_on(cef_thread_id_t threadId);\n\n///\n// Post a task for execution on the specified thread. Equivalent to using\n// cef_task_tRunner::GetForThread(threadId)->PostTask(task).\n///\nCEF_EXPORT int cef_post_task(cef_thread_id_t threadId, cef_task_t* task);\n\n///\n// Post a task for delayed execution on the specified thread. Equivalent to\n// using cef_task_tRunner::GetForThread(threadId)->PostDelayedTask(task,\n// delay_ms).\n///\nCEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId, cef_task_t* task,\n    int64 delay_ms);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_trace_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_callback_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to receive notification when tracing has completed.\n// The functions of this structure will be called on the browser process UI\n// thread.\n///\ntypedef struct _cef_end_tracing_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Called after all processes have sent their trace data. |tracing_file| is\n  // the path at which tracing data was written. The client is responsible for\n  // deleting |tracing_file|.\n  ///\n  void (CEF_CALLBACK *on_end_tracing_complete)(\n      struct _cef_end_tracing_callback_t* self,\n      const cef_string_t* tracing_file);\n} cef_end_tracing_callback_t;\n\n\n///\n// Start tracing events on all processes. Tracing is initialized asynchronously\n// and |callback| will be executed on the UI thread after initialization is\n// complete.\n//\n// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is\n// pending, CefBeginTracing will fail and return false (0).\n//\n// |categories| is a comma-delimited list of category wildcards. A category can\n// have an optional '-' prefix to make it an excluded category. Having both\n// included and excluded categories in the same list is not supported.\n//\n// Example: \"test_MyTest*\" Example: \"test_MyTest*,test_OtherStuff\" Example:\n// \"-excluded_category1,-excluded_category2\"\n//\n// This function must be called on the browser process UI thread.\n///\nCEF_EXPORT int cef_begin_tracing(const cef_string_t* categories,\n    struct _cef_completion_callback_t* callback);\n\n///\n// Stop tracing events on all processes.\n//\n// This function will fail and return false (0) if a previous call to\n// CefEndTracingAsync is already pending or if CefBeginTracing was not called.\n//\n// |tracing_file| is the path at which tracing data will be written and\n// |callback| is the callback that will be executed once all processes have sent\n// their trace data. If |tracing_file| is NULL a new temporary file path will be\n// used. If |callback| is NULL no trace data will be written.\n//\n// This function must be called on the browser process UI thread.\n///\nCEF_EXPORT int cef_end_tracing(const cef_string_t* tracing_file,\n    cef_end_tracing_callback_t* callback);\n\n///\n// Returns the current system trace time or, if none is defined, the current\n// high-res time. Can be used by clients to synchronize with the time\n// information in trace events.\n///\nCEF_EXPORT int64 cef_now_from_system_trace_time();\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_urlrequest_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_auth_callback_capi.h\"\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_request_capi.h\"\n#include \"include/capi/cef_request_context_capi.h\"\n#include \"include/capi/cef_response_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_urlrequest_client_t;\n\n///\n// Structure used to make a URL request. URL requests are not associated with a\n// browser instance so no cef_client_t callbacks will be executed. URL requests\n// can be created on any valid CEF thread in either the browser or render\n// process. Once created the functions of the URL request object must be\n// accessed on the same thread that created it.\n///\ntypedef struct _cef_urlrequest_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns the request object used to create this URL request. The returned\n  // object is read-only and should not be modified.\n  ///\n  struct _cef_request_t* (CEF_CALLBACK *get_request)(\n      struct _cef_urlrequest_t* self);\n\n  ///\n  // Returns the client.\n  ///\n  struct _cef_urlrequest_client_t* (CEF_CALLBACK *get_client)(\n      struct _cef_urlrequest_t* self);\n\n  ///\n  // Returns the request status.\n  ///\n  cef_urlrequest_status_t (CEF_CALLBACK *get_request_status)(\n      struct _cef_urlrequest_t* self);\n\n  ///\n  // Returns the request error if status is UR_CANCELED or UR_FAILED, or 0\n  // otherwise.\n  ///\n  cef_errorcode_t (CEF_CALLBACK *get_request_error)(\n      struct _cef_urlrequest_t* self);\n\n  ///\n  // Returns the response, or NULL if no response information is available.\n  // Response information will only be available after the upload has completed.\n  // The returned object is read-only and should not be modified.\n  ///\n  struct _cef_response_t* (CEF_CALLBACK *get_response)(\n      struct _cef_urlrequest_t* self);\n\n  ///\n  // Cancel the request.\n  ///\n  void (CEF_CALLBACK *cancel)(struct _cef_urlrequest_t* self);\n} cef_urlrequest_t;\n\n\n///\n// Create a new URL request. Only GET, POST, HEAD, DELETE and PUT request\n// functions are supported. Multiple post data elements are not supported and\n// elements of type PDE_TYPE_FILE are only supported for requests originating\n// from the browser process. Requests originating from the render process will\n// receive the same handling as requests originating from Web content -- if the\n// response contains Content-Disposition or Mime-Type header values that would\n// not normally be rendered then the response may receive special handling\n// inside the browser (for example, via the file download code path instead of\n// the URL request code path). The |request| object will be marked as read-only\n// after calling this function. In the browser process if |request_context| is\n// NULL the global request context will be used. In the render process\n// |request_context| must be NULL and the context associated with the current\n// renderer process' browser will be used.\n///\nCEF_EXPORT cef_urlrequest_t* cef_urlrequest_create(\n    struct _cef_request_t* request, struct _cef_urlrequest_client_t* client,\n    struct _cef_request_context_t* request_context);\n\n\n///\n// Structure that should be implemented by the cef_urlrequest_t client. The\n// functions of this structure will be called on the same thread that created\n// the request unless otherwise documented.\n///\ntypedef struct _cef_urlrequest_client_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Notifies the client that the request has completed. Use the\n  // cef_urlrequest_t::GetRequestStatus function to determine if the request was\n  // successful or not.\n  ///\n  void (CEF_CALLBACK *on_request_complete)(\n      struct _cef_urlrequest_client_t* self,\n      struct _cef_urlrequest_t* request);\n\n  ///\n  // Notifies the client of upload progress. |current| denotes the number of\n  // bytes sent so far and |total| is the total size of uploading data (or -1 if\n  // chunked upload is enabled). This function will only be called if the\n  // UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.\n  ///\n  void (CEF_CALLBACK *on_upload_progress)(struct _cef_urlrequest_client_t* self,\n      struct _cef_urlrequest_t* request, int64 current, int64 total);\n\n  ///\n  // Notifies the client of download progress. |current| denotes the number of\n  // bytes received up to the call and |total| is the expected total size of the\n  // response (or -1 if not determined).\n  ///\n  void (CEF_CALLBACK *on_download_progress)(\n      struct _cef_urlrequest_client_t* self, struct _cef_urlrequest_t* request,\n      int64 current, int64 total);\n\n  ///\n  // Called when some part of the response is read. |data| contains the current\n  // bytes received since the last call. This function will not be called if the\n  // UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.\n  ///\n  void (CEF_CALLBACK *on_download_data)(struct _cef_urlrequest_client_t* self,\n      struct _cef_urlrequest_t* request, const void* data,\n      size_t data_length);\n\n  ///\n  // Called on the IO thread when the browser needs credentials from the user.\n  // |isProxy| indicates whether the host is a proxy server. |host| contains the\n  // hostname and |port| contains the port number. Return true (1) to continue\n  // the request and call cef_auth_callback_t::cont() when the authentication\n  // information is available. Return false (0) to cancel the request. This\n  // function will only be called for requests initiated from the browser\n  // process.\n  ///\n  int (CEF_CALLBACK *get_auth_credentials)(\n      struct _cef_urlrequest_client_t* self, int isProxy,\n      const cef_string_t* host, int port, const cef_string_t* realm,\n      const cef_string_t* scheme, struct _cef_auth_callback_t* callback);\n} cef_urlrequest_client_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_v8_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/cef_frame_capi.h\"\n#include \"include/capi/cef_task_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_v8exception_t;\nstruct _cef_v8handler_t;\nstruct _cef_v8stack_frame_t;\nstruct _cef_v8value_t;\n\n///\n// Structure representing a V8 context handle. V8 handles can only be accessed\n// from the thread on which they are created. Valid threads for creating a V8\n// handle include the render process main thread (TID_RENDERER) and WebWorker\n// threads. A task runner for posting tasks on the associated thread can be\n// retrieved via the cef_v8context_t::get_task_runner() function.\n///\ntypedef struct _cef_v8context_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns the task runner associated with this context. V8 handles can only\n  // be accessed from the thread on which they are created. This function can be\n  // called on any render process thread.\n  ///\n  struct _cef_task_runner_t* (CEF_CALLBACK *get_task_runner)(\n      struct _cef_v8context_t* self);\n\n  ///\n  // Returns true (1) if the underlying handle is valid and it can be accessed\n  // on the current thread. Do not call any other functions if this function\n  // returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_v8context_t* self);\n\n  ///\n  // Returns the browser for this context. This function will return an NULL\n  // reference for WebWorker contexts.\n  ///\n  struct _cef_browser_t* (CEF_CALLBACK *get_browser)(\n      struct _cef_v8context_t* self);\n\n  ///\n  // Returns the frame for this context. This function will return an NULL\n  // reference for WebWorker contexts.\n  ///\n  struct _cef_frame_t* (CEF_CALLBACK *get_frame)(struct _cef_v8context_t* self);\n\n  ///\n  // Returns the global object for this context. The context must be entered\n  // before calling this function.\n  ///\n  struct _cef_v8value_t* (CEF_CALLBACK *get_global)(\n      struct _cef_v8context_t* self);\n\n  ///\n  // Enter this context. A context must be explicitly entered before creating a\n  // V8 Object, Array, Function or Date asynchronously. exit() must be called\n  // the same number of times as enter() before releasing this context. V8\n  // objects belong to the context in which they are created. Returns true (1)\n  // if the scope was entered successfully.\n  ///\n  int (CEF_CALLBACK *enter)(struct _cef_v8context_t* self);\n\n  ///\n  // Exit this context. Call this function only after calling enter(). Returns\n  // true (1) if the scope was exited successfully.\n  ///\n  int (CEF_CALLBACK *exit)(struct _cef_v8context_t* self);\n\n  ///\n  // Returns true (1) if this object is pointing to the same handle as |that|\n  // object.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_v8context_t* self,\n      struct _cef_v8context_t* that);\n\n  ///\n  // Evaluates the specified JavaScript code using this context's global object.\n  // On success |retval| will be set to the return value, if any, and the\n  // function will return true (1). On failure |exception| will be set to the\n  // exception, if any, and the function will return false (0).\n  ///\n  int (CEF_CALLBACK *eval)(struct _cef_v8context_t* self,\n      const cef_string_t* code, struct _cef_v8value_t** retval,\n      struct _cef_v8exception_t** exception);\n} cef_v8context_t;\n\n\n///\n// Returns the current (top) context object in the V8 context stack.\n///\nCEF_EXPORT cef_v8context_t* cef_v8context_get_current_context();\n\n///\n// Returns the entered (bottom) context object in the V8 context stack.\n///\nCEF_EXPORT cef_v8context_t* cef_v8context_get_entered_context();\n\n///\n// Returns true (1) if V8 is currently inside a context.\n///\nCEF_EXPORT int cef_v8context_in_context();\n\n\n///\n// Structure that should be implemented to handle V8 function calls. The\n// functions of this structure will be called on the thread associated with the\n// V8 function.\n///\ntypedef struct _cef_v8handler_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Handle execution of the function identified by |name|. |object| is the\n  // receiver ('this' object) of the function. |arguments| is the list of\n  // arguments passed to the function. If execution succeeds set |retval| to the\n  // function return value. If execution fails set |exception| to the exception\n  // that will be thrown. Return true (1) if execution was handled.\n  ///\n  int (CEF_CALLBACK *execute)(struct _cef_v8handler_t* self,\n      const cef_string_t* name, struct _cef_v8value_t* object,\n      size_t argumentsCount, struct _cef_v8value_t* const* arguments,\n      struct _cef_v8value_t** retval, cef_string_t* exception);\n} cef_v8handler_t;\n\n\n///\n// Structure that should be implemented to handle V8 accessor calls. Accessor\n// identifiers are registered by calling cef_v8value_t::set_value(). The\n// functions of this structure will be called on the thread associated with the\n// V8 accessor.\n///\ntypedef struct _cef_v8accessor_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Handle retrieval the accessor value identified by |name|. |object| is the\n  // receiver ('this' object) of the accessor. If retrieval succeeds set\n  // |retval| to the return value. If retrieval fails set |exception| to the\n  // exception that will be thrown. Return true (1) if accessor retrieval was\n  // handled.\n  ///\n  int (CEF_CALLBACK *get)(struct _cef_v8accessor_t* self,\n      const cef_string_t* name, struct _cef_v8value_t* object,\n      struct _cef_v8value_t** retval, cef_string_t* exception);\n\n  ///\n  // Handle assignment of the accessor value identified by |name|. |object| is\n  // the receiver ('this' object) of the accessor. |value| is the new value\n  // being assigned to the accessor. If assignment fails set |exception| to the\n  // exception that will be thrown. Return true (1) if accessor assignment was\n  // handled.\n  ///\n  int (CEF_CALLBACK *set)(struct _cef_v8accessor_t* self,\n      const cef_string_t* name, struct _cef_v8value_t* object,\n      struct _cef_v8value_t* value, cef_string_t* exception);\n} cef_v8accessor_t;\n\n\n///\n// Structure representing a V8 exception. The functions of this structure may be\n// called on any render process thread.\n///\ntypedef struct _cef_v8exception_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns the exception message.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_message)(\n      struct _cef_v8exception_t* self);\n\n  ///\n  // Returns the line of source code that the exception occurred within.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_source_line)(\n      struct _cef_v8exception_t* self);\n\n  ///\n  // Returns the resource name for the script from where the function causing\n  // the error originates.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_script_resource_name)(\n      struct _cef_v8exception_t* self);\n\n  ///\n  // Returns the 1-based number of the line where the error occurred or 0 if the\n  // line number is unknown.\n  ///\n  int (CEF_CALLBACK *get_line_number)(struct _cef_v8exception_t* self);\n\n  ///\n  // Returns the index within the script of the first character where the error\n  // occurred.\n  ///\n  int (CEF_CALLBACK *get_start_position)(struct _cef_v8exception_t* self);\n\n  ///\n  // Returns the index within the script of the last character where the error\n  // occurred.\n  ///\n  int (CEF_CALLBACK *get_end_position)(struct _cef_v8exception_t* self);\n\n  ///\n  // Returns the index within the line of the first character where the error\n  // occurred.\n  ///\n  int (CEF_CALLBACK *get_start_column)(struct _cef_v8exception_t* self);\n\n  ///\n  // Returns the index within the line of the last character where the error\n  // occurred.\n  ///\n  int (CEF_CALLBACK *get_end_column)(struct _cef_v8exception_t* self);\n} cef_v8exception_t;\n\n\n///\n// Structure representing a V8 value handle. V8 handles can only be accessed\n// from the thread on which they are created. Valid threads for creating a V8\n// handle include the render process main thread (TID_RENDERER) and WebWorker\n// threads. A task runner for posting tasks on the associated thread can be\n// retrieved via the cef_v8context_t::get_task_runner() function.\n///\ntypedef struct _cef_v8value_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if the underlying handle is valid and it can be accessed\n  // on the current thread. Do not call any other functions if this function\n  // returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_v8value_t* self);\n\n  ///\n  // True if the value type is undefined.\n  ///\n  int (CEF_CALLBACK *is_undefined)(struct _cef_v8value_t* self);\n\n  ///\n  // True if the value type is null.\n  ///\n  int (CEF_CALLBACK *is_null)(struct _cef_v8value_t* self);\n\n  ///\n  // True if the value type is bool.\n  ///\n  int (CEF_CALLBACK *is_bool)(struct _cef_v8value_t* self);\n\n  ///\n  // True if the value type is int.\n  ///\n  int (CEF_CALLBACK *is_int)(struct _cef_v8value_t* self);\n\n  ///\n  // True if the value type is unsigned int.\n  ///\n  int (CEF_CALLBACK *is_uint)(struct _cef_v8value_t* self);\n\n  ///\n  // True if the value type is double.\n  ///\n  int (CEF_CALLBACK *is_double)(struct _cef_v8value_t* self);\n\n  ///\n  // True if the value type is Date.\n  ///\n  int (CEF_CALLBACK *is_date)(struct _cef_v8value_t* self);\n\n  ///\n  // True if the value type is string.\n  ///\n  int (CEF_CALLBACK *is_string)(struct _cef_v8value_t* self);\n\n  ///\n  // True if the value type is object.\n  ///\n  int (CEF_CALLBACK *is_object)(struct _cef_v8value_t* self);\n\n  ///\n  // True if the value type is array.\n  ///\n  int (CEF_CALLBACK *is_array)(struct _cef_v8value_t* self);\n\n  ///\n  // True if the value type is function.\n  ///\n  int (CEF_CALLBACK *is_function)(struct _cef_v8value_t* self);\n\n  ///\n  // Returns true (1) if this object is pointing to the same handle as |that|\n  // object.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_v8value_t* self,\n      struct _cef_v8value_t* that);\n\n  ///\n  // Return a bool value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  int (CEF_CALLBACK *get_bool_value)(struct _cef_v8value_t* self);\n\n  ///\n  // Return an int value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  int32 (CEF_CALLBACK *get_int_value)(struct _cef_v8value_t* self);\n\n  ///\n  // Return an unisgned int value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  uint32 (CEF_CALLBACK *get_uint_value)(struct _cef_v8value_t* self);\n\n  ///\n  // Return a double value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  double (CEF_CALLBACK *get_double_value)(struct _cef_v8value_t* self);\n\n  ///\n  // Return a Date value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  cef_time_t (CEF_CALLBACK *get_date_value)(struct _cef_v8value_t* self);\n\n  ///\n  // Return a string value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_string_value)(\n      struct _cef_v8value_t* self);\n\n\n  // OBJECT METHODS - These functions are only available on objects. Arrays and\n  // functions are also objects. String- and integer-based keys can be used\n  // interchangably with the framework converting between them as necessary.\n\n  ///\n  // Returns true (1) if this is a user created object.\n  ///\n  int (CEF_CALLBACK *is_user_created)(struct _cef_v8value_t* self);\n\n  ///\n  // Returns true (1) if the last function call resulted in an exception. This\n  // attribute exists only in the scope of the current CEF value object.\n  ///\n  int (CEF_CALLBACK *has_exception)(struct _cef_v8value_t* self);\n\n  ///\n  // Returns the exception resulting from the last function call. This attribute\n  // exists only in the scope of the current CEF value object.\n  ///\n  struct _cef_v8exception_t* (CEF_CALLBACK *get_exception)(\n      struct _cef_v8value_t* self);\n\n  ///\n  // Clears the last exception and returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *clear_exception)(struct _cef_v8value_t* self);\n\n  ///\n  // Returns true (1) if this object will re-throw future exceptions. This\n  // attribute exists only in the scope of the current CEF value object.\n  ///\n  int (CEF_CALLBACK *will_rethrow_exceptions)(struct _cef_v8value_t* self);\n\n  ///\n  // Set whether this object will re-throw future exceptions. By default\n  // exceptions are not re-thrown. If a exception is re-thrown the current\n  // context should not be accessed again until after the exception has been\n  // caught and not re-thrown. Returns true (1) on success. This attribute\n  // exists only in the scope of the current CEF value object.\n  ///\n  int (CEF_CALLBACK *set_rethrow_exceptions)(struct _cef_v8value_t* self,\n      int rethrow);\n\n  ///\n  // Returns true (1) if the object has a value with the specified identifier.\n  ///\n  int (CEF_CALLBACK *has_value_bykey)(struct _cef_v8value_t* self,\n      const cef_string_t* key);\n\n  ///\n  // Returns true (1) if the object has a value with the specified identifier.\n  ///\n  int (CEF_CALLBACK *has_value_byindex)(struct _cef_v8value_t* self, int index);\n\n  ///\n  // Deletes the value with the specified identifier and returns true (1) on\n  // success. Returns false (0) if this function is called incorrectly or an\n  // exception is thrown. For read-only and don't-delete values this function\n  // will return true (1) even though deletion failed.\n  ///\n  int (CEF_CALLBACK *delete_value_bykey)(struct _cef_v8value_t* self,\n      const cef_string_t* key);\n\n  ///\n  // Deletes the value with the specified identifier and returns true (1) on\n  // success. Returns false (0) if this function is called incorrectly, deletion\n  // fails or an exception is thrown. For read-only and don't-delete values this\n  // function will return true (1) even though deletion failed.\n  ///\n  int (CEF_CALLBACK *delete_value_byindex)(struct _cef_v8value_t* self,\n      int index);\n\n  ///\n  // Returns the value with the specified identifier on success. Returns NULL if\n  // this function is called incorrectly or an exception is thrown.\n  ///\n  struct _cef_v8value_t* (CEF_CALLBACK *get_value_bykey)(\n      struct _cef_v8value_t* self, const cef_string_t* key);\n\n  ///\n  // Returns the value with the specified identifier on success. Returns NULL if\n  // this function is called incorrectly or an exception is thrown.\n  ///\n  struct _cef_v8value_t* (CEF_CALLBACK *get_value_byindex)(\n      struct _cef_v8value_t* self, int index);\n\n  ///\n  // Associates a value with the specified identifier and returns true (1) on\n  // success. Returns false (0) if this function is called incorrectly or an\n  // exception is thrown. For read-only values this function will return true\n  // (1) even though assignment failed.\n  ///\n  int (CEF_CALLBACK *set_value_bykey)(struct _cef_v8value_t* self,\n      const cef_string_t* key, struct _cef_v8value_t* value,\n      cef_v8_propertyattribute_t attribute);\n\n  ///\n  // Associates a value with the specified identifier and returns true (1) on\n  // success. Returns false (0) if this function is called incorrectly or an\n  // exception is thrown. For read-only values this function will return true\n  // (1) even though assignment failed.\n  ///\n  int (CEF_CALLBACK *set_value_byindex)(struct _cef_v8value_t* self, int index,\n      struct _cef_v8value_t* value);\n\n  ///\n  // Registers an identifier and returns true (1) on success. Access to the\n  // identifier will be forwarded to the cef_v8accessor_t instance passed to\n  // cef_v8value_t::cef_v8value_create_object(). Returns false (0) if this\n  // function is called incorrectly or an exception is thrown. For read-only\n  // values this function will return true (1) even though assignment failed.\n  ///\n  int (CEF_CALLBACK *set_value_byaccessor)(struct _cef_v8value_t* self,\n      const cef_string_t* key, cef_v8_accesscontrol_t settings,\n      cef_v8_propertyattribute_t attribute);\n\n  ///\n  // Read the keys for the object's values into the specified vector. Integer-\n  // based keys will also be returned as strings.\n  ///\n  int (CEF_CALLBACK *get_keys)(struct _cef_v8value_t* self,\n      cef_string_list_t keys);\n\n  ///\n  // Sets the user data for this object and returns true (1) on success. Returns\n  // false (0) if this function is called incorrectly. This function can only be\n  // called on user created objects.\n  ///\n  int (CEF_CALLBACK *set_user_data)(struct _cef_v8value_t* self,\n      struct _cef_base_t* user_data);\n\n  ///\n  // Returns the user data, if any, assigned to this object.\n  ///\n  struct _cef_base_t* (CEF_CALLBACK *get_user_data)(\n      struct _cef_v8value_t* self);\n\n  ///\n  // Returns the amount of externally allocated memory registered for the\n  // object.\n  ///\n  int (CEF_CALLBACK *get_externally_allocated_memory)(\n      struct _cef_v8value_t* self);\n\n  ///\n  // Adjusts the amount of registered external memory for the object. Used to\n  // give V8 an indication of the amount of externally allocated memory that is\n  // kept alive by JavaScript objects. V8 uses this information to decide when\n  // to perform global garbage collection. Each cef_v8value_t tracks the amount\n  // of external memory associated with it and automatically decreases the\n  // global total by the appropriate amount on its destruction.\n  // |change_in_bytes| specifies the number of bytes to adjust by. This function\n  // returns the number of bytes associated with the object after the\n  // adjustment. This function can only be called on user created objects.\n  ///\n  int (CEF_CALLBACK *adjust_externally_allocated_memory)(\n      struct _cef_v8value_t* self, int change_in_bytes);\n\n\n  // ARRAY METHODS - These functions are only available on arrays.\n\n  ///\n  // Returns the number of elements in the array.\n  ///\n  int (CEF_CALLBACK *get_array_length)(struct _cef_v8value_t* self);\n\n\n  // FUNCTION METHODS - These functions are only available on functions.\n\n  ///\n  // Returns the function name.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_function_name)(\n      struct _cef_v8value_t* self);\n\n  ///\n  // Returns the function handler or NULL if not a CEF-created function.\n  ///\n  struct _cef_v8handler_t* (CEF_CALLBACK *get_function_handler)(\n      struct _cef_v8value_t* self);\n\n  ///\n  // Execute the function using the current V8 context. This function should\n  // only be called from within the scope of a cef_v8handler_t or\n  // cef_v8accessor_t callback, or in combination with calling enter() and\n  // exit() on a stored cef_v8context_t reference. |object| is the receiver\n  // ('this' object) of the function. If |object| is NULL the current context's\n  // global object will be used. |arguments| is the list of arguments that will\n  // be passed to the function. Returns the function return value on success.\n  // Returns NULL if this function is called incorrectly or an exception is\n  // thrown.\n  ///\n  struct _cef_v8value_t* (CEF_CALLBACK *execute_function)(\n      struct _cef_v8value_t* self, struct _cef_v8value_t* object,\n      size_t argumentsCount, struct _cef_v8value_t* const* arguments);\n\n  ///\n  // Execute the function using the specified V8 context. |object| is the\n  // receiver ('this' object) of the function. If |object| is NULL the specified\n  // context's global object will be used. |arguments| is the list of arguments\n  // that will be passed to the function. Returns the function return value on\n  // success. Returns NULL if this function is called incorrectly or an\n  // exception is thrown.\n  ///\n  struct _cef_v8value_t* (CEF_CALLBACK *execute_function_with_context)(\n      struct _cef_v8value_t* self, struct _cef_v8context_t* context,\n      struct _cef_v8value_t* object, size_t argumentsCount,\n      struct _cef_v8value_t* const* arguments);\n} cef_v8value_t;\n\n\n///\n// Create a new cef_v8value_t object of type undefined.\n///\nCEF_EXPORT cef_v8value_t* cef_v8value_create_undefined();\n\n///\n// Create a new cef_v8value_t object of type null.\n///\nCEF_EXPORT cef_v8value_t* cef_v8value_create_null();\n\n///\n// Create a new cef_v8value_t object of type bool.\n///\nCEF_EXPORT cef_v8value_t* cef_v8value_create_bool(int value);\n\n///\n// Create a new cef_v8value_t object of type int.\n///\nCEF_EXPORT cef_v8value_t* cef_v8value_create_int(int32 value);\n\n///\n// Create a new cef_v8value_t object of type unsigned int.\n///\nCEF_EXPORT cef_v8value_t* cef_v8value_create_uint(uint32 value);\n\n///\n// Create a new cef_v8value_t object of type double.\n///\nCEF_EXPORT cef_v8value_t* cef_v8value_create_double(double value);\n\n///\n// Create a new cef_v8value_t object of type Date. This function should only be\n// called from within the scope of a cef_render_process_handler_t,\n// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling\n// enter() and exit() on a stored cef_v8context_t reference.\n///\nCEF_EXPORT cef_v8value_t* cef_v8value_create_date(const cef_time_t* date);\n\n///\n// Create a new cef_v8value_t object of type string.\n///\nCEF_EXPORT cef_v8value_t* cef_v8value_create_string(const cef_string_t* value);\n\n///\n// Create a new cef_v8value_t object of type object with optional accessor. This\n// function should only be called from within the scope of a\n// cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback,\n// or in combination with calling enter() and exit() on a stored cef_v8context_t\n// reference.\n///\nCEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_v8accessor_t* accessor);\n\n///\n// Create a new cef_v8value_t object of type array with the specified |length|.\n// If |length| is negative the returned array will have length 0. This function\n// should only be called from within the scope of a\n// cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback,\n// or in combination with calling enter() and exit() on a stored cef_v8context_t\n// reference.\n///\nCEF_EXPORT cef_v8value_t* cef_v8value_create_array(int length);\n\n///\n// Create a new cef_v8value_t object of type function. This function should only\n// be called from within the scope of a cef_render_process_handler_t,\n// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling\n// enter() and exit() on a stored cef_v8context_t reference.\n///\nCEF_EXPORT cef_v8value_t* cef_v8value_create_function(const cef_string_t* name,\n    cef_v8handler_t* handler);\n\n\n///\n// Structure representing a V8 stack trace handle. V8 handles can only be\n// accessed from the thread on which they are created. Valid threads for\n// creating a V8 handle include the render process main thread (TID_RENDERER)\n// and WebWorker threads. A task runner for posting tasks on the associated\n// thread can be retrieved via the cef_v8context_t::get_task_runner() function.\n///\ntypedef struct _cef_v8stack_trace_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if the underlying handle is valid and it can be accessed\n  // on the current thread. Do not call any other functions if this function\n  // returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_v8stack_trace_t* self);\n\n  ///\n  // Returns the number of stack frames.\n  ///\n  int (CEF_CALLBACK *get_frame_count)(struct _cef_v8stack_trace_t* self);\n\n  ///\n  // Returns the stack frame at the specified 0-based index.\n  ///\n  struct _cef_v8stack_frame_t* (CEF_CALLBACK *get_frame)(\n      struct _cef_v8stack_trace_t* self, int index);\n} cef_v8stack_trace_t;\n\n\n///\n// Returns the stack trace for the currently active context. |frame_limit| is\n// the maximum number of frames that will be captured.\n///\nCEF_EXPORT cef_v8stack_trace_t* cef_v8stack_trace_get_current(int frame_limit);\n\n\n///\n// Structure representing a V8 stack frame handle. V8 handles can only be\n// accessed from the thread on which they are created. Valid threads for\n// creating a V8 handle include the render process main thread (TID_RENDERER)\n// and WebWorker threads. A task runner for posting tasks on the associated\n// thread can be retrieved via the cef_v8context_t::get_task_runner() function.\n///\ntypedef struct _cef_v8stack_frame_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if the underlying handle is valid and it can be accessed\n  // on the current thread. Do not call any other functions if this function\n  // returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_v8stack_frame_t* self);\n\n  ///\n  // Returns the name of the resource script that contains the function.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_script_name)(\n      struct _cef_v8stack_frame_t* self);\n\n  ///\n  // Returns the name of the resource script that contains the function or the\n  // sourceURL value if the script name is undefined and its source ends with a\n  // \"//@ sourceURL=...\" string.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_script_name_or_source_url)(\n      struct _cef_v8stack_frame_t* self);\n\n  ///\n  // Returns the name of the function.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_function_name)(\n      struct _cef_v8stack_frame_t* self);\n\n  ///\n  // Returns the 1-based line number for the function call or 0 if unknown.\n  ///\n  int (CEF_CALLBACK *get_line_number)(struct _cef_v8stack_frame_t* self);\n\n  ///\n  // Returns the 1-based column offset on the line for the function call or 0 if\n  // unknown.\n  ///\n  int (CEF_CALLBACK *get_column)(struct _cef_v8stack_frame_t* self);\n\n  ///\n  // Returns true (1) if the function was compiled using eval().\n  ///\n  int (CEF_CALLBACK *is_eval)(struct _cef_v8stack_frame_t* self);\n\n  ///\n  // Returns true (1) if the function was called as a constructor via \"new\".\n  ///\n  int (CEF_CALLBACK *is_constructor)(struct _cef_v8stack_frame_t* self);\n} cef_v8stack_frame_t;\n\n\n///\n// Register a new V8 extension with the specified JavaScript extension code and\n// handler. Functions implemented by the handler are prototyped using the\n// keyword 'native'. The calling of a native function is restricted to the scope\n// in which the prototype of the native function is defined. This function may\n// only be called on the render process main thread.\n//\n// Example JavaScript extension code: <pre>\n//   // create the 'example' global object if it doesn't already exist.\n//   if (!example)\n//     example = {};\n//   // create the 'example.test' global object if it doesn't already exist.\n//   if (!example.test)\n//     example.test = {};\n//   (function() {\n//     // Define the function 'example.test.myfunction'.\n//     example.test.myfunction = function() {\n//       // Call CefV8Handler::Execute() with the function name 'MyFunction'\n//       // and no arguments.\n//       native function MyFunction();\n//       return MyFunction();\n//     };\n//     // Define the getter function for parameter 'example.test.myparam'.\n//     example.test.__defineGetter__('myparam', function() {\n//       // Call CefV8Handler::Execute() with the function name 'GetMyParam'\n//       // and no arguments.\n//       native function GetMyParam();\n//       return GetMyParam();\n//     });\n//     // Define the setter function for parameter 'example.test.myparam'.\n//     example.test.__defineSetter__('myparam', function(b) {\n//       // Call CefV8Handler::Execute() with the function name 'SetMyParam'\n//       // and a single argument.\n//       native function SetMyParam();\n//       if(b) SetMyParam(b);\n//     });\n//\n//     // Extension definitions can also contain normal JavaScript variables\n//     // and functions.\n//     var myint = 0;\n//     example.test.increment = function() {\n//       myint += 1;\n//       return myint;\n//     };\n//   })();\n// </pre> Example usage in the page: <pre>\n//   // Call the function.\n//   example.test.myfunction();\n//   // Set the parameter.\n//   example.test.myparam = value;\n//   // Get the parameter.\n//   value = example.test.myparam;\n//   // Call another function.\n//   example.test.increment();\n// </pre>\n///\nCEF_EXPORT int cef_register_extension(const cef_string_t* extension_name,\n    const cef_string_t* javascript_code, cef_v8handler_t* handler);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_values_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_binary_value_t;\nstruct _cef_dictionary_value_t;\nstruct _cef_list_value_t;\n\n///\n// Structure that wraps other data value types. Complex types (binary,\n// dictionary and list) will be referenced but not owned by this object. Can be\n// used on any process and thread.\n///\ntypedef struct _cef_value_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if the underlying data is valid. This will always be true\n  // (1) for simple types. For complex types (binary, dictionary and list) the\n  // underlying data may become invalid if owned by another object (e.g. list or\n  // dictionary) and that other object is then modified or destroyed. This value\n  // object can be re-used by calling Set*() even if the underlying data is\n  // invalid.\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_value_t* self);\n\n  ///\n  // Returns true (1) if the underlying data is owned by another object.\n  ///\n  int (CEF_CALLBACK *is_owned)(struct _cef_value_t* self);\n\n  ///\n  // Returns true (1) if the underlying data is read-only. Some APIs may expose\n  // read-only objects.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_value_t* self);\n\n  ///\n  // Returns true (1) if this object and |that| object have the same underlying\n  // data. If true (1) modifications to this object will also affect |that|\n  // object and vice-versa.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_value_t* self,\n      struct _cef_value_t* that);\n\n  ///\n  // Returns true (1) if this object and |that| object have an equivalent\n  // underlying value but are not necessarily the same object.\n  ///\n  int (CEF_CALLBACK *is_equal)(struct _cef_value_t* self,\n      struct _cef_value_t* that);\n\n  ///\n  // Returns a copy of this object. The underlying data will also be copied.\n  ///\n  struct _cef_value_t* (CEF_CALLBACK *copy)(struct _cef_value_t* self);\n\n  ///\n  // Returns the underlying value type.\n  ///\n  cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_value_t* self);\n\n  ///\n  // Returns the underlying value as type bool.\n  ///\n  int (CEF_CALLBACK *get_bool)(struct _cef_value_t* self);\n\n  ///\n  // Returns the underlying value as type int.\n  ///\n  int (CEF_CALLBACK *get_int)(struct _cef_value_t* self);\n\n  ///\n  // Returns the underlying value as type double.\n  ///\n  double (CEF_CALLBACK *get_double)(struct _cef_value_t* self);\n\n  ///\n  // Returns the underlying value as type string.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_string)(struct _cef_value_t* self);\n\n  ///\n  // Returns the underlying value as type binary. The returned reference may\n  // become invalid if the value is owned by another object or if ownership is\n  // transferred to another object in the future. To maintain a reference to the\n  // value after assigning ownership to a dictionary or list pass this object to\n  // the set_value() function instead of passing the returned reference to\n  // set_binary().\n  ///\n  struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(\n      struct _cef_value_t* self);\n\n  ///\n  // Returns the underlying value as type dictionary. The returned reference may\n  // become invalid if the value is owned by another object or if ownership is\n  // transferred to another object in the future. To maintain a reference to the\n  // value after assigning ownership to a dictionary or list pass this object to\n  // the set_value() function instead of passing the returned reference to\n  // set_dictionary().\n  ///\n  struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(\n      struct _cef_value_t* self);\n\n  ///\n  // Returns the underlying value as type list. The returned reference may\n  // become invalid if the value is owned by another object or if ownership is\n  // transferred to another object in the future. To maintain a reference to the\n  // value after assigning ownership to a dictionary or list pass this object to\n  // the set_value() function instead of passing the returned reference to\n  // set_list().\n  ///\n  struct _cef_list_value_t* (CEF_CALLBACK *get_list)(struct _cef_value_t* self);\n\n  ///\n  // Sets the underlying value as type null. Returns true (1) if the value was\n  // set successfully.\n  ///\n  int (CEF_CALLBACK *set_null)(struct _cef_value_t* self);\n\n  ///\n  // Sets the underlying value as type bool. Returns true (1) if the value was\n  // set successfully.\n  ///\n  int (CEF_CALLBACK *set_bool)(struct _cef_value_t* self, int value);\n\n  ///\n  // Sets the underlying value as type int. Returns true (1) if the value was\n  // set successfully.\n  ///\n  int (CEF_CALLBACK *set_int)(struct _cef_value_t* self, int value);\n\n  ///\n  // Sets the underlying value as type double. Returns true (1) if the value was\n  // set successfully.\n  ///\n  int (CEF_CALLBACK *set_double)(struct _cef_value_t* self, double value);\n\n  ///\n  // Sets the underlying value as type string. Returns true (1) if the value was\n  // set successfully.\n  ///\n  int (CEF_CALLBACK *set_string)(struct _cef_value_t* self,\n      const cef_string_t* value);\n\n  ///\n  // Sets the underlying value as type binary. Returns true (1) if the value was\n  // set successfully. This object keeps a reference to |value| and ownership of\n  // the underlying data remains unchanged.\n  ///\n  int (CEF_CALLBACK *set_binary)(struct _cef_value_t* self,\n      struct _cef_binary_value_t* value);\n\n  ///\n  // Sets the underlying value as type dict. Returns true (1) if the value was\n  // set successfully. This object keeps a reference to |value| and ownership of\n  // the underlying data remains unchanged.\n  ///\n  int (CEF_CALLBACK *set_dictionary)(struct _cef_value_t* self,\n      struct _cef_dictionary_value_t* value);\n\n  ///\n  // Sets the underlying value as type list. Returns true (1) if the value was\n  // set successfully. This object keeps a reference to |value| and ownership of\n  // the underlying data remains unchanged.\n  ///\n  int (CEF_CALLBACK *set_list)(struct _cef_value_t* self,\n      struct _cef_list_value_t* value);\n} cef_value_t;\n\n\n///\n// Creates a new object.\n///\nCEF_EXPORT cef_value_t* cef_value_create();\n\n\n///\n// Structure representing a binary value. Can be used on any process and thread.\n///\ntypedef struct _cef_binary_value_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is valid. This object may become invalid if\n  // the underlying data is owned by another object (e.g. list or dictionary)\n  // and that other object is then modified or destroyed. Do not call any other\n  // functions if this function returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_binary_value_t* self);\n\n  ///\n  // Returns true (1) if this object is currently owned by another object.\n  ///\n  int (CEF_CALLBACK *is_owned)(struct _cef_binary_value_t* self);\n\n  ///\n  // Returns true (1) if this object and |that| object have the same underlying\n  // data.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_binary_value_t* self,\n      struct _cef_binary_value_t* that);\n\n  ///\n  // Returns true (1) if this object and |that| object have an equivalent\n  // underlying value but are not necessarily the same object.\n  ///\n  int (CEF_CALLBACK *is_equal)(struct _cef_binary_value_t* self,\n      struct _cef_binary_value_t* that);\n\n  ///\n  // Returns a copy of this object. The data in this object will also be copied.\n  ///\n  struct _cef_binary_value_t* (CEF_CALLBACK *copy)(\n      struct _cef_binary_value_t* self);\n\n  ///\n  // Returns the data size.\n  ///\n  size_t (CEF_CALLBACK *get_size)(struct _cef_binary_value_t* self);\n\n  ///\n  // Read up to |buffer_size| number of bytes into |buffer|. Reading begins at\n  // the specified byte |data_offset|. Returns the number of bytes read.\n  ///\n  size_t (CEF_CALLBACK *get_data)(struct _cef_binary_value_t* self,\n      void* buffer, size_t buffer_size, size_t data_offset);\n} cef_binary_value_t;\n\n\n///\n// Creates a new object that is not owned by any other object. The specified\n// |data| will be copied.\n///\nCEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data,\n    size_t data_size);\n\n\n///\n// Structure representing a dictionary value. Can be used on any process and\n// thread.\n///\ntypedef struct _cef_dictionary_value_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is valid. This object may become invalid if\n  // the underlying data is owned by another object (e.g. list or dictionary)\n  // and that other object is then modified or destroyed. Do not call any other\n  // functions if this function returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_dictionary_value_t* self);\n\n  ///\n  // Returns true (1) if this object is currently owned by another object.\n  ///\n  int (CEF_CALLBACK *is_owned)(struct _cef_dictionary_value_t* self);\n\n  ///\n  // Returns true (1) if the values of this object are read-only. Some APIs may\n  // expose read-only objects.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_dictionary_value_t* self);\n\n  ///\n  // Returns true (1) if this object and |that| object have the same underlying\n  // data. If true (1) modifications to this object will also affect |that|\n  // object and vice-versa.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_dictionary_value_t* self,\n      struct _cef_dictionary_value_t* that);\n\n  ///\n  // Returns true (1) if this object and |that| object have an equivalent\n  // underlying value but are not necessarily the same object.\n  ///\n  int (CEF_CALLBACK *is_equal)(struct _cef_dictionary_value_t* self,\n      struct _cef_dictionary_value_t* that);\n\n  ///\n  // Returns a writable copy of this object. If |exclude_NULL_children| is true\n  // (1) any NULL dictionaries or lists will be excluded from the copy.\n  ///\n  struct _cef_dictionary_value_t* (CEF_CALLBACK *copy)(\n      struct _cef_dictionary_value_t* self, int exclude_empty_children);\n\n  ///\n  // Returns the number of values.\n  ///\n  size_t (CEF_CALLBACK *get_size)(struct _cef_dictionary_value_t* self);\n\n  ///\n  // Removes all values. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *clear)(struct _cef_dictionary_value_t* self);\n\n  ///\n  // Returns true (1) if the current dictionary has a value for the given key.\n  ///\n  int (CEF_CALLBACK *has_key)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key);\n\n  ///\n  // Reads all keys for this dictionary into the specified vector.\n  ///\n  int (CEF_CALLBACK *get_keys)(struct _cef_dictionary_value_t* self,\n      cef_string_list_t keys);\n\n  ///\n  // Removes the value at the specified key. Returns true (1) is the value was\n  // removed successfully.\n  ///\n  int (CEF_CALLBACK *remove)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key);\n\n  ///\n  // Returns the value type for the specified key.\n  ///\n  cef_value_type_t (CEF_CALLBACK *get_type)(\n      struct _cef_dictionary_value_t* self, const cef_string_t* key);\n\n  ///\n  // Returns the value at the specified key. For simple types the returned value\n  // will copy existing data and modifications to the value will not modify this\n  // object. For complex types (binary, dictionary and list) the returned value\n  // will reference existing data and modifications to the value will modify\n  // this object.\n  ///\n  struct _cef_value_t* (CEF_CALLBACK *get_value)(\n      struct _cef_dictionary_value_t* self, const cef_string_t* key);\n\n  ///\n  // Returns the value at the specified key as type bool.\n  ///\n  int (CEF_CALLBACK *get_bool)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key);\n\n  ///\n  // Returns the value at the specified key as type int.\n  ///\n  int (CEF_CALLBACK *get_int)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key);\n\n  ///\n  // Returns the value at the specified key as type double.\n  ///\n  double (CEF_CALLBACK *get_double)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key);\n\n  ///\n  // Returns the value at the specified key as type string.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_string)(\n      struct _cef_dictionary_value_t* self, const cef_string_t* key);\n\n  ///\n  // Returns the value at the specified key as type binary. The returned value\n  // will reference existing data.\n  ///\n  struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(\n      struct _cef_dictionary_value_t* self, const cef_string_t* key);\n\n  ///\n  // Returns the value at the specified key as type dictionary. The returned\n  // value will reference existing data and modifications to the value will\n  // modify this object.\n  ///\n  struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(\n      struct _cef_dictionary_value_t* self, const cef_string_t* key);\n\n  ///\n  // Returns the value at the specified key as type list. The returned value\n  // will reference existing data and modifications to the value will modify\n  // this object.\n  ///\n  struct _cef_list_value_t* (CEF_CALLBACK *get_list)(\n      struct _cef_dictionary_value_t* self, const cef_string_t* key);\n\n  ///\n  // Sets the value at the specified key. Returns true (1) if the value was set\n  // successfully. If |value| represents simple data then the underlying data\n  // will be copied and modifications to |value| will not modify this object. If\n  // |value| represents complex data (binary, dictionary or list) then the\n  // underlying data will be referenced and modifications to |value| will modify\n  // this object.\n  ///\n  int (CEF_CALLBACK *set_value)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key, struct _cef_value_t* value);\n\n  ///\n  // Sets the value at the specified key as type null. Returns true (1) if the\n  // value was set successfully.\n  ///\n  int (CEF_CALLBACK *set_null)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key);\n\n  ///\n  // Sets the value at the specified key as type bool. Returns true (1) if the\n  // value was set successfully.\n  ///\n  int (CEF_CALLBACK *set_bool)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key, int value);\n\n  ///\n  // Sets the value at the specified key as type int. Returns true (1) if the\n  // value was set successfully.\n  ///\n  int (CEF_CALLBACK *set_int)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key, int value);\n\n  ///\n  // Sets the value at the specified key as type double. Returns true (1) if the\n  // value was set successfully.\n  ///\n  int (CEF_CALLBACK *set_double)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key, double value);\n\n  ///\n  // Sets the value at the specified key as type string. Returns true (1) if the\n  // value was set successfully.\n  ///\n  int (CEF_CALLBACK *set_string)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key, const cef_string_t* value);\n\n  ///\n  // Sets the value at the specified key as type binary. Returns true (1) if the\n  // value was set successfully. If |value| is currently owned by another object\n  // then the value will be copied and the |value| reference will not change.\n  // Otherwise, ownership will be transferred to this object and the |value|\n  // reference will be invalidated.\n  ///\n  int (CEF_CALLBACK *set_binary)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key, struct _cef_binary_value_t* value);\n\n  ///\n  // Sets the value at the specified key as type dict. Returns true (1) if the\n  // value was set successfully. If |value| is currently owned by another object\n  // then the value will be copied and the |value| reference will not change.\n  // Otherwise, ownership will be transferred to this object and the |value|\n  // reference will be invalidated.\n  ///\n  int (CEF_CALLBACK *set_dictionary)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key, struct _cef_dictionary_value_t* value);\n\n  ///\n  // Sets the value at the specified key as type list. Returns true (1) if the\n  // value was set successfully. If |value| is currently owned by another object\n  // then the value will be copied and the |value| reference will not change.\n  // Otherwise, ownership will be transferred to this object and the |value|\n  // reference will be invalidated.\n  ///\n  int (CEF_CALLBACK *set_list)(struct _cef_dictionary_value_t* self,\n      const cef_string_t* key, struct _cef_list_value_t* value);\n} cef_dictionary_value_t;\n\n\n///\n// Creates a new object that is not owned by any other object.\n///\nCEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create();\n\n\n///\n// Structure representing a list value. Can be used on any process and thread.\n///\ntypedef struct _cef_list_value_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns true (1) if this object is valid. This object may become invalid if\n  // the underlying data is owned by another object (e.g. list or dictionary)\n  // and that other object is then modified or destroyed. Do not call any other\n  // functions if this function returns false (0).\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_list_value_t* self);\n\n  ///\n  // Returns true (1) if this object is currently owned by another object.\n  ///\n  int (CEF_CALLBACK *is_owned)(struct _cef_list_value_t* self);\n\n  ///\n  // Returns true (1) if the values of this object are read-only. Some APIs may\n  // expose read-only objects.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_list_value_t* self);\n\n  ///\n  // Returns true (1) if this object and |that| object have the same underlying\n  // data. If true (1) modifications to this object will also affect |that|\n  // object and vice-versa.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_list_value_t* self,\n      struct _cef_list_value_t* that);\n\n  ///\n  // Returns true (1) if this object and |that| object have an equivalent\n  // underlying value but are not necessarily the same object.\n  ///\n  int (CEF_CALLBACK *is_equal)(struct _cef_list_value_t* self,\n      struct _cef_list_value_t* that);\n\n  ///\n  // Returns a writable copy of this object.\n  ///\n  struct _cef_list_value_t* (CEF_CALLBACK *copy)(\n      struct _cef_list_value_t* self);\n\n  ///\n  // Sets the number of values. If the number of values is expanded all new\n  // value slots will default to type null. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *set_size)(struct _cef_list_value_t* self, size_t size);\n\n  ///\n  // Returns the number of values.\n  ///\n  size_t (CEF_CALLBACK *get_size)(struct _cef_list_value_t* self);\n\n  ///\n  // Removes all values. Returns true (1) on success.\n  ///\n  int (CEF_CALLBACK *clear)(struct _cef_list_value_t* self);\n\n  ///\n  // Removes the value at the specified index.\n  ///\n  int (CEF_CALLBACK *remove)(struct _cef_list_value_t* self, int index);\n\n  ///\n  // Returns the value type at the specified index.\n  ///\n  cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_list_value_t* self,\n      int index);\n\n  ///\n  // Returns the value at the specified index. For simple types the returned\n  // value will copy existing data and modifications to the value will not\n  // modify this object. For complex types (binary, dictionary and list) the\n  // returned value will reference existing data and modifications to the value\n  // will modify this object.\n  ///\n  struct _cef_value_t* (CEF_CALLBACK *get_value)(struct _cef_list_value_t* self,\n      int index);\n\n  ///\n  // Returns the value at the specified index as type bool.\n  ///\n  int (CEF_CALLBACK *get_bool)(struct _cef_list_value_t* self, int index);\n\n  ///\n  // Returns the value at the specified index as type int.\n  ///\n  int (CEF_CALLBACK *get_int)(struct _cef_list_value_t* self, int index);\n\n  ///\n  // Returns the value at the specified index as type double.\n  ///\n  double (CEF_CALLBACK *get_double)(struct _cef_list_value_t* self, int index);\n\n  ///\n  // Returns the value at the specified index as type string.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_string)(\n      struct _cef_list_value_t* self, int index);\n\n  ///\n  // Returns the value at the specified index as type binary. The returned value\n  // will reference existing data.\n  ///\n  struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(\n      struct _cef_list_value_t* self, int index);\n\n  ///\n  // Returns the value at the specified index as type dictionary. The returned\n  // value will reference existing data and modifications to the value will\n  // modify this object.\n  ///\n  struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(\n      struct _cef_list_value_t* self, int index);\n\n  ///\n  // Returns the value at the specified index as type list. The returned value\n  // will reference existing data and modifications to the value will modify\n  // this object.\n  ///\n  struct _cef_list_value_t* (CEF_CALLBACK *get_list)(\n      struct _cef_list_value_t* self, int index);\n\n  ///\n  // Sets the value at the specified index. Returns true (1) if the value was\n  // set successfully. If |value| represents simple data then the underlying\n  // data will be copied and modifications to |value| will not modify this\n  // object. If |value| represents complex data (binary, dictionary or list)\n  // then the underlying data will be referenced and modifications to |value|\n  // will modify this object.\n  ///\n  int (CEF_CALLBACK *set_value)(struct _cef_list_value_t* self, int index,\n      struct _cef_value_t* value);\n\n  ///\n  // Sets the value at the specified index as type null. Returns true (1) if the\n  // value was set successfully.\n  ///\n  int (CEF_CALLBACK *set_null)(struct _cef_list_value_t* self, int index);\n\n  ///\n  // Sets the value at the specified index as type bool. Returns true (1) if the\n  // value was set successfully.\n  ///\n  int (CEF_CALLBACK *set_bool)(struct _cef_list_value_t* self, int index,\n      int value);\n\n  ///\n  // Sets the value at the specified index as type int. Returns true (1) if the\n  // value was set successfully.\n  ///\n  int (CEF_CALLBACK *set_int)(struct _cef_list_value_t* self, int index,\n      int value);\n\n  ///\n  // Sets the value at the specified index as type double. Returns true (1) if\n  // the value was set successfully.\n  ///\n  int (CEF_CALLBACK *set_double)(struct _cef_list_value_t* self, int index,\n      double value);\n\n  ///\n  // Sets the value at the specified index as type string. Returns true (1) if\n  // the value was set successfully.\n  ///\n  int (CEF_CALLBACK *set_string)(struct _cef_list_value_t* self, int index,\n      const cef_string_t* value);\n\n  ///\n  // Sets the value at the specified index as type binary. Returns true (1) if\n  // the value was set successfully. If |value| is currently owned by another\n  // object then the value will be copied and the |value| reference will not\n  // change. Otherwise, ownership will be transferred to this object and the\n  // |value| reference will be invalidated.\n  ///\n  int (CEF_CALLBACK *set_binary)(struct _cef_list_value_t* self, int index,\n      struct _cef_binary_value_t* value);\n\n  ///\n  // Sets the value at the specified index as type dict. Returns true (1) if the\n  // value was set successfully. If |value| is currently owned by another object\n  // then the value will be copied and the |value| reference will not change.\n  // Otherwise, ownership will be transferred to this object and the |value|\n  // reference will be invalidated.\n  ///\n  int (CEF_CALLBACK *set_dictionary)(struct _cef_list_value_t* self, int index,\n      struct _cef_dictionary_value_t* value);\n\n  ///\n  // Sets the value at the specified index as type list. Returns true (1) if the\n  // value was set successfully. If |value| is currently owned by another object\n  // then the value will be copied and the |value| reference will not change.\n  // Otherwise, ownership will be transferred to this object and the |value|\n  // reference will be invalidated.\n  ///\n  int (CEF_CALLBACK *set_list)(struct _cef_list_value_t* self, int index,\n      struct _cef_list_value_t* value);\n} cef_list_value_t;\n\n\n///\n// Creates a new object that is not owned by any other object.\n///\nCEF_EXPORT cef_list_value_t* cef_list_value_create();\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_web_plugin_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_browser_t;\n\n///\n// Information about a specific web plugin.\n///\ntypedef struct _cef_web_plugin_info_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns the plugin name (i.e. Flash).\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_name)(\n      struct _cef_web_plugin_info_t* self);\n\n  ///\n  // Returns the plugin file path (DLL/bundle/library).\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_path)(\n      struct _cef_web_plugin_info_t* self);\n\n  ///\n  // Returns the version of the plugin (may be OS-specific).\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_version)(\n      struct _cef_web_plugin_info_t* self);\n\n  ///\n  // Returns a description of the plugin from the version information.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_description)(\n      struct _cef_web_plugin_info_t* self);\n} cef_web_plugin_info_t;\n\n\n///\n// Structure to implement for visiting web plugin information. The functions of\n// this structure will be called on the browser process UI thread.\n///\ntypedef struct _cef_web_plugin_info_visitor_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method that will be called once for each plugin. |count| is the 0-based\n  // index for the current plugin. |total| is the total number of plugins.\n  // Return false (0) to stop visiting plugins. This function may never be\n  // called if no plugins are found.\n  ///\n  int (CEF_CALLBACK *visit)(struct _cef_web_plugin_info_visitor_t* self,\n      struct _cef_web_plugin_info_t* info, int count, int total);\n} cef_web_plugin_info_visitor_t;\n\n\n///\n// Structure to implement for receiving unstable plugin information. The\n// functions of this structure will be called on the browser process IO thread.\n///\ntypedef struct _cef_web_plugin_unstable_callback_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Method that will be called for the requested plugin. |unstable| will be\n  // true (1) if the plugin has reached the crash count threshold of 3 times in\n  // 120 seconds.\n  ///\n  void (CEF_CALLBACK *is_unstable)(\n      struct _cef_web_plugin_unstable_callback_t* self,\n      const cef_string_t* path, int unstable);\n} cef_web_plugin_unstable_callback_t;\n\n\n///\n// Visit web plugin information. Can be called on any thread in the browser\n// process.\n///\nCEF_EXPORT void cef_visit_web_plugin_info(\n    cef_web_plugin_info_visitor_t* visitor);\n\n///\n// Cause the plugin list to refresh the next time it is accessed regardless of\n// whether it has already been loaded. Can be called on any thread in the\n// browser process.\n///\nCEF_EXPORT void cef_refresh_web_plugins();\n\n///\n// Unregister an internal plugin. This may be undone the next time\n// cef_refresh_web_plugins() is called. Can be called on any thread in the\n// browser process.\n///\nCEF_EXPORT void cef_unregister_internal_web_plugin(const cef_string_t* path);\n\n///\n// Register a plugin crash. Can be called on any thread in the browser process\n// but will be executed on the IO thread.\n///\nCEF_EXPORT void cef_register_web_plugin_crash(const cef_string_t* path);\n\n///\n// Query if a plugin is unstable. Can be called on any thread in the browser\n// process.\n///\nCEF_EXPORT void cef_is_web_plugin_unstable(const cef_string_t* path,\n    cef_web_plugin_unstable_callback_t* callback);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_xml_reader_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_stream_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure that supports the reading of XML data via the libxml streaming API.\n// The functions of this structure should only be called on the thread that\n// creates the object.\n///\ntypedef struct _cef_xml_reader_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Moves the cursor to the next node in the document. This function must be\n  // called at least once to set the current cursor position. Returns true (1)\n  // if the cursor position was set successfully.\n  ///\n  int (CEF_CALLBACK *move_to_next_node)(struct _cef_xml_reader_t* self);\n\n  ///\n  // Close the document. This should be called directly to ensure that cleanup\n  // occurs on the correct thread.\n  ///\n  int (CEF_CALLBACK *close)(struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns true (1) if an error has been reported by the XML parser.\n  ///\n  int (CEF_CALLBACK *has_error)(struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the error string.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_error)(\n      struct _cef_xml_reader_t* self);\n\n\n  // The below functions retrieve data for the node at the current cursor\n  // position.\n\n  ///\n  // Returns the node type.\n  ///\n  cef_xml_node_type_t (CEF_CALLBACK *get_type)(struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the node depth. Depth starts at 0 for the root node.\n  ///\n  int (CEF_CALLBACK *get_depth)(struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the local name. See http://www.w3.org/TR/REC-xml-names/#NT-\n  // LocalPart for additional details.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_local_name)(\n      struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for\n  // additional details.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_prefix)(\n      struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the qualified name, equal to (Prefix:)LocalName. See\n  // http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_qualified_name)(\n      struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the URI defining the namespace associated with the node. See\n  // http://www.w3.org/TR/REC-xml-names/ for additional details.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_namespace_uri)(\n      struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for\n  // additional details.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_base_uri)(\n      struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the xml:lang scope within which the node resides. See\n  // http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_xml_lang)(\n      struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns true (1) if the node represents an NULL element. <a/> is considered\n  // NULL but <a></a> is not.\n  ///\n  int (CEF_CALLBACK *is_empty_element)(struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns true (1) if the node has a text value.\n  ///\n  int (CEF_CALLBACK *has_value)(struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the text value.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_value)(\n      struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns true (1) if the node has attributes.\n  ///\n  int (CEF_CALLBACK *has_attributes)(struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the number of attributes.\n  ///\n  size_t (CEF_CALLBACK *get_attribute_count)(struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the value of the attribute at the specified 0-based index.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_attribute_byindex)(\n      struct _cef_xml_reader_t* self, int index);\n\n  ///\n  // Returns the value of the attribute with the specified qualified name.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_attribute_byqname)(\n      struct _cef_xml_reader_t* self, const cef_string_t* qualifiedName);\n\n  ///\n  // Returns the value of the attribute with the specified local name and\n  // namespace URI.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_attribute_bylname)(\n      struct _cef_xml_reader_t* self, const cef_string_t* localName,\n      const cef_string_t* namespaceURI);\n\n  ///\n  // Returns an XML representation of the current node's children.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_inner_xml)(\n      struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns an XML representation of the current node including its children.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_outer_xml)(\n      struct _cef_xml_reader_t* self);\n\n  ///\n  // Returns the line number for the current node.\n  ///\n  int (CEF_CALLBACK *get_line_number)(struct _cef_xml_reader_t* self);\n\n\n  // Attribute nodes are not traversed by default. The below functions can be\n  // used to move the cursor to an attribute node. move_to_carrying_element()\n  // can be called afterwards to return the cursor to the carrying element. The\n  // depth of an attribute node will be 1 + the depth of the carrying element.\n\n  ///\n  // Moves the cursor to the attribute at the specified 0-based index. Returns\n  // true (1) if the cursor position was set successfully.\n  ///\n  int (CEF_CALLBACK *move_to_attribute_byindex)(struct _cef_xml_reader_t* self,\n      int index);\n\n  ///\n  // Moves the cursor to the attribute with the specified qualified name.\n  // Returns true (1) if the cursor position was set successfully.\n  ///\n  int (CEF_CALLBACK *move_to_attribute_byqname)(struct _cef_xml_reader_t* self,\n      const cef_string_t* qualifiedName);\n\n  ///\n  // Moves the cursor to the attribute with the specified local name and\n  // namespace URI. Returns true (1) if the cursor position was set\n  // successfully.\n  ///\n  int (CEF_CALLBACK *move_to_attribute_bylname)(struct _cef_xml_reader_t* self,\n      const cef_string_t* localName, const cef_string_t* namespaceURI);\n\n  ///\n  // Moves the cursor to the first attribute in the current element. Returns\n  // true (1) if the cursor position was set successfully.\n  ///\n  int (CEF_CALLBACK *move_to_first_attribute)(struct _cef_xml_reader_t* self);\n\n  ///\n  // Moves the cursor to the next attribute in the current element. Returns true\n  // (1) if the cursor position was set successfully.\n  ///\n  int (CEF_CALLBACK *move_to_next_attribute)(struct _cef_xml_reader_t* self);\n\n  ///\n  // Moves the cursor back to the carrying element. Returns true (1) if the\n  // cursor position was set successfully.\n  ///\n  int (CEF_CALLBACK *move_to_carrying_element)(struct _cef_xml_reader_t* self);\n} cef_xml_reader_t;\n\n\n///\n// Create a new cef_xml_reader_t object. The returned object's functions can\n// only be called from the thread that created the object.\n///\nCEF_EXPORT cef_xml_reader_t* cef_xml_reader_create(\n    struct _cef_stream_reader_t* stream, cef_xml_encoding_type_t encodingType,\n    const cef_string_t* URI);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/cef_zip_reader_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_\n#define CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n#include \"include/capi/cef_stream_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Structure that supports the reading of zip archives via the zlib unzip API.\n// The functions of this structure should only be called on the thread that\n// creates the object.\n///\ntypedef struct _cef_zip_reader_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Moves the cursor to the first file in the archive. Returns true (1) if the\n  // cursor position was set successfully.\n  ///\n  int (CEF_CALLBACK *move_to_first_file)(struct _cef_zip_reader_t* self);\n\n  ///\n  // Moves the cursor to the next file in the archive. Returns true (1) if the\n  // cursor position was set successfully.\n  ///\n  int (CEF_CALLBACK *move_to_next_file)(struct _cef_zip_reader_t* self);\n\n  ///\n  // Moves the cursor to the specified file in the archive. If |caseSensitive|\n  // is true (1) then the search will be case sensitive. Returns true (1) if the\n  // cursor position was set successfully.\n  ///\n  int (CEF_CALLBACK *move_to_file)(struct _cef_zip_reader_t* self,\n      const cef_string_t* fileName, int caseSensitive);\n\n  ///\n  // Closes the archive. This should be called directly to ensure that cleanup\n  // occurs on the correct thread.\n  ///\n  int (CEF_CALLBACK *close)(struct _cef_zip_reader_t* self);\n\n\n  // The below functions act on the file at the current cursor position.\n\n  ///\n  // Returns the name of the file.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_file_name)(\n      struct _cef_zip_reader_t* self);\n\n  ///\n  // Returns the uncompressed size of the file.\n  ///\n  int64 (CEF_CALLBACK *get_file_size)(struct _cef_zip_reader_t* self);\n\n  ///\n  // Returns the last modified timestamp for the file.\n  ///\n  cef_time_t (CEF_CALLBACK *get_file_last_modified)(\n      struct _cef_zip_reader_t* self);\n\n  ///\n  // Opens the file for reading of uncompressed data. A read password may\n  // optionally be specified.\n  ///\n  int (CEF_CALLBACK *open_file)(struct _cef_zip_reader_t* self,\n      const cef_string_t* password);\n\n  ///\n  // Closes the file.\n  ///\n  int (CEF_CALLBACK *close_file)(struct _cef_zip_reader_t* self);\n\n  ///\n  // Read uncompressed file contents into the specified buffer. Returns < 0 if\n  // an error occurred, 0 if at the end of file, or the number of bytes read.\n  ///\n  int (CEF_CALLBACK *read_file)(struct _cef_zip_reader_t* self, void* buffer,\n      size_t bufferSize);\n\n  ///\n  // Returns the current offset in the uncompressed file contents.\n  ///\n  int64 (CEF_CALLBACK *tell)(struct _cef_zip_reader_t* self);\n\n  ///\n  // Returns true (1) if at end of the file contents.\n  ///\n  int (CEF_CALLBACK *eof)(struct _cef_zip_reader_t* self);\n} cef_zip_reader_t;\n\n\n///\n// Create a new cef_zip_reader_t object. The returned object's functions can\n// only be called from the thread that created the object.\n///\nCEF_EXPORT cef_zip_reader_t* cef_zip_reader_create(\n    struct _cef_stream_reader_t* stream);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_box_layout_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_layout_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_view_t;\n\n///\n// A Layout manager that arranges child views vertically or horizontally in a\n// side-by-side fashion with spacing around and between the child views. The\n// child views are always sized according to their preferred size. If the host's\n// bounds provide insufficient space, child views will be clamped. Excess space\n// will not be distributed. Methods must be called on the browser process UI\n// thread unless otherwise indicated.\n///\ntypedef struct _cef_box_layout_t {\n  ///\n  // Base structure.\n  ///\n  cef_layout_t base;\n\n  ///\n  // Set the flex weight for the given |view|. Using the preferred size as the\n  // basis, free space along the main axis is distributed to views in the ratio\n  // of their flex weights. Similarly, if the views will overflow the parent,\n  // space is subtracted in these ratios. A flex of 0 means this view is not\n  // resized. Flex values must not be negative.\n  ///\n  void (CEF_CALLBACK *set_flex_for_view)(struct _cef_box_layout_t* self,\n      struct _cef_view_t* view, int flex);\n\n  ///\n  // Clears the flex for the given |view|, causing it to use the default flex\n  // specified via cef_box_layout_tSettings.default_flex.\n  ///\n  void (CEF_CALLBACK *clear_flex_for_view)(struct _cef_box_layout_t* self,\n      struct _cef_view_t* view);\n} cef_box_layout_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_browser_view_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_browser_capi.h\"\n#include \"include/capi/views/cef_browser_view_delegate_capi.h\"\n#include \"include/capi/views/cef_view_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// A View hosting a cef_browser_t instance. Methods must be called on the\n// browser process UI thread unless otherwise indicated.\n///\ntypedef struct _cef_browser_view_t {\n  ///\n  // Base structure.\n  ///\n  cef_view_t base;\n\n  ///\n  // Returns the cef_browser_t hosted by this BrowserView. Will return NULL if\n  // the browser has not yet been created or has already been destroyed.\n  ///\n  struct _cef_browser_t* (CEF_CALLBACK *get_browser)(\n      struct _cef_browser_view_t* self);\n} cef_browser_view_t;\n\n\n///\n// Create a new BrowserView. The underlying cef_browser_t will not be created\n// until this view is added to the views hierarchy.\n///\nCEF_EXPORT cef_browser_view_t* cef_browser_view_create(\n    struct _cef_client_t* client, const cef_string_t* url,\n    const struct _cef_browser_settings_t* settings,\n    struct _cef_request_context_t* request_context,\n    struct _cef_browser_view_delegate_t* delegate);\n\n///\n// Returns the BrowserView associated with |browser|.\n///\nCEF_EXPORT cef_browser_view_t* cef_browser_view_get_for_browser(\n    struct _cef_browser_t* browser);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_browser_view_delegate_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_client_capi.h\"\n#include \"include/capi/views/cef_view_delegate_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_browser_t;\nstruct _cef_browser_view_t;\n\n///\n// Implement this structure to handle BrowserView events. The functions of this\n// structure will be called on the browser process UI thread unless otherwise\n// indicated.\n///\ntypedef struct _cef_browser_view_delegate_t {\n  ///\n  // Base structure.\n  ///\n  cef_view_delegate_t base;\n\n  ///\n  // Called when |browser| associated with |browser_view| is created. This\n  // function will be called after cef_life_span_handler_t::on_after_created()\n  // is called for |browser| and before on_popup_browser_view_created() is\n  // called for |browser|'s parent delegate if |browser| is a popup.\n  ///\n  void (CEF_CALLBACK *on_browser_created)(\n      struct _cef_browser_view_delegate_t* self,\n      struct _cef_browser_view_t* browser_view,\n      struct _cef_browser_t* browser);\n\n  ///\n  // Called when |browser| associated with |browser_view| is destroyed. Release\n  // all references to |browser| and do not attempt to execute any functions on\n  // |browser| after this callback returns. This function will be called before\n  // cef_life_span_handler_t::on_before_close() is called for |browser|.\n  ///\n  void (CEF_CALLBACK *on_browser_destroyed)(\n      struct _cef_browser_view_delegate_t* self,\n      struct _cef_browser_view_t* browser_view,\n      struct _cef_browser_t* browser);\n\n  ///\n  // Called before a new popup BrowserView is created. The popup originated from\n  // |browser_view|. |settings| and |client| are the values returned from\n  // cef_life_span_handler_t::on_before_popup(). |is_devtools| will be true (1)\n  // if the popup will be a DevTools browser. Return the delegate that will be\n  // used for the new popup BrowserView.\n  ///\n  struct _cef_browser_view_delegate_t* (\n      CEF_CALLBACK *get_delegate_for_popup_browser_view)(\n      struct _cef_browser_view_delegate_t* self,\n      struct _cef_browser_view_t* browser_view,\n      const struct _cef_browser_settings_t* settings,\n      struct _cef_client_t* client, int is_devtools);\n\n  ///\n  // Called after |popup_browser_view| is created. This function will be called\n  // after cef_life_span_handler_t::on_after_created() and on_browser_created()\n  // are called for the new popup browser. The popup originated from\n  // |browser_view|. |is_devtools| will be true (1) if the popup is a DevTools\n  // browser. Optionally add |popup_browser_view| to the views hierarchy\n  // yourself and return true (1). Otherwise return false (0) and a default\n  // cef_window_t will be created for the popup.\n  ///\n  int (CEF_CALLBACK *on_popup_browser_view_created)(\n      struct _cef_browser_view_delegate_t* self,\n      struct _cef_browser_view_t* browser_view,\n      struct _cef_browser_view_t* popup_browser_view, int is_devtools);\n} cef_browser_view_delegate_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_button_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_view_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_label_button_t;\n\n///\n// A View representing a button. Depending on the specific type, the button\n// could be implemented by a native control or custom rendered. Methods must be\n// called on the browser process UI thread unless otherwise indicated.\n///\ntypedef struct _cef_button_t {\n  ///\n  // Base structure.\n  ///\n  cef_view_t base;\n\n  ///\n  // Returns this Button as a LabelButton or NULL if this is not a LabelButton.\n  ///\n  struct _cef_label_button_t* (CEF_CALLBACK *as_label_button)(\n      struct _cef_button_t* self);\n\n  ///\n  // Sets the current display state of the Button.\n  ///\n  void (CEF_CALLBACK *set_state)(struct _cef_button_t* self,\n      cef_button_state_t state);\n\n  ///\n  // Returns the current display state of the Button.\n  ///\n  cef_button_state_t (CEF_CALLBACK *get_state)(struct _cef_button_t* self);\n\n  ///\n  // Sets the tooltip text that will be displayed when the user hovers the mouse\n  // cursor over the Button.\n  ///\n  void (CEF_CALLBACK *set_tooltip_text)(struct _cef_button_t* self,\n      const cef_string_t* tooltip_text);\n\n  ///\n  // Sets the accessible name that will be exposed to assistive technology (AT).\n  ///\n  void (CEF_CALLBACK *set_accessible_name)(struct _cef_button_t* self,\n      const cef_string_t* name);\n} cef_button_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_button_delegate_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_view_delegate_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_button_t;\n\n///\n// Implement this structure to handle Button events. The functions of this\n// structure will be called on the browser process UI thread unless otherwise\n// indicated.\n///\ntypedef struct _cef_button_delegate_t {\n  ///\n  // Base structure.\n  ///\n  cef_view_delegate_t base;\n\n  ///\n  // Called when |button| is pressed.\n  ///\n  void (CEF_CALLBACK *on_button_pressed)(struct _cef_button_delegate_t* self,\n      struct _cef_button_t* button);\n} cef_button_delegate_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_display_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// This structure typically, but not always, corresponds to a physical display\n// connected to the system. A fake Display may exist on a headless system, or a\n// Display may correspond to a remote, virtual display. All size and position\n// values are in density independent pixels (DIP) unless otherwise indicated.\n// Methods must be called on the browser process UI thread unless otherwise\n// indicated.\n///\ntypedef struct _cef_display_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns the unique identifier for this Display.\n  ///\n  int64 (CEF_CALLBACK *get_id)(struct _cef_display_t* self);\n\n  ///\n  // Returns this Display's device pixel scale factor. This specifies how much\n  // the UI should be scaled when the actual output has more pixels than\n  // standard displays (which is around 100~120dpi). The potential return values\n  // differ by platform.\n  ///\n  float (CEF_CALLBACK *get_device_scale_factor)(struct _cef_display_t* self);\n\n  ///\n  // Convert |point| from density independent pixels (DIP) to pixel coordinates\n  // using this Display's device scale factor.\n  ///\n  void (CEF_CALLBACK *convert_point_to_pixels)(struct _cef_display_t* self,\n      cef_point_t* point);\n\n  ///\n  // Convert |point| from pixel coordinates to density independent pixels (DIP)\n  // using this Display's device scale factor.\n  ///\n  void (CEF_CALLBACK *convert_point_from_pixels)(struct _cef_display_t* self,\n      cef_point_t* point);\n\n  ///\n  // Returns this Display's bounds. This is the full size of the display.\n  ///\n  cef_rect_t (CEF_CALLBACK *get_bounds)(struct _cef_display_t* self);\n\n  ///\n  // Returns this Display's work area. This excludes areas of the display that\n  // are occupied for window manager toolbars, etc.\n  ///\n  cef_rect_t (CEF_CALLBACK *get_work_area)(struct _cef_display_t* self);\n\n  ///\n  // Returns this Display's rotation in degrees.\n  ///\n  int (CEF_CALLBACK *get_rotation)(struct _cef_display_t* self);\n} cef_display_t;\n\n\n///\n// Returns the primary Display.\n///\nCEF_EXPORT cef_display_t* cef_display_get_primary();\n\n///\n// Returns the Display nearest |point|. Set |input_pixel_coords| to true (1) if\n// |point| is in pixel coordinates instead of density independent pixels (DIP).\n///\nCEF_EXPORT cef_display_t* cef_display_get_nearest_point(\n    const cef_point_t* point, int input_pixel_coords);\n\n///\n// Returns the Display that most closely intersects |bounds|.  Set\n// |input_pixel_coords| to true (1) if |bounds| is in pixel coordinates instead\n// of density independent pixels (DIP).\n///\nCEF_EXPORT cef_display_t* cef_display_get_matching_bounds(\n    const cef_rect_t* bounds, int input_pixel_coords);\n\n///\n// Returns the total number of Displays. Mirrored displays are excluded; this\n// function is intended to return the number of distinct, usable displays.\n///\nCEF_EXPORT size_t cef_display_get_count();\n\n///\n// Returns all Displays. Mirrored displays are excluded; this function is\n// intended to return distinct, usable displays.\n///\nCEF_EXPORT void cef_display_get_alls(size_t* displaysCount,\n    cef_display_t** displays);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_fill_layout_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_layout_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// A simple Layout that causes the associated Panel's one child to be sized to\n// match the bounds of its parent. Methods must be called on the browser process\n// UI thread unless otherwise indicated.\n///\ntypedef struct _cef_fill_layout_t {\n  ///\n  // Base structure.\n  ///\n  cef_layout_t base;\n} cef_fill_layout_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_label_button_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_LABEL_BUTTON_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_LABEL_BUTTON_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_image_capi.h\"\n#include \"include/capi/views/cef_button_capi.h\"\n#include \"include/capi/views/cef_button_delegate_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_menu_button_t;\n\n///\n// LabelButton is a button with optional text and/or icon. Methods must be\n// called on the browser process UI thread unless otherwise indicated.\n///\ntypedef struct _cef_label_button_t {\n  ///\n  // Base structure.\n  ///\n  cef_button_t base;\n\n  ///\n  // Returns this LabelButton as a MenuButton or NULL if this is not a\n  // MenuButton.\n  ///\n  struct _cef_menu_button_t* (CEF_CALLBACK *as_menu_button)(\n      struct _cef_label_button_t* self);\n\n  ///\n  // Sets the text shown on the LabelButton. By default |text| will also be used\n  // as the accessible name.\n  ///\n  void (CEF_CALLBACK *set_text)(struct _cef_label_button_t* self,\n      const cef_string_t* text);\n\n  ///\n  // Returns the text shown on the LabelButton.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_text)(\n      struct _cef_label_button_t* self);\n\n  ///\n  // Sets the image shown for |button_state|. When this Button is drawn if no\n  // image exists for the current state then the image for\n  // CEF_BUTTON_STATE_NORMAL, if any, will be shown.\n  ///\n  void (CEF_CALLBACK *set_image)(struct _cef_label_button_t* self,\n      cef_button_state_t button_state, struct _cef_image_t* image);\n\n  ///\n  // Returns the image shown for |button_state|. If no image exists for that\n  // state then the image for CEF_BUTTON_STATE_NORMAL will be returned.\n  ///\n  struct _cef_image_t* (CEF_CALLBACK *get_image)(\n      struct _cef_label_button_t* self, cef_button_state_t button_state);\n\n  ///\n  // Sets the text color shown for the specified button |for_state| to |color|.\n  ///\n  void (CEF_CALLBACK *set_text_color)(struct _cef_label_button_t* self,\n      cef_button_state_t for_state, cef_color_t color);\n\n  ///\n  // Sets the text colors shown for the non-disabled states to |color|.\n  ///\n  void (CEF_CALLBACK *set_enabled_text_colors)(struct _cef_label_button_t* self,\n      cef_color_t color);\n\n  ///\n  // Sets the font list. The format is \"<FONT_FAMILY_LIST>,[STYLES] <SIZE>\",\n  // where: - FONT_FAMILY_LIST is a comma-separated list of font family names, -\n  // STYLES is an optional space-separated list of style names (case-sensitive\n  //   \"Bold\" and \"Italic\" are supported), and\n  // - SIZE is an integer font size in pixels with the suffix \"px\".\n  //\n  // Here are examples of valid font description strings: - \"Arial, Helvetica,\n  // Bold Italic 14px\" - \"Arial, 14px\"\n  ///\n  void (CEF_CALLBACK *set_font_list)(struct _cef_label_button_t* self,\n      const cef_string_t* font_list);\n\n  ///\n  // Sets the horizontal alignment; reversed in RTL. Default is\n  // CEF_HORIZONTAL_ALIGNMENT_CENTER.\n  ///\n  void (CEF_CALLBACK *set_horizontal_alignment)(\n      struct _cef_label_button_t* self, cef_horizontal_alignment_t alignment);\n\n  ///\n  // Reset the minimum size of this LabelButton to |size|.\n  ///\n  void (CEF_CALLBACK *set_minimum_size)(struct _cef_label_button_t* self,\n      const cef_size_t* size);\n\n  ///\n  // Reset the maximum size of this LabelButton to |size|.\n  ///\n  void (CEF_CALLBACK *set_maximum_size)(struct _cef_label_button_t* self,\n      const cef_size_t* size);\n} cef_label_button_t;\n\n\n///\n// Create a new LabelButton. A |delegate| must be provided to handle the button\n// click. |text| will be shown on the LabelButton and used as the default\n// accessible name. If |with_frame| is true (1) the button will have a visible\n// frame at all times, center alignment, additional padding and a default\n// minimum size of 70x33 DIP. If |with_frame| is false (0) the button will only\n// have a visible frame on hover/press, left alignment, less padding and no\n// default minimum size.\n///\nCEF_EXPORT cef_label_button_t* cef_label_button_create(\n    struct _cef_button_delegate_t* delegate, const cef_string_t* text,\n    int with_frame);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_LABEL_BUTTON_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_layout_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_box_layout_t;\nstruct _cef_fill_layout_t;\n\n///\n// A Layout handles the sizing of the children of a Panel according to\n// implementation-specific heuristics. Methods must be called on the browser\n// process UI thread unless otherwise indicated.\n///\ntypedef struct _cef_layout_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout.\n  ///\n  struct _cef_box_layout_t* (CEF_CALLBACK *as_box_layout)(\n      struct _cef_layout_t* self);\n\n  ///\n  // Returns this Layout as a FillLayout or NULL if this is not a FillLayout.\n  ///\n  struct _cef_fill_layout_t* (CEF_CALLBACK *as_fill_layout)(\n      struct _cef_layout_t* self);\n\n  ///\n  // Returns true (1) if this Layout is valid.\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_layout_t* self);\n} cef_layout_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_menu_button_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_menu_model_capi.h\"\n#include \"include/capi/views/cef_label_button_capi.h\"\n#include \"include/capi/views/cef_menu_button_delegate_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// MenuButton is a button with optional text, icon and/or menu marker that shows\n// a menu when clicked with the left mouse button. All size and position values\n// are in density independent pixels (DIP) unless otherwise indicated. Methods\n// must be called on the browser process UI thread unless otherwise indicated.\n///\ntypedef struct _cef_menu_button_t {\n  ///\n  // Base structure.\n  ///\n  cef_label_button_t base;\n\n  ///\n  // Show a menu with contents |menu_model|. |screen_point| specifies the menu\n  // position in screen coordinates. |anchor_position| specifies how the menu\n  // will be anchored relative to |screen_point|. This function should be called\n  // from cef_menu_button_delegate_t::on_menu_button_pressed().\n  ///\n  void (CEF_CALLBACK *show_menu)(struct _cef_menu_button_t* self,\n      struct _cef_menu_model_t* menu_model, const cef_point_t* screen_point,\n      cef_menu_anchor_position_t anchor_position);\n} cef_menu_button_t;\n\n\n///\n// Create a new MenuButton. A |delegate| must be provided to call show_menu()\n// when the button is clicked. |text| will be shown on the MenuButton and used\n// as the default accessible name. If |with_frame| is true (1) the button will\n// have a visible frame at all times, center alignment, additional padding and a\n// default minimum size of 70x33 DIP. If |with_frame| is false (0) the button\n// will only have a visible frame on hover/press, left alignment, less padding\n// and no default minimum size. If |with_menu_marker| is true (1) a menu marker\n// will be added to the button.\n///\nCEF_EXPORT cef_menu_button_t* cef_menu_button_create(\n    struct _cef_menu_button_delegate_t* delegate, const cef_string_t* text,\n    int with_frame, int with_menu_marker);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_menu_button_delegate_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_button_delegate_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_menu_button_t;\n\n///\n// Implement this structure to handle MenuButton events. The functions of this\n// structure will be called on the browser process UI thread unless otherwise\n// indicated.\n///\ntypedef struct _cef_menu_button_delegate_t {\n  ///\n  // Base structure.\n  ///\n  cef_button_delegate_t base;\n\n  ///\n  // Called when |button| is pressed. Call cef_menu_button_t::show_menu() to\n  // show the resulting menu at |screen_point|.\n  ///\n  void (CEF_CALLBACK *on_menu_button_pressed)(\n      struct _cef_menu_button_delegate_t* self,\n      struct _cef_menu_button_t* menu_button,\n      const cef_point_t* screen_point);\n} cef_menu_button_delegate_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_panel_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_panel_delegate_capi.h\"\n#include \"include/capi/views/cef_view_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_box_layout_t;\nstruct _cef_fill_layout_t;\nstruct _cef_layout_t;\nstruct _cef_window_t;\n\n///\n// A Panel is a container in the views hierarchy that can contain other Views as\n// children. Methods must be called on the browser process UI thread unless\n// otherwise indicated.\n///\ntypedef struct _cef_panel_t {\n  ///\n  // Base structure.\n  ///\n  cef_view_t base;\n\n  ///\n  // Returns this Panel as a Window or NULL if this is not a Window.\n  ///\n  struct _cef_window_t* (CEF_CALLBACK *as_window)(struct _cef_panel_t* self);\n\n  ///\n  // Set this Panel's Layout to FillLayout and return the FillLayout object.\n  ///\n  struct _cef_fill_layout_t* (CEF_CALLBACK *set_to_fill_layout)(\n      struct _cef_panel_t* self);\n\n  ///\n  // Set this Panel's Layout to BoxLayout and return the BoxLayout object.\n  ///\n  struct _cef_box_layout_t* (CEF_CALLBACK *set_to_box_layout)(\n      struct _cef_panel_t* self,\n      const struct _cef_box_layout_settings_t* settings);\n\n  ///\n  // Get the Layout.\n  ///\n  struct _cef_layout_t* (CEF_CALLBACK *get_layout)(struct _cef_panel_t* self);\n\n  ///\n  // Lay out the child Views (set their bounds based on sizing heuristics\n  // specific to the current Layout).\n  ///\n  void (CEF_CALLBACK *layout)(struct _cef_panel_t* self);\n\n  ///\n  // Add a child View.\n  ///\n  void (CEF_CALLBACK *add_child_view)(struct _cef_panel_t* self,\n      struct _cef_view_t* view);\n\n  ///\n  // Add a child View at the specified |index|. If |index| matches the result of\n  // GetChildCount() then the View will be added at the end.\n  ///\n  void (CEF_CALLBACK *add_child_view_at)(struct _cef_panel_t* self,\n      struct _cef_view_t* view, int index);\n\n  ///\n  // Move the child View to the specified |index|. A negative value for |index|\n  // will move the View to the end.\n  ///\n  void (CEF_CALLBACK *reorder_child_view)(struct _cef_panel_t* self,\n      struct _cef_view_t* view, int index);\n\n  ///\n  // Remove a child View. The View can then be added to another Panel.\n  ///\n  void (CEF_CALLBACK *remove_child_view)(struct _cef_panel_t* self,\n      struct _cef_view_t* view);\n\n  ///\n  // Remove all child Views. The removed Views will be deleted if the client\n  // holds no references to them.\n  ///\n  void (CEF_CALLBACK *remove_all_child_views)(struct _cef_panel_t* self);\n\n  ///\n  // Returns the number of child Views.\n  ///\n  size_t (CEF_CALLBACK *get_child_view_count)(struct _cef_panel_t* self);\n\n  ///\n  // Returns the child View at the specified |index|.\n  ///\n  struct _cef_view_t* (CEF_CALLBACK *get_child_view_at)(\n      struct _cef_panel_t* self, int index);\n} cef_panel_t;\n\n\n///\n// Create a new Panel.\n///\nCEF_EXPORT cef_panel_t* cef_panel_create(\n    struct _cef_panel_delegate_t* delegate);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_panel_delegate_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_view_delegate_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// Implement this structure to handle Panel events. The functions of this\n// structure will be called on the browser process UI thread unless otherwise\n// indicated.\n///\ntypedef struct _cef_panel_delegate_t {\n  ///\n  // Base structure.\n  ///\n  cef_view_delegate_t base;\n} cef_panel_delegate_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_scroll_view_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_SCROLL_VIEW_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_SCROLL_VIEW_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_view_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// A ScrollView will show horizontal and/or vertical scrollbars when necessary\n// based on the size of the attached content view. Methods must be called on the\n// browser process UI thread unless otherwise indicated.\n///\ntypedef struct _cef_scroll_view_t {\n  ///\n  // Base structure.\n  ///\n  cef_view_t base;\n\n  ///\n  // Set the content View. The content View must have a specified size (e.g. via\n  // cef_view_t::SetBounds or cef_view_tDelegate::GetPreferredSize).\n  ///\n  void (CEF_CALLBACK *set_content_view)(struct _cef_scroll_view_t* self,\n      struct _cef_view_t* view);\n\n  ///\n  // Returns the content View.\n  ///\n  struct _cef_view_t* (CEF_CALLBACK *get_content_view)(\n      struct _cef_scroll_view_t* self);\n\n  ///\n  // Returns the visible region of the content View.\n  ///\n  cef_rect_t (CEF_CALLBACK *get_visible_content_rect)(\n      struct _cef_scroll_view_t* self);\n\n  ///\n  // Returns true (1) if the horizontal scrollbar is currently showing.\n  ///\n  int (CEF_CALLBACK *has_horizontal_scrollbar)(struct _cef_scroll_view_t* self);\n\n  ///\n  // Returns the height of the horizontal scrollbar.\n  ///\n  int (CEF_CALLBACK *get_horizontal_scrollbar_height)(\n      struct _cef_scroll_view_t* self);\n\n  ///\n  // Returns true (1) if the vertical scrollbar is currently showing.\n  ///\n  int (CEF_CALLBACK *has_vertical_scrollbar)(struct _cef_scroll_view_t* self);\n\n  ///\n  // Returns the width of the vertical scrollbar.\n  ///\n  int (CEF_CALLBACK *get_vertical_scrollbar_width)(\n      struct _cef_scroll_view_t* self);\n} cef_scroll_view_t;\n\n\n///\n// Create a new ScrollView.\n///\nCEF_EXPORT cef_scroll_view_t* cef_scroll_view_create(\n    struct _cef_view_delegate_t* delegate);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_SCROLL_VIEW_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_textfield_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_textfield_delegate_capi.h\"\n#include \"include/capi/views/cef_view_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// A Textfield supports editing of text. This control is custom rendered with no\n// platform-specific code. Methods must be called on the browser process UI\n// thread unless otherwise indicated.\n///\ntypedef struct _cef_textfield_t {\n  ///\n  // Base structure.\n  ///\n  cef_view_t base;\n\n  ///\n  // Sets whether the text will be displayed as asterisks.\n  ///\n  void (CEF_CALLBACK *set_password_input)(struct _cef_textfield_t* self,\n      int password_input);\n\n  ///\n  // Returns true (1) if the text will be displayed as asterisks.\n  ///\n  int (CEF_CALLBACK *is_password_input)(struct _cef_textfield_t* self);\n\n  ///\n  // Sets whether the text will read-only.\n  ///\n  void (CEF_CALLBACK *set_read_only)(struct _cef_textfield_t* self,\n      int read_only);\n\n  ///\n  // Returns true (1) if the text is read-only.\n  ///\n  int (CEF_CALLBACK *is_read_only)(struct _cef_textfield_t* self);\n\n  ///\n  // Returns the currently displayed text.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_text)(struct _cef_textfield_t* self);\n\n  ///\n  // Sets the contents to |text|. The cursor will be moved to end of the text if\n  // the current position is outside of the text range.\n  ///\n  void (CEF_CALLBACK *set_text)(struct _cef_textfield_t* self,\n      const cef_string_t* text);\n\n  ///\n  // Appends |text| to the previously-existing text.\n  ///\n  void (CEF_CALLBACK *append_text)(struct _cef_textfield_t* self,\n      const cef_string_t* text);\n\n  ///\n  // Inserts |text| at the current cursor position replacing any selected text.\n  ///\n  void (CEF_CALLBACK *insert_or_replace_text)(struct _cef_textfield_t* self,\n      const cef_string_t* text);\n\n  ///\n  // Returns true (1) if there is any selected text.\n  ///\n  int (CEF_CALLBACK *has_selection)(struct _cef_textfield_t* self);\n\n  ///\n  // Returns the currently selected text.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_selected_text)(\n      struct _cef_textfield_t* self);\n\n  ///\n  // Selects all text. If |reversed| is true (1) the range will end at the\n  // logical beginning of the text; this generally shows the leading portion of\n  // text that overflows its display area.\n  ///\n  void (CEF_CALLBACK *select_all)(struct _cef_textfield_t* self, int reversed);\n\n  ///\n  // Clears the text selection and sets the caret to the end.\n  ///\n  void (CEF_CALLBACK *clear_selection)(struct _cef_textfield_t* self);\n\n  ///\n  // Returns the selected logical text range.\n  ///\n  cef_range_t (CEF_CALLBACK *get_selected_range)(struct _cef_textfield_t* self);\n\n  ///\n  // Selects the specified logical text range.\n  ///\n  void (CEF_CALLBACK *select_range)(struct _cef_textfield_t* self,\n      const cef_range_t* range);\n\n  ///\n  // Returns the current cursor position.\n  ///\n  size_t (CEF_CALLBACK *get_cursor_position)(struct _cef_textfield_t* self);\n\n  ///\n  // Sets the text color.\n  ///\n  void (CEF_CALLBACK *set_text_color)(struct _cef_textfield_t* self,\n      cef_color_t color);\n\n  ///\n  // Returns the text color.\n  ///\n  cef_color_t (CEF_CALLBACK *get_text_color)(struct _cef_textfield_t* self);\n\n  ///\n  // Sets the selection text color.\n  ///\n  void (CEF_CALLBACK *set_selection_text_color)(struct _cef_textfield_t* self,\n      cef_color_t color);\n\n  ///\n  // Returns the selection text color.\n  ///\n  cef_color_t (CEF_CALLBACK *get_selection_text_color)(\n      struct _cef_textfield_t* self);\n\n  ///\n  // Sets the selection background color.\n  ///\n  void (CEF_CALLBACK *set_selection_background_color)(\n      struct _cef_textfield_t* self, cef_color_t color);\n\n  ///\n  // Returns the selection background color.\n  ///\n  cef_color_t (CEF_CALLBACK *get_selection_background_color)(\n      struct _cef_textfield_t* self);\n\n  ///\n  // Sets the font list. The format is \"<FONT_FAMILY_LIST>,[STYLES] <SIZE>\",\n  // where: - FONT_FAMILY_LIST is a comma-separated list of font family names, -\n  // STYLES is an optional space-separated list of style names (case-sensitive\n  //   \"Bold\" and \"Italic\" are supported), and\n  // - SIZE is an integer font size in pixels with the suffix \"px\".\n  //\n  // Here are examples of valid font description strings: - \"Arial, Helvetica,\n  // Bold Italic 14px\" - \"Arial, 14px\"\n  ///\n  void (CEF_CALLBACK *set_font_list)(struct _cef_textfield_t* self,\n      const cef_string_t* font_list);\n\n  ///\n  // Applies |color| to the specified |range| without changing the default\n  // color. If |range| is NULL the color will be set on the complete text\n  // contents.\n  ///\n  void (CEF_CALLBACK *apply_text_color)(struct _cef_textfield_t* self,\n      cef_color_t color, const cef_range_t* range);\n\n  ///\n  // Applies |style| to the specified |range| without changing the default\n  // style. If |add| is true (1) the style will be added, otherwise the style\n  // will be removed. If |range| is NULL the style will be set on the complete\n  // text contents.\n  ///\n  void (CEF_CALLBACK *apply_text_style)(struct _cef_textfield_t* self,\n      cef_text_style_t style, int add, const cef_range_t* range);\n\n  ///\n  // Returns true (1) if the action associated with the specified command id is\n  // enabled. See additional comments on execute_command().\n  ///\n  int (CEF_CALLBACK *is_command_enabled)(struct _cef_textfield_t* self,\n      int command_id);\n\n  ///\n  // Performs the action associated with the specified command id. Valid values\n  // include IDS_APP_UNDO, IDS_APP_REDO, IDS_APP_CUT, IDS_APP_COPY,\n  // IDS_APP_PASTE, IDS_APP_DELETE, IDS_APP_SELECT_ALL, IDS_DELETE_* and\n  // IDS_MOVE_*. See include/cef_pack_strings.h for definitions.\n  ///\n  void (CEF_CALLBACK *execute_command)(struct _cef_textfield_t* self,\n      int command_id);\n\n  ///\n  // Clears Edit history.\n  ///\n  void (CEF_CALLBACK *clear_edit_history)(struct _cef_textfield_t* self);\n\n  ///\n  // Sets the placeholder text that will be displayed when the Textfield is\n  // NULL.\n  ///\n  void (CEF_CALLBACK *set_placeholder_text)(struct _cef_textfield_t* self,\n      const cef_string_t* text);\n\n  ///\n  // Returns the placeholder text that will be displayed when the Textfield is\n  // NULL.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_placeholder_text)(\n      struct _cef_textfield_t* self);\n\n  ///\n  // Sets the placeholder text color.\n  ///\n  void (CEF_CALLBACK *set_placeholder_text_color)(struct _cef_textfield_t* self,\n      cef_color_t color);\n\n  ///\n  // Returns the placeholder text color.\n  ///\n  cef_color_t (CEF_CALLBACK *get_placeholder_text_color)(\n      struct _cef_textfield_t* self);\n\n  ///\n  // Set the accessible name that will be exposed to assistive technology (AT).\n  ///\n  void (CEF_CALLBACK *set_accessible_name)(struct _cef_textfield_t* self,\n      const cef_string_t* name);\n} cef_textfield_t;\n\n\n///\n// Create a new Textfield.\n///\nCEF_EXPORT cef_textfield_t* cef_textfield_create(\n    struct _cef_textfield_delegate_t* delegate);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_textfield_delegate_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_view_delegate_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_textfield_t;\n\n///\n// Implement this structure to handle Textfield events. The functions of this\n// structure will be called on the browser process UI thread unless otherwise\n// indicated.\n///\ntypedef struct _cef_textfield_delegate_t {\n  ///\n  // Base structure.\n  ///\n  cef_view_delegate_t base;\n\n  ///\n  // Called when |textfield| recieves a keyboard event. |event| contains\n  // information about the keyboard event. Return true (1) if the keyboard event\n  // was handled or false (0) otherwise for default handling.\n  ///\n  int (CEF_CALLBACK *on_key_event)(struct _cef_textfield_delegate_t* self,\n      struct _cef_textfield_t* textfield,\n      const struct _cef_key_event_t* event);\n\n  ///\n  // Called after performing a user action that may change |textfield|.\n  ///\n  void (CEF_CALLBACK *on_after_user_action)(\n      struct _cef_textfield_delegate_t* self,\n      struct _cef_textfield_t* textfield);\n} cef_textfield_delegate_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_view_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_view_delegate_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_browser_view_t;\nstruct _cef_button_t;\nstruct _cef_panel_t;\nstruct _cef_scroll_view_t;\nstruct _cef_textfield_t;\nstruct _cef_window_t;\n\n///\n// A View is a rectangle within the views View hierarchy. It is the base\n// structure for all Views. All size and position values are in density\n// independent pixels (DIP) unless otherwise indicated. Methods must be called\n// on the browser process UI thread unless otherwise indicated.\n///\ntypedef struct _cef_view_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Returns this View as a BrowserView or NULL if this is not a BrowserView.\n  ///\n  struct _cef_browser_view_t* (CEF_CALLBACK *as_browser_view)(\n      struct _cef_view_t* self);\n\n  ///\n  // Returns this View as a Button or NULL if this is not a Button.\n  ///\n  struct _cef_button_t* (CEF_CALLBACK *as_button)(struct _cef_view_t* self);\n\n  ///\n  // Returns this View as a Panel or NULL if this is not a Panel.\n  ///\n  struct _cef_panel_t* (CEF_CALLBACK *as_panel)(struct _cef_view_t* self);\n\n  ///\n  // Returns this View as a ScrollView or NULL if this is not a ScrollView.\n  ///\n  struct _cef_scroll_view_t* (CEF_CALLBACK *as_scroll_view)(\n      struct _cef_view_t* self);\n\n  ///\n  // Returns this View as a Textfield or NULL if this is not a Textfield.\n  ///\n  struct _cef_textfield_t* (CEF_CALLBACK *as_textfield)(\n      struct _cef_view_t* self);\n\n  ///\n  // Returns the type of this View as a string. Used primarily for testing\n  // purposes.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_type_string)(\n      struct _cef_view_t* self);\n\n  ///\n  // Returns a string representation of this View which includes the type and\n  // various type-specific identifying attributes. If |include_children| is true\n  // (1) any child Views will also be included. Used primarily for testing\n  // purposes.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *to_string)(struct _cef_view_t* self,\n      int include_children);\n\n  ///\n  // Returns true (1) if this View is valid.\n  ///\n  int (CEF_CALLBACK *is_valid)(struct _cef_view_t* self);\n\n  ///\n  // Returns true (1) if this View is currently attached to another View. A View\n  // can only be attached to one View at a time.\n  ///\n  int (CEF_CALLBACK *is_attached)(struct _cef_view_t* self);\n\n  ///\n  // Returns true (1) if this View is the same as |that| View.\n  ///\n  int (CEF_CALLBACK *is_same)(struct _cef_view_t* self,\n      struct _cef_view_t* that);\n\n  ///\n  // Returns the delegate associated with this View, if any.\n  ///\n  struct _cef_view_delegate_t* (CEF_CALLBACK *get_delegate)(\n      struct _cef_view_t* self);\n\n  ///\n  // Returns the top-level Window hosting this View, if any.\n  ///\n  struct _cef_window_t* (CEF_CALLBACK *get_window)(struct _cef_view_t* self);\n\n  ///\n  // Returns the ID for this View.\n  ///\n  int (CEF_CALLBACK *get_id)(struct _cef_view_t* self);\n\n  ///\n  // Sets the ID for this View. ID should be unique within the subtree that you\n  // intend to search for it. 0 is the default ID for views.\n  ///\n  void (CEF_CALLBACK *set_id)(struct _cef_view_t* self, int id);\n\n  ///\n  // Returns the View that contains this View, if any.\n  ///\n  struct _cef_view_t* (CEF_CALLBACK *get_parent_view)(struct _cef_view_t* self);\n\n  ///\n  // Recursively descends the view tree starting at this View, and returns the\n  // first child that it encounters with the given ID. Returns NULL if no\n  // matching child view is found.\n  ///\n  struct _cef_view_t* (CEF_CALLBACK *get_view_for_id)(struct _cef_view_t* self,\n      int id);\n\n  ///\n  // Sets the bounds (size and position) of this View. Position is in parent\n  // coordinates.\n  ///\n  void (CEF_CALLBACK *set_bounds)(struct _cef_view_t* self,\n      const cef_rect_t* bounds);\n\n  ///\n  // Returns the bounds (size and position) of this View. Position is in parent\n  // coordinates.\n  ///\n  cef_rect_t (CEF_CALLBACK *get_bounds)(struct _cef_view_t* self);\n\n  ///\n  // Returns the bounds (size and position) of this View. Position is in screen\n  // coordinates.\n  ///\n  cef_rect_t (CEF_CALLBACK *get_bounds_in_screen)(struct _cef_view_t* self);\n\n  ///\n  // Sets the size of this View without changing the position.\n  ///\n  void (CEF_CALLBACK *set_size)(struct _cef_view_t* self,\n      const cef_size_t* size);\n\n  ///\n  // Returns the size of this View.\n  ///\n  cef_size_t (CEF_CALLBACK *get_size)(struct _cef_view_t* self);\n\n  ///\n  // Sets the position of this View without changing the size. |position| is in\n  // parent coordinates.\n  ///\n  void (CEF_CALLBACK *set_position)(struct _cef_view_t* self,\n      const cef_point_t* position);\n\n  ///\n  // Returns the position of this View. Position is in parent coordinates.\n  ///\n  cef_point_t (CEF_CALLBACK *get_position)(struct _cef_view_t* self);\n\n  ///\n  // Returns the size this View would like to be if enough space is available.\n  ///\n  cef_size_t (CEF_CALLBACK *get_preferred_size)(struct _cef_view_t* self);\n\n  ///\n  // Size this View to its preferred size.\n  ///\n  void (CEF_CALLBACK *size_to_preferred_size)(struct _cef_view_t* self);\n\n  ///\n  // Returns the minimum size for this View.\n  ///\n  cef_size_t (CEF_CALLBACK *get_minimum_size)(struct _cef_view_t* self);\n\n  ///\n  // Returns the maximum size for this View.\n  ///\n  cef_size_t (CEF_CALLBACK *get_maximum_size)(struct _cef_view_t* self);\n\n  ///\n  // Returns the height necessary to display this View with the provided width.\n  ///\n  int (CEF_CALLBACK *get_height_for_width)(struct _cef_view_t* self, int width);\n\n  ///\n  // Indicate that this View and all parent Views require a re-layout. This\n  // ensures the next call to layout() will propagate to this View even if the\n  // bounds of parent Views do not change.\n  ///\n  void (CEF_CALLBACK *invalidate_layout)(struct _cef_view_t* self);\n\n  ///\n  // Sets whether this View is visible. Windows are hidden by default and other\n  // views are visible by default. This View and any parent views must be set as\n  // visible for this View to be drawn in a Window. If this View is set as\n  // hidden then it and any child views will not be drawn and, if any of those\n  // views currently have focus, then focus will also be cleared. Painting is\n  // scheduled as needed. If this View is a Window then calling this function is\n  // equivalent to calling the Window show() and hide() functions.\n  ///\n  void (CEF_CALLBACK *set_visible)(struct _cef_view_t* self, int visible);\n\n  ///\n  // Returns whether this View is visible. A view may be visible but still not\n  // drawn in a Window if any parent views are hidden. If this View is a Window\n  // then a return value of true (1) indicates that this Window is currently\n  // visible to the user on-screen. If this View is not a Window then call\n  // is_drawn() to determine whether this View and all parent views are visible\n  // and will be drawn.\n  ///\n  int (CEF_CALLBACK *is_visible)(struct _cef_view_t* self);\n\n  ///\n  // Returns whether this View is visible and drawn in a Window. A view is drawn\n  // if it and all parent views are visible. If this View is a Window then\n  // calling this function is equivalent to calling is_visible(). Otherwise, to\n  // determine if the containing Window is visible to the user on-screen call\n  // is_visible() on the Window.\n  ///\n  int (CEF_CALLBACK *is_drawn)(struct _cef_view_t* self);\n\n  ///\n  // Set whether this View is enabled. A disabled View does not receive keyboard\n  // or mouse inputs. If |enabled| differs from the current value the View will\n  // be repainted. Also, clears focus if the focused View is disabled.\n  ///\n  void (CEF_CALLBACK *set_enabled)(struct _cef_view_t* self, int enabled);\n\n  ///\n  // Returns whether this View is enabled.\n  ///\n  int (CEF_CALLBACK *is_enabled)(struct _cef_view_t* self);\n\n  ///\n  // Sets whether this View is capable of taking focus. It will clear focus if\n  // the focused View is set to be non-focusable. This is false (0) by default\n  // so that a View used as a container does not get the focus.\n  ///\n  void (CEF_CALLBACK *set_focusable)(struct _cef_view_t* self, int focusable);\n\n  ///\n  // Returns true (1) if this View is focusable, enabled and drawn.\n  ///\n  int (CEF_CALLBACK *is_focusable)(struct _cef_view_t* self);\n\n  ///\n  // Return whether this View is focusable when the user requires full keyboard\n  // access, even though it may not be normally focusable.\n  ///\n  int (CEF_CALLBACK *is_accessibility_focusable)(struct _cef_view_t* self);\n\n  ///\n  // Request keyboard focus. If this View is focusable it will become the\n  // focused View.\n  ///\n  void (CEF_CALLBACK *request_focus)(struct _cef_view_t* self);\n\n  ///\n  // Sets the background color for this View.\n  ///\n  void (CEF_CALLBACK *set_background_color)(struct _cef_view_t* self,\n      cef_color_t color);\n\n  ///\n  // Returns the background color for this View.\n  ///\n  cef_color_t (CEF_CALLBACK *get_background_color)(struct _cef_view_t* self);\n\n  ///\n  // Convert |point| from this View's coordinate system to that of the screen.\n  // This View must belong to a Window when calling this function. Returns true\n  // (1) if the conversion is successful or false (0) otherwise. Use\n  // cef_display_t::convert_point_to_pixels() after calling this function if\n  // further conversion to display-specific pixel coordinates is desired.\n  ///\n  int (CEF_CALLBACK *convert_point_to_screen)(struct _cef_view_t* self,\n      cef_point_t* point);\n\n  ///\n  // Convert |point| to this View's coordinate system from that of the screen.\n  // This View must belong to a Window when calling this function. Returns true\n  // (1) if the conversion is successful or false (0) otherwise. Use\n  // cef_display_t::convert_point_from_pixels() before calling this function if\n  // conversion from display-specific pixel coordinates is necessary.\n  ///\n  int (CEF_CALLBACK *convert_point_from_screen)(struct _cef_view_t* self,\n      cef_point_t* point);\n\n  ///\n  // Convert |point| from this View's coordinate system to that of the Window.\n  // This View must belong to a Window when calling this function. Returns true\n  // (1) if the conversion is successful or false (0) otherwise.\n  ///\n  int (CEF_CALLBACK *convert_point_to_window)(struct _cef_view_t* self,\n      cef_point_t* point);\n\n  ///\n  // Convert |point| to this View's coordinate system from that of the Window.\n  // This View must belong to a Window when calling this function. Returns true\n  // (1) if the conversion is successful or false (0) otherwise.\n  ///\n  int (CEF_CALLBACK *convert_point_from_window)(struct _cef_view_t* self,\n      cef_point_t* point);\n\n  ///\n  // Convert |point| from this View's coordinate system to that of |view|.\n  // |view| needs to be in the same Window but not necessarily the same view\n  // hierarchy. Returns true (1) if the conversion is successful or false (0)\n  // otherwise.\n  ///\n  int (CEF_CALLBACK *convert_point_to_view)(struct _cef_view_t* self,\n      struct _cef_view_t* view, cef_point_t* point);\n\n  ///\n  // Convert |point| to this View's coordinate system from that |view|. |view|\n  // needs to be in the same Window but not necessarily the same view hierarchy.\n  // Returns true (1) if the conversion is successful or false (0) otherwise.\n  ///\n  int (CEF_CALLBACK *convert_point_from_view)(struct _cef_view_t* self,\n      struct _cef_view_t* view, cef_point_t* point);\n} cef_view_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_view_delegate_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_base_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_view_t;\n\n///\n// Implement this structure to handle view events. The functions of this\n// structure will be called on the browser process UI thread unless otherwise\n// indicated.\n///\ntypedef struct _cef_view_delegate_t {\n  ///\n  // Base structure.\n  ///\n  cef_base_t base;\n\n  ///\n  // Return the preferred size for |view|. The Layout will use this information\n  // to determine the display size.\n  ///\n  cef_size_t (CEF_CALLBACK *get_preferred_size)(\n      struct _cef_view_delegate_t* self, struct _cef_view_t* view);\n\n  ///\n  // Return the minimum size for |view|.\n  ///\n  cef_size_t (CEF_CALLBACK *get_minimum_size)(struct _cef_view_delegate_t* self,\n      struct _cef_view_t* view);\n\n  ///\n  // Return the maximum size for |view|.\n  ///\n  cef_size_t (CEF_CALLBACK *get_maximum_size)(struct _cef_view_delegate_t* self,\n      struct _cef_view_t* view);\n\n  ///\n  // Return the height necessary to display |view| with the provided |width|. If\n  // not specified the result of get_preferred_size().height will be used by\n  // default. Override if |view|'s preferred height depends upon the width (for\n  // example, with Labels).\n  ///\n  int (CEF_CALLBACK *get_height_for_width)(struct _cef_view_delegate_t* self,\n      struct _cef_view_t* view, int width);\n\n  ///\n  // Called when the parent of |view| has changed. If |view| is being added to\n  // |parent| then |added| will be true (1). If |view| is being removed from\n  // |parent| then |added| will be false (0). If |view| is being reparented the\n  // remove notification will be sent before the add notification. Do not modify\n  // the view hierarchy in this callback.\n  ///\n  void (CEF_CALLBACK *on_parent_view_changed)(struct _cef_view_delegate_t* self,\n      struct _cef_view_t* view, int added, struct _cef_view_t* parent);\n\n  ///\n  // Called when a child of |view| has changed. If |child| is being added to\n  // |view| then |added| will be true (1). If |child| is being removed from\n  // |view| then |added| will be false (0). If |child| is being reparented the\n  // remove notification will be sent to the old parent before the add\n  // notification is sent to the new parent. Do not modify the view hierarchy in\n  // this callback.\n  ///\n  void (CEF_CALLBACK *on_child_view_changed)(struct _cef_view_delegate_t* self,\n      struct _cef_view_t* view, int added, struct _cef_view_t* child);\n} cef_view_delegate_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_window_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_CAPI_H_\n#pragma once\n\n#include \"include/capi/cef_image_capi.h\"\n#include \"include/capi/cef_menu_model_capi.h\"\n#include \"include/capi/views/cef_display_capi.h\"\n#include \"include/capi/views/cef_panel_capi.h\"\n#include \"include/capi/views/cef_window_delegate_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n///\n// A Window is a top-level Window/widget in the Views hierarchy. By default it\n// will have a non-client area with title bar, icon and buttons that supports\n// moving and resizing. All size and position values are in density independent\n// pixels (DIP) unless otherwise indicated. Methods must be called on the\n// browser process UI thread unless otherwise indicated.\n///\ntypedef struct _cef_window_t {\n  ///\n  // Base structure.\n  ///\n  cef_panel_t base;\n\n  ///\n  // Show the Window.\n  ///\n  void (CEF_CALLBACK *show)(struct _cef_window_t* self);\n\n  ///\n  // Hide the Window.\n  ///\n  void (CEF_CALLBACK *hide)(struct _cef_window_t* self);\n\n  ///\n  // Sizes the Window to |size| and centers it in the current display.\n  ///\n  void (CEF_CALLBACK *center_window)(struct _cef_window_t* self,\n      const cef_size_t* size);\n\n  ///\n  // Close the Window.\n  ///\n  void (CEF_CALLBACK *close)(struct _cef_window_t* self);\n\n  ///\n  // Returns true (1) if the Window has been closed.\n  ///\n  int (CEF_CALLBACK *is_closed)(struct _cef_window_t* self);\n\n  ///\n  // Activate the Window, assuming it already exists and is visible.\n  ///\n  void (CEF_CALLBACK *activate)(struct _cef_window_t* self);\n\n  ///\n  // Deactivate the Window, making the next Window in the Z order the active\n  // Window.\n  ///\n  void (CEF_CALLBACK *deactivate)(struct _cef_window_t* self);\n\n  ///\n  // Returns whether the Window is the currently active Window.\n  ///\n  int (CEF_CALLBACK *is_active)(struct _cef_window_t* self);\n\n  ///\n  // Bring this Window to the top of other Windows in the Windowing system.\n  ///\n  void (CEF_CALLBACK *bring_to_top)(struct _cef_window_t* self);\n\n  ///\n  // Set the Window to be on top of other Windows in the Windowing system.\n  ///\n  void (CEF_CALLBACK *set_always_on_top)(struct _cef_window_t* self,\n      int on_top);\n\n  ///\n  // Returns whether the Window has been set to be on top of other Windows in\n  // the Windowing system.\n  ///\n  int (CEF_CALLBACK *is_always_on_top)(struct _cef_window_t* self);\n\n  ///\n  // Maximize the Window.\n  ///\n  void (CEF_CALLBACK *maximize)(struct _cef_window_t* self);\n\n  ///\n  // Minimize the Window.\n  ///\n  void (CEF_CALLBACK *minimize)(struct _cef_window_t* self);\n\n  ///\n  // Restore the Window.\n  ///\n  void (CEF_CALLBACK *restore)(struct _cef_window_t* self);\n\n  ///\n  // Set fullscreen Window state.\n  ///\n  void (CEF_CALLBACK *set_fullscreen)(struct _cef_window_t* self,\n      int fullscreen);\n\n  ///\n  // Returns true (1) if the Window is maximized.\n  ///\n  int (CEF_CALLBACK *is_maximized)(struct _cef_window_t* self);\n\n  ///\n  // Returns true (1) if the Window is minimized.\n  ///\n  int (CEF_CALLBACK *is_minimized)(struct _cef_window_t* self);\n\n  ///\n  // Returns true (1) if the Window is fullscreen.\n  ///\n  int (CEF_CALLBACK *is_fullscreen)(struct _cef_window_t* self);\n\n  ///\n  // Set the Window title.\n  ///\n  void (CEF_CALLBACK *set_title)(struct _cef_window_t* self,\n      const cef_string_t* title);\n\n  ///\n  // Get the Window title.\n  ///\n  // The resulting string must be freed by calling cef_string_userfree_free().\n  cef_string_userfree_t (CEF_CALLBACK *get_title)(struct _cef_window_t* self);\n\n  ///\n  // Set the Window icon. This should be a 16x16 icon suitable for use in the\n  // Windows's title bar.\n  ///\n  void (CEF_CALLBACK *set_window_icon)(struct _cef_window_t* self,\n      struct _cef_image_t* image);\n\n  ///\n  // Get the Window icon.\n  ///\n  struct _cef_image_t* (CEF_CALLBACK *get_window_icon)(\n      struct _cef_window_t* self);\n\n  ///\n  // Set the Window App icon. This should be a larger icon for use in the host\n  // environment app switching UI. On Windows, this is the ICON_BIG used in Alt-\n  // Tab list and Windows taskbar. The Window icon will be used by default if no\n  // Window App icon is specified.\n  ///\n  void (CEF_CALLBACK *set_window_app_icon)(struct _cef_window_t* self,\n      struct _cef_image_t* image);\n\n  ///\n  // Get the Window App icon.\n  ///\n  struct _cef_image_t* (CEF_CALLBACK *get_window_app_icon)(\n      struct _cef_window_t* self);\n\n  ///\n  // Show a menu with contents |menu_model|. |screen_point| specifies the menu\n  // position in screen coordinates. |anchor_position| specifies how the menu\n  // will be anchored relative to |screen_point|.\n  ///\n  void (CEF_CALLBACK *show_menu)(struct _cef_window_t* self,\n      struct _cef_menu_model_t* menu_model, const cef_point_t* screen_point,\n      cef_menu_anchor_position_t anchor_position);\n\n  ///\n  // Cancel the menu that is currently showing, if any.\n  ///\n  void (CEF_CALLBACK *cancel_menu)(struct _cef_window_t* self);\n\n  ///\n  // Returns the Display that most closely intersects the bounds of this Window.\n  // May return NULL if this Window is not currently displayed.\n  ///\n  struct _cef_display_t* (CEF_CALLBACK *get_display)(\n      struct _cef_window_t* self);\n\n  ///\n  // Returns the bounds (size and position) of this Window's client area.\n  // Position is in screen coordinates.\n  ///\n  cef_rect_t (CEF_CALLBACK *get_client_area_bounds_in_screen)(\n      struct _cef_window_t* self);\n\n  ///\n  // Set the regions where mouse events will be intercepted by this Window to\n  // support drag operations. Call this function with an NULL vector to clear\n  // the draggable regions. The draggable region bounds should be in window\n  // coordinates.\n  ///\n  void (CEF_CALLBACK *set_draggable_regions)(struct _cef_window_t* self,\n      size_t regionsCount, cef_draggable_region_t const* regions);\n\n  ///\n  // Retrieve the platform window handle for this Window.\n  ///\n  cef_window_handle_t (CEF_CALLBACK *get_window_handle)(\n      struct _cef_window_t* self);\n\n  ///\n  // Simulate a key press. |key_code| is the VKEY_* value from Chromium's\n  // ui/events/keycodes/keyboard_codes.h header (VK_* values on Windows).\n  // |event_flags| is some combination of EVENTFLAG_SHIFT_DOWN,\n  // EVENTFLAG_CONTROL_DOWN and/or EVENTFLAG_ALT_DOWN. This function is exposed\n  // primarily for testing purposes.\n  ///\n  void (CEF_CALLBACK *send_key_press)(struct _cef_window_t* self, int key_code,\n      uint32 event_flags);\n\n  ///\n  // Simulate a mouse move. The mouse cursor will be moved to the specified\n  // (screen_x, screen_y) position. This function is exposed primarily for\n  // testing purposes.\n  ///\n  void (CEF_CALLBACK *send_mouse_move)(struct _cef_window_t* self, int screen_x,\n      int screen_y);\n\n  ///\n  // Simulate mouse down and/or mouse up events. |button| is the mouse button\n  // type. If |mouse_down| is true (1) a mouse down event will be sent. If\n  // |mouse_up| is true (1) a mouse up event will be sent. If both are true (1)\n  // a mouse down event will be sent followed by a mouse up event (equivalent to\n  // clicking the mouse button). The events will be sent using the current\n  // cursor position so make sure to call send_mouse_move() first to position\n  // the mouse. This function is exposed primarily for testing purposes.\n  ///\n  void (CEF_CALLBACK *send_mouse_events)(struct _cef_window_t* self,\n      cef_mouse_button_type_t button, int mouse_down, int mouse_up);\n} cef_window_t;\n\n\n///\n// Create a new Window.\n///\nCEF_EXPORT cef_window_t* cef_window_create_top_level(\n    struct _cef_window_delegate_t* delegate);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_CAPI_H_\n"
  },
  {
    "path": "CEF/include/capi/views/cef_window_delegate_capi.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file was generated by the CEF translator tool and should not edited\n// by hand. See the translator.README.txt file in the tools directory for\n// more information.\n//\n\n#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_\n#define CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_\n#pragma once\n\n#include \"include/capi/views/cef_panel_delegate_capi.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct _cef_window_t;\n\n///\n// Implement this structure to handle window events. The functions of this\n// structure will be called on the browser process UI thread unless otherwise\n// indicated.\n///\ntypedef struct _cef_window_delegate_t {\n  ///\n  // Base structure.\n  ///\n  cef_panel_delegate_t base;\n\n  ///\n  // Called when |window| is created.\n  ///\n  void (CEF_CALLBACK *on_window_created)(struct _cef_window_delegate_t* self,\n      struct _cef_window_t* window);\n\n  ///\n  // Called when |window| is destroyed. Release all references to |window| and\n  // do not attempt to execute any functions on |window| after this callback\n  // returns.\n  ///\n  void (CEF_CALLBACK *on_window_destroyed)(struct _cef_window_delegate_t* self,\n      struct _cef_window_t* window);\n\n  ///\n  // Return true (1) if |window| should be created without a frame or title bar.\n  // The window will be resizable if can_resize() returns true (1). Use\n  // cef_window_t::set_draggable_regions() to specify draggable regions.\n  ///\n  int (CEF_CALLBACK *is_frameless)(struct _cef_window_delegate_t* self,\n      struct _cef_window_t* window);\n\n  ///\n  // Return true (1) if |window| can be resized.\n  ///\n  int (CEF_CALLBACK *can_resize)(struct _cef_window_delegate_t* self,\n      struct _cef_window_t* window);\n\n  ///\n  // Return true (1) if |window| can be maximized.\n  ///\n  int (CEF_CALLBACK *can_maximize)(struct _cef_window_delegate_t* self,\n      struct _cef_window_t* window);\n\n  ///\n  // Return true (1) if |window| can be minimized.\n  ///\n  int (CEF_CALLBACK *can_minimize)(struct _cef_window_delegate_t* self,\n      struct _cef_window_t* window);\n\n  ///\n  // Return true (1) if |window| can be closed. This will be called for user-\n  // initiated window close actions and when cef_window_t::close() is called.\n  ///\n  int (CEF_CALLBACK *can_close)(struct _cef_window_delegate_t* self,\n      struct _cef_window_t* window);\n} cef_window_delegate_t;\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_\n"
  },
  {
    "path": "CEF/include/cef_app.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n\n#ifndef CEF_INCLUDE_CEF_APP_H_\n#define CEF_INCLUDE_CEF_APP_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser_process_handler.h\"\n#include \"include/cef_command_line.h\"\n#include \"include/cef_render_process_handler.h\"\n#include \"include/cef_resource_bundle_handler.h\"\n#include \"include/cef_scheme.h\"\n\nclass CefApp;\n\n///\n// This function should be called from the application entry point function to\n// execute a secondary process. It can be used to run secondary processes from\n// the browser client executable (default behavior) or from a separate\n// executable specified by the CefSettings.browser_subprocess_path value. If\n// called for the browser process (identified by no \"type\" command-line value)\n// it will return immediately with a value of -1. If called for a recognized\n// secondary process it will block until the process should exit and then return\n// the process exit code. The |application| parameter may be empty. The\n// |windows_sandbox_info| parameter is only used on Windows and may be NULL (see\n// cef_sandbox_win.h for details).\n///\n/*--cef(api_hash_check,optional_param=application,\n        optional_param=windows_sandbox_info)--*/\nint CefExecuteProcess(const CefMainArgs& args,\n                      CefRefPtr<CefApp> application,\n                      void* windows_sandbox_info);\n\n///\n// This function should be called on the main application thread to initialize\n// the CEF browser process. The |application| parameter may be empty. A return\n// value of true indicates that it succeeded and false indicates that it failed.\n// The |windows_sandbox_info| parameter is only used on Windows and may be NULL\n// (see cef_sandbox_win.h for details).\n///\n/*--cef(api_hash_check,optional_param=application,\n        optional_param=windows_sandbox_info)--*/\nbool CefInitialize(const CefMainArgs& args,\n                   const CefSettings& settings,\n                   CefRefPtr<CefApp> application,\n                   void* windows_sandbox_info);\n\n///\n// This function should be called on the main application thread to shut down\n// the CEF browser process before the application exits.\n///\n/*--cef()--*/\nvoid CefShutdown();\n\n///\n// Perform a single iteration of CEF message loop processing. This function is\n// used to integrate the CEF message loop into an existing application message\n// loop. Care must be taken to balance performance against excessive CPU usage.\n// This function should only be called on the main application thread and only\n// if CefInitialize() is called with a CefSettings.multi_threaded_message_loop\n// value of false. This function will not block.\n///\n/*--cef()--*/\nvoid CefDoMessageLoopWork();\n\n///\n// Run the CEF message loop. Use this function instead of an application-\n// provided message loop to get the best balance between performance and CPU\n// usage. This function should only be called on the main application thread and\n// only if CefInitialize() is called with a\n// CefSettings.multi_threaded_message_loop value of false. This function will\n// block until a quit message is received by the system.\n///\n/*--cef()--*/\nvoid CefRunMessageLoop();\n\n///\n// Quit the CEF message loop that was started by calling CefRunMessageLoop().\n// This function should only be called on the main application thread and only\n// if CefRunMessageLoop() was used.\n///\n/*--cef()--*/\nvoid CefQuitMessageLoop();\n\n///\n// Set to true before calling Windows APIs like TrackPopupMenu that enter a\n// modal message loop. Set to false after exiting the modal message loop.\n///\n/*--cef()--*/\nvoid CefSetOSModalLoop(bool osModalLoop);\n\n///\n// Call during process startup to enable High-DPI support on Windows 7 or newer.\n// Older versions of Windows should be left DPI-unaware because they do not\n// support DirectWrite and GDI fonts are kerned very badly.\n///\n/*--cef(capi_name=cef_enable_highdpi_support)--*/\nvoid CefEnableHighDPISupport();\n\n///\n// Implement this interface to provide handler implementations. Methods will be\n// called by the process and/or thread indicated.\n///\n/*--cef(source=client,no_debugct_check)--*/\nclass CefApp : public virtual CefBase {\n public:\n  ///\n  // Provides an opportunity to view and/or modify command-line arguments before\n  // processing by CEF and Chromium. The |process_type| value will be empty for\n  // the browser process. Do not keep a reference to the CefCommandLine object\n  // passed to this method. The CefSettings.command_line_args_disabled value\n  // can be used to start with an empty command-line object. Any values\n  // specified in CefSettings that equate to command-line arguments will be set\n  // before this method is called. Be cautious when using this method to modify\n  // command-line arguments for non-browser processes as this may result in\n  // undefined behavior including crashes.\n  ///\n  /*--cef(optional_param=process_type)--*/\n  virtual void OnBeforeCommandLineProcessing(\n      const CefString& process_type,\n      CefRefPtr<CefCommandLine> command_line) {\n  }\n\n  ///\n  // Provides an opportunity to register custom schemes. Do not keep a reference\n  // to the |registrar| object. This method is called on the main thread for\n  // each process and the registered schemes should be the same across all\n  // processes.\n  ///\n  /*--cef()--*/\n  virtual void OnRegisterCustomSchemes(\n      CefRefPtr<CefSchemeRegistrar> registrar) {\n  }\n\n  ///\n  // Return the handler for resource bundle events. If\n  // CefSettings.pack_loading_disabled is true a handler must be returned. If no\n  // handler is returned resources will be loaded from pack files. This method\n  // is called by the browser and render processes on multiple threads.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefResourceBundleHandler> GetResourceBundleHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for functionality specific to the browser process. This\n  // method is called on multiple threads in the browser process.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for functionality specific to the render process. This\n  // method is called on the render process main thread.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() {\n    return NULL;\n  }\n};\n\n#endif  // CEF_INCLUDE_CEF_APP_H_\n"
  },
  {
    "path": "CEF/include/cef_auth_callback.h",
    "content": "// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_AUTH_CALLBACK_H_\n#define CEF_INCLUDE_CEF_AUTH_CALLBACK_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\n///\n// Callback interface used for asynchronous continuation of authentication\n// requests.\n///\n/*--cef(source=library)--*/\nclass CefAuthCallback : public virtual CefBase {\n public:\n  ///\n  // Continue the authentication request.\n  ///\n  /*--cef(capi_name=cont)--*/\n  virtual void Continue(const CefString& username,\n                        const CefString& password) =0;\n\n  ///\n  // Cancel the authentication request.\n  ///\n  /*--cef()--*/\n  virtual void Cancel() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_AUTH_CALLBACK_H_\n"
  },
  {
    "path": "CEF/include/cef_base.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n#ifndef CEF_INCLUDE_CEF_BASE_H_\n#define CEF_INCLUDE_CEF_BASE_H_\n#pragma once\n\n#include \"include/base/cef_atomic_ref_count.h\"\n#include \"include/base/cef_build.h\"\n#include \"include/base/cef_macros.h\"\n\n// Bring in common C++ type definitions used by CEF consumers.\n#include \"include/internal/cef_ptr.h\"\n#include \"include/internal/cef_types_wrappers.h\"\n#if defined(OS_WIN)\n#include \"include/internal/cef_win.h\"\n#elif defined(OS_MACOSX)\n#include \"include/internal/cef_mac.h\"\n#elif defined(OS_LINUX)\n#include \"include/internal/cef_linux.h\"\n#endif\n\n///\n// Interface defining the reference count implementation methods. All framework\n// classes must extend the CefBase class.\n///\nclass CefBase {\n public:\n  ///\n  // Called to increment the reference count for the object. Should be called\n  // for every new copy of a pointer to a given object.\n  ///\n  virtual void AddRef() const =0;\n\n  ///\n  // Called to decrement the reference count for the object. Returns true if\n  // the reference count is 0, in which case the object should self-delete.\n  ///\n  virtual bool Release() const =0;\n\n  ///\n  // Returns true if the reference count is 1.\n  ///\n  virtual bool HasOneRef() const =0;\n\n protected:\n  virtual ~CefBase() {}\n};\n\n///\n// Class that implements atomic reference counting.\n///\nclass CefRefCount {\n public:\n  CefRefCount() : ref_count_(0) {}\n\n  ///\n  // Increment the reference count.\n  ///\n  void AddRef() const {\n    base::AtomicRefCountInc(&ref_count_); \n  }\n\n  ///\n  // Decrement the reference count. Returns true if the reference count is 0.\n  ///\n  bool Release() const {\n    return !base::AtomicRefCountDec(&ref_count_);\n  }\n\n  ///\n  // Returns true if the reference count is 1.\n  ///\n  bool HasOneRef() const {\n    return base::AtomicRefCountIsOne(&ref_count_);\n  }\n\n private:\n  mutable base::AtomicRefCount ref_count_;\n  DISALLOW_COPY_AND_ASSIGN(CefRefCount);\n};\n\n///\n// Macro that provides a reference counting implementation for classes extending\n// CefBase.\n///\n#define IMPLEMENT_REFCOUNTING(ClassName)            \\\n  public:                                           \\\n    void AddRef() const OVERRIDE {                  \\\n      ref_count_.AddRef();                          \\\n    }                                               \\\n    bool Release() const OVERRIDE {                 \\\n      if (ref_count_.Release()) {                   \\\n        delete static_cast<const ClassName*>(this); \\\n        return true;                                \\\n      }                                             \\\n      return false;                                 \\\n    }                                               \\\n    bool HasOneRef() const OVERRIDE {               \\\n      return ref_count_.HasOneRef();                \\\n    }                                               \\\n  private:                                          \\\n    CefRefCount ref_count_;\n\n///\n// Macro that provides a locking implementation. Use the Lock() and Unlock()\n// methods to protect a section of code from simultaneous access by multiple\n// threads. The AutoLock class is a helper that will hold the lock while in\n// scope.\n//\n// THIS MACRO IS DEPRECATED. Use an explicit base::Lock member variable and\n// base::AutoLock instead. For example:\n//\n// #include \"include/base/cef_lock.h\"\n//\n// // Class declaration.\n// class MyClass : public CefBase {\n//  public:\n//   MyClass() : value_(0) {}\n//   // Method that may be called on multiple threads.\n//   void IncrementValue();\n//  private:\n//   // Value that may be accessed on multiple theads.\n//   int value_;\n//   // Lock used to protect access to |value_|.\n//   base::Lock lock_;\n//   IMPLEMENT_REFCOUNTING(MyClass);\n// };\n//\n// // Class implementation.\n// void MyClass::IncrementValue() {\n//   // Acquire the lock for the scope of this method.\n//   base::AutoLock lock_scope(lock_);\n//   // |value_| can now be modified safely.\n//   value_++;\n// }\n///\n#define IMPLEMENT_LOCKING(ClassName)                                       \\\n  public:                                                                  \\\n    class AutoLock {                                                       \\\n     public:                                                               \\\n      explicit AutoLock(ClassName* base) : base_(base) { base_->Lock(); }  \\\n      ~AutoLock() { base_->Unlock(); }                                     \\\n     private:                                                              \\\n      ClassName* base_;                                                    \\\n      DISALLOW_COPY_AND_ASSIGN(AutoLock);                                  \\\n    };                                                                     \\\n    void Lock() { lock_.Acquire(); }                                       \\\n    void Unlock() { lock_.Release(); }                                     \\\n  private:                                                                 \\\n    base::Lock lock_;\n\n#endif  // CEF_INCLUDE_CEF_BASE_H_\n"
  },
  {
    "path": "CEF/include/cef_browser.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_BROWSER_H_\n#define CEF_INCLUDE_CEF_BROWSER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_drag_data.h\"\n#include \"include/cef_frame.h\"\n#include \"include/cef_image.h\"\n#include \"include/cef_navigation_entry.h\"\n#include \"include/cef_process_message.h\"\n#include \"include/cef_request_context.h\"\n#include <vector>\n\nclass CefBrowserHost;\nclass CefClient;\n\n\n///\n// Class used to represent a browser window. When used in the browser process\n// the methods of this class may be called on any thread unless otherwise\n// indicated in the comments. When used in the render process the methods of\n// this class may only be called on the main thread.\n///\n/*--cef(source=library)--*/\nclass CefBrowser : public virtual CefBase {\n public:\n  ///\n  // Returns the browser host object. This method can only be called in the\n  // browser process.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBrowserHost> GetHost() =0;\n\n  ///\n  // Returns true if the browser can navigate backwards.\n  ///\n  /*--cef()--*/\n  virtual bool CanGoBack() =0;\n\n  ///\n  // Navigate backwards.\n  ///\n  /*--cef()--*/\n  virtual void GoBack() =0;\n\n  ///\n  // Returns true if the browser can navigate forwards.\n  ///\n  /*--cef()--*/\n  virtual bool CanGoForward() =0;\n\n  ///\n  // Navigate forwards.\n  ///\n  /*--cef()--*/\n  virtual void GoForward() =0;\n\n  ///\n  // Returns true if the browser is currently loading.\n  ///\n  /*--cef()--*/\n  virtual bool IsLoading() =0;\n\n  ///\n  // Reload the current page.\n  ///\n  /*--cef()--*/\n  virtual void Reload() =0;\n\n  ///\n  // Reload the current page ignoring any cached data.\n  ///\n  /*--cef()--*/\n  virtual void ReloadIgnoreCache() =0;\n\n  ///\n  // Stop loading the page.\n  ///\n  /*--cef()--*/\n  virtual void StopLoad() =0;\n\n  ///\n  // Returns the globally unique identifier for this browser.\n  ///\n  /*--cef()--*/\n  virtual int GetIdentifier() =0;\n\n  ///\n  // Returns true if this object is pointing to the same handle as |that|\n  // object.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefBrowser> that) =0;\n\n  ///\n  // Returns true if the window is a popup window.\n  ///\n  /*--cef()--*/\n  virtual bool IsPopup() =0;\n\n  ///\n  // Returns true if a document has been loaded in the browser.\n  ///\n  /*--cef()--*/\n  virtual bool HasDocument() =0;\n\n  ///\n  // Returns the main (top-level) frame for the browser window.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefFrame> GetMainFrame() =0;\n\n  ///\n  // Returns the focused frame for the browser window.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefFrame> GetFocusedFrame() =0;\n\n  ///\n  // Returns the frame with the specified identifier, or NULL if not found.\n  ///\n  /*--cef(capi_name=get_frame_byident)--*/\n  virtual CefRefPtr<CefFrame> GetFrame(int64 identifier) =0;\n\n  ///\n  // Returns the frame with the specified name, or NULL if not found.\n  ///\n  /*--cef(optional_param=name)--*/\n  virtual CefRefPtr<CefFrame> GetFrame(const CefString& name) =0;\n\n  ///\n  // Returns the number of frames that currently exist.\n  ///\n  /*--cef()--*/\n  virtual size_t GetFrameCount() =0;\n\n  ///\n  // Returns the identifiers of all existing frames.\n  ///\n  /*--cef(count_func=identifiers:GetFrameCount)--*/\n  virtual void GetFrameIdentifiers(std::vector<int64>& identifiers) =0;\n\n  ///\n  // Returns the names of all existing frames.\n  ///\n  /*--cef()--*/\n  virtual void GetFrameNames(std::vector<CefString>& names) =0;\n\n  ///\n  // Send a message to the specified |target_process|. Returns true if the\n  // message was sent successfully.\n  ///\n  /*--cef()--*/\n  virtual bool SendProcessMessage(CefProcessId target_process,\n                                  CefRefPtr<CefProcessMessage> message) =0;\n};\n\n\n///\n// Callback interface for CefBrowserHost::RunFileDialog. The methods of this\n// class will be called on the browser process UI thread.\n///\n/*--cef(source=client)--*/\nclass CefRunFileDialogCallback : public virtual CefBase {\n public:\n  ///\n  // Called asynchronously after the file dialog is dismissed.\n  // |selected_accept_filter| is the 0-based index of the value selected from\n  // the accept filters array passed to CefBrowserHost::RunFileDialog.\n  // |file_paths| will be a single value or a list of values depending on the\n  // dialog mode. If the selection was cancelled |file_paths| will be empty.\n  ///\n  /*--cef(index_param=selected_accept_filter,optional_param=file_paths)--*/\n  virtual void OnFileDialogDismissed(\n      int selected_accept_filter,\n      const std::vector<CefString>& file_paths) =0;\n};\n\n\n///\n// Callback interface for CefBrowserHost::GetNavigationEntries. The methods of\n// this class will be called on the browser process UI thread.\n///\n/*--cef(source=client)--*/\nclass CefNavigationEntryVisitor : public virtual CefBase {\n public:\n  ///\n  // Method that will be executed. Do not keep a reference to |entry| outside of\n  // this callback. Return true to continue visiting entries or false to stop.\n  // |current| is true if this entry is the currently loaded navigation entry.\n  // |index| is the 0-based index of this entry and |total| is the total number\n  // of entries.\n  ///\n  /*--cef()--*/\n  virtual bool Visit(CefRefPtr<CefNavigationEntry> entry,\n                     bool current,\n                     int index,\n                     int total) =0;\n};\n\n\n///\n// Callback interface for CefBrowserHost::PrintToPDF. The methods of this class\n// will be called on the browser process UI thread.\n///\n/*--cef(source=client)--*/\nclass CefPdfPrintCallback : public virtual CefBase {\n public:\n  ///\n  // Method that will be executed when the PDF printing has completed. |path|\n  // is the output path. |ok| will be true if the printing completed\n  // successfully or false otherwise.\n  ///\n  /*--cef()--*/\n  virtual void OnPdfPrintFinished(const CefString& path, bool ok) =0;\n};\n\n\n///\n// Callback interface for CefBrowserHost::DownloadImage. The methods of this\n// class will be called on the browser process UI thread.\n///\n/*--cef(source=client)--*/\nclass CefDownloadImageCallback : public virtual CefBase {\n public:\n  ///\n  // Method that will be executed when the image download has completed.\n  // |image_url| is the URL that was downloaded and |http_status_code| is the\n  // resulting HTTP status code. |image| is the resulting image, possibly at\n  // multiple scale factors, or empty if the download failed.\n  ///\n  /*--cef(optional_param=image)--*/\n  virtual void OnDownloadImageFinished(\n     const CefString& image_url,\n     int http_status_code,\n     CefRefPtr<CefImage> image) =0;\n};\n\n\n///\n// Class used to represent the browser process aspects of a browser window. The\n// methods of this class can only be called in the browser process. They may be\n// called on any thread in that process unless otherwise indicated in the\n// comments.\n///\n/*--cef(source=library)--*/\nclass CefBrowserHost : public virtual CefBase {\n public:\n  typedef cef_drag_operations_mask_t DragOperationsMask;\n  typedef cef_file_dialog_mode_t FileDialogMode;\n  typedef cef_mouse_button_type_t MouseButtonType;\n  typedef cef_paint_element_type_t PaintElementType;\n\n  ///\n  // Create a new browser window using the window parameters specified by\n  // |windowInfo|. All values will be copied internally and the actual window\n  // will be created on the UI thread. If |request_context| is empty the\n  // global request context will be used. This method can be called on any\n  // browser process thread and will not block.\n  ///\n  /*--cef(optional_param=client,optional_param=url,\n          optional_param=request_context)--*/\n  static bool CreateBrowser(const CefWindowInfo& windowInfo,\n                            CefRefPtr<CefClient> client,\n                            const CefString& url,\n                            const CefBrowserSettings& settings,\n                            CefRefPtr<CefRequestContext> request_context);\n\n  ///\n  // Create a new browser window using the window parameters specified by\n  // |windowInfo|. If |request_context| is empty the global request context\n  // will be used. This method can only be called on the browser process UI\n  // thread.\n  ///\n  /*--cef(optional_param=client,optional_param=url,\n          optional_param=request_context)--*/\n  static CefRefPtr<CefBrowser> CreateBrowserSync(\n      const CefWindowInfo& windowInfo,\n      CefRefPtr<CefClient> client,\n      const CefString& url,\n      const CefBrowserSettings& settings,\n      CefRefPtr<CefRequestContext> request_context);\n\n  ///\n  // Returns the hosted browser object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBrowser> GetBrowser() =0;\n\n  ///\n  // Request that the browser close. The JavaScript 'onbeforeunload' event will\n  // be fired. If |force_close| is false the event handler, if any, will be\n  // allowed to prompt the user and the user can optionally cancel the close.\n  // If |force_close| is true the prompt will not be displayed and the close\n  // will proceed. Results in a call to CefLifeSpanHandler::DoClose() if the\n  // event handler allows the close or if |force_close| is true. See\n  // CefLifeSpanHandler::DoClose() documentation for additional usage\n  // information.\n  ///\n  /*--cef()--*/\n  virtual void CloseBrowser(bool force_close) =0;\n\n  ///\n  // Helper for closing a browser. Call this method from the top-level window\n  // close handler. Internally this calls CloseBrowser(false) if the close has\n  // not yet been initiated. This method returns false while the close is\n  // pending and true after the close has completed. See CloseBrowser() and\n  // CefLifeSpanHandler::DoClose() documentation for additional usage\n  // information. This method must be called on the browser process UI thread.\n  ///\n  /*--cef()--*/\n  virtual bool TryCloseBrowser() =0;\n\n  ///\n  // Set whether the browser is focused.\n  ///\n  /*--cef()--*/\n  virtual void SetFocus(bool focus) =0;\n\n  ///\n  // Retrieve the window handle for this browser. If this browser is wrapped in\n  // a CefBrowserView this method should be called on the browser process UI\n  // thread and it will return the handle for the top-level native window.\n  ///\n  /*--cef()--*/\n  virtual CefWindowHandle GetWindowHandle() =0;\n\n  ///\n  // Retrieve the window handle of the browser that opened this browser. Will\n  // return NULL for non-popup windows or if this browser is wrapped in a\n  // CefBrowserView. This method can be used in combination with custom handling\n  // of modal windows. \n  ///\n  /*--cef()--*/\n  virtual CefWindowHandle GetOpenerWindowHandle() =0;\n\n  ///\n  // Returns true if this browser is wrapped in a CefBrowserView.\n  ///\n  /*--cef()--*/\n  virtual bool HasView() =0;\n\n  ///\n  // Returns the client for this browser.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefClient> GetClient() =0;\n\n  ///\n  // Returns the request context for this browser.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefRequestContext> GetRequestContext() =0;\n\n  ///\n  // Get the current zoom level. The default zoom level is 0.0. This method can\n  // only be called on the UI thread.\n  ///\n  /*--cef()--*/\n  virtual double GetZoomLevel() =0;\n\n  ///\n  // Change the zoom level to the specified value. Specify 0.0 to reset the\n  // zoom level. If called on the UI thread the change will be applied\n  // immediately. Otherwise, the change will be applied asynchronously on the\n  // UI thread.\n  ///\n  /*--cef()--*/\n  virtual void SetZoomLevel(double zoomLevel) =0;\n\n  ///\n  // Call to run a file chooser dialog. Only a single file chooser dialog may be\n  // pending at any given time. |mode| represents the type of dialog to display.\n  // |title| to the title to be used for the dialog and may be empty to show the\n  // default title (\"Open\" or \"Save\" depending on the mode). |default_file_path|\n  // is the path with optional directory and/or file name component that will be\n  // initially selected in the dialog. |accept_filters| are used to restrict the\n  // selectable file types and may any combination of (a) valid lower-cased MIME\n  // types (e.g. \"text/*\" or \"image/*\"), (b) individual file extensions (e.g.\n  // \".txt\" or \".png\"), or (c) combined description and file extension delimited\n  // using \"|\" and \";\" (e.g. \"Image Types|.png;.gif;.jpg\").\n  // |selected_accept_filter| is the 0-based index of the filter that will be\n  // selected by default. |callback| will be executed after the dialog is\n  // dismissed or immediately if another dialog is already pending. The dialog\n  // will be initiated asynchronously on the UI thread.\n  ///\n  /*--cef(optional_param=title,optional_param=default_file_path,\n          optional_param=accept_filters,index_param=selected_accept_filter)--*/\n  virtual void RunFileDialog(FileDialogMode mode,\n                             const CefString& title,\n                             const CefString& default_file_path,\n                             const std::vector<CefString>& accept_filters,\n                             int selected_accept_filter,\n                             CefRefPtr<CefRunFileDialogCallback> callback) =0;\n\n  ///\n  // Download the file at |url| using CefDownloadHandler.\n  ///\n  /*--cef()--*/\n  virtual void StartDownload(const CefString& url) =0;\n\n  ///\n  // Download |image_url| and execute |callback| on completion with the images\n  // received from the renderer. If |is_favicon| is true then cookies are not\n  // sent and not accepted during download. Images with density independent\n  // pixel (DIP) sizes larger than |max_image_size| are filtered out from the\n  // image results. Versions of the image at different scale factors may be\n  // downloaded up to the maximum scale factor supported by the system. If there\n  // are no image results <= |max_image_size| then the smallest image is resized\n  // to |max_image_size| and is the only result. A |max_image_size| of 0 means\n  // unlimited. If |bypass_cache| is true then |image_url| is requested from the\n  // server even if it is present in the browser cache.\n  ///\n  /*--cef()--*/\n  virtual void DownloadImage(const CefString& image_url,\n                             bool is_favicon,\n                             uint32 max_image_size,\n                             bool bypass_cache,\n                             CefRefPtr<CefDownloadImageCallback> callback) =0;\n\n  ///\n  // Print the current browser contents.\n  ///\n  /*--cef()--*/\n  virtual void Print() =0;\n\n  ///\n  // Print the current browser contents to the PDF file specified by |path| and\n  // execute |callback| on completion. The caller is responsible for deleting\n  // |path| when done. For PDF printing to work on Linux you must implement the\n  // CefPrintHandler::GetPdfPaperSize method.\n  ///\n  /*--cef(optional_param=callback)--*/\n  virtual void PrintToPDF(const CefString& path,\n                          const CefPdfPrintSettings& settings,\n                          CefRefPtr<CefPdfPrintCallback> callback) =0;\n\n  ///\n  // Search for |searchText|. |identifier| can be used to have multiple searches\n  // running simultaniously. |forward| indicates whether to search forward or\n  // backward within the page. |matchCase| indicates whether the search should\n  // be case-sensitive. |findNext| indicates whether this is the first request\n  // or a follow-up. The CefFindHandler instance, if any, returned via\n  // CefClient::GetFindHandler will be called to report find results.\n  ///\n  /*--cef()--*/\n  virtual void Find(int identifier, const CefString& searchText,\n                    bool forward, bool matchCase, bool findNext) =0;\n\n  ///\n  // Cancel all searches that are currently going on.\n  ///\n  /*--cef()--*/\n  virtual void StopFinding(bool clearSelection) =0;\n\n  ///\n  // Open developer tools (DevTools) in its own browser. The DevTools browser\n  // will remain associated with this browser. If the DevTools browser is\n  // already open then it will be focused, in which case the |windowInfo|,\n  // |client| and |settings| parameters will be ignored. If |inspect_element_at|\n  // is non-empty then the element at the specified (x,y) location will be\n  // inspected. The |windowInfo| parameter will be ignored if this browser is\n  // wrapped in a CefBrowserView.\n  ///\n  /*--cef(optional_param=windowInfo,optional_param=client,\n          optional_param=settings,optional_param=inspect_element_at)--*/\n  virtual void ShowDevTools(const CefWindowInfo& windowInfo,\n                            CefRefPtr<CefClient> client,\n                            const CefBrowserSettings& settings,\n                            const CefPoint& inspect_element_at) =0;\n\n  ///\n  // Explicitly close the associated DevTools browser, if any.\n  ///\n  /*--cef()--*/\n  virtual void CloseDevTools() =0;\n\n  ///\n  // Returns true if this browser currently has an associated DevTools browser.\n  // Must be called on the browser process UI thread.\n  ///\n  /*--cef()--*/\n  virtual bool HasDevTools() =0;\n\n  ///\n  // Retrieve a snapshot of current navigation entries as values sent to the\n  // specified visitor. If |current_only| is true only the current navigation\n  // entry will be sent, otherwise all navigation entries will be sent.\n  ///\n  /*--cef()--*/\n  virtual void GetNavigationEntries(\n      CefRefPtr<CefNavigationEntryVisitor> visitor,\n      bool current_only) =0;\n\n  ///\n  // Set whether mouse cursor change is disabled.\n  ///\n  /*--cef()--*/\n  virtual void SetMouseCursorChangeDisabled(bool disabled) =0;\n\n  ///\n  // Returns true if mouse cursor change is disabled.\n  ///\n  /*--cef()--*/\n  virtual bool IsMouseCursorChangeDisabled() =0;\n\n  ///\n  // If a misspelled word is currently selected in an editable node calling\n  // this method will replace it with the specified |word|.\n  ///\n  /*--cef()--*/\n  virtual void ReplaceMisspelling(const CefString& word) =0;\n\n  ///\n  // Add the specified |word| to the spelling dictionary.\n  ///\n  /*--cef()--*/\n  virtual void AddWordToDictionary(const CefString& word) =0;\n\n  ///\n  // Returns true if window rendering is disabled.\n  ///\n  /*--cef()--*/\n  virtual bool IsWindowRenderingDisabled() =0;\n\n  ///\n  // Notify the browser that the widget has been resized. The browser will first\n  // call CefRenderHandler::GetViewRect to get the new size and then call\n  // CefRenderHandler::OnPaint asynchronously with the updated regions. This\n  // method is only used when window rendering is disabled.\n  ///\n  /*--cef()--*/\n  virtual void WasResized() =0;\n\n  ///\n  // Notify the browser that it has been hidden or shown. Layouting and\n  // CefRenderHandler::OnPaint notification will stop when the browser is\n  // hidden. This method is only used when window rendering is disabled.\n  ///\n  /*--cef()--*/\n  virtual void WasHidden(bool hidden) =0;\n\n  ///\n  // Send a notification to the browser that the screen info has changed. The\n  // browser will then call CefRenderHandler::GetScreenInfo to update the\n  // screen information with the new values. This simulates moving the webview\n  // window from one display to another, or changing the properties of the\n  // current display. This method is only used when window rendering is\n  // disabled.\n  ///\n  /*--cef()--*/\n  virtual void NotifyScreenInfoChanged() =0;\n\n  ///\n  // Invalidate the view. The browser will call CefRenderHandler::OnPaint\n  // asynchronously. This method is only used when window rendering is\n  // disabled.\n  ///\n  /*--cef()--*/\n  virtual void Invalidate(PaintElementType type) =0;\n\n  ///\n  // Send a key event to the browser.\n  ///\n  /*--cef()--*/\n  virtual void SendKeyEvent(const CefKeyEvent& event) =0;\n\n  ///\n  // Send a mouse click event to the browser. The |x| and |y| coordinates are\n  // relative to the upper-left corner of the view.\n  ///\n  /*--cef()--*/\n  virtual void SendMouseClickEvent(const CefMouseEvent& event,\n                                   MouseButtonType type,\n                                   bool mouseUp, int clickCount) =0;\n\n  ///\n  // Send a mouse move event to the browser. The |x| and |y| coordinates are\n  // relative to the upper-left corner of the view.\n  ///\n  /*--cef()--*/\n  virtual void SendMouseMoveEvent(const CefMouseEvent& event,\n                                  bool mouseLeave) =0;\n\n  ///\n  // Send a mouse wheel event to the browser. The |x| and |y| coordinates are\n  // relative to the upper-left corner of the view. The |deltaX| and |deltaY|\n  // values represent the movement delta in the X and Y directions respectively.\n  // In order to scroll inside select popups with window rendering disabled\n  // CefRenderHandler::GetScreenPoint should be implemented properly.\n  ///\n  /*--cef()--*/\n  virtual void SendMouseWheelEvent(const CefMouseEvent& event,\n                                   int deltaX, int deltaY) =0;\n\n  ///\n  // Send a focus event to the browser.\n  ///\n  /*--cef()--*/\n  virtual void SendFocusEvent(bool setFocus) =0;\n\n  ///\n  // Send a capture lost event to the browser.\n  ///\n  /*--cef()--*/\n  virtual void SendCaptureLostEvent() =0;\n\n  ///\n  // Notify the browser that the window hosting it is about to be moved or\n  // resized. This method is only used on Windows and Linux.\n  ///\n  /*--cef()--*/\n  virtual void NotifyMoveOrResizeStarted() =0;\n\n  ///\n  // Returns the maximum rate in frames per second (fps) that CefRenderHandler::\n  // OnPaint will be called for a windowless browser. The actual fps may be\n  // lower if the browser cannot generate frames at the requested rate. The\n  // minimum value is 1 and the maximum value is 60 (default 30). This method\n  // can only be called on the UI thread.\n  ///\n  /*--cef()--*/\n  virtual int GetWindowlessFrameRate() =0;\n\n  ///\n  // Set the maximum rate in frames per second (fps) that CefRenderHandler::\n  // OnPaint will be called for a windowless browser. The actual fps may be\n  // lower if the browser cannot generate frames at the requested rate. The\n  // minimum value is 1 and the maximum value is 60 (default 30). Can also be\n  // set at browser creation via CefBrowserSettings.windowless_frame_rate.\n  ///\n  /*--cef()--*/\n  virtual void SetWindowlessFrameRate(int frame_rate) =0;\n\n  ///\n  // Get the NSTextInputContext implementation for enabling IME on Mac when\n  // window rendering is disabled.\n  ///\n  /*--cef(default_retval=NULL)--*/\n  virtual CefTextInputContext GetNSTextInputContext() =0;\n\n  ///\n  // Handles a keyDown event prior to passing it through the NSTextInputClient\n  // machinery.\n  ///\n  /*--cef()--*/\n  virtual void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent) =0;\n\n  ///\n  // Performs any additional actions after NSTextInputClient handles the event.\n  ///\n  /*--cef()--*/\n  virtual void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent) =0;\n\n  ///\n  // Call this method when the user drags the mouse into the web view (before\n  // calling DragTargetDragOver/DragTargetLeave/DragTargetDrop).\n  // |drag_data| should not contain file contents as this type of data is not\n  // allowed to be dragged into the web view. File contents can be removed using\n  // CefDragData::ResetFileContents (for example, if |drag_data| comes from\n  // CefRenderHandler::StartDragging).\n  // This method is only used when window rendering is disabled.\n  ///\n  /*--cef()--*/\n  virtual void DragTargetDragEnter(CefRefPtr<CefDragData> drag_data,\n                                  const CefMouseEvent& event,\n                                  DragOperationsMask allowed_ops) =0;\n\n  ///\n  // Call this method each time the mouse is moved across the web view during\n  // a drag operation (after calling DragTargetDragEnter and before calling\n  // DragTargetDragLeave/DragTargetDrop).\n  // This method is only used when window rendering is disabled.\n  ///\n  /*--cef()--*/\n  virtual void DragTargetDragOver(const CefMouseEvent& event,\n                                  DragOperationsMask allowed_ops) =0;\n\n  ///\n  // Call this method when the user drags the mouse out of the web view (after\n  // calling DragTargetDragEnter).\n  // This method is only used when window rendering is disabled.\n  ///\n  /*--cef()--*/\n  virtual void DragTargetDragLeave() =0;\n\n  ///\n  // Call this method when the user completes the drag operation by dropping\n  // the object onto the web view (after calling DragTargetDragEnter).\n  // The object being dropped is |drag_data|, given as an argument to\n  // the previous DragTargetDragEnter call.\n  // This method is only used when window rendering is disabled.\n  ///\n  /*--cef()--*/\n  virtual void DragTargetDrop(const CefMouseEvent& event) =0;\n\n  ///\n  // Call this method when the drag operation started by a\n  // CefRenderHandler::StartDragging call has ended either in a drop or\n  // by being cancelled. |x| and |y| are mouse coordinates relative to the\n  // upper-left corner of the view. If the web view is both the drag source\n  // and the drag target then all DragTarget* methods should be called before\n  // DragSource* mthods.\n  // This method is only used when window rendering is disabled.\n  ///\n  /*--cef()--*/\n  virtual void DragSourceEndedAt(int x, int y, DragOperationsMask op) =0;\n\n  ///\n  // Call this method when the drag operation started by a\n  // CefRenderHandler::StartDragging call has completed. This method may be\n  // called immediately without first calling DragSourceEndedAt to cancel a\n  // drag operation. If the web view is both the drag source and the drag\n  // target then all DragTarget* methods should be called before DragSource*\n  // mthods.\n  // This method is only used when window rendering is disabled.\n  ///\n  /*--cef()--*/\n  virtual void DragSourceSystemDragEnded() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_BROWSER_H_\n"
  },
  {
    "path": "CEF/include/cef_browser_process_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_BROWSER_PROCESS_HANDLER_H_\n#define CEF_INCLUDE_CEF_BROWSER_PROCESS_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_command_line.h\"\n#include \"include/cef_print_handler.h\"\n#include \"include/cef_values.h\"\n\n///\n// Class used to implement browser process callbacks. The methods of this class\n// will be called on the browser process main thread unless otherwise indicated.\n///\n/*--cef(source=client)--*/\nclass CefBrowserProcessHandler : public virtual CefBase {\n public:\n  ///\n  // Called on the browser process UI thread immediately after the CEF context\n  // has been initialized.\n  ///\n  /*--cef()--*/\n  virtual void OnContextInitialized() {}\n\n  ///\n  // Called before a child process is launched. Will be called on the browser\n  // process UI thread when launching a render process and on the browser\n  // process IO thread when launching a GPU or plugin process. Provides an\n  // opportunity to modify the child process command line. Do not keep a\n  // reference to |command_line| outside of this method.\n  ///\n  /*--cef()--*/\n  virtual void OnBeforeChildProcessLaunch(\n      CefRefPtr<CefCommandLine> command_line) {}\n\n  ///\n  // Called on the browser process IO thread after the main thread has been\n  // created for a new render process. Provides an opportunity to specify extra\n  // information that will be passed to\n  // CefRenderProcessHandler::OnRenderThreadCreated() in the render process. Do\n  // not keep a reference to |extra_info| outside of this method.\n  ///\n  /*--cef()--*/\n  virtual void OnRenderProcessThreadCreated(\n      CefRefPtr<CefListValue> extra_info) {}\n\n  ///\n  // Return the handler for printing on Linux. If a print handler is not\n  // provided then printing will not be supported on the Linux platform.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefPrintHandler> GetPrintHandler() {\n    return NULL;\n  }\n};\n\n#endif  // CEF_INCLUDE_CEF_BROWSER_PROCESS_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_callback.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_CALLBACK_H_\n#define CEF_INCLUDE_CEF_CALLBACK_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\n///\n// Generic callback interface used for asynchronous continuation.\n///\n/*--cef(source=library)--*/\nclass CefCallback : public virtual CefBase {\n public:\n  ///\n  // Continue processing.\n  ///\n  /*--cef(capi_name=cont)--*/\n  virtual void Continue() =0;\n\n  ///\n  // Cancel processing.\n  ///\n  /*--cef()--*/\n  virtual void Cancel() =0;\n};\n\n///\n// Generic callback interface used for asynchronous completion.\n///\n/*--cef(source=client)--*/\nclass CefCompletionCallback : public virtual CefBase {\n public:\n  ///\n  // Method that will be called once the task is complete.\n  ///\n  /*--cef()--*/\n  virtual void OnComplete() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_CALLBACK_H_\n"
  },
  {
    "path": "CEF/include/cef_client.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_CLIENT_H_\n#define CEF_INCLUDE_CEF_CLIENT_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_context_menu_handler.h\"\n#include \"include/cef_dialog_handler.h\"\n#include \"include/cef_display_handler.h\"\n#include \"include/cef_download_handler.h\"\n#include \"include/cef_drag_handler.h\"\n#include \"include/cef_find_handler.h\"\n#include \"include/cef_focus_handler.h\"\n#include \"include/cef_geolocation_handler.h\"\n#include \"include/cef_jsdialog_handler.h\"\n#include \"include/cef_keyboard_handler.h\"\n#include \"include/cef_life_span_handler.h\"\n#include \"include/cef_load_handler.h\"\n#include \"include/cef_process_message.h\"\n#include \"include/cef_render_handler.h\"\n#include \"include/cef_request_handler.h\"\n\n///\n// Implement this interface to provide handler implementations.\n///\n/*--cef(source=client,no_debugct_check)--*/\nclass CefClient : public virtual CefBase {\n public:\n  ///\n  // Return the handler for context menus. If no handler is provided the default\n  // implementation will be used.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for dialogs. If no handler is provided the default\n  // implementation will be used.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDialogHandler> GetDialogHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for browser display state events.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for download events. If no handler is returned downloads\n  // will not be allowed.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDownloadHandler> GetDownloadHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for drag events.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDragHandler> GetDragHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for find result events.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefFindHandler> GetFindHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for focus events.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefFocusHandler> GetFocusHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for geolocation permissions requests. If no handler is\n  // provided geolocation access will be denied by default.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefGeolocationHandler> GetGeolocationHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for JavaScript dialogs. If no handler is provided the\n  // default implementation will be used.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for keyboard events.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for browser life span events.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for browser load status events.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefLoadHandler> GetLoadHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for off-screen rendering events.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefRenderHandler> GetRenderHandler() {\n    return NULL;\n  }\n\n  ///\n  // Return the handler for browser request events.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefRequestHandler> GetRequestHandler() {\n    return NULL;\n  }\n\n  ///\n  // Called when a new message is received from a different process. Return true\n  // if the message was handled or false otherwise. Do not keep a reference to\n  // or attempt to access the message outside of this callback.\n  ///\n  /*--cef()--*/\n  virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,\n                                        CefProcessId source_process,\n                                        CefRefPtr<CefProcessMessage> message) {\n    return false;\n  }\n};\n\n#endif  // CEF_INCLUDE_CEF_CLIENT_H_\n"
  },
  {
    "path": "CEF/include/cef_command_line.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_COMMAND_LINE_H_\n#define CEF_INCLUDE_CEF_COMMAND_LINE_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include <map>\n#include <vector>\n\n///\n// Class used to create and/or parse command line arguments. Arguments with\n// '--', '-' and, on Windows, '/' prefixes are considered switches. Switches\n// will always precede any arguments without switch prefixes. Switches can\n// optionally have a value specified using the '=' delimiter (e.g.\n// \"-switch=value\"). An argument of \"--\" will terminate switch parsing with all\n// subsequent tokens, regardless of prefix, being interpreted as non-switch\n// arguments. Switch names are considered case-insensitive. This class can be\n// used before CefInitialize() is called.\n///\n/*--cef(source=library,no_debugct_check)--*/\nclass CefCommandLine : public virtual CefBase {\n public:\n  typedef std::vector<CefString> ArgumentList;\n  typedef std::map<CefString, CefString> SwitchMap;\n\n  ///\n  // Create a new CefCommandLine instance.\n  ///\n  /*--cef(api_hash_check)--*/\n  static CefRefPtr<CefCommandLine> CreateCommandLine();\n\n  ///\n  // Returns the singleton global CefCommandLine object. The returned object\n  // will be read-only.\n  ///\n  /*--cef(api_hash_check)--*/\n  static CefRefPtr<CefCommandLine> GetGlobalCommandLine();\n\n  ///\n  // Returns true if this object is valid. Do not call any other methods if this\n  // function returns false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns true if the values of this object are read-only. Some APIs may\n  // expose read-only objects.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Returns a writable copy of this object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefCommandLine> Copy() =0;\n\n  ///\n  // Initialize the command line with the specified |argc| and |argv| values.\n  // The first argument must be the name of the program. This method is only\n  // supported on non-Windows platforms.\n  ///\n  /*--cef()--*/\n  virtual void InitFromArgv(int argc, const char* const* argv) =0;\n\n  ///\n  // Initialize the command line with the string returned by calling\n  // GetCommandLineW(). This method is only supported on Windows.\n  ///\n  /*--cef()--*/\n  virtual void InitFromString(const CefString& command_line) =0;\n\n  ///\n  // Reset the command-line switches and arguments but leave the program\n  // component unchanged.\n  ///\n  /*--cef()--*/\n  virtual void Reset() =0;\n\n  ///\n  // Retrieve the original command line string as a vector of strings.\n  // The argv array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* }\n  ///\n  /*--cef()--*/\n  virtual void GetArgv(std::vector<CefString>& argv) =0;\n\n  ///\n  // Constructs and returns the represented command line string. Use this method\n  // cautiously because quoting behavior is unclear.\n  ///\n  /*--cef()--*/\n  virtual CefString GetCommandLineString() =0;\n\n  ///\n  // Get the program part of the command line string (the first item).\n  ///\n  /*--cef()--*/\n  virtual CefString GetProgram() =0;\n\n  ///\n  // Set the program part of the command line string (the first item).\n  ///\n  /*--cef()--*/\n  virtual void SetProgram(const CefString& program) =0;\n\n  ///\n  // Returns true if the command line has switches.\n  ///\n  /*--cef()--*/\n  virtual bool HasSwitches() =0;\n\n  ///\n  // Returns true if the command line contains the given switch.\n  ///\n  /*--cef()--*/\n  virtual bool HasSwitch(const CefString& name) =0;\n\n  ///\n  // Returns the value associated with the given switch. If the switch has no\n  // value or isn't present this method returns the empty string.\n  ///\n  /*--cef()--*/\n  virtual CefString GetSwitchValue(const CefString& name) =0;\n\n  ///\n  // Returns the map of switch names and values. If a switch has no value an\n  // empty string is returned.\n  ///\n  /*--cef()--*/\n  virtual void GetSwitches(SwitchMap& switches) =0;\n\n  ///\n  // Add a switch to the end of the command line. If the switch has no value\n  // pass an empty value string.\n  ///\n  /*--cef()--*/\n  virtual void AppendSwitch(const CefString& name) =0;\n\n  ///\n  // Add a switch with the specified value to the end of the command line.\n  ///\n  /*--cef()--*/\n  virtual void AppendSwitchWithValue(const CefString& name,\n                                     const CefString& value) =0;\n\n  ///\n  // True if there are remaining command line arguments.\n  ///\n  /*--cef()--*/\n  virtual bool HasArguments() =0;\n\n  ///\n  // Get the remaining command line arguments.\n  ///\n  /*--cef()--*/\n  virtual void GetArguments(ArgumentList& arguments) =0;\n\n  ///\n  // Add an argument to the end of the command line.\n  ///\n  /*--cef()--*/\n  virtual void AppendArgument(const CefString& argument) =0;\n\n  ///\n  // Insert a command before the current command.\n  // Common for debuggers, like \"valgrind\" or \"gdb --args\".\n  ///\n  /*--cef()--*/\n  virtual void PrependWrapper(const CefString& wrapper) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_COMMAND_LINE_H_\n"
  },
  {
    "path": "CEF/include/cef_context_menu_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_CONTEXT_MENU_HANDLER_H_\n#define CEF_INCLUDE_CEF_CONTEXT_MENU_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_frame.h\"\n#include \"include/cef_menu_model.h\"\n\nclass CefContextMenuParams;\n\n\n///\n// Callback interface used for continuation of custom context menu display.\n///\n/*--cef(source=library)--*/\nclass CefRunContextMenuCallback : public virtual CefBase {\n public:\n  typedef cef_event_flags_t EventFlags;\n\n  ///\n  // Complete context menu display by selecting the specified |command_id| and\n  // |event_flags|.\n  ///\n  /*--cef(capi_name=cont)--*/\n  virtual void Continue(int command_id, EventFlags event_flags) =0;\n\n  ///\n  // Cancel context menu display.\n  ///\n  /*--cef()--*/\n  virtual void Cancel() =0;\n};\n\n\n///\n// Implement this interface to handle context menu events. The methods of this\n// class will be called on the UI thread.\n///\n/*--cef(source=client)--*/\nclass CefContextMenuHandler : public virtual CefBase {\n public:\n  typedef cef_event_flags_t EventFlags;\n\n  ///\n  // Called before a context menu is displayed. |params| provides information\n  // about the context menu state. |model| initially contains the default\n  // context menu. The |model| can be cleared to show no context menu or\n  // modified to show a custom menu. Do not keep references to |params| or\n  // |model| outside of this callback.\n  ///\n  /*--cef()--*/\n  virtual void OnBeforeContextMenu(CefRefPtr<CefBrowser> browser,\n                                   CefRefPtr<CefFrame> frame,\n                                   CefRefPtr<CefContextMenuParams> params,\n                                   CefRefPtr<CefMenuModel> model) {}\n\n  ///\n  // Called to allow custom display of the context menu. |params| provides\n  // information about the context menu state. |model| contains the context menu\n  // model resulting from OnBeforeContextMenu. For custom display return true\n  // and execute |callback| either synchronously or asynchronously with the\n  // selected command ID. For default display return false. Do not keep\n  // references to |params| or |model| outside of this callback.\n  ///\n  /*--cef()--*/\n  virtual bool RunContextMenu(CefRefPtr<CefBrowser> browser,\n                              CefRefPtr<CefFrame> frame,\n                              CefRefPtr<CefContextMenuParams> params,\n                              CefRefPtr<CefMenuModel> model,\n                              CefRefPtr<CefRunContextMenuCallback> callback) {\n    return false;\n  }\n\n  ///\n  // Called to execute a command selected from the context menu. Return true if\n  // the command was handled or false for the default implementation. See\n  // cef_menu_id_t for the command ids that have default implementations. All\n  // user-defined command ids should be between MENU_ID_USER_FIRST and\n  // MENU_ID_USER_LAST. |params| will have the same values as what was passed to\n  // OnBeforeContextMenu(). Do not keep a reference to |params| outside of this\n  // callback.\n  ///\n  /*--cef()--*/\n  virtual bool OnContextMenuCommand(CefRefPtr<CefBrowser> browser,\n                                    CefRefPtr<CefFrame> frame,\n                                    CefRefPtr<CefContextMenuParams> params,\n                                    int command_id,\n                                    EventFlags event_flags) { return false; }\n\n  ///\n  // Called when the context menu is dismissed irregardless of whether the menu\n  // was empty or a command was selected.\n  ///\n  /*--cef()--*/\n  virtual void OnContextMenuDismissed(CefRefPtr<CefBrowser> browser,\n                                      CefRefPtr<CefFrame> frame) {}\n};\n\n\n///\n// Provides information about the context menu state. The ethods of this class\n// can only be accessed on browser process the UI thread.\n///\n/*--cef(source=library)--*/\nclass CefContextMenuParams : public virtual CefBase {\n public:\n  typedef cef_context_menu_type_flags_t TypeFlags;\n  typedef cef_context_menu_media_type_t MediaType;\n  typedef cef_context_menu_media_state_flags_t MediaStateFlags;\n  typedef cef_context_menu_edit_state_flags_t EditStateFlags;\n\n  ///\n  // Returns the X coordinate of the mouse where the context menu was invoked.\n  // Coords are relative to the associated RenderView's origin.\n  ///\n  /*--cef()--*/\n  virtual int GetXCoord() =0;\n\n  ///\n  // Returns the Y coordinate of the mouse where the context menu was invoked.\n  // Coords are relative to the associated RenderView's origin.\n  ///\n  /*--cef()--*/\n  virtual int GetYCoord() =0;\n\n  ///\n  // Returns flags representing the type of node that the context menu was\n  // invoked on.\n  ///\n  /*--cef(default_retval=CM_TYPEFLAG_NONE)--*/\n  virtual TypeFlags GetTypeFlags() =0;\n\n  ///\n  // Returns the URL of the link, if any, that encloses the node that the\n  // context menu was invoked on.\n  ///\n  /*--cef()--*/\n  virtual CefString GetLinkUrl() =0;\n\n  ///\n  // Returns the link URL, if any, to be used ONLY for \"copy link address\". We\n  // don't validate this field in the frontend process.\n  ///\n  /*--cef()--*/\n  virtual CefString GetUnfilteredLinkUrl() =0;\n\n  ///\n  // Returns the source URL, if any, for the element that the context menu was\n  // invoked on. Example of elements with source URLs are img, audio, and video.\n  ///\n  /*--cef()--*/\n  virtual CefString GetSourceUrl() =0;\n\n  ///\n  // Returns true if the context menu was invoked on an image which has\n  // non-empty contents.\n  ///\n  /*--cef()--*/\n  virtual bool HasImageContents() =0;\n\n  ///\n  // Returns the URL of the top level page that the context menu was invoked on.\n  ///\n  /*--cef()--*/\n  virtual CefString GetPageUrl() =0;\n\n  ///\n  // Returns the URL of the subframe that the context menu was invoked on.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFrameUrl() =0;\n\n  ///\n  // Returns the character encoding of the subframe that the context menu was\n  // invoked on.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFrameCharset() =0;\n\n  ///\n  // Returns the type of context node that the context menu was invoked on.\n  ///\n  /*--cef(default_retval=CM_MEDIATYPE_NONE)--*/\n  virtual MediaType GetMediaType() =0;\n\n  ///\n  // Returns flags representing the actions supported by the media element, if\n  // any, that the context menu was invoked on.\n  ///\n  /*--cef(default_retval=CM_MEDIAFLAG_NONE)--*/\n  virtual MediaStateFlags GetMediaStateFlags() =0;\n\n  ///\n  // Returns the text of the selection, if any, that the context menu was\n  // invoked on.\n  ///\n  /*--cef()--*/\n  virtual CefString GetSelectionText() =0;\n\n  ///\n  // Returns the text of the misspelled word, if any, that the context menu was\n  // invoked on.\n  ///\n  /*--cef()--*/\n  virtual CefString GetMisspelledWord() =0;\n\n  ///\n  // Returns true if suggestions exist, false otherwise. Fills in |suggestions|\n  // from the spell check service for the misspelled word if there is one.\n  ///\n  /*--cef()--*/\n  virtual bool GetDictionarySuggestions(std::vector<CefString>& suggestions) =0;\n\n  ///\n  // Returns true if the context menu was invoked on an editable node.\n  ///\n  /*--cef()--*/\n  virtual bool IsEditable() =0;\n\n  ///\n  // Returns true if the context menu was invoked on an editable node where\n  // spell-check is enabled.\n  ///\n  /*--cef()--*/\n  virtual bool IsSpellCheckEnabled() =0;\n\n  ///\n  // Returns flags representing the actions supported by the editable node, if\n  // any, that the context menu was invoked on.\n  ///\n  /*--cef(default_retval=CM_EDITFLAG_NONE)--*/\n  virtual EditStateFlags GetEditStateFlags() =0;\n\n  ///\n  // Returns true if the context menu contains items specified by the renderer\n  // process (for example, plugin placeholder or pepper plugin menu items).\n  ///\n  /*--cef()--*/\n  virtual bool IsCustomMenu() =0;\n\n  ///\n  // Returns true if the context menu was invoked from a pepper plugin.\n  ///\n  /*--cef()--*/\n  virtual bool IsPepperMenu() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_CONTEXT_MENU_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_cookie.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_COOKIE_H_\n#define CEF_INCLUDE_CEF_COOKIE_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_callback.h\"\n#include <vector>\n\nclass CefCookieVisitor;\nclass CefSetCookieCallback;\nclass CefDeleteCookiesCallback;\n\n///\n// Class used for managing cookies. The methods of this class may be called on\n// any thread unless otherwise indicated.\n///\n/*--cef(source=library,no_debugct_check)--*/\nclass CefCookieManager : public virtual CefBase {\n public:\n  ///\n  // Returns the global cookie manager. By default data will be stored at\n  // CefSettings.cache_path if specified or in memory otherwise. If |callback|\n  // is non-NULL it will be executed asnychronously on the IO thread after the\n  // manager's storage has been initialized. Using this method is equivalent to\n  // calling CefRequestContext::GetGlobalContext()->GetDefaultCookieManager().\n  ///\n  /*--cef(optional_param=callback)--*/\n  static CefRefPtr<CefCookieManager> GetGlobalManager(\n      CefRefPtr<CefCompletionCallback> callback);\n\n  ///\n  // Creates a new cookie manager. If |path| is empty data will be stored in\n  // memory only. Otherwise, data will be stored at the specified |path|. To\n  // persist session cookies (cookies without an expiry date or validity\n  // interval) set |persist_session_cookies| to true. Session cookies are\n  // generally intended to be transient and most Web browsers do not persist\n  // them. If |callback| is non-NULL it will be executed asnychronously on the\n  // IO thread after the manager's storage has been initialized.\n  ///\n  /*--cef(optional_param=path,optional_param=callback)--*/\n  static CefRefPtr<CefCookieManager> CreateManager(\n      const CefString& path,\n      bool persist_session_cookies,\n      CefRefPtr<CefCompletionCallback> callback);\n\n  ///\n  // Set the schemes supported by this manager. The default schemes (\"http\",\n  // \"https\", \"ws\" and \"wss\") will always be supported. If |callback| is non-\n  // NULL it will be executed asnychronously on the IO thread after the change\n  // has been applied. Must be called before any cookies are accessed.\n  ///\n  /*--cef(optional_param=callback)--*/\n  virtual void SetSupportedSchemes(\n      const std::vector<CefString>& schemes,\n      CefRefPtr<CefCompletionCallback> callback) =0;\n\n  ///\n  // Visit all cookies on the IO thread. The returned cookies are ordered by\n  // longest path, then by earliest creation date. Returns false if cookies\n  // cannot be accessed.\n  ///\n  /*--cef()--*/\n  virtual bool VisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) =0;\n\n  ///\n  // Visit a subset of cookies on the IO thread. The results are filtered by the\n  // given url scheme, host, domain and path. If |includeHttpOnly| is true\n  // HTTP-only cookies will also be included in the results. The returned\n  // cookies are ordered by longest path, then by earliest creation date.\n  // Returns false if cookies cannot be accessed.\n  ///\n  /*--cef()--*/\n  virtual bool VisitUrlCookies(const CefString& url,\n                               bool includeHttpOnly,\n                               CefRefPtr<CefCookieVisitor> visitor) =0;\n\n  ///\n  // Sets a cookie given a valid URL and explicit user-provided cookie\n  // attributes. This function expects each attribute to be well-formed. It will\n  // check for disallowed characters (e.g. the ';' character is disallowed\n  // within the cookie value attribute) and fail without setting the cookie if\n  // such characters are found. If |callback| is non-NULL it will be executed\n  // asnychronously on the IO thread after the cookie has been set. Returns\n  // false if an invalid URL is specified or if cookies cannot be accessed.\n  ///\n  /*--cef(optional_param=callback)--*/\n  virtual bool SetCookie(const CefString& url,\n                         const CefCookie& cookie,\n                         CefRefPtr<CefSetCookieCallback> callback) =0;\n\n  ///\n  // Delete all cookies that match the specified parameters. If both |url| and\n  // |cookie_name| values are specified all host and domain cookies matching\n  // both will be deleted. If only |url| is specified all host cookies (but not\n  // domain cookies) irrespective of path will be deleted. If |url| is empty all\n  // cookies for all hosts and domains will be deleted. If |callback| is\n  // non-NULL it will be executed asnychronously on the IO thread after the\n  // cookies have been deleted. Returns false if a non-empty invalid URL is\n  // specified or if cookies cannot be accessed. Cookies can alternately be\n  // deleted using the Visit*Cookies() methods.\n  ///\n  /*--cef(optional_param=url,optional_param=cookie_name,\n          optional_param=callback)--*/\n  virtual bool DeleteCookies(const CefString& url,\n                             const CefString& cookie_name,\n                             CefRefPtr<CefDeleteCookiesCallback> callback) =0;\n\n  ///\n  // Sets the directory path that will be used for storing cookie data. If\n  // |path| is empty data will be stored in memory only. Otherwise, data will be\n  // stored at the specified |path|. To persist session cookies (cookies without\n  // an expiry date or validity interval) set |persist_session_cookies| to true.\n  // Session cookies are generally intended to be transient and most Web\n  // browsers do not persist them. If |callback| is non-NULL it will be executed\n  // asnychronously on the IO thread after the manager's storage has been\n  // initialized. Returns false if cookies cannot be accessed.\n  ///\n  /*--cef(optional_param=path,optional_param=callback)--*/\n  virtual bool SetStoragePath(const CefString& path,\n                              bool persist_session_cookies,\n                              CefRefPtr<CefCompletionCallback> callback) =0;\n\n  ///\n  // Flush the backing store (if any) to disk. If |callback| is non-NULL it will\n  // be executed asnychronously on the IO thread after the flush is complete.\n  // Returns false if cookies cannot be accessed.\n  ///\n  /*--cef(optional_param=callback)--*/\n  virtual bool FlushStore(CefRefPtr<CefCompletionCallback> callback) =0;\n};\n\n\n///\n// Interface to implement for visiting cookie values. The methods of this class\n// will always be called on the IO thread.\n///\n/*--cef(source=client)--*/\nclass CefCookieVisitor : public virtual CefBase {\n public:\n  ///\n  // Method that will be called once for each cookie. |count| is the 0-based\n  // index for the current cookie. |total| is the total number of cookies.\n  // Set |deleteCookie| to true to delete the cookie currently being visited.\n  // Return false to stop visiting cookies. This method may never be called if\n  // no cookies are found.\n  ///\n  /*--cef()--*/\n  virtual bool Visit(const CefCookie& cookie, int count, int total,\n                     bool& deleteCookie) =0;\n};\n\n\n///\n// Interface to implement to be notified of asynchronous completion via\n// CefCookieManager::SetCookie().\n///\n/*--cef(source=client)--*/\nclass CefSetCookieCallback : public virtual CefBase {\n public:\n  ///\n  // Method that will be called upon completion. |success| will be true if the\n  // cookie was set successfully.\n  ///\n  /*--cef()--*/\n  virtual void OnComplete(bool success) =0;\n};\n\n\n///\n// Interface to implement to be notified of asynchronous completion via\n// CefCookieManager::DeleteCookies().\n///\n/*--cef(source=client)--*/\nclass CefDeleteCookiesCallback : public virtual CefBase {\n public:\n  ///\n  // Method that will be called upon completion. |num_deleted| will be the\n  // number of cookies that were deleted or -1 if unknown.\n  ///\n  /*--cef()--*/\n  virtual void OnComplete(int num_deleted) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_COOKIE_H_\n"
  },
  {
    "path": "CEF/include/cef_dialog_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_DIALOG_HANDLER_H_\n#define CEF_INCLUDE_CEF_DIALOG_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n\n///\n// Callback interface for asynchronous continuation of file dialog requests.\n///\n/*--cef(source=library)--*/\nclass CefFileDialogCallback : public virtual CefBase {\n public:\n  ///\n  // Continue the file selection. |selected_accept_filter| should be the 0-based\n  // index of the value selected from the accept filters array passed to\n  // CefDialogHandler::OnFileDialog. |file_paths| should be a single value or a\n  // list of values depending on the dialog mode. An empty |file_paths| value is\n  // treated the same as calling Cancel().\n  ///\n  /*--cef(capi_name=cont,index_param=selected_accept_filter,\n          optional_param=file_paths)--*/\n  virtual void Continue(int selected_accept_filter,\n                        const std::vector<CefString>& file_paths) =0;\n\n  ///\n  // Cancel the file selection.\n  ///\n  /*--cef()--*/\n  virtual void Cancel() =0;\n};\n\n\n///\n// Implement this interface to handle dialog events. The methods of this class\n// will be called on the browser process UI thread.\n///\n/*--cef(source=client)--*/\nclass CefDialogHandler : public virtual CefBase {\n public:\n  typedef cef_file_dialog_mode_t FileDialogMode;\n\n  ///\n  // Called to run a file chooser dialog. |mode| represents the type of dialog\n  // to display. |title| to the title to be used for the dialog and may be empty\n  // to show the default title (\"Open\" or \"Save\" depending on the mode).\n  // |default_file_path| is the path with optional directory and/or file name\n  // component that should be initially selected in the dialog. |accept_filters|\n  // are used to restrict the selectable file types and may any combination of\n  // (a) valid lower-cased MIME types (e.g. \"text/*\" or \"image/*\"),\n  // (b) individual file extensions (e.g. \".txt\" or \".png\"), or (c) combined\n  // description and file extension delimited using \"|\" and \";\" (e.g.\n  // \"Image Types|.png;.gif;.jpg\"). |selected_accept_filter| is the 0-based\n  // index of the filter that should be selected by default. To display a custom\n  // dialog return true and execute |callback| either inline or at a later time.\n  // To display the default dialog return false.\n  ///\n  /*--cef(optional_param=title,optional_param=default_file_path,\n          optional_param=accept_filters,index_param=selected_accept_filter)--*/\n  virtual bool OnFileDialog(CefRefPtr<CefBrowser> browser,\n                            FileDialogMode mode,\n                            const CefString& title,\n                            const CefString& default_file_path,\n                            const std::vector<CefString>& accept_filters,\n                            int selected_accept_filter,\n                            CefRefPtr<CefFileDialogCallback> callback) {\n    return false;\n  }\n};\n\n#endif  // CEF_INCLUDE_CEF_DIALOG_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_display_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_\n#define CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_frame.h\"\n\n///\n// Implement this interface to handle events related to browser display state.\n// The methods of this class will be called on the UI thread.\n///\n/*--cef(source=client)--*/\nclass CefDisplayHandler : public virtual CefBase {\n public:\n  ///\n  // Called when a frame's address has changed.\n  ///\n  /*--cef()--*/\n  virtual void OnAddressChange(CefRefPtr<CefBrowser> browser,\n                               CefRefPtr<CefFrame> frame,\n                               const CefString& url) {}\n\n  ///\n  // Called when the page title changes.\n  ///\n  /*--cef(optional_param=title)--*/\n  virtual void OnTitleChange(CefRefPtr<CefBrowser> browser,\n                             const CefString& title) {}\n\n  ///\n  // Called when the page icon changes.\n  ///\n  /*--cef(optional_param=icon_urls)--*/\n  virtual void OnFaviconURLChange(CefRefPtr<CefBrowser> browser,\n                                  const std::vector<CefString>& icon_urls) {}\n\n  ///\n  // Called when web content in the page has toggled fullscreen mode. If\n  // |fullscreen| is true the content will automatically be sized to fill the\n  // browser content area. If |fullscreen| is false the content will\n  // automatically return to its original size and position. The client is\n  // responsible for resizing the browser if desired.\n  ///\n  /*--cef()--*/\n  virtual void OnFullscreenModeChange(CefRefPtr<CefBrowser> browser,\n                                      bool fullscreen) {}\n\n  ///\n  // Called when the browser is about to display a tooltip. |text| contains the\n  // text that will be displayed in the tooltip. To handle the display of the\n  // tooltip yourself return true. Otherwise, you can optionally modify |text|\n  // and then return false to allow the browser to display the tooltip.\n  // When window rendering is disabled the application is responsible for\n  // drawing tooltips and the return value is ignored.\n  ///\n  /*--cef(optional_param=text)--*/\n  virtual bool OnTooltip(CefRefPtr<CefBrowser> browser,\n                         CefString& text) { return false; }\n\n  ///\n  // Called when the browser receives a status message. |value| contains the\n  // text that will be displayed in the status message.\n  ///\n  /*--cef(optional_param=value)--*/\n  virtual void OnStatusMessage(CefRefPtr<CefBrowser> browser,\n                               const CefString& value) {}\n\n  ///\n  // Called to display a console message. Return true to stop the message from\n  // being output to the console.\n  ///\n  /*--cef(optional_param=message,optional_param=source)--*/\n  virtual bool OnConsoleMessage(CefRefPtr<CefBrowser> browser,\n                                const CefString& message,\n                                const CefString& source,\n                                int line) { return false; }\n};\n\n#endif  // CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_dom.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_DOM_H_\n#define CEF_INCLUDE_CEF_DOM_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include <map>\n\nclass CefDOMDocument;\nclass CefDOMNode;\n\n///\n// Interface to implement for visiting the DOM. The methods of this class will\n// be called on the render process main thread.\n///\n/*--cef(source=client)--*/\nclass CefDOMVisitor : public virtual CefBase {\n public:\n  ///\n  // Method executed for visiting the DOM. The document object passed to this\n  // method represents a snapshot of the DOM at the time this method is\n  // executed. DOM objects are only valid for the scope of this method. Do not\n  // keep references to or attempt to access any DOM objects outside the scope\n  // of this method.\n  ///\n  /*--cef()--*/\n  virtual void Visit(CefRefPtr<CefDOMDocument> document) =0;\n};\n\n\n///\n// Class used to represent a DOM document. The methods of this class should only\n// be called on the render process main thread thread.\n///\n/*--cef(source=library)--*/\nclass CefDOMDocument : public virtual CefBase {\n public:\n  typedef cef_dom_document_type_t Type;\n\n  ///\n  // Returns the document type.\n  ///\n  /*--cef(default_retval=DOM_DOCUMENT_TYPE_UNKNOWN)--*/\n  virtual Type GetType() =0;\n\n  ///\n  // Returns the root document node.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDOMNode> GetDocument() =0;\n\n  ///\n  // Returns the BODY node of an HTML document.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDOMNode> GetBody() =0;\n\n  ///\n  // Returns the HEAD node of an HTML document.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDOMNode> GetHead() =0;\n\n  ///\n  // Returns the title of an HTML document.\n  ///\n  /*--cef()--*/\n  virtual CefString GetTitle() =0;\n\n  ///\n  // Returns the document element with the specified ID value.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDOMNode> GetElementById(const CefString& id) =0;\n\n  ///\n  // Returns the node that currently has keyboard focus.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDOMNode> GetFocusedNode() =0;\n\n  ///\n  // Returns true if a portion of the document is selected.\n  ///\n  /*--cef()--*/\n  virtual bool HasSelection() =0;\n\n  ///\n  // Returns the selection offset within the start node.\n  ///\n  /*--cef()--*/\n  virtual int GetSelectionStartOffset() =0;\n\n  ///\n  // Returns the selection offset within the end node.\n  ///\n  /*--cef()--*/\n  virtual int GetSelectionEndOffset() =0;\n\n  ///\n  // Returns the contents of this selection as markup.\n  ///\n  /*--cef()--*/\n  virtual CefString GetSelectionAsMarkup() =0;\n\n  ///\n  // Returns the contents of this selection as text.\n  ///\n  /*--cef()--*/\n  virtual CefString GetSelectionAsText() =0;\n\n  ///\n  // Returns the base URL for the document.\n  ///\n  /*--cef()--*/\n  virtual CefString GetBaseURL() =0;\n\n  ///\n  // Returns a complete URL based on the document base URL and the specified\n  // partial URL.\n  ///\n  /*--cef()--*/\n  virtual CefString GetCompleteURL(const CefString& partialURL) =0;\n};\n\n\n///\n// Class used to represent a DOM node. The methods of this class should only be\n// called on the render process main thread.\n///\n/*--cef(source=library)--*/\nclass CefDOMNode : public virtual CefBase {\n public:\n  typedef std::map<CefString, CefString> AttributeMap;\n  typedef cef_dom_node_type_t Type;\n\n  ///\n  // Returns the type for this node.\n  ///\n  /*--cef(default_retval=DOM_NODE_TYPE_UNSUPPORTED)--*/\n  virtual Type GetType() =0;\n\n  ///\n  // Returns true if this is a text node.\n  ///\n  /*--cef()--*/\n  virtual bool IsText() =0;\n\n  ///\n  // Returns true if this is an element node.\n  ///\n  /*--cef()--*/\n  virtual bool IsElement() =0;\n\n  ///\n  // Returns true if this is an editable node.\n  ///\n  /*--cef()--*/\n  virtual bool IsEditable() =0;\n\n  ///\n  // Returns true if this is a form control element node.\n  ///\n  /*--cef()--*/\n  virtual bool IsFormControlElement() =0;\n\n  ///\n  // Returns the type of this form control element node.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFormControlElementType() =0;\n\n  ///\n  // Returns true if this object is pointing to the same handle as |that|\n  // object.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefDOMNode> that) =0;\n\n  ///\n  // Returns the name of this node.\n  ///\n  /*--cef()--*/\n  virtual CefString GetName() =0;\n\n  ///\n  // Returns the value of this node.\n  ///\n  /*--cef()--*/\n  virtual CefString GetValue() =0;\n\n  ///\n  // Set the value of this node. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetValue(const CefString& value) =0;\n\n  ///\n  // Returns the contents of this node as markup.\n  ///\n  /*--cef()--*/\n  virtual CefString GetAsMarkup() =0;\n\n  ///\n  // Returns the document associated with this node.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDOMDocument> GetDocument() =0;\n\n  ///\n  // Returns the parent node.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDOMNode> GetParent() =0;\n\n  ///\n  // Returns the previous sibling node.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDOMNode> GetPreviousSibling() =0;\n\n  ///\n  // Returns the next sibling node.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDOMNode> GetNextSibling() =0;\n\n  ///\n  // Returns true if this node has child nodes.\n  ///\n  /*--cef()--*/\n  virtual bool HasChildren() =0;\n\n  ///\n  // Return the first child node.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDOMNode> GetFirstChild() =0;\n\n  ///\n  // Returns the last child node.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDOMNode> GetLastChild() =0;\n\n  // The following methods are valid only for element nodes.\n\n  ///\n  // Returns the tag name of this element.\n  ///\n  /*--cef()--*/\n  virtual CefString GetElementTagName() =0;\n\n  ///\n  // Returns true if this element has attributes.\n  ///\n  /*--cef()--*/\n  virtual bool HasElementAttributes() =0;\n\n  ///\n  // Returns true if this element has an attribute named |attrName|.\n  ///\n  /*--cef()--*/\n  virtual bool HasElementAttribute(const CefString& attrName) =0;\n\n  ///\n  // Returns the element attribute named |attrName|.\n  ///\n  /*--cef()--*/\n  virtual CefString GetElementAttribute(const CefString& attrName) =0;\n\n  ///\n  // Returns a map of all element attributes.\n  ///\n  /*--cef()--*/\n  virtual void GetElementAttributes(AttributeMap& attrMap) =0;\n\n  ///\n  // Set the value for the element attribute named |attrName|. Returns true on\n  // success.\n  ///\n  /*--cef()--*/\n  virtual bool SetElementAttribute(const CefString& attrName,\n                                   const CefString& value) =0;\n\n  ///\n  // Returns the inner text of the element.\n  ///\n  /*--cef()--*/\n  virtual CefString GetElementInnerText() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_DOM_H_\n"
  },
  {
    "path": "CEF/include/cef_download_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_\n#define CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_download_item.h\"\n\n\n///\n// Callback interface used to asynchronously continue a download.\n///\n/*--cef(source=library)--*/\nclass CefBeforeDownloadCallback : public virtual CefBase {\n public:\n  ///\n  // Call to continue the download. Set |download_path| to the full file path\n  // for the download including the file name or leave blank to use the\n  // suggested name and the default temp directory. Set |show_dialog| to true\n  // if you do wish to show the default \"Save As\" dialog.\n  ///\n  /*--cef(capi_name=cont,optional_param=download_path)--*/\n  virtual void Continue(const CefString& download_path, bool show_dialog) =0;\n};\n\n\n///\n// Callback interface used to asynchronously cancel a download.\n///\n/*--cef(source=library)--*/\nclass CefDownloadItemCallback : public virtual CefBase {\n public:\n  ///\n  // Call to cancel the download.\n  ///\n  /*--cef()--*/\n  virtual void Cancel() =0;\n\n  ///\n  // Call to pause the download.\n  ///\n  /*--cef()--*/\n  virtual void Pause() =0;\n\n  ///\n  // Call to resume the download.\n  ///\n  /*--cef()--*/\n  virtual void Resume() =0;\n};\n\n\n///\n// Class used to handle file downloads. The methods of this class will called\n// on the browser process UI thread.\n///\n/*--cef(source=client)--*/\nclass CefDownloadHandler : public virtual CefBase {\n public:\n  ///\n  // Called before a download begins. |suggested_name| is the suggested name for\n  // the download file. By default the download will be canceled. Execute\n  // |callback| either asynchronously or in this method to continue the download\n  // if desired. Do not keep a reference to |download_item| outside of this\n  // method.\n  ///\n  /*--cef()--*/\n  virtual void OnBeforeDownload(\n      CefRefPtr<CefBrowser> browser,\n      CefRefPtr<CefDownloadItem> download_item,\n      const CefString& suggested_name,\n      CefRefPtr<CefBeforeDownloadCallback> callback) =0;\n\n  ///\n  // Called when a download's status or progress information has been updated.\n  // This may be called multiple times before and after OnBeforeDownload().\n  // Execute |callback| either asynchronously or in this method to cancel the\n  // download if desired. Do not keep a reference to |download_item| outside of\n  // this method.\n  ///\n  /*--cef()--*/\n  virtual void OnDownloadUpdated(\n      CefRefPtr<CefBrowser> browser,\n      CefRefPtr<CefDownloadItem> download_item,\n      CefRefPtr<CefDownloadItemCallback> callback) {}\n};\n\n#endif  // CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_download_item.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_DOWNLOAD_ITEM_H_\n#define CEF_INCLUDE_CEF_DOWNLOAD_ITEM_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\n///\n// Class used to represent a download item.\n///\n/*--cef(source=library)--*/\nclass CefDownloadItem : public virtual CefBase {\n public:\n  ///\n  // Returns true if this object is valid. Do not call any other methods if this\n  // function returns false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns true if the download is in progress.\n  ///\n  /*--cef()--*/\n  virtual bool IsInProgress() =0;\n\n  ///\n  // Returns true if the download is complete.\n  ///\n  /*--cef()--*/\n  virtual bool IsComplete() =0;\n\n  ///\n  // Returns true if the download has been canceled or interrupted.\n  ///\n  /*--cef()--*/\n  virtual bool IsCanceled() =0;\n\n  ///\n  // Returns a simple speed estimate in bytes/s.\n  ///\n  /*--cef()--*/\n  virtual int64 GetCurrentSpeed() =0;\n\n  ///\n  // Returns the rough percent complete or -1 if the receive total size is\n  // unknown.\n  ///\n  /*--cef()--*/\n  virtual int GetPercentComplete() =0;\n\n  ///\n  // Returns the total number of bytes.\n  ///\n  /*--cef()--*/\n  virtual int64 GetTotalBytes() =0;\n\n  ///\n  // Returns the number of received bytes.\n  ///\n  /*--cef()--*/\n  virtual int64 GetReceivedBytes() =0;\n\n  ///\n  // Returns the time that the download started.\n  ///\n  /*--cef()--*/\n  virtual CefTime GetStartTime() =0;\n\n  ///\n  // Returns the time that the download ended.\n  ///\n  /*--cef()--*/\n  virtual CefTime GetEndTime() =0;\n\n  ///\n  // Returns the full path to the downloaded or downloading file.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFullPath() =0;\n\n  ///\n  // Returns the unique identifier for this download.\n  ///\n  /*--cef()--*/\n  virtual uint32 GetId() =0;\n\n  ///\n  // Returns the URL.\n  ///\n  /*--cef()--*/\n  virtual CefString GetURL() =0;\n\n  ///\n  // Returns the original URL before any redirections.\n  ///\n  /*--cef()--*/\n  virtual CefString GetOriginalUrl() =0;\n\n  ///\n  // Returns the suggested file name.\n  ///\n  /*--cef()--*/\n  virtual CefString GetSuggestedFileName() =0;\n\n  ///\n  // Returns the content disposition.\n  ///\n  /*--cef()--*/\n  virtual CefString GetContentDisposition() =0;\n\n  ///\n  // Returns the mime type.\n  ///\n  /*--cef()--*/\n  virtual CefString GetMimeType() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_DOWNLOAD_ITEM_H_\n"
  },
  {
    "path": "CEF/include/cef_drag_data.h",
    "content": "// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_DRAG_DATA_H_\n#define CEF_INCLUDE_CEF_DRAG_DATA_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_stream.h\"\n#include <vector>\n\n///\n// Class used to represent drag data. The methods of this class may be called\n// on any thread.\n///\n/*--cef(source=library)--*/\nclass CefDragData : public virtual CefBase {\n public:\n  ///\n  // Create a new CefDragData object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefDragData> Create();\n\n  ///\n  // Returns a copy of the current object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDragData> Clone() =0;\n\n  ///\n  // Returns true if this object is read-only.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Returns true if the drag data is a link.\n  ///\n  /*--cef()--*/\n  virtual bool IsLink() =0;\n\n  ///\n  // Returns true if the drag data is a text or html fragment.\n  ///\n  /*--cef()--*/\n  virtual bool IsFragment() =0;\n\n  ///\n  // Returns true if the drag data is a file.\n  ///\n  /*--cef()--*/\n  virtual bool IsFile() =0;\n\n  ///\n  // Return the link URL that is being dragged.\n  ///\n  /*--cef()--*/\n  virtual CefString GetLinkURL() =0;\n\n  ///\n  // Return the title associated with the link being dragged.\n  ///\n  /*--cef()--*/\n  virtual CefString GetLinkTitle() =0;\n\n  ///\n  // Return the metadata, if any, associated with the link being dragged.\n  ///\n  /*--cef()--*/\n  virtual CefString GetLinkMetadata() =0;\n\n  ///\n  // Return the plain text fragment that is being dragged.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFragmentText() =0;\n\n  ///\n  // Return the text/html fragment that is being dragged.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFragmentHtml() =0;\n\n  ///\n  // Return the base URL that the fragment came from. This value is used for\n  // resolving relative URLs and may be empty.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFragmentBaseURL() =0;\n\n  ///\n  // Return the name of the file being dragged out of the browser window.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFileName() =0;\n\n  ///\n  // Write the contents of the file being dragged out of the web view into\n  // |writer|. Returns the number of bytes sent to |writer|. If |writer| is\n  // NULL this method will return the size of the file contents in bytes.\n  // Call GetFileName() to get a suggested name for the file.\n  ///\n  /*--cef(optional_param=writer)--*/\n  virtual size_t GetFileContents(CefRefPtr<CefStreamWriter> writer) =0;\n\n  ///\n  // Retrieve the list of file names that are being dragged into the browser\n  // window.\n  ///\n  /*--cef()--*/\n  virtual bool GetFileNames(std::vector<CefString>& names) =0;\n\n  ///\n  // Set the link URL that is being dragged.\n  ///\n  /*--cef(optional_param=url)--*/\n  virtual void SetLinkURL(const CefString& url) =0;\n\n  ///\n  // Set the title associated with the link being dragged.\n  ///\n  /*--cef(optional_param=title)--*/\n  virtual void SetLinkTitle(const CefString& title) =0;\n\n  ///\n  // Set the metadata associated with the link being dragged.\n  ///\n  /*--cef(optional_param=data)--*/\n  virtual void SetLinkMetadata(const CefString& data) =0;\n\n  ///\n  // Set the plain text fragment that is being dragged.\n  ///\n  /*--cef(optional_param=text)--*/\n  virtual void SetFragmentText(const CefString& text) =0;\n\n  ///\n  // Set the text/html fragment that is being dragged.\n  ///\n  /*--cef(optional_param=html)--*/\n  virtual void SetFragmentHtml(const CefString& html) =0;\n\n  ///\n  // Set the base URL that the fragment came from.\n  ///\n  /*--cef(optional_param=base_url)--*/\n  virtual void SetFragmentBaseURL(const CefString& base_url) =0;\n\n  ///\n  // Reset the file contents. You should do this before calling\n  // CefBrowserHost::DragTargetDragEnter as the web view does not allow us to\n  // drag in this kind of data.\n  ///\n  /*--cef()--*/\n  virtual void ResetFileContents() =0;\n\n  ///\n  // Add a file that is being dragged into the webview.\n  ///\n  /*--cef(optional_param=display_name)--*/\n  virtual void AddFile(const CefString& path, const CefString& display_name) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_DRAG_DATA_H_\n"
  },
  {
    "path": "CEF/include/cef_drag_handler.h",
    "content": "// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_DRAG_HANDLER_H_\n#define CEF_INCLUDE_CEF_DRAG_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_drag_data.h\"\n#include \"include/cef_browser.h\"\n\n///\n// Implement this interface to handle events related to dragging. The methods of\n// this class will be called on the UI thread.\n///\n/*--cef(source=client)--*/\nclass CefDragHandler : public virtual CefBase {\n public:\n  typedef cef_drag_operations_mask_t DragOperationsMask;\n\n  ///\n  // Called when an external drag event enters the browser window. |dragData|\n  // contains the drag event data and |mask| represents the type of drag\n  // operation. Return false for default drag handling behavior or true to\n  // cancel the drag event.\n  ///\n  /*--cef()--*/\n  virtual bool OnDragEnter(CefRefPtr<CefBrowser> browser,\n                           CefRefPtr<CefDragData> dragData,\n                           DragOperationsMask mask) { return false; }\n\n  ///\n  // Called whenever draggable regions for the browser window change. These can\n  // be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If\n  // draggable regions are never defined in a document this method will also\n  // never be called. If the last draggable region is removed from a document\n  // this method will be called with an empty vector.\n  ///\n  /*--cef()--*/\n  virtual void OnDraggableRegionsChanged(\n      CefRefPtr<CefBrowser> browser,\n      const std::vector<CefDraggableRegion>& regions) {}\n};\n\n#endif  // CEF_INCLUDE_CEF_DRAG_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_find_handler.h",
    "content": "// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_FIND_HANDLER_H_\n#define CEF_INCLUDE_CEF_FIND_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n\n///\n// Implement this interface to handle events related to find results. The\n// methods of this class will be called on the UI thread.\n///\n/*--cef(source=client)--*/\nclass CefFindHandler : public virtual CefBase {\n public:\n  ///\n  // Called to report find results returned by CefBrowserHost::Find().\n  // |identifer| is the identifier passed to Find(), |count| is the number of\n  // matches currently identified, |selectionRect| is the location of where the\n  // match was found (in window coordinates), |activeMatchOrdinal| is the\n  // current position in the search results, and |finalUpdate| is true if this\n  // is the last find notification.\n  ///\n  /*--cef()--*/\n  virtual void OnFindResult(CefRefPtr<CefBrowser> browser,\n                            int identifier,\n                            int count,\n                            const CefRect& selectionRect,\n                            int activeMatchOrdinal,\n                            bool finalUpdate) {}\n};\n\n#endif  // CEF_INCLUDE_CEF_FIND_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_focus_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_FOCUS_HANDLER_H_\n#define CEF_INCLUDE_CEF_FOCUS_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_dom.h\"\n#include \"include/cef_frame.h\"\n\n///\n// Implement this interface to handle events related to focus. The methods of\n// this class will be called on the UI thread.\n///\n/*--cef(source=client)--*/\nclass CefFocusHandler : public virtual CefBase {\n public:\n  typedef cef_focus_source_t FocusSource;\n\n  ///\n  // Called when the browser component is about to loose focus. For instance, if\n  // focus was on the last HTML element and the user pressed the TAB key. |next|\n  // will be true if the browser is giving focus to the next component and false\n  // if the browser is giving focus to the previous component.\n  ///\n  /*--cef()--*/\n  virtual void OnTakeFocus(CefRefPtr<CefBrowser> browser,\n                           bool next) {}\n\n  ///\n  // Called when the browser component is requesting focus. |source| indicates\n  // where the focus request is originating from. Return false to allow the\n  // focus to be set or true to cancel setting the focus.\n  ///\n  /*--cef()--*/\n  virtual bool OnSetFocus(CefRefPtr<CefBrowser> browser,\n                          FocusSource source) { return false; }\n\n  ///\n  // Called when the browser component has received focus.\n  ///\n  /*--cef()--*/\n  virtual void OnGotFocus(CefRefPtr<CefBrowser> browser) {}\n};\n\n#endif  // CEF_INCLUDE_CEF_FOCUS_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_frame.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_FRAME_H_\n#define CEF_INCLUDE_CEF_FRAME_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_dom.h\"\n#include \"include/cef_request.h\"\n#include \"include/cef_stream.h\"\n#include \"include/cef_string_visitor.h\"\n\nclass CefBrowser;\nclass CefV8Context;\n\n///\n// Class used to represent a frame in the browser window. When used in the\n// browser process the methods of this class may be called on any thread unless\n// otherwise indicated in the comments. When used in the render process the\n// methods of this class may only be called on the main thread.\n///\n/*--cef(source=library)--*/\nclass CefFrame : public virtual CefBase {\n public:\n  ///\n  // True if this object is currently attached to a valid frame.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Execute undo in this frame.\n  ///\n  /*--cef()--*/\n  virtual void Undo() =0;\n\n  ///\n  // Execute redo in this frame.\n  ///\n  /*--cef()--*/\n  virtual void Redo() =0;\n\n  ///\n  // Execute cut in this frame.\n  ///\n  /*--cef()--*/\n  virtual void Cut() =0;\n\n  ///\n  // Execute copy in this frame.\n  ///\n  /*--cef()--*/\n  virtual void Copy() =0;\n\n  ///\n  // Execute paste in this frame.\n  ///\n  /*--cef()--*/\n  virtual void Paste() =0;\n\n  ///\n  // Execute delete in this frame.\n  ///\n  /*--cef(capi_name=del)--*/\n  virtual void Delete() =0;\n\n  ///\n  // Execute select all in this frame.\n  ///\n  /*--cef()--*/\n  virtual void SelectAll() =0;\n\n  ///\n  // Save this frame's HTML source to a temporary file and open it in the\n  // default text viewing application. This method can only be called from the\n  // browser process.\n  ///\n  /*--cef()--*/\n  virtual void ViewSource() =0;\n\n  ///\n  // Retrieve this frame's HTML source as a string sent to the specified\n  // visitor.\n  ///\n  /*--cef()--*/\n  virtual void GetSource(CefRefPtr<CefStringVisitor> visitor) =0;\n\n  ///\n  // Retrieve this frame's display text as a string sent to the specified\n  // visitor.\n  ///\n  /*--cef()--*/\n  virtual void GetText(CefRefPtr<CefStringVisitor> visitor) =0;\n\n  ///\n  // Load the request represented by the |request| object.\n  ///\n  /*--cef()--*/\n  virtual void LoadRequest(CefRefPtr<CefRequest> request) =0;\n\n  ///\n  // Load the specified |url|.\n  ///\n  /*--cef()--*/\n  virtual void LoadURL(const CefString& url) =0;\n\n  ///\n  // Load the contents of |string_val| with the specified dummy |url|. |url|\n  // should have a standard scheme (for example, http scheme) or behaviors like\n  // link clicks and web security restrictions may not behave as expected.\n  ///\n  /*--cef()--*/\n  virtual void LoadString(const CefString& string_val,\n                          const CefString& url) =0;\n\n  ///\n  // Execute a string of JavaScript code in this frame. The |script_url|\n  // parameter is the URL where the script in question can be found, if any.\n  // The renderer may request this URL to show the developer the source of the\n  // error.  The |start_line| parameter is the base line number to use for error\n  // reporting.\n  ///\n  /*--cef(optional_param=script_url)--*/\n  virtual void ExecuteJavaScript(const CefString& code,\n                                 const CefString& script_url,\n                                 int start_line) =0;\n\n  ///\n  // Returns true if this is the main (top-level) frame.\n  ///\n  /*--cef()--*/\n  virtual bool IsMain() =0;\n\n  ///\n  // Returns true if this is the focused frame.\n  ///\n  /*--cef()--*/\n  virtual bool IsFocused() =0;\n\n  ///\n  // Returns the name for this frame. If the frame has an assigned name (for\n  // example, set via the iframe \"name\" attribute) then that value will be\n  // returned. Otherwise a unique name will be constructed based on the frame\n  // parent hierarchy. The main (top-level) frame will always have an empty name\n  // value.\n  ///\n  /*--cef()--*/\n  virtual CefString GetName() =0;\n\n  ///\n  // Returns the globally unique identifier for this frame or < 0 if the\n  // underlying frame does not yet exist.\n  ///\n  /*--cef()--*/\n  virtual int64 GetIdentifier() =0;\n\n  ///\n  // Returns the parent of this frame or NULL if this is the main (top-level)\n  // frame.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefFrame> GetParent() =0;\n\n  ///\n  // Returns the URL currently loaded in this frame.\n  ///\n  /*--cef()--*/\n  virtual CefString GetURL() =0;\n\n  ///\n  // Returns the browser that this frame belongs to.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBrowser> GetBrowser() =0;\n\n  ///\n  // Get the V8 context associated with the frame. This method can only be\n  // called from the render process.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefV8Context> GetV8Context() =0;\n  \n  ///\n  // Visit the DOM document. This method can only be called from the render\n  // process.\n  ///\n  /*--cef()--*/\n  virtual void VisitDOM(CefRefPtr<CefDOMVisitor> visitor) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_FRAME_H_\n"
  },
  {
    "path": "CEF/include/cef_geolocation.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_GEOLOCATION_H_\n#define CEF_INCLUDE_CEF_GEOLOCATION_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\n///\n// Implement this interface to receive geolocation updates. The methods of this\n// class will be called on the browser process UI thread.\n///\n/*--cef(source=client)--*/\nclass CefGetGeolocationCallback : public virtual CefBase {\n public:\n  ///\n  // Called with the 'best available' location information or, if the location\n  // update failed, with error information.\n  ///\n  /*--cef()--*/\n  virtual void OnLocationUpdate(const CefGeoposition& position) =0;\n};\n\n///\n// Request a one-time geolocation update. This function bypasses any user\n// permission checks so should only be used by code that is allowed to access\n// location information.\n///\n/*--cef()--*/\nbool CefGetGeolocation(CefRefPtr<CefGetGeolocationCallback> callback);\n\n#endif  // CEF_INCLUDE_CEF_GEOLOCATION_H_\n"
  },
  {
    "path": "CEF/include/cef_geolocation_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_GEOLOCATION_HANDLER_H_\n#define CEF_INCLUDE_CEF_GEOLOCATION_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n\n///\n// Callback interface used for asynchronous continuation of geolocation\n// permission requests.\n///\n/*--cef(source=library)--*/\nclass CefGeolocationCallback : public virtual CefBase {\n public:\n  ///\n  // Call to allow or deny geolocation access.\n  ///\n  /*--cef(capi_name=cont)--*/\n  virtual void Continue(bool allow) =0;\n};\n\n\n///\n// Implement this interface to handle events related to geolocation permission\n// requests. The methods of this class will be called on the browser process UI\n// thread.\n///\n/*--cef(source=client)--*/\nclass CefGeolocationHandler : public virtual CefBase {\n public:\n  ///\n  // Called when a page requests permission to access geolocation information.\n  // |requesting_url| is the URL requesting permission and |request_id| is the\n  // unique ID for the permission request. Return true and call\n  // CefGeolocationCallback::Continue() either in this method or at a later\n  // time to continue or cancel the request. Return false to cancel the request\n  // immediately.\n  ///\n  /*--cef()--*/\n  virtual bool OnRequestGeolocationPermission(\n      CefRefPtr<CefBrowser> browser,\n      const CefString& requesting_url,\n      int request_id,\n      CefRefPtr<CefGeolocationCallback> callback) {\n    return false;\n  }\n\n  ///\n  // Called when a geolocation access request is canceled. |request_id| is the\n  // unique ID for the permission request.\n  ///\n  /*--cef()--*/\n  virtual void OnCancelGeolocationPermission(\n      CefRefPtr<CefBrowser> browser,\n      int request_id) {\n  }\n};\n\n#endif  // CEF_INCLUDE_CEF_GEOLOCATION_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_image.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_IMAGE_H_\n#define CEF_INCLUDE_CEF_IMAGE_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_values.h\"\n\n///\n// Container for a single image represented at different scale factors. All\n// image representations should be the same size in density independent pixel\n// (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels\n// then the image at scale factor 2.0 should be 200x200 pixels -- both images\n// will display with a DIP size of 100x100 units. The methods of this class must\n// be called on the browser process UI thread.\n///\n/*--cef(source=library)--*/\nclass CefImage : public virtual CefBase {\n public:\n  ///\n  // Create a new CefImage. It will initially be empty. Use the Add*() methods\n  // to add representations at different scale factors.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefImage> CreateImage();\n\n  ///\n  // Returns true if this Image is empty.\n  ///\n  /*--cef()--*/\n  virtual bool IsEmpty() =0;\n\n  ///\n  // Returns true if this Image and |that| Image share the same underlying\n  // storage. Will also return true if both images are empty.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefImage> that) =0;\n\n  ///\n  // Add a bitmap image representation for |scale_factor|. Only 32-bit RGBA/BGRA\n  // formats are supported. |pixel_width| and |pixel_height| are the bitmap\n  // representation size in pixel coordinates. |pixel_data| is the array of\n  // pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in size.\n  // |color_type| and |alpha_type| values specify the pixel format.\n  ///\n  /*--cef()--*/\n  virtual bool AddBitmap(float scale_factor,\n                         int pixel_width,\n                         int pixel_height,\n                         cef_color_type_t color_type,\n                         cef_alpha_type_t alpha_type,\n                         const void* pixel_data,\n                         size_t pixel_data_size) =0;\n\n  ///\n  // Add a PNG image representation for |scale_factor|. |png_data| is the image\n  // data of size |png_data_size|. Any alpha transparency in the PNG data will\n  // be maintained.\n  ///\n  /*--cef()--*/\n  virtual bool AddPNG(float scale_factor,\n                      const void* png_data,\n                      size_t png_data_size) =0;\n\n  ///\n  // Create a JPEG image representation for |scale_factor|. |jpeg_data| is the\n  // image data of size |jpeg_data_size|. The JPEG format does not support\n  // transparency so the alpha byte will be set to 0xFF for all pixels.\n  ///\n  /*--cef()--*/\n  virtual bool AddJPEG(float scale_factor,\n                       const void* jpeg_data,\n                       size_t jpeg_data_size) =0;\n\n  ///\n  // Returns the image width in density independent pixel (DIP) units.\n  ///\n  /*--cef()--*/\n  virtual size_t GetWidth() =0;\n\n  ///\n  // Returns the image height in density independent pixel (DIP) units.\n  ///\n  /*--cef()--*/\n  virtual size_t GetHeight() =0;\n\n  ///\n  // Returns true if this image contains a representation for |scale_factor|.\n  ///\n  /*--cef()--*/\n  virtual bool HasRepresentation(float scale_factor) =0;\n\n  ///\n  // Removes the representation for |scale_factor|. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool RemoveRepresentation(float scale_factor) =0;\n\n  ///\n  // Returns information for the representation that most closely matches\n  // |scale_factor|. |actual_scale_factor| is the actual scale factor for the\n  // representation. |pixel_width| and |pixel_height| are the representation\n  // size in pixel coordinates. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool GetRepresentationInfo(float scale_factor,\n                                     float& actual_scale_factor,\n                                     int& pixel_width,\n                                     int& pixel_height) =0;\n\n  ///\n  // Returns the bitmap representation that most closely matches |scale_factor|.\n  // Only 32-bit RGBA/BGRA formats are supported. |color_type| and |alpha_type|\n  // values specify the desired output pixel format. |pixel_width| and\n  // |pixel_height| are the output representation size in pixel coordinates.\n  // Returns a CefBinaryValue containing the pixel data on success or NULL on\n  // failure.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBinaryValue> GetAsBitmap(float scale_factor,\n                                                cef_color_type_t color_type,\n                                                cef_alpha_type_t alpha_type,\n                                                int& pixel_width,\n                                                int& pixel_height) =0;\n\n  ///\n  // Returns the PNG representation that most closely matches |scale_factor|. If\n  // |with_transparency| is true any alpha transparency in the image will be\n  // represented in the resulting PNG data. |pixel_width| and |pixel_height| are\n  // the output representation size in pixel coordinates. Returns a\n  // CefBinaryValue containing the PNG image data on success or NULL on failure.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBinaryValue> GetAsPNG(float scale_factor,\n                                             bool with_transparency,\n                                             int& pixel_width,\n                                             int& pixel_height) =0;\n\n  ///\n  // Returns the JPEG representation that most closely matches |scale_factor|.\n  // |quality| determines the compression level with 0 == lowest and 100 ==\n  // highest. The JPEG format does not support alpha transparency and the alpha\n  // channel, if any, will be discarded. |pixel_width| and |pixel_height| are\n  // the output representation size in pixel coordinates. Returns a\n  // CefBinaryValue containing the JPEG image data on success or NULL on\n  // failure.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBinaryValue> GetAsJPEG(float scale_factor,\n                                              int quality,\n                                              int& pixel_width,\n                                              int& pixel_height) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_IMAGE_H_\n"
  },
  {
    "path": "CEF/include/cef_jsdialog_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_\n#define CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n\n///\n// Callback interface used for asynchronous continuation of JavaScript dialog\n// requests.\n///\n/*--cef(source=library)--*/\nclass CefJSDialogCallback : public virtual CefBase {\n public:\n  ///\n  // Continue the JS dialog request. Set |success| to true if the OK button was\n  // pressed. The |user_input| value should be specified for prompt dialogs.\n  ///\n  /*--cef(capi_name=cont,optional_param=user_input)--*/\n  virtual void Continue(bool success,\n                        const CefString& user_input) =0;\n};\n\n\n///\n// Implement this interface to handle events related to JavaScript dialogs. The\n// methods of this class will be called on the UI thread.\n///\n/*--cef(source=client)--*/\nclass CefJSDialogHandler : public virtual CefBase {\n public:\n  typedef cef_jsdialog_type_t JSDialogType;\n\n  ///\n  // Called to run a JavaScript dialog. If |origin_url| is non-empty it can be\n  // passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure\n  // and user-friendly display string. The |default_prompt_text| value will be\n  // specified for prompt dialogs only. Set |suppress_message| to true and\n  // return false to suppress the message (suppressing messages is preferable to\n  // immediately executing the callback as this is used to detect presumably\n  // malicious behavior like spamming alert messages in onbeforeunload). Set\n  // |suppress_message| to false and return false to use the default\n  // implementation (the default implementation will show one modal dialog at a\n  // time and suppress any additional dialog requests until the displayed dialog\n  // is dismissed). Return true if the application will use a custom dialog or\n  // if the callback has been executed immediately. Custom dialogs may be either\n  // modal or modeless. If a custom dialog is used the application must execute\n  // |callback| once the custom dialog is dismissed.\n  ///\n  /*--cef(optional_param=origin_url,optional_param=accept_lang,\n          optional_param=message_text,optional_param=default_prompt_text)--*/\n  virtual bool OnJSDialog(CefRefPtr<CefBrowser> browser,\n                          const CefString& origin_url,\n                          JSDialogType dialog_type,\n                          const CefString& message_text,\n                          const CefString& default_prompt_text,\n                          CefRefPtr<CefJSDialogCallback> callback,\n                          bool& suppress_message) {\n    return false;\n  }\n\n  ///\n  // Called to run a dialog asking the user if they want to leave a page. Return\n  // false to use the default dialog implementation. Return true if the\n  // application will use a custom dialog or if the callback has been executed\n  // immediately. Custom dialogs may be either modal or modeless. If a custom\n  // dialog is used the application must execute |callback| once the custom\n  // dialog is dismissed.\n  ///\n  /*--cef(optional_param=message_text)--*/\n  virtual bool OnBeforeUnloadDialog(CefRefPtr<CefBrowser> browser,\n                                    const CefString& message_text,\n                                    bool is_reload,\n                                    CefRefPtr<CefJSDialogCallback> callback) {\n    return false;\n  }\n\n  ///\n  // Called to cancel any pending dialogs and reset any saved dialog state. Will\n  // be called due to events like page navigation irregardless of whether any\n  // dialogs are currently pending.\n  ///\n  /*--cef()--*/\n  virtual void OnResetDialogState(CefRefPtr<CefBrowser> browser) {}\n  \n  ///\n  // Called when the default implementation dialog is closed.\n  ///\n  /*--cef()--*/\n  virtual void OnDialogClosed(CefRefPtr<CefBrowser> browser) {}\n};\n\n#endif  // CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_keyboard_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_\n#define CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n\n///\n// Implement this interface to handle events related to keyboard input. The\n// methods of this class will be called on the UI thread.\n///\n/*--cef(source=client)--*/\nclass CefKeyboardHandler : public virtual CefBase {\n public:\n  ///\n  // Called before a keyboard event is sent to the renderer. |event| contains\n  // information about the keyboard event. |os_event| is the operating system\n  // event message, if any. Return true if the event was handled or false\n  // otherwise. If the event will be handled in OnKeyEvent() as a keyboard\n  // shortcut set |is_keyboard_shortcut| to true and return false.\n  ///\n  /*--cef()--*/\n  virtual bool OnPreKeyEvent(CefRefPtr<CefBrowser> browser,\n                             const CefKeyEvent& event,\n                             CefEventHandle os_event,\n                             bool* is_keyboard_shortcut) { return false; }\n\n  ///\n  // Called after the renderer and JavaScript in the page has had a chance to\n  // handle the event. |event| contains information about the keyboard event.\n  // |os_event| is the operating system event message, if any. Return true if\n  // the keyboard event was handled or false otherwise.\n  ///\n  /*--cef()--*/\n  virtual bool OnKeyEvent(CefRefPtr<CefBrowser> browser,\n                          const CefKeyEvent& event,\n                          CefEventHandle os_event) { return false; }\n};\n\n#endif  // CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_life_span_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_\n#define CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n\nclass CefClient;\n\n///\n// Implement this interface to handle events related to browser life span. The\n// methods of this class will be called on the UI thread unless otherwise\n// indicated.\n///\n/*--cef(source=client)--*/\nclass CefLifeSpanHandler : public virtual CefBase {\n public:\n  typedef cef_window_open_disposition_t WindowOpenDisposition;\n\n  ///\n  // Called on the IO thread before a new popup browser is created. The\n  // |browser| and |frame| values represent the source of the popup request. The\n  // |target_url| and |target_frame_name| values indicate where the popup\n  // browser should navigate and may be empty if not specified with the request.\n  // The |target_disposition| value indicates where the user intended to open\n  // the popup (e.g. current tab, new tab, etc). The |user_gesture| value will\n  // be true if the popup was opened via explicit user gesture (e.g. clicking a\n  // link) or false if the popup opened automatically (e.g. via the\n  // DomContentLoaded event). The |popupFeatures| structure contains additional\n  // information about the requested popup window. To allow creation of the\n  // popup browser optionally modify |windowInfo|, |client|, |settings| and\n  // |no_javascript_access| and return false. To cancel creation of the popup\n  // browser return true. The |client| and |settings| values will default to the\n  // source browser's values. If the |no_javascript_access| value is set to\n  // false the new browser will not be scriptable and may not be hosted in the\n  // same renderer process as the source browser. Any modifications to\n  // |windowInfo| will be ignored if the parent browser is wrapped in a\n  // CefBrowserView.\n  ///\n  /*--cef(optional_param=target_url,optional_param=target_frame_name)--*/\n  virtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser,\n                             CefRefPtr<CefFrame> frame,\n                             const CefString& target_url,\n                             const CefString& target_frame_name,\n                             WindowOpenDisposition target_disposition,\n                             bool user_gesture,\n                             const CefPopupFeatures& popupFeatures,\n                             CefWindowInfo& windowInfo,\n                             CefRefPtr<CefClient>& client,\n                             CefBrowserSettings& settings,\n                             bool* no_javascript_access) {\n    return false;\n  }\n\n  ///\n  // Called after a new browser is created. This callback will be the first\n  // notification that references |browser|.\n  ///\n  /*--cef()--*/\n  virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) {}\n\n  ///\n  // Called when a browser has recieved a request to close. This may result\n  // directly from a call to CefBrowserHost::*CloseBrowser() or indirectly if\n  // the browser is parented to a top-level window created by CEF and the user\n  // attempts to close that window (by clicking the 'X', for example). The\n  // DoClose() method will be called after the JavaScript 'onunload' event has\n  // been fired.\n  //\n  // An application should handle top-level owner window close notifications by\n  // calling CefBrowserHost::TryCloseBrowser() or\n  // CefBrowserHost::CloseBrowser(false) instead of allowing the window to close\n  // immediately (see the examples below). This gives CEF an opportunity to\n  // process the 'onbeforeunload' event and optionally cancel the close before\n  // DoClose() is called.\n  //\n  // When windowed rendering is enabled CEF will internally create a window or\n  // view to host the browser. In that case returning false from DoClose() will\n  // send the standard close notification to the browser's top-level owner\n  // window (e.g. WM_CLOSE on Windows, performClose: on OS X, \"delete_event\" on\n  // Linux or CefWindowDelegate::CanClose() callback from Views). If the\n  // browser's host window/view has already been destroyed (via view hierarchy\n  // tear-down, for example) then DoClose() will not be called for that browser\n  // since is no longer possible to cancel the close.\n  //\n  // When windowed rendering is disabled returning false from DoClose() will\n  // cause the browser object to be destroyed immediately.\n  //\n  // If the browser's top-level owner window requires a non-standard close\n  // notification then send that notification from DoClose() and return true.\n  //\n  // The CefLifeSpanHandler::OnBeforeClose() method will be called after\n  // DoClose() (if DoClose() is called) and immediately before the browser\n  // object is destroyed. The application should only exit after OnBeforeClose()\n  // has been called for all existing browsers.\n  //\n  // The below examples describe what should happen during window close when the\n  // browser is parented to an application-provided top-level window.\n  //\n  // Example 1: Using CefBrowserHost::TryCloseBrowser(). This is recommended for\n  // clients using standard close handling and windows created on the browser\n  // process UI thread.\n  // 1.  User clicks the window close button which sends a close notification to\n  //     the application's top-level window.\n  // 2.  Application's top-level window receives the close notification and\n  //     calls TryCloseBrowser() (which internally calls CloseBrowser(false)).\n  //     TryCloseBrowser() returns false so the client cancels the window close.\n  // 3.  JavaScript 'onbeforeunload' handler executes and shows the close\n  //     confirmation dialog (which can be overridden via\n  //     CefJSDialogHandler::OnBeforeUnloadDialog()).\n  // 4.  User approves the close.\n  // 5.  JavaScript 'onunload' handler executes.\n  // 6.  CEF sends a close notification to the application's top-level window\n  //     (because DoClose() returned false by default).\n  // 7.  Application's top-level window receives the close notification and\n  //     calls TryCloseBrowser(). TryCloseBrowser() returns true so the client\n  //     allows the window close.\n  // 8.  Application's top-level window is destroyed.\n  // 9.  Application's OnBeforeClose() handler is called and the browser object\n  //     is destroyed.\n  // 10. Application exits by calling CefQuitMessageLoop() if no other browsers\n  //     exist.\n  //\n  // Example 2: Using CefBrowserHost::CloseBrowser(false) and implementing the\n  // DoClose() callback. This is recommended for clients using non-standard\n  // close handling or windows that were not created on the browser process UI\n  // thread.\n  // 1.  User clicks the window close button which sends a close notification to\n  //     the application's top-level window.\n  // 2.  Application's top-level window receives the close notification and:\n  //     A. Calls CefBrowserHost::CloseBrowser(false).\n  //     B. Cancels the window close.\n  // 3.  JavaScript 'onbeforeunload' handler executes and shows the close\n  //     confirmation dialog (which can be overridden via\n  //     CefJSDialogHandler::OnBeforeUnloadDialog()).\n  // 4.  User approves the close.\n  // 5.  JavaScript 'onunload' handler executes.\n  // 6.  Application's DoClose() handler is called. Application will:\n  //     A. Set a flag to indicate that the next close attempt will be allowed.\n  //     B. Return false.\n  // 7.  CEF sends an close notification to the application's top-level window.\n  // 8.  Application's top-level window receives the close notification and\n  //     allows the window to close based on the flag from #6B.\n  // 9.  Application's top-level window is destroyed.\n  // 10. Application's OnBeforeClose() handler is called and the browser object\n  //     is destroyed.\n  // 11. Application exits by calling CefQuitMessageLoop() if no other browsers\n  //     exist.\n  ///\n  /*--cef()--*/\n  virtual bool DoClose(CefRefPtr<CefBrowser> browser) { return false; }\n\n  ///\n  // Called just before a browser is destroyed. Release all references to the\n  // browser object and do not attempt to execute any methods on the browser\n  // object after this callback returns. This callback will be the last\n  // notification that references |browser|. See DoClose() documentation for\n  // additional usage information.\n  ///\n  /*--cef()--*/\n  virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) {}\n};\n\n#endif  // CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_load_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_LOAD_HANDLER_H_\n#define CEF_INCLUDE_CEF_LOAD_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_frame.h\"\n\n///\n// Implement this interface to handle events related to browser load status. The\n// methods of this class will be called on the browser process UI thread or\n// render process main thread (TID_RENDERER).\n///\n/*--cef(source=client)--*/\nclass CefLoadHandler : public virtual CefBase {\n public:\n  typedef cef_errorcode_t ErrorCode;\n\n  ///\n  // Called when the loading state has changed. This callback will be executed\n  // twice -- once when loading is initiated either programmatically or by user\n  // action, and once when loading is terminated due to completion, cancellation\n  // of failure. It will be called before any calls to OnLoadStart and after all\n  // calls to OnLoadError and/or OnLoadEnd.\n  ///\n  /*--cef()--*/\n  virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser,\n                                    bool isLoading,\n                                    bool canGoBack,\n                                    bool canGoForward) {}\n\n  ///\n  // Called when the browser begins loading a frame. The |frame| value will\n  // never be empty -- call the IsMain() method to check if this frame is the\n  // main frame. Multiple frames may be loading at the same time. Sub-frames may\n  // start or continue loading after the main frame load has ended. This method\n  // will always be called for all frames irrespective of whether the request\n  // completes successfully. For notification of overall browser load status use\n  // OnLoadingStateChange instead.\n  ///\n  /*--cef()--*/\n  virtual void OnLoadStart(CefRefPtr<CefBrowser> browser,\n                           CefRefPtr<CefFrame> frame) {}\n\n  ///\n  // Called when the browser is done loading a frame. The |frame| value will\n  // never be empty -- call the IsMain() method to check if this frame is the\n  // main frame. Multiple frames may be loading at the same time. Sub-frames may\n  // start or continue loading after the main frame load has ended. This method\n  // will always be called for all frames irrespective of whether the request\n  // completes successfully. For notification of overall browser load status use\n  // OnLoadingStateChange instead.\n  ///\n  /*--cef()--*/\n  virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser,\n                         CefRefPtr<CefFrame> frame,\n                         int httpStatusCode) {}\n\n  ///\n  // Called when the resource load for a navigation fails or is canceled.\n  // |errorCode| is the error code number, |errorText| is the error text and\n  // |failedUrl| is the URL that failed to load. See net\\base\\net_error_list.h\n  // for complete descriptions of the error codes.\n  ///\n  /*--cef(optional_param=errorText)--*/\n  virtual void OnLoadError(CefRefPtr<CefBrowser> browser,\n                           CefRefPtr<CefFrame> frame,\n                           ErrorCode errorCode,\n                           const CefString& errorText,\n                           const CefString& failedUrl) {}\n};\n\n#endif  // CEF_INCLUDE_CEF_LOAD_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_menu_model.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_MENU_MODEL_H_\n#define CEF_INCLUDE_CEF_MENU_MODEL_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_menu_model_delegate.h\"\n\n///\n// Supports creation and modification of menus. See cef_menu_id_t for the\n// command ids that have default implementations. All user-defined command ids\n// should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The methods of\n// this class can only be accessed on the browser process the UI thread.\n///\n/*--cef(source=library)--*/\nclass CefMenuModel : public virtual CefBase {\n public:\n  typedef cef_menu_item_type_t MenuItemType;\n\n  ///\n  // Create a new MenuModel with the specified |delegate|.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefMenuModel> CreateMenuModel(\n      CefRefPtr<CefMenuModelDelegate> delegate);\n\n  ///\n  // Clears the menu. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool Clear() =0;\n\n  ///\n  // Returns the number of items in this menu.\n  ///\n  /*--cef()--*/\n  virtual int GetCount() =0;\n\n  ///\n  // Add a separator to the menu. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool AddSeparator() =0;\n\n  ///\n  // Add an item to the menu. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool AddItem(int command_id,\n                       const CefString& label) =0;\n\n  ///\n  // Add a check item to the menu. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool AddCheckItem(int command_id,\n                            const CefString& label) =0;\n  ///\n  // Add a radio item to the menu. Only a single item with the specified\n  // |group_id| can be checked at a time. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool AddRadioItem(int command_id,\n                            const CefString& label,\n                            int group_id) =0;\n\n  ///\n  // Add a sub-menu to the menu. The new sub-menu is returned.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefMenuModel> AddSubMenu(int command_id,\n                                             const CefString& label) =0;\n\n  ///\n  // Insert a separator in the menu at the specified |index|. Returns true on\n  // success.\n  ///\n  /*--cef()--*/\n  virtual bool InsertSeparatorAt(int index) =0;\n\n  ///\n  // Insert an item in the menu at the specified |index|. Returns true on\n  // success.\n  ///\n  /*--cef()--*/\n  virtual bool InsertItemAt(int index,\n                            int command_id,\n                            const CefString& label) =0;\n\n  ///\n  // Insert a check item in the menu at the specified |index|. Returns true on\n  // success.\n  ///\n  /*--cef()--*/\n  virtual bool InsertCheckItemAt(int index,\n                                 int command_id,\n                                 const CefString& label) =0;\n\n  ///\n  // Insert a radio item in the menu at the specified |index|. Only a single\n  // item with the specified |group_id| can be checked at a time. Returns true\n  // on success.\n  ///\n  /*--cef()--*/\n  virtual bool InsertRadioItemAt(int index,\n                                 int command_id,\n                                 const CefString& label,\n                                 int group_id) =0;\n\n  ///\n  // Insert a sub-menu in the menu at the specified |index|. The new sub-menu\n  // is returned.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefMenuModel> InsertSubMenuAt(int index,\n                                                  int command_id,\n                                                  const CefString& label) =0;\n\n  ///\n  // Removes the item with the specified |command_id|. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool Remove(int command_id) =0;\n\n  ///\n  // Removes the item at the specified |index|. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool RemoveAt(int index) =0;\n\n  ///\n  // Returns the index associated with the specified |command_id| or -1 if not\n  // found due to the command id not existing in the menu.\n  ///\n  /*--cef()--*/\n  virtual int GetIndexOf(int command_id) =0;\n\n  ///\n  // Returns the command id at the specified |index| or -1 if not found due to\n  // invalid range or the index being a separator.\n  ///\n  /*--cef()--*/\n  virtual int GetCommandIdAt(int index) =0;\n\n  ///\n  // Sets the command id at the specified |index|. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetCommandIdAt(int index, int command_id) =0;\n\n  ///\n  // Returns the label for the specified |command_id| or empty if not found.\n  ///\n  /*--cef()--*/\n  virtual CefString GetLabel(int command_id) =0;\n\n  ///\n  // Returns the label at the specified |index| or empty if not found due to\n  // invalid range or the index being a separator.\n  ///\n  /*--cef()--*/\n  virtual CefString GetLabelAt(int index) =0;\n\n  ///\n  // Sets the label for the specified |command_id|. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetLabel(int command_id, const CefString& label) =0;\n\n  ///\n  // Set the label at the specified |index|. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetLabelAt(int index, const CefString& label) =0;\n\n  ///\n  // Returns the item type for the specified |command_id|.\n  ///\n  /*--cef(default_retval=MENUITEMTYPE_NONE)--*/\n  virtual MenuItemType GetType(int command_id) =0;\n\n  ///\n  // Returns the item type at the specified |index|.\n  ///\n  /*--cef(default_retval=MENUITEMTYPE_NONE)--*/\n  virtual MenuItemType GetTypeAt(int index) =0;\n\n  ///\n  // Returns the group id for the specified |command_id| or -1 if invalid.\n  ///\n  /*--cef()--*/\n  virtual int GetGroupId(int command_id) =0;\n\n  ///\n  // Returns the group id at the specified |index| or -1 if invalid.\n  ///\n  /*--cef()--*/\n  virtual int GetGroupIdAt(int index) =0;\n\n  ///\n  // Sets the group id for the specified |command_id|. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetGroupId(int command_id, int group_id) =0;\n\n  ///\n  // Sets the group id at the specified |index|. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetGroupIdAt(int index, int group_id) =0;\n\n  ///\n  // Returns the submenu for the specified |command_id| or empty if invalid.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefMenuModel> GetSubMenu(int command_id) =0;\n\n  ///\n  // Returns the submenu at the specified |index| or empty if invalid.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefMenuModel> GetSubMenuAt(int index) =0;\n\n  ///\n  // Returns true if the specified |command_id| is visible.\n  ///\n  /*--cef()--*/\n  virtual bool IsVisible(int command_id) =0;\n\n  ///\n  // Returns true if the specified |index| is visible.\n  ///\n  /*--cef()--*/\n  virtual bool IsVisibleAt(int index) =0;\n\n  ///\n  // Change the visibility of the specified |command_id|. Returns true on\n  // success.\n  ///\n  /*--cef()--*/\n  virtual bool SetVisible(int command_id, bool visible) =0;\n\n  ///\n  // Change the visibility at the specified |index|. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetVisibleAt(int index, bool visible) =0;\n\n  ///\n  // Returns true if the specified |command_id| is enabled.\n  ///\n  /*--cef()--*/\n  virtual bool IsEnabled(int command_id) =0;\n\n  ///\n  // Returns true if the specified |index| is enabled.\n  ///\n  /*--cef()--*/\n  virtual bool IsEnabledAt(int index) =0;\n\n  ///\n  // Change the enabled status of the specified |command_id|. Returns true on\n  // success.\n  ///\n  /*--cef()--*/\n  virtual bool SetEnabled(int command_id, bool enabled) =0;\n\n  ///\n  // Change the enabled status at the specified |index|. Returns true on\n  // success.\n  ///\n  /*--cef()--*/\n  virtual bool SetEnabledAt(int index, bool enabled) =0;\n\n  ///\n  // Returns true if the specified |command_id| is checked. Only applies to\n  // check and radio items.\n  ///\n  /*--cef()--*/\n  virtual bool IsChecked(int command_id) =0;\n\n  ///\n  // Returns true if the specified |index| is checked. Only applies to check\n  // and radio items.\n  ///\n  /*--cef()--*/\n  virtual bool IsCheckedAt(int index) =0;\n\n  ///\n  // Check the specified |command_id|. Only applies to check and radio items.\n  // Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetChecked(int command_id, bool checked) =0;\n\n  ///\n  // Check the specified |index|. Only applies to check and radio items. Returns\n  // true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetCheckedAt(int index, bool checked) =0;\n\n  ///\n  // Returns true if the specified |command_id| has a keyboard accelerator\n  // assigned.\n  ///\n  /*--cef()--*/\n  virtual bool HasAccelerator(int command_id) =0;\n\n  ///\n  // Returns true if the specified |index| has a keyboard accelerator assigned.\n  ///\n  /*--cef()--*/\n  virtual bool HasAcceleratorAt(int index) =0;\n\n  ///\n  // Set the keyboard accelerator for the specified |command_id|. |key_code| can\n  // be any virtual key or character value. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetAccelerator(int command_id,\n                              int key_code,\n                              bool shift_pressed,\n                              bool ctrl_pressed,\n                              bool alt_pressed) =0;\n\n  ///\n  // Set the keyboard accelerator at the specified |index|. |key_code| can be\n  // any virtual key or character value. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetAcceleratorAt(int index,\n                                int key_code,\n                                bool shift_pressed,\n                                bool ctrl_pressed,\n                                bool alt_pressed) =0;\n\n  ///\n  // Remove the keyboard accelerator for the specified |command_id|. Returns\n  // true on success.\n  ///\n  /*--cef()--*/\n  virtual bool RemoveAccelerator(int command_id) =0;\n\n  ///\n  // Remove the keyboard accelerator at the specified |index|. Returns true on\n  // success.\n  ///\n  /*--cef()--*/\n  virtual bool RemoveAcceleratorAt(int index) =0;\n\n  ///\n  // Retrieves the keyboard accelerator for the specified |command_id|. Returns\n  // true on success.\n  ///\n  /*--cef()--*/\n  virtual bool GetAccelerator(int command_id,\n                              int& key_code,\n                              bool& shift_pressed,\n                              bool& ctrl_pressed,\n                              bool& alt_pressed) =0;\n\n  ///\n  // Retrieves the keyboard accelerator for the specified |index|. Returns true\n  // on success.\n  ///\n  /*--cef()--*/\n  virtual bool GetAcceleratorAt(int index,\n                                int& key_code,\n                                bool& shift_pressed,\n                                bool& ctrl_pressed,\n                                bool& alt_pressed) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_MENU_MODEL_H_\n"
  },
  {
    "path": "CEF/include/cef_menu_model_delegate.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_MENU_MODEL_DELEGATE_H_\n#define CEF_INCLUDE_VIEWS_CEF_MENU_MODEL_DELEGATE_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\nclass CefMenuModel;\n\n///\n// Implement this interface to handle menu model events. The methods of this\n// class will be called on the browser process UI thread unless otherwise\n// indicated.\n///\n/*--cef(source=client)--*/\nclass CefMenuModelDelegate : public virtual CefBase {\n public:\n  ///\n  // Perform the action associated with the specified |command_id| and\n  // optional |event_flags|.\n  ///\n  /*--cef()--*/\n  virtual void ExecuteCommand(CefRefPtr<CefMenuModel> menu_model,\n                              int command_id,\n                              cef_event_flags_t event_flags) =0;\n\n  ///\n  // The menu is about to show.\n  ///\n  /*--cef()--*/\n  virtual void MenuWillShow(CefRefPtr<CefMenuModel> menu_model) {};\n\n  ///\n  // The menu has closed.\n  ///\n  /*--cef()--*/\n  virtual void MenuClosed(CefRefPtr<CefMenuModel> menu_model) {};\n\n  ///\n  // Optionally modify a menu item label. Return true if |label| was modified.\n  ///\n  /*--cef()--*/\n  virtual bool FormatLabel(CefRefPtr<CefMenuModel> menu_model,\n                           CefString& label) { return false; };\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_MENU_MODEL_DELEGATE_H_\n"
  },
  {
    "path": "CEF/include/cef_navigation_entry.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_NAVIGATION_ENTRY_H_\n#define CEF_INCLUDE_CEF_NAVIGATION_ENTRY_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\n///\n// Class used to represent an entry in navigation history.\n///\n/*--cef(source=library)--*/\nclass CefNavigationEntry : public virtual CefBase {\n public:\n  typedef cef_transition_type_t TransitionType;\n\n  ///\n  // Returns true if this object is valid. Do not call any other methods if this\n  // function returns false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns the actual URL of the page. For some pages this may be data: URL or\n  // similar. Use GetDisplayURL() to return a display-friendly version.\n  ///\n  /*--cef()--*/\n  virtual CefString GetURL() =0;\n\n  ///\n  // Returns a display-friendly version of the URL.\n  ///\n  /*--cef()--*/\n  virtual CefString GetDisplayURL() =0;\n\n  ///\n  // Returns the original URL that was entered by the user before any redirects.\n  ///\n  /*--cef()--*/\n  virtual CefString GetOriginalURL() =0;\n\n  ///\n  // Returns the title set by the page. This value may be empty.\n  ///\n  /*--cef()--*/\n  virtual CefString GetTitle() =0;\n\n  ///\n  // Returns the transition type which indicates what the user did to move to\n  // this page from the previous page.\n  ///\n  /*--cef(default_retval=TT_EXPLICIT)--*/\n  virtual TransitionType GetTransitionType() =0;\n\n  ///\n  // Returns true if this navigation includes post data.\n  ///\n  /*--cef()--*/\n  virtual bool HasPostData() =0;\n\n  ///\n  // Returns the time for the last known successful navigation completion. A\n  // navigation may be completed more than once if the page is reloaded. May be\n  // 0 if the navigation has not yet completed.\n  ///\n  /*--cef()--*/\n  virtual CefTime GetCompletionTime() =0;\n\n  ///\n  // Returns the HTTP status code for the last known successful navigation\n  // response. May be 0 if the response has not yet been received or if the\n  // navigation has not yet completed.\n  ///\n  /*--cef()--*/\n  virtual int GetHttpStatusCode() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_NAVIGATION_ENTRY_H_\n"
  },
  {
    "path": "CEF/include/cef_origin_whitelist.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_ORIGIN_WHITELIST_H_\n#define CEF_INCLUDE_CEF_ORIGIN_WHITELIST_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\n\n///\n// Add an entry to the cross-origin access whitelist.\n//\n// The same-origin policy restricts how scripts hosted from different origins\n// (scheme + domain + port) can communicate. By default, scripts can only access\n// resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes\n// (but no other schemes) can use the \"Access-Control-Allow-Origin\" header to\n// allow cross-origin requests. For example, https://source.example.com can make\n// XMLHttpRequest requests on http://target.example.com if the\n// http://target.example.com request returns an \"Access-Control-Allow-Origin:\n// https://source.example.com\" response header.\n//\n// Scripts in separate frames or iframes and hosted from the same protocol and\n// domain suffix can execute cross-origin JavaScript if both pages set the\n// document.domain value to the same domain suffix. For example,\n// scheme://foo.example.com and scheme://bar.example.com can communicate using\n// JavaScript if both domains set document.domain=\"example.com\".\n//\n// This method is used to allow access to origins that would otherwise violate\n// the same-origin policy. Scripts hosted underneath the fully qualified\n// |source_origin| URL (like http://www.example.com) will be allowed access to\n// all resources hosted on the specified |target_protocol| and |target_domain|.\n// If |target_domain| is non-empty and |allow_target_subdomains| if false only\n// exact domain matches will be allowed. If |target_domain| contains a top-\n// level domain component (like \"example.com\") and |allow_target_subdomains| is\n// true sub-domain matches will be allowed. If |target_domain| is empty and\n// |allow_target_subdomains| if true all domains and IP addresses will be\n// allowed.\n//\n// This method cannot be used to bypass the restrictions on local or display\n// isolated schemes. See the comments on CefRegisterCustomScheme for more\n// information.\n//\n// This function may be called on any thread. Returns false if |source_origin|\n// is invalid or the whitelist cannot be accessed.\n///\n/*--cef(optional_param=target_domain)--*/\nbool CefAddCrossOriginWhitelistEntry(const CefString& source_origin,\n                                     const CefString& target_protocol,\n                                     const CefString& target_domain,\n                                     bool allow_target_subdomains);\n\n///\n// Remove an entry from the cross-origin access whitelist. Returns false if\n// |source_origin| is invalid or the whitelist cannot be accessed.\n///\n/*--cef(optional_param=target_domain)--*/\nbool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin,\n                                        const CefString& target_protocol,\n                                        const CefString& target_domain,\n                                        bool allow_target_subdomains);\n\n///\n// Remove all entries from the cross-origin access whitelist. Returns false if\n// the whitelist cannot be accessed.\n///\n/*--cef()--*/\nbool CefClearCrossOriginWhitelist();\n\n#endif  // CEF_INCLUDE_CEF_ORIGIN_WHITELIST_H_\n"
  },
  {
    "path": "CEF/include/cef_pack_resources.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file is generated by the make_pack_header.py tool.\n//\n\n#ifndef CEF_INCLUDE_CEF_PACK_RESOURCES_H_\n#define CEF_INCLUDE_CEF_PACK_RESOURCES_H_\n#pragma once\n\n// ---------------------------------------------------------------------------\n// From blink_resources.h:\n\n#define IDR_UASTYLE_HTML_CSS 30370\n#define IDR_UASTYLE_QUIRKS_CSS 30371\n#define IDR_UASTYLE_VIEW_SOURCE_CSS 30372\n#define IDR_UASTYLE_THEME_CHROMIUM_ANDROID_CSS 30373\n#define IDR_UASTYLE_MEDIA_CONTROLS_ANDROID_CSS 30374\n#define IDR_UASTYLE_MEDIA_CONTROLS_ANDROID_NEW_CSS 30375\n#define IDR_UASTYLE_THEME_CHROMIUM_LINUX_CSS 30376\n#define IDR_UASTYLE_THEME_MAC_CSS 30377\n#define IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_CSS 30378\n#define IDR_UASTYLE_THEME_WIN_CSS 30379\n#define IDR_UASTYLE_THEME_WIN_QUIRKS_CSS 30380\n#define IDR_UASTYLE_SVG_CSS 30381\n#define IDR_UASTYLE_MATHML_CSS 30382\n#define IDR_UASTYLE_MEDIA_CONTROLS_CSS 30383\n#define IDR_UASTYLE_MEDIA_CONTROLS_NEW_CSS 30384\n#define IDR_UASTYLE_FULLSCREEN_CSS 30385\n#define IDR_UASTYLE_XHTMLMP_CSS 30386\n#define IDR_UASTYLE_VIEWPORT_ANDROID_CSS 30387\n#define IDR_INSPECTOR_OVERLAY_PAGE_HTML 30388\n#define IDR_PRIVATE_SCRIPT_DOCUMENTEXECCOMMAND_JS 30389\n#define IDR_PRIVATE_SCRIPT_DOCUMENTXMLTREEVIEWER_CSS 30390\n#define IDR_PRIVATE_SCRIPT_DOCUMENTXMLTREEVIEWER_JS 30391\n#define IDR_PRIVATE_SCRIPT_HTMLMARQUEEELEMENT_JS 30392\n#define IDR_PRIVATE_SCRIPT_PRIVATESCRIPTRUNNER_JS 30393\n#define IDR_PICKER_COMMON_JS 30394\n#define IDR_PICKER_COMMON_CSS 30395\n#define IDR_CALENDAR_PICKER_CSS 30396\n#define IDR_CALENDAR_PICKER_JS 30397\n#define IDR_PICKER_BUTTON_CSS 30398\n#define IDR_SUGGESTION_PICKER_CSS 30399\n#define IDR_SUGGESTION_PICKER_JS 30400\n#define IDR_COLOR_SUGGESTION_PICKER_CSS 30401\n#define IDR_COLOR_SUGGESTION_PICKER_JS 30402\n#define IDR_LIST_PICKER_CSS 30403\n#define IDR_LIST_PICKER_JS 30404\n#define IDR_AUDIO_SPATIALIZATION_COMPOSITE 30405\n#define IDR_AUDIO_SPATIALIZATION_T000_P000 30406\n#define IDR_AUDIO_SPATIALIZATION_T000_P015 30407\n#define IDR_AUDIO_SPATIALIZATION_T000_P030 30408\n#define IDR_AUDIO_SPATIALIZATION_T000_P045 30409\n#define IDR_AUDIO_SPATIALIZATION_T000_P060 30410\n#define IDR_AUDIO_SPATIALIZATION_T000_P075 30411\n#define IDR_AUDIO_SPATIALIZATION_T000_P090 30412\n#define IDR_AUDIO_SPATIALIZATION_T000_P315 30413\n#define IDR_AUDIO_SPATIALIZATION_T000_P330 30414\n#define IDR_AUDIO_SPATIALIZATION_T000_P345 30415\n#define IDR_AUDIO_SPATIALIZATION_T015_P000 30416\n#define IDR_AUDIO_SPATIALIZATION_T015_P015 30417\n#define IDR_AUDIO_SPATIALIZATION_T015_P030 30418\n#define IDR_AUDIO_SPATIALIZATION_T015_P045 30419\n#define IDR_AUDIO_SPATIALIZATION_T015_P060 30420\n#define IDR_AUDIO_SPATIALIZATION_T015_P075 30421\n#define IDR_AUDIO_SPATIALIZATION_T015_P090 30422\n#define IDR_AUDIO_SPATIALIZATION_T015_P315 30423\n#define IDR_AUDIO_SPATIALIZATION_T015_P330 30424\n#define IDR_AUDIO_SPATIALIZATION_T015_P345 30425\n#define IDR_AUDIO_SPATIALIZATION_T030_P000 30426\n#define IDR_AUDIO_SPATIALIZATION_T030_P015 30427\n#define IDR_AUDIO_SPATIALIZATION_T030_P030 30428\n#define IDR_AUDIO_SPATIALIZATION_T030_P045 30429\n#define IDR_AUDIO_SPATIALIZATION_T030_P060 30430\n#define IDR_AUDIO_SPATIALIZATION_T030_P075 30431\n#define IDR_AUDIO_SPATIALIZATION_T030_P090 30432\n#define IDR_AUDIO_SPATIALIZATION_T030_P315 30433\n#define IDR_AUDIO_SPATIALIZATION_T030_P330 30434\n#define IDR_AUDIO_SPATIALIZATION_T030_P345 30435\n#define IDR_AUDIO_SPATIALIZATION_T045_P000 30436\n#define IDR_AUDIO_SPATIALIZATION_T045_P015 30437\n#define IDR_AUDIO_SPATIALIZATION_T045_P030 30438\n#define IDR_AUDIO_SPATIALIZATION_T045_P045 30439\n#define IDR_AUDIO_SPATIALIZATION_T045_P060 30440\n#define IDR_AUDIO_SPATIALIZATION_T045_P075 30441\n#define IDR_AUDIO_SPATIALIZATION_T045_P090 30442\n#define IDR_AUDIO_SPATIALIZATION_T045_P315 30443\n#define IDR_AUDIO_SPATIALIZATION_T045_P330 30444\n#define IDR_AUDIO_SPATIALIZATION_T045_P345 30445\n#define IDR_AUDIO_SPATIALIZATION_T060_P000 30446\n#define IDR_AUDIO_SPATIALIZATION_T060_P015 30447\n#define IDR_AUDIO_SPATIALIZATION_T060_P030 30448\n#define IDR_AUDIO_SPATIALIZATION_T060_P045 30449\n#define IDR_AUDIO_SPATIALIZATION_T060_P060 30450\n#define IDR_AUDIO_SPATIALIZATION_T060_P075 30451\n#define IDR_AUDIO_SPATIALIZATION_T060_P090 30452\n#define IDR_AUDIO_SPATIALIZATION_T060_P315 30453\n#define IDR_AUDIO_SPATIALIZATION_T060_P330 30454\n#define IDR_AUDIO_SPATIALIZATION_T060_P345 30455\n#define IDR_AUDIO_SPATIALIZATION_T075_P000 30456\n#define IDR_AUDIO_SPATIALIZATION_T075_P015 30457\n#define IDR_AUDIO_SPATIALIZATION_T075_P030 30458\n#define IDR_AUDIO_SPATIALIZATION_T075_P045 30459\n#define IDR_AUDIO_SPATIALIZATION_T075_P060 30460\n#define IDR_AUDIO_SPATIALIZATION_T075_P075 30461\n#define IDR_AUDIO_SPATIALIZATION_T075_P090 30462\n#define IDR_AUDIO_SPATIALIZATION_T075_P315 30463\n#define IDR_AUDIO_SPATIALIZATION_T075_P330 30464\n#define IDR_AUDIO_SPATIALIZATION_T075_P345 30465\n#define IDR_AUDIO_SPATIALIZATION_T090_P000 30466\n#define IDR_AUDIO_SPATIALIZATION_T090_P015 30467\n#define IDR_AUDIO_SPATIALIZATION_T090_P030 30468\n#define IDR_AUDIO_SPATIALIZATION_T090_P045 30469\n#define IDR_AUDIO_SPATIALIZATION_T090_P060 30470\n#define IDR_AUDIO_SPATIALIZATION_T090_P075 30471\n#define IDR_AUDIO_SPATIALIZATION_T090_P090 30472\n#define IDR_AUDIO_SPATIALIZATION_T090_P315 30473\n#define IDR_AUDIO_SPATIALIZATION_T090_P330 30474\n#define IDR_AUDIO_SPATIALIZATION_T090_P345 30475\n#define IDR_AUDIO_SPATIALIZATION_T105_P000 30476\n#define IDR_AUDIO_SPATIALIZATION_T105_P015 30477\n#define IDR_AUDIO_SPATIALIZATION_T105_P030 30478\n#define IDR_AUDIO_SPATIALIZATION_T105_P045 30479\n#define IDR_AUDIO_SPATIALIZATION_T105_P060 30480\n#define IDR_AUDIO_SPATIALIZATION_T105_P075 30481\n#define IDR_AUDIO_SPATIALIZATION_T105_P090 30482\n#define IDR_AUDIO_SPATIALIZATION_T105_P315 30483\n#define IDR_AUDIO_SPATIALIZATION_T105_P330 30484\n#define IDR_AUDIO_SPATIALIZATION_T105_P345 30485\n#define IDR_AUDIO_SPATIALIZATION_T120_P000 30486\n#define IDR_AUDIO_SPATIALIZATION_T120_P015 30487\n#define IDR_AUDIO_SPATIALIZATION_T120_P030 30488\n#define IDR_AUDIO_SPATIALIZATION_T120_P045 30489\n#define IDR_AUDIO_SPATIALIZATION_T120_P060 30490\n#define IDR_AUDIO_SPATIALIZATION_T120_P075 30491\n#define IDR_AUDIO_SPATIALIZATION_T120_P090 30492\n#define IDR_AUDIO_SPATIALIZATION_T120_P315 30493\n#define IDR_AUDIO_SPATIALIZATION_T120_P330 30494\n#define IDR_AUDIO_SPATIALIZATION_T120_P345 30495\n#define IDR_AUDIO_SPATIALIZATION_T135_P000 30496\n#define IDR_AUDIO_SPATIALIZATION_T135_P015 30497\n#define IDR_AUDIO_SPATIALIZATION_T135_P030 30498\n#define IDR_AUDIO_SPATIALIZATION_T135_P045 30499\n#define IDR_AUDIO_SPATIALIZATION_T135_P060 30500\n#define IDR_AUDIO_SPATIALIZATION_T135_P075 30501\n#define IDR_AUDIO_SPATIALIZATION_T135_P090 30502\n#define IDR_AUDIO_SPATIALIZATION_T135_P315 30503\n#define IDR_AUDIO_SPATIALIZATION_T135_P330 30504\n#define IDR_AUDIO_SPATIALIZATION_T135_P345 30505\n#define IDR_AUDIO_SPATIALIZATION_T150_P000 30506\n#define IDR_AUDIO_SPATIALIZATION_T150_P015 30507\n#define IDR_AUDIO_SPATIALIZATION_T150_P030 30508\n#define IDR_AUDIO_SPATIALIZATION_T150_P045 30509\n#define IDR_AUDIO_SPATIALIZATION_T150_P060 30510\n#define IDR_AUDIO_SPATIALIZATION_T150_P075 30511\n#define IDR_AUDIO_SPATIALIZATION_T150_P090 30512\n#define IDR_AUDIO_SPATIALIZATION_T150_P315 30513\n#define IDR_AUDIO_SPATIALIZATION_T150_P330 30514\n#define IDR_AUDIO_SPATIALIZATION_T150_P345 30515\n#define IDR_AUDIO_SPATIALIZATION_T165_P000 30516\n#define IDR_AUDIO_SPATIALIZATION_T165_P015 30517\n#define IDR_AUDIO_SPATIALIZATION_T165_P030 30518\n#define IDR_AUDIO_SPATIALIZATION_T165_P045 30519\n#define IDR_AUDIO_SPATIALIZATION_T165_P060 30520\n#define IDR_AUDIO_SPATIALIZATION_T165_P075 30521\n#define IDR_AUDIO_SPATIALIZATION_T165_P090 30522\n#define IDR_AUDIO_SPATIALIZATION_T165_P315 30523\n#define IDR_AUDIO_SPATIALIZATION_T165_P330 30524\n#define IDR_AUDIO_SPATIALIZATION_T165_P345 30525\n#define IDR_AUDIO_SPATIALIZATION_T180_P000 30526\n#define IDR_AUDIO_SPATIALIZATION_T180_P015 30527\n#define IDR_AUDIO_SPATIALIZATION_T180_P030 30528\n#define IDR_AUDIO_SPATIALIZATION_T180_P045 30529\n#define IDR_AUDIO_SPATIALIZATION_T180_P060 30530\n#define IDR_AUDIO_SPATIALIZATION_T180_P075 30531\n#define IDR_AUDIO_SPATIALIZATION_T180_P090 30532\n#define IDR_AUDIO_SPATIALIZATION_T180_P315 30533\n#define IDR_AUDIO_SPATIALIZATION_T180_P330 30534\n#define IDR_AUDIO_SPATIALIZATION_T180_P345 30535\n#define IDR_AUDIO_SPATIALIZATION_T195_P000 30536\n#define IDR_AUDIO_SPATIALIZATION_T195_P015 30537\n#define IDR_AUDIO_SPATIALIZATION_T195_P030 30538\n#define IDR_AUDIO_SPATIALIZATION_T195_P045 30539\n#define IDR_AUDIO_SPATIALIZATION_T195_P060 30540\n#define IDR_AUDIO_SPATIALIZATION_T195_P075 30541\n#define IDR_AUDIO_SPATIALIZATION_T195_P090 30542\n#define IDR_AUDIO_SPATIALIZATION_T195_P315 30543\n#define IDR_AUDIO_SPATIALIZATION_T195_P330 30544\n#define IDR_AUDIO_SPATIALIZATION_T195_P345 30545\n#define IDR_AUDIO_SPATIALIZATION_T210_P000 30546\n#define IDR_AUDIO_SPATIALIZATION_T210_P015 30547\n#define IDR_AUDIO_SPATIALIZATION_T210_P030 30548\n#define IDR_AUDIO_SPATIALIZATION_T210_P045 30549\n#define IDR_AUDIO_SPATIALIZATION_T210_P060 30550\n#define IDR_AUDIO_SPATIALIZATION_T210_P075 30551\n#define IDR_AUDIO_SPATIALIZATION_T210_P090 30552\n#define IDR_AUDIO_SPATIALIZATION_T210_P315 30553\n#define IDR_AUDIO_SPATIALIZATION_T210_P330 30554\n#define IDR_AUDIO_SPATIALIZATION_T210_P345 30555\n#define IDR_AUDIO_SPATIALIZATION_T225_P000 30556\n#define IDR_AUDIO_SPATIALIZATION_T225_P015 30557\n#define IDR_AUDIO_SPATIALIZATION_T225_P030 30558\n#define IDR_AUDIO_SPATIALIZATION_T225_P045 30559\n#define IDR_AUDIO_SPATIALIZATION_T225_P060 30560\n#define IDR_AUDIO_SPATIALIZATION_T225_P075 30561\n#define IDR_AUDIO_SPATIALIZATION_T225_P090 30562\n#define IDR_AUDIO_SPATIALIZATION_T225_P315 30563\n#define IDR_AUDIO_SPATIALIZATION_T225_P330 30564\n#define IDR_AUDIO_SPATIALIZATION_T225_P345 30565\n#define IDR_AUDIO_SPATIALIZATION_T240_P000 30566\n#define IDR_AUDIO_SPATIALIZATION_T240_P015 30567\n#define IDR_AUDIO_SPATIALIZATION_T240_P030 30568\n#define IDR_AUDIO_SPATIALIZATION_T240_P045 30569\n#define IDR_AUDIO_SPATIALIZATION_T240_P060 30570\n#define IDR_AUDIO_SPATIALIZATION_T240_P075 30571\n#define IDR_AUDIO_SPATIALIZATION_T240_P090 30572\n#define IDR_AUDIO_SPATIALIZATION_T240_P315 30573\n#define IDR_AUDIO_SPATIALIZATION_T240_P330 30574\n#define IDR_AUDIO_SPATIALIZATION_T240_P345 30575\n#define IDR_AUDIO_SPATIALIZATION_T255_P000 30576\n#define IDR_AUDIO_SPATIALIZATION_T255_P015 30577\n#define IDR_AUDIO_SPATIALIZATION_T255_P030 30578\n#define IDR_AUDIO_SPATIALIZATION_T255_P045 30579\n#define IDR_AUDIO_SPATIALIZATION_T255_P060 30580\n#define IDR_AUDIO_SPATIALIZATION_T255_P075 30581\n#define IDR_AUDIO_SPATIALIZATION_T255_P090 30582\n#define IDR_AUDIO_SPATIALIZATION_T255_P315 30583\n#define IDR_AUDIO_SPATIALIZATION_T255_P330 30584\n#define IDR_AUDIO_SPATIALIZATION_T255_P345 30585\n#define IDR_AUDIO_SPATIALIZATION_T270_P000 30586\n#define IDR_AUDIO_SPATIALIZATION_T270_P015 30587\n#define IDR_AUDIO_SPATIALIZATION_T270_P030 30588\n#define IDR_AUDIO_SPATIALIZATION_T270_P045 30589\n#define IDR_AUDIO_SPATIALIZATION_T270_P060 30590\n#define IDR_AUDIO_SPATIALIZATION_T270_P075 30591\n#define IDR_AUDIO_SPATIALIZATION_T270_P090 30592\n#define IDR_AUDIO_SPATIALIZATION_T270_P315 30593\n#define IDR_AUDIO_SPATIALIZATION_T270_P330 30594\n#define IDR_AUDIO_SPATIALIZATION_T270_P345 30595\n#define IDR_AUDIO_SPATIALIZATION_T285_P000 30596\n#define IDR_AUDIO_SPATIALIZATION_T285_P015 30597\n#define IDR_AUDIO_SPATIALIZATION_T285_P030 30598\n#define IDR_AUDIO_SPATIALIZATION_T285_P045 30599\n#define IDR_AUDIO_SPATIALIZATION_T285_P060 30600\n#define IDR_AUDIO_SPATIALIZATION_T285_P075 30601\n#define IDR_AUDIO_SPATIALIZATION_T285_P090 30602\n#define IDR_AUDIO_SPATIALIZATION_T285_P315 30603\n#define IDR_AUDIO_SPATIALIZATION_T285_P330 30604\n#define IDR_AUDIO_SPATIALIZATION_T285_P345 30605\n#define IDR_AUDIO_SPATIALIZATION_T300_P000 30606\n#define IDR_AUDIO_SPATIALIZATION_T300_P015 30607\n#define IDR_AUDIO_SPATIALIZATION_T300_P030 30608\n#define IDR_AUDIO_SPATIALIZATION_T300_P045 30609\n#define IDR_AUDIO_SPATIALIZATION_T300_P060 30610\n#define IDR_AUDIO_SPATIALIZATION_T300_P075 30611\n#define IDR_AUDIO_SPATIALIZATION_T300_P090 30612\n#define IDR_AUDIO_SPATIALIZATION_T300_P315 30613\n#define IDR_AUDIO_SPATIALIZATION_T300_P330 30614\n#define IDR_AUDIO_SPATIALIZATION_T300_P345 30615\n#define IDR_AUDIO_SPATIALIZATION_T315_P000 30616\n#define IDR_AUDIO_SPATIALIZATION_T315_P015 30617\n#define IDR_AUDIO_SPATIALIZATION_T315_P030 30618\n#define IDR_AUDIO_SPATIALIZATION_T315_P045 30619\n#define IDR_AUDIO_SPATIALIZATION_T315_P060 30620\n#define IDR_AUDIO_SPATIALIZATION_T315_P075 30621\n#define IDR_AUDIO_SPATIALIZATION_T315_P090 30622\n#define IDR_AUDIO_SPATIALIZATION_T315_P315 30623\n#define IDR_AUDIO_SPATIALIZATION_T315_P330 30624\n#define IDR_AUDIO_SPATIALIZATION_T315_P345 30625\n#define IDR_AUDIO_SPATIALIZATION_T330_P000 30626\n#define IDR_AUDIO_SPATIALIZATION_T330_P015 30627\n#define IDR_AUDIO_SPATIALIZATION_T330_P030 30628\n#define IDR_AUDIO_SPATIALIZATION_T330_P045 30629\n#define IDR_AUDIO_SPATIALIZATION_T330_P060 30630\n#define IDR_AUDIO_SPATIALIZATION_T330_P075 30631\n#define IDR_AUDIO_SPATIALIZATION_T330_P090 30632\n#define IDR_AUDIO_SPATIALIZATION_T330_P315 30633\n#define IDR_AUDIO_SPATIALIZATION_T330_P330 30634\n#define IDR_AUDIO_SPATIALIZATION_T330_P345 30635\n#define IDR_AUDIO_SPATIALIZATION_T345_P000 30636\n#define IDR_AUDIO_SPATIALIZATION_T345_P015 30637\n#define IDR_AUDIO_SPATIALIZATION_T345_P030 30638\n#define IDR_AUDIO_SPATIALIZATION_T345_P045 30639\n#define IDR_AUDIO_SPATIALIZATION_T345_P060 30640\n#define IDR_AUDIO_SPATIALIZATION_T345_P075 30641\n#define IDR_AUDIO_SPATIALIZATION_T345_P090 30642\n#define IDR_AUDIO_SPATIALIZATION_T345_P315 30643\n#define IDR_AUDIO_SPATIALIZATION_T345_P330 30644\n#define IDR_AUDIO_SPATIALIZATION_T345_P345 30645\n\n// ---------------------------------------------------------------------------\n// From cef_resources.h:\n\n#define IDR_CEF_DEVTOOLS_DISCOVERY_PAGE 27500\n#define IDR_CEF_LICENSE_TXT 27501\n#define IDR_CEF_VERSION_HTML 27502\n#define IDR_CEF_EXTENSION_API_FEATURES 27503\n#define IDR_PDF_MANIFEST 27504\n#define IDR_BLOCKED_PLUGIN_HTML 27505\n#define IDR_PLUGIN_POSTER_HTML 27506\n#define IDR_PLUGIN_DB_JSON 27507\n\n// ---------------------------------------------------------------------------\n// From component_extension_resources.h:\n\n#define IDR_BOOKMARK_MANAGER_MAIN 1450\n#define IDR_HOTWORD_AUDIO_VERIFICATION_MAIN 1451\n#define IDR_WALLPAPER_MANAGER_MAIN 1452\n#define IDR_FIRST_RUN_DIALOG_MAIN 1453\n#define IDR_NETWORK_SPEECH_SYNTHESIS_JS 1000\n#define IDR_BRAILLE_IME_JS 1001\n#define IDR_BRAILLE_IME_MAIN_JS 1002\n#define IDR_BOOKMARK_MANAGER_BOOKMARK_MANAGER_SEARCH 1003\n#define IDR_BOOKMARK_MANAGER_BOOKMARK_MANAGER_SEARCH_RTL 1004\n#define IDR_BOOKMARK_MANAGER_BOOKMARK_MAIN_JS 1005\n#define IDR_BOOKMARK_MANAGER_BOOKMARK_BMM_LIST_JS 1006\n#define IDR_BOOKMARK_MANAGER_BOOKMARK_BMM_TREE_JS 1007\n#define IDR_BOOKMARK_MANAGER_BOOKMARK_DND_JS 1008\n#define IDR_BOOKMARK_MANAGER_BOOKMARK_BMM_JS 1009\n#define IDR_GAIA_AUTH_MAIN 1010\n#define IDR_GAIA_AUTH_MAIN_JS 1011\n#define IDR_GAIA_AUTH_MAIN_CSS 1012\n#define IDR_GAIA_AUTH_OFFLINE 1013\n#define IDR_GAIA_AUTH_OFFLINE_JS 1014\n#define IDR_GAIA_AUTH_OFFLINE_CSS 1015\n#define IDR_GAIA_AUTH_SUCCESS 1016\n#define IDR_GAIA_AUTH_UTIL_JS 1017\n#define IDR_GAIA_AUTH_BACKGROUND_JS 1018\n#define IDR_GAIA_AUTH_SAML_INJECTED_JS 1019\n#define IDR_GAIA_AUTH_CHANNEL_JS 1020\n#define IDR_HANGOUT_SERVICES_BACKGROUND_HTML 1021\n#define IDR_HANGOUT_SERVICES_THUNK_JS 1022\n#define IDR_HOTWORD_AUDIO_VERIFICATION_BACKGROUND_JS 1023\n#define IDR_HOTWORD_AUDIO_VERIFICATION_MAIN_JS 1024\n#define IDR_HOTWORD_AUDIO_VERIFICATION_FLOW_JS 1025\n#define IDR_START_STEP_HTML 1026\n#define IDR_AUDIO_HISTORY_STEP_HTML 1027\n#define IDR_SPEECH_TRAINING_STEP_HTML 1028\n#define IDR_FINISHED_STEP_HTML 1029\n#define IDR_HOTWORD_AUDIO_VERIFICATION_STYLE_CSS 1030\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CLOSE_1X 1031\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CLOSE_2X 1032\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_INTRO_1X 1033\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_INTRO_2X 1034\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_HEADER_1X 1035\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_HEADER_2X 1036\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CHECK_BLUE_1X 1037\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CHECK_BLUE_2X 1038\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CHECK_GRAY_1X 1039\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CHECK_GRAY_2X 1040\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_LOADER_1X 1041\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_LOADER_2X 1042\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_ERROR_1X 1043\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_ERROR_2X 1044\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_ICON_16 1045\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_ICON_48 1046\n#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_ICON_128 1047\n#define IDR_HOTWORD_ALWAYS_ON_MANAGER_JS 1048\n#define IDR_HOTWORD_AUDIO_CLIENT_JS 1049\n#define IDR_HOTWORD_BASE_SESSION_MANAGER_JS 1050\n#define IDR_HOTWORD_CONSTANTS_JS 1051\n#define IDR_HOTWORD_KEEP_ALIVE_JS 1052\n#define IDR_HOTWORD_LAUNCHER_MANAGER_JS 1053\n#define IDR_HOTWORD_LOGGING_JS 1054\n#define IDR_HOTWORD_MANAGER_JS 1055\n#define IDR_HOTWORD_METRICS_JS 1056\n#define IDR_HOTWORD_NACL_MANAGER_JS 1057\n#define IDR_HOTWORD_PAGE_AUDIO_MANAGER_JS 1058\n#define IDR_HOTWORD_STATE_MANAGER_JS 1059\n#define IDR_HOTWORD_TRAINING_MANAGER_JS 1060\n#define IDR_FEEDBACK_DEFAULT_HTML 1061\n#define IDR_FEEDBACK_SYSINFO_HTML 1062\n#define IDR_FEEDBACK_EVENT_HANDLER_JS 1063\n#define IDR_FEEDBACK_FEEDBACK_JS 1064\n#define IDR_FEEDBACK_SYSINFO_JS 1065\n#define IDR_FEEDBACK_TAKE_SCREENSHOT_JS 1066\n#define IDR_FEEDBACK_TOPBAR_HANDLER_JS 1067\n#define IDR_FEEDBACK_FEEDBACK_CSS 1068\n#define IDR_FEEDBACK_ICON_32 1069\n#define IDR_FEEDBACK_ICON_64 1070\n#define IDR_GOOGLE_NOW_BACKGROUND_JS 1071\n#define IDR_GOOGLE_NOW_CARDS_JS 1072\n#define IDR_GOOGLE_NOW_UTILITY_JS 1073\n#define IDR_GOOGLE_NOW_ICON_16 1074\n#define IDR_GOOGLE_NOW_ICON_48 1075\n#define IDR_GOOGLE_NOW_ICON_128 1076\n#define IDR_IDENTITY_API_SCOPE_APPROVAL_BACKGROUND_JS 1077\n#define IDR_IDENTITY_API_SCOPE_APPROVAL_DIALOG_CSS 1078\n#define IDR_IDENTITY_API_SCOPE_APPROVAL_DIALOG 1079\n#define IDR_IDENTITY_API_SCOPE_APPROVAL_DIALOG_JS 1080\n#define IDR_WALLPAPER_MANAGER_CONSTANTS_JS 1081\n#define IDR_WALLPAPER_MANAGER_EVENT_JS 1082\n#define IDR_WALLPAPER_MANAGER_ICON_16 1083\n#define IDR_WALLPAPER_MANAGER_ICON_32 1084\n#define IDR_WALLPAPER_MANAGER_ICON_48 1085\n#define IDR_WALLPAPER_MANAGER_ICON_64 1086\n#define IDR_WALLPAPER_MANAGER_ICON_96 1087\n#define IDR_WALLPAPER_MANAGER_ICON_128 1088\n#define IDR_WALLPAPER_MANAGER_ICON_256 1089\n#define IDR_WALLPAPER_MANAGER_MAIN_JS 1090\n#define IDR_WALLPAPER_MANAGER_UTIL_JS 1091\n#define IDR_FIRST_RUN_DIALOG_BACKGROUND_JS 1092\n#define IDR_FIRST_RUN_DIALOG_MAIN_JS 1093\n#define IDR_FIRST_RUN_DIALOG_ICON_16 1094\n#define IDR_FIRST_RUN_DIALOG_ICON_32 1095\n#define IDR_FIRST_RUN_DIALOG_ICON_48 1096\n#define IDR_FIRST_RUN_DIALOG_ICON_64 1097\n#define IDR_FIRST_RUN_DIALOG_ICON_96 1098\n#define IDR_FIRST_RUN_DIALOG_ICON_128 1099\n#define IDR_FIRST_RUN_DIALOG_ICON_256 1100\n#define IDR_ARC_SUPPORT_BACKGROUND_JS 1101\n#define IDR_ARC_SUPPORT_MAIN_CSS 1102\n#define IDR_ARC_SUPPORT_MAIN 1103\n#define IDR_ARC_SUPPORT_ICON 1104\n#define IDR_ARC_SUPPORT_ICON_PLAYSTORE 1105\n#define IDR_ARC_SUPPORT_ICON_CHROME 1106\n#define IDR_SETTINGS_APP_JS 1107\n#define IDR_PDF_INDEX_CSS 1108\n#define IDR_PDF_INDEX_HTML 1109\n#define IDR_PDF_MAIN_JS 1110\n#define IDR_PDF_PDF_JS 1111\n#define IDR_PDF_UI_MANAGER_JS 1112\n#define IDR_PDF_VIEWPORT_JS 1113\n#define IDR_PDF_OPEN_PDF_PARAMS_PARSER_JS 1114\n#define IDR_PDF_NAVIGATOR_JS 1115\n#define IDR_PDF_VIEWPORT_SCROLLER_JS 1116\n#define IDR_PDF_PDF_SCRIPTING_API_JS 1117\n#define IDR_PDF_ZOOM_MANAGER_JS 1118\n#define IDR_PDF_BROWSER_API_JS 1119\n#define IDR_PDF_CONTENT_SCRIPT_JS 1120\n#define IDR_PDF_SHARED_ICON_STYLE_CSS 1121\n#define IDR_PDF_VIEWER_BOOKMARK_CSS 1122\n#define IDR_PDF_VIEWER_BOOKMARK_HTML 1123\n#define IDR_PDF_VIEWER_BOOKMARK_JS 1124\n#define IDR_PDF_VIEWER_BOOKMARKS_CONTENT_HTML 1125\n#define IDR_PDF_VIEWER_BOOKMARKS_CONTENT_JS 1126\n#define IDR_PDF_VIEWER_ERROR_SCREEN_CSS 1127\n#define IDR_PDF_VIEWER_ERROR_SCREEN_HTML 1128\n#define IDR_PDF_VIEWER_ERROR_SCREEN_JS 1129\n#define IDR_PDF_VIEWER_PAGE_INDICATOR_CSS 1130\n#define IDR_PDF_VIEWER_PAGE_INDICATOR_HTML 1131\n#define IDR_PDF_VIEWER_PAGE_INDICATOR_JS 1132\n#define IDR_PDF_VIEWER_PAGE_SELECTOR_CSS 1133\n#define IDR_PDF_VIEWER_PAGE_SELECTOR_HTML 1134\n#define IDR_PDF_VIEWER_PAGE_SELECTOR_JS 1135\n#define IDR_PDF_VIEWER_PASSWORD_SCREEN_HTML 1136\n#define IDR_PDF_VIEWER_PASSWORD_SCREEN_JS 1137\n#define IDR_PDF_VIEWER_PDF_TOOLBAR_CSS 1138\n#define IDR_PDF_VIEWER_PDF_TOOLBAR_HTML 1139\n#define IDR_PDF_VIEWER_PDF_TOOLBAR_JS 1140\n#define IDR_PDF_VIEWER_TOOLBAR_DROPDOWN_CSS 1141\n#define IDR_PDF_VIEWER_TOOLBAR_DROPDOWN_HTML 1142\n#define IDR_PDF_VIEWER_TOOLBAR_DROPDOWN_JS 1143\n#define IDR_PDF_VIEWER_ZOOM_BUTTON_CSS 1144\n#define IDR_PDF_VIEWER_ZOOM_BUTTON_HTML 1145\n#define IDR_PDF_VIEWER_ZOOM_BUTTON_JS 1146\n#define IDR_PDF_VIEWER_ZOOM_SELECTOR_CSS 1147\n#define IDR_PDF_VIEWER_ZOOM_SELECTOR_HTML 1148\n#define IDR_PDF_VIEWER_ZOOM_SELECTOR_JS 1149\n#define IDR_CRYPTOTOKEN_UTIL_JS 1150\n#define IDR_CRYPTOTOKEN_B64_JS 1151\n#define IDR_CRYPTOTOKEN_CLOSEABLE_JS 1152\n#define IDR_CRYPTOTOKEN_COUNTDOWN_JS 1153\n#define IDR_CRYPTOTOKEN_COUNTDOWNTIMER_JS 1154\n#define IDR_CRYPTOTOKEN_SHA256_JS 1155\n#define IDR_CRYPTOTOKEN_TIMER_JS 1156\n#define IDR_CRYPTOTOKEN_HIDGNUBBYDEVICE_JS 1157\n#define IDR_CRYPTOTOKEN_USBGNUBBYDEVICE_JS 1158\n#define IDR_CRYPTOTOKEN_GNUBBIES_JS 1159\n#define IDR_CRYPTOTOKEN_GNUBBY_JS 1160\n#define IDR_CRYPTOTOKEN_GNUBBY_U2F_JS 1161\n#define IDR_CRYPTOTOKEN_GNUBBYFACTORY_JS 1162\n#define IDR_CRYPTOTOKEN_USBGNUBBYFACTORY_JS 1163\n#define IDR_CRYPTOTOKEN_DEVICESTATUSCODES_JS 1164\n#define IDR_CRYPTOTOKEN_ENROLLER_JS 1165\n#define IDR_CRYPTOTOKEN_USBENROLLHANDLER_JS 1166\n#define IDR_CRYPTOTOKEN_REQUESTQUEUE_JS 1167\n#define IDR_CRYPTOTOKEN_SIGNER_JS 1168\n#define IDR_CRYPTOTOKEN_SINGLESIGNER_JS 1169\n#define IDR_CRYPTOTOKEN_MULTIPLESIGNER_JS 1170\n#define IDR_CRYPTOTOKEN_USBSIGNHANDLER_JS 1171\n#define IDR_CRYPTOTOKEN_WEBREQUEST_JS 1172\n#define IDR_CRYPTOTOKEN_APPID_JS 1173\n#define IDR_CRYPTOTOKEN_USBHELPER_JS 1174\n#define IDR_CRYPTOTOKEN_TEXTFETCHER_JS 1175\n#define IDR_CRYPTOTOKEN_REQUESTHELPER_JS 1176\n#define IDR_CRYPTOTOKEN_MESSAGETYPES_JS 1177\n#define IDR_CRYPTOTOKEN_INHERITS_JS 1178\n#define IDR_CRYPTOTOKEN_GNUBBYDEVICE_JS 1179\n#define IDR_CRYPTOTOKEN_GENERICHELPER_JS 1180\n#define IDR_CRYPTOTOKEN_FACTORYREGISTRY_JS 1181\n#define IDR_CRYPTOTOKEN_ERRORCODES_JS 1182\n#define IDR_CRYPTOTOKEN_DEVICEFACTORYREGISTRY_JS 1183\n#define IDR_CRYPTOTOKEN_ORIGINCHECK_JS 1184\n#define IDR_CRYPTOTOKEN_INDIVIDUALATTEST_JS 1185\n#define IDR_CRYPTOTOKEN_GOOGLECORPINDIVIDUALATTEST_JS 1186\n#define IDR_CRYPTOTOKEN_APPROVEDORIGINS_JS 1187\n#define IDR_CRYPTOTOKEN_WEBREQUESTSENDER_JS 1188\n#define IDR_CRYPTOTOKEN_WINDOW_TIMER_JS 1189\n#define IDR_CRYPTOTOKEN_WATCHDOG_JS 1190\n#define IDR_CRYPTOTOKEN_LOGGING_JS 1191\n#define IDR_CRYPTOTOKEN_CRYPTOTOKENAPPROVEDORIGIN_JS 1192\n#define IDR_CRYPTOTOKEN_CRYPTOTOKENORIGINCHECK_JS 1193\n#define IDR_CRYPTOTOKEN_CRYPTOTOKENBACKGROUND_JS 1194\n#define IDR_WHISPERNET_PROXY_BACKGROUND_HTML 1195\n#define IDR_WHISPERNET_PROXY_INIT_JS 1196\n#define IDR_WHISPERNET_PROXY_NACL_JS 1197\n#define IDR_WHISPERNET_PROXY_WRAPPER_JS 1198\n#define IDR_WHISPERNET_PROXY_WHISPERNET_PROXY_PROXY_NMF 1199\n#define IDR_WHISPERNET_PROXY_WHISPERNET_PROXY_PROXY_PEXE 1200\n\n// ---------------------------------------------------------------------------\n// From content_resources.h:\n\n#define IDR_ACCESSIBILITY_HTML 23950\n#define IDR_ACCESSIBILITY_CSS 23951\n#define IDR_ACCESSIBILITY_JS 23952\n#define IDR_APPCACHE_INTERNALS_HTML 23953\n#define IDR_APPCACHE_INTERNALS_JS 23954\n#define IDR_APPCACHE_INTERNALS_CSS 23955\n#define IDR_DEVTOOLS_PINCH_CURSOR_ICON 23956\n#define IDR_DEVTOOLS_PINCH_CURSOR_ICON_2X 23957\n#define IDR_DEVTOOLS_TOUCH_CURSOR_ICON 23958\n#define IDR_DEVTOOLS_TOUCH_CURSOR_ICON_2X 23959\n#define IDR_GPU_INTERNALS_HTML 23960\n#define IDR_GPU_INTERNALS_JS 23961\n#define IDR_INDEXED_DB_INTERNALS_HTML 23962\n#define IDR_INDEXED_DB_INTERNALS_JS 23963\n#define IDR_INDEXED_DB_INTERNALS_CSS 23964\n#define IDR_MEDIA_INTERNALS_HTML 23965\n#define IDR_MEDIA_INTERNALS_JS 23966\n#define IDR_MOJO_CATALOG_MANIFEST 23967\n#define IDR_MOJO_CONTENT_BROWSER_MANIFEST 23968\n#define IDR_MOJO_CONTENT_RENDERER_MANIFEST 23969\n#define IDR_NETWORK_ERROR_LISTING_HTML 23970\n#define IDR_NETWORK_ERROR_LISTING_JS 23971\n#define IDR_NETWORK_ERROR_LISTING_CSS 23972\n#define IDR_SERVICE_WORKER_INTERNALS_HTML 23973\n#define IDR_SERVICE_WORKER_INTERNALS_JS 23974\n#define IDR_SERVICE_WORKER_INTERNALS_CSS 23975\n#define IDR_WEBRTC_INTERNALS_HTML 23976\n#define IDR_WEBRTC_INTERNALS_JS 23977\n#define IDR_GPU_SANDBOX_PROFILE 23978\n#define IDR_COMMON_SANDBOX_PROFILE 23979\n#define IDR_PPAPI_SANDBOX_PROFILE 23980\n#define IDR_RENDERER_SANDBOX_PROFILE 23981\n#define IDR_UTILITY_SANDBOX_PROFILE 23982\n#define IDR_MOJO_BINDINGS_JS 23983\n#define IDR_MOJO_BUFFER_JS 23984\n#define IDR_MOJO_CODEC_JS 23985\n#define IDR_MOJO_CONNECTION_JS 23986\n#define IDR_MOJO_CONNECTOR_JS 23987\n#define IDR_MOJO_ROUTER_JS 23988\n#define IDR_MOJO_UNICODE_JS 23989\n#define IDR_MOJO_VALIDATOR_JS 23990\n\n// ---------------------------------------------------------------------------\n// From devtools_resources.h:\n\n#define INSPECTOR_HTML 21450\n#define INSPECTOR_JS 21451\n#define TOOLBOX_HTML 21452\n#define TOOLBOX_JS 21453\n#define ACCESSIBILITY_MODULE_JS 21454\n#define ANIMATION_MODULE_JS 21455\n#define AUDITS_MODULE_JS 21456\n#define COMPONENTS_LAZY_MODULE_JS 21457\n#define CONSOLE_MODULE_JS 21458\n#define DEVICES_MODULE_JS 21459\n#define DIFF_MODULE_JS 21460\n#define ELEMENTS_MODULE_JS 21461\n#define ES_TREE_MODULE_JS 21462\n#define HEAP_SNAPSHOT_WORKER_MODULE_JS 21463\n#define LAYERS_MODULE_JS 21464\n#define NETWORK_MODULE_JS 21465\n#define PROFILER_MODULE_JS 21466\n#define RESOURCES_MODULE_JS 21467\n#define SASS_MODULE_JS 21468\n#define SECURITY_MODULE_JS 21469\n#define FORMATTER_WORKER_MODULE_JS 21470\n#define SETTINGS_MODULE_JS 21471\n#define SNIPPETS_MODULE_JS 21472\n#define SOURCE_FRAME_MODULE_JS 21473\n#define SOURCES_MODULE_JS 21474\n#define TEMP_STORAGE_SHARED_WORKER_MODULE_JS 21475\n#define TIMELINE_MODULE_JS 21476\n#define UI_LAZY_MODULE_JS 21477\n#define DEVTOOLS_EXTENSION_API_JS 21478\n#define DEVTOOLS_JS 21479\n#define TESTS_JS 21480\n#define IMAGES_APPLICATIONCACHE_PNG 21481\n#define IMAGES_BREAKPOINT_PNG 21482\n#define IMAGES_BREAKPOINTCONDITIONAL_PNG 21483\n#define IMAGES_BREAKPOINTCONDITIONAL_2X_PNG 21484\n#define IMAGES_BREAKPOINT_2X_PNG 21485\n#define IMAGES_CHECKER_PNG 21486\n#define IMAGES_CHROMEDISABLEDSELECT_PNG 21487\n#define IMAGES_CHROMEDISABLEDSELECT_2X_PNG 21488\n#define IMAGES_CHROMELEFT_PNG 21489\n#define IMAGES_CHROMEMIDDLE_PNG 21490\n#define IMAGES_CHROMERIGHT_PNG 21491\n#define IMAGES_CHROMESELECT_PNG 21492\n#define IMAGES_CHROMESELECT_2X_PNG 21493\n#define IMAGES_COOKIE_PNG 21494\n#define IMAGES_DATABASE_PNG 21495\n#define IMAGES_DATABASETABLE_PNG 21496\n#define IMAGES_DELETEICON_PNG 21497\n#define IMAGES_DOMAIN_PNG 21498\n#define IMAGES_ERRORWAVE_PNG 21499\n#define IMAGES_ERRORWAVE_2X_PNG 21500\n#define IMAGES_FILESYSTEM_PNG 21501\n#define IMAGES_FORWARD_PNG 21502\n#define IMAGES_FRAME_PNG 21503\n#define IMAGES_GRAPHLABELCALLOUTLEFT_PNG 21504\n#define IMAGES_GRAPHLABELCALLOUTRIGHT_PNG 21505\n#define IMAGES_IC_INFO_BLACK_18DP_SVG 21506\n#define IMAGES_IC_WARNING_BLACK_18DP_SVG 21507\n#define IMAGES_INDEXEDDB_PNG 21508\n#define IMAGES_INDEXEDDBINDEX_PNG 21509\n#define IMAGES_INDEXEDDBOBJECTSTORE_PNG 21510\n#define IMAGES_LOCALSTORAGE_PNG 21511\n#define IMAGES_NAVIGATIONCONTROLS_PNG 21512\n#define IMAGES_NAVIGATIONCONTROLS_2X_PNG 21513\n#define IMAGES_PANEADDBUTTONS_PNG 21514\n#define IMAGES_PANEFILTERBUTTONS_PNG 21515\n#define IMAGES_PANEREFRESHBUTTONS_PNG 21516\n#define IMAGES_POPOVERARROWS_PNG 21517\n#define IMAGES_PROFILEGROUPICON_PNG 21518\n#define IMAGES_PROFILEICON_PNG 21519\n#define IMAGES_PROFILESMALLICON_PNG 21520\n#define IMAGES_RADIODOT_PNG 21521\n#define IMAGES_RESIZEDIAGONAL_PNG 21522\n#define IMAGES_RESIZEDIAGONAL_2X_PNG 21523\n#define IMAGES_RESIZEHORIZONTAL_PNG 21524\n#define IMAGES_RESIZEHORIZONTAL_2X_PNG 21525\n#define IMAGES_RESIZEVERTICAL_PNG 21526\n#define IMAGES_RESIZEVERTICAL_2X_PNG 21527\n#define IMAGES_RESOURCECSSICON_PNG 21528\n#define IMAGES_RESOURCEDOCUMENTICON_PNG 21529\n#define IMAGES_RESOURCEDOCUMENTICONSMALL_PNG 21530\n#define IMAGES_RESOURCEJSICON_PNG 21531\n#define IMAGES_RESOURCEPLAINICON_PNG 21532\n#define IMAGES_RESOURCEPLAINICONSMALL_PNG 21533\n#define IMAGES_RESOURCESTIMEGRAPHICON_PNG 21534\n#define IMAGES_SEARCHNEXT_PNG 21535\n#define IMAGES_SEARCHPREV_PNG 21536\n#define IMAGES_SECURITYPROPERTYINFO_SVG 21537\n#define IMAGES_SECURITYPROPERTYINSECURE_SVG 21538\n#define IMAGES_SECURITYPROPERTYSECURE_SVG 21539\n#define IMAGES_SECURITYPROPERTYUNKNOWN_SVG 21540\n#define IMAGES_SECURITYPROPERTYWARNING_SVG 21541\n#define IMAGES_SECURITYSTATEINSECURE_SVG 21542\n#define IMAGES_SECURITYSTATENEUTRAL_SVG 21543\n#define IMAGES_SECURITYSTATESECURE_SVG 21544\n#define IMAGES_SERVICEWORKER_SVG 21545\n#define IMAGES_SESSIONSTORAGE_PNG 21546\n#define IMAGES_SETTINGSLISTREMOVE_PNG 21547\n#define IMAGES_SETTINGSLISTREMOVE_2X_PNG 21548\n#define IMAGES_SPEECH_PNG 21549\n#define IMAGES_TOOLBARBUTTONGLYPHS_PNG 21550\n#define IMAGES_TOOLBARBUTTONGLYPHS_2X_PNG 21551\n#define IMAGES_TOOLBARITEMSELECTED_PNG 21552\n#define IMAGES_TOOLBARRESIZERHORIZONTAL_PNG 21553\n#define IMAGES_TOOLBARRESIZERVERTICAL_PNG 21554\n#define IMAGES_TOUCHCURSOR_PNG 21555\n#define IMAGES_TOUCHCURSOR_2X_PNG 21556\n#define IMAGES_TRANSFORMCONTROLS_PNG 21557\n#define IMAGES_TRANSFORMCONTROLS_2X_PNG 21558\n\n// ---------------------------------------------------------------------------\n// From extensions_browser_resources.h:\n\n#define IDR_APP_DEFAULT_ICON 25750\n#define IDR_EXTENSION_DEFAULT_ICON 25751\n#define IDR_EXTENSION_ACTION_PLAIN_BACKGROUND 25752\n#define IDR_EXTENSION_ICON_PLAIN_BACKGROUND 25753\n\n// ---------------------------------------------------------------------------\n// From extensions_renderer_resources.h:\n\n#define IDR_APP_VIEW_JS 25800\n#define IDR_ASYNC_WAITER_JS 25801\n#define IDR_BROWSER_TEST_ENVIRONMENT_SPECIFIC_BINDINGS_JS 25802\n#define IDR_DATA_RECEIVER_JS 25803\n#define IDR_DATA_SENDER_JS 25804\n#define IDR_DATA_STREAM_MOJOM_JS 25805\n#define IDR_DATA_STREAM_SERIALIZATION_MOJOM_JS 25806\n#define IDR_ENTRY_ID_MANAGER 25807\n#define IDR_EVENT_BINDINGS_JS 25808\n#define IDR_EXTENSION_OPTIONS_JS 25809\n#define IDR_EXTENSION_OPTIONS_ATTRIBUTES_JS 25810\n#define IDR_EXTENSION_OPTIONS_CONSTANTS_JS 25811\n#define IDR_EXTENSION_OPTIONS_EVENTS_JS 25812\n#define IDR_EXTENSION_VIEW_JS 25813\n#define IDR_EXTENSION_VIEW_API_METHODS_JS 25814\n#define IDR_EXTENSION_VIEW_ATTRIBUTES_JS 25815\n#define IDR_EXTENSION_VIEW_CONSTANTS_JS 25816\n#define IDR_EXTENSION_VIEW_EVENTS_JS 25817\n#define IDR_EXTENSION_VIEW_INTERNAL_CUSTOM_BINDINGS_JS 25818\n#define IDR_GUEST_VIEW_ATTRIBUTES_JS 25819\n#define IDR_GUEST_VIEW_CONTAINER_JS 25820\n#define IDR_GUEST_VIEW_DENY_JS 25821\n#define IDR_GUEST_VIEW_EVENTS_JS 25822\n#define IDR_GUEST_VIEW_IFRAME_CONTAINER_JS 25823\n#define IDR_GUEST_VIEW_IFRAME_JS 25824\n#define IDR_GUEST_VIEW_JS 25825\n#define IDR_IMAGE_UTIL_JS 25826\n#define IDR_JSON_SCHEMA_JS 25827\n#define IDR_KEEP_ALIVE_JS 25828\n#define IDR_KEEP_ALIVE_MOJOM_JS 25829\n#define IDR_LAST_ERROR_JS 25830\n#define IDR_MESSAGING_JS 25831\n#define IDR_MESSAGING_UTILS_JS 25832\n#define IDR_MIME_HANDLER_PRIVATE_CUSTOM_BINDINGS_JS 25833\n#define IDR_MIME_HANDLER_MOJOM_JS 25834\n#define IDR_SCHEMA_UTILS_JS 25835\n#define IDR_SEND_REQUEST_JS 25836\n#define IDR_SERIAL_CUSTOM_BINDINGS_JS 25837\n#define IDR_SERIAL_MOJOM_JS 25838\n#define IDR_SERIAL_SERIALIZATION_MOJOM_JS 25839\n#define IDR_SERIAL_SERVICE_JS 25840\n#define IDR_SET_ICON_JS 25841\n#define IDR_STASH_CLIENT_JS 25842\n#define IDR_STASH_MOJOM_JS 25843\n#define IDR_TEST_CUSTOM_BINDINGS_JS 25844\n#define IDR_UNCAUGHT_EXCEPTION_HANDLER_JS 25845\n#define IDR_UTILS_JS 25846\n#define IDR_WEB_VIEW_ACTION_REQUESTS_JS 25847\n#define IDR_WEB_VIEW_API_METHODS_JS 25848\n#define IDR_WEB_VIEW_ATTRIBUTES_JS 25849\n#define IDR_WEB_VIEW_CONSTANTS_JS 25850\n#define IDR_WEB_VIEW_EVENTS_JS 25851\n#define IDR_WEB_VIEW_EXPERIMENTAL_JS 25852\n#define IDR_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS 25853\n#define IDR_WEB_VIEW_JS 25854\n#define IDR_APP_RUNTIME_CUSTOM_BINDINGS_JS 25855\n#define IDR_APP_WINDOW_CUSTOM_BINDINGS_JS 25856\n#define IDR_BINDING_JS 25857\n#define IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS 25858\n#define IDR_CONTEXT_MENUS_HANDLERS_JS 25859\n#define IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS 25860\n#define IDR_DISPLAY_SOURCE_CUSTOM_BINDINGS_JS 25861\n#define IDR_EXTENSION_CUSTOM_BINDINGS_JS 25862\n#define IDR_GREASEMONKEY_API_JS 25863\n#define IDR_I18N_CUSTOM_BINDINGS_JS 25864\n#define IDR_MOJO_PRIVATE_CUSTOM_BINDINGS_JS 25865\n#define IDR_PERMISSIONS_CUSTOM_BINDINGS_JS 25866\n#define IDR_PRINTER_PROVIDER_CUSTOM_BINDINGS_JS 25867\n#define IDR_RUNTIME_CUSTOM_BINDINGS_JS 25868\n#define IDR_SERVICE_WORKER_BINDINGS_JS 25869\n#define IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS 25870\n#define IDR_WEB_REQUEST_INTERNAL_CUSTOM_BINDINGS_JS 25871\n#define IDR_WINDOW_CONTROLS_JS 25872\n#define IDR_WINDOW_CONTROLS_TEMPLATE_HTML 25873\n#define IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS 25874\n#define IDR_STORAGE_AREA_JS 25875\n#define IDR_PLATFORM_APP_CSS 25876\n#define IDR_PLATFORM_APP_JS 25877\n#define IDR_EXTENSION_FONTS_CSS 25878\n#define IDR_MEDIA_ROUTER_MOJOM_JS 25879\n#define IDR_MEDIA_ROUTER_BINDINGS_JS 25880\n#define IDR_EXTENSION_CSS 25900\n\n// ---------------------------------------------------------------------------\n// From extensions_resources.h:\n\n#define IDR_EXTENSION_API_FEATURES 25550\n#define IDR_EXTENSION_API_JSON_DECLARATIVE_WEBREQUEST 25551\n#define IDR_EXTENSION_API_JSON_WEB_VIEW_REQUEST 25552\n#define IDR_EXTENSION_MANIFEST_FEATURES 25553\n#define IDR_EXTENSION_PERMISSION_FEATURES 25554\n#define IDR_EXTENSION_BEHAVIOR_FEATURES 25555\n\n// ---------------------------------------------------------------------------\n// From net_resources.h:\n\n#define IDR_DIR_HEADER_HTML 4000\n\n// ---------------------------------------------------------------------------\n// From ui_resources.h:\n\n#define IDR_AURA_CURSOR_BIG_ALIAS 5500\n#define IDR_AURA_CURSOR_BIG_CELL 5501\n#define IDR_AURA_CURSOR_BIG_COL_RESIZE 5502\n#define IDR_AURA_CURSOR_BIG_CONTEXT_MENU 5503\n#define IDR_AURA_CURSOR_BIG_COPY 5504\n#define IDR_AURA_CURSOR_BIG_CROSSHAIR 5505\n#define IDR_AURA_CURSOR_BIG_EAST_RESIZE 5506\n#define IDR_AURA_CURSOR_BIG_EAST_WEST_RESIZE 5507\n#define IDR_AURA_CURSOR_BIG_HAND 5508\n#define IDR_AURA_CURSOR_BIG_HELP 5509\n#define IDR_AURA_CURSOR_BIG_IBEAM 5510\n#define IDR_AURA_CURSOR_BIG_MOVE 5511\n#define IDR_AURA_CURSOR_BIG_NORTH_EAST_RESIZE 5512\n#define IDR_AURA_CURSOR_BIG_NORTH_EAST_SOUTH_WEST_RESIZE 5513\n#define IDR_AURA_CURSOR_BIG_NORTH_RESIZE 5514\n#define IDR_AURA_CURSOR_BIG_NORTH_SOUTH_RESIZE 5515\n#define IDR_AURA_CURSOR_BIG_NORTH_WEST_RESIZE 5516\n#define IDR_AURA_CURSOR_BIG_NORTH_WEST_SOUTH_EAST_RESIZE 5517\n#define IDR_AURA_CURSOR_BIG_NO_DROP 5518\n#define IDR_AURA_CURSOR_BIG_PTR 5519\n#define IDR_AURA_CURSOR_BIG_ROW_RESIZE 5520\n#define IDR_AURA_CURSOR_BIG_SOUTH_EAST_RESIZE 5521\n#define IDR_AURA_CURSOR_BIG_SOUTH_RESIZE 5522\n#define IDR_AURA_CURSOR_BIG_SOUTH_WEST_RESIZE 5523\n#define IDR_AURA_CURSOR_BIG_WEST_RESIZE 5524\n#define IDR_AURA_CURSOR_BIG_XTERM_HORIZ 5525\n#define IDR_AURA_CURSOR_BIG_ZOOM_IN 5526\n#define IDR_AURA_CURSOR_BIG_ZOOM_OUT 5527\n#define IDR_AURA_CURSOR_BIG_GRAB 5528\n#define IDR_AURA_CURSOR_BIG_GRABBING 5529\n#define IDR_AURA_CURSOR_ALIAS 5530\n#define IDR_AURA_CURSOR_CELL 5531\n#define IDR_AURA_CURSOR_COL_RESIZE 5532\n#define IDR_AURA_CURSOR_CONTEXT_MENU 5533\n#define IDR_AURA_CURSOR_COPY 5534\n#define IDR_AURA_CURSOR_CROSSHAIR 5535\n#define IDR_AURA_CURSOR_EAST_RESIZE 5536\n#define IDR_AURA_CURSOR_EAST_WEST_RESIZE 5537\n#define IDR_AURA_CURSOR_HAND 5538\n#define IDR_AURA_CURSOR_HELP 5539\n#define IDR_AURA_CURSOR_IBEAM 5540\n#define IDR_AURA_CURSOR_MOVE 5541\n#define IDR_AURA_CURSOR_NORTH_EAST_RESIZE 5542\n#define IDR_AURA_CURSOR_NORTH_EAST_SOUTH_WEST_RESIZE 5543\n#define IDR_AURA_CURSOR_NORTH_RESIZE 5544\n#define IDR_AURA_CURSOR_NORTH_SOUTH_RESIZE 5545\n#define IDR_AURA_CURSOR_NORTH_WEST_RESIZE 5546\n#define IDR_AURA_CURSOR_NORTH_WEST_SOUTH_EAST_RESIZE 5547\n#define IDR_AURA_CURSOR_NO_DROP 5548\n#define IDR_AURA_CURSOR_PTR 5549\n#define IDR_AURA_CURSOR_ROW_RESIZE 5550\n#define IDR_AURA_CURSOR_SOUTH_EAST_RESIZE 5551\n#define IDR_AURA_CURSOR_SOUTH_RESIZE 5552\n#define IDR_AURA_CURSOR_SOUTH_WEST_RESIZE 5553\n#define IDR_AURA_CURSOR_THROBBER 5554\n#define IDR_AURA_CURSOR_WEST_RESIZE 5555\n#define IDR_AURA_CURSOR_XTERM_HORIZ 5556\n#define IDR_AURA_CURSOR_ZOOM_IN 5557\n#define IDR_AURA_CURSOR_ZOOM_OUT 5558\n#define IDR_AURA_CURSOR_GRAB 5559\n#define IDR_AURA_CURSOR_GRABBING 5560\n#define IDR_AURA_SHADOW_ACTIVE 5561\n#define IDR_AURA_SHADOW_INACTIVE 5562\n#define IDR_WINDOW_BUBBLE_SHADOW_SMALL 5563\n#define IDR_BACK_ARROW 5564\n#define IDR_FORWARD_ARROW 5565\n#define IDR_BROWSER_ACTION_BADGE_CENTER 5566\n#define IDR_BROWSER_ACTION_BADGE_LEFT 5567\n#define IDR_BROWSER_ACTION_BADGE_RIGHT 5568\n#define IDR_CLOSE_2 5569\n#define IDR_CLOSE_2_H 5570\n#define IDR_CLOSE_2_MASK 5571\n#define IDR_CLOSE_2_P 5572\n#define IDR_CLOSE_3_MASK 5573\n#define IDR_CLOSE_4_BUTTON 5574\n#define IDR_CLOSE_DIALOG 5575\n#define IDR_CLOSE_DIALOG_H 5576\n#define IDR_CLOSE_DIALOG_P 5577\n#define IDR_DISABLE 5578\n#define IDR_DISABLE_H 5579\n#define IDR_DISABLE_P 5580\n#define IDR_DEFAULT_FAVICON 5581\n#define IDR_DEFAULT_FAVICON_32 5582\n#define IDR_DEFAULT_FAVICON_64 5583\n#define IDR_EASY_UNLOCK_HARDLOCKED 5584\n#define IDR_EASY_UNLOCK_HARDLOCKED_HOVER 5585\n#define IDR_EASY_UNLOCK_HARDLOCKED_PRESSED 5586\n#define IDR_EASY_UNLOCK_LOCKED 5587\n#define IDR_EASY_UNLOCK_LOCKED_HOVER 5588\n#define IDR_EASY_UNLOCK_LOCKED_PRESSED 5589\n#define IDR_EASY_UNLOCK_LOCKED_TO_BE_ACTIVATED 5590\n#define IDR_EASY_UNLOCK_LOCKED_TO_BE_ACTIVATED_HOVER 5591\n#define IDR_EASY_UNLOCK_LOCKED_TO_BE_ACTIVATED_PRESSED 5592\n#define IDR_EASY_UNLOCK_LOCKED_WITH_PROXIMITY_HINT 5593\n#define IDR_EASY_UNLOCK_LOCKED_WITH_PROXIMITY_HINT_HOVER 5594\n#define IDR_EASY_UNLOCK_LOCKED_WITH_PROXIMITY_HINT_PRESSED 5595\n#define IDR_EASY_UNLOCK_SPINNER 5596\n#define IDR_EASY_UNLOCK_UNLOCKED 5597\n#define IDR_EASY_UNLOCK_UNLOCKED_HOVER 5598\n#define IDR_EASY_UNLOCK_UNLOCKED_PRESSED 5599\n#define IDR_FOLDER_CLOSED 5600\n#define IDR_FOLDER_CLOSED_RTL 5601\n#define IDR_MENU_CHECK_CHECKED 5602\n#define IDR_MENU_HIERARCHY_ARROW 5603\n#define IDR_MENU_DROPARROW 5604\n#define IDR_MESSAGE_CLOSE 5605\n#define IDR_NOTIFICATION_ARROW 5606\n#define IDR_NOTIFICATION_ARROW_HOVER 5607\n#define IDR_NOTIFICATION_ARROW_PRESSED 5608\n#define IDR_NOTIFICATION_ADVANCED_SETTINGS 5609\n#define IDR_NOTIFICATION_ADVANCED_SETTINGS_HOVER 5610\n#define IDR_NOTIFICATION_ADVANCED_SETTINGS_PRESSED 5611\n#define IDR_NOTIFICATION_CLEAR_ALL 5612\n#define IDR_NOTIFICATION_CLEAR_ALL_DISABLED 5613\n#define IDR_NOTIFICATION_CLEAR_ALL_HOVER 5614\n#define IDR_NOTIFICATION_CLEAR_ALL_PRESSED 5615\n#define IDR_NOTIFICATION_CLOSE 5616\n#define IDR_NOTIFICATION_CLOSE_HOVER 5617\n#define IDR_NOTIFICATION_CLOSE_PRESSED 5618\n#define IDR_NOTIFICATION_BUBBLE_CLOSE 5619\n#define IDR_NOTIFICATION_BUBBLE_CLOSE_HOVER 5620\n#define IDR_NOTIFICATION_BUBBLE_CLOSE_PRESSED 5621\n#define IDR_NOTIFICATION_DO_NOT_DISTURB 5622\n#define IDR_NOTIFICATION_DO_NOT_DISTURB_HOVER 5623\n#define IDR_NOTIFICATION_DO_NOT_DISTURB_PRESSED 5624\n#define IDR_NOTIFICATION_SETTINGS 5625\n#define IDR_NOTIFICATION_SETTINGS_BUTTON_ICON 5626\n#define IDR_NOTIFICATION_SETTINGS_BUTTON_ICON_HOVER 5627\n#define IDR_NOTIFICATION_SETTINGS_BUTTON_ICON_PRESSED 5628\n#define IDR_NOTIFICATION_SETTINGS_HOVER 5629\n#define IDR_NOTIFICATION_SETTINGS_PRESSED 5630\n#define IDR_NTP_DEFAULT_FAVICON 5631\n#define IDR_OOBE_ACTION_BOX_BUTTON_HOVER 5632\n#define IDR_OOBE_ACTION_BOX_BUTTON_NORMAL 5633\n#define IDR_OOBE_ACTION_BOX_BUTTON_PRESSED 5634\n#define IDR_PANEL_TOP_LEFT_CORNER 5635\n#define IDR_PANEL_TOP_RIGHT_CORNER 5636\n#define IDR_PANEL_BOTTOM_LEFT_CORNER 5637\n#define IDR_PANEL_BOTTOM_RIGHT_CORNER 5638\n#define IDR_TEXT_SELECTION_HANDLE_CENTER 5639\n#define IDR_TEXT_SELECTION_HANDLE_LEFT 5640\n#define IDR_TEXT_SELECTION_HANDLE_RIGHT 5641\n#define IDR_THROBBER 5642\n#define IDR_TOUCH_DRAG_TIP_COPY 5643\n#define IDR_TOUCH_DRAG_TIP_MOVE 5644\n#define IDR_TOUCH_DRAG_TIP_LINK 5645\n#define IDR_TOUCH_DRAG_TIP_NODROP 5646\n\n// ---------------------------------------------------------------------------\n// From views_resources.h:\n\n#define IDR_APP_TOP_CENTER 5800\n#define IDR_APP_TOP_LEFT 5801\n#define IDR_APP_TOP_RIGHT 5802\n#define IDR_BUBBLE_B 5803\n#define IDR_BUBBLE_BL 5804\n#define IDR_BUBBLE_BR 5805\n#define IDR_BUBBLE_B_ARROW 5806\n#define IDR_BUBBLE_L 5807\n#define IDR_BUBBLE_L_ARROW 5808\n#define IDR_BUBBLE_R 5809\n#define IDR_BUBBLE_R_ARROW 5810\n#define IDR_BUBBLE_T 5811\n#define IDR_BUBBLE_TL 5812\n#define IDR_BUBBLE_TR 5813\n#define IDR_BUBBLE_T_ARROW 5814\n#define IDR_BUTTON_DISABLED 5815\n#define IDR_BUTTON_FOCUSED_HOVER 5816\n#define IDR_BUTTON_FOCUSED_NORMAL 5817\n#define IDR_BUTTON_FOCUSED_PRESSED 5818\n#define IDR_BUTTON_HOVER 5819\n#define IDR_BUTTON_NORMAL 5820\n#define IDR_BUTTON_PRESSED 5821\n#define IDR_BLUE_BUTTON_DISABLED 5822\n#define IDR_BLUE_BUTTON_FOCUSED_HOVER 5823\n#define IDR_BLUE_BUTTON_FOCUSED_NORMAL 5824\n#define IDR_BLUE_BUTTON_FOCUSED_PRESSED 5825\n#define IDR_BLUE_BUTTON_HOVER 5826\n#define IDR_BLUE_BUTTON_NORMAL 5827\n#define IDR_BLUE_BUTTON_PRESSED 5828\n#define IDR_CHECKBOX 5829\n#define IDR_CHECKBOX_CHECKED 5830\n#define IDR_CHECKBOX_CHECKED_DISABLED 5831\n#define IDR_CHECKBOX_CHECKED_HOVER 5832\n#define IDR_CHECKBOX_CHECKED_PRESSED 5833\n#define IDR_CHECKBOX_DISABLED 5834\n#define IDR_CHECKBOX_FOCUSED 5835\n#define IDR_CHECKBOX_FOCUSED_CHECKED 5836\n#define IDR_CHECKBOX_FOCUSED_CHECKED_HOVER 5837\n#define IDR_CHECKBOX_FOCUSED_CHECKED_PRESSED 5838\n#define IDR_CHECKBOX_FOCUSED_HOVER 5839\n#define IDR_CHECKBOX_FOCUSED_PRESSED 5840\n#define IDR_CHECKBOX_HOVER 5841\n#define IDR_CHECKBOX_PRESSED 5842\n#define IDR_CLOSE 5843\n#define IDR_CLOSE_H 5844\n#define IDR_CLOSE_P 5845\n#define IDR_COMBOBOX_BUTTON_BOTTOM 5846\n#define IDR_COMBOBOX_BUTTON_H_BOTTOM 5847\n#define IDR_COMBOBOX_BUTTON_P_BOTTOM 5848\n#define IDR_COMBOBOX_BUTTON_BOTTOM_LEFT 5849\n#define IDR_COMBOBOX_BUTTON_H_BOTTOM_LEFT 5850\n#define IDR_COMBOBOX_BUTTON_P_BOTTOM_LEFT 5851\n#define IDR_COMBOBOX_BUTTON_BOTTOM_RIGHT 5852\n#define IDR_COMBOBOX_BUTTON_H_BOTTOM_RIGHT 5853\n#define IDR_COMBOBOX_BUTTON_P_BOTTOM_RIGHT 5854\n#define IDR_COMBOBOX_BUTTON_CENTER 5855\n#define IDR_COMBOBOX_BUTTON_H_CENTER 5856\n#define IDR_COMBOBOX_BUTTON_P_CENTER 5857\n#define IDR_COMBOBOX_BUTTON_LEFT 5858\n#define IDR_COMBOBOX_BUTTON_H_LEFT 5859\n#define IDR_COMBOBOX_BUTTON_P_LEFT 5860\n#define IDR_COMBOBOX_BUTTON_RIGHT 5861\n#define IDR_COMBOBOX_BUTTON_H_RIGHT 5862\n#define IDR_COMBOBOX_BUTTON_P_RIGHT 5863\n#define IDR_COMBOBOX_BUTTON_MENU_BOTTOM 5864\n#define IDR_COMBOBOX_BUTTON_H_MENU_BOTTOM 5865\n#define IDR_COMBOBOX_BUTTON_P_MENU_BOTTOM 5866\n#define IDR_COMBOBOX_BUTTON_MENU_CENTER 5867\n#define IDR_COMBOBOX_BUTTON_H_MENU_CENTER 5868\n#define IDR_COMBOBOX_BUTTON_P_MENU_CENTER 5869\n#define IDR_COMBOBOX_BUTTON_MENU_TOP 5870\n#define IDR_COMBOBOX_BUTTON_H_MENU_TOP 5871\n#define IDR_COMBOBOX_BUTTON_P_MENU_TOP 5872\n#define IDR_COMBOBOX_BUTTON_TOP 5873\n#define IDR_COMBOBOX_BUTTON_H_TOP 5874\n#define IDR_COMBOBOX_BUTTON_P_TOP 5875\n#define IDR_COMBOBOX_BUTTON_TOP_LEFT 5876\n#define IDR_COMBOBOX_BUTTON_H_TOP_LEFT 5877\n#define IDR_COMBOBOX_BUTTON_P_TOP_LEFT 5878\n#define IDR_COMBOBOX_BUTTON_TOP_RIGHT 5879\n#define IDR_COMBOBOX_BUTTON_H_TOP_RIGHT 5880\n#define IDR_COMBOBOX_BUTTON_P_TOP_RIGHT 5881\n#define IDR_COMBOBOX_BUTTON_F_BOTTOM 5882\n#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM 5883\n#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM 5884\n#define IDR_COMBOBOX_BUTTON_F_BOTTOM_LEFT 5885\n#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM_LEFT 5886\n#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM_LEFT 5887\n#define IDR_COMBOBOX_BUTTON_F_BOTTOM_RIGHT 5888\n#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM_RIGHT 5889\n#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM_RIGHT 5890\n#define IDR_COMBOBOX_BUTTON_F_CENTER 5891\n#define IDR_COMBOBOX_BUTTON_F_H_CENTER 5892\n#define IDR_COMBOBOX_BUTTON_F_P_CENTER 5893\n#define IDR_COMBOBOX_BUTTON_F_LEFT 5894\n#define IDR_COMBOBOX_BUTTON_F_H_LEFT 5895\n#define IDR_COMBOBOX_BUTTON_F_P_LEFT 5896\n#define IDR_COMBOBOX_BUTTON_F_RIGHT 5897\n#define IDR_COMBOBOX_BUTTON_F_H_RIGHT 5898\n#define IDR_COMBOBOX_BUTTON_F_P_RIGHT 5899\n#define IDR_COMBOBOX_BUTTON_F_MENU_BOTTOM 5900\n#define IDR_COMBOBOX_BUTTON_F_H_MENU_BOTTOM 5901\n#define IDR_COMBOBOX_BUTTON_F_P_MENU_BOTTOM 5902\n#define IDR_COMBOBOX_BUTTON_F_MENU_CENTER 5903\n#define IDR_COMBOBOX_BUTTON_F_H_MENU_CENTER 5904\n#define IDR_COMBOBOX_BUTTON_F_P_MENU_CENTER 5905\n#define IDR_COMBOBOX_BUTTON_F_MENU_TOP 5906\n#define IDR_COMBOBOX_BUTTON_F_H_MENU_TOP 5907\n#define IDR_COMBOBOX_BUTTON_F_P_MENU_TOP 5908\n#define IDR_COMBOBOX_BUTTON_F_TOP 5909\n#define IDR_COMBOBOX_BUTTON_F_H_TOP 5910\n#define IDR_COMBOBOX_BUTTON_F_P_TOP 5911\n#define IDR_COMBOBOX_BUTTON_F_TOP_LEFT 5912\n#define IDR_COMBOBOX_BUTTON_F_H_TOP_LEFT 5913\n#define IDR_COMBOBOX_BUTTON_F_P_TOP_LEFT 5914\n#define IDR_COMBOBOX_BUTTON_F_TOP_RIGHT 5915\n#define IDR_COMBOBOX_BUTTON_F_H_TOP_RIGHT 5916\n#define IDR_COMBOBOX_BUTTON_F_P_TOP_RIGHT 5917\n#define IDR_CONTENT_BOTTOM_CENTER 5918\n#define IDR_CONTENT_BOTTOM_LEFT_CORNER 5919\n#define IDR_CONTENT_BOTTOM_RIGHT_CORNER 5920\n#define IDR_CONTENT_LEFT_SIDE 5921\n#define IDR_CONTENT_RIGHT_SIDE 5922\n#define IDR_FOLDER_OPEN 5923\n#define IDR_FOLDER_OPEN_RTL 5924\n#define IDR_FRAME 5925\n#define IDR_FRAME_INACTIVE 5926\n#define IDR_MAXIMIZE 5927\n#define IDR_MAXIMIZE_H 5928\n#define IDR_MAXIMIZE_P 5929\n#define IDR_MENU_CHECK 5930\n#define IDR_SLIDER_ACTIVE_LEFT 5931\n#define IDR_SLIDER_ACTIVE_RIGHT 5932\n#define IDR_SLIDER_ACTIVE_CENTER 5933\n#define IDR_SLIDER_DISABLED_LEFT 5934\n#define IDR_SLIDER_DISABLED_RIGHT 5935\n#define IDR_SLIDER_DISABLED_CENTER 5936\n#define IDR_SLIDER_PRESSED_LEFT 5937\n#define IDR_SLIDER_PRESSED_RIGHT 5938\n#define IDR_SLIDER_PRESSED_CENTER 5939\n#define IDR_SLIDER_ACTIVE_THUMB 5940\n#define IDR_SLIDER_DISABLED_THUMB 5941\n#define IDR_MINIMIZE 5942\n#define IDR_MINIMIZE_H 5943\n#define IDR_MINIMIZE_P 5944\n#define IDR_RADIO 5945\n#define IDR_RADIO_CHECKED 5946\n#define IDR_RADIO_CHECKED_DISABLED 5947\n#define IDR_RADIO_CHECKED_HOVER 5948\n#define IDR_RADIO_CHECKED_PRESSED 5949\n#define IDR_RADIO_DISABLED 5950\n#define IDR_RADIO_FOCUSED 5951\n#define IDR_RADIO_FOCUSED_CHECKED 5952\n#define IDR_RADIO_FOCUSED_CHECKED_HOVER 5953\n#define IDR_RADIO_FOCUSED_CHECKED_PRESSED 5954\n#define IDR_RADIO_FOCUSED_HOVER 5955\n#define IDR_RADIO_FOCUSED_PRESSED 5956\n#define IDR_RADIO_HOVER 5957\n#define IDR_RADIO_PRESSED 5958\n#define IDR_RESTORE 5959\n#define IDR_RESTORE_H 5960\n#define IDR_RESTORE_P 5961\n#define IDR_TEXTBUTTON_HOVER_BOTTOM 5962\n#define IDR_TEXTBUTTON_HOVER_BOTTOM_LEFT 5963\n#define IDR_TEXTBUTTON_HOVER_BOTTOM_RIGHT 5964\n#define IDR_TEXTBUTTON_HOVER_CENTER 5965\n#define IDR_TEXTBUTTON_HOVER_LEFT 5966\n#define IDR_TEXTBUTTON_HOVER_RIGHT 5967\n#define IDR_TEXTBUTTON_HOVER_TOP 5968\n#define IDR_TEXTBUTTON_HOVER_TOP_LEFT 5969\n#define IDR_TEXTBUTTON_HOVER_TOP_RIGHT 5970\n#define IDR_TEXTBUTTON_PRESSED_BOTTOM 5971\n#define IDR_TEXTBUTTON_PRESSED_BOTTOM_LEFT 5972\n#define IDR_TEXTBUTTON_PRESSED_BOTTOM_RIGHT 5973\n#define IDR_TEXTBUTTON_PRESSED_CENTER 5974\n#define IDR_TEXTBUTTON_PRESSED_LEFT 5975\n#define IDR_TEXTBUTTON_PRESSED_RIGHT 5976\n#define IDR_TEXTBUTTON_PRESSED_TOP 5977\n#define IDR_TEXTBUTTON_PRESSED_TOP_LEFT 5978\n#define IDR_TEXTBUTTON_PRESSED_TOP_RIGHT 5979\n#define IDR_WINDOW_BOTTOM_CENTER 5980\n#define IDR_WINDOW_BOTTOM_LEFT_CORNER 5981\n#define IDR_WINDOW_BOTTOM_RIGHT_CORNER 5982\n#define IDR_WINDOW_LEFT_SIDE 5983\n#define IDR_WINDOW_RIGHT_SIDE 5984\n#define IDR_WINDOW_TOP_CENTER 5985\n#define IDR_WINDOW_TOP_LEFT_CORNER 5986\n#define IDR_WINDOW_TOP_RIGHT_CORNER 5987\n#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM 5988\n#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_LEFT 5989\n#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_RIGHT 5990\n#define IDR_WINDOW_BUBBLE_SHADOW_BIG_LEFT 5991\n#define IDR_WINDOW_BUBBLE_SHADOW_BIG_RIGHT 5992\n#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP 5993\n#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_LEFT 5994\n#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_RIGHT 5995\n#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_BOTTOM 5996\n#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_LEFT 5997\n#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_RIGHT 5998\n#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_TOP 5999\n#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM 6000\n#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_LEFT 6001\n#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_RIGHT 6002\n#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_LEFT 6003\n#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_RIGHT 6004\n#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP 6005\n#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_LEFT 6006\n#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_RIGHT 6007\n#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_BOTTOM 6008\n#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_LEFT 6009\n#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_RIGHT 6010\n#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_TOP 6011\n\n// ---------------------------------------------------------------------------\n// From webui_resources.h:\n\n#define IDR_WEBUI_I18N_TEMPLATE_JS 2000\n#define IDR_WEBUI_JSTEMPLATE_JS 2001\n#define IDR_WEBUI_ANALYTICS_JS 2002\n#define IDR_WEBUI_ROBOTO_ROBOTO_LIGHT_WOFF2 2003\n#define IDR_WEBUI_ROBOTO_ROBOTO_REGULAR_WOFF2 2004\n#define IDR_WEBUI_ROBOTO_ROBOTO_MEDIUM_WOFF2 2005\n#define IDR_WEBUI_IMAGES_APPS_BUTTON 2006\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_PRESSED 2007\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_HOVER 2008\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_DISABLED 2009\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_FOCUSED 2010\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_FOCUSED_PRESSED 2011\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_FOCUSED_HOVER 2012\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON 2013\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_PRESSED 2014\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_HOVER 2015\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_DISABLED 2016\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_FOCUSED 2017\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_FOCUSED_PRESSED 2018\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_FOCUSED_HOVER 2019\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX 2020\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_HOVER 2021\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_PRESSED 2022\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED 2023\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_HOVER 2024\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_PRESSED 2025\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_INACTIVE 2026\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED 2027\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_HOVER 2028\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_PRESSED 2029\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED 2030\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED_HOVER 2031\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED_PRESSED 2032\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_INACTIVE 2033\n#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_CLOSE 2034\n#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_MAXIMIZE 2035\n#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_MINIMIZE 2036\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE 2037\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE_HOVER 2038\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE_PRESSED 2039\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X 2040\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_PRESSED 2041\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_HOVER 2042\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_DISABLED 2043\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_FOCUSED 2044\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_FOCUSED_PRESSED 2045\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_FOCUSED_HOVER 2046\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X 2047\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_PRESSED 2048\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_HOVER 2049\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_DISABLED 2050\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_FOCUSED 2051\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_FOCUSED_PRESSED 2052\n#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_FOCUSED_HOVER 2053\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X 2054\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X_HOVER 2055\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X_PRESSED 2056\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X_FOCUSED 2057\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X_FOCUSED_HOVER 2058\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X_FOCUSED_PRESSED 2059\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_INACTIVE_2X 2060\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_2X 2061\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_2X_HOVER 2062\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_2X_PRESSED 2063\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED_2X 2064\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED_2X_HOVER 2065\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED_2X_PRESSED 2066\n#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_INACTIVE_2X 2067\n#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_2X_CLOSE 2068\n#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_2X_MAXIMIZE 2069\n#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_2X_MINIMIZE 2070\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE_2X 2071\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE_HOVER_2X 2072\n#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE_PRESSED_2X 2073\n#define IDR_WEBUI_IMAGES_CHECK 2074\n#define IDR_WEBUI_IMAGES_CHECKBOX_BLACK 2075\n#define IDR_WEBUI_IMAGES_CHECKBOX_WHITE 2076\n#define IDR_WEBUI_IMAGES_DISABLED_SELECT 2077\n#define IDR_WEBUI_IMAGES_ERROR 2078\n#define IDR_WEBUI_IMAGES_SELECT 2079\n#define IDR_WEBUI_IMAGES_THROBBER_MEDIUM 2080\n#define IDR_WEBUI_IMAGES_THROBBER_SMALL 2081\n#define IDR_WEBUI_IMAGES_TRASH 2082\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_CDMA1XRTT 2083\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_3G 2084\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_4G 2085\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_EDGE 2086\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_EVDO 2087\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_GPRS 2088\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_HSPA 2089\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_HSPA_PLUS 2090\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_LTE 2091\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_LTE_ADVANCED 2092\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_ROAMING 2093\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_SECURE 2094\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_ICON_ETHERNET 2095\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_ICON_MOBILE 2096\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_ICON_VPN 2097\n#define IDR_WEBUI_CR_ELEMENTS_NETWORK_ICON_WIFI 2098\n#define IDR_WEBUI_CSS_ACTION_LINK 2200\n#define IDR_WEBUI_CSS_ALERT_OVERLAY 2201\n#define IDR_WEBUI_CSS_APPS_COMMON 2202\n#define IDR_WEBUI_CSS_APPS_TOPBUTTON_BAR 2203\n#define IDR_WEBUI_CSS_BUBBLE 2204\n#define IDR_WEBUI_CSS_BUBBLE_BUTTON 2205\n#define IDR_WEBUI_CSS_BUTTER_BAR 2206\n#define IDR_WEBUI_CSS_CHROME 2207\n#define IDR_WEBUI_CSS_CONTROLLED_INDICATOR 2208\n#define IDR_WEBUI_CSS_DIALOGS 2209\n#define IDR_WEBUI_CSS_I18N_PROCESS 2210\n#define IDR_WEBUI_CSS_LIST 2211\n#define IDR_WEBUI_CSS_MENU 2212\n#define IDR_WEBUI_CSS_MENU_BUTTON 2213\n#define IDR_WEBUI_CSS_TEXT_DEFAULTS 2214\n#define IDR_WEBUI_CSS_TEXT_DEFAULTS_MD 2215\n#define IDR_WEBUI_CSS_OVERLAY 2216\n#define IDR_WEBUI_CSS_ROBOTO 2217\n#define IDR_WEBUI_CSS_SPINNER 2218\n#define IDR_WEBUI_CSS_TABLE 2219\n#define IDR_WEBUI_CSS_TABS 2220\n#define IDR_WEBUI_CSS_THROBBER 2221\n#define IDR_WEBUI_CSS_TRASH 2222\n#define IDR_WEBUI_CSS_TREE 2223\n#define IDR_WEBUI_CSS_WIDGETS 2224\n#define IDR_WEBUI_HTML_ACTION_LINK 2225\n#define IDR_WEBUI_HTML_ASSERT 2226\n#define IDR_WEBUI_HTML_PROMISE_RESOLVER 2227\n#define IDR_WEBUI_HTML_CR 2228\n#define IDR_WEBUI_HTML_CR_EVENT_TARGET 2229\n#define IDR_WEBUI_HTML_CR_UI 2230\n#define IDR_WEBUI_HTML_CR_UI_ALERT_OVERLAY 2231\n#define IDR_WEBUI_HTML_CR_UI_COMMAND 2232\n#define IDR_WEBUI_HTML_CR_UI_CONTEXT_MENU_BUTTON 2233\n#define IDR_WEBUI_HTML_CR_UI_CONTEXT_MENU_HANDLER 2234\n#define IDR_WEBUI_HTML_CR_UI_FOCUS_GRID 2235\n#define IDR_WEBUI_HTML_CR_UI_FOCUS_MANAGER 2236\n#define IDR_WEBUI_HTML_CR_UI_FOCUS_OUTLINE_MANAGER 2237\n#define IDR_WEBUI_HTML_CR_UI_FOCUS_ROW 2238\n#define IDR_WEBUI_HTML_CR_UI_MENU 2239\n#define IDR_WEBUI_HTML_CR_UI_MENU_BUTTON 2240\n#define IDR_WEBUI_HTML_CR_UI_MENU_ITEM 2241\n#define IDR_WEBUI_HTML_CR_UI_OVERLAY 2242\n#define IDR_WEBUI_HTML_CR_UI_POSITION_UTIL 2243\n#define IDR_WEBUI_HTML_EVENT_TRACKER 2244\n#define IDR_WEBUI_HTML_I18N_TEMPLATE 2245\n#define IDR_WEBUI_HTML_LOAD_TIME_DATA 2246\n#define IDR_WEBUI_HTML_POLYMER 2247\n#define IDR_WEBUI_HTML_I18N_BEHAVIOR 2248\n#define IDR_WEBUI_HTML_UTIL 2249\n#define IDR_WEBUI_HTML_WEBUI_LISTENER_BEHAVIOR 2250\n#define IDR_WEBUI_JS_ACTION_LINK 2251\n#define IDR_WEBUI_JS_ASSERT 2252\n#define IDR_WEBUI_JS_PROMISE_RESOLVER 2253\n#define IDR_WEBUI_JS_CR 2254\n#define IDR_WEBUI_JS_CR_EVENT_TARGET 2255\n#define IDR_WEBUI_JS_CR_LINK_CONTROLLER 2256\n#define IDR_WEBUI_JS_CR_UI 2257\n#define IDR_WEBUI_JS_CR_UI_ALERT_OVERLAY 2258\n#define IDR_WEBUI_JS_CR_UI_ARRAY_DATA_MODEL 2259\n#define IDR_WEBUI_JS_CR_UI_AUTOCOMPLETE_LIST 2260\n#define IDR_WEBUI_JS_CR_UI_BUBBLE 2261\n#define IDR_WEBUI_JS_CR_UI_BUBBLE_BUTTON 2262\n#define IDR_WEBUI_JS_CR_UI_CARD_SLIDER 2263\n#define IDR_WEBUI_JS_CR_UI_COMMAND 2264\n#define IDR_WEBUI_JS_CR_UI_CONTEXT_MENU_BUTTON 2265\n#define IDR_WEBUI_JS_CR_UI_CONTEXT_MENU_HANDLER 2266\n#define IDR_WEBUI_JS_CR_UI_CONTROLLED_INDICATOR 2267\n#define IDR_WEBUI_JS_CR_UI_DIALOGS 2268\n#define IDR_WEBUI_JS_CR_UI_DRAG_WRAPPER 2269\n#define IDR_WEBUI_JS_CR_UI_FOCUS_GRID 2270\n#define IDR_WEBUI_JS_CR_UI_FOCUS_MANAGER 2271\n#define IDR_WEBUI_JS_CR_UI_FOCUS_OUTLINE_MANAGER 2272\n#define IDR_WEBUI_JS_CR_UI_FOCUS_ROW 2273\n#define IDR_WEBUI_JS_CR_UI_LIST 2274\n#define IDR_WEBUI_JS_CR_UI_LIST_ITEM 2275\n#define IDR_WEBUI_JS_CR_UI_LIST_SELECTION_CONTROLLER 2276\n#define IDR_WEBUI_JS_CR_UI_LIST_SELECTION_MODEL 2277\n#define IDR_WEBUI_JS_CR_UI_LIST_SINGLE_SELECTION_MODEL 2278\n#define IDR_WEBUI_JS_CR_UI_MENU 2279\n#define IDR_WEBUI_JS_CR_UI_MENU_BUTTON 2280\n#define IDR_WEBUI_JS_CR_UI_MENU_ITEM 2281\n#define IDR_WEBUI_JS_CR_UI_NODE_UTILS 2282\n#define IDR_WEBUI_JS_CR_UI_OVERLAY 2283\n#define IDR_WEBUI_JS_CR_UI_PAGE_MANAGER_PAGE 2284\n#define IDR_WEBUI_JS_CR_UI_PAGE_MANAGER_PAGE_MANAGER 2285\n#define IDR_WEBUI_JS_CR_UI_POSITION_UTIL 2286\n#define IDR_WEBUI_JS_CR_UI_SPLITTER 2287\n#define IDR_WEBUI_JS_CR_UI_GRID 2288\n#define IDR_WEBUI_JS_CR_UI_REPEATING_BUTTON 2289\n#define IDR_WEBUI_JS_CR_UI_TABLE 2290\n#define IDR_WEBUI_JS_CR_UI_TABLE_COLUMN 2291\n#define IDR_WEBUI_JS_CR_UI_TABLE_COLUMN_MODEL 2292\n#define IDR_WEBUI_JS_CR_UI_TABLE_HEADER 2293\n#define IDR_WEBUI_JS_CR_UI_TABLE_LIST 2294\n#define IDR_WEBUI_JS_CR_UI_TABLE_SPLITTER 2295\n#define IDR_WEBUI_JS_CR_UI_TABS 2296\n#define IDR_WEBUI_JS_CR_UI_TREE 2297\n#define IDR_WEBUI_JS_CR_UI_TOUCH_HANDLER 2298\n#define IDR_WEBUI_JS_EVENT_TRACKER 2299\n#define IDR_WEBUI_JS_I18N_TEMPLATE_NO_PROCESS 2300\n#define IDR_WEBUI_JS_LOAD_TIME_DATA 2301\n#define IDR_WEBUI_JS_MEDIA_COMMON 2302\n#define IDR_WEBUI_JS_PARSE_HTML_SUBSET 2303\n#define IDR_WEBUI_JS_POLYMER_CONFIG 2304\n#define IDR_WEBUI_JS_I18N_BEHAVIOR 2305\n#define IDR_WEBUI_JS_UTIL 2306\n#define IDR_WEBUI_JS_WEBUI_LISTENER_BEHAVIOR 2307\n#define IDR_WEBUI_JS_WEBUI_RESOURCE_TEST 2308\n#define IDR_WEBUI_CSS_UI_ACCOUNT_TWEAKS 2309\n#define IDR_WEBUI_HTML_UI_ACCOUNT_TWEAKS 2310\n#define IDR_WEBUI_JS_UI_ACCOUNT_TWEAKS 2311\n#define IDR_CR_ELEMENTS_CR_DEMO_ELEMENT_CSS 2312\n#define IDR_CR_ELEMENTS_CR_DEMO_ELEMENT_HTML 2313\n#define IDR_CR_ELEMENTS_CR_DEMO_ELEMENT_JS 2314\n#define IDR_CR_ELEMENTS_CR_DEMO_CONFIG_JS 2315\n#define IDR_CR_ELEMENTS_CR_DEMO_PAGE_HTML 2316\n#define IDR_CR_ELEMENTS_CR_EVENTS_HTML 2317\n#define IDR_CR_ELEMENTS_CR_EVENTS_JS 2318\n#define IDR_CR_ELEMENTS_CR_EXPAND_BUTTON_CSS 2319\n#define IDR_CR_ELEMENTS_CR_EXPAND_BUTTON_HTML 2320\n#define IDR_CR_ELEMENTS_CR_EXPAND_BUTTON_JS 2321\n#define IDR_CR_ELEMENTS_CR_NETWORK_ICON_CSS 2322\n#define IDR_CR_ELEMENTS_CR_NETWORK_ICON_HTML 2323\n#define IDR_CR_ELEMENTS_CR_NETWORK_ICON_JS 2324\n#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_CSS 2325\n#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_HTML 2326\n#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_JS 2327\n#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_ITEM_CSS 2328\n#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_ITEM_HTML 2329\n#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_ITEM_JS 2330\n#define IDR_CR_ELEMENTS_CR_NETWORK_SELECT_CSS 2331\n#define IDR_CR_ELEMENTS_CR_NETWORK_SELECT_HTML 2332\n#define IDR_CR_ELEMENTS_CR_NETWORK_SELECT_JS 2333\n#define IDR_CR_ELEMENTS_CR_ONC_TYPES_HTML 2334\n#define IDR_CR_ELEMENTS_CR_ONC_TYPES_JS 2335\n#define IDR_CR_ELEMENTS_CR_POLICY_INDICATOR_CSS 2336\n#define IDR_CR_ELEMENTS_CR_POLICY_INDICATOR_BEHAVIOR_HTML 2337\n#define IDR_CR_ELEMENTS_CR_POLICY_INDICATOR_BEHAVIOR_JS 2338\n#define IDR_CR_ELEMENTS_CR_POLICY_NETWORK_BEHAVIOR_HTML 2339\n#define IDR_CR_ELEMENTS_CR_POLICY_NETWORK_BEHAVIOR_JS 2340\n#define IDR_CR_ELEMENTS_CR_POLICY_NETWORK_INDICATOR_JS 2341\n#define IDR_CR_ELEMENTS_CR_POLICY_NETWORK_INDICATOR_HTML 2342\n#define IDR_CR_ELEMENTS_CR_POLICY_PREF_BEHAVIOR_HTML 2343\n#define IDR_CR_ELEMENTS_CR_POLICY_PREF_BEHAVIOR_JS 2344\n#define IDR_CR_ELEMENTS_CR_POLICY_PREF_INDICATOR_JS 2345\n#define IDR_CR_ELEMENTS_CR_POLICY_PREF_INDICATOR_HTML 2346\n#define IDR_CR_ELEMENTS_CR_SEARCH_FIELD_CSS 2347\n#define IDR_CR_ELEMENTS_CR_SEARCH_FIELD_HTML 2348\n#define IDR_CR_ELEMENTS_CR_SEARCH_FIELD_JS 2349\n#define IDR_CR_ELEMENTS_CR_SHARED_MENU_HTML 2350\n#define IDR_CR_ELEMENTS_CR_SHARED_MENU_JS 2351\n#define IDR_CR_ELEMENTS_SHARED_CSS 2352\n#define IDR_POLYMER_1_0_FONT_ROBOTO_ROBOTO_HTML 2353\n#define IDR_POLYMER_1_0_IRON_A11Y_KEYS_BEHAVIOR_IRON_A11Y_KEYS_BEHAVIOR_EXTRACTED_JS 2354\n#define IDR_POLYMER_1_0_IRON_A11Y_KEYS_BEHAVIOR_IRON_A11Y_KEYS_BEHAVIOR_HTML 2355\n#define IDR_POLYMER_1_0_IRON_A11Y_KEYS_IRON_A11Y_KEYS_EXTRACTED_JS 2356\n#define IDR_POLYMER_1_0_IRON_A11Y_KEYS_IRON_A11Y_KEYS_HTML 2357\n#define IDR_POLYMER_1_0_IRON_BEHAVIORS_IRON_BUTTON_STATE_EXTRACTED_JS 2358\n#define IDR_POLYMER_1_0_IRON_BEHAVIORS_IRON_BUTTON_STATE_HTML 2359\n#define IDR_POLYMER_1_0_IRON_BEHAVIORS_IRON_CONTROL_STATE_EXTRACTED_JS 2360\n#define IDR_POLYMER_1_0_IRON_BEHAVIORS_IRON_CONTROL_STATE_HTML 2361\n#define IDR_POLYMER_1_0_IRON_CHECKED_ELEMENT_BEHAVIOR_IRON_CHECKED_ELEMENT_BEHAVIOR_EXTRACTED_JS 2362\n#define IDR_POLYMER_1_0_IRON_CHECKED_ELEMENT_BEHAVIOR_IRON_CHECKED_ELEMENT_BEHAVIOR_HTML 2363\n#define IDR_POLYMER_1_0_IRON_COLLAPSE_IRON_COLLAPSE_EXTRACTED_JS 2364\n#define IDR_POLYMER_1_0_IRON_COLLAPSE_IRON_COLLAPSE_HTML 2365\n#define IDR_POLYMER_1_0_IRON_DROPDOWN_IRON_DROPDOWN_EXTRACTED_JS 2366\n#define IDR_POLYMER_1_0_IRON_DROPDOWN_IRON_DROPDOWN_SCROLL_MANAGER_EXTRACTED_JS 2367\n#define IDR_POLYMER_1_0_IRON_DROPDOWN_IRON_DROPDOWN_SCROLL_MANAGER_HTML 2368\n#define IDR_POLYMER_1_0_IRON_DROPDOWN_IRON_DROPDOWN_HTML 2369\n#define IDR_POLYMER_1_0_IRON_FIT_BEHAVIOR_IRON_FIT_BEHAVIOR_EXTRACTED_JS 2370\n#define IDR_POLYMER_1_0_IRON_FIT_BEHAVIOR_IRON_FIT_BEHAVIOR_HTML 2371\n#define IDR_POLYMER_1_0_IRON_FLEX_LAYOUT_CLASSES_IRON_FLEX_LAYOUT_HTML 2372\n#define IDR_POLYMER_1_0_IRON_FLEX_LAYOUT_CLASSES_IRON_FLEX_LAYOUT_EXTRACTED_JS 2373\n#define IDR_POLYMER_1_0_IRON_FLEX_LAYOUT_CLASSES_IRON_SHADOW_FLEX_LAYOUT_HTML 2374\n#define IDR_POLYMER_1_0_IRON_FLEX_LAYOUT_CLASSES_IRON_SHADOW_FLEX_LAYOUT_EXTRACTED_JS 2375\n#define IDR_POLYMER_1_0_IRON_FLEX_LAYOUT_IRON_FLEX_LAYOUT_HTML 2376\n#define IDR_POLYMER_1_0_IRON_FORM_ELEMENT_BEHAVIOR_IRON_FORM_ELEMENT_BEHAVIOR_EXTRACTED_JS 2377\n#define IDR_POLYMER_1_0_IRON_FORM_ELEMENT_BEHAVIOR_IRON_FORM_ELEMENT_BEHAVIOR_HTML 2378\n#define IDR_POLYMER_1_0_IRON_ICON_IRON_ICON_EXTRACTED_JS 2379\n#define IDR_POLYMER_1_0_IRON_ICON_IRON_ICON_HTML 2380\n#define IDR_POLYMER_1_0_IRON_ICONS_AV_ICONS_HTML 2381\n#define IDR_POLYMER_1_0_IRON_ICONS_COMMUNICATION_ICONS_HTML 2382\n#define IDR_POLYMER_1_0_IRON_ICONS_DEVICE_ICONS_HTML 2383\n#define IDR_POLYMER_1_0_IRON_ICONS_HARDWARE_ICONS_HTML 2384\n#define IDR_POLYMER_1_0_IRON_ICONS_IMAGE_ICONS_HTML 2385\n#define IDR_POLYMER_1_0_IRON_ICONS_IRON_ICONS_HTML 2386\n#define IDR_POLYMER_1_0_IRON_ICONS_NOTIFICATION_ICONS_HTML 2387\n#define IDR_POLYMER_1_0_IRON_ICONS_PLACES_ICONS_HTML 2388\n#define IDR_POLYMER_1_0_IRON_ICONS_SOCIAL_ICONS_HTML 2389\n#define IDR_POLYMER_1_0_IRON_ICONSET_SVG_IRON_ICONSET_SVG_EXTRACTED_JS 2390\n#define IDR_POLYMER_1_0_IRON_ICONSET_SVG_IRON_ICONSET_SVG_HTML 2391\n#define IDR_POLYMER_1_0_IRON_IMAGE_IRON_IMAGE_EXTRACTED_JS 2392\n#define IDR_POLYMER_1_0_IRON_IMAGE_IRON_IMAGE_HTML 2393\n#define IDR_POLYMER_1_0_IRON_INPUT_IRON_INPUT_EXTRACTED_JS 2394\n#define IDR_POLYMER_1_0_IRON_INPUT_IRON_INPUT_HTML 2395\n#define IDR_POLYMER_1_0_IRON_LIST_IRON_LIST_EXTRACTED_JS 2396\n#define IDR_POLYMER_1_0_IRON_LIST_IRON_LIST_HTML 2397\n#define IDR_POLYMER_1_0_IRON_MEDIA_QUERY_IRON_MEDIA_QUERY_EXTRACTED_JS 2398\n#define IDR_POLYMER_1_0_IRON_MEDIA_QUERY_IRON_MEDIA_QUERY_HTML 2399\n#define IDR_POLYMER_1_0_IRON_MENU_BEHAVIOR_IRON_MENU_BEHAVIOR_EXTRACTED_JS 2400\n#define IDR_POLYMER_1_0_IRON_MENU_BEHAVIOR_IRON_MENU_BEHAVIOR_HTML 2401\n#define IDR_POLYMER_1_0_IRON_MENU_BEHAVIOR_IRON_MENUBAR_BEHAVIOR_EXTRACTED_JS 2402\n#define IDR_POLYMER_1_0_IRON_MENU_BEHAVIOR_IRON_MENUBAR_BEHAVIOR_HTML 2403\n#define IDR_POLYMER_1_0_IRON_META_IRON_META_EXTRACTED_JS 2404\n#define IDR_POLYMER_1_0_IRON_META_IRON_META_HTML 2405\n#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_BACKDROP_EXTRACTED_JS 2406\n#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_BACKDROP_HTML 2407\n#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_BEHAVIOR_EXTRACTED_JS 2408\n#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_BEHAVIOR_HTML 2409\n#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_MANAGER_EXTRACTED_JS 2410\n#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_MANAGER_HTML 2411\n#define IDR_POLYMER_1_0_IRON_PAGES_IRON_PAGES_EXTRACTED_JS 2412\n#define IDR_POLYMER_1_0_IRON_PAGES_IRON_PAGES_HTML 2413\n#define IDR_POLYMER_1_0_IRON_RANGE_BEHAVIOR_IRON_RANGE_BEHAVIOR_EXTRACTED_JS 2414\n#define IDR_POLYMER_1_0_IRON_RANGE_BEHAVIOR_IRON_RANGE_BEHAVIOR_HTML 2415\n#define IDR_POLYMER_1_0_IRON_RESIZABLE_BEHAVIOR_IRON_RESIZABLE_BEHAVIOR_EXTRACTED_JS 2416\n#define IDR_POLYMER_1_0_IRON_RESIZABLE_BEHAVIOR_IRON_RESIZABLE_BEHAVIOR_HTML 2417\n#define IDR_POLYMER_1_0_IRON_SCROLL_TARGET_BEHAVIOR_IRON_SCROLL_TARGET_BEHAVIOR_EXTRACTED_JS 2418\n#define IDR_POLYMER_1_0_IRON_SCROLL_TARGET_BEHAVIOR_IRON_SCROLL_TARGET_BEHAVIOR_HTML 2419\n#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_MULTI_SELECTABLE_EXTRACTED_JS 2420\n#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_MULTI_SELECTABLE_HTML 2421\n#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTABLE_EXTRACTED_JS 2422\n#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTABLE_HTML 2423\n#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTION_EXTRACTED_JS 2424\n#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTION_HTML 2425\n#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTOR_EXTRACTED_JS 2426\n#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTOR_HTML 2427\n#define IDR_POLYMER_1_0_IRON_TEST_HELPERS_IRON_TEST_HELPERS_HTML 2428\n#define IDR_POLYMER_1_0_IRON_TEST_HELPERS_MOCK_INTERACTIONS_HTML 2429\n#define IDR_POLYMER_1_0_IRON_TEST_HELPERS_MOCK_INTERACTIONS_JS 2430\n#define IDR_POLYMER_1_0_IRON_TEST_HELPERS_TEST_HELPERS_HTML 2431\n#define IDR_POLYMER_1_0_IRON_TEST_HELPERS_TEST_HELPERS_JS 2432\n#define IDR_POLYMER_1_0_IRON_VALIDATABLE_BEHAVIOR_IRON_VALIDATABLE_BEHAVIOR_EXTRACTED_JS 2433\n#define IDR_POLYMER_1_0_IRON_VALIDATABLE_BEHAVIOR_IRON_VALIDATABLE_BEHAVIOR_HTML 2434\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_FADE_IN_ANIMATION_EXTRACTED_JS 2435\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_FADE_IN_ANIMATION_HTML 2436\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_FADE_OUT_ANIMATION_EXTRACTED_JS 2437\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_FADE_OUT_ANIMATION_HTML 2438\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_HERO_ANIMATION_EXTRACTED_JS 2439\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_HERO_ANIMATION_HTML 2440\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_OPAQUE_ANIMATION_EXTRACTED_JS 2441\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_OPAQUE_ANIMATION_HTML 2442\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_DOWN_ANIMATION_EXTRACTED_JS 2443\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_DOWN_ANIMATION_HTML 2444\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_BOTTOM_ANIMATION_EXTRACTED_JS 2445\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_BOTTOM_ANIMATION_HTML 2446\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_LEFT_ANIMATION_EXTRACTED_JS 2447\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_LEFT_ANIMATION_HTML 2448\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_RIGHT_ANIMATION_EXTRACTED_JS 2449\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_RIGHT_ANIMATION_HTML 2450\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_TOP_ANIMATION_EXTRACTED_JS 2451\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_TOP_ANIMATION_HTML 2452\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_LEFT_ANIMATION_EXTRACTED_JS 2453\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_LEFT_ANIMATION_HTML 2454\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_RIGHT_ANIMATION_EXTRACTED_JS 2455\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_RIGHT_ANIMATION_HTML 2456\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_UP_ANIMATION_EXTRACTED_JS 2457\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_UP_ANIMATION_HTML 2458\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_TRANSFORM_ANIMATION_EXTRACTED_JS 2459\n#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_TRANSFORM_ANIMATION_HTML 2460\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATABLE_BEHAVIOR_EXTRACTED_JS 2461\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATABLE_BEHAVIOR_HTML 2462\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATABLE_EXTRACTED_JS 2463\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATABLE_HTML 2464\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATED_PAGES_EXTRACTED_JS 2465\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATED_PAGES_HTML 2466\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATION_BEHAVIOR_EXTRACTED_JS 2467\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATION_BEHAVIOR_HTML 2468\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATION_RUNNER_BEHAVIOR_EXTRACTED_JS 2469\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATION_RUNNER_BEHAVIOR_HTML 2470\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_SHARED_ELEMENT_ANIMATABLE_BEHAVIOR_EXTRACTED_JS 2471\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_SHARED_ELEMENT_ANIMATABLE_BEHAVIOR_HTML 2472\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_SHARED_ELEMENT_ANIMATION_BEHAVIOR_EXTRACTED_JS 2473\n#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_SHARED_ELEMENT_ANIMATION_BEHAVIOR_HTML 2474\n#define IDR_POLYMER_1_0_NEON_ANIMATION_WEB_ANIMATIONS_HTML 2475\n#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_BUTTON_BEHAVIOR_EXTRACTED_JS 2476\n#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_BUTTON_BEHAVIOR_HTML 2477\n#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_CHECKED_ELEMENT_BEHAVIOR_EXTRACTED_JS 2478\n#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_CHECKED_ELEMENT_BEHAVIOR_HTML 2479\n#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_INKY_FOCUS_BEHAVIOR_EXTRACTED_JS 2480\n#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_INKY_FOCUS_BEHAVIOR_HTML 2481\n#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_RIPPLE_BEHAVIOR_EXTRACTED_JS 2482\n#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_RIPPLE_BEHAVIOR_HTML 2483\n#define IDR_POLYMER_1_0_PAPER_BUTTON_PAPER_BUTTON_EXTRACTED_JS 2484\n#define IDR_POLYMER_1_0_PAPER_BUTTON_PAPER_BUTTON_HTML 2485\n#define IDR_POLYMER_1_0_PAPER_CARD_PAPER_CARD_EXTRACTED_JS 2486\n#define IDR_POLYMER_1_0_PAPER_CARD_PAPER_CARD_HTML 2487\n#define IDR_POLYMER_1_0_PAPER_CHECKBOX_PAPER_CHECKBOX_EXTRACTED_JS 2488\n#define IDR_POLYMER_1_0_PAPER_CHECKBOX_PAPER_CHECKBOX_HTML 2489\n#define IDR_POLYMER_1_0_PAPER_DIALOG_BEHAVIOR_PAPER_DIALOG_BEHAVIOR_EXTRACTED_JS 2490\n#define IDR_POLYMER_1_0_PAPER_DIALOG_BEHAVIOR_PAPER_DIALOG_BEHAVIOR_HTML 2491\n#define IDR_POLYMER_1_0_PAPER_DIALOG_BEHAVIOR_PAPER_DIALOG_COMMON_CSS 2492\n#define IDR_POLYMER_1_0_PAPER_DIALOG_BEHAVIOR_PAPER_DIALOG_SHARED_STYLES_HTML 2493\n#define IDR_POLYMER_1_0_PAPER_DIALOG_PAPER_DIALOG_EXTRACTED_JS 2494\n#define IDR_POLYMER_1_0_PAPER_DIALOG_PAPER_DIALOG_HTML 2495\n#define IDR_POLYMER_1_0_PAPER_DRAWER_PANEL_PAPER_DRAWER_PANEL_EXTRACTED_JS 2496\n#define IDR_POLYMER_1_0_PAPER_DRAWER_PANEL_PAPER_DRAWER_PANEL_HTML 2497\n#define IDR_POLYMER_1_0_PAPER_DROPDOWN_MENU_PAPER_DROPDOWN_MENU_EXTRACTED_JS 2498\n#define IDR_POLYMER_1_0_PAPER_DROPDOWN_MENU_PAPER_DROPDOWN_MENU_HTML 2499\n#define IDR_POLYMER_1_0_PAPER_FAB_PAPER_FAB_EXTRACTED_JS 2500\n#define IDR_POLYMER_1_0_PAPER_FAB_PAPER_FAB_HTML 2501\n#define IDR_POLYMER_1_0_PAPER_HEADER_PANEL_PAPER_HEADER_PANEL_EXTRACTED_JS 2502\n#define IDR_POLYMER_1_0_PAPER_HEADER_PANEL_PAPER_HEADER_PANEL_HTML 2503\n#define IDR_POLYMER_1_0_PAPER_ICON_BUTTON_PAPER_ICON_BUTTON_EXTRACTED_JS 2504\n#define IDR_POLYMER_1_0_PAPER_ICON_BUTTON_PAPER_ICON_BUTTON_HTML 2505\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_ADDON_BEHAVIOR_EXTRACTED_JS 2506\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_ADDON_BEHAVIOR_HTML 2507\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_BEHAVIOR_EXTRACTED_JS 2508\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_BEHAVIOR_HTML 2509\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_CHAR_COUNTER_EXTRACTED_JS 2510\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_CHAR_COUNTER_HTML 2511\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_CONTAINER_EXTRACTED_JS 2512\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_CONTAINER_HTML 2513\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_ERROR_EXTRACTED_JS 2514\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_ERROR_HTML 2515\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_EXTRACTED_JS 2516\n#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_HTML 2517\n#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ICON_ITEM_EXTRACTED_JS 2518\n#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ICON_ITEM_HTML 2519\n#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_BEHAVIOR_EXTRACTED_JS 2520\n#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_BEHAVIOR_HTML 2521\n#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_BODY_EXTRACTED_JS 2522\n#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_BODY_HTML 2523\n#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_EXTRACTED_JS 2524\n#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_SHARED_STYLES_HTML 2525\n#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_HTML 2526\n#define IDR_POLYMER_1_0_PAPER_LISTBOX_PAPER_LISTBOX_EXTRACTED_JS 2527\n#define IDR_POLYMER_1_0_PAPER_LISTBOX_PAPER_LISTBOX_HTML 2528\n#define IDR_POLYMER_1_0_PAPER_MATERIAL_PAPER_MATERIAL_EXTRACTED_JS 2529\n#define IDR_POLYMER_1_0_PAPER_MATERIAL_PAPER_MATERIAL_SHARED_STYLES_HTML 2530\n#define IDR_POLYMER_1_0_PAPER_MATERIAL_PAPER_MATERIAL_HTML 2531\n#define IDR_POLYMER_1_0_PAPER_MENU_BUTTON_PAPER_MENU_BUTTON_ANIMATIONS_EXTRACTED_JS 2532\n#define IDR_POLYMER_1_0_PAPER_MENU_BUTTON_PAPER_MENU_BUTTON_ANIMATIONS_HTML 2533\n#define IDR_POLYMER_1_0_PAPER_MENU_BUTTON_PAPER_MENU_BUTTON_EXTRACTED_JS 2534\n#define IDR_POLYMER_1_0_PAPER_MENU_BUTTON_PAPER_MENU_BUTTON_HTML 2535\n#define IDR_POLYMER_1_0_PAPER_MENU_PAPER_MENU_EXTRACTED_JS 2536\n#define IDR_POLYMER_1_0_PAPER_MENU_PAPER_MENU_SHARED_STYLES_HTML 2537\n#define IDR_POLYMER_1_0_PAPER_MENU_PAPER_MENU_HTML 2538\n#define IDR_POLYMER_1_0_PAPER_MENU_PAPER_SUBMENU_EXTRACTED_JS 2539\n#define IDR_POLYMER_1_0_PAPER_MENU_PAPER_SUBMENU_HTML 2540\n#define IDR_POLYMER_1_0_PAPER_PROGRESS_PAPER_PROGRESS_EXTRACTED_JS 2541\n#define IDR_POLYMER_1_0_PAPER_PROGRESS_PAPER_PROGRESS_HTML 2542\n#define IDR_POLYMER_1_0_PAPER_RADIO_BUTTON_PAPER_RADIO_BUTTON_EXTRACTED_JS 2543\n#define IDR_POLYMER_1_0_PAPER_RADIO_BUTTON_PAPER_RADIO_BUTTON_HTML 2544\n#define IDR_POLYMER_1_0_PAPER_RADIO_GROUP_PAPER_RADIO_GROUP_EXTRACTED_JS 2545\n#define IDR_POLYMER_1_0_PAPER_RADIO_GROUP_PAPER_RADIO_GROUP_HTML 2546\n#define IDR_POLYMER_1_0_PAPER_RIPPLE_PAPER_RIPPLE_EXTRACTED_JS 2547\n#define IDR_POLYMER_1_0_PAPER_RIPPLE_PAPER_RIPPLE_HTML 2548\n#define IDR_POLYMER_1_0_PAPER_SLIDER_PAPER_SLIDER_EXTRACTED_JS 2549\n#define IDR_POLYMER_1_0_PAPER_SLIDER_PAPER_SLIDER_HTML 2550\n#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_BEHAVIOR_EXTRACTED_JS 2551\n#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_BEHAVIOR_HTML 2552\n#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_EXTRACTED_JS 2553\n#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_LITE_EXTRACTED_JS 2554\n#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_LITE_HTML 2555\n#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_STYLES_HTML 2556\n#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_HTML 2557\n#define IDR_POLYMER_1_0_PAPER_STYLES_CLASSES_SHADOW_LAYOUT_HTML 2558\n#define IDR_POLYMER_1_0_PAPER_STYLES_CLASSES_SHADOW_HTML 2559\n#define IDR_POLYMER_1_0_PAPER_STYLES_CLASSES_TYPOGRAPHY_HTML 2560\n#define IDR_POLYMER_1_0_PAPER_STYLES_COLOR_HTML 2561\n#define IDR_POLYMER_1_0_PAPER_STYLES_DEFAULT_THEME_HTML 2562\n#define IDR_POLYMER_1_0_PAPER_STYLES_PAPER_STYLES_CLASSES_HTML 2563\n#define IDR_POLYMER_1_0_PAPER_STYLES_PAPER_STYLES_HTML 2564\n#define IDR_POLYMER_1_0_PAPER_STYLES_SHADOW_HTML 2565\n#define IDR_POLYMER_1_0_PAPER_STYLES_TYPOGRAPHY_HTML 2566\n#define IDR_POLYMER_1_0_PAPER_TABS_PAPER_TAB_EXTRACTED_JS 2567\n#define IDR_POLYMER_1_0_PAPER_TABS_PAPER_TAB_HTML 2568\n#define IDR_POLYMER_1_0_PAPER_TABS_PAPER_TABS_EXTRACTED_JS 2569\n#define IDR_POLYMER_1_0_PAPER_TABS_PAPER_TABS_ICONS_HTML 2570\n#define IDR_POLYMER_1_0_PAPER_TABS_PAPER_TABS_HTML 2571\n#define IDR_POLYMER_1_0_PAPER_TOGGLE_BUTTON_PAPER_TOGGLE_BUTTON_EXTRACTED_JS 2572\n#define IDR_POLYMER_1_0_PAPER_TOGGLE_BUTTON_PAPER_TOGGLE_BUTTON_HTML 2573\n#define IDR_POLYMER_1_0_PAPER_TOOLBAR_PAPER_TOOLBAR_EXTRACTED_JS 2574\n#define IDR_POLYMER_1_0_PAPER_TOOLBAR_PAPER_TOOLBAR_HTML 2575\n#define IDR_POLYMER_1_0_PAPER_TOOLTIP_PAPER_TOOLTIP_EXTRACTED_JS 2576\n#define IDR_POLYMER_1_0_PAPER_TOOLTIP_PAPER_TOOLTIP_HTML 2577\n#define IDR_POLYMER_1_0_POLYMER_POLYMER_EXTRACTED_JS 2578\n#define IDR_POLYMER_1_0_POLYMER_POLYMER_MICRO_EXTRACTED_JS 2579\n#define IDR_POLYMER_1_0_POLYMER_POLYMER_MICRO_HTML 2580\n#define IDR_POLYMER_1_0_POLYMER_POLYMER_MINI_EXTRACTED_JS 2581\n#define IDR_POLYMER_1_0_POLYMER_POLYMER_MINI_HTML 2582\n#define IDR_POLYMER_1_0_POLYMER_POLYMER_HTML 2583\n#define IDR_POLYMER_1_0_WEB_ANIMATIONS_JS_WEB_ANIMATIONS_NEXT_LITE_MIN_JS 2584\n\n#endif  // CEF_INCLUDE_CEF_PACK_RESOURCES_H_\n"
  },
  {
    "path": "CEF/include/cef_pack_strings.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file is generated by the make_pack_header.py tool.\n//\n\n#ifndef CEF_INCLUDE_CEF_PACK_STRINGS_H_\n#define CEF_INCLUDE_CEF_PACK_STRINGS_H_\n#pragma once\n\n// ---------------------------------------------------------------------------\n// From cef_strings.h:\n\n#define IDS_MENU_BACK 28000\n#define IDS_MENU_FORWARD 28001\n#define IDS_MENU_RELOAD 28002\n#define IDS_MENU_RELOAD_NOCACHE 28003\n#define IDS_MENU_STOPLOAD 28004\n#define IDS_MENU_UNDO 28005\n#define IDS_MENU_REDO 28006\n#define IDS_MENU_CUT 28007\n#define IDS_MENU_COPY 28008\n#define IDS_MENU_PASTE 28009\n#define IDS_MENU_DELETE 28010\n#define IDS_MENU_SELECT_ALL 28011\n#define IDS_MENU_FIND 28012\n#define IDS_MENU_PRINT 28013\n#define IDS_MENU_VIEW_SOURCE 28014\n#define IDS_APP_AUDIO_FILES 28015\n#define IDS_APP_IMAGE_FILES 28016\n#define IDS_APP_TEXT_FILES 28017\n#define IDS_APP_VIDEO_FILES 28018\n#define IDS_DEFAULT_PRINT_DOCUMENT_TITLE 28019\n#define IDS_PRINT_SPOOL_FAILED_TITLE_TEXT 28020\n#define IDS_PRINT_SPOOL_FAILED_ERROR_TEXT 28021\n#define IDS_PRINT_INVALID_PRINTER_SETTINGS 28022\n#define IDS_UTILITY_PROCESS_EMF_CONVERTOR_NAME 28023\n#define IDS_UTILITY_PROCESS_PROXY_RESOLVER_NAME 28024\n#define IDS_SPELLCHECK_DICTIONARY 28025\n#define IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY 28026\n#define IDS_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS 28027\n#define IDS_UTILITY_PROCESS_FONT_CACHE_BUILDER_NAME 28028\n#define IDS_PLUGIN_HIDE 28029\n#define IDS_PLUGIN_BLOCKED 28030\n#define IDS_PLUGIN_NOT_SUPPORTED_METRO 28031\n#define IDS_PLUGIN_OUTDATED 28032\n#define IDS_PLUGIN_NOT_AUTHORIZED 28033\n#define IDS_PLUGIN_BLOCKED_BY_POLICY 28034\n#define IDS_CONTENT_CONTEXT_PLUGIN_RUN 28035\n#define IDS_CONTENT_CONTEXT_PLUGIN_HIDE 28036\n#define IDS_USES_UNIVERSAL_DETECTOR 28037\n#define IDS_STATIC_ENCODING_LIST 28038\n#define IDS_ENCODING_DISPLAY_TEMPLATE 28039\n#define IDS_ENCODING_UNICODE 28040\n#define IDS_ENCODING_WESTERN 28041\n#define IDS_ENCODING_SIMP_CHINESE 28042\n#define IDS_ENCODING_TRAD_CHINESE 28043\n#define IDS_ENCODING_KOREAN 28044\n#define IDS_ENCODING_JAPANESE 28045\n#define IDS_ENCODING_THAI 28046\n#define IDS_ENCODING_CENTRAL_EUROPEAN 28047\n#define IDS_ENCODING_CYRILLIC 28048\n#define IDS_ENCODING_GREEK 28049\n#define IDS_ENCODING_BALTIC 28050\n#define IDS_ENCODING_SOUTH_EUROPEAN 28051\n#define IDS_ENCODING_NORDIC 28052\n#define IDS_ENCODING_CELTIC 28053\n#define IDS_ENCODING_ROMANIAN 28054\n#define IDS_ENCODING_TURKISH 28055\n#define IDS_ENCODING_ARABIC 28056\n#define IDS_ENCODING_HEBREW 28057\n#define IDS_ENCODING_VIETNAMESE 28058\n\n// ---------------------------------------------------------------------------\n// From components_strings.h:\n\n#define IDS_JAVASCRIPT_MESSAGEBOX_TITLE 28290\n#define IDS_JAVASCRIPT_MESSAGEBOX_TITLE_IFRAME 28291\n#define IDS_JAVASCRIPT_MESSAGEBOX_TITLE_NONSTANDARD_URL 28292\n#define IDS_JAVASCRIPT_MESSAGEBOX_TITLE_NONSTANDARD_URL_IFRAME 28293\n#define IDS_JAVASCRIPT_MESSAGEBOX_SUPPRESS_OPTION 28294\n#define IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE 28295\n#define IDS_BEFOREUNLOAD_MESSAGEBOX_MESSAGE 28296\n#define IDS_BEFOREUNLOAD_MESSAGEBOX_OK_BUTTON_LABEL 28297\n#define IDS_BEFOREUNLOAD_MESSAGEBOX_CANCEL_BUTTON_LABEL 28298\n#define IDS_BEFORERELOAD_MESSAGEBOX_TITLE 28299\n#define IDS_BEFORERELOAD_MESSAGEBOX_OK_BUTTON_LABEL 28300\n#define IDS_BEFORERELOAD_MESSAGEBOX_CANCEL_BUTTON_LABEL 28301\n#define IDS_AUTOFILL_CLEAR_FORM_MENU_ITEM 28302\n#define IDS_AUTOFILL_CLEAR_LOCAL_COPY_BUTTON 28303\n#define IDS_AUTOFILL_WARNING_FORM_DISABLED 28304\n#define IDS_AUTOFILL_WARNING_INSECURE_CONNECTION 28305\n#define IDS_AUTOFILL_DELETE_AUTOCOMPLETE_SUGGESTION_CONFIRMATION_BODY 28306\n#define IDS_AUTOFILL_DELETE_CREDIT_CARD_SUGGESTION_CONFIRMATION_BODY 28307\n#define IDS_AUTOFILL_DELETE_PROFILE_SUGGESTION_CONFIRMATION_BODY 28308\n#define IDS_AUTOFILL_CC_AMEX 28309\n#define IDS_AUTOFILL_CC_AMEX_SHORT 28310\n#define IDS_AUTOFILL_CC_DINERS 28311\n#define IDS_AUTOFILL_CC_DISCOVER 28312\n#define IDS_AUTOFILL_CC_JCB 28313\n#define IDS_AUTOFILL_CC_MASTERCARD 28314\n#define IDS_AUTOFILL_CC_UNION_PAY 28315\n#define IDS_AUTOFILL_CC_VISA 28316\n#define IDS_AUTOFILL_CC_GENERIC 28317\n#define IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR 28318\n#define IDS_AUTOFILL_ADDRESS_SUMMARY_SEPARATOR 28319\n#define IDS_AUTOFILL_FIELD_LABEL_STATE 28320\n#define IDS_AUTOFILL_FIELD_LABEL_AREA 28321\n#define IDS_AUTOFILL_FIELD_LABEL_COUNTY 28322\n#define IDS_AUTOFILL_FIELD_LABEL_DEPARTMENT 28323\n#define IDS_AUTOFILL_FIELD_LABEL_DISTRICT 28324\n#define IDS_AUTOFILL_FIELD_LABEL_EMIRATE 28325\n#define IDS_AUTOFILL_FIELD_LABEL_ISLAND 28326\n#define IDS_AUTOFILL_FIELD_LABEL_PARISH 28327\n#define IDS_AUTOFILL_FIELD_LABEL_PREFECTURE 28328\n#define IDS_AUTOFILL_FIELD_LABEL_PROVINCE 28329\n#define IDS_AUTOFILL_FIELD_LABEL_ZIP_CODE 28330\n#define IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE 28331\n#define IDS_AUTOFILL_FIELD_LABEL_COUNTRY 28332\n#define IDS_AUTOFILL_SHOW_PREDICTIONS_TITLE 28333\n#define IDS_AUTOFILL_DIALOG_PRIVACY_POLICY_LINK 28334\n#define IDS_AUTOFILL_OPTIONS_POPUP 28335\n#define IDS_AUTOFILL_OPTIONS_CONTENT_DESCRIPTION 28336\n#define IDS_AUTOFILL_CREDIT_CARD_NOT_SUPPORTED_BY_WALLET 28337\n#define IDS_AUTOFILL_CREDIT_CARD_NOT_SUPPORTED_BY_WALLET_FOR_MERCHANT 28338\n#define IDS_AUTOFILL_SCAN_CREDIT_CARD 28340\n#define IDS_AUTOFILL_PASSWORD_FIELD_SUGGESTIONS_TITLE 28341\n#define IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT 28342\n#define IDS_AUTOFILL_SAVE_CARD_PROMPT_DENY 28343\n#define IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_LOCAL 28344\n#define IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_TO_CLOUD 28345\n#define IDS_AUTOFILL_SAVE_CARD_PROMPT_UPLOAD_EXPLANATION 28346\n#define IDS_AUTOFILL_CREDIT_CARD_EXPIRATION_DATE_ABBR 28347\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_TRY_AGAIN 28348\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_TRY_AGAIN_WITH_EXPIRATION 28349\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_PERMANENT 28350\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_NETWORK 28351\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE 28352\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_UPDATE_TITLE 28353\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS 28354\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_AMEX 28355\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED 28356\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED_AMEX 28357\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_CHECKBOX 28358\n#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP 28359\n#define IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON 28360\n#define IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_IN_PROGRESS 28361\n#define IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_SUCCESS 28362\n#define IDS_AUTOFILL_CARD_UNMASK_INVALID_EXPIRATION_DATE 28363\n#define IDS_AUTOFILL_CARD_UNMASK_EXPIRATION_DATE_SEPARATOR 28364\n#define IDS_AUTOFILL_CARD_UNMASK_NEW_CARD_LINK 28365\n#define IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC 28366\n#define IDS_BOOKMARK_BAR_FOLDER_NAME 28367\n#define IDS_BOOKMARK_BAR_MOBILE_FOLDER_NAME 28368\n#define IDS_BOOKMARK_BAR_OTHER_FOLDER_NAME 28369\n#define IDS_BOOKMARK_BAR_MANAGED_FOLDER_DOMAIN_NAME 28370\n#define IDS_BOOKMARK_BAR_MANAGED_FOLDER_DEFAULT_NAME 28371\n#define IDS_BOOKMARK_BAR_SUPERVISED_FOLDER_DEFAULT_NAME 28372\n#define IDS_BOOKMARK_BUBBLE_REMOVE_BOOKMARK 28373\n#define IDS_BOOKMARK_EDITOR_NEW_FOLDER_NAME 28374\n#define IDS_BOOKMARK_EDITOR_TITLE 28375\n#define IDS_BOOKMARK_MANAGER_NAME_INPUT_PLACE_HOLDER 28376\n#define IDS_BOOKMARK_MANAGER_URL_INPUT_PLACE_HOLDER 28377\n#define IDS_TOOLTIP_STAR 28385\n#define IDS_SYNC_TIME_NEVER 28386\n#define IDS_SYNC_TIME_JUST_NOW 28387\n#define IDS_SETTINGS_TITLE 28388\n#define IDS_SETTINGS_HIDE_ADVANCED_SETTINGS 28389\n#define IDS_SETTINGS_SHOW_ADVANCED_SETTINGS 28390\n#define IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION 28391\n#define IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON 28392\n#define IDS_CRASH_TITLE 28393\n#define IDS_CRASH_CRASH_COUNT_BANNER_FORMAT 28394\n#define IDS_CRASH_CRASH_HEADER_FORMAT 28395\n#define IDS_CRASH_CRASH_TIME_FORMAT 28396\n#define IDS_CRASH_BUG_LINK_LABEL 28397\n#define IDS_CRASH_NO_CRASHES_MESSAGE 28398\n#define IDS_CRASH_DISABLED_HEADER 28399\n#define IDS_CRASH_UPLOAD_MESSAGE 28400\n#define IDS_HTTP_POST_WARNING_TITLE 28401\n#define IDS_HTTP_POST_WARNING 28402\n#define IDS_HTTP_POST_WARNING_RESEND 28403\n#define IDS_DOM_DISTILLER_JAVASCRIPT_DISABLED_CONTENT 28404\n#define IDS_DOM_DISTILLER_WEBUI_ENTRY_URL 28405\n#define IDS_DOM_DISTILLER_WEBUI_ENTRY_ADD 28406\n#define IDS_DOM_DISTILLER_WEBUI_ENTRY_ADD_FAILED 28407\n#define IDS_DOM_DISTILLER_WEBUI_VIEW_URL 28408\n#define IDS_DOM_DISTILLER_WEBUI_VIEW_URL_FAILED 28409\n#define IDS_DOM_DISTILLER_WEBUI_REFRESH 28410\n#define IDS_DOM_DISTILLER_WEBUI_FETCHING_ENTRIES 28411\n#define IDS_DOM_DISTILLER_VIEWER_CLOSE_READER_VIEW 28412\n#define IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_TITLE 28413\n#define IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_CONTENT 28414\n#define IDS_DOM_DISTILLER_VIEWER_LOADING_TITLE 28415\n#define IDS_DOM_DISTILLER_VIEWER_NO_DATA_CONTENT 28416\n#define IDS_DOM_DISTILLER_VIEWER_LOADING_STRING 28417\n#define IDS_DOM_DISTILLER_QUALITY_QUESTION 28418\n#define IDS_DOM_DISTILLER_QUALITY_ANSWER_YES 28419\n#define IDS_DOM_DISTILLER_QUALITY_ANSWER_NO 28420\n#define IDS_DOM_DISTILLER_WEBUI_TITLE 28421\n#define IDS_ERRORPAGE_NET_BUTTON_DETAILS 28422\n#define IDS_ERRORPAGE_NET_BUTTON_HIDE_DETAILS 28423\n#define IDS_ERRORPAGES_BUTTON_MORE 28424\n#define IDS_ERRORPAGES_BUTTON_LESS 28425\n#define IDS_ERRORPAGES_BUTTON_RELOAD 28426\n#define IDS_ERRORPAGES_BUTTON_SHOW_SAVED_COPY 28427\n#define IDS_ERRORPAGES_BUTTON_SHOW_SAVED_COPY_HELP 28428\n#define IDS_ERRORPAGE_FUN_DISABLED 28431\n#define IDS_ERRORPAGES_BUTTON_DIAGNOSE 28432\n#define IDS_ERRORPAGES_SUGGESTION_VISIT_GOOGLE_CACHE 28434\n#define IDS_ERRORPAGES_SUGGESTION_CORRECTED_URL 28435\n#define IDS_ERRORPAGES_SUGGESTION_ALTERNATE_URL 28436\n#define IDS_ERRORPAGES_SUGGESTION_RELOAD_REPOST_SUMMARY 28437\n#define IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_HEADER 28438\n#define IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_BODY 28439\n#define IDS_ERRORPAGES_SUGGESTION_DNS_CONFIG_HEADER 28440\n#define IDS_ERRORPAGES_SUGGESTION_DNS_CONFIG_BODY 28441\n#define IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION_HEADER 28442\n#define IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_BODY 28443\n#define IDS_ERRORPAGES_SUGGESTION_PROXY_CONFIG_HEADER 28444\n#define IDS_ERRORPAGES_SUGGESTION_PROXY_CONFIG_BODY 28445\n#define IDS_ERRORPAGES_SUGGESTION_VIEW_POLICIES_HEADER 28447\n#define IDS_ERRORPAGES_SUGGESTION_VIEW_POLICIES_BODY 28448\n#define IDS_ERRORPAGES_SUGGESTION_UNSUPPORTED_CIPHER_HEADER 28449\n#define IDS_ERRORPAGES_SUGGESTION_UNSUPPORTED_CIPHER_BODY 28450\n#define IDS_ERRORPAGES_TITLE_NOT_AVAILABLE 28451\n#define IDS_ERRORPAGES_TITLE_ACCESS_DENIED 28452\n#define IDS_ERRORPAGES_TITLE_NOT_FOUND 28453\n#define IDS_ERRORPAGES_TITLE_LOAD_FAILED 28454\n#define IDS_ERRORPAGES_TITLE_BLOCKED 28455\n#define IDS_ERRORPAGES_HEADING_NOT_AVAILABLE 28456\n#define IDS_ERRORPAGES_HEADING_NETWORK_ACCESS_DENIED 28457\n#define IDS_ERRORPAGES_HEADING_INTERNET_DISCONNECTED 28458\n#define IDS_ERRORPAGES_HEADING_CACHE_READ_FAILURE 28459\n#define IDS_ERRORPAGES_HEADING_CONNECTION_INTERRUPTED 28460\n#define IDS_ERRORPAGES_HEADING_NOT_FOUND 28461\n#define IDS_ERRORPAGES_HEADING_FILE_NOT_FOUND 28462\n#define IDS_ERRORPAGES_HEADING_TOO_MANY_REDIRECTS 28463\n#define IDS_ERRORPAGES_HEADING_EMPTY_RESPONSE 28464\n#define IDS_ERRORPAGES_HEADING_BLOCKED 28465\n#define IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE 28466\n#define IDS_ERRORPAGES_SUMMARY_TIMED_OUT 28467\n#define IDS_ERRORPAGES_SUMMARY_CONNECTION_RESET 28468\n#define IDS_ERRORPAGES_SUMMARY_CONNECTION_CLOSED 28469\n#define IDS_ERRORPAGES_SUMMARY_CONNECTION_FAILED 28470\n#define IDS_ERRORPAGES_SUMMARY_NETWORK_CHANGED 28471\n#define IDS_ERRORPAGES_SUMMARY_CONNECTION_REFUSED 28472\n#define IDS_ERRORPAGES_SUMMARY_NAME_NOT_RESOLVED 28473\n#define IDS_ERRORPAGES_SUMMARY_DNS_DEFINITION 28474\n#define IDS_ERRORPAGES_SUMMARY_ICANN_NAME_COLLISION 28475\n#define IDS_ERRORPAGES_SUMMARY_ADDRESS_UNREACHABLE 28476\n#define IDS_ERRORPAGES_SUMMARY_FILE_ACCESS_DENIED 28477\n#define IDS_ERRORPAGES_SUMMARY_NETWORK_ACCESS_DENIED 28478\n#define IDS_ERRORPAGES_SUMMARY_PROXY_CONNECTION_FAILED 28479\n#define IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_INSTRUCTIONS_TEMPLATE 28481\n#define IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED 28480\n#define IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM 28482\n#define IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM_VISTA 28483\n#define IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM_XP 28484\n#define IDS_ERRORPAGES_SUMMARY_CACHE_READ_FAILURE 28485\n#define IDS_ERRORPAGES_SUMMARY_NETWORK_IO_SUSPENDED 28486\n#define IDS_ERRORPAGES_SUMMARY_NOT_FOUND 28487\n#define IDS_ERRORPAGES_SUMMARY_FILE_NOT_FOUND 28488\n#define IDS_ERRORPAGES_SUMMARY_TOO_MANY_REDIRECTS 28489\n#define IDS_ERRORPAGES_SUMMARY_EMPTY_RESPONSE 28490\n#define IDS_ERRORPAGES_SUMMARY_INVALID_RESPONSE 28491\n#define IDS_ERRORPAGES_SUMMARY_DNS_PROBE_RUNNING 28492\n#define IDS_ERRORPAGES_DETAILS_TIMED_OUT 28493\n#define IDS_ERRORPAGES_DETAILS_CONNECTION_CLOSED 28494\n#define IDS_ERRORPAGES_DETAILS_CONNECTION_RESET 28495\n#define IDS_ERRORPAGES_DETAILS_CONNECTION_REFUSED 28496\n#define IDS_ERRORPAGES_DETAILS_CONNECTION_FAILED 28497\n#define IDS_ERRORPAGES_DETAILS_NETWORK_CHANGED 28498\n#define IDS_ERRORPAGES_DETAILS_NAME_NOT_RESOLVED 28499\n#define IDS_ERRORPAGES_DETAILS_ICANN_NAME_COLLISION 28500\n#define IDS_ERRORPAGES_DETAILS_ADDRESS_UNREACHABLE 28501\n#define IDS_ERRORPAGES_DETAILS_NETWORK_ACCESS_DENIED 28502\n#define IDS_ERRORPAGES_DETAILS_FILE_ACCESS_DENIED 28503\n#define IDS_ERRORPAGES_DETAILS_PROXY_CONNECTION_FAILED 28504\n#define IDS_ERRORPAGES_DETAILS_INTERNET_DISCONNECTED 28505\n#define IDS_ERRORPAGES_DETAILS_CACHE_READ_FAILURE 28506\n#define IDS_ERRORPAGES_DETAILS_NETWORK_IO_SUSPENDED 28507\n#define IDS_ERRORPAGES_DETAILS_FILE_NOT_FOUND 28508\n#define IDS_ERRORPAGES_DETAILS_TOO_MANY_REDIRECTS 28509\n#define IDS_ERRORPAGES_DETAILS_EMPTY_RESPONSE 28510\n#define IDS_ERRORPAGES_DETAILS_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH 28511\n#define IDS_ERRORPAGES_DETAILS_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION 28512\n#define IDS_ERRORPAGES_DETAILS_RESPONSE_HEADERS_MULTIPLE_LOCATION 28513\n#define IDS_ERRORPAGES_DETAILS_DNS_PROBE_RUNNING 28514\n#define IDS_ERRORPAGES_DETAILS_UNKNOWN 28515\n#define IDS_ERRORPAGES_HEADING_ACCESS_DENIED 28516\n#define IDS_ERRORPAGES_HEADING_FILE_ACCESS_DENIED 28517\n#define IDS_ERRORPAGES_SUMMARY_FORBIDDEN 28518\n#define IDS_ERRORPAGES_DETAILS_FORBIDDEN 28519\n#define IDS_ERRORPAGES_SUMMARY_GONE 28520\n#define IDS_ERRORPAGES_DETAILS_GONE 28521\n#define IDS_ERRORPAGES_HEADING_PAGE_NOT_WORKING 28522\n#define IDS_ERRORPAGES_DETAILS_INTERNAL_SERVER_ERROR 28523\n#define IDS_ERRORPAGES_SUMMARY_WEBSITE_CANNOT_HANDLE_REQUEST 28524\n#define IDS_ERRORPAGES_DETAILS_NOT_IMPLEMENTED 28525\n#define IDS_ERRORPAGES_DETAILS_BAD_GATEWAY 28526\n#define IDS_ERRORPAGES_SUMMARY_SERVICE_UNAVAILABLE 28527\n#define IDS_ERRORPAGES_DETAILS_SERVICE_UNAVAILABLE 28528\n#define IDS_ERRORPAGES_SUMMARY_GATEWAY_TIMEOUT 28529\n#define IDS_ERRORPAGES_DETAILS_GATEWAY_TIMEOUT 28530\n#define IDS_ERRORPAGES_SUMMARY_SSL_SECURITY_ERROR 28531\n#define IDS_ERRORPAGES_DETAILS_SSL_PROTOCOL_ERROR 28532\n#define IDS_ERRORPAGES_DETAILS_SSL_FALLBACK_BEYOND_MINIMUM_VERSION 28533\n#define IDS_ERRORPAGES_SUMMARY_SSL_VERSION_OR_CIPHER_MISMATCH 28534\n#define IDS_ERRORPAGES_DETAILS_SSL_VERSION_OR_CIPHER_MISMATCH 28535\n#define IDS_ERRORPAGES_SUMMARY_PINNING_FAILURE_DETAILS 28536\n#define IDS_ERRORPAGES_HEADING_INSECURE_CONNECTION 28537\n#define IDS_ERRORPAGES_SUMMARY_BAD_SSL_CLIENT_AUTH_CERT 28538\n#define IDS_ERRORPAGES_DETAILS_BAD_SSL_CLIENT_AUTH_CERT 28539\n#define IDS_ERRORPAGES_DETAILS_TEMPORARILY_THROTTLED 28540\n#define IDS_ERRORPAGES_SUMMARY_TEMPORARY_BACKOFF 28541\n#define IDS_ERRORPAGES_DETAILS_TEMPORARY_BACKOFF 28542\n#define IDS_ERRORPAGES_SUMMARY_BLOCKED_BY_EXTENSION 28543\n#define IDS_ERRORPAGES_SUMMARY_BLOCKED_BY_ADMINISTRATOR 28544\n#define IDS_ERRORPAGES_DETAILS_BLOCKED_BY_EXTENSION 28545\n#define IDS_ERRORPAGES_DETAILS_BLOCKED_BY_ADMINISTRATOR 28546\n#define IDS_ERRORPAGES_DETAILS_BLOCKED_ENROLLMENT_CHECK_PENDING 28547\n#define IDS_ERRORPAGES_HTTP_POST_WARNING 28548\n#define IDS_ERRORPAGES_SUGGESTION_LIST_HEADER 28549\n#define IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_SUMMARY 28550\n#define IDS_ERRORPAGES_SUGGESTION_CHECK_PROXY_FIREWALL_DNS_SUMMARY 28551\n#define IDS_ERRORPAGES_SUGGESTION_CHECK_FIREWALL_ANTIVIRUS_SUMMARY 28552\n#define IDS_ERRORPAGES_SUGGESTION_CHECK_PROXY_FIREWALL_SUMMARY 28553\n#define IDS_ERRORPAGES_SUGGESTION_CHECK_PROXY_ADDRESS_SUMMARY 28554\n#define IDS_ERRORPAGES_SUGGESTION_CONTACT_ADMIN_SUMMARY 28555\n#define IDS_ERRORPAGES_SUGGESTION_CONTACT_ADMIN_SUMMARY_WITH_PREFIX 28556\n#define IDS_ERRORPAGES_SUGGESTION_LEARNMORE_SUMMARY 28557\n#define IDS_ERRORPAGES_SUGGESTION_CLEAR_COOKIES_SUMMARY 28558\n#define IDS_ERRORPAGES_SUGGESTION_CHECK_CABLES_SUMMARY 28562\n#define IDS_ERRORPAGES_SUGGESTION_RESET_HARDWARE_SUMMARY 28563\n#define IDS_ERRORPAGES_SUGGESTION_CHECK_WIFI_SUMMARY 28564\n#define IDS_ERRORPAGES_SUGGESTION_DIAGNOSE_CONNECTION_SUMMARY 28565\n#define IDS_ERRORPAGES_SUGGESTION_COMPLETE_SETUP_SUMMARY 28566\n#define IDS_ERRORPAGES_SUGGESTION_DISABLE_EXTENSION_SUMMARY 28567\n#define IDS_ERRORPAGES_SUGGESTION_RELOAD_SUMMARY 28568\n#define IDS_ERRORPAGES_SUGGESTION_GOOGLE_SEARCH_SUMMARY 28569\n#define IDS_FIND_IN_PAGE_COUNT 28581\n#define IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP 28582\n#define IDS_FIND_IN_PAGE_NEXT_TOOLTIP 28583\n#define IDS_FIND_IN_PAGE_CLOSE_TOOLTIP 28584\n#define IDS_FLAGS_UI_LONG_TITLE 28585\n#define IDS_FLAGS_UI_TABLE_TITLE 28586\n#define IDS_FLAGS_UI_WARNING_HEADER 28587\n#define IDS_FLAGS_UI_WARNING_TEXT 28588\n#define IDS_FLAGS_UI_PROMOTE_BETA_CHANNEL 28589\n#define IDS_FLAGS_UI_PROMOTE_DEV_CHANNEL 28590\n#define IDS_FLAGS_UI_DISABLE 28591\n#define IDS_FLAGS_UI_ENABLE 28592\n#define IDS_FLAGS_UI_RESET_ALL_BUTTON 28593\n#define IDS_FLAGS_UI_UNSUPPORTED_TABLE_TITLE 28594\n#define IDS_FLAGS_UI_NOT_AVAILABLE 28595\n#define IDS_FLAGS_UI_ENABLE_NACL_NAME 28596\n#define IDS_FLAGS_UI_RELAUNCH_BUTTON 28597\n#define IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC 28599\n#define IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT 28600\n#define IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED 28601\n#define IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED 28602\n#define IDS_HISTORY_ACTION_MENU_DESCRIPTION 28605\n#define IDS_HISTORY_BLOCKED_VISIT_TEXT 28606\n#define IDS_HISTORY_BROWSERESULTS 28607\n#define IDS_HISTORY_CONTINUED 28608\n#define IDS_HISTORY_DATE_WITH_RELATIVE_TIME 28609\n#define IDS_HISTORY_DELETE_PRIOR_VISITS_CONFIRM_BUTTON 28610\n#define IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING 28611\n#define IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING_NO_INCOGNITO 28612\n#define IDS_HISTORY_ENTRY_BOOKMARKED 28613\n#define IDS_HISTORY_ENTRY_SUMMARY 28614\n#define IDS_HISTORY_FILTER_ALLOW_ITEMS 28615\n#define IDS_HISTORY_FILTER_ALLOWED 28616\n#define IDS_HISTORY_FILTER_BLOCK_ITEMS 28617\n#define IDS_HISTORY_FILTER_BLOCKED 28618\n#define IDS_HISTORY_FOUND_SEARCH_RESULTS 28619\n#define IDS_HISTORY_GROUP_BY_DOMAIN_LABEL 28620\n#define IDS_HISTORY_HAS_SYNCED_RESULTS 28621\n#define IDS_HISTORY_OTHER_FORMS_OF_HISTORY 28622\n#define IDS_HISTORY_IN_CONTENT_PACK 28623\n#define IDS_HISTORY_INTERVAL 28624\n#define IDS_HISTORY_LOADING 28625\n#define IDS_HISTORY_MORE_FROM_SITE 28626\n#define IDS_HISTORY_NEWER 28627\n#define IDS_HISTORY_NEWEST 28628\n#define IDS_HISTORY_NO_RESULTS 28629\n#define IDS_HISTORY_NO_SEARCH_RESULTS 28630\n#define IDS_HISTORY_NO_SYNCED_RESULTS 28631\n#define IDS_HISTORY_NUMBER_VISITS 28632\n#define IDS_HISTORY_OLDER 28633\n#define IDS_HISTORY_OPEN_CLEAR_BROWSING_DATA_DIALOG 28634\n#define IDS_HISTORY_OTHER_DEVICES_X_MORE 28635\n#define IDS_HISTORY_OTHER_SESSIONS_COLLAPSE_SESSION 28636\n#define IDS_HISTORY_OTHER_SESSIONS_EXPAND_SESSION 28637\n#define IDS_HISTORY_OTHER_SESSIONS_OPEN_ALL 28638\n#define IDS_HISTORY_RANGE_ALL_TIME 28639\n#define IDS_HISTORY_RANGE_LABEL 28640\n#define IDS_HISTORY_RANGE_MONTH 28641\n#define IDS_HISTORY_RANGE_NEXT 28642\n#define IDS_HISTORY_RANGE_PREVIOUS 28643\n#define IDS_HISTORY_RANGE_TODAY 28644\n#define IDS_HISTORY_RANGE_WEEK 28645\n#define IDS_HISTORY_REMOVE_BOOKMARK 28646\n#define IDS_HISTORY_REMOVE_PAGE 28647\n#define IDS_HISTORY_REMOVE_SELECTED_ITEMS 28648\n#define IDS_HISTORY_SEARCH_BUTTON 28649\n#define IDS_HISTORY_SEARCH_RESULT 28650\n#define IDS_HISTORY_SEARCH_RESULTS 28651\n#define IDS_HISTORY_SEARCHRESULTSFOR 28652\n#define IDS_HISTORY_SHOW_HISTORY 28653\n#define IDS_HISTORY_SHOWFULLHISTORY_LINK 28654\n#define IDS_HISTORY_TITLE 28655\n#define IDS_HISTORY_UNKNOWN_DEVICE 28656\n#define IDS_LOGIN_DIALOG_TITLE 28657\n#define IDS_LOGIN_DIALOG_AUTHORITY 28658\n#define IDS_LOGIN_DIALOG_PROXY_AUTHORITY 28659\n#define IDS_LOGIN_DIALOG_USERNAME_FIELD 28660\n#define IDS_LOGIN_DIALOG_PASSWORD_FIELD 28661\n#define IDS_LOGIN_DIALOG_OK_BUTTON_LABEL 28662\n#define IDS_DEFAULT_TAB_TITLE 28663\n#define IDS_SAD_TAB_TITLE 28664\n#define IDS_SAD_TAB_MESSAGE 28665\n#define IDS_SAD_TAB_HELP_MESSAGE 28666\n#define IDS_SAD_TAB_HELP_LINK 28667\n#define IDS_SAD_TAB_RELOAD_LABEL 28668\n#define IDS_NEW_TAB_TITLE 28669\n#define IDS_NEW_TAB_OTR_HEADING 28670\n#define IDS_NEW_TAB_OTR_DESCRIPTION 28671\n#define IDS_NEW_TAB_OTR_LEARN_MORE_LINK 28672\n#define IDS_NEW_TAB_OTR_MESSAGE_WARNING 28673\n#define IDS_NEW_TAB_UNDO_THUMBNAIL_REMOVE 28674\n#define IDS_AUTOCOMPLETE_SEARCH_DESCRIPTION 28675\n#define IDS_EMPTY_KEYWORD_VALUE 28676\n#define IDS_LINK_FROM_CLIPBOARD 28677\n#define IDS_SECURE_CONNECTION_EV 28678\n#define IDS_PAGE_INFO_HELP_CENTER_LINK 28680\n#define IDS_PAGE_INFO_SECURITY_TAB_DEPRECATED_SIGNATURE_ALGORITHM_MINOR 28681\n#define IDS_PAGE_INFO_SECURITY_TAB_DEPRECATED_SIGNATURE_ALGORITHM_MAJOR 28682\n#define IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_CONNECTION_TEXT 28683\n#define IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_ERROR 28684\n#define IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING 28685\n#define IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK 28686\n#define IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTION_DETAILS 28687\n#define IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTION_DETAILS_AEAD 28688\n#define IDS_PAGE_INFO_SECURITY_TAB_FALLBACK_MESSAGE 28689\n#define IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY 28690\n#define IDS_PAGE_INFO_SECURITY_TAB_NON_UNIQUE_NAME 28691\n#define IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT 28692\n#define IDS_PAGE_INFO_SECURITY_TAB_NO_REVOCATION_MECHANISM 28693\n#define IDS_PAGE_INFO_SECURITY_TAB_RENEGOTIATION_MESSAGE 28694\n#define IDS_PAGE_INFO_SECURITY_TAB_SSL_VERSION 28695\n#define IDS_PAGE_INFO_SECURITY_TAB_UNABLE_TO_CHECK_REVOCATION 28696\n#define IDS_PAGE_INFO_SECURITY_TAB_UNKNOWN_PARTY 28697\n#define IDS_PAGE_INFO_SECURITY_TAB_WEAK_ENCRYPTION_CONNECTION_TEXT 28698\n#define IDS_PAGEINFO_CERT_INFO_BUTTON 28699\n#define IDS_PASSWORD_MANAGER_EMPTY_LOGIN 28700\n#define IDS_PASSWORD_MANAGER_EXCEPTIONS_TAB_TITLE 28701\n#define IDS_PASSWORD_MANAGER_SHOW_PASSWORDS_TAB_TITLE 28702\n#define IDS_PASSWORD_MANAGER_SMART_LOCK 28703\n#define IDS_PDF_NEED_PASSWORD 28704\n#define IDS_PDF_PASSWORD_SUBMIT 28705\n#define IDS_PDF_PASSWORD_INVALID 28706\n#define IDS_PDF_PAGE_LOADING 28707\n#define IDS_PDF_PAGE_LOAD_FAILED 28708\n#define IDS_PDF_PAGE_RELOAD_BUTTON 28709\n#define IDS_PDF_BOOKMARKS 28710\n#define IDS_PDF_TOOLTIP_ROTATE_CW 28711\n#define IDS_PDF_TOOLTIP_DOWNLOAD 28712\n#define IDS_PDF_TOOLTIP_PRINT 28713\n#define IDS_PDF_TOOLTIP_FIT_PAGE 28714\n#define IDS_PDF_TOOLTIP_FIT_WIDTH 28715\n#define IDS_PDF_TOOLTIP_ZOOM_IN 28716\n#define IDS_PDF_TOOLTIP_ZOOM_OUT 28717\n#define IDS_PDF_LABEL_PAGE_NUMBER 28718\n#define IDS_POLICY_DM_STATUS_SUCCESS 28719\n#define IDS_POLICY_DM_STATUS_REQUEST_INVALID 28720\n#define IDS_POLICY_DM_STATUS_REQUEST_FAILED 28721\n#define IDS_POLICY_DM_STATUS_TEMPORARY_UNAVAILABLE 28722\n#define IDS_POLICY_DM_STATUS_HTTP_STATUS_ERROR 28723\n#define IDS_POLICY_DM_STATUS_RESPONSE_DECODING_ERROR 28724\n#define IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED 28725\n#define IDS_POLICY_DM_STATUS_SERVICE_DEVICE_NOT_FOUND 28726\n#define IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID 28727\n#define IDS_POLICY_DM_STATUS_SERVICE_ACTIVATION_PENDING 28728\n#define IDS_POLICY_DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER 28729\n#define IDS_POLICY_DM_STATUS_SERVICE_DEVICE_ID_CONFLICT 28730\n#define IDS_POLICY_DM_STATUS_SERVICE_MISSING_LICENSES 28731\n#define IDS_POLICY_DM_STATUS_SERVICE_DEPROVISIONED 28732\n#define IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND 28733\n#define IDS_POLICY_DM_STATUS_UNKNOWN_ERROR 28734\n#define IDS_POLICY_DM_STATUS_SERVICE_DOMAIN_MISMATCH 28735\n#define IDS_POLICY_VALIDATION_OK 28736\n#define IDS_POLICY_VALIDATION_BAD_INITIAL_SIGNATURE 28737\n#define IDS_POLICY_VALIDATION_BAD_SIGNATURE 28738\n#define IDS_POLICY_VALIDATION_ERROR_CODE_PRESENT 28739\n#define IDS_POLICY_VALIDATION_PAYLOAD_PARSE_ERROR 28740\n#define IDS_POLICY_VALIDATION_WRONG_POLICY_TYPE 28741\n#define IDS_POLICY_VALIDATION_WRONG_SETTINGS_ENTITY_ID 28742\n#define IDS_POLICY_VALIDATION_BAD_TIMESTAMP 28743\n#define IDS_POLICY_VALIDATION_WRONG_TOKEN 28744\n#define IDS_POLICY_VALIDATION_BAD_USERNAME 28745\n#define IDS_POLICY_VALIDATION_POLICY_PARSE_ERROR 28746\n#define IDS_POLICY_VALIDATION_BAD_KEY_VERIFICATION_SIGNATURE 28747\n#define IDS_POLICY_VALIDATION_UNKNOWN_ERROR 28748\n#define IDS_POLICY_STORE_STATUS_OK 28749\n#define IDS_POLICY_STORE_STATUS_LOAD_ERROR 28750\n#define IDS_POLICY_STORE_STATUS_STORE_ERROR 28751\n#define IDS_POLICY_STORE_STATUS_PARSE_ERROR 28752\n#define IDS_POLICY_STORE_STATUS_SERIALIZE_ERROR 28753\n#define IDS_POLICY_STORE_STATUS_VALIDATION_ERROR 28754\n#define IDS_POLICY_STORE_STATUS_BAD_STATE 28755\n#define IDS_POLICY_STORE_STATUS_UNKNOWN_ERROR 28756\n#define IDS_POLICY_ASSOCIATION_STATE_ACTIVE 28757\n#define IDS_POLICY_ASSOCIATION_STATE_UNMANAGED 28758\n#define IDS_POLICY_ASSOCIATION_STATE_DEPROVISIONED 28759\n#define IDS_POLICY_TYPE_ERROR 28760\n#define IDS_POLICY_OUT_OF_RANGE_ERROR 28761\n#define IDS_POLICY_VALUE_FORMAT_ERROR 28762\n#define IDS_POLICY_DEFAULT_SEARCH_DISABLED 28763\n#define IDS_POLICY_NOT_SPECIFIED_ERROR 28764\n#define IDS_POLICY_SUBKEY_ERROR 28765\n#define IDS_POLICY_LIST_ENTRY_ERROR 28766\n#define IDS_POLICY_SCHEMA_VALIDATION_ERROR 28767\n#define IDS_POLICY_INVALID_SEARCH_URL_ERROR 28768\n#define IDS_POLICY_INVALID_PROXY_MODE_ERROR 28769\n#define IDS_POLICY_INVALID_UPDATE_URL_ERROR 28770\n#define IDS_POLICY_PROXY_MODE_DISABLED_ERROR 28771\n#define IDS_POLICY_PROXY_MODE_AUTO_DETECT_ERROR 28772\n#define IDS_POLICY_PROXY_MODE_PAC_URL_ERROR 28773\n#define IDS_POLICY_PROXY_MODE_FIXED_SERVERS_ERROR 28774\n#define IDS_POLICY_PROXY_MODE_SYSTEM_ERROR 28775\n#define IDS_POLICY_PROXY_BOTH_SPECIFIED_ERROR 28776\n#define IDS_POLICY_PROXY_NEITHER_SPECIFIED_ERROR 28777\n#define IDS_POLICY_OVERRIDDEN 28778\n#define IDS_POLICY_DEPRECATED 28779\n#define IDS_POLICY_VALUE_DEPRECATED 28780\n#define IDS_POLICY_LEVEL_ERROR 28785\n#define IDS_POLICY_OK 28786\n#define IDS_POLICY_UNSET 28787\n#define IDS_POLICY_UNKNOWN 28788\n#define IDS_POLICY_TITLE 28789\n#define IDS_POLICY_FILTER_PLACEHOLDER 28790\n#define IDS_POLICY_RELOAD_POLICIES 28791\n#define IDS_POLICY_STATUS 28792\n#define IDS_POLICY_STATUS_DEVICE 28793\n#define IDS_POLICY_STATUS_USER 28794\n#define IDS_POLICY_LABEL_DOMAIN 28795\n#define IDS_POLICY_LABEL_USERNAME 28796\n#define IDS_POLICY_LABEL_CLIENT_ID 28797\n#define IDS_POLICY_LABEL_ASSET_ID 28798\n#define IDS_POLICY_LABEL_LOCATION 28799\n#define IDS_POLICY_LABEL_DIRECTORY_API_ID 28800\n#define IDS_POLICY_LABEL_TIME_SINCE_LAST_REFRESH 28801\n#define IDS_POLICY_NOT_SPECIFIED 28802\n#define IDS_POLICY_NEVER_FETCHED 28803\n#define IDS_POLICY_LABEL_REFRESH_INTERVAL 28804\n#define IDS_POLICY_LABEL_STATUS 28805\n#define IDS_POLICY_SHOW_UNSET 28806\n#define IDS_POLICY_NO_POLICIES_SET 28807\n#define IDS_POLICY_HEADER_SCOPE 28808\n#define IDS_POLICY_HEADER_LEVEL 28809\n#define IDS_POLICY_HEADER_NAME 28810\n#define IDS_POLICY_HEADER_VALUE 28811\n#define IDS_POLICY_HEADER_STATUS 28812\n#define IDS_POLICY_HEADER_SOURCE 28813\n#define IDS_POLICY_SHOW_EXPANDED_VALUE 28814\n#define IDS_POLICY_HIDE_EXPANDED_VALUE 28815\n#define IDS_POLICY_SCOPE_USER 28816\n#define IDS_POLICY_SCOPE_DEVICE 28817\n#define IDS_POLICY_LEVEL_RECOMMENDED 28818\n#define IDS_POLICY_LEVEL_MANDATORY 28819\n#define IDS_POLICY_INVALID_BOOKMARK 28820\n#define IDS_POLICY_SOURCE_ENTERPRISE_DEFAULT 28821\n#define IDS_POLICY_SOURCE_CLOUD 28822\n#define IDS_POLICY_SOURCE_PLATFORM 28823\n#define IDS_POLICY_SOURCE_PUBLIC_SESSION_OVERRIDE 28824\n#define IDS_POLICY_RISK_TAG_FULL_ADMIN_ACCESS 28825\n#define IDS_POLICY_RISK_TAG_SYSTEM_SECURITY 28826\n#define IDS_POLICY_RISK_TAG_WEBSITE_SHARING 28827\n#define IDS_POLICY_RISK_TAG_ADMIN_SHARING 28828\n#define IDS_POLICY_RISK_TAG_FILTERING 28829\n#define IDS_POLICY_RISK_TAG_LOCAL_DATA_ACCESS 28830\n#define IDS_POLICY_RISK_TAG_GOOGLE_SHARING 28831\n#define IDS_DESKTOP_SEARCH_REDIRECTION_INFOBAR_MESSAGE 28832\n#define IDS_DESKTOP_SEARCH_REDIRECTION_INFOBAR_BUTTON 28833\n#define IDS_SSL_OPEN_DETAILS_BUTTON 28834\n#define IDS_SSL_CLOSE_DETAILS_BUTTON 28835\n#define IDS_CLOCK_ERROR_TITLE 28836\n#define IDS_CLOCK_ERROR_AHEAD_HEADING 28837\n#define IDS_CLOCK_ERROR_BEHIND_HEADING 28838\n#define IDS_CLOCK_ERROR_UPDATE_DATE_AND_TIME 28839\n#define IDS_CLOCK_ERROR_PRIMARY_PARAGRAPH 28840\n#define IDS_CLOCK_ERROR_EXPLANATION 28841\n#define IDS_SAFE_BROWSING_PRIVACY_POLICY_URL 28842\n#define IDS_SSL_V2_TITLE 28843\n#define IDS_SSL_V2_HEADING 28844\n#define IDS_SSL_V2_PRIMARY_PARAGRAPH 28845\n#define IDS_SSL_NONOVERRIDABLE_MORE 28846\n#define IDS_SSL_NONOVERRIDABLE_INVALID 28847\n#define IDS_SSL_OVERRIDABLE_SAFETY_BUTTON 28848\n#define IDS_SSL_OVERRIDABLE_PROCEED_PARAGRAPH 28849\n#define IDS_SSL_RELOAD 28850\n#define IDS_SSL_NONOVERRIDABLE_PINNED 28851\n#define IDS_SSL_NONOVERRIDABLE_HSTS 28852\n#define IDS_SSL_NONOVERRIDABLE_REVOKED 28853\n#define IDS_CERT_ERROR_COMMON_NAME_INVALID_DETAILS 28854\n#define IDS_CERT_ERROR_COMMON_NAME_INVALID_DESCRIPTION 28855\n#define IDS_CERT_ERROR_EXPIRED_DETAILS 28856\n#define IDS_CERT_ERROR_EXPIRED_DESCRIPTION 28857\n#define IDS_CERT_ERROR_NOT_YET_VALID_DETAILS 28858\n#define IDS_CERT_ERROR_NOT_YET_VALID_DESCRIPTION 28859\n#define IDS_CERT_ERROR_NOT_VALID_AT_THIS_TIME_DETAILS 28860\n#define IDS_CERT_ERROR_NOT_VALID_AT_THIS_TIME_DESCRIPTION 28861\n#define IDS_CERT_ERROR_CHAIN_EXPIRED_DETAILS 28862\n#define IDS_CERT_ERROR_CHAIN_EXPIRED_DESCRIPTION 28863\n#define IDS_CERT_ERROR_AUTHORITY_INVALID_DESCRIPTION 28864\n#define IDS_CERT_ERROR_CONTAINS_ERRORS_DETAILS 28865\n#define IDS_CERT_ERROR_CONTAINS_ERRORS_DESCRIPTION 28866\n#define IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_DETAILS 28867\n#define IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_DESCRIPTION 28868\n#define IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_DETAILS 28869\n#define IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_DESCRIPTION 28870\n#define IDS_CERT_ERROR_REVOKED_CERT_DETAILS 28871\n#define IDS_CERT_ERROR_REVOKED_CERT_DESCRIPTION 28872\n#define IDS_CERT_ERROR_INVALID_CERT_DETAILS 28873\n#define IDS_CERT_ERROR_INVALID_CERT_DESCRIPTION 28874\n#define IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_DETAILS 28875\n#define IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_DESCRIPTION 28876\n#define IDS_CERT_ERROR_WEAK_KEY_DETAILS 28877\n#define IDS_CERT_ERROR_WEAK_KEY_DESCRIPTION 28878\n#define IDS_CERT_ERROR_NAME_CONSTRAINT_VIOLATION_DETAILS 28879\n#define IDS_CERT_ERROR_NAME_CONSTRAINT_VIOLATION_DESCRIPTION 28880\n#define IDS_CERT_ERROR_VALIDITY_TOO_LONG_DETAILS 28881\n#define IDS_CERT_ERROR_VALIDITY_TOO_LONG_DESCRIPTION 28882\n#define IDS_CERT_ERROR_UNKNOWN_ERROR_DETAILS 28883\n#define IDS_CERT_ERROR_UNKNOWN_ERROR_DESCRIPTION 28884\n#define IDS_CERT_ERROR_SUMMARY_PINNING_FAILURE_DETAILS 28885\n#define IDS_CERT_ERROR_SUMMARY_PINNING_FAILURE_DESCRIPTION 28886\n#define IDS_CERT_ERROR_AUTHORITY_INVALID_DETAILS 28887\n#define IDS_BLOCK_INTERSTITIAL_TITLE 28888\n#define IDS_BLOCK_INTERSTITIAL_MESSAGE 28889\n#define IDS_CHILD_BLOCK_INTERSTITIAL_MESSAGE_SINGLE_PARENT 28890\n#define IDS_CHILD_BLOCK_INTERSTITIAL_MESSAGE_MULTI_PARENT 28891\n#define IDS_BLOCK_INTERSTITIAL_MESSAGE_ACCESS_REQUESTS_DISABLED 28892\n#define IDS_BACK_BUTTON 28893\n#define IDS_BLOCK_INTERSTITIAL_REQUEST_ACCESS_BUTTON 28894\n#define IDS_CHILD_BLOCK_INTERSTITIAL_REQUEST_ACCESS_BUTTON 28895\n#define IDS_BLOCK_INTERSTITIAL_REQUEST_SENT_MESSAGE 28896\n#define IDS_BLOCK_INTERSTITIAL_REQUEST_FAILED_MESSAGE 28897\n#define IDS_CHILD_BLOCK_INTERSTITIAL_REQUEST_SENT_MESSAGE_SINGLE_PARENT 28898\n#define IDS_CHILD_BLOCK_INTERSTITIAL_REQUEST_SENT_MESSAGE_MULTI_PARENT 28899\n#define IDS_CHILD_BLOCK_INTERSTITIAL_REQUEST_FAILED_MESSAGE_SINGLE_PARENT 28900\n#define IDS_CHILD_BLOCK_INTERSTITIAL_REQUEST_FAILED_MESSAGE_MULTI_PARENT 28901\n#define IDS_BLOCK_INTERSTITIAL_SEND_FEEDBACK 28902\n#define IDS_BLOCK_INTERSTITIAL_SHOW_DETAILS 28903\n#define IDS_BLOCK_INTERSTITIAL_HIDE_DETAILS 28904\n#define IDS_CHILD_BLOCK_MESSAGE_DEFAULT_SINGLE_PARENT 28905\n#define IDS_CHILD_BLOCK_MESSAGE_DEFAULT_MULTI_PARENT 28906\n#define IDS_SUPERVISED_USER_BLOCK_MESSAGE_DEFAULT 28907\n#define IDS_SUPERVISED_USER_BLOCK_HEADER_DEFAULT 28908\n#define IDS_SUPERVISED_USER_BLOCK_MESSAGE_SAFE_SITES 28909\n#define IDS_SUPERVISED_USER_BLOCK_HEADER_SAFE_SITES 28910\n#define IDS_CHILD_BLOCK_MESSAGE_MANUAL_SINGLE_PARENT 28911\n#define IDS_CHILD_BLOCK_MESSAGE_MANUAL_MULTI_PARENT 28912\n#define IDS_SUPERVISED_USER_BLOCK_MESSAGE_MANUAL 28913\n#define IDS_SUPERVISED_USER_BLOCK_HEADER_MANUAL 28914\n#define IDS_SYNC_BASIC_ENCRYPTION_DATA 28915\n#define IDS_SYNC_CONFIGURE_ENCRYPTION 28916\n#define IDS_SYNC_DATATYPE_AUTOFILL 28917\n#define IDS_SYNC_DATATYPE_BOOKMARKS 28918\n#define IDS_SYNC_DATATYPE_PASSWORDS 28919\n#define IDS_SYNC_DATATYPE_TABS 28920\n#define IDS_SYNC_DATATYPE_TYPED_URLS 28921\n#define IDS_SYNC_EMPTY_PASSPHRASE_ERROR 28922\n#define IDS_SYNC_ENCRYPTION_SECTION_TITLE 28923\n#define IDS_SYNC_ENTER_GOOGLE_PASSPHRASE_BODY 28924\n#define IDS_SYNC_FULL_ENCRYPTION_DATA 28925\n#define IDS_SYNC_LOGIN_INFO_OUT_OF_DATE 28926\n#define IDS_SYNC_LOGIN_SETTING_UP 28927\n#define IDS_SYNC_PASSPHRASE_LABEL 28928\n#define IDS_SYNC_PASSPHRASE_MISMATCH_ERROR 28929\n#define IDS_SYNC_SERVICE_UNAVAILABLE 28930\n#define IDS_SYNC_ENTER_PASSPHRASE_BODY_WITH_DATE 28931\n#define IDS_SYNC_ENTER_PASSPHRASE_BODY 28932\n#define IDS_TRANSLATE_INFOBAR_OPTIONS 28933\n#define IDS_TRANSLATE_INFOBAR_OPTIONS_NEVER_TRANSLATE_LANG 28934\n#define IDS_TRANSLATE_INFOBAR_OPTIONS_NEVER_TRANSLATE_SITE 28935\n#define IDS_TRANSLATE_INFOBAR_OPTIONS_ALWAYS 28936\n#define IDS_TRANSLATE_INFOBAR_OPTIONS_REPORT_ERROR 28937\n#define IDS_TRANSLATE_INFOBAR_OPTIONS_ABOUT 28938\n#define IDS_TRANSLATE_INFOBAR_BEFORE_MESSAGE 28939\n#define IDS_TRANSLATE_INFOBAR_ACCEPT 28942\n#define IDS_TRANSLATE_INFOBAR_DENY 28943\n#define IDS_TRANSLATE_INFOBAR_NEVER_TRANSLATE 28944\n#define IDS_TRANSLATE_INFOBAR_ALWAYS_TRANSLATE 28945\n#define IDS_TRANSLATE_INFOBAR_TRANSLATING_TO 28946\n#define IDS_TRANSLATE_INFOBAR_AFTER_MESSAGE 28947\n#define IDS_TRANSLATE_INFOBAR_AFTER_MESSAGE_AUTODETERMINED_SOURCE_LANGUAGE 28948\n#define IDS_TRANSLATE_INFOBAR_REVERT 28950\n#define IDS_TRANSLATE_INFOBAR_RETRY 28951\n#define IDS_TRANSLATE_INFOBAR_ERROR_CANT_CONNECT 28952\n#define IDS_TRANSLATE_INFOBAR_ERROR_CANT_TRANSLATE 28953\n#define IDS_TRANSLATE_INFOBAR_UNKNOWN_PAGE_LANGUAGE 28954\n#define IDS_TRANSLATE_INFOBAR_ERROR_SAME_LANGUAGE 28955\n#define IDS_TRANSLATE_INFOBAR_UNSUPPORTED_PAGE_LANGUAGE 28956\n#define IDS_BOOKMARK_BAR_UNDO 28958\n#define IDS_BOOKMARK_BAR_REDO 28959\n#define IDS_BOOKMARK_BAR_UNDO_ADD 28960\n#define IDS_BOOKMARK_BAR_REDO_ADD 28961\n#define IDS_BOOKMARK_BAR_UNDO_DELETE 28962\n#define IDS_BOOKMARK_BAR_REDO_DELETE 28963\n#define IDS_BOOKMARK_BAR_UNDO_EDIT 28964\n#define IDS_BOOKMARK_BAR_REDO_EDIT 28965\n#define IDS_BOOKMARK_BAR_UNDO_MOVE 28966\n#define IDS_BOOKMARK_BAR_REDO_MOVE 28967\n#define IDS_BOOKMARK_BAR_UNDO_REORDER 28968\n#define IDS_BOOKMARK_BAR_REDO_REORDER 28969\n#define IDS_VERSION_UI_TITLE 28970\n#define IDS_VERSION_UI_OFFICIAL 28971\n#define IDS_VERSION_UI_UNOFFICIAL 28972\n#define IDS_VERSION_UI_32BIT 28973\n#define IDS_VERSION_UI_64BIT 28974\n#define IDS_VERSION_UI_REVISION 28975\n#define IDS_VERSION_UI_OS 28976\n#define IDS_VERSION_UI_USER_AGENT 28977\n#define IDS_VERSION_UI_COMMAND_LINE 28978\n#define IDS_VERSION_UI_EXECUTABLE_PATH 28980\n#define IDS_VERSION_UI_PROFILE_PATH 28981\n#define IDS_VERSION_UI_PATH_NOTFOUND 28982\n#define IDS_VERSION_UI_VARIATIONS 28983\n#define IDS_CANCEL 28985\n#define IDS_CLOSE 28986\n#define IDS_DONE 28987\n#define IDS_LEARN_MORE 28988\n#define IDS_OK 28989\n#define IDS_PLUGIN_NOT_SUPPORTED 28990\n#define IDS_PRINT 28991\n#define IDS_RECENTLY_CLOSED 28992\n#define IDS_ACCNAME_BACK 28993\n#define IDS_ACCNAME_FORWARD 28994\n#define IDS_ACCNAME_CLOSE 28995\n#define IDS_ACCNAME_LOCATION 28996\n#define IDS_UTILITY_PROCESS_JSON_PARSER_NAME 28997\n#define IDS_SESSION_CRASHED_VIEW_RESTORE_BUTTON 28998\n#define IDS_WEBSITE_SETTINGS_NON_SECURE_TRANSPORT 28999\n#define IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY 29000\n\n// ---------------------------------------------------------------------------\n// From content_strings.h:\n\n#define IDS_DETAILS_WITHOUT_SUMMARY_LABEL 18900\n#define IDS_DOWNLOAD_BUTTON_LABEL 18901\n#define IDS_SEARCHABLE_INDEX_INTRO 18902\n#define IDS_FORM_CALENDAR_CLEAR 18903\n#define IDS_FORM_CALENDAR_TODAY 18904\n#define IDS_FORM_DATE_FORMAT_DAY_IN_MONTH 18905\n#define IDS_FORM_DATE_FORMAT_MONTH 18906\n#define IDS_FORM_DATE_FORMAT_YEAR 18907\n#define IDS_FORM_SUBMIT_LABEL 18908\n#define IDS_FORM_INPUT_ALT 18909\n#define IDS_FORM_RESET_LABEL 18910\n#define IDS_FORM_FILE_BUTTON_LABEL 18911\n#define IDS_FORM_MULTIPLE_FILES_BUTTON_LABEL 18912\n#define IDS_FORM_FILE_NO_FILE_LABEL 18913\n#define IDS_FORM_FILE_MULTIPLE_UPLOAD 18914\n#define IDS_FORM_OTHER_COLOR_LABEL 18915\n#define IDS_FORM_OTHER_DATE_LABEL 18916\n#define IDS_FORM_OTHER_MONTH_LABEL 18917\n#define IDS_FORM_OTHER_TIME_LABEL 18918\n#define IDS_FORM_OTHER_WEEK_LABEL 18919\n#define IDS_FORM_PLACEHOLDER_FOR_DAY_OF_MONTH_FIELD 18920\n#define IDS_FORM_PLACEHOLDER_FOR_MONTH_FIELD 18921\n#define IDS_FORM_PLACEHOLDER_FOR_YEAR_FIELD 18922\n#define IDS_FORM_SELECT_MENU_LIST_TEXT 18923\n#define IDS_FORM_THIS_MONTH_LABEL 18924\n#define IDS_FORM_THIS_WEEK_LABEL 18925\n#define IDS_FORM_WEEK_NUMBER_LABEL 18926\n#define IDS_RECENT_SEARCHES_NONE 18927\n#define IDS_RECENT_SEARCHES 18928\n#define IDS_RECENT_SEARCHES_CLEAR 18929\n#define IDS_AX_CALENDAR_SHOW_MONTH_SELECTOR 18930\n#define IDS_AX_CALENDAR_SHOW_NEXT_MONTH 18931\n#define IDS_AX_CALENDAR_SHOW_PREVIOUS_MONTH 18932\n#define IDS_AX_CALENDAR_WEEK_DESCRIPTION 18933\n#define IDS_AX_ROLE_ARTICLE 18934\n#define IDS_AX_ROLE_BANNER 18935\n#define IDS_AX_ROLE_COMPLEMENTARY 18936\n#define IDS_AX_ROLE_CHECK_BOX 18937\n#define IDS_AX_ROLE_CONTENT_INFO 18938\n#define IDS_AX_ROLE_DEFINITION 18939\n#define IDS_AX_ROLE_DESCRIPTION_LIST 18940\n#define IDS_AX_ROLE_DESCRIPTION_TERM 18941\n#define IDS_AX_ROLE_FIGURE 18942\n#define IDS_AX_ROLE_FORM 18943\n#define IDS_AX_ROLE_FOOTER 18944\n#define IDS_AX_ROLE_TOGGLE_BUTTON 18946\n#define IDS_AX_ROLE_HEADING 18947\n#define IDS_AX_ROLE_IMAGE_MAP 18948\n#define IDS_AX_ROLE_LINK 18949\n#define IDS_AX_ROLE_LIST_MARKER 18950\n#define IDS_AX_ROLE_MAIN_CONTENT 18951\n#define IDS_AX_ROLE_MARK 18952\n#define IDS_AX_ROLE_MATH 18953\n#define IDS_AX_ROLE_NAVIGATIONAL_LINK 18954\n#define IDS_AX_ROLE_REGION 18955\n#define IDS_AX_ROLE_SEARCH_BOX 18956\n#define IDS_AX_ROLE_STATUS 18957\n#define IDS_AX_ROLE_SWITCH 18958\n#define IDS_AX_ROLE_WEB_AREA 18959\n#define IDS_AX_BUTTON_ACTION_VERB 19013\n#define IDS_AX_RADIO_BUTTON_ACTION_VERB 19014\n#define IDS_AX_TEXT_FIELD_ACTION_VERB 19015\n#define IDS_AX_CHECKED_CHECK_BOX_ACTION_VERB 19016\n#define IDS_AX_UNCHECKED_CHECK_BOX_ACTION_VERB 19017\n#define IDS_AX_LINK_ACTION_VERB 19018\n#define IDS_AX_POP_UP_BUTTON_ACTION_VERB 19019\n#define IDS_AX_DEFAULT_ACTION_VERB 19020\n#define IDS_AX_AM_PM_FIELD_TEXT 19021\n#define IDS_AX_DAY_OF_MONTH_FIELD_TEXT 19022\n#define IDS_AX_DATE_TIME_FIELD_EMPTY_VALUE_TEXT 19023\n#define IDS_AX_HOUR_FIELD_TEXT 19024\n#define IDS_AX_MEDIA_DEFAULT 19025\n#define IDS_AX_MEDIA_AUDIO_ELEMENT 19026\n#define IDS_AX_MEDIA_VIDEO_ELEMENT 19027\n#define IDS_AX_MEDIA_MUTE_BUTTON 19028\n#define IDS_AX_MEDIA_UNMUTE_BUTTON 19029\n#define IDS_AX_MEDIA_PLAY_BUTTON 19030\n#define IDS_AX_MEDIA_PAUSE_BUTTON 19031\n#define IDS_AX_MEDIA_SLIDER 19032\n#define IDS_AX_MEDIA_SLIDER_THUMB 19033\n#define IDS_AX_MEDIA_CURRENT_TIME_DISPLAY 19034\n#define IDS_AX_MEDIA_TIME_REMAINING_DISPLAY 19035\n#define IDS_AX_MEDIA_STATUS_DISPLAY 19036\n#define IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON 19037\n#define IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON 19038\n#define IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON 19039\n#define IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON 19040\n#define IDS_AX_MEDIA_CAST_OFF_BUTTON 19041\n#define IDS_AX_MEDIA_CAST_ON_BUTTON 19042\n#define IDS_AX_MEDIA_AUDIO_ELEMENT_HELP 19043\n#define IDS_AX_MEDIA_VIDEO_ELEMENT_HELP 19044\n#define IDS_AX_MEDIA_MUTE_BUTTON_HELP 19045\n#define IDS_AX_MEDIA_UNMUTE_BUTTON_HELP 19046\n#define IDS_AX_MEDIA_PLAY_BUTTON_HELP 19047\n#define IDS_AX_MEDIA_PAUSE_BUTTON_HELP 19048\n#define IDS_AX_MEDIA_AUDIO_SLIDER_HELP 19049\n#define IDS_AX_MEDIA_VIDEO_SLIDER_HELP 19050\n#define IDS_AX_MEDIA_SLIDER_THUMB_HELP 19051\n#define IDS_AX_MEDIA_CURRENT_TIME_DISPLAY_HELP 19052\n#define IDS_AX_MEDIA_TIME_REMAINING_DISPLAY_HELP 19053\n#define IDS_AX_MEDIA_STATUS_DISPLAY_HELP 19054\n#define IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON_HELP 19055\n#define IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON_HELP 19056\n#define IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON_HELP 19057\n#define IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON_HELP 19058\n#define IDS_AX_MEDIA_CAST_OFF_BUTTON_HELP 19059\n#define IDS_AX_MEDIA_CAST_ON_BUTTON_HELP 19060\n#define IDS_AX_MILLISECOND_FIELD_TEXT 19061\n#define IDS_AX_MINUTE_FIELD_TEXT 19062\n#define IDS_AX_MONTH_FIELD_TEXT 19063\n#define IDS_AX_SECOND_FIELD_TEXT 19064\n#define IDS_AX_WEEK_OF_YEAR_FIELD_TEXT 19065\n#define IDS_AX_YEAR_FIELD_TEXT 19066\n#define IDS_KEYGEN_HIGH_GRADE_KEY 19067\n#define IDS_KEYGEN_MED_GRADE_KEY 19068\n#define IDS_FORM_INPUT_WEEK_TEMPLATE 19069\n#define IDS_FORM_VALIDATION_VALUE_MISSING_MULTIPLE_FILE 19070\n#define IDS_FORM_VALIDATION_TYPE_MISMATCH 19071\n#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY 19072\n#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY_DOMAIN 19073\n#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY_LOCAL 19074\n#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_DOMAIN 19075\n#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_DOTS 19076\n#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_LOCAL 19077\n#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_NO_AT_SIGN 19078\n#define IDS_FORM_VALIDATION_TYPE_MISMATCH_MULTIPLE_EMAIL 19079\n#define IDS_FORM_VALIDATION_RANGE_UNDERFLOW 19080\n#define IDS_FORM_VALIDATION_RANGE_UNDERFLOW_DATETIME 19081\n#define IDS_FORM_VALIDATION_RANGE_OVERFLOW 19082\n#define IDS_FORM_VALIDATION_RANGE_OVERFLOW_DATETIME 19083\n#define IDS_FORM_VALIDATION_BAD_INPUT_DATETIME 19084\n#define IDS_FORM_VALIDATION_BAD_INPUT_NUMBER 19085\n#define IDS_FORM_VALIDATION_VALUE_MISSING 19086\n#define IDS_FORM_VALIDATION_VALUE_MISSING_CHECKBOX 19087\n#define IDS_FORM_VALIDATION_VALUE_MISSING_FILE 19088\n#define IDS_FORM_VALIDATION_VALUE_MISSING_RADIO 19089\n#define IDS_FORM_VALIDATION_VALUE_MISSING_SELECT 19090\n#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL 19091\n#define IDS_FORM_VALIDATION_TYPE_MISMATCH_URL 19092\n#define IDS_FORM_VALIDATION_PATTERN_MISMATCH 19093\n#define IDS_FORM_VALIDATION_STEP_MISMATCH 19094\n#define IDS_FORM_VALIDATION_STEP_MISMATCH_CLOSE_TO_LIMIT 19095\n#define IDS_FORM_VALIDATION_TOO_LONG 19096\n#define IDS_FORM_VALIDATION_TOO_SHORT 19097\n#define IDS_PLUGIN_INITIALIZATION_ERROR 19098\n\n// ---------------------------------------------------------------------------\n// From extensions_strings.h:\n\n#define IDS_EXTENSION_CONTAINS_PRIVATE_KEY 25950\n#define IDS_EXTENSION_LOAD_ABOUT_PAGE_FAILED 25951\n#define IDS_EXTENSION_LOAD_BACKGROUND_SCRIPT_FAILED 25952\n#define IDS_EXTENSION_LOAD_BACKGROUND_PAGE_FAILED 25953\n#define IDS_EXTENSION_LOAD_ICON_FAILED 25954\n#define IDS_EXTENSION_LOAD_LAUNCHER_PAGE_FAILED 25955\n#define IDS_EXTENSION_LOAD_OPTIONS_PAGE_FAILED 25956\n#define IDS_EXTENSION_LOCALES_NO_DEFAULT_LOCALE_SPECIFIED 25957\n#define IDS_EXTENSION_MANIFEST_UNREADABLE 25958\n#define IDS_EXTENSION_MANIFEST_INVALID 25959\n#define IDS_EXTENSION_PACKAGE_DIRECTORY_ERROR 25960\n#define IDS_EXTENSION_PACKAGE_IMAGE_PATH_ERROR 25961\n#define IDS_EXTENSION_PACKAGE_IMAGE_ERROR 25962\n#define IDS_EXTENSION_PACKAGE_UNZIP_ERROR 25963\n#define IDS_LOAD_STATE_PARAMETER_EXTENSION 25964\n#define IDS_EXTENSION_CANT_INSTALL_POLICY_BLOCKED 25965\n#define IDS_EXTENSION_CANT_MODIFY_POLICY_REQUIRED 25966\n#define IDS_EXTENSION_CANT_UNINSTALL_POLICY_REQUIRED 25967\n#define IDS_EXTENSION_DISABLED_UPDATE_REQUIRED_BY_POLICY 25968\n#define IDS_DEVICE_NAME_WITH_PRODUCT_SERIAL 25969\n#define IDS_DEVICE_NAME_WITH_PRODUCT_UNKNOWN_VENDOR 25970\n#define IDS_DEVICE_NAME_WITH_PRODUCT_UNKNOWN_VENDOR_SERIAL 25971\n#define IDS_DEVICE_NAME_WITH_PRODUCT_VENDOR 25972\n#define IDS_DEVICE_NAME_WITH_PRODUCT_VENDOR_SERIAL 25973\n#define IDS_DEVICE_NAME_WITH_UNKNOWN_PRODUCT_UNKNOWN_VENDOR 25974\n#define IDS_DEVICE_NAME_WITH_UNKNOWN_PRODUCT_UNKNOWN_VENDOR_SERIAL 25975\n#define IDS_DEVICE_NAME_WITH_UNKNOWN_PRODUCT_VENDOR 25976\n#define IDS_DEVICE_NAME_WITH_UNKNOWN_PRODUCT_VENDOR_SERIAL 25977\n#define IDS_DEVICE_PERMISSIONS_PROMPT 25978\n#define IDS_EXTENSION_USB_DEVICE_PRODUCT_NAME_AND_VENDOR 25979\n#define IDS_HID_DEVICE_PERMISSIONS_PROMPT_TITLE 25980\n#define IDS_USB_DEVICE_PERMISSIONS_PROMPT_TITLE 25981\n#define IDS_EXTENSION_TASK_MANAGER_APPVIEW_TAG_PREFIX 25982\n#define IDS_EXTENSION_TASK_MANAGER_EXTENSIONOPTIONS_TAG_PREFIX 25983\n#define IDS_EXTENSION_TASK_MANAGER_EXTENSIONVIEW_TAG_PREFIX 25984\n#define IDS_EXTENSION_TASK_MANAGER_MIMEHANDLERVIEW_TAG_PREFIX 25985\n#define IDS_EXTENSION_TASK_MANAGER_WEBVIEW_TAG_PREFIX 25986\n#define IDS_EXTENSION_WARNINGS_NETWORK_DELAY 25987\n#define IDS_EXTENSION_WARNINGS_NETWORK_CONFLICT 25988\n#define IDS_EXTENSION_WARNINGS_REDIRECT_CONFLICT 25989\n#define IDS_EXTENSION_WARNINGS_REQUEST_HEADER_CONFLICT 25990\n#define IDS_EXTENSION_WARNINGS_RESPONSE_HEADER_CONFLICT 25991\n#define IDS_EXTENSION_WARNINGS_CREDENTIALS_CONFLICT 25992\n#define IDS_EXTENSION_WARNINGS_DOWNLOAD_FILENAME_CONFLICT 25993\n#define IDS_EXTENSION_WARNING_RELOAD_TOO_FREQUENT 25994\n#define IDS_EXTENSION_INSTALL_PROCESS_CRASHED 25995\n#define IDS_EXTENSION_PACKAGE_ERROR_CODE 25996\n#define IDS_EXTENSION_PACKAGE_ERROR_MESSAGE 25997\n#define IDS_EXTENSION_PACKAGE_INSTALL_ERROR 25998\n#define IDS_EXTENSION_UNPACK_FAILED 25999\n#define IDS_UTILITY_PROCESS_EXTENSION_UNPACKER_NAME 26000\n#define IDS_UTILITY_PROCESS_MANIFEST_PARSER_NAME 26001\n\n// ---------------------------------------------------------------------------\n// From platform_locale_settings.h:\n\n#define IDS_STANDARD_FONT_FAMILY 10500\n#define IDS_FIXED_FONT_FAMILY 10501\n#define IDS_FIXED_FONT_FAMILY_ALT_WIN 10502\n#define IDS_SERIF_FONT_FAMILY 10503\n#define IDS_SANS_SERIF_FONT_FAMILY 10504\n#define IDS_CURSIVE_FONT_FAMILY 10505\n#define IDS_FANTASY_FONT_FAMILY 10506\n#define IDS_PICTOGRAPH_FONT_FAMILY 10507\n#define IDS_STANDARD_FONT_FAMILY_CYRILLIC 10508\n#define IDS_FIXED_FONT_FAMILY_ARABIC 10509\n#define IDS_FIXED_FONT_FAMILY_CYRILLIC 10510\n#define IDS_SANS_SERIF_FONT_FAMILY_ARABIC 10511\n#define IDS_SERIF_FONT_FAMILY_CYRILLIC 10512\n#define IDS_SANS_SERIF_FONT_FAMILY_CYRILLIC 10513\n#define IDS_STANDARD_FONT_FAMILY_GREEK 10514\n#define IDS_FIXED_FONT_FAMILY_GREEK 10515\n#define IDS_SERIF_FONT_FAMILY_GREEK 10516\n#define IDS_SANS_SERIF_FONT_FAMILY_GREEK 10517\n#define IDS_STANDARD_FONT_FAMILY_JAPANESE 10518\n#define IDS_STANDARD_FONT_FAMILY_JAPANESE_ALT_WIN 10519\n#define IDS_FIXED_FONT_FAMILY_JAPANESE 10520\n#define IDS_SERIF_FONT_FAMILY_JAPANESE 10521\n#define IDS_SANS_SERIF_FONT_FAMILY_JAPANESE 10522\n#define IDS_SANS_SERIF_FONT_FAMILY_JAPANESE_ALT_WIN 10523\n#define IDS_STANDARD_FONT_FAMILY_KOREAN 10524\n#define IDS_FIXED_FONT_FAMILY_KOREAN 10525\n#define IDS_SERIF_FONT_FAMILY_KOREAN 10526\n#define IDS_SANS_SERIF_FONT_FAMILY_KOREAN 10527\n#define IDS_CURSIVE_FONT_FAMILY_KOREAN 10528\n#define IDS_STANDARD_FONT_FAMILY_SIMPLIFIED_HAN 10529\n#define IDS_FIXED_FONT_FAMILY_SIMPLIFIED_HAN 10530\n#define IDS_SERIF_FONT_FAMILY_SIMPLIFIED_HAN 10531\n#define IDS_SANS_SERIF_FONT_FAMILY_SIMPLIFIED_HAN 10532\n#define IDS_STANDARD_FONT_FAMILY_TRADITIONAL_HAN 10533\n#define IDS_FIXED_FONT_FAMILY_TRADITIONAL_HAN 10534\n#define IDS_SERIF_FONT_FAMILY_TRADITIONAL_HAN 10535\n#define IDS_SANS_SERIF_FONT_FAMILY_TRADITIONAL_HAN 10536\n#define IDS_DEFAULT_FONT_SIZE 10537\n#define IDS_DEFAULT_FIXED_FONT_SIZE 10538\n#define IDS_MINIMUM_FONT_SIZE 10539\n#define IDS_MINIMUM_LOGICAL_FONT_SIZE 10540\n\n// ---------------------------------------------------------------------------\n// From ui_strings.h:\n\n#define IDS_TIME_SECS 11000\n#define IDS_TIME_LONG_SECS 11001\n#define IDS_TIME_LONG_SECS_2ND 11002\n#define IDS_TIME_MINS 11003\n#define IDS_TIME_LONG_MINS 11004\n#define IDS_TIME_LONG_MINS_1ST 11005\n#define IDS_TIME_LONG_MINS_2ND 11006\n#define IDS_TIME_HOURS 11007\n#define IDS_TIME_HOURS_1ST 11008\n#define IDS_TIME_HOURS_2ND 11009\n#define IDS_TIME_DAYS 11010\n#define IDS_TIME_DAYS_1ST 11011\n#define IDS_TIME_REMAINING_SECS 11012\n#define IDS_TIME_REMAINING_LONG_SECS 11013\n#define IDS_TIME_REMAINING_MINS 11014\n#define IDS_TIME_REMAINING_LONG_MINS 11015\n#define IDS_TIME_REMAINING_HOURS 11016\n#define IDS_TIME_REMAINING_DAYS 11017\n#define IDS_TIME_ELAPSED_SECS 11018\n#define IDS_TIME_ELAPSED_MINS 11019\n#define IDS_TIME_ELAPSED_HOURS 11020\n#define IDS_TIME_ELAPSED_DAYS 11021\n#define IDS_PAST_TIME_TODAY 11022\n#define IDS_PAST_TIME_YESTERDAY 11023\n#define IDS_APP_MENU_EMPTY_SUBMENU 11024\n#define IDS_APP_UNTITLED_SHORTCUT_FILE_NAME 11025\n#define IDS_APP_SAVEAS_ALL_FILES 11026\n#define IDS_APP_SAVEAS_EXTENSION_FORMAT 11027\n#define IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE 11028\n#define IDS_SELECT_FOLDER_DIALOG_TITLE 11031\n#define IDS_SAVE_AS_DIALOG_TITLE 11032\n#define IDS_OPEN_FILE_DIALOG_TITLE 11033\n#define IDS_OPEN_FILES_DIALOG_TITLE 11034\n#define IDS_SAVEAS_ALL_FILES 11035\n#define IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON 11036\n#define IDS_APP_ACCACTION_PRESS 11037\n#define IDS_APP_ACCNAME_CLOSE 11038\n#define IDS_APP_ACCNAME_MINIMIZE 11039\n#define IDS_APP_ACCNAME_MAXIMIZE 11040\n#define IDS_APP_ACCNAME_RESTORE 11041\n#define IDS_APP_SCROLLBAR_CXMENU_SCROLLHERE 11042\n#define IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFTEDGE 11043\n#define IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHTEDGE 11044\n#define IDS_APP_SCROLLBAR_CXMENU_SCROLLHOME 11045\n#define IDS_APP_SCROLLBAR_CXMENU_SCROLLEND 11046\n#define IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEUP 11047\n#define IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEDOWN 11048\n#define IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFT 11049\n#define IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHT 11050\n#define IDS_APP_SCROLLBAR_CXMENU_SCROLLUP 11051\n#define IDS_APP_SCROLLBAR_CXMENU_SCROLLDOWN 11052\n#define IDS_APP_UNDO 11053\n#define IDS_APP_CUT 11054\n#define IDS_APP_COPY 11055\n#define IDS_APP_PASTE 11056\n#define IDS_APP_DELETE 11057\n#define IDS_APP_SELECT_ALL 11058\n#define IDS_DELETE_BACKWARD 11059\n#define IDS_DELETE_FORWARD 11060\n#define IDS_DELETE_TO_BEGINNING_OF_LINE 11061\n#define IDS_DELETE_TO_END_OF_LINE 11062\n#define IDS_DELETE_WORD_BACKWARD 11063\n#define IDS_DELETE_WORD_FORWARD 11064\n#define IDS_MOVE_DOWN 11065\n#define IDS_MOVE_LEFT 11066\n#define IDS_MOVE_LEFT_AND_MODIFY_SELECTION 11067\n#define IDS_MOVE_RIGHT 11068\n#define IDS_MOVE_RIGHT_AND_MODIFY_SELECTION 11069\n#define IDS_MOVE_WORD_LEFT 11070\n#define IDS_MOVE_WORD_LEFT_AND_MODIFY_SELECTION 11071\n#define IDS_MOVE_WORD_RIGHT 11072\n#define IDS_MOVE_WORD_RIGHT_AND_MODIFY_SELECTION 11073\n#define IDS_MOVE_TO_BEGINNING_OF_LINE 11074\n#define IDS_MOVE_TO_BEGINNING_OF_LINE_AND_MODIFY_SELECTION 11075\n#define IDS_MOVE_TO_END_OF_LINE 11076\n#define IDS_MOVE_TO_END_OF_LINE_AND_MODIFY_SELECTION 11077\n#define IDS_MOVE_UP 11078\n#define IDS_APP_REDO 11079\n#define IDS_APP_OK 11080\n#define IDS_APP_CANCEL 11081\n#define IDS_APP_CLOSE 11082\n#define IDS_APP_ESC_KEY 11083\n#define IDS_APP_TAB_KEY 11084\n#define IDS_APP_INSERT_KEY 11085\n#define IDS_APP_HOME_KEY 11086\n#define IDS_APP_DELETE_KEY 11087\n#define IDS_APP_END_KEY 11088\n#define IDS_APP_PAGEUP_KEY 11089\n#define IDS_APP_PAGEDOWN_KEY 11090\n#define IDS_APP_LEFT_ARROW_KEY 11091\n#define IDS_APP_RIGHT_ARROW_KEY 11092\n#define IDS_APP_UP_ARROW_KEY 11093\n#define IDS_APP_DOWN_ARROW_KEY 11094\n#define IDS_APP_ENTER_KEY 11095\n#define IDS_APP_SPACE_KEY 11096\n#define IDS_APP_F1_KEY 11097\n#define IDS_APP_F11_KEY 11098\n#define IDS_APP_BACKSPACE_KEY 11099\n#define IDS_APP_COMMA_KEY 11100\n#define IDS_APP_PERIOD_KEY 11101\n#define IDS_APP_MEDIA_NEXT_TRACK_KEY 11102\n#define IDS_APP_MEDIA_PLAY_PAUSE_KEY 11103\n#define IDS_APP_MEDIA_PREV_TRACK_KEY 11104\n#define IDS_APP_MEDIA_STOP_KEY 11105\n#define IDS_APP_CONTROL_MODIFIER 11106\n#define IDS_APP_ALT_MODIFIER 11107\n#define IDS_APP_SHIFT_MODIFIER 11108\n#define IDS_APP_COMMAND_MODIFIER 11109\n#define IDS_APP_SEARCH_MODIFIER 11110\n#define IDS_APP_BYTES 11111\n#define IDS_APP_KIBIBYTES 11112\n#define IDS_APP_MEBIBYTES 11113\n#define IDS_APP_GIBIBYTES 11114\n#define IDS_APP_TEBIBYTES 11115\n#define IDS_APP_PEBIBYTES 11116\n#define IDS_APP_BYTES_PER_SECOND 11117\n#define IDS_APP_KIBIBYTES_PER_SECOND 11118\n#define IDS_APP_MEBIBYTES_PER_SECOND 11119\n#define IDS_APP_GIBIBYTES_PER_SECOND 11120\n#define IDS_APP_TEBIBYTES_PER_SECOND 11121\n#define IDS_APP_PEBIBYTES_PER_SECOND 11122\n#define IDS_MESSAGE_CENTER_ACCESSIBLE_NAME 11123\n#define IDS_MESSAGE_CENTER_NOTIFIER_DISABLE 11124\n#define IDS_MESSAGE_CENTER_FOOTER_TITLE 11125\n#define IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL 11126\n#define IDS_MESSAGE_CENTER_SETTINGS_DIALOG_DESCRIPTION 11128\n#define IDS_MESSAGE_CENTER_SETTINGS_DESCRIPTION_MULTIUSER 11129\n#define IDS_MESSAGE_CENTER_SETTINGS 11130\n#define IDS_MESSAGE_CENTER_CLEAR_ALL 11131\n#define IDS_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOOLTIP 11132\n#define IDS_MESSAGE_CENTER_NO_MESSAGES 11133\n#define IDS_MESSAGE_CENTER_QUIET_MODE 11134\n#define IDS_MESSAGE_CENTER_QUIET_MODE_1HOUR 11135\n#define IDS_MESSAGE_CENTER_QUIET_MODE_1DAY 11136\n#define IDS_MESSAGE_CENTER_CLOSE_NOTIFICATION_BUTTON_ACCESSIBLE_NAME 11137\n#define IDS_MESSAGE_NOTIFICATION_SETTINGS_BUTTON_ACCESSIBLE_NAME 11138\n#define IDS_APP_LIST_HELP 11141\n#define IDS_APP_LIST_OPEN_SETTINGS 11142\n#define IDS_APP_LIST_OPEN_FEEDBACK 11143\n#define IDS_APP_LIST_BACK 11144\n#define IDS_APP_LIST_ALL_APPS 11145\n#define IDS_APP_LIST_FOLDER_NAME_PLACEHOLDER 11146\n#define IDS_APP_LIST_FOLDER_BUTTON_ACCESSIBILE_NAME 11147\n#define IDS_APP_LIST_FOLDER_OPEN_FOLDER_ACCESSIBILE_NAME 11148\n#define IDS_APP_LIST_FOLDER_CLOSE_FOLDER_ACCESSIBILE_NAME 11149\n#define IDS_APP_LIST_SPEECH_HINT_TEXT 11150\n#define IDS_APP_LIST_SPEECH_NETWORK_ERROR_HINT_TEXT 11151\n\n#endif  // CEF_INCLUDE_CEF_PACK_STRINGS_H_\n"
  },
  {
    "path": "CEF/include/cef_parser.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_PARSER_H_\n#define CEF_INCLUDE_CEF_PARSER_H_\n#pragma once\n\n#include <vector>\n\n#include \"include/cef_base.h\"\n#include \"include/cef_values.h\"\n\n///\n// Parse the specified |url| into its component parts.\n// Returns false if the URL is empty or invalid.\n///\n/*--cef()--*/\nbool CefParseURL(const CefString& url,\n                 CefURLParts& parts);\n\n///\n// Creates a URL from the specified |parts|, which must contain a non-empty\n// spec or a non-empty host and path (at a minimum), but not both.\n// Returns false if |parts| isn't initialized as described.\n///\n/*--cef()--*/\nbool CefCreateURL(const CefURLParts& parts,\n                  CefString& url);\n\n///\n// This is a convenience function for formatting a URL in a concise and human-\n// friendly way to help users make security-related decisions (or in other\n// circumstances when people need to distinguish sites, origins, or otherwise-\n// simplified URLs from each other). Internationalized domain names (IDN) may be\n// presented in Unicode if the conversion is considered safe. The returned value\n// will (a) omit the path for standard schemes, excepting file and filesystem,\n// and (b) omit the port if it is the default for the scheme. Do not use this\n// for URLs which will be parsed or sent to other applications.\n///\n/*--cef(optional_param=languages)--*/\nCefString CefFormatUrlForSecurityDisplay(const CefString& origin_url);\n\n///\n// Returns the mime type for the specified file extension or an empty string if\n// unknown.\n///\n/*--cef()--*/\nCefString CefGetMimeType(const CefString& extension);\n\n///\n// Get the extensions associated with the given mime type. This should be passed\n// in lower case. There could be multiple extensions for a given mime type, like\n// \"html,htm\" for \"text/html\", or \"txt,text,html,...\" for \"text/*\". Any existing\n// elements in the provided vector will not be erased.\n///\n/*--cef()--*/\nvoid CefGetExtensionsForMimeType(const CefString& mime_type,\n                                 std::vector<CefString>& extensions);\n\n///\n// Encodes |data| as a base64 string.\n///\n/*--cef()--*/\nCefString CefBase64Encode(const void* data, size_t data_size);\n\n///\n// Decodes the base64 encoded string |data|. The returned value will be NULL if\n// the decoding fails.\n///\n/*--cef()--*/\nCefRefPtr<CefBinaryValue> CefBase64Decode(const CefString& data);\n\n///\n// Escapes characters in |text| which are unsuitable for use as a query\n// parameter value. Everything except alphanumerics and -_.!~*'() will be\n// converted to \"%XX\". If |use_plus| is true spaces will change to \"+\". The\n// result is basically the same as encodeURIComponent in Javacript.\n///\n/*--cef()--*/\nCefString CefURIEncode(const CefString& text, bool use_plus);\n\n///\n// Unescapes |text| and returns the result. Unescaping consists of looking for\n// the exact pattern \"%XX\" where each X is a hex digit and converting to the\n// character with the numerical value of those digits (e.g. \"i%20=%203%3b\"\n// unescapes to \"i = 3;\"). If |convert_to_utf8| is true this function will\n// attempt to interpret the initial decoded result as UTF-8. If the result is\n// convertable into UTF-8 it will be returned as converted. Otherwise the\n// initial decoded result will be returned.  The |unescape_rule| parameter\n// supports further customization the decoding process.\n///\n/*--cef()--*/\nCefString CefURIDecode(const CefString& text,\n                       bool convert_to_utf8,\n                       cef_uri_unescape_rule_t unescape_rule);\n\n///\n// Parses the specified |json_string| and returns a dictionary or list\n// representation. If JSON parsing fails this method returns NULL.\n///\n/*--cef()--*/\nCefRefPtr<CefValue> CefParseJSON(const CefString& json_string,\n                                 cef_json_parser_options_t options);\n\n///\n// Parses the specified |json_string| and returns a dictionary or list\n// representation. If JSON parsing fails this method returns NULL and populates\n// |error_code_out| and |error_msg_out| with an error code and a formatted error\n// message respectively.\n///\n/*--cef()--*/\nCefRefPtr<CefValue> CefParseJSONAndReturnError(\n    const CefString& json_string,\n    cef_json_parser_options_t options,\n    cef_json_parser_error_t& error_code_out,\n    CefString& error_msg_out);\n\n///\n// Generates a JSON string from the specified root |node| which should be a\n// dictionary or list value. Returns an empty string on failure. This method\n// requires exclusive access to |node| including any underlying data.\n///\n/*--cef()--*/\nCefString CefWriteJSON(CefRefPtr<CefValue> node,\n                       cef_json_writer_options_t options);\n\n#endif  // CEF_INCLUDE_CEF_PARSER_H_\n"
  },
  {
    "path": "CEF/include/cef_path_util.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_PATH_UTIL_H_\n#define CEF_INCLUDE_CEF_PATH_UTIL_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\ntypedef cef_path_key_t PathKey;\n\n///\n// Retrieve the path associated with the specified |key|. Returns true on\n// success. Can be called on any thread in the browser process.\n///\n/*--cef()--*/\nbool CefGetPath(PathKey key, CefString& path);\n\n#endif  // CEF_INCLUDE_CEF_PATH_UTIL_H_\n"
  },
  {
    "path": "CEF/include/cef_print_handler.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_PRINT_HANDLER_H_\n#define CEF_INCLUDE_CEF_PRINT_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_print_settings.h\"\n\n///\n// Callback interface for asynchronous continuation of print dialog requests.\n///\n/*--cef(source=library)--*/\nclass CefPrintDialogCallback : public virtual CefBase {\n public:\n  ///\n  // Continue printing with the specified |settings|.\n  ///\n  /*--cef(capi_name=cont)--*/\n  virtual void Continue(CefRefPtr<CefPrintSettings> settings) =0;\n\n  ///\n  // Cancel the printing.\n  ///\n  /*--cef()--*/\n  virtual void Cancel() =0;\n};\n\n///\n// Callback interface for asynchronous continuation of print job requests.\n///\n/*--cef(source=library)--*/\nclass CefPrintJobCallback : public virtual CefBase {\n public:\n  ///\n  // Indicate completion of the print job.\n  ///\n  /*--cef(capi_name=cont)--*/\n  virtual void Continue() =0;\n};\n\n\n///\n// Implement this interface to handle printing on Linux. The methods of this\n// class will be called on the browser process UI thread.\n///\n/*--cef(source=client)--*/\nclass CefPrintHandler : public virtual CefBase {\n public:\n  ///\n  // Called when printing has started for the specified |browser|. This method\n  // will be called before the other OnPrint*() methods and irrespective of how\n  // printing was initiated (e.g. CefBrowserHost::Print(), JavaScript\n  // window.print() or PDF extension print button).\n  ///\n  /*--cef()--*/\n  virtual void OnPrintStart(CefRefPtr<CefBrowser> browser) =0;\n\n  ///\n  // Synchronize |settings| with client state. If |get_defaults| is true then\n  // populate |settings| with the default print settings. Do not keep a\n  // reference to |settings| outside of this callback.\n  ///\n  /*--cef()--*/\n  virtual void OnPrintSettings(CefRefPtr<CefPrintSettings> settings,\n                               bool get_defaults) =0;\n\n  ///\n  // Show the print dialog. Execute |callback| once the dialog is dismissed.\n  // Return true if the dialog will be displayed or false to cancel the\n  // printing immediately.\n  ///\n  /*--cef()--*/\n  virtual bool OnPrintDialog(bool has_selection,\n                             CefRefPtr<CefPrintDialogCallback> callback) =0;\n\n  ///\n  // Send the print job to the printer. Execute |callback| once the job is\n  // completed. Return true if the job will proceed or false to cancel the job\n  // immediately.\n  ///\n  /*--cef()--*/\n  virtual bool OnPrintJob(const CefString& document_name,\n                          const CefString& pdf_file_path,\n                          CefRefPtr<CefPrintJobCallback> callback) =0;\n\n  ///\n  // Reset client state related to printing.\n  ///\n  /*--cef()--*/\n  virtual void OnPrintReset() =0;\n\n  ///\n  // Return the PDF paper size in device units. Used in combination with\n  // CefBrowserHost::PrintToPDF().\n  ///\n  /*--cef()--*/\n  virtual CefSize GetPdfPaperSize(int device_units_per_inch) {\n    return CefSize();\n  }\n};\n\n#endif  // CEF_INCLUDE_CEF_PRINT_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_print_settings.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_PRINT_SETTINGS_H_\n#define CEF_INCLUDE_CEF_PRINT_SETTINGS_H_\n#pragma once\n\n#include <vector>\n\n#include \"include/cef_base.h\"\n\n///\n// Class representing print settings.\n///\n/*--cef(source=library)--*/\nclass CefPrintSettings : public virtual CefBase {\n public:\n  typedef cef_color_model_t ColorModel;\n  typedef cef_duplex_mode_t DuplexMode;\n  typedef std::vector<CefRange> PageRangeList;\n\n  ///\n  // Create a new CefPrintSettings object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefPrintSettings> Create();\n\n  ///\n  // Returns true if this object is valid. Do not call any other methods if this\n  // function returns false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns true if the values of this object are read-only. Some APIs may\n  // expose read-only objects.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Returns a writable copy of this object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefPrintSettings> Copy() =0;\n\n  ///\n  // Set the page orientation.\n  ///\n  /*--cef()--*/\n  virtual void SetOrientation(bool landscape) =0;\n\n  ///\n  // Returns true if the orientation is landscape.\n  ///\n  /*--cef()--*/\n  virtual bool IsLandscape() =0;\n\n  ///\n  // Set the printer printable area in device units.\n  // Some platforms already provide flipped area. Set |landscape_needs_flip|\n  // to false on those platforms to avoid double flipping.\n  ///\n  /*--cef()--*/\n  virtual void SetPrinterPrintableArea(\n      const CefSize& physical_size_device_units,\n      const CefRect& printable_area_device_units,\n      bool landscape_needs_flip) =0;\n\n  ///\n  // Set the device name.\n  ///\n  /*--cef(optional_param=name)--*/\n  virtual void SetDeviceName(const CefString& name) =0;\n\n  ///\n  // Get the device name.\n  ///\n  /*--cef()--*/\n  virtual CefString GetDeviceName() =0;\n\n  ///\n  // Set the DPI (dots per inch).\n  ///\n  /*--cef()--*/\n  virtual void SetDPI(int dpi) =0;\n\n  ///\n  // Get the DPI (dots per inch).\n  ///\n  /*--cef()--*/\n  virtual int GetDPI() =0;\n\n  ///\n  // Set the page ranges.\n  ///\n  /*--cef()--*/\n  virtual void SetPageRanges(const PageRangeList& ranges) =0;\n\n  ///\n  // Returns the number of page ranges that currently exist.\n  ///\n  /*--cef()--*/\n  virtual size_t GetPageRangesCount() =0;\n\n  ///\n  // Retrieve the page ranges.\n  ///\n  /*--cef(count_func=ranges:GetPageRangesCount)--*/\n  virtual void GetPageRanges(PageRangeList& ranges) =0;\n\n  ///\n  // Set whether only the selection will be printed.\n  ///\n  /*--cef()--*/\n  virtual void SetSelectionOnly(bool selection_only) =0;\n\n  ///\n  // Returns true if only the selection will be printed.\n  ///\n  /*--cef()--*/\n  virtual bool IsSelectionOnly() =0;\n\n  ///\n  // Set whether pages will be collated.\n  ///\n  /*--cef()--*/\n  virtual void SetCollate(bool collate) =0;\n\n  ///\n  // Returns true if pages will be collated.\n  ///\n  /*--cef()--*/\n  virtual bool WillCollate() =0;\n\n  ///\n  // Set the color model.\n  ///\n  /*--cef()--*/\n  virtual void SetColorModel(ColorModel model) =0;\n\n  ///\n  // Get the color model.\n  ///\n  /*--cef(default_retval=COLOR_MODEL_UNKNOWN)--*/\n  virtual ColorModel GetColorModel() =0;\n\n  ///\n  // Set the number of copies.\n  ///\n  /*--cef()--*/\n  virtual void SetCopies(int copies) =0;\n\n  ///\n  // Get the number of copies.\n  ///\n  /*--cef()--*/\n  virtual int GetCopies() =0;\n\n  ///\n  // Set the duplex mode.\n  ///\n  /*--cef()--*/\n  virtual void SetDuplexMode(DuplexMode mode) =0;\n\n  ///\n  // Get the duplex mode.\n  ///\n  /*--cef(default_retval=DUPLEX_MODE_UNKNOWN)--*/\n  virtual DuplexMode GetDuplexMode() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_PRINT_SETTINGS_H_\n\n"
  },
  {
    "path": "CEF/include/cef_process_message.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_MESSAGE_H_\n#define CEF_INCLUDE_CEF_MESSAGE_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_values.h\"\n\ntypedef cef_process_id_t CefProcessId;\n\n///\n// Class representing a message. Can be used on any process and thread.\n///\n/*--cef(source=library)--*/\nclass CefProcessMessage : public virtual CefBase {\n public:\n  ///\n  // Create a new CefProcessMessage object with the specified name.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefProcessMessage> Create(const CefString& name);\n\n  ///\n  // Returns true if this object is valid. Do not call any other methods if this\n  // function returns false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns true if the values of this object are read-only. Some APIs may\n  // expose read-only objects.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Returns a writable copy of this object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefProcessMessage> Copy() =0;\n\n  ///\n  // Returns the message name.\n  ///\n  /*--cef()--*/\n  virtual CefString GetName() =0;\n\n  ///\n  // Returns the list of arguments.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefListValue> GetArgumentList() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_MESSAGE_H_\n"
  },
  {
    "path": "CEF/include/cef_process_util.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_PROCESS_UTIL_H_\n#define CEF_INCLUDE_CEF_PROCESS_UTIL_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_command_line.h\"\n\n///\n// Launches the process specified via |command_line|. Returns true upon\n// success. Must be called on the browser process TID_PROCESS_LAUNCHER thread.\n//\n// Unix-specific notes:\n// - All file descriptors open in the parent process will be closed in the\n//   child process except for stdin, stdout, and stderr.\n// - If the first argument on the command line does not contain a slash,\n//   PATH will be searched. (See man execvp.)\n///\n/*--cef()--*/\nbool CefLaunchProcess(CefRefPtr<CefCommandLine> command_line);\n\n#endif  // CEF_INCLUDE_CEF_PROCESS_UTIL_H_\n"
  },
  {
    "path": "CEF/include/cef_render_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_RENDER_HANDLER_H_\n#define CEF_INCLUDE_CEF_RENDER_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_drag_data.h\"\n#include <vector>\n\n///\n// Implement this interface to handle events when window rendering is disabled.\n// The methods of this class will be called on the UI thread.\n///\n/*--cef(source=client)--*/\nclass CefRenderHandler : public virtual CefBase {\n public:\n  typedef cef_cursor_type_t CursorType;\n  typedef cef_drag_operations_mask_t DragOperation;\n  typedef cef_drag_operations_mask_t DragOperationsMask;\n  typedef cef_paint_element_type_t PaintElementType;\n  typedef std::vector<CefRect> RectList;\n\n  ///\n  // Called to retrieve the root window rectangle in screen coordinates. Return\n  // true if the rectangle was provided.\n  ///\n  /*--cef()--*/\n  virtual bool GetRootScreenRect(CefRefPtr<CefBrowser> browser,\n                                 CefRect& rect) { return false; }\n\n  ///\n  // Called to retrieve the view rectangle which is relative to screen\n  // coordinates. Return true if the rectangle was provided.\n  ///\n  /*--cef()--*/\n  virtual bool GetViewRect(CefRefPtr<CefBrowser> browser, CefRect& rect) =0;\n\n  ///\n  // Called to retrieve the translation from view coordinates to actual screen\n  // coordinates. Return true if the screen coordinates were provided.\n  ///\n  /*--cef()--*/\n  virtual bool GetScreenPoint(CefRefPtr<CefBrowser> browser,\n                              int viewX,\n                              int viewY,\n                              int& screenX,\n                              int& screenY) { return false; }\n\n  ///\n  // Called to allow the client to fill in the CefScreenInfo object with\n  // appropriate values. Return true if the |screen_info| structure has been\n  // modified.\n  //\n  // If the screen info rectangle is left empty the rectangle from GetViewRect\n  // will be used. If the rectangle is still empty or invalid popups may not be\n  // drawn correctly.\n  ///\n  /*--cef()--*/\n  virtual bool GetScreenInfo(CefRefPtr<CefBrowser> browser,\n                             CefScreenInfo& screen_info) { return false; }\n\n  ///\n  // Called when the browser wants to show or hide the popup widget. The popup\n  // should be shown if |show| is true and hidden if |show| is false.\n  ///\n  /*--cef()--*/\n  virtual void OnPopupShow(CefRefPtr<CefBrowser> browser,\n                           bool show) {}\n\n  ///\n  // Called when the browser wants to move or resize the popup widget. |rect|\n  // contains the new location and size in view coordinates.\n  ///\n  /*--cef()--*/\n  virtual void OnPopupSize(CefRefPtr<CefBrowser> browser,\n                           const CefRect& rect) {}\n\n  ///\n  // Called when an element should be painted. Pixel values passed to this\n  // method are scaled relative to view coordinates based on the value of\n  // CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type|\n  // indicates whether the element is the view or the popup widget. |buffer|\n  // contains the pixel data for the whole image. |dirtyRects| contains the set\n  // of rectangles in pixel coordinates that need to be repainted. |buffer| will\n  // be |width|*|height|*4 bytes in size and represents a BGRA image with an\n  // upper-left origin.\n  ///\n  /*--cef()--*/\n  virtual void OnPaint(CefRefPtr<CefBrowser> browser,\n                       PaintElementType type,\n                       const RectList& dirtyRects,\n                       const void* buffer,\n                       int width, int height) =0;\n\n  ///\n  // Called when the browser's cursor has changed. If |type| is CT_CUSTOM then\n  // |custom_cursor_info| will be populated with the custom cursor information.\n  ///\n  /*--cef()--*/\n  virtual void OnCursorChange(CefRefPtr<CefBrowser> browser,\n                              CefCursorHandle cursor,\n                              CursorType type,\n                              const CefCursorInfo& custom_cursor_info) {}\n\n  ///\n  // Called when the user starts dragging content in the web view. Contextual\n  // information about the dragged content is supplied by |drag_data|.\n  // (|x|, |y|) is the drag start location in screen coordinates.\n  // OS APIs that run a system message loop may be used within the\n  // StartDragging call.\n  //\n  // Return false to abort the drag operation. Don't call any of\n  // CefBrowserHost::DragSource*Ended* methods after returning false.\n  //\n  // Return true to handle the drag operation. Call\n  // CefBrowserHost::DragSourceEndedAt and DragSourceSystemDragEnded either\n  // synchronously or asynchronously to inform the web view that the drag\n  // operation has ended.\n  ///\n  /*--cef()--*/\n  virtual bool StartDragging(CefRefPtr<CefBrowser> browser,\n                             CefRefPtr<CefDragData> drag_data,\n                             DragOperationsMask allowed_ops,\n                             int x, int y) { return false; }\n\n  ///\n  // Called when the web view wants to update the mouse cursor during a\n  // drag & drop operation. |operation| describes the allowed operation\n  // (none, move, copy, link).\n  ///\n  /*--cef()--*/\n  virtual void UpdateDragCursor(CefRefPtr<CefBrowser> browser,\n                                DragOperation operation) {}\n\n  ///\n  // Called when the scroll offset has changed.\n  ///\n  /*--cef()--*/\n  virtual void OnScrollOffsetChanged(CefRefPtr<CefBrowser> browser,\n                                     double x,\n                                     double y) {}\n};\n\n#endif  // CEF_INCLUDE_CEF_RENDER_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_render_process_handler.h",
    "content": "// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_RENDER_PROCESS_HANDLER_H_\n#define CEF_INCLUDE_CEF_RENDER_PROCESS_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_dom.h\"\n#include \"include/cef_frame.h\"\n#include \"include/cef_load_handler.h\"\n#include \"include/cef_process_message.h\"\n#include \"include/cef_v8.h\"\n#include \"include/cef_values.h\"\n\n///\n// Class used to implement render process callbacks. The methods of this class\n// will be called on the render process main thread (TID_RENDERER) unless\n// otherwise indicated.\n///\n/*--cef(source=client)--*/\nclass CefRenderProcessHandler : public virtual CefBase {\n public:\n  typedef cef_navigation_type_t NavigationType;\n\n  ///\n  // Called after the render process main thread has been created. |extra_info|\n  // is a read-only value originating from\n  // CefBrowserProcessHandler::OnRenderProcessThreadCreated(). Do not keep a\n  // reference to |extra_info| outside of this method.\n  ///\n  /*--cef()--*/\n  virtual void OnRenderThreadCreated(CefRefPtr<CefListValue> extra_info) {}\n\n  ///\n  // Called after WebKit has been initialized.\n  ///\n  /*--cef()--*/\n  virtual void OnWebKitInitialized() {}\n\n  ///\n  // Called after a browser has been created. When browsing cross-origin a new\n  // browser will be created before the old browser with the same identifier is\n  // destroyed.\n  ///\n  /*--cef()--*/\n  virtual void OnBrowserCreated(CefRefPtr<CefBrowser> browser) {}\n\n  ///\n  // Called before a browser is destroyed.\n  ///\n  /*--cef()--*/\n  virtual void OnBrowserDestroyed(CefRefPtr<CefBrowser> browser) {}\n\n  ///\n  // Return the handler for browser load status events.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefLoadHandler> GetLoadHandler() {\n    return NULL;\n  }\n\n  ///\n  // Called before browser navigation. Return true to cancel the navigation or\n  // false to allow the navigation to proceed. The |request| object cannot be\n  // modified in this callback.\n  ///\n  /*--cef()--*/\n  virtual bool OnBeforeNavigation(CefRefPtr<CefBrowser> browser,\n                                  CefRefPtr<CefFrame> frame,\n                                  CefRefPtr<CefRequest> request,\n                                  NavigationType navigation_type,\n                                  bool is_redirect) { return false; }\n\n  ///\n  // Called immediately after the V8 context for a frame has been created. To\n  // retrieve the JavaScript 'window' object use the CefV8Context::GetGlobal()\n  // method. V8 handles can only be accessed from the thread on which they are\n  // created. A task runner for posting tasks on the associated thread can be\n  // retrieved via the CefV8Context::GetTaskRunner() method.\n  ///\n  /*--cef()--*/\n  virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,\n                                CefRefPtr<CefFrame> frame,\n                                CefRefPtr<CefV8Context> context) {}\n\n  ///\n  // Called immediately before the V8 context for a frame is released. No\n  // references to the context should be kept after this method is called.\n  ///\n  /*--cef()--*/\n  virtual void OnContextReleased(CefRefPtr<CefBrowser> browser,\n                                 CefRefPtr<CefFrame> frame,\n                                 CefRefPtr<CefV8Context> context) {}\n\n  ///\n  // Called for global uncaught exceptions in a frame. Execution of this\n  // callback is disabled by default. To enable set\n  // CefSettings.uncaught_exception_stack_size > 0.\n  ///\n  /*--cef()--*/\n  virtual void OnUncaughtException(CefRefPtr<CefBrowser> browser,\n                                   CefRefPtr<CefFrame> frame,\n                                   CefRefPtr<CefV8Context> context,\n                                   CefRefPtr<CefV8Exception> exception,\n                                   CefRefPtr<CefV8StackTrace> stackTrace) {}\n\n  ///\n  // Called when a new node in the the browser gets focus. The |node| value may\n  // be empty if no specific node has gained focus. The node object passed to\n  // this method represents a snapshot of the DOM at the time this method is\n  // executed. DOM objects are only valid for the scope of this method. Do not\n  // keep references to or attempt to access any DOM objects outside the scope\n  // of this method.\n  ///\n  /*--cef(optional_param=frame,optional_param=node)--*/\n  virtual void OnFocusedNodeChanged(CefRefPtr<CefBrowser> browser,\n                                    CefRefPtr<CefFrame> frame,\n                                    CefRefPtr<CefDOMNode> node) {}\n\n  ///\n  // Called when a new message is received from a different process. Return true\n  // if the message was handled or false otherwise. Do not keep a reference to\n  // or attempt to access the message outside of this callback.\n  ///\n  /*--cef()--*/\n  virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,\n                                        CefProcessId source_process,\n                                        CefRefPtr<CefProcessMessage> message) {\n    return false;\n  }\n};\n\n#endif  // CEF_INCLUDE_CEF_RENDER_PROCESS_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_request.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_REQUEST_H_\n#define CEF_INCLUDE_CEF_REQUEST_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include <map>\n#include <vector>\n\nclass CefPostData;\nclass CefPostDataElement;\n\n///\n// Class used to represent a web request. The methods of this class may be\n// called on any thread.\n///\n/*--cef(source=library,no_debugct_check)--*/\nclass CefRequest : public virtual CefBase {\n public:\n  typedef std::multimap<CefString, CefString> HeaderMap;\n  typedef cef_referrer_policy_t ReferrerPolicy;\n  typedef cef_resource_type_t ResourceType;\n  typedef cef_transition_type_t TransitionType;\n\n  ///\n  // Create a new CefRequest object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefRequest> Create();\n\n  ///\n  // Returns true if this object is read-only.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Get the fully qualified URL.\n  ///\n  /*--cef()--*/\n  virtual CefString GetURL() =0;\n\n  ///\n  // Set the fully qualified URL.\n  ///\n  /*--cef()--*/\n  virtual void SetURL(const CefString& url) =0;\n\n  ///\n  // Get the request method type. The value will default to POST if post data\n  // is provided and GET otherwise.\n  ///\n  /*--cef()--*/\n  virtual CefString GetMethod() =0;\n\n  ///\n  // Set the request method type.\n  ///\n  /*--cef()--*/\n  virtual void SetMethod(const CefString& method) =0;\n\n  ///\n  // Set the referrer URL and policy. If non-empty the referrer URL must be\n  // fully qualified with an HTTP or HTTPS scheme component. Any username,\n  // password or ref component will be removed.\n  ///\n  /*--cef()--*/\n  virtual void SetReferrer(const CefString& referrer_url,\n                           ReferrerPolicy policy) =0;\n\n  ///\n  // Get the referrer URL.\n  ///\n  /*--cef()--*/\n  virtual CefString GetReferrerURL() =0;\n\n  ///\n  // Get the referrer policy.\n  ///\n  /*--cef(default_retval=REFERRER_POLICY_DEFAULT)--*/\n  virtual ReferrerPolicy GetReferrerPolicy() =0;\n\n  ///\n  // Get the post data.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefPostData> GetPostData() =0;\n\n  ///\n  // Set the post data.\n  ///\n  /*--cef()--*/\n  virtual void SetPostData(CefRefPtr<CefPostData> postData) =0;\n\n  ///\n  // Get the header values. Will not include the Referer value if any.\n  ///\n  /*--cef()--*/\n  virtual void GetHeaderMap(HeaderMap& headerMap) =0;\n\n  ///\n  // Set the header values. If a Referer value exists in the header map it will\n  // be removed and ignored.\n  ///\n  /*--cef()--*/\n  virtual void SetHeaderMap(const HeaderMap& headerMap) =0;\n\n  ///\n  // Set all values at one time.\n  ///\n  /*--cef(optional_param=postData)--*/\n  virtual void Set(const CefString& url,\n                   const CefString& method,\n                   CefRefPtr<CefPostData> postData,\n                   const HeaderMap& headerMap) =0;\n\n  ///\n  // Get the flags used in combination with CefURLRequest. See\n  // cef_urlrequest_flags_t for supported values.\n  ///\n  /*--cef(default_retval=UR_FLAG_NONE)--*/\n  virtual int GetFlags() =0;\n\n  ///\n  // Set the flags used in combination with CefURLRequest.  See\n  // cef_urlrequest_flags_t for supported values.\n  ///\n  /*--cef()--*/\n  virtual void SetFlags(int flags) =0;\n\n  ///\n  // Set the URL to the first party for cookies used in combination with\n  // CefURLRequest.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFirstPartyForCookies() =0;\n\n  ///\n  // Get the URL to the first party for cookies used in combination with\n  // CefURLRequest.\n  ///\n  /*--cef()--*/\n  virtual void SetFirstPartyForCookies(const CefString& url) =0;\n\n  ///\n  // Get the resource type for this request. Only available in the browser\n  // process.\n  ///\n  /*--cef(default_retval=RT_SUB_RESOURCE)--*/\n  virtual ResourceType GetResourceType() =0;\n\n  ///\n  // Get the transition type for this request. Only available in the browser\n  // process and only applies to requests that represent a main frame or\n  // sub-frame navigation.\n  ///\n  /*--cef(default_retval=TT_EXPLICIT)--*/\n  virtual TransitionType GetTransitionType() =0;\n\n  ///\n  // Returns the globally unique identifier for this request or 0 if not\n  // specified. Can be used by CefRequestHandler implementations in the browser\n  // process to track a single request across multiple callbacks.\n  ///\n  /*--cef()--*/\n  virtual uint64 GetIdentifier() =0;\n};\n\n\n///\n// Class used to represent post data for a web request. The methods of this\n// class may be called on any thread.\n///\n/*--cef(source=library,no_debugct_check)--*/\nclass CefPostData : public virtual CefBase {\n public:\n  typedef std::vector<CefRefPtr<CefPostDataElement> > ElementVector;\n\n  ///\n  // Create a new CefPostData object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefPostData> Create();\n\n  ///\n  // Returns true if this object is read-only.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Returns true if the underlying POST data includes elements that are not\n  // represented by this CefPostData object (for example, multi-part file upload\n  // data). Modifying CefPostData objects with excluded elements may result in\n  // the request failing.\n  ///\n  /*--cef()--*/\n  virtual bool HasExcludedElements() = 0;\n\n  ///\n  // Returns the number of existing post data elements.\n  ///\n  /*--cef()--*/\n  virtual size_t GetElementCount() =0;\n\n  ///\n  // Retrieve the post data elements.\n  ///\n  /*--cef(count_func=elements:GetElementCount)--*/\n  virtual void GetElements(ElementVector& elements) =0;\n\n  ///\n  // Remove the specified post data element.  Returns true if the removal\n  // succeeds.\n  ///\n  /*--cef()--*/\n  virtual bool RemoveElement(CefRefPtr<CefPostDataElement> element) =0;\n\n  ///\n  // Add the specified post data element.  Returns true if the add succeeds.\n  ///\n  /*--cef()--*/\n  virtual bool AddElement(CefRefPtr<CefPostDataElement> element) =0;\n\n  ///\n  // Remove all existing post data elements.\n  ///\n  /*--cef()--*/\n  virtual void RemoveElements() =0;\n};\n\n\n///\n// Class used to represent a single element in the request post data. The\n// methods of this class may be called on any thread.\n///\n/*--cef(source=library,no_debugct_check)--*/\nclass CefPostDataElement : public virtual CefBase {\n public:\n  ///\n  // Post data elements may represent either bytes or files.\n  ///\n  typedef cef_postdataelement_type_t Type;\n\n  ///\n  // Create a new CefPostDataElement object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefPostDataElement> Create();\n\n  ///\n  // Returns true if this object is read-only.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Remove all contents from the post data element.\n  ///\n  /*--cef()--*/\n  virtual void SetToEmpty() =0;\n\n  ///\n  // The post data element will represent a file.\n  ///\n  /*--cef()--*/\n  virtual void SetToFile(const CefString& fileName) =0;\n\n  ///\n  // The post data element will represent bytes.  The bytes passed\n  // in will be copied.\n  ///\n  /*--cef()--*/\n  virtual void SetToBytes(size_t size, const void* bytes) =0;\n\n  ///\n  // Return the type of this post data element.\n  ///\n  /*--cef(default_retval=PDE_TYPE_EMPTY)--*/\n  virtual Type GetType() =0;\n\n  ///\n  // Return the file name.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFile() =0;\n\n  ///\n  // Return the number of bytes.\n  ///\n  /*--cef()--*/\n  virtual size_t GetBytesCount() =0;\n\n  ///\n  // Read up to |size| bytes into |bytes| and return the number of bytes\n  // actually read.\n  ///\n  /*--cef()--*/\n  virtual size_t GetBytes(size_t size, void* bytes) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_REQUEST_H_\n"
  },
  {
    "path": "CEF/include/cef_request_context.h",
    "content": "// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_REQUEST_CONTEXT_H_\n#define CEF_INCLUDE_CEF_REQUEST_CONTEXT_H_\n#pragma once\n\n#include <vector>\n\n#include \"include/cef_callback.h\"\n#include \"include/cef_cookie.h\"\n#include \"include/cef_request_context_handler.h\"\n#include \"include/cef_values.h\"\n\nclass CefSchemeHandlerFactory;\n\n\n///\n// Callback interface for CefRequestContext::ResolveHost.\n///\n/*--cef(source=client)--*/\nclass CefResolveCallback : public virtual CefBase {\n public:\n  ///\n  // Called after the ResolveHost request has completed. |result| will be the\n  // result code. |resolved_ips| will be the list of resolved IP addresses or\n  // empty if the resolution failed.\n  ///\n  /*--cef(optional_param=resolved_ips)--*/\n  virtual void OnResolveCompleted(\n      cef_errorcode_t result,\n      const std::vector<CefString>& resolved_ips) =0;\n};\n\n\n///\n// A request context provides request handling for a set of related browser\n// or URL request objects. A request context can be specified when creating a\n// new browser via the CefBrowserHost static factory methods or when creating a\n// new URL request via the CefURLRequest static factory methods. Browser objects\n// with different request contexts will never be hosted in the same render\n// process. Browser objects with the same request context may or may not be\n// hosted in the same render process depending on the process model. Browser\n// objects created indirectly via the JavaScript window.open function or\n// targeted links will share the same render process and the same request\n// context as the source browser. When running in single-process mode there is\n// only a single render process (the main process) and so all browsers created\n// in single-process mode will share the same request context. This will be the\n// first request context passed into a CefBrowserHost static factory method and\n// all other request context objects will be ignored.\n///\n/*--cef(source=library,no_debugct_check)--*/\nclass CefRequestContext : public virtual CefBase {\n public:\n  ///\n  // Returns the global context object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefRequestContext> GetGlobalContext();\n\n  ///\n  // Creates a new context object with the specified |settings| and optional\n  // |handler|.\n  ///\n  /*--cef(optional_param=handler)--*/\n  static CefRefPtr<CefRequestContext> CreateContext(\n      const CefRequestContextSettings& settings,\n      CefRefPtr<CefRequestContextHandler> handler);\n\n  ///\n  // Creates a new context object that shares storage with |other| and uses an\n  // optional |handler|.\n  ///\n  /*--cef(capi_name=cef_create_context_shared,optional_param=handler)--*/\n  static CefRefPtr<CefRequestContext> CreateContext(\n      CefRefPtr<CefRequestContext> other,\n      CefRefPtr<CefRequestContextHandler> handler);\n\n  ///\n  // Returns true if this object is pointing to the same context as |that|\n  // object.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefRequestContext> other) =0;\n\n  ///\n  // Returns true if this object is sharing the same storage as |that| object.\n  ///\n  /*--cef()--*/\n  virtual bool IsSharingWith(CefRefPtr<CefRequestContext> other) =0;\n\n  ///\n  // Returns true if this object is the global context. The global context is\n  // used by default when creating a browser or URL request with a NULL context\n  // argument.\n  ///\n  /*--cef()--*/\n  virtual bool IsGlobal() =0;\n\n  ///\n  // Returns the handler for this context if any.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefRequestContextHandler> GetHandler() =0;\n\n  ///\n  // Returns the cache path for this object. If empty an \"incognito mode\"\n  // in-memory cache is being used.\n  ///\n  /*--cef()--*/\n  virtual CefString GetCachePath() =0;\n\n  ///\n  // Returns the default cookie manager for this object. This will be the global\n  // cookie manager if this object is the global request context. Otherwise,\n  // this will be the default cookie manager used when this request context does\n  // not receive a value via CefRequestContextHandler::GetCookieManager(). If\n  // |callback| is non-NULL it will be executed asnychronously on the IO thread\n  // after the manager's storage has been initialized.\n  ///\n  /*--cef(optional_param=callback)--*/\n  virtual CefRefPtr<CefCookieManager> GetDefaultCookieManager(\n      CefRefPtr<CefCompletionCallback> callback) =0;\n\n  ///\n  // Register a scheme handler factory for the specified |scheme_name| and\n  // optional |domain_name|. An empty |domain_name| value for a standard scheme\n  // will cause the factory to match all domain names. The |domain_name| value\n  // will be ignored for non-standard schemes. If |scheme_name| is a built-in\n  // scheme and no handler is returned by |factory| then the built-in scheme\n  // handler factory will be called. If |scheme_name| is a custom scheme then\n  // you must also implement the CefApp::OnRegisterCustomSchemes() method in all\n  // processes. This function may be called multiple times to change or remove\n  // the factory that matches the specified |scheme_name| and optional\n  // |domain_name|. Returns false if an error occurs. This function may be\n  // called on any thread in the browser process.\n  ///\n  /*--cef(optional_param=domain_name,optional_param=factory)--*/\n  virtual bool RegisterSchemeHandlerFactory(\n      const CefString& scheme_name,\n      const CefString& domain_name,\n      CefRefPtr<CefSchemeHandlerFactory> factory) =0;\n\n  ///\n  // Clear all registered scheme handler factories. Returns false on error. This\n  // function may be called on any thread in the browser process.\n  ///\n  /*--cef()--*/\n  virtual bool ClearSchemeHandlerFactories() =0;\n\n  ///\n  // Tells all renderer processes associated with this context to throw away\n  // their plugin list cache. If |reload_pages| is true they will also reload\n  // all pages with plugins. CefRequestContextHandler::OnBeforePluginLoad may\n  // be called to rebuild the plugin list cache.\n  ///\n  /*--cef()--*/\n  virtual void PurgePluginListCache(bool reload_pages) =0;\n\n  ///\n  // Returns true if a preference with the specified |name| exists. This method\n  // must be called on the browser process UI thread.\n  ///\n  /*--cef()--*/\n  virtual bool HasPreference(const CefString& name) =0;\n\n  ///\n  // Returns the value for the preference with the specified |name|. Returns\n  // NULL if the preference does not exist. The returned object contains a copy\n  // of the underlying preference value and modifications to the returned object\n  // will not modify the underlying preference value. This method must be called\n  // on the browser process UI thread.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefValue> GetPreference(const CefString& name) =0;\n\n  ///\n  // Returns all preferences as a dictionary. If |include_defaults| is true then\n  // preferences currently at their default value will be included. The returned\n  // object contains a copy of the underlying preference values and\n  // modifications to the returned object will not modify the underlying\n  // preference values. This method must be called on the browser process UI\n  // thread.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDictionaryValue> GetAllPreferences(\n      bool include_defaults) =0;\n\n  ///\n  // Returns true if the preference with the specified |name| can be modified\n  // using SetPreference. As one example preferences set via the command-line\n  // usually cannot be modified. This method must be called on the browser\n  // process UI thread.\n  ///\n  /*--cef()--*/\n  virtual bool CanSetPreference(const CefString& name) =0;\n\n  ///\n  // Set the |value| associated with preference |name|. Returns true if the\n  // value is set successfully and false otherwise. If |value| is NULL the\n  // preference will be restored to its default value. If setting the preference\n  // fails then |error| will be populated with a detailed description of the\n  // problem. This method must be called on the browser process UI thread.\n  ///\n  /*--cef(optional_param=value)--*/\n  virtual bool SetPreference(const CefString& name,\n                             CefRefPtr<CefValue> value,\n                             CefString& error) =0;\n\n  ///\n  // Clears all certificate exceptions that were added as part of handling\n  // CefRequestHandler::OnCertificateError(). If you call this it is\n  // recommended that you also call CloseAllConnections() or you risk not\n  // being prompted again for server certificates if you reconnect quickly.\n  // If |callback| is non-NULL it will be executed on the UI thread after\n  // completion.\n  ///\n  /*--cef(optional_param=callback)--*/\n  virtual void ClearCertificateExceptions(\n      CefRefPtr<CefCompletionCallback> callback) =0;\n\n  ///\n  // Clears all active and idle connections that Chromium currently has.\n  // This is only recommended if you have released all other CEF objects but\n  // don't yet want to call CefShutdown(). If |callback| is non-NULL it will be\n  // executed on the UI thread after completion.\n  ///\n  /*--cef(optional_param=callback)--*/\n  virtual void CloseAllConnections(\n      CefRefPtr<CefCompletionCallback> callback) =0;\n\n  ///\n  // Attempts to resolve |origin| to a list of associated IP addresses.\n  // |callback| will be executed on the UI thread after completion.\n  ///\n  /*--cef()--*/\n  virtual void ResolveHost(\n      const CefString& origin,\n      CefRefPtr<CefResolveCallback> callback) =0;\n\n  ///\n  // Attempts to resolve |origin| to a list of associated IP addresses using\n  // cached data. |resolved_ips| will be populated with the list of resolved IP\n  // addresses or empty if no cached data is available. Returns ERR_NONE on\n  // success. This method must be called on the browser process IO thread.\n  ///\n  /*--cef(default_retval=ERR_FAILED)--*/\n  virtual cef_errorcode_t ResolveHostCached(\n      const CefString& origin,\n      std::vector<CefString>& resolved_ips) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_REQUEST_CONTEXT_H_\n"
  },
  {
    "path": "CEF/include/cef_request_context_handler.h",
    "content": "// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_REQUEST_CONTEXT_HANDLER_H_\n#define CEF_INCLUDE_CEF_REQUEST_CONTEXT_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_cookie.h\"\n#include \"include/cef_web_plugin.h\"\n\n///\n// Implement this interface to provide handler implementations. The handler\n// instance will not be released until all objects related to the context have\n// been destroyed.\n///\n/*--cef(source=client,no_debugct_check)--*/\nclass CefRequestContextHandler : public virtual CefBase {\n public:\n  typedef cef_plugin_policy_t PluginPolicy;\n\n  ///\n  // Called on the browser process IO thread to retrieve the cookie manager. If\n  // this method returns NULL the default cookie manager retrievable via\n  // CefRequestContext::GetDefaultCookieManager() will be used.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefCookieManager> GetCookieManager() { return NULL; }\n\n  ///\n  // Called on multiple browser process threads before a plugin instance is\n  // loaded. |mime_type| is the mime type of the plugin that will be loaded.\n  // |plugin_url| is the content URL that the plugin will load and may be empty.\n  // |top_origin_url| is the URL for the top-level frame that contains the\n  // plugin when loading a specific plugin instance or empty when building the\n  // initial list of enabled plugins for 'navigator.plugins' JavaScript state.\n  // |plugin_info| includes additional information about the plugin that will be\n  // loaded. |plugin_policy| is the recommended policy. Modify |plugin_policy|\n  // and return true to change the policy. Return false to use the recommended\n  // policy. The default plugin policy can be set at runtime using the\n  // `--plugin-policy=[allow|detect|block]` command-line flag. Decisions to mark\n  // a plugin as disabled by setting |plugin_policy| to PLUGIN_POLICY_DISABLED\n  // may be cached when |top_origin_url| is empty. To purge the plugin list\n  // cache and potentially trigger new calls to this method call\n  // CefRequestContext::PurgePluginListCache.\n  ///\n  /*--cef(optional_param=plugin_url,optional_param=top_origin_url)--*/\n  virtual bool OnBeforePluginLoad(const CefString& mime_type,\n                                  const CefString& plugin_url,\n                                  const CefString& top_origin_url,\n                                  CefRefPtr<CefWebPluginInfo> plugin_info,\n                                  PluginPolicy* plugin_policy) {\n    return false;\n  }\n};\n\n#endif  // CEF_INCLUDE_CEF_REQUEST_CONTEXT_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_request_handler.h",
    "content": "// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_REQUEST_HANDLER_H_\n#define CEF_INCLUDE_CEF_REQUEST_HANDLER_H_\n#pragma once\n\n#include \"include/cef_auth_callback.h\"\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_frame.h\"\n#include \"include/cef_resource_handler.h\"\n#include \"include/cef_response.h\"\n#include \"include/cef_response_filter.h\"\n#include \"include/cef_request.h\"\n#include \"include/cef_ssl_info.h\"\n\n\n///\n// Callback interface used for asynchronous continuation of url requests.\n///\n/*--cef(source=library)--*/\nclass CefRequestCallback : public virtual CefBase {\n public:\n  ///\n  // Continue the url request. If |allow| is true the request will be continued.\n  // Otherwise, the request will be canceled.\n  ///\n  /*--cef(capi_name=cont)--*/\n  virtual void Continue(bool allow) =0;\n\n  ///\n  // Cancel the url request.\n  ///\n  /*--cef()--*/\n  virtual void Cancel() =0;\n};\n\n\n///\n// Implement this interface to handle events related to browser requests. The\n// methods of this class will be called on the thread indicated.\n///\n/*--cef(source=client)--*/\nclass CefRequestHandler : public virtual CefBase {\n public:\n  typedef cef_return_value_t ReturnValue;\n  typedef cef_termination_status_t TerminationStatus;\n  typedef cef_urlrequest_status_t URLRequestStatus;\n  typedef cef_window_open_disposition_t WindowOpenDisposition;\n\n  ///\n  // Called on the UI thread before browser navigation. Return true to cancel\n  // the navigation or false to allow the navigation to proceed. The |request|\n  // object cannot be modified in this callback.\n  // CefLoadHandler::OnLoadingStateChange will be called twice in all cases.\n  // If the navigation is allowed CefLoadHandler::OnLoadStart and\n  // CefLoadHandler::OnLoadEnd will be called. If the navigation is canceled\n  // CefLoadHandler::OnLoadError will be called with an |errorCode| value of\n  // ERR_ABORTED.\n  ///\n  /*--cef()--*/\n  virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser,\n                              CefRefPtr<CefFrame> frame,\n                              CefRefPtr<CefRequest> request,\n                              bool is_redirect) {\n    return false;\n  }\n\n  ///\n  // Called on the UI thread before OnBeforeBrowse in certain limited cases\n  // where navigating a new or different browser might be desirable. This\n  // includes user-initiated navigation that might open in a special way (e.g.\n  // links clicked via middle-click or ctrl + left-click) and certain types of\n  // cross-origin navigation initiated from the renderer process (e.g.\n  // navigating the top-level frame to/from a file URL). The |browser| and\n  // |frame| values represent the source of the navigation. The\n  // |target_disposition| value indicates where the user intended to navigate\n  // the browser based on standard Chromium behaviors (e.g. current tab,\n  // new tab, etc). The |user_gesture| value will be true if the browser\n  // navigated via explicit user gesture (e.g. clicking a link) or false if it\n  // navigated automatically (e.g. via the DomContentLoaded event). Return true\n  // to cancel the navigation or false to allow the navigation to proceed in the\n  // source browser's top-level frame.\n  ///\n  /*--cef()--*/\n  virtual bool OnOpenURLFromTab(CefRefPtr<CefBrowser> browser,\n                                CefRefPtr<CefFrame> frame,\n                                const CefString& target_url,\n                                WindowOpenDisposition target_disposition,\n                                bool user_gesture) {\n    return false;\n  }\n\n  ///\n  // Called on the IO thread before a resource request is loaded. The |request|\n  // object may be modified. Return RV_CONTINUE to continue the request\n  // immediately. Return RV_CONTINUE_ASYNC and call CefRequestCallback::\n  // Continue() at a later time to continue or cancel the request\n  // asynchronously. Return RV_CANCEL to cancel the request immediately.\n  // \n  ///\n  /*--cef(default_retval=RV_CONTINUE)--*/\n  virtual ReturnValue OnBeforeResourceLoad(\n      CefRefPtr<CefBrowser> browser,\n      CefRefPtr<CefFrame> frame,\n      CefRefPtr<CefRequest> request,\n      CefRefPtr<CefRequestCallback> callback) {\n    return RV_CONTINUE;\n  }\n\n  ///\n  // Called on the IO thread before a resource is loaded. To allow the resource\n  // to load normally return NULL. To specify a handler for the resource return\n  // a CefResourceHandler object. The |request| object should not be modified in\n  // this callback.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefResourceHandler> GetResourceHandler(\n      CefRefPtr<CefBrowser> browser,\n      CefRefPtr<CefFrame> frame,\n      CefRefPtr<CefRequest> request) {\n    return NULL;\n  }\n\n  ///\n  // Called on the IO thread when a resource load is redirected. The |request|\n  // parameter will contain the old URL and other request-related information.\n  // The |new_url| parameter will contain the new URL and can be changed if\n  // desired. The |request| object cannot be modified in this callback.\n  ///\n  /*--cef()--*/\n  virtual void OnResourceRedirect(CefRefPtr<CefBrowser> browser,\n                                  CefRefPtr<CefFrame> frame,\n                                  CefRefPtr<CefRequest> request,\n                                  CefString& new_url) {}\n\n  ///\n  // Called on the IO thread when a resource response is received. To allow the\n  // resource to load normally return false. To redirect or retry the resource\n  // modify |request| (url, headers or post body) and return true. The\n  // |response| object cannot be modified in this callback.\n  ///\n  /*--cef()--*/\n  virtual bool OnResourceResponse(CefRefPtr<CefBrowser> browser,\n                                  CefRefPtr<CefFrame> frame,\n                                  CefRefPtr<CefRequest> request,\n                                  CefRefPtr<CefResponse> response) {\n    return false;\n  }\n\n  ///\n  // Called on the IO thread to optionally filter resource response content.\n  // |request| and |response| represent the request and response respectively\n  // and cannot be modified in this callback.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefResponseFilter> GetResourceResponseFilter(\n      CefRefPtr<CefBrowser> browser,\n      CefRefPtr<CefFrame> frame,\n      CefRefPtr<CefRequest> request,\n      CefRefPtr<CefResponse> response) {\n    return NULL;\n  }\n\n  ///\n  // Called on the IO thread when a resource load has completed. |request| and\n  // |response| represent the request and response respectively and cannot be\n  // modified in this callback. |status| indicates the load completion status.\n  // |received_content_length| is the number of response bytes actually read.\n  ///\n  /*--cef()--*/\n  virtual void OnResourceLoadComplete(CefRefPtr<CefBrowser> browser,\n                                      CefRefPtr<CefFrame> frame,\n                                      CefRefPtr<CefRequest> request,\n                                      CefRefPtr<CefResponse> response,\n                                      URLRequestStatus status,\n                                      int64 received_content_length) {}\n\n  ///\n  // Called on the IO thread when the browser needs credentials from the user.\n  // |isProxy| indicates whether the host is a proxy server. |host| contains the\n  // hostname and |port| contains the port number. |realm| is the realm of the\n  // challenge and may be empty. |scheme| is the authentication scheme used,\n  // such as \"basic\" or \"digest\", and will be empty if the source of the request\n  // is an FTP server. Return true to continue the request and call\n  // CefAuthCallback::Continue() either in this method or at a later time when\n  // the authentication information is available. Return false to cancel the\n  // request immediately.\n  ///\n  /*--cef(optional_param=realm,optional_param=scheme)--*/\n  virtual bool GetAuthCredentials(CefRefPtr<CefBrowser> browser,\n                                  CefRefPtr<CefFrame> frame,\n                                  bool isProxy,\n                                  const CefString& host,\n                                  int port,\n                                  const CefString& realm,\n                                  const CefString& scheme,\n                                  CefRefPtr<CefAuthCallback> callback) {\n    return false;\n  }\n\n  ///\n  // Called on the IO thread when JavaScript requests a specific storage quota\n  // size via the webkitStorageInfo.requestQuota function. |origin_url| is the\n  // origin of the page making the request. |new_size| is the requested quota\n  // size in bytes. Return true to continue the request and call\n  // CefRequestCallback::Continue() either in this method or at a later time to\n  // grant or deny the request. Return false to cancel the request immediately.\n  ///\n  /*--cef()--*/\n  virtual bool OnQuotaRequest(CefRefPtr<CefBrowser> browser,\n                              const CefString& origin_url,\n                              int64 new_size,\n                              CefRefPtr<CefRequestCallback> callback) {\n    return false;\n  }\n\n  ///\n  // Called on the UI thread to handle requests for URLs with an unknown\n  // protocol component. Set |allow_os_execution| to true to attempt execution\n  // via the registered OS protocol handler, if any.\n  // SECURITY WARNING: YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED\n  // ON SCHEME, HOST OR OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION.\n  ///\n  /*--cef()--*/\n  virtual void OnProtocolExecution(CefRefPtr<CefBrowser> browser,\n                                   const CefString& url,\n                                   bool& allow_os_execution) {}\n\n  ///\n  // Called on the UI thread to handle requests for URLs with an invalid\n  // SSL certificate. Return true and call CefRequestCallback::Continue() either\n  // in this method or at a later time to continue or cancel the request. Return\n  // false to cancel the request immediately. If\n  // CefSettings.ignore_certificate_errors is set all invalid certificates will\n  // be accepted without calling this method.\n  ///\n  /*--cef()--*/\n  virtual bool OnCertificateError(\n      CefRefPtr<CefBrowser> browser,\n      cef_errorcode_t cert_error,\n      const CefString& request_url,\n      CefRefPtr<CefSSLInfo> ssl_info,\n      CefRefPtr<CefRequestCallback> callback) {\n    return false;\n  }\n\n  ///\n  // Called on the browser process UI thread when a plugin has crashed.\n  // |plugin_path| is the path of the plugin that crashed.\n  ///\n  /*--cef()--*/\n  virtual void OnPluginCrashed(CefRefPtr<CefBrowser> browser,\n                               const CefString& plugin_path) {}\n\n  ///\n  // Called on the browser process UI thread when the render view associated\n  // with |browser| is ready to receive/handle IPC messages in the render\n  // process.\n  ///\n  /*--cef()--*/\n  virtual void OnRenderViewReady(CefRefPtr<CefBrowser> browser) {}\n\n  ///\n  // Called on the browser process UI thread when the render process\n  // terminates unexpectedly. |status| indicates how the process\n  // terminated.\n  ///\n  /*--cef()--*/\n  virtual void OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser,\n                                         TerminationStatus status) {}\n};\n\n#endif  // CEF_INCLUDE_CEF_REQUEST_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_resource_bundle.h",
    "content": "// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_RESOURCE_BUNDLE_H_\n#define CEF_INCLUDE_CEF_RESOURCE_BUNDLE_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\n///\n// Class used for retrieving resources from the resource bundle (*.pak) files\n// loaded by CEF during startup or via the CefResourceBundleHandler returned\n// from CefApp::GetResourceBundleHandler. See CefSettings for additional options\n// related to resource bundle loading. The methods of this class may be called\n// on any thread unless otherwise indicated.\n///\n/*--cef(source=library,no_debugct_check)--*/\nclass CefResourceBundle : public virtual CefBase {\n public:\n  typedef cef_scale_factor_t ScaleFactor;\n\n  ///\n  // Returns the global resource bundle instance.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefResourceBundle> GetGlobal();\n\n  ///\n  // Returns the localized string for the specified |string_id| or an empty\n  // string if the value is not found. Include cef_pack_strings.h for a listing\n  // of valid string ID values.\n  ///\n  /*--cef()--*/\n  virtual CefString GetLocalizedString(int string_id) =0;\n\n  ///\n  // Retrieves the contents of the specified scale independent |resource_id|.\n  // If the value is found then |data| and |data_size| will be populated and\n  // this method will return true. If the value is not found then this method\n  // will return false. The returned |data| pointer will remain resident in\n  // memory and should not be freed. Include cef_pack_resources.h for a listing\n  // of valid resource ID values.\n  ///\n  /*--cef()--*/\n  virtual bool GetDataResource(int resource_id,\n                               void*& data,\n                               size_t& data_size) =0;\n\n  ///\n  // Retrieves the contents of the specified |resource_id| nearest the scale\n  // factor |scale_factor|. Use a |scale_factor| value of SCALE_FACTOR_NONE for\n  // scale independent resources or call GetDataResource instead. If the value\n  // is found then |data| and |data_size| will be populated and this method will\n  // return true. If the value is not found then this method will return false.\n  // The returned |data| pointer will remain resident in memory and should not\n  // be freed. Include cef_pack_resources.h for a listing of valid resource ID\n  // values.\n  ///\n  /*--cef()--*/\n  virtual bool GetDataResourceForScale(int resource_id,\n                                       ScaleFactor scale_factor,\n                                       void*& data,\n                                       size_t& data_size) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_RESOURCE_BUNDLE_H_\n"
  },
  {
    "path": "CEF/include/cef_resource_bundle_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_RESOURCE_BUNDLE_HANDLER_H_\n#define CEF_INCLUDE_CEF_RESOURCE_BUNDLE_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\n///\n// Class used to implement a custom resource bundle interface. See CefSettings\n// for additional options related to resource bundle loading. The methods of\n// this class may be called on multiple threads.\n///\n/*--cef(source=client)--*/\nclass CefResourceBundleHandler : public virtual CefBase {\n public:\n  typedef cef_scale_factor_t ScaleFactor;\n\n  ///\n  // Called to retrieve a localized translation for the specified |string_id|.\n  // To provide the translation set |string| to the translation string and\n  // return true. To use the default translation return false. Include\n  // cef_pack_strings.h for a listing of valid string ID values.\n  ///\n  /*--cef()--*/\n  virtual bool GetLocalizedString(int string_id,\n                                  CefString& string) =0;\n\n  ///\n  // Called to retrieve data for the specified scale independent |resource_id|.\n  // To provide the resource data set |data| and |data_size| to the data pointer\n  // and size respectively and return true. To use the default resource data\n  // return false. The resource data will not be copied and must remain resident\n  // in memory. Include cef_pack_resources.h for a listing of valid resource ID\n  // values.\n  ///\n  /*--cef()--*/\n  virtual bool GetDataResource(int resource_id,\n                               void*& data,\n                               size_t& data_size) =0;\n\n  ///\n  // Called to retrieve data for the specified |resource_id| nearest the scale\n  // factor |scale_factor|. To provide the resource data set |data| and\n  // |data_size| to the data pointer and size respectively and return true. To\n  // use the default resource data return false. The resource data will not be\n  // copied and must remain resident in memory. Include cef_pack_resources.h for\n  // a listing of valid resource ID values.\n  ///\n  /*--cef()--*/\n  virtual bool GetDataResourceForScale(int resource_id,\n                                       ScaleFactor scale_factor,\n                                       void*& data,\n                                       size_t& data_size) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_RESOURCE_BUNDLE_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_resource_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_RESOURCE_HANDLER_H_\n#define CEF_INCLUDE_CEF_RESOURCE_HANDLER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_callback.h\"\n#include \"include/cef_cookie.h\"\n#include \"include/cef_request.h\"\n#include \"include/cef_response.h\"\n\n///\n// Class used to implement a custom request handler interface. The methods of\n// this class will always be called on the IO thread.\n///\n/*--cef(source=client)--*/\nclass CefResourceHandler : public virtual CefBase {\n public:\n  ///\n  // Begin processing the request. To handle the request return true and call\n  // CefCallback::Continue() once the response header information is available\n  // (CefCallback::Continue() can also be called from inside this method if\n  // header information is available immediately). To cancel the request return\n  // false.\n  ///\n  /*--cef()--*/\n  virtual bool ProcessRequest(CefRefPtr<CefRequest> request,\n                              CefRefPtr<CefCallback> callback) =0;\n\n  ///\n  // Retrieve response header information. If the response length is not known\n  // set |response_length| to -1 and ReadResponse() will be called until it\n  // returns false. If the response length is known set |response_length|\n  // to a positive value and ReadResponse() will be called until it returns\n  // false or the specified number of bytes have been read. Use the |response|\n  // object to set the mime type, http status code and other optional header\n  // values. To redirect the request to a new URL set |redirectUrl| to the new\n  // URL. If an error occured while setting up the request you can call\n  // SetError() on |response| to indicate the error condition.\n  ///\n  /*--cef()--*/\n  virtual void GetResponseHeaders(CefRefPtr<CefResponse> response,\n                                  int64& response_length,\n                                  CefString& redirectUrl) =0;\n\n  ///\n  // Read response data. If data is available immediately copy up to\n  // |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of\n  // bytes copied, and return true. To read the data at a later time set\n  // |bytes_read| to 0, return true and call CefCallback::Continue() when the\n  // data is available. To indicate response completion return false.\n  ///\n  /*--cef()--*/\n  virtual bool ReadResponse(void* data_out,\n                            int bytes_to_read,\n                            int& bytes_read,\n                            CefRefPtr<CefCallback> callback) =0;\n\n  ///\n  // Return true if the specified cookie can be sent with the request or false\n  // otherwise. If false is returned for any cookie then no cookies will be sent\n  // with the request.\n  ///\n  /*--cef()--*/\n  virtual bool CanGetCookie(const CefCookie& cookie) { return true; }\n\n  ///\n  // Return true if the specified cookie returned with the response can be set\n  // or false otherwise.\n  ///\n  /*--cef()--*/\n  virtual bool CanSetCookie(const CefCookie& cookie) { return true; }\n\n  ///\n  // Request processing has been canceled.\n  ///\n  /*--cef()--*/\n  virtual void Cancel() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_RESOURCE_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/cef_response.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_RESPONSE_H_\n#define CEF_INCLUDE_CEF_RESPONSE_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include <map>\n\n///\n// Class used to represent a web response. The methods of this class may be\n// called on any thread.\n///\n/*--cef(source=library,no_debugct_check)--*/\nclass CefResponse : public virtual CefBase {\n public:\n  typedef std::multimap<CefString, CefString> HeaderMap;\n\n  ///\n  // Create a new CefResponse object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefResponse> Create();\n\n  ///\n  // Returns true if this object is read-only.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Get the response error code. Returns ERR_NONE if there was no error.\n  ///\n  /*--cef(default_retval=ERR_NONE)--*/\n  virtual cef_errorcode_t GetError() = 0;\n\n  ///\n  // Set the response error code. This can be used by custom scheme handlers\n  // to return errors during initial request processing.\n  ///\n  /*--cef()--*/\n  virtual void SetError(cef_errorcode_t error) = 0;\n\n  ///\n  // Get the response status code.\n  ///\n  /*--cef()--*/\n  virtual int GetStatus() =0;\n\n  ///\n  // Set the response status code.\n  ///\n  /*--cef()--*/\n  virtual void SetStatus(int status) = 0;\n\n  ///\n  // Get the response status text.\n  ///\n  /*--cef()--*/\n  virtual CefString GetStatusText() =0;\n\n  ///\n  // Set the response status text.\n  ///\n  /*--cef()--*/\n  virtual void SetStatusText(const CefString& statusText) = 0;\n\n  ///\n  // Get the response mime type.\n  ///\n  /*--cef()--*/\n  virtual CefString GetMimeType() = 0;\n\n  ///\n  // Set the response mime type.\n  ///\n  /*--cef()--*/\n  virtual void SetMimeType(const CefString& mimeType) = 0;\n\n  ///\n  // Get the value for the specified response header field.\n  ///\n  /*--cef()--*/\n  virtual CefString GetHeader(const CefString& name) =0;\n\n  ///\n  // Get all response header fields.\n  ///\n  /*--cef()--*/\n  virtual void GetHeaderMap(HeaderMap& headerMap) =0;\n\n  ///\n  // Set all response header fields.\n  ///\n  /*--cef()--*/\n  virtual void SetHeaderMap(const HeaderMap& headerMap) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_RESPONSE_H_\n"
  },
  {
    "path": "CEF/include/cef_response_filter.h",
    "content": "// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_RESPONSE_FILTER_H_\n#define CEF_INCLUDE_CEF_RESPONSE_FILTER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\n///\n// Implement this interface to filter resource response content. The methods of\n// this class will be called on the browser process IO thread.\n///\n/*--cef(source=client)--*/\nclass CefResponseFilter : public virtual CefBase {\n public:\n  typedef cef_response_filter_status_t FilterStatus;\n\n  ///\n  // Initialize the response filter. Will only be called a single time. The\n  // filter will not be installed if this method returns false.\n  ///\n  /*--cef()--*/\n  virtual bool InitFilter() =0;\n\n  ///\n  // Called to filter a chunk of data. |data_in| is the input buffer containing\n  // |data_in_size| bytes of pre-filter data (|data_in| will be NULL if\n  // |data_in_size| is zero). |data_out| is the output buffer that can accept up\n  // to |data_out_size| bytes of filtered output data. Set |data_in_read| to the\n  // number of bytes that were read from |data_in|. Set |data_out_written| to\n  // the number of bytes that were written into |data_out|. If some or all of\n  // the pre-filter data was read successfully but more data is needed in order\n  // to continue filtering (filtered output is pending) return\n  // RESPONSE_FILTER_NEED_MORE_DATA. If some or all of the pre-filter data was\n  // read successfully and all available filtered output has been written return\n  // RESPONSE_FILTER_DONE. If an error occurs during filtering return\n  // RESPONSE_FILTER_ERROR. This method will be called repeatedly until there is\n  // no more data to filter (resource response is complete), |data_in_read|\n  // matches |data_in_size| (all available pre-filter bytes have been read), and\n  // the method returns RESPONSE_FILTER_DONE or RESPONSE_FILTER_ERROR. Do not\n  // keep a reference to the buffers passed to this method.\n  ///\n  /*--cef(optional_param=data_in,default_retval=RESPONSE_FILTER_ERROR)--*/\n  virtual FilterStatus Filter(void* data_in,\n                              size_t data_in_size,\n                              size_t& data_in_read,\n                              void* data_out,\n                              size_t data_out_size,\n                              size_t& data_out_written) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_RESPONSE_FILTER_H_\n"
  },
  {
    "path": "CEF/include/cef_sandbox_win.h",
    "content": "// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_CEF_SANDBOX_WIN_H_\n#define CEF_INCLUDE_CEF_SANDBOX_WIN_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\n#if defined(OS_WIN)\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// The sandbox is used to restrict sub-processes (renderer, plugin, GPU, etc)\n// from directly accessing system resources. This helps to protect the user\n// from untrusted and potentially malicious Web content.\n// See http://www.chromium.org/developers/design-documents/sandbox for\n// complete details.\n//\n// To enable the sandbox on Windows the following requirements must be met:\n// 1. Use the same executable for the browser process and all sub-processes.\n// 2. Link the executable with the cef_sandbox static library.\n// 3. Call the cef_sandbox_info_create() function from within the executable\n//    (not from a separate DLL) and pass the resulting pointer into both the\n//    CefExecutProcess() and CefInitialize() functions via the\n//    |windows_sandbox_info| parameter.\n\n///\n// Create the sandbox information object for this process. It is safe to create\n// multiple of this object and to destroy the object immediately after passing\n// into the CefExecutProcess() and/or CefInitialize() functions.\n///\nvoid* cef_sandbox_info_create();\n\n///\n// Destroy the specified sandbox information object.\n///\nvoid cef_sandbox_info_destroy(void* sandbox_info);\n\n#ifdef __cplusplus\n}\n\n///\n// Manages the life span of a sandbox information object.\n///\nclass CefScopedSandboxInfo {\n public:\n  CefScopedSandboxInfo() {\n    sandbox_info_ = cef_sandbox_info_create();\n  }\n  ~CefScopedSandboxInfo() {\n    cef_sandbox_info_destroy(sandbox_info_);\n  }\n\n  void* sandbox_info() const { return sandbox_info_; }\n\n private:\n  void* sandbox_info_;\n};\n#endif  // __cplusplus\n\n#endif  // defined(OS_WIN)\n\n#endif  // CEF_INCLUDE_CEF_SANDBOX_WIN_H_\n"
  },
  {
    "path": "CEF/include/cef_scheme.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_SCHEME_H_\n#define CEF_INCLUDE_CEF_SCHEME_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_frame.h\"\n#include \"include/cef_request.h\"\n#include \"include/cef_response.h\"\n#include \"include/cef_resource_handler.h\"\n\nclass CefSchemeHandlerFactory;\n\n\n///\n// Register a scheme handler factory with the global request context. An empty\n// |domain_name| value for a standard scheme will cause the factory to match all\n// domain names. The |domain_name| value will be ignored for non-standard\n// schemes. If |scheme_name| is a built-in scheme and no handler is returned by\n// |factory| then the built-in scheme handler factory will be called. If\n// |scheme_name| is a custom scheme then you must also implement the\n// CefApp::OnRegisterCustomSchemes() method in all processes. This function may\n// be called multiple times to change or remove the factory that matches the\n// specified |scheme_name| and optional |domain_name|. Returns false if an error\n// occurs. This function may be called on any thread in the browser process.\n// Using this function is equivalent to calling\n// CefRequestContext::GetGlobalContext()->RegisterSchemeHandlerFactory().\n///\n/*--cef(optional_param=domain_name,optional_param=factory)--*/\nbool CefRegisterSchemeHandlerFactory(\n    const CefString& scheme_name,\n    const CefString& domain_name,\n    CefRefPtr<CefSchemeHandlerFactory> factory);\n\n///\n// Clear all scheme handler factories registered with the global request\n// context. Returns false on error. This function may be called on any thread in\n// the browser process. Using this function is equivalent to calling\n// CefRequestContext::GetGlobalContext()->ClearSchemeHandlerFactories().\n///\n/*--cef()--*/\nbool CefClearSchemeHandlerFactories();\n\n\n///\n// Class that manages custom scheme registrations.\n///\n/*--cef(source=library)--*/\nclass CefSchemeRegistrar : public virtual CefBase {\n public:\n  ///\n  // Register a custom scheme. This method should not be called for the built-in\n  // HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.\n  //\n  // If |is_standard| is true the scheme will be treated as a standard scheme.\n  // Standard schemes are subject to URL canonicalization and parsing rules as\n  // defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1 available\n  // at http://www.ietf.org/rfc/rfc1738.txt\n  //\n  // In particular, the syntax for standard scheme URLs must be of the form:\n  // <pre>\n  //  [scheme]://[username]:[password]@[host]:[port]/[url-path]\n  // </pre>\n  // Standard scheme URLs must have a host component that is a fully qualified\n  // domain name as defined in Section 3.5 of RFC 1034 [13] and Section 2.1 of\n  // RFC 1123. These URLs will be canonicalized to \"scheme://host/path\" in the\n  // simplest case and \"scheme://username:password@host:port/path\" in the most\n  // explicit case. For example, \"scheme:host/path\" and \"scheme:///host/path\"\n  // will both be canonicalized to \"scheme://host/path\". The origin of a\n  // standard scheme URL is the combination of scheme, host and port (i.e.,\n  // \"scheme://host:port\" in the most explicit case).\n  //\n  // For non-standard scheme URLs only the \"scheme:\" component is parsed and\n  // canonicalized. The remainder of the URL will be passed to the handler\n  // as-is. For example, \"scheme:///some%20text\" will remain the same.\n  // Non-standard scheme URLs cannot be used as a target for form submission.\n  //\n  // If |is_local| is true the scheme will be treated as local (i.e., with the\n  // same security rules as those applied to \"file\" URLs). Normal pages cannot\n  // link to or access local URLs. Also, by default, local URLs can only perform\n  // XMLHttpRequest calls to the same URL (origin + path) that originated the\n  // request. To allow XMLHttpRequest calls from a local URL to other URLs with\n  // the same origin set the CefSettings.file_access_from_file_urls_allowed\n  // value to true. To allow XMLHttpRequest calls from a local URL to all\n  // origins set the CefSettings.universal_access_from_file_urls_allowed value\n  // to true.\n  //\n  // If |is_display_isolated| is true the scheme will be treated as display-\n  // isolated. This means that pages cannot display these URLs unless they are\n  // from the same scheme. For example, pages in another origin cannot create\n  // iframes or hyperlinks to URLs with this scheme.\n  //\n  // This function may be called on any thread. It should only be called once\n  // per unique |scheme_name| value. If |scheme_name| is already registered or\n  // if an error occurs this method will return false.\n  ///\n  /*--cef()--*/\n  virtual bool AddCustomScheme(const CefString& scheme_name,\n                               bool is_standard,\n                               bool is_local,\n                               bool is_display_isolated) =0;\n};\n\n\n///\n// Class that creates CefResourceHandler instances for handling scheme requests.\n// The methods of this class will always be called on the IO thread.\n///\n/*--cef(source=client)--*/\nclass CefSchemeHandlerFactory : public virtual CefBase {\n public:\n  ///\n  // Return a new resource handler instance to handle the request or an empty\n  // reference to allow default handling of the request. |browser| and |frame|\n  // will be the browser window and frame respectively that originated the\n  // request or NULL if the request did not originate from a browser window\n  // (for example, if the request came from CefURLRequest). The |request| object\n  // passed to this method will not contain cookie data.\n  ///\n  /*--cef(optional_param=browser,optional_param=frame)--*/\n  virtual CefRefPtr<CefResourceHandler> Create(\n      CefRefPtr<CefBrowser> browser,\n      CefRefPtr<CefFrame> frame,\n      const CefString& scheme_name,\n      CefRefPtr<CefRequest> request) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_SCHEME_H_\n"
  },
  {
    "path": "CEF/include/cef_ssl_info.h",
    "content": "// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_SSL_INFO_H_\n#define CEF_INCLUDE_CEF_SSL_INFO_H_\n#pragma once\n\n#include <vector>\n\n#include \"include/cef_base.h\"\n#include \"include/cef_values.h\"\n\n///\n// Class representing the issuer or subject field of an X.509 certificate.\n///\n/*--cef(source=library)--*/\nclass CefSSLCertPrincipal : public virtual CefBase {\n public:\n  ///\n  // Returns a name that can be used to represent the issuer.  It tries in this\n  // order: CN, O and OU and returns the first non-empty one found.\n  ///\n  /*--cef()--*/\n  virtual CefString GetDisplayName() =0;\n\n  ///\n  // Returns the common name.\n  ///\n  /*--cef()--*/\n  virtual CefString GetCommonName() =0;\n\n  ///\n  // Returns the locality name.\n  ///\n  /*--cef()--*/\n  virtual CefString GetLocalityName() =0;\n\n  ///\n  // Returns the state or province name.\n  ///\n  /*--cef()--*/\n  virtual CefString GetStateOrProvinceName() =0;\n\n  ///\n  // Returns the country name.\n  ///\n  /*--cef()--*/\n  virtual CefString GetCountryName() =0;\n\n  ///\n  // Retrieve the list of street addresses.\n  ///\n  /*--cef()--*/\n  virtual void GetStreetAddresses(std::vector<CefString>& addresses) =0;\n\n  ///\n  // Retrieve the list of organization names.\n  ///\n  /*--cef()--*/\n  virtual void GetOrganizationNames(std::vector<CefString>& names) =0;\n\n  ///\n  // Retrieve the list of organization unit names.\n  ///\n  /*--cef()--*/\n  virtual void GetOrganizationUnitNames(std::vector<CefString>& names) =0;\n\n  ///\n  // Retrieve the list of domain components.\n  ///\n  /*--cef()--*/\n  virtual void GetDomainComponents(std::vector<CefString>& components) =0;\n};\n\n///\n// Class representing SSL information.\n///\n/*--cef(source=library)--*/\nclass CefSSLInfo : public virtual CefBase {\n public:\n  typedef std::vector<CefRefPtr<CefBinaryValue> > IssuerChainBinaryList;\n\n  ///\n  // Returns a bitmask containing any and all problems verifying the server\n  // certificate.\n  ///\n  /*--cef(default_retval=CERT_STATUS_NONE)--*/\n  virtual cef_cert_status_t GetCertStatus() =0;\n\n  ///\n  // Returns true if the certificate status has any error, major or minor.\n  ///\n  /*--cef()--*/\n  virtual bool IsCertStatusError() =0;\n\n  ///\n  // Returns true if the certificate status represents only minor errors\n  // (e.g. failure to verify certificate revocation).\n  ///\n  /*--cef()--*/\n  virtual bool IsCertStatusMinorError() =0;\n\n  ///\n  // Returns the subject of the X.509 certificate. For HTTPS server\n  // certificates this represents the web server.  The common name of the\n  // subject should match the host name of the web server.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefSSLCertPrincipal> GetSubject() =0;\n\n  ///\n  // Returns the issuer of the X.509 certificate.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefSSLCertPrincipal> GetIssuer() =0;\n\n  ///\n  // Returns the DER encoded serial number for the X.509 certificate. The value\n  // possibly includes a leading 00 byte.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBinaryValue> GetSerialNumber() =0;\n  \n  ///\n  // Returns the date before which the X.509 certificate is invalid.\n  // CefTime.GetTimeT() will return 0 if no date was specified.\n  ///\n  /*--cef()--*/\n  virtual CefTime GetValidStart() =0;\n\n  ///\n  // Returns the date after which the X.509 certificate is invalid.\n  // CefTime.GetTimeT() will return 0 if no date was specified.\n  ///\n  /*--cef()--*/\n  virtual CefTime GetValidExpiry() =0;\n\n  ///\n  // Returns the DER encoded data for the X.509 certificate.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBinaryValue> GetDEREncoded() =0;\n\n  ///\n  // Returns the PEM encoded data for the X.509 certificate.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBinaryValue> GetPEMEncoded() =0;\n\n  ///\n  // Returns the number of certificates in the issuer chain.\n  // If 0, the certificate is self-signed.\n  ///\n  /*--cef()--*/\n  virtual size_t GetIssuerChainSize() =0;\n\n  ///\n  // Returns the DER encoded data for the certificate issuer chain.\n  // If we failed to encode a certificate in the chain it is still\n  // present in the array but is an empty string.\n  ///\n  /*--cef(count_func=chain:GetIssuerChainSize)--*/\n  virtual void GetDEREncodedIssuerChain(IssuerChainBinaryList& chain) =0;\n\n  ///\n  // Returns the PEM encoded data for the certificate issuer chain.\n  // If we failed to encode a certificate in the chain it is still\n  // present in the array but is an empty string.\n  ///\n  /*--cef(count_func=chain:GetIssuerChainSize)--*/\n  virtual void GetPEMEncodedIssuerChain(IssuerChainBinaryList& chain) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_SSL_INFO_H_\n"
  },
  {
    "path": "CEF/include/cef_stream.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_STREAM_H_\n#define CEF_INCLUDE_CEF_STREAM_H_\n\n#include \"include/cef_base.h\"\n\n///\n// Interface the client can implement to provide a custom stream reader. The\n// methods of this class may be called on any thread.\n///\n/*--cef(source=client)--*/\nclass CefReadHandler : public virtual CefBase {\n public:\n  ///\n  // Read raw binary data.\n  ///\n  /*--cef()--*/\n  virtual size_t Read(void* ptr, size_t size, size_t n) =0;\n\n  ///\n  // Seek to the specified offset position. |whence| may be any one of\n  // SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on\n  // failure.\n  ///\n  /*--cef()--*/\n  virtual int Seek(int64 offset, int whence) =0;\n\n  ///\n  // Return the current offset position.\n  ///\n  /*--cef()--*/\n  virtual int64 Tell() =0;\n\n  ///\n  // Return non-zero if at end of file.\n  ///\n  /*--cef()--*/\n  virtual int Eof() =0;\n\n  ///\n  // Return true if this handler performs work like accessing the file system\n  // which may block. Used as a hint for determining the thread to access the\n  // handler from.\n  ///\n  /*--cef()--*/\n  virtual bool MayBlock() =0;\n};\n\n\n///\n// Class used to read data from a stream. The methods of this class may be\n// called on any thread.\n///\n/*--cef(source=library)--*/\nclass CefStreamReader : public virtual CefBase {\n public:\n  ///\n  // Create a new CefStreamReader object from a file.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefStreamReader> CreateForFile(const CefString& fileName);\n  ///\n  // Create a new CefStreamReader object from data.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefStreamReader> CreateForData(void* data, size_t size);\n  ///\n  // Create a new CefStreamReader object from a custom handler.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefStreamReader> CreateForHandler(\n      CefRefPtr<CefReadHandler> handler);\n\n  ///\n  // Read raw binary data.\n  ///\n  /*--cef()--*/\n  virtual size_t Read(void* ptr, size_t size, size_t n) =0;\n\n  ///\n  // Seek to the specified offset position. |whence| may be any one of\n  // SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on\n  // failure.\n  ///\n  /*--cef()--*/\n  virtual int Seek(int64 offset, int whence) =0;\n\n  ///\n  // Return the current offset position.\n  ///\n  /*--cef()--*/\n  virtual int64 Tell() =0;\n\n  ///\n  // Return non-zero if at end of file.\n  ///\n  /*--cef()--*/\n  virtual int Eof() =0;\n\n  ///\n  // Returns true if this reader performs work like accessing the file system\n  // which may block. Used as a hint for determining the thread to access the\n  // reader from.\n  ///\n  /*--cef()--*/\n  virtual bool MayBlock() =0;\n};\n\n\n///\n// Interface the client can implement to provide a custom stream writer. The\n// methods of this class may be called on any thread.\n///\n/*--cef(source=client)--*/\nclass CefWriteHandler : public virtual CefBase {\n public:\n  ///\n  // Write raw binary data.\n  ///\n  /*--cef()--*/\n  virtual size_t Write(const void* ptr, size_t size, size_t n) =0;\n\n  ///\n  // Seek to the specified offset position. |whence| may be any one of\n  // SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on\n  // failure.\n  ///\n  /*--cef()--*/\n  virtual int Seek(int64 offset, int whence) =0;\n\n  ///\n  // Return the current offset position.\n  ///\n  /*--cef()--*/\n  virtual int64 Tell() =0;\n\n  ///\n  // Flush the stream.\n  ///\n  /*--cef()--*/\n  virtual int Flush() =0;\n\n  ///\n  // Return true if this handler performs work like accessing the file system\n  // which may block. Used as a hint for determining the thread to access the\n  // handler from.\n  ///\n  /*--cef()--*/\n  virtual bool MayBlock() =0;\n};\n\n\n///\n// Class used to write data to a stream. The methods of this class may be called\n// on any thread.\n///\n/*--cef(source=library)--*/\nclass CefStreamWriter : public virtual CefBase {\n public:\n  ///\n  // Create a new CefStreamWriter object for a file.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefStreamWriter> CreateForFile(const CefString& fileName);\n  ///\n  // Create a new CefStreamWriter object for a custom handler.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefStreamWriter> CreateForHandler(\n      CefRefPtr<CefWriteHandler> handler);\n\n  ///\n  // Write raw binary data.\n  ///\n  /*--cef()--*/\n  virtual size_t Write(const void* ptr, size_t size, size_t n) =0;\n\n  ///\n  // Seek to the specified offset position. |whence| may be any one of\n  // SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on\n  // failure.\n  ///\n  /*--cef()--*/\n  virtual int Seek(int64 offset, int whence) =0;\n\n  ///\n  // Return the current offset position.\n  ///\n  /*--cef()--*/\n  virtual int64 Tell() =0;\n\n  ///\n  // Flush the stream.\n  ///\n  /*--cef()--*/\n  virtual int Flush() =0;\n\n  ///\n  // Returns true if this writer performs work like accessing the file system\n  // which may block. Used as a hint for determining the thread to access the\n  // writer from.\n  ///\n  /*--cef()--*/\n  virtual bool MayBlock() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_STREAM_H_\n"
  },
  {
    "path": "CEF/include/cef_string_visitor.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_STRING_VISITOR_H_\n#define CEF_INCLUDE_CEF_STRING_VISITOR_H_\n\n#include \"include/cef_base.h\"\n\n///\n// Implement this interface to receive string values asynchronously.\n///\n/*--cef(source=client)--*/\nclass CefStringVisitor : public virtual CefBase {\n public:\n  ///\n  // Method that will be executed.\n  ///\n  /*--cef(optional_param=string)--*/\n  virtual void Visit(const CefString& string) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_STRING_VISITOR_H_\n"
  },
  {
    "path": "CEF/include/cef_task.h",
    "content": "// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_TASK_H_\n#define CEF_INCLUDE_CEF_TASK_H_\n\n#include \"include/cef_base.h\"\n\ntypedef cef_thread_id_t CefThreadId;\n\n///\n// Implement this interface for asynchronous task execution. If the task is\n// posted successfully and if the associated message loop is still running then\n// the Execute() method will be called on the target thread. If the task fails\n// to post then the task object may be destroyed on the source thread instead of\n// the target thread. For this reason be cautious when performing work in the\n// task object destructor.\n///\n/*--cef(source=client)--*/\nclass CefTask : public virtual CefBase {\n public:\n  ///\n  // Method that will be executed on the target thread.\n  ///\n  /*--cef()--*/\n  virtual void Execute() =0;\n};\n\n///\n// Class that asynchronously executes tasks on the associated thread. It is safe\n// to call the methods of this class on any thread.\n//\n// CEF maintains multiple internal threads that are used for handling different\n// types of tasks in different processes. The cef_thread_id_t definitions in\n// cef_types.h list the common CEF threads. Task runners are also available for\n// other CEF threads as appropriate (for example, V8 WebWorker threads).\n///\n/*--cef(source=library)--*/\nclass CefTaskRunner : public virtual CefBase {\n public:\n  ///\n  // Returns the task runner for the current thread. Only CEF threads will have\n  // task runners. An empty reference will be returned if this method is called\n  // on an invalid thread.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefTaskRunner> GetForCurrentThread();\n\n  ///\n  // Returns the task runner for the specified CEF thread.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefTaskRunner> GetForThread(CefThreadId threadId);\n\n  ///\n  // Returns true if this object is pointing to the same task runner as |that|\n  // object.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefTaskRunner> that) =0;\n\n  ///\n  // Returns true if this task runner belongs to the current thread.\n  ///\n  /*--cef()--*/\n  virtual bool BelongsToCurrentThread() =0;\n\n  ///\n  // Returns true if this task runner is for the specified CEF thread.\n  ///\n  /*--cef()--*/\n  virtual bool BelongsToThread(CefThreadId threadId) =0;\n\n  ///\n  // Post a task for execution on the thread associated with this task runner.\n  // Execution will occur asynchronously.\n  ///\n  /*--cef()--*/\n  virtual bool PostTask(CefRefPtr<CefTask> task) =0;\n\n  ///\n  // Post a task for delayed execution on the thread associated with this task\n  // runner. Execution will occur asynchronously. Delayed tasks are not\n  // supported on V8 WebWorker threads and will be executed without the\n  // specified delay.\n  ///\n  /*--cef()--*/\n  virtual bool PostDelayedTask(CefRefPtr<CefTask> task, int64 delay_ms) =0;\n};\n\n\n///\n// Returns true if called on the specified thread. Equivalent to using\n// CefTaskRunner::GetForThread(threadId)->BelongsToCurrentThread().\n///\n/*--cef()--*/\nbool CefCurrentlyOn(CefThreadId threadId);\n\n///\n// Post a task for execution on the specified thread. Equivalent to\n// using CefTaskRunner::GetForThread(threadId)->PostTask(task).\n///\n/*--cef()--*/\nbool CefPostTask(CefThreadId threadId, CefRefPtr<CefTask> task);\n\n///\n// Post a task for delayed execution on the specified thread. Equivalent to\n// using CefTaskRunner::GetForThread(threadId)->PostDelayedTask(task, delay_ms).\n///\n/*--cef()--*/\nbool CefPostDelayedTask(CefThreadId threadId, CefRefPtr<CefTask> task,\n                        int64 delay_ms);\n\n\n#endif  // CEF_INCLUDE_CEF_TASK_H_\n"
  },
  {
    "path": "CEF/include/cef_trace.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. Portons copyright (c) 2012\n// Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n// See cef_trace_event.h for trace macros and additonal documentation.\n\n#ifndef CEF_INCLUDE_CEF_TRACE_H_\n#define CEF_INCLUDE_CEF_TRACE_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_callback.h\"\n\n///\n// Implement this interface to receive notification when tracing has completed.\n// The methods of this class will be called on the browser process UI thread.\n///\n/*--cef(source=client)--*/\nclass CefEndTracingCallback : public virtual CefBase {\n public:\n  ///\n  // Called after all processes have sent their trace data. |tracing_file| is\n  // the path at which tracing data was written. The client is responsible for\n  // deleting |tracing_file|.\n  ///\n  /*--cef()--*/\n  virtual void OnEndTracingComplete(const CefString& tracing_file) =0;\n};\n\n\n///\n// Start tracing events on all processes. Tracing is initialized asynchronously\n// and |callback| will be executed on the UI thread after initialization is\n// complete.\n//\n// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is\n// pending, CefBeginTracing will fail and return false.\n//\n// |categories| is a comma-delimited list of category wildcards. A category can\n// have an optional '-' prefix to make it an excluded category. Having both\n// included and excluded categories in the same list is not supported.\n//\n// Example: \"test_MyTest*\"\n// Example: \"test_MyTest*,test_OtherStuff\"\n// Example: \"-excluded_category1,-excluded_category2\"\n//\n// This function must be called on the browser process UI thread.\n///\n/*--cef(optional_param=categories,optional_param=callback)--*/\nbool CefBeginTracing(const CefString& categories,\n                     CefRefPtr<CefCompletionCallback> callback);\n\n///\n// Stop tracing events on all processes.\n//\n// This function will fail and return false if a previous call to\n// CefEndTracingAsync is already pending or if CefBeginTracing was not called.\n//\n// |tracing_file| is the path at which tracing data will be written and\n// |callback| is the callback that will be executed once all processes have\n// sent their trace data. If |tracing_file| is empty a new temporary file path\n// will be used. If |callback| is empty no trace data will be written.\n//\n// This function must be called on the browser process UI thread.\n///\n/*--cef(optional_param=tracing_file,optional_param=callback)--*/\nbool CefEndTracing(const CefString& tracing_file,\n                   CefRefPtr<CefEndTracingCallback> callback);\n\n///\n// Returns the current system trace time or, if none is defined, the current\n// high-res time. Can be used by clients to synchronize with the time\n// information in trace events.\n///\n/*--cef()--*/\nint64 CefNowFromSystemTraceTime();\n\n#endif  // CEF_INCLUDE_CEF_TRACE_H_\n"
  },
  {
    "path": "CEF/include/cef_urlrequest.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_URLREQUEST_H_\n#define CEF_INCLUDE_CEF_URLREQUEST_H_\n#pragma once\n\n#include \"include/cef_auth_callback.h\"\n#include \"include/cef_base.h\"\n#include \"include/cef_request.h\"\n#include \"include/cef_request_context.h\"\n#include \"include/cef_response.h\"\n\nclass CefURLRequestClient;\n\n///\n// Class used to make a URL request. URL requests are not associated with a\n// browser instance so no CefClient callbacks will be executed. URL requests\n// can be created on any valid CEF thread in either the browser or render\n// process. Once created the methods of the URL request object must be accessed\n// on the same thread that created it.\n///\n/*--cef(source=library)--*/\nclass CefURLRequest : public virtual CefBase {\n public:\n  typedef cef_urlrequest_status_t Status;\n  typedef cef_errorcode_t ErrorCode;\n\n  ///\n  // Create a new URL request. Only GET, POST, HEAD, DELETE and PUT request\n  // methods are supported. Multiple post data elements are not supported and\n  // elements of type PDE_TYPE_FILE are only supported for requests originating\n  // from the browser process. Requests originating from the render process will\n  // receive the same handling as requests originating from Web content -- if\n  // the response contains Content-Disposition or Mime-Type header values that\n  // would not normally be rendered then the response may receive special\n  // handling inside the browser (for example, via the file download code path\n  // instead of the URL request code path). The |request| object will be marked\n  // as read-only after calling this method. In the browser process if\n  // |request_context| is empty the global request context will be used. In the\n  // render process |request_context| must be empty and the context associated\n  // with the current renderer process' browser will be used.\n  ///\n  /*--cef(optional_param=request_context)--*/\n  static CefRefPtr<CefURLRequest> Create(\n      CefRefPtr<CefRequest> request,\n      CefRefPtr<CefURLRequestClient> client,\n      CefRefPtr<CefRequestContext> request_context);\n\n  ///\n  // Returns the request object used to create this URL request. The returned\n  // object is read-only and should not be modified.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefRequest> GetRequest() =0;\n\n  ///\n  // Returns the client.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefURLRequestClient> GetClient() =0;\n\n  ///\n  // Returns the request status.\n  ///\n  /*--cef(default_retval=UR_UNKNOWN)--*/\n  virtual Status GetRequestStatus() =0;\n\n  ///\n  // Returns the request error if status is UR_CANCELED or UR_FAILED, or 0\n  // otherwise.\n  ///\n  /*--cef(default_retval=ERR_NONE)--*/\n  virtual ErrorCode GetRequestError() =0;\n\n  ///\n  // Returns the response, or NULL if no response information is available.\n  // Response information will only be available after the upload has completed.\n  // The returned object is read-only and should not be modified.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefResponse> GetResponse() =0;\n\n  ///\n  // Cancel the request.\n  ///\n  /*--cef()--*/\n  virtual void Cancel() =0;\n};\n\n///\n// Interface that should be implemented by the CefURLRequest client. The\n// methods of this class will be called on the same thread that created the\n// request unless otherwise documented.\n///\n/*--cef(source=client)--*/\nclass CefURLRequestClient : public virtual CefBase {\n public:\n  ///\n  // Notifies the client that the request has completed. Use the\n  // CefURLRequest::GetRequestStatus method to determine if the request was\n  // successful or not.\n  ///\n  /*--cef()--*/\n  virtual void OnRequestComplete(CefRefPtr<CefURLRequest> request) =0;\n\n  ///\n  // Notifies the client of upload progress. |current| denotes the number of\n  // bytes sent so far and |total| is the total size of uploading data (or -1 if\n  // chunked upload is enabled). This method will only be called if the\n  // UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.\n  ///\n  /*--cef()--*/\n  virtual void OnUploadProgress(CefRefPtr<CefURLRequest> request,\n                                int64 current,\n                                int64 total) =0;\n\n  ///\n  // Notifies the client of download progress. |current| denotes the number of\n  // bytes received up to the call and |total| is the expected total size of the\n  // response (or -1 if not determined).\n  ///\n  /*--cef()--*/\n  virtual void OnDownloadProgress(CefRefPtr<CefURLRequest> request,\n                                  int64 current,\n                                  int64 total) =0;\n\n  ///\n  // Called when some part of the response is read. |data| contains the current\n  // bytes received since the last call. This method will not be called if the\n  // UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.\n  ///\n  /*--cef()--*/\n  virtual void OnDownloadData(CefRefPtr<CefURLRequest> request,\n                              const void* data,\n                              size_t data_length) =0;\n\n  ///\n  // Called on the IO thread when the browser needs credentials from the user.\n  // |isProxy| indicates whether the host is a proxy server. |host| contains the\n  // hostname and |port| contains the port number. Return true to continue the\n  // request and call CefAuthCallback::Continue() when the authentication\n  // information is available. Return false to cancel the request. This method\n  // will only be called for requests initiated from the browser process.\n  ///\n  /*--cef(optional_param=realm)--*/\n  virtual bool GetAuthCredentials(bool isProxy,\n                                  const CefString& host,\n                                  int port,\n                                  const CefString& realm,\n                                  const CefString& scheme,\n                                  CefRefPtr<CefAuthCallback> callback) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_URLREQUEST_H_\n"
  },
  {
    "path": "CEF/include/cef_v8.h",
    "content": "// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n\n#ifndef CEF_INCLUDE_CEF_V8_H_\n#define CEF_INCLUDE_CEF_V8_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_frame.h\"\n#include \"include/cef_task.h\"\n#include <vector>\n\nclass CefV8Exception;\nclass CefV8Handler;\nclass CefV8StackFrame;\nclass CefV8Value;\n\n\n///\n// Register a new V8 extension with the specified JavaScript extension code and\n// handler. Functions implemented by the handler are prototyped using the\n// keyword 'native'. The calling of a native function is restricted to the scope\n// in which the prototype of the native function is defined. This function may\n// only be called on the render process main thread.\n//\n// Example JavaScript extension code:\n// <pre>\n//   // create the 'example' global object if it doesn't already exist.\n//   if (!example)\n//     example = {};\n//   // create the 'example.test' global object if it doesn't already exist.\n//   if (!example.test)\n//     example.test = {};\n//   (function() {\n//     // Define the function 'example.test.myfunction'.\n//     example.test.myfunction = function() {\n//       // Call CefV8Handler::Execute() with the function name 'MyFunction'\n//       // and no arguments.\n//       native function MyFunction();\n//       return MyFunction();\n//     };\n//     // Define the getter function for parameter 'example.test.myparam'.\n//     example.test.__defineGetter__('myparam', function() {\n//       // Call CefV8Handler::Execute() with the function name 'GetMyParam'\n//       // and no arguments.\n//       native function GetMyParam();\n//       return GetMyParam();\n//     });\n//     // Define the setter function for parameter 'example.test.myparam'.\n//     example.test.__defineSetter__('myparam', function(b) {\n//       // Call CefV8Handler::Execute() with the function name 'SetMyParam'\n//       // and a single argument.\n//       native function SetMyParam();\n//       if(b) SetMyParam(b);\n//     });\n//\n//     // Extension definitions can also contain normal JavaScript variables\n//     // and functions.\n//     var myint = 0;\n//     example.test.increment = function() {\n//       myint += 1;\n//       return myint;\n//     };\n//   })();\n// </pre>\n// Example usage in the page:\n// <pre>\n//   // Call the function.\n//   example.test.myfunction();\n//   // Set the parameter.\n//   example.test.myparam = value;\n//   // Get the parameter.\n//   value = example.test.myparam;\n//   // Call another function.\n//   example.test.increment();\n// </pre>\n///\n/*--cef(optional_param=handler)--*/\nbool CefRegisterExtension(const CefString& extension_name,\n                          const CefString& javascript_code,\n                          CefRefPtr<CefV8Handler> handler);\n\n\n///\n// Class representing a V8 context handle. V8 handles can only be accessed from\n// the thread on which they are created. Valid threads for creating a V8 handle\n// include the render process main thread (TID_RENDERER) and WebWorker threads.\n// A task runner for posting tasks on the associated thread can be retrieved via\n// the CefV8Context::GetTaskRunner() method.\n///\n/*--cef(source=library)--*/\nclass CefV8Context : public virtual CefBase {\n public:\n  ///\n  // Returns the current (top) context object in the V8 context stack.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8Context> GetCurrentContext();\n\n  ///\n  // Returns the entered (bottom) context object in the V8 context stack.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8Context> GetEnteredContext();\n\n  ///\n  // Returns true if V8 is currently inside a context.\n  ///\n  /*--cef()--*/\n  static bool InContext();\n\n  ///\n  // Returns the task runner associated with this context. V8 handles can only\n  // be accessed from the thread on which they are created. This method can be\n  // called on any render process thread.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefTaskRunner> GetTaskRunner() =0;\n\n  ///\n  // Returns true if the underlying handle is valid and it can be accessed on\n  // the current thread. Do not call any other methods if this method returns\n  // false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns the browser for this context. This method will return an empty\n  // reference for WebWorker contexts.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBrowser> GetBrowser() =0;\n\n  ///\n  // Returns the frame for this context. This method will return an empty\n  // reference for WebWorker contexts.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefFrame> GetFrame() =0;\n\n  ///\n  // Returns the global object for this context. The context must be entered\n  // before calling this method.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefV8Value> GetGlobal() =0;\n\n  ///\n  // Enter this context. A context must be explicitly entered before creating a\n  // V8 Object, Array, Function or Date asynchronously. Exit() must be called\n  // the same number of times as Enter() before releasing this context. V8\n  // objects belong to the context in which they are created. Returns true if\n  // the scope was entered successfully.\n  ///\n  /*--cef()--*/\n  virtual bool Enter() =0;\n\n  ///\n  // Exit this context. Call this method only after calling Enter(). Returns\n  // true if the scope was exited successfully.\n  ///\n  /*--cef()--*/\n  virtual bool Exit() =0;\n\n  ///\n  // Returns true if this object is pointing to the same handle as |that|\n  // object.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefV8Context> that) =0;\n\n  ///\n  // Evaluates the specified JavaScript code using this context's global object.\n  // On success |retval| will be set to the return value, if any, and the\n  // function will return true. On failure |exception| will be set to the\n  // exception, if any, and the function will return false.\n  ///\n  /*--cef()--*/\n  virtual bool Eval(const CefString& code,\n                    CefRefPtr<CefV8Value>& retval,\n                    CefRefPtr<CefV8Exception>& exception) =0;\n};\n\n\ntypedef std::vector<CefRefPtr<CefV8Value> > CefV8ValueList;\n\n///\n// Interface that should be implemented to handle V8 function calls. The methods\n// of this class will be called on the thread associated with the V8 function.\n///\n/*--cef(source=client)--*/\nclass CefV8Handler : public virtual CefBase {\n public:\n  ///\n  // Handle execution of the function identified by |name|. |object| is the\n  // receiver ('this' object) of the function. |arguments| is the list of\n  // arguments passed to the function. If execution succeeds set |retval| to the\n  // function return value. If execution fails set |exception| to the exception\n  // that will be thrown. Return true if execution was handled.\n  ///\n  /*--cef()--*/\n  virtual bool Execute(const CefString& name,\n                       CefRefPtr<CefV8Value> object,\n                       const CefV8ValueList& arguments,\n                       CefRefPtr<CefV8Value>& retval,\n                       CefString& exception) =0;\n};\n\n///\n// Interface that should be implemented to handle V8 accessor calls. Accessor\n// identifiers are registered by calling CefV8Value::SetValue(). The methods\n// of this class will be called on the thread associated with the V8 accessor.\n///\n/*--cef(source=client)--*/\nclass CefV8Accessor : public virtual CefBase {\n public:\n  ///\n  // Handle retrieval the accessor value identified by |name|. |object| is the\n  // receiver ('this' object) of the accessor. If retrieval succeeds set\n  // |retval| to the return value. If retrieval fails set |exception| to the\n  // exception that will be thrown. Return true if accessor retrieval was\n  // handled.\n  ///\n  /*--cef()--*/\n  virtual bool Get(const CefString& name,\n                   const CefRefPtr<CefV8Value> object,\n                   CefRefPtr<CefV8Value>& retval,\n                   CefString& exception) =0;\n\n  ///\n  // Handle assignment of the accessor value identified by |name|. |object| is\n  // the receiver ('this' object) of the accessor. |value| is the new value\n  // being assigned to the accessor. If assignment fails set |exception| to the\n  // exception that will be thrown. Return true if accessor assignment was\n  // handled.\n  ///\n  /*--cef()--*/\n  virtual bool Set(const CefString& name,\n                   const CefRefPtr<CefV8Value> object,\n                   const CefRefPtr<CefV8Value> value,\n                   CefString& exception) =0;\n};\n\n///\n// Class representing a V8 exception. The methods of this class may be called on\n// any render process thread.\n///\n/*--cef(source=library)--*/\nclass CefV8Exception : public virtual CefBase {\n public:\n  ///\n  // Returns the exception message.\n  ///\n  /*--cef()--*/\n  virtual CefString GetMessage() =0;\n\n  ///\n  // Returns the line of source code that the exception occurred within.\n  ///\n  /*--cef()--*/\n  virtual CefString GetSourceLine() =0;\n\n  ///\n  // Returns the resource name for the script from where the function causing\n  // the error originates.\n  ///\n  /*--cef()--*/\n  virtual CefString GetScriptResourceName() =0;\n\n  ///\n  // Returns the 1-based number of the line where the error occurred or 0 if the\n  // line number is unknown.\n  ///\n  /*--cef()--*/\n  virtual int GetLineNumber() =0;\n\n  ///\n  // Returns the index within the script of the first character where the error\n  // occurred.\n  ///\n  /*--cef()--*/\n  virtual int GetStartPosition() =0;\n\n  ///\n  // Returns the index within the script of the last character where the error\n  // occurred.\n  ///\n  /*--cef()--*/\n  virtual int GetEndPosition() =0;\n\n  ///\n  // Returns the index within the line of the first character where the error\n  // occurred.\n  ///\n  /*--cef()--*/\n  virtual int GetStartColumn() =0;\n\n  ///\n  // Returns the index within the line of the last character where the error\n  // occurred.\n  ///\n  /*--cef()--*/\n  virtual int GetEndColumn() =0;\n};\n\n///\n// Class representing a V8 value handle. V8 handles can only be accessed from\n// the thread on which they are created. Valid threads for creating a V8 handle\n// include the render process main thread (TID_RENDERER) and WebWorker threads.\n// A task runner for posting tasks on the associated thread can be retrieved via\n// the CefV8Context::GetTaskRunner() method.\n///\n/*--cef(source=library)--*/\nclass CefV8Value : public virtual CefBase {\n public:\n  typedef cef_v8_accesscontrol_t AccessControl;\n  typedef cef_v8_propertyattribute_t PropertyAttribute;\n\n  ///\n  // Create a new CefV8Value object of type undefined.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8Value> CreateUndefined();\n\n  ///\n  // Create a new CefV8Value object of type null.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8Value> CreateNull();\n\n  ///\n  // Create a new CefV8Value object of type bool.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8Value> CreateBool(bool value);\n\n  ///\n  // Create a new CefV8Value object of type int.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8Value> CreateInt(int32 value);\n\n  ///\n  // Create a new CefV8Value object of type unsigned int.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8Value> CreateUInt(uint32 value);\n\n  ///\n  // Create a new CefV8Value object of type double.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8Value> CreateDouble(double value);\n\n  ///\n  // Create a new CefV8Value object of type Date. This method should only be\n  // called from within the scope of a CefRenderProcessHandler, CefV8Handler or\n  // CefV8Accessor callback, or in combination with calling Enter() and Exit()\n  // on a stored CefV8Context reference.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8Value> CreateDate(const CefTime& date);\n\n  ///\n  // Create a new CefV8Value object of type string.\n  ///\n  /*--cef(optional_param=value)--*/\n  static CefRefPtr<CefV8Value> CreateString(const CefString& value);\n\n  ///\n  // Create a new CefV8Value object of type object with optional accessor. This\n  // method should only be called from within the scope of a\n  // CefRenderProcessHandler, CefV8Handler or CefV8Accessor callback, or in\n  // combination with calling Enter() and Exit() on a stored CefV8Context\n  // reference.\n  ///\n  /*--cef(optional_param=accessor)--*/\n  static CefRefPtr<CefV8Value> CreateObject(CefRefPtr<CefV8Accessor> accessor);\n\n  ///\n  // Create a new CefV8Value object of type array with the specified |length|.\n  // If |length| is negative the returned array will have length 0. This method\n  // should only be called from within the scope of a CefRenderProcessHandler,\n  // CefV8Handler or CefV8Accessor callback, or in combination with calling\n  // Enter() and Exit() on a stored CefV8Context reference.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8Value> CreateArray(int length);\n\n  ///\n  // Create a new CefV8Value object of type function. This method should only be\n  // called from within the scope of a CefRenderProcessHandler, CefV8Handler or\n  // CefV8Accessor callback, or in combination with calling Enter() and Exit()\n  // on a stored CefV8Context reference.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8Value> CreateFunction(const CefString& name,\n                                              CefRefPtr<CefV8Handler> handler);\n\n  ///\n  // Returns true if the underlying handle is valid and it can be accessed on\n  // the current thread. Do not call any other methods if this method returns\n  // false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // True if the value type is undefined.\n  ///\n  /*--cef()--*/\n  virtual bool IsUndefined() =0;\n\n  ///\n  // True if the value type is null.\n  ///\n  /*--cef()--*/\n  virtual bool IsNull() =0;\n\n  ///\n  // True if the value type is bool.\n  ///\n  /*--cef()--*/\n  virtual bool IsBool() =0;\n\n  ///\n  // True if the value type is int.\n  ///\n  /*--cef()--*/\n  virtual bool IsInt() =0;\n\n  ///\n  // True if the value type is unsigned int.\n  ///\n  /*--cef()--*/\n  virtual bool IsUInt() =0;\n\n  ///\n  // True if the value type is double.\n  ///\n  /*--cef()--*/\n  virtual bool IsDouble() =0;\n\n  ///\n  // True if the value type is Date.\n  ///\n  /*--cef()--*/\n  virtual bool IsDate() =0;\n\n  ///\n  // True if the value type is string.\n  ///\n  /*--cef()--*/\n  virtual bool IsString() =0;\n\n  ///\n  // True if the value type is object.\n  ///\n  /*--cef()--*/\n  virtual bool IsObject() =0;\n\n  ///\n  // True if the value type is array.\n  ///\n  /*--cef()--*/\n  virtual bool IsArray() =0;\n\n  ///\n  // True if the value type is function.\n  ///\n  /*--cef()--*/\n  virtual bool IsFunction() =0;\n\n  ///\n  // Returns true if this object is pointing to the same handle as |that|\n  // object.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefV8Value> that) =0;\n\n  ///\n  // Return a bool value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  /*--cef()--*/\n  virtual bool GetBoolValue() =0;\n\n  ///\n  // Return an int value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  /*--cef()--*/\n  virtual int32 GetIntValue() =0;\n\n  ///\n  // Return an unisgned int value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  /*--cef()--*/\n  virtual uint32 GetUIntValue() =0;\n\n  ///\n  // Return a double value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  /*--cef()--*/\n  virtual double GetDoubleValue() =0;\n\n  ///\n  // Return a Date value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  /*--cef()--*/\n  virtual CefTime GetDateValue() =0;\n\n  ///\n  // Return a string value.  The underlying data will be converted to if\n  // necessary.\n  ///\n  /*--cef()--*/\n  virtual CefString GetStringValue() =0;\n\n\n  // OBJECT METHODS - These methods are only available on objects. Arrays and\n  // functions are also objects. String- and integer-based keys can be used\n  // interchangably with the framework converting between them as necessary.\n\n  ///\n  // Returns true if this is a user created object.\n  ///\n  /*--cef()--*/\n  virtual bool IsUserCreated() =0;\n\n  ///\n  // Returns true if the last method call resulted in an exception. This\n  // attribute exists only in the scope of the current CEF value object.\n  ///\n  /*--cef()--*/\n  virtual bool HasException() =0;\n\n  ///\n  // Returns the exception resulting from the last method call. This attribute\n  // exists only in the scope of the current CEF value object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefV8Exception> GetException() =0;\n\n  ///\n  // Clears the last exception and returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool ClearException() =0;\n\n  ///\n  // Returns true if this object will re-throw future exceptions. This attribute\n  // exists only in the scope of the current CEF value object.\n  ///\n  /*--cef()--*/\n  virtual bool WillRethrowExceptions() =0;\n\n  ///\n  // Set whether this object will re-throw future exceptions. By default\n  // exceptions are not re-thrown. If a exception is re-thrown the current\n  // context should not be accessed again until after the exception has been\n  // caught and not re-thrown. Returns true on success. This attribute exists\n  // only in the scope of the current CEF value object.\n  ///\n  /*--cef()--*/\n  virtual bool SetRethrowExceptions(bool rethrow) =0;\n\n  ///\n  // Returns true if the object has a value with the specified identifier.\n  ///\n  /*--cef(capi_name=has_value_bykey,optional_param=key)--*/\n  virtual bool HasValue(const CefString& key) =0;\n\n  ///\n  // Returns true if the object has a value with the specified identifier.\n  ///\n  /*--cef(capi_name=has_value_byindex,index_param=index)--*/\n  virtual bool HasValue(int index) =0;\n\n  ///\n  // Deletes the value with the specified identifier and returns true on\n  // success. Returns false if this method is called incorrectly or an exception\n  // is thrown. For read-only and don't-delete values this method will return\n  // true even though deletion failed.\n  ///\n  /*--cef(capi_name=delete_value_bykey,optional_param=key)--*/\n  virtual bool DeleteValue(const CefString& key) =0;\n\n  ///\n  // Deletes the value with the specified identifier and returns true on\n  // success. Returns false if this method is called incorrectly, deletion fails\n  // or an exception is thrown. For read-only and don't-delete values this\n  // method will return true even though deletion failed.\n  ///\n  /*--cef(capi_name=delete_value_byindex,index_param=index)--*/\n  virtual bool DeleteValue(int index) =0;\n\n  ///\n  // Returns the value with the specified identifier on success. Returns NULL\n  // if this method is called incorrectly or an exception is thrown.\n  ///\n  /*--cef(capi_name=get_value_bykey,optional_param=key)--*/\n  virtual CefRefPtr<CefV8Value> GetValue(const CefString& key) =0;\n\n  ///\n  // Returns the value with the specified identifier on success. Returns NULL\n  // if this method is called incorrectly or an exception is thrown.\n  ///\n  /*--cef(capi_name=get_value_byindex,index_param=index)--*/\n  virtual CefRefPtr<CefV8Value> GetValue(int index) =0;\n\n  ///\n  // Associates a value with the specified identifier and returns true on\n  // success. Returns false if this method is called incorrectly or an exception\n  // is thrown. For read-only values this method will return true even though\n  // assignment failed.\n  ///\n  /*--cef(capi_name=set_value_bykey,optional_param=key)--*/\n  virtual bool SetValue(const CefString& key, CefRefPtr<CefV8Value> value,\n                        PropertyAttribute attribute) =0;\n\n  ///\n  // Associates a value with the specified identifier and returns true on\n  // success. Returns false if this method is called incorrectly or an exception\n  // is thrown. For read-only values this method will return true even though\n  // assignment failed.\n  ///\n  /*--cef(capi_name=set_value_byindex,index_param=index)--*/\n  virtual bool SetValue(int index, CefRefPtr<CefV8Value> value) =0;\n\n  ///\n  // Registers an identifier and returns true on success. Access to the\n  // identifier will be forwarded to the CefV8Accessor instance passed to\n  // CefV8Value::CreateObject(). Returns false if this method is called\n  // incorrectly or an exception is thrown. For read-only values this method\n  // will return true even though assignment failed.\n  ///\n  /*--cef(capi_name=set_value_byaccessor,optional_param=key)--*/\n  virtual bool SetValue(const CefString& key, AccessControl settings,\n                        PropertyAttribute attribute) =0;\n\n  ///\n  // Read the keys for the object's values into the specified vector. Integer-\n  // based keys will also be returned as strings.\n  ///\n  /*--cef()--*/\n  virtual bool GetKeys(std::vector<CefString>& keys) =0;\n\n  ///\n  // Sets the user data for this object and returns true on success. Returns\n  // false if this method is called incorrectly. This method can only be called\n  // on user created objects.\n  ///\n  /*--cef(optional_param=user_data)--*/\n  virtual bool SetUserData(CefRefPtr<CefBase> user_data) =0;\n\n  ///\n  // Returns the user data, if any, assigned to this object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBase> GetUserData() =0;\n\n  ///\n  // Returns the amount of externally allocated memory registered for the\n  // object.\n  ///\n  /*--cef()--*/\n  virtual int GetExternallyAllocatedMemory() =0;\n\n  ///\n  // Adjusts the amount of registered external memory for the object. Used to\n  // give V8 an indication of the amount of externally allocated memory that is\n  // kept alive by JavaScript objects. V8 uses this information to decide when\n  // to perform global garbage collection. Each CefV8Value tracks the amount of\n  // external memory associated with it and automatically decreases the global\n  // total by the appropriate amount on its destruction. |change_in_bytes|\n  // specifies the number of bytes to adjust by. This method returns the number\n  // of bytes associated with the object after the adjustment. This method can\n  // only be called on user created objects.\n  ///\n  /*--cef()--*/\n  virtual int AdjustExternallyAllocatedMemory(int change_in_bytes) =0;\n\n\n  // ARRAY METHODS - These methods are only available on arrays.\n\n  ///\n  // Returns the number of elements in the array.\n  ///\n  /*--cef()--*/\n  virtual int GetArrayLength() =0;\n\n\n  // FUNCTION METHODS - These methods are only available on functions.\n\n  ///\n  // Returns the function name.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFunctionName() =0;\n\n  ///\n  // Returns the function handler or NULL if not a CEF-created function.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefV8Handler> GetFunctionHandler() =0;\n\n  ///\n  // Execute the function using the current V8 context. This method should only\n  // be called from within the scope of a CefV8Handler or CefV8Accessor\n  // callback, or in combination with calling Enter() and Exit() on a stored\n  // CefV8Context reference. |object| is the receiver ('this' object) of the\n  // function. If |object| is empty the current context's global object will be\n  // used. |arguments| is the list of arguments that will be passed to the\n  // function. Returns the function return value on success. Returns NULL if\n  // this method is called incorrectly or an exception is thrown.\n  ///\n  /*--cef(optional_param=object)--*/\n  virtual CefRefPtr<CefV8Value> ExecuteFunction(\n      CefRefPtr<CefV8Value> object,\n      const CefV8ValueList& arguments) =0;\n\n  ///\n  // Execute the function using the specified V8 context. |object| is the\n  // receiver ('this' object) of the function. If |object| is empty the\n  // specified context's global object will be used. |arguments| is the list of\n  // arguments that will be passed to the function. Returns the function return\n  // value on success. Returns NULL if this method is called incorrectly or an\n  // exception is thrown.\n  ///\n  /*--cef(optional_param=object)--*/\n  virtual CefRefPtr<CefV8Value> ExecuteFunctionWithContext(\n      CefRefPtr<CefV8Context> context,\n      CefRefPtr<CefV8Value> object,\n      const CefV8ValueList& arguments) =0;\n};\n\n///\n// Class representing a V8 stack trace handle. V8 handles can only be accessed\n// from the thread on which they are created. Valid threads for creating a V8\n// handle include the render process main thread (TID_RENDERER) and WebWorker\n// threads. A task runner for posting tasks on the associated thread can be\n// retrieved via the CefV8Context::GetTaskRunner() method.\n///\n/*--cef(source=library)--*/\nclass CefV8StackTrace : public virtual CefBase {\n public:\n  ///\n  // Returns the stack trace for the currently active context. |frame_limit| is\n  // the maximum number of frames that will be captured.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefV8StackTrace> GetCurrent(int frame_limit);\n\n  ///\n  // Returns true if the underlying handle is valid and it can be accessed on\n  // the current thread. Do not call any other methods if this method returns\n  // false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns the number of stack frames.\n  ///\n  /*--cef()--*/\n  virtual int GetFrameCount() =0;\n\n  ///\n  // Returns the stack frame at the specified 0-based index.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefV8StackFrame> GetFrame(int index) =0;\n};\n\n///\n// Class representing a V8 stack frame handle. V8 handles can only be accessed\n// from the thread on which they are created. Valid threads for creating a V8\n// handle include the render process main thread (TID_RENDERER) and WebWorker\n// threads. A task runner for posting tasks on the associated thread can be\n// retrieved via the CefV8Context::GetTaskRunner() method.\n///\n/*--cef(source=library)--*/\nclass CefV8StackFrame : public virtual CefBase {\n public:\n  ///\n  // Returns true if the underlying handle is valid and it can be accessed on\n  // the current thread. Do not call any other methods if this method returns\n  // false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns the name of the resource script that contains the function.\n  ///\n  /*--cef()--*/\n  virtual CefString GetScriptName() =0;\n\n  ///\n  // Returns the name of the resource script that contains the function or the\n  // sourceURL value if the script name is undefined and its source ends with\n  // a \"//@ sourceURL=...\" string.\n  ///\n  /*--cef()--*/\n  virtual CefString GetScriptNameOrSourceURL() =0;\n\n  ///\n  // Returns the name of the function.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFunctionName() =0;\n\n  ///\n  // Returns the 1-based line number for the function call or 0 if unknown.\n  ///\n  /*--cef()--*/\n  virtual int GetLineNumber() =0;\n\n  ///\n  // Returns the 1-based column offset on the line for the function call or 0 if\n  // unknown.\n  ///\n  /*--cef()--*/\n  virtual int GetColumn() =0;\n\n  ///\n  // Returns true if the function was compiled using eval().\n  ///\n  /*--cef()--*/\n  virtual bool IsEval() =0;\n\n  ///\n  // Returns true if the function was called as a constructor via \"new\".\n  ///\n  /*--cef()--*/\n  virtual bool IsConstructor() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_V8_H_\n"
  },
  {
    "path": "CEF/include/cef_values.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_VALUES_H_\n#define CEF_INCLUDE_CEF_VALUES_H_\n#pragma once\n\n#include <vector>\n#include \"include/cef_base.h\"\n\nclass CefBinaryValue;\nclass CefDictionaryValue;\nclass CefListValue;\n\ntypedef cef_value_type_t CefValueType;\n\n///\n// Class that wraps other data value types. Complex types (binary, dictionary\n// and list) will be referenced but not owned by this object. Can be used on any\n// process and thread.\n///\n/*--cef(source=library)--*/\nclass CefValue : public virtual CefBase {\n public:\n  ///\n  // Creates a new object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefValue> Create();\n\n  ///\n  // Returns true if the underlying data is valid. This will always be true for\n  // simple types. For complex types (binary, dictionary and list) the\n  // underlying data may become invalid if owned by another object (e.g. list or\n  // dictionary) and that other object is then modified or destroyed. This value\n  // object can be re-used by calling Set*() even if the underlying data is\n  // invalid.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns true if the underlying data is owned by another object.\n  ///\n  /*--cef()--*/\n  virtual bool IsOwned() =0;\n\n  ///\n  // Returns true if the underlying data is read-only. Some APIs may expose\n  // read-only objects.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Returns true if this object and |that| object have the same underlying\n  // data. If true modifications to this object will also affect |that| object\n  // and vice-versa.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefValue> that) =0;\n\n  ///\n  // Returns true if this object and |that| object have an equivalent underlying\n  // value but are not necessarily the same object.\n  ///\n  /*--cef()--*/\n  virtual bool IsEqual(CefRefPtr<CefValue> that) =0;\n\n  ///\n  // Returns a copy of this object. The underlying data will also be copied.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefValue> Copy() =0;\n\n  ///\n  // Returns the underlying value type.\n  ///\n  /*--cef(default_retval=VTYPE_INVALID)--*/\n  virtual CefValueType GetType() =0;\n\n  ///\n  // Returns the underlying value as type bool.\n  ///\n  /*--cef()--*/\n  virtual bool GetBool() =0;\n\n  ///\n  // Returns the underlying value as type int.\n  ///\n  /*--cef()--*/\n  virtual int GetInt() =0;\n\n  ///\n  // Returns the underlying value as type double.\n  ///\n  /*--cef()--*/\n  virtual double GetDouble() =0;\n\n  ///\n  // Returns the underlying value as type string.\n  ///\n  /*--cef()--*/\n  virtual CefString GetString() =0;\n\n  ///\n  // Returns the underlying value as type binary. The returned reference may\n  // become invalid if the value is owned by another object or if ownership is\n  // transferred to another object in the future. To maintain a reference to\n  // the value after assigning ownership to a dictionary or list pass this\n  // object to the SetValue() method instead of passing the returned reference\n  // to SetBinary().\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBinaryValue> GetBinary() =0;\n\n  ///\n  // Returns the underlying value as type dictionary. The returned reference may\n  // become invalid if the value is owned by another object or if ownership is\n  // transferred to another object in the future. To maintain a reference to\n  // the value after assigning ownership to a dictionary or list pass this\n  // object to the SetValue() method instead of passing the returned reference\n  // to SetDictionary().\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDictionaryValue> GetDictionary() =0;\n\n  ///\n  // Returns the underlying value as type list. The returned reference may\n  // become invalid if the value is owned by another object or if ownership is\n  // transferred to another object in the future. To maintain a reference to\n  // the value after assigning ownership to a dictionary or list pass this\n  // object to the SetValue() method instead of passing the returned reference\n  // to SetList().\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefListValue> GetList() =0;\n\n  ///\n  // Sets the underlying value as type null. Returns true if the value was set\n  // successfully.\n  ///\n  /*--cef()--*/\n  virtual bool SetNull() =0;\n\n  ///\n  // Sets the underlying value as type bool. Returns true if the value was set\n  // successfully.\n  ///\n  /*--cef()--*/\n  virtual bool SetBool(bool value) =0;\n\n  ///\n  // Sets the underlying value as type int. Returns true if the value was set\n  // successfully.\n  ///\n  /*--cef()--*/\n  virtual bool SetInt(int value) =0;\n\n  ///\n  // Sets the underlying value as type double. Returns true if the value was set\n  // successfully.\n  ///\n  /*--cef()--*/\n  virtual bool SetDouble(double value) =0;\n\n  ///\n  // Sets the underlying value as type string. Returns true if the value was set\n  // successfully.\n  ///\n  /*--cef(optional_param=value)--*/\n  virtual bool SetString(const CefString& value) =0;\n\n  ///\n  // Sets the underlying value as type binary. Returns true if the value was set\n  // successfully. This object keeps a reference to |value| and ownership of the\n  // underlying data remains unchanged.\n  ///\n  /*--cef()--*/\n  virtual bool SetBinary(CefRefPtr<CefBinaryValue> value) =0;\n\n  ///\n  // Sets the underlying value as type dict. Returns true if the value was set\n  // successfully. This object keeps a reference to |value| and ownership of the\n  // underlying data remains unchanged.\n  ///\n  /*--cef()--*/\n  virtual bool SetDictionary(CefRefPtr<CefDictionaryValue> value) =0;\n\n  ///\n  // Sets the underlying value as type list. Returns true if the value was set\n  // successfully. This object keeps a reference to |value| and ownership of the\n  // underlying data remains unchanged.\n  ///\n  /*--cef()--*/\n  virtual bool SetList(CefRefPtr<CefListValue> value) =0;\n};\n\n\n///\n// Class representing a binary value. Can be used on any process and thread.\n///\n/*--cef(source=library)--*/\nclass CefBinaryValue : public virtual CefBase {\n public:\n  ///\n  // Creates a new object that is not owned by any other object. The specified\n  // |data| will be copied.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefBinaryValue> Create(const void* data,\n                                          size_t data_size);\n\n  ///\n  // Returns true if this object is valid. This object may become invalid if\n  // the underlying data is owned by another object (e.g. list or dictionary)\n  // and that other object is then modified or destroyed. Do not call any other\n  // methods if this method returns false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns true if this object is currently owned by another object.\n  ///\n  /*--cef()--*/\n  virtual bool IsOwned() =0;\n\n  ///\n  // Returns true if this object and |that| object have the same underlying\n  // data.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefBinaryValue> that) =0;\n\n  ///\n  // Returns true if this object and |that| object have an equivalent underlying\n  // value but are not necessarily the same object.\n  ///\n  /*--cef()--*/\n  virtual bool IsEqual(CefRefPtr<CefBinaryValue> that) =0;\n\n  ///\n  // Returns a copy of this object. The data in this object will also be copied.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBinaryValue> Copy() =0;\n\n  ///\n  // Returns the data size.\n  ///\n  /*--cef()--*/\n  virtual size_t GetSize() =0;\n\n  ///\n  // Read up to |buffer_size| number of bytes into |buffer|. Reading begins at\n  // the specified byte |data_offset|. Returns the number of bytes read.\n  ///\n  /*--cef()--*/\n  virtual size_t GetData(void* buffer,\n                         size_t buffer_size,\n                         size_t data_offset) =0;\n};\n\n\n///\n// Class representing a dictionary value. Can be used on any process and thread.\n///\n/*--cef(source=library)--*/\nclass CefDictionaryValue : public virtual CefBase {\n public:\n  typedef std::vector<CefString> KeyList;\n\n  ///\n  // Creates a new object that is not owned by any other object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefDictionaryValue> Create();\n\n  ///\n  // Returns true if this object is valid. This object may become invalid if\n  // the underlying data is owned by another object (e.g. list or dictionary)\n  // and that other object is then modified or destroyed. Do not call any other\n  // methods if this method returns false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns true if this object is currently owned by another object.\n  ///\n  /*--cef()--*/\n  virtual bool IsOwned() =0;\n\n  ///\n  // Returns true if the values of this object are read-only. Some APIs may\n  // expose read-only objects.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Returns true if this object and |that| object have the same underlying\n  // data. If true modifications to this object will also affect |that| object\n  // and vice-versa.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefDictionaryValue> that) =0;\n\n  ///\n  // Returns true if this object and |that| object have an equivalent underlying\n  // value but are not necessarily the same object.\n  ///\n  /*--cef()--*/\n  virtual bool IsEqual(CefRefPtr<CefDictionaryValue> that) =0;\n\n  ///\n  // Returns a writable copy of this object. If |exclude_empty_children| is true\n  // any empty dictionaries or lists will be excluded from the copy.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDictionaryValue> Copy(bool exclude_empty_children) =0;\n\n  ///\n  // Returns the number of values.\n  ///\n  /*--cef()--*/\n  virtual size_t GetSize() =0;\n\n  ///\n  // Removes all values. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool Clear() =0;\n\n  ///\n  // Returns true if the current dictionary has a value for the given key.\n  ///\n  /*--cef()--*/\n  virtual bool HasKey(const CefString& key) =0;\n\n  ///\n  // Reads all keys for this dictionary into the specified vector.\n  ///\n  /*--cef()--*/\n  virtual bool GetKeys(KeyList& keys) =0;\n\n  ///\n  // Removes the value at the specified key. Returns true is the value was\n  // removed successfully.\n  ///\n  /*--cef()--*/\n  virtual bool Remove(const CefString& key) =0;\n\n  ///\n  // Returns the value type for the specified key.\n  ///\n  /*--cef(default_retval=VTYPE_INVALID)--*/\n  virtual CefValueType GetType(const CefString& key) =0;\n\n  ///\n  // Returns the value at the specified key. For simple types the returned\n  // value will copy existing data and modifications to the value will not\n  // modify this object. For complex types (binary, dictionary and list) the\n  // returned value will reference existing data and modifications to the value\n  // will modify this object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefValue> GetValue(const CefString& key) =0;\n\n  ///\n  // Returns the value at the specified key as type bool.\n  ///\n  /*--cef()--*/\n  virtual bool GetBool(const CefString& key) =0;\n\n  ///\n  // Returns the value at the specified key as type int.\n  ///\n  /*--cef()--*/\n  virtual int GetInt(const CefString& key) =0;\n\n  ///\n  // Returns the value at the specified key as type double.\n  ///\n  /*--cef()--*/\n  virtual double GetDouble(const CefString& key) =0;\n\n  ///\n  // Returns the value at the specified key as type string.\n  ///\n  /*--cef()--*/\n  virtual CefString GetString(const CefString& key) =0;\n\n  ///\n  // Returns the value at the specified key as type binary. The returned\n  // value will reference existing data.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBinaryValue> GetBinary(const CefString& key) =0;\n\n  ///\n  // Returns the value at the specified key as type dictionary. The returned\n  // value will reference existing data and modifications to the value will\n  // modify this object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDictionaryValue> GetDictionary(const CefString& key) =0;\n\n  ///\n  // Returns the value at the specified key as type list. The returned value\n  // will reference existing data and modifications to the value will modify\n  // this object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefListValue> GetList(const CefString& key) =0;\n\n  ///\n  // Sets the value at the specified key. Returns true if the value was set\n  // successfully. If |value| represents simple data then the underlying data\n  // will be copied and modifications to |value| will not modify this object. If\n  // |value| represents complex data (binary, dictionary or list) then the\n  // underlying data will be referenced and modifications to |value| will modify\n  // this object.\n  ///\n  /*--cef()--*/\n  virtual bool SetValue(const CefString& key, CefRefPtr<CefValue> value) =0;\n\n  ///\n  // Sets the value at the specified key as type null. Returns true if the\n  // value was set successfully.\n  ///\n  /*--cef()--*/\n  virtual bool SetNull(const CefString& key) =0;\n\n  ///\n  // Sets the value at the specified key as type bool. Returns true if the\n  // value was set successfully.\n  ///\n  /*--cef()--*/\n  virtual bool SetBool(const CefString& key, bool value) =0;\n\n  ///\n  // Sets the value at the specified key as type int. Returns true if the\n  // value was set successfully.\n  ///\n  /*--cef()--*/\n  virtual bool SetInt(const CefString& key, int value) =0;\n\n  ///\n  // Sets the value at the specified key as type double. Returns true if the\n  // value was set successfully.\n  ///\n  /*--cef()--*/\n  virtual bool SetDouble(const CefString& key, double value) =0;\n\n  ///\n  // Sets the value at the specified key as type string. Returns true if the\n  // value was set successfully.\n  ///\n  /*--cef(optional_param=value)--*/\n  virtual bool SetString(const CefString& key, const CefString& value) =0;\n\n  ///\n  // Sets the value at the specified key as type binary. Returns true if the\n  // value was set successfully. If |value| is currently owned by another object\n  // then the value will be copied and the |value| reference will not change.\n  // Otherwise, ownership will be transferred to this object and the |value|\n  // reference will be invalidated.\n  ///\n  /*--cef()--*/\n  virtual bool SetBinary(const CefString& key,\n                         CefRefPtr<CefBinaryValue> value) =0;\n\n  ///\n  // Sets the value at the specified key as type dict. Returns true if the\n  // value was set successfully. If |value| is currently owned by another object\n  // then the value will be copied and the |value| reference will not change.\n  // Otherwise, ownership will be transferred to this object and the |value|\n  // reference will be invalidated.\n  ///\n  /*--cef()--*/\n  virtual bool SetDictionary(const CefString& key,\n                             CefRefPtr<CefDictionaryValue> value) =0;\n\n  ///\n  // Sets the value at the specified key as type list. Returns true if the\n  // value was set successfully. If |value| is currently owned by another object\n  // then the value will be copied and the |value| reference will not change.\n  // Otherwise, ownership will be transferred to this object and the |value|\n  // reference will be invalidated.\n  ///\n  /*--cef()--*/\n  virtual bool SetList(const CefString& key,\n                       CefRefPtr<CefListValue> value) =0;\n};\n\n\n///\n// Class representing a list value. Can be used on any process and thread.\n///\n/*--cef(source=library)--*/\nclass CefListValue : public virtual CefBase {\n public:\n  ///\n  // Creates a new object that is not owned by any other object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefListValue> Create();\n\n  ///\n  // Returns true if this object is valid. This object may become invalid if\n  // the underlying data is owned by another object (e.g. list or dictionary)\n  // and that other object is then modified or destroyed. Do not call any other\n  // methods if this method returns false.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns true if this object is currently owned by another object.\n  ///\n  /*--cef()--*/\n  virtual bool IsOwned() =0;\n\n  ///\n  // Returns true if the values of this object are read-only. Some APIs may\n  // expose read-only objects.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Returns true if this object and |that| object have the same underlying\n  // data. If true modifications to this object will also affect |that| object\n  // and vice-versa.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefListValue> that) =0;\n\n  ///\n  // Returns true if this object and |that| object have an equivalent underlying\n  // value but are not necessarily the same object.\n  ///\n  /*--cef()--*/\n  virtual bool IsEqual(CefRefPtr<CefListValue> that) =0;\n\n  ///\n  // Returns a writable copy of this object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefListValue> Copy() =0;\n\n  ///\n  // Sets the number of values. If the number of values is expanded all\n  // new value slots will default to type null. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool SetSize(size_t size) =0;\n\n  ///\n  // Returns the number of values.\n  ///\n  /*--cef()--*/\n  virtual size_t GetSize() =0;\n\n  ///\n  // Removes all values. Returns true on success.\n  ///\n  /*--cef()--*/\n  virtual bool Clear() =0;\n\n  ///\n  // Removes the value at the specified index.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual bool Remove(int index) =0;\n\n  ///\n  // Returns the value type at the specified index.\n  ///\n  /*--cef(default_retval=VTYPE_INVALID,index_param=index)--*/\n  virtual CefValueType GetType(int index) =0;\n\n  ///\n  // Returns the value at the specified index. For simple types the returned\n  // value will copy existing data and modifications to the value will not\n  // modify this object. For complex types (binary, dictionary and list) the\n  // returned value will reference existing data and modifications to the value\n  // will modify this object.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual CefRefPtr<CefValue> GetValue(int index) =0;\n\n  ///\n  // Returns the value at the specified index as type bool.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual bool GetBool(int index) =0;\n\n  ///\n  // Returns the value at the specified index as type int.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual int GetInt(int index) =0;\n\n  ///\n  // Returns the value at the specified index as type double.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual double GetDouble(int index) =0;\n\n  ///\n  // Returns the value at the specified index as type string.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual CefString GetString(int index) =0;\n\n  ///\n  // Returns the value at the specified index as type binary. The returned\n  // value will reference existing data.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual CefRefPtr<CefBinaryValue> GetBinary(int index) =0;\n\n  ///\n  // Returns the value at the specified index as type dictionary. The returned\n  // value will reference existing data and modifications to the value will\n  // modify this object.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual CefRefPtr<CefDictionaryValue> GetDictionary(int index) =0;\n\n  ///\n  // Returns the value at the specified index as type list. The returned\n  // value will reference existing data and modifications to the value will\n  // modify this object.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual CefRefPtr<CefListValue> GetList(int index) =0;\n\n  ///\n  // Sets the value at the specified index. Returns true if the value was set\n  // successfully. If |value| represents simple data then the underlying data\n  // will be copied and modifications to |value| will not modify this object. If\n  // |value| represents complex data (binary, dictionary or list) then the\n  // underlying data will be referenced and modifications to |value| will modify\n  // this object.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual bool SetValue(int index, CefRefPtr<CefValue> value) =0;\n\n  ///\n  // Sets the value at the specified index as type null. Returns true if the\n  // value was set successfully.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual bool SetNull(int index) =0;\n\n  ///\n  // Sets the value at the specified index as type bool. Returns true if the\n  // value was set successfully.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual bool SetBool(int index, bool value) =0;\n\n  ///\n  // Sets the value at the specified index as type int. Returns true if the\n  // value was set successfully.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual bool SetInt(int index, int value) =0;\n\n  ///\n  // Sets the value at the specified index as type double. Returns true if the\n  // value was set successfully.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual bool SetDouble(int index, double value) =0;\n\n  ///\n  // Sets the value at the specified index as type string. Returns true if the\n  // value was set successfully.\n  ///\n  /*--cef(optional_param=value,index_param=index)--*/\n  virtual bool SetString(int index, const CefString& value) =0;\n\n  ///\n  // Sets the value at the specified index as type binary. Returns true if the\n  // value was set successfully. If |value| is currently owned by another object\n  // then the value will be copied and the |value| reference will not change.\n  // Otherwise, ownership will be transferred to this object and the |value|\n  // reference will be invalidated.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual bool SetBinary(int index, CefRefPtr<CefBinaryValue> value) =0;\n\n  ///\n  // Sets the value at the specified index as type dict. Returns true if the\n  // value was set successfully. If |value| is currently owned by another object\n  // then the value will be copied and the |value| reference will not change.\n  // Otherwise, ownership will be transferred to this object and the |value|\n  // reference will be invalidated.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual bool SetDictionary(int index, CefRefPtr<CefDictionaryValue> value) =0;\n\n  ///\n  // Sets the value at the specified index as type list. Returns true if the\n  // value was set successfully. If |value| is currently owned by another object\n  // then the value will be copied and the |value| reference will not change.\n  // Otherwise, ownership will be transferred to this object and the |value|\n  // reference will be invalidated.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual bool SetList(int index, CefRefPtr<CefListValue> value) =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_VALUES_H_\n"
  },
  {
    "path": "CEF/include/cef_version.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// This file is generated by the make_version_header.py tool.\n//\n\n#ifndef CEF_INCLUDE_CEF_VERSION_H_\n#define CEF_INCLUDE_CEF_VERSION_H_\n\n#define CEF_VERSION \"3.2704.1434.gec3e9ed\"\n#define CEF_VERSION_MAJOR 3\n#define CEF_COMMIT_NUMBER 1434\n#define CEF_COMMIT_HASH \"ec3e9ed7fecc0d9f37a96951ba1bb26fd4f64dc7\"\n#define COPYRIGHT_YEAR 2016\n\n#define CHROME_VERSION_MAJOR 51\n#define CHROME_VERSION_MINOR 0\n#define CHROME_VERSION_BUILD 2704\n#define CHROME_VERSION_PATCH 103\n\n#define DO_MAKE_STRING(p) #p\n#define MAKE_STRING(p) DO_MAKE_STRING(p)\n\n#ifndef APSTUDIO_HIDDEN_SYMBOLS\n\n#include \"include/internal/cef_export.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// The API hash is created by analyzing CEF header files for C API type\n// definitions. The hash value will change when header files are modified\n// in a way that may cause binary incompatibility with other builds. The\n// universal hash value will change if any platform is affected whereas the\n// platform hash values will change only if that particular platform is\n// affected.\n#define CEF_API_HASH_UNIVERSAL \"a4358963bc66adefedbf3008a83007e89afffab9\"\n#if defined(OS_WIN)\n#define CEF_API_HASH_PLATFORM \"770131916655f914b4659d82ef08993bf9cfdc22\"\n#elif defined(OS_MACOSX)\n#define CEF_API_HASH_PLATFORM \"95517cba92239cc69c4267a649c6dad0781f245c\"\n#elif defined(OS_LINUX)\n#define CEF_API_HASH_PLATFORM \"5963da3614d469320c9cc726ce7d838280132c26\"\n#endif\n\n// Returns CEF version information for the libcef library. The |entry|\n// parameter describes which version component will be returned:\n// 0 - CEF_VERSION_MAJOR\n// 1 - CEF_COMMIT_NUMBER\n// 2 - CHROME_VERSION_MAJOR\n// 3 - CHROME_VERSION_MINOR\n// 4 - CHROME_VERSION_BUILD\n// 5 - CHROME_VERSION_PATCH\n///\nCEF_EXPORT int cef_version_info(int entry);\n\n///\n// Returns CEF API hashes for the libcef library. The returned string is owned\n// by the library and should not be freed. The |entry| parameter describes which\n// hash value will be returned:\n// 0 - CEF_API_HASH_PLATFORM\n// 1 - CEF_API_HASH_UNIVERSAL\n// 2 - CEF_COMMIT_HASH\n///\nCEF_EXPORT const char* cef_api_hash(int entry);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // APSTUDIO_HIDDEN_SYMBOLS\n\n#endif  // CEF_INCLUDE_CEF_VERSION_H_\n"
  },
  {
    "path": "CEF/include/cef_web_plugin.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_WEB_PLUGIN_H_\n#define CEF_INCLUDE_CEF_WEB_PLUGIN_H_\n\n#include \"include/cef_base.h\"\n\nclass CefBrowser;\n\n///\n// Information about a specific web plugin.\n///\n/*--cef(source=library)--*/\nclass CefWebPluginInfo : public virtual CefBase {\n public:\n  ///\n  // Returns the plugin name (i.e. Flash).\n  ///\n  /*--cef()--*/\n  virtual CefString GetName() =0;\n\n  ///\n  // Returns the plugin file path (DLL/bundle/library).\n  ///\n  /*--cef()--*/\n  virtual CefString GetPath() =0;\n\n  ///\n  // Returns the version of the plugin (may be OS-specific).\n  ///\n  /*--cef()--*/\n  virtual CefString GetVersion() =0;\n\n  ///\n  // Returns a description of the plugin from the version information.\n  ///\n  /*--cef()--*/\n  virtual CefString GetDescription() =0;\n};\n\n///\n// Interface to implement for visiting web plugin information. The methods of\n// this class will be called on the browser process UI thread.\n///\n/*--cef(source=client)--*/\nclass CefWebPluginInfoVisitor : public virtual CefBase {\n public:\n  ///\n  // Method that will be called once for each plugin. |count| is the 0-based\n  // index for the current plugin. |total| is the total number of plugins.\n  // Return false to stop visiting plugins. This method may never be called if\n  // no plugins are found.\n  ///\n  /*--cef()--*/\n  virtual bool Visit(CefRefPtr<CefWebPluginInfo> info, int count, int total) =0;\n};\n\n///\n// Visit web plugin information. Can be called on any thread in the browser\n// process.\n///\n/*--cef()--*/\nvoid CefVisitWebPluginInfo(CefRefPtr<CefWebPluginInfoVisitor> visitor);\n\n///\n// Cause the plugin list to refresh the next time it is accessed regardless\n// of whether it has already been loaded. Can be called on any thread in the\n// browser process.\n///\n/*--cef()--*/\nvoid CefRefreshWebPlugins();\n\n///\n// Unregister an internal plugin. This may be undone the next time\n// CefRefreshWebPlugins() is called. Can be called on any thread in the browser\n// process.\n///\n/*--cef()--*/\nvoid CefUnregisterInternalWebPlugin(const CefString& path);\n\n///\n// Register a plugin crash. Can be called on any thread in the browser process\n// but will be executed on the IO thread.\n///\n/*--cef()--*/\nvoid CefRegisterWebPluginCrash(const CefString& path);\n\n///\n// Interface to implement for receiving unstable plugin information. The methods\n// of this class will be called on the browser process IO thread.\n///\n/*--cef(source=client)--*/\nclass CefWebPluginUnstableCallback : public virtual CefBase {\n public:\n  ///\n  // Method that will be called for the requested plugin. |unstable| will be\n  // true if the plugin has reached the crash count threshold of 3 times in 120\n  // seconds.\n  ///\n  /*--cef()--*/\n  virtual void IsUnstable(const CefString& path,\n                          bool unstable) =0;\n};\n\n///\n// Query if a plugin is unstable. Can be called on any thread in the browser\n// process.\n///\n/*--cef()--*/\nvoid CefIsWebPluginUnstable(const CefString& path,\n                            CefRefPtr<CefWebPluginUnstableCallback> callback);\n\n\n#endif  // CEF_INCLUDE_CEF_WEB_PLUGIN_H_\n"
  },
  {
    "path": "CEF/include/cef_xml_reader.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_XML_READER_H_\n#define CEF_INCLUDE_CEF_XML_READER_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n#include \"include/cef_stream.h\"\n\n///\n// Class that supports the reading of XML data via the libxml streaming API.\n// The methods of this class should only be called on the thread that creates\n// the object.\n///\n/*--cef(source=library)--*/\nclass CefXmlReader : public virtual CefBase {\n public:\n  typedef cef_xml_encoding_type_t EncodingType;\n  typedef cef_xml_node_type_t NodeType;\n\n  ///\n  // Create a new CefXmlReader object. The returned object's methods can only\n  // be called from the thread that created the object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefXmlReader> Create(CefRefPtr<CefStreamReader> stream,\n                                        EncodingType encodingType,\n                                        const CefString& URI);\n\n  ///\n  // Moves the cursor to the next node in the document. This method must be\n  // called at least once to set the current cursor position. Returns true if\n  // the cursor position was set successfully.\n  ///\n  /*--cef()--*/\n  virtual bool MoveToNextNode() =0;\n\n  ///\n  // Close the document. This should be called directly to ensure that cleanup\n  // occurs on the correct thread.\n  ///\n  /*--cef()--*/\n  virtual bool Close() =0;\n\n  ///\n  // Returns true if an error has been reported by the XML parser.\n  ///\n  /*--cef()--*/\n  virtual bool HasError() =0;\n\n  ///\n  // Returns the error string.\n  ///\n  /*--cef()--*/\n  virtual CefString GetError() =0;\n\n\n  // The below methods retrieve data for the node at the current cursor\n  // position.\n\n  ///\n  // Returns the node type.\n  ///\n  /*--cef(default_retval=XML_NODE_UNSUPPORTED)--*/\n  virtual NodeType GetType() =0;\n\n  ///\n  // Returns the node depth. Depth starts at 0 for the root node.\n  ///\n  /*--cef()--*/\n  virtual int GetDepth() =0;\n\n  ///\n  // Returns the local name. See\n  // http://www.w3.org/TR/REC-xml-names/#NT-LocalPart for additional details.\n  ///\n  /*--cef()--*/\n  virtual CefString GetLocalName() =0;\n\n  ///\n  // Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for\n  // additional details.\n  ///\n  /*--cef()--*/\n  virtual CefString GetPrefix() =0;\n\n  ///\n  // Returns the qualified name, equal to (Prefix:)LocalName. See\n  // http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details.\n  ///\n  /*--cef()--*/\n  virtual CefString GetQualifiedName() =0;\n\n  ///\n  // Returns the URI defining the namespace associated with the node. See\n  // http://www.w3.org/TR/REC-xml-names/ for additional details.\n  ///\n  /*--cef()--*/\n  virtual CefString GetNamespaceURI() =0;\n\n  ///\n  // Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for\n  // additional details.\n  ///\n  /*--cef()--*/\n  virtual CefString GetBaseURI() =0;\n\n  ///\n  // Returns the xml:lang scope within which the node resides. See\n  // http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details.\n  ///\n  /*--cef()--*/\n  virtual CefString GetXmlLang() =0;\n\n  ///\n  // Returns true if the node represents an empty element. <a/> is considered\n  // empty but <a></a> is not.\n  ///\n  /*--cef()--*/\n  virtual bool IsEmptyElement() =0;\n\n  ///\n  // Returns true if the node has a text value.\n  ///\n  /*--cef()--*/\n  virtual bool HasValue() =0;\n\n  ///\n  // Returns the text value.\n  ///\n  /*--cef()--*/\n  virtual CefString GetValue() =0;\n\n  ///\n  // Returns true if the node has attributes.\n  ///\n  /*--cef()--*/\n  virtual bool HasAttributes() =0;\n\n  ///\n  // Returns the number of attributes.\n  ///\n  /*--cef()--*/\n  virtual size_t GetAttributeCount() =0;\n\n  ///\n  // Returns the value of the attribute at the specified 0-based index.\n  ///\n  /*--cef(capi_name=get_attribute_byindex,index_param=index)--*/\n  virtual CefString GetAttribute(int index) =0;\n\n  ///\n  // Returns the value of the attribute with the specified qualified name.\n  ///\n  /*--cef(capi_name=get_attribute_byqname)--*/\n  virtual CefString GetAttribute(const CefString& qualifiedName) =0;\n\n  ///\n  // Returns the value of the attribute with the specified local name and\n  // namespace URI.\n  ///\n  /*--cef(capi_name=get_attribute_bylname)--*/\n  virtual CefString GetAttribute(const CefString& localName,\n                                 const CefString& namespaceURI) =0;\n\n  ///\n  // Returns an XML representation of the current node's children.\n  ///\n  /*--cef()--*/\n  virtual CefString GetInnerXml() =0;\n\n  ///\n  // Returns an XML representation of the current node including its children.\n  ///\n  /*--cef()--*/\n  virtual CefString GetOuterXml() =0;\n\n  ///\n  // Returns the line number for the current node.\n  ///\n  /*--cef()--*/\n  virtual int GetLineNumber() =0;\n\n\n  // Attribute nodes are not traversed by default. The below methods can be\n  // used to move the cursor to an attribute node. MoveToCarryingElement() can\n  // be called afterwards to return the cursor to the carrying element. The\n  // depth of an attribute node will be 1 + the depth of the carrying element.\n\n  ///\n  // Moves the cursor to the attribute at the specified 0-based index. Returns\n  // true if the cursor position was set successfully.\n  ///\n  /*--cef(capi_name=move_to_attribute_byindex,index_param=index)--*/\n  virtual bool MoveToAttribute(int index) =0;\n\n  ///\n  // Moves the cursor to the attribute with the specified qualified name.\n  // Returns true if the cursor position was set successfully.\n  ///\n  /*--cef(capi_name=move_to_attribute_byqname)--*/\n  virtual bool MoveToAttribute(const CefString& qualifiedName) =0;\n\n  ///\n  // Moves the cursor to the attribute with the specified local name and\n  // namespace URI. Returns true if the cursor position was set successfully.\n  ///\n  /*--cef(capi_name=move_to_attribute_bylname)--*/\n  virtual bool MoveToAttribute(const CefString& localName,\n                               const CefString& namespaceURI) =0;\n\n  ///\n  // Moves the cursor to the first attribute in the current element. Returns\n  // true if the cursor position was set successfully.\n  ///\n  /*--cef()--*/\n  virtual bool MoveToFirstAttribute() =0;\n\n  ///\n  // Moves the cursor to the next attribute in the current element. Returns\n  // true if the cursor position was set successfully.\n  ///\n  /*--cef()--*/\n  virtual bool MoveToNextAttribute() =0;\n\n  ///\n  // Moves the cursor back to the carrying element. Returns true if the cursor\n  // position was set successfully.\n  ///\n  /*--cef()--*/\n  virtual bool MoveToCarryingElement() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_XML_READER_H_\n"
  },
  {
    "path": "CEF/include/cef_zip_reader.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_CEF_ZIP_READER_H_\n#define CEF_INCLUDE_CEF_ZIP_READER_H_\n\n#include \"include/cef_base.h\"\n#include \"include/cef_stream.h\"\n\n///\n// Class that supports the reading of zip archives via the zlib unzip API.\n// The methods of this class should only be called on the thread that creates\n// the object.\n///\n/*--cef(source=library)--*/\nclass CefZipReader : public virtual CefBase {\n public:\n  ///\n  // Create a new CefZipReader object. The returned object's methods can only\n  // be called from the thread that created the object.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefZipReader> Create(CefRefPtr<CefStreamReader> stream);\n\n  ///\n  // Moves the cursor to the first file in the archive. Returns true if the\n  // cursor position was set successfully.\n  ///\n  /*--cef()--*/\n  virtual bool MoveToFirstFile() =0;\n\n  ///\n  // Moves the cursor to the next file in the archive. Returns true if the\n  // cursor position was set successfully.\n  ///\n  /*--cef()--*/\n  virtual bool MoveToNextFile() =0;\n\n  ///\n  // Moves the cursor to the specified file in the archive. If |caseSensitive|\n  // is true then the search will be case sensitive. Returns true if the cursor\n  // position was set successfully.\n  ///\n  /*--cef()--*/\n  virtual bool MoveToFile(const CefString& fileName, bool caseSensitive) =0;\n\n  ///\n  // Closes the archive. This should be called directly to ensure that cleanup\n  // occurs on the correct thread.\n  ///\n  /*--cef()--*/\n  virtual bool Close() =0;\n\n\n  // The below methods act on the file at the current cursor position.\n\n  ///\n  // Returns the name of the file.\n  ///\n  /*--cef()--*/\n  virtual CefString GetFileName() =0;\n\n  ///\n  // Returns the uncompressed size of the file.\n  ///\n  /*--cef()--*/\n  virtual int64 GetFileSize() =0;\n\n  ///\n  // Returns the last modified timestamp for the file.\n  ///\n  /*--cef()--*/\n  virtual CefTime GetFileLastModified() =0;\n\n  ///\n  // Opens the file for reading of uncompressed data. A read password may\n  // optionally be specified.\n  ///\n  /*--cef(optional_param=password)--*/\n  virtual bool OpenFile(const CefString& password) =0;\n\n  ///\n  // Closes the file.\n  ///\n  /*--cef()--*/\n  virtual bool CloseFile() =0;\n\n  ///\n  // Read uncompressed file contents into the specified buffer. Returns < 0 if\n  // an error occurred, 0 if at the end of file, or the number of bytes read.\n  ///\n  /*--cef()--*/\n  virtual int ReadFile(void* buffer, size_t bufferSize) =0;\n\n  ///\n  // Returns the current offset in the uncompressed file contents.\n  ///\n  /*--cef()--*/\n  virtual int64 Tell() =0;\n\n  ///\n  // Returns true if at end of the file contents.\n  ///\n  /*--cef()--*/\n  virtual bool Eof() =0;\n};\n\n#endif  // CEF_INCLUDE_CEF_ZIP_READER_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_export.h",
    "content": "// Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights\n// reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_\n#define CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_\n#pragma once\n\n#include \"include/base/cef_build.h\"\n\n#if defined(COMPILER_MSVC)\n\n#ifdef BUILDING_CEF_SHARED\n#define CEF_EXPORT __declspec(dllexport)\n#elif USING_CEF_SHARED\n#define CEF_EXPORT __declspec(dllimport)\n#else\n#define CEF_EXPORT\n#endif\n#define CEF_CALLBACK __stdcall\n\n#elif defined(COMPILER_GCC)\n\n#define CEF_EXPORT __attribute__ ((visibility(\"default\")))\n#define CEF_CALLBACK\n\n#endif  // COMPILER_GCC\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_logging_internal.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_\n#define CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_\n#pragma once\n\n#include \"include/internal/cef_export.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// See include/base/cef_logging.h for macros and intended usage.\n\n///\n// Gets the current log level.\n///\nCEF_EXPORT int cef_get_min_log_level();\n\n///\n// Gets the current vlog level for the given file (usually taken from\n// __FILE__). Note that |N| is the size *with* the null terminator.\n///\nCEF_EXPORT int cef_get_vlog_level(const char* file_start, size_t N);\n\n///\n// Add a log message. See the LogSeverity defines for supported |severity|\n// values.\n///\nCEF_EXPORT void cef_log(const char* file,\n                        int line,\n                        int severity,\n                        const char* message);\n\n#ifdef __cplusplus\n}\n#endif  // __cplusplus\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_ptr.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_PTR_H_\n#define CEF_INCLUDE_INTERNAL_CEF_PTR_H_\n#pragma once\n\n#include \"include/base/cef_ref_counted.h\"\n\n///\n// Smart pointer implementation that is an alias of scoped_refptr from\n// include/base/cef_ref_counted.h.\n// <p>\n// A smart pointer class for reference counted objects.  Use this class instead\n// of calling AddRef and Release manually on a reference counted object to\n// avoid common memory leaks caused by forgetting to Release an object\n// reference.  Sample usage:\n// <pre>\n//   class MyFoo : public CefBase {\n//    ...\n//   };\n//\n//   void some_function() {\n//     // The MyFoo object that |foo| represents starts with a single\n//     // reference.\n//     CefRefPtr&lt;MyFoo&gt; foo = new MyFoo();\n//     foo-&gt;Method(param);\n//     // |foo| is released when this function returns\n//   }\n//\n//   void some_other_function() {\n//     CefRefPtr&lt;MyFoo&gt; foo = new MyFoo();\n//     ...\n//     foo = NULL;  // explicitly releases |foo|\n//     ...\n//     if (foo)\n//       foo-&gt;Method(param);\n//   }\n// </pre>\n// The above examples show how CefRefPtr&lt;T&gt; acts like a pointer to T.\n// Given two CefRefPtr&lt;T&gt; classes, it is also possible to exchange\n// references between the two objects, like so:\n// <pre>\n//   {\n//     CefRefPtr&lt;MyFoo&gt; a = new MyFoo();\n//     CefRefPtr&lt;MyFoo&gt; b;\n//\n//     b.swap(a);\n//     // now, |b| references the MyFoo object, and |a| references NULL.\n//   }\n// </pre>\n// To make both |a| and |b| in the above example reference the same MyFoo\n// object, simply use the assignment operator:\n// <pre>\n//   {\n//     CefRefPtr&lt;MyFoo&gt; a = new MyFoo();\n//     CefRefPtr&lt;MyFoo&gt; b;\n//\n//     b = a;\n//     // now, |a| and |b| each own a reference to the same MyFoo object.\n//     // the reference count of the underlying MyFoo object will be 2.\n//   }\n// </pre>\n// Reference counted objects can also be passed as function parameters and\n// used as function return values:\n// <pre>\n//   void some_func_with_param(CefRefPtr&lt;MyFoo&gt; param) {\n//     // A reference is added to the MyFoo object that |param| represents\n//     // during the scope of some_func_with_param() and released when\n//     // some_func_with_param() goes out of scope.\n//   }\n//\n//   CefRefPtr&lt;MyFoo&gt; some_func_with_retval() {\n//     // The MyFoo object that |foox| represents starts with a single\n//     // reference.\n//     CefRefPtr&lt;MyFoo&gt; foox = new MyFoo();\n//\n//     // Creating the return value adds an additional reference.\n//     return foox;\n//\n//     // When some_func_with_retval() goes out of scope the original |foox|\n//     // reference is released.\n//   }\n//\n//   void and_another_function() {\n//     CefRefPtr&lt;MyFoo&gt; foo = new MyFoo();\n//\n//     // pass |foo| as a parameter.\n//     some_function(foo);\n//\n//     CefRefPtr&lt;MyFoo&gt; foo2 = some_func_with_retval();\n//     // Now, since we kept a reference to the some_func_with_retval() return\n//     // value, |foo2| is the only class pointing to the MyFoo object created\n//     in some_func_with_retval(), and it has a reference count of 1.\n//\n//     some_func_with_retval();\n//     // Now, since we didn't keep a reference to the some_func_with_retval()\n//     // return value, the MyFoo object created in some_func_with_retval()\n//     // will automatically be released.\n//   }\n// </pre>\n// And in standard containers:\n// <pre>\n//   {\n//      // Create a vector that holds MyFoo objects.\n//      std::vector&lt;CefRefPtr&lt;MyFoo&gt; &gt; MyFooVec;\n//\n//     // The MyFoo object that |foo| represents starts with a single\n//     // reference.\n//     CefRefPtr&lt;MyFoo&gt; foo = new MyFoo();\n//\n//     // When the MyFoo object is added to |MyFooVec| the reference count\n//     // is increased to 2.\n//     MyFooVec.push_back(foo);\n//   }\n// </pre>\n// </p>\n///\ntemplate <class T>\nclass CefRefPtr : public scoped_refptr<T> {\n public:\n  typedef scoped_refptr<T> parent;\n\n  CefRefPtr() : parent() {}\n\n  CefRefPtr(T* p) : parent(p) {}\n\n  CefRefPtr(const scoped_refptr<T>& r) : parent(r) {}\n\n  template <typename U>\n  CefRefPtr(const scoped_refptr<U>& r) : parent(r) {}\n};\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_PTR_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_string.h",
    "content": "// Copyright (c) 2010 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_H_\n#define CEF_INCLUDE_INTERNAL_CEF_STRING_H_\n#pragma once\n\n// The CEF interface is built with one string type as the default. Comment out\n// all but one of the CEF_STRING_TYPE_* defines below to specify the default.\n// If you change the default you MUST recompile all of CEF.\n\n// Build with the UTF8 string type as default.\n// #define CEF_STRING_TYPE_UTF8 1\n\n// Build with the UTF16 string type as default.\n#define CEF_STRING_TYPE_UTF16 1\n\n// Build with the wide string type as default.\n// #define CEF_STRING_TYPE_WIDE 1\n\n\n#include \"include/internal/cef_string_types.h\"\n\n#ifdef __cplusplus\n#include \"include/internal/cef_string_wrappers.h\"\n#if defined(CEF_STRING_TYPE_UTF16)\ntypedef CefStringUTF16 CefString;\n#elif defined(CEF_STRING_TYPE_UTF8)\ntypedef CefStringUTF8 CefString;\n#elif defined(CEF_STRING_TYPE_WIDE)\ntypedef CefStringWide CefString;\n#endif\n#endif  // __cplusplus\n\n#if defined(CEF_STRING_TYPE_UTF8)\ntypedef char cef_char_t;\ntypedef cef_string_utf8_t cef_string_t;\ntypedef cef_string_userfree_utf8_t cef_string_userfree_t;\n#define cef_string_set cef_string_utf8_set\n#define cef_string_copy cef_string_utf8_copy\n#define cef_string_clear cef_string_utf8_clear\n#define cef_string_userfree_alloc cef_string_userfree_utf8_alloc\n#define cef_string_userfree_free cef_string_userfree_utf8_free\n#define cef_string_from_ascii cef_string_utf8_copy\n#define cef_string_to_utf8 cef_string_utf8_copy\n#define cef_string_from_utf8 cef_string_utf8_copy\n#define cef_string_to_utf16 cef_string_utf8_to_utf16\n#define cef_string_from_utf16 cef_string_utf16_to_utf8\n#define cef_string_to_wide cef_string_utf8_to_wide\n#define cef_string_from_wide cef_string_wide_to_utf8\n#elif defined(CEF_STRING_TYPE_UTF16)\ntypedef char16 cef_char_t;\ntypedef cef_string_userfree_utf16_t cef_string_userfree_t;\ntypedef cef_string_utf16_t cef_string_t;\n#define cef_string_set cef_string_utf16_set\n#define cef_string_copy cef_string_utf16_copy\n#define cef_string_clear cef_string_utf16_clear\n#define cef_string_userfree_alloc cef_string_userfree_utf16_alloc\n#define cef_string_userfree_free cef_string_userfree_utf16_free\n#define cef_string_from_ascii cef_string_ascii_to_utf16\n#define cef_string_to_utf8 cef_string_utf16_to_utf8\n#define cef_string_from_utf8 cef_string_utf8_to_utf16\n#define cef_string_to_utf16 cef_string_utf16_copy\n#define cef_string_from_utf16 cef_string_utf16_copy\n#define cef_string_to_wide cef_string_utf16_to_wide\n#define cef_string_from_wide cef_string_wide_to_utf16\n#elif defined(CEF_STRING_TYPE_WIDE)\ntypedef wchar_t cef_char_t;\ntypedef cef_string_wide_t cef_string_t;\ntypedef cef_string_userfree_wide_t cef_string_userfree_t;\n#define cef_string_set cef_string_wide_set\n#define cef_string_copy cef_string_wide_copy\n#define cef_string_clear cef_string_wide_clear\n#define cef_string_userfree_alloc cef_string_userfree_wide_alloc\n#define cef_string_userfree_free cef_string_userfree_wide_free\n#define cef_string_from_ascii cef_string_ascii_to_wide\n#define cef_string_to_utf8 cef_string_wide_to_utf8\n#define cef_string_from_utf8 cef_string_utf8_to_wide\n#define cef_string_to_utf16 cef_string_wide_to_utf16\n#define cef_string_from_utf16 cef_string_utf16_to_wide\n#define cef_string_to_wide cef_string_wide_copy\n#define cef_string_from_wide cef_string_wide_copy\n#else\n#error Please choose a string type.\n#endif\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_STRING_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_string_list.h",
    "content": "// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_\n#define CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_\n#pragma once\n\n#include \"include/internal/cef_export.h\"\n#include \"include/internal/cef_string.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n///\n// CEF string maps are a set of key/value string pairs.\n///\ntypedef void* cef_string_list_t;\n\n///\n// Allocate a new string map.\n///\nCEF_EXPORT cef_string_list_t cef_string_list_alloc();\n\n///\n// Return the number of elements in the string list.\n///\nCEF_EXPORT int cef_string_list_size(cef_string_list_t list);\n\n///\n// Retrieve the value at the specified zero-based string list index. Returns\n// true (1) if the value was successfully retrieved.\n///\nCEF_EXPORT int cef_string_list_value(cef_string_list_t list,\n                                     int index, cef_string_t* value);\n\n///\n// Append a new value at the end of the string list.\n///\nCEF_EXPORT void cef_string_list_append(cef_string_list_t list,\n                                       const cef_string_t* value);\n\n///\n// Clear the string list.\n///\nCEF_EXPORT void cef_string_list_clear(cef_string_list_t list);\n\n///\n// Free the string list.\n///\nCEF_EXPORT void cef_string_list_free(cef_string_list_t list);\n\n///\n// Creates a copy of an existing string list.\n///\nCEF_EXPORT cef_string_list_t cef_string_list_copy(cef_string_list_t list);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_string_map.h",
    "content": "// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_\n#define CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_\n#pragma once\n\n#include \"include/internal/cef_export.h\"\n#include \"include/internal/cef_string.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n///\n// CEF string maps are a set of key/value string pairs.\n///\ntypedef void* cef_string_map_t;\n\n///\n// Allocate a new string map.\n///\nCEF_EXPORT cef_string_map_t cef_string_map_alloc();\n\n///\n// Return the number of elements in the string map.\n///\nCEF_EXPORT int cef_string_map_size(cef_string_map_t map);\n\n///\n// Return the value assigned to the specified key.\n///\nCEF_EXPORT int cef_string_map_find(cef_string_map_t map,\n                                   const cef_string_t* key,\n                                   cef_string_t* value);\n\n///\n// Return the key at the specified zero-based string map index.\n///\nCEF_EXPORT int cef_string_map_key(cef_string_map_t map, int index,\n                                  cef_string_t* key);\n\n///\n// Return the value at the specified zero-based string map index.\n///\nCEF_EXPORT int cef_string_map_value(cef_string_map_t map, int index,\n                                    cef_string_t* value);\n\n///\n// Append a new key/value pair at the end of the string map.\n///\nCEF_EXPORT int cef_string_map_append(cef_string_map_t map,\n                                     const cef_string_t* key,\n                                     const cef_string_t* value);\n\n///\n// Clear the string map.\n///\nCEF_EXPORT void cef_string_map_clear(cef_string_map_t map);\n\n///\n// Free the string map.\n///\nCEF_EXPORT void cef_string_map_free(cef_string_map_t map);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_string_multimap.h",
    "content": "// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_\n#define CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_\n#pragma once\n\n#include \"include/internal/cef_export.h\"\n#include \"include/internal/cef_string.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n///\n// CEF string multimaps are a set of key/value string pairs.\n// More than one value can be assigned to a single key.\n///\ntypedef void* cef_string_multimap_t;\n\n///\n// Allocate a new string multimap.\n///\nCEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc();\n\n///\n// Return the number of elements in the string multimap.\n///\nCEF_EXPORT int cef_string_multimap_size(cef_string_multimap_t map);\n\n///\n// Return the number of values with the specified key.\n///\nCEF_EXPORT int cef_string_multimap_find_count(cef_string_multimap_t map,\n                                              const cef_string_t* key);\n\n///\n// Return the value_index-th value with the specified key.\n///\nCEF_EXPORT int cef_string_multimap_enumerate(cef_string_multimap_t map,\n                                             const cef_string_t* key,\n                                             int value_index,\n                                             cef_string_t* value);\n\n///\n// Return the key at the specified zero-based string multimap index.\n///\nCEF_EXPORT int cef_string_multimap_key(cef_string_multimap_t map, int index,\n                                       cef_string_t* key);\n\n///\n// Return the value at the specified zero-based string multimap index.\n///\nCEF_EXPORT int cef_string_multimap_value(cef_string_multimap_t map, int index,\n                                         cef_string_t* value);\n\n///\n// Append a new key/value pair at the end of the string multimap.\n///\nCEF_EXPORT int cef_string_multimap_append(cef_string_multimap_t map,\n                                          const cef_string_t* key,\n                                          const cef_string_t* value);\n\n///\n// Clear the string multimap.\n///\nCEF_EXPORT void cef_string_multimap_clear(cef_string_multimap_t map);\n\n///\n// Free the string multimap.\n///\nCEF_EXPORT void cef_string_multimap_free(cef_string_multimap_t map);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_string_types.h",
    "content": "// Copyright (c) 2010 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_TYPES_H_\n#define CEF_INCLUDE_INTERNAL_CEF_STRING_TYPES_H_\n#pragma once\n\n// CEF provides functions for converting between UTF-8, -16 and -32 strings.\n// CEF string types are safe for reading from multiple threads but not for\n// modification. It is the user's responsibility to provide synchronization if\n// modifying CEF strings from multiple threads.\n\n#include <stddef.h>\n\n#include \"include/base/cef_basictypes.h\"\n#include \"include/internal/cef_export.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// CEF string type definitions. Whomever allocates |str| is responsible for\n// providing an appropriate |dtor| implementation that will free the string in\n// the same memory space. When reusing an existing string structure make sure\n// to call |dtor| for the old value before assigning new |str| and |dtor|\n// values. Static strings will have a NULL |dtor| value. Using the below\n// functions if you want this managed for you.\n\ntypedef struct _cef_string_wide_t {\n  wchar_t* str;\n  size_t length;\n  void (*dtor)(wchar_t* str);\n} cef_string_wide_t;\n\ntypedef struct _cef_string_utf8_t {\n  char* str;\n  size_t length;\n  void (*dtor)(char* str);\n} cef_string_utf8_t;\n\ntypedef struct _cef_string_utf16_t {\n  char16* str;\n  size_t length;\n  void (*dtor)(char16* str);\n} cef_string_utf16_t;\n\n\n///\n// These functions set string values. If |copy| is true (1) the value will be\n// copied instead of referenced. It is up to the user to properly manage\n// the lifespan of references.\n///\n\nCEF_EXPORT int cef_string_wide_set(const wchar_t* src, size_t src_len,\n                                   cef_string_wide_t* output, int copy);\nCEF_EXPORT int cef_string_utf8_set(const char* src, size_t src_len,\n                                   cef_string_utf8_t* output, int copy);\nCEF_EXPORT int cef_string_utf16_set(const char16* src, size_t src_len,\n                                    cef_string_utf16_t* output, int copy);\n\n\n///\n// Convenience macros for copying values.\n///\n\n#define cef_string_wide_copy(src, src_len, output)  \\\n    cef_string_wide_set(src, src_len, output, true)\n#define cef_string_utf8_copy(src, src_len, output)  \\\n    cef_string_utf8_set(src, src_len, output, true)\n#define cef_string_utf16_copy(src, src_len, output)  \\\n    cef_string_utf16_set(src, src_len, output, true)\n\n\n///\n// These functions clear string values. The structure itself is not freed.\n///\n\nCEF_EXPORT void cef_string_wide_clear(cef_string_wide_t* str);\nCEF_EXPORT void cef_string_utf8_clear(cef_string_utf8_t* str);\nCEF_EXPORT void cef_string_utf16_clear(cef_string_utf16_t* str);\n\n\n///\n// These functions compare two string values with the same results as strcmp().\n///\n\nCEF_EXPORT int cef_string_wide_cmp(const cef_string_wide_t* str1,\n                                   const cef_string_wide_t* str2);\nCEF_EXPORT int cef_string_utf8_cmp(const cef_string_utf8_t* str1,\n                                   const cef_string_utf8_t* str2);\nCEF_EXPORT int cef_string_utf16_cmp(const cef_string_utf16_t* str1,\n                                    const cef_string_utf16_t* str2);\n\n\n///\n// These functions convert between UTF-8, -16, and -32 strings. They are\n// potentially slow so unnecessary conversions should be avoided. The best\n// possible result will always be written to |output| with the boolean return\n// value indicating whether the conversion is 100% valid.\n///\n\nCEF_EXPORT int cef_string_wide_to_utf8(const wchar_t* src, size_t src_len,\n                                       cef_string_utf8_t* output);\nCEF_EXPORT int cef_string_utf8_to_wide(const char* src, size_t src_len,\n                                       cef_string_wide_t* output);\n\nCEF_EXPORT int cef_string_wide_to_utf16(const wchar_t* src, size_t src_len,\n                                        cef_string_utf16_t* output);\nCEF_EXPORT int cef_string_utf16_to_wide(const char16* src, size_t src_len,\n                                        cef_string_wide_t* output);\n\nCEF_EXPORT int cef_string_utf8_to_utf16(const char* src, size_t src_len,\n                                        cef_string_utf16_t* output);\nCEF_EXPORT int cef_string_utf16_to_utf8(const char16* src, size_t src_len,\n                                        cef_string_utf8_t* output);\n\n\n///\n// These functions convert an ASCII string, typically a hardcoded constant, to a\n// Wide/UTF16 string. Use instead of the UTF8 conversion routines if you know\n// the string is ASCII.\n///\n\nCEF_EXPORT int cef_string_ascii_to_wide(const char* src, size_t src_len,\n                                        cef_string_wide_t* output);\nCEF_EXPORT int cef_string_ascii_to_utf16(const char* src, size_t src_len,\n                                         cef_string_utf16_t* output);\n\n\n\n///\n// It is sometimes necessary for the system to allocate string structures with\n// the expectation that the user will free them. The userfree types act as a\n// hint that the user is responsible for freeing the structure.\n///\n\ntypedef cef_string_wide_t* cef_string_userfree_wide_t;\ntypedef cef_string_utf8_t* cef_string_userfree_utf8_t;\ntypedef cef_string_utf16_t* cef_string_userfree_utf16_t;\n\n\n///\n// These functions allocate a new string structure. They must be freed by\n// calling the associated free function.\n///\n\nCEF_EXPORT cef_string_userfree_wide_t cef_string_userfree_wide_alloc();\nCEF_EXPORT cef_string_userfree_utf8_t cef_string_userfree_utf8_alloc();\nCEF_EXPORT cef_string_userfree_utf16_t cef_string_userfree_utf16_alloc();\n\n\n///\n// These functions free the string structure allocated by the associated\n// alloc function. Any string contents will first be cleared.\n///\n\nCEF_EXPORT void cef_string_userfree_wide_free(cef_string_userfree_wide_t str);\nCEF_EXPORT void cef_string_userfree_utf8_free(cef_string_userfree_utf8_t str);\nCEF_EXPORT void cef_string_userfree_utf16_free(cef_string_userfree_utf16_t str);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_STRING_TYPES_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_string_wrappers.h",
    "content": "// Copyright (c) 2010 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_\n#define CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_\n#pragma once\n\n#include <memory.h>\n#include <string>\n\n#include \"include/base/cef_string16.h\"\n#include \"include/internal/cef_string_types.h\"\n\n#if defined(USING_CHROMIUM_INCLUDES)\n#include \"base/files/file_path.h\"\n#endif\n\n///\n// Traits implementation for wide character strings.\n///\nstruct CefStringTraitsWide {\n  typedef wchar_t char_type;\n  typedef cef_string_wide_t struct_type;\n  typedef cef_string_userfree_wide_t userfree_struct_type;\n\n  static inline void clear(struct_type *s) { cef_string_wide_clear(s); }\n  static inline int set(const char_type* src, size_t src_size,\n                        struct_type* output, int copy) {\n    return cef_string_wide_set(src, src_size, output, copy);\n  }\n  static inline int compare(const struct_type* s1, const struct_type* s2) {\n    return cef_string_wide_cmp(s1, s2);\n  }\n  static inline userfree_struct_type userfree_alloc() {\n    return cef_string_userfree_wide_alloc();\n  }\n  static inline void userfree_free(userfree_struct_type ufs) {\n    return cef_string_userfree_wide_free(ufs);\n  }\n\n  // Conversion methods.\n  static inline bool from_ascii(const char* str, size_t len, struct_type *s) {\n    return cef_string_ascii_to_wide(str, len, s) ? true : false;\n  }\n  static inline std::string to_string(const struct_type *s) {\n    cef_string_utf8_t cstr;\n    memset(&cstr, 0, sizeof(cstr));\n    cef_string_wide_to_utf8(s->str, s->length, &cstr);\n    std::string str;\n    if (cstr.length > 0)\n      str = std::string(cstr.str, cstr.length);\n    cef_string_utf8_clear(&cstr);\n    return str;\n  }\n  static inline bool from_string(const std::string& str, struct_type *s) {\n    return cef_string_utf8_to_wide(str.c_str(), str.length(), s) ? true : false;\n  }\n  static inline std::wstring to_wstring(const struct_type *s) {\n    return std::wstring(s->str, s->length);\n  }\n  static inline bool from_wstring(const std::wstring& str, struct_type *s) {\n    return cef_string_wide_set(str.c_str(), str.length(), s, true) ?\n        true : false;\n  }\n#if defined(WCHAR_T_IS_UTF32)\n  static inline base::string16 to_string16(const struct_type *s) {\n    cef_string_utf16_t cstr;\n    memset(&cstr, 0, sizeof(cstr));\n    cef_string_wide_to_utf16(s->str, s->length, &cstr);\n    base::string16 str;\n    if (cstr.length > 0)\n      str = base::string16(cstr.str, cstr.length);\n    cef_string_utf16_clear(&cstr);\n    return str;\n  }\n  static inline bool from_string16(const base::string16& str,\n                                         struct_type *s) {\n    return cef_string_utf16_to_wide(str.c_str(), str.length(), s) ?\n        true : false;\n  }\n#else  // WCHAR_T_IS_UTF32\n  static inline base::string16 to_string16(const struct_type *s) {\n    return base::string16(s->str, s->length);\n  }\n  static inline bool from_string16(const base::string16& str, struct_type *s) {\n    return cef_string_wide_set(str.c_str(), str.length(), s, true) ?\n        true : false;\n  }\n#endif  // WCHAR_T_IS_UTF32\n};\n\n///\n// Traits implementation for utf8 character strings.\n///\nstruct CefStringTraitsUTF8 {\n  typedef char char_type;\n  typedef cef_string_utf8_t struct_type;\n  typedef cef_string_userfree_utf8_t userfree_struct_type;\n\n  static inline void clear(struct_type *s) { cef_string_utf8_clear(s); }\n  static inline int set(const char_type* src, size_t src_size,\n                        struct_type* output, int copy) {\n    return cef_string_utf8_set(src, src_size, output, copy);\n  }\n  static inline int compare(const struct_type* s1, const struct_type* s2) {\n    return cef_string_utf8_cmp(s1, s2);\n  }\n  static inline userfree_struct_type userfree_alloc() {\n    return cef_string_userfree_utf8_alloc();\n  }\n  static inline void userfree_free(userfree_struct_type ufs) {\n    return cef_string_userfree_utf8_free(ufs);\n  }\n\n  // Conversion methods.\n  static inline bool from_ascii(const char* str, size_t len, struct_type* s) {\n    return cef_string_utf8_copy(str, len, s) ? true : false;\n  }\n  static inline std::string to_string(const struct_type* s) {\n    return std::string(s->str, s->length);\n  }\n  static inline bool from_string(const std::string& str, struct_type* s) {\n    return cef_string_utf8_copy(str.c_str(), str.length(), s) ? true : false;\n  }\n  static inline std::wstring to_wstring(const struct_type* s) {\n    cef_string_wide_t cstr;\n    memset(&cstr, 0, sizeof(cstr));\n    cef_string_utf8_to_wide(s->str, s->length, &cstr);\n    std::wstring str;\n    if (cstr.length > 0)\n      str = std::wstring(cstr.str, cstr.length);\n    cef_string_wide_clear(&cstr);\n    return str;\n  }\n  static inline bool from_wstring(const std::wstring& str, struct_type* s) {\n    return cef_string_wide_to_utf8(str.c_str(), str.length(), s) ? true : false;\n  }\n  static inline base::string16 to_string16(const struct_type* s) {\n    cef_string_utf16_t cstr;\n    memset(&cstr, 0, sizeof(cstr));\n    cef_string_utf8_to_utf16(s->str, s->length, &cstr);\n    base::string16 str;\n    if (cstr.length > 0)\n      str = base::string16(cstr.str, cstr.length);\n    cef_string_utf16_clear(&cstr);\n    return str;\n  }\n  static inline bool from_string16(const base::string16& str, struct_type* s) {\n    return cef_string_utf16_to_utf8(str.c_str(), str.length(), s) ?\n        true : false;\n  }\n};\n\n///\n// Traits implementation for utf16 character strings.\n///\nstruct CefStringTraitsUTF16 {\n  typedef char16 char_type;\n  typedef cef_string_utf16_t struct_type;\n  typedef cef_string_userfree_utf16_t userfree_struct_type;\n\n  static inline void clear(struct_type *s) { cef_string_utf16_clear(s); }\n  static inline int set(const char_type* src, size_t src_size,\n                        struct_type* output, int copy) {\n    return cef_string_utf16_set(src, src_size, output, copy);\n  }\n  static inline int compare(const struct_type* s1, const struct_type* s2) {\n    return cef_string_utf16_cmp(s1, s2);\n  }\n  static inline userfree_struct_type userfree_alloc() {\n    return cef_string_userfree_utf16_alloc();\n  }\n  static inline void userfree_free(userfree_struct_type ufs) {\n    return cef_string_userfree_utf16_free(ufs);\n  }\n\n  // Conversion methods.\n  static inline bool from_ascii(const char* str, size_t len, struct_type* s) {\n    return cef_string_ascii_to_utf16(str, len, s) ? true : false;\n  }\n  static inline std::string to_string(const struct_type* s) {\n    cef_string_utf8_t cstr;\n    memset(&cstr, 0, sizeof(cstr));\n    cef_string_utf16_to_utf8(s->str, s->length, &cstr);\n    std::string str;\n    if (cstr.length > 0)\n      str = std::string(cstr.str, cstr.length);\n    cef_string_utf8_clear(&cstr);\n    return str;\n  }\n  static inline bool from_string(const std::string& str, struct_type* s) {\n    return cef_string_utf8_to_utf16(str.c_str(), str.length(), s) ?\n        true : false;\n  }\n#if defined(WCHAR_T_IS_UTF32)\n  static inline std::wstring to_wstring(const struct_type* s) {\n    cef_string_wide_t cstr;\n    memset(&cstr, 0, sizeof(cstr));\n    cef_string_utf16_to_wide(s->str, s->length, &cstr);\n    std::wstring str;\n    if (cstr.length > 0)\n      str = std::wstring(cstr.str, cstr.length);\n    cef_string_wide_clear(&cstr);\n    return str;\n  }\n  static inline bool from_wstring(const std::wstring& str, struct_type* s) {\n    return cef_string_wide_to_utf16(str.c_str(), str.length(), s) ?\n        true : false;\n  }\n#else  // WCHAR_T_IS_UTF32\n  static inline std::wstring to_wstring(const struct_type* s) {\n    return std::wstring(s->str, s->length);\n  }\n  static inline bool from_wstring(const std::wstring& str, struct_type* s) {\n    return cef_string_utf16_set(str.c_str(), str.length(), s, true) ?\n        true : false;\n  }\n#endif  // WCHAR_T_IS_UTF32\n  static inline base::string16 to_string16(const struct_type* s) {\n    return base::string16(s->str, s->length);\n  }\n  static inline bool from_string16(const base::string16& str, struct_type* s) {\n    return cef_string_utf16_set(str.c_str(), str.length(), s, true) ?\n        true : false;\n  }\n};\n\n///\n// CEF string classes can convert between all supported string types. For\n// example, the CefStringWide class uses wchar_t as the underlying character\n// type and provides two approaches for converting data to/from a UTF8 string\n// (std::string).\n// <p>\n// 1. Implicit conversion using the assignment operator overload.\n// <pre>\n//   CefStringWide aCefString;\n//   std::string aUTF8String;\n//   aCefString = aUTF8String; // Assign std::string to CefStringWide\n//   aUTF8String = aCefString; // Assign CefStringWide to std::string\n// </pre>\n// 2. Explicit conversion using the FromString/ToString methods.\n// <pre>\n//   CefStringWide aCefString;\n//   std::string aUTF8String;\n//   aCefString.FromString(aUTF8String); // Assign std::string to CefStringWide\n//   aUTF8String = aCefString.ToString(); // Assign CefStringWide to std::string\n// </pre>\n// Conversion will only occur if the assigned value is a different string type.\n// Assigning a std::string to a CefStringUTF8, for example, will copy the data\n// without performing a conversion.\n// </p>\n// CEF string classes are safe for reading from multiple threads but not for\n// modification. It is the user's responsibility to provide synchronization if\n// modifying CEF strings from multiple threads.\n///\ntemplate <class traits>\nclass CefStringBase {\n public:\n  typedef typename traits::char_type char_type;\n  typedef typename traits::struct_type struct_type;\n  typedef typename traits::userfree_struct_type userfree_struct_type;\n\n  ///\n  // Default constructor.\n  ///\n  CefStringBase() : string_(NULL), owner_(false) {}\n\n  ///\n  // Create a new string from an existing string. Data will always be copied.\n  ///\n  CefStringBase(const CefStringBase& str)\n    : string_(NULL), owner_(false) {\n    FromString(str.c_str(), str.length(), true);\n  }\n\n  ///\n  // Create a new string from an existing std::string. Data will be always\n  // copied. Translation will occur if necessary based on the underlying string\n  // type.\n  ///\n  CefStringBase(const std::string& src)  // NOLINT(runtime/explicit)\n    : string_(NULL), owner_(false) {\n    FromString(src);\n  }\n  CefStringBase(const char* src)  // NOLINT(runtime/explicit)\n    : string_(NULL), owner_(false) {\n    if (src)\n      FromString(std::string(src));\n  }\n\n  ///\n  // Create a new string from an existing std::wstring. Data will be always\n  // copied. Translation will occur if necessary based on the underlying string\n  // type.\n  ///\n  CefStringBase(const std::wstring& src)  // NOLINT(runtime/explicit)\n    : string_(NULL), owner_(false) {\n    FromWString(src);\n  }\n  CefStringBase(const wchar_t* src)  // NOLINT(runtime/explicit)\n    : string_(NULL), owner_(false) {\n    if (src)\n      FromWString(std::wstring(src));\n  }\n\n#if defined(WCHAR_T_IS_UTF32)\n  ///\n  // Create a new string from an existing string16. Data will be always\n  // copied. Translation will occur if necessary based on the underlying string\n  // type.\n  ///\n  CefStringBase(const base::string16& src)  // NOLINT(runtime/explicit)\n    : string_(NULL), owner_(false) {\n    FromString16(src);\n  }\n  CefStringBase(const char16* src)  // NOLINT(runtime/explicit)\n    : string_(NULL), owner_(false) {\n    if (src)\n      FromString16(base::string16(src));\n  }\n#endif  // WCHAR_T_IS_UTF32\n\n  ///\n  // Create a new string from an existing character array. If |copy| is true\n  // this class will copy the data. Otherwise, this class will reference the\n  // existing data. Referenced data must exist for the lifetime of this class\n  // and will not be freed by this class.\n  ///\n  CefStringBase(const char_type* src, size_t src_len, bool copy)\n    : string_(NULL), owner_(false) {\n    if (src && src_len > 0)\n      FromString(src, src_len, copy);\n  }\n\n  ///\n  // Create a new string referencing an existing string structure without taking\n  // ownership. Referenced structures must exist for the lifetime of this class\n  // and will not be freed by this class.\n  ///\n  CefStringBase(const struct_type* src)  // NOLINT(runtime/explicit)\n    : string_(NULL), owner_(false) {\n    if (!src)\n      return;\n    // Reference the existing structure without taking ownership.\n    Attach(const_cast<struct_type*>(src), false);\n  }\n\n  virtual ~CefStringBase() { ClearAndFree(); }\n\n\n  // The following methods are named for compatibility with the standard library\n  // string template types.\n\n  ///\n  // Return a read-only pointer to the string data.\n  ///\n  const char_type* c_str() const { return (string_ ? string_->str : NULL); }\n\n  ///\n  // Return the length of the string data.\n  ///\n  size_t length() const { return (string_ ? string_->length : 0); }\n\n  ///\n  // Return the length of the string data.\n  ///\n  inline size_t size() const { return length(); }\n\n  ///\n  // Returns true if the string is empty.\n  ///\n  bool empty() const { return (string_ == NULL || string_->length == 0); }\n\n  ///\n  // Compare this string to the specified string.\n  ///\n  int compare(const CefStringBase& str) const {\n    if (empty() && str.empty())\n      return 0;\n    if (empty())\n      return -1;\n    if (str.empty())\n      return 1;\n    return traits::compare(string_, str.GetStruct());\n  }\n\n  ///\n  // Clear the string data.\n  ///\n  void clear() {\n    if (string_)\n      traits::clear(string_);\n  }\n\n  ///\n  // Swap this string's contents with the specified string.\n  ///\n  void swap(CefStringBase& str) {\n    struct_type* tmp_string = string_;\n    bool tmp_owner = owner_;\n    string_ = str.string_;\n    owner_ = str.owner_;\n    str.string_ = tmp_string;\n    str.owner_ = tmp_owner;\n  }\n\n\n  // The following methods are unique to CEF string template types.\n\n  ///\n  // Returns true if this class owns the underlying string structure.\n  ///\n  bool IsOwner() const { return owner_; }\n\n  ///\n  // Returns a read-only pointer to the underlying string structure. May return\n  // NULL if no structure is currently allocated.\n  ///\n  const struct_type* GetStruct() const { return string_; }\n\n  ///\n  // Returns a writable pointer to the underlying string structure. Will never\n  // return NULL.\n  ///\n  struct_type* GetWritableStruct() {\n    AllocIfNeeded();\n    return string_;\n  }\n\n  ///\n  // Clear the state of this class. The underlying string structure and data\n  // will be freed if this class owns the structure.\n  ///\n  void ClearAndFree() {\n    if (!string_)\n      return;\n    if (owner_) {\n      clear();\n      delete string_;\n    }\n    string_ = NULL;\n    owner_ = false;\n  }\n\n  ///\n  // Attach to the specified string structure. If |owner| is true this class\n  // will take ownership of the structure.\n  ///\n  void Attach(struct_type* str, bool owner) {\n    // Free the previous structure and data, if any.\n    ClearAndFree();\n\n    string_ = str;\n    owner_ = owner;\n  }\n\n  ///\n  // Take ownership of the specified userfree structure's string data. The\n  // userfree structure itself will be freed. Only use this method with userfree\n  // structures.\n  ///\n  void AttachToUserFree(userfree_struct_type str) {\n    // Free the previous structure and data, if any.\n    ClearAndFree();\n\n    if (!str)\n      return;\n\n    AllocIfNeeded();\n    owner_ = true;\n    memcpy(string_, str, sizeof(struct_type));\n\n    // Free the |str| structure but not the data.\n    memset(str, 0, sizeof(struct_type));\n    traits::userfree_free(str);\n  }\n\n  ///\n  // Detach from the underlying string structure. To avoid memory leaks only use\n  // this method if you already hold a pointer to the underlying string\n  // structure.\n  ///\n  void Detach() {\n    string_ = NULL;\n    owner_ = false;\n  }\n\n  ///\n  // Create a userfree structure and give it ownership of this class' string\n  // data. This class will be disassociated from the data. May return NULL if\n  // this string class currently contains no data.\n  ///\n  userfree_struct_type DetachToUserFree() {\n    if (empty())\n      return NULL;\n\n    userfree_struct_type str = traits::userfree_alloc();\n    memcpy(str, string_, sizeof(struct_type));\n\n    // Free this class' structure but not the data.\n    memset(string_, 0, sizeof(struct_type));\n    ClearAndFree();\n\n    return str;\n  }\n\n  ///\n  // Set this string's data to the specified character array. If |copy| is true\n  // this class will copy the data. Otherwise, this class will reference the\n  // existing data. Referenced data must exist for the lifetime of this class\n  // and will not be freed by this class.\n  ///\n  bool FromString(const char_type* src, size_t src_len, bool copy) {\n    if (src == NULL || src_len == 0) {\n      clear();\n      return true;\n    }\n    AllocIfNeeded();\n    return traits::set(src, src_len, string_, copy) ? true : false;\n  }\n\n  ///\n  // Set this string's data from an existing ASCII string. Data will be always\n  // copied. Translation will occur if necessary based on the underlying string\n  // type.\n  ///\n  bool FromASCII(const char* str) {\n    size_t len = str ? strlen(str) : 0;\n    if (len == 0) {\n      clear();\n      return true;\n    }\n    AllocIfNeeded();\n    return traits::from_ascii(str, len, string_);\n  }\n\n  ///\n  // Return this string's data as a std::string. Translation will occur if\n  // necessary based on the underlying string type.\n  ///\n  std::string ToString() const {\n    if (empty())\n      return std::string();\n    return traits::to_string(string_);\n  }\n\n  ///\n  // Set this string's data from an existing std::string. Data will be always\n  // copied. Translation will occur if necessary based on the underlying string\n  // type.\n  ///\n  bool FromString(const std::string& str) {\n    if (str.empty()) {\n      clear();\n      return true;\n    }\n    AllocIfNeeded();\n    return traits::from_string(str, string_);\n  }\n\n  ///\n  // Return this string's data as a std::wstring. Translation will occur if\n  // necessary based on the underlying string type.\n  ///\n  std::wstring ToWString() const {\n    if (empty())\n      return std::wstring();\n    return traits::to_wstring(string_);\n  }\n\n  ///\n  // Set this string's data from an existing std::wstring. Data will be always\n  // copied. Translation will occur if necessary based on the underlying string\n  // type.\n  ///\n  bool FromWString(const std::wstring& str) {\n    if (str.empty()) {\n      clear();\n      return true;\n    }\n    AllocIfNeeded();\n    return traits::from_wstring(str, string_);\n  }\n\n  ///\n  // Return this string's data as a string16. Translation will occur if\n  // necessary based on the underlying string type.\n  ///\n  base::string16 ToString16() const {\n    if (empty())\n      return base::string16();\n    return traits::to_string16(string_);\n  }\n\n  ///\n  // Set this string's data from an existing string16. Data will be always\n  // copied. Translation will occur if necessary based on the underlying string\n  // type.\n  ///\n  bool FromString16(const base::string16& str) {\n    if (str.empty()) {\n      clear();\n      return true;\n    }\n    AllocIfNeeded();\n    return traits::from_string16(str, string_);\n  }\n\n  ///\n  // Comparison operator overloads.\n  ///\n  bool operator<(const CefStringBase& str) const {\n    return (compare(str) < 0);\n  }\n  bool operator<=(const CefStringBase& str) const {\n    return (compare(str) <= 0);\n  }\n  bool operator>(const CefStringBase& str) const {\n    return (compare(str) > 0);\n  }\n  bool operator>=(const CefStringBase& str) const {\n    return (compare(str) >= 0);\n  }\n  bool operator==(const CefStringBase& str) const {\n    return (compare(str) == 0);\n  }\n  bool operator!=(const CefStringBase& str) const {\n    return (compare(str) != 0);\n  }\n\n  ///\n  // Assignment operator overloads.\n  ///\n  CefStringBase& operator=(const CefStringBase& str) {\n    FromString(str.c_str(), str.length(), true);\n    return *this;\n  }\n  operator std::string() const {\n    return ToString();\n  }\n  CefStringBase& operator=(const std::string& str) {\n    FromString(str);\n    return *this;\n  }\n  CefStringBase& operator=(const char* str) {\n    FromString(std::string(str));\n    return *this;\n  }\n  operator std::wstring() const {\n    return ToWString();\n  }\n  CefStringBase& operator=(const std::wstring& str) {\n    FromWString(str);\n    return *this;\n  }\n  CefStringBase& operator=(const wchar_t* str) {\n    FromWString(std::wstring(str));\n    return *this;\n  }\n#if defined(WCHAR_T_IS_UTF32)\n  operator base::string16() const {\n    return ToString16();\n  }\n  CefStringBase& operator=(const base::string16& str) {\n    FromString16(str);\n    return *this;\n  }\n  CefStringBase& operator=(const char16* str) {\n    FromString16(base::string16(str));\n    return *this;\n  }\n#endif  // WCHAR_T_IS_UTF32\n#if defined(USING_CHROMIUM_INCLUDES)\n  // The base::FilePath constructor is marked as explicit so provide the\n  // conversion here for convenience.\n  operator base::FilePath() const {\n#if defined(OS_WIN)\n    return base::FilePath(ToWString());\n#else\n    return base::FilePath(ToString());\n#endif\n  }\n#endif  // USING_CHROMIUM_INCLUDES\n\n private:\n  // Allocate the string structure if it doesn't already exist.\n  void AllocIfNeeded() {\n    if (string_ == NULL) {\n      string_ = new struct_type;\n      memset(string_, 0, sizeof(struct_type));\n      owner_ = true;\n    }\n  }\n\n  struct_type* string_;\n  bool owner_;\n};\n\n\ntypedef CefStringBase<CefStringTraitsWide> CefStringWide;\ntypedef CefStringBase<CefStringTraitsUTF8> CefStringUTF8;\ntypedef CefStringBase<CefStringTraitsUTF16> CefStringUTF16;\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_thread_internal.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_\n#define CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_\n#pragma once\n\n#if defined(OS_WIN)\n#include <windows.h>\n#elif defined(OS_POSIX)\n#include <pthread.h>\n#include <unistd.h>\n#endif\n\n#include \"include/internal/cef_export.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#if defined(OS_WIN)\ntypedef DWORD cef_platform_thread_id_t;\n#elif defined(OS_POSIX)\ntypedef pid_t cef_platform_thread_id_t;\n#endif\n\n///\n// Returns the current platform thread ID.\n///\nCEF_EXPORT cef_platform_thread_id_t cef_get_current_platform_thread_id();\n\n#if defined(OS_WIN)\ntypedef DWORD cef_platform_thread_handle_t;\n#elif defined(OS_POSIX)\ntypedef pthread_t cef_platform_thread_handle_t;\n#endif\n\n///\n// Returns the current platform thread handle.\n///\nCEF_EXPORT cef_platform_thread_handle_t\n    cef_get_current_platform_thread_handle();\n\n#ifdef __cplusplus\n}\n#endif  // __cplusplus\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_time.h",
    "content": "// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_TIME_H_\n#define CEF_INCLUDE_INTERNAL_CEF_TIME_H_\n#pragma once\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"include/internal/cef_export.h\"\n#include <time.h>\n\n///\n// Time information. Values should always be in UTC.\n///\ntypedef struct _cef_time_t {\n  int year;          // Four digit year \"2007\"\n  int month;         // 1-based month (values 1 = January, etc.)\n  int day_of_week;   // 0-based day of week (0 = Sunday, etc.)\n  int day_of_month;  // 1-based day of month (1-31)\n  int hour;          // Hour within the current day (0-23)\n  int minute;        // Minute within the current hour (0-59)\n  int second;        // Second within the current minute (0-59 plus leap\n                     //   seconds which may take it up to 60).\n  int millisecond;   // Milliseconds within the current second (0-999)\n} cef_time_t;\n\n///\n// Converts cef_time_t to/from time_t. Returns true (1) on success and false (0)\n// on failure.\n///\nCEF_EXPORT int cef_time_to_timet(const cef_time_t* cef_time, time_t* time);\nCEF_EXPORT int cef_time_from_timet(time_t time, cef_time_t* cef_time);\n\n///\n// Converts cef_time_t to/from a double which is the number of seconds since\n// epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0\n// means \"not initialized\". Returns true (1) on success and false (0) on\n// failure.\n///\nCEF_EXPORT int cef_time_to_doublet(const cef_time_t* cef_time, double* time);\nCEF_EXPORT int cef_time_from_doublet(double time, cef_time_t* cef_time);\n\n///\n// Retrieve the current system time.\n//\nCEF_EXPORT int cef_time_now(cef_time_t* cef_time);\n\n///\n// Retrieve the delta in milliseconds between two time values.\n//\nCEF_EXPORT int cef_time_delta(const cef_time_t* cef_time1,\n                              const cef_time_t* cef_time2,\n                              long long* delta);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_TIME_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_trace_event_internal.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_\n#define CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_\n#pragma once\n\n#include \"include/internal/cef_export.h\"\n#include \"include/internal/cef_types.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// See include/base/cef_trace_event.h for macros and intended usage.\n\n// Functions for tracing counters and functions; called from macros.\n// - |category| string must have application lifetime (static or literal). They\n//   may not include \"(quotes) chars.\n// - |argX_name|, |argX_val|, |valueX_name|, |valeX_val| are optional parameters\n//   and represent pairs of name and values of arguments\n// - |copy| is used to avoid memory scoping issues with the |name| and\n//   |arg_name| parameters by copying them\n// - |id| is used to disambiguate counters with the same name, or match async\n//   trace events\n\nCEF_EXPORT void cef_trace_event_instant(const char* category,\n                                        const char* name,\n                                        const char* arg1_name,\n                                        uint64 arg1_val,\n                                        const char* arg2_name,\n                                        uint64 arg2_val,\n                                        int copy);\nCEF_EXPORT void cef_trace_event_begin(const char* category,\n                                      const char* name,\n                                      const char* arg1_name,\n                                      uint64 arg1_val,\n                                      const char* arg2_name,\n                                      uint64 arg2_val,\n                                      int copy);\nCEF_EXPORT void cef_trace_event_end(const char* category,\n                                    const char* name,\n                                    const char* arg1_name,\n                                    uint64 arg1_val,\n                                    const char* arg2_name,\n                                    uint64 arg2_val,\n                                    int copy);\nCEF_EXPORT void cef_trace_counter(const char* category,\n                                  const char* name,\n                                  const char* value1_name,\n                                  uint64 value1_val,\n                                  const char* value2_name,\n                                  uint64 value2_val,\n                                  int copy);\nCEF_EXPORT void cef_trace_counter_id(const char* category,\n                                     const char* name,\n                                     uint64 id,\n                                     const char* value1_name,\n                                     uint64 value1_val,\n                                     const char* value2_name,\n                                     uint64 value2_val,\n                                     int copy);\nCEF_EXPORT void cef_trace_event_async_begin(const char* category,\n                                            const char* name,\n                                            uint64 id,\n                                            const char* arg1_name,\n                                            uint64 arg1_val,\n                                            const char* arg2_name,\n                                            uint64 arg2_val,\n                                            int copy);\nCEF_EXPORT void cef_trace_event_async_step_into(const char* category,\n                                                const char* name,\n                                                uint64 id,\n                                                uint64 step,\n                                                const char* arg1_name,\n                                                uint64 arg1_val,\n                                                int copy);\nCEF_EXPORT void cef_trace_event_async_step_past(const char* category,\n                                                const char* name,\n                                                uint64 id,\n                                                uint64 step,\n                                                const char* arg1_name,\n                                                uint64 arg1_val,\n                                                int copy);\nCEF_EXPORT void cef_trace_event_async_end(const char* category,\n                                          const char* name,\n                                          uint64 id,\n                                          const char* arg1_name,\n                                          uint64 arg1_val,\n                                          const char* arg2_name,\n                                          uint64 arg2_val,\n                                          int copy);\n\n#ifdef __cplusplus\n}\n#endif  // __cplusplus\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_types.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_H_\n#define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_\n#pragma once\n\n#include \"include/base/cef_basictypes.h\"\n#include \"include/internal/cef_string.h\"\n#include \"include/internal/cef_string_list.h\"\n#include \"include/internal/cef_time.h\"\n\n// Bring in platform-specific definitions.\n#if defined(OS_WIN)\n#include \"include/internal/cef_types_win.h\"\n#elif defined(OS_MACOSX)\n#include \"include/internal/cef_types_mac.h\"\n#elif defined(OS_LINUX)\n#include \"include/internal/cef_types_linux.h\"\n#endif\n\n// 32-bit ARGB color value, not premultiplied. The color components are always\n// in a known order. Equivalent to the SkColor type.\ntypedef uint32              cef_color_t;\n\n// Return the alpha byte from a cef_color_t value.\n#define CefColorGetA(color)      (((color) >> 24) & 0xFF)\n// Return the red byte from a cef_color_t value.\n#define CefColorGetR(color)      (((color) >> 16) & 0xFF)\n// Return the green byte from a cef_color_t value.\n#define CefColorGetG(color)      (((color) >>  8) & 0xFF)\n// Return the blue byte from a cef_color_t value.\n#define CefColorGetB(color)      (((color) >>  0) & 0xFF)\n\n// Return an cef_color_t value with the specified byte component values.\n#define CefColorSetARGB(a, r, g, b) \\\n    static_cast<cef_color_t>( \\\n        (static_cast<unsigned>(a) << 24) | \\\n        (static_cast<unsigned>(r) << 16) | \\\n        (static_cast<unsigned>(g) << 8) | \\\n        (static_cast<unsigned>(b) << 0))\n\n// Return an int64 value with the specified low and high int32 component values.\n#define CefInt64Set(int32_low, int32_high) \\\n    static_cast<int64>((static_cast<uint32>(int32_low)) | \\\n        (static_cast<int64>(static_cast<int32>(int32_high))) << 32)\n\n// Return the low int32 value from an int64 value.\n#define CefInt64GetLow(int64_val) static_cast<int32>(int64_val)\n// Return the high int32 value from an int64 value.\n#define CefInt64GetHigh(int64_val) \\\n    static_cast<int32>((static_cast<int64>(int64_val) >> 32) & 0xFFFFFFFFL)\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n///\n// Log severity levels.\n///\ntypedef enum {\n  ///\n  // Default logging (currently INFO logging).\n  ///\n  LOGSEVERITY_DEFAULT,\n\n  ///\n  // Verbose logging.\n  ///\n  LOGSEVERITY_VERBOSE,\n\n  ///\n  // INFO logging.\n  ///\n  LOGSEVERITY_INFO,\n\n  ///\n  // WARNING logging.\n  ///\n  LOGSEVERITY_WARNING,\n\n  ///\n  // ERROR logging.\n  ///\n  LOGSEVERITY_ERROR,\n\n  ///\n  // Completely disable logging.\n  ///\n  LOGSEVERITY_DISABLE = 99\n} cef_log_severity_t;\n\n///\n// Represents the state of a setting.\n///\ntypedef enum {\n  ///\n  // Use the default state for the setting.\n  ///\n  STATE_DEFAULT = 0,\n\n  ///\n  // Enable or allow the setting.\n  ///\n  STATE_ENABLED,\n\n  ///\n  // Disable or disallow the setting.\n  ///\n  STATE_DISABLED,\n} cef_state_t;\n\n///\n// Initialization settings. Specify NULL or 0 to get the recommended default\n// values. Many of these and other settings can also configured using command-\n// line switches.\n///\ntypedef struct _cef_settings_t {\n  ///\n  // Size of this structure.\n  ///\n  size_t size;\n\n  ///\n  // Set to true (1) to use a single process for the browser and renderer. This\n  // run mode is not officially supported by Chromium and is less stable than\n  // the multi-process default. Also configurable using the \"single-process\"\n  // command-line switch.\n  ///\n  int single_process;\n\n  ///\n  // Set to true (1) to disable the sandbox for sub-processes. See\n  // cef_sandbox_win.h for requirements to enable the sandbox on Windows. Also\n  // configurable using the \"no-sandbox\" command-line switch.\n  ///\n  int no_sandbox;\n\n  ///\n  // The path to a separate executable that will be launched for sub-processes.\n  // By default the browser process executable is used. See the comments on\n  // CefExecuteProcess() for details. Also configurable using the\n  // \"browser-subprocess-path\" command-line switch.\n  ///\n  cef_string_t browser_subprocess_path;\n\n  ///\n  // Set to true (1) to have the browser process message loop run in a separate\n  // thread. If false (0) than the CefDoMessageLoopWork() function must be\n  // called from your application message loop. This option is only supported on\n  // Windows.\n  ///\n  int multi_threaded_message_loop;\n\n  ///\n  // Set to true (1) to enable windowless (off-screen) rendering support. Do not\n  // enable this value if the application does not use windowless rendering as\n  // it may reduce rendering performance on some systems.\n  ///\n  int windowless_rendering_enabled;\n\n  ///\n  // Set to true (1) to disable configuration of browser process features using\n  // standard CEF and Chromium command-line arguments. Configuration can still\n  // be specified using CEF data structures or via the\n  // CefApp::OnBeforeCommandLineProcessing() method.\n  ///\n  int command_line_args_disabled;\n\n  ///\n  // The location where cache data will be stored on disk. If empty then\n  // browsers will be created in \"incognito mode\" where in-memory caches are\n  // used for storage and no data is persisted to disk. HTML5 databases such as\n  // localStorage will only persist across sessions if a cache path is\n  // specified. Can be overridden for individual CefRequestContext instances via\n  // the CefRequestContextSettings.cache_path value.\n  ///\n  cef_string_t cache_path;\n\n  ///\n  // The location where user data such as spell checking dictionary files will\n  // be stored on disk. If empty then the default platform-specific user data\n  // directory will be used (\"~/.cef_user_data\" directory on Linux,\n  // \"~/Library/Application Support/CEF/User Data\" directory on Mac OS X,\n  // \"Local Settings\\Application Data\\CEF\\User Data\" directory under the user\n  // profile directory on Windows).\n  ///\n  cef_string_t user_data_path;\n\n  ///\n  // To persist session cookies (cookies without an expiry date or validity\n  // interval) by default when using the global cookie manager set this value to\n  // true (1). Session cookies are generally intended to be transient and most\n  // Web browsers do not persist them. A |cache_path| value must also be\n  // specified to enable this feature. Also configurable using the\n  // \"persist-session-cookies\" command-line switch. Can be overridden for\n  // individual CefRequestContext instances via the\n  // CefRequestContextSettings.persist_session_cookies value.\n  ///\n  int persist_session_cookies;\n\n  ///\n  // To persist user preferences as a JSON file in the cache path directory set\n  // this value to true (1). A |cache_path| value must also be specified\n  // to enable this feature. Also configurable using the\n  // \"persist-user-preferences\" command-line switch. Can be overridden for\n  // individual CefRequestContext instances via the\n  // CefRequestContextSettings.persist_user_preferences value.\n  ///\n  int persist_user_preferences;\n\n  ///\n  // Value that will be returned as the User-Agent HTTP header. If empty the\n  // default User-Agent string will be used. Also configurable using the\n  // \"user-agent\" command-line switch.\n  ///\n  cef_string_t user_agent;\n\n  ///\n  // Value that will be inserted as the product portion of the default\n  // User-Agent string. If empty the Chromium product version will be used. If\n  // |userAgent| is specified this value will be ignored. Also configurable\n  // using the \"product-version\" command-line switch.\n  ///\n  cef_string_t product_version;\n\n  ///\n  // The locale string that will be passed to WebKit. If empty the default\n  // locale of \"en-US\" will be used. This value is ignored on Linux where locale\n  // is determined using environment variable parsing with the precedence order:\n  // LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also configurable using the \"lang\"\n  // command-line switch.\n  ///\n  cef_string_t locale;\n\n  ///\n  // The directory and file name to use for the debug log. If empty a default\n  // log file name and location will be used. On Windows and Linux a \"debug.log\"\n  // file will be written in the main executable directory. On Mac OS X a\n  // \"~/Library/Logs/<app name>_debug.log\" file will be written where <app name>\n  // is the name of the main app executable. Also configurable using the\n  // \"log-file\" command-line switch.\n  ///\n  cef_string_t log_file;\n\n  ///\n  // The log severity. Only messages of this severity level or higher will be\n  // logged. Also configurable using the \"log-severity\" command-line switch with\n  // a value of \"verbose\", \"info\", \"warning\", \"error\", \"error-report\" or\n  // \"disable\".\n  ///\n  cef_log_severity_t log_severity;\n\n  ///\n  // Custom flags that will be used when initializing the V8 JavaScript engine.\n  // The consequences of using custom flags may not be well tested. Also\n  // configurable using the \"js-flags\" command-line switch.\n  ///\n  cef_string_t javascript_flags;\n\n  ///\n  // The fully qualified path for the resources directory. If this value is\n  // empty the cef.pak and/or devtools_resources.pak files must be located in\n  // the module directory on Windows/Linux or the app bundle Resources directory\n  // on Mac OS X. Also configurable using the \"resources-dir-path\" command-line\n  // switch.\n  ///\n  cef_string_t resources_dir_path;\n\n  ///\n  // The fully qualified path for the locales directory. If this value is empty\n  // the locales directory must be located in the module directory. This value\n  // is ignored on Mac OS X where pack files are always loaded from the app\n  // bundle Resources directory. Also configurable using the \"locales-dir-path\"\n  // command-line switch.\n  ///\n  cef_string_t locales_dir_path;\n\n  ///\n  // Set to true (1) to disable loading of pack files for resources and locales.\n  // A resource bundle handler must be provided for the browser and render\n  // processes via CefApp::GetResourceBundleHandler() if loading of pack files\n  // is disabled. Also configurable using the \"disable-pack-loading\" command-\n  // line switch.\n  ///\n  int pack_loading_disabled;\n\n  ///\n  // Set to a value between 1024 and 65535 to enable remote debugging on the\n  // specified port. For example, if 8080 is specified the remote debugging URL\n  // will be http://localhost:8080. CEF can be remotely debugged from any CEF or\n  // Chrome browser window. Also configurable using the \"remote-debugging-port\"\n  // command-line switch.\n  ///\n  int remote_debugging_port;\n\n  ///\n  // The number of stack trace frames to capture for uncaught exceptions.\n  // Specify a positive value to enable the CefRenderProcessHandler::\n  // OnUncaughtException() callback. Specify 0 (default value) and\n  // OnUncaughtException() will not be called. Also configurable using the\n  // \"uncaught-exception-stack-size\" command-line switch.\n  ///\n  int uncaught_exception_stack_size;\n\n  ///\n  // By default CEF V8 references will be invalidated (the IsValid() method will\n  // return false) after the owning context has been released. This reduces the\n  // need for external record keeping and avoids crashes due to the use of V8\n  // references after the associated context has been released.\n  //\n  // CEF currently offers two context safety implementations with different\n  // performance characteristics. The default implementation (value of 0) uses a\n  // map of hash values and should provide better performance in situations with\n  // a small number contexts. The alternate implementation (value of 1) uses a\n  // hidden value attached to each context and should provide better performance\n  // in situations with a large number of contexts.\n  //\n  // If you need better performance in the creation of V8 references and you\n  // plan to manually track context lifespan you can disable context safety by\n  // specifying a value of -1.\n  //\n  // Also configurable using the \"context-safety-implementation\" command-line\n  // switch.\n  ///\n  int context_safety_implementation;\n\n  ///\n  // Set to true (1) to ignore errors related to invalid SSL certificates.\n  // Enabling this setting can lead to potential security vulnerabilities like\n  // \"man in the middle\" attacks. Applications that load content from the\n  // internet should not enable this setting. Also configurable using the\n  // \"ignore-certificate-errors\" command-line switch. Can be overridden for\n  // individual CefRequestContext instances via the\n  // CefRequestContextSettings.ignore_certificate_errors value.\n  ///\n  int ignore_certificate_errors;\n\n  ///\n  // Opaque background color used for accelerated content. By default the\n  // background color will be white. Only the RGB compontents of the specified\n  // value will be used. The alpha component must greater than 0 to enable use\n  // of the background color but will be otherwise ignored.\n  ///\n  cef_color_t background_color;\n\n  ///\n  // Comma delimited ordered list of language codes without any whitespace that\n  // will be used in the \"Accept-Language\" HTTP header. May be overridden on a\n  // per-browser basis using the CefBrowserSettings.accept_language_list value.\n  // If both values are empty then \"en-US,en\" will be used. Can be overridden\n  // for individual CefRequestContext instances via the\n  // CefRequestContextSettings.accept_language_list value.\n  ///\n  cef_string_t accept_language_list;\n} cef_settings_t;\n\n///\n// Request context initialization settings. Specify NULL or 0 to get the\n// recommended default values.\n///\ntypedef struct _cef_request_context_settings_t {\n  ///\n  // Size of this structure.\n  ///\n  size_t size;\n\n  ///\n  // The location where cache data will be stored on disk. If empty then\n  // browsers will be created in \"incognito mode\" where in-memory caches are\n  // used for storage and no data is persisted to disk. HTML5 databases such as\n  // localStorage will only persist across sessions if a cache path is\n  // specified. To share the global browser cache and related configuration set\n  // this value to match the CefSettings.cache_path value.\n  ///\n  cef_string_t cache_path;\n\n  ///\n  // To persist session cookies (cookies without an expiry date or validity\n  // interval) by default when using the global cookie manager set this value to\n  // true (1). Session cookies are generally intended to be transient and most\n  // Web browsers do not persist them. Can be set globally using the\n  // CefSettings.persist_session_cookies value. This value will be ignored if\n  // |cache_path| is empty or if it matches the CefSettings.cache_path value.\n  ///\n  int persist_session_cookies;\n\n  ///\n  // To persist user preferences as a JSON file in the cache path directory set\n  // this value to true (1). Can be set globally using the\n  // CefSettings.persist_user_preferences value. This value will be ignored if\n  // |cache_path| is empty or if it matches the CefSettings.cache_path value.\n  ///\n  int persist_user_preferences;\n\n  ///\n  // Set to true (1) to ignore errors related to invalid SSL certificates.\n  // Enabling this setting can lead to potential security vulnerabilities like\n  // \"man in the middle\" attacks. Applications that load content from the\n  // internet should not enable this setting. Can be set globally using the\n  // CefSettings.ignore_certificate_errors value. This value will be ignored if\n  // |cache_path| matches the CefSettings.cache_path value.\n  ///\n  int ignore_certificate_errors;\n\n  ///\n  // Comma delimited ordered list of language codes without any whitespace that\n  // will be used in the \"Accept-Language\" HTTP header. Can be set globally\n  // using the CefSettings.accept_language_list value or overridden on a per-\n  // browser basis using the CefBrowserSettings.accept_language_list value. If\n  // all values are empty then \"en-US,en\" will be used. This value will be\n  // ignored if |cache_path| matches the CefSettings.cache_path value.\n  ///\n  cef_string_t accept_language_list;\n} cef_request_context_settings_t;\n\n///\n// Browser initialization settings. Specify NULL or 0 to get the recommended\n// default values. The consequences of using custom values may not be well\n// tested. Many of these and other settings can also configured using command-\n// line switches.\n///\ntypedef struct _cef_browser_settings_t {\n  ///\n  // Size of this structure.\n  ///\n  size_t size;\n\n  ///\n  // The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint\n  // will be called for a windowless browser. The actual fps may be lower if\n  // the browser cannot generate frames at the requested rate. The minimum\n  // value is 1 and the maximum value is 60 (default 30). This value can also be\n  // changed dynamically via CefBrowserHost::SetWindowlessFrameRate.\n  ///\n  int windowless_frame_rate;\n\n  // The below values map to WebPreferences settings.\n\n  ///\n  // Font settings.\n  ///\n  cef_string_t standard_font_family;\n  cef_string_t fixed_font_family;\n  cef_string_t serif_font_family;\n  cef_string_t sans_serif_font_family;\n  cef_string_t cursive_font_family;\n  cef_string_t fantasy_font_family;\n  int default_font_size;\n  int default_fixed_font_size;\n  int minimum_font_size;\n  int minimum_logical_font_size;\n\n  ///\n  // Default encoding for Web content. If empty \"ISO-8859-1\" will be used. Also\n  // configurable using the \"default-encoding\" command-line switch.\n  ///\n  cef_string_t default_encoding;\n\n  ///\n  // Controls the loading of fonts from remote sources. Also configurable using\n  // the \"disable-remote-fonts\" command-line switch.\n  ///\n  cef_state_t remote_fonts;\n\n  ///\n  // Controls whether JavaScript can be executed. Also configurable using the\n  // \"disable-javascript\" command-line switch.\n  ///\n  cef_state_t javascript;\n\n  ///\n  // Controls whether JavaScript can be used for opening windows. Also\n  // configurable using the \"disable-javascript-open-windows\" command-line\n  // switch.\n  ///\n  cef_state_t javascript_open_windows;\n\n  ///\n  // Controls whether JavaScript can be used to close windows that were not\n  // opened via JavaScript. JavaScript can still be used to close windows that\n  // were opened via JavaScript or that have no back/forward history. Also\n  // configurable using the \"disable-javascript-close-windows\" command-line\n  // switch.\n  ///\n  cef_state_t javascript_close_windows;\n\n  ///\n  // Controls whether JavaScript can access the clipboard. Also configurable\n  // using the \"disable-javascript-access-clipboard\" command-line switch.\n  ///\n  cef_state_t javascript_access_clipboard;\n\n  ///\n  // Controls whether DOM pasting is supported in the editor via\n  // execCommand(\"paste\"). The |javascript_access_clipboard| setting must also\n  // be enabled. Also configurable using the \"disable-javascript-dom-paste\"\n  // command-line switch.\n  ///\n  cef_state_t javascript_dom_paste;\n\n  ///\n  // Controls whether the caret position will be drawn. Also configurable using\n  // the \"enable-caret-browsing\" command-line switch.\n  ///\n  cef_state_t caret_browsing;\n\n  ///\n  // Controls whether any plugins will be loaded. Also configurable using the\n  // \"disable-plugins\" command-line switch.\n  ///\n  cef_state_t plugins;\n\n  ///\n  // Controls whether file URLs will have access to all URLs. Also configurable\n  // using the \"allow-universal-access-from-files\" command-line switch.\n  ///\n  cef_state_t universal_access_from_file_urls;\n\n  ///\n  // Controls whether file URLs will have access to other file URLs. Also\n  // configurable using the \"allow-access-from-files\" command-line switch.\n  ///\n  cef_state_t file_access_from_file_urls;\n\n  ///\n  // Controls whether web security restrictions (same-origin policy) will be\n  // enforced. Disabling this setting is not recommend as it will allow risky\n  // security behavior such as cross-site scripting (XSS). Also configurable\n  // using the \"disable-web-security\" command-line switch.\n  ///\n  cef_state_t web_security;\n\n  ///\n  // Controls whether image URLs will be loaded from the network. A cached image\n  // will still be rendered if requested. Also configurable using the\n  // \"disable-image-loading\" command-line switch.\n  ///\n  cef_state_t image_loading;\n\n  ///\n  // Controls whether standalone images will be shrunk to fit the page. Also\n  // configurable using the \"image-shrink-standalone-to-fit\" command-line\n  // switch.\n  ///\n  cef_state_t image_shrink_standalone_to_fit;\n\n  ///\n  // Controls whether text areas can be resized. Also configurable using the\n  // \"disable-text-area-resize\" command-line switch.\n  ///\n  cef_state_t text_area_resize;\n\n  ///\n  // Controls whether the tab key can advance focus to links. Also configurable\n  // using the \"disable-tab-to-links\" command-line switch.\n  ///\n  cef_state_t tab_to_links;\n\n  ///\n  // Controls whether local storage can be used. Also configurable using the\n  // \"disable-local-storage\" command-line switch.\n  ///\n  cef_state_t local_storage;\n\n  ///\n  // Controls whether databases can be used. Also configurable using the\n  // \"disable-databases\" command-line switch.\n  ///\n  cef_state_t databases;\n\n  ///\n  // Controls whether the application cache can be used. Also configurable using\n  // the \"disable-application-cache\" command-line switch.\n  ///\n  cef_state_t application_cache;\n\n  ///\n  // Controls whether WebGL can be used. Note that WebGL requires hardware\n  // support and may not work on all systems even when enabled. Also\n  // configurable using the \"disable-webgl\" command-line switch.\n  ///\n  cef_state_t webgl;\n\n  ///\n  // Opaque background color used for the browser before a document is loaded\n  // and when no document color is specified. By default the background color\n  // will be the same as CefSettings.background_color. Only the RGB compontents\n  // of the specified value will be used. The alpha component must greater than\n  // 0 to enable use of the background color but will be otherwise ignored.\n  ///\n  cef_color_t background_color;\n\n  ///\n  // Comma delimited ordered list of language codes without any whitespace that\n  // will be used in the \"Accept-Language\" HTTP header. May be set globally\n  // using the CefBrowserSettings.accept_language_list value. If both values are\n  // empty then \"en-US,en\" will be used.\n  ///\n  cef_string_t accept_language_list;\n} cef_browser_settings_t;\n\n///\n// Return value types.\n///\ntypedef enum {\n  ///\n  // Cancel immediately.\n  ///\n  RV_CANCEL = 0,\n\n  ///\n  // Continue immediately.\n  ///\n  RV_CONTINUE,\n\n  ///\n  // Continue asynchronously (usually via a callback).\n  ///\n  RV_CONTINUE_ASYNC,\n} cef_return_value_t;\n\n///\n// URL component parts.\n///\ntypedef struct _cef_urlparts_t {\n  ///\n  // The complete URL specification.\n  ///\n  cef_string_t spec;\n\n  ///\n  // Scheme component not including the colon (e.g., \"http\").\n  ///\n  cef_string_t scheme;\n\n  ///\n  // User name component.\n  ///\n  cef_string_t username;\n\n  ///\n  // Password component.\n  ///\n  cef_string_t password;\n\n  ///\n  // Host component. This may be a hostname, an IPv4 address or an IPv6 literal\n  // surrounded by square brackets (e.g., \"[2001:db8::1]\").\n  ///\n  cef_string_t host;\n\n  ///\n  // Port number component.\n  ///\n  cef_string_t port;\n\n  ///\n  // Origin contains just the scheme, host, and port from a URL. Equivalent to\n  // clearing any username and password, replacing the path with a slash, and\n  // clearing everything after that. This value will be empty for non-standard\n  // URLs.\n  ///\n  cef_string_t origin;\n\n  ///\n  // Path component including the first slash following the host.\n  ///\n  cef_string_t path;\n\n  ///\n  // Query string component (i.e., everything following the '?').\n  ///\n  cef_string_t query;\n} cef_urlparts_t;\n\n///\n// Cookie information.\n///\ntypedef struct _cef_cookie_t {\n  ///\n  // The cookie name.\n  ///\n  cef_string_t name;\n\n  ///\n  // The cookie value.\n  ///\n  cef_string_t value;\n\n  ///\n  // If |domain| is empty a host cookie will be created instead of a domain\n  // cookie. Domain cookies are stored with a leading \".\" and are visible to\n  // sub-domains whereas host cookies are not.\n  ///\n  cef_string_t domain;\n\n  ///\n  // If |path| is non-empty only URLs at or below the path will get the cookie\n  // value.\n  ///\n  cef_string_t path;\n\n  ///\n  // If |secure| is true the cookie will only be sent for HTTPS requests.\n  ///\n  int secure;\n\n  ///\n  // If |httponly| is true the cookie will only be sent for HTTP requests.\n  ///\n  int httponly;\n\n  ///\n  // The cookie creation date. This is automatically populated by the system on\n  // cookie creation.\n  ///\n  cef_time_t creation;\n\n  ///\n  // The cookie last access date. This is automatically populated by the system\n  // on access.\n  ///\n  cef_time_t last_access;\n\n  ///\n  // The cookie expiration date is only valid if |has_expires| is true.\n  ///\n  int has_expires;\n  cef_time_t expires;\n} cef_cookie_t;\n\n///\n// Process termination status values.\n///\ntypedef enum {\n  ///\n  // Non-zero exit status.\n  ///\n  TS_ABNORMAL_TERMINATION,\n\n  ///\n  // SIGKILL or task manager kill.\n  ///\n  TS_PROCESS_WAS_KILLED,\n\n  ///\n  // Segmentation fault.\n  ///\n  TS_PROCESS_CRASHED,\n} cef_termination_status_t;\n\n///\n// Path key values.\n///\ntypedef enum {\n  ///\n  // Current directory.\n  ///\n  PK_DIR_CURRENT,\n\n  ///\n  // Directory containing PK_FILE_EXE.\n  ///\n  PK_DIR_EXE,\n\n  ///\n  // Directory containing PK_FILE_MODULE.\n  ///\n  PK_DIR_MODULE,\n\n  ///\n  // Temporary directory.\n  ///\n  PK_DIR_TEMP,\n\n  ///\n  // Path and filename of the current executable.\n  ///\n  PK_FILE_EXE,\n\n  ///\n  // Path and filename of the module containing the CEF code (usually the libcef\n  // module).\n  ///\n  PK_FILE_MODULE,\n\n  ///\n  // \"Local Settings\\Application Data\" directory under the user profile\n  // directory on Windows.\n  ///\n  PK_LOCAL_APP_DATA,\n\n  ///\n  // \"Application Data\" directory under the user profile directory on Windows\n  // and \"~/Library/Application Support\" directory on Mac OS X.\n  ///\n  PK_USER_DATA,\n} cef_path_key_t;\n\n///\n// Storage types.\n///\ntypedef enum {\n  ST_LOCALSTORAGE = 0,\n  ST_SESSIONSTORAGE,\n} cef_storage_type_t;\n\n///\n// Supported error code values. See net\\base\\net_error_list.h for complete\n// descriptions of the error codes.\n///\ntypedef enum {\n  ERR_NONE = 0,\n  ERR_FAILED = -2,\n  ERR_ABORTED = -3,\n  ERR_INVALID_ARGUMENT = -4,\n  ERR_INVALID_HANDLE = -5,\n  ERR_FILE_NOT_FOUND = -6,\n  ERR_TIMED_OUT = -7,\n  ERR_FILE_TOO_BIG = -8,\n  ERR_UNEXPECTED = -9,\n  ERR_ACCESS_DENIED = -10,\n  ERR_NOT_IMPLEMENTED = -11,\n  ERR_CONNECTION_CLOSED = -100,\n  ERR_CONNECTION_RESET = -101,\n  ERR_CONNECTION_REFUSED = -102,\n  ERR_CONNECTION_ABORTED = -103,\n  ERR_CONNECTION_FAILED = -104,\n  ERR_NAME_NOT_RESOLVED = -105,\n  ERR_INTERNET_DISCONNECTED = -106,\n  ERR_SSL_PROTOCOL_ERROR = -107,\n  ERR_ADDRESS_INVALID = -108,\n  ERR_ADDRESS_UNREACHABLE = -109,\n  ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110,\n  ERR_TUNNEL_CONNECTION_FAILED = -111,\n  ERR_NO_SSL_VERSIONS_ENABLED = -112,\n  ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113,\n  ERR_SSL_RENEGOTIATION_REQUESTED = -114,\n  ERR_CERT_COMMON_NAME_INVALID = -200,\n  ERR_CERT_BEGIN = ERR_CERT_COMMON_NAME_INVALID,\n  ERR_CERT_DATE_INVALID = -201,\n  ERR_CERT_AUTHORITY_INVALID = -202,\n  ERR_CERT_CONTAINS_ERRORS = -203,\n  ERR_CERT_NO_REVOCATION_MECHANISM = -204,\n  ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205,\n  ERR_CERT_REVOKED = -206,\n  ERR_CERT_INVALID = -207,\n  ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208,\n  // -209 is available: was ERR_CERT_NOT_IN_DNS.\n  ERR_CERT_NON_UNIQUE_NAME = -210,\n  ERR_CERT_WEAK_KEY = -211,\n  ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212,\n  ERR_CERT_VALIDITY_TOO_LONG = -213,\n  ERR_CERT_END = ERR_CERT_VALIDITY_TOO_LONG,\n  ERR_INVALID_URL = -300,\n  ERR_DISALLOWED_URL_SCHEME = -301,\n  ERR_UNKNOWN_URL_SCHEME = -302,\n  ERR_TOO_MANY_REDIRECTS = -310,\n  ERR_UNSAFE_REDIRECT = -311,\n  ERR_UNSAFE_PORT = -312,\n  ERR_INVALID_RESPONSE = -320,\n  ERR_INVALID_CHUNKED_ENCODING = -321,\n  ERR_METHOD_NOT_SUPPORTED = -322,\n  ERR_UNEXPECTED_PROXY_AUTH = -323,\n  ERR_EMPTY_RESPONSE = -324,\n  ERR_RESPONSE_HEADERS_TOO_BIG = -325,\n  ERR_CACHE_MISS = -400,\n  ERR_INSECURE_RESPONSE = -501,\n} cef_errorcode_t;\n\n///\n// Supported certificate status code values. See net\\cert\\cert_status_flags.h\n// for more information. CERT_STATUS_NONE is new in CEF because we use an\n// enum while cert_status_flags.h uses a typedef and static const variables.\n///\ntypedef enum {\n  CERT_STATUS_NONE = 0,\n  CERT_STATUS_COMMON_NAME_INVALID = 1 << 0,\n  CERT_STATUS_DATE_INVALID = 1 << 1,\n  CERT_STATUS_AUTHORITY_INVALID = 1 << 2,\n  // 1 << 3 is reserved for ERR_CERT_CONTAINS_ERRORS (not useful with WinHTTP).\n  CERT_STATUS_NO_REVOCATION_MECHANISM = 1 << 4,\n  CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = 1 << 5,\n  CERT_STATUS_REVOKED = 1 << 6,\n  CERT_STATUS_INVALID = 1 << 7,\n  CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = 1 << 8,\n  // 1 << 9 was used for CERT_STATUS_NOT_IN_DNS\n  CERT_STATUS_NON_UNIQUE_NAME = 1 << 10,\n  CERT_STATUS_WEAK_KEY = 1 << 11,\n  // 1 << 12 was used for CERT_STATUS_WEAK_DH_KEY\n  CERT_STATUS_PINNED_KEY_MISSING = 1 << 13,\n  CERT_STATUS_NAME_CONSTRAINT_VIOLATION = 1 << 14,\n  CERT_STATUS_VALIDITY_TOO_LONG = 1 << 15,\n\n  // Bits 16 to 31 are for non-error statuses.\n  CERT_STATUS_IS_EV = 1 << 16,\n  CERT_STATUS_REV_CHECKING_ENABLED = 1 << 17,\n  // Bit 18 was CERT_STATUS_IS_DNSSEC\n  CERT_STATUS_SHA1_SIGNATURE_PRESENT = 1 << 19,\n  CERT_STATUS_CT_COMPLIANCE_FAILED = 1 << 20,\n} cef_cert_status_t;\n\n///\n// The manner in which a link click should be opened.\n///\ntypedef enum {\n  WOD_UNKNOWN,\n  WOD_SUPPRESS_OPEN,\n  WOD_CURRENT_TAB,\n  WOD_SINGLETON_TAB,\n  WOD_NEW_FOREGROUND_TAB,\n  WOD_NEW_BACKGROUND_TAB,\n  WOD_NEW_POPUP,\n  WOD_NEW_WINDOW,\n  WOD_SAVE_TO_DISK,\n  WOD_OFF_THE_RECORD,\n  WOD_IGNORE_ACTION\n} cef_window_open_disposition_t;\n\n///\n// \"Verb\" of a drag-and-drop operation as negotiated between the source and\n// destination. These constants match their equivalents in WebCore's\n// DragActions.h and should not be renumbered.\n///\ntypedef enum {\n    DRAG_OPERATION_NONE    = 0,\n    DRAG_OPERATION_COPY    = 1,\n    DRAG_OPERATION_LINK    = 2,\n    DRAG_OPERATION_GENERIC = 4,\n    DRAG_OPERATION_PRIVATE = 8,\n    DRAG_OPERATION_MOVE    = 16,\n    DRAG_OPERATION_DELETE  = 32,\n    DRAG_OPERATION_EVERY   = UINT_MAX\n} cef_drag_operations_mask_t;\n\n///\n// V8 access control values.\n///\ntypedef enum {\n  V8_ACCESS_CONTROL_DEFAULT               = 0,\n  V8_ACCESS_CONTROL_ALL_CAN_READ          = 1,\n  V8_ACCESS_CONTROL_ALL_CAN_WRITE         = 1 << 1,\n  V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = 1 << 2\n} cef_v8_accesscontrol_t;\n\n///\n// V8 property attribute values.\n///\ntypedef enum {\n  V8_PROPERTY_ATTRIBUTE_NONE       = 0,       // Writeable, Enumerable,\n                                              //   Configurable\n  V8_PROPERTY_ATTRIBUTE_READONLY   = 1 << 0,  // Not writeable\n  V8_PROPERTY_ATTRIBUTE_DONTENUM   = 1 << 1,  // Not enumerable\n  V8_PROPERTY_ATTRIBUTE_DONTDELETE = 1 << 2   // Not configurable\n} cef_v8_propertyattribute_t;\n\n///\n// Post data elements may represent either bytes or files.\n///\ntypedef enum {\n  PDE_TYPE_EMPTY  = 0,\n  PDE_TYPE_BYTES,\n  PDE_TYPE_FILE,\n} cef_postdataelement_type_t;\n\n///\n// Resource type for a request.\n///\ntypedef enum {\n  ///\n  // Top level page.\n  ///\n  RT_MAIN_FRAME = 0,\n\n  ///\n  // Frame or iframe.\n  ///\n  RT_SUB_FRAME,\n\n  ///\n  // CSS stylesheet.\n  ///\n  RT_STYLESHEET,\n\n  ///\n  // External script.\n  ///\n  RT_SCRIPT,\n\n  ///\n  // Image (jpg/gif/png/etc).\n  ///\n  RT_IMAGE,\n\n  ///\n  // Font.\n  ///\n  RT_FONT_RESOURCE,\n\n  ///\n  // Some other subresource. This is the default type if the actual type is\n  // unknown.\n  ///\n  RT_SUB_RESOURCE,\n\n  ///\n  // Object (or embed) tag for a plugin, or a resource that a plugin requested.\n  ///\n  RT_OBJECT,\n\n  ///\n  // Media resource.\n  ///\n  RT_MEDIA,\n\n  ///\n  // Main resource of a dedicated worker.\n  ///\n  RT_WORKER,\n\n  ///\n  // Main resource of a shared worker.\n  ///\n  RT_SHARED_WORKER,\n\n  ///\n  // Explicitly requested prefetch.\n  ///\n  RT_PREFETCH,\n\n  ///\n  // Favicon.\n  ///\n  RT_FAVICON,\n\n  ///\n  // XMLHttpRequest.\n  ///\n  RT_XHR,\n\n  ///\n  // A request for a <ping>\n  ///\n  RT_PING,\n\n  ///\n  // Main resource of a service worker.\n  ///\n  RT_SERVICE_WORKER,\n\n  ///\n  // A report of Content Security Policy violations.\n  ///\n  RT_CSP_REPORT,\n\n  ///\n  // A resource that a plugin requested.\n  ///\n  RT_PLUGIN_RESOURCE,\n} cef_resource_type_t;\n\n///\n// Transition type for a request. Made up of one source value and 0 or more\n// qualifiers.\n///\ntypedef enum {\n  ///\n  // Source is a link click or the JavaScript window.open function. This is\n  // also the default value for requests like sub-resource loads that are not\n  // navigations.\n  ///\n  TT_LINK = 0,\n\n  ///\n  // Source is some other \"explicit\" navigation action such as creating a new\n  // browser or using the LoadURL function. This is also the default value\n  // for navigations where the actual type is unknown.\n  ///\n  TT_EXPLICIT = 1,\n\n  ///\n  // Source is a subframe navigation. This is any content that is automatically\n  // loaded in a non-toplevel frame. For example, if a page consists of several\n  // frames containing ads, those ad URLs will have this transition type.\n  // The user may not even realize the content in these pages is a separate\n  // frame, so may not care about the URL.\n  ///\n  TT_AUTO_SUBFRAME = 3,\n\n  ///\n  // Source is a subframe navigation explicitly requested by the user that will\n  // generate new navigation entries in the back/forward list. These are\n  // probably more important than frames that were automatically loaded in\n  // the background because the user probably cares about the fact that this\n  // link was loaded.\n  ///\n  TT_MANUAL_SUBFRAME = 4,\n\n  ///\n  // Source is a form submission by the user. NOTE: In some situations\n  // submitting a form does not result in this transition type. This can happen\n  // if the form uses a script to submit the contents.\n  ///\n  TT_FORM_SUBMIT = 7,\n\n  ///\n  // Source is a \"reload\" of the page via the Reload function or by re-visiting\n  // the same URL. NOTE: This is distinct from the concept of whether a\n  // particular load uses \"reload semantics\" (i.e. bypasses cached data).\n  ///\n  TT_RELOAD = 8,\n\n  ///\n  // General mask defining the bits used for the source values.\n  ///\n  TT_SOURCE_MASK = 0xFF,\n\n  // Qualifiers.\n  // Any of the core values above can be augmented by one or more qualifiers.\n  // These qualifiers further define the transition.\n\n  ///\n  // Attempted to visit a URL but was blocked.\n  ///\n  TT_BLOCKED_FLAG = 0x00800000,\n\n  ///\n  // Used the Forward or Back function to navigate among browsing history.\n  ///\n  TT_FORWARD_BACK_FLAG = 0x01000000,\n\n  ///\n  // The beginning of a navigation chain.\n  ///\n  TT_CHAIN_START_FLAG = 0x10000000,\n\n  ///\n  // The last transition in a redirect chain.\n  ///\n  TT_CHAIN_END_FLAG = 0x20000000,\n\n  ///\n  // Redirects caused by JavaScript or a meta refresh tag on the page.\n  ///\n  TT_CLIENT_REDIRECT_FLAG = 0x40000000,\n\n  ///\n  // Redirects sent from the server by HTTP headers.\n  ///\n  TT_SERVER_REDIRECT_FLAG = 0x80000000,\n\n  ///\n  // Used to test whether a transition involves a redirect.\n  ///\n  TT_IS_REDIRECT_MASK = 0xC0000000,\n\n  ///\n  // General mask defining the bits used for the qualifiers.\n  ///\n  TT_QUALIFIER_MASK = 0xFFFFFF00,\n} cef_transition_type_t;\n\n///\n// Flags used to customize the behavior of CefURLRequest.\n///\ntypedef enum {\n  ///\n  // Default behavior.\n  ///\n  UR_FLAG_NONE                      = 0,\n\n  ///\n  // If set the cache will be skipped when handling the request.\n  ///\n  UR_FLAG_SKIP_CACHE                = 1 << 0,\n\n  ///\n  // If set user name, password, and cookies may be sent with the request, and\n  // cookies may be saved from the response.\n  ///\n  UR_FLAG_ALLOW_CACHED_CREDENTIALS  = 1 << 1,\n\n  ///\n  // If set upload progress events will be generated when a request has a body.\n  ///\n  UR_FLAG_REPORT_UPLOAD_PROGRESS    = 1 << 3,\n\n  ///\n  // If set the CefURLRequestClient::OnDownloadData method will not be called.\n  ///\n  UR_FLAG_NO_DOWNLOAD_DATA          = 1 << 6,\n\n  ///\n  // If set 5XX redirect errors will be propagated to the observer instead of\n  // automatically re-tried. This currently only applies for requests\n  // originated in the browser process.\n  ///\n  UR_FLAG_NO_RETRY_ON_5XX           = 1 << 7,\n} cef_urlrequest_flags_t;\n\n///\n// Flags that represent CefURLRequest status.\n///\ntypedef enum {\n  ///\n  // Unknown status.\n  ///\n  UR_UNKNOWN = 0,\n\n  ///\n  // Request succeeded.\n  ///\n  UR_SUCCESS,\n\n  ///\n  // An IO request is pending, and the caller will be informed when it is\n  // completed.\n  ///\n  UR_IO_PENDING,\n\n  ///\n  // Request was canceled programatically.\n  ///\n  UR_CANCELED,\n\n  ///\n  // Request failed for some reason.\n  ///\n  UR_FAILED,\n} cef_urlrequest_status_t;\n\n///\n// Structure representing a point.\n///\ntypedef struct _cef_point_t {\n  int x;\n  int y;\n} cef_point_t;\n\n///\n// Structure representing a rectangle.\n///\ntypedef struct _cef_rect_t {\n  int x;\n  int y;\n  int width;\n  int height;\n} cef_rect_t;\n\n///\n// Structure representing a size.\n///\ntypedef struct _cef_size_t {\n  int width;\n  int height;\n} cef_size_t;\n\n///\n// Structure representing a range.\n///\ntypedef struct _cef_range_t {\n  int from;\n  int to;\n} cef_range_t;\n\n///\n// Structure representing insets.\n///\ntypedef struct _cef_insets_t {\n  int top;\n  int left;\n  int bottom;\n  int right;\n} cef_insets_t;\n\n///\n// Structure representing a draggable region.\n///\ntypedef struct _cef_draggable_region_t {\n  ///\n  // Bounds of the region.\n  ///\n  cef_rect_t bounds;\n\n  ///\n  // True (1) this this region is draggable and false (0) otherwise.\n  ///\n  int draggable;\n} cef_draggable_region_t;\n\n///\n// Existing process IDs.\n///\ntypedef enum {\n  ///\n  // Browser process.\n  ///\n  PID_BROWSER,\n  ///\n  // Renderer process.\n  ///\n  PID_RENDERER,\n} cef_process_id_t;\n\n///\n// Existing thread IDs.\n///\ntypedef enum {\n// BROWSER PROCESS THREADS -- Only available in the browser process.\n\n  ///\n  // The main thread in the browser. This will be the same as the main\n  // application thread if CefInitialize() is called with a\n  // CefSettings.multi_threaded_message_loop value of false.\n  ///\n  TID_UI,\n\n  ///\n  // Used to interact with the database.\n  ///\n  TID_DB,\n\n  ///\n  // Used to interact with the file system.\n  ///\n  TID_FILE,\n\n  ///\n  // Used for file system operations that block user interactions.\n  // Responsiveness of this thread affects users.\n  ///\n  TID_FILE_USER_BLOCKING,\n\n  ///\n  // Used to launch and terminate browser processes.\n  ///\n  TID_PROCESS_LAUNCHER,\n\n  ///\n  // Used to handle slow HTTP cache operations.\n  ///\n  TID_CACHE,\n\n  ///\n  // Used to process IPC and network messages.\n  ///\n  TID_IO,\n\n// RENDER PROCESS THREADS -- Only available in the render process.\n\n  ///\n  // The main thread in the renderer. Used for all WebKit and V8 interaction.\n  ///\n  TID_RENDERER,\n} cef_thread_id_t;\n\n///\n// Supported value types.\n///\ntypedef enum {\n  VTYPE_INVALID = 0,\n  VTYPE_NULL,\n  VTYPE_BOOL,\n  VTYPE_INT,\n  VTYPE_DOUBLE,\n  VTYPE_STRING,\n  VTYPE_BINARY,\n  VTYPE_DICTIONARY,\n  VTYPE_LIST,\n} cef_value_type_t;\n\n///\n// Supported JavaScript dialog types.\n///\ntypedef enum {\n  JSDIALOGTYPE_ALERT = 0,\n  JSDIALOGTYPE_CONFIRM,\n  JSDIALOGTYPE_PROMPT,\n} cef_jsdialog_type_t;\n\n///\n// Screen information used when window rendering is disabled. This structure is\n// passed as a parameter to CefRenderHandler::GetScreenInfo and should be filled\n// in by the client.\n///\ntypedef struct _cef_screen_info_t {\n  ///\n  // Device scale factor. Specifies the ratio between physical and logical\n  // pixels.\n  ///\n  float device_scale_factor;\n\n  ///\n  // The screen depth in bits per pixel.\n  ///\n  int depth;\n\n  ///\n  // The bits per color component. This assumes that the colors are balanced\n  // equally.\n  ///\n  int depth_per_component;\n\n  ///\n  // This can be true for black and white printers.\n  ///\n  int is_monochrome;\n\n  ///\n  // This is set from the rcMonitor member of MONITORINFOEX, to whit:\n  //   \"A RECT structure that specifies the display monitor rectangle,\n  //   expressed in virtual-screen coordinates. Note that if the monitor\n  //   is not the primary display monitor, some of the rectangle's\n  //   coordinates may be negative values.\"\n  //\n  // The |rect| and |available_rect| properties are used to determine the\n  // available surface for rendering popup views.\n  ///\n  cef_rect_t rect;\n\n  ///\n  // This is set from the rcWork member of MONITORINFOEX, to whit:\n  //   \"A RECT structure that specifies the work area rectangle of the\n  //   display monitor that can be used by applications, expressed in\n  //   virtual-screen coordinates. Windows uses this rectangle to\n  //   maximize an application on the monitor. The rest of the area in\n  //   rcMonitor contains system windows such as the task bar and side\n  //   bars. Note that if the monitor is not the primary display monitor,\n  //   some of the rectangle's coordinates may be negative values\".\n  //\n  // The |rect| and |available_rect| properties are used to determine the\n  // available surface for rendering popup views.\n  ///\n  cef_rect_t available_rect;\n} cef_screen_info_t;\n\n///\n// Supported menu IDs. Non-English translations can be provided for the\n// IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString().\n///\ntypedef enum {\n  // Navigation.\n  MENU_ID_BACK                = 100,\n  MENU_ID_FORWARD             = 101,\n  MENU_ID_RELOAD              = 102,\n  MENU_ID_RELOAD_NOCACHE      = 103,\n  MENU_ID_STOPLOAD            = 104,\n\n  // Editing.\n  MENU_ID_UNDO                = 110,\n  MENU_ID_REDO                = 111,\n  MENU_ID_CUT                 = 112,\n  MENU_ID_COPY                = 113,\n  MENU_ID_PASTE               = 114,\n  MENU_ID_DELETE              = 115,\n  MENU_ID_SELECT_ALL          = 116,\n\n  // Miscellaneous.\n  MENU_ID_FIND                = 130,\n  MENU_ID_PRINT               = 131,\n  MENU_ID_VIEW_SOURCE         = 132,\n\n  // Spell checking word correction suggestions.\n  MENU_ID_SPELLCHECK_SUGGESTION_0        = 200,\n  MENU_ID_SPELLCHECK_SUGGESTION_1        = 201,\n  MENU_ID_SPELLCHECK_SUGGESTION_2        = 202,\n  MENU_ID_SPELLCHECK_SUGGESTION_3        = 203,\n  MENU_ID_SPELLCHECK_SUGGESTION_4        = 204,\n  MENU_ID_SPELLCHECK_SUGGESTION_LAST     = 204,\n  MENU_ID_NO_SPELLING_SUGGESTIONS        = 205,\n  MENU_ID_ADD_TO_DICTIONARY              = 206,\n\n  // Custom menu items originating from the renderer process. For example,\n  // plugin placeholder menu items or Flash menu items.\n  MENU_ID_CUSTOM_FIRST        = 220,\n  MENU_ID_CUSTOM_LAST         = 250,\n\n  // All user-defined menu IDs should come between MENU_ID_USER_FIRST and\n  // MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges\n  // defined in the tools/gritsettings/resource_ids file.\n  MENU_ID_USER_FIRST          = 26500,\n  MENU_ID_USER_LAST           = 28500,\n} cef_menu_id_t;\n\n///\n// Mouse button types.\n///\ntypedef enum {\n  MBT_LEFT   = 0,\n  MBT_MIDDLE,\n  MBT_RIGHT,\n} cef_mouse_button_type_t;\n\n///\n// Structure representing mouse event information.\n///\ntypedef struct _cef_mouse_event_t {\n  ///\n  // X coordinate relative to the left side of the view.\n  ///\n  int x;\n\n  ///\n  // Y coordinate relative to the top side of the view.\n  ///\n  int y;\n\n  ///\n  // Bit flags describing any pressed modifier keys. See\n  // cef_event_flags_t for values.\n  ///\n  uint32 modifiers;\n} cef_mouse_event_t;\n\n///\n// Paint element types.\n///\ntypedef enum {\n  PET_VIEW  = 0,\n  PET_POPUP,\n} cef_paint_element_type_t;\n\n///\n// Supported event bit flags.\n///\ntypedef enum {\n  EVENTFLAG_NONE                = 0,\n  EVENTFLAG_CAPS_LOCK_ON        = 1 << 0,\n  EVENTFLAG_SHIFT_DOWN          = 1 << 1,\n  EVENTFLAG_CONTROL_DOWN        = 1 << 2,\n  EVENTFLAG_ALT_DOWN            = 1 << 3,\n  EVENTFLAG_LEFT_MOUSE_BUTTON   = 1 << 4,\n  EVENTFLAG_MIDDLE_MOUSE_BUTTON = 1 << 5,\n  EVENTFLAG_RIGHT_MOUSE_BUTTON  = 1 << 6,\n  // Mac OS-X command key.\n  EVENTFLAG_COMMAND_DOWN        = 1 << 7,\n  EVENTFLAG_NUM_LOCK_ON         = 1 << 8,\n  EVENTFLAG_IS_KEY_PAD          = 1 << 9,\n  EVENTFLAG_IS_LEFT             = 1 << 10,\n  EVENTFLAG_IS_RIGHT            = 1 << 11,\n} cef_event_flags_t;\n\n///\n// Supported menu item types.\n///\ntypedef enum {\n  MENUITEMTYPE_NONE,\n  MENUITEMTYPE_COMMAND,\n  MENUITEMTYPE_CHECK,\n  MENUITEMTYPE_RADIO,\n  MENUITEMTYPE_SEPARATOR,\n  MENUITEMTYPE_SUBMENU,\n} cef_menu_item_type_t;\n\n///\n// Supported context menu type flags.\n///\ntypedef enum {\n  ///\n  // No node is selected.\n  ///\n  CM_TYPEFLAG_NONE        = 0,\n  ///\n  // The top page is selected.\n  ///\n  CM_TYPEFLAG_PAGE        = 1 << 0,\n  ///\n  // A subframe page is selected.\n  ///\n  CM_TYPEFLAG_FRAME       = 1 << 1,\n  ///\n  // A link is selected.\n  ///\n  CM_TYPEFLAG_LINK        = 1 << 2,\n  ///\n  // A media node is selected.\n  ///\n  CM_TYPEFLAG_MEDIA       = 1 << 3,\n  ///\n  // There is a textual or mixed selection that is selected.\n  ///\n  CM_TYPEFLAG_SELECTION   = 1 << 4,\n  ///\n  // An editable element is selected.\n  ///\n  CM_TYPEFLAG_EDITABLE    = 1 << 5,\n} cef_context_menu_type_flags_t;\n\n///\n// Supported context menu media types.\n///\ntypedef enum {\n  ///\n  // No special node is in context.\n  ///\n  CM_MEDIATYPE_NONE,\n  ///\n  // An image node is selected.\n  ///\n  CM_MEDIATYPE_IMAGE,\n  ///\n  // A video node is selected.\n  ///\n  CM_MEDIATYPE_VIDEO,\n  ///\n  // An audio node is selected.\n  ///\n  CM_MEDIATYPE_AUDIO,\n  ///\n  // A file node is selected.\n  ///\n  CM_MEDIATYPE_FILE,\n  ///\n  // A plugin node is selected.\n  ///\n  CM_MEDIATYPE_PLUGIN,\n} cef_context_menu_media_type_t;\n\n///\n// Supported context menu media state bit flags.\n///\ntypedef enum {\n  CM_MEDIAFLAG_NONE                  = 0,\n  CM_MEDIAFLAG_ERROR                 = 1 << 0,\n  CM_MEDIAFLAG_PAUSED                = 1 << 1,\n  CM_MEDIAFLAG_MUTED                 = 1 << 2,\n  CM_MEDIAFLAG_LOOP                  = 1 << 3,\n  CM_MEDIAFLAG_CAN_SAVE              = 1 << 4,\n  CM_MEDIAFLAG_HAS_AUDIO             = 1 << 5,\n  CM_MEDIAFLAG_HAS_VIDEO             = 1 << 6,\n  CM_MEDIAFLAG_CONTROL_ROOT_ELEMENT  = 1 << 7,\n  CM_MEDIAFLAG_CAN_PRINT             = 1 << 8,\n  CM_MEDIAFLAG_CAN_ROTATE            = 1 << 9,\n} cef_context_menu_media_state_flags_t;\n\n///\n// Supported context menu edit state bit flags.\n///\ntypedef enum {\n  CM_EDITFLAG_NONE            = 0,\n  CM_EDITFLAG_CAN_UNDO        = 1 << 0,\n  CM_EDITFLAG_CAN_REDO        = 1 << 1,\n  CM_EDITFLAG_CAN_CUT         = 1 << 2,\n  CM_EDITFLAG_CAN_COPY        = 1 << 3,\n  CM_EDITFLAG_CAN_PASTE       = 1 << 4,\n  CM_EDITFLAG_CAN_DELETE      = 1 << 5,\n  CM_EDITFLAG_CAN_SELECT_ALL  = 1 << 6,\n  CM_EDITFLAG_CAN_TRANSLATE   = 1 << 7,\n} cef_context_menu_edit_state_flags_t;\n\n///\n// Key event types.\n///\ntypedef enum {\n  ///\n  // Notification that a key transitioned from \"up\" to \"down\".\n  ///\n  KEYEVENT_RAWKEYDOWN = 0,\n\n  ///\n  // Notification that a key was pressed. This does not necessarily correspond\n  // to a character depending on the key and language. Use KEYEVENT_CHAR for\n  // character input.\n  ///\n  KEYEVENT_KEYDOWN,\n\n  ///\n  // Notification that a key was released.\n  ///\n  KEYEVENT_KEYUP,\n\n  ///\n  // Notification that a character was typed. Use this for text input. Key\n  // down events may generate 0, 1, or more than one character event depending\n  // on the key, locale, and operating system.\n  ///\n  KEYEVENT_CHAR\n} cef_key_event_type_t;\n\n///\n// Structure representing keyboard event information.\n///\ntypedef struct _cef_key_event_t {\n  ///\n  // The type of keyboard event.\n  ///\n  cef_key_event_type_t type;\n\n  ///\n  // Bit flags describing any pressed modifier keys. See\n  // cef_event_flags_t for values.\n  ///\n  uint32 modifiers;\n\n  ///\n  // The Windows key code for the key event. This value is used by the DOM\n  // specification. Sometimes it comes directly from the event (i.e. on\n  // Windows) and sometimes it's determined using a mapping function. See\n  // WebCore/platform/chromium/KeyboardCodes.h for the list of values.\n  ///\n  int windows_key_code;\n\n  ///\n  // The actual key code genenerated by the platform.\n  ///\n  int native_key_code;\n\n  ///\n  // Indicates whether the event is considered a \"system key\" event (see\n  // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details).\n  // This value will always be false on non-Windows platforms.\n  ///\n  int is_system_key;\n\n  ///\n  // The character generated by the keystroke.\n  ///\n  char16 character;\n\n  ///\n  // Same as |character| but unmodified by any concurrently-held modifiers\n  // (except shift). This is useful for working out shortcut keys.\n  ///\n  char16 unmodified_character;\n\n  ///\n  // True if the focus is currently on an editable field on the page. This is\n  // useful for determining if standard key events should be intercepted.\n  ///\n  int focus_on_editable_field;\n} cef_key_event_t;\n\n///\n// Focus sources.\n///\ntypedef enum {\n  ///\n  // The source is explicit navigation via the API (LoadURL(), etc).\n  ///\n  FOCUS_SOURCE_NAVIGATION = 0,\n  ///\n  // The source is a system-generated focus event.\n  ///\n  FOCUS_SOURCE_SYSTEM,\n} cef_focus_source_t;\n\n///\n// Navigation types.\n///\ntypedef enum {\n  NAVIGATION_LINK_CLICKED = 0,\n  NAVIGATION_FORM_SUBMITTED,\n  NAVIGATION_BACK_FORWARD,\n  NAVIGATION_RELOAD,\n  NAVIGATION_FORM_RESUBMITTED,\n  NAVIGATION_OTHER,\n} cef_navigation_type_t;\n\n///\n// Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and\n// UTF16 (LE and BE) by default. All other types must be translated to UTF8\n// before being passed to the parser. If a BOM is detected and the correct\n// decoder is available then that decoder will be used automatically.\n///\ntypedef enum {\n  XML_ENCODING_NONE = 0,\n  XML_ENCODING_UTF8,\n  XML_ENCODING_UTF16LE,\n  XML_ENCODING_UTF16BE,\n  XML_ENCODING_ASCII,\n} cef_xml_encoding_type_t;\n\n///\n// XML node types.\n///\ntypedef enum {\n  XML_NODE_UNSUPPORTED = 0,\n  XML_NODE_PROCESSING_INSTRUCTION,\n  XML_NODE_DOCUMENT_TYPE,\n  XML_NODE_ELEMENT_START,\n  XML_NODE_ELEMENT_END,\n  XML_NODE_ATTRIBUTE,\n  XML_NODE_TEXT,\n  XML_NODE_CDATA,\n  XML_NODE_ENTITY_REFERENCE,\n  XML_NODE_WHITESPACE,\n  XML_NODE_COMMENT,\n} cef_xml_node_type_t;\n\n///\n// Popup window features.\n///\ntypedef struct _cef_popup_features_t {\n  int x;\n  int xSet;\n  int y;\n  int ySet;\n  int width;\n  int widthSet;\n  int height;\n  int heightSet;\n\n  int menuBarVisible;\n  int statusBarVisible;\n  int toolBarVisible;\n  int locationBarVisible;\n  int scrollbarsVisible;\n  int resizable;\n\n  int fullscreen;\n  int dialog;\n  cef_string_list_t additionalFeatures;\n} cef_popup_features_t;\n\n///\n// DOM document types.\n///\ntypedef enum {\n  DOM_DOCUMENT_TYPE_UNKNOWN = 0,\n  DOM_DOCUMENT_TYPE_HTML,\n  DOM_DOCUMENT_TYPE_XHTML,\n  DOM_DOCUMENT_TYPE_PLUGIN,\n} cef_dom_document_type_t;\n\n///\n// DOM event category flags.\n///\ntypedef enum {\n  DOM_EVENT_CATEGORY_UNKNOWN = 0x0,\n  DOM_EVENT_CATEGORY_UI = 0x1,\n  DOM_EVENT_CATEGORY_MOUSE = 0x2,\n  DOM_EVENT_CATEGORY_MUTATION = 0x4,\n  DOM_EVENT_CATEGORY_KEYBOARD = 0x8,\n  DOM_EVENT_CATEGORY_TEXT = 0x10,\n  DOM_EVENT_CATEGORY_COMPOSITION = 0x20,\n  DOM_EVENT_CATEGORY_DRAG = 0x40,\n  DOM_EVENT_CATEGORY_CLIPBOARD = 0x80,\n  DOM_EVENT_CATEGORY_MESSAGE = 0x100,\n  DOM_EVENT_CATEGORY_WHEEL = 0x200,\n  DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = 0x400,\n  DOM_EVENT_CATEGORY_OVERFLOW = 0x800,\n  DOM_EVENT_CATEGORY_PAGE_TRANSITION = 0x1000,\n  DOM_EVENT_CATEGORY_POPSTATE = 0x2000,\n  DOM_EVENT_CATEGORY_PROGRESS = 0x4000,\n  DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000,\n} cef_dom_event_category_t;\n\n///\n// DOM event processing phases.\n///\ntypedef enum {\n  DOM_EVENT_PHASE_UNKNOWN = 0,\n  DOM_EVENT_PHASE_CAPTURING,\n  DOM_EVENT_PHASE_AT_TARGET,\n  DOM_EVENT_PHASE_BUBBLING,\n} cef_dom_event_phase_t;\n\n///\n// DOM node types.\n///\ntypedef enum {\n  DOM_NODE_TYPE_UNSUPPORTED = 0,\n  DOM_NODE_TYPE_ELEMENT,\n  DOM_NODE_TYPE_ATTRIBUTE,\n  DOM_NODE_TYPE_TEXT,\n  DOM_NODE_TYPE_CDATA_SECTION,\n  DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS,\n  DOM_NODE_TYPE_COMMENT,\n  DOM_NODE_TYPE_DOCUMENT,\n  DOM_NODE_TYPE_DOCUMENT_TYPE,\n  DOM_NODE_TYPE_DOCUMENT_FRAGMENT,\n} cef_dom_node_type_t;\n\n///\n// Supported file dialog modes.\n///\ntypedef enum {\n  ///\n  // Requires that the file exists before allowing the user to pick it.\n  ///\n  FILE_DIALOG_OPEN = 0,\n\n  ///\n  // Like Open, but allows picking multiple files to open.\n  ///\n  FILE_DIALOG_OPEN_MULTIPLE,\n\n  ///\n  // Like Open, but selects a folder to open.\n  ///\n  FILE_DIALOG_OPEN_FOLDER,\n\n  ///\n  // Allows picking a nonexistent file, and prompts to overwrite if the file\n  // already exists.\n  ///\n  FILE_DIALOG_SAVE,\n\n  ///\n  // General mask defining the bits used for the type values.\n  ///\n  FILE_DIALOG_TYPE_MASK = 0xFF,\n\n  // Qualifiers.\n  // Any of the type values above can be augmented by one or more qualifiers.\n  // These qualifiers further define the dialog behavior.\n\n  ///\n  // Prompt to overwrite if the user selects an existing file with the Save\n  // dialog.\n  ///\n  FILE_DIALOG_OVERWRITEPROMPT_FLAG = 0x01000000,\n\n  ///\n  // Do not display read-only files.\n  ///\n  FILE_DIALOG_HIDEREADONLY_FLAG = 0x02000000,\n} cef_file_dialog_mode_t;\n\n///\n// Geoposition error codes.\n///\ntypedef enum {\n  GEOPOSITON_ERROR_NONE = 0,\n  GEOPOSITON_ERROR_PERMISSION_DENIED,\n  GEOPOSITON_ERROR_POSITION_UNAVAILABLE,\n  GEOPOSITON_ERROR_TIMEOUT,\n} cef_geoposition_error_code_t;\n\n///\n// Structure representing geoposition information. The properties of this\n// structure correspond to those of the JavaScript Position object although\n// their types may differ.\n///\ntypedef struct _cef_geoposition_t {\n  ///\n  // Latitude in decimal degrees north (WGS84 coordinate frame).\n  ///\n  double latitude;\n\n  ///\n  // Longitude in decimal degrees west (WGS84 coordinate frame).\n  ///\n  double longitude;\n\n  ///\n  // Altitude in meters (above WGS84 datum).\n  ///\n  double altitude;\n\n  ///\n  // Accuracy of horizontal position in meters.\n  ///\n  double accuracy;\n\n  ///\n  // Accuracy of altitude in meters.\n  ///\n  double altitude_accuracy;\n\n  ///\n  // Heading in decimal degrees clockwise from true north.\n  ///\n  double heading;\n\n  ///\n  // Horizontal component of device velocity in meters per second.\n  ///\n  double speed;\n\n  ///\n  // Time of position measurement in milliseconds since Epoch in UTC time. This\n  // is taken from the host computer's system clock.\n  ///\n  cef_time_t timestamp;\n\n  ///\n  // Error code, see enum above.\n  ///\n  cef_geoposition_error_code_t error_code;\n\n  ///\n  // Human-readable error message.\n  ///\n  cef_string_t error_message;\n} cef_geoposition_t;\n\n///\n// Print job color mode values.\n///\ntypedef enum {\n  COLOR_MODEL_UNKNOWN,\n  COLOR_MODEL_GRAY,\n  COLOR_MODEL_COLOR,\n  COLOR_MODEL_CMYK,\n  COLOR_MODEL_CMY,\n  COLOR_MODEL_KCMY,\n  COLOR_MODEL_CMY_K,  // CMY_K represents CMY+K.\n  COLOR_MODEL_BLACK,\n  COLOR_MODEL_GRAYSCALE,\n  COLOR_MODEL_RGB,\n  COLOR_MODEL_RGB16,\n  COLOR_MODEL_RGBA,\n  COLOR_MODEL_COLORMODE_COLOR,  // Used in samsung printer ppds.\n  COLOR_MODEL_COLORMODE_MONOCHROME,  // Used in samsung printer ppds.\n  COLOR_MODEL_HP_COLOR_COLOR,  // Used in HP color printer ppds.\n  COLOR_MODEL_HP_COLOR_BLACK,  // Used in HP color printer ppds.\n  COLOR_MODEL_PRINTOUTMODE_NORMAL,  // Used in foomatic ppds.\n  COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY,  // Used in foomatic ppds.\n  COLOR_MODEL_PROCESSCOLORMODEL_CMYK,  // Used in canon printer ppds.\n  COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE,  // Used in canon printer ppds.\n  COLOR_MODEL_PROCESSCOLORMODEL_RGB,  // Used in canon printer ppds\n} cef_color_model_t;\n\n///\n// Print job duplex mode values.\n///\ntypedef enum {\n  DUPLEX_MODE_UNKNOWN = -1,\n  DUPLEX_MODE_SIMPLEX,\n  DUPLEX_MODE_LONG_EDGE,\n  DUPLEX_MODE_SHORT_EDGE,\n} cef_duplex_mode_t;\n\n///\n// Cursor type values.\n///\ntypedef enum {\n  CT_POINTER = 0,\n  CT_CROSS,\n  CT_HAND,\n  CT_IBEAM,\n  CT_WAIT,\n  CT_HELP,\n  CT_EASTRESIZE,\n  CT_NORTHRESIZE,\n  CT_NORTHEASTRESIZE,\n  CT_NORTHWESTRESIZE,\n  CT_SOUTHRESIZE,\n  CT_SOUTHEASTRESIZE,\n  CT_SOUTHWESTRESIZE,\n  CT_WESTRESIZE,\n  CT_NORTHSOUTHRESIZE,\n  CT_EASTWESTRESIZE,\n  CT_NORTHEASTSOUTHWESTRESIZE,\n  CT_NORTHWESTSOUTHEASTRESIZE,\n  CT_COLUMNRESIZE,\n  CT_ROWRESIZE,\n  CT_MIDDLEPANNING,\n  CT_EASTPANNING,\n  CT_NORTHPANNING,\n  CT_NORTHEASTPANNING,\n  CT_NORTHWESTPANNING,\n  CT_SOUTHPANNING,\n  CT_SOUTHEASTPANNING,\n  CT_SOUTHWESTPANNING,\n  CT_WESTPANNING,\n  CT_MOVE,\n  CT_VERTICALTEXT,\n  CT_CELL,\n  CT_CONTEXTMENU,\n  CT_ALIAS,\n  CT_PROGRESS,\n  CT_NODROP,\n  CT_COPY,\n  CT_NONE,\n  CT_NOTALLOWED,\n  CT_ZOOMIN,\n  CT_ZOOMOUT,\n  CT_GRAB,\n  CT_GRABBING,\n  CT_CUSTOM,\n} cef_cursor_type_t;\n\n///\n// Structure representing cursor information. |buffer| will be\n// |size.width|*|size.height|*4 bytes in size and represents a BGRA image with\n// an upper-left origin.\n///\ntypedef struct _cef_cursor_info_t {\n  cef_point_t hotspot;\n  float image_scale_factor;\n  void* buffer;\n  cef_size_t size;\n} cef_cursor_info_t;\n\n///\n// URI unescape rules passed to CefURIDecode().\n///\ntypedef enum {\n  ///\n  // Don't unescape anything at all.\n  ///\n  UU_NONE = 0,\n\n  ///\n  // Don't unescape anything special, but all normal unescaping will happen.\n  // This is a placeholder and can't be combined with other flags (since it's\n  // just the absence of them). All other unescape rules imply \"normal\" in\n  // addition to their special meaning. Things like escaped letters, digits,\n  // and most symbols will get unescaped with this mode.\n  ///\n  UU_NORMAL = 1 << 0,\n\n  ///\n  // Convert %20 to spaces. In some places where we're showing URLs, we may\n  // want this. In places where the URL may be copied and pasted out, then\n  // you wouldn't want this since it might not be interpreted in one piece\n  // by other applications.\n  ///\n  UU_SPACES = 1 << 1,\n\n  ///\n  // Unescapes '/' and '\\\\'. If these characters were unescaped, the resulting\n  // URL won't be the same as the source one. Moreover, they are dangerous to\n  // unescape in strings that will be used as file paths or names. This value\n  // should only be used when slashes don't have special meaning, like data\n  // URLs.\n  ///\n  UU_PATH_SEPARATORS = 1 << 2,\n\n  ///\n  // Unescapes various characters that will change the meaning of URLs,\n  // including '%', '+', '&', '#'. Does not unescape path separators.\n  // If these characters were unescaped, the resulting URL won't be the same\n  // as the source one. This flag is used when generating final output like\n  // filenames for URLs where we won't be interpreting as a URL and want to do\n  // as much unescaping as possible.\n  ///\n  UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 << 3,\n\n  ///\n  // Unescapes characters that can be used in spoofing attempts (such as LOCK)\n  // and control characters (such as BiDi control characters and %01).  This\n  // INCLUDES NULLs.  This is used for rare cases such as data: URL decoding\n  // where the result is binary data.\n  //\n  // DO NOT use UU_SPOOFING_AND_CONTROL_CHARS if the URL is going to be\n  // displayed in the UI for security reasons.\n  ///\n  UU_SPOOFING_AND_CONTROL_CHARS = 1 << 4,\n\n  ///\n  // URL queries use \"+\" for space. This flag controls that replacement.\n  ///\n  UU_REPLACE_PLUS_WITH_SPACE = 1 << 5,\n} cef_uri_unescape_rule_t;\n\n///\n// Options that can be passed to CefParseJSON.\n///\ntypedef enum {\n  ///\n  // Parses the input strictly according to RFC 4627. See comments in Chromium's\n  // base/json/json_reader.h file for known limitations/deviations from the RFC.\n  ///\n  JSON_PARSER_RFC = 0,\n\n  ///\n  // Allows commas to exist after the last element in structures.\n  ///\n  JSON_PARSER_ALLOW_TRAILING_COMMAS = 1 << 0,\n} cef_json_parser_options_t;\n\n///\n// Error codes that can be returned from CefParseJSONAndReturnError.\n///\ntypedef enum {\n  JSON_NO_ERROR = 0,\n  JSON_INVALID_ESCAPE,\n  JSON_SYNTAX_ERROR,\n  JSON_UNEXPECTED_TOKEN,\n  JSON_TRAILING_COMMA,\n  JSON_TOO_MUCH_NESTING,\n  JSON_UNEXPECTED_DATA_AFTER_ROOT,\n  JSON_UNSUPPORTED_ENCODING,\n  JSON_UNQUOTED_DICTIONARY_KEY,\n  JSON_PARSE_ERROR_COUNT\n} cef_json_parser_error_t;\n\n///\n// Options that can be passed to CefWriteJSON.\n///\ntypedef enum {\n  ///\n  // Default behavior.\n  ///\n  JSON_WRITER_DEFAULT = 0,\n\n  ///\n  // This option instructs the writer that if a Binary value is encountered,\n  // the value (and key if within a dictionary) will be omitted from the\n  // output, and success will be returned. Otherwise, if a binary value is\n  // encountered, failure will be returned.\n  ///\n  JSON_WRITER_OMIT_BINARY_VALUES = 1 << 0,\n\n  ///\n  // This option instructs the writer to write doubles that have no fractional\n  // part as a normal integer (i.e., without using exponential notation\n  // or appending a '.0') as long as the value is within the range of a\n  // 64-bit int.\n  ///\n  JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = 1 << 1,\n\n  ///\n  // Return a slightly nicer formatted json string (pads with whitespace to\n  // help with readability).\n  ///\n  JSON_WRITER_PRETTY_PRINT = 1 << 2,\n} cef_json_writer_options_t;\n\n///\n// Margin type for PDF printing.\n///\ntypedef enum {\n  ///\n  // Default margins.\n  ///\n  PDF_PRINT_MARGIN_DEFAULT,\n\n  ///\n  // No margins.\n  ///\n  PDF_PRINT_MARGIN_NONE,\n\n  ///\n  // Minimum margins.\n  ///\n  PDF_PRINT_MARGIN_MINIMUM,\n\n  ///\n  // Custom margins using the |margin_*| values from cef_pdf_print_settings_t.\n  ///\n  PDF_PRINT_MARGIN_CUSTOM,\n} cef_pdf_print_margin_type_t;\n\n///\n// Structure representing PDF print settings.\n///\ntypedef struct _cef_pdf_print_settings_t {\n  ///\n  // Page title to display in the header. Only used if |header_footer_enabled|\n  // is set to true (1).\n  ///\n  cef_string_t header_footer_title;\n\n  ///\n  // URL to display in the footer. Only used if |header_footer_enabled| is set\n  // to true (1).\n  ///\n  cef_string_t header_footer_url;\n\n  ///\n  // Output page size in microns. If either of these values is less than or\n  // equal to zero then the default paper size (A4) will be used.\n  ///\n  int page_width;\n  int page_height;\n\n  ///\n  // Margins in millimeters. Only used if |margin_type| is set to\n  // PDF_PRINT_MARGIN_CUSTOM.\n  ///\n  double margin_top;\n  double margin_right;\n  double margin_bottom;\n  double margin_left;\n\n  ///\n  // Margin type.\n  ///\n  cef_pdf_print_margin_type_t margin_type;\n\n  ///\n  // Set to true (1) to print headers and footers or false (0) to not print\n  // headers and footers.\n  ///\n  int header_footer_enabled;\n\n  ///\n  // Set to true (1) to print the selection only or false (0) to print all.\n  ///\n  int selection_only;\n\n  ///\n  // Set to true (1) for landscape mode or false (0) for portrait mode.\n  ///\n  int landscape;\n\n  ///\n  // Set to true (1) to print background graphics or false (0) to not print\n  // background graphics.\n  ///\n  int backgrounds_enabled;\n\n} cef_pdf_print_settings_t;\n\n///\n// Supported UI scale factors for the platform. SCALE_FACTOR_NONE is used for\n// density independent resources such as string, html/js files or an image that\n// can be used for any scale factors (such as wallpapers).\n///\ntypedef enum {\n  SCALE_FACTOR_NONE = 0,\n  SCALE_FACTOR_100P,\n  SCALE_FACTOR_125P,\n  SCALE_FACTOR_133P,\n  SCALE_FACTOR_140P,\n  SCALE_FACTOR_150P,\n  SCALE_FACTOR_180P,\n  SCALE_FACTOR_200P,\n  SCALE_FACTOR_250P,\n  SCALE_FACTOR_300P,\n} cef_scale_factor_t;\n\n///\n// Plugin policies supported by CefRequestContextHandler::OnBeforePluginLoad.\n///\ntypedef enum {\n  ///\n  // Allow the content.\n  ///\n  PLUGIN_POLICY_ALLOW,\n\n  ///\n  // Allow important content and block unimportant content based on heuristics.\n  // The user can manually load blocked content.\n  ///\n  PLUGIN_POLICY_DETECT_IMPORTANT,\n\n  ///\n  // Block the content. The user can manually load blocked content.\n  ///\n  PLUGIN_POLICY_BLOCK,\n\n  ///\n  // Disable the content. The user cannot load disabled content.\n  ///\n  PLUGIN_POLICY_DISABLE,\n} cef_plugin_policy_t;\n\n///\n// Policy for how the Referrer HTTP header value will be sent during navigation.\n// If the `--no-referrers` command-line flag is specified then the policy value\n// will be ignored and the Referrer value will never be sent.\n///\ntypedef enum {\n  ///\n  // Always send the complete Referrer value.\n  ///\n  REFERRER_POLICY_ALWAYS,\n\n  ///\n  // Use the default policy. This is REFERRER_POLICY_ORIGIN_WHEN_CROSS_ORIGIN\n  // when the `--reduced-referrer-granularity` command-line flag is specified\n  // and REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE otherwise.\n  //\n  ///\n  REFERRER_POLICY_DEFAULT,\n\n  ///\n  // When navigating from HTTPS to HTTP do not send the Referrer value.\n  // Otherwise, send the complete Referrer value.\n  ///\n  REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE,\n\n  ///\n  // Never send the Referrer value.\n  ///\n  REFERRER_POLICY_NEVER,\n\n  ///\n  // Only send the origin component of the Referrer value.\n  ///\n  REFERRER_POLICY_ORIGIN,\n\n  ///\n  // When navigating cross-origin only send the origin component of the Referrer\n  // value. Otherwise, send the complete Referrer value.\n  ///\n  REFERRER_POLICY_ORIGIN_WHEN_CROSS_ORIGIN,\n} cef_referrer_policy_t;\n\n///\n// Return values for CefResponseFilter::Filter().\n///\ntypedef enum {\n  ///\n  // Some or all of the pre-filter data was read successfully but more data is\n  // needed in order to continue filtering (filtered output is pending).\n  ///\n  RESPONSE_FILTER_NEED_MORE_DATA,\n\n  ///\n  // Some or all of the pre-filter data was read successfully and all available\n  // filtered output has been written.\n  ///\n  RESPONSE_FILTER_DONE,\n\n  ///\n  // An error occurred during filtering.\n  ///\n  RESPONSE_FILTER_ERROR\n} cef_response_filter_status_t;\n\n///\n// Describes how to interpret the components of a pixel.\n///\ntypedef enum {\n  ///\n  // RGBA with 8 bits per pixel (32bits total).\n  ///\n  CEF_COLOR_TYPE_RGBA_8888,\n\n  ///\n  // BGRA with 8 bits per pixel (32bits total).\n  ///\n  CEF_COLOR_TYPE_BGRA_8888,\n} cef_color_type_t;\n\n///\n// Describes how to interpret the alpha component of a pixel.\n///\ntypedef enum {\n  ///\n  // No transparency. The alpha component is ignored.\n  ///\n  CEF_ALPHA_TYPE_OPAQUE,\n\n  ///\n  // Transparency with pre-multiplied alpha component.\n  ///\n  CEF_ALPHA_TYPE_PREMULTIPLIED,\n  \n  ///\n  // Transparency with post-multiplied alpha component.\n  ///\n  CEF_ALPHA_TYPE_POSTMULTIPLIED,\n} cef_alpha_type_t;\n\n///\n// Text style types. Should be kepy in sync with gfx::TextStyle.\n///\ntypedef enum {\n  CEF_TEXT_STYLE_BOLD,\n  CEF_TEXT_STYLE_ITALIC,\n  CEF_TEXT_STYLE_STRIKE,\n  CEF_TEXT_STYLE_DIAGONAL_STRIKE,\n  CEF_TEXT_STYLE_UNDERLINE,\n} cef_text_style_t;\n\n///\n// Specifies where along the main axis the CefBoxLayout child views should be\n// laid out.\n///\ntypedef enum {\n  ///\n  // Child views will be left-aligned.\n  ///\n  CEF_MAIN_AXIS_ALIGNMENT_START,\n\n  ///\n  // Child views will be center-aligned.\n  ///\n  CEF_MAIN_AXIS_ALIGNMENT_CENTER,\n\n  ///\n  // Child views will be right-aligned.\n  ///\n  CEF_MAIN_AXIS_ALIGNMENT_END,\n} cef_main_axis_alignment_t;\n\n///\n// Specifies where along the cross axis the CefBoxLayout child views should be\n// laid out.\n///\ntypedef enum {\n  ///\n  // Child views will be stretched to fit.\n  ///\n  CEF_CROSS_AXIS_ALIGNMENT_STRETCH,\n\n  ///\n  // Child views will be left-aligned.\n  ///\n  CEF_CROSS_AXIS_ALIGNMENT_START,\n\n  ///\n  // Child views will be center-aligned.\n  ///\n  CEF_CROSS_AXIS_ALIGNMENT_CENTER,\n\n  ///\n  // Child views will be right-aligned.\n  ///\n  CEF_CROSS_AXIS_ALIGNMENT_END,\n} cef_cross_axis_alignment_t;\n\n///\n// Settings used when initializing a CefBoxLayout.\n///\ntypedef struct _cef_box_layout_settings_t {\n  ///\n  // If true (1) the layout will be horizontal, otherwise the layout will be\n  // vertical.\n  ///\n  int horizontal;\n\n  ///\n  // Adds additional horizontal space between the child view area and the host\n  // view border.\n  ///\n  int inside_border_horizontal_spacing;\n\n  ///\n  // Adds additional vertical space between the child view area and the host\n  // view border.\n  ///\n  int inside_border_vertical_spacing;\n\n  ///\n  // Adds additional space around the child view area.\n  ///\n  cef_insets_t inside_border_insets;\n\n  ///\n  // Adds additional space between child views.\n  ///\n  int between_child_spacing;\n\n  ///\n  // Specifies where along the main axis the child views should be laid out.\n  ///\n  cef_main_axis_alignment_t main_axis_alignment;\n\n  ///\n  // Specifies where along the cross axis the child views should be laid out.\n  ///\n  cef_cross_axis_alignment_t cross_axis_alignment;\n\n  ///\n  // Minimum cross axis size.\n  ///\n  int minimum_cross_axis_size;\n\n  ///\n  // Default flex for views when none is specified via CefBoxLayout methods.\n  // Using the preferred size as the basis, free space along the main axis is\n  // distributed to views in the ratio of their flex weights. Similarly, if the\n  // views will overflow the parent, space is subtracted in these ratios. A flex\n  // of 0 means this view is not resized. Flex values must not be negative.\n  ///\n  int default_flex;\n} cef_box_layout_settings_t;\n\n///\n// Specifies the button display state.\n///\ntypedef enum {\n  CEF_BUTTON_STATE_NORMAL,\n  CEF_BUTTON_STATE_HOVERED,\n  CEF_BUTTON_STATE_PRESSED,\n  CEF_BUTTON_STATE_DISABLED,\n} cef_button_state_t;\n\n///\n// Specifies the horizontal text alignment mode.\n///\ntypedef enum {\n  ///\n  // Align the text's left edge with that of its display area.\n  ///\n  CEF_HORIZONTAL_ALIGNMENT_LEFT,\n\n  ///\n  // Align the text's center with that of its display area.\n  ///\n  CEF_HORIZONTAL_ALIGNMENT_CENTER,\n\n  ///\n  // Align the text's right edge with that of its display area.\n  ///\n  CEF_HORIZONTAL_ALIGNMENT_RIGHT,\n} cef_horizontal_alignment_t;\n\n///\n// Specifies how a menu will be anchored for non-RTL languages. The opposite\n// position will be used for RTL languages.\n///\ntypedef enum {\n  CEF_MENU_ANCHOR_TOPLEFT,\n  CEF_MENU_ANCHOR_TOPRIGHT,\n  CEF_MENU_ANCHOR_BOTTOMCENTER,\n} cef_menu_anchor_position_t;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_TYPES_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_types_win.h",
    "content": "// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_\n#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_\n#pragma once\n\n#include \"include/base/cef_build.h\"\n\n#if defined(OS_WIN)\n#include <windows.h>\n#include \"include/internal/cef_string.h\"\n\n// Handle types.\n#define cef_cursor_handle_t HCURSOR\n#define cef_event_handle_t MSG*\n#define cef_window_handle_t HWND\n#define cef_text_input_context_t void*\n\n#define kNullCursorHandle NULL\n#define kNullEventHandle NULL\n#define kNullWindowHandle NULL\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n///\n// Structure representing CefExecuteProcess arguments.\n///\ntypedef struct _cef_main_args_t {\n  HINSTANCE instance;\n} cef_main_args_t;\n\n///\n// Structure representing window information.\n///\ntypedef struct _cef_window_info_t {\n  // Standard parameters required by CreateWindowEx()\n  DWORD ex_style;\n  cef_string_t window_name;\n  DWORD style;\n  int x;\n  int y;\n  int width;\n  int height;\n  cef_window_handle_t parent_window;\n  HMENU menu;\n\n  ///\n  // Set to true (1) to create the browser using windowless (off-screen)\n  // rendering. No window will be created for the browser and all rendering will\n  // occur via the CefRenderHandler interface. The |parent_window| value will be\n  // used to identify monitor info and to act as the parent window for dialogs,\n  // context menus, etc. If |parent_window| is not provided then the main screen\n  // monitor will be used and some functionality that requires a parent window\n  // may not function correctly. In order to create windowless browsers the\n  // CefSettings.windowless_rendering_enabled value must be set to true.\n  ///\n  int windowless_rendering_enabled;\n\n  ///\n  // Set to true (1) to enable transparent painting in combination with\n  // windowless rendering. When this value is true a transparent background\n  // color will be used (RGBA=0x00000000). When this value is false the\n  // background will be white and opaque.\n  ///\n  int transparent_painting_enabled;\n\n  ///\n  // Handle for the new browser window. Only used with windowed rendering.\n  ///\n  cef_window_handle_t window;\n} cef_window_info_t;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  // OS_WIN\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_types_wrappers.h",
    "content": "// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_\n#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_\n#pragma once\n\n#include \"include/internal/cef_string.h\"\n#include \"include/internal/cef_string_list.h\"\n#include \"include/internal/cef_types.h\"\n\n///\n// Template class that provides common functionality for CEF structure wrapping.\n///\ntemplate <class traits>\nclass CefStructBase : public traits::struct_type {\n public:\n  typedef typename traits::struct_type struct_type;\n\n  CefStructBase() : attached_to_(NULL) {\n    Init();\n  }\n  virtual ~CefStructBase() {\n    // Only clear this object's data if it isn't currently attached to a\n    // structure.\n    if (!attached_to_)\n      Clear(this);\n  }\n\n  CefStructBase(const CefStructBase& r) {\n    Init();\n    *this = r;\n  }\n  CefStructBase(const struct_type& r) {  // NOLINT(runtime/explicit)\n    Init();\n    *this = r;\n  }\n\n  ///\n  // Clear this object's values.\n  ///\n  void Reset() {\n    Clear(this);\n    Init();\n  }\n\n  ///\n  // Attach to the source structure's existing values. DetachTo() can be called\n  // to insert the values back into the existing structure.\n  ///\n  void AttachTo(struct_type& source) {\n    // Only clear this object's data if it isn't currently attached to a\n    // structure.\n    if (!attached_to_)\n      Clear(this);\n\n    // This object is now attached to the new structure.\n    attached_to_ = &source;\n\n    // Transfer ownership of the values from the source structure.\n    memcpy(static_cast<struct_type*>(this), &source, sizeof(struct_type));\n  }\n\n  ///\n  // Relinquish ownership of values to the target structure.\n  ///\n  void DetachTo(struct_type& target) {\n    if (attached_to_ != &target) {\n      // Clear the target structure's values only if we are not currently\n      // attached to that structure.\n      Clear(&target);\n    }\n\n    // Transfer ownership of the values to the target structure.\n    memcpy(&target, static_cast<struct_type*>(this), sizeof(struct_type));\n\n    // Remove the references from this object.\n    Init();\n  }\n\n  ///\n  // Set this object's values. If |copy| is true the source structure's values\n  // will be copied instead of referenced.\n  ///\n  void Set(const struct_type& source, bool copy) {\n    traits::set(&source, this, copy);\n  }\n\n  CefStructBase& operator=(const CefStructBase& s) {\n    return operator=(static_cast<const struct_type&>(s));\n  }\n\n  CefStructBase& operator=(const struct_type& s) {\n    Set(s, true);\n    return *this;\n  }\n\n protected:\n  void Init() {\n    memset(static_cast<struct_type*>(this), 0, sizeof(struct_type));\n    attached_to_ = NULL;\n    traits::init(this);\n  }\n\n  static void Clear(struct_type* s) { traits::clear(s); }\n\n  struct_type* attached_to_;\n};\n\n\nstruct CefPointTraits {\n  typedef cef_point_t struct_type;\n\n  static inline void init(struct_type* s) {}\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    *target = *src;\n  }\n};\n\n///\n// Class representing a point.\n///\nclass CefPoint : public CefStructBase<CefPointTraits> {\n public:\n  typedef CefStructBase<CefPointTraits> parent;\n\n  CefPoint() : parent() {}\n  CefPoint(const cef_point_t& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  CefPoint(const CefPoint& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  CefPoint(int x, int y) : parent() {\n    Set(x, y);\n  }\n\n  bool IsEmpty() const { return x <= 0 && y <= 0; }\n  void Set(int x_val, int y_val) {\n    x = x_val, y = y_val;\n  }\n};\n\ninline bool operator==(const CefPoint& a, const CefPoint& b) {\n  return a.x == b.x && a.y == b.y;\n}\n\ninline bool operator!=(const CefPoint& a, const CefPoint& b) {\n  return !(a == b);\n}\n\n\nstruct CefRectTraits {\n  typedef cef_rect_t struct_type;\n\n  static inline void init(struct_type* s) {}\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    *target = *src;\n  }\n};\n\n///\n// Class representing a rectangle.\n///\nclass CefRect : public CefStructBase<CefRectTraits> {\n public:\n  typedef CefStructBase<CefRectTraits> parent;\n\n  CefRect() : parent() {}\n  CefRect(const cef_rect_t& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  CefRect(const CefRect& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  CefRect(int x, int y, int width, int height) : parent() {\n    Set(x, y, width, height);\n  }\n\n  bool IsEmpty() const { return width <= 0 || height <= 0; }\n  void Set(int x_val, int y_val, int width_val, int height_val) {\n    x = x_val, y = y_val, width = width_val, height = height_val;\n  }\n\n  // Returns true if the point identified by point_x and point_y falls inside\n  // this rectangle.  The point (x, y) is inside the rectangle, but the\n  // point (x + width, y + height) is not.\n  bool Contains(int point_x, int point_y) const {\n    return (point_x >= x) && (point_x < x + width) && (point_y >= y) &&\n           (point_y < y + height);\n  }\n  bool Contains(const CefPoint& point) const {\n    return Contains(point.x, point.y);\n  }\n};\n\ninline bool operator==(const CefRect& a, const CefRect& b) {\n  return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height;\n}\n\ninline bool operator!=(const CefRect& a, const CefRect& b) {\n  return !(a == b);\n}\n\n\nstruct CefSizeTraits {\n  typedef cef_size_t struct_type;\n\n  static inline void init(struct_type* s) {}\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    *target = *src;\n  }\n};\n\n///\n// Class representing a size.\n///\nclass CefSize : public CefStructBase<CefSizeTraits> {\n public:\n  typedef CefStructBase<CefSizeTraits> parent;\n\n  CefSize() : parent() {}\n  CefSize(const cef_size_t& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  CefSize(const CefSize& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  CefSize(int width, int height) : parent() {\n    Set(width, height);\n  }\n\n  bool IsEmpty() const { return width <= 0 || height <= 0; }\n  void Set(int width_val, int height_val) {\n    width = width_val, height = height_val;\n  }\n};\n\ninline bool operator==(const CefSize& a, const CefSize& b) {\n  return a.width == b.width && a.height == b.height;\n}\n\ninline bool operator!=(const CefSize& a, const CefSize& b) {\n  return !(a == b);\n}\n\n\nstruct CefRangeTraits {\n  typedef cef_range_t struct_type;\n\n  static inline void init(struct_type* s) {}\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    *target = *src;\n  }\n};\n\n///\n// Class representing a range.\n///\nclass CefRange : public CefStructBase<CefRangeTraits> {\n public:\n  typedef CefStructBase<CefRangeTraits> parent;\n\n  CefRange() : parent() {}\n  CefRange(const cef_range_t& r)  // NOLINT(runtime/explicit)\n      : parent(r) {}\n  CefRange(const CefRange& r)  // NOLINT(runtime/explicit)\n      : parent(r) {}\n  CefRange(int from, int to) : parent() {\n    Set(from, to);\n  }\n\n  void Set(int from_val, int to_val) {\n    from = from_val, to = to_val;\n  }\n};\n\ninline bool operator==(const CefRange& a, const CefRange& b) {\n  return a.from == b.from && a.to == b.to;\n}\n\ninline bool operator!=(const CefRange& a, const CefRange& b) {\n  return !(a == b);\n}\n\n\nstruct CefInsetsTraits {\n  typedef cef_insets_t struct_type;\n\n  static inline void init(struct_type* s) {}\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    *target = *src;\n  }\n};\n\n///\n// Class representing insets.\n///\nclass CefInsets : public CefStructBase<CefInsetsTraits> {\n public:\n  typedef CefStructBase<CefInsetsTraits> parent;\n\n  CefInsets() : parent() {}\n  CefInsets(const cef_insets_t& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  CefInsets(const CefInsets& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  CefInsets(int top, int left, int bottom, int right) : parent() {\n    Set(top, left, bottom, right);\n  }\n\n  void Set(int top_val, int left_val, int bottom_val, int right_val) {\n    top = top_val, left = left_val, bottom = bottom_val, right = right_val;\n  }\n};\n\ninline bool operator==(const CefInsets& a, const CefInsets& b) {\n  return a.top == b.top && a.left == b.left && a.bottom == b.bottom &&\n         a.right == b.right;\n}\n\ninline bool operator!=(const CefInsets& a, const CefInsets& b) {\n  return !(a == b);\n}\n\n\nstruct CefDraggableRegionTraits {\n  typedef cef_draggable_region_t struct_type;\n\n  static inline void init(struct_type* s) {}\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    *target = *src;\n  }\n};\n\n///\n// Class representing a draggable region.\n///\nclass CefDraggableRegion : public CefStructBase<CefDraggableRegionTraits> {\n public:\n  typedef CefStructBase<CefDraggableRegionTraits> parent;\n\n  CefDraggableRegion() : parent() {}\n  CefDraggableRegion(const cef_draggable_region_t& r)  // NOLINT(runtime/explicit)\n    : parent(r) {}\n  CefDraggableRegion(const CefDraggableRegion& r)  // NOLINT(runtime/explicit)\n    : parent(r) {}\n  CefDraggableRegion(const CefRect& bounds, bool draggable) : parent() {\n    Set(bounds, draggable);\n  }\n\n  void Set(const CefRect& bounds_val, bool draggable_val) {\n    bounds = bounds_val, draggable = draggable_val;\n  }\n};\n\ninline bool operator==(const CefDraggableRegion& a,\n    const CefDraggableRegion& b) {\n  return a.bounds == b.bounds && a.draggable == b.draggable;\n}\n\ninline bool operator!=(const CefDraggableRegion& a,\n    const CefDraggableRegion& b) {\n  return !(a == b);\n}\n\n\nstruct CefScreenInfoTraits {\n  typedef cef_screen_info_t struct_type;\n\n  static inline void init(struct_type* s) {}\n\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    target->device_scale_factor = src->device_scale_factor;\n    target->depth = src->depth;\n    target->depth_per_component = src->depth_per_component;\n    target->is_monochrome = src->is_monochrome;\n    target->rect = src->rect;\n    target->available_rect = src->available_rect;\n  }\n};\n\n///\n// Class representing the virtual screen information for use when window\n// rendering is disabled.\n///\nclass CefScreenInfo : public CefStructBase<CefScreenInfoTraits> {\n public:\n  typedef CefStructBase<CefScreenInfoTraits> parent;\n\n  CefScreenInfo() : parent() {}\n  CefScreenInfo(const cef_screen_info_t& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  CefScreenInfo(const CefScreenInfo& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  CefScreenInfo(float device_scale_factor,\n                int depth,\n                int depth_per_component,\n                bool is_monochrome,\n                const CefRect& rect,\n                const CefRect& available_rect) : parent() {\n    Set(device_scale_factor, depth, depth_per_component,\n        is_monochrome, rect, available_rect);\n  }\n\n  void Set(float device_scale_factor_val,\n           int depth_val,\n           int depth_per_component_val,\n           bool is_monochrome_val,\n           const CefRect& rect_val,\n           const CefRect& available_rect_val) {\n    device_scale_factor = device_scale_factor_val;\n    depth = depth_val;\n    depth_per_component = depth_per_component_val;\n    is_monochrome = is_monochrome_val;\n    rect = rect_val;\n    available_rect = available_rect_val;\n  }\n};\n\n\nstruct CefKeyEventTraits {\n  typedef cef_key_event_t struct_type;\n\n  static inline void init(struct_type* s) {}\n\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    target->type = src->type;\n    target->modifiers = src->modifiers;\n    target->windows_key_code = src->windows_key_code;\n    target->native_key_code = src->native_key_code;\n    target->is_system_key = src->is_system_key;\n    target->character = src->character;\n    target->unmodified_character = src->unmodified_character;\n    target->focus_on_editable_field = src->focus_on_editable_field;\n  }\n};\n\n///\n// Class representing a a keyboard event.\n///\ntypedef CefStructBase<CefKeyEventTraits> CefKeyEvent;\n\n\nstruct CefMouseEventTraits {\n  typedef cef_mouse_event_t struct_type;\n\n  static inline void init(struct_type* s) {}\n\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    target->x = src->x;\n    target->y = src->y;\n    target->modifiers = src->modifiers;\n  }\n};\n\n///\n// Class representing a mouse event.\n///\ntypedef CefStructBase<CefMouseEventTraits> CefMouseEvent;\n\n\nstruct CefPopupFeaturesTraits {\n  typedef cef_popup_features_t struct_type;\n\n  static inline void init(struct_type* s) {\n    s->menuBarVisible = true;\n    s->statusBarVisible = true;\n    s->toolBarVisible = true;\n    s->locationBarVisible = true;\n    s->scrollbarsVisible = true;\n    s->resizable = true;\n  }\n\n  static inline void clear(struct_type* s) {\n    if (s->additionalFeatures)\n      cef_string_list_free(s->additionalFeatures);\n  }\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    if (target->additionalFeatures)\n      cef_string_list_free(target->additionalFeatures);\n    target->additionalFeatures = src->additionalFeatures ?\n        cef_string_list_copy(src->additionalFeatures) : NULL;\n\n    target->x = src->x;\n    target->xSet = src->xSet;\n    target->y = src->y;\n    target->ySet = src->ySet;\n    target->width = src->width;\n    target->widthSet = src->widthSet;\n    target->height = src->height;\n    target->heightSet = src->heightSet;\n    target->menuBarVisible = src->menuBarVisible;\n    target->statusBarVisible = src->statusBarVisible;\n    target->toolBarVisible = src->toolBarVisible;\n    target->locationBarVisible = src->locationBarVisible;\n    target->scrollbarsVisible = src->scrollbarsVisible;\n    target->resizable = src->resizable;\n    target->fullscreen = src->fullscreen;\n    target->dialog = src->dialog;\n  }\n};\n\n///\n// Class representing popup window features.\n///\ntypedef CefStructBase<CefPopupFeaturesTraits> CefPopupFeatures;\n\n\nstruct CefSettingsTraits {\n  typedef cef_settings_t struct_type;\n\n  static inline void init(struct_type* s) {\n    s->size = sizeof(struct_type);\n  }\n\n  static inline void clear(struct_type* s) {\n    cef_string_clear(&s->browser_subprocess_path);\n    cef_string_clear(&s->cache_path);\n    cef_string_clear(&s->user_data_path);\n    cef_string_clear(&s->user_agent);\n    cef_string_clear(&s->product_version);\n    cef_string_clear(&s->locale);\n    cef_string_clear(&s->log_file);\n    cef_string_clear(&s->javascript_flags);\n    cef_string_clear(&s->resources_dir_path);\n    cef_string_clear(&s->locales_dir_path);\n    cef_string_clear(&s->accept_language_list);\n  }\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    target->single_process = src->single_process;\n    target->no_sandbox = src->no_sandbox;\n    cef_string_set(src->browser_subprocess_path.str,\n        src->browser_subprocess_path.length,\n        &target->browser_subprocess_path, copy);\n    target->multi_threaded_message_loop = src->multi_threaded_message_loop;\n    target->windowless_rendering_enabled = src->windowless_rendering_enabled;\n    target->command_line_args_disabled = src->command_line_args_disabled;\n\n    cef_string_set(src->cache_path.str, src->cache_path.length,\n        &target->cache_path, copy);\n    cef_string_set(src->user_data_path.str, src->user_data_path.length,\n        &target->user_data_path, copy);\n    target->persist_session_cookies = src->persist_session_cookies;\n    target->persist_user_preferences = src->persist_user_preferences;\n\n    cef_string_set(src->user_agent.str, src->user_agent.length,\n        &target->user_agent, copy);\n    cef_string_set(src->product_version.str, src->product_version.length,\n        &target->product_version, copy);\n    cef_string_set(src->locale.str, src->locale.length, &target->locale, copy);\n\n    cef_string_set(src->log_file.str, src->log_file.length, &target->log_file,\n        copy);\n    target->log_severity = src->log_severity;\n    cef_string_set(src->javascript_flags.str, src->javascript_flags.length,\n        &target->javascript_flags, copy);\n\n    cef_string_set(src->resources_dir_path.str, src->resources_dir_path.length,\n        &target->resources_dir_path, copy);\n    cef_string_set(src->locales_dir_path.str, src->locales_dir_path.length,\n        &target->locales_dir_path, copy);\n    target->pack_loading_disabled = src->pack_loading_disabled;\n    target->remote_debugging_port = src->remote_debugging_port;\n    target->uncaught_exception_stack_size = src->uncaught_exception_stack_size;\n    target->context_safety_implementation = src->context_safety_implementation;\n    target->ignore_certificate_errors = src->ignore_certificate_errors;\n    target->background_color = src->background_color;\n\n    cef_string_set(src->accept_language_list.str,\n        src->accept_language_list.length, &target->accept_language_list, copy);\n  }\n};\n\n///\n// Class representing initialization settings.\n///\ntypedef CefStructBase<CefSettingsTraits> CefSettings;\n\n\nstruct CefRequestContextSettingsTraits {\n  typedef cef_request_context_settings_t struct_type;\n\n  static inline void init(struct_type* s) {\n    s->size = sizeof(struct_type);\n  }\n\n  static inline void clear(struct_type* s) {\n    cef_string_clear(&s->cache_path);\n    cef_string_clear(&s->accept_language_list);\n  }\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    cef_string_set(src->cache_path.str, src->cache_path.length,\n        &target->cache_path, copy);\n    target->persist_session_cookies = src->persist_session_cookies;\n    target->persist_user_preferences = src->persist_user_preferences;\n    target->ignore_certificate_errors = src->ignore_certificate_errors;\n    cef_string_set(src->accept_language_list.str,\n        src->accept_language_list.length, &target->accept_language_list, copy);\n  }\n};\n\n///\n// Class representing request context initialization settings.\n///\ntypedef CefStructBase<CefRequestContextSettingsTraits>\n    CefRequestContextSettings;\n\n\nstruct CefBrowserSettingsTraits {\n  typedef cef_browser_settings_t struct_type;\n\n  static inline void init(struct_type* s) {\n    s->size = sizeof(struct_type);\n  }\n\n  static inline void clear(struct_type* s) {\n    cef_string_clear(&s->standard_font_family);\n    cef_string_clear(&s->fixed_font_family);\n    cef_string_clear(&s->serif_font_family);\n    cef_string_clear(&s->sans_serif_font_family);\n    cef_string_clear(&s->cursive_font_family);\n    cef_string_clear(&s->fantasy_font_family);\n    cef_string_clear(&s->default_encoding);\n    cef_string_clear(&s->accept_language_list);\n  }\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    target->windowless_frame_rate = src->windowless_frame_rate;\n\n    cef_string_set(src->standard_font_family.str,\n        src->standard_font_family.length, &target->standard_font_family, copy);\n    cef_string_set(src->fixed_font_family.str, src->fixed_font_family.length,\n        &target->fixed_font_family, copy);\n    cef_string_set(src->serif_font_family.str, src->serif_font_family.length,\n        &target->serif_font_family, copy);\n    cef_string_set(src->sans_serif_font_family.str,\n        src->sans_serif_font_family.length, &target->sans_serif_font_family,\n        copy);\n    cef_string_set(src->cursive_font_family.str,\n        src->cursive_font_family.length, &target->cursive_font_family, copy);\n    cef_string_set(src->fantasy_font_family.str,\n        src->fantasy_font_family.length, &target->fantasy_font_family, copy);\n\n    target->default_font_size = src->default_font_size;\n    target->default_fixed_font_size = src->default_fixed_font_size;\n    target->minimum_font_size = src->minimum_font_size;\n    target->minimum_logical_font_size = src->minimum_logical_font_size;\n\n    cef_string_set(src->default_encoding.str, src->default_encoding.length,\n        &target->default_encoding, copy);\n\n    target->remote_fonts = src->remote_fonts;\n    target->javascript = src->javascript;\n    target->javascript_open_windows = src->javascript_open_windows;\n    target->javascript_close_windows = src->javascript_close_windows;\n    target->javascript_access_clipboard = src->javascript_access_clipboard;\n    target->javascript_dom_paste = src->javascript_dom_paste;\n    target->caret_browsing = src->caret_browsing;\n    target->plugins = src->plugins;\n    target->universal_access_from_file_urls =\n        src->universal_access_from_file_urls;\n    target->file_access_from_file_urls = src->file_access_from_file_urls;\n    target->web_security = src->web_security;\n    target->image_loading = src->image_loading;\n    target->image_shrink_standalone_to_fit =\n        src->image_shrink_standalone_to_fit;\n    target->text_area_resize = src->text_area_resize;\n    target->tab_to_links = src->tab_to_links;\n    target->local_storage = src->local_storage;\n    target->databases= src->databases;\n    target->application_cache = src->application_cache;\n    target->webgl = src->webgl;\n\n    target->background_color = src->background_color;\n\n    cef_string_set(src->accept_language_list.str,\n        src->accept_language_list.length, &target->accept_language_list, copy);\n  }\n};\n\n///\n// Class representing browser initialization settings.\n///\ntypedef CefStructBase<CefBrowserSettingsTraits> CefBrowserSettings;\n\n\nstruct CefURLPartsTraits {\n  typedef cef_urlparts_t struct_type;\n\n  static inline void init(struct_type* s) {}\n\n  static inline void clear(struct_type* s) {\n    cef_string_clear(&s->spec);\n    cef_string_clear(&s->scheme);\n    cef_string_clear(&s->username);\n    cef_string_clear(&s->password);\n    cef_string_clear(&s->host);\n    cef_string_clear(&s->port);\n    cef_string_clear(&s->origin);\n    cef_string_clear(&s->path);\n    cef_string_clear(&s->query);\n  }\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    cef_string_set(src->spec.str, src->spec.length, &target->spec, copy);\n    cef_string_set(src->scheme.str, src->scheme.length, &target->scheme, copy);\n    cef_string_set(src->username.str, src->username.length, &target->username,\n        copy);\n    cef_string_set(src->password.str, src->password.length, &target->password,\n        copy);\n    cef_string_set(src->host.str, src->host.length, &target->host, copy);\n    cef_string_set(src->port.str, src->port.length, &target->port, copy);\n    cef_string_set(src->origin.str, src->origin.length, &target->origin, copy);\n    cef_string_set(src->path.str, src->path.length, &target->path, copy);\n    cef_string_set(src->query.str, src->query.length, &target->query, copy);\n  }\n};\n\n///\n// Class representing a URL's component parts.\n///\ntypedef CefStructBase<CefURLPartsTraits> CefURLParts;\n\n\nstruct CefTimeTraits {\n  typedef cef_time_t struct_type;\n\n  static inline void init(struct_type* s) {}\n\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    *target = *src;\n  }\n};\n\n///\n// Class representing a time.\n///\nclass CefTime : public CefStructBase<CefTimeTraits> {\n public:\n  typedef CefStructBase<CefTimeTraits> parent;\n\n  CefTime() : parent() {}\n  CefTime(const cef_time_t& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  CefTime(const CefTime& r) : parent(r) {}  // NOLINT(runtime/explicit)\n  explicit CefTime(time_t r) : parent() { SetTimeT(r); }\n  explicit CefTime(double r) : parent() { SetDoubleT(r); }\n\n  // Converts to/from time_t.\n  void SetTimeT(time_t r) {\n    cef_time_from_timet(r, this);\n  }\n  time_t GetTimeT() const {\n    time_t time = 0;\n    cef_time_to_timet(this, &time);\n    return time;\n  }\n\n  // Converts to/from a double which is the number of seconds since epoch\n  // (Jan 1, 1970). Webkit uses this format to represent time. A value of 0\n  // means \"not initialized\".\n  void SetDoubleT(double r) {\n    cef_time_from_doublet(r, this);\n  }\n  double GetDoubleT() const {\n    double time = 0;\n    cef_time_to_doublet(this, &time);\n    return time;\n  }\n\n  // Set this object to now.\n  void Now() {\n    cef_time_now(this);\n  }\n\n  // Return the delta between this object and |other| in milliseconds.\n  long long Delta(const CefTime& other) {\n    long long delta = 0;\n    cef_time_delta(this, &other, &delta);\n    return delta;\n  }\n};\n\n\nstruct CefCookieTraits {\n  typedef cef_cookie_t struct_type;\n\n  static inline void init(struct_type* s) {}\n\n  static inline void clear(struct_type* s) {\n    cef_string_clear(&s->name);\n    cef_string_clear(&s->value);\n    cef_string_clear(&s->domain);\n    cef_string_clear(&s->path);\n  }\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    cef_string_set(src->name.str, src->name.length, &target->name, copy);\n    cef_string_set(src->value.str, src->value.length, &target->value, copy);\n    cef_string_set(src->domain.str, src->domain.length, &target->domain, copy);\n    cef_string_set(src->path.str, src->path.length, &target->path, copy);\n    target->secure = src->secure;\n    target->httponly = src->httponly;\n    target->creation = src->creation;\n    target->last_access = src->last_access;\n    target->has_expires = src->has_expires;\n    target->expires = src->expires;\n  }\n};\n\n///\n// Class representing a cookie.\n///\ntypedef CefStructBase<CefCookieTraits> CefCookie;\n\n\nstruct CefGeopositionTraits {\n  typedef cef_geoposition_t struct_type;\n\n  static inline void init(struct_type* s) {}\n\n  static inline void clear(struct_type* s) {\n    cef_string_clear(&s->error_message);\n  }\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    target->latitude = src->latitude;\n    target->longitude = src->longitude;\n    target->altitude = src->altitude;\n    target->accuracy = src->accuracy;\n    target->altitude_accuracy = src->altitude_accuracy;\n    target->heading = src->heading;\n    target->speed = src->speed;\n    target->timestamp = src->timestamp;\n    target->error_code = src->error_code;\n    cef_string_set(src->error_message.str, src->error_message.length,\n        &target->error_message, copy);\n  }\n};\n\n///\n// Class representing a geoposition.\n///\ntypedef CefStructBase<CefGeopositionTraits> CefGeoposition;\n\n\nstruct CefCursorInfoTraits {\n  typedef cef_cursor_info_t struct_type;\n\n  static inline void init(struct_type* s) {}\n\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    target->hotspot = src->hotspot;\n    target->image_scale_factor = src->image_scale_factor;\n    target->buffer = src->buffer;\n    target->size = src->size;\n  }\n};\n\n///\n// Class representing cursor information.\n///\ntypedef CefStructBase<CefCursorInfoTraits> CefCursorInfo;\n\n\nstruct CefPdfPrintSettingsTraits {\n  typedef cef_pdf_print_settings_t struct_type;\n\n  static inline void init(struct_type* s) {}\n\n  static inline void clear(struct_type* s) {\n    cef_string_clear(&s->header_footer_title);\n    cef_string_clear(&s->header_footer_url);\n  }\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n\n    cef_string_set(src->header_footer_title.str,\n        src->header_footer_title.length, &target->header_footer_title, copy);\n    cef_string_set(src->header_footer_url.str, src->header_footer_url.length,\n        &target->header_footer_url, copy);\n\n    target->page_width = src->page_width;\n    target->page_height = src->page_height;\n\n    target->margin_top = src->margin_top;\n    target->margin_right = src->margin_right;\n    target->margin_bottom = src->margin_bottom;\n    target->margin_left = src->margin_left;\n    target->margin_type = src->margin_type;\n\n    target->header_footer_enabled = src->header_footer_enabled;\n    target->selection_only = src->selection_only;\n    target->landscape = src->landscape;\n    target->backgrounds_enabled = src->backgrounds_enabled;\n  }\n};\n\n///\n// Class representing PDF print settings\n///\ntypedef CefStructBase<CefPdfPrintSettingsTraits> CefPdfPrintSettings;\n\n\nstruct CefBoxLayoutSettingsTraits {\n  typedef cef_box_layout_settings_t struct_type;\n\n  static inline void init(struct_type* s) {}\n\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    *target = *src;\n  }\n};\n\n///\n// Class representing CefBoxLayout settings.\n///\ntypedef CefStructBase<CefBoxLayoutSettingsTraits> CefBoxLayoutSettings;\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_\n"
  },
  {
    "path": "CEF/include/internal/cef_win.h",
    "content": "// Copyright (c) 2008 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n#ifndef CEF_INCLUDE_INTERNAL_CEF_WIN_H_\n#define CEF_INCLUDE_INTERNAL_CEF_WIN_H_\n#pragma once\n\n#include \"include/internal/cef_types_win.h\"\n#include \"include/internal/cef_types_wrappers.h\"\n\n///\n// Handle types.\n///\n#define CefCursorHandle cef_cursor_handle_t\n#define CefEventHandle cef_event_handle_t\n#define CefWindowHandle cef_window_handle_t\n#define CefTextInputContext cef_text_input_context_t\n\nstruct CefMainArgsTraits {\n  typedef cef_main_args_t struct_type;\n\n  static inline void init(struct_type* s) {}\n  static inline void clear(struct_type* s) {}\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    target->instance = src->instance;\n  }\n};\n\n// Class representing CefExecuteProcess arguments.\nclass CefMainArgs : public CefStructBase<CefMainArgsTraits> {\n public:\n  typedef CefStructBase<CefMainArgsTraits> parent;\n\n  CefMainArgs() : parent() {}\n  explicit CefMainArgs(const cef_main_args_t& r) : parent(r) {}\n  explicit CefMainArgs(const CefMainArgs& r) : parent(r) {}\n  explicit CefMainArgs(HINSTANCE hInstance) : parent() {\n    instance = hInstance;\n  }\n};\n\nstruct CefWindowInfoTraits {\n  typedef cef_window_info_t struct_type;\n\n  static inline void init(struct_type* s) {}\n\n  static inline void clear(struct_type* s) {\n    cef_string_clear(&s->window_name);\n  }\n\n  static inline void set(const struct_type* src, struct_type* target,\n      bool copy) {\n    target->ex_style = src->ex_style;\n    cef_string_set(src->window_name.str, src->window_name.length,\n        &target->window_name, copy);\n    target->style = src->style;\n    target->x = src->x;\n    target->y = src->y;\n    target->width = src->width;\n    target->height = src->height;\n    target->parent_window = src->parent_window;\n    target->menu = src->menu;\n    target->transparent_painting_enabled = src->transparent_painting_enabled;\n    target->windowless_rendering_enabled = src->windowless_rendering_enabled;\n    target->window = src->window;\n  }\n};\n\n///\n// Class representing window information.\n///\nclass CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {\n public:\n  typedef CefStructBase<CefWindowInfoTraits> parent;\n\n  CefWindowInfo() : parent() {}\n  explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}\n  explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}\n\n  ///\n  // Create the browser as a child window.\n  ///\n  void SetAsChild(CefWindowHandle parent, RECT windowRect) {\n    style = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP |\n            WS_VISIBLE;\n    parent_window = parent;\n    x = windowRect.left;\n    y = windowRect.top;\n    width = windowRect.right - windowRect.left;\n    height = windowRect.bottom - windowRect.top;\n  }\n\n  ///\n  // Create the browser as a popup window.\n  ///\n  void SetAsPopup(CefWindowHandle parent, const CefString& windowName) {\n    style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS |\n            WS_VISIBLE;\n    parent_window = parent;\n    x = CW_USEDEFAULT;\n    y = CW_USEDEFAULT;\n    width = CW_USEDEFAULT;\n    height = CW_USEDEFAULT;\n\n    cef_string_copy(windowName.c_str(), windowName.length(), &window_name);\n  }\n\n  ///\n  // Create the browser using windowless (off-screen) rendering. No window\n  // will be created for the browser and all rendering will occur via the\n  // CefRenderHandler interface. The |parent| value will be used to identify\n  // monitor info and to act as the parent window for dialogs, context menus,\n  // etc. If |parent| is not provided then the main screen monitor will be used\n  // and some functionality that requires a parent window may not function\n  // correctly. If |transparent| is true a transparent background color will be\n  // used (RGBA=0x00000000). If |transparent| is false the background will be\n  // white and opaque. In order to create windowless browsers the\n  // CefSettings.windowless_rendering_enabled value must be set to true.\n  ///\n  void SetAsWindowless(CefWindowHandle parent, bool transparent) {\n    windowless_rendering_enabled = TRUE;\n    parent_window = parent;\n    transparent_painting_enabled = transparent;\n  }\n};\n\n#endif  // CEF_INCLUDE_INTERNAL_CEF_WIN_H_\n"
  },
  {
    "path": "CEF/include/views/cef_box_layout.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_BOX_LAYOUT_H_\n#define CEF_INCLUDE_VIEWS_CEF_BOX_LAYOUT_H_\n#pragma once\n\n#include \"include/views/cef_layout.h\"\n\nclass CefView;\n\n///\n// A Layout manager that arranges child views vertically or horizontally in a\n// side-by-side fashion with spacing around and between the child views. The\n// child views are always sized according to their preferred size. If the\n// host's bounds provide insufficient space, child views will be clamped.\n// Excess space will not be distributed. Methods must be called on the browser\n// process UI thread unless otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefBoxLayout : public CefLayout {\n public:\n  ///\n  // Set the flex weight for the given |view|. Using the preferred size as\n  // the basis, free space along the main axis is distributed to views in the\n  // ratio of their flex weights. Similarly, if the views will overflow the\n  // parent, space is subtracted in these ratios. A flex of 0 means this view is\n  // not resized. Flex values must not be negative.\n  ///\n  /*--cef()--*/\n  virtual void SetFlexForView(CefRefPtr<CefView> view, int flex) =0;\n\n  ///\n  // Clears the flex for the given |view|, causing it to use the default flex\n  // specified via CefBoxLayoutSettings.default_flex.\n  ///\n  /*--cef()--*/\n  virtual void ClearFlexForView(CefRefPtr<CefView> view) =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_BOX_LAYOUT_H_\n"
  },
  {
    "path": "CEF/include/views/cef_browser_view.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_H_\n#define CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_H_\n#pragma once\n\n#include \"include/cef_browser.h\"\n#include \"include/views/cef_browser_view_delegate.h\"\n#include \"include/views/cef_view.h\"\n\n///\n// A View hosting a CefBrowser instance. Methods must be called on the browser\n// process UI thread unless otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefBrowserView : public CefView {\n public:\n  ///\n  // Create a new BrowserView. The underlying CefBrowser will not be created\n  // until this view is added to the views hierarchy.\n  ///\n  /*--cef(optional_param=client,optional_param=url,\n          optional_param=request_context,optional_param=delegate)--*/\n  static CefRefPtr<CefBrowserView> CreateBrowserView(\n      CefRefPtr<CefClient> client,\n      const CefString& url,\n      const CefBrowserSettings& settings,\n      CefRefPtr<CefRequestContext> request_context,\n      CefRefPtr<CefBrowserViewDelegate> delegate);\n\n  ///\n  // Returns the BrowserView associated with |browser|.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefBrowserView> GetForBrowser(CefRefPtr<CefBrowser> browser);\n\n  ///\n  // Returns the CefBrowser hosted by this BrowserView. Will return NULL if the\n  // browser has not yet been created or has already been destroyed.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBrowser> GetBrowser() =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_H_\n"
  },
  {
    "path": "CEF/include/views/cef_browser_view_delegate.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_DELEGATE_H_\n#define CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_DELEGATE_H_\n#pragma once\n\n#include \"include/cef_client.h\"\n#include \"include/views/cef_view_delegate.h\"\n\nclass CefBrowser;\nclass CefBrowserView;\n\n///\n// Implement this interface to handle BrowserView events. The methods of this\n// class will be called on the browser process UI thread unless otherwise\n// indicated.\n///\n/*--cef(source=client)--*/\nclass CefBrowserViewDelegate : public CefViewDelegate {\n public:\n  ///\n  // Called when |browser| associated with |browser_view| is created. This\n  // method will be called after CefLifeSpanHandler::OnAfterCreated() is called\n  // for |browser| and before OnPopupBrowserViewCreated() is called for\n  // |browser|'s parent delegate if |browser| is a popup.\n  ///\n  /*--cef()--*/\n  virtual void OnBrowserCreated(CefRefPtr<CefBrowserView> browser_view,\n                                CefRefPtr<CefBrowser> browser) {}\n\n  ///\n  // Called when |browser| associated with |browser_view| is destroyed. Release\n  // all references to |browser| and do not attempt to execute any methods on\n  // |browser| after this callback returns. This method will be called before\n  // CefLifeSpanHandler::OnBeforeClose() is called for |browser|.\n  ///\n  /*--cef()--*/\n  virtual void OnBrowserDestroyed(CefRefPtr<CefBrowserView> browser_view,\n                                  CefRefPtr<CefBrowser> browser) {}\n\n  ///\n  // Called before a new popup BrowserView is created. The popup originated\n  // from |browser_view|. |settings| and |client| are the values returned from\n  // CefLifeSpanHandler::OnBeforePopup(). |is_devtools| will be true if the\n  // popup will be a DevTools browser. Return the delegate that will be used for\n  // the new popup BrowserView.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBrowserViewDelegate> GetDelegateForPopupBrowserView(\n      CefRefPtr<CefBrowserView> browser_view,\n      const CefBrowserSettings& settings,\n      CefRefPtr<CefClient> client,\n      bool is_devtools) {\n    return this;\n  }\n\n  ///\n  // Called after |popup_browser_view| is created. This method will be called\n  // after CefLifeSpanHandler::OnAfterCreated() and OnBrowserCreated() are\n  // called for the new popup browser. The popup originated from |browser_view|.\n  // |is_devtools| will be true if the popup is a DevTools browser. Optionally\n  // add |popup_browser_view| to the views hierarchy yourself and return true.\n  // Otherwise return false and a default CefWindow will be created for the\n  // popup.\n  ///\n  /*--cef()--*/\n  virtual bool OnPopupBrowserViewCreated(\n      CefRefPtr<CefBrowserView> browser_view,\n      CefRefPtr<CefBrowserView> popup_browser_view,\n      bool is_devtools) {\n    return false;\n  }\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_DELEGATE_H_\n"
  },
  {
    "path": "CEF/include/views/cef_button.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_BUTTON_H_\n#define CEF_INCLUDE_VIEWS_CEF_BUTTON_H_\n#pragma once\n\n#include \"include/views/cef_view.h\"\n\nclass CefLabelButton;\n\n///\n// A View representing a button. Depending on the specific type, the button\n// could be implemented by a native control or custom rendered. Methods must be\n// called on the browser process UI thread unless otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefButton : public CefView {\n public:\n  ///\n  // Returns this Button as a LabelButton or NULL if this is not a LabelButton.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefLabelButton> AsLabelButton() =0;\n\n  ///\n  // Sets the current display state of the Button.\n  ///\n  /*--cef()--*/\n  virtual void SetState(cef_button_state_t state) =0;\n\n  ///\n  // Returns the current display state of the Button.\n  ///\n  /*--cef(default_retval=CEF_BUTTON_STATE_NORMAL)--*/\n  virtual cef_button_state_t GetState() =0;\n\n  ///\n  // Sets the tooltip text that will be displayed when the user hovers the mouse\n  // cursor over the Button.\n  ///\n  /*--cef()--*/\n  virtual void SetTooltipText(const CefString& tooltip_text) =0;\n\n  ///\n  // Sets the accessible name that will be exposed to assistive technology (AT).\n  ///\n  /*--cef()--*/\n  virtual void SetAccessibleName(const CefString& name) =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_BUTTON_H_\n"
  },
  {
    "path": "CEF/include/views/cef_button_delegate.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_\n#define CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_\n#pragma once\n\n#include \"include/views/cef_view_delegate.h\"\n\nclass CefButton;\n\n///\n// Implement this interface to handle Button events. The methods of this class\n// will be called on the browser process UI thread unless otherwise indicated.\n///\n/*--cef(source=client)--*/\nclass CefButtonDelegate : public CefViewDelegate {\n public:\n  ///\n  // Called when |button| is pressed.\n  ///\n  /*--cef()--*/\n  virtual void OnButtonPressed(CefRefPtr<CefButton> button) =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_\n"
  },
  {
    "path": "CEF/include/views/cef_display.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_DISPLAY_H_\n#define CEF_INCLUDE_VIEWS_CEF_DISPLAY_H_\n#pragma once\n\n#include <vector>\n\n#include \"include/cef_base.h\"\n\n///\n// This class typically, but not always, corresponds to a physical display\n// connected to the system. A fake Display may exist on a headless system, or a\n// Display may correspond to a remote, virtual display. All size and position\n// values are in density independent pixels (DIP) unless otherwise indicated.\n// Methods must be called on the browser process UI thread unless otherwise\n// indicated.\n///\n/*--cef(source=library)--*/\nclass CefDisplay : public CefBase {\n public:\n  ///\n  // Returns the primary Display.\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefDisplay> GetPrimaryDisplay();\n\n  ///\n  // Returns the Display nearest |point|. Set |input_pixel_coords| to true if\n  // |point| is in pixel coordinates instead of density independent pixels\n  // (DIP).\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefDisplay> GetDisplayNearestPoint(const CefPoint& point,\n                                                      bool input_pixel_coords);\n\n  ///\n  // Returns the Display that most closely intersects |bounds|.  Set\n  // |input_pixel_coords| to true if |bounds| is in pixel coordinates instead of\n  // density independent pixels (DIP).\n  ///\n  /*--cef()--*/\n  static CefRefPtr<CefDisplay> GetDisplayMatchingBounds(\n      const CefRect& bounds,\n      bool input_pixel_coords);\n\n  ///\n  // Returns the total number of Displays. Mirrored displays are excluded; this\n  // method is intended to return the number of distinct, usable displays.\n  ///\n  /*--cef()--*/\n  static size_t GetDisplayCount();\n\n  ///\n  // Returns all Displays. Mirrored displays are excluded; this method is\n  // intended to return distinct, usable displays.\n  ///\n  /*--cef(count_func=displays:GetDisplayCount)--*/\n  static void GetAllDisplays(std::vector<CefRefPtr<CefDisplay> >& displays);\n\n  ///\n  // Returns the unique identifier for this Display.\n  ///\n  /*--cef()--*/\n  virtual int64 GetID() =0;\n\n  ///\n  // Returns this Display's device pixel scale factor. This specifies how much\n  // the UI should be scaled when the actual output has more pixels than\n  // standard displays (which is around 100~120dpi). The potential return values\n  // differ by platform.\n  ///\n  /*--cef()--*/\n  virtual float GetDeviceScaleFactor() =0;\n\n  ///\n  // Convert |point| from density independent pixels (DIP) to pixel coordinates\n  // using this Display's device scale factor.\n  ///\n  /*--cef()--*/\n  virtual void ConvertPointToPixels(CefPoint& point) =0;\n\n  ///\n  // Convert |point| from pixel coordinates to density independent pixels (DIP)\n  // using this Display's device scale factor.\n  ///\n  /*--cef()--*/\n  virtual void ConvertPointFromPixels(CefPoint& point) =0;\n\n  ///\n  // Returns this Display's bounds. This is the full size of the display.\n  ///\n  /*--cef()--*/\n  virtual CefRect GetBounds() =0;\n\n  ///\n  // Returns this Display's work area. This excludes areas of the display that\n  // are occupied for window manager toolbars, etc.\n  ///\n  /*--cef()--*/\n  virtual CefRect GetWorkArea() =0;\n\n  ///\n  // Returns this Display's rotation in degrees.\n  ///\n  /*--cef()--*/\n  virtual int GetRotation() =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_DISPLAY_H_\n"
  },
  {
    "path": "CEF/include/views/cef_fill_layout.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_\n#define CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_\n#pragma once\n\n#include \"include/views/cef_layout.h\"\n\n///\n// A simple Layout that causes the associated Panel's one child to be sized to\n// match the bounds of its parent. Methods must be called on the browser process\n// UI thread unless otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefFillLayout : public CefLayout {\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_\n"
  },
  {
    "path": "CEF/include/views/cef_label_button.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_LABEL_BUTTON_H_\n#define CEF_INCLUDE_VIEWS_CEF_LABEL_BUTTON_H_\n#pragma once\n\n#include \"include/cef_image.h\"\n#include \"include/views/cef_button.h\"\n#include \"include/views/cef_button_delegate.h\"\n\nclass CefMenuButton;\n\n///\n// LabelButton is a button with optional text and/or icon. Methods must be\n// called on the browser process UI thread unless otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefLabelButton : public CefButton {\n public:\n  ///\n  // Create a new LabelButton. A |delegate| must be provided to handle the\n  // button click. |text| will be shown on the LabelButton and used as the\n  // default accessible name. If |with_frame| is true the button will have a\n  // visible frame at all times, center alignment, additional padding and a\n  // default minimum size of 70x33 DIP. If |with_frame| is false the button will\n  // only have a visible frame on hover/press, left alignment, less padding and\n  // no default minimum size.\n  ///\n  /*--cef(optional_param=text)--*/\n  static CefRefPtr<CefLabelButton> CreateLabelButton(\n      CefRefPtr<CefButtonDelegate> delegate,\n      const CefString& text,\n      bool with_frame);\n\n  ///\n  // Returns this LabelButton as a MenuButton or NULL if this is not a\n  // MenuButton.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefMenuButton> AsMenuButton() =0;\n\n  ///\n  // Sets the text shown on the LabelButton. By default |text| will also be used\n  // as the accessible name.\n  ///\n  /*--cef()--*/\n  virtual void SetText(const CefString& text) =0;\n\n  ///\n  // Returns the text shown on the LabelButton.\n  ///\n  /*--cef()--*/\n  virtual CefString GetText() =0;\n\n  ///\n  // Sets the image shown for |button_state|. When this Button is drawn if no\n  // image exists for the current state then the image for\n  // CEF_BUTTON_STATE_NORMAL, if any, will be shown.\n  ///\n  /*--cef(optional_param=image)--*/\n  virtual void SetImage(cef_button_state_t button_state,\n                        CefRefPtr<CefImage> image) =0;\n\n  ///\n  // Returns the image shown for |button_state|. If no image exists for that\n  // state then the image for CEF_BUTTON_STATE_NORMAL will be returned.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefImage> GetImage(cef_button_state_t button_state) =0;\n\n  ///\n  // Sets the text color shown for the specified button |for_state| to |color|.\n  ///\n  /*--cef()--*/\n  virtual void SetTextColor(cef_button_state_t for_state, cef_color_t color) =0;\n\n  ///\n  // Sets the text colors shown for the non-disabled states to |color|.\n  ///\n  /*--cef()--*/\n  virtual void SetEnabledTextColors(cef_color_t color) =0;\n\n  ///\n  // Sets the font list. The format is \"<FONT_FAMILY_LIST>,[STYLES] <SIZE>\",\n  // where:\n  // - FONT_FAMILY_LIST is a comma-separated list of font family names,\n  // - STYLES is an optional space-separated list of style names (case-sensitive\n  //   \"Bold\" and \"Italic\" are supported), and\n  // - SIZE is an integer font size in pixels with the suffix \"px\".\n  //\n  // Here are examples of valid font description strings:\n  // - \"Arial, Helvetica, Bold Italic 14px\"\n  // - \"Arial, 14px\"\n  ///\n  /*--cef()--*/\n  virtual void SetFontList(const CefString& font_list) =0;\n\n  ///\n  // Sets the horizontal alignment; reversed in RTL. Default is\n  // CEF_HORIZONTAL_ALIGNMENT_CENTER.\n  ///\n  /*--cef()--*/\n  virtual void SetHorizontalAlignment(cef_horizontal_alignment_t alignment) =0;\n\n  ///\n  // Reset the minimum size of this LabelButton to |size|.\n  ///\n  /*--cef()--*/\n  virtual void SetMinimumSize(const CefSize& size) =0;\n\n  ///\n  // Reset the maximum size of this LabelButton to |size|.\n  ///\n  /*--cef()--*/\n  virtual void SetMaximumSize(const CefSize& size) =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_LABEL_BUTTON_H_\n"
  },
  {
    "path": "CEF/include/views/cef_layout.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_\n#define CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\nclass CefBoxLayout;\nclass CefFillLayout;\n\n///\n// A Layout handles the sizing of the children of a Panel according to\n// implementation-specific heuristics. Methods must be called on the browser\n// process UI thread unless otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefLayout : public CefBase {\n public:\n  ///\n  // Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBoxLayout> AsBoxLayout() =0;\n\n  ///\n  // Returns this Layout as a FillLayout or NULL if this is not a FillLayout.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefFillLayout> AsFillLayout() =0;\n\n  ///\n  // Returns true if this Layout is valid.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_\n"
  },
  {
    "path": "CEF/include/views/cef_menu_button.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_H_\n#define CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_H_\n#pragma once\n\n#include \"include/cef_menu_model.h\"\n#include \"include/views/cef_label_button.h\"\n#include \"include/views/cef_menu_button_delegate.h\"\n\n///\n// MenuButton is a button with optional text, icon and/or menu marker that shows\n// a menu when clicked with the left mouse button. All size and position values\n// are in density independent pixels (DIP) unless otherwise indicated. Methods\n// must be called on the browser process UI thread unless otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefMenuButton : public CefLabelButton {\n public:\n  ///\n  // Create a new MenuButton. A |delegate| must be provided to call ShowMenu()\n  // when the button is clicked. |text| will be shown on the MenuButton and used\n  // as the default accessible name. If |with_frame| is true the button will\n  // have a visible frame at all times, center alignment, additional padding and\n  // a default minimum size of 70x33 DIP. If |with_frame| is false the button\n  // will only have a visible frame on hover/press, left alignment, less padding\n  // and no default minimum size. If |with_menu_marker| is true a menu marker\n  // will be added to the button.\n  ///\n  /*--cef(optional_param=text)--*/\n  static CefRefPtr<CefMenuButton> CreateMenuButton(\n      CefRefPtr<CefMenuButtonDelegate> delegate,\n      const CefString& text,\n      bool with_frame,\n      bool with_menu_marker);\n\n  ///\n  // Show a menu with contents |menu_model|. |screen_point| specifies the menu\n  // position in screen coordinates. |anchor_position| specifies how the menu\n  // will be anchored relative to |screen_point|. This method should be called\n  // from CefMenuButtonDelegate::OnMenuButtonPressed().\n  ///\n  /*--cef()--*/\n  virtual void ShowMenu(CefRefPtr<CefMenuModel> menu_model,\n                        const CefPoint& screen_point,\n                        cef_menu_anchor_position_t anchor_position) =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_H_\n"
  },
  {
    "path": "CEF/include/views/cef_menu_button_delegate.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_\n#define CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_\n#pragma once\n\n#include \"include/views/cef_button_delegate.h\"\n\nclass CefMenuButton;\n\n///\n// Implement this interface to handle MenuButton events. The methods of this\n// class will be called on the browser process UI thread unless otherwise\n// indicated.\n///\n/*--cef(source=client)--*/\nclass CefMenuButtonDelegate : public CefButtonDelegate {\n public:\n  ///\n  // Called when |button| is pressed. Call CefMenuButton::ShowMenu() to show the\n  // resulting menu at |screen_point|.\n  ///\n  /*--cef()--*/\n  virtual void OnMenuButtonPressed(CefRefPtr<CefMenuButton> menu_button,\n                                   const CefPoint& screen_point) =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_\n"
  },
  {
    "path": "CEF/include/views/cef_panel.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_PANEL_H_\n#define CEF_INCLUDE_VIEWS_CEF_PANEL_H_\n#pragma once\n\n#include \"include/views/cef_view.h\"\n#include \"include/views/cef_panel_delegate.h\"\n\nclass CefBoxLayout;\nclass CefFillLayout;\nclass CefLayout;\nclass CefWindow;\n\n///\n// A Panel is a container in the views hierarchy that can contain other Views\n// as children. Methods must be called on the browser process UI thread unless\n// otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefPanel : public CefView {\n public:\n  ///\n  // Create a new Panel.\n  ///\n  /*--cef(optional_param=delegate)--*/\n  static CefRefPtr<CefPanel> CreatePanel(CefRefPtr<CefPanelDelegate> delegate);\n\n  ///\n  // Returns this Panel as a Window or NULL if this is not a Window.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefWindow> AsWindow() =0;\n\n  ///\n  // Set this Panel's Layout to FillLayout and return the FillLayout object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefFillLayout> SetToFillLayout() =0;\n\n  ///\n  // Set this Panel's Layout to BoxLayout and return the BoxLayout object.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBoxLayout> SetToBoxLayout(\n      const CefBoxLayoutSettings& settings) =0;\n\n  ///\n  // Get the Layout.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefLayout> GetLayout() =0;\n\n  ///\n  // Lay out the child Views (set their bounds based on sizing heuristics\n  // specific to the current Layout).\n  ///\n  /*--cef()--*/\n  virtual void Layout() =0;\n\n  ///\n  // Add a child View.\n  ///\n  /*--cef()--*/\n  virtual void AddChildView(CefRefPtr<CefView> view) =0;\n\n  ///\n  // Add a child View at the specified |index|. If |index| matches the result of\n  // GetChildCount() then the View will be added at the end.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual void AddChildViewAt(CefRefPtr<CefView> view,\n                              int index) =0;\n\n  ///\n  // Move the child View to the specified |index|. A negative value for |index|\n  // will move the View to the end.\n  ///\n  /*--cef()--*/\n  virtual void ReorderChildView(CefRefPtr<CefView> view,\n                                int index) =0;\n\n  ///\n  // Remove a child View. The View can then be added to another Panel.\n  ///\n  /*--cef()--*/\n  virtual void RemoveChildView(CefRefPtr<CefView> view) =0;\n\n  ///\n  // Remove all child Views. The removed Views will be deleted if the client\n  // holds no references to them.\n  ///\n  /*--cef()--*/\n  virtual void RemoveAllChildViews() =0;\n\n  ///\n  // Returns the number of child Views.\n  ///\n  /*--cef()--*/\n  virtual size_t GetChildViewCount() =0;\n\n  ///\n  // Returns the child View at the specified |index|.\n  ///\n  /*--cef(index_param=index)--*/\n  virtual CefRefPtr<CefView> GetChildViewAt(int index) =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_PANEL_H_\n"
  },
  {
    "path": "CEF/include/views/cef_panel_delegate.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_\n#define CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_\n#pragma once\n\n#include \"include/views/cef_view_delegate.h\"\n\n///\n// Implement this interface to handle Panel events. The methods of this class\n// will be called on the browser process UI thread unless otherwise indicated.\n///\n/*--cef(source=client)--*/\nclass CefPanelDelegate : public CefViewDelegate {\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_\n"
  },
  {
    "path": "CEF/include/views/cef_scroll_view.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_SCROLL_VIEW_H_\n#define CEF_INCLUDE_VIEWS_CEF_SCROLL_VIEW_H_\n#pragma once\n\n#include \"include/views/cef_view.h\"\n\n///\n// A ScrollView will show horizontal and/or vertical scrollbars when necessary\n// based on the size of the attached content view. Methods must be called on the\n// browser process UI thread unless otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefScrollView : public CefView {\n public:\n  ///\n  // Create a new ScrollView.\n  ///\n  /*--cef(optional_param=delegate)--*/\n  static CefRefPtr<CefScrollView> CreateScrollView(\n      CefRefPtr<CefViewDelegate> delegate);\n\n  ///\n  // Set the content View. The content View must have a specified size (e.g.\n  // via CefView::SetBounds or CefViewDelegate::GetPreferredSize).\n  ///\n  /*--cef()--*/\n  virtual void SetContentView(CefRefPtr<CefView> view) =0;\n\n  ///\n  // Returns the content View.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefView> GetContentView() =0;\n\n  ///\n  // Returns the visible region of the content View.\n  ///\n  /*--cef()--*/\n  virtual CefRect GetVisibleContentRect() =0;\n\n  ///\n  // Returns true if the horizontal scrollbar is currently showing.\n  ///\n  /*--cef()--*/\n  virtual bool HasHorizontalScrollbar() =0;\n\n  ///\n  // Returns the height of the horizontal scrollbar.\n  ///\n  /*--cef()--*/\n  virtual int GetHorizontalScrollbarHeight() =0;\n\n  ///\n  // Returns true if the vertical scrollbar is currently showing.\n  ///\n  /*--cef()--*/\n  virtual bool HasVerticalScrollbar() =0;\n\n  ///\n  // Returns the width of the vertical scrollbar.\n  ///\n  /*--cef()--*/\n  virtual int GetVerticalScrollbarWidth() =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_SCROLL_VIEW_H_\n"
  },
  {
    "path": "CEF/include/views/cef_textfield.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_H_\n#define CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_H_\n#pragma once\n\n#include \"include/views/cef_view.h\"\n#include \"include/views/cef_textfield_delegate.h\"\n\n///\n// A Textfield supports editing of text. This control is custom rendered with no\n// platform-specific code. Methods must be called on the browser process UI\n// thread unless otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefTextfield : public CefView {\n public:\n  ///\n  // Create a new Textfield.\n  ///\n  /*--cef(optional_param=delegate)--*/\n  static CefRefPtr<CefTextfield> CreateTextfield(\n      CefRefPtr<CefTextfieldDelegate> delegate);\n\n  ///\n  // Sets whether the text will be displayed as asterisks.\n  ///\n  /*--cef()--*/\n  virtual void SetPasswordInput(bool password_input) =0;\n\n  ///\n  // Returns true if the text will be displayed as asterisks.\n  ///\n  /*--cef()--*/\n  virtual bool IsPasswordInput() =0;\n\n  ///\n  // Sets whether the text will read-only.\n  ///\n  /*--cef()--*/\n  virtual void SetReadOnly(bool read_only) =0;\n\n  ///\n  // Returns true if the text is read-only.\n  ///\n  /*--cef()--*/\n  virtual bool IsReadOnly() =0;\n\n  ///\n  // Returns the currently displayed text.\n  ///\n  /*--cef()--*/\n  virtual CefString GetText() =0;\n\n  ///\n  // Sets the contents to |text|. The cursor will be moved to end of the text if\n  // the current position is outside of the text range.\n  ///\n  /*--cef()--*/\n  virtual void SetText(const CefString& text) =0;\n\n  ///\n  // Appends |text| to the previously-existing text.\n  ///\n  /*--cef()--*/\n  virtual void AppendText(const CefString& text) =0;\n\n  ///\n  // Inserts |text| at the current cursor position replacing any selected text.\n  ///\n  /*--cef()--*/\n  virtual void InsertOrReplaceText(const CefString& text) =0;\n\n  ///\n  // Returns true if there is any selected text.\n  ///\n  /*--cef()--*/\n  virtual bool HasSelection() =0;\n\n  ///\n  // Returns the currently selected text.\n  ///\n  /*--cef()--*/\n  virtual CefString GetSelectedText() =0;\n\n  ///\n  // Selects all text. If |reversed| is true the range will end at the logical\n  // beginning of the text; this generally shows the leading portion of text\n  // that overflows its display area.\n  ///\n  /*--cef()--*/\n  virtual void SelectAll(bool reversed) =0;\n  \n  ///\n  // Clears the text selection and sets the caret to the end.\n  ///\n  /*--cef()--*/\n  virtual void ClearSelection() =0;\n\n  ///\n  // Returns the selected logical text range.\n  ///\n  /*--cef()--*/\n  virtual CefRange GetSelectedRange() =0;\n  \n  ///\n  // Selects the specified logical text range.\n  ///\n  /*--cef()--*/\n  virtual void SelectRange(const CefRange& range) =0;\n  \n  ///\n  // Returns the current cursor position.\n  ///\n  /*--cef()--*/\n  virtual size_t GetCursorPosition() =0;\n\n  ///\n  // Sets the text color.\n  ///\n  /*--cef()--*/\n  virtual void SetTextColor(cef_color_t color) =0;\n\n  ///\n  // Returns the text color.\n  ///\n  /*--cef()--*/\n  virtual cef_color_t GetTextColor() =0;\n\n  ///\n  // Sets the selection text color.\n  ///\n  /*--cef()--*/\n  virtual void SetSelectionTextColor(cef_color_t color) =0;\n\n  ///\n  // Returns the selection text color.\n  ///\n  /*--cef()--*/\n  virtual cef_color_t GetSelectionTextColor() =0;\n\n  ///\n  // Sets the selection background color.\n  ///\n  /*--cef()--*/\n  virtual void SetSelectionBackgroundColor(cef_color_t color) =0;\n\n  ///\n  // Returns the selection background color.\n  ///\n  /*--cef()--*/\n  virtual cef_color_t GetSelectionBackgroundColor() =0;\n\n  ///\n  // Sets the font list. The format is \"<FONT_FAMILY_LIST>,[STYLES] <SIZE>\",\n  // where:\n  // - FONT_FAMILY_LIST is a comma-separated list of font family names,\n  // - STYLES is an optional space-separated list of style names (case-sensitive\n  //   \"Bold\" and \"Italic\" are supported), and\n  // - SIZE is an integer font size in pixels with the suffix \"px\".\n  //\n  // Here are examples of valid font description strings:\n  // - \"Arial, Helvetica, Bold Italic 14px\"\n  // - \"Arial, 14px\"\n  ///\n  /*--cef()--*/\n  virtual void SetFontList(const CefString& font_list) =0;\n\n  ///\n  // Applies |color| to the specified |range| without changing the default\n  // color. If |range| is empty the color will be set on the complete text\n  // contents.\n  ///\n  /*--cef()--*/\n  virtual void ApplyTextColor(cef_color_t color,\n                              const CefRange& range) =0;\n\n  ///\n  // Applies |style| to the specified |range| without changing the default\n  // style. If |add| is true the style will be added, otherwise the style will\n  // be removed. If |range| is empty the style will be set on the complete text\n  // contents.\n  ///\n  /*--cef()--*/\n  virtual void ApplyTextStyle(cef_text_style_t style,\n                              bool add,\n                              const CefRange& range) =0;\n\n  ///\n  // Returns true if the action associated with the specified command id is\n  // enabled. See additional comments on ExecuteCommand().\n  ///\n  /*--cef()--*/\n  virtual bool IsCommandEnabled(int command_id) =0;\n\n  ///\n  // Performs the action associated with the specified command id. Valid values\n  // include IDS_APP_UNDO, IDS_APP_REDO, IDS_APP_CUT, IDS_APP_COPY,\n  // IDS_APP_PASTE, IDS_APP_DELETE, IDS_APP_SELECT_ALL, IDS_DELETE_* and\n  // IDS_MOVE_*. See include/cef_pack_strings.h for definitions.\n  ///\n  /*--cef()--*/\n  virtual void ExecuteCommand(int command_id) =0;\n  \n  ///\n  // Clears Edit history.\n  ///\n  /*--cef()--*/\n  virtual void ClearEditHistory() =0;\n\n  ///\n  // Sets the placeholder text that will be displayed when the Textfield is\n  // empty.\n  ///\n  /*--cef()--*/\n  virtual void SetPlaceholderText(const CefString& text) =0;\n\n  ///\n  // Returns the placeholder text that will be displayed when the Textfield is\n  // empty.\n  ///\n  /*--cef()--*/\n  virtual CefString GetPlaceholderText() =0;\n\n  ///\n  // Sets the placeholder text color.\n  ///\n  /*--cef()--*/\n  virtual void SetPlaceholderTextColor(cef_color_t color) =0;\n\n  ///\n  // Returns the placeholder text color.\n  ///\n  /*--cef()--*/\n  virtual cef_color_t GetPlaceholderTextColor() =0;\n\n  ///\n  // Set the accessible name that will be exposed to assistive technology (AT).\n  ///\n  /*--cef()--*/\n  virtual void SetAccessibleName(const CefString& name) =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_H_\n"
  },
  {
    "path": "CEF/include/views/cef_textfield_delegate.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_\n#define CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_\n#pragma once\n\n#include \"include/views/cef_view_delegate.h\"\n\nclass CefTextfield;\n\n///\n// Implement this interface to handle Textfield events. The methods of this\n// class will be called on the browser process UI thread unless otherwise\n// indicated.\n///\n/*--cef(source=client)--*/\nclass CefTextfieldDelegate : public CefViewDelegate {\n public:\n  ///\n  // Called when |textfield| recieves a keyboard event. |event| contains\n  // information about the keyboard event. Return true if the keyboard event was\n  // handled or false otherwise for default handling.\n  ///\n  /*--cef()--*/\n  virtual bool OnKeyEvent(CefRefPtr<CefTextfield> textfield,\n                          const CefKeyEvent& event) { return false; }\n\n  ///\n  // Called after performing a user action that may change |textfield|.\n  ///\n  /*--cef()--*/\n  virtual void OnAfterUserAction(CefRefPtr<CefTextfield> textfield) {}\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_\n"
  },
  {
    "path": "CEF/include/views/cef_view.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_VIEW_H_\n#define CEF_INCLUDE_VIEWS_CEF_VIEW_H_\n#pragma once\n\n#include \"include/views/cef_view_delegate.h\"\n\nclass CefBrowserView;\nclass CefButton;\nclass CefPanel;\nclass CefScrollView;\nclass CefTextfield;\nclass CefWindow;\n\n///\n// A View is a rectangle within the views View hierarchy. It is the base class\n// for all Views. All size and position values are in density independent pixels\n// (DIP) unless otherwise indicated. Methods must be called on the browser\n// process UI thread unless otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefView : public CefBase {\n public:\n  ///\n  // Returns this View as a BrowserView or NULL if this is not a BrowserView.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefBrowserView> AsBrowserView() =0;\n\n  ///\n  // Returns this View as a Button or NULL if this is not a Button.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefButton> AsButton() =0;\n\n  ///\n  // Returns this View as a Panel or NULL if this is not a Panel.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefPanel> AsPanel() =0;\n\n  ///\n  // Returns this View as a ScrollView or NULL if this is not a ScrollView.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefScrollView> AsScrollView() =0;\n\n  ///\n  // Returns this View as a Textfield or NULL if this is not a Textfield.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefTextfield> AsTextfield() =0;\n\n  ///\n  // Returns the type of this View as a string. Used primarily for testing\n  // purposes.\n  ///\n  /*--cef()--*/\n  virtual CefString GetTypeString() =0;\n\n  ///\n  // Returns a string representation of this View which includes the type and\n  // various type-specific identifying attributes. If |include_children| is true\n  // any child Views will also be included. Used primarily for testing purposes.\n  ///\n  /*--cef()--*/\n  virtual CefString ToString(bool include_children) =0;\n\n  ///\n  // Returns true if this View is valid.\n  ///\n  /*--cef()--*/\n  virtual bool IsValid() =0;\n\n  ///\n  // Returns true if this View is currently attached to another View. A View can\n  // only be attached to one View at a time.\n  ///\n  /*--cef()--*/\n  virtual bool IsAttached() =0;\n\n  ///\n  // Returns true if this View is the same as |that| View.\n  ///\n  /*--cef()--*/\n  virtual bool IsSame(CefRefPtr<CefView> that) =0;\n\n  ///\n  // Returns the delegate associated with this View, if any.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefViewDelegate> GetDelegate() =0;\n\n  ///\n  // Returns the top-level Window hosting this View, if any.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefWindow> GetWindow() =0;\n\n  ///\n  // Returns the ID for this View.\n  ///\n  /*--cef()--*/\n  virtual int GetID() =0;\n\n  ///\n  // Sets the ID for this View. ID should be unique within the subtree that you\n  // intend to search for it. 0 is the default ID for views.\n  ///\n  /*--cef()--*/\n  virtual void SetID(int id) =0;\n\n  ///\n  // Returns the View that contains this View, if any.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefView> GetParentView() =0;\n\n  ///\n  // Recursively descends the view tree starting at this View, and returns the\n  // first child that it encounters with the given ID. Returns NULL if no\n  // matching child view is found.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefView> GetViewForID(int id) =0;\n\n  ///\n  // Sets the bounds (size and position) of this View. Position is in parent\n  // coordinates.\n  ///\n  /*--cef()--*/\n  virtual void SetBounds(const CefRect& bounds) =0;\n\n  ///\n  // Returns the bounds (size and position) of this View. Position is in parent\n  // coordinates.\n  ///\n  /*--cef()--*/\n  virtual CefRect GetBounds() =0;\n\n  ///\n  // Returns the bounds (size and position) of this View. Position is in screen\n  // coordinates.\n  ///\n  /*--cef()--*/\n  virtual CefRect GetBoundsInScreen() =0;\n\n  ///\n  // Sets the size of this View without changing the position.\n  ///\n  /*--cef()--*/\n  virtual void SetSize(const CefSize& size) =0;\n\n  ///\n  // Returns the size of this View.\n  ///\n  /*--cef()--*/\n  virtual CefSize GetSize() =0;\n\n  ///\n  // Sets the position of this View without changing the size. |position| is in\n  // parent coordinates.\n  ///\n  /*--cef()--*/\n  virtual void SetPosition(const CefPoint& position) =0;\n\n  ///\n  // Returns the position of this View. Position is in parent coordinates.\n  ///\n  /*--cef()--*/\n  virtual CefPoint GetPosition() =0;\n\n  ///\n  // Returns the size this View would like to be if enough space is available.\n  ///\n  /*--cef()--*/\n  virtual CefSize GetPreferredSize() =0;\n\n  ///\n  // Size this View to its preferred size.\n  ///\n  /*--cef()--*/\n  virtual void SizeToPreferredSize() =0;\n\n  ///\n  // Returns the minimum size for this View.\n  ///\n  /*--cef()--*/\n  virtual CefSize GetMinimumSize() =0;\n\n  ///\n  // Returns the maximum size for this View.\n  ///\n  /*--cef()--*/\n  virtual CefSize GetMaximumSize() =0;\n\n  ///\n  // Returns the height necessary to display this View with the provided width.\n  ///\n  /*--cef()--*/\n  virtual int GetHeightForWidth(int width) =0;\n\n  ///\n  // Indicate that this View and all parent Views require a re-layout. This\n  // ensures the next call to Layout() will propagate to this View even if the\n  // bounds of parent Views do not change.\n  ///\n  /*--cef()--*/\n  virtual void InvalidateLayout() =0;\n\n  ///\n  // Sets whether this View is visible. Windows are hidden by default and other\n  // views are visible by default. This View and any parent views must be set as\n  // visible for this View to be drawn in a Window. If this View is set as\n  // hidden then it and any child views will not be drawn and, if any of those\n  // views currently have focus, then focus will also be cleared. Painting is\n  // scheduled as needed. If this View is a Window then calling this method is\n  // equivalent to calling the Window Show() and Hide() methods.\n  ///\n  /*--cef()--*/\n  virtual void SetVisible(bool visible) =0;\n\n  ///\n  // Returns whether this View is visible. A view may be visible but still not\n  // drawn in a Window if any parent views are hidden. If this View is a Window\n  // then a return value of true indicates that this Window is currently visible\n  // to the user on-screen. If this View is not a Window then call IsDrawn() to\n  // determine whether this View and all parent views are visible and will be\n  // drawn.\n  ///\n  /*--cef()--*/\n  virtual bool IsVisible() =0;\n\n  ///\n  // Returns whether this View is visible and drawn in a Window. A view is drawn\n  // if it and all parent views are visible. If this View is a Window then\n  // calling this method is equivalent to calling IsVisible(). Otherwise, to\n  // determine if the containing Window is visible to the user on-screen call\n  // IsVisible() on the Window.\n  ///\n  /*--cef()--*/\n  virtual bool IsDrawn() =0;\n\n  ///\n  // Set whether this View is enabled. A disabled View does not receive keyboard\n  // or mouse inputs. If |enabled| differs from the current value the View will\n  // be repainted. Also, clears focus if the focused View is disabled.\n  ///\n  /*--cef()--*/\n  virtual void SetEnabled(bool enabled) =0;\n\n  ///\n  // Returns whether this View is enabled.\n  ///\n  /*--cef()--*/\n  virtual bool IsEnabled() =0;\n\n  ///\n  // Sets whether this View is capable of taking focus. It will clear focus if\n  // the focused View is set to be non-focusable. This is false by default so\n  // that a View used as a container does not get the focus.\n  ///\n  /*--cef()--*/\n  virtual void SetFocusable(bool focusable) =0;\n\n  ///\n  // Returns true if this View is focusable, enabled and drawn.\n  ///\n  /*--cef()--*/\n  virtual bool IsFocusable() =0;\n\n  ///\n  // Return whether this View is focusable when the user requires full keyboard\n  // access, even though it may not be normally focusable.\n  ///\n  /*--cef()--*/\n  virtual bool IsAccessibilityFocusable() =0;\n\n  ///\n  // Request keyboard focus. If this View is focusable it will become the\n  // focused View.\n  ///\n  /*--cef()--*/\n  virtual void RequestFocus() =0;\n\n  ///\n  // Sets the background color for this View.\n  ///\n  /*--cef()--*/\n  virtual void SetBackgroundColor(cef_color_t color) =0;\n\n  ///\n  // Returns the background color for this View.\n  ///\n  /*--cef()--*/\n  virtual cef_color_t GetBackgroundColor() =0;\n\n  ///\n  // Convert |point| from this View's coordinate system to that of the screen.\n  // This View must belong to a Window when calling this method. Returns true\n  // if the conversion is successful or false otherwise. Use\n  // CefDisplay::ConvertPointToPixels() after calling this method if further\n  // conversion to display-specific pixel coordinates is desired.\n  ///\n  /*--cef()--*/\n  virtual bool ConvertPointToScreen(CefPoint& point) =0;\n\n  ///\n  // Convert |point| to this View's coordinate system from that of the screen.\n  // This View must belong to a Window when calling this method. Returns true if\n  // the conversion is successful or false otherwise. Use\n  // CefDisplay::ConvertPointFromPixels() before calling this method if\n  // conversion from display-specific pixel coordinates is necessary.\n  ///\n  /*--cef()--*/\n  virtual bool ConvertPointFromScreen(CefPoint& point) =0;\n\n  ///\n  // Convert |point| from this View's coordinate system to that of the Window.\n  // This View must belong to a Window when calling this method. Returns true if\n  // the conversion is successful or false otherwise.\n  ///\n  /*--cef()--*/\n  virtual bool ConvertPointToWindow(CefPoint& point) =0;\n\n  ///\n  // Convert |point| to this View's coordinate system from that of the Window.\n  // This View must belong to a Window when calling this method. Returns true if\n  // the conversion is successful or false otherwise.\n  ///\n  /*--cef()--*/\n  virtual bool ConvertPointFromWindow(CefPoint& point) =0;\n\n  ///\n  // Convert |point| from this View's coordinate system to that of |view|.\n  // |view| needs to be in the same Window but not necessarily the same view\n  // hierarchy. Returns true if the conversion is successful or false otherwise.\n  ///\n  /*--cef()--*/\n  virtual bool ConvertPointToView(CefRefPtr<CefView> view,\n                                  CefPoint& point) =0;\n\n  ///\n  // Convert |point| to this View's coordinate system from that |view|. |view|\n  // needs to be in the same Window but not necessarily the same view hierarchy.\n  // Returns true if the conversion is successful or false otherwise.\n  ///\n  /*--cef()--*/\n  virtual bool ConvertPointFromView(CefRefPtr<CefView> view,\n                                    CefPoint& point) =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_VIEW_H_\n"
  },
  {
    "path": "CEF/include/views/cef_view_delegate.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_VIEW_DELEGATE_H_\n#define CEF_INCLUDE_VIEWS_CEF_VIEW_DELEGATE_H_\n#pragma once\n\n#include \"include/cef_base.h\"\n\nclass CefView;\n\n///\n// Implement this interface to handle view events. The methods of this class\n// will be called on the browser process UI thread unless otherwise indicated.\n///\n/*--cef(source=client)--*/\nclass CefViewDelegate : public virtual CefBase {\n public:\n  ///\n  // Return the preferred size for |view|. The Layout will use this information\n  // to determine the display size.\n  ///\n  /*--cef()--*/\n  virtual CefSize GetPreferredSize(CefRefPtr<CefView> view) {\n    return CefSize();\n  }\n\n  ///\n  // Return the minimum size for |view|.\n  ///\n  /*--cef()--*/\n  virtual CefSize GetMinimumSize(CefRefPtr<CefView> view) {\n    return CefSize();\n  }\n\n  ///\n  // Return the maximum size for |view|.\n  ///\n  /*--cef()--*/\n  virtual CefSize GetMaximumSize(CefRefPtr<CefView> view) {\n    return CefSize();\n  }\n\n  ///\n  // Return the height necessary to display |view| with the provided |width|.\n  // If not specified the result of GetPreferredSize().height will be used by\n  // default. Override if |view|'s preferred height depends upon the width\n  // (for example, with Labels).\n  ///\n  /*--cef()--*/\n  virtual int GetHeightForWidth(CefRefPtr<CefView> view, int width) {\n    return 0;\n  }\n\n  ///\n  // Called when the parent of |view| has changed. If |view| is being added to\n  // |parent| then |added| will be true. If |view| is being removed from\n  // |parent| then |added| will be false. If |view| is being reparented the\n  // remove notification will be sent before the add notification. Do not modify\n  // the view hierarchy in this callback.\n  ///\n  /*--cef()--*/\n  virtual void OnParentViewChanged(CefRefPtr<CefView> view,\n                                   bool added,\n                                   CefRefPtr<CefView> parent) {}\n\n  ///\n  // Called when a child of |view| has changed. If |child| is being added to\n  // |view| then |added| will be true. If |child| is being removed from |view|\n  // then |added| will be false. If |child| is being reparented the remove\n  // notification will be sent to the old parent before the add notification is\n  // sent to the new parent. Do not modify the view hierarchy in this callback.\n  ///\n  /*--cef()--*/\n  virtual void OnChildViewChanged(CefRefPtr<CefView> view,\n                                  bool added,\n                                  CefRefPtr<CefView> child) {}\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_WINDOW_DELEGATE_H_\n"
  },
  {
    "path": "CEF/include/views/cef_window.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_WINDOW_H_\n#define CEF_INCLUDE_VIEWS_CEF_WINDOW_H_\n#pragma once\n\n#include \"include/cef_image.h\"\n#include \"include/cef_menu_model.h\"\n#include \"include/views/cef_display.h\"\n#include \"include/views/cef_panel.h\"\n#include \"include/views/cef_window_delegate.h\"\n\n///\n// A Window is a top-level Window/widget in the Views hierarchy. By default it\n// will have a non-client area with title bar, icon and buttons that supports\n// moving and resizing. All size and position values are in density independent\n// pixels (DIP) unless otherwise indicated. Methods must be called on the\n// browser process UI thread unless otherwise indicated.\n///\n/*--cef(source=library)--*/\nclass CefWindow : public CefPanel {\n public:\n  ///\n  // Create a new Window.\n  ///\n  /*--cef(optional_param=delegate)--*/\n  static CefRefPtr<CefWindow> CreateTopLevelWindow(\n      CefRefPtr<CefWindowDelegate> delegate);\n\n  ///\n  // Show the Window.\n  ///\n  /*--cef()--*/\n  virtual void Show() =0;\n\n  ///\n  // Hide the Window.\n  ///\n  /*--cef()--*/\n  virtual void Hide() =0;\n\n  ///\n  // Sizes the Window to |size| and centers it in the current display.\n  ///\n  /*--cef()--*/\n  virtual void CenterWindow(const CefSize& size) =0;\n\n  ///\n  // Close the Window.\n  ///\n  /*--cef()--*/\n  virtual void Close() =0;\n\n  ///\n  // Returns true if the Window has been closed.\n  ///\n  /*--cef()--*/\n  virtual bool IsClosed() =0;\n\n  ///\n  // Activate the Window, assuming it already exists and is visible.\n  ///\n  /*--cef()--*/\n  virtual void Activate() =0;\n\n  ///\n  // Deactivate the Window, making the next Window in the Z order the active\n  // Window.\n  ///\n  /*--cef()--*/\n  virtual void Deactivate() =0;\n\n  ///\n  // Returns whether the Window is the currently active Window.\n  ///\n  /*--cef()--*/\n  virtual bool IsActive() =0;\n\n  ///\n  // Bring this Window to the top of other Windows in the Windowing system.\n  ///\n  /*--cef()--*/\n  virtual void BringToTop() =0;\n\n  ///\n  // Set the Window to be on top of other Windows in the Windowing system.\n  ///\n  /*--cef()--*/\n  virtual void SetAlwaysOnTop(bool on_top) =0;\n\n  ///\n  // Returns whether the Window has been set to be on top of other Windows in\n  // the Windowing system.\n  ///\n  /*--cef()--*/\n  virtual bool IsAlwaysOnTop() =0;\n\n  ///\n  // Maximize the Window.\n  ///\n  /*--cef()--*/\n  virtual void Maximize() =0;\n\n  ///\n  // Minimize the Window.\n  ///\n  /*--cef()--*/\n  virtual void Minimize() =0;\n\n  ///\n  // Restore the Window.\n  ///\n  /*--cef()--*/\n  virtual void Restore() =0;\n\n  ///\n  // Set fullscreen Window state.\n  ///\n  /*--cef()--*/\n  virtual void SetFullscreen(bool fullscreen) =0;\n  \n  ///\n  // Returns true if the Window is maximized.\n  ///\n  /*--cef()--*/\n  virtual bool IsMaximized() =0;\n\n  ///\n  // Returns true if the Window is minimized.\n  ///\n  /*--cef()--*/\n  virtual bool IsMinimized() =0;\n\n  ///\n  // Returns true if the Window is fullscreen.\n  ///\n  /*--cef()--*/\n  virtual bool IsFullscreen() =0;\n\n  ///\n  // Set the Window title.\n  ///\n  /*--cef(optional_param=title)--*/\n  virtual void SetTitle(const CefString& title) =0;\n\n  ///\n  // Get the Window title.\n  ///\n  /*--cef()--*/\n  virtual CefString GetTitle() =0;\n\n  ///\n  // Set the Window icon. This should be a 16x16 icon suitable for use in the\n  // Windows's title bar.\n  ///\n  /*--cef()--*/\n  virtual void SetWindowIcon(CefRefPtr<CefImage> image) =0;\n\n  ///\n  // Get the Window icon.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefImage> GetWindowIcon() =0;\n\n  ///\n  // Set the Window App icon. This should be a larger icon for use in the host\n  // environment app switching UI. On Windows, this is the ICON_BIG used in\n  // Alt-Tab list and Windows taskbar. The Window icon will be used by default\n  // if no Window App icon is specified.\n  ///\n  /*--cef()--*/\n  virtual void SetWindowAppIcon(CefRefPtr<CefImage> image) =0;\n\n  ///\n  // Get the Window App icon.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefImage> GetWindowAppIcon() =0;\n\n  ///\n  // Show a menu with contents |menu_model|. |screen_point| specifies the menu\n  // position in screen coordinates. |anchor_position| specifies how the menu\n  // will be anchored relative to |screen_point|.\n  ///\n  /*--cef()--*/\n  virtual void ShowMenu(CefRefPtr<CefMenuModel> menu_model,\n                        const CefPoint& screen_point,\n                        cef_menu_anchor_position_t anchor_position) =0;\n\n  ///\n  // Cancel the menu that is currently showing, if any.\n  ///\n  /*--cef()--*/\n  virtual void CancelMenu() =0;\n\n  ///\n  // Returns the Display that most closely intersects the bounds of this Window.\n  // May return NULL if this Window is not currently displayed.\n  ///\n  /*--cef()--*/\n  virtual CefRefPtr<CefDisplay> GetDisplay() =0;\n\n  ///\n  // Returns the bounds (size and position) of this Window's client area.\n  // Position is in screen coordinates.\n  ///\n  /*--cef()--*/\n  virtual CefRect GetClientAreaBoundsInScreen() =0;\n\n  ///\n  // Set the regions where mouse events will be intercepted by this Window to\n  // support drag operations. Call this method with an empty vector to clear the\n  // draggable regions. The draggable region bounds should be in window\n  // coordinates.\n  ///\n  /*--cef(optional_param=regions)--*/\n  virtual void SetDraggableRegions(\n      const std::vector<CefDraggableRegion>& regions) =0;\n\n  ///\n  // Retrieve the platform window handle for this Window.\n  ///\n  /*--cef()--*/\n  virtual CefWindowHandle GetWindowHandle() =0;\n\n  ///\n  // Simulate a key press. |key_code| is the VKEY_* value from Chromium's\n  // ui/events/keycodes/keyboard_codes.h header (VK_* values on Windows).\n  // |event_flags| is some combination of EVENTFLAG_SHIFT_DOWN,\n  // EVENTFLAG_CONTROL_DOWN and/or EVENTFLAG_ALT_DOWN. This method is exposed\n  // primarily for testing purposes.\n  ///\n  /*--cef()--*/\n  virtual void SendKeyPress(int key_code,\n                            uint32 event_flags) =0;\n\n  ///\n  // Simulate a mouse move. The mouse cursor will be moved to the specified\n  // (screen_x, screen_y) position. This method is exposed primarily for testing\n  // purposes.\n  ///\n  /*--cef()--*/\n  virtual void SendMouseMove(int screen_x, int screen_y) =0;\n\n  ///\n  // Simulate mouse down and/or mouse up events. |button| is the mouse button\n  // type. If |mouse_down| is true a mouse down event will be sent. If\n  // |mouse_up| is true a mouse up event will be sent. If both are true a mouse\n  // down event will be sent followed by a mouse up event (equivalent to\n  // clicking the mouse button). The events will be sent using the current\n  // cursor position so make sure to call SendMouseMove() first to position the\n  // mouse. This method is exposed primarily for testing purposes.\n  ///\n  /*--cef()--*/\n  virtual void SendMouseEvents(cef_mouse_button_type_t button,\n                               bool mouse_down,\n                               bool mouse_up) =0;\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_WINDOW_H_\n"
  },
  {
    "path": "CEF/include/views/cef_window_delegate.h",
    "content": "// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file must follow a specific format in order to\n// support the CEF translator tool. See the translator.README.txt file in the\n// tools directory for more information.\n//\n\n#ifndef CEF_INCLUDE_VIEWS_CEF_WINDOW_DELEGATE_H_\n#define CEF_INCLUDE_VIEWS_CEF_WINDOW_DELEGATE_H_\n#pragma once\n\n#include \"include/views/cef_panel_delegate.h\"\n\nclass CefWindow;\n\n///\n// Implement this interface to handle window events. The methods of this class\n// will be called on the browser process UI thread unless otherwise indicated.\n///\n/*--cef(source=client)--*/\nclass CefWindowDelegate : public CefPanelDelegate {\n public:\n  ///\n  // Called when |window| is created.\n  ///\n  /*--cef()--*/\n  virtual void OnWindowCreated(CefRefPtr<CefWindow> window) {}\n\n  ///\n  // Called when |window| is destroyed. Release all references to |window| and\n  // do not attempt to execute any methods on |window| after this callback\n  // returns.\n  ///\n  /*--cef()--*/\n  virtual void OnWindowDestroyed(CefRefPtr<CefWindow> window) {}\n\n  ///\n  // Return true if |window| should be created without a frame or title bar. The\n  // window will be resizable if CanResize() returns true. Use\n  // CefWindow::SetDraggableRegions() to specify draggable regions.\n  ///\n  /*--cef()--*/\n  virtual bool IsFrameless(CefRefPtr<CefWindow> window) { return false; }\n\n  ///\n  // Return true if |window| can be resized.\n  ///\n  /*--cef()--*/\n  virtual bool CanResize(CefRefPtr<CefWindow> window) { return true; }\n\n  ///\n  // Return true if |window| can be maximized.\n  ///\n  /*--cef()--*/\n  virtual bool CanMaximize(CefRefPtr<CefWindow> window) { return true; }\n\n  ///\n  // Return true if |window| can be minimized.\n  ///\n  /*--cef()--*/\n  virtual bool CanMinimize(CefRefPtr<CefWindow> window) { return true; }\n\n  ///\n  // Return true if |window| can be closed. This will be called for user-\n  // initiated window close actions and when CefWindow::Close() is called.\n  ///\n  /*--cef()--*/\n  virtual bool CanClose(CefRefPtr<CefWindow> window) { return true; }\n};\n\n#endif  // CEF_INCLUDE_VIEWS_CEF_WINDOW_DELEGATE_H_\n"
  },
  {
    "path": "CEF/include/wrapper/cef_byte_read_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file are only available to applications that link\n// against the libcef_dll_wrapper target.\n//\n\n#ifndef CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_\n#define CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_\n#pragma once\n\n#include \"include/base/cef_lock.h\"\n#include \"include/base/cef_macros.h\"\n#include \"include/cef_base.h\"\n#include \"include/cef_stream.h\"\n\n///\n// Thread safe implementation of the CefReadHandler class for reading an\n// in-memory array of bytes.\n///\nclass CefByteReadHandler : public CefReadHandler {\n public:\n  ///\n  // Create a new object for reading an array of bytes. An optional |source|\n  // reference can be kept to keep the underlying data source from being\n  // released while the reader exists.\n  ///\n  CefByteReadHandler(const unsigned char* bytes,\n                     size_t size,\n                     CefRefPtr<CefBase> source);\n\n  // CefReadHandler methods.\n  virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE;\n  virtual int Seek(int64 offset, int whence) OVERRIDE;\n  virtual int64 Tell() OVERRIDE;\n  virtual int Eof() OVERRIDE;\n  virtual bool MayBlock() OVERRIDE { return false; }\n\n private:\n  const unsigned char* bytes_;\n  int64 size_;\n  int64 offset_;\n  CefRefPtr<CefBase> source_;\n\n  base::Lock lock_;\n\n  IMPLEMENT_REFCOUNTING(CefByteReadHandler);\n  DISALLOW_COPY_AND_ASSIGN(CefByteReadHandler);\n};\n\n#endif  // CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/wrapper/cef_closure_task.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file are only available to applications that link\n// against the libcef_dll_wrapper target.\n//\n\n#ifndef CEF_INCLUDE_WRAPPER_CEF_CLOSURE_TASK_H_\n#define CEF_INCLUDE_WRAPPER_CEF_CLOSURE_TASK_H_\n#pragma once\n\n#include \"include/base/cef_callback_forward.h\"\n#include \"include/base/cef_macros.h\"\n#include \"include/cef_task.h\"\n\n///\n// Helpers for asynchronously executing a base::Closure (bound function or\n// method) on a CEF thread. Creation of base::Closures can be facilitated using\n// base::Bind. See include/base/cef_callback.h for complete usage instructions.\n//\n// TO use these helpers you should include this header and the header that\n// defines base::Bind.\n//\n// #include \"include/base/cef_bind.h\"\n// #include \"include/wrapper/cef_closure_task.h\"\n//\n// Example of executing a bound function:\n//\n// // Define a function.\n// void MyFunc(int arg) { /* do something with |arg| on the UI thread */ }\n//\n// // Post a task that will execute MyFunc on the UI thread and pass an |arg|\n// // value of 5.\n// CefPostTask(TID_UI, base::Bind(&MyFunc, 5));\n//\n// Example of executing a bound method:\n//\n// // Define a class.\n// class MyClass : public CefBase {\n//  public:\n//   MyClass() {}\n//   void MyMethod(int arg) { /* do something with |arg| on the UI thread */ }\n//  private:\n//   IMPLEMENT_REFCOUNTING(MyClass);\n// };\n//\n// // Create an instance of MyClass.\n// CefRefPtr<MyClass> instance = new MyClass();\n//\n// // Post a task that will execute MyClass::MyMethod on the UI thread and pass\n// // an |arg| value of 5. |instance| will be kept alive until after the task\n// // completes.\n// CefPostTask(TID_UI, base::Bind(&MyClass::MyMethod, instance, 5));\n///\n\n///\n// Create a CefTask that wraps a base::Closure. Can be used in combination with\n// CefTaskRunner.\n///\nCefRefPtr<CefTask> CefCreateClosureTask(const base::Closure& closure);\n\n///\n// Post a Closure for execution on the specified thread.\n///\nbool CefPostTask(CefThreadId threadId, const base::Closure& closure);\n\n///\n// Post a Closure for delayed execution on the specified thread.\n///\nbool CefPostDelayedTask(CefThreadId threadId, const base::Closure& closure,\n                        int64 delay_ms);\n\n#endif  // CEF_INCLUDE_WRAPPER_CEF_CLOSURE_TASK_H_\n"
  },
  {
    "path": "CEF/include/wrapper/cef_helpers.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file are only available to applications that link\n// against the libcef_dll_wrapper target.\n//\n\n#ifndef CEF_INCLUDE_WRAPPER_CEF_HELPERS_H_\n#define CEF_INCLUDE_WRAPPER_CEF_HELPERS_H_\n#pragma once\n\n#include <cstring>\n#include <string>\n#include <vector>\n\n#include \"include/base/cef_bind.h\"\n#include \"include/base/cef_logging.h\"\n#include \"include/base/cef_macros.h\"\n#include \"include/cef_task.h\"\n\n#define CEF_REQUIRE_UI_THREAD()       DCHECK(CefCurrentlyOn(TID_UI));\n#define CEF_REQUIRE_IO_THREAD()       DCHECK(CefCurrentlyOn(TID_IO));\n#define CEF_REQUIRE_FILE_THREAD()     DCHECK(CefCurrentlyOn(TID_FILE));\n#define CEF_REQUIRE_RENDERER_THREAD() DCHECK(CefCurrentlyOn(TID_RENDERER));\n\n\n// Use this struct in conjuction with refcounted types to ensure that an\n// object is deleted on the specified thread. For example:\n//\n// class Foo : public base::RefCountedThreadSafe<Foo, CefDeleteOnUIThread> {\n//  public:\n//   Foo();\n//   void DoSomething();\n//\n//  private:\n//   // Allow deletion via scoped_refptr only.\n//   friend struct CefDeleteOnThread<TID_UI>;\n//   friend class base::RefCountedThreadSafe<Foo, CefDeleteOnUIThread>;\n//\n//   virtual ~Foo() {}\n// };\n//\n// base::scoped_refptr<Foo> foo = new Foo();\n// foo->DoSomething();\n// foo = NULL;  // Deletion of |foo| will occur on the UI thread.\n//\ntemplate<CefThreadId thread>\nstruct CefDeleteOnThread {\n  template<typename T>\n  static void Destruct(const T* x) {\n    if (CefCurrentlyOn(thread)) {\n      delete x;\n    } else {\n      CefPostTask(thread,\n                  base::Bind(&CefDeleteOnThread<thread>::Destruct<T>, x));\n    }\n  }\n};\n\nstruct CefDeleteOnUIThread : public CefDeleteOnThread<TID_UI> { };\nstruct CefDeleteOnIOThread : public CefDeleteOnThread<TID_IO> { };\nstruct CefDeleteOnFileThread : public CefDeleteOnThread<TID_FILE> { };\nstruct CefDeleteOnRendererThread : public CefDeleteOnThread<TID_RENDERER> { };\n\n\n///\n// Helper class to manage a scoped copy of |argv|.\n///\nclass CefScopedArgArray {\n public:\n  CefScopedArgArray(int argc, char* argv[]) {\n    // argv should have (argc + 1) elements, the last one always being NULL.\n    array_ = new char*[argc + 1];\n    for (int i = 0; i < argc; ++i) {\n      values_.push_back(argv[i]);\n      array_[i] = const_cast<char*>(values_[i].c_str());\n    }\n    array_[argc] = NULL;\n  }\n  ~CefScopedArgArray() {\n    delete [] array_;\n  }\n\n  char** array() const { return array_; }\n\n private:\n  char** array_;\n\n  // Keep values in a vector separate from |array_| because various users may\n  // modify |array_| and we still want to clean up memory properly.\n  std::vector<std::string> values_;\n  \n  DISALLOW_COPY_AND_ASSIGN(CefScopedArgArray);\n};\n\n#endif  // CEF_INCLUDE_WRAPPER_CEF_HELPERS_H_\n"
  },
  {
    "path": "CEF/include/wrapper/cef_message_router.h",
    "content": "// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file are only available to applications that link\n// against the libcef_dll_wrapper target.\n//\n\n#ifndef CEF_INCLUDE_WRAPPER_CEF_MESSAGE_ROUTER_H_\n#define CEF_INCLUDE_WRAPPER_CEF_MESSAGE_ROUTER_H_\n#pragma once\n\n#include \"include/base/cef_ref_counted.h\"\n#include \"include/cef_base.h\"\n#include \"include/cef_browser.h\"\n#include \"include/cef_process_message.h\"\n#include \"include/cef_v8.h\"\n\n// The below classes implement support for routing aynchronous messages between\n// JavaScript running in the renderer process and C++ running in the browser\n// process. An application interacts with the router by passing it data from\n// standard CEF C++ callbacks (OnBeforeBrowse, OnProcessMessageRecieved,\n// OnContextCreated, etc). The renderer-side router supports generic JavaScript\n// callback registration and execution while the browser-side router supports\n// application-specific logic via one or more application-provided Handler\n// instances.\n//\n// The renderer-side router implementation exposes a query function and a cancel\n// function via the JavaScript 'window' object:\n//\n//    // Create and send a new query.\n//    var request_id = window.cefQuery({\n//        request: 'my_request',\n//        persistent: false,\n//        onSuccess: function(response) {},\n//        onFailure: function(error_code, error_message) {}\n//    });\n//\n//    // Optionally cancel the query.\n//    window.cefQueryCancel(request_id);\n//\n// When |window.cefQuery| is executed the request is sent asynchronously to one\n// or more C++ Handler objects registered in the browser process. Each C++\n// Handler can choose to either handle or ignore the query in the\n// Handler::OnQuery callback. If a Handler chooses to handle the query then it\n// should execute Callback::Success when a response is available or\n// Callback::Failure if an error occurs. This will result in asynchronous\n// execution of the associated JavaScript callback in the renderer process. Any\n// queries unhandled by C++ code in the browser process will be automatically\n// canceled and the associated JavaScript onFailure callback will be executed\n// with an error code of -1.\n//\n// Queries can be either persistent or non-persistent. If the query is\n// persistent than the callbacks will remain registered until one of the\n// following conditions are met:\n//\n// A. The query is canceled in JavaScript using the |window.cefQueryCancel|\n//    function.\n// B. The query is canceled in C++ code using the Callback::Failure function.\n// C. The context associated with the query is released due to browser\n//    destruction, navigation or renderer process termination.\n//\n// If the query is non-persistent then the registration will be removed after\n// the JavaScript callback is executed a single time. If a query is canceled for\n// a reason other than Callback::Failure being executed then the associated\n// Handler's OnQueryCanceled method will be called.\n//\n// Some possible usage patterns include:\n//\n// One-time Request. Use a non-persistent query to send a JavaScript request.\n//    The Handler evaluates the request and returns the response. The query is\n//    then discarded.\n//\n// Broadcast. Use a persistent query to register as a JavaScript broadcast\n//    receiver. The Handler keeps track of all registered Callbacks and executes\n//    them sequentially to deliver the broadcast message.\n//\n// Subscription. Use a persistent query to register as a JavaScript subscription\n//    receiver. The Handler initiates the subscription feed on the first request\n//    and delivers responses to all registered subscribers as they become\n//    available. The Handler cancels the subscription feed when there are no\n//    longer any registered JavaScript receivers.\n//\n// Message routing occurs on a per-browser and per-context basis. Consequently,\n// additional application logic can be applied by restricting which browser or\n// context instances are passed into the router. If you choose to use this\n// approach do so cautiously. In order for the router to function correctly any\n// browser or context instance passed into a single router callback must then\n// be passed into all router callbacks.\n//\n// There is generally no need to have multiple renderer-side routers unless you\n// wish to have multiple bindings with different JavaScript function names. It\n// can be useful to have multiple browser-side routers with different client-\n// provided Handler instances when implementing different behaviors on a per-\n// browser basis.\n//\n// This implementation places no formatting restrictions on payload content.\n// An application may choose to exchange anything from simple formatted\n// strings to serialized XML or JSON data.\n//\n//\n// EXAMPLE USAGE\n//\n// 1. Define the router configuration. You can optionally specify settings\n//    like the JavaScript function names. The configuration must be the same in\n//    both the browser and renderer processes. If using multiple routers in the\n//    same application make sure to specify unique function names for each\n//    router configuration.\n//\n//    // Example config object showing the default values.\n//    CefMessageRouterConfig config;\n//    config.js_query_function = \"cefQuery\";\n//    config.js_cancel_function = \"cefQueryCancel\";\n//\n// 2. Create an instance of CefMessageRouterBrowserSide in the browser process.\n//    You might choose to make it a member of your CefClient implementation,\n//    for example.\n//\n//    browser_side_router_ = CefMessageRouterBrowserSide::Create(config);\n//\n// 3. Register one or more Handlers. The Handler instances must either outlive\n//    the router or be removed from the router before they're deleted.\n//\n//    browser_side_router_->AddHandler(my_handler);\n//\n// 4. Call all required CefMessageRouterBrowserSide methods from other callbacks\n//    in your CefClient implementation (OnBeforeClose, etc). See the\n//    CefMessageRouterBrowserSide class documentation for the complete list of\n//    methods.\n//\n// 5. Create an instance of CefMessageRouterRendererSide in the renderer process.\n//    You might choose to make it a member of your CefApp implementation, for\n//    example.\n//\n//    renderer_side_router_ = CefMessageRouterRendererSide::Create(config);\n//\n// 6. Call all required CefMessageRouterRendererSide methods from other\n//    callbacks in your CefRenderProcessHandler implementation\n//    (OnContextCreated, etc). See the CefMessageRouterRendererSide class\n//    documentation for the complete list of methods.\n//\n// 7. Execute the query function from JavaScript code.\n//\n//    window.cefQuery({request: 'my_request',\n//                     persistent: false,\n//                     onSuccess: function(response) { print(response); },\n//                     onFailure: function(error_code, error_message) {} });\n//\n// 8. Handle the query in your Handler::OnQuery implementation and execute the\n//    appropriate callback either immediately or asynchronously.\n//\n//    void MyHandler::OnQuery(int64 query_id,\n//                            CefRefPtr<CefBrowser> browser,\n//                            CefRefPtr<CefFrame> frame,\n//                            const CefString& request,\n//                            bool persistent,\n//                            CefRefPtr<Callback> callback) {\n//      if (request == \"my_request\") {\n//        callback->Continue(\"my_response\");\n//        return true;\n//      }\n//      return false;  // Not handled.\n//    }\n//\n// 9. Notice that the onSuccess callback is executed in JavaScript.\n\n///\n// Used to configure the query router. The same values must be passed to both\n// CefMessageRouterBrowserSide and CefMessageRouterRendererSide. If using multiple\n// router pairs make sure to choose values that do not conflict.\n///\nstruct CefMessageRouterConfig {\n  CefMessageRouterConfig();\n\n  // Name of the JavaScript function that will be added to the 'window' object\n  // for sending a query. The default value is \"cefQuery\".\n  CefString js_query_function;\n\n  // Name of the JavaScript function that will be added to the 'window' object\n  // for canceling a pending query. The default value is \"cefQueryCancel\".\n  CefString js_cancel_function;\n};\n\n///\n// Implements the browser side of query routing. The methods of this class may\n// be called on any browser process thread unless otherwise indicated.\n///\nclass CefMessageRouterBrowserSide :\n    public base::RefCountedThreadSafe<CefMessageRouterBrowserSide> {\n public:\n  ///\n  // Callback associated with a single pending asynchronous query. Execute the\n  // Success or Failure method to send an asynchronous response to the\n  // associated JavaScript handler. It is a runtime error to destroy a Callback\n  // object associated with an uncanceled query without first executing one of\n  // the callback methods. The methods of this class may be called on any\n  // browser process thread.\n  ///\n  class Callback : public CefBase {\n   public:\n    ///\n    // Notify the associated JavaScript onSuccess callback that the query has\n    // completed successfully with the specified |response|.\n    ///\n    virtual void Success(const CefString& response) =0;\n\n    ///\n    // Notify the associated JavaScript onFailure callback that the query has\n    // failed with the specified |error_code| and |error_message|.\n    ///\n    virtual void Failure(int error_code, const CefString& error_message) =0;\n  };\n\n  ///\n  // Implement this interface to handle queries. All methods will be executed on\n  // the browser process UI thread.\n  ///\n  class Handler {\n   public:\n    typedef CefMessageRouterBrowserSide::Callback Callback;\n\n    ///\n    // Executed when a new query is received. |query_id| uniquely identifies the\n    // query for the life span of the router. Return true to handle the query\n    // or false to propagate the query to other registered handlers, if any. If\n    // no handlers return true from this method then the query will be\n    // automatically canceled with an error code of -1 delivered to the\n    // JavaScript onFailure callback. If this method returns true then a\n    // Callback method must be executed either in this method or asynchronously\n    // to complete the query.\n    ///\n    virtual bool OnQuery(CefRefPtr<CefBrowser> browser,\n                         CefRefPtr<CefFrame> frame,\n                         int64 query_id,\n                         const CefString& request,\n                         bool persistent,\n                         CefRefPtr<Callback> callback) {\n      return false;\n    }\n\n    ///\n    // Executed when a query has been canceled either explicitly using the\n    // JavaScript cancel function or implicitly due to browser destruction,\n    // navigation or renderer process termination. It will only be called for\n    // the single handler that returned true from OnQuery for the same\n    // |query_id|. No references to the associated Callback object should be\n    // kept after this method is called, nor should any Callback methods be\n    // executed.\n    ///\n    virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser,\n                                 CefRefPtr<CefFrame> frame,\n                                 int64 query_id) {}\n\n    virtual ~Handler() {}\n  };\n\n  ///\n  // Create a new router with the specified configuration.\n  ///\n  static CefRefPtr<CefMessageRouterBrowserSide> Create(\n      const CefMessageRouterConfig& config);\n\n  ///\n  // Add a new query handler. If |first| is true it will be added as the first\n  // handler, otherwise it will be added as the last handler. Returns true if\n  // the handler is added successfully or false if the handler has already been\n  // added. Must be called on the browser process UI thread. The Handler object\n  // must either outlive the router or be removed before deletion.\n  ///\n  virtual bool AddHandler(Handler* handler, bool first) =0;\n\n  ///\n  // Remove an existing query handler. Any pending queries associated with the\n  // handler will be canceled. Handler::OnQueryCanceled will be called and the\n  // associated JavaScript onFailure callback will be executed with an error\n  // code of -1. Returns true if the handler is removed successfully or false\n  // if the handler is not found. Must be called on the browser process UI\n  // thread.\n  ///\n  virtual bool RemoveHandler(Handler* handler) =0;\n\n  ///\n  // Cancel all pending queries associated with either |browser| or |handler|.\n  // If both |browser| and |handler| are NULL all pending queries will be\n  // canceled. Handler::OnQueryCanceled will be called and the associated\n  // JavaScript onFailure callback will be executed in all cases with an error\n  // code of -1.\n  ///\n  virtual void CancelPending(CefRefPtr<CefBrowser> browser,\n                             Handler* handler) =0;\n\n  ///\n  // Returns the number of queries currently pending for the specified |browser|\n  // and/or |handler|. Either or both values may be empty. Must be called on the\n  // browser process UI thread.\n  ///\n  virtual int GetPendingCount(CefRefPtr<CefBrowser> browser,\n                              Handler* handler) =0;\n\n\n  // The below methods should be called from other CEF handlers. They must be\n  // called exactly as documented for the router to function correctly.\n\n  ///\n  // Call from CefLifeSpanHandler::OnBeforeClose. Any pending queries associated\n  // with |browser| will be canceled and Handler::OnQueryCanceled will be called.\n  // No JavaScript callbacks will be executed since this indicates destruction\n  // of the browser.\n  ///\n  virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) =0;\n\n  ///\n  // Call from CefRequestHandler::OnRenderProcessTerminated. Any pending queries\n  // associated with |browser| will be canceled and Handler::OnQueryCanceled\n  // will be called. No JavaScript callbacks will be executed since this\n  // indicates destruction of the context.\n  ///\n  virtual void OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser) =0;\n\n  ///\n  // Call from CefRequestHandler::OnBeforeBrowse only if the navigation is\n  // allowed to proceed. If |frame| is the main frame then any pending queries\n  // associated with |browser| will be canceled and Handler::OnQueryCanceled\n  // will be called. No JavaScript callbacks will be executed since this\n  // indicates destruction of the context.\n  ///\n  virtual void OnBeforeBrowse(CefRefPtr<CefBrowser> browser,\n                              CefRefPtr<CefFrame> frame) =0;\n\n  ///\n  // Call from CefClient::OnProcessMessageReceived. Returns true if the message\n  // is handled by this router or false otherwise.\n  ///\n  virtual bool OnProcessMessageReceived(\n      CefRefPtr<CefBrowser> browser,\n      CefProcessId source_process,\n      CefRefPtr<CefProcessMessage> message) =0;\n\n protected:\n  // Protect against accidental deletion of this object.\n  friend class base::RefCountedThreadSafe<CefMessageRouterBrowserSide>;\n  virtual ~CefMessageRouterBrowserSide() {}\n};\n\n///\n// Implements the renderer side of query routing. The methods of this class must\n// be called on the render process main thread.\n///\nclass CefMessageRouterRendererSide :\n    public base::RefCountedThreadSafe<CefMessageRouterRendererSide> {\n public:\n  ///\n  // Create a new router with the specified configuration.\n  ///\n  static CefRefPtr<CefMessageRouterRendererSide> Create(\n      const CefMessageRouterConfig& config);\n\n  ///\n  // Returns the number of queries currently pending for the specified |browser|\n  // and/or |context|. Either or both values may be empty.\n  ///\n  virtual int GetPendingCount(CefRefPtr<CefBrowser> browser,\n                              CefRefPtr<CefV8Context> context) =0;\n\n\n  // The below methods should be called from other CEF handlers. They must be\n  // called exactly as documented for the router to function correctly.\n\n  ///\n  // Call from CefRenderProcessHandler::OnContextCreated. Registers the\n  // JavaScripts functions with the new context.\n  ///\n  virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,\n                                CefRefPtr<CefFrame> frame,\n                                CefRefPtr<CefV8Context> context) =0;\n\n  ///\n  // Call from CefRenderProcessHandler::OnContextReleased. Any pending queries\n  // associated with the released context will be canceled and\n  // Handler::OnQueryCanceled will be called in the browser process.\n  ///\n  virtual void OnContextReleased(CefRefPtr<CefBrowser> browser,\n                                 CefRefPtr<CefFrame> frame,\n                                 CefRefPtr<CefV8Context> context) =0;\n  \n  ///\n  // Call from CefRenderProcessHandler::OnProcessMessageReceived. Returns true\n  // if the message is handled by this router or false otherwise.\n  ///\n  virtual bool OnProcessMessageReceived(\n      CefRefPtr<CefBrowser> browser,\n      CefProcessId source_process,\n      CefRefPtr<CefProcessMessage> message) =0;\n\n protected:\n  // Protect against accidental deletion of this object.\n  friend class base::RefCountedThreadSafe<CefMessageRouterRendererSide>;\n  virtual ~CefMessageRouterRendererSide() {}\n};\n\n#endif  // CEF_INCLUDE_WRAPPER_CEF_MESSAGE_ROUTER_H_\n"
  },
  {
    "path": "CEF/include/wrapper/cef_resource_manager.h",
    "content": "// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file are only available to applications that link\n// against the libcef_dll_wrapper target.\n//\n\n#ifndef CEF_INCLUDE_WRAPPER_CEF_RESOURCE_MANAGER_H_\n#define CEF_INCLUDE_WRAPPER_CEF_RESOURCE_MANAGER_H_\n#pragma once\n\n#include <list>\n\n#include \"include/base/cef_macros.h\"\n#include \"include/base/cef_ref_counted.h\"\n#include \"include/base/cef_scoped_ptr.h\"\n#include \"include/base/cef_weak_ptr.h\"\n#include \"include/cef_request_handler.h\"\n#include \"include/wrapper/cef_closure_task.h\"\n#include \"include/wrapper/cef_helpers.h\"\n\n///\n// Class for managing multiple resource providers. For each resource request\n// providers will be called in order and have the option to (a) handle the\n// request by returning a CefResourceHandler, (b) pass the request to the next\n// provider in order, or (c) stop handling the request. See comments on the\n// Request object for additional usage information. The methods of this class\n// may be called on any browser process thread unless otherwise indicated.\n///\nclass CefResourceManager :\n    public base::RefCountedThreadSafe<CefResourceManager, CefDeleteOnIOThread> {\n public:\n  ///\n  // Provides an opportunity to modify |url| before it is passed to a provider.\n  // For example, the implementation could rewrite |url| to include a default\n  // file extension. |url| will be fully qualified and may contain query or\n  // fragment components.\n  ///\n  typedef base::Callback<std::string(\n      const std::string& /*url*/)> UrlFilter;\n\n  ///\n  // Used to resolve mime types for URLs, usually based on the file extension.\n  // |url| will be fully qualified and may contain query or fragment components.\n  ///\n  typedef base::Callback<std::string(\n      const std::string& /*url*/)> MimeTypeResolver;\n\n private:\n  // Values that stay with a request as it moves between providers.\n  struct RequestParams {\n    std::string url_;\n    CefRefPtr<CefBrowser> browser_;\n    CefRefPtr<CefFrame> frame_;\n    CefRefPtr<CefRequest> request_;\n    UrlFilter url_filter_;\n    MimeTypeResolver mime_type_resolver_;\n  };\n\n  // Values that are associated with the pending request only.\n  struct RequestState;\n\n public:\n  ///\n  // Object representing a request. Each request object is used for a single\n  // call to Provider::OnRequest and will become detached (meaning the callbacks\n  // will no longer trigger) after Request::Continue or Request::Stop is called.\n  // A request passed to Provider::OnRequestCanceled will already have been\n  // detached. The methods of this class may be called on any browser process\n  // thread. \n  ///\n  class Request : public base::RefCountedThreadSafe<Request> {\n   public:\n    ///\n    // Returns the URL associated with this request. The returned value will be\n    // fully qualified but will not contain query or fragment components. It\n    // will already have been passed through the URL filter.\n    ///\n    std::string url() const { return params_.url_; }\n\n    ///\n    // Returns the CefBrowser associated with this request.\n    ///\n    CefRefPtr<CefBrowser> browser() const { return params_.browser_; }\n \n    ///\n    // Returns the CefFrame associated with this request.\n    ///\n    CefRefPtr<CefFrame> frame() const { return params_.frame_; }\n\n    ///\n    // Returns the CefRequest associated with this request.\n    ///\n    CefRefPtr<CefRequest> request() const { return params_.request_; }\n\n    ///\n    // Returns the current URL filter.\n    ///\n    const CefResourceManager::UrlFilter& url_filter() const {\n      return params_.url_filter_;\n    }\n\n    ///\n    // Returns the current mime type resolver.\n    ///\n    const CefResourceManager::MimeTypeResolver& mime_type_resolver() const {\n      return params_.mime_type_resolver_;\n    }\n\n    ///\n    // Continue handling the request. If |handler| is non-NULL then no\n    // additional providers will be called and the |handler| value will be\n    // returned via CefResourceManager::GetResourceHandler. If |handler| is NULL\n    // then the next provider in order, if any, will be called. If there are no\n    // additional providers then NULL will be returned via CefResourceManager::\n    // GetResourceHandler. \n    ///\n    void Continue(CefRefPtr<CefResourceHandler> handler);\n\n    ///\n    // Stop handling the request. No additional providers will be called and\n    // NULL will be returned via CefResourceManager::GetResourceHandler.\n    ///\n    void Stop();\n\n  private:\n    // Only allow deletion via scoped_refptr.\n    friend class base::RefCountedThreadSafe<Request>;\n\n    friend class CefResourceManager;\n\n    // The below methods are called on the browser process IO thread.\n\n    explicit Request(scoped_ptr<RequestState> state);\n\n    scoped_ptr<RequestState> SendRequest();\n    bool HasState();\n\n    static void ContinueOnIOThread(scoped_ptr<RequestState> state,\n                                   CefRefPtr<CefResourceHandler> handler);\n    static void StopOnIOThread(scoped_ptr<RequestState> state);\n\n    // Will be non-NULL while the request is pending. Only accessed on the\n    // browser process IO thread.\n    scoped_ptr<RequestState> state_;\n\n    // Params that stay with this request object. Safe to access on any thread.\n    RequestParams params_;\n\n    DISALLOW_COPY_AND_ASSIGN(Request);\n  };\n\n  typedef std::list<scoped_refptr<Request> > RequestList;\n\n\n  ///\n  // Interface implemented by resource providers. A provider may be created on\n  // any thread but the methods will be called on, and the object will be\n  // destroyed on, the browser process IO thread.\n  ///\n  class Provider {\n   public:\n    ///\n    // Called to handle a request. If the provider knows immediately that it\n    // will not handle the request return false. Otherwise, return true and call\n    // Request::Continue or Request::Stop either in this method or\n    // asynchronously to indicate completion. See comments on Request for\n    // additional usage information.\n    ///\n    virtual bool OnRequest(scoped_refptr<Request> request) =0;\n\n    ///\n    // Called when a request has been canceled. It is still safe to dereference\n    // |request| but any calls to Request::Continue or Request::Stop will be\n    // ignored.\n    ///\n    virtual void OnRequestCanceled(scoped_refptr<Request> request) {}\n\n    virtual ~Provider() {}\n  };\n\n  CefResourceManager();\n\n  ///\n  // Add a provider that maps requests for |url| to |content|. |url| should be\n  // fully qualified but not include a query or fragment component. If\n  // |mime_type| is empty the MimeTypeResolver will be used. See comments on\n  // AddProvider for usage of the |order| and |identifier| parameters.\n  ///\n  void AddContentProvider(const std::string& url,\n                          const std::string& content,\n                          const std::string& mime_type,\n                          int order,\n                          const std::string& identifier);\n\n  ///\n  // Add a provider that maps requests that start with |url_path| to files under\n  // |directory_path|. |url_path| should include an origin and optional path\n  // component only. Files will be loaded when a matching URL is requested.\n  // See comments on AddProvider for usage of the |order| and |identifier|\n  // parameters.\n  ///\n  void AddDirectoryProvider(const std::string& url_path,\n                            const std::string& directory_path,\n                            int order,\n                            const std::string& identifier);\n                    \n  ///\n  // Add a provider that maps requests that start with |url_path| to files\n  // stored in the archive file at |archive_path|. |url_path| should include an\n  // origin and optional path component only. The archive file will be loaded\n  // when a matching URL is requested for the first time. See comments on\n  // AddProvider for usage of the |order| and |identifier| parameters.\n  ///\n  void AddArchiveProvider(const std::string& url_path,\n                          const std::string& archive_path,\n                          const std::string& password,\n                          int order,\n                          const std::string& identifier);\n\n  ///\n  // Add a provider. This object takes ownership of |provider|. Providers will\n  // be called in ascending order based on the |order| value. Multiple providers\n  // sharing the same |order| value will be called in the order that they were\n  // added. The |identifier| value, which does not need to be unique, can be\n  // used to remove the provider at a later time.\n  ///\n  void AddProvider(Provider* provider,\n                   int order,\n                   const std::string& identifier);\n\n  ///\n  // Remove all providers with the specified |identifier| value. If any removed\n  // providers have pending requests the Provider::OnRequestCancel method will\n  // be called. The removed providers may be deleted immediately or at a later\n  // time.\n  ///\n  void RemoveProviders(const std::string& identifier);\n\n  ///\n  // Remove all providers. If any removed providers have pending requests the\n  // Provider::OnRequestCancel method will be called. The removed providers may\n  // be deleted immediately or at a later time.\n  ///\n  void RemoveAllProviders();\n\n  ///\n  // Set the url filter. If not set the default no-op filter will be used.\n  // Changes to this value will not affect currently pending requests.\n  ///\n  void SetUrlFilter(const UrlFilter& filter);\n\n  ///\n  // Set the mime type resolver. If not set the default resolver will be used.\n  // Changes to this value will not affect currently pending requests.\n  ///\n  void SetMimeTypeResolver(const MimeTypeResolver& resolver);\n\n\n  // The below methods should be called from other CEF handlers. They must be\n  // called exactly as documented for the manager to function correctly.\n\n  ///\n  // Called from CefRequestHandler::OnBeforeResourceLoad on the browser process\n  // IO thread.\n  ///\n  cef_return_value_t OnBeforeResourceLoad(\n      CefRefPtr<CefBrowser> browser,\n      CefRefPtr<CefFrame> frame,\n      CefRefPtr<CefRequest> request,\n      CefRefPtr<CefRequestCallback> callback);\n\n  ///\n  // Called from CefRequestHandler::GetResourceHandler on the browser process\n  // IO thread.\n  ///\n  CefRefPtr<CefResourceHandler> GetResourceHandler(\n      CefRefPtr<CefBrowser> browser,\n      CefRefPtr<CefFrame> frame,\n      CefRefPtr<CefRequest> request);\n\n private:\n  // Only allow deletion via scoped_refptr.\n  friend struct CefDeleteOnThread<TID_IO>;\n  friend class base::RefCountedThreadSafe<CefResourceManager,\n                                          CefDeleteOnIOThread>;\n\n  ~CefResourceManager();\n  \n  // Provider and associated information.\n  struct ProviderEntry;\n  typedef std::list<ProviderEntry*> ProviderEntryList;\n\n  // Values associated with the pending request only. Ownership will be passed\n  // between requests and the resource manager as request handling proceeds.\n  struct RequestState {\n    ~RequestState();\n\n    base::WeakPtr<CefResourceManager> manager_;\n\n    // Callback to execute once request handling is complete.\n    CefRefPtr<CefRequestCallback> callback_;\n\n    // Position of the currently associated ProviderEntry in the |providers_|\n    // list.\n    ProviderEntryList::iterator current_entry_pos_;\n\n    // Position of this request object in the currently associated\n    // ProviderEntry's |pending_requests_| list.\n    RequestList::iterator current_request_pos_;\n\n    // Params that will be copied to each request object.\n    RequestParams params_;\n  };\n\n  // Methods that manage request state between requests. Called on the browser\n  // process IO thread.\n  bool SendRequest(scoped_ptr<RequestState> state);\n  void ContinueRequest(scoped_ptr<RequestState> state,\n                       CefRefPtr<CefResourceHandler> handler);\n  void StopRequest(scoped_ptr<RequestState> state);\n  bool IncrementProvider(RequestState* state);\n  void DetachRequestFromProvider(RequestState* state);\n  void GetNextValidProvider(ProviderEntryList::iterator& iterator);\n  void DeleteProvider(ProviderEntryList::iterator& iterator, bool stop);\n\n  // The below members are only accessed on the browser process IO thread.\n\n  // List of providers including additional associated information.\n  ProviderEntryList providers_;\n\n  // Map of response ID to pending CefResourceHandler object.\n  typedef std::map<uint64, CefRefPtr<CefResourceHandler> > PendingHandlersMap;\n  PendingHandlersMap pending_handlers_;\n\n  UrlFilter url_filter_;\n  MimeTypeResolver mime_type_resolver_;\n\n  // Must be the last member. Created and accessed on the IO thread.\n  scoped_ptr<base::WeakPtrFactory<CefResourceManager> > weak_ptr_factory_;\n\n  DISALLOW_COPY_AND_ASSIGN(CefResourceManager);\n};\n\n#endif  // CEF_INCLUDE_WRAPPER_CEF_RESOURCE_MANAGER_H_\n"
  },
  {
    "path": "CEF/include/wrapper/cef_stream_resource_handler.h",
    "content": "// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file are only available to applications that link\n// against the libcef_dll_wrapper target.\n//\n\n#ifndef CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_\n#define CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_\n#pragma once\n\n#include \"include/base/cef_macros.h\"\n#include \"include/base/cef_scoped_ptr.h\"\n#include \"include/cef_base.h\"\n#include \"include/cef_resource_handler.h\"\n#include \"include/cef_response.h\"\n\nclass CefStreamReader;\n\n///\n// Implementation of the CefResourceHandler class for reading from a CefStream.\n///\nclass CefStreamResourceHandler : public CefResourceHandler {\n public:\n  ///\n  // Create a new object with default response values.\n  ///\n  CefStreamResourceHandler(const CefString& mime_type,\n                           CefRefPtr<CefStreamReader> stream);\n  ///\n  // Create a new object with explicit response values.\n  ///\n  CefStreamResourceHandler(int status_code,\n                           const CefString& status_text,\n                           const CefString& mime_type,\n                           CefResponse::HeaderMap header_map,\n                           CefRefPtr<CefStreamReader> stream);\n\n  virtual ~CefStreamResourceHandler();\n\n  // CefResourceHandler methods.\n  virtual bool ProcessRequest(CefRefPtr<CefRequest> request,\n                              CefRefPtr<CefCallback> callback) OVERRIDE;\n  virtual void GetResponseHeaders(CefRefPtr<CefResponse> response,\n                                  int64& response_length,\n                                  CefString& redirectUrl) OVERRIDE;\n  virtual bool ReadResponse(void* data_out,\n                            int bytes_to_read,\n                            int& bytes_read,\n                            CefRefPtr<CefCallback> callback) OVERRIDE;\n  virtual void Cancel() OVERRIDE;\n\n private:\n  void ReadOnFileThread(int bytes_to_read,\n                        CefRefPtr<CefCallback> callback);\n\n  const int status_code_;\n  const CefString status_text_;\n  const CefString mime_type_;\n  const CefResponse::HeaderMap header_map_;\n  const CefRefPtr<CefStreamReader> stream_;\n  bool read_on_file_thread_;\n\n  class Buffer;\n  scoped_ptr<Buffer> buffer_;\n#ifndef NDEBUG\n  // Used in debug builds to verify that |buffer_| isn't being accessed on\n  // multiple threads at the same time.\n  bool buffer_owned_by_file_thread_;\n#endif\n\n  IMPLEMENT_REFCOUNTING(CefStreamResourceHandler);\n  DISALLOW_COPY_AND_ASSIGN(CefStreamResourceHandler);\n};\n\n#endif  // CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_\n"
  },
  {
    "path": "CEF/include/wrapper/cef_xml_object.h",
    "content": "// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file are only available to applications that link\n// against the libcef_dll_wrapper target.\n//\n\n#ifndef CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_\n#define CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_\n#pragma once\n\n#include <map>\n#include <vector>\n\n#include \"include/base/cef_lock.h\"\n#include \"include/base/cef_macros.h\"\n#include \"include/base/cef_ref_counted.h\"\n#include \"include/cef_base.h\"\n#include \"include/cef_xml_reader.h\"\n\nclass CefStreamReader;\n\n///\n// Thread safe class for representing XML data as a structured object. This\n// class should not be used with large XML documents because all data will be\n// resident in memory at the same time. This implementation supports a\n// restricted set of XML features:\n// <pre>\n// (1) Processing instructions, whitespace and comments are ignored.\n// (2) Elements and attributes must always be referenced using the fully\n//     qualified name (ie, namespace:localname).\n// (3) Empty elements (<a/>) and elements with zero-length values (<a></a>)\n//     are considered the same.\n// (4) Element nodes are considered part of a value if:\n//     (a) The element node follows a non-element node at the same depth\n//         (see 5), or\n//     (b) The element node does not have a namespace and the parent node does.\n// (5) Mixed node types at the same depth are combined into a single element\n//     value as follows:\n//     (a) All node values are concatenated to form a single string value.\n//     (b) Entity reference nodes are resolved to the corresponding entity\n//         value.\n//     (c) Element nodes are represented by their outer XML string.\n// </pre>\n///\nclass CefXmlObject : public base::RefCountedThreadSafe<CefXmlObject> {\n public:\n  typedef std::vector<CefRefPtr<CefXmlObject> > ObjectVector;\n  typedef std::map<CefString, CefString > AttributeMap;\n\n  ///\n  // Create a new object with the specified name. An object name must always be\n  // at least one character long.\n  ///\n  explicit CefXmlObject(const CefString& name);\n\n  ///\n  // Load the contents of the specified XML stream into this object.  The\n  // existing children and attributes, if any, will first be cleared.\n  ///\n  bool Load(CefRefPtr<CefStreamReader> stream,\n            CefXmlReader::EncodingType encodingType,\n            const CefString& URI, CefString* loadError);\n\n  ///\n  // Set the name, children and attributes of this object to a duplicate of the\n  // specified object's contents. The existing children and attributes, if any,\n  // will first be cleared.\n  ///\n  void Set(CefRefPtr<CefXmlObject> object);\n\n  ///\n  // Append a duplicate of the children and attributes of the specified object\n  // to this object. If |overwriteAttributes| is true then any attributes in\n  // this object that also exist in the specified object will be overwritten\n  // with the new values. The name of this object is not changed.\n  ///\n  void Append(CefRefPtr<CefXmlObject> object, bool overwriteAttributes);\n\n  ///\n  // Return a new object with the same name, children and attributes as this\n  // object. The parent of the new object will be NULL.\n  ///\n  CefRefPtr<CefXmlObject> Duplicate();\n\n  ///\n  // Clears this object's children and attributes. The name and parenting of\n  // this object are not changed.\n  ///\n  void Clear();\n\n  ///\n  // Access the object's name. An object name must always be at least one\n  // character long.\n  ///\n  CefString GetName();\n  bool SetName(const CefString& name);\n\n  ///\n  // Access the object's parent. The parent can be NULL if this object has not\n  // been added as the child on another object.\n  ///\n  bool HasParent();\n  CefRefPtr<CefXmlObject> GetParent();\n\n  ///\n  // Access the object's value. An object cannot have a value if it also has\n  // children. Attempting to set the value while children exist will fail.\n  ///\n  bool HasValue();\n  CefString GetValue();\n  bool SetValue(const CefString& value);\n\n  ///\n  // Access the object's attributes. Attributes must have unique names.\n  ///\n  bool HasAttributes();\n  size_t GetAttributeCount();\n  bool HasAttribute(const CefString& name);\n  CefString GetAttributeValue(const CefString& name);\n  bool SetAttributeValue(const CefString& name, const CefString& value);\n  size_t GetAttributes(AttributeMap& attributes);\n  void ClearAttributes();\n\n  ///\n  // Access the object's children. Each object can only have one parent so\n  // attempting to add an object that already has a parent will fail. Removing a\n  // child will set the child's parent to NULL. Adding a child will set the\n  // child's parent to this object. This object's value, if any, will be cleared\n  // if a child is added.\n  ///\n  bool HasChildren();\n  size_t GetChildCount();\n  bool HasChild(CefRefPtr<CefXmlObject> child);\n  bool AddChild(CefRefPtr<CefXmlObject> child);\n  bool RemoveChild(CefRefPtr<CefXmlObject> child);\n  size_t GetChildren(ObjectVector& children);\n  void ClearChildren();\n\n  ///\n  // Find the first child with the specified name.\n  ///\n  CefRefPtr<CefXmlObject> FindChild(const CefString& name);\n\n  ///\n  // Find all children with the specified name.\n  ///\n  size_t FindChildren(const CefString& name, ObjectVector& children);\n\n private:\n  // Protect against accidental deletion of this object.\n  friend class base::RefCountedThreadSafe<CefXmlObject>;\n  ~CefXmlObject();\n\n  void SetParent(CefXmlObject* parent);\n\n  CefString name_;\n  CefXmlObject* parent_;\n  CefString value_;\n  AttributeMap attributes_;\n  ObjectVector children_;\n\n  base::Lock lock_;\n\n  DISALLOW_COPY_AND_ASSIGN(CefXmlObject);\n};\n\n#endif  // CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_\n"
  },
  {
    "path": "CEF/include/wrapper/cef_zip_archive.h",
    "content": "// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//    * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//    * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//    * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the names of its contributors may be used to endorse\n// or promote products derived from this software without specific prior\n// written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// ---------------------------------------------------------------------------\n//\n// The contents of this file are only available to applications that link\n// against the libcef_dll_wrapper target.\n//\n\n#ifndef CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_\n#define CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_\n#pragma once\n\n#include <map>\n\n#include \"include/base/cef_lock.h\"\n#include \"include/base/cef_macros.h\"\n#include \"include/base/cef_ref_counted.h\"\n#include \"include/cef_base.h\"\n\nclass CefStreamReader;\n\n///\n// Thread-safe class for accessing zip archive file contents. This class should\n// not be used with large archive files because all data will be resident in\n// memory at the same time. This implementation supports a restricted set of zip\n// archive features:\n// (1) All file names are stored and compared in lower case.\n// (2) File ordering from the original zip archive is not maintained. This\n//     means that files from the same folder may not be located together in the\n//     file content map.\n///\nclass CefZipArchive : public base::RefCountedThreadSafe<CefZipArchive> {\n public:\n  ///\n  // Class representing a file in the archive. Accessing the file data from\n  // multiple threads is safe provided a reference to the File object is kept.\n  ///\n  class File : public CefBase {\n   public:\n    ///\n    // Returns the read-only data contained in the file.\n    ///\n    virtual const unsigned char* GetData() const =0;\n\n    ///\n    // Returns the size of the data in the file.\n    ///\n    virtual size_t GetDataSize() const =0;\n\n    ///\n    // Returns a CefStreamReader object for streaming the contents of the file.\n    ///\n    virtual CefRefPtr<CefStreamReader> GetStreamReader() const =0;\n  };\n\n  typedef std::map<CefString, CefRefPtr<File> > FileMap;\n\n  ///\n  // Create a new object.\n  ///\n  CefZipArchive();\n\n  ///\n  // Load the contents of the specified zip archive stream into this object.\n  // If the zip archive requires a password then provide it via |password|.\n  // If |overwriteExisting| is true then any files in this object that also\n  // exist in the specified archive will be replaced with the new files.\n  // Returns the number of files successfully loaded.\n  ///\n  size_t Load(CefRefPtr<CefStreamReader> stream,\n              const CefString& password,\n              bool overwriteExisting);\n\n  ///\n  // Clears the contents of this object.\n  ///\n  void Clear();\n\n  ///\n  // Returns the number of files in the archive.\n  ///\n  size_t GetFileCount() const;\n\n  ///\n  // Returns true if the specified file exists and has contents.\n  ///\n  bool HasFile(const CefString& fileName) const;\n\n  ///\n  // Returns the specified file.\n  ///\n  CefRefPtr<File> GetFile(const CefString& fileName) const;\n\n  ///\n  // Removes the specified file.\n  ///\n  bool RemoveFile(const CefString& fileName);\n\n  ///\n  // Returns the map of all files.\n  ///\n  size_t GetFiles(FileMap& map) const;\n\n private:\n  // Protect against accidental deletion of this object.\n  friend class base::RefCountedThreadSafe<CefZipArchive>;\n  ~CefZipArchive();\n\n  FileMap contents_;\n\n  mutable base::Lock lock_;\n\n  DISALLOW_COPY_AND_ASSIGN(CefZipArchive);\n};\n\n#endif  // CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_\n"
  },
  {
    "path": "CEFV8HandlerEx.cc",
    "content": "#include \"stdafx.h\"\n#include \"CEFV8HandlerEx.h\"\n#include <strsafe.h>\n\nCCEFV8HandlerEx::CCEFV8HandlerEx()\n{\n\n}\n\nCCEFV8HandlerEx::~CCEFV8HandlerEx()\n{\n\n\tint a = 20;\n\n}\n\n\nbool CCEFV8HandlerEx::Execute(const CefString& name  /*JavaScriptõC++*/, CefRefPtr<CefV8Value> object /*JavaScript߶*/, const CefV8ValueList& arguments /*JavaScriptݵĲ*/, CefRefPtr<CefV8Value>& retval /*ظJSֵø*/, CefString& exception/*֪ͨ쳣ϢJavaScript*/)\n{\n\tif (name == _T(\"jsInvokeCPlusPlus\"))\n\t{\n\t\tif (arguments.size() == 2)\n\t\t{\n\t\t\tCefString strParam1 = arguments.at(0)->GetStringValue();\n\t\t\tCefString strParam2 = arguments.at(1)->GetStringValue();\n\n\t\t\tTCHAR szBuffer[512];\n\t\t\tStringCbPrintf(szBuffer, sizeof(szBuffer), _T(\"jsInvokeCPlusPlus(%s,%s)\"), strParam1.c_str(), strParam2.c_str());\n\t\t\t::MessageBox(GetForegroundWindow(), szBuffer, _T(\"jsInvokeCPlusPlus\"), MB_OK);\n\n\t\t\t////ִjs\n\t\t\t//CefRefPtr<CefBrowser> pBrower = pWKEWebkitCtrl_->GetBrowserByID(nBrowserID);\n\t\t\t//if (pBrower)\n\t\t\t//{\n\t\t\t//\tpBrower->GetMainFrame().get()->ExecuteJavaScript(\"alert('ExecuteJavaScript succeed!');\", pBrower->GetMainFrame().get()->GetURL(), 0);\n\t\t\t//}\n\n\t\t\tretval = CefV8Value::CreateInt(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tretval = CefV8Value::CreateInt(2);\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\n\n\t// Function does not exist.\n\treturn false;\n\n\n}"
  },
  {
    "path": "CEFV8HandlerEx.h",
    "content": "#pragma once\n#include \"stdafx.h\"\n#include <cef_v8.h>\n#include <cef_base.h>\n\nclass CCEFV8HandlerEx : public CefV8Handler {\npublic:\n\tCCEFV8HandlerEx();\n\t~CCEFV8HandlerEx();\npublic:\n\tvirtual bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) override;\nprivate:\n\t// Map of message callbacks.\n\ttypedef std::map<std::pair<std::string, int>, std::pair<CefRefPtr<CefV8Context>, CefRefPtr<CefV8Value> > >CallbackMap;\n\tCallbackMap callback_map_;\n\n\npublic:\n\tIMPLEMENT_REFCOUNTING(CCEFV8HandlerEx);\n};\n\n"
  },
  {
    "path": "CEFWebkit.cc",
    "content": "#include \"stdafx.h\"\n#include \"CEFWebkit.h\"\n\nnamespace DuiLib\n{\n\n\tCCEFWebkitUI::CCEFWebkitUI(HWND hParent) :nHitIndex_(0)\n\t{\n\t\thWebKitBrowserWnd_ = hParent;\n\t\tclientHandler_ = new CCefClientHandler();\n\t\tclientHandler_->hWnd_ = hWebKitBrowserWnd_;\n\t}\n\n\tCCEFWebkitUI::~CCEFWebkitUI()\n\t{\n\n\t}\n\n\tLPCTSTR CCEFWebkitUI::GetClass() const\n\t{\n\t\treturn _T(\"WKEWebkitUI\");\n\t}\n\tLPVOID CCEFWebkitUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif (_tcscmp(pstrName, DUI_CTR_WKEWEBKIT) == 0)\n\t\t{\n\t\t\treturn static_cast<CCEFWebkitUI*>(this);\n\t\t}\n\n\t\treturn CControlUI::GetInterface(pstrName);\n\t}\n\n\tvoid CCEFWebkitUI::DoInit()\n\t{\n\n\t\t/*\tCefRefPtr<CCefClientHandler>client(new CCefClientHandler());\n\t\t\tclient->hWnd_ = hWebKitBrowserWnd_;\n\n\t\t\tclientHandlers_.push_back(client);\n\t\t\tCefWindowInfo info;\n\t\t\tRECT rectnew = { 100,100,800,600 };\n\n\t\t\tinfo.SetAsChild(hWebKitBrowserWnd_, rectnew);\n\t\t\tCefBrowserSettings browserSettings;\n\n\t\t\tstd::wstring strURL(_T(\"http://www.baidu.com\"));\n\t\t\tCefBrowserHost::CreateBrowser(info, client, strURL, browserSettings, NULL);\n\n\t\t\tstrURLs_.push_back(strURL);\n\t\t*/\n\n\t\t//\tNewPage(_T(\"www.csdn.net\"));\n\t\t// ++nHitIndex_;\n\t}\n\n\tvoid CCEFWebkitUI::SetPos(RECT rc)\n\t{\n\t\t__super::SetPos(rc);\n\n\t\tCefRefPtr<CefBrowser> pBrowser = NULL;\n\t\tCefRefPtr<CefBrowserHost>  pBrowerHost = NULL;\n\t\tCefWindowHandle hwnd = NULL;\n\n\t\tif (clientHandler_ != NULL)\n\t\t{\n\n\t\t\tfor (UINT idx = 0; idx < clientHandler_.get()->browser_list_.size(); idx++)\n\t\t\t{\n\n\t\t\t\tpBrowser = clientHandler_.get()->browser_list_.at(idx);\n\n\t\t\t\tif (pBrowser)\n\t\t\t\t{\n\t\t\t\t\tpBrowerHost = pBrowser->GetHost();\n\n\t\t\t\t\tif (pBrowerHost)\n\t\t\t\t\t{\n\n\t\t\t\t\t\thwnd = pBrowerHost->GetWindowHandle();\n\t\t\t\t\t\tif ((hwnd != NULL) && (IsWindow(hwnd)))\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\tif (idx != nHitIndex_)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//MoveWindow(hwnd, 0, 0, 0, 0, false);\n\t\t\t\t\t\t\t\tShowWindow(hwnd, SW_HIDE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tShowWindow(hwnd, SW_SHOW);\n\t\t\t\t\t\t\t\tMoveWindow(hwnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\n\t\t\t}\n\n\n\t\t}\n\n\t}\n\n\tvoid CCEFWebkitUI::DoEvent(TEventUI& event)\n\t{\n\t\t__super::DoEvent(event);\n\t}\n\n\tvoid CCEFWebkitUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif (_tcscmp(pstrName, _T(\"url\")) == 0)\n\t\t{\n\t\t\t//\tstrUrl_ = pstrValue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCControlUI::SetAttribute(pstrName, pstrValue);\n\t\t}\n\t}\n\n\n\t//ҳǩ\n\tvoid CCEFWebkitUI::NewPage(CefString Url)\n\t{\n\t\tCefWindowInfo info;\n\n\t\t//RECT rectnew = { 0,200,800,600 };//= GetPos();\n\t\tRECT rectnew = GetPos();\n\n\t\tinfo.SetAsChild(hWebKitBrowserWnd_, rectnew);\n\n\t\tCefBrowserSettings browserSettings;\n\n\t\tCefBrowserHost::CreateBrowser(info, static_cast<CefRefPtr<CefClient>>(clientHandler_), Url.c_str(), browserSettings, NULL);\n\n\t\t//nHitIndex_ = clientHandler_->browser_list_.size();\n\n\t\t//NeedParentUpdate();\n\t}\n\n\t//ɾҳǩ\n\tvoid CCEFWebkitUI::DelPage(int nWebBrowserID)\n\t{\n\n\t\tint idx = 0;\n\n\t\tBOOL bNeedRemove = FALSE;\n\n\t\tvector<CefRefPtr<CefBrowser>>::const_iterator  itTmpWebBrower = clientHandler_->browser_list_.begin();\n\n\t\tfor (; itTmpWebBrower != clientHandler_->browser_list_.end(); itTmpWebBrower++)\n\t\t{\n\t\t\t++idx;\n\n\t\t\tif (nWebBrowserID == itTmpWebBrower->get()->GetIdentifier())\n\t\t\t{\n\n\t\t\t\tif (clientHandler_->browser_list_.size() == 1)\n\t\t\t\t{\n\t\t\t\t\titTmpWebBrower->get()->GetMainFrame()->LoadURL(_T(\"about:blank\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbNeedRemove = TRUE;\n\t\t\t\t\t::MoveWindow(itTmpWebBrower->get()->GetHost()->GetWindowHandle(), 0, 0, 0, 0, true);\n\t\t\t\t\tnHitIndex_ = idx - 1;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tif (bNeedRemove)\n\t\t{\n\t\t\t\n\t\t\tclientHandler_->CloseHostBrowser(itTmpWebBrower->get(), true);\n\t\t\t//clientHandler_->browser_list_.erase(itTmpWebBrower);\n\t\t}\n\n\n\t\tReFresh();\n\n\t}\n\n\tvoid CCEFWebkitUI::CloseAllPage()\n\t{\n\t\tclientHandler_->CloseAllBrowsers(true);\n\t}\n\n\n\tBOOL CCEFWebkitUI::IsClosed() const\n\t{\n\t\tif (clientHandler_->IsClosing())\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\n\tvoid CCEFWebkitUI::ReFresh()\n\t{\n\n\t\tRECT rectnew = GetPos();\n\t\tSetPos(rectnew);\n\t}\n\n\tvoid CCEFWebkitUI::ReFresh(int nWebBrowserID)\n\t{\n\t\tint idx = 0;\n\n\t\tfor (auto it = clientHandler_->browser_list_.begin(); it != clientHandler_->browser_list_.end(); it++)\n\t\t{\n\n\t\t\tif (nWebBrowserID == it->get()->GetIdentifier())\n\t\t\t{\n\t\t\t\tnHitIndex_ = idx;\n\t\t\t}\n\n\t\t\t++idx;\n\t\t}\n\n\t\tReFresh();\n\t}\n\n\tvoid CCEFWebkitUI::ReLoad(int nWebBrowserID)\n\t{\n\n\t\tfor (auto it = clientHandler_->browser_list_.begin(); it != clientHandler_->browser_list_.end(); it++)\n\t\t{\n\t\t\tif (nWebBrowserID == it->get()->GetIdentifier())\n\t\t\t{\n\t\t\t\tit->get()->Reload();\n\t\t\t}\n\t\t}\n\n\t}\n\n\tvoid CCEFWebkitUI::LoadURL(int nWebBrowserID, CefString & strURL)\n\t{\n\n\t\tfor (auto it = clientHandler_->browser_list_.begin(); it != clientHandler_->browser_list_.end(); it++)\n\t\t{\n\t\t\tif (nWebBrowserID == it->get()->GetIdentifier())\n\t\t\t{\n\t\t\t\tit->get()->GetMainFrame()->LoadURL(strURL);\n\t\t\t}\n\t\t}\n\n\t\tReFresh(nWebBrowserID);\n\n\t}\n\n\tCefString CCEFWebkitUI::GetFinalURL(int nWebBrowserID)\n\t{\n\t\tCefString strURL = \"\";\n\n\t\tfor (auto it = clientHandler_->browser_list_.begin(); it != clientHandler_->browser_list_.end(); it++)\n\t\t{\n\n\t\t\tif (nWebBrowserID == it->get()->GetIdentifier())\n\t\t\t{\n\t\t\t\tstrURL = it->get()->GetMainFrame()->GetURL();\n\t\t\t}\n\n\t\t}\n\n\t\treturn strURL;\n\n\t}\n\n\tBOOL CCEFWebkitUI::CanGoForward(int nWebBrowserID)\n\t{\n\n\t\tfor (auto it = clientHandler_->browser_list_.begin(); it != clientHandler_->browser_list_.end(); it++)\n\t\t{\n\n\t\t\tif (nWebBrowserID == it->get()->GetIdentifier())\n\t\t\t{\n\t\t\t\t\n\t\t\t\treturn it->get()->CanGoForward();\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}\n\n\tvoid CCEFWebkitUI::GoForward(int nWebBrowserID)\n\t{\n\n\t\tfor (auto it = clientHandler_->browser_list_.begin(); it != clientHandler_->browser_list_.end(); it++)\n\t\t{\n\n\t\t\tif (nWebBrowserID == it->get()->GetIdentifier())\n\t\t\t{\n\n\t\t\t\tif (it->get()->CanGoForward()!=false)\n\t\t\t\t{\n\t\t\t\t\tit->get()->GoForward();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}\n\n\n\tBOOL CCEFWebkitUI::CanGoBack(int nWebBrowserID)\n\t{\n\n\t\tfor (auto it = clientHandler_->browser_list_.begin(); it != clientHandler_->browser_list_.end(); it++)\n\t\t{\n\n\t\t\tif (nWebBrowserID == it->get()->GetIdentifier())\n\t\t\t{\n\t\t\t\t\n\t\t\t\treturn it->get()->CanGoBack();\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}\n\n\tvoid CCEFWebkitUI::GoBack(int nWebBrowserID)\n\t{\n\t\tfor (auto it = clientHandler_->browser_list_.begin(); it != clientHandler_->browser_list_.end(); it++)\n\t\t{\n\n\t\t\tif (nWebBrowserID == it->get()->GetIdentifier())\n\t\t\t{\n\t\t\t\tif (it->get()->CanGoBack())\n\t\t\t\t{\n\t\t\t\t\tit->get()->GoBack();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}\n\tCefRefPtr<CefBrowser> CCEFWebkitUI::GetBrowserByID(int nWebBrowserID)\n\t{\n\n\t\tfor (auto it = clientHandler_->browser_list_.begin(); it != clientHandler_->browser_list_.end(); it++)\n\t\t{\n\n\t\t\tif (nWebBrowserID == it->get()->GetIdentifier())\n\t\t\t{\n\t\t\t\treturn it->get();\n\t\t\t}\n\t\t}\n\n\t\treturn nullptr;\n\t}\n\t\n\tint CCEFWebkitUI::GetHitIndex() const\n\t{\n\t\treturn nHitIndex_;\n\t}\n\n\tvoid CCEFWebkitUI::SetHitIndex(int idx)\n\t{\n\t\tnHitIndex_ = idx;\n\t\tReFresh();\n\t\t//++TODO: show web \n\t}\n\n}"
  },
  {
    "path": "CEFWebkit.h",
    "content": "#pragma  once \n\n#ifndef UIWKEWEBKIT_H\n#define UIWKEWEBKIT_H\n#include \"stdafx.h\"\n#include <vector>\n#include \"BrowserHandlers.h\"\n\nnamespace DuiLib\n{\n\tclass CCEFWebkitUI : public CControlUI\n\t{\n\tpublic:\n\t\tCCEFWebkitUI(HWND hParent);\n\t\t~CCEFWebkitUI();\n\n\t\tvirtual LPCTSTR GetClass() const;\n\t\tvirtual LPVOID GetInterface(LPCTSTR pstrName);\n\t\tvirtual void DoInit();\n\t\tvirtual void DoEvent(TEventUI& event);\n\t\tvirtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\t\tvirtual void SetPos(RECT rc);\n\n\tpublic:\n\t\tvoid NewPage(CefString Url);\n\t\tvoid DelPage(int nWebBrowserID);\n\t\tvoid CloseAllPage();\n\t\tBOOL IsClosed() const;\n\t\tvoid ReFresh();\n\t\tvoid ReFresh(int nWebBrowserID);\n\t\tvoid ReLoad(int nWebBrowserID);\n\t\tvoid LoadURL(int nWebBrowserID, CefString& strURL);\n\t\tCefString GetFinalURL(int nWebBrowserID);\n\n\t\tBOOL CanGoForward(int nWebBrowserID) ;\n\t\tvoid GoForward(int nWebBrowserID);\n\t\tBOOL CanGoBack(int nWebBrowserID);\n\t\tvoid GoBack(int nWebBrowserID);\n\t\tCefRefPtr<CefBrowser> GetBrowserByID(int nWebBrowserID);\n\n\t\tint GetHitIndex() const;\n\t\tvoid SetHitIndex(int idx);\n\tpublic:\n\n\t\t//virtual void SetInnerVisible(bool bVisible = true)\n\t\t//{\n\t\t//\t__super::SetInnerVisible(bVisible);\n\t\t//\t::ShowWindow(hWebKitBrowserWnd_, bVisible);\n\t\t//}\n\n\tpublic:\n\n\tprotected:\n\n\t\tHWND hWebKitBrowserWnd_;\n\t\t//std::vector<std::wstring> strURLs_;\n\t\tCefRefPtr<CCefClientHandler>  clientHandler_; //CefClientʵ֣ڴBrowserʵصĻص\n\t\tint nHitIndex_;\n\n\t};\n}\n\n\n#endif\n"
  },
  {
    "path": "CEFWebkitBrowser.cc",
    "content": "#include \"stdafx.h\"\n#include \"CEFWebkitBrowser.h\"\n\n// WKEWebkitBrowser.cpp : Ӧóڵ㡣\n//\n#include \"stdafx.h\"\n#include \"CEFWebkitBrowser.h\"\n#include <strsafe.h>\n\n\n#define \tE_GOFORWORD_TIMER  100\nCEFWebkitBrowserWnd* CEFWebkitBrowserWnd::pCEFWebkitBrowserWnd = NULL;\n\nCEFWebkitBrowserWnd::CEFWebkitBrowserWnd()\n{\n\tpURLEditCtrl_ = NULL;\n\tpSearchEditCtrl_ = NULL;\n\tpWebStateCtrl_ = NULL;\n\tpWKEWebkitCtrl_ = NULL;\n\tpWebTabContainer_ = NULL;\n\n\tpCEFWebkitBrowserWnd = this;\n\n}\n\nCEFWebkitBrowserWnd::~CEFWebkitBrowserWnd()\n{\n\n}\n\n\nCControlUI* CEFWebkitBrowserWnd::CreateControl(LPCTSTR pstrClassName)\n{\n\tif (_tcsicmp(pstrClassName, _T(\"CEFWebkitBrowser\")) == 0)\n\t{\n\t\treturn  (pWKEWebkitCtrl_ = new CCEFWebkitUI(GetSafeHwnd()));\n\t}\n\n\treturn NULL;\n}\n\nvoid CEFWebkitBrowserWnd::OnFinalMessage(HWND hWnd)\n{\n\n\n\t__super::OnFinalMessage(hWnd);\n}\n\nLRESULT CEFWebkitBrowserWnd::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n{\n\t::PostQuitMessage(0L);\n\treturn __super::OnDestroy(uMsg, wParam, lParam, bHandled);\n}\n\n//ȡWM_CLOSEϢ\nLRESULT CEFWebkitBrowserWnd::OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)\n{\n\n\tif ((pWKEWebkitCtrl_ != NULL) && (!pWKEWebkitCtrl_->IsClosed()))\n\t{\n\t\t//pWKEWebkitCtrl_->CloseAllPage();\n\t\tbHandled = TRUE;\n\t\t//  Cancel the close.\n\n\t}\n\telse\n\t{\n\t\tbHandled = TRUE;\n\t}\n\n\treturn 0;\n}\n\nvoid CEFWebkitBrowserWnd::OnClick(TNotifyUI & msg)\n{\n\tCDuiString strName = msg.pSender->GetName();\n\n\tif (strName.Find(_T(\"webtab\")) != -1)\n\t{\n\t\tCOptionUI* pOpt = (COptionUI*)msg.pSender;\n\n\t\tCOptionTag* pTag = (COptionTag*)pOpt->GetTag();\n\t\tif (pTag)\n\t\t{\n\t\t\tRECT rc = pOpt->GetPos();\n\t\t\tif (msg.ptMouse.x > rc.right - 30 && msg.ptMouse.y < rc.top + 20)\n\t\t\t{\n\t\t\t\tpWKEWebkitCtrl_->DelPage(pTag->nID_);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpWKEWebkitCtrl_->ReFresh(pTag->nID_);\n\t\t\t\tpURLEditCtrl_->SetText(pWKEWebkitCtrl_->GetFinalURL(pTag->nID_).c_str());\n\n\t\t\t}\n\n\t\t}\n\t}\n\telse if (_T(\"ui_btn_close\") == strName)\n\t{\n\t\tif ((pWKEWebkitCtrl_ != NULL) && (!pWKEWebkitCtrl_->IsClosed()))\n\t\t{\n\t\t\tpWKEWebkitCtrl_->CloseAllPage();\n\t\t}\n\n\t}\n\n\t__super::OnClick(msg);\n\n}\n\n\nvoid CEFWebkitBrowserWnd::InitWindow()\n{\n\tpWebStateCtrl_ = dynamic_cast<CLabelUI*>(FindControl(_T(\"ui_lbl_status\")));\n\tpURLEditCtrl_ = dynamic_cast<CRichEditUI*>(FindControl(_T(\"ui_et_urlinput\")));\n\tpSearchEditCtrl_ = dynamic_cast<CEditUI*>(FindControl(_T(\"ui_et_search\")));\n\tpWebTabContainer_ = dynamic_cast<CHorizontalLayoutUI*>(FindControl(_T(\"ui_hl_urltabs\")));\n\tpGoBackCtrl_ = dynamic_cast<CButtonUI*>(FindControl(_T(\"ui_btn_goback\")));\n\tpGoForwardCtrl_ = dynamic_cast<CButtonUI*>(FindControl(_T(\"ui_btn_goforward\")));;\n\n\tif ((!pWebStateCtrl_) || (!pURLEditCtrl_) || (!pWebTabContainer_) || (!pGoBackCtrl_) || (!pGoForwardCtrl_) || (!pSearchEditCtrl_))\n\t{\n\t\tMessageBox(GetSafeHwnd(), _T(\"ؼʼʧܣ\"), _T(\"Err\"), MB_OK);\n\t\tPostQuitMessage(0);\n\t}\n\n}\n\n\nvoid CEFWebkitBrowserWnd::Notify(TNotifyUI& msg)\n{\n\tif (msg.sType == DUI_MSGTYPE_CLICK)\n\t{\n\t\tif (msg.pSender->GetName() == _T(\"ui_btn_goback\"))\n\t\t{\n\t\t\tCOptionUI* pCurrentOpt = NULL;\n\t\t\tCOptionTag* pTag = NULL;\n\n\t\t\tif (pCurrentOpt = GetActiveOption())\n\t\t\t{\n\t\t\t\tif (pTag = (COptionTag*)pCurrentOpt->GetTag())\n\t\t\t\t{\n\n\t\t\t\t\tpWKEWebkitCtrl_->GoBack(pTag->nID_);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (msg.pSender->GetName() == _T(\"ui_btn_goforward\"))\n\t\t{\n\t\t\tCOptionUI* pCurrentOpt = NULL;\n\t\t\tCOptionTag* pTag = NULL;\n\n\t\t\tif (pCurrentOpt = GetActiveOption())\n\t\t\t{\n\t\t\t\tif (pTag = (COptionTag*)pCurrentOpt->GetTag())\n\t\t\t\t{\n\n\t\t\t\t\tpWKEWebkitCtrl_->GoForward(pTag->nID_);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (msg.pSender->GetName() == _T(\"ui_btn_refresh\"))\n\t\t{\n\t\t\tCOptionUI* pCurrentOpt = NULL;\n\t\t\tCOptionTag* pTag = NULL;\n\n\t\t\tif (pCurrentOpt = GetActiveOption())\n\t\t\t{\n\t\t\t\tif (pTag = (COptionTag*)pCurrentOpt->GetTag())\n\t\t\t\t{\n\t\t\t\t\tpWKEWebkitCtrl_->ReLoad(pTag->nID_);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\telse if (msg.pSender->GetName() == _T(\"ui_btn_home\"))\n\t\t{\n\t\t\tpWKEWebkitCtrl_->NewPage(\"www.baidu.com\");\n\t\t}\n\t\telse if (msg.pSender->GetName() == _T(\"ui_btn_newpage\"))\n\t\t{\n\t\t\tif (pWKEWebkitCtrl_)\n\t\t\t{\n\t\t\t\t//\tpWKEWebkitCtrl_->NewPage(_T(\"about:black\"));\n\t\t\t\tpWKEWebkitCtrl_->NewPage(_T(\"about:blank\"));\n\t\t\t}\n\t\t}\n\n\n\t}\n\t//Ҫرricheditwant return\n\telse if (msg.sType == DUI_MSGTYPE_RETURN)\n\t{\n\t\tCefString strURL;\n\n\t\tif (pURLEditCtrl_ == msg.pSender)\n\t\t{\n\t\t\tif (pURLEditCtrl_&&pWKEWebkitCtrl_)\n\t\t\t{\n\n\n\t\t\t\tif (pURLEditCtrl_->GetText().IsEmpty())\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstrURL = pURLEditCtrl_->GetText().GetData();\n\t\t\t\t}\n\n\t\t\t\tCOptionUI* pCurrentOpt = NULL;\n\t\t\t\tCOptionTag* pTag = NULL;\n\n\t\t\t\tif (pCurrentOpt = GetActiveOption())\n\t\t\t\t{\n\t\t\t\t\tif (pTag = (COptionTag*)pCurrentOpt->GetTag())\n\t\t\t\t\t{\n\t\t\t\t\t\tpWKEWebkitCtrl_->LoadURL(pTag->nID_, strURL);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\telse if (pSearchEditCtrl_ == msg.pSender)\n\t\t{\n\t\t\tif (!pSearchEditCtrl_->GetText().IsEmpty())\n\t\t\t{\n\t\t\t\tCDuiString sUrl;\n\t\t\t\tsUrl.Format(_T(\"https://www.baidu.com/s?ie=utf-8&wd=%s\"), pSearchEditCtrl_->GetText().GetData());\n\t\t\t\tpWKEWebkitCtrl_->NewPage(sUrl.GetData());\n\t\t\t}\n\n\t\t}\n\t}\n\telse if (msg.sType == _T(\"windowinit\"))\n\t{\n\t\tOnInitComplate();\n\t}\n\telse if (msg.sType == DUI_MSGTYPE_TIMER)\n\t{\n\t\tif (msg.pSender == pWKEWebkitCtrl_)\n\t\t{\n\t\t\tif (msg.wParam == E_GOFORWORD_TIMER)\n\t\t\t{\n\t\t\t\tSwitchUIState();\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\n\t__super::Notify(msg);\n}\n\n\nLRESULT CEFWebkitBrowserWnd::HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n{\n\t//TCHAR szBuf[256];\n\n\tswitch (uMsg)\n\t{\n\n\tcase UM_CEF_POSTQUITMESSAGE:\n\t\tbHandled = TRUE;\n\t\t//Sleep(2000);\n\t//\tCefQuitMessageLoop();\n\t\tPostQuitMessage(0L);\n\t\tbreak;\n\tcase UM_CEF_WEBLOADPOPUP:\n\t{\n\n\t\tCefString* pStrComplateURL = (CefString*)lParam;\n\t\tif (pStrComplateURL != NULL)\n\t\t{\n\t\t\tpWKEWebkitCtrl_->NewPage(*pStrComplateURL);\n\n\t\t\tdelete pStrComplateURL;\n\t\t}\n\n\t}\n\tbreak;\n\tcase UM_CEF_WEBLOADEND:\n\t{\n\t\tOnWebLoadEnd(wParam, lParam);\n\t}\n\tbreak;\n\n\tcase UM_CEF_WEBLOADSTART:\n\t{\n\t\tOnWebLoadStart(wParam, lParam);\n\t}\n\tbreak;\n\tcase UM_CEF_WEBTITLECHANGE:\n\t{\n\t\tCefString* pStrComplateURL = (CefString*)lParam;\n\t\tif (pStrComplateURL != NULL)\n\t\t{\n\t\t\tOnTitleChanged(wParam, *pStrComplateURL);\n\t\t\tdelete pStrComplateURL;\n\t\t}\n\t}\n\tbreak;\n\tcase UM_CEF_AFTERCREATED:\n\t{\n\t\tOnAfterCreate(wParam);\n\t}\n\tbreak;\n\tcase UM_CEF_BROWSERCLOSE:\n\t{\n\t\tOnBrowserClose(wParam);\n\t}\n\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\n\tbHandled = FALSE;\n\n\treturn 0;\n}\n\n\n\nvoid CEFWebkitBrowserWnd::OnInitComplate()\n{\n\tif (pWKEWebkitCtrl_)\n\t{\n\t\t//pWKEWebkitCtrl_->NewPage(_T(\"about:blank\"));\n\t\tpWKEWebkitCtrl_->NewPage(_T(\"file:///htmlexample/index.html\"));\n\t}\n\n\tGetPaintManager()->SetTimer(pWKEWebkitCtrl_, E_GOFORWORD_TIMER, 1000);\n\n}\n\n\n//ı\nvoid CEFWebkitBrowserWnd::OnTitleChanged(int nID, const CefString str)\n{\n\n\tint nCountWebtab = pWebTabContainer_->GetCount();\n\n\tfor (int idx = 0; idx < nCountWebtab; idx++)\n\t{\n\n\t\tCOptionUI* pOpt = (COptionUI*)pWebTabContainer_->GetItemAt(idx);\n\n\n\t\tCOptionTag* pTag = (COptionTag*)pOpt->GetTag();\n\n\n\t\tif ((pTag != NULL) && (pTag->nID_ == nID))\n\t\t{\n\n\t\t\tif (str.length() > 8)\n\t\t\t{\n\t\t\t\twchar_t strtilte[256] = { '\\0' };\n\t\t\t\tStringCbCopyN(strtilte, sizeof(strtilte), str.c_str(), 6 * sizeof(TCHAR));\n\t\t\t\tStringCbCat(strtilte, sizeof(strtilte) - 6 * sizeof(TCHAR), _T(\"...\"));\n\t\t\t\tpOpt->SetText(strtilte);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpOpt->SetText(str.c_str());\n\t\t\t}\n\t\t\tpOpt->SetToolTip(str.c_str());\n\t\t}\n\t}\n\n\treturn;\n}\n\n\n\n\nvoid CEFWebkitBrowserWnd::OnAfterCreate(int nWebBrowserID)\n{\n\t// ǩOPTIONť\n\tCDuiString sAttr;\n\tCOptionUI* pOpt = new COptionUI;\n\tsAttr.Format(_T(\"name=\\\"webtab\\\" width=\\\"100\\\" height=\\\"30\\\" normalimage=\\\"tabbar_normal.png\\\" hotimage=\\\"tabbar_hover.png\\\" \\\n\t\t\tpushedimage=\\\"tabbar_pushed.png\\\" selectedimage=\\\"tabbar_pushed.png\\\" group=\\\"ui_grp_webtab\\\"\"));\n\tpOpt->ApplyAttributeList(sAttr);\n\n\tint iCount = pWebTabContainer_->GetCount();\n\tpWebTabContainer_->AddAt(pOpt, iCount - 1);\n\n\t// ѱǩťid\n\tCOptionTag* pTag = new COptionTag(nWebBrowserID);\n\n\tpWKEWebkitCtrl_->ReFresh(pTag->nID_);\n\n\tpOpt->SetTag((UINT_PTR)pTag);\n\tpOpt->Selected(true);\n\n}\n\nvoid CEFWebkitBrowserWnd::OnBrowserClose(int nBrowserID)\n{\n\tTCHAR strDebugMsg[128];\n\n\tint nCountWebtab = pWebTabContainer_->GetCount();\n\n\tfor (int idx = 0; idx < nCountWebtab; idx++)\n\t{\n\n\t\tCOptionUI* pOpt = (COptionUI*)pWebTabContainer_->GetItemAt(idx);\n\n\n\t\tCOptionTag* pTag = (COptionTag*)pOpt->GetTag();\n\n\n\t\tif ((pTag != NULL) && (pTag->nID_ == nBrowserID))\n\t\t{\n\n\t\t\tint nSize = pWebTabContainer_->GetCount();\n\n\t\t\tint nIdx = pWebTabContainer_->GetItemIndex(pOpt);\n\n\t\t\tpWebTabContainer_->Remove(pOpt);\n\n\t\t\tif (nIdx != -1)\n\t\t\t{\n\n\t\t\t\tif (nIdx == (nSize - 2))\n\t\t\t\t{\n\t\t\t\t\t--nIdx;\n\t\t\t\t}\n\n\t\t\t\tCOptionUI* pShilfOption = dynamic_cast<COptionUI*>(pWebTabContainer_->GetItemAt(nIdx));\n\t\t\t\tCOptionTag* pShilfTag = (COptionTag*)pShilfOption->GetTag();\n\n\n\t\t\t\tif ((pShilfOption) && (pShilfTag != NULL))\n\t\t\t\t{\n\t\t\t\t\tpWKEWebkitCtrl_->ReFresh(pShilfTag->nID_);\n\t\t\t\t\tpURLEditCtrl_->SetText(pWKEWebkitCtrl_->GetFinalURL(pShilfTag->nID_).c_str());\n\t\t\t\t\tpShilfOption->Selected(true);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tStringCbPrintf(strDebugMsg, sizeof(strDebugMsg), _T(\"delete id=%d\\n\"), nBrowserID);\n\tOutputDebugString(strDebugMsg);\n\n}\n\nvoid CEFWebkitBrowserWnd::OnWebLoadEnd(WPARAM wParam, LPARAM lParam)\n{\n\n\tTCHAR szBuf[256];\n\tint nBrowserID = wParam;\n\n\tif (pURLEditCtrl_)\n\t{\n\n\t\tCOptionUI* pCurrentOpt = NULL;\n\t\tCOptionTag* pTag = NULL;\n\n\t\tif (pCurrentOpt = GetActiveOption())\n\t\t{\n\t\t\tif (pTag = (COptionTag*)pCurrentOpt->GetTag())\n\t\t\t{\n\t\t\t\tif (pTag->nID_ == nBrowserID)\n\t\t\t\t{\n\t\t\t\t\tpURLEditCtrl_->SetText(pWKEWebkitCtrl_->GetFinalURL(nBrowserID).c_str());\n\t\t\t\t\tSwitchUIState();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmemset(szBuf, '\\0', sizeof(szBuf));\n\tCefString* pStrComplateURL = (CefString*)lParam;\n\tif (pStrComplateURL != NULL)\n\t{\n\t\tStringCbPrintf(szBuf, sizeof(szBuf), _T(\":%s\"), pStrComplateURL->c_str());\n\t\tdelete pStrComplateURL;\n\t}\n\n\tpWebStateCtrl_->SetText(szBuf);\n}\n\nvoid CEFWebkitBrowserWnd::OnWebLoadStart(WPARAM wParam, LPARAM lParam)\n{\n\tTCHAR szBuf[256];\n\tmemset(szBuf, '\\0', sizeof(szBuf));\n\tCefString* pStrComplateURL = (CefString*)lParam;\n\tif (pStrComplateURL != NULL)\n\t{\n\t\tStringCbPrintf(szBuf, sizeof(szBuf), _T(\"ڼ:%s\"), pStrComplateURL->c_str());\n\t\tdelete pStrComplateURL;\n\t}\n\n\tpWebStateCtrl_->SetText(szBuf);\n\n}\n\nCOptionUI * CEFWebkitBrowserWnd::GetActiveOption() const\n{\n\tCOptionUI* pCurrentOpt = NULL;\n\tint nCountWebtab = pWebTabContainer_->GetCount();\n\n\tfor (int idx = 0; idx < nCountWebtab; idx++)\n\t{\n\t\tCOptionUI* pOpt = (COptionUI*)pWebTabContainer_->GetItemAt(idx);\n\n\t\tif (pOpt->IsSelected())\n\t\t{\n\t\t\tpCurrentOpt = pOpt;\n\t\t}\n\n\t}\n\n\treturn pCurrentOpt;\n}\n\nvoid CEFWebkitBrowserWnd::SwitchUIState()\n{\n\tCOptionUI* pCurrentOpt = NULL;\n\tCOptionTag* pTag = NULL;\n\n\tif (pCurrentOpt = GetActiveOption())\n\t{\n\t\tif (pTag = (COptionTag*)pCurrentOpt->GetTag())\n\t\t{\n\t\t\tif (pWKEWebkitCtrl_->CanGoBack(pTag->nID_) != FALSE)\n\t\t\t{\n\t\t\t\tpGoBackCtrl_->SetEnabled(true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpGoBackCtrl_->SetEnabled(false);\n\t\t\t}\n\n\n\t\t\tif (pWKEWebkitCtrl_->CanGoForward(pTag->nID_) != FALSE)\n\t\t\t{\n\n\t\t\t\tpGoForwardCtrl_->SetEnabled(true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpGoForwardCtrl_->SetEnabled(false);\n\t\t\t}\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "CEFWebkitBrowser.h",
    "content": "#pragma once\n\n#include \"resource.h\"\n#include \"CEFWebkit.h\"\n\nclass CEFWebkitBrowserWnd : public WindowImplBase\n{\n\npublic:\n    CEFWebkitBrowserWnd();\n    ~CEFWebkitBrowserWnd();\n\n\n    virtual LPCTSTR GetWindowClassName() const      { return _T(\"CEFWebkitBrowserWnd\"); }\n    virtual CDuiString GetSkinFile()                { return _T(\"skin.xml\"); }\n    virtual CDuiString GetSkinFolder()              { return _T(\"Skin\"); }\n    virtual CControlUI* CreateControl(LPCTSTR pstrClass);\n\tvirtual void OnFinalMessage(HWND hWnd);\n\tvirtual LRESULT OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);\n\tvirtual\tLRESULT OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);\n\tvirtual void OnClick(TNotifyUI& msg) override;\n    virtual void InitWindow();\n    virtual void Notify(TNotifyUI& msg);\n    virtual LRESULT HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\npublic:\n\tvoid OnInitComplate();\n\t//ı\n\tvoid OnTitleChanged(int nWebBrowserID,const CefString str);\n\t//ҳɹ\n\tvoid OnAfterCreate(int nWebBrowserID);\n\t//ҳر\n\tvoid OnBrowserClose(int nBrowserID);\n\n\tvoid OnWebLoadEnd(WPARAM wparam,LPARAM lparam);\n\tvoid OnWebLoadStart(WPARAM wParam, LPARAM lParam);\n\tCOptionUI* GetActiveOption() const;\n\n\tvoid SwitchUIState();\n\npublic:\n    static CEFWebkitBrowserWnd* pCEFWebkitBrowserWnd;\n    \n    wstring strURL_;\n    wstring strTitle_;\n    CCEFWebkitUI* pWKEWebkitCtrl_; \nprivate:\n\tCRichEditUI*\t\t\tpURLEditCtrl_;\n\tCEditUI*\t\t\t\tpSearchEditCtrl_;\n\tCLabelUI*\t\t\t\tpWebStateCtrl_;\n\tCHorizontalLayoutUI*\tpWebTabContainer_;\n\tCButtonUI*\t\t\t\tpGoBackCtrl_;\t\t\t\n\tCButtonUI*\t\t\t\tpGoForwardCtrl_;\t\t\n\n\tclass COptionTag\n\t{\n\tpublic:\n\t\tint nID_;\n\t\tCOptionTag::COptionTag(int nID) :nID_(nID)\n\t\t{\n\n\t\t};\n\t};\n\n\t\n\n\n};\n"
  },
  {
    "path": "CEFWebkitBrowser.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nVisualStudioVersion = 14.0.25420.1\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"CEFWebkitBrowser\", \"CEFWebkitBrowser.vcxproj\", \"{78BA0AEA-3A77-486C-B988-9710DA8FD287}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DuiLib\", \"DuiLib\\DuiLib.vcxproj\", \"{E106ACD7-4E53-4AEE-942B-D0DD426DB34E}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"HookFlash\", \"HookFlash\\HookFlash.vcxproj\", \"{CAF87436-915F-4088-BDDC-8BDAA08006D9}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tUnicodeDebug|x86 = UnicodeDebug|x86\n\t\tUnicodeRelease|x86 = UnicodeRelease|x86\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{78BA0AEA-3A77-486C-B988-9710DA8FD287}.UnicodeDebug|x86.ActiveCfg = Debug|Win32\n\t\t{78BA0AEA-3A77-486C-B988-9710DA8FD287}.UnicodeDebug|x86.Build.0 = Debug|Win32\n\t\t{78BA0AEA-3A77-486C-B988-9710DA8FD287}.UnicodeRelease|x86.ActiveCfg = Release|Win32\n\t\t{78BA0AEA-3A77-486C-B988-9710DA8FD287}.UnicodeRelease|x86.Build.0 = Release|Win32\n\t\t{E106ACD7-4E53-4AEE-942B-D0DD426DB34E}.UnicodeDebug|x86.ActiveCfg = UnicodeDebug|Win32\n\t\t{E106ACD7-4E53-4AEE-942B-D0DD426DB34E}.UnicodeDebug|x86.Build.0 = UnicodeDebug|Win32\n\t\t{E106ACD7-4E53-4AEE-942B-D0DD426DB34E}.UnicodeRelease|x86.ActiveCfg = UnicodeRelease|Win32\n\t\t{E106ACD7-4E53-4AEE-942B-D0DD426DB34E}.UnicodeRelease|x86.Build.0 = UnicodeRelease|Win32\n\t\t{CAF87436-915F-4088-BDDC-8BDAA08006D9}.UnicodeDebug|x86.ActiveCfg = Debug|Win32\n\t\t{CAF87436-915F-4088-BDDC-8BDAA08006D9}.UnicodeDebug|x86.Build.0 = Debug|Win32\n\t\t{CAF87436-915F-4088-BDDC-8BDAA08006D9}.UnicodeRelease|x86.ActiveCfg = Release|Win32\n\t\t{CAF87436-915F-4088-BDDC-8BDAA08006D9}.UnicodeRelease|x86.Build.0 = Release|Win32\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "CEFWebkitBrowser.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectGuid>{78BA0AEA-3A77-486C-B988-9710DA8FD287}</ProjectGuid>\n    <Keyword>Win32Proj</Keyword>\n    <RootNamespace>CEFWebkitBrowser</RootNamespace>\n    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v140</PlatformToolset>\n    <CharacterSet>Unicode</CharacterSet>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v140</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>true</LinkIncremental>\n    <OutDir>$(solutiondir)Build\\$(ProjectName)_d</OutDir>\n    <IntDir>$(solutiondir)Build\\$(ProjectName)_d</IntDir>\n    <IncludePath>$(solutiondir)CEF\\include;$(solutiondir)CEF;$(IncludePath)</IncludePath>\n    <LibraryPath>$(solutiondir)CEF\\Debug;$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <OutDir>$(solutiondir)Build\\$(ProjectName)</OutDir>\n    <IntDir>$(solutiondir)Build\\$(ProjectName)</IntDir>\n    <IncludePath>$(solutiondir)CEF\\include;$(solutiondir)CEF;$(IncludePath)</IncludePath>\n    <LibraryPath>$(solutiondir)CEF\\Release;$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\n    </ClCompile>\n    <Link>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <OutputFile>$(solutionDir)bin_d\\$(TargetName)_d$(TargetExt)</OutputFile>\n      <AdditionalDependencies>libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <PrecompiledHeader>NotUsing</PrecompiledHeader>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\n    </ClCompile>\n    <Link>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <OutputFile>$(solutionDir)bin\\$(TargetName)$(TargetExt)</OutputFile>\n      <AdditionalDependencies>libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <Text Include=\"ReadMe.txt\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"BrowserHandlers.h\" />\n    <ClInclude Include=\"CEFV8HandlerEx.h\" />\n    <ClInclude Include=\"CEFWebkit.h\" />\n    <ClInclude Include=\"CEFWebkitBrowser.h\" />\n    <ClInclude Include=\"clientapp.h\" />\n    <ClInclude Include=\"MiniDumper.h\" />\n    <ClInclude Include=\"Resource.h\" />\n    <ClInclude Include=\"stdafx.h\" />\n    <ClInclude Include=\"targetver.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"BrowserHandlers.cc\" />\n    <ClCompile Include=\"CEFV8HandlerEx.cc\" />\n    <ClCompile Include=\"CEFWebkit.cc\" />\n    <ClCompile Include=\"CEFWebkitBrowser.cc\" />\n    <ClCompile Include=\"clientapp.cc\" />\n    <ClCompile Include=\"Entry.cc\" />\n    <ClCompile Include=\"MiniDumper.cpp\" />\n    <ClCompile Include=\"stdafx.cpp\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Create</PrecompiledHeader>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"CEFWebkitBrowser.rc\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Image Include=\"CEFWebkitBrowser.ico\" />\n    <Image Include=\"small.ico\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"DuiLib\\DuiLib.vcxproj\">\n      <Project>{e106acd7-4e53-4aee-942b-d0dd426db34e}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "CEFWebkitBrowser.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"源文件\">\n      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\n      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\n    </Filter>\n    <Filter Include=\"头文件\">\n      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\n      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\n    </Filter>\n    <Filter Include=\"资源文件\">\n      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\n    </Filter>\n    <Filter Include=\"control\">\n      <UniqueIdentifier>{805cebca-0e10-474d-a975-0cfca4826da4}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"dump\">\n      <UniqueIdentifier>{3f91955c-d24c-4192-863d-1460de665bd2}</UniqueIdentifier>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <Text Include=\"ReadMe.txt\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"stdafx.h\">\n      <Filter>头文件</Filter>\n    </ClInclude>\n    <ClInclude Include=\"targetver.h\">\n      <Filter>头文件</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Resource.h\">\n      <Filter>头文件</Filter>\n    </ClInclude>\n    <ClInclude Include=\"CEFWebkitBrowser.h\">\n      <Filter>头文件</Filter>\n    </ClInclude>\n    <ClInclude Include=\"CEFWebkit.h\">\n      <Filter>control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"BrowserHandlers.h\">\n      <Filter>头文件</Filter>\n    </ClInclude>\n    <ClInclude Include=\"clientapp.h\">\n      <Filter>头文件</Filter>\n    </ClInclude>\n    <ClInclude Include=\"CEFV8HandlerEx.h\">\n      <Filter>头文件</Filter>\n    </ClInclude>\n    <ClInclude Include=\"MiniDumper.h\">\n      <Filter>dump</Filter>\n    </ClInclude>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"stdafx.cpp\">\n      <Filter>源文件</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Entry.cc\">\n      <Filter>源文件</Filter>\n    </ClCompile>\n    <ClCompile Include=\"CEFWebkitBrowser.cc\">\n      <Filter>源文件</Filter>\n    </ClCompile>\n    <ClCompile Include=\"CEFWebkit.cc\">\n      <Filter>control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"BrowserHandlers.cc\">\n      <Filter>源文件</Filter>\n    </ClCompile>\n    <ClCompile Include=\"clientapp.cc\">\n      <Filter>源文件</Filter>\n    </ClCompile>\n    <ClCompile Include=\"CEFV8HandlerEx.cc\">\n      <Filter>源文件</Filter>\n    </ClCompile>\n    <ClCompile Include=\"MiniDumper.cpp\">\n      <Filter>dump</Filter>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"CEFWebkitBrowser.rc\">\n      <Filter>资源文件</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <Image Include=\"small.ico\">\n      <Filter>资源文件</Filter>\n    </Image>\n    <Image Include=\"CEFWebkitBrowser.ico\">\n      <Filter>资源文件</Filter>\n    </Image>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "CEFWebkitBrowser.vcxproj.user",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LocalDebuggerCommand>$(solutionDir)bin_d\\$(TargetName)_d$(TargetExt)</LocalDebuggerCommand>\n    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\n    <LocalDebuggerCommandArguments>\n    </LocalDebuggerCommandArguments>\n    <LocalDebuggerWorkingDirectory>$(solutionDir)bin_d</LocalDebuggerWorkingDirectory>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LocalDebuggerCommand>$(solutionDir)bin\\$(TargetName)$(TargetExt)</LocalDebuggerCommand>\n    <LocalDebuggerWorkingDirectory>$(solutionDir)bin</LocalDebuggerWorkingDirectory>\n    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\n  </PropertyGroup>\n</Project>"
  },
  {
    "path": "DuiLib/Control/UIActiveX.cpp",
    "content": "#include \"StdAfx.h\"\n\nnamespace DuiLib\n{\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tclass CActiveXCtrl;\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tclass CActiveXWnd : public CWindowWnd\n\t{\n\tpublic:\n\t\tHWND Init(CActiveXCtrl* pOwner, HWND hWndParent);\n\n\t\tLPCTSTR GetWindowClassName( ) const;\n\t\tvoid OnFinalMessage(HWND hWnd);\n\n\t\tLRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);\n\n\tprotected:\n\t\tvoid DoVerb(LONG iVerb);\n\n\t\tLRESULT OnMouseActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tLRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tLRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tLRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tLRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\n\tprotected:\n\t\tCActiveXCtrl* m_pOwner;\n\t};\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tclass CActiveXEnum : public IEnumUnknown\n\t{\n\tpublic:\n\t\tCActiveXEnum(IUnknown* pUnk) : m_pUnk(pUnk), m_dwRef(1), m_iPos(0)\n\t\t{\n\t\t\tm_pUnk->AddRef( );\n\t\t}\n\t\t~CActiveXEnum( )\n\t\t{\n\t\t\tm_pUnk->Release( );\n\t\t}\n\n\t\tLONG m_iPos;\n\t\tULONG m_dwRef;\n\t\tIUnknown* m_pUnk;\n\n\t\tSTDMETHOD_(ULONG, AddRef)()\n\t\t{\n\t\t\treturn ++m_dwRef;\n\t\t}\n\t\tSTDMETHOD_(ULONG, Release)()\n\t\t{\n\t\t\tLONG lRef = --m_dwRef;\n\t\t\tif (lRef == 0) delete this;\n\t\t\treturn lRef;\n\t\t}\n\t\tSTDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppvObject)\n\t\t{\n\t\t\t*ppvObject = NULL;\n\t\t\tif (riid == IID_IUnknown) *ppvObject = static_cast<IEnumUnknown*>(this);\n\t\t\telse if (riid == IID_IEnumUnknown) *ppvObject = static_cast<IEnumUnknown*>(this);\n\t\t\tif (*ppvObject != NULL) AddRef( );\n\t\t\treturn *ppvObject == NULL ? E_NOINTERFACE : S_OK;\n\t\t}\n\t\tSTDMETHOD(Next)(ULONG celt, IUnknown **rgelt, ULONG *pceltFetched)\n\t\t{\n\t\t\tif (pceltFetched != NULL) *pceltFetched = 0;\n\t\t\tif (++m_iPos > 1) return S_FALSE;\n\t\t\t*rgelt = m_pUnk;\n\t\t\t(*rgelt)->AddRef( );\n\t\t\tif (pceltFetched != NULL) *pceltFetched = 1;\n\t\t\treturn S_OK;\n\t\t}\n\t\tSTDMETHOD(Skip)(ULONG celt)\n\t\t{\n\t\t\tm_iPos += celt;\n\t\t\treturn S_OK;\n\t\t}\n\t\tSTDMETHOD(Reset)(void)\n\t\t{\n\t\t\tm_iPos = 0;\n\t\t\treturn S_OK;\n\t\t}\n\t\tSTDMETHOD(Clone)(IEnumUnknown **ppenum)\n\t\t{\n\t\t\treturn E_NOTIMPL;\n\t\t}\n\t};\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tclass CActiveXFrameWnd : public IOleInPlaceFrame\n\t{\n\tpublic:\n\t\tCActiveXFrameWnd(CActiveXUI* pOwner) : m_dwRef(1), m_pOwner(pOwner), m_pActiveObject(NULL)\n\t\t{\n\t\t}\n\t\t~CActiveXFrameWnd( )\n\t\t{\n\t\t\tif (m_pActiveObject != NULL) m_pActiveObject->Release( );\n\t\t}\n\n\t\tULONG m_dwRef;\n\t\tCActiveXUI* m_pOwner;\n\t\tIOleInPlaceActiveObject* m_pActiveObject;\n\n\t\t// IUnknown\n\t\tSTDMETHOD_(ULONG, AddRef)()\n\t\t{\n\t\t\treturn ++m_dwRef;\n\t\t}\n\t\tSTDMETHOD_(ULONG, Release)()\n\t\t{\n\t\t\tULONG lRef = --m_dwRef;\n\t\t\tif (lRef == 0) delete this;\n\t\t\treturn lRef;\n\t\t}\n\t\tSTDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppvObject)\n\t\t{\n\t\t\t*ppvObject = NULL;\n\t\t\tif (riid == IID_IUnknown) *ppvObject = static_cast<IOleInPlaceFrame*>(this);\n\t\t\telse if (riid == IID_IOleWindow) *ppvObject = static_cast<IOleWindow*>(this);\n\t\t\telse if (riid == IID_IOleInPlaceFrame) *ppvObject = static_cast<IOleInPlaceFrame*>(this);\n\t\t\telse if (riid == IID_IOleInPlaceUIWindow) *ppvObject = static_cast<IOleInPlaceUIWindow*>(this);\n\t\t\tif (*ppvObject != NULL) AddRef( );\n\t\t\treturn *ppvObject == NULL ? E_NOINTERFACE : S_OK;\n\t\t}\n\t\t// IOleInPlaceFrameWindow\n\t\tSTDMETHOD(InsertMenus)(HMENU /*hmenuShared*/, LPOLEMENUGROUPWIDTHS /*lpMenuWidths*/)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\t\tSTDMETHOD(SetMenu)(HMENU /*hmenuShared*/, HOLEMENU /*holemenu*/, HWND /*hwndActiveObject*/)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\t\tSTDMETHOD(RemoveMenus)(HMENU /*hmenuShared*/)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\t\tSTDMETHOD(SetStatusText)(LPCOLESTR /*pszStatusText*/)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\t\tSTDMETHOD(EnableModeless)(BOOL /*fEnable*/)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\t\tSTDMETHOD(TranslateAccelerator)(LPMSG /*lpMsg*/, WORD /*wID*/)\n\t\t{\n\t\t\treturn S_FALSE;\n\t\t}\n\t\t// IOleWindow\n\t\tSTDMETHOD(GetWindow)(HWND* phwnd)\n\t\t{\n\t\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\t\t*phwnd = m_pOwner->GetManager( )->GetPaintWindow( );\n\t\t\treturn S_OK;\n\t\t}\n\t\tSTDMETHOD(ContextSensitiveHelp)(BOOL /*fEnterMode*/)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\t\t// IOleInPlaceUIWindow\n\t\tSTDMETHOD(GetBorder)(LPRECT /*lprectBorder*/)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\t\tSTDMETHOD(RequestBorderSpace)(LPCBORDERWIDTHS /*pborderwidths*/)\n\t\t{\n\t\t\treturn INPLACE_E_NOTOOLSPACE;\n\t\t}\n\t\tSTDMETHOD(SetBorderSpace)(LPCBORDERWIDTHS /*pborderwidths*/)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\t\tSTDMETHOD(SetActiveObject)(IOleInPlaceActiveObject* pActiveObject, LPCOLESTR /*pszObjName*/)\n\t\t{\n\t\t\tif (pActiveObject != NULL) pActiveObject->AddRef( );\n\t\t\tif (m_pActiveObject != NULL) m_pActiveObject->Release( );\n\t\t\tm_pActiveObject = pActiveObject;\n\t\t\treturn S_OK;\n\t\t}\n\t};\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass CActiveXCtrl :\n\t\tpublic IOleClientSite,\n\t\tpublic IOleInPlaceSiteWindowless,\n\t\tpublic IOleControlSite,\n\t\tpublic IObjectWithSite,\n\t\tpublic IOleContainer\n\t{\n\t\tfriend class CActiveXUI;\n\t\tfriend class CActiveXWnd;\n\tpublic:\n\t\tCActiveXCtrl( );\n\t\t~CActiveXCtrl( );\n\n\t\t// IUnknown\n\t\tSTDMETHOD_(ULONG, AddRef)();\n\t\tSTDMETHOD_(ULONG, Release)();\n\t\tSTDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppvObject);\n\n\t\t// IObjectWithSite\n\t\tSTDMETHOD(SetSite)(IUnknown *pUnkSite);\n\t\tSTDMETHOD(GetSite)(REFIID riid, LPVOID* ppvSite);\n\n\t\t// IOleClientSite\n\t\tSTDMETHOD(SaveObject)(void);\n\t\tSTDMETHOD(GetMoniker)(DWORD dwAssign, DWORD dwWhichMoniker, IMoniker** ppmk);\n\t\tSTDMETHOD(GetContainer)(IOleContainer** ppContainer);\n\t\tSTDMETHOD(ShowObject)(void);\n\t\tSTDMETHOD(OnShowWindow)(BOOL fShow);\n\t\tSTDMETHOD(RequestNewObjectLayout)(void);\n\n\t\t// IOleInPlaceSiteWindowless\n\t\tSTDMETHOD(CanWindowlessActivate)(void);\n\t\tSTDMETHOD(GetCapture)(void);\n\t\tSTDMETHOD(SetCapture)(BOOL fCapture);\n\t\tSTDMETHOD(GetFocus)(void);\n\t\tSTDMETHOD(SetFocus)(BOOL fFocus);\n\t\tSTDMETHOD(GetDC)(LPCRECT pRect, DWORD grfFlags, HDC* phDC);\n\t\tSTDMETHOD(ReleaseDC)(HDC hDC);\n\t\tSTDMETHOD(InvalidateRect)(LPCRECT pRect, BOOL fErase);\n\t\tSTDMETHOD(InvalidateRgn)(HRGN hRGN, BOOL fErase);\n\t\tSTDMETHOD(ScrollRect)(INT dx, INT dy, LPCRECT pRectScroll, LPCRECT pRectClip);\n\t\tSTDMETHOD(AdjustRect)(LPRECT prc);\n\t\tSTDMETHOD(OnDefWindowMessage)(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT* plResult);\n\n\t\t// IOleInPlaceSiteEx\n\t\tSTDMETHOD(OnInPlaceActivateEx)(BOOL *pfNoRedraw, DWORD dwFlags);\n\t\tSTDMETHOD(OnInPlaceDeactivateEx)(BOOL fNoRedraw);\n\t\tSTDMETHOD(RequestUIActivate)(void);\n\n\t\t// IOleInPlaceSite\n\t\tSTDMETHOD(CanInPlaceActivate)(void);\n\t\tSTDMETHOD(OnInPlaceActivate)(void);\n\t\tSTDMETHOD(OnUIActivate)(void);\n\t\tSTDMETHOD(GetWindowContext)(IOleInPlaceFrame** ppFrame, IOleInPlaceUIWindow** ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo);\n\t\tSTDMETHOD(Scroll)(SIZE scrollExtant);\n\t\tSTDMETHOD(OnUIDeactivate)(BOOL fUndoable);\n\t\tSTDMETHOD(OnInPlaceDeactivate)(void);\n\t\tSTDMETHOD(DiscardUndoState)(void);\n\t\tSTDMETHOD(DeactivateAndUndo)(void);\n\t\tSTDMETHOD(OnPosRectChange)(LPCRECT lprcPosRect);\n\n\t\t// IOleWindow\n\t\tSTDMETHOD(GetWindow)(HWND* phwnd);\n\t\tSTDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode);\n\n\t\t// IOleControlSite\n\t\tSTDMETHOD(OnControlInfoChanged)(void);\n\t\tSTDMETHOD(LockInPlaceActive)(BOOL fLock);\n\t\tSTDMETHOD(GetExtendedControl)(IDispatch** ppDisp);\n\t\tSTDMETHOD(TransformCoords)(POINTL* pPtlHimetric, POINTF* pPtfContainer, DWORD dwFlags);\n\t\tSTDMETHOD(TranslateAccelerator)(MSG* pMsg, DWORD grfModifiers);\n\t\tSTDMETHOD(OnFocus)(BOOL fGotFocus);\n\t\tSTDMETHOD(ShowPropertyFrame)(void);\n\n\t\t// IOleContainer\n\t\tSTDMETHOD(EnumObjects)(DWORD grfFlags, IEnumUnknown** ppenum);\n\t\tSTDMETHOD(LockContainer)(BOOL fLock);\n\n\t\t// IParseDisplayName\n\t\tSTDMETHOD(ParseDisplayName)(IBindCtx* pbc, LPOLESTR pszDisplayName, ULONG* pchEaten, IMoniker** ppmkOut);\n\n\tprotected:\n\t\tHRESULT CreateActiveXWnd( );\n\n\tprotected:\n\t\tLONG m_dwRef;\n\t\tCActiveXUI* m_pOwner;\n\t\tCActiveXWnd* m_pWindow;\n\t\tIUnknown* m_pUnkSite;\n\t\tIViewObject* m_pViewObject;\n\t\tIOleInPlaceObjectWindowless* m_pInPlaceObject;\n\t\tbool m_bLocked;\n\t\tbool m_bFocused;\n\t\tbool m_bCaptured;\n\t\tbool m_bUIActivated;\n\t\tbool m_bInPlaceActive;\n\t\tbool m_bWindowless;\n\t};\n\n\tCActiveXCtrl::CActiveXCtrl( ) :\n\t\tm_dwRef(1),\n\t\tm_pOwner(NULL),\n\t\tm_pWindow(NULL),\n\t\tm_pUnkSite(NULL),\n\t\tm_pViewObject(NULL),\n\t\tm_pInPlaceObject(NULL),\n\t\tm_bLocked(false),\n\t\tm_bFocused(false),\n\t\tm_bCaptured(false),\n\t\tm_bWindowless(true),\n\t\tm_bUIActivated(false),\n\t\tm_bInPlaceActive(false)\n\t{\n\t}\n\n\tCActiveXCtrl::~CActiveXCtrl( )\n\t{\n\t\tif (m_pWindow != NULL) {\n\t\t\t::DestroyWindow(*m_pWindow);\n\t\t\tdelete m_pWindow;\n\t\t}\n\t\tif (m_pUnkSite != NULL) m_pUnkSite->Release( );\n\t\tif (m_pViewObject != NULL) m_pViewObject->Release( );\n\t\tif (m_pInPlaceObject != NULL) m_pInPlaceObject->Release( );\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::QueryInterface(REFIID riid, LPVOID *ppvObject)\n\t{\n\t\t*ppvObject = NULL;\n\t\tif (riid == IID_IUnknown)                       *ppvObject = static_cast<IOleWindow*>(this);\n\t\telse if (riid == IID_IOleClientSite)            *ppvObject = static_cast<IOleClientSite*>(this);\n\t\telse if (riid == IID_IOleInPlaceSiteWindowless) *ppvObject = static_cast<IOleInPlaceSiteWindowless*>(this);\n\t\telse if (riid == IID_IOleInPlaceSiteEx)         *ppvObject = static_cast<IOleInPlaceSiteEx*>(this);\n\t\telse if (riid == IID_IOleInPlaceSite)           *ppvObject = static_cast<IOleInPlaceSite*>(this);\n\t\telse if (riid == IID_IOleWindow)                *ppvObject = static_cast<IOleWindow*>(this);\n\t\telse if (riid == IID_IOleControlSite)           *ppvObject = static_cast<IOleControlSite*>(this);\n\t\telse if (riid == IID_IOleContainer)             *ppvObject = static_cast<IOleContainer*>(this);\n\t\telse if (riid == IID_IObjectWithSite)           *ppvObject = static_cast<IObjectWithSite*>(this);\n\t\tif (*ppvObject != NULL) AddRef( );\n\t\treturn *ppvObject == NULL ? E_NOINTERFACE : S_OK;\n\t}\n\n\tSTDMETHODIMP_(ULONG) CActiveXCtrl::AddRef( )\n\t{\n\t\treturn ++m_dwRef;\n\t}\n\n\tSTDMETHODIMP_(ULONG) CActiveXCtrl::Release( )\n\t{\n\t\tLONG lRef = --m_dwRef;\n\t\tif (lRef == 0) delete this;\n\t\treturn lRef;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::SetSite(IUnknown *pUnkSite)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::SetSite\"));\n\t\tif (m_pUnkSite != NULL) {\n\t\t\tm_pUnkSite->Release( );\n\t\t\tm_pUnkSite = NULL;\n\t\t}\n\t\tif (pUnkSite != NULL) {\n\t\t\tm_pUnkSite = pUnkSite;\n\t\t\tm_pUnkSite->AddRef( );\n\t\t}\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::GetSite(REFIID riid, LPVOID* ppvSite)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::GetSite\"));\n\t\tif (ppvSite == NULL) return E_POINTER;\n\t\t*ppvSite = NULL;\n\t\tif (m_pUnkSite == NULL) return E_FAIL;\n\t\treturn m_pUnkSite->QueryInterface(riid, ppvSite);\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::SaveObject(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::SaveObject\"));\n\t\treturn E_NOTIMPL;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::GetMoniker(DWORD dwAssign, DWORD dwWhichMoniker, IMoniker** ppmk)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::GetMoniker\"));\n\t\tif (ppmk != NULL) *ppmk = NULL;\n\t\treturn E_NOTIMPL;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::GetContainer(IOleContainer** ppContainer)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::GetContainer\"));\n\t\tif (ppContainer == NULL) return E_POINTER;\n\t\t*ppContainer = NULL;\n\t\tHRESULT Hr = E_NOTIMPL;\n\t\tif (m_pUnkSite != NULL) Hr = m_pUnkSite->QueryInterface(IID_IOleContainer, (LPVOID*)ppContainer);\n\t\tif (FAILED(Hr)) Hr = QueryInterface(IID_IOleContainer, (LPVOID*)ppContainer);\n\t\treturn Hr;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::ShowObject(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::ShowObject\"));\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\tHDC hDC = ::GetDC(m_pOwner->m_hwndHost);\n\t\tif (hDC == NULL) return E_FAIL;\n\t\tif (m_pViewObject != NULL) m_pViewObject->Draw(DVASPECT_CONTENT, -1, NULL, NULL, NULL, hDC, (RECTL*)&m_pOwner->m_rcItem, (RECTL*)&m_pOwner->m_rcItem, NULL, NULL);\n\t\t::ReleaseDC(m_pOwner->m_hwndHost, hDC);\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::OnShowWindow(BOOL fShow)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::OnShowWindow\"));\n\t\treturn E_NOTIMPL;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::RequestNewObjectLayout(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::RequestNewObjectLayout\"));\n\t\treturn E_NOTIMPL;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::CanWindowlessActivate(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::CanWindowlessActivate\"));\n\t\treturn S_OK;  // Yes, we can!!\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::GetCapture(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::GetCapture\"));\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\treturn m_bCaptured ? S_OK : S_FALSE;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::SetCapture(BOOL fCapture)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::SetCapture\"));\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\tm_bCaptured = (fCapture == TRUE);\n\t\tif (fCapture) ::SetCapture(m_pOwner->m_hwndHost); else ::ReleaseCapture( );\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::GetFocus(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::GetFocus\"));\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\treturn m_bFocused ? S_OK : S_FALSE;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::SetFocus(BOOL fFocus)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::SetFocus\"));\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\tif (fFocus) m_pOwner->SetFocus( );\n\t\tm_bFocused = (fFocus == TRUE);\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::GetDC(LPCRECT pRect, DWORD grfFlags, HDC* phDC)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::GetDC\"));\n\t\tif (phDC == NULL) return E_POINTER;\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\t*phDC = ::GetDC(m_pOwner->m_hwndHost);\n\t\tif ((grfFlags & OLEDC_PAINTBKGND) != 0) {\n\t\t\tCDuiRect rcItem = m_pOwner->GetPos( );\n\t\t\tif (!m_bWindowless) rcItem.ResetOffset( );\n\t\t\t::FillRect(*phDC, &rcItem, (HBRUSH)(COLOR_WINDOW + 1));\n\t\t}\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::ReleaseDC(HDC hDC)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::ReleaseDC\"));\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\t::ReleaseDC(m_pOwner->m_hwndHost, hDC);\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::InvalidateRect(LPCRECT pRect, BOOL fErase)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::InvalidateRect\"));\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\tif (m_pOwner->m_hwndHost == NULL) return E_FAIL;\n\t\treturn ::InvalidateRect(m_pOwner->m_hwndHost, pRect, fErase) ? S_OK : E_FAIL;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::InvalidateRgn(HRGN hRGN, BOOL fErase)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::InvalidateRgn\"));\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\treturn ::InvalidateRgn(m_pOwner->m_hwndHost, hRGN, fErase) ? S_OK : E_FAIL;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::ScrollRect(INT dx, INT dy, LPCRECT pRectScroll, LPCRECT pRectClip)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::ScrollRect\"));\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::AdjustRect(LPRECT prc)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::AdjustRect\"));\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::OnDefWindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT* plResult)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::OnDefWindowMessage\"));\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\t*plResult = ::DefWindowProc(m_pOwner->m_hwndHost, msg, wParam, lParam);\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::OnInPlaceActivateEx(BOOL* pfNoRedraw, DWORD dwFlags)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::OnInPlaceActivateEx\"));\n\t\tASSERT(m_pInPlaceObject == NULL);\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\tif (m_pOwner->m_pUnk == NULL) return E_UNEXPECTED;\n\t\t::OleLockRunning(m_pOwner->m_pUnk, TRUE, FALSE);\n\t\tHWND hWndFrame = m_pOwner->GetManager( )->GetPaintWindow( );\n\t\tHRESULT Hr = E_FAIL;\n\t\tif ((dwFlags & ACTIVATE_WINDOWLESS) != 0) {\n\t\t\tm_bWindowless = true;\n\t\t\tHr = m_pOwner->m_pUnk->QueryInterface(IID_IOleInPlaceObjectWindowless, (LPVOID*)&m_pInPlaceObject);\n\t\t\tm_pOwner->m_hwndHost = hWndFrame;\n\t\t\tm_pOwner->GetManager( )->AddMessageFilter(m_pOwner);\n\t\t}\n\t\tif (FAILED(Hr)) {\n\t\t\tm_bWindowless = false;\n\t\t\tHr = CreateActiveXWnd( );\n\t\t\tif (FAILED(Hr)) return Hr;\n\t\t\tHr = m_pOwner->m_pUnk->QueryInterface(IID_IOleInPlaceObject, (LPVOID*)&m_pInPlaceObject);\n\t\t}\n\t\tif (m_pInPlaceObject != NULL) {\n\t\t\tCDuiRect rcItem = m_pOwner->m_rcItem;\n\t\t\tif (!m_bWindowless) rcItem.ResetOffset( );\n\t\t\tm_pInPlaceObject->SetObjectRects(&rcItem, &rcItem);\n\t\t}\n\t\tm_bInPlaceActive = SUCCEEDED(Hr);\n\t\treturn Hr;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::OnInPlaceDeactivateEx(BOOL fNoRedraw)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::OnInPlaceDeactivateEx\"));\n\t\tm_bInPlaceActive = false;\n\t\tif (m_pInPlaceObject != NULL) {\n\t\t\tm_pInPlaceObject->Release( );\n\t\t\tm_pInPlaceObject = NULL;\n\t\t}\n\t\tif (m_pWindow != NULL) {\n\t\t\t::DestroyWindow(*m_pWindow);\n\t\t\tdelete m_pWindow;\n\t\t\tm_pWindow = NULL;\n\t\t}\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::RequestUIActivate(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::RequestUIActivate\"));\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::CanInPlaceActivate(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::CanInPlaceActivate\"));\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::OnInPlaceActivate(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::OnInPlaceActivate\"));\n\t\tBOOL bDummy = FALSE;\n\t\treturn OnInPlaceActivateEx(&bDummy, 0);\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::OnUIActivate(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::OnUIActivate\"));\n\t\tm_bUIActivated = true;\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::GetWindowContext(IOleInPlaceFrame** ppFrame, IOleInPlaceUIWindow** ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::GetWindowContext\"));\n\t\tif (ppDoc == NULL) return E_POINTER;\n\t\tif (ppFrame == NULL) return E_POINTER;\n\t\tif (lprcPosRect == NULL) return E_POINTER;\n\t\tif (lprcClipRect == NULL) return E_POINTER;\n\t\tif (m_pWindow)\n\t\t{\n\t\t\t::GetClientRect(m_pWindow->GetHWND( ), lprcPosRect);\n\t\t\t::GetClientRect(m_pWindow->GetHWND( ), lprcClipRect);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tRECT rcItem = m_pOwner->GetPos( );\n\t\t\tmemcpy(lprcPosRect, &rcItem, sizeof(rcItem));\n\t\t\tmemcpy(lprcClipRect, &rcItem, sizeof(rcItem));\n\t\t}\n\t\t*ppFrame = new CActiveXFrameWnd(m_pOwner);\n\t\t*ppDoc = NULL;\n\t\tACCEL ac = { 0 };\n\t\tHACCEL hac = ::CreateAcceleratorTable(&ac, 1);\n\t\tlpFrameInfo->cb = sizeof(OLEINPLACEFRAMEINFO);\n\t\tlpFrameInfo->fMDIApp = FALSE;\n\t\tlpFrameInfo->hwndFrame = m_pOwner->GetManager( )->GetPaintWindow( );\n\t\tlpFrameInfo->haccel = hac;\n\t\tlpFrameInfo->cAccelEntries = 1;\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::Scroll(SIZE scrollExtant)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::Scroll\"));\n\t\treturn E_NOTIMPL;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::OnUIDeactivate(BOOL fUndoable)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::OnUIDeactivate\"));\n\t\tm_bUIActivated = false;\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::OnInPlaceDeactivate(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::OnInPlaceDeactivate\"));\n\t\treturn OnInPlaceDeactivateEx(TRUE);\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::DiscardUndoState(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::DiscardUndoState\"));\n\t\treturn E_NOTIMPL;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::DeactivateAndUndo(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::DeactivateAndUndo\"));\n\t\treturn E_NOTIMPL;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::OnPosRectChange(LPCRECT lprcPosRect)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::OnPosRectChange\"));\n\t\treturn E_NOTIMPL;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::GetWindow(HWND* phwnd)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::GetWindow\"));\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\tif (m_pOwner->m_hwndHost == NULL) CreateActiveXWnd( );\n\t\tif (m_pOwner->m_hwndHost == NULL) return E_FAIL;\n\t\t*phwnd = m_pOwner->m_hwndHost;\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::ContextSensitiveHelp(BOOL fEnterMode)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::ContextSensitiveHelp\"));\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::OnControlInfoChanged(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::OnControlInfoChanged\"));\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::LockInPlaceActive(BOOL fLock)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::LockInPlaceActive\"));\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::GetExtendedControl(IDispatch** ppDisp)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::GetExtendedControl\"));\n\t\tif (ppDisp == NULL) return E_POINTER;\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\tif (m_pOwner->m_pUnk == NULL) return E_UNEXPECTED;\n\t\treturn m_pOwner->m_pUnk->QueryInterface(IID_IDispatch, (LPVOID*)ppDisp);\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::TransformCoords(POINTL* pPtlHimetric, POINTF* pPtfContainer, DWORD dwFlags)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::TransformCoords\"));\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::TranslateAccelerator(MSG *pMsg, DWORD grfModifiers)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::TranslateAccelerator\"));\n\t\treturn S_FALSE;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::OnFocus(BOOL fGotFocus)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::OnFocus\"));\n\t\tm_bFocused = (fGotFocus == TRUE);\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::ShowPropertyFrame(void)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::ShowPropertyFrame\"));\n\t\treturn E_NOTIMPL;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::EnumObjects(DWORD grfFlags, IEnumUnknown** ppenum)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::EnumObjects\"));\n\t\tif (ppenum == NULL) return E_POINTER;\n\t\tif (m_pOwner == NULL) return E_UNEXPECTED;\n\t\t*ppenum = new CActiveXEnum(m_pOwner->m_pUnk);\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::LockContainer(BOOL fLock)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::LockContainer\"));\n\t\tm_bLocked = fLock != FALSE;\n\t\treturn S_OK;\n\t}\n\n\tSTDMETHODIMP CActiveXCtrl::ParseDisplayName(IBindCtx *pbc, LPOLESTR pszDisplayName, ULONG* pchEaten, IMoniker** ppmkOut)\n\t{\n\t\tDUITRACE(_T(\"AX: CActiveXCtrl::ParseDisplayName\"));\n\t\treturn E_NOTIMPL;\n\t}\n\n\tHRESULT CActiveXCtrl::CreateActiveXWnd( )\n\t{\n\t\tif (m_pWindow != NULL) return S_OK;\n\t\tm_pWindow = new CActiveXWnd;\n\t\tif (m_pWindow == NULL) return E_OUTOFMEMORY;\n\t\tm_pOwner->m_hwndHost = m_pWindow->Init(this, m_pOwner->GetManager( )->GetPaintWindow( ));\n\t\treturn S_OK;\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tHWND CActiveXWnd::Init(CActiveXCtrl* pOwner, HWND hWndParent)\n\t{\n\t\tm_pOwner = pOwner;\n\t\tUINT uStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;\n\t\tCreate(hWndParent, _T(\"UIActiveX\"), uStyle, 0L, 0, 0, 0, 0, NULL);\n\t\treturn m_hWnd;\n\t}\n\n\tLPCTSTR CActiveXWnd::GetWindowClassName( ) const\n\t{\n\t\treturn _T(\"ActiveXWnd\");\n\t}\n\n\tvoid CActiveXWnd::OnFinalMessage(HWND hWnd)\n\t{\n\t\t//delete this; // ﲻҪCActiveXUI\n\t}\n\n\tvoid CActiveXWnd::DoVerb(LONG iVerb)\n\t{\n\t\tif (m_pOwner == NULL) return;\n\t\tif (m_pOwner->m_pOwner == NULL) return;\n\t\tIOleObject* pUnk = NULL;\n\t\tm_pOwner->m_pOwner->GetControl(IID_IOleObject, (LPVOID*)&pUnk);\n\t\tif (pUnk == NULL) return;\n\t\tCSafeRelease<IOleObject> RefOleObject = pUnk;\n\t\tIOleClientSite* pOleClientSite = NULL;\n\t\tm_pOwner->QueryInterface(IID_IOleClientSite, (LPVOID*)&pOleClientSite);\n\t\tCSafeRelease<IOleClientSite> RefOleClientSite = pOleClientSite;\n\t\tpUnk->DoVerb(iVerb, NULL, pOleClientSite, 0, m_hWnd, &m_pOwner->m_pOwner->GetPos( ));\n\t}\n\n\tLRESULT CActiveXWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)\n\t{\n\t\tLRESULT lRes = 0;\n\t\tBOOL bHandled = TRUE;\n\t\tswitch (uMsg) {\n\t\tcase WM_PAINT:         lRes = OnPaint(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_SETFOCUS:      lRes = OnSetFocus(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_KILLFOCUS:     lRes = OnKillFocus(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_ERASEBKGND:    lRes = OnEraseBkgnd(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_MOUSEACTIVATE: lRes = OnMouseActivate(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_MOUSEWHEEL: break;\n\t\tdefault:\n\t\t\tbHandled = FALSE;\n\t\t}\n\t\tif (!bHandled) return CWindowWnd::HandleMessage(uMsg, wParam, lParam);\n\t\treturn lRes;\n\t}\n\n\tLRESULT CActiveXWnd::OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tif (m_pOwner->m_pViewObject == NULL) bHandled = FALSE;\n\t\treturn 1;\n\t}\n\n\tLRESULT CActiveXWnd::OnMouseActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tIOleObject* pUnk = NULL;\n\t\tm_pOwner->m_pOwner->GetControl(IID_IOleObject, (LPVOID*)&pUnk);\n\t\tif (pUnk == NULL) return 0;\n\t\tCSafeRelease<IOleObject> RefOleObject = pUnk;\n\t\tDWORD dwMiscStatus = 0;\n\t\tpUnk->GetMiscStatus(DVASPECT_CONTENT, &dwMiscStatus);\n\t\tif ((dwMiscStatus & OLEMISC_NOUIACTIVATE) != 0) return 0;\n\t\tif (!m_pOwner->m_bInPlaceActive) DoVerb(OLEIVERB_INPLACEACTIVATE);\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLRESULT CActiveXWnd::OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\tm_pOwner->m_bFocused = true;\n\t\tif (!m_pOwner->m_bUIActivated) DoVerb(OLEIVERB_UIACTIVATE);\n\t\treturn 0;\n\t}\n\n\tLRESULT CActiveXWnd::OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\tm_pOwner->m_bFocused = false;\n\t\treturn 0;\n\t}\n\n\tLRESULT CActiveXWnd::OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tPAINTSTRUCT ps = { 0 };\n\t\t::BeginPaint(m_hWnd, &ps);\n\t\t::EndPaint(m_hWnd, &ps);\n\t\treturn 1;\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCActiveXUI::CActiveXUI( ) : m_pUnk(NULL), m_pControl(NULL), m_hwndHost(NULL), m_bCreated(false), m_bDelayCreate(true)\n\t{\n\t\tm_clsid = IID_NULL;\n\t}\n\n\tCActiveXUI::~CActiveXUI( )\n\t{\n\t\tReleaseControl( );\n\t}\n\n\tLPCTSTR CActiveXUI::GetClass( ) const\n\t{\n\t\treturn _T(\"ActiveXUI\");\n\t}\n\n\tLPVOID CActiveXUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif (_tcscmp(pstrName, DUI_CTR_ACTIVEX) == 0) return static_cast<CActiveXUI*>(this);\n\t\treturn CControlUI::GetInterface(pstrName);\n\t}\n\n\tHWND CActiveXUI::GetHostWindow( ) const\n\t{\n\t\treturn m_hwndHost;\n\t}\n\n\tstatic void PixelToHiMetric(const SIZEL* lpSizeInPix, LPSIZEL lpSizeInHiMetric)\n\t{\n#define HIMETRIC_PER_INCH   2540\n#define MAP_PIX_TO_LOGHIM(x,ppli)   MulDiv(HIMETRIC_PER_INCH, (x), (ppli))\n#define MAP_LOGHIM_TO_PIX(x,ppli)   MulDiv((ppli), (x), HIMETRIC_PER_INCH)\n\t\tint nPixelsPerInchX;    // Pixels per logical inch along width\n\t\tint nPixelsPerInchY;    // Pixels per logical inch along height\n\t\tHDC hDCScreen = ::GetDC(NULL);\n\t\tnPixelsPerInchX = ::GetDeviceCaps(hDCScreen, LOGPIXELSX);\n\t\tnPixelsPerInchY = ::GetDeviceCaps(hDCScreen, LOGPIXELSY);\n\t\t::ReleaseDC(NULL, hDCScreen);\n\t\tlpSizeInHiMetric->cx = MAP_PIX_TO_LOGHIM(lpSizeInPix->cx, nPixelsPerInchX);\n\t\tlpSizeInHiMetric->cy = MAP_PIX_TO_LOGHIM(lpSizeInPix->cy, nPixelsPerInchY);\n\t}\n\n\tvoid CActiveXUI::SetVisible(bool bVisible)\n\t{\n\t\tCControlUI::SetVisible(bVisible);\n\t\tif (m_hwndHost != NULL && !m_pControl->m_bWindowless)\n\t\t\t::ShowWindow(m_hwndHost, IsVisible( ) ? SW_SHOW : SW_HIDE);\n\t}\n\n\tvoid CActiveXUI::SetInnerVisible(bool bVisible)\n\t{\n\t\tCControlUI::SetInnerVisible(bVisible);\n\t\tif (m_hwndHost != NULL && !m_pControl->m_bWindowless)\n\t\t\t::ShowWindow(m_hwndHost, IsVisible( ) ? SW_SHOW : SW_HIDE);\n\t}\n\n\tvoid CActiveXUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\n\t\tif (!m_bCreated) DoCreateControl( );\n\n\t\tif (m_pUnk == NULL) return;\n\t\tif (m_pControl == NULL) return;\n\n\t\tSIZEL hmSize = { 0 };\n\t\tSIZEL pxSize = { 0 };\n\t\tpxSize.cx = m_rcItem.right - m_rcItem.left;\n\t\tpxSize.cy = m_rcItem.bottom - m_rcItem.top;\n\t\tPixelToHiMetric(&pxSize, &hmSize);\n\n\t\tif (m_pUnk != NULL) {\n\t\t\tm_pUnk->SetExtent(DVASPECT_CONTENT, &hmSize);\n\t\t}\n\t\tif (m_pControl->m_pInPlaceObject != NULL) {\n\t\t\tCDuiRect rcItem = m_rcItem;\n\t\t\tif (!m_pControl->m_bWindowless) rcItem.ResetOffset( );\n\t\t\tm_pControl->m_pInPlaceObject->SetObjectRects(&rcItem, &rcItem);\n\t\t}\n\t\tif (!m_pControl->m_bWindowless) {\n\t\t\tASSERT(m_pControl->m_pWindow);\n\t\t\t::MoveWindow(*m_pControl->m_pWindow, m_rcItem.left, m_rcItem.top, m_rcItem.right - m_rcItem.left, m_rcItem.bottom - m_rcItem.top, TRUE);\n\t\t}\n\t}\n\n\tvoid CActiveXUI::DoPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\tif (!::IntersectRect(&m_rcPaint, &rcPaint, &m_rcItem)) return;\n\n\t\tif (m_pControl != NULL && m_pControl->m_bWindowless && m_pControl->m_pViewObject != NULL)\n\t\t{\n\t\t\tm_pControl->m_pViewObject->Draw(DVASPECT_CONTENT, -1, NULL, NULL, NULL, hDC, (RECTL*)&m_rcItem, (RECTL*)&m_rcItem, NULL, NULL);\n\t\t}\n\t}\n\n\tvoid CActiveXUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif (_tcscmp(pstrName, _T(\"clsid\")) == 0) CreateControl(pstrValue);\n\t\telse if (_tcscmp(pstrName, _T(\"modulename\")) == 0) SetModuleName(pstrValue);\n\t\telse if (_tcscmp(pstrName, _T(\"delaycreate\")) == 0) SetDelayCreate(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse CControlUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tLRESULT CActiveXUI::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled)\n\t{\n\t\tif (m_pControl == NULL) return 0;\n\t\tASSERT(m_pControl->m_bWindowless);\n\t\tif (!m_pControl->m_bInPlaceActive) return 0;\n\t\tif (m_pControl->m_pInPlaceObject == NULL) return 0;\n\t\tif (!IsMouseEnabled( ) && uMsg >= WM_MOUSEFIRST && uMsg <= WM_MOUSELAST) return 0;\n\t\tbool bWasHandled = true;\n\t\tif ((uMsg >= WM_MOUSEFIRST && uMsg <= WM_MOUSELAST) || uMsg == WM_SETCURSOR) {\n\t\t\t// Mouse message only go when captured or inside rect\n\t\t\tDWORD dwHitResult = m_pControl->m_bCaptured ? HITRESULT_HIT : HITRESULT_OUTSIDE;\n\t\t\tif (dwHitResult == HITRESULT_OUTSIDE && m_pControl->m_pViewObject != NULL) {\n\t\t\t\tIViewObjectEx* pViewEx = NULL;\n\t\t\t\tm_pControl->m_pViewObject->QueryInterface(IID_IViewObjectEx, (LPVOID*)&pViewEx);\n\t\t\t\tif (pViewEx != NULL) {\n\t\t\t\t\tPOINT ptMouse = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\t\tpViewEx->QueryHitPoint(DVASPECT_CONTENT, &m_rcItem, ptMouse, 0, &dwHitResult);\n\t\t\t\t\tpViewEx->Release( );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (dwHitResult != HITRESULT_HIT) return 0;\n\t\t\tif (uMsg == WM_SETCURSOR) bWasHandled = false;\n\t\t}\n\t\telse if (uMsg >= WM_KEYFIRST && uMsg <= WM_KEYLAST)\n\t\t{\n\t\t\t// Keyboard messages just go when we have focus\n\t\t\tif (!IsFocused( )) return 0;\n\t\t}\n\t\telse {\n\t\t\tswitch (uMsg) {\n\t\t\tcase WM_HELP:\n\t\t\tcase WM_CONTEXTMENU:\n\t\t\t\tbWasHandled = false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\tLRESULT lResult = 0;\n\t\tHRESULT Hr = m_pControl->m_pInPlaceObject->OnWindowMessage(uMsg, wParam, lParam, &lResult);\n\t\tif (Hr == S_OK) bHandled = bWasHandled;\n\t\treturn lResult;\n\t}\n\n\tbool CActiveXUI::IsDelayCreate( ) const\n\t{\n\t\treturn m_bDelayCreate;\n\t}\n\n\tvoid CActiveXUI::SetDelayCreate(bool bDelayCreate)\n\t{\n\t\tif (m_bDelayCreate == bDelayCreate) return;\n\t\tif (bDelayCreate == false) {\n\t\t\tif (m_bCreated == false && m_clsid != IID_NULL) DoCreateControl( );\n\t\t}\n\t\tm_bDelayCreate = bDelayCreate;\n\t}\n\n\tbool CActiveXUI::CreateControl(LPCTSTR pstrCLSID)\n\t{\n\t\tCLSID clsid = { 0 };\n\t\tOLECHAR szCLSID[100] = { 0 };\n#ifndef _UNICODE\n\t\t::MultiByteToWideChar(::GetACP( ), 0, pstrCLSID, -1, szCLSID, lengthof(szCLSID) - 1);\n#else\n\t\t_tcsncpy(szCLSID, pstrCLSID, lengthof(szCLSID) - 1);\n#endif\n\t\tif (pstrCLSID[0] == '{') ::CLSIDFromString(szCLSID, &clsid);\n\t\telse ::CLSIDFromProgID(szCLSID, &clsid);\n\t\treturn CreateControl(clsid);\n\t}\n\n\tbool CActiveXUI::CreateControl(const CLSID clsid)\n\t{\n\t\tASSERT(clsid != IID_NULL);\n\t\tif (clsid == IID_NULL) return false;\n\t\tm_bCreated = false;\n\t\tm_clsid = clsid;\n\t\tif (!m_bDelayCreate) DoCreateControl( );\n\t\treturn true;\n\t}\n\n\tvoid CActiveXUI::ReleaseControl( )\n\t{\n\t\tm_hwndHost = NULL;\n\t\tif (m_pUnk != NULL) {\n\t\t\tIObjectWithSite* pSite = NULL;\n\t\t\tm_pUnk->QueryInterface(IID_IObjectWithSite, (LPVOID*)&pSite);\n\t\t\tif (pSite != NULL) {\n\t\t\t\tpSite->SetSite(NULL);\n\t\t\t\tpSite->Release( );\n\t\t\t}\n\t\t\t//\t\tm_pUnk->Close(OLECLOSE_NOSAVE);\n\t\t\t//\t\tm_pUnk->SetClientSite(NULL);\n\t\t\t//\t\tm_pUnk->Release(); \n\t\t\t//\t\tm_pUnk = NULL;\n\t\t}\n\t\tif (m_pControl != NULL) {\n\t\t\tm_pControl->m_pOwner = NULL;\n\t\t\tm_pControl->Release( );\n\t\t\tm_pControl = NULL;\n\t\t}\n\t\tm_pManager->RemoveMessageFilter(this);\n\t}\n\n\ttypedef HRESULT(__stdcall *DllGetClassObjectFunc)(REFCLSID rclsid, REFIID riid, LPVOID* ppv);\n\n\tbool CActiveXUI::DoCreateControl( )\n\t{\n\t\tReleaseControl( );\n\t\t// At this point we'll create the ActiveX control\n\t\tm_bCreated = true;\n\t\tIOleControl* pOleControl = NULL;\n\n\t\tHRESULT Hr = -1;\n\t\tif (!m_sModuleName.IsEmpty( )) {\n\t\t\tHMODULE hModule = ::LoadLibrary((LPCTSTR)m_sModuleName);\n\t\t\tif (hModule != NULL) {\n\t\t\t\tIClassFactory* aClassFactory = NULL;\n\t\t\t\tDllGetClassObjectFunc aDllGetClassObjectFunc = (DllGetClassObjectFunc)::GetProcAddress(hModule, \"DllGetClassObject\");\n\t\t\t\tHr = aDllGetClassObjectFunc(m_clsid, IID_IClassFactory, (LPVOID*)&aClassFactory);\n\t\t\t\tif (SUCCEEDED(Hr)) {\n\t\t\t\t\tHr = aClassFactory->CreateInstance(NULL, IID_IOleObject, (LPVOID*)&pOleControl);\n\t\t\t\t}\n\t\t\t\taClassFactory->Release( );\n\t\t\t}\n\t\t}\n\t\tif (FAILED(Hr)) {\n\t\t\tHr = ::CoCreateInstance(m_clsid, NULL, CLSCTX_ALL, IID_IOleControl, (LPVOID*)&pOleControl);\n\t\t}\n\t\tASSERT(SUCCEEDED(Hr));\n\t\tif (FAILED(Hr)) return false;\n\t\tpOleControl->QueryInterface(IID_IOleObject, (LPVOID*)&m_pUnk);\n\t\tpOleControl->Release( );\n\t\tif (m_pUnk == NULL) return false;\n\t\t// Create the host too\n\t\tm_pControl = new CActiveXCtrl( );\n\t\tm_pControl->m_pOwner = this;\n\t\t// More control creation stuff\n\t\tDWORD dwMiscStatus = 0;\n\t\tm_pUnk->GetMiscStatus(DVASPECT_CONTENT, &dwMiscStatus);\n\t\tIOleClientSite* pOleClientSite = NULL;\n\t\tm_pControl->QueryInterface(IID_IOleClientSite, (LPVOID*)&pOleClientSite);\n\t\tCSafeRelease<IOleClientSite> RefOleClientSite = pOleClientSite;\n\t\t// Initialize control\n\t\tif ((dwMiscStatus & OLEMISC_SETCLIENTSITEFIRST) != 0) m_pUnk->SetClientSite(pOleClientSite);\n\t\tIPersistStreamInit* pPersistStreamInit = NULL;\n\t\tm_pUnk->QueryInterface(IID_IPersistStreamInit, (LPVOID*)&pPersistStreamInit);\n\t\tif (pPersistStreamInit != NULL) {\n\t\t\tHr = pPersistStreamInit->InitNew( );\n\t\t\tpPersistStreamInit->Release( );\n\t\t}\n\t\tif (FAILED(Hr)) return false;\n\t\tif ((dwMiscStatus & OLEMISC_SETCLIENTSITEFIRST) == 0) m_pUnk->SetClientSite(pOleClientSite);\n\t\t// Grab the view...\n\t\tHr = m_pUnk->QueryInterface(IID_IViewObjectEx, (LPVOID*)&m_pControl->m_pViewObject);\n\t\tif (FAILED(Hr)) Hr = m_pUnk->QueryInterface(IID_IViewObject2, (LPVOID*)&m_pControl->m_pViewObject);\n\t\tif (FAILED(Hr)) Hr = m_pUnk->QueryInterface(IID_IViewObject, (LPVOID*)&m_pControl->m_pViewObject);\n\t\t// Activate and done...\n\t\tm_pUnk->SetHostNames(OLESTR(\"UIActiveX\"), NULL);\n\t\tif (m_pManager != NULL) m_pManager->SendNotify((CControlUI*)this, DUI_MSGTYPE_SHOWACTIVEX, 0, 0, false);\n\t\tif ((dwMiscStatus & OLEMISC_INVISIBLEATRUNTIME) == 0) {\n\t\t\tHr = m_pUnk->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL, pOleClientSite, 0, m_pManager->GetPaintWindow( ), &m_rcItem);\n\t\t\t//::RedrawWindow(m_pManager->GetPaintWindow(), &m_rcItem, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE | RDW_INTERNALPAINT | RDW_FRAME);\n\t\t}\n\t\tIObjectWithSite* pSite = NULL;\n\t\tm_pUnk->QueryInterface(IID_IObjectWithSite, (LPVOID*)&pSite);\n\t\tif (pSite != NULL) {\n\t\t\tpSite->SetSite(static_cast<IOleClientSite*>(m_pControl));\n\t\t\tpSite->Release( );\n\t\t}\n\t\treturn SUCCEEDED(Hr);\n\t}\n\n\tHRESULT CActiveXUI::GetControl(const IID iid, LPVOID* ppRet)\n\t{\n\t\tASSERT(ppRet != NULL);\n\t\tASSERT(*ppRet == NULL);\n\t\tif (ppRet == NULL) return E_POINTER;\n\t\tif (m_pUnk == NULL) return E_PENDING;\n\t\treturn m_pUnk->QueryInterface(iid, (LPVOID*)ppRet);\n\t}\n\n\tCLSID CActiveXUI::GetClisd( ) const\n\t{\n\t\treturn m_clsid;\n\t}\n\n\tCDuiString CActiveXUI::GetModuleName( ) const\n\t{\n\t\treturn m_sModuleName;\n\t}\n\n\tvoid CActiveXUI::SetModuleName(LPCTSTR pstrText)\n\t{\n\t\tm_sModuleName = pstrText;\n\t}\n\n} // namespace DuiLib"
  },
  {
    "path": "DuiLib/Control/UIActiveX.h",
    "content": "#ifndef __UIACTIVEX_H__\n#define __UIACTIVEX_H__\n\n#pragma once\n\nstruct IOleObject;\n\n\nnamespace DuiLib {\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass CActiveXCtrl;\n\n\ttemplate< class T >\n\tclass CSafeRelease\n\t{\n\tpublic:\n\t\tCSafeRelease(T* p) : m_p(p) { };\n\t\t~CSafeRelease() { if( m_p != NULL ) m_p->Release(); };\n\t\tT* Detach() { T* t = m_p; m_p = NULL; return t; };\n\t\tT* m_p;\n\t};\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass UILIB_API CActiveXUI : public CControlUI, public IMessageFilterUI\n\t{\n\t\tfriend class CActiveXCtrl;\n\tpublic:\n\t\tCActiveXUI();\n\t\tvirtual ~CActiveXUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tHWND GetHostWindow() const;\n\n\t\tbool IsDelayCreate() const;\n\t\tvirtual void SetDelayCreate(bool bDelayCreate = true);\n\n\t\tvirtual bool CreateControl(const CLSID clsid);\n\t\tvirtual bool CreateControl(LPCTSTR pstrCLSID);\n\t\tHRESULT GetControl(const IID iid, LPVOID* ppRet);\n\t\tCLSID GetClisd() const;\n\t\tCDuiString GetModuleName() const;\n\t\tvoid SetModuleName(LPCTSTR pstrText);\n\n\t\tvoid SetVisible(bool bVisible = true);\n\t\tvoid SetInnerVisible(bool bVisible = true);\n\t\tvoid SetPos(RECT rc);\n\t\tvoid DoPaint(HDC hDC, const RECT& rcPaint);\n\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tLRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);\n\n\tprotected:\n\t\tvirtual void ReleaseControl();\n\t\tvirtual bool DoCreateControl();\n\n\tprotected:\n\t\tCLSID m_clsid;\n\t\tCDuiString m_sModuleName;\n\t\tbool m_bCreated;\n\t\tbool m_bDelayCreate;\n\t\tIOleObject* m_pUnk;\n\t\tCActiveXCtrl* m_pControl;\n\t\tHWND m_hwndHost;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UIACTIVEX_H__\n"
  },
  {
    "path": "DuiLib/Control/UIAnimation.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"UIAnimation.h\"\n#include <vector>\n\nnamespace DuiLib {\n\n\tCUIAnimation::CUIAnimation(CControlUI* pOwner)\n\t{\n\t\tASSERT(pOwner != NULL);\n\t\tm_pControl = pOwner;\n\t}\n\n\tBOOL CUIAnimation::StartAnimation(int nElapse, int nTotalFrame, int nAnimationID /*= 0*/, BOOL bLoop/* = FALSE*/)\n\t{\n\t\tCAnimationData* pData = GetAnimationDataByID(nAnimationID);\n\t\tif( NULL != pData \n\t\t\t|| nElapse <= 0\n\t\t\t|| nTotalFrame <= 0\n\t\t\t|| NULL == m_pControl )\n\t\t{\n\t\t\tASSERT(FALSE);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tCAnimationData* pAnimation = new CAnimationData(nElapse, nTotalFrame, nAnimationID, bLoop);\n\t\tif( NULL == pAnimation ) return FALSE;\n\n\t\tif(m_pControl->GetManager()->SetTimer( m_pControl, nAnimationID, nElapse ))\n\t\t{\n\t\t\tm_arAnimations.Add(pAnimation);\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}\n\n\tVOID CUIAnimation::StopAnimation(int nAnimationID /*= 0*/)\n\t{\n\t\tif(m_pControl == NULL) return;\n\n\t\tif(nAnimationID  != 0)\n\t\t{\n\t\t\tCAnimationData* pData = GetAnimationDataByID(nAnimationID);\n\t\t\tif( NULL != pData )\n\t\t\t{\n\t\t\t\tm_pControl->GetManager()->KillTimer( m_pControl, nAnimationID );\t\t\t\t\n\t\t\t\tm_arAnimations.Remove(m_arAnimations.Find(pData),true);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint nCount = m_arAnimations.GetSize();\n\t\t\tfor(int i=0; i<nCount; ++i)\n\t\t\t{\n\t\t\t\tm_pControl->GetManager()->KillTimer( m_pControl, m_arAnimations[i]->m_nAnimationID );\n\t\t\t}\n\t\t\tm_arAnimations.Empty();\n\t\t}\n\t}\n\n\tBOOL CUIAnimation::IsAnimationRunning(int nAnimationID)\n\t{\n\t\tCAnimationData* pData = GetAnimationDataByID(nAnimationID);\n\t\treturn NULL != pData;\n\t}\n\n\tint CUIAnimation::GetCurrentFrame(int nAnimationID/* = 0*/)\n\t{\n\t\tCAnimationData* pData = GetAnimationDataByID(nAnimationID);\n\t\tif( NULL == pData )\n\t\t{\n\t\t\tASSERT(FALSE);\n\t\t\treturn -1;\n\t\t}\n\t\treturn pData->m_nCurFrame;\n\t}\n\n\tBOOL CUIAnimation::SetCurrentFrame(int nFrame, int nAnimationID/* = 0*/)\n\t{\n\t\tCAnimationData* pData = GetAnimationDataByID(nAnimationID);\n\t\tif( NULL == pData)\n\t\t{\n\t\t\tASSERT(FALSE);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif(nFrame >= 0 && nFrame <= pData->m_nTotalFrame)\n\t\t{\n\t\t\tpData->m_nCurFrame = nFrame;\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tASSERT(FALSE);\n\t\t}\n\t\treturn FALSE;\n\t}\n\n\tVOID CUIAnimation::OnAnimationElapse(int nAnimationID)\n\t{\n\t\tif(m_pControl == NULL) return;\n\n\t\tCAnimationData* pData = GetAnimationDataByID(nAnimationID);\n\t\tif( NULL == pData ) return;\n\n\t\tint nCurFrame = pData->m_nCurFrame;\n\t\tif(nCurFrame == 0)\n\t\t{\n\t\t\tOnAnimationStart(nAnimationID, pData->m_bFirstLoop);\n\t\t\tpData->m_bFirstLoop = FALSE;\n\t\t}\n\n\t\tOnAnimationStep(pData->m_nTotalFrame, nCurFrame, nAnimationID);\n\n\t\tif(nCurFrame >= pData->m_nTotalFrame)\n\t\t{\n\t\t\tOnAnimationStop(nAnimationID);\n\t\t\tif(pData->m_bLoop)\n\t\t\t{\n\t\t\t\tpData->m_nCurFrame = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_pControl->GetManager()->KillTimer( m_pControl, nAnimationID );\n\t\t\t\tm_arAnimations.Remove(m_arAnimations.Find(pData),true);\n\t\t\t\tpData = NULL;\n\t\t\t}\n\t\t}\n\n\t\tif( NULL != pData )\n\t\t{\n\t\t\t++(pData->m_nCurFrame);\n\t\t}\n\t}\n\n\tCAnimationData* CUIAnimation::GetAnimationDataByID(int nAnimationID)\n\t{\n\t\tCAnimationData* pRet = NULL;\n\t\tint nCount = m_arAnimations.GetSize();\n\t\tfor(int i=0; i<nCount; ++i)\n\t\t{\n\t\t\tif(m_arAnimations[i]->m_nAnimationID == nAnimationID)\n\t\t\t{\n\t\t\t\tpRet = m_arAnimations[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn pRet;\n\t}\n\n} // namespace DuiLib"
  },
  {
    "path": "DuiLib/Control/UIAnimation.h",
    "content": "#ifndef __UIANIMATION_H__\n#define __UIANIMATION_H__\n\n#include <vector>\n#include \"UIButton.h\"\n#pragma once\n\nnamespace DuiLib {\n\n\tclass UILIB_API IUIAnimation\n\t{\n\tpublic:\n\t\tvirtual ~IUIAnimation() { }\n\n\t\tvirtual BOOL StartAnimation(int nElapse, int nTotalFrame, int nAnimationID = 0, BOOL bLoop = FALSE) = 0;\n\t\tvirtual VOID StopAnimation(int nAnimationID = 0) = 0;\n\t\tvirtual BOOL IsAnimationRunning(int nAnimationID) = 0;\n\t\tvirtual int GetCurrentFrame(int nAnimationID = 0) = 0;\n\t\tvirtual BOOL SetCurrentFrame(int nFrame, int nAnimationID = 0) = 0;\n\n\t\tvirtual VOID OnAnimationStep(int nTotalFrame, int nCurFrame, int nAnimationID) = 0;\n\t\tvirtual VOID OnAnimationStart(int nAnimationID, BOOL bFirstLoop) = 0;\n\t\tvirtual VOID OnAnimationStop(int nAnimationID) = 0;\n\n\t\tvirtual VOID OnAnimationElapse(int nAnimationID) = 0;\n\t};\n\n\tclass UILIB_API CAnimationData\n\t{\n\tpublic:\n\t\tCAnimationData(int nElipse, int nFrame, int nID, BOOL bLoop)\n\t\t{\n\t\t\tm_bFirstLoop = TRUE;\n\t\t\tm_nCurFrame = 0;\n\t\t\tm_nElapse = nElipse;\n\t\t\tm_nTotalFrame = nFrame;\n\t\t\tm_bLoop = bLoop;\n\t\t\tm_nAnimationID = nID;\n\t\t}\n\n\t\t//protected:\n\tpublic:\n\t\tfriend class CDUIAnimation;\n\n\t\tint m_nAnimationID;\n\t\tint m_nElapse;\n\n\t\tint m_nTotalFrame;\n\t\tint m_nCurFrame;\n\n\t\tBOOL m_bLoop;\n\t\tBOOL m_bFirstLoop;\n\t};\n\n\tclass UILIB_API CUIAnimation: public IUIAnimation\n\t{\n\tpublic:\n\t\tCUIAnimation(CControlUI* pOwner);\n\n\t\tvirtual BOOL StartAnimation(int nElapse, int nTotalFrame, int nAnimationID = 0, BOOL bLoop = FALSE);\n\t\tvirtual VOID StopAnimation(int nAnimationID = 0);\n\t\tvirtual BOOL IsAnimationRunning(int nAnimationID);\n\t\tvirtual int GetCurrentFrame(int nAnimationID = 0);\n\t\tvirtual BOOL SetCurrentFrame(int nFrame, int nAnimationID = 0);\n\n\t\tvirtual VOID OnAnimationStart(int nAnimationID, BOOL bFirstLoop) {};\n\t\tvirtual VOID OnAnimationStep(int nTotalFrame, int nCurFrame, int nAnimationID) {};\n\t\tvirtual VOID OnAnimationStop(int nAnimationID) {};\n\n\t\tvirtual VOID OnAnimationElapse(int nAnimationID);\n\n\tprotected:\n\t\tCAnimationData* GetAnimationDataByID(int nAnimationID);\n\n\tprotected:\n\t\tCControlUI* m_pControl;\n\t\tTStdPtrArray<CAnimationData*> m_arAnimations;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UIANIMATION_H__"
  },
  {
    "path": "DuiLib/Control/UIButton.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIButton.h\"\n\nnamespace DuiLib\n{\n\tCButtonUI::CButtonUI()\n\t\t: m_uButtonState(0)\n\t\t, m_dwHotTextColor(0)\n\t\t, m_dwPushedTextColor(0)\n\t\t, m_dwFocusedTextColor(0)\n\t\t,m_dwHotBkColor(0)\n\t\t,m_dwPushedBKColor(0)\n\t\t,m_bDBClickState(false)\n\t{\n\t\tm_uTextStyle = DT_SINGLELINE | DT_VCENTER | DT_CENTER;\n\t}\n\n\tLPCTSTR CButtonUI::GetClass() const\n\t{\n\t\treturn _T(\"ButtonUI\");\n\t}\n\n\tLPVOID CButtonUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_BUTTON) == 0 ) return static_cast<CButtonUI*>(this);\n\t\treturn CLabelUI::GetInterface(pstrName);\n\t}\n\n\tUINT CButtonUI::GetControlFlags() const\n\t{\n\t\treturn (IsKeyboardEnabled() ? UIFLAG_TABSTOP : 0) | (IsEnabled() ? UIFLAG_SETCURSOR : 0);\n\t}\n\n\tvoid CButtonUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pParent != NULL ) m_pParent->DoEvent(event);\n\t\t\telse CLabelUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_SETFOCUS ) \n\t\t{\n\t\t\tInvalidate();\n\t\t}\n\t\tif( event.Type == UIEVENT_KILLFOCUS ) \n\t\t{\n\t\t\tInvalidate();\n\t\t}\n\t\tif( event.Type == UIEVENT_KEYDOWN )\n\t\t{\n\t\t\tif (IsKeyboardEnabled()) {\n\t\t\t\tif( event.chKey == VK_SPACE || event.chKey == VK_RETURN ) {\n\t\t\t\t\tActivate();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONDOWN)\n\t\t{\n\t\t\tif( ::PtInRect(&m_rcItem, event.ptMouse) && IsEnabled() ) {\n\t\t\t\tm_uButtonState |= UISTATE_PUSHED | UISTATE_CAPTURED;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_DBLCLICK)\n\t\t{\n\t\t\tif( ::PtInRect(&m_rcItem, event.ptMouse) && IsEnabled() ) {\n\t\t\t\tm_bDBClickState = TRUE ;\n\t\t\t\tm_uButtonState |= UISTATE_PUSHED | UISTATE_CAPTURED;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\t\n\t\tif( event.Type == UIEVENT_MOUSEMOVE )\n\t\t{\n\t\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\tif( ::PtInRect(&m_rcItem, event.ptMouse) ) m_uButtonState |= UISTATE_PUSHED;\n\t\t\t\telse m_uButtonState &= ~UISTATE_PUSHED;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONUP )\n\t\t{\n\t\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\tif( ::PtInRect(&m_rcItem, event.ptMouse) ) Activate();\n\t\t\t\tm_uButtonState &= ~(UISTATE_PUSHED | UISTATE_CAPTURED);\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_CONTEXTMENU )\n\t\t{\n\t\t\tif( IsContextMenuUsed() ) {\n\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_MENU, event.wParam, event.lParam);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEENTER )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_uButtonState |= UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\t// return;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSELEAVE )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_uButtonState &= ~UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\t// return;\n\t\t}\n\t\tif( event.Type == UIEVENT_SETCURSOR ) {\n\t\t\t::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_HAND)));\n\t\t\treturn;\n\t\t}\n\t\tCLabelUI::DoEvent(event);\n\t}\n\n\tbool CButtonUI::Activate()\n\t{\n\t\tif( !CControlUI::Activate() ) return false;\n\t\tif( m_pManager != NULL )\n\t\t{\n\t\t\tif (m_bDBClickState == FALSE )\n\t\t\t{\n\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_CLICK);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_bDBClickState = FALSE ;\n\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_DBCLICK);\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tvoid CButtonUI::SetEnabled(bool bEnable)\n\t{\n\t\tCControlUI::SetEnabled(bEnable);\n\t\tif( !IsEnabled() ) {\n\t\t\tm_uButtonState = 0;\n\t\t}\n\t}\n\n\tvoid CButtonUI::SetHotBkColor( DWORD dwColor )\n\t{\n\t\tm_dwHotBkColor = dwColor;\n\t}\n\n\tDWORD CButtonUI::GetHotBkColor() const\n\t{\n\t\treturn m_dwHotBkColor;\n\t}\n\n\tvoid CButtonUI::SetHotTextColor(DWORD dwColor)\n\t{\n\t\tm_dwHotTextColor = dwColor;\n\t}\n\n\tDWORD CButtonUI::GetHotTextColor() const\n\t{\n\t\treturn m_dwHotTextColor;\n\t}\n\n\tvoid CButtonUI::SetPushedTextColor(DWORD dwColor)\n\t{\n\t\tm_dwPushedTextColor = dwColor;\n\t}\n\n\tDWORD CButtonUI::GetPushedTextColor() const\n\t{\n\t\treturn m_dwPushedTextColor;\n\t}\n\n\tvoid CButtonUI::SetPushedBKColor(DWORD dwColor)\n\t{\n\t\tm_dwPushedBKColor=dwColor;\n\t}\n\n\tDWORD CButtonUI::GetPushedBKColor()\n\t{\n\t\treturn m_dwPushedBKColor;\n\t}\n\n\tvoid CButtonUI::SetFocusedTextColor(DWORD dwColor)\n\t{\n\t\tm_dwFocusedTextColor = dwColor;\n\t}\n\n\tDWORD CButtonUI::GetFocusedTextColor() const\n\t{\n\t\treturn m_dwFocusedTextColor;\n\t}\n\n\tLPCTSTR CButtonUI::GetNormalImage()\n\t{\n\t\treturn m_sNormalImage;\n\t}\n\n\tvoid CButtonUI::SetNormalImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sNormalImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CButtonUI::GetHotImage()\n\t{\n\t\treturn m_sHotImage;\n\t}\n\n\tvoid CButtonUI::SetHotImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sHotImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CButtonUI::GetPushedImage()\n\t{\n\t\treturn m_sPushedImage;\n\t}\n\n\tvoid CButtonUI::SetPushedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sPushedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CButtonUI::GetFocusedImage()\n\t{\n\t\treturn m_sFocusedImage;\n\t}\n\n\tvoid CButtonUI::SetFocusedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sFocusedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CButtonUI::GetDisabledImage()\n\t{\n\t\treturn m_sDisabledImage;\n\t}\n\n\tvoid CButtonUI::SetDisabledImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sDisabledImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\t//************************************\n\t// Method:    GetForeImage\n\t// FullName:  CButtonUI::GetForeImage\n\t// Access:    public \n\t// Returns:   LPCTSTR\n\t// Qualifier:\n\t// Note:\t  \n\t//************************************\n\tLPCTSTR CButtonUI::GetForeImage()\n\t{\n\t\treturn m_sForeImage;\n\t}\n\n\t//************************************\n\t// Method:    SetForeImage\n\t// FullName:  CButtonUI::SetForeImage\n\t// Access:    public \n\t// Returns:   void\n\t// Qualifier:\n\t// Parameter: LPCTSTR pStrImage\n\t// Note:\t  \n\t//************************************\n\tvoid CButtonUI::SetForeImage( LPCTSTR pStrImage )\n\t{\n\t\tm_sForeImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\t//************************************\n\t// Method:    GetHotForeImage\n\t// FullName:  CButtonUI::GetHotForeImage\n\t// Access:    public \n\t// Returns:   LPCTSTR\n\t// Qualifier:\n\t// Note:\t  \n\t//************************************\n\tLPCTSTR CButtonUI::GetHotForeImage()\n\t{\n\t\treturn m_sHotForeImage;\n\t}\n\n\t//************************************\n\t// Method:    SetHotForeImage\n\t// FullName:  CButtonUI::SetHotForeImage\n\t// Access:    public \n\t// Returns:   void\n\t// Qualifier:\n\t// Parameter: LPCTSTR pStrImage\n\t// Note:\t  \n\t//************************************\n\tvoid CButtonUI::SetHotForeImage( LPCTSTR pStrImage )\n\t{\n\t\tm_sHotForeImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tSIZE CButtonUI::EstimateSize(SIZE szAvailable)\n\t{\n\t\tif( m_cxyFixed.cy == 0 ) return CSize(m_cxyFixed.cx, m_pManager->GetFontInfo(GetFont())->tm.tmHeight + 8);\n\t\treturn CControlUI::EstimateSize(szAvailable);\n\t}\n\n\tvoid CButtonUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"normalimage\")) == 0 ) SetNormalImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"hotimage\")) == 0 ) SetHotImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"pushedimage\")) == 0 ) SetPushedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"focusedimage\")) == 0 ) SetFocusedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"disabledimage\")) == 0 ) SetDisabledImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"foreimage\")) == 0 ) SetForeImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"hotforeimage\")) == 0 ) SetHotForeImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"hotbkcolor\")) == 0 )\n\t\t{\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetHotBkColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"hottextcolor\")) == 0 )\n\t\t{\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetHotTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"pushedtextcolor\")) == 0 )\n\t\t{\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetPushedTextColor(clrColor);\n\t\t}\n\t\telse if ( _tcscmp(pstrName, _T(\"pushedbkcolor\")) == 0)\n\t\t{\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetPushedBKColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"focusedtextcolor\")) == 0 )\n\t\t{\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetFocusedTextColor(clrColor);\n\t\t}\n\n\t\telse CLabelUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CButtonUI::PaintText(HDC hDC)\n\t{\n\t\tif( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;\n\t\telse m_uButtonState &= ~ UISTATE_FOCUSED;\n\t\tif( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;\n\t\telse m_uButtonState &= ~ UISTATE_DISABLED;\n\n\t\tif( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor();\n\t\tif( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor();\n\n\t\tif( m_sText.IsEmpty() ) return;\n\t\tint nLinks = 0;\n\t\tRECT rc = m_rcItem;\n\t\trc.left += m_rcTextPadding.left;\n\t\trc.right -= m_rcTextPadding.right;\n\t\trc.top += m_rcTextPadding.top;\n\t\trc.bottom -= m_rcTextPadding.bottom;\n\n\t\tDWORD clrColor = IsEnabled()?m_dwTextColor:m_dwDisabledTextColor;\n\n\t\tif( ((m_uButtonState & UISTATE_PUSHED) != 0) && (GetPushedTextColor() != 0) )\n\t\t\tclrColor = GetPushedTextColor();\n\t\telse if( ((m_uButtonState & UISTATE_HOT) != 0) && (GetHotTextColor() != 0) )\n\t\t\tclrColor = GetHotTextColor();\n\t\telse if( ((m_uButtonState & UISTATE_FOCUSED) != 0) && (GetFocusedTextColor() != 0) )\n\t\t\tclrColor = GetFocusedTextColor();\n\n\t\tif( m_bShowHtml )\n\t\t\tCRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, clrColor, \\\n\t\t\tNULL, NULL, nLinks, m_uTextStyle);\n\t\telse\n\t\t\tCRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, clrColor, \\\n\t\t\tm_iFont, m_uTextStyle);\n\t}\n\n\tvoid CButtonUI::PaintStatusImage(HDC hDC)\n\t{\n\t\tif( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;\n\t\telse m_uButtonState &= ~ UISTATE_FOCUSED;\n\t\tif( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;\n\t\telse m_uButtonState &= ~ UISTATE_DISABLED;\n\n\t\tif( (m_uButtonState & UISTATE_DISABLED) != 0 ) {\n\t\t\tif( !m_sDisabledImage.IsEmpty() )\n\t\t\t{\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sDisabledImage) ) m_sDisabledImage.Empty();\n\t\t\t\telse goto Label_ForeImage;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButtonState & UISTATE_PUSHED) != 0 )\n\t\t{\n\t\t\tif( !m_sPushedImage.IsEmpty() )\n\t\t\t{\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sPushedImage) ){\n\t\t\t\t\tm_sPushedImage.Empty();\n\t\t\t\t}\n\t\t\t\tif( !m_sPushedForeImage.IsEmpty() )\n\t\t\t\t{\n\t\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sPushedForeImage) )\n\t\t\t\t\t\tm_sPushedForeImage.Empty();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\telse goto Label_ForeImage;\n\t\t\t}\n\t\t\telse if(m_dwPushedBKColor != 0) \n\t\t\t{\n\t\t\t\tCRenderEngine::DrawColor(hDC, m_rcPaint, GetAdjustColor(m_dwPushedBKColor));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\tif( !m_sHotImage.IsEmpty() )\n\t\t\t{\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sHotImage) )\n\t\t\t\t{\n\t\t\t\t\tm_sHotImage.Empty();\n\t\t\t\t}\n\t\t\t\tif( !m_sHotForeImage.IsEmpty() )\n\t\t\t\t{\n\t\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sHotForeImage) )\n\t\t\t\t\t\tm_sHotForeImage.Empty();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse goto Label_ForeImage;\n\t\t\t}\n\t\t\telse if(m_dwHotBkColor != 0) {\n\t\t\t\tCRenderEngine::DrawColor(hDC, m_rcPaint, GetAdjustColor(m_dwHotBkColor));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButtonState & UISTATE_FOCUSED) != 0 ) {\n\t\t\tif( !m_sFocusedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sFocusedImage) ) m_sFocusedImage.Empty();\n\t\t\t\telse goto Label_ForeImage;\n\t\t\t}\n\t\t}\n\n\t\tif( !m_sNormalImage.IsEmpty() ) {\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sNormalImage) ) m_sNormalImage.Empty();\n\t\t\telse goto Label_ForeImage;\n\t\t}\n\n\t\tif(!m_sForeImage.IsEmpty() )\n\t\t\tgoto Label_ForeImage;\n\n\t\treturn;\n\nLabel_ForeImage:\n\t\tif(!m_sForeImage.IsEmpty() ) {\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sForeImage) ) m_sForeImage.Empty();\n\t\t}\n\t}\n}"
  },
  {
    "path": "DuiLib/Control/UIButton.h",
    "content": "#ifndef __UIBUTTON_H__\n#define __UIBUTTON_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass UILIB_API CButtonUI : public CLabelUI\n\t{\n\tpublic:\n\t\tCButtonUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\t\tUINT GetControlFlags() const;\n\n\t\tbool Activate();\n\t\tvoid SetEnabled(bool bEnable = true);\n\t\tvoid DoEvent(TEventUI& event);\n\n\t\tLPCTSTR GetNormalImage();\n\t\tvoid SetNormalImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetHotImage();\n\t\tvoid SetHotImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetPushedImage();\n\t\tvoid SetPushedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetFocusedImage();\n\t\tvoid SetFocusedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetDisabledImage();\n\t\tvoid SetDisabledImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetForeImage();\n\t\tvoid SetForeImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetHotForeImage();\n\t\tvoid SetHotForeImage(LPCTSTR pStrImage);\n\n\t\tvoid SetHotBkColor(DWORD dwColor);\n\t\tDWORD GetHotBkColor() const;\n\t\tvoid SetHotTextColor(DWORD dwColor);\n\t\tDWORD GetHotTextColor() const;\n\t\tvoid SetPushedTextColor(DWORD dwColor);\n\t\tDWORD GetPushedTextColor() const;\n\t\tvoid SetPushedBKColor(DWORD dwColor);\n\t\tDWORD GetPushedBKColor();\n\t\tvoid SetFocusedTextColor(DWORD dwColor);\n\t\tDWORD GetFocusedTextColor() const;\n\t\tSIZE EstimateSize(SIZE szAvailable);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvoid PaintText(HDC hDC);\n\t\tvoid PaintStatusImage(HDC hDC);\n\n\tprotected:\n\t\tUINT m_uButtonState;\n\t\tBOOL m_bDBClickState;\n\t\tDWORD m_dwHotBkColor;\n\t\tDWORD m_dwPushedBKColor;\n\t\tDWORD m_dwHotTextColor;\n\t\tDWORD m_dwPushedTextColor;\n\t\tDWORD m_dwFocusedTextColor;\n\n\t\tCDuiString m_sNormalImage;\n\t\tCDuiString m_sHotImage;\n\t\tCDuiString m_sHotForeImage;\n\t\tCDuiString m_sPushedImage;\n\t\tCDuiString m_sPushedForeImage;\n\t\tCDuiString m_sFocusedImage;\n\t\tCDuiString m_sDisabledImage;\n\t};\n\n}\t// namespace DuiLib\n\n#endif // __UIBUTTON_H__"
  },
  {
    "path": "DuiLib/Control/UICheckBox.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UICheckBox.h\"\n\nnamespace DuiLib\n{\n\tLPCTSTR CCheckBoxUI::GetClass() const\n\t{\n\t\treturn _T(\"CheckBoxUI\");\n\t}\n\n\tLPVOID CCheckBoxUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif (_tcscmp(pstrName, DUI_CTR_CHECKBOX) == 0) return static_cast<CCheckBoxUI*>(this);\n\t\treturn COptionUI::GetInterface(pstrName);\n\t}\n\n\tvoid CCheckBoxUI::SetCheck(bool bCheck)\n\t{\n\t\tSelected(bCheck);\n\t}\n\n\tbool  CCheckBoxUI::GetCheck() const\n\t{\n\t\treturn IsSelected();\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Control/UICheckBox.h",
    "content": "#ifndef __UICHECKBOX_H__\n#define __UICHECKBOX_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\t/// ͨĵѡťؼֻǡֽ\n\t/// COptionUIֻÿֻһťѣΪգļĬԾ\n\t/// <CheckBox name=\"CheckBox\" value=\"height='20' align='left' textpadding='24,0,0,0' normalimage='file='sys_check_btn.png' source='0,0,20,20' dest='0,0,20,20'' selectedimage='file='sys_check_btn.png' source='20,0,40,20' dest='0,0,20,20'' disabledimage='file='sys_check_btn.png' source='40,0,60,20' dest='0,0,20,20''\"/>\n\n\tclass UILIB_API CCheckBoxUI : public COptionUI\n\t{\n\tpublic:\n\t\tvirtual LPCTSTR GetClass() const;\n\t\tvirtual LPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tvoid SetCheck(bool bCheck);\n\t\tbool GetCheck() const;\n\t};\n}\n\n#endif // __UICHECKBOX_H__\n"
  },
  {
    "path": "DuiLib/Control/UIColorPalette.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIColorPalette.h\"\n#include <math.h>\n#include <Windows.h>\n\nnamespace DuiLib {\n\n\n#define HSLMAX   255\t/* H,L, and S vary over 0-HSLMAX */\n#define RGBMAX   255    /* R,G, and B vary over 0-RGBMAX */\n#define HSLUNDEFINED (HSLMAX*2/3)\n\n\n\t/*\n\t* Convert hue value to RGB\n\t*/\n\tstatic float HueToRGB(float v1, float v2, float vH)\n\t{\n\t\tif (vH < 0.0f) vH += 1.0f;\n\t\tif (vH > 1.0f) vH -= 1.0f;\n\t\tif ((6.0f * vH) < 1.0f) return (v1 + (v2 - v1) * 6.0f * vH);\n\t\tif ((2.0f * vH) < 1.0f) return (v2);\n\t\tif ((3.0f * vH) < 2.0f) return (v1 + (v2 - v1) * ((2.0f / 3.0f) - vH) * 6.0f);\n\t\treturn (v1);\n\t}\n\n\n\t/*\n\t* Convert color RGB to HSL\n\t* pHue HSL hue value\t\t\t[0 - 1]\n\t* pSat HSL saturation value\t\t[0 - 1]\n\t* pLue HSL luminance value\t\t[0 - 1]\n\t*/\n\n\tstatic void RGBToHSL(DWORD clr, float *pHue, float *pSat, float *pLue)\n\t{\n\t\tfloat R = (float)(GetRValue(clr) / 255.0f);  //RGB from 0 to 255\n\t\tfloat G = (float)(GetGValue(clr) / 255.0f);\n\t\tfloat B = (float)(GetBValue(clr) / 255.0f);\n\n\t\tfloat H, S, L;\n\n\t\tfloat fMin = min(R, min(G, B));\t\t//Min. value of RGB\n\t\tfloat fMax = max(R, max(G, B));\t\t//Max. value of RGB\n\t\tfloat fDelta = fMax - fMin;\t\t\t\t//Delta RGB value\n\n\t\tL = (fMax + fMin) / 2.0f;\n\n\t\tif (fDelta == 0)                     //This is a gray, no chroma...\n\t\t{\n\t\t\tH = 0.0f;                          //HSL results from 0 to 1\n\t\t\tS = 0.0f;\n\t\t}\n\t\telse                                   //Chromatic data...\n\t\t{\n\t\t\tfloat del_R, del_G, del_B;\n\n\t\t\tif (L < 0.5) S = fDelta / (fMax + fMin);\n\t\t\telse           S = fDelta / (2.0f - fMax - fMin);\n\n\t\t\tdel_R = (((fMax - R) / 6.0f) + (fDelta / 2.0f)) / fDelta;\n\t\t\tdel_G = (((fMax - G) / 6.0f) + (fDelta / 2.0f)) / fDelta;\n\t\t\tdel_B = (((fMax - B) / 6.0f) + (fDelta / 2.0f)) / fDelta;\n\n\t\t\tif (R == fMax) H = del_B - del_G;\n\t\t\telse if (G == fMax) H = (1.0f / 3.0f) + del_R - del_B;\n\t\t\telse if (B == fMax) H = (2.0f / 3.0f) + del_G - del_R;\n\n\t\t\tif (H < 0.0f) H += 1.0f;\n\t\t\tif (H > 1.0f)  H -= 1.0f;\n\t\t}\n\n\t\t*pHue = H;\n\t\t*pSat = S;\n\t\t*pLue = L;\n\t}\n\n\t/*\n\t* Convert color HSL to RGB\n\t* H HSL hue value\t\t\t\t[0 - 1]\n\t* S HSL saturation value\t\t[0 - 1]\n\t* L HSL luminance value\t\t\t[0 - 1]\n\t*/\n\n\tstatic DWORD HSLToRGB(float H, float S, float L)\n\t{\n\t\tBYTE R, G, B;\n\t\tfloat var_1, var_2;\n\n\t\tif (S == 0)                       //HSL from 0 to 1\n\t\t{\n\t\t\tR = G = B = (BYTE)(L * 255.0f);   //RGB results from 0 to 255\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (L < 0.5) var_2 = L * (1.0f + S);\n\t\t\telse           var_2 = (L + S) - (S * L);\n\n\t\t\tvar_1 = 2.0f * L - var_2;\n\n\t\t\tR = (BYTE)(255.0f * HueToRGB(var_1, var_2, H + (1.0f / 3.0f)));\n\t\t\tG = (BYTE)(255.0f * HueToRGB(var_1, var_2, H));\n\t\t\tB = (BYTE)(255.0f * HueToRGB(var_1, var_2, H - (1.0f / 3.0f)));\n\t\t}\n\n\t\treturn RGB(R, G, B);\n\t}\n\n\n\t/*\n\t* _HSLToRGB color HSL value to RGB\n\t* clr  RGB color value\n\t* nHue HSL hue value\t\t\t[0 - 360]\n\t* nSat HSL saturation value\t\t[0 - 200]\n\t* nLue HSL luminance value\t\t[0 - 200]\n\t*/\n#define _HSLToRGB(h,s,l) (0xFF << 24 | HSLToRGB((float)h / 360.0f,(float)s / 200.0f,l / 200.0f))\n\n\n\t///////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\tCColorPaletteUI::CColorPaletteUI()\n\t\t: m_uButtonState(0)\n\t\t, m_bIsInBar(false)\n\t\t, m_bIsInPallet(false)\n\t\t, m_nCurH(180)\n\t\t, m_nCurS(200)\n\t\t, m_nCurB(100)\n\t\t, m_nPalletHeight(200)\n\t\t, m_nBarHeight(10)\n\t\t, m_pBits(NULL)\n\t{\n\t\tmemset(&m_bmInfo, 0, sizeof(m_bmInfo));\n\n\t\tm_hMemBitmap=NULL;\n\t}\n\n\tCColorPaletteUI::~CColorPaletteUI()\n\t{\n\t\tif (m_pBits) free(m_pBits);\n\n\t\tif (m_hMemBitmap)\n\t\t{\n\t\t\t::DeleteObject(m_hMemBitmap);\n\t\t}\n\n\t}\n\n\tDWORD CColorPaletteUI::GetSelectColor()\n\t{\n\t\tDWORD dwColor = _HSLToRGB(m_nCurH, m_nCurS, m_nCurB);\n\t\treturn 0xFF << 24 | GetRValue(dwColor) << 16 | GetGValue(dwColor) << 8 | GetBValue(dwColor);\n\t}\n\n\tvoid CColorPaletteUI::SetSelectColor(DWORD dwColor) \n\t{\n\t\tfloat H = 0, S = 0, B = 0;\n\t\tCOLORREF dwBkClr = RGB(GetBValue(dwColor),GetGValue(dwColor),GetRValue(dwColor));\n\t\tRGBToHSL(dwBkClr, &H, &S, &B);\n\t\tm_nCurH = (int)(H*360);\n\t\tm_nCurS = (int)(S*200);\n\t\tm_nCurB = (int)(B*200);\n\t\tNeedUpdate();\n\n\t}\n\n\tLPCTSTR CColorPaletteUI::GetClass() const\n\t{\n\t\treturn _T(\"ColorPaletteUI\");\n\t}\n\n\tLPVOID CColorPaletteUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif (_tcscmp(pstrName, DUI_CTR_COLORPALETTE) == 0) return static_cast<CColorPaletteUI*>(this);\n\t\treturn CControlUI::GetInterface(pstrName);\n\t}\n\n\tvoid CColorPaletteUI::SetPalletHeight(int nHeight)\n\t{\n\t\tm_nPalletHeight = nHeight;\n\t}\n\tint\t CColorPaletteUI::GetPalletHeight() const\n\t{\n\t\treturn m_nPalletHeight;\n\t}\n\tvoid CColorPaletteUI::SetBarHeight(int nHeight)\n\t{\n\t\tif (nHeight>150)\n\t\t{\n\t\t\tnHeight = 150; //߶ȣڵǰƣnheight190Խʱ\n\t\t}\n\t\tm_nBarHeight = nHeight;\n\t}\n\tint  CColorPaletteUI::GetBarHeight() const\n\t{\n\t\treturn m_nBarHeight;\n\t}\n\n\tvoid CColorPaletteUI::SetThumbImage(LPCTSTR pszImage)\n\t{\n\t\tif (m_strThumbImage != pszImage)\n\t\t{\n\t\t\tm_strThumbImage = pszImage;\n\t\t\tNeedUpdate();\n\t\t}\n\t}\n\n\tLPCTSTR CColorPaletteUI::GetThumbImage() const\n\t{\n\t\treturn m_strThumbImage.GetData();\n\t}\n\n\tvoid CColorPaletteUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif (_tcscmp(pstrName, _T(\"palletheight\")) == 0) SetPalletHeight(_ttoi(pstrValue));\n\t\telse if (_tcscmp(pstrName, _T(\"barheight\")) == 0) SetBarHeight(_ttoi(pstrValue));\n\t\telse if (_tcscmp(pstrName, _T(\"thumbimage\")) == 0) SetThumbImage(pstrValue);\n\t\telse CControlUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CColorPaletteUI::DoInit()\n\t{\n\t\tm_MemDc = CreateCompatibleDC(GetManager()->GetPaintDC());\n\t\tm_hMemBitmap = CreateCompatibleBitmap(GetManager()->GetPaintDC(), 400, 360);\n\t\tHBITMAP pOldBit = (HBITMAP)SelectObject(m_MemDc, m_hMemBitmap);\n\n\t\t::GetObject(m_hMemBitmap, sizeof(m_bmInfo), &m_bmInfo);\n\t\tDWORD dwSize = m_bmInfo.bmHeight * m_bmInfo.bmWidthBytes;\n\t\tm_pBits = (BYTE *)malloc(dwSize);\n\t\t::GetBitmapBits(m_hMemBitmap, dwSize, m_pBits);\n\n\t}\n\n\tvoid CColorPaletteUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\n\t\tm_ptLastPalletMouse.x = m_nCurH * (m_rcItem.right - m_rcItem.left) / 360 + m_rcItem.left;\n\t\tm_ptLastPalletMouse.y = (200 - m_nCurB) * m_nPalletHeight / 200 + m_rcItem.top;\n\t\t//\tm_ptLastPalletMouse.x = (m_rcItem.right + m_rcItem.left)/2;\n\t\t//\tm_ptLastPalletMouse.y = m_rcItem.top + m_nPalletHeight/2;\n\n\n\t\tUpdatePalletData();\n\t\tUpdateBarData();\n\t}\n\n\tvoid CColorPaletteUI::DoEvent(TEventUI& event)\n\t{\n\t\tCControlUI::DoEvent(event);\n\n\t\tif (event.Type == UIEVENT_BUTTONDOWN)\n\t\t{\n\t\t\tif (event.ptMouse.x >= m_rcItem.left && event.ptMouse.y >= m_rcItem.top &&\n\t\t\t\tevent.ptMouse.x < m_rcItem.right && event.ptMouse.y < m_rcItem.top + m_nPalletHeight)\n\t\t\t{\n\t\t\t\tint x = (event.ptMouse.x - m_rcItem.left) * 360 / (m_rcItem.right - m_rcItem.left);\n\t\t\t\tint y = (event.ptMouse.y - m_rcItem.top) * 200 / m_nPalletHeight;\n\t\t\t\tx = min(max(x, 0), 360);\n\t\t\t\ty = min(max(y, 0), 200);\n\n\t\t\t\tm_ptLastPalletMouse = event.ptMouse;\n\t\t\t\tif (m_ptLastPalletMouse.x < m_rcItem.left) m_ptLastPalletMouse.x = m_rcItem.left;\n\t\t\t\tif (m_ptLastPalletMouse.x > m_rcItem.right) m_ptLastPalletMouse.x = m_rcItem.right;\n\t\t\t\tif (m_ptLastPalletMouse.y < m_rcItem.top) m_ptLastPalletMouse.y = m_rcItem.top;\n\t\t\t\tif (m_ptLastPalletMouse.y > m_rcItem.top + m_nPalletHeight) m_ptLastPalletMouse.y = m_rcItem.top + m_nPalletHeight;\n\n\t\t\t\tm_nCurH = x;\n\t\t\t\tm_nCurB = 200 - y;\n\n\t\t\t\tm_uButtonState |= UISTATE_PUSHED;\n\t\t\t\tm_bIsInPallet = true;\n\t\t\t\tm_bIsInBar = false;\n\n\t\t\t\tUpdateBarData();\n\t\t\t}\n\t\t\t//::PtInRect(&m_rcItem, event.ptMouse)\n\t\t\tif (event.ptMouse.x >= m_rcItem.left && event.ptMouse.y >= m_rcItem.bottom - m_nBarHeight &&\n\t\t\t\tevent.ptMouse.x < m_rcItem.right && event.ptMouse.y < m_rcItem.bottom)\n\t\t\t{\n\t\t\t\tm_nCurS = (event.ptMouse.x - m_rcItem.left) * 200 / (m_rcItem.right - m_rcItem.left);\n\t\t\t\tm_uButtonState |= UISTATE_PUSHED;\n\t\t\t\tm_bIsInBar = true;\n\t\t\t\tm_bIsInPallet = false;\n\t\t\t\tUpdatePalletData();\n\t\t\t}\n\n\t\t\tInvalidate();\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_BUTTONUP)\n\t\t{\n\t\t\tDWORD color=0;\n\t\t\tif ((m_uButtonState | UISTATE_PUSHED) && (IsEnabled()))\n\t\t\t{\n\t\t\t\tcolor = GetSelectColor();\n\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_COLORCHANGED, color, 0);\n\t\t\t}\n\n\t\t\tm_uButtonState &= ~UISTATE_PUSHED;\n\t\t\tm_bIsInPallet = false;\n\t\t\tm_bIsInBar = false;\n\n\t\t\tInvalidate();\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_MOUSEMOVE)\n\t\t{\n\n\t\t\tif (!(m_uButtonState &UISTATE_PUSHED))\n\t\t\t{\n\t\t\t\tm_bIsInBar = false;\n\t\t\t\tm_bIsInPallet = false;\n\t\t\t}\n\t\t\tif (m_bIsInPallet == true)\n\t\t\t{\n\t\t\t\tPOINT pt = event.ptMouse;\n\t\t\t\tpt.x -= m_rcItem.left;\n\t\t\t\tpt.y -= m_rcItem.top;\n\n\t\t\t\tif (pt.x >= 0 && pt.y >= 0 && pt.x <= m_rcItem.right && pt.y <= m_rcItem.top + m_nPalletHeight)\n\t\t\t\t{\n\t\t\t\t\tint x = pt.x * 360 / (m_rcItem.right - m_rcItem.left);\n\t\t\t\t\tint y = pt.y * 200 / m_nPalletHeight;\n\t\t\t\t\tx = min(max(x, 0), 360);\n\t\t\t\t\ty = min(max(y, 0), 200);\n\n\t\t\t\t\tm_ptLastPalletMouse = event.ptMouse;\n\t\t\t\t\tif (m_ptLastPalletMouse.x < m_rcItem.left) m_ptLastPalletMouse.x = m_rcItem.left;\n\t\t\t\t\tif (m_ptLastPalletMouse.x > m_rcItem.right) m_ptLastPalletMouse.x = m_rcItem.right;\n\t\t\t\t\tif (m_ptLastPalletMouse.y < m_rcItem.top) m_ptLastPalletMouse.y = m_rcItem.top;\n\t\t\t\t\tif (m_ptLastPalletMouse.y > m_rcItem.top + m_nPalletHeight) m_ptLastPalletMouse.y = m_rcItem.top + m_nPalletHeight;\n\n\n\t\t\t\t\tm_nCurH = x;\n\t\t\t\t\tm_nCurB = 200 - y;\n\n\t\t\t\t\tUpdateBarData();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (m_bIsInBar == true)\n\t\t\t{\n\t\t\t\tm_nCurS = (event.ptMouse.x - m_rcItem.left) * 200 / (m_rcItem.right - m_rcItem.left);\n\t\t\t\tm_nCurS = min(max(m_nCurS, 0), 200);\n\n\t\t\t\tUpdatePalletData();\n\t\t\t}\n\n\t\t\tInvalidate();\n\t\t\treturn;\n\t\t}\n\n\t}\n\n\tvoid CColorPaletteUI::DoPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\tCControlUI::DoPaint(hDC, rcPaint);\n\t\tif (!::IntersectRect(&m_rcPaint, &rcPaint, &m_rcItem)) return;\n\n\t\tPaintPallet(hDC);\n\t}\n\n\tvoid CColorPaletteUI::PaintPallet(HDC hDC)\n\t{\n\t\tint nSaveDC = ::SaveDC(hDC);\n\n\t\t//\n\t\tHRGN hClip1 = ::CreateRectRgn(m_rcItem.left, m_rcItem.top, m_rcItem.right, m_rcItem.top + m_nPalletHeight);\n\t\tHRGN hClip2 = ::CreateRectRgn(m_rcItem.left, m_rcItem.bottom - m_nBarHeight, m_rcItem.right, m_rcItem.bottom);\n\t\t::CombineRgn(hClip1, hClip1, hClip2, RGN_OR);\n\t\t::SelectClipRgn(hDC, hClip1);\n\t\t::DeleteObject(hClip1);\n\t\t::DeleteObject(hClip2);\n\n\t\t::SetStretchBltMode(hDC, HALFTONE);\n\t\t//ģʽڴͼؼ\n\n\t\tStretchBlt(hDC, m_rcItem.left, m_rcItem.top, m_rcItem.right - m_rcItem.left, m_nPalletHeight, m_MemDc, 0, 0, 360, 199, SRCCOPY);\n\t\tStretchBlt(hDC, m_rcItem.left, m_rcItem.bottom - m_nBarHeight, m_rcItem.right - m_rcItem.left, m_nBarHeight, m_MemDc, 0, 210, 200, m_nBarHeight, SRCCOPY);\n\n\t\tRECT rcCurSorPaint = { m_ptLastPalletMouse.x - 4, m_ptLastPalletMouse.y - 4, m_ptLastPalletMouse.x + 4, m_ptLastPalletMouse.y + 4 };\n\t\tCRenderEngine::DrawImageString(hDC, m_pManager, rcCurSorPaint, m_rcPaint, m_strThumbImage);\n\n\t\trcCurSorPaint.left = m_rcItem.left + m_nCurS * (m_rcItem.right - m_rcItem.left) / 200 - 4;\n\t\trcCurSorPaint.right = m_rcItem.left + m_nCurS * (m_rcItem.right - m_rcItem.left) / 200 + 4;\n\t\trcCurSorPaint.top = m_rcItem.bottom - m_nBarHeight / 2 - 4;\n\t\trcCurSorPaint.bottom = m_rcItem.bottom - m_nBarHeight / 2 + 4;\n\t\tCRenderEngine::DrawImageString(hDC, m_pManager, rcCurSorPaint, m_rcPaint, m_strThumbImage);\n\t\t::RestoreDC(hDC, nSaveDC);\n\t}\n\n\tvoid CColorPaletteUI::UpdatePalletData()\n\t{\n\t\tint x, y;\n\t\tBYTE *pPiexl;\n\t\tDWORD dwColor;\n\t\tfor (y = 0; y < 200; ++y) {\n\t\t\tfor (x = 0; x < 360; ++x) {\n\t\t\t\tpPiexl = LPBYTE(m_pBits) + ((199 - y)*m_bmInfo.bmWidthBytes) + ((x*m_bmInfo.bmBitsPixel) / 8);\n\t\t\t\t//*(DWORD*)pPiexl = HSLTORGB(x, m_nCurS, y);\n\t\t\t\tdwColor = _HSLToRGB(x, m_nCurS, y);\n\t\t\t\tpPiexl[0] = GetBValue(dwColor);\n\t\t\t\tpPiexl[1] = GetGValue(dwColor);\n\t\t\t\tpPiexl[2] = GetRValue(dwColor);\n\t\t\t}\n\t\t}\n\n\t\tSetBitmapBits(m_hMemBitmap, m_bmInfo.bmWidthBytes * m_bmInfo.bmHeight, m_pBits);\n\t}\n\n\n\tvoid CColorPaletteUI::UpdateBarData()\n\t{\n\t\tint x, y;\n\t\tBYTE *pPiexl;\n\t\tDWORD dwColor;\n\t\t//ﻭBar\n\t\tfor (y = 0; y < m_nBarHeight; ++y) {\n\t\t\tfor (x = 0; x < 200; ++x) {\n\t\t\t\tpPiexl = LPBYTE(m_pBits) + ((210 + y)*m_bmInfo.bmWidthBytes) + ((x*m_bmInfo.bmBitsPixel) / 8);\n\t\t\t\t//*(DWORD*)pPiexl = _HSLToRGB(m_nCurH, x , m_nCurB);\n\t\t\t\tdwColor = _HSLToRGB(m_nCurH, x, m_nCurB);\n\t\t\t\tpPiexl[0] = GetBValue(dwColor);\n\t\t\t\tpPiexl[1] = GetGValue(dwColor);\n\t\t\t\tpPiexl[2] = GetRValue(dwColor);\n\t\t\t}\n\t\t}\n\n\t\tSetBitmapBits(m_hMemBitmap, m_bmInfo.bmWidthBytes * m_bmInfo.bmHeight, m_pBits);\n\t}\n\n}"
  },
  {
    "path": "DuiLib/Control/UIColorPalette.h",
    "content": "/*********************************************************************\n*  ΪduilibĶ̬ɫؼȫģ¿ṷQQĵɫ幦\n*  ʹHSBģʽԼоһ㷨ƽ\n*  ɫԴģ³ṷɫʽǻв\n*  λ֪õ㷨ƵĴ룬ߴ˴bugϵ\n*  By:Redrain  QQ491646717   2014.8.19\n*  Ƶ󣬿޸\n*  thumbimageָѡɫĹزĵλãزҸӵѹУԼ޸\n*  sample:<ColorPalette name=\"Pallet\" width=\"506\" height=\"220\" palletheight=\"200\" barheight=\"14\" padding=\"8,5,0,0\" bkcolor=\"#FFFFFFFF\" thumbimage=\"UI\\skin\\cursor.png\" />\n*\n*  ģԭĴѡ֮±дģ޸㷨˶̬ɫܣֽ֮һbugٴθл֮Ĵ\n*********************************************************************/\n\n\n#ifndef UI_PALLET_H\n#define UI_PALLET_H\n#pragma once\n\nnamespace DuiLib {\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\t//const TCHAR kPalletClassName[] = _T(\"ColorPaletteUI\");\n\t//const TCHAR kPalletInterface[] = _T(\"ColorPalette\");\n\n\tclass UILIB_API CColorPaletteUI : public CControlUI\n\t{\n\tpublic:\n\t\tCColorPaletteUI();\n\t\tvirtual ~CColorPaletteUI();\n\n\t\t//ȡձѡɫֱduilibɫ\n\t\tDWORD GetSelectColor();\n\t\tvoid SetSelectColor(DWORD dwColor);\n\n\t\tvirtual LPCTSTR GetClass() const;\n\t\tvirtual LPVOID GetInterface(LPCTSTR pstrName);\n\t\tvirtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\t///ȡ Palletɫ棩ĸ߶\n\t\tvoid SetPalletHeight(int nHeight);\n\t\tint\tGetPalletHeight() const;\n\n\t\t///ȡ ·Barѡĸ߶\n\t\tvoid SetBarHeight(int nHeight);\n\t\tint GetBarHeight() const;\n\t\t///ȡ ѡͼ·\n\t\tvoid SetThumbImage(LPCTSTR pszImage);\n\t\tLPCTSTR GetThumbImage() const;\n\n\t\tvirtual void SetPos(RECT rc);\n\t\tvirtual void DoInit();\n\t\tvirtual void DoEvent(TEventUI& event);\n\t\tvirtual void DoPaint(HDC hDC, const RECT& rcPaint);\n\t\tvirtual void PaintPallet(HDC hDC);\n\n\tprotected:\n\t\t//\n\t\tvoid UpdatePalletData();\n\t\tvoid UpdateBarData();\n\n\tprivate:\n\t\tHDC\t\t\tm_MemDc;\n\t\tHBITMAP\t\tm_hMemBitmap;\n\t\tBITMAP\t\tm_bmInfo;\n\t\tBYTE\t\t*m_pBits;\n\t\tUINT\t\tm_uButtonState;\n\t\tbool\t\tm_bIsInBar;\n\t\tbool\t\tm_bIsInPallet;\n\t\tint\t\t\tm_nCurH;\n\t\tint\t\t\tm_nCurS;\n\t\tint\t\t\tm_nCurB;\n\n\t\tint\t\t\tm_nPalletHeight;\n\t\tint\t\t\tm_nBarHeight;\n\t\tCPoint\t\tm_ptLastPalletMouse;\n\t\tCPoint\t\tm_ptLastBarMouse;\n\t\tCDuiString  m_strThumbImage;\n\t};\n\n\n}\n\n#endif // UI_PALLET_H"
  },
  {
    "path": "DuiLib/Control/UICombo.cpp",
    "content": "#include \"StdAfx.h\"\n\nnamespace DuiLib {\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tclass CComboWnd : public CWindowWnd\n\t{\n\tpublic:\n\t\tvoid Init(CComboUI* pOwner);\n\t\tLPCTSTR GetWindowClassName() const;\n\t\tvoid OnFinalMessage(HWND hWnd);\n\n\t\tLRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);\n\n\t\tvoid EnsureVisible(int iIndex);\n\t\tvoid Scroll(int dx, int dy);\n\n#if(_WIN32_WINNT >= 0x0501)\n\t\tvirtual UINT GetClassStyle() const;\n#endif\n\n\tpublic:\n\t\tCPaintManagerUI m_pm;\n\t\tCComboUI* m_pOwner;\n\t\tCVerticalLayoutUI* m_pLayout;\n\t\tint m_iOldSel;\n\t};\n\n\n\tvoid CComboWnd::Init(CComboUI* pOwner)\n\t{\n\t\tm_pOwner = pOwner;\n\t\tm_pLayout = NULL;\n\t\tm_iOldSel = m_pOwner->GetCurSel();\n\n\t\t// Position the popup window in absolute space\n\t\tSIZE szDrop = m_pOwner->GetDropBoxSize();\n\t\tRECT rcOwner = pOwner->GetPos();\n\t\tRECT rc = rcOwner;\n\t\trc.top = rc.bottom;\t\t// leftbottomλΪ\n\t\trc.bottom = rc.top + szDrop.cy;\t// 㵯ڸ߶\n\t\tif( szDrop.cx > 0 ) rc.right = rc.left + szDrop.cx;\t// 㵯ڿ\n\n\t\tSIZE szAvailable = { rc.right - rc.left, rc.bottom - rc.top };\n\t\tint cyFixed = 0;\n\t\tfor( int it = 0; it < pOwner->GetCount(); it++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(pOwner->GetItemAt(it));\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tSIZE sz = pControl->EstimateSize(szAvailable);\n\t\t\tcyFixed += sz.cy;\n\t\t}\n\t\tcyFixed += 4; // CVerticalLayoutUI ĬϵInset \n\t\trc.bottom = rc.top + MIN(cyFixed, szDrop.cy);\n\n\t\t::MapWindowRect(pOwner->GetManager()->GetPaintWindow(), HWND_DESKTOP, &rc);\n\n\t\tMONITORINFO oMonitor = {};\n\t\toMonitor.cbSize = sizeof(oMonitor);\n\t\t::GetMonitorInfo(::MonitorFromWindow(*this, MONITOR_DEFAULTTOPRIMARY), &oMonitor);\n\t\tCDuiRect rcWork = oMonitor.rcWork;\n\t\tif( rc.bottom > rcWork.bottom ) {\n\t\t\trc.left = rcOwner.left;\n\t\t\trc.right = rcOwner.right;\n\t\t\tif( szDrop.cx > 0 ) rc.right = rc.left + szDrop.cx;\n\t\t\trc.top = rcOwner.top - MIN(cyFixed, szDrop.cy);\n\t\t\trc.bottom = rcOwner.top;\n\t\t\t::MapWindowRect(pOwner->GetManager()->GetPaintWindow(), HWND_DESKTOP, &rc);\n\t\t}\n\n\t\tCreate(pOwner->GetManager()->GetPaintWindow(), NULL, WS_POPUP, WS_EX_TOOLWINDOW, rc);\n\t\t// HACK: Don't deselect the parent's caption\n\t\tHWND hWndParent = m_hWnd;\n\t\twhile( ::GetParent(hWndParent) != NULL ) hWndParent = ::GetParent(hWndParent);\n\t\t::ShowWindow(m_hWnd, SW_SHOW);\n\t\t::SendMessage(hWndParent, WM_NCACTIVATE, TRUE, 0L);\n\n\t\tEnsureVisible(m_iOldSel);  \n\n\t}\n\n\tLPCTSTR CComboWnd::GetWindowClassName() const\n\t{\n\t\treturn _T(\"ComboWnd\");\n\t}\n\n\tvoid CComboWnd::OnFinalMessage(HWND hWnd)\n\t{\n\t\tm_pOwner->m_pWindow = NULL;\n\t\tm_pOwner->m_uButtonState &= ~ UISTATE_PUSHED;\n\t\tm_pOwner->Invalidate();\n\t\tdelete this;\n\t}\n\n\tLRESULT CComboWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)\n\t{\n\t\tif( uMsg == WM_CREATE ) {\n\t\t\tm_pm.Init(m_hWnd);\n\t\t\t// The trick is to add the items to the new container. Their owner gets\n\t\t\t// reassigned by this operation - which is why it is important to reassign\n\t\t\t// the items back to the righfull owner/manager when the window closes.\n\t\t\tm_pLayout = new CVerticalLayoutUI;\n\t\t\tm_pm.UseParentResource(m_pOwner->GetManager());\n\t\t\tm_pLayout->SetManager(&m_pm, NULL, true);\n\t\t\tLPCTSTR pDefaultAttributes = m_pOwner->GetManager()->GetDefaultAttributeList(_T(\"VerticalLayout\"));\n\t\t\tif( pDefaultAttributes ) {\n\t\t\t\tm_pLayout->ApplyAttributeList(pDefaultAttributes);\n\t\t\t}\n\t\t\tm_pLayout->SetInset(CDuiRect(1, 1, 1, 1));\n\t\t\tm_pLayout->SetBkColor(0xFFFFFFFF);\n\t\t\tm_pLayout->SetBorderColor(0xFFC6C7D2);\n\t\t\tm_pLayout->SetBorderSize(1);\n\t\t\tm_pLayout->SetAutoDestroy(false);\n\t\t\tm_pLayout->EnableScrollBarEx(true,CContainerUI::ScrollType::EVSCROLL);\n\t\t\tm_pLayout->ApplyAttributeList(m_pOwner->GetDropBoxAttributeList());\n\t\t\tfor( int i = 0; i < m_pOwner->GetCount(); i++ ) {\n\t\t\t\tm_pLayout->Add(static_cast<CControlUI*>(m_pOwner->GetItemAt(i)));\n\t\t\t}\n\t\t\tm_pm.AttachDialog(m_pLayout);\n\n\t\t\treturn 0;\n\t\t}\n\t\telse if( uMsg == WM_CLOSE ) {\n\t\t\tm_pOwner->SetManager(m_pOwner->GetManager(), m_pOwner->GetParent(), false);\n\t\t\tm_pOwner->SetPos(m_pOwner->GetPos());\n\t\t\tm_pOwner->SetFocus();\n\t\t}\n\t\telse if( uMsg == WM_LBUTTONUP ) {\n\t\t\tPOINT pt = { 0 };\n\t\t\t::GetCursorPos(&pt);\n\t\t\t::ScreenToClient(m_pm.GetPaintWindow(), &pt);\n\t\t\tCControlUI* pControl = m_pm.FindControl(pt);\n\t\t\tif( pControl && _tcscmp(pControl->GetClass(), _T(\"ScrollBarUI\")) != 0 ) PostMessage(WM_KILLFOCUS);\n\t\t}\n\t\telse if( uMsg == WM_KEYDOWN ) {\n\t\t\tswitch( wParam ) {\n\t\t\tcase VK_ESCAPE:\n\t\t\t\tm_pOwner->SelectItem(m_iOldSel, true);\n\t\t\t\tEnsureVisible(m_iOldSel);\n\t\t\t\t// FALL THROUGH...\n\t\t\tcase VK_RETURN:\n\t\t\t\tPostMessage(WM_KILLFOCUS);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tTEventUI event;\n\t\t\t\tevent.Type = UIEVENT_KEYDOWN;\n\t\t\t\tevent.chKey = (TCHAR)wParam;\n\t\t\t\tm_pOwner->DoEvent(event);\n\t\t\t\tEnsureVisible(m_pOwner->GetCurSel());\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\telse if( uMsg == WM_MOUSEWHEEL ) {\n\t\t\tint zDelta = (int) (short) HIWORD(wParam);\n\t\t\tTEventUI event = { 0 };\n\t\t\tevent.Type = UIEVENT_SCROLLWHEEL;\n\t\t\tevent.wParam = MAKELPARAM(zDelta < 0 ? SB_LINEDOWN : SB_LINEUP, 0);\n\t\t\tevent.lParam = lParam;\n\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\tm_pOwner->DoEvent(event);\n\t\t\tEnsureVisible(m_pOwner->GetCurSel());\n\t\t\treturn 0;\n\t\t}\n\t\telse if( uMsg == WM_KILLFOCUS ) {\n\t\t\tif( m_hWnd != (HWND) wParam ) PostMessage(WM_CLOSE);\n\t\t}\n\n\t\tLRESULT lRes = 0;\n\t\tif( m_pm.MessageHandler(uMsg, wParam, lParam, lRes) ) return lRes;\n\t\treturn CWindowWnd::HandleMessage(uMsg, wParam, lParam);\n\t}\n\n\tvoid CComboWnd::EnsureVisible(int iIndex)\n\t{\n\t\tif( m_pOwner->GetCurSel() < 0 ) return;\n\t\tm_pLayout->FindSelectable(m_pOwner->GetCurSel(), false);\n\t\tRECT rcItem = m_pLayout->GetItemAt(iIndex)->GetPos();\n\t\tRECT rcList = m_pLayout->GetPos();\n\t\tCScrollBarUI* pHorizontalScrollBar = m_pLayout->GetHorizontalScrollBar();\n\t\tif( pHorizontalScrollBar && pHorizontalScrollBar->IsVisible() ) rcList.bottom -= pHorizontalScrollBar->GetFixedHeight();\n\t\tint iPos = m_pLayout->GetScrollPos().cy;\n\t\tif( rcItem.top >= rcList.top && rcItem.bottom < rcList.bottom ) return;\n\t\tint dx = 0;\n\t\tif( rcItem.top < rcList.top ) dx = rcItem.top - rcList.top;\n\t\tif( rcItem.bottom > rcList.bottom ) dx = rcItem.bottom - rcList.bottom;\n\t\tScroll(0, dx);\n\t}\n\n\tvoid CComboWnd::Scroll(int dx, int dy)\n\t{\n\t\tif( dx == 0 && dy == 0 ) return;\n\t\tSIZE sz = m_pLayout->GetScrollPos();\n\t\tm_pLayout->SetScrollPos(CSize(sz.cx + dx, sz.cy + dy));\n\t}\n\n#if(_WIN32_WINNT >= 0x0501)\n\tUINT CComboWnd::GetClassStyle() const\n\t{\n\t\treturn __super::GetClassStyle() | CS_DROPSHADOW;\n\t}\n#endif\n\t////////////////////////////////////////////////////////\n\n\n\tCComboUI::CComboUI() : m_pWindow(NULL), m_iCurSel(-1), m_uButtonState(0)\n\t{\n\t\tm_szDropBox = CSize(0, 150);\n\t\t::ZeroMemory(&m_rcTextPadding, sizeof(m_rcTextPadding));\n\n\t\tm_ListInfo.nColumns = 0;\n\t\tm_ListInfo.nFont = -1;\n\t\tm_ListInfo.m_uItemTextStyle = DT_VCENTER;\n\t\tm_ListInfo.dwTextColor = 0xFF000000;\n\t\tm_ListInfo.dwBkColor = 0;\n\t\tm_ListInfo.bAlternateBk = false;\n\t\tm_ListInfo.dwSelectedTextColor = 0xFF000000;\n\t\tm_ListInfo.dwSelectedBkColor = 0xFFC1E3FF;\n\t\tm_ListInfo.dwHotTextColor = 0xFF000000;\n\t\tm_ListInfo.dwHotBkColor = 0xFFE9F5FF;\n\t\tm_ListInfo.dwDisabledTextColor = 0xFFCCCCCC;\n\t\tm_ListInfo.dwDisabledBkColor = 0xFFFFFFFF;\n\t\tm_ListInfo.dwLineColor = 0;\n\t\tm_ListInfo.bShowHtml = false;\n\t\tm_ListInfo.bMultiExpandable = false;\n\t\t::ZeroMemory(&m_ListInfo.rcTextPadding, sizeof(m_ListInfo.rcTextPadding));\n\t\t::ZeroMemory(&m_ListInfo.rcColumn, sizeof(m_ListInfo.rcColumn));\n\t}\n\n\tLPCTSTR CComboUI::GetClass() const\n\t{\n\t\treturn _T(\"ComboUI\");\n\t}\n\n\tLPVOID CComboUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_COMBO) == 0 ) return static_cast<CComboUI*>(this);\n\t\tif( _tcscmp(pstrName, _T(\"IListOwner\")) == 0 ) return static_cast<IListOwnerUI*>(this);\n\t\treturn CContainerUI::GetInterface(pstrName);\n\t}\n\n\tUINT CComboUI::GetControlFlags() const\n\t{\n\t\treturn UIFLAG_TABSTOP;\n\t}\n\n\tvoid CComboUI::DoInit()\n\t{\n\t}\n\n\tint CComboUI::GetCurSel() const\n\t{\n\t\treturn m_iCurSel;\n\t}\n\n\tbool CComboUI::SelectItem(int iIndex, bool bTakeFocus)\n\t{\n\t\t//if( m_pWindow != NULL ) m_pWindow->Close();\n\t\tif( iIndex == m_iCurSel ) return true;\n\t\tint iOldSel = m_iCurSel;\n\t\tif( m_iCurSel >= 0 ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[m_iCurSel]);\n\t\t\tif( !pControl ) return false;\n\t\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pListItem != NULL ) pListItem->Select(false);\n\t\t\tm_iCurSel = -1;\n\t\t}\n\t\tif( iIndex < 0 ) return false;\n\t\tif( m_items.GetSize() == 0 ) return false;\n\t\tif( iIndex >= m_items.GetSize() ) iIndex = m_items.GetSize() - 1;\n\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[iIndex]);\n\t\tif( !pControl || !pControl->IsVisible() || !pControl->IsEnabled() ) return false;\n\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\tif( pListItem == NULL ) return false;\n\t\tm_iCurSel = iIndex;\n\t\tif( m_pWindow != NULL || bTakeFocus ) pControl->SetFocus();\n\t\tpListItem->Select(true);\n\t\tif( m_pManager != NULL ) m_pManager->SendNotify(this, DUI_MSGTYPE_ITEMSELECT, m_iCurSel, iOldSel);\n\t\tInvalidate();\n\n\t\treturn true;\n\t}\n\n\tbool CComboUI::SetItemIndex(CControlUI* pControl, int iIndex)\n\t{\n\t\tint iOrginIndex = GetItemIndex(pControl);\n\t\tif( iOrginIndex == -1 ) return false;\n\t\tif( iOrginIndex == iIndex ) return true;\n\n\t\tIListItemUI* pSelectedListItem = NULL;\n\t\tif( m_iCurSel >= 0 ) pSelectedListItem = \n\t\t\tstatic_cast<IListItemUI*>(GetItemAt(m_iCurSel)->GetInterface(_T(\"ListItem\")));\n\t\tif( !CContainerUI::SetItemIndex(pControl, iIndex) ) return false;\n\t\tint iMinIndex = min(iOrginIndex, iIndex);\n\t\tint iMaxIndex = max(iOrginIndex, iIndex);\n\t\tfor(int i = iMinIndex; i < iMaxIndex + 1; ++i) {\n\t\t\tCControlUI* p = GetItemAt(i);\n\t\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(p->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pListItem != NULL ) {\n\t\t\t\tpListItem->SetIndex(i);\n\t\t\t}\n\t\t}\n\t\tif( m_iCurSel >= 0 && pSelectedListItem != NULL ) m_iCurSel = pSelectedListItem->GetIndex();\n\t\treturn true;\n\t}\n\n\tbool CComboUI::Add(CControlUI* pControl)\n\t{\n\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\tif( pListItem != NULL ) \n\t\t{\n\t\t\tpListItem->SetOwner(this);\n\t\t\tpListItem->SetIndex(m_items.GetSize());\n\t\t}\n\t\treturn CContainerUI::Add(pControl);\n\t}\n\n\tbool CComboUI::AddAt(CControlUI* pControl, int iIndex)\n\t{\n\t\tif (!CContainerUI::AddAt(pControl, iIndex)) return false;\n\n\t\t// The list items should know about us\n\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\tif( pListItem != NULL ) {\n\t\t\tpListItem->SetOwner(this);\n\t\t\tpListItem->SetIndex(iIndex);\n\t\t}\n\n\t\tfor(int i = iIndex + 1; i < GetCount(); ++i) {\n\t\t\tCControlUI* p = GetItemAt(i);\n\t\t\tpListItem = static_cast<IListItemUI*>(p->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pListItem != NULL ) {\n\t\t\t\tpListItem->SetIndex(i);\n\t\t\t}\n\t\t}\n\t\tif( m_iCurSel >= iIndex ) m_iCurSel += 1;\n\t\treturn true;\n\t}\n\n\tbool CComboUI::Remove(CControlUI* pControl)\n\t{\n\t\tint iIndex = GetItemIndex(pControl);\n\t\tif (iIndex == -1) return false;\n\n\t\tif (!CContainerUI::RemoveAt(iIndex)) return false;\n\n\t\tfor(int i = iIndex; i < GetCount(); ++i) {\n\t\t\tCControlUI* p = GetItemAt(i);\n\t\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(p->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pListItem != NULL ) {\n\t\t\t\tpListItem->SetIndex(i);\n\t\t\t}\n\t\t}\n\n\t\tif( iIndex == m_iCurSel && m_iCurSel >= 0 ) {\n\t\t\tint iSel = m_iCurSel;\n\t\t\tm_iCurSel = -1;\n\t\t\tSelectItem(FindSelectable(iSel, false));\n\t\t}\n\t\telse if( iIndex < m_iCurSel ) m_iCurSel -= 1;\n\t\treturn true;\n\t}\n\n\tbool CComboUI::RemoveAt(int iIndex)\n\t{\n\t\tif (!CContainerUI::RemoveAt(iIndex)) return false;\n\n\t\tfor(int i = iIndex; i < GetCount(); ++i) {\n\t\t\tCControlUI* p = GetItemAt(i);\n\t\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(p->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pListItem != NULL ) pListItem->SetIndex(i);\n\t\t}\n\n\t\tif( iIndex == m_iCurSel && m_iCurSel >= 0 ) {\n\t\t\tint iSel = m_iCurSel;\n\t\t\tm_iCurSel = -1;\n\t\t\tSelectItem(FindSelectable(iSel, false));\n\t\t}\n\t\telse if( iIndex < m_iCurSel ) m_iCurSel -= 1;\n\t\treturn true;\n\t}\n\n\tvoid CComboUI::RemoveAll()\n\t{\n\t\tm_iCurSel = -1;\n\t\tCContainerUI::RemoveAll();\n\t}\n\n\tvoid CComboUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pParent != NULL ) m_pParent->DoEvent(event);\n\t\t\telse CContainerUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_SETFOCUS ) \n\t\t{\n\t\t\tInvalidate();\n\t\t}\n\t\tif( event.Type == UIEVENT_KILLFOCUS ) \n\t\t{\n\t\t\tInvalidate();\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONDOWN )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tActivate();\n\t\t\t\tm_uButtonState |= UISTATE_PUSHED | UISTATE_CAPTURED;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONUP )\n\t\t{\n\t\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\tm_uButtonState &= ~ UISTATE_CAPTURED;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEMOVE )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_KEYDOWN )\n\t\t{\n\t\t\tswitch( event.chKey ) {\n\t\t\tcase VK_F4:\n\t\t\t\tActivate();\n\t\t\t\treturn;\n\t\t\tcase VK_UP:\n\t\t\t\tSelectItem(FindSelectable(m_iCurSel - 1, false));\n\t\t\t\treturn;\n\t\t\tcase VK_DOWN:\n\t\t\t\tSelectItem(FindSelectable(m_iCurSel + 1, true));\n\t\t\t\treturn;\n\t\t\tcase VK_PRIOR:\n\t\t\t\tSelectItem(FindSelectable(m_iCurSel - 1, false));\n\t\t\t\treturn;\n\t\t\tcase VK_NEXT:\n\t\t\t\tSelectItem(FindSelectable(m_iCurSel + 1, true));\n\t\t\t\treturn;\n\t\t\tcase VK_HOME:\n\t\t\t\tSelectItem(FindSelectable(0, false));\n\t\t\t\treturn;\n\t\t\tcase VK_END:\n\t\t\t\tSelectItem(FindSelectable(GetCount() - 1, true));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif( event.Type == UIEVENT_SCROLLWHEEL )\n\t\t{\n\t\t\tbool bDownward = LOWORD(event.wParam) == SB_LINEDOWN;\n\t\t\tSelectItem(FindSelectable(m_iCurSel + (bDownward ? 1 : -1), bDownward));\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_CONTEXTMENU )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEENTER )\n\t\t{\n\t\t\tif( ::PtInRect(&m_rcItem, event.ptMouse ) ) {\n\t\t\t\tif( (m_uButtonState & UISTATE_HOT) == 0  )\n\t\t\t\t\tm_uButtonState |= UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSELEAVE )\n\t\t{\n\t\t\tif( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\t\tm_uButtonState &= ~UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tCControlUI::DoEvent(event);\n\t}\n\n\tSIZE CComboUI::EstimateSize(SIZE szAvailable)\n\t{\n\t\tif( m_cxyFixed.cy == 0 ) return CSize(m_cxyFixed.cx, m_pManager->GetDefaultFontInfo()->tm.tmHeight + 12);\n\t\treturn CControlUI::EstimateSize(szAvailable);\n\t}\n\n\tbool CComboUI::Activate()\n\t{\n\t\tif( !CControlUI::Activate() ) return false;\n\t\tif( m_pWindow ) return true;\n\t\tm_pWindow = new CComboWnd();\n\t\tASSERT(m_pWindow);\n\t\tm_pWindow->Init(this);\n\t\tif( m_pManager != NULL ) m_pManager->SendNotify(this, DUI_MSGTYPE_DROPDOWN);\n\t\tInvalidate();\n\t\treturn true;\n\t}\n\n\tCDuiString CComboUI::GetText() const\n\t{\n\t\tif( m_iCurSel < 0 ) return _T(\"\");\n\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[m_iCurSel]);\n\t\treturn pControl->GetText();\n\t}\n\n\tvoid CComboUI::SetEnabled(bool bEnable)\n\t{\n\t\tCContainerUI::SetEnabled(bEnable);\n\t\tif( !IsEnabled() ) m_uButtonState = 0;\n\t}\n\n\tCDuiString CComboUI::GetDropBoxAttributeList()\n\t{\n\t\treturn m_sDropBoxAttributes;\n\t}\n\n\tvoid CComboUI::SetDropBoxAttributeList(LPCTSTR pstrList)\n\t{\n\t\tm_sDropBoxAttributes = pstrList;\n\t}\n\n\tSIZE CComboUI::GetDropBoxSize() const\n\t{\n\t\treturn m_szDropBox;\n\t}\n\n\tvoid CComboUI::SetDropBoxSize(SIZE szDropBox)\n\t{\n\t\tm_szDropBox = szDropBox;\n\t}\n\n\tRECT CComboUI::GetTextPadding() const\n\t{\n\t\treturn m_rcTextPadding;\n\t}\n\n\tvoid CComboUI::SetTextPadding(RECT rc)\n\t{\n\t\tm_rcTextPadding = rc;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CComboUI::GetNormalImage() const\n\t{\n\t\treturn m_sNormalImage;\n\t}\n\n\tvoid CComboUI::SetNormalImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sNormalImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CComboUI::GetHotImage() const\n\t{\n\t\treturn m_sHotImage;\n\t}\n\n\tvoid CComboUI::SetHotImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sHotImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CComboUI::GetPushedImage() const\n\t{\n\t\treturn m_sPushedImage;\n\t}\n\n\tvoid CComboUI::SetPushedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sPushedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CComboUI::GetFocusedImage() const\n\t{\n\t\treturn m_sFocusedImage;\n\t}\n\n\tvoid CComboUI::SetFocusedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sFocusedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CComboUI::GetDisabledImage() const\n\t{\n\t\treturn m_sDisabledImage;\n\t}\n\n\tvoid CComboUI::SetDisabledImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sDisabledImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tTListInfoUI* CComboUI::GetListInfo()\n\t{\n\t\treturn &m_ListInfo;\n\t}\n\n\tvoid CComboUI::SetItemFont(int index)\n\t{\n\t\tm_ListInfo.nFont = index;\n\t\tInvalidate();\n\t}\n\n\tvoid CComboUI::SetItemTextStyle(UINT uStyle)\n\t{\n\t\tm_ListInfo.m_uItemTextStyle = uStyle;\n\t\tInvalidate();\n\t}\n\n\tRECT CComboUI::GetItemTextPadding() const\n\t{\n\t\treturn m_ListInfo.rcTextPadding;\n\t}\n\n\tvoid CComboUI::SetItemTextPadding(RECT rc)\n\t{\n\t\tm_ListInfo.rcTextPadding = rc;\n\t\tInvalidate();\n\t}\n\n\tvoid CComboUI::SetItemTextColor(DWORD dwTextColor)\n\t{\n\t\tm_ListInfo.dwTextColor = dwTextColor;\n\t\tInvalidate();\n\t}\n\n\tvoid CComboUI::SetItemBkColor(DWORD dwBkColor)\n\t{\n\t\tm_ListInfo.dwBkColor = dwBkColor;\n\t}\n\n\tvoid CComboUI::SetItemBkImage(LPCTSTR pStrImage)\n\t{\n\t\tm_ListInfo.sBkImage = pStrImage;\n\t}\n\n\tDWORD CComboUI::GetItemTextColor() const\n\t{\n\t\treturn m_ListInfo.dwTextColor;\n\t}\n\n\tDWORD CComboUI::GetItemBkColor() const\n\t{\n\t\treturn m_ListInfo.dwBkColor;\n\t}\n\n\tLPCTSTR CComboUI::GetItemBkImage() const\n\t{\n\t\treturn m_ListInfo.sBkImage;\n\t}\n\n\tbool CComboUI::IsAlternateBk() const\n\t{\n\t\treturn m_ListInfo.bAlternateBk;\n\t}\n\n\tvoid CComboUI::SetAlternateBk(bool bAlternateBk)\n\t{\n\t\tm_ListInfo.bAlternateBk = bAlternateBk;\n\t}\n\n\tvoid CComboUI::SetSelectedItemTextColor(DWORD dwTextColor)\n\t{\n\t\tm_ListInfo.dwSelectedTextColor = dwTextColor;\n\t}\n\n\tvoid CComboUI::SetSelectedItemBkColor(DWORD dwBkColor)\n\t{\n\t\tm_ListInfo.dwSelectedBkColor = dwBkColor;\n\t}\n\n\tvoid CComboUI::SetSelectedItemImage(LPCTSTR pStrImage)\n\t{\n\t\tm_ListInfo.sSelectedImage = pStrImage;\n\t}\n\n\tDWORD CComboUI::GetSelectedItemTextColor() const\n\t{\n\t\treturn m_ListInfo.dwSelectedTextColor;\n\t}\n\n\tDWORD CComboUI::GetSelectedItemBkColor() const\n\t{\n\t\treturn m_ListInfo.dwSelectedBkColor;\n\t}\n\n\tLPCTSTR CComboUI::GetSelectedItemImage() const\n\t{\n\t\treturn m_ListInfo.sSelectedImage;\n\t}\n\n\tvoid CComboUI::SetHotItemTextColor(DWORD dwTextColor)\n\t{\n\t\tm_ListInfo.dwHotTextColor = dwTextColor;\n\t}\n\n\tvoid CComboUI::SetHotItemBkColor(DWORD dwBkColor)\n\t{\n\t\tm_ListInfo.dwHotBkColor = dwBkColor;\n\t}\n\n\tvoid CComboUI::SetHotItemImage(LPCTSTR pStrImage)\n\t{\n\t\tm_ListInfo.sHotImage = pStrImage;\n\t}\n\n\tDWORD CComboUI::GetHotItemTextColor() const\n\t{\n\t\treturn m_ListInfo.dwHotTextColor;\n\t}\n\tDWORD CComboUI::GetHotItemBkColor() const\n\t{\n\t\treturn m_ListInfo.dwHotBkColor;\n\t}\n\n\tLPCTSTR CComboUI::GetHotItemImage() const\n\t{\n\t\treturn m_ListInfo.sHotImage;\n\t}\n\n\tvoid CComboUI::SetDisabledItemTextColor(DWORD dwTextColor)\n\t{\n\t\tm_ListInfo.dwDisabledTextColor = dwTextColor;\n\t}\n\n\tvoid CComboUI::SetDisabledItemBkColor(DWORD dwBkColor)\n\t{\n\t\tm_ListInfo.dwDisabledBkColor = dwBkColor;\n\t}\n\n\tvoid CComboUI::SetDisabledItemImage(LPCTSTR pStrImage)\n\t{\n\t\tm_ListInfo.sDisabledImage = pStrImage;\n\t}\n\n\tDWORD CComboUI::GetDisabledItemTextColor() const\n\t{\n\t\treturn m_ListInfo.dwDisabledTextColor;\n\t}\n\n\tDWORD CComboUI::GetDisabledItemBkColor() const\n\t{\n\t\treturn m_ListInfo.dwDisabledBkColor;\n\t}\n\n\tLPCTSTR CComboUI::GetDisabledItemImage() const\n\t{\n\t\treturn m_ListInfo.sDisabledImage;\n\t}\n\n\tDWORD CComboUI::GetItemLineColor() const\n\t{\n\t\treturn m_ListInfo.dwLineColor;\n\t}\n\n\tvoid CComboUI::SetItemLineColor(DWORD dwLineColor)\n\t{\n\t\tm_ListInfo.dwLineColor = dwLineColor;\n\t}\n\n\tbool CComboUI::IsItemShowHtml()\n\t{\n\t\treturn m_ListInfo.bShowHtml;\n\t}\n\n\tvoid CComboUI::SetItemShowHtml(bool bShowHtml)\n\t{\n\t\tif( m_ListInfo.bShowHtml == bShowHtml ) return;\n\n\t\tm_ListInfo.bShowHtml = bShowHtml;\n\t\tInvalidate();\n\t}\n\n\tvoid CComboUI::SetPos(RECT rc)\n\t{\n\t\t// Put all elements out of sight\n\t\tRECT rcNull = { 0 };\n\t\tfor( int i = 0; i < m_items.GetSize(); i++ ) static_cast<CControlUI*>(m_items[i])->SetPos(rcNull);\n\t\t// Position this control\n\t\tCControlUI::SetPos(rc);\n\t}\n\n\tvoid CComboUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"textpadding\")) == 0 ) {\n\t\t\tRECT rcTextPadding = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\trcTextPadding.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcTextPadding.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\trcTextPadding.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcTextPadding.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\t\tSetTextPadding(rcTextPadding);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"normalimage\")) == 0 ) SetNormalImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"hotimage\")) == 0 ) SetHotImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"pushedimage\")) == 0 ) SetPushedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"focusedimage\")) == 0 ) SetFocusedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"disabledimage\")) == 0 ) SetDisabledImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"dropbox\")) == 0 ) SetDropBoxAttributeList(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"dropboxsize\")) == 0)\n\t\t{\n\t\t\tSIZE szDropBoxSize = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tszDropBoxSize.cx = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\tszDropBoxSize.cy = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\tSetDropBoxSize(szDropBoxSize);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemfont\")) == 0 ) m_ListInfo.nFont = _ttoi(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"itemalign\")) == 0 ) {\n\t\t\tif( _tcsstr(pstrValue, _T(\"left\")) != NULL ) {\n\t\t\t\tm_ListInfo.m_uItemTextStyle &= ~(DT_CENTER | DT_RIGHT);\n\t\t\t\tm_ListInfo.m_uItemTextStyle |= DT_LEFT;\n\t\t\t}\n\t\t\tif( _tcsstr(pstrValue, _T(\"center\")) != NULL ) {\n\t\t\t\tm_ListInfo.m_uItemTextStyle &= ~(DT_LEFT | DT_RIGHT);\n\t\t\t\tm_ListInfo.m_uItemTextStyle |= DT_CENTER;\n\t\t\t}\n\t\t\tif( _tcsstr(pstrValue, _T(\"right\")) != NULL ) {\n\t\t\t\tm_ListInfo.m_uItemTextStyle &= ~(DT_LEFT | DT_CENTER);\n\t\t\t\tm_ListInfo.m_uItemTextStyle |= DT_RIGHT;\n\t\t\t}\n\t\t}\n\t\t//Ů ע: ԭ˸else, ظж+ݸؼ..... ڲӴ\n\t\telse if( _tcscmp(pstrName, _T(\"itemtextpadding\")) == 0 ) {\n\t\t\tRECT rcTextPadding = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\trcTextPadding.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcTextPadding.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\trcTextPadding.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcTextPadding.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\t\tSetItemTextPadding(rcTextPadding);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemtextcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetItemTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itembkcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetItemBkColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itembkimage\")) == 0 ) SetItemBkImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"itemaltbk\")) == 0 ) SetAlternateBk(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"itemselectedtextcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetSelectedItemTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemselectedbkcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetSelectedItemBkColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemselectedimage\")) == 0 ) SetSelectedItemImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"itemhottextcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetHotItemTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemhotbkcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetHotItemBkColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemhotimage\")) == 0 ) SetHotItemImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"itemdisabledtextcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetDisabledItemTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemdisabledbkcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetDisabledItemBkColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemdisabledimage\")) == 0 ) SetDisabledItemImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"itemlinecolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetItemLineColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemshowhtml\")) == 0 ) SetItemShowHtml(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse CContainerUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CComboUI::DoPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\tCControlUI::DoPaint(hDC, rcPaint);\n        //ʱ  ˢCombo itemƣдͿ\n        if(NULL != m_pWindow)\n        {\n          m_pWindow->m_pLayout->NeedUpdate();\n        }\n\t}\n\n\tvoid CComboUI::PaintStatusImage(HDC hDC)\n\t{\n\t\tif( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;\n\t\telse m_uButtonState &= ~ UISTATE_FOCUSED;\n\t\tif( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;\n\t\telse m_uButtonState &= ~ UISTATE_DISABLED;\n\n\t\tif( (m_uButtonState & UISTATE_DISABLED) != 0 ) {\n\t\t\tif( !m_sDisabledImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sDisabledImage) ) m_sDisabledImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButtonState & UISTATE_PUSHED) != 0 ) {\n\t\t\tif( !m_sPushedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sPushedImage) ) m_sPushedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\tif( !m_sHotImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sHotImage) ) m_sHotImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButtonState & UISTATE_FOCUSED) != 0 ) {\n\t\t\tif( !m_sFocusedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sFocusedImage) ) m_sFocusedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif( !m_sNormalImage.IsEmpty() ) {\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sNormalImage) ) m_sNormalImage.Empty();\n\t\t\telse return;\n\t\t}\n\t}\n\n\tvoid CComboUI::PaintText(HDC hDC)\n\t{\n\t\tRECT rcText = m_rcItem;\n\t\trcText.left += m_rcTextPadding.left;\n\t\trcText.right -= m_rcTextPadding.right;\n\t\trcText.top += m_rcTextPadding.top;\n\t\trcText.bottom -= m_rcTextPadding.bottom;\n\n\t\tif( m_iCurSel >= 0 ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[m_iCurSel]);\n\t\t\tIListItemUI* pElement = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pElement != NULL ) {\n\t\t\t\tpElement->DrawItemText(hDC, rcText);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tRECT rcOldPos = pControl->GetPos();\n\t\t\t\tpControl->SetPos(rcText);\n\t\t\t\tpControl->DoPaint(hDC, rcText);\n\t\t\t\tpControl->SetPos(rcOldPos);\n\t\t\t}\n\t\t}\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Control/UICombo.h",
    "content": "#ifndef __UICOMBO_H__\n#define __UICOMBO_H__\n\n#pragma once\n\nnamespace DuiLib {\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass CComboWnd;\n\n\tclass UILIB_API CComboUI : public CContainerUI, public IListOwnerUI\n\t{\n\t\tfriend class CComboWnd;\n\tpublic:\n\t\tCComboUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tvoid DoInit();\n\t\tUINT GetControlFlags() const;\n\n\t\tCDuiString GetText() const;\n\t\tvoid SetEnabled(bool bEnable = true);\n\n\t\tCDuiString GetDropBoxAttributeList();\n\t\tvoid SetDropBoxAttributeList(LPCTSTR pstrList);\n\t\tSIZE GetDropBoxSize() const;\n\t\tvoid SetDropBoxSize(SIZE szDropBox);\n\n\t\tint GetCurSel() const;  \n\t\tbool SelectItem(int iIndex, bool bTakeFocus = false);\n\n\t\tbool SetItemIndex(CControlUI* pControl, int iIndex);\n\t\tbool Add(CControlUI* pControl);\n\t\tbool AddAt(CControlUI* pControl, int iIndex);\n\t\tbool Remove(CControlUI* pControl);\n\t\tbool RemoveAt(int iIndex);\n\t\tvoid RemoveAll();\n\n\t\tbool Activate();\n\n\t\tRECT GetTextPadding() const;\n\t\tvoid SetTextPadding(RECT rc);\n\t\tLPCTSTR GetNormalImage() const;\n\t\tvoid SetNormalImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetHotImage() const;\n\t\tvoid SetHotImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetPushedImage() const;\n\t\tvoid SetPushedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetFocusedImage() const;\n\t\tvoid SetFocusedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetDisabledImage() const;\n\t\tvoid SetDisabledImage(LPCTSTR pStrImage);\n\n\t\tTListInfoUI* GetListInfo();\n\t\tvoid SetItemFont(int index);\n\t\tvoid SetItemTextStyle(UINT uStyle);\n\t\tRECT GetItemTextPadding() const;\n\t\tvoid SetItemTextPadding(RECT rc);\n\t\tDWORD GetItemTextColor() const;\n\t\tvoid SetItemTextColor(DWORD dwTextColor);\n\t\tDWORD GetItemBkColor() const;\n\t\tvoid SetItemBkColor(DWORD dwBkColor);\n\t\tLPCTSTR GetItemBkImage() const;\n\t\tvoid SetItemBkImage(LPCTSTR pStrImage);\n\t\tbool IsAlternateBk() const;\n\t\tvoid SetAlternateBk(bool bAlternateBk);\n\t\tDWORD GetSelectedItemTextColor() const;\n\t\tvoid SetSelectedItemTextColor(DWORD dwTextColor);\n\t\tDWORD GetSelectedItemBkColor() const;\n\t\tvoid SetSelectedItemBkColor(DWORD dwBkColor);\n\t\tLPCTSTR GetSelectedItemImage() const;\n\t\tvoid SetSelectedItemImage(LPCTSTR pStrImage);\n\t\tDWORD GetHotItemTextColor() const;\n\t\tvoid SetHotItemTextColor(DWORD dwTextColor);\n\t\tDWORD GetHotItemBkColor() const;\n\t\tvoid SetHotItemBkColor(DWORD dwBkColor);\n\t\tLPCTSTR GetHotItemImage() const;\n\t\tvoid SetHotItemImage(LPCTSTR pStrImage);\n\t\tDWORD GetDisabledItemTextColor() const;\n\t\tvoid SetDisabledItemTextColor(DWORD dwTextColor);\n\t\tDWORD GetDisabledItemBkColor() const;\n\t\tvoid SetDisabledItemBkColor(DWORD dwBkColor);\n\t\tLPCTSTR GetDisabledItemImage() const;\n\t\tvoid SetDisabledItemImage(LPCTSTR pStrImage);\n\t\tDWORD GetItemLineColor() const;\n\t\tvoid SetItemLineColor(DWORD dwLineColor);\n\t\tbool IsItemShowHtml();\n\t\tvoid SetItemShowHtml(bool bShowHtml = true);\n\n\t\tSIZE EstimateSize(SIZE szAvailable);\n\t\tvoid SetPos(RECT rc);\n\t\tvoid DoEvent(TEventUI& event);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvoid DoPaint(HDC hDC, const RECT& rcPaint);\n\t\tvoid PaintText(HDC hDC);\n\t\tvoid PaintStatusImage(HDC hDC);\n\n\tprotected:\n\t\tCComboWnd* m_pWindow;\n\n\t\tint m_iCurSel;\n\t\tRECT m_rcTextPadding;\n\t\tCDuiString m_sDropBoxAttributes;\n\t\tSIZE m_szDropBox;\n\t\tUINT m_uButtonState;\n\n\t\tCDuiString m_sNormalImage;\n\t\tCDuiString m_sHotImage;\n\t\tCDuiString m_sPushedImage;\n\t\tCDuiString m_sFocusedImage;\n\t\tCDuiString m_sDisabledImage;\n\n\t\tTListInfoUI m_ListInfo;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UICOMBO_H__\n"
  },
  {
    "path": "DuiLib/Control/UIComboBox.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIComboBox.h\"\n\nnamespace DuiLib\n{\n\tCComboBoxUI::CComboBoxUI()\n\t{\n\t\tm_nArrowWidth = 0;\n\t}\n\n\tLPCTSTR CComboBoxUI::GetClass() const\n\t{\n\t\treturn _T(\"ComboBoxUI\");\n\t}\n\n\tvoid CComboBoxUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif (_tcscmp(pstrName, _T(\"arrowimage\")) == 0)\n\t\t\tm_sArrowImage = pstrValue;\n\t\telse\n\t\t\tCComboUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CComboBoxUI::PaintStatusImage(HDC hDC)\n\t{\n\t\tif (m_sArrowImage.IsEmpty())\n\t\t\tCComboUI::PaintStatusImage(hDC);\n\t\telse\n\t\t{\n\t\t\t// get index\n\t\t\tif( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;\n\t\t\telse m_uButtonState &= ~ UISTATE_FOCUSED;\n\t\t\tif( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;\n\t\t\telse m_uButtonState &= ~ UISTATE_DISABLED;\n\n\t\t\tint nIndex = 0;\n\t\t\tif ((m_uButtonState & UISTATE_DISABLED) != 0)\n\t\t\t\tnIndex = 4;\n\t\t\telse if ((m_uButtonState & UISTATE_PUSHED) != 0)\n\t\t\t\tnIndex = 2;\n\t\t\telse if ((m_uButtonState & UISTATE_HOT) != 0)\n\t\t\t\tnIndex = 1;\n\t\t\telse if ((m_uButtonState & UISTATE_FOCUSED) != 0)\n\t\t\t\tnIndex = 3;\n\n\t\t\t// make modify string\n\t\t\tCDuiString sModify = m_sArrowImage;\n\n\t\t\tint nPos1 = sModify.Find(_T(\"source\"));\n\t\t\tint nPos2 = sModify.Find(_T(\"'\"), nPos1 + 7);\n\t\t\tif (nPos2 == -1) return; //first\n\t\t\tint nPos3 = sModify.Find(_T(\"'\"), nPos2 + 1);\n\t\t\tif (nPos3 == -1) return; //second\n\n\t\t\tCDuiRect rcBmpPart;\n\t\t\tLPTSTR lpszValue = NULL;\n\t\t\trcBmpPart.left = _tcstol(sModify.GetData() + nPos2 + 1, &lpszValue, 10);  ASSERT(lpszValue);    \n\t\t\trcBmpPart.top = _tcstol(lpszValue + 1, &lpszValue, 10);    ASSERT(lpszValue);    \n\t\t\trcBmpPart.right = _tcstol(lpszValue + 1, &lpszValue, 10);  ASSERT(lpszValue);    \n\t\t\trcBmpPart.bottom = _tcstol(lpszValue + 1, &lpszValue, 10); ASSERT(lpszValue); \n\n\t\t\tm_nArrowWidth = rcBmpPart.GetWidth() / 5;\n\t\t\trcBmpPart.left += nIndex * m_nArrowWidth;\n\t\t\trcBmpPart.right = rcBmpPart.left + m_nArrowWidth;\n\n\t\t\tCDuiRect rcDest(0, 0, m_rcItem.right - m_rcItem.left, m_rcItem.bottom - m_rcItem.top);\n\t\t\trcDest.Deflate(GetBorderSize(), GetBorderSize());\n\t\t\trcDest.left = rcDest.right - m_nArrowWidth;\n\n\t\t\tCDuiString sSource = sModify.Mid(nPos1, nPos3 + 1 - nPos1);\n\t\t\tCDuiString sReplace;\n\t\t\tsReplace.SmallFormat(_T(\"source='%d,%d,%d,%d' dest='%d,%d,%d,%d'\"),\n\t\t\t\trcBmpPart.left, rcBmpPart.top, rcBmpPart.right, rcBmpPart.bottom,\n\t\t\t\trcDest.left, rcDest.top, rcDest.right, rcDest.bottom);\n\n\t\t\tsModify.Replace(sSource, sReplace);\n\n\t\t\t// draw image\n\t\t\tif (!DrawImage(hDC, m_sArrowImage, sModify))\n\t\t\t\tm_sNormalImage.Empty();\n\t\t}\n\t}\n\n\tvoid CComboBoxUI::PaintText(HDC hDC)\n\t{\n\t\tRECT rcText = m_rcItem;\n\t\trcText.left += m_rcTextPadding.left;\n\t\trcText.right -= m_rcTextPadding.right;\n\t\trcText.top += m_rcTextPadding.top;\n\t\trcText.bottom -= m_rcTextPadding.bottom;\n\n\t\trcText.right -= m_nArrowWidth; // add this line than CComboUI::PaintText(HDC hDC)\n\n\t\tif( m_iCurSel >= 0 ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[m_iCurSel]);\n\t\t\tIListItemUI* pElement = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pElement != NULL ) {\n\t\t\t\tpElement->DrawItemText(hDC, rcText);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tRECT rcOldPos = pControl->GetPos();\n\t\t\t\tpControl->SetPos(rcText);\n\t\t\t\tpControl->DoPaint(hDC, rcText);\n\t\t\t\tpControl->SetPos(rcOldPos);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Control/UIComboBox.h",
    "content": "#ifndef __UICOMBOBOX_H__\n#define __UICOMBOBOX_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\t/// չб\n\t/// arrowimage,һͼƬƽֳ5,Normal/Hot/Pushed/Focused/Disabled(source)\n\t/// <Default name=\"ComboBox\" value=\"arrowimage=&quot;file='sys_combo_btn.png' source='0,0,16,16'&quot; \"/>\n\tclass UILIB_API CComboBoxUI : public CComboUI\n\t{\n\tpublic:\n\t\tCComboBoxUI();\n\t\tLPCTSTR GetClass() const;\n\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvoid PaintText(HDC hDC);\n\t\tvoid PaintStatusImage(HDC hDC);\n\n\tprotected:\n\t\tCDuiString m_sArrowImage;\n\t\tint        m_nArrowWidth;\n\t};\n}\n\n#endif // __UICOMBOBOX_H__\n"
  },
  {
    "path": "DuiLib/Control/UIDateTime.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIDateTime.h\"\n\nnamespace DuiLib\n{\n\t//CDateTimeUI::m_nDTUpdateFlag\n#define DT_NONE   0\n#define DT_UPDATE 1\n#define DT_DELETE 2\n#define DT_KEEP   3\n\n\tclass CDateTimeWnd : public CWindowWnd\n\t{\n\tpublic:\n\t\tCDateTimeWnd();\n\n\t\tvoid Init(CDateTimeUI* pOwner);\n\t\tRECT CalPos();\n\n\t\tLPCTSTR GetWindowClassName() const;\n\t\tLPCTSTR GetSuperClassName() const;\n\t\tvoid OnFinalMessage(HWND hWnd);\n\n\t\tLRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);\n\t\tLRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\t//LRESULT OnEditChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\n\tprotected:\n\t\tCDateTimeUI* m_pOwner;\n\t\tHBRUSH m_hBkBrush;\n\t\tbool m_bInit;\n\t};\n\n\tCDateTimeWnd::CDateTimeWnd() : m_pOwner(NULL), m_hBkBrush(NULL), m_bInit(false)\n\t{\n\t}\n\n\tvoid CDateTimeWnd::Init(CDateTimeUI* pOwner)\n\t{\n\t\tm_pOwner = pOwner;\n\t\tm_pOwner->m_nDTUpdateFlag = DT_NONE;\n\n\t\tif (m_hWnd == NULL)\n\t\t{\n\t\t\tRECT rcPos = CalPos();\n\t\t\tUINT uStyle = WS_CHILD;\n\t\t\tCreate(m_pOwner->GetManager()->GetPaintWindow(), NULL, uStyle, 0, rcPos);\n\t\t\tSetWindowFont(m_hWnd, m_pOwner->GetManager()->GetFontInfo(m_pOwner->GetFont())->hFont, TRUE);\n\t\t}\n\n\t\tif (m_pOwner->GetText().IsEmpty())\n\t\t\t::GetLocalTime(&m_pOwner->m_sysTime);\n\n\t\t::SendMessage(m_hWnd, DTM_SETSYSTEMTIME, 0, (LPARAM)&m_pOwner->m_sysTime);\n\t\t::ShowWindow(m_hWnd, SW_SHOWNOACTIVATE);\n\t\t::SetFocus(m_hWnd);\n\n\t\tm_bInit = true;    \n\t}\n\n\tRECT CDateTimeWnd::CalPos()\n\t{\n\t\tCDuiRect rcPos = m_pOwner->GetPos();\n\t\treturn rcPos;\n\t}\n\n\tLPCTSTR CDateTimeWnd::GetWindowClassName() const\n\t{\n\t\treturn _T(\"DateTimeWnd\");\n\t}\n\n\tLPCTSTR CDateTimeWnd::GetSuperClassName() const\n\t{\n\t\treturn DATETIMEPICK_CLASS;\n\t}\n\n\tvoid CDateTimeWnd::OnFinalMessage(HWND /*hWnd*/)\n\t{\n\t\t// Clear reference and die\n\t\tif( m_hBkBrush != NULL ) ::DeleteObject(m_hBkBrush);\n\t\tm_pOwner->m_pWindow = NULL;\n\t\tdelete this;\n\t}\n\n\tLRESULT CDateTimeWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)\n\t{\n\t\tLRESULT lRes = 0;\n\t\tBOOL bHandled = TRUE;\n\t\tif( uMsg == WM_KILLFOCUS )\n\t\t{\n\t\t\t//::OutputDebugString(\"WM_KILLFOCUS\\n\");\n\t\t\tif( uMsg == WM_KILLFOCUS /**/)\n\t\t\t{\n\t\t\t\t//ϿҪŻΪFindWindowҳĴڲһǱ̵Ĵ\n\t\t\t\tHWND hh=::FindWindow(_T(\"SysMonthCal32\"),NULL);\n\t\t\t\t//Isdel=true;\n\t\t\t\tif(::IsWindow(hh))\n\t\t\t\t{\n\t\t\t\t\tMCHITTESTINFO pp;\n\t\t\t\t\tmemset(&pp,0,sizeof(pp));\n\t\t\t\t\tGetCursorPos(&pp.pt);\n\t\t\t\t\t::ScreenToClient(hh,&pp.pt);\n\t\t\t\t\tpp.cbSize=sizeof(pp);\n\t\t\t\t\tMonthCal_HitTest(hh,&pp);\n\t\t\t\t\t//һ\n\t\t\t\t\tif(pp.uHit==MCHT_TITLEBTNNEXT)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\t//һ\n\t\t\t\t\tif(pp.uHit==MCHT_TITLEBTNPREV)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\tPOINT pt;\n\t\t\t\t\t::GetCursorPos(&pt); \n\t\t\t\t\tRECT rt;\n\t\t\t\t\t::GetWindowRect(m_hWnd,&rt);\n\t\t\t\t\tif(\n\t\t\t\t\t\t!(pt.x>=rt.left&&pt.x<=rt.right)||\n\t\t\t\t\t\t!(pt.x>=rt.top&&pt.x<=rt.bottom)\n\t\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t//::OutputDebugString(\"CLose\\n\");\n\t\t\t\t\t\tlRes= OnKillFocus(uMsg,wParam, lParam,bHandled);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (uMsg == WM_KEYUP && (wParam == VK_DELETE || wParam == VK_BACK))\n\t\t{\n\t\t\tLRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);\n\t\t\tm_pOwner->m_nDTUpdateFlag = DT_DELETE;\n\t\t\tm_pOwner->UpdateText();\n\t\t\tPostMessage(WM_CLOSE);\n\t\t\treturn lRes;\n\t\t}\n\t\telse if (uMsg == WM_KEYUP && wParam == VK_ESCAPE)\n\t\t{\n\t\t\tLRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);\n\t\t\tm_pOwner->m_nDTUpdateFlag = DT_KEEP;\n\t\t\tPostMessage(WM_CLOSE);\n\t\t\treturn lRes;\n\t\t}\n\t\t//\telse if( uMsg == OCM_COMMAND ) {\n\t\t// \t\tif( GET_WM_COMMAND_CMD(wParam, lParam) == EN_CHANGE ) lRes = OnEditChanged(uMsg, wParam, lParam, bHandled);\n\t\t// \t\telse if( GET_WM_COMMAND_CMD(wParam, lParam) == EN_UPDATE ) {\n\t\t// \t\t\tRECT rcClient;\n\t\t// \t\t\t::GetClientRect(m_hWnd, &rcClient);\n\t\t// \t\t\t::InvalidateRect(m_hWnd, &rcClient, FALSE);\n\t\t// \t\t}\n\t\t//\t}\n\t\t//\telse if( uMsg == WM_KEYDOWN && TCHAR(wParam) == VK_RETURN ) {\n\t\t// \t\tm_pOwner->GetManager()->SendNotify(m_pOwner, DUI_MSGTYPE_RETURN);\n\t\t//\t}\n\t\t// \t\telse if( uMsg == OCM__BASE + WM_CTLCOLOREDIT  || uMsg == OCM__BASE + WM_CTLCOLORSTATIC ) {\n\t\t// \t\t\tif( m_pOwner->GetNativeEditBkColor() == 0xFFFFFFFF ) return NULL;\n\t\t// \t\t\t::SetBkMode((HDC)wParam, TRANSPARENT);\n\t\t// \t\t\tDWORD dwTextColor = m_pOwner->GetTextColor();\n\t\t// \t\t\t::SetTextColor((HDC)wParam, RGB(GetBValue(dwTextColor),GetGValue(dwTextColor),GetRValue(dwTextColor)));\n\t\t// \t\t\tif( m_hBkBrush == NULL ) {\n\t\t// \t\t\t\tDWORD clrColor = m_pOwner->GetNativeEditBkColor();\n\t\t// \t\t\t\tm_hBkBrush = ::CreateSolidBrush(RGB(GetBValue(clrColor), GetGValue(clrColor), GetRValue(clrColor)));\n\t\t// \t\t\t}\n\t\t// \t\t\treturn (LRESULT)m_hBkBrush;\n\t\t// \t\t}\n\t\telse bHandled = FALSE;\n\t\tif( !bHandled )\n\t\t{\n\t\t\treturn CWindowWnd::HandleMessage(uMsg, wParam, lParam);\n\t\t}\n\t\treturn lRes;\n\t}\n\n\tLRESULT CDateTimeWnd::OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tLRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);\n\t\tif (m_pOwner->m_nDTUpdateFlag == DT_NONE)\n\t\t{\n\t\t\t::SendMessage(m_hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&m_pOwner->m_sysTime);\n\t\t\tm_pOwner->m_nDTUpdateFlag = DT_UPDATE;\n\t\t\tm_pOwner->UpdateText();\n\t\t}\n\t\tPostMessage(WM_CLOSE);\n\t\treturn lRes;\n\t}\n\n\t// LRESULT CDateTimeWnd::OnEditChanged(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)\n\t// {\n\t// \tif( !m_bInit ) return 0;\n\t// \tif( m_pOwner == NULL ) return 0;\n\t// \t// Copy text back\n\t// \tint cchLen = ::GetWindowTextLength(m_hWnd) + 1;\n\t// \tLPTSTR pstr = static_cast<LPTSTR>(_alloca(cchLen * sizeof(TCHAR)));\n\t// \tASSERT(pstr);\n\t// \tif( pstr == NULL ) return 0;\n\t// \t::GetWindowText(m_hWnd, pstr, cchLen);\n\t// \tm_pOwner->m_sText = pstr;\n\t// \tm_pOwner->GetManager()->SendNotify(m_pOwner, DUI_MSGTYPE_TEXTCHANGED);\n\t// \treturn 0;\n\t// }\n\n\t//////////////////////////////////////////////////////////////////////////\n\t//\n\tCDateTimeUI::CDateTimeUI()\n\t{\n\t\t::GetLocalTime(&m_sysTime);\n\t\tm_bReadOnly = false;\n\t\tm_pWindow = NULL;\n\t\tm_nDTUpdateFlag=DT_UPDATE;\n\t\tUpdateText();\t\t// add by:daviyang35 ʼʱʾʱ\n\t\tm_nDTUpdateFlag = DT_NONE;\n\t}\n\n\tLPCTSTR CDateTimeUI::GetClass() const\n\t{\n\t\treturn _T(\"DateTimeUI\");\n\t}\n\n\tLPVOID CDateTimeUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_DATETIME) == 0 ) return static_cast<CDateTimeUI*>(this);\n\t\treturn CLabelUI::GetInterface(pstrName);\n\t}\n\n\tSYSTEMTIME& CDateTimeUI::GetTime()\n\t{\n\t\treturn m_sysTime;\n\t}\n\n\tvoid CDateTimeUI::SetTime(SYSTEMTIME* pst)\n\t{\n\t\tm_sysTime = *pst;\n\t\tInvalidate();\n\t}\n\n\tvoid CDateTimeUI::SetReadOnly(bool bReadOnly)\n\t{\n\t\tm_bReadOnly = bReadOnly;\n\t\tInvalidate();\n\t}\n\n\tbool CDateTimeUI::IsReadOnly() const\n\t{\n\t\treturn m_bReadOnly;\n\t}\n\n\tvoid CDateTimeUI::UpdateText()\n\t{\n\t\tif (m_nDTUpdateFlag == DT_DELETE)\n\t\t\tSetText(_T(\"\"));\n\t\telse if (m_nDTUpdateFlag == DT_UPDATE)\n\t\t{\n\t\t\tCDuiString sText;\n\t\t\tsText.SmallFormat(_T(\"%4d-%02d-%02d\"),\n\t\t\t\tm_sysTime.wYear, m_sysTime.wMonth, m_sysTime.wDay, m_sysTime.wHour, m_sysTime.wMinute);\n\t\t\tSetText(sText);\n\t\t}\n\t}\n\n\tvoid CDateTimeUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pParent != NULL ) m_pParent->DoEvent(event);\n\t\t\telse CLabelUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_SETCURSOR && IsEnabled() )\n\t\t{\n\t\t\t::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_IBEAM)));\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_WINDOWSIZE )\n\t\t{\n\t\t\tif( m_pWindow != NULL ) m_pManager->SetFocusNeeded(this);\n\t\t}\n\t\tif( event.Type == UIEVENT_SCROLLWHEEL )\n\t\t{\n\t\t\tif( m_pWindow != NULL ) return;\n\t\t}\n\t\tif( event.Type == UIEVENT_SETFOCUS && IsEnabled() ) \n\t\t{\n\t\t\tif( m_pWindow ) return;\n\t\t\tm_pWindow = new CDateTimeWnd();\n\t\t\tASSERT(m_pWindow);\n\t\t\tm_pWindow->Init(this);\n\t\t\tm_pWindow->ShowWindow();\n\t\t}\n\t\tif( event.Type == UIEVENT_KILLFOCUS && IsEnabled() ) \n\t\t{\n\t\t\tInvalidate();\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK || event.Type == UIEVENT_RBUTTONDOWN) \n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tGetManager()->ReleaseCapture();\n\t\t\t\tif( IsFocused() && m_pWindow == NULL )\n\t\t\t\t{\n\t\t\t\t\tm_pWindow = new CDateTimeWnd();\n\t\t\t\t\tASSERT(m_pWindow);\n\t\t\t\t}\n\t\t\t\tif( m_pWindow != NULL )\n\t\t\t\t{\n\t\t\t\t\tm_pWindow->Init(this);\n\t\t\t\t\tm_pWindow->ShowWindow();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEMOVE ) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONUP ) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_CONTEXTMENU )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEENTER )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSELEAVE )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tCLabelUI::DoEvent(event);\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Control/UIDateTime.h",
    "content": "#ifndef __UIDATETIME_H__\n#define __UIDATETIME_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass CDateTimeWnd;\n\n\t/// ʱѡؼ\n\tclass UILIB_API CDateTimeUI : public CLabelUI\n\t{\n\t\tfriend class CDateTimeWnd;\n\tpublic:\n\t\tCDateTimeUI();\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tSYSTEMTIME& GetTime();\n\t\tvoid SetTime(SYSTEMTIME* pst);\n\n\t\tvoid SetReadOnly(bool bReadOnly);\n\t\tbool IsReadOnly() const;\n\n\t\tvoid UpdateText();\n\n\t\tvoid DoEvent(TEventUI& event);\n\n\tprotected:\n\t\tSYSTEMTIME m_sysTime;\n\t\tint        m_nDTUpdateFlag;\n\t\tbool       m_bReadOnly;\n\n\t\tCDateTimeWnd* m_pWindow;\n\t};\n}\n#endif // __UIDATETIME_H__"
  },
  {
    "path": "DuiLib/Control/UIEdit.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIEdit.h\"\n\nnamespace DuiLib\n{\n\tclass CEditWnd : public CWindowWnd\n\t{\n\tpublic:\n\t\tCEditWnd( );\n\n\t\tvoid Init(CEditUI* pOwner);\n\t\tRECT CalPos( );\n\n\t\tLPCTSTR GetWindowClassName( ) const;\n\t\tLPCTSTR GetSuperClassName( ) const;\n\t\tvoid OnFinalMessage(HWND hWnd);\n\n\t\tLRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);\n\t\tLRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tLRESULT OnEditChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tLRESULT OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tvoid\tShowBalloonTip(LPWSTR strTitile, LPWSTR strtext, UINT uStyle);\n\tprotected:\n\t\tCEditUI* m_pOwner;\n\t\tHBRUSH m_hBkBrush;\n\t\tbool m_bInit;\n\t};\n\n\n\tCEditWnd::CEditWnd( ) : m_pOwner(NULL), m_hBkBrush(NULL), m_bInit(false)\n\t{\n\t}\n\n\tvoid CEditWnd::Init(CEditUI* pOwner)\n\t{\n\t\tm_pOwner = pOwner;\n\t\tRECT rcPos = CalPos( );\n\t\tUINT uStyle = 0;\n\t\tUINT uTextStyle = m_pOwner->GetTextStyle( );\n\t\tif (uTextStyle & DT_CENTER)\n\t\t{\n\t\t\tuStyle = WS_CHILD | ES_AUTOHSCROLL | ES_CENTER;\n\t\t}\n\t\telse if (uTextStyle & DT_RIGHT)\n\t\t{\n\t\t\tuStyle = WS_CHILD | ES_AUTOHSCROLL | ES_RIGHT;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tuStyle = WS_CHILD | ES_AUTOHSCROLL | ES_LEFT;\n\t\t}\n\n\t\tif (m_pOwner->IsPasswordMode( )) uStyle |= ES_PASSWORD;\n\t\tCreate(m_pOwner->GetManager( )->GetPaintWindow( ), NULL, uStyle, 0, rcPos);\n\t\tHFONT hFont = NULL;\n\t\tint iFontIndex = m_pOwner->GetFont( );\n\t\tif (iFontIndex != -1)\n\t\t\thFont = m_pOwner->GetManager( )->GetFont(iFontIndex);\n\t\tif (hFont == NULL)\n\t\t\thFont = m_pOwner->GetManager( )->GetDefaultFontInfo( )->hFont;\n\n\t\tSetWindowFont(m_hWnd, hFont, TRUE);\n\t\tEdit_LimitText(m_hWnd, m_pOwner->GetMaxChar( ));\n\t\tif (m_pOwner->IsPasswordMode( )) Edit_SetPasswordChar(m_hWnd, m_pOwner->GetPasswordChar( ));\n\t\tEdit_SetText(m_hWnd, m_pOwner->GetText( ));\n\t\tEdit_SetModify(m_hWnd, FALSE);\n\t\tSendMessage(EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELPARAM(0, 0));\n\t\tEdit_Enable(m_hWnd, m_pOwner->IsEnabled( ) == true);\n\t\tEdit_SetReadOnly(m_hWnd, m_pOwner->IsReadOnly( ) == true);\n\t\t//Styls\n\t\tLONG styleValue = ::GetWindowLong(m_hWnd, GWL_STYLE);\n\t\tstyleValue |= pOwner->GetWindowStyls( );\n\t\t::SetWindowLong(GetHWND( ), GWL_STYLE, styleValue);\n\t\t::ShowWindow(m_hWnd, SW_SHOWNOACTIVATE);\n\t\t::SetFocus(m_hWnd);\n\t\tm_bInit = true;\n\t}\n\n\tRECT CEditWnd::CalPos( )\n\t{\n\t\tCDuiRect rcPos = m_pOwner->GetPos( );\n\t\tRECT rcInset = m_pOwner->GetTextPadding( );\n\t\trcPos.left += rcInset.left;\n\t\trcPos.top += rcInset.top;\n\t\trcPos.right -= rcInset.right;\n\t\trcPos.bottom -= rcInset.bottom;\n\t\tLONG lEditHeight = m_pOwner->GetManager( )->GetFontInfo(m_pOwner->GetFont( ))->tm.tmHeight;\n\t\tif (lEditHeight < rcPos.GetHeight( )) {\n\t\t\trcPos.top += (rcPos.GetHeight( ) - lEditHeight) / 2;\n\t\t\trcPos.bottom = rcPos.top + lEditHeight;\n\t\t}\n\t\treturn rcPos;\n\t}\n\n\tLPCTSTR CEditWnd::GetWindowClassName( ) const\n\t{\n\t\treturn _T(\"EditWnd\");\n\n\t}\n\n\tLPCTSTR CEditWnd::GetSuperClassName( ) const\n\t{\n\t\treturn WC_EDIT;\n\t}\n\n\tvoid CEditWnd::OnFinalMessage(HWND /*hWnd*/)\n\t{\n\t\tm_pOwner->Invalidate( );\n\t\t// Clear reference and die\n\t\tif (m_hBkBrush != NULL) ::DeleteObject(m_hBkBrush);\n\t\tm_pOwner->m_pWindow = NULL;\n\t\tdelete this;\n\t}\n\n\tLRESULT CEditWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)\n\t{\n\t\tLRESULT lRes = 0;\n\t\tBOOL bHandled = TRUE;\n\t\tif (uMsg == WM_KILLFOCUS) lRes = OnKillFocus(uMsg, wParam, lParam, bHandled);\n\t\telse if (uMsg == OCM_COMMAND) {\n\t\t\tif (GET_WM_COMMAND_CMD(wParam, lParam) == EN_CHANGE) lRes = OnEditChanged(uMsg, wParam, lParam, bHandled);\n\t\t\telse if (GET_WM_COMMAND_CMD(wParam, lParam) == EN_UPDATE) {\n\t\t\t\tRECT rcClient;\n\t\t\t\t::GetClientRect(m_hWnd, &rcClient);\n\t\t\t\t::InvalidateRect(m_hWnd, &rcClient, FALSE);\n\t\t\t}\n\t\t}\n\t\telse if (uMsg == WM_KEYDOWN && TCHAR(wParam) == VK_RETURN) {\n\t\t\tm_pOwner->GetManager( )->SendNotify(m_pOwner, DUI_MSGTYPE_RETURN);\n\t\t}\n\t\telse if (uMsg == WM_CHAR) lRes = OnChar(uMsg, wParam, lParam, bHandled);\n\t\telse if (uMsg == OCM__BASE + WM_CTLCOLOREDIT || uMsg == OCM__BASE + WM_CTLCOLORSTATIC) {\n\t\t\tif (m_pOwner->GetNativeEditBkColor( ) == 0xFFFFFFFF) return NULL;\n\t\t\t::SetBkMode((HDC)wParam, TRANSPARENT);\n\t\t\tDWORD dwTextColor = m_pOwner->GetTextColor( );\n\t\t\t::SetTextColor((HDC)wParam, RGB(GetBValue(dwTextColor), GetGValue(dwTextColor), GetRValue(dwTextColor)));\n\t\t\tif (m_hBkBrush == NULL) {\n\t\t\t\tDWORD clrColor = m_pOwner->GetNativeEditBkColor( );\n\t\t\t\tm_hBkBrush = ::CreateSolidBrush(RGB(GetBValue(clrColor), GetGValue(clrColor), GetRValue(clrColor)));\n\t\t\t}\n\t\t\treturn (LRESULT)m_hBkBrush;\n\t\t}\n\t\telse bHandled = FALSE;\n\t\tif (!bHandled) return CWindowWnd::HandleMessage(uMsg, wParam, lParam);\n\t\treturn lRes;\n\t}\n\n\tLRESULT CEditWnd::OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tLRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);\n\t\tPostMessage(WM_CLOSE);\n\t\treturn lRes;\n\t}\n\n\tLRESULT CEditWnd::OnEditChanged(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)\n\t{\n\t\tif (!m_bInit) return 0;\n\t\tif (m_pOwner == NULL) return 0;\n\t\t// Copy text back\n\t\tint cchLen = ::GetWindowTextLength(m_hWnd) + 1;\n\t\tLPTSTR pstr = static_cast<LPTSTR>(_alloca(cchLen * sizeof(TCHAR)));\n\t\tASSERT(pstr);\n\t\tif (pstr == NULL) return 0;\n\t\t::GetWindowText(m_hWnd, pstr, cchLen);\n\t\tm_pOwner->m_sText = pstr;\n\t\tm_pOwner->GetManager( )->SendNotify(m_pOwner, DUI_MSGTYPE_TEXTCHANGED);\n\t\treturn 0;\n\t}\n\tLRESULT CEditWnd::OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tif (m_pOwner->IsFloatPointOnly( ))\n\t\t{\n\t\t\tif ('.' == wParam)\n\t\t\t{\n\t\t\t\tif (m_pOwner->m_sText.IsEmpty( ) || ((m_pOwner->m_sText.GetLength( ) == 1) && (m_pOwner->m_sText.Find(_T('-')) == 0)))\n\t\t\t\t{\n\t\t\t\t\tShowBalloonTip(L\"Input error\", L\"СǰΪգ\", TTI_ERROR);\n\t\t\t\t\tbHandled = TRUE;\n\t\t\t\t}\n\t\t\t\telse if (m_pOwner->m_sText.Find(_T('.')) != -1) // ǷѾС  \n\t\t\t\t{\n\t\t\t\t\tShowBalloonTip(L\"ַ\", L\"ֻһС\", TTI_ERROR);\n\t\t\t\t\tbHandled = TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbHandled = FALSE;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ('-' == wParam)\n\t\t\t{\n\t\t\t\tif (!m_pOwner->m_sText.IsEmpty( ))\n\t\t\t\t{\n\t\t\t\t\tShowBalloonTip(L\"ַ\", L\"ֻڴ˴ֻС\", TTI_ERROR);\n\t\t\t\t\tbHandled = TRUE;\n\t\t\t\t}\n\t\t\t\telse if (m_pOwner->m_sText.Find(_T('-')) != -1)\n\t\t\t\t{\n\t\t\t\t\tShowBalloonTip(L\"ַ\", L\"ֻһθ\", TTI_ERROR);\n\t\t\t\t\tbHandled = TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbHandled = FALSE;\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t\telse if ((wParam >= '0' && wParam <= '9') || wParam == VK_BACK)\n\t\t\t{\n\t\t\t\tbHandled = FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbHandled = TRUE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbHandled = FALSE;\n\t\t}\n\n\t\treturn 0;\n\n\t}\n\n\t// ʵֱ༭ðʾ  \n\tvoid CEditWnd::ShowBalloonTip(LPWSTR strTitile, LPWSTR strtext, UINT uStyle)\n\t{\n\t\tEDITBALLOONTIP ebt;\n\t\tebt.cbStruct = sizeof(EDITBALLOONTIP);\n\t\tebt.pszText = strtext;\n\t\tebt.pszTitle = strTitile;\n\t\tebt.ttiIcon = uStyle;\n\t\tEdit_ShowBalloonTip(GetHWND( ), &ebt);\n\t}\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tCEditUI::CEditUI( ) : m_pWindow(NULL), m_uMaxChar(255), m_bReadOnly(false),\n\t\tm_bPasswordMode(false), m_cPasswordChar(_T('*')), m_uButtonState(0),\n\t\tm_dwEditbkColor(0xFFFFFF), m_iWindowStyls(0), m_bFloatPointOnly(false)\n\t{\n\t\tSetTextPadding(CDuiRect(0, 0, 0, 0));\n\t\tSetBkColor(0xFFFFFFFF);\n\t\tSetTextStyle(DT_VCENTER | DT_LEFT);\n\t}\n\n\tLPCTSTR CEditUI::GetClass( ) const\n\t{\n\t\treturn _T(\"EditUI\");\n\t}\n\n\tLPVOID CEditUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif (_tcscmp(pstrName, DUI_CTR_EDIT) == 0) return static_cast<CEditUI*>(this);\n\t\treturn CLabelUI::GetInterface(pstrName);\n\t}\n\n\tUINT CEditUI::GetControlFlags( ) const\n\t{\n\t\tif (!IsEnabled( )) return CControlUI::GetControlFlags( );\n\n\t\treturn UIFLAG_SETCURSOR | UIFLAG_TABSTOP;\n\t}\n\n\tvoid CEditUI::DoEvent(TEventUI& event)\n\t{\n\t\tif (!IsMouseEnabled( ) && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND) {\n\t\t\tif (m_pParent != NULL) m_pParent->DoEvent(event);\n\t\t\telse CLabelUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.Type == UIEVENT_SETCURSOR && IsEnabled( ))\n\t\t{\n\t\t\t::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_IBEAM)));\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_WINDOWSIZE)\n\t\t{\n\t\t\tif (m_pWindow != NULL) m_pManager->SetFocusNeeded(this);\n\t\t}\n\t\tif (event.Type == UIEVENT_SCROLLWHEEL)\n\t\t{\n\t\t\tif (m_pWindow != NULL) return;\n\t\t}\n\t\tif (event.Type == UIEVENT_SETFOCUS && IsEnabled( ))\n\t\t{\n\t\t\tif (m_pWindow)\n\t\t\t{\n\t\t\t\tm_pManager->SetFocusNeeded(this);\n\t\t\t\tInvalidate( );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tm_pWindow = new CEditWnd( );\n\t\t\tASSERT(m_pWindow);\n\t\t\tm_pWindow->Init(this);\n\t\t\tInvalidate( );\n\t\t}\n\t\tif (event.Type == UIEVENT_KILLFOCUS && IsEnabled( ))\n\t\t{\n\t\t\tInvalidate( );\n\t\t}\n\t\tif (event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK || event.Type == UIEVENT_RBUTTONDOWN)\n\t\t{\n\t\t\tif (IsEnabled( )) {\n\t\t\t\tGetManager( )->ReleaseCapture( );\n\t\t\t\tif (IsFocused( ) && m_pWindow == NULL)\n\t\t\t\t{\n\t\t\t\t\tm_pWindow = new CEditWnd( );\n\t\t\t\t\tASSERT(m_pWindow);\n\t\t\t\t\tm_pWindow->Init(this);\n\n\t\t\t\t\tif (PtInRect(&m_rcItem, event.ptMouse))\n\t\t\t\t\t{\n\t\t\t\t\t\tint nSize = GetWindowTextLength(*m_pWindow);\n\t\t\t\t\t\tif (nSize == 0)\n\t\t\t\t\t\t\tnSize = 1;\n\n\t\t\t\t\t\tEdit_SetSel(*m_pWindow, 0, nSize);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (m_pWindow != NULL)\n\t\t\t\t{\n#if 1\n\t\t\t\t\tint nSize = GetWindowTextLength(*m_pWindow);\n\t\t\t\t\tif (nSize == 0)\n\t\t\t\t\t\tnSize = 1;\n\n\t\t\t\t\tEdit_SetSel(*m_pWindow, 0, nSize);\n#else\n\t\t\t\t\tPOINT pt = event.ptMouse;\n\t\t\t\t\tpt.x -= m_rcItem.left + m_rcTextPadding.left;\n\t\t\t\t\tpt.y -= m_rcItem.top + m_rcTextPadding.top;\n\t\t\t\t\t::SendMessage(*m_pWindow, WM_LBUTTONDOWN, event.wParam, MAKELPARAM(pt.x, pt.y));\n#endif\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_MOUSEMOVE)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_BUTTONUP)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_CONTEXTMENU)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_MOUSEENTER)\n\t\t{\n\t\t\tif (IsEnabled( )) {\n\t\t\t\tm_uButtonState |= UISTATE_HOT;\n\t\t\t\tInvalidate( );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_MOUSELEAVE)\n\t\t{\n\t\t\tif (IsEnabled( )) {\n\t\t\t\tm_uButtonState &= ~UISTATE_HOT;\n\t\t\t\tInvalidate( );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tCLabelUI::DoEvent(event);\n\t}\n\n\tvoid CEditUI::SetEnabled(bool bEnable)\n\t{\n\t\tCControlUI::SetEnabled(bEnable);\n\t\tif (!IsEnabled( )) {\n\t\t\tm_uButtonState = 0;\n\t\t}\n\t}\n\n\tvoid CEditUI::SetText(LPCTSTR pstrText)\n\t{\n\t\tm_sText = pstrText;\n\t\tif (m_pWindow != NULL) ::Edit_SetText(*m_pWindow, m_sText);\n\t\tInvalidate( );\n\t}\n\n\tvoid CEditUI::SetMaxChar(UINT uMax)\n\t{\n\t\tm_uMaxChar = uMax;\n\t\tif (m_pWindow != NULL) Edit_LimitText(*m_pWindow, m_uMaxChar);\n\t}\n\n\tUINT CEditUI::GetMaxChar( )\n\t{\n\t\treturn m_uMaxChar;\n\t}\n\n\tvoid CEditUI::SetReadOnly(bool bReadOnly)\n\t{\n\t\tif (m_bReadOnly == bReadOnly) return;\n\n\t\tm_bReadOnly = bReadOnly;\n\t\tif (m_pWindow != NULL) Edit_SetReadOnly(*m_pWindow, m_bReadOnly);\n\t\tInvalidate( );\n\t}\n\n\tbool CEditUI::IsReadOnly( ) const\n\t{\n\t\treturn m_bReadOnly;\n\t}\n\n\tvoid CEditUI::SetNumberOnly(bool bNumberOnly)\n\t{\n\t\tif (bNumberOnly)\n\t\t{\n\t\t\tm_iWindowStyls |= ES_NUMBER;\n\t\t\tSetFloatPointOnly(false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_iWindowStyls &= ~ES_NUMBER;\n\t\t}\n\t\tInvalidate( );\n\t}\n\tbool CEditUI::IsNumberOnly( ) const\n\t{\n\t\treturn m_iWindowStyls&ES_NUMBER ? true : false;\n\t}\n\tvoid CEditUI::SetFloatPointOnly(bool bFloatOnly)\n\t{\n\t\tif (m_bFloatPointOnly == bFloatOnly)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tm_bFloatPointOnly = bFloatOnly;\n\t\tif (bFloatOnly)\n\t\t{\n\t\t\tSetNumberOnly(false);\n\t\t}\n\t\tInvalidate( );\n\t}\n\tbool CEditUI::IsFloatPointOnly( ) const\n\t{\n\t\treturn m_bFloatPointOnly;\n\t}\n\tint CEditUI::GetWindowStyls( ) const\n\t{\n\t\treturn m_iWindowStyls;\n\t}\n\n\tvoid CEditUI::SetPasswordMode(bool bPasswordMode)\n\t{\n\t\tif (m_bPasswordMode == bPasswordMode) return;\n\t\tm_bPasswordMode = bPasswordMode;\n\t\tInvalidate( );\n\t}\n\n\tbool CEditUI::IsPasswordMode( ) const\n\t{\n\t\treturn m_bPasswordMode;\n\t}\n\n\tvoid CEditUI::SetPasswordChar(TCHAR cPasswordChar)\n\t{\n\t\tif (m_cPasswordChar == cPasswordChar) return;\n\t\tm_cPasswordChar = cPasswordChar;\n\t\tif (m_pWindow != NULL) Edit_SetPasswordChar(*m_pWindow, m_cPasswordChar);\n\t\tInvalidate( );\n\t}\n\n\tTCHAR CEditUI::GetPasswordChar( ) const\n\t{\n\t\treturn m_cPasswordChar;\n\t}\n\n\tLPCTSTR CEditUI::GetNormalImage( )\n\t{\n\t\treturn m_sNormalImage;\n\t}\n\n\tvoid CEditUI::SetNormalImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sNormalImage = pStrImage;\n\t\tInvalidate( );\n\t}\n\n\tLPCTSTR CEditUI::GetHotImage( )\n\t{\n\t\treturn m_sHotImage;\n\t}\n\n\tvoid CEditUI::SetHotImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sHotImage = pStrImage;\n\t\tInvalidate( );\n\t}\n\n\tLPCTSTR CEditUI::GetFocusedImage( )\n\t{\n\t\treturn m_sFocusedImage;\n\t}\n\n\tvoid CEditUI::SetFocusedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sFocusedImage = pStrImage;\n\t\tInvalidate( );\n\t}\n\n\tLPCTSTR CEditUI::GetDisabledImage( )\n\t{\n\t\treturn m_sDisabledImage;\n\t}\n\n\tvoid CEditUI::SetDisabledImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sDisabledImage = pStrImage;\n\t\tInvalidate( );\n\t}\n\n\tvoid CEditUI::SetNativeEditBkColor(DWORD dwBkColor)\n\t{\n\t\tm_dwEditbkColor = dwBkColor;\n\t}\n\n\tDWORD CEditUI::GetNativeEditBkColor( ) const\n\t{\n\t\treturn m_dwEditbkColor;\n\t}\n\n\tvoid CEditUI::SetSel(long nStartChar, long nEndChar)\n\t{\n\t\tif (m_pWindow != NULL) Edit_SetSel(*m_pWindow, nStartChar, nEndChar);\n\t}\n\n\tvoid CEditUI::SetSelAll( )\n\t{\n\t\tSetSel(0, -1);\n\t}\n\n\tvoid CEditUI::SetReplaceSel(LPCTSTR lpszReplace)\n\t{\n\t\tif (m_pWindow != NULL) Edit_ReplaceSel(*m_pWindow, lpszReplace);\n\t}\n\n\tvoid CEditUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\t\tif (m_pWindow != NULL) {\n\t\t\tRECT rcPos = m_pWindow->CalPos( );\n\t\t\t::SetWindowPos(m_pWindow->GetHWND( ), NULL, rcPos.left, rcPos.top, rcPos.right - rcPos.left,\n\t\t\t\trcPos.bottom - rcPos.top, SWP_NOZORDER | SWP_NOACTIVATE);\n\t\t}\n\t}\n\n\tvoid CEditUI::SetVisible(bool bVisible)\n\t{\n\t\tCControlUI::SetVisible(bVisible);\n\t\tif (!IsVisible( ) && m_pWindow != NULL) m_pManager->SetFocus(NULL);\n\t}\n\n\tvoid CEditUI::SetInnerVisible(bool bVisible)\n\t{\n\t\tm_bInternVisible = bVisible;\n\t\tif (!IsVisible( ) && m_pWindow != NULL) m_pManager->SetFocus(NULL);\n\t}\n\n\tSIZE CEditUI::EstimateSize(SIZE szAvailable)\n\t{\n\t\tif (m_cxyFixed.cy == 0) return CSize(m_cxyFixed.cx, m_pManager->GetFontInfo(GetFont( ))->tm.tmHeight + 6);\n\t\treturn CControlUI::EstimateSize(szAvailable);\n\t}\n\n\tvoid CEditUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif (_tcscmp(pstrName, _T(\"readonly\")) == 0) SetReadOnly(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if (_tcscmp(pstrName, _T(\"numberonly\")) == 0) SetNumberOnly(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if (_tcscmp(pstrName, _T(\"floatpointonly\")) == 0) SetFloatPointOnly(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if (_tcscmp(pstrName, _T(\"password\")) == 0) SetPasswordMode(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if (_tcscmp(pstrName, _T(\"maxchar\")) == 0) SetMaxChar(_ttoi(pstrValue));\n\t\telse if (_tcscmp(pstrName, _T(\"normalimage\")) == 0) SetNormalImage(pstrValue);\n\t\telse if (_tcscmp(pstrName, _T(\"hotimage\")) == 0) SetHotImage(pstrValue);\n\t\telse if (_tcscmp(pstrName, _T(\"focusedimage\")) == 0) SetFocusedImage(pstrValue);\n\t\telse if (_tcscmp(pstrName, _T(\"disabledimage\")) == 0) SetDisabledImage(pstrValue);\n\t\telse if (_tcscmp(pstrName, _T(\"nativebkcolor\")) == 0) {\n\t\t\tif (*pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetNativeEditBkColor(clrColor);\n\t\t}\n\t\telse CLabelUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CEditUI::PaintStatusImage(HDC hDC)\n\t{\n\t\tif (IsFocused( )) m_uButtonState |= UISTATE_FOCUSED;\n\t\telse m_uButtonState &= ~UISTATE_FOCUSED;\n\t\tif (!IsEnabled( )) m_uButtonState |= UISTATE_DISABLED;\n\t\telse m_uButtonState &= ~UISTATE_DISABLED;\n\n\t\tif ((m_uButtonState & UISTATE_DISABLED) != 0) {\n\t\t\tif (!m_sDisabledImage.IsEmpty( )) {\n\t\t\t\tif (!DrawImage(hDC, (LPCTSTR)m_sDisabledImage)) m_sDisabledImage.Empty( );\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if ((m_uButtonState & UISTATE_FOCUSED) != 0) {\n\t\t\tif (!m_sFocusedImage.IsEmpty( )) {\n\t\t\t\tif (!DrawImage(hDC, (LPCTSTR)m_sFocusedImage)) m_sFocusedImage.Empty( );\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if ((m_uButtonState & UISTATE_HOT) != 0) {\n\t\t\tif (!m_sHotImage.IsEmpty( )) {\n\t\t\t\tif (!DrawImage(hDC, (LPCTSTR)m_sHotImage)) m_sHotImage.Empty( );\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif (!m_sNormalImage.IsEmpty( )) {\n\t\t\tif (!DrawImage(hDC, (LPCTSTR)m_sNormalImage)) m_sNormalImage.Empty( );\n\t\t\telse return;\n\t\t}\n\t}\n\n\tvoid CEditUI::PaintText(HDC hDC)\n\t{\n\t\tif (m_dwTextColor == 0) m_dwTextColor = m_pManager->GetDefaultFontColor( );\n\t\tif (m_dwDisabledTextColor == 0) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor( );\n\t\tCDuiString sText;\n\t\tDWORD dwTextColor = m_dwTextColor;\n\t\tif (m_sText.IsEmpty( ))\n\t\t{\n\t\t\tsText = m_sToolTip;\n\t\t\tdwTextColor = m_dwDisabledTextColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsText = m_sText;\n\t\t\tif (m_bPasswordMode) {\n\t\t\t\tsText.Empty( );\n\t\t\t\tLPCTSTR p = m_sText.GetData( );\n\t\t\t\twhile (*p != _T('\\0')) {\n\t\t\t\t\tsText += m_cPasswordChar;\n\t\t\t\t\tp = ::CharNext(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (sText.IsEmpty( ))\n\t\t\treturn;\n\t\tRECT rc = m_rcItem;\n\t\trc.left += m_rcTextPadding.left;\n\t\trc.right -= m_rcTextPadding.right;\n\t\trc.top += m_rcTextPadding.top;\n\t\trc.bottom -= m_rcTextPadding.bottom;\n\t\tif (IsEnabled( )) {\n\t\t\tCRenderEngine::DrawText(hDC, m_pManager, rc, sText, m_dwTextColor, \\\n\t\t\t\tm_iFont, DT_SINGLELINE | m_uTextStyle);\n\t\t}\n\t\telse {\n\t\t\tCRenderEngine::DrawText(hDC, m_pManager, rc, sText, m_dwDisabledTextColor, \\\n\t\t\t\tm_iFont, DT_SINGLELINE | m_uTextStyle);\n\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Control/UIEdit.h",
    "content": "#ifndef __UIEDIT_H__\n#define __UIEDIT_H__\n#include \"stdafx.h\"\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass CEditWnd;\n\n\tclass UILIB_API CEditUI : public CLabelUI\n\t{\n\t\tfriend class CEditWnd;\n\tpublic:\n\t\tCEditUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\t\tUINT GetControlFlags() const;\n\n\t\tvoid SetEnabled(bool bEnable = true);\n\t\tvoid SetText(LPCTSTR pstrText);\n\t\tvoid SetMaxChar(UINT uMax);\n\t\tUINT GetMaxChar();\n\t\tvoid SetReadOnly(bool bReadOnly);\n\t\tbool IsReadOnly() const;\n\t\tvoid SetPasswordMode(bool bPasswordMode);\n\t\tbool IsPasswordMode() const;\n\t\tvoid SetPasswordChar(TCHAR cPasswordChar);\n\t\tTCHAR GetPasswordChar() const;\n\t\tvoid SetNumberOnly(bool bNumberOnly);\n\t\tbool IsNumberOnly() const;\n\t\tvoid SetFloatPointOnly(bool bFloatOnly);\n\t\tbool IsFloatPointOnly( ) const;\n\t\tint GetWindowStyls() const;\n\n\t\tLPCTSTR GetNormalImage();\n\t\tvoid SetNormalImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetHotImage();\n\t\tvoid SetHotImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetFocusedImage();\n\t\tvoid SetFocusedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetDisabledImage();\n\t\tvoid SetDisabledImage(LPCTSTR pStrImage);\n\t\tvoid SetNativeEditBkColor(DWORD dwBkColor);\n\t\tDWORD GetNativeEditBkColor() const;\n\n\t\tvoid SetSel(long nStartChar, long nEndChar);\n\t\tvoid SetSelAll();\n\t\tvoid SetReplaceSel(LPCTSTR lpszReplace);\n\n\t\tvoid SetPos(RECT rc);\n\t\tvoid SetVisible(bool bVisible = true);\n\t\tvoid SetInnerVisible(bool bVisible = true);\n\t\tSIZE EstimateSize(SIZE szAvailable);\n\t\tvoid DoEvent(TEventUI& event);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvoid PaintStatusImage(HDC hDC);\n\t\tvoid PaintText(HDC hDC);\n\n\tprotected:\n\t\tCEditWnd* m_pWindow;\n\n\t\tUINT m_uMaxChar;\n\t\tbool m_bReadOnly;\n\t\tbool m_bFloatPointOnly;\n\t\tbool m_bPasswordMode;\n\t\tTCHAR m_cPasswordChar;\n\t\tUINT m_uButtonState;\n\t\tCDuiString m_sNormalImage;\n\t\tCDuiString m_sHotImage;\n\t\tCDuiString m_sFocusedImage;\n\t\tCDuiString m_sDisabledImage;\n\t\tDWORD m_dwEditbkColor;\n\t\tunsigned int m_iWindowStyls;\n\t};\n}\n#endif // __UIEDIT_H__"
  },
  {
    "path": "DuiLib/Control/UIFadeButton.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"UIFadeButton.h\"\n\nnamespace DuiLib {\n\n\t//REGIST_DUICLASS(CFadeButtonUI);\n\n\tCFadeButtonUI::CFadeButtonUI() : CUIAnimation( &(*this) ), m_bMouseHove( FALSE ), m_bMouseLeave( FALSE )\n\t{\n\t}\n\n\tCFadeButtonUI::~CFadeButtonUI()\n\t{\n\t\tStopAnimation();\n\t}\n\n\tLPCTSTR CFadeButtonUI::GetClass() const\n\t{\n\t\treturn _T(\"FadeButtonUI\");\n\t}\n\n\tLPVOID CFadeButtonUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"FadeButton\")) == 0 ) \n\t\t\treturn static_cast<CFadeButtonUI*>(this);\n\t\treturn CButtonUI::GetInterface(pstrName);\n\t}\n\n\tvoid CFadeButtonUI::SetNormalImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sNormalImage = pStrImage;\n\t\tm_sLastImage = m_sNormalImage;\n\t}\n\n\tvoid CFadeButtonUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( event.Type == UIEVENT_MOUSEENTER && !IsAnimationRunning( FADE_IN_ID ) )\n\t\t{\n\t\t\tm_bFadeAlpha = 0;\n\t\t\tm_bMouseHove = TRUE;\n\t\t\tStopAnimation( FADE_OUT_ID );\n\t\t\tStartAnimation( FADE_ELLAPSE, FADE_FRAME_COUNT, FADE_IN_ID );\n\t\t\tInvalidate();\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSELEAVE && !IsAnimationRunning( FADE_OUT_ID ) )\n\t\t{\n\t\t\tm_bFadeAlpha = 0;\n\t\t\tm_bMouseLeave = TRUE;\n\t\t\tStopAnimation(FADE_IN_ID);\n\t\t\tStartAnimation(FADE_ELLAPSE, FADE_FRAME_COUNT, FADE_OUT_ID);\n\t\t\tInvalidate();\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_TIMER ) \n\t\t{\n\t\t\tOnTimer(  event.wParam );\n\t\t}\n\t\tCButtonUI::DoEvent( event );\n\t}\n\n\tvoid CFadeButtonUI::OnTimer( int nTimerID )\n\t{\n\t\tOnAnimationElapse( nTimerID );\n\t}\n\n\tvoid CFadeButtonUI::PaintStatusImage(HDC hDC)\n\t{\n\t\tif( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;\n\t\telse m_uButtonState &= ~ UISTATE_FOCUSED;\n\t\tif( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;\n\t\telse m_uButtonState &= ~ UISTATE_DISABLED;\n\n\t\tif( (m_uButtonState & UISTATE_DISABLED) != 0 ) {\n\t\t\tif( !m_sDisabledImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sDisabledImage) ) m_sDisabledImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButtonState & UISTATE_PUSHED) != 0 ) {\n\t\t\tif( !m_sPushedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sPushedImage) ) m_sPushedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButtonState & UISTATE_FOCUSED) != 0 ) {\n\t\t\tif( !m_sFocusedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sFocusedImage) ) m_sFocusedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif( !m_sNormalImage.IsEmpty() ) {\n\t\t\tif( IsAnimationRunning(FADE_IN_ID) || IsAnimationRunning(FADE_OUT_ID))\n\t\t\t{\n\t\t\t\tif( m_bMouseHove )\n\t\t\t\t{\n\t\t\t\t\tm_bMouseHove = FALSE;\n\t\t\t\t\tm_sLastImage = m_sHotImage;\n\t\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sNormalImage) ) \n\t\t\t\t\t\tm_sNormalImage.Empty();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif( m_bMouseLeave )\n\t\t\t\t{\n\t\t\t\t\tm_bMouseLeave = FALSE;\n\t\t\t\t\tm_sLastImage = m_sNormalImage;\n\t\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sHotImage) ) \n\t\t\t\t\t\tm_sHotImage.Empty();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tm_sOldImage = m_sNormalImage;\n\t\t\t\tm_sNewImage = m_sHotImage;\n\t\t\t\tif( IsAnimationRunning(FADE_OUT_ID) )\n\t\t\t\t{\n\t\t\t\t\tm_sOldImage = m_sHotImage;\n\t\t\t\t\tm_sNewImage = m_sNormalImage;\n\t\t\t\t}\n\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sOldImage, NULL, true, 255 - m_bFadeAlpha ) ) \n\t\t\t\t\tm_sOldImage.Empty();\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sNewImage, NULL, true, m_bFadeAlpha ) ) \n\t\t\t\t\tm_sNewImage.Empty();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sLastImage) ) \n\t\t\t\t\tm_sLastImage.Empty();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CFadeButtonUI::OnAnimationStep(INT nTotalFrame, INT nCurFrame, INT nAnimationID)\n\t{\n\t\tm_bFadeAlpha = (BYTE)((nCurFrame / (double)nTotalFrame) * 255);\n\t\tm_bFadeAlpha = m_bFadeAlpha == 0?10:m_bFadeAlpha;\n\t\tInvalidate();\n\t}\n\n} // namespace DuiLib"
  },
  {
    "path": "DuiLib/Control/UIFadeButton.h",
    "content": "#ifndef __UIFADEBUTTON_H__\n#define __UIFADEBUTTON_H__\n\n#include \"UIAnimation.h\"\n#include \"UIButton.h\"\n\n#pragma once\n\nnamespace DuiLib {\n\n\tclass UILIB_API CFadeButtonUI : public CButtonUI, public CUIAnimation\n\t{\n\tpublic:\n\t\tCFadeButtonUI();\n\t\tvirtual ~CFadeButtonUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\t\tvoid SetNormalImage(LPCTSTR pStrImage);\n\n\t\tvoid DoEvent(TEventUI& event);\n\t\tvoid OnTimer( int nTimerID );\n\t\tvoid PaintStatusImage(HDC hDC);\n\n\t\tvirtual void OnAnimationStart(INT nAnimationID, BOOL bFirstLoop) {}\n\t\tvirtual void OnAnimationStep(INT nTotalFrame, INT nCurFrame, INT nAnimationID);\n\t\tvirtual void OnAnimationStop(INT nAnimationID) {}\n\n\tprotected:\n\t\tCDuiString m_sOldImage;\n\t\tCDuiString m_sNewImage;\n\t\tCDuiString m_sLastImage;\n\t\tBYTE       m_bFadeAlpha;\n\t\tBOOL       m_bMouseHove;\n\t\tBOOL       m_bMouseLeave;\n\t\tenum{\n\t\t\tFADE_IN_ID\t\t\t= 8,\n\t\t\tFADE_OUT_ID\t\t\t= 9,\n\n\t\t\tFADE_ELLAPSE\t\t= 10,\n\t\t\tFADE_FRAME_COUNT\t= 30,\n\t\t};\n\t};\n\n} // namespace UiLib\n\n#endif // __UIFADEBUTTON_H__"
  },
  {
    "path": "DuiLib/Control/UIFlash.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIFlash.h\"\n#include <atlcomcli.h>\n\n#define DISPID_FLASHEVENT_FLASHCALL\t ( 0x00C5 )\n#define DISPID_FLASHEVENT_FSCOMMAND\t ( 0x0096 )\n#define DISPID_FLASHEVENT_ONPROGRESS\t( 0x07A6 )\n\nnamespace DuiLib\n{\n\n\tCFlashUI::CFlashUI(void)\n\t\t: m_dwRef(0)\n\t\t, m_dwCookie(0)\n\t\t, m_pFlash(NULL)\n\t\t, m_pFlashEventHandler(NULL)\n\t{\n\t\tCDuiString strFlashCLSID=_T(\"{D27CDB6E-AE6D-11CF-96B8-444553540000}\");\n\t\tOLECHAR szCLSID[100] = { 0 };\n#ifndef _UNICODE\n\t\t::MultiByteToWideChar(::GetACP(), 0, strFlashCLSID, -1, szCLSID, lengthof(szCLSID) - 1);\n#else\n\t\t_tcsncpy(szCLSID, strFlashCLSID, lengthof(szCLSID) - 1);\n#endif\n\t\t::CLSIDFromString(szCLSID, &m_clsid);\n\t}\n\n\tCFlashUI::~CFlashUI(void)\n\t{\n\t\tif (m_pFlashEventHandler)\n\t\t{\n\t\t\tm_pFlashEventHandler->Release();\n\t\t\tm_pFlashEventHandler=NULL;\n\t\t}\n\t\tReleaseControl();\n\t}\n\n\tLPCTSTR CFlashUI::GetClass() const\n\t{\n\t\treturn DUI_CTR_FLASH;\n\t}\n\n\tLPVOID CFlashUI::GetInterface( LPCTSTR pstrName )\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_FLASH) == 0 ) return static_cast<CFlashUI*>(this);\n\t\treturn CActiveXUI::GetInterface(pstrName);\n\t}\n\n\tHRESULT STDMETHODCALLTYPE CFlashUI::GetTypeInfoCount( __RPC__out UINT *pctinfo )\n\t{\n\t\treturn E_NOTIMPL;\n\t}\n\n\tHRESULT STDMETHODCALLTYPE CFlashUI::GetTypeInfo( UINT iTInfo, LCID lcid, __RPC__deref_out_opt ITypeInfo **ppTInfo )\n\t{\n\t\treturn E_NOTIMPL;\n\t}\n\n\tHRESULT STDMETHODCALLTYPE CFlashUI::GetIDsOfNames( __RPC__in REFIID riid, __RPC__in_ecount_full(cNames ) LPOLESTR *rgszNames, UINT cNames, LCID lcid, __RPC__out_ecount_full(cNames) DISPID *rgDispId )\n\t{\n\t\treturn E_NOTIMPL;\n\t}\n\n\tHRESULT STDMETHODCALLTYPE CFlashUI::Invoke( DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr )\n\t{\n\t\tswitch(dispIdMember)\n\t\t{\n\t\tcase DISPID_FLASHEVENT_FLASHCALL:\n\t\t\t{\n\t\t\t\tif (pDispParams->cArgs != 1 || pDispParams->rgvarg[0].vt != VT_BSTR) \n\t\t\t\t\treturn E_INVALIDARG;\n\t\t\t\treturn this->FlashCall(pDispParams->rgvarg[0].bstrVal);\n\t\t\t}\n\t\tcase DISPID_FLASHEVENT_FSCOMMAND:\n\t\t\t{\n\t\t\t\tif( pDispParams && pDispParams->cArgs == 2 )\n\t\t\t\t{\n\t\t\t\t\tif( pDispParams->rgvarg[0].vt == VT_BSTR &&\n\t\t\t\t\t\tpDispParams->rgvarg[1].vt == VT_BSTR )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn FSCommand(pDispParams->rgvarg[1].bstrVal, pDispParams->rgvarg[0].bstrVal);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn DISP_E_TYPEMISMATCH;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn DISP_E_BADPARAMCOUNT;\n\t\t\t\t}\n\t\t\t}\n\t\tcase DISPID_FLASHEVENT_ONPROGRESS:\n\t\t\t{\n\t\t\t\treturn OnProgress(*pDispParams->rgvarg[0].plVal);\n\t\t\t}\n\t\tcase DISPID_READYSTATECHANGE:\n\t\t\t{\n\t\t\t\treturn this->OnReadyStateChange(pDispParams->rgvarg[0].lVal);\n\t\t\t}\n\t\t}\n\n\t\treturn S_OK;\n\t}\n\n\tHRESULT STDMETHODCALLTYPE CFlashUI::QueryInterface( REFIID riid, void **ppvObject )\n\t{\n\t\t*ppvObject = NULL;\n\n\t\tif( riid == IID_IUnknown)\n\t\t\t*ppvObject = static_cast<LPUNKNOWN>(this);\n\t\telse if( riid == IID_IDispatch)\n\t\t\t*ppvObject = static_cast<IDispatch*>(this);\n\t\telse if( riid ==  __uuidof(_IShockwaveFlashEvents))\n\t\t\t*ppvObject = static_cast<_IShockwaveFlashEvents*>(this);\n\n\t\tif( *ppvObject != NULL )\n\t\t\tAddRef();\n\t\treturn *ppvObject == NULL ? E_NOINTERFACE : S_OK;\n\t}\n\n\tULONG STDMETHODCALLTYPE CFlashUI::AddRef( void )\n\t{\n\t\t::InterlockedIncrement(&m_dwRef); \n\t\treturn m_dwRef;\n\t}\n\n\tULONG STDMETHODCALLTYPE CFlashUI::Release( void )\n\t{\n\t\t::InterlockedDecrement(&m_dwRef);\n\t\treturn m_dwRef;\n\t}\n\n\tHRESULT CFlashUI::OnReadyStateChange (long newState)\n\t{\n\t\tif (m_pFlashEventHandler)\n\t\t{\n\t\t\treturn m_pFlashEventHandler->OnReadyStateChange(newState);\n\t\t}\n\t\treturn S_OK;\n\t}\n\n\tHRESULT CFlashUI::OnProgress(long percentDone )\n\t{\n\t\tif (m_pFlashEventHandler)\n\t\t{\n\t\t\treturn m_pFlashEventHandler->OnProgress(percentDone);\n\t\t}\n\t\treturn S_OK;\n\t}\n\n\tHRESULT CFlashUI::FSCommand (_bstr_t command, _bstr_t args)\n\t{\n\t\tif (m_pFlashEventHandler)\n\t\t{\n\t\t\treturn m_pFlashEventHandler->FSCommand(command,args);\n\t\t}\n\t\treturn S_OK;\n\t}\n\n\tHRESULT CFlashUI::FlashCall( _bstr_t request )\n\t{\n\t\tif (m_pFlashEventHandler)\n\t\t{\n\t\t\treturn m_pFlashEventHandler->FlashCall(request);\n\t\t}\n\t\treturn S_OK;\n\t}\n\n\tvoid CFlashUI::ReleaseControl()\n\t{\n\t\t//GetManager()->RemoveTranslateAccelerator(this);\n\t\tRegisterEventHandler(FALSE);\n\t\tif (m_pFlash)\n\t\t{\n\t\t\tm_pFlash->Release();\n\t\t\tm_pFlash=NULL;\n\t\t}\n\t}\n\n\tbool CFlashUI::DoCreateControl()\n\t{\n\t\tif (!CActiveXUI::DoCreateControl())\n\t\t\treturn false;\n\t\t//GetManager()->AddTranslateAccelerator(this);\n\t\tGetControl(__uuidof(IShockwaveFlash),(LPVOID*)&m_pFlash);\n\t\tRegisterEventHandler(TRUE);\n\t\treturn true;\n\t}\n\n\tvoid CFlashUI::SetFlashEventHandler( CFlashEventHandler* pHandler )\n\t{\n\t\tif (m_pFlashEventHandler!=NULL)\n\t\t{\n\t\t\tm_pFlashEventHandler->Release();\n\t\t}\n\t\tif (pHandler==NULL)\n\t\t{\n\t\t\tm_pFlashEventHandler=pHandler;\n\t\t\treturn;\n\t\t}\n\t\tm_pFlashEventHandler=pHandler;\n\t\tm_pFlashEventHandler->AddRef();\n\t}\n\n\tLRESULT CFlashUI::TranslateAccelerator( MSG *pMsg )\n\t{\n\t\tif(pMsg->message < WM_KEYFIRST || pMsg->message > WM_KEYLAST)\n\t\t\treturn S_FALSE;\n\n\t\tif( m_pFlash == NULL )\n\t\t\treturn E_NOTIMPL;\n\n\t\t// ǰWebڲǽ,ټ\n\t\tBOOL bIsChild = FALSE;\n\t\tHWND hTempWnd = NULL;\n\t\tHWND hWndFocus = ::GetFocus();\n\n\t\thTempWnd = hWndFocus;\n\t\twhile(hTempWnd != NULL)\n\t\t{\n\t\t\tif(hTempWnd == m_hwndHost)\n\t\t\t{\n\t\t\t\tbIsChild = TRUE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\thTempWnd = ::GetParent(hTempWnd);\n\t\t}\n\t\tif(!bIsChild)\n\t\t\treturn S_FALSE;\n\n\t\tCComPtr<IOleInPlaceActiveObject> pObj;\n\t\tif (FAILED(m_pFlash->QueryInterface(IID_IOleInPlaceActiveObject, (LPVOID *)&pObj)))\n\t\t\treturn S_FALSE;\n\n\t\tHRESULT hResult = pObj->TranslateAccelerator(pMsg);\n\t\treturn hResult;\n\t}\n\n\tHRESULT CFlashUI::RegisterEventHandler( BOOL inAdvise )\n\t{\n\t\tif (m_pFlash==NULL)\n\t\t\treturn S_FALSE;\n\n\t\tHRESULT hr=S_FALSE;\n\t\tCComPtr<IConnectionPointContainer>  pCPC;\n\t\tCComPtr<IConnectionPoint> pCP;\n\n\t\thr=m_pFlash->QueryInterface(IID_IConnectionPointContainer,(void **)&pCPC);\n\t\tif (FAILED(hr))\n\t\t\treturn hr;\n\t\thr=pCPC->FindConnectionPoint(__uuidof(_IShockwaveFlashEvents),&pCP);\n\t\tif (FAILED(hr))\n\t\t\treturn hr;\n\n\t\tif (inAdvise)\n\t\t{\n\t\t\thr = pCP->Advise((IDispatch*)this, &m_dwCookie);\n\t\t}\n\t\telse\n\t\t{\n\t\t\thr = pCP->Unadvise(m_dwCookie);\n\t\t}\n\t\treturn hr; \n\t}\n\n\tvoid CFlashUI::SetAttribute( LPCTSTR pstrName, LPCTSTR pstrValue )\n\t{\n\t\tif (_tcscmp(pstrName, _T(\"homepage\")) == 0)\n\t\t{\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"autonavi\"))==0)\n\t\t{\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCActiveXUI::SetAttribute(pstrName, pstrValue);\n\t\t}\n\t}\n};\n"
  },
  {
    "path": "DuiLib/Control/UIFlash.h",
    "content": "/*\nڣ\t2012/11/05 15:09:48\nߣ\t\t\tdaviyang35@gmail.com\n\tFlashUI\n*/\n#ifndef __UIFLASH_H__\n#define __UIFLASH_H__\n#pragma once\n// \\Utils\\Flash11.tlb ΪFlash11ӿļַڵͰ汾ڣʹע\n//#import \"..\\Utils/Flash11.tlb\" raw_interfaces_only, named_guids\n//ΪųIDispatchEx: ض壻ͬĻͣIDispatchEx: ض壻ͬĻ͡ȴǽһøΪ\n#import \"..\\Utils/Flash11.tlb\" raw_interfaces_only, named_guids, rename(\"IDispatchEx\",\"IMyDispatchEx\")  \n\n\n\nusing namespace ShockwaveFlashObjects;\n#include \"../Utils/FlashEventHandler.h\"\nclass CActiveXCtrl;\n\nnamespace DuiLib\n{\n\tclass UILIB_API CFlashUI\n\t\t: public CActiveXUI\n\t\t//, public IOleInPlaceSiteWindowless // ͸ģʽͼҪʵӿ\n\t\t, public _IShockwaveFlashEvents\n\t\t, public ITranslateAccelerator\n\t{\n\tpublic:\n\t\tCFlashUI(void);\n\t\t~CFlashUI(void);\n\n\t\tvoid SetFlashEventHandler(CFlashEventHandler* pHandler);\n\t\tvirtual bool DoCreateControl();\n\t\tIShockwaveFlash* m_pFlash;\n\n\tprivate:\n\t\tvirtual LPCTSTR GetClass() const;\n\t\tvirtual LPVOID GetInterface( LPCTSTR pstrName );\n\t\tvirtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount( __RPC__out UINT *pctinfo );\n\t\tvirtual HRESULT STDMETHODCALLTYPE GetTypeInfo( UINT iTInfo, LCID lcid, __RPC__deref_out_opt ITypeInfo **ppTInfo );\n\t\tvirtual HRESULT STDMETHODCALLTYPE GetIDsOfNames( __RPC__in REFIID riid, __RPC__in_ecount_full(cNames ) LPOLESTR *rgszNames, UINT cNames, LCID lcid, __RPC__out_ecount_full(cNames) DISPID *rgDispId);\n\t\tvirtual HRESULT STDMETHODCALLTYPE Invoke( DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr );\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void **ppvObject );\n\t\tvirtual ULONG STDMETHODCALLTYPE AddRef( void );\n\t\tvirtual ULONG STDMETHODCALLTYPE Release( void );\n\n\t\tHRESULT OnReadyStateChange (long newState);\n\t\tHRESULT OnProgress(long percentDone );\n\t\tHRESULT FSCommand (_bstr_t command, _bstr_t args);\n\t\tHRESULT FlashCall (_bstr_t request );\n\n\t\tvirtual void ReleaseControl();\n\t\tHRESULT RegisterEventHandler(BOOL inAdvise);\n\n\t\t// ITranslateAccelerator\n\t\t// DuilibϢַWebBrowser\n\t\tvirtual LRESULT TranslateAccelerator( MSG *pMsg );\n\n\tprivate:\n\t\tLONG m_dwRef;\n\t\tDWORD m_dwCookie;\n\t\tCFlashEventHandler* m_pFlashEventHandler;\n\t};\n}\n\n#endif // __UIFLASH_H__\n"
  },
  {
    "path": "DuiLib/Control/UIHyperlink.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"UIHyperlink.h\"\n\n\nnamespace DuiLib{\n\n\tCHyperLinkUI::CHyperLinkUI()\n\t{\n\t}\n\n\tCHyperLinkUI::~CHyperLinkUI()\n\t{\n\n\t}\n\tLPCTSTR CHyperLinkUI::GetClass() const\n\t{\n\t\treturn _T(\"HyperLinkUI\");\n\t}\n\tLPVOID CHyperLinkUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif (_tcscmp(pstrName, DUI_CTR_HYPERLINK) == 0) return static_cast<CHyperLinkUI*>(this);\n\t\treturn CButtonUI::GetInterface(pstrName);\n\n\t}\n\tvoid CHyperLinkUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t}\n\n\tvoid CHyperLinkUI::SetPos(RECT rc)\n\t{\n\n\t}\n\tvoid CHyperLinkUI::DoInit()\n\t{\n\n\t}\n\tvoid CHyperLinkUI::DoEvent(TEventUI& event)\n\t{\n\n\t}\n\tvoid CHyperLinkUI::DoPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\n\t}\n\n\n}"
  },
  {
    "path": "DuiLib/Control/UIHyperlink.h",
    "content": "#ifndef UI_HYPERLINK_H\n#define UI_HYPERLINK_H\n#pragma once\n\n\nnamespace DuiLib{\n\n\n\tclass UILIB_API CHyperLinkUI : public CButtonUI\n\t{\n\tpublic:\n\t\tCHyperLinkUI();\n\t\tvirtual ~CHyperLinkUI();\n\n\n\t\tvirtual LPCTSTR GetClass() const;\n\t\tvirtual LPVOID GetInterface(LPCTSTR pstrName);\n\t\tvirtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvirtual void SetPos(RECT rc);\n\t\tvirtual void DoInit();\n\t\tvirtual void DoEvent(TEventUI& event);\n\t\tvirtual void DoPaint(HDC hDC, const RECT& rcPaint);\n\n\n\n\n\n\n\t};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n}\n\n\n#endif"
  },
  {
    "path": "DuiLib/Control/UIIpAddress.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIDateTime.h\"\n#include \"UIIpAddress.h\"\n\n#pragma comment( lib, \"ws2_32.lib\" )\n\nDWORD GetLocalIpAddress()\n{\n\tWORD wVersionRequested = MAKEWORD(2, 2);\n\tWSADATA wsaData;\n\tif (WSAStartup(wVersionRequested, &wsaData) != 0)\n\t\treturn 0;\n\tchar local[255] = { 0 };\n\tgethostname(local, sizeof(local));\n\thostent* ph = gethostbyname(local);\n\tif (ph == NULL)\n\t\treturn 0;\n\tin_addr addr;\n\tmemcpy(&addr, ph->h_addr_list[0], sizeof(in_addr));\n\tDWORD dwIP = MAKEIPADDRESS(addr.S_un.S_un_b.s_b1, addr.S_un.S_un_b.s_b2, addr.S_un.S_un_b.s_b3, addr.S_un.S_un_b.s_b4);\n\treturn dwIP;\n}\n\nnamespace DuiLib\n{\n\n\n\tclass CIPAddressWnd : public CWindowWnd\n\t{\n\tpublic:\n\t\tCIPAddressWnd();\n\n\t\tvoid Init(CIPAddressUI* pOwner);\n\t\tRECT CalPos();\n\n\t\tLPCTSTR GetWindowClassName() const;\n\t\tLPCTSTR GetSuperClassName() const;\n\t\tvoid OnFinalMessage(HWND hWnd);\n\n\t\tLRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);\n\t\tLRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\t//LRESULT OnEditChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\n\tprotected:\n\t\tCIPAddressUI* m_pOwner;\n\t\tHBRUSH m_hBkBrush;\n\t\tbool m_bInit;\n\t};\n\n\tCIPAddressWnd::CIPAddressWnd() : m_pOwner(NULL), m_hBkBrush(NULL), m_bInit(false)\n\t{\n\t}\n\n\tvoid CIPAddressWnd::Init(CIPAddressUI* pOwner)\n\t{\n\t\tm_pOwner = pOwner;\n\t\tm_pOwner->m_nIPUpdateFlag = E_IP_NONE;\n\n\t\tif (m_hWnd == NULL)\n\t\t{\n\t\t\tINITCOMMONCONTROLSEX   CommCtrl;\n\t\t\tCommCtrl.dwSize = sizeof(CommCtrl);\n\t\t\tCommCtrl.dwICC = ICC_INTERNET_CLASSES;//ָClass\n\t\t\tif (InitCommonControlsEx(&CommCtrl))\n\t\t\t{\n\t\t\t\tRECT rcPos = CalPos();\n\t\t\t\tUINT uStyle = WS_CHILD | WS_TABSTOP | WS_GROUP;\n\t\t\t\tCreate(m_pOwner->GetManager()->GetPaintWindow(), NULL, uStyle, 0, rcPos);\n\t\t\t}\n\t\t\tSetWindowFont(m_hWnd, m_pOwner->GetManager()->GetFontInfo(m_pOwner->GetFont())->hFont, TRUE);\n\t\t}\n\n\t\tif (m_pOwner->GetText().IsEmpty())\n\t\t\tm_pOwner->m_dwIP = GetLocalIpAddress();\n\n\t\t::SendMessage(m_hWnd, IPM_SETADDRESS, 0, m_pOwner->m_dwIP);\n\t\t::ShowWindow(m_hWnd, SW_SHOW);\n\t\t::SetFocus(m_hWnd);\n\n\n\t\tm_bInit = true;\n\t}\n\n\tRECT CIPAddressWnd::CalPos()\n\t{\n\t\tCDuiRect rcPos = m_pOwner->GetPos();\n\t\treturn rcPos;\n\t}\n\n\tLPCTSTR CIPAddressWnd::GetWindowClassName() const\n\t{\n\t\treturn _T(\"IPAddressWnd\");\n\t}\n\n\tLPCTSTR CIPAddressWnd::GetSuperClassName() const\n\t{\n\t\treturn WC_IPADDRESS;\n\t}\n\n\tvoid CIPAddressWnd::OnFinalMessage(HWND /*hWnd*/)\n\t{\n\t\t// Clear reference and die\n\t\tif (m_hBkBrush != NULL) ::DeleteObject(m_hBkBrush);\n\t\tm_pOwner->m_pWindow = NULL;\n\t\tdelete this;\n\t}\n\n\tLRESULT CIPAddressWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)\n\t{\n\t\tLRESULT lRes = 0;\n\t\tBOOL bHandled = TRUE;\n\t\tif (uMsg == WM_KILLFOCUS)\n\t\t{\n\t\t\tbHandled = TRUE;\n\t\t\treturn 0;\n\t\t\tlRes = OnKillFocus(uMsg, wParam, lParam, bHandled);\n\t\t}\n\t\t// \t\telse if (uMsg == WM_SETFOCUS)\n\t\t// \t\t{\n\t\t// \t\t\tLRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);\n\t\t// \t\t}\n\t\telse if (uMsg == WM_KEYUP && (wParam == VK_DELETE || wParam == VK_BACK))\n\t\t{\n\t\t\tLRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);\n\t\t\tm_pOwner->m_nIPUpdateFlag = E_IP_DELETE;\n\t\t\tm_pOwner->UpdateText(m_pOwner->m_nIPUpdateFlag);\n\t\t\tPostMessage(WM_CLOSE);\n\t\t\treturn lRes;\n\t\t}\n\t\telse if (uMsg == WM_KEYUP && wParam == VK_ESCAPE)\n\t\t{\n\t\t\tLRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);\n\t\t\tm_pOwner->m_nIPUpdateFlag = E_IP_KEEP;\n\t\t\tPostMessage(WM_CLOSE);\n\t\t\treturn lRes;\n\t\t}\n\t\telse if (uMsg == OCM_COMMAND) {\n\t\t\tif (GET_WM_COMMAND_CMD(wParam, lParam) == EN_KILLFOCUS)\n\t\t\t{\n\t\t\t\tlRes = OnKillFocus(uMsg, wParam, lParam, bHandled);\n\t\t\t}\n\t\t}\n\t\t// \t\telse if( uMsg == OCM_COMMAND ) {\n\t\t// \t\t\tif( GET_WM_COMMAND_CMD(wParam, lParam) == EN_CHANGE ) lRes = OnEditChanged(uMsg, wParam, lParam, bHandled);\n\t\t// \t\t\telse if( GET_WM_COMMAND_CMD(wParam, lParam) == EN_UPDATE ) {\n\t\t// \t\t\t\tRECT rcClient;\n\t\t// \t\t\t\t::GetClientRect(m_hWnd, &rcClient);\n\t\t// \t\t\t\t::InvalidateRect(m_hWnd, &rcClient, FALSE);\n\t\t// \t\t\t}\n\t\t// \t\t}\n\t\t\t\t//\telse if( uMsg == WM_KEYDOWN && TCHAR(wParam) == VK_RETURN ) {\n\t\t\t\t// \t\tm_pOwner->GetManager()->SendNotify(m_pOwner, DUI_MSGTYPE_RETURN);\n\t\t\t\t//\t}\n\t\t\t\t// \t\telse if( uMsg == OCM__BASE + WM_CTLCOLOREDIT  || uMsg == OCM__BASE + WM_CTLCOLORSTATIC ) {\n\t\t\t\t// \t\t\tif( m_pOwner->GetNativeEditBkColor() == 0xFFFFFFFF ) return NULL;\n\t\t\t\t// \t\t\t::SetBkMode((HDC)wParam, TRANSPARENT);\n\t\t\t\t// \t\t\tDWORD dwTextColor = m_pOwner->GetTextColor();\n\t\t\t\t// \t\t\t::SetTextColor((HDC)wParam, RGB(GetBValue(dwTextColor),GetGValue(dwTextColor),GetRValue(dwTextColor)));\n\t\t\t\t// \t\t\tif( m_hBkBrush == NULL ) {\n\t\t\t\t// \t\t\t\tDWORD clrColor = m_pOwner->GetNativeEditBkColor();\n\t\t\t\t// \t\t\t\tm_hBkBrush = ::CreateSolidBrush(RGB(GetBValue(clrColor), GetGValue(clrColor), GetRValue(clrColor)));\n\t\t\t\t// \t\t\t}\n\t\t\t\t// \t\t\treturn (LRESULT)m_hBkBrush;\n\t\t\t\t// \t\t}\n\t\telse bHandled = FALSE;\n\t\tif (!bHandled) return CWindowWnd::HandleMessage(uMsg, wParam, lParam);\n\t\treturn lRes;\n\t}\n\n\tLRESULT CIPAddressWnd::OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tHWND hWndFocus = GetFocus();\n\t\twhile (hWndFocus)\n\t\t{\n\t\t\tif (GetFocus() == m_hWnd)\n\t\t\t{\n\t\t\t\tbHandled = TRUE;\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\thWndFocus = GetParent(hWndFocus);\n\t\t}\n\n\t\tLRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);\n\t\tif (m_pOwner->m_nIPUpdateFlag == E_IP_NONE)\n\t\t{\n\t\t\t::SendMessage(m_hWnd, IPM_GETADDRESS, 0, (LPARAM)&m_pOwner->m_dwIP);\n\t\t\tm_pOwner->m_nIPUpdateFlag = E_IP_UPDATE;\n\t\t\tm_pOwner->UpdateText(m_pOwner->m_nIPUpdateFlag);\n\t\t}\n\t\t::ShowWindow(m_hWnd, SW_HIDE);\n\t\t//PostMessage(WM_CLOSE);\n\t\treturn lRes;\n\t}\n\n\t// LRESULT CDateTimeWnd::OnEditChanged(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)\n\t// {\n\t// \tif( !m_bInit ) return 0;\n\t// \tif( m_pOwner == NULL ) return 0;\n\t// \t// Copy text back\n\t// \tint cchLen = ::GetWindowTextLength(m_hWnd) + 1;\n\t// \tLPTSTR pstr = static_cast<LPTSTR>(_alloca(cchLen * sizeof(TCHAR)));\n\t// \tASSERT(pstr);\n\t// \tif( pstr == NULL ) return 0;\n\t// \t::GetWindowText(m_hWnd, pstr, cchLen);\n\t// \tm_pOwner->m_sText = pstr;\n\t// \tm_pOwner->GetManager()->SendNotify(m_pOwner, DUI_MSGTYPE_TEXTCHANGED);\n\t// \treturn 0;\n\t// }\n\n\t//////////////////////////////////////////////////////////////////////////\n\t//\n\tCIPAddressUI::CIPAddressUI()\n\t{\n\t\tm_dwIP = GetLocalIpAddress();\n\t\tm_bReadOnly = false;\n\t\tm_pWindow = NULL;\n\t\tm_nIPUpdateFlag = E_IP_UPDATE;\n\t\tUpdateText(m_nIPUpdateFlag);\t\t// add by:daviyang35 ʼʾIPַ\n\t\tm_nIPUpdateFlag = E_IP_NONE;\n\t}\n\n\tLPCTSTR CIPAddressUI::GetClass() const\n\t{\n\t\treturn _T(\"IPAddressUI\");\n\t}\n\n\tLPVOID CIPAddressUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif (_tcscmp(pstrName, DUI_CTR_IPADDRESS) == 0) return static_cast<CIPAddressUI*>(this);\n\t\treturn CLabelUI::GetInterface(pstrName);\n\t}\n\n\tDWORD CIPAddressUI::GetIP()\n\t{\n\t\treturn m_dwIP;\n\t}\n\n\tvoid CIPAddressUI::SetIP(DWORD dwIP)\n\t{\n\t\tm_dwIP = dwIP;\n\t\tUpdateText(E_IP_UPDATE);\n\t}\n\n\tvoid CIPAddressUI::SetReadOnly(bool bReadOnly)\n\t{\n\t\tm_bReadOnly = bReadOnly;\n\t\tInvalidate();\n\t}\n\n\tbool CIPAddressUI::IsReadOnly() const\n\t{\n\t\treturn m_bReadOnly;\n\t}\n\n\tvoid CIPAddressUI::UpdateText(EIPAddressUpdateFlag updateFlag)\n\t{\n\t\tif (updateFlag == E_IP_DELETE)\n\t\t{\n\t\t\tSetText(_T(\"\"));\n\t\t}\n\t\telse if (updateFlag == E_IP_UPDATE)\n\t\t{\n\t\t\tTCHAR szIP[MAX_PATH] = { 0 };\n\t\t\tin_addr addr;\n\t\t\taddr.S_un.S_addr = m_dwIP;\n\t\t\t_stprintf(szIP, _T(\"%d.%d.%d.%d\"), addr.S_un.S_un_b.s_b4, addr.S_un.S_un_b.s_b3, addr.S_un.S_un_b.s_b2, addr.S_un.S_un_b.s_b1);\n\t\t\tSetText(szIP);\n\t\t}\n\t}\n\n\tvoid CIPAddressUI::DoEvent(TEventUI& event)\n\t{\n\t\tif (!IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND) {\n\t\t\tif (m_pParent != NULL) m_pParent->DoEvent(event);\n\t\t\telse CLabelUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.Type == UIEVENT_SETCURSOR && IsEnabled())\n\t\t{\n\t\t\t::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_IBEAM)));\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_WINDOWSIZE)\n\t\t{\n\t\t\tif (m_pWindow != NULL) m_pManager->SetFocusNeeded(this);\n\t\t}\n\t\tif (event.Type == UIEVENT_SCROLLWHEEL)\n\t\t{\n\t\t\tif (m_pWindow != NULL) return;\n\t\t}\n\t\tif (event.Type == UIEVENT_SETFOCUS && IsEnabled())\n\t\t{\n\t\t\tif (m_pWindow)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tm_pWindow = new CIPAddressWnd();\n\t\t\tASSERT(m_pWindow);\n\t\t\tm_pWindow->Init(this);\n\t\t\tm_pWindow->ShowWindow();\n\t\t}\n\t\tif (event.Type == UIEVENT_KILLFOCUS && IsEnabled())\n\t\t{\n\t\t\tInvalidate();\n\t\t}\n\t\tif (event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK || event.Type == UIEVENT_RBUTTONDOWN)\n\t\t{\n\t\t\tif (IsEnabled()) {\n\t\t\t\tGetManager()->ReleaseCapture();\n\t\t\t\tif (IsFocused() && m_pWindow == NULL)\n\t\t\t\t{\n\t\t\t\t\tm_pWindow = new CIPAddressWnd();\n\t\t\t\t\tASSERT(m_pWindow);\n\t\t\t\t}\n\t\t\t\tif (m_pWindow != NULL)\n\t\t\t\t{\n\t\t\t\t\tm_pWindow->Init(this);\n\t\t\t\t\tm_pWindow->ShowWindow();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_MOUSEMOVE)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_BUTTONUP)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_CONTEXTMENU)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_MOUSEENTER)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_MOUSELEAVE)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tCLabelUI::DoEvent(event);\n\t}\n\n\tvoid CIPAddressUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tCLabelUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n}\n"
  },
  {
    "path": "DuiLib/Control/UIIpAddress.h",
    "content": "#ifndef __UIIPADDRESS_H__\n#define __UIIPADDRESS_H__\n\n#pragma once\n\n//ÿؼһdtstyle\n\n#define  DTUI_TIMEFORMAT\t_T(\"timeformat\")\nnamespace DuiLib\n{\n\t//UpdateFlag\n\tenum EIPAddressUpdateFlag\n\t{\n\t\tE_IP_NONE = 0,\n\t\tE_IP_UPDATE = 1,\n\t\tE_IP_DELETE = 2,\n\t\tE_IP_KEEP = 3\n\t};\n\n\tclass CIPAddressWnd;\n\n\t/// ʱѡؼ\n\tclass UILIB_API CIPAddressUI : public CLabelUI\n\t{\n\t\tfriend class CIPAddressWnd;\n\tpublic:\n\t\tCIPAddressUI();\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tDWORD GetIP();\n\t\tvoid SetIP(DWORD dwIP);\n\n\t\tvoid SetReadOnly(bool bReadOnly);\n\t\tbool IsReadOnly() const;\n\n\t\tvoid UpdateText(EIPAddressUpdateFlag updateFlag);\n\n\t\tvoid DoEvent(TEventUI& event);\n\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\tprotected:\n\t\tDWORD\tm_dwIP;\n\t\tbool       m_bReadOnly;\n\t\tEIPAddressUpdateFlag\t\tm_nIPUpdateFlag;\n\t\tCIPAddressWnd* m_pWindow;\n\t};\n}\n\n#endif // __UIIPADDRESS_H__"
  },
  {
    "path": "DuiLib/Control/UILabel.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"UILabel.h\"\n\n#include <atlconv.h>\n#include <string>\nnamespace DuiLib\n{\n\n\tColor _MakeRGB(int a, Color cl)\n\t{\n\t\treturn Color(a, cl.GetR(), cl.GetG(), cl.GetB());\n\t}\n\n\tColor _MakeRGB(int r, int g, int b)\n\t{\n\t\treturn Color(255, r, g, b);\n\t}\n\n\tCLabelUI::CLabelUI() : m_uTextStyle(DT_VCENTER|DT_LEFT), m_dwTextColor(0), \n\t\tm_dwDisabledTextColor(0),\n\t\tm_iFont(-1),\n\t\tm_bShowHtml(false),\n\t\tm_AutoCalcWidth(false),\n\t\tm_EnableEffect(false),\n\t\tm_TextRenderingHintAntiAlias(TextRenderingHintSystemDefault),\n\t\tm_TransShadow(255),\n\t\tm_TransText(255),\n\t\tm_TransShadow1(255),\n\t\tm_TransText1(255),\n\t\tm_hAlign(DT_LEFT),\n\t\tm_vAlign(DT_CENTER),\n\t\tm_dwTextColor1(0xffffffff),\n\t\tm_dwTextShadowColorA(0xff000000),\n\t\tm_dwTextShadowColorB(0xff000000),\n\t\tm_GradientAngle(0),\n\t\tm_EnabledStroke(false),\n\t\tm_TransStroke(255),\n\t\tm_dwStrokeColor(0),\n\t\tm_EnabledShadow(false),\n\t\tm_GradientLength(0)\n\t{\n\t\tm_ShadowOffset.X\t\t= 0.0f;\n\t\tm_ShadowOffset.Y\t\t= 0.0f;\n\t\tm_ShadowOffset.Width\t= 0.0f;\n\t\tm_ShadowOffset.Height\t= 0.0f;\n\t\t::ZeroMemory(&m_rcTextPadding, sizeof(m_rcTextPadding));\n\t}\n\n\tCLabelUI::~CLabelUI()\n\t{\t\n\t}\n\n\tLPCTSTR CLabelUI::GetClass() const\n\t{\n\t\treturn _T(\"LabelUI\");\n\t}\n\n\tLPVOID CLabelUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"Label\")) == 0 ) return static_cast<CLabelUI*>(this);\n\t\treturn CControlUI::GetInterface(pstrName);\n\t}\n\n\tvoid CLabelUI::SetTextStyle(UINT uStyle)\n\t{\n\t\tm_uTextStyle = uStyle;\n\t\tInvalidate();\n\t}\n\n\tUINT CLabelUI::GetTextStyle() const\n\t{\n\t\treturn m_uTextStyle;\n\t}\n\n\tvoid CLabelUI::SetTextColor(DWORD dwTextColor)\n\t{\n\t\tm_dwTextColor = dwTextColor;\n\t\tInvalidate();\n\t}\n\n\tDWORD CLabelUI::GetTextColor() const\n\t{\n\t\treturn m_dwTextColor;\n\t}\n\n\tvoid CLabelUI::SetDisabledTextColor(DWORD dwTextColor)\n\t{\n\t\tm_dwDisabledTextColor = dwTextColor;\n\t\tInvalidate();\n\t}\n\n\tDWORD CLabelUI::GetDisabledTextColor() const\n\t{\n\t\treturn m_dwDisabledTextColor;\n\t}\n\n\tvoid CLabelUI::SetFont(int index)\n\t{\n\t\tm_iFont = index;\n\t\tInvalidate();\n\t}\n\n\tint CLabelUI::GetFont() const\n\t{\n\t\treturn m_iFont;\n\t}\n\n\tRECT CLabelUI::GetTextPadding() const\n\t{\n\t\treturn m_rcTextPadding;\n\t}\n\n\tvoid CLabelUI::SetTextPadding(RECT rc)\n\t{\n\t\tm_rcTextPadding = rc;\n\t\tInvalidate();\n\t}\n\n\tbool CLabelUI::IsShowHtml()\n\t{\n\t\treturn m_bShowHtml;\n\t}\n\n\tvoid CLabelUI::SetShowHtml(bool bShowHtml)\n\t{\n\t\tif( m_bShowHtml == bShowHtml ) return;\n\n\t\tm_bShowHtml = bShowHtml;\n\t\tInvalidate();\n\t}\n\tbool CLabelUI::IsAutoCalcWidth()\n\t{\n\t\treturn m_AutoCalcWidth;\n\t}\n\n\tvoid CLabelUI::SetAutoCalcWidth(bool _AutoCalcWidth)\n\t{\n\t\tm_AutoCalcWidth = _AutoCalcWidth;\n\t}\n\n\tSIZE CLabelUI::EstimateSize(SIZE szAvailable)\n\t{\n\t\tif (m_AutoCalcWidth)\n\t\t{\n\t\t\tRECT rect = {0};\n\t\t\tHFONT hOldFont = (HFONT)::SelectObject(m_pManager->GetPaintDC(), m_pManager->GetFont(m_iFont));\n\t\t\t::DrawText(m_pManager->GetPaintDC(), m_sText.GetData(), -1, &rect, DT_CALCRECT);\n\t\t\t::SelectObject(m_pManager->GetPaintDC(), hOldFont);\n\t\t\tm_cxyFixed.cx = rect.right - rect.left;\n\t\t}\n\n\t\tif( m_cxyFixed.cy == 0 ) return CSize(m_cxyFixed.cx, m_pManager->GetFontInfo(GetFont())->tm.tmHeight + 4);\n\t\treturn CControlUI::EstimateSize(szAvailable);\n\t}\n\n\tvoid CLabelUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( event.Type == UIEVENT_SETFOCUS ) \n\t\t{\n\t\t\tm_bFocused = true;\n\t\t\treturn;\n\t\t}\n\t\telse if( event.Type == UIEVENT_KILLFOCUS ) \n\t\t{\n\t\t\tm_bFocused = false;\n\t\t\treturn;\n\t\t}\n\t\telse if( event.Type == UIEVENT_MOUSEENTER )\n\t\t{\n\t\t\t// return;\n\t\t}\n\t\telse if( event.Type == UIEVENT_MOUSELEAVE )\n\t\t{\n\t\t\t// return;\n\t\t}\n\t\tCControlUI::DoEvent(event);\n\t}\n\n\tvoid CLabelUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif(( _tcscmp(pstrName, _T(\"align\")) == 0 )||(_tcscmp(pstrName, _T(\"halign\")) == 0)) {\n\t\t\tif( _tcsstr(pstrValue, _T(\"left\")) != NULL ) {\n\t\t\t\tm_uTextStyle &= ~(DT_CENTER | DT_RIGHT);\n\t\t\t\tm_uTextStyle |= DT_LEFT | DT_WORDBREAK;\n\t\t\t}\n\t\t\tif( _tcsstr(pstrValue, _T(\"center\")) != NULL ) {\n\t\t\t\tm_uTextStyle &= ~(DT_LEFT | DT_RIGHT );\n\t\t\t\tm_uTextStyle |= DT_CENTER;\n\t\t\t}\n\t\t\tif( _tcsstr(pstrValue, _T(\"right\")) != NULL ) {\n\t\t\t\tm_uTextStyle &= ~(DT_LEFT | DT_CENTER );\n\t\t\t\tm_uTextStyle |= DT_RIGHT;\n\t\t\t}\n\n\t\t}\n\t\t//----֧valignԵ\n\t\telse if (_tcscmp(pstrName, _T(\"valign\")) == 0) \n\t\t{\n\n\t\t\tif (_tcsstr(pstrValue, _T(\"top\")) != NULL) {\n\t\t\t\tm_uTextStyle &= ~(DT_BOTTOM | DT_VCENTER);\n\t\t\t\tm_uTextStyle |= (DT_TOP);\n\t\t\t}\n\t\t\tif (_tcsstr(pstrValue, _T(\"center\")) != NULL) {\n\t\t\t\tm_uTextStyle &= ~(DT_TOP | DT_BOTTOM);\n\t\t\t\tm_uTextStyle |= (DT_VCENTER | DT_SINGLELINE);\n\t\t\t}\n\t\t\tif (_tcsstr(pstrValue, _T(\"bottom\")) != NULL) {\n\t\t\t\tm_uTextStyle &= ~(DT_TOP | DT_VCENTER);\n\t\t\t\tm_uTextStyle |= (DT_BOTTOM | DT_SINGLELINE);\n\t\t\t}\n\t\t\tif( _tcsstr(pstrValue, _T(\"wrap\")) != NULL ) {\n\t\t\t\tm_uTextStyle |= DT_WORDBREAK;\n\t\t\t}\n\t\t}\n\t\t//\n\t\telse if( _tcscmp(pstrName, _T(\"endellipsis\")) == 0 )\n\t\t{\n\t\t\tif (_tcscmp(pstrValue, _T(\"true\")) == 0)\n\t\t\t{\n\t\t\t\tm_uTextStyle &= ~DT_WORDBREAK;   //DT_WORDBREAKȥDT_WORD_ELLIPSISʧЧ\n\t\t\t\tm_uTextStyle |= DT_END_ELLIPSIS;\n\t\t\t}\n\t\t\telse m_uTextStyle &= ~DT_END_ELLIPSIS;\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"pathellipsis\")) == 0)\n\t\t{\n\t\t\t//ʡԺ滻ַмַȷھηΧڡ ַбܣ\\ַᾡܵıһб֮\n\t\t\tif (_tcscmp(pstrValue, _T(\"true\")) == 0)\n\t\t\t{\n\t\t\t\tm_uTextStyle &= ~DT_WORDBREAK;\n\t\t\t\tm_uTextStyle |= DT_PATH_ELLIPSIS;\n\t\t\t}\n\t\t\telse m_uTextStyle &= ~DT_PATH_ELLIPSIS;\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"font\")) == 0 ) SetFont(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"textcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"disabledtextcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetDisabledTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"textpadding\")) == 0 ) {\n\t\t\tRECT rcTextPadding = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\trcTextPadding.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcTextPadding.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\trcTextPadding.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcTextPadding.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\t\tSetTextPadding(rcTextPadding);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"showhtml\")) == 0 ) SetShowHtml(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\n\t\telse if( _tcscmp(pstrName, _T(\"enabledeffect\")) == 0 ) SetEnabledEffect(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"rhaa\")) == 0 ) SetTextRenderingHintAntiAlias(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"transshadow\")) == 0 ) SetTransShadow(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"transtext\")) == 0 ) SetTransText(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"transshadow1\")) == 0 ) SetTransShadow1(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"transtext1\")) == 0 ) SetTransText1(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"gradientangle\")) == 0 ) SetGradientAngle(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"enabledstroke\")) == 0 ) SetEnabledStroke(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"enabledshadow\")) == 0 ) SetEnabledShadow(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"transstroke\")) == 0 ) SetTransStroke(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"gradientlength\")) == 0 ) SetGradientLength(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"shadowoffset\")) == 0 ){\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tint offsetx = _tcstol(pstrValue, &pstr, 10);\tASSERT(pstr);    \n\t\t\tint offsety = _tcstol(pstr + 1, &pstr, 10);\t\tASSERT(pstr);\n\t\t\tSetShadowOffset(offsetx,offsety);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"textcolor1\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetTextColor1(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"textshadowcolora\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetTextShadowColorA(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"textshadowcolorb\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetTextShadowColorB(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"strokecolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetStrokeColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"autocalcwidth\")) == 0 ) {\n\t\t\tSetAutoCalcWidth(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t}\n\t\telse CControlUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CLabelUI::PaintText(HDC hDC)\n\t{\n\n\t\tif( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor();\n\t\tif( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor();\n\n\t\tRECT rc = m_rcItem;\n\t\trc.left += m_rcTextPadding.left;\n\t\trc.right -= m_rcTextPadding.right;\n\t\trc.top += m_rcTextPadding.top;\n\t\trc.bottom -= m_rcTextPadding.bottom;\n\n\t\tif(!GetEnabledEffect())\n\t\t{\n\t\t\tif( m_sText.IsEmpty() ) return;\n\t\t\tint nLinks = 0;\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tif( m_bShowHtml )\n\t\t\t\t\tCRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, m_dwTextColor, \\\n\t\t\t\t\tNULL, NULL, nLinks, DT_SINGLELINE | m_uTextStyle);\n\t\t\t\telse\n\t\t\t\t\tCRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, m_dwTextColor, \\\n\t\t\t\t\tm_iFont, DT_SINGLELINE | m_uTextStyle);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( m_bShowHtml )\n\t\t\t\t\tCRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, m_dwDisabledTextColor, \\\n\t\t\t\t\tNULL, NULL, nLinks, DT_SINGLELINE | m_uTextStyle);\n\t\t\t\telse\n\t\t\t\t\tCRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, m_dwDisabledTextColor, \\\n\t\t\t\t\tm_iFont, DT_SINGLELINE | m_uTextStyle);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//gdi+ǷѾ\n\t\t\textern ULONG_PTR g_gdiplusToken;\n\t\t\tif (!g_gdiplusToken)\n\t\t\t{\n#ifdef _DEBUG\n\t\t\t\t//ƹctrl+TԤʱ򣬻ٺؽCPaintManagerUIеgdi+ʼҲرպؽ򿪴˵ԵƹĪʾδʼgdi+\n\t\t\t\t//::MessageBox(GetManager()->GetPaintWindow(), _T(\"GdiPlusδʼ!\"), nullptr, MB_ICONEXCLAMATION);\n#endif // _DEBUG\n\t\t\t\t//return;\n\t\t\t}\n\n\t\t\tFont\tnFont(hDC,m_pManager->GetFont(GetFont()));\n\t\t\tCDuiString TextValue=CControlUI::GetText();\n\t\t\tGraphics nGraphics(hDC);\n\t\t\tnGraphics.SetTextRenderingHint(m_TextRenderingHintAntiAlias);\n\n\t\t\tStringFormat format;\n\t\t\tformat.SetAlignment((StringAlignment)m_hAlign);\n\t\t\tformat.SetLineAlignment((StringAlignment)m_vAlign);\n\n\t\t\tRectF nRc((float)rc.left,(float)rc.top,(float)rc.right-rc.left,(float)rc.bottom-rc.top);\n\t\t\tRectF nShadowRc = nRc;\n\t\t\tnShadowRc.X += m_ShadowOffset.X;\n\t\t\tnShadowRc.Y += m_ShadowOffset.Y;\n\n\t\t\tint nGradientLength\t= GetGradientLength();\n\n\t\t\tif(nGradientLength == 0)\n\t\t\t\tnGradientLength = (rc.bottom-rc.top);\n\n\t\t\tLinearGradientBrush nLineGrBrushA(Point(GetGradientAngle(), 0),Point(0,nGradientLength),_MakeRGB(GetTransShadow(),GetTextShadowColorA()),_MakeRGB(GetTransShadow1(),GetTextShadowColorB() == -1?GetTextShadowColorA():GetTextShadowColorB()));\n\t\t\tLinearGradientBrush nLineGrBrushB(Point(GetGradientAngle(), 0),Point(0,nGradientLength),_MakeRGB(GetTransText(),GetTextColor()),_MakeRGB(GetTransText1(),GetTextColor1() == -1?GetTextColor():GetTextColor1()));\n\n\t\t\tif(GetEnabledStroke() && GetStrokeColor() > 0)\n\t\t\t{\n\n\t\t\t\tLinearGradientBrush nLineGrBrushStroke(Point(GetGradientAngle(),0),Point(0,rc.bottom-rc.top+2),_MakeRGB(GetTransStroke(),GetStrokeColor()),_MakeRGB(GetTransStroke(),GetStrokeColor()));\n\n#ifdef _UNICODE\n\t\t\t\tnRc.Offset(-1,0);\n\t\t\t\tnGraphics.DrawString(TextValue,TextValue.GetLength(),&nFont,nRc,&format,&nLineGrBrushStroke);\n\t\t\t\tnRc.Offset(2,0);\n\t\t\t\tnGraphics.DrawString(TextValue,TextValue.GetLength(),&nFont,nRc,&format,&nLineGrBrushStroke);\n\t\t\t\tnRc.Offset(-1,-1);\n\t\t\t\tnGraphics.DrawString(TextValue,TextValue.GetLength(),&nFont,nRc,&format,&nLineGrBrushStroke);\n\t\t\t\tnRc.Offset(0,2);\n\t\t\t\tnGraphics.DrawString(TextValue,TextValue.GetLength(),&nFont,nRc,&format,&nLineGrBrushStroke);\n\t\t\t\tnRc.Offset(0,-1);\n#else\n\t\t\t\tUSES_CONVERSION;\n\t\t\t\twstring mTextValue = A2W(TextValue.GetData());\n\n\t\t\t\tnRc.Offset(-1,0);\n\t\t\t\tnGraphics.DrawString(mTextValue.c_str(),mTextValue.length(),&nFont,nRc,&format,&nLineGrBrushStroke);\n\t\t\t\tnRc.Offset(2,0);\n\t\t\t\tnGraphics.DrawString(mTextValue.c_str(),mTextValue.length(),&nFont,nRc,&format,&nLineGrBrushStroke);\n\t\t\t\tnRc.Offset(-1,-1);\n\t\t\t\tnGraphics.DrawString(mTextValue.c_str(),mTextValue.length(),&nFont,nRc,&format,&nLineGrBrushStroke);\n\t\t\t\tnRc.Offset(0,2);\n\t\t\t\tnGraphics.DrawString(mTextValue.c_str(),mTextValue.length(),&nFont,nRc,&format,&nLineGrBrushStroke);\n\t\t\t\tnRc.Offset(0,-1);\n#endif\n\n\t\t\t}\n#ifdef _UNICODE\n\t\t\tif(GetEnabledShadow() && (GetTextShadowColorA() > 0 || GetTextShadowColorB() > 0))\n\t\t\t\tnGraphics.DrawString(TextValue,TextValue.GetLength(),&nFont,nShadowRc,&format,&nLineGrBrushA);\n\n\t\t\tnGraphics.DrawString(TextValue,TextValue.GetLength(),&nFont,nRc,&format,&nLineGrBrushB);\n#else\n\t\t\tUSES_CONVERSION;\n\t\t\twstring mTextValue = A2W(TextValue.GetData());\n\n\t\t\tif(GetEnabledShadow() && (GetTextShadowColorA() > 0 || GetTextShadowColorB() > 0))\n\t\t\t\tnGraphics.DrawString(mTextValue.c_str(),mTextValue.length(),&nFont,nShadowRc,&format,&nLineGrBrushA);\n\n\t\t\tnGraphics.DrawString(mTextValue.c_str(),mTextValue.length(),&nFont,nRc,&format,&nLineGrBrushB);\n#endif\n\n\t\t}\n\t}\n\n\tvoid CLabelUI::SetTransShadow( int _TransShadow )\n\t{\n\t\tm_TransShadow = _TransShadow;\n\t}\n\n\tint CLabelUI::GetTransShadow()\n\t{\n\t\treturn m_TransShadow;\n\t}\n\n\tvoid CLabelUI::SetTextRenderingHintAntiAlias( int _TextRenderingHintAntiAlias )\n\t{\n\n\t\tif(_TextRenderingHintAntiAlias < 0 || _TextRenderingHintAntiAlias > 5)\n\t\t\t_TextRenderingHintAntiAlias = 0;\n\t\tm_TextRenderingHintAntiAlias = (TextRenderingHint)_TextRenderingHintAntiAlias;\n\n\t}\n\n\tint CLabelUI::GetTextRenderingHintAntiAlias()\n\t{\n\t\treturn m_TextRenderingHintAntiAlias;\n\t}\n\n\tvoid CLabelUI::SetShadowOffset( int _offset,int _angle )\n\t{\n\n\t\tif(_angle > 180 || _angle < -180)\n\t\t\treturn;\n\n\t\tRECT rc = m_rcItem;\n\n\t\tif(_angle >= 0 && _angle <= 180)\n\t\t\trc.top -= _offset;\n\t\telse if(_angle > -180 && _angle < 0)\n\t\t\trc.top += _offset;\n\n\t\tif(_angle > -90 && _angle <= 90)\n\t\t\trc.left -= _offset;\n\t\telse if( _angle > 90 || _angle < -90)\n\t\t\trc.left += _offset;\n\n\t\tm_ShadowOffset.X = (float)rc.top;\n\t\tm_ShadowOffset.Y = (float)rc.left;\n\t}\n\n\n\tRectF CLabelUI::GetShadowOffset()\n\t{\n\t\treturn m_ShadowOffset;\n\t}\n\n\tvoid CLabelUI::SetEnabledEffect( bool _EnabledEffect )\n\t{\n\t\tm_EnableEffect = _EnabledEffect;\n\t}\n\n\tbool CLabelUI::GetEnabledEffect()\n\t{\n\n\t\treturn m_EnableEffect;\n\n\t}\n\n\tvoid CLabelUI::SetTextColor1( DWORD _TextColor1 )\n\t{\n\n\t\tm_dwTextColor1\t= _TextColor1;\n\n\t}\n\n\tDWORD CLabelUI::GetTextColor1()\n\t{\n\t\treturn m_dwTextColor1;\n\t}\n\n\tvoid CLabelUI::SetTextShadowColorA( DWORD _TextShadowColorA )\n\t{\n\t\tm_dwTextShadowColorA = _TextShadowColorA;\n\t}\n\n\n\tDWORD CLabelUI::GetTextShadowColorA()\n\t{\n\t\treturn m_dwTextShadowColorA;\n\t}\n\n\n\tvoid CLabelUI::SetTextShadowColorB( DWORD _TextShadowColorB )\n\t{\n\t\tm_dwTextShadowColorB = _TextShadowColorB;\n\t}\n\n\tDWORD CLabelUI::GetTextShadowColorB()\n\t{\n\t\treturn m_dwTextShadowColorB;\n\t}\n\n\tvoid CLabelUI::SetTransText( int _TransText )\n\t{\n\t\tm_TransText = _TransText;\n\t}\n\n\tint CLabelUI::GetTransText()\n\t{\n\t\treturn m_TransText;\n\t}\n\n\tvoid CLabelUI::SetTransShadow1( int _TransShadow )\n\t{\n\t\tm_TransShadow1\t= _TransShadow;\n\t}\n\n\tint CLabelUI::GetTransShadow1()\n\t{\n\t\treturn m_TransShadow1;\n\t}\n\n\tvoid CLabelUI::SetTransText1( int _TransText )\n\t{\n\t\tm_TransText1\t= _TransText;\n\t}\n\n\tint CLabelUI::GetTransText1()\n\t{\n\t\treturn m_TransText1;\n\t}\n\n\tvoid CLabelUI::SetGradientAngle( int _SetGradientAngle )\n\t{\n\t\tm_GradientAngle\t= _SetGradientAngle;\n\t}\n\n\n\tint CLabelUI::GetGradientAngle()\n\t{\n\t\treturn m_GradientAngle;\n\t}\n\n\n\tvoid CLabelUI::SetEnabledStroke( bool _EnabledStroke )\n\t{\n\t\tm_EnabledStroke = _EnabledStroke;\n\t}\n\n\tbool CLabelUI::GetEnabledStroke()\n\t{\n\t\treturn m_EnabledStroke;\n\t}\n\n\tvoid CLabelUI::SetTransStroke( int _TransStroke )\n\t{\n\t\tm_TransStroke = _TransStroke;\n\t}\n\n\tint CLabelUI::GetTransStroke()\n\t{\n\t\treturn m_TransStroke;\n\t}\n\n\tvoid CLabelUI::SetStrokeColor( DWORD _StrokeColor )\n\t{\n\t\tm_dwStrokeColor = _StrokeColor;\n\t}\n\n\n\tDWORD CLabelUI::GetStrokeColor()\n\t{\n\t\treturn m_dwStrokeColor;\n\t}\n\n\tvoid CLabelUI::SetEnabledShadow( bool _EnabledShadowe )\n\t{\n\t\tm_EnabledShadow = _EnabledShadowe;\n\t}\n\n\tbool CLabelUI::GetEnabledShadow()\n\t{\n\t\treturn m_EnabledShadow;\n\t}\n\n\tvoid CLabelUI::SetGradientLength( int _GradientLength )\n\t{\n\t\tm_GradientLength\t= _GradientLength;\n\t}\n\n\tint CLabelUI::GetGradientLength()\n\t{\n\t\treturn m_GradientLength;\n\t}\n\n}"
  },
  {
    "path": "DuiLib/Control/UILabel.h",
    "content": "#ifndef __UILABEL_H__\n#define __UILABEL_H__\n\n#pragma once\n#include <gdiplus.h>\nusing namespace Gdiplus;\nclass UILIB_API Gdiplus::RectF;\n\nnamespace DuiLib\n{\n\tclass UILIB_API CLabelUI : public CControlUI\n\t{\n\tpublic:\n\t\tCLabelUI();\n\t\t~CLabelUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tvoid SetTextStyle(UINT uStyle);\n\t\tUINT GetTextStyle() const;\n\t\tvoid SetTextColor(DWORD dwTextColor);\n\t\tDWORD GetTextColor() const;\n\t\tvoid SetDisabledTextColor(DWORD dwTextColor);\n\t\tDWORD GetDisabledTextColor() const;\n\t\tvoid SetFont(int index);\n\t\tint GetFont() const;\n\t\tRECT GetTextPadding() const;\n\t\tvoid SetTextPadding(RECT rc);\n\t\tbool IsShowHtml();\n\t\tvoid SetShowHtml(bool bShowHtml = true);\n\t\tbool\t\tIsAutoCalcWidth();\n\t\tvoid\t\tSetAutoCalcWidth(bool bautoCalcWidth);\n\n\t\tSIZE EstimateSize(SIZE szAvailable);\n\t\tvoid DoEvent(TEventUI& event);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvoid PaintText(HDC hDC);\n\n\t\tvoid\t\tSetEnabledEffect(bool _EnabledEffect);\n\t\tbool\t\tGetEnabledEffect();\n\t\tvoid\t\tSetTransShadow(int _TransShadow);\n\t\tint\t\t\tGetTransShadow();\n\t\tvoid\t\tSetTransShadow1(int _TransShadow);\n\t\tint\t\t\tGetTransShadow1();\n\t\tvoid\t\tSetTransText(int _TransText);\n\t\tint\t\t\tGetTransText();\n\t\tvoid\t\tSetTransText1(int _TransText);\n\t\tint\t\t\tGetTransText1();\n\t\tvoid\t\tSetTransStroke(int _TransStroke);\n\t\tint\t\t\tGetTransStroke();\n\t\tvoid\t\tSetGradientLength(int _GradientLength);\n\t\tint\t\t\tGetGradientLength();\n\t\tvoid\t\tSetTextRenderingHintAntiAlias(int _TextRenderingHintAntiAlias);\n\t\tint\t\t\tGetTextRenderingHintAntiAlias();\n\t\tvoid\t\tSetShadowOffset(int _offset,int _angle);\n\t\tGdiplus::RectF\t\tGetShadowOffset();\n\t\tvoid\t\tSetTextColor1(DWORD _TextColor1);\n\t\tDWORD\t\tGetTextColor1();\n\t\tvoid\t\tSetTextShadowColorA(DWORD _TextShadowColorA);\n\t\tDWORD\t\tGetTextShadowColorA();\n\t\tvoid\t\tSetTextShadowColorB(DWORD _TextShadowColorB);\n\t\tDWORD\t\tGetTextShadowColorB();\n\t\tvoid\t\tSetStrokeColor(DWORD _StrokeColor);\n\t\tDWORD\t\tGetStrokeColor();\n\t\tvoid\t\tSetGradientAngle(int _SetGradientAngle);\n\t\tint\t\t\tGetGradientAngle();\n\t\tvoid\t\tSetEnabledStroke(bool _EnabledStroke);\n\t\tbool\t\tGetEnabledStroke();\n\t\tvoid\t\tSetEnabledShadow(bool _EnabledShadowe);\n\t\tbool\t\tGetEnabledShadow();\n\n\tprotected:\n\t\tDWORD\tm_dwTextColor;\n\t\tDWORD\tm_dwDisabledTextColor;\n\t\tint\t\tm_iFont;\n\t\tUINT\tm_uTextStyle;\n\t\tRECT\tm_rcTextPadding;\n\t\tbool\tm_bShowHtml;\n\t\tbool\t\t\t\t\tm_AutoCalcWidth;\n\n\t\tint\t\t\t\t\t\tm_hAlign;\n\t\tint\t\t\t\t\t\tm_vAlign;\n\t\tint\t\t\t\t\t\tm_TransShadow;\n\t\tint\t\t\t\t\t\tm_TransShadow1;\n\t\tint\t\t\t\t\t\tm_TransText;\n\t\tint\t\t\t\t\t\tm_TransText1;\n\t\tint\t\t\t\t\t\tm_TransStroke;\n\t\tint\t\t\t\t\t\tm_GradientLength;\n\t\tint\t\t\t\t\t\tm_GradientAngle;\n\t\tbool\t\t\t\t\tm_EnableEffect;\n\t\tbool\t\t\t\t\tm_EnabledStroke;\n\t\tbool\t\t\t\t\tm_EnabledShadow;\n\t\tDWORD\t\t\t\t\tm_dwTextColor1;\n\t\tDWORD\t\t\t\t\tm_dwTextShadowColorA;\n\t\tDWORD\t\t\t\t\tm_dwTextShadowColorB;\n\t\tDWORD\t\t\t\t\tm_dwStrokeColor;\n\t\tGdiplus::RectF\t\t\tm_ShadowOffset;\n\t\t//\t\tCDuiString\t\t\t\tm_TextValue; //Ч,\n\t\tTextRenderingHint\t\tm_TextRenderingHintAntiAlias;\n\t};\n}\n\n#endif // __UILABEL_H__"
  },
  {
    "path": "DuiLib/Control/UIList.cpp",
    "content": "#include \"StdAfx.h\"\n\nnamespace DuiLib {\n\n\tCListUI::CListUI() : m_pCallback(NULL), m_bScrollSelect(false), m_iCurSel(-1), m_iExpandedItem(-1), m_pList(NULL), m_pHeader(NULL)\n\t{\n\t\tm_pList = new CListBodyUI(this);\n\t\tm_pHeader = new CListHeaderUI;\n\n\t\tAdd(m_pHeader);\n\t\tCVerticalLayoutUI::Add(m_pList);\n\n\t\tm_ListInfo.nColumns = 0;\n\t\tm_ListInfo.nFont = -1;\n\t\tm_ListInfo.m_uItemTextStyle = DT_VCENTER; // m_uTextStyle(DT_VCENTER | DT_END_ELLIPSIS)\n\t\tm_ListInfo.dwTextColor = 0xFF000000;\n\t\tm_ListInfo.dwBkColor = 0;\n\t\tm_ListInfo.bAlternateBk = false;\n\t\tm_ListInfo.dwSelectedTextColor = 0xFF000000;\n\t\tm_ListInfo.dwSelectedBkColor = 0xFFC1E3FF;\n\t\tm_ListInfo.dwHotTextColor = 0xFF000000;\n\t\tm_ListInfo.dwHotBkColor = 0xFFE9F5FF;\n\t\tm_ListInfo.dwDisabledTextColor = 0xFFCCCCCC;\n\t\tm_ListInfo.dwDisabledBkColor = 0xFFFFFFFF;\n\t\tm_ListInfo.dwLineColor = 0;\n\t\tm_ListInfo.bShowHtml = false;\n\t\tm_ListInfo.bMultiExpandable = false;\n\t\t::ZeroMemory(&m_ListInfo.rcTextPadding, sizeof(m_ListInfo.rcTextPadding));\n\t\t::ZeroMemory(&m_ListInfo.rcColumn, sizeof(m_ListInfo.rcColumn));\n\t}\n\n\tCListUI::~CListUI()\n\t{\n\t\t//scenic:еĿؼӦûԶͷţɾ\n\t\t/*if (m_pList!=NULL )\n\t\t{\n\t\tdelete m_pList;\n\t\t}\n\n\t\tif (m_pHeader!=NULL)\n\t\t{\n\t\tdelete m_pHeader;\n\t\t}*/\n\t}\n\tLPCTSTR CListUI::GetClass() const\n\t{\n\t\treturn _T(\"ListUI\");\n\t}\n\n\tUINT CListUI::GetControlFlags() const\n\t{\n\t\treturn UIFLAG_TABSTOP;\n\t}\n\n\tLPVOID CListUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_LIST) == 0 ) return static_cast<CListUI*>(this);\n\t\tif( _tcscmp(pstrName, _T(\"IList\")) == 0 ) return static_cast<IListUI*>(this);\n\t\tif( _tcscmp(pstrName, _T(\"IListOwner\")) == 0 ) return static_cast<IListOwnerUI*>(this);\n\t\treturn CVerticalLayoutUI::GetInterface(pstrName);\n\t}\n\n\tCControlUI* CListUI::GetItemAt(int iIndex) const\n\t{\n\t\treturn m_pList->GetItemAt(iIndex);\n\t}\n\n\tint CListUI::GetItemIndex(CControlUI* pControl) const\n\t{\n\t\tif( pControl->GetInterface(_T(\"ListHeader\")) != NULL ) return CVerticalLayoutUI::GetItemIndex(pControl);\n\t\t// We also need to recognize header sub-items\n\t\tif( _tcsstr(pControl->GetClass(), _T(\"ListHeaderItemUI\")) != NULL ) return m_pHeader->GetItemIndex(pControl);\n\n\t\treturn m_pList->GetItemIndex(pControl);\n\t}\n\n\tbool CListUI::SetItemIndex(CControlUI* pControl, int iIndex)\n\t{\n\t\tif( pControl->GetInterface(_T(\"ListHeader\")) != NULL ) return CVerticalLayoutUI::SetItemIndex(pControl, iIndex);\n\t\t// We also need to recognize header sub-items\n\t\tif( _tcsstr(pControl->GetClass(), _T(\"ListHeaderItemUI\")) != NULL ) return m_pHeader->SetItemIndex(pControl, iIndex);\n\n\t\tint iOrginIndex = m_pList->GetItemIndex(pControl);\n\t\tif( iOrginIndex == -1 ) return false;\n\t\tif( iOrginIndex == iIndex ) return true;\n\n\t\tIListItemUI* pSelectedListItem = NULL;\n\t\tif( m_iCurSel >= 0 ) pSelectedListItem = \n\t\t\tstatic_cast<IListItemUI*>(GetItemAt(m_iCurSel)->GetInterface(_T(\"ListItem\")));\n\t\tif( !m_pList->SetItemIndex(pControl, iIndex) ) return false;\n\t\tint iMinIndex = min(iOrginIndex, iIndex);\n\t\tint iMaxIndex = max(iOrginIndex, iIndex);\n\t\tfor(int i = iMinIndex; i < iMaxIndex + 1; ++i) {\n\t\t\tCControlUI* p = m_pList->GetItemAt(i);\n\t\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(p->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pListItem != NULL ) {\n\t\t\t\tpListItem->SetIndex(i);\n\t\t\t}\n\t\t}\n\t\tif( m_iCurSel >= 0 && pSelectedListItem != NULL ) m_iCurSel = pSelectedListItem->GetIndex();\n\t\treturn true;\n\t}\n\n\tint CListUI::GetCount() const\n\t{\n\t\treturn m_pList->GetCount();\n\t}\n\n\tbool CListUI::Add(CControlUI* pControl)\n\t{\n\t\t// Override the Add() method so we can add items specifically to\n\t\t// the intended widgets. Headers are assumed to be\n\t\t// answer the correct interface so we can add multiple list headers.\n\t\tif( pControl->GetInterface(_T(\"ListHeader\")) != NULL ) {\n\t\t\tif( m_pHeader != pControl && m_pHeader->GetCount() == 0 ) {\n\t\t\t\tCVerticalLayoutUI::Remove(m_pHeader);\n\t\t\t\tm_pHeader = static_cast<CListHeaderUI*>(pControl);\n\t\t\t}\n\t\t\tm_ListInfo.nColumns = MIN(m_pHeader->GetCount(), UILIST_MAX_COLUMNS);\n\t\t\treturn CVerticalLayoutUI::AddAt(pControl, 0);\n\t\t}\n\t\t// We also need to recognize header sub-items\n\t\tif( _tcsstr(pControl->GetClass(), _T(\"ListHeaderItemUI\")) != NULL ) {\n\t\t\tbool ret = m_pHeader->Add(pControl);\n\t\t\tm_ListInfo.nColumns = MIN(m_pHeader->GetCount(), UILIST_MAX_COLUMNS);\n\t\t\treturn ret;\n\t\t}\n\t\t// The list items should know about us\n\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\tif( pListItem != NULL ) {\n\t\t\tpListItem->SetOwner(this);\n\t\t\tpListItem->SetIndex(GetCount());\n\t\t}\n\t\treturn m_pList->Add(pControl);\n\t}\n\n\tbool CListUI::AddAt(CControlUI* pControl, int iIndex)\n\t{\n\t\t// Override the AddAt() method so we can add items specifically to\n\t\t// the intended widgets. Headers and are assumed to be\n\t\t// answer the correct interface so we can add multiple list headers.\n\t\tif( pControl->GetInterface(_T(\"ListHeader\")) != NULL ) {\n\t\t\tif( m_pHeader != pControl && m_pHeader->GetCount() == 0 ) {\n\t\t\t\tCVerticalLayoutUI::Remove(m_pHeader);\n\t\t\t\tm_pHeader = static_cast<CListHeaderUI*>(pControl);\n\t\t\t}\n\t\t\tm_ListInfo.nColumns = MIN(m_pHeader->GetCount(), UILIST_MAX_COLUMNS);\n\t\t\treturn CVerticalLayoutUI::AddAt(pControl, 0);\n\t\t}\n\t\t// We also need to recognize header sub-items\n\t\tif( _tcsstr(pControl->GetClass(), _T(\"ListHeaderItemUI\")) != NULL ) {\n\t\t\tbool ret = m_pHeader->AddAt(pControl, iIndex);\n\t\t\tm_ListInfo.nColumns = MIN(m_pHeader->GetCount(), UILIST_MAX_COLUMNS);\n\t\t\treturn ret;\n\t\t}\n\t\tif (!m_pList->AddAt(pControl, iIndex)) return false;\n\n\t\t// The list items should know about us\n\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\tif( pListItem != NULL ) {\n\t\t\tpListItem->SetOwner(this);\n\t\t\tpListItem->SetIndex(iIndex);\n\t\t}\n\n\t\tfor(int i = iIndex + 1; i < m_pList->GetCount(); ++i) {\n\t\t\tCControlUI* p = m_pList->GetItemAt(i);\n\t\t\tpListItem = static_cast<IListItemUI*>(p->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pListItem != NULL ) {\n\t\t\t\tpListItem->SetIndex(i);\n\t\t\t}\n\t\t}\n\t\tif( m_iCurSel >= iIndex ) m_iCurSel += 1;\n\t\treturn true;\n\t}\n\n\tbool CListUI::Remove(CControlUI* pControl)\n\t{\n\t\tif( pControl->GetInterface(_T(\"ListHeader\")) != NULL ) return CVerticalLayoutUI::Remove(pControl);\n\t\t// We also need to recognize header sub-items\n\t\tif( _tcsstr(pControl->GetClass(), _T(\"ListHeaderItemUI\")) != NULL ) return m_pHeader->Remove(pControl);\n\n\t\tint iIndex = m_pList->GetItemIndex(pControl);\n\t\tif (iIndex == -1) return false;\n\n\t\tif (!m_pList->RemoveAt(iIndex)) return false;\n\n\t\tfor(int i = iIndex; i < m_pList->GetCount(); ++i) {\n\t\t\tCControlUI* p = m_pList->GetItemAt(i);\n\t\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(p->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pListItem != NULL ) {\n\t\t\t\tpListItem->SetIndex(i);\n\t\t\t}\n\t\t}\n\n\t\tif( iIndex == m_iCurSel && m_iCurSel >= 0 ) {\n\t\t\tint iSel = m_iCurSel;\n\t\t\tm_iCurSel = -1;\n\t\t\tSelectItem(FindSelectable(iSel, false));\n\t\t}\n\t\telse if( iIndex < m_iCurSel ) m_iCurSel -= 1;\n\t\treturn true;\n\t}\n\n\tbool CListUI::RemoveAt(int iIndex)\n\t{\n\t\tif (!m_pList->RemoveAt(iIndex)) return false;\n\n\t\tfor(int i = iIndex; i < m_pList->GetCount(); ++i) {\n\t\t\tCControlUI* p = m_pList->GetItemAt(i);\n\t\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(p->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pListItem != NULL ) pListItem->SetIndex(i);\n\t\t}\n\n\t\tif( iIndex == m_iCurSel && m_iCurSel >= 0 ) {\n\t\t\tint iSel = m_iCurSel;\n\t\t\tm_iCurSel = -1;\n\t\t\tSelectItem(FindSelectable(iSel, false));\n\t\t}\n\t\telse if( iIndex < m_iCurSel ) m_iCurSel -= 1;\n\t\treturn true;\n\t}\n\n\tvoid CListUI::RemoveAll()\n\t{\n\t\tm_iCurSel = -1;\n\t\tm_iExpandedItem = -1;\n\t\tm_pList->RemoveAll();\n\t}\n\n\tvoid CListUI::SetPos(RECT rc)\n\t{\n\t\tCVerticalLayoutUI::SetPos(rc);\n\t\tif( m_pHeader == NULL ) return;\n\t\t// Determine general list information and the size of header columns\n\t\tm_ListInfo.nColumns = MIN(m_pHeader->GetCount(), UILIST_MAX_COLUMNS);\n\t\t// The header/columns may or may not be visible at runtime. In either case\n\t\t// we should determine the correct dimensions...\n\n\t\tif( !m_pHeader->IsVisible() ) {\n\t\t\tfor( int it = 0; it < m_pHeader->GetCount(); it++ ) {\n\t\t\t\tstatic_cast<CControlUI*>(m_pHeader->GetItemAt(it))->SetInnerVisible(true);\n\t\t\t}\n\t\t\tm_pHeader->SetPos(CDuiRect(rc.left, 0, rc.right, 0));\n\t\t}\n\t\tint iOffset = m_pList->GetScrollPos().cx;\n\t\tfor( int i = 0; i < m_ListInfo.nColumns; i++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_pHeader->GetItemAt(i));\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) continue;\n\n\t\t\tRECT rcPos = pControl->GetPos();\n\t\t\tif( iOffset > 0 ) {\n\t\t\t\trcPos.left -= iOffset;\n\t\t\t\trcPos.right -= iOffset;\n\t\t\t\tpControl->SetPos(rcPos);\n\t\t\t}\n\t\t\tm_ListInfo.rcColumn[i] = pControl->GetPos();\n\t\t}\n\t\tif( !m_pHeader->IsVisible() ) {\n\t\t\tfor( int it = 0; it < m_pHeader->GetCount(); it++ ) {\n\t\t\t\tstatic_cast<CControlUI*>(m_pHeader->GetItemAt(it))->SetInnerVisible(false);\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CListUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pParent != NULL ) m_pParent->DoEvent(event);\n\t\t\telse CVerticalLayoutUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_SETFOCUS ) \n\t\t{\n\t\t\tm_bFocused = true;\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_KILLFOCUS ) \n\t\t{\n\t\t\tm_bFocused = false;\n\t\t\treturn;\n\t\t}\n\n\t\tswitch( event.Type ) {\n\t\tcase UIEVENT_KEYDOWN:\n\t\t\tswitch( event.chKey ) {\n\t\t\tcase VK_UP:\n\t\t\t\tSelectItem(FindSelectable(m_iCurSel - 1, false), true);\n\t\t\t\treturn;\n\t\t\tcase VK_DOWN:\n\t\t\t\tSelectItem(FindSelectable(m_iCurSel + 1, true), true);\n\t\t\t\treturn;\n\t\t\tcase VK_PRIOR:\n\t\t\t\tPageUp();\n\t\t\t\treturn;\n\t\t\tcase VK_NEXT:\n\t\t\t\tPageDown();\n\t\t\t\treturn;\n\t\t\tcase VK_HOME:\n\t\t\t\tSelectItem(FindSelectable(0, false), true);\n\t\t\t\treturn;\n\t\t\tcase VK_END:\n\t\t\t\tSelectItem(FindSelectable(GetCount() - 1, true), true);\n\t\t\t\treturn;\n\t\t\tcase VK_RETURN:\n\t\t\t\tif( m_iCurSel != -1 ) GetItemAt(m_iCurSel)->Activate();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase UIEVENT_SCROLLWHEEL:\n\t\t\t{\n\t\t\t\tswitch( LOWORD(event.wParam) ) {\n\t\t\t\tcase SB_LINEUP:\n\t\t\t\t\tif( m_bScrollSelect ) SelectItem(FindSelectable(m_iCurSel - 1, false), true);\n\t\t\t\t\telse LineUp();\n\t\t\t\t\treturn;\n\t\t\t\tcase SB_LINEDOWN:\n\t\t\t\t\tif( m_bScrollSelect ) SelectItem(FindSelectable(m_iCurSel + 1, true), true);\n\t\t\t\t\telse LineDown();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tCVerticalLayoutUI::DoEvent(event);\n\t}\n\n\tCListHeaderUI* CListUI::GetHeader() const\n\t{\n\t\treturn m_pHeader;\n\t}\n\n\tCContainerUI* CListUI::GetList() const\n\t{\n\t\treturn m_pList;\n\t}\n\n\tbool CListUI::GetScrollSelect()\n\t{\n\t\treturn m_bScrollSelect;\n\t}\n\n\tvoid CListUI::SetScrollSelect(bool bScrollSelect)\n\t{\n\t\tm_bScrollSelect = bScrollSelect;\n\t}\n\n\tint CListUI::GetCurSel() const\n\t{\n\t\treturn m_iCurSel;\n\t}\n\n\tbool CListUI::SelectItem(int iIndex, bool bTakeFocus)\n\t{\n\t\tif( iIndex == m_iCurSel ) return true;\n\n\t\tint iOldSel = m_iCurSel;\n\t\t// We should first unselect the currently selected item\n\t\tif( m_iCurSel >= 0 ) {\n\t\t\tCControlUI* pControl = GetItemAt(m_iCurSel);\n\t\t\tif( pControl != NULL) {\n\t\t\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\t\t\tif( pListItem != NULL ) pListItem->Select(false);\n\t\t\t}\n\n\t\t\tm_iCurSel = -1;\n\t\t}\n\t\tif( iIndex < 0 ) return false;\n\n\t\tCControlUI* pControl = GetItemAt(iIndex);\n\t\tif( pControl == NULL ) return false;\n\t\tif( !pControl->IsVisible() ) return false;\n\t\tif( !pControl->IsEnabled() ) return false;\n\n\t\tIListItemUI* pListItem = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\tif( pListItem == NULL ) return false;\n\t\tm_iCurSel = iIndex;\n\t\tif( !pListItem->Select(true) ) {\n\t\t\tm_iCurSel = -1;\n\t\t\treturn false;\n\t\t}\n\t\tEnsureVisible(m_iCurSel);\n\t\tif( bTakeFocus ) pControl->SetFocus();\n\t\tif( m_pManager != NULL ) {\n\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_ITEMSELECT, m_iCurSel, iOldSel);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tTListInfoUI* CListUI::GetListInfo()\n\t{\n\t\treturn &m_ListInfo;\n\t}\n\n\tint CListUI::GetChildPadding() const\n\t{\n\t\treturn m_pList->GetChildPadding();\n\t}\n\n\tvoid CListUI::SetChildPadding(int iPadding)\n\t{\n\t\tm_pList->SetChildPadding(iPadding);\n\t}\n\n\tvoid CListUI::SetItemFont(int index)\n\t{\n\t\tm_ListInfo.nFont = index;\n\t\tNeedUpdate();\n\t}\n\n\tvoid CListUI::SetItemTextStyle(UINT uStyle)\n\t{\n\t\tm_ListInfo.m_uItemTextStyle = uStyle;\n\t\tNeedUpdate();\n\t}\n\n\tvoid CListUI::SetItemTextPadding(RECT rc)\n\t{\n\t\tm_ListInfo.rcTextPadding = rc;\n\t\tNeedUpdate();\n\t}\n\n\tRECT CListUI::GetItemTextPadding() const\n\t{\n\t\treturn m_ListInfo.rcTextPadding;\n\t}\n\n\tvoid CListUI::SetItemTextColor(DWORD dwTextColor)\n\t{\n\t\tm_ListInfo.dwTextColor = dwTextColor;\n\t\tInvalidate();\n\t}\n\n\tvoid CListUI::SetItemBkColor(DWORD dwBkColor)\n\t{\n\t\tm_ListInfo.dwBkColor = dwBkColor;\n\t\tInvalidate();\n\t}\n\n\tvoid CListUI::SetItemBkImage(LPCTSTR pStrImage)\n\t{\n\t\tm_ListInfo.sBkImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tvoid CListUI::SetAlternateBk(bool bAlternateBk)\n\t{\n\t\tm_ListInfo.bAlternateBk = bAlternateBk;\n\t\tInvalidate();\n\t}\n\n\tDWORD CListUI::GetItemTextColor() const\n\t{\n\t\treturn m_ListInfo.dwTextColor;\n\t}\n\n\tDWORD CListUI::GetItemBkColor() const\n\t{\n\t\treturn m_ListInfo.dwBkColor;\n\t}\n\n\tLPCTSTR CListUI::GetItemBkImage() const\n\t{\n\t\treturn m_ListInfo.sBkImage;\n\t}\n\n\tbool CListUI::IsAlternateBk() const\n\t{\n\t\treturn m_ListInfo.bAlternateBk;\n\t}\n\n\tvoid CListUI::SetSelectedItemTextColor(DWORD dwTextColor)\n\t{\n\t\tm_ListInfo.dwSelectedTextColor = dwTextColor;\n\t\tInvalidate();\n\t}\n\n\tvoid CListUI::SetSelectedItemBkColor(DWORD dwBkColor)\n\t{\n\t\tm_ListInfo.dwSelectedBkColor = dwBkColor;\n\t\tInvalidate();\n\t}\n\n\tvoid CListUI::SetSelectedItemImage(LPCTSTR pStrImage)\n\t{\n\t\tm_ListInfo.sSelectedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tDWORD CListUI::GetSelectedItemTextColor() const\n\t{\n\t\treturn m_ListInfo.dwSelectedTextColor;\n\t}\n\n\tDWORD CListUI::GetSelectedItemBkColor() const\n\t{\n\t\treturn m_ListInfo.dwSelectedBkColor;\n\t}\n\n\tLPCTSTR CListUI::GetSelectedItemImage() const\n\t{\n\t\treturn m_ListInfo.sSelectedImage;\n\t}\n\n\tvoid CListUI::SetHotItemTextColor(DWORD dwTextColor)\n\t{\n\t\tm_ListInfo.dwHotTextColor = dwTextColor;\n\t\tInvalidate();\n\t}\n\n\tvoid CListUI::SetHotItemBkColor(DWORD dwBkColor)\n\t{\n\t\tm_ListInfo.dwHotBkColor = dwBkColor;\n\t\tInvalidate();\n\t}\n\n\tvoid CListUI::SetHotItemImage(LPCTSTR pStrImage)\n\t{\n\t\tm_ListInfo.sHotImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tDWORD CListUI::GetHotItemTextColor() const\n\t{\n\t\treturn m_ListInfo.dwHotTextColor;\n\t}\n\tDWORD CListUI::GetHotItemBkColor() const\n\t{\n\t\treturn m_ListInfo.dwHotBkColor;\n\t}\n\n\tLPCTSTR CListUI::GetHotItemImage() const\n\t{\n\t\treturn m_ListInfo.sHotImage;\n\t}\n\n\tvoid CListUI::SetDisabledItemTextColor(DWORD dwTextColor)\n\t{\n\t\tm_ListInfo.dwDisabledTextColor = dwTextColor;\n\t\tInvalidate();\n\t}\n\n\tvoid CListUI::SetDisabledItemBkColor(DWORD dwBkColor)\n\t{\n\t\tm_ListInfo.dwDisabledBkColor = dwBkColor;\n\t\tInvalidate();\n\t}\n\n\tvoid CListUI::SetDisabledItemImage(LPCTSTR pStrImage)\n\t{\n\t\tm_ListInfo.sDisabledImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tDWORD CListUI::GetDisabledItemTextColor() const\n\t{\n\t\treturn m_ListInfo.dwDisabledTextColor;\n\t}\n\n\tDWORD CListUI::GetDisabledItemBkColor() const\n\t{\n\t\treturn m_ListInfo.dwDisabledBkColor;\n\t}\n\n\tLPCTSTR CListUI::GetDisabledItemImage() const\n\t{\n\t\treturn m_ListInfo.sDisabledImage;\n\t}\n\n\tDWORD CListUI::GetItemLineColor() const\n\t{\n\t\treturn m_ListInfo.dwLineColor;\n\t}\n\n\tvoid CListUI::SetItemLineColor(DWORD dwLineColor)\n\t{\n\t\tm_ListInfo.dwLineColor = dwLineColor;\n\t\tInvalidate();\n\t}\n\n\tbool CListUI::IsItemShowHtml()\n\t{\n\t\treturn m_ListInfo.bShowHtml;\n\t}\n\n\tvoid CListUI::SetItemShowHtml(bool bShowHtml)\n\t{\n\t\tif( m_ListInfo.bShowHtml == bShowHtml ) return;\n\n\t\tm_ListInfo.bShowHtml = bShowHtml;\n\t\tNeedUpdate();\n\t}\n\n\tvoid CListUI::SetMultiExpanding(bool bMultiExpandable)\n\t{\n\t\tm_ListInfo.bMultiExpandable = bMultiExpandable;\n\t}\n\n\tbool CListUI::ExpandItem(int iIndex, bool bExpand /*= true*/)\n\t{\n\t\tif( m_iExpandedItem >= 0 && !m_ListInfo.bMultiExpandable) {\n\t\t\tCControlUI* pControl = GetItemAt(m_iExpandedItem);\n\t\t\tif( pControl != NULL ) {\n\t\t\t\tIListItemUI* pItem = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\t\t\tif( pItem != NULL ) pItem->Expand(false);\n\t\t\t}\n\t\t\tm_iExpandedItem = -1;\n\t\t}\n\t\tif( bExpand ) {\n\t\t\tCControlUI* pControl = GetItemAt(iIndex);\n\t\t\tif( pControl == NULL ) return false;\n\t\t\tif( !pControl->IsVisible() ) return false;\n\t\t\tIListItemUI* pItem = static_cast<IListItemUI*>(pControl->GetInterface(_T(\"ListItem\")));\n\t\t\tif( pItem == NULL ) return false;\n\t\t\tm_iExpandedItem = iIndex;\n\t\t\tif( !pItem->Expand(true) ) {\n\t\t\t\tm_iExpandedItem = -1;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tNeedUpdate();\n\t\treturn true;\n\t}\n\n\tint CListUI::GetExpandedItem() const\n\t{\n\t\treturn m_iExpandedItem;\n\t}\n\n\tvoid CListUI::EnsureVisible(int iIndex)\n\t{\n\t\tif( m_iCurSel < 0 ) return;\n\t\tRECT rcItem = m_pList->GetItemAt(iIndex)->GetPos();\n\t\tRECT rcList = m_pList->GetPos();\n\t\tRECT rcListInset = m_pList->GetInset();\n\n\t\trcList.left += rcListInset.left;\n\t\trcList.top += rcListInset.top;\n\t\trcList.right -= rcListInset.right;\n\t\trcList.bottom -= rcListInset.bottom;\n\n\t\tCScrollBarUI* pHorizontalScrollBar = m_pList->GetHorizontalScrollBar();\n\t\tif( pHorizontalScrollBar && pHorizontalScrollBar->IsVisible() ) rcList.bottom -= pHorizontalScrollBar->GetFixedHeight();\n\n\t\tint iPos = m_pList->GetScrollPos().cy;\n\t\tif( rcItem.top >= rcList.top && rcItem.bottom < rcList.bottom ) return;\n\t\tint dx = 0;\n\t\tif( rcItem.top < rcList.top ) dx = rcItem.top - rcList.top;\n\t\tif( rcItem.bottom > rcList.bottom ) dx = rcItem.bottom - rcList.bottom;\n\t\tScroll(0, dx);\n\t}\n\n\tvoid CListUI::Scroll(int dx, int dy)\n\t{\n\t\tif( dx == 0 && dy == 0 ) return;\n\t\tSIZE sz = m_pList->GetScrollPos();\n\t\tm_pList->SetScrollPos(CSize(sz.cx + dx, sz.cy + dy));\n\t}\n\n\tvoid CListUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"header\")) == 0 ) \n\t\t{\n\t\t\tGetHeader()->SetVisible(_tcscmp(pstrValue, _T(\"false\")) != 0);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"headerbkimage\")) == 0 ) GetHeader()->SetBkImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"scrollselect\")) == 0 ) SetScrollSelect(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"multiexpanding\")) == 0 ) SetMultiExpanding(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"itemfont\")) == 0 ) m_ListInfo.nFont = _ttoi(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"itemalign\")) == 0 ) {\n\t\t\tif( _tcsstr(pstrValue, _T(\"left\")) != NULL ) {\n\t\t\t\tm_ListInfo.m_uItemTextStyle &= ~(DT_CENTER | DT_RIGHT);\n\t\t\t\tm_ListInfo.m_uItemTextStyle |= DT_LEFT;\n\t\t\t}\n\t\t\tif( _tcsstr(pstrValue, _T(\"center\")) != NULL ) {\n\t\t\t\tm_ListInfo.m_uItemTextStyle &= ~(DT_LEFT | DT_RIGHT);\n\t\t\t\tm_ListInfo.m_uItemTextStyle |= DT_CENTER;\n\t\t\t}\n\t\t\tif( _tcsstr(pstrValue, _T(\"right\")) != NULL ) {\n\t\t\t\tm_ListInfo.m_uItemTextStyle &= ~(DT_LEFT | DT_CENTER);\n\t\t\t\tm_ListInfo.m_uItemTextStyle |= DT_RIGHT;\n\t\t\t}\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemendellipsis\")) == 0 ) {\n\t\t\tif( _tcscmp(pstrValue, _T(\"true\")) == 0 ) m_ListInfo.m_uItemTextStyle |= DT_END_ELLIPSIS;\n\t\t\telse m_ListInfo.m_uItemTextStyle &= ~DT_END_ELLIPSIS;\n\t\t}    \n\t\telse if( _tcscmp(pstrName, _T(\"itemtextpadding\")) == 0 ) {\n\t\t\tRECT rcTextPadding = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\trcTextPadding.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcTextPadding.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\trcTextPadding.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcTextPadding.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\t\tSetItemTextPadding(rcTextPadding);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemtextcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetItemTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itembkcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetItemBkColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itembkimage\")) == 0 ) SetItemBkImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"itemaltbk\")) == 0 ) SetAlternateBk(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"itemselectedtextcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetSelectedItemTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemselectedbkcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetSelectedItemBkColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemselectedimage\")) == 0 ) SetSelectedItemImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"itemhottextcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetHotItemTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemhotbkcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetHotItemBkColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemhotimage\")) == 0 ) SetHotItemImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"itemdisabledtextcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetDisabledItemTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemdisabledbkcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetDisabledItemBkColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemdisabledimage\")) == 0 ) SetDisabledItemImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"itemlinecolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetItemLineColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"itemshowhtml\")) == 0 ) SetItemShowHtml(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse CVerticalLayoutUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tIListCallbackUI* CListUI::GetTextCallback() const\n\t{\n\t\treturn m_pCallback;\n\t}\n\n\tvoid CListUI::SetTextCallback(IListCallbackUI* pCallback)\n\t{\n\t\tm_pCallback = pCallback;\n\t}\n\n\tSIZE CListUI::GetScrollPos() const\n\t{\n\t\treturn m_pList->GetScrollPos();\n\t}\n\n\tSIZE CListUI::GetScrollRange() const\n\t{\n\t\treturn m_pList->GetScrollRange();\n\t}\n\n\tvoid CListUI::SetScrollPos(SIZE szPos)\n\t{\n\t\tm_pList->SetScrollPos(szPos);\n\t}\n\n\tvoid CListUI::LineUp()\n\t{\n\t\tm_pList->LineUp();\n\t}\n\n\tvoid CListUI::LineDown()\n\t{\n\t\tm_pList->LineDown();\n\t}\n\n\tvoid CListUI::PageUp()\n\t{\n\t\tm_pList->PageUp();\n\t}\n\n\tvoid CListUI::PageDown()\n\t{\n\t\tm_pList->PageDown();\n\t}\n\n\tvoid CListUI::HomeUp()\n\t{\n\t\tm_pList->HomeUp();\n\t}\n\n\tvoid CListUI::EndDown()\n\t{\n\t\tm_pList->EndDown();\n\t}\n\n\tvoid CListUI::LineLeft()\n\t{\n\t\tm_pList->LineLeft();\n\t}\n\n\tvoid CListUI::LineRight()\n\t{\n\t\tm_pList->LineRight();\n\t}\n\n\tvoid CListUI::PageLeft()\n\t{\n\t\tm_pList->PageLeft();\n\t}\n\n\tvoid CListUI::PageRight()\n\t{\n\t\tm_pList->PageRight();\n\t}\n\n\tvoid CListUI::HomeLeft()\n\t{\n\t\tm_pList->HomeLeft();\n\t}\n\n\tvoid CListUI::EndRight()\n\t{\n\t\tm_pList->EndRight();\n\t}\n\n\tvoid CListUI::EnableScrollBarEx(bool bAddScroll,ScrollType st)\n\t{\n\t\tm_pList->EnableScrollBarEx(bAddScroll, st);\n\t}\n\n\tCScrollBarUI* CListUI::GetVerticalScrollBar() const\n\t{\n\t\treturn m_pList->GetVerticalScrollBar();\n\t}\n\n\tCScrollBarUI* CListUI::GetHorizontalScrollBar() const\n\t{\n\t\treturn m_pList->GetHorizontalScrollBar();\n\t}\n\n\tBOOL CListUI::SortItems(PULVCompareFunc pfnCompare, UINT_PTR dwData)\n\t{\n\t\tif (!m_pList)\n\t\t\treturn FALSE;\n\t\treturn m_pList->SortItems(pfnCompare, dwData);\t\n\t}\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\n\tCListBodyUI::CListBodyUI(CListUI* pOwner) : m_pOwner(pOwner)\n\t{\n\t\tASSERT(m_pOwner);\n\t}\n\n\tBOOL CListBodyUI::SortItems(PULVCompareFunc pfnCompare, UINT_PTR dwData)\n\t{\n\t\tif (!pfnCompare)\n\t\t\treturn FALSE;\n\t\tm_pCompareFunc = pfnCompare;\n\t\tCControlUI **pData = (CControlUI **)m_items.GetData();\n\t\tqsort_s(m_items.GetData(), m_items.GetSize(), sizeof(CControlUI*), CListBodyUI::ItemComareFunc, this);\t\n\t\tIListItemUI *pItem = NULL;\n\t\tfor (int i = 0; i < m_items.GetSize(); ++i)\n\t\t{\n\t\t\tpItem = (IListItemUI*)(static_cast<CControlUI*>(m_items[i])->GetInterface(TEXT(\"ListItem\")));\n\t\t\tif (pItem)\n\t\t\t{\n\t\t\t\tpItem->SetIndex(i);\n\t\t\t\tpItem->Select(false);\n\t\t\t}\n\t\t}\n\t\tm_pOwner->SelectItem(-1);\n\t\tif (m_pManager)\n\t\t{\n\t\t\tSetPos(GetPos());\n\t\t\tInvalidate();\n\t\t}\n\n\t\treturn TRUE;\n\t}\n\n\tint __cdecl CListBodyUI::ItemComareFunc(void *pvlocale, const void *item1, const void *item2)\n\t{\n\t\tCListBodyUI *pThis = (CListBodyUI*)pvlocale;\n\t\tif (!pThis || !item1 || !item2)\n\t\t\treturn 0;\n\t\treturn pThis->ItemComareFunc(item1, item2);\n\t}\n\n\tint __cdecl CListBodyUI::ItemComareFunc(const void *item1, const void *item2)\n\t{\n\t\tCControlUI *pControl1 = *(CControlUI**)item1;\n\t\tCControlUI *pControl2 = *(CControlUI**)item2;\n\t\treturn m_pCompareFunc((UINT_PTR)pControl1, (UINT_PTR)pControl2, m_compareData);\n\t}\n\n\tvoid CListBodyUI::SetScrollPos(SIZE szPos)\n\t{\n\t\tint cx = 0;\n\t\tint cy = 0;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) {\n\t\t\tint iLastScrollPos = m_pVerticalScrollBar->GetScrollPos();\n\t\t\tm_pVerticalScrollBar->SetScrollPos(szPos.cy);\n\t\t\tcy = m_pVerticalScrollBar->GetScrollPos() - iLastScrollPos;\n\t\t}\n\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\tint iLastScrollPos = m_pHorizontalScrollBar->GetScrollPos();\n\t\t\tm_pHorizontalScrollBar->SetScrollPos(szPos.cx);\n\t\t\tcx = m_pHorizontalScrollBar->GetScrollPos() - iLastScrollPos;\n\t\t}\n\n\t\tif( cx == 0 && cy == 0 ) return;\n\n\t\tRECT rcPos;\n\t\tfor( int it2 = 0; it2 < m_items.GetSize(); it2++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it2]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) continue;\n\n\t\t\trcPos = pControl->GetPos();\n\t\t\trcPos.left -= cx;\n\t\t\trcPos.right -= cx;\n\t\t\trcPos.top -= cy;\n\t\t\trcPos.bottom -= cy;\n\t\t\tpControl->SetPos(rcPos);\n\t\t}\n\n\t\tInvalidate();\n\n\t\tif( cx != 0 && m_pOwner ) {\n\t\t\tCListHeaderUI* pHeader = m_pOwner->GetHeader();\n\t\t\tif( pHeader == NULL ) return;\n\t\t\tTListInfoUI* pInfo = m_pOwner->GetListInfo();\n\t\t\tpInfo->nColumns = MIN(pHeader->GetCount(), UILIST_MAX_COLUMNS);\n\n\t\t\tif( !pHeader->IsVisible() ) {\n\t\t\t\tfor( int it = 0; it < pHeader->GetCount(); it++ ) {\n\t\t\t\t\tstatic_cast<CControlUI*>(pHeader->GetItemAt(it))->SetInnerVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor( int i = 0; i < pInfo->nColumns; i++ ) {\n\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(pHeader->GetItemAt(i));\n\t\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\t\tif( pControl->IsFloat() ) continue;\n\n\t\t\t\tRECT rcPos = pControl->GetPos();\n\t\t\t\trcPos.left -= cx;\n\t\t\t\trcPos.right -= cx;\n\t\t\t\tpControl->SetPos(rcPos);\n\t\t\t\tpInfo->rcColumn[i] = pControl->GetPos();\n\t\t\t}\n\t\t\tif( !pHeader->IsVisible() ) {\n\t\t\t\tfor( int it = 0; it < pHeader->GetCount(); it++ ) {\n\t\t\t\t\tstatic_cast<CControlUI*>(pHeader->GetItemAt(it))->SetInnerVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CListBodyUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\t\trc = m_rcItem;\n\n\t\t// Adjust for inset\n\t\trc.left += m_rcInset.left;\n\t\trc.top += m_rcInset.top;\n\t\trc.right -= m_rcInset.right;\n\t\trc.bottom -= m_rcInset.bottom;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) rc.right -= m_pVerticalScrollBar->GetFixedWidth();\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) rc.bottom -= m_pHorizontalScrollBar->GetFixedHeight();\n\n\t\t// Determine the minimum size\n\t\tSIZE szAvailable = { rc.right - rc.left, rc.bottom - rc.top };\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) \n\t\t\tszAvailable.cx += m_pHorizontalScrollBar->GetScrollRange();\n\n\t\tint cxNeeded = 0;\n\t\tint nAdjustables = 0;\n\t\tint cyFixed = 0;\n\t\tint nEstimateNum = 0;\n\t\tfor( int it1 = 0; it1 < m_items.GetSize(); it1++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it1]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) continue;\n\t\t\tSIZE sz = pControl->EstimateSize(szAvailable);\n\t\t\tif( sz.cy == 0 ) {\n\t\t\t\tnAdjustables++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( sz.cy < pControl->GetMinHeight() ) sz.cy = pControl->GetMinHeight();\n\t\t\t\tif( sz.cy > pControl->GetMaxHeight() ) sz.cy = pControl->GetMaxHeight();\n\t\t\t}\n\t\t\tcyFixed += sz.cy + pControl->GetPadding().top + pControl->GetPadding().bottom;\n\n\t\t\tRECT rcPadding = pControl->GetPadding();\n\t\t\tsz.cx = MAX(sz.cx, 0);\n\t\t\tif( sz.cx < pControl->GetMinWidth() ) sz.cx = pControl->GetMinWidth();\n\t\t\tif( sz.cx > pControl->GetMaxWidth() ) sz.cx = pControl->GetMaxWidth();\n\t\t\tcxNeeded = MAX(cxNeeded, sz.cx);\n\t\t\tnEstimateNum++;\n\t\t}\n\t\tcyFixed += (nEstimateNum - 1) * m_iChildPadding;\n\n\t\tif( m_pOwner ) {\n\t\t\tCListHeaderUI* pHeader = m_pOwner->GetHeader();\n\t\t\tif( pHeader != NULL && pHeader->GetCount() > 0 ) {\n\t\t\t\tcxNeeded = MAX(0, pHeader->EstimateSize(CSize(rc.right - rc.left, rc.bottom - rc.top)).cx);\n\t\t\t}\n\t\t}\n\n\t\t// Place elements\n\t\tint cyNeeded = 0;\n\t\tint cyExpand = 0;\n\t\tif( nAdjustables > 0 ) cyExpand = MAX(0, (szAvailable.cy - cyFixed) / nAdjustables);\n\t\t// Position the elements\n\t\tSIZE szRemaining = szAvailable;\n\t\tint iPosY = rc.top;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) {\n\t\t\tiPosY -= m_pVerticalScrollBar->GetScrollPos();\n\t\t}\n\t\tint iPosX = rc.left;\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\tiPosX -= m_pHorizontalScrollBar->GetScrollPos();\n\t\t}\n\t\tint iAdjustable = 0;\n\t\tint cyFixedRemaining = cyFixed;\n\t\tfor( int it2 = 0; it2 < m_items.GetSize(); it2++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it2]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) {\n\t\t\t\tSetFloatPos(it2);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tRECT rcPadding = pControl->GetPadding();\n\t\t\tszRemaining.cy -= rcPadding.top;\n\t\t\tSIZE sz = pControl->EstimateSize(szRemaining);\n\t\t\tif( sz.cy == 0 ) {\n\t\t\t\tiAdjustable++;\n\t\t\t\tsz.cy = cyExpand;\n\t\t\t\t// Distribute remaining to last element (usually round-off left-overs)\n\t\t\t\tif( iAdjustable == nAdjustables ) {\n\t\t\t\t\tsz.cy = MAX(0, szRemaining.cy - rcPadding.bottom - cyFixedRemaining);\n\t\t\t\t} \n\t\t\t\tif( sz.cy < pControl->GetMinHeight() ) sz.cy = pControl->GetMinHeight();\n\t\t\t\tif( sz.cy > pControl->GetMaxHeight() ) sz.cy = pControl->GetMaxHeight();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( sz.cy < pControl->GetMinHeight() ) sz.cy = pControl->GetMinHeight();\n\t\t\t\tif( sz.cy > pControl->GetMaxHeight() ) sz.cy = pControl->GetMaxHeight();\n\t\t\t\tcyFixedRemaining -= sz.cy;\n\t\t\t}\n\n\t\t\tsz.cx = MAX(cxNeeded, szAvailable.cx - rcPadding.left - rcPadding.right);\n\n\t\t\tif( sz.cx < pControl->GetMinWidth() ) sz.cx = pControl->GetMinWidth();\n\t\t\tif( sz.cx > pControl->GetMaxWidth() ) sz.cx = pControl->GetMaxWidth();\n\n\t\t\tRECT rcCtrl = { iPosX + rcPadding.left, iPosY + rcPadding.top, iPosX + rcPadding.left + sz.cx, iPosY + sz.cy + rcPadding.top + rcPadding.bottom };\n\t\t\tpControl->SetPos(rcCtrl);\n\n\t\t\tiPosY += sz.cy + m_iChildPadding + rcPadding.top + rcPadding.bottom;\n\t\t\tcyNeeded += sz.cy + rcPadding.top + rcPadding.bottom;\n\t\t\tszRemaining.cy -= sz.cy + m_iChildPadding + rcPadding.bottom;\n\t\t}\n\t\tcyNeeded += (nEstimateNum - 1) * m_iChildPadding;\n\n\t\tif( m_pHorizontalScrollBar != NULL ) {\n\t\t\tif( cxNeeded > rc.right - rc.left ) {\n\t\t\t\tif( m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\t\t\tm_pHorizontalScrollBar->SetScrollRange(cxNeeded - (rc.right - rc.left));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tm_pHorizontalScrollBar->SetVisible(true);\n\t\t\t\t\tm_pHorizontalScrollBar->SetScrollRange(cxNeeded - (rc.right - rc.left));\n\t\t\t\t\tm_pHorizontalScrollBar->SetScrollPos(0);\n\t\t\t\t\trc.bottom -= m_pHorizontalScrollBar->GetFixedHeight();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\t\t\tm_pHorizontalScrollBar->SetVisible(false);\n\t\t\t\t\tm_pHorizontalScrollBar->SetScrollRange(0);\n\t\t\t\t\tm_pHorizontalScrollBar->SetScrollPos(0);\n\t\t\t\t\trc.bottom += m_pHorizontalScrollBar->GetFixedHeight();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Process the scrollbar\n\t\tProcessScrollBar(rc, cxNeeded, cyNeeded);\n\t}\n\n\tvoid CListBodyUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pOwner != NULL ) m_pOwner->DoEvent(event);\n\t\t\telse CControlUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( m_pOwner != NULL ) m_pOwner->DoEvent(event); else CControlUI::DoEvent(event);\n\t}\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCListHeaderUI::CListHeaderUI()\n\t{\n\t}\n\n\tLPCTSTR CListHeaderUI::GetClass() const\n\t{\n\t\treturn _T(\"ListHeaderUI\");\n\t}\n\n\tLPVOID CListHeaderUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_LISTHEADER) == 0 ) return this;\n\t\treturn CHorizontalLayoutUI::GetInterface(pstrName);\n\t}\n\n\tSIZE CListHeaderUI::EstimateSize(SIZE szAvailable)\n\t{\n\t\tSIZE cXY = {0, m_cxyFixed.cy};\n\t\tif( cXY.cy == 0 && m_pManager != NULL ) {\n\t\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\t\tcXY.cy = MAX(cXY.cy,static_cast<CControlUI*>(m_items[it])->EstimateSize(szAvailable).cy);\n\t\t\t}\n\t\t\tint nMin = m_pManager->GetDefaultFontInfo()->tm.tmHeight + 6;\n\t\t\tcXY.cy = MAX(cXY.cy,nMin);\n\t\t}\n\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tcXY.cx +=  static_cast<CControlUI*>(m_items[it])->EstimateSize(szAvailable).cx;\n\t\t}\n\n\t\treturn cXY;\n\t}\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCListHeaderItemUI::CListHeaderItemUI() : m_bDragable(true), m_uButtonState(0), m_iSepWidth(4),\n\t\tm_uTextStyle(DT_VCENTER | DT_CENTER | DT_SINGLELINE), m_dwTextColor(0), m_iFont(-1), m_bShowHtml(false)\n\t{\n\t\tSetTextPadding(CDuiRect(2, 0, 2, 0));\n\t\tptLastMouse.x = ptLastMouse.y = 0;\n\t\tSetMinWidth(16);\n\t}\n\n\tLPCTSTR CListHeaderItemUI::GetClass() const\n\t{\n\t\treturn _T(\"ListHeaderItemUI\");\n\t}\n\n\tLPVOID CListHeaderItemUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_LISTHEADERITEM) == 0 ) return this;\n\t\treturn CControlUI::GetInterface(pstrName);\n\t}\n\n\tUINT CListHeaderItemUI::GetControlFlags() const\n\t{\n\t\tif( IsEnabled() && m_iSepWidth != 0 ) return UIFLAG_SETCURSOR;\n\t\telse return 0;\n\t}\n\n\tvoid CListHeaderItemUI::SetEnabled(bool bEnable)\n\t{\n\t\tCControlUI::SetEnabled(bEnable);\n\t\tif( !IsEnabled() ) {\n\t\t\tm_uButtonState = 0;\n\t\t}\n\t}\n\n\tbool CListHeaderItemUI::IsDragable() const\n\t{\n\t\treturn m_bDragable;\n\t}\n\n\tvoid CListHeaderItemUI::SetDragable(bool bDragable)\n\t{\n\t\tm_bDragable = bDragable;\n\t\tif ( !m_bDragable ) m_uButtonState &= ~UISTATE_CAPTURED;\n\t}\n\n\tDWORD CListHeaderItemUI::GetSepWidth() const\n\t{\n\t\treturn m_iSepWidth;\n\t}\n\n\tvoid CListHeaderItemUI::SetSepWidth(int iWidth)\n\t{\n\t\tm_iSepWidth = iWidth;\n\t}\n\n\tDWORD CListHeaderItemUI::GetTextStyle() const\n\t{\n\t\treturn m_uTextStyle;\n\t}\n\n\tvoid CListHeaderItemUI::SetTextStyle(UINT uStyle)\n\t{\n\t\tm_uTextStyle = uStyle;\n\t\tInvalidate();\n\t}\n\n\tDWORD CListHeaderItemUI::GetTextColor() const\n\t{\n\t\treturn m_dwTextColor;\n\t}\n\n\n\tvoid CListHeaderItemUI::SetTextColor(DWORD dwTextColor)\n\t{\n\t\tm_dwTextColor = dwTextColor;\n\t}\n\n\tRECT CListHeaderItemUI::GetTextPadding() const\n\t{\n\t\treturn m_rcTextPadding;\n\t}\n\n\tvoid CListHeaderItemUI::SetTextPadding(RECT rc)\n\t{\n\t\tm_rcTextPadding = rc;\n\t\tInvalidate();\n\t}\n\n\tvoid CListHeaderItemUI::SetFont(int index)\n\t{\n\t\tm_iFont = index;\n\t}\n\n\tbool CListHeaderItemUI::IsShowHtml()\n\t{\n\t\treturn m_bShowHtml;\n\t}\n\n\tvoid CListHeaderItemUI::SetShowHtml(bool bShowHtml)\n\t{\n\t\tif( m_bShowHtml == bShowHtml ) return;\n\n\t\tm_bShowHtml = bShowHtml;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CListHeaderItemUI::GetNormalImage() const\n\t{\n\t\treturn m_sNormalImage;\n\t}\n\n\tvoid CListHeaderItemUI::SetNormalImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sNormalImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CListHeaderItemUI::GetHotImage() const\n\t{\n\t\treturn m_sHotImage;\n\t}\n\n\tvoid CListHeaderItemUI::SetHotImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sHotImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CListHeaderItemUI::GetPushedImage() const\n\t{\n\t\treturn m_sPushedImage;\n\t}\n\n\tvoid CListHeaderItemUI::SetPushedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sPushedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CListHeaderItemUI::GetFocusedImage() const\n\t{\n\t\treturn m_sFocusedImage;\n\t}\n\n\tvoid CListHeaderItemUI::SetFocusedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sFocusedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CListHeaderItemUI::GetSepImage() const\n\t{\n\t\treturn m_sSepImage;\n\t}\n\n\tvoid CListHeaderItemUI::SetSepImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sSepImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tvoid CListHeaderItemUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"dragable\")) == 0 ) SetDragable(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"sepwidth\")) == 0 ) SetSepWidth(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"align\")) == 0 ) {\n\t\t\tif( _tcsstr(pstrValue, _T(\"left\")) != NULL ) {\n\t\t\t\tm_uTextStyle &= ~(DT_CENTER | DT_RIGHT);\n\t\t\t\tm_uTextStyle |= DT_LEFT;\n\t\t\t}\n\t\t\tif( _tcsstr(pstrValue, _T(\"center\")) != NULL ) {\n\t\t\t\tm_uTextStyle &= ~(DT_LEFT | DT_RIGHT);\n\t\t\t\tm_uTextStyle |= DT_CENTER;\n\t\t\t}\n\t\t\tif( _tcsstr(pstrValue, _T(\"right\")) != NULL ) {\n\t\t\t\tm_uTextStyle &= ~(DT_LEFT | DT_CENTER);\n\t\t\t\tm_uTextStyle |= DT_RIGHT;\n\t\t\t}\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"endellipsis\")) == 0 ) {\n\t\t\tif( _tcscmp(pstrValue, _T(\"true\")) == 0 ) m_uTextStyle |= DT_END_ELLIPSIS;\n\t\t\telse m_uTextStyle &= ~DT_END_ELLIPSIS;\n\t\t}    \n\t\telse if( _tcscmp(pstrName, _T(\"font\")) == 0 ) SetFont(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"textcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetTextColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"textpadding\")) == 0 ) {\n\t\t\tRECT rcTextPadding = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\trcTextPadding.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcTextPadding.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\trcTextPadding.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcTextPadding.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\t\tSetTextPadding(rcTextPadding);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"showhtml\")) == 0 ) SetShowHtml(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"normalimage\")) == 0 ) SetNormalImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"hotimage\")) == 0 ) SetHotImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"pushedimage\")) == 0 ) SetPushedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"focusedimage\")) == 0 ) SetFocusedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"sepimage\")) == 0 ) SetSepImage(pstrValue);\n\t\telse CControlUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CListHeaderItemUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pParent != NULL ) m_pParent->DoEvent(event);\n\t\t\telse CControlUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_SETFOCUS ) \n\t\t{\n\t\t\tInvalidate();\n\t\t}\n\t\tif( event.Type == UIEVENT_KILLFOCUS ) \n\t\t{\n\t\t\tInvalidate();\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK )\n\t\t{\n\t\t\tif( !IsEnabled() ) return;\n\t\t\tRECT rcSeparator = GetThumbRect();\n\t\t\tif (m_iSepWidth>=0)//111024 by cddjr, ӷָ򣬷û϶\n\t\t\t\trcSeparator.left-=4;\n\t\t\telse\n\t\t\t\trcSeparator.right+=4;\n\t\t\tif( ::PtInRect(&rcSeparator, event.ptMouse) ) {\n\t\t\t\tif( m_bDragable ) {\n\t\t\t\t\tm_uButtonState |= UISTATE_CAPTURED;\n\t\t\t\t\tptLastMouse = event.ptMouse;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tm_uButtonState |= UISTATE_PUSHED;\n\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_HEADERCLICK);\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONUP )\n\t\t{\n\t\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\tm_uButtonState &= ~UISTATE_CAPTURED;\n\t\t\t\tif( GetParent() ) \n\t\t\t\t\tGetParent()->NeedParentUpdate();\n\t\t\t}\n\t\t\telse if( (m_uButtonState & UISTATE_PUSHED) != 0 ) {\n\t\t\t\tm_uButtonState &= ~UISTATE_PUSHED;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEMOVE )\n\t\t{\n\t\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\tRECT rc = m_rcItem;\n\t\t\t\tif( m_iSepWidth >= 0 ) {\n\t\t\t\t\trc.right -= ptLastMouse.x - event.ptMouse.x;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trc.left -= ptLastMouse.x - event.ptMouse.x;\n\t\t\t\t}\n\n\t\t\t\tif( rc.right - rc.left > GetMinWidth() ) {\n\t\t\t\t\tm_cxyFixed.cx = rc.right - rc.left;\n\t\t\t\t\tptLastMouse = event.ptMouse;\n\t\t\t\t\tif( GetParent() ) \n\t\t\t\t\t\tGetParent()->NeedParentUpdate();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_SETCURSOR )\n\t\t{\n\t\t\tRECT rcSeparator = GetThumbRect();\n\t\t\tif (m_iSepWidth>=0)//111024 by cddjr, ӷָ򣬷û϶\n\t\t\t\trcSeparator.left-=4;\n\t\t\telse\n\t\t\t\trcSeparator.right+=4;\n\t\t\tif( IsEnabled() && m_bDragable && ::PtInRect(&rcSeparator, event.ptMouse) ) {\n\t\t\t\t::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_SIZEWE)));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEENTER )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_uButtonState |= UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSELEAVE )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_uButtonState &= ~UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tCControlUI::DoEvent(event);\n\t}\n\n\tSIZE CListHeaderItemUI::EstimateSize(SIZE szAvailable)\n\t{\n\t\tif( m_cxyFixed.cy == 0 ) return CSize(m_cxyFixed.cx, m_pManager->GetDefaultFontInfo()->tm.tmHeight + 14);\n\t\treturn CControlUI::EstimateSize(szAvailable);\n\t}\n\n\tRECT CListHeaderItemUI::GetThumbRect() const\n\t{\n\t\tif( m_iSepWidth >= 0 ) return CDuiRect(m_rcItem.right - m_iSepWidth, m_rcItem.top, m_rcItem.right, m_rcItem.bottom);\n\t\telse return CDuiRect(m_rcItem.left, m_rcItem.top, m_rcItem.left - m_iSepWidth, m_rcItem.bottom);\n\t}\n\n\tvoid CListHeaderItemUI::PaintStatusImage(HDC hDC)\n\t{\n\t\tif( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;\n\t\telse m_uButtonState &= ~ UISTATE_FOCUSED;\n\n\t\tif( (m_uButtonState & UISTATE_PUSHED) != 0 ) {\n\t\t\tif( m_sPushedImage.IsEmpty() && !m_sNormalImage.IsEmpty() ) DrawImage(hDC, (LPCTSTR)m_sNormalImage);\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sPushedImage) ) m_sPushedImage.Empty();\n\t\t}\n\t\telse if( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\tif( m_sHotImage.IsEmpty() && !m_sNormalImage.IsEmpty() ) DrawImage(hDC, (LPCTSTR)m_sNormalImage);\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sHotImage) ) m_sHotImage.Empty();\n\t\t}\n\t\telse if( (m_uButtonState & UISTATE_FOCUSED) != 0 ) {\n\t\t\tif( m_sFocusedImage.IsEmpty() && !m_sNormalImage.IsEmpty() ) DrawImage(hDC, (LPCTSTR)m_sNormalImage);\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sFocusedImage) ) m_sFocusedImage.Empty();\n\t\t}\n\t\telse {\n\t\t\tif( !m_sNormalImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sNormalImage) ) m_sNormalImage.Empty();\n\t\t\t}\n\t\t}\n\n\t\tif( !m_sSepImage.IsEmpty() ) {\n\t\t\tRECT rcThumb = GetThumbRect();\n\t\t\trcThumb.left -= m_rcItem.left;\n\t\t\trcThumb.top -= m_rcItem.top;\n\t\t\trcThumb.right -= m_rcItem.left;\n\t\t\trcThumb.bottom -= m_rcItem.top;\n\n\t\t\tm_sSepImageModify.Empty();\n\t\t\tm_sSepImageModify.SmallFormat(_T(\"dest='%d,%d,%d,%d'\"), rcThumb.left, rcThumb.top, rcThumb.right, rcThumb.bottom);\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sSepImage, (LPCTSTR)m_sSepImageModify) ) m_sSepImage.Empty();\n\t\t}\n\t}\n\n\tvoid CListHeaderItemUI::PaintText(HDC hDC)\n\t{\n\t\tif( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor();\n\n\t\tRECT rcText = m_rcItem;\n\t\trcText.left += m_rcTextPadding.left;\n\t\trcText.top += m_rcTextPadding.top;\n\t\trcText.right -= m_rcTextPadding.right;\n\t\trcText.bottom -= m_rcTextPadding.bottom;\n\n\t\tif( m_sText.IsEmpty() ) return;\n\t\tint nLinks = 0;\n\t\tif( m_bShowHtml )\n\t\t\tCRenderEngine::DrawHtmlText(hDC, m_pManager, rcText, m_sText, m_dwTextColor, \\\n\t\t\tNULL, NULL, nLinks, DT_SINGLELINE | m_uTextStyle);\n\t\telse\n\t\t\tCRenderEngine::DrawText(hDC, m_pManager, rcText, m_sText, m_dwTextColor, \\\n\t\t\tm_iFont, DT_SINGLELINE | m_uTextStyle);\n\t}\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCListElementUI::CListElementUI() : \n\t\tm_iIndex(-1),\n\t\tm_pOwner(NULL), \n\t\tm_bSelected(false),\n\t\tm_uButtonState(0)\n\t{\n\t}\n\n\tLPCTSTR CListElementUI::GetClass() const\n\t{\n\t\treturn _T(\"ListElementUI\");\n\t}\n\n\tUINT CListElementUI::GetControlFlags() const\n\t{\n\t\treturn UIFLAG_WANTRETURN;\n\t}\n\n\tLPVOID CListElementUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_LISTITEM) == 0 ) return static_cast<IListItemUI*>(this);\n\t\tif( _tcscmp(pstrName, DUI_CTR_LISTELEMENT) == 0 ) return static_cast<CListElementUI*>(this);\n\t\treturn CControlUI::GetInterface(pstrName);\n\t}\n\n\tIListOwnerUI* CListElementUI::GetOwner()\n\t{\n\t\treturn m_pOwner;\n\t}\n\n\tvoid CListElementUI::SetOwner(CControlUI* pOwner)\n\t{\n\t\tm_pOwner = static_cast<IListOwnerUI*>(pOwner->GetInterface(_T(\"IListOwner\")));\n\t}\n\n\tvoid CListElementUI::SetVisible(bool bVisible)\n\t{\n\t\tCControlUI::SetVisible(bVisible);\n\t\tif( !IsVisible() && m_bSelected)\n\t\t{\n\t\t\tm_bSelected = false;\n\t\t\tif( m_pOwner != NULL ) m_pOwner->SelectItem(-1);\n\t\t}\n\t}\n\n\tvoid CListElementUI::SetEnabled(bool bEnable)\n\t{\n\t\tCControlUI::SetEnabled(bEnable);\n\t\tif( !IsEnabled() ) {\n\t\t\tm_uButtonState = 0;\n\t\t}\n\t}\n\n\tint CListElementUI::GetIndex() const\n\t{\n\t\treturn m_iIndex;\n\t}\n\n\tvoid CListElementUI::SetIndex(int iIndex)\n\t{\n\t\tm_iIndex = iIndex;\n\t}\n\n\tvoid CListElementUI::Invalidate()\n\t{\n\t\tif( !IsVisible() ) return;\n\n\t\tif( GetParent() ) {\n\t\t\tCContainerUI* pParentContainer = static_cast<CContainerUI*>(GetParent()->GetInterface(_T(\"Container\")));\n\t\t\tif( pParentContainer ) {\n\t\t\t\tRECT rc = pParentContainer->GetPos();\n\t\t\t\tRECT rcInset = pParentContainer->GetInset();\n\t\t\t\trc.left += rcInset.left;\n\t\t\t\trc.top += rcInset.top;\n\t\t\t\trc.right -= rcInset.right;\n\t\t\t\trc.bottom -= rcInset.bottom;\n\t\t\t\tCScrollBarUI* pVerticalScrollBar = pParentContainer->GetVerticalScrollBar();\n\t\t\t\tif( pVerticalScrollBar && pVerticalScrollBar->IsVisible() ) rc.right -= pVerticalScrollBar->GetFixedWidth();\n\t\t\t\tCScrollBarUI* pHorizontalScrollBar = pParentContainer->GetHorizontalScrollBar();\n\t\t\t\tif( pHorizontalScrollBar && pHorizontalScrollBar->IsVisible() ) rc.bottom -= pHorizontalScrollBar->GetFixedHeight();\n\n\t\t\t\tRECT invalidateRc = m_rcItem;\n\t\t\t\tif( !::IntersectRect(&invalidateRc, &m_rcItem, &rc) ) \n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tCControlUI* pParent = GetParent();\n\t\t\t\tRECT rcTemp;\n\t\t\t\tRECT rcParent;\n\t\t\t\twhile( pParent = pParent->GetParent() )\n\t\t\t\t{\n\t\t\t\t\trcTemp = invalidateRc;\n\t\t\t\t\trcParent = pParent->GetPos();\n\t\t\t\t\tif( !::IntersectRect(&invalidateRc, &rcTemp, &rcParent) ) \n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif( m_pManager != NULL ) m_pManager->Invalidate(invalidateRc);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCControlUI::Invalidate();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tCControlUI::Invalidate();\n\t\t}\n\t}\n\n\tbool CListElementUI::Activate()\n\t{\n\t\tif( !CControlUI::Activate() ) return false;\n\t\tif( m_pManager != NULL ) m_pManager->SendNotify(this, DUI_MSGTYPE_ITEMACTIVATE);\n\t\treturn true;\n\t}\n\n\tbool CListElementUI::IsSelected() const\n\t{\n\t\treturn m_bSelected;\n\t}\n\n\tbool CListElementUI::Select(bool bSelect)\n\t{\n\t\tif( !IsEnabled() ) return false;\n\t\tif( bSelect == m_bSelected ) return true;\n\t\tm_bSelected = bSelect;\n\t\tif( bSelect && m_pOwner != NULL ) m_pOwner->SelectItem(m_iIndex);\n\t\tInvalidate();\n\n\t\treturn true;\n\t}\n\n\tbool CListElementUI::IsExpanded() const\n\t{\n\t\treturn false;\n\t}\n\n\tbool CListElementUI::Expand(bool /*bExpand = true*/)\n\t{\n\t\treturn false;\n\t}\n\n\tvoid CListElementUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pOwner != NULL ) m_pOwner->DoEvent(event);\n\t\t\telse CControlUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_DBLCLICK )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tActivate();\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_KEYDOWN && IsEnabled() )\n\t\t{\n\t\t\tif( event.chKey == VK_RETURN ) {\n\t\t\t\tActivate();\n\t\t\t\tInvalidate();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// An important twist: The list-item will send the event not to its immediate\n\t\t// parent but to the \"attached\" list. A list may actually embed several components\n\t\t// in its path to the item, but key-presses etc. needs to go to the actual list.\n\t\tif( m_pOwner != NULL ) m_pOwner->DoEvent(event); else CControlUI::DoEvent(event);\n\t}\n\n\tvoid CListElementUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"selected\")) == 0 ) Select();\n\t\telse CControlUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CListElementUI::DrawItemBk(HDC hDC, const RECT& rcItem)\n\t{\n\t\tASSERT(m_pOwner);\n\t\tif( m_pOwner == NULL ) return;\n\t\tTListInfoUI* pInfo = m_pOwner->GetListInfo();\n\t\tDWORD iBackColor = 0;\n\t\tif( !pInfo->bAlternateBk || m_iIndex % 2 == 0 ) iBackColor = pInfo->dwBkColor;\n\t\tif( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\tiBackColor = pInfo->dwHotBkColor;\n\t\t}\n\t\tif( IsSelected() ) {\n\t\t\tiBackColor = pInfo->dwSelectedBkColor;\n\t\t}\n\t\tif( !IsEnabled() ) {\n\t\t\tiBackColor = pInfo->dwDisabledBkColor;\n\t\t}\n\n\t\tif ( iBackColor != 0 ) {\n\t\t\tCRenderEngine::DrawColor(hDC, m_rcItem, GetAdjustColor(iBackColor));\n\t\t}\n\n\t\tif( !IsEnabled() ) {\n\t\t\tif( !pInfo->sDisabledImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)pInfo->sDisabledImage) ) pInfo->sDisabledImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\tif( IsSelected() ) {\n\t\t\tif( !pInfo->sSelectedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)pInfo->sSelectedImage) ) pInfo->sSelectedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\tif( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\tif( !pInfo->sHotImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)pInfo->sHotImage) ) pInfo->sHotImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif( !m_sBkImage.IsEmpty() ) {\n\t\t\tif( !pInfo->bAlternateBk || m_iIndex % 2 == 0 ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sBkImage) ) m_sBkImage.Empty();\n\t\t\t}\n\t\t}\n\n\t\tif( m_sBkImage.IsEmpty() ) {\n\t\t\tif( !pInfo->sBkImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)pInfo->sBkImage) ) pInfo->sBkImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif ( pInfo->dwLineColor != 0 ) {\n\t\t\tRECT rcLine = { m_rcItem.left, m_rcItem.bottom - 1, m_rcItem.right, m_rcItem.bottom - 1 };\n\t\t\tCRenderEngine::DrawLine(hDC, rcLine, 1, GetAdjustColor(pInfo->dwLineColor));\n\t\t}\n\t}\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCListLabelElementUI::CListLabelElementUI()\n\t{\n\t}\n\n\tLPCTSTR CListLabelElementUI::GetClass() const\n\t{\n\t\treturn _T(\"ListLabelElementUI\");\n\t}\n\n\tLPVOID CListLabelElementUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_LISTLABELELEMENT) == 0 ) return static_cast<CListLabelElementUI*>(this);\n\t\treturn CListElementUI::GetInterface(pstrName);\n\t}\n\n\tvoid CListLabelElementUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pOwner != NULL ) m_pOwner->DoEvent(event);\n\t\t\telse CListElementUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_BUTTONDOWN )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_ITEMCLICK);\n\t\t\t\tSelect();\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\telse if( event.Type == UIEVENT_MOUSEMOVE ) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\telse if( event.Type == UIEVENT_RBUTTONDOWN ) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\telse if( event.Type == UIEVENT_BUTTONUP )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\telse if( event.Type == UIEVENT_MOUSEENTER )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_uButtonState |= UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\telse if( event.Type == UIEVENT_MOUSELEAVE )\n\t\t{\n\t\t\tif( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\t\tm_uButtonState &= ~UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tCListElementUI::DoEvent(event);\n\t}\n\n\tSIZE CListLabelElementUI::EstimateSize(SIZE szAvailable)\n\t{\n\t\tif( m_pOwner == NULL ) return CSize(0, 0);\n\n\t\tTListInfoUI* pInfo = m_pOwner->GetListInfo();\n\t\tSIZE cXY = m_cxyFixed;\n\t\tif( cXY.cy == 0 && m_pManager != NULL ) {\n\t\t\tcXY.cy = m_pManager->GetFontInfo(pInfo->nFont)->tm.tmHeight + 8;\n\t\t\tcXY.cy += pInfo->rcTextPadding.top + pInfo->rcTextPadding.bottom;\n\t\t}\n\n\t\tif( cXY.cx == 0 && m_pManager != NULL ) {\n\t\t\tRECT rcText = { 0, 0, 9999, cXY.cy };\n\t\t\tif( pInfo->bShowHtml ) {\n\t\t\t\tint nLinks = 0;\n\t\t\t\tCRenderEngine::DrawHtmlText(m_pManager->GetPaintDC(), m_pManager, rcText, m_sText, 0, NULL, NULL, nLinks, DT_SINGLELINE | DT_CALCRECT | pInfo->m_uItemTextStyle & ~DT_RIGHT & ~DT_CENTER);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCRenderEngine::DrawText(m_pManager->GetPaintDC(), m_pManager, rcText, m_sText, 0, pInfo->nFont, DT_SINGLELINE | DT_CALCRECT | pInfo->m_uItemTextStyle & ~DT_RIGHT & ~DT_CENTER);\n\t\t\t}\n\t\t\tcXY.cx = rcText.right - rcText.left + pInfo->rcTextPadding.left + pInfo->rcTextPadding.right;        \n\t\t}\n\n\t\treturn cXY;\n\t}\n\n\tvoid CListLabelElementUI::DoPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\tif( !::IntersectRect(&m_rcPaint, &rcPaint, &m_rcItem) ) return;\n\t\tDrawItemBk(hDC, m_rcItem);\n\t\tDrawItemText(hDC, m_rcItem);\n\t}\n\n\tvoid CListLabelElementUI::DrawItemText(HDC hDC, const RECT& rcItem)\n\t{\n\t\tif( m_sText.IsEmpty() ) return;\n\n\t\tif( m_pOwner == NULL ) return;\n\t\tTListInfoUI* pInfo = m_pOwner->GetListInfo();\n\t\tDWORD iTextColor = pInfo->dwTextColor;\n\t\tif( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\tiTextColor = pInfo->dwHotTextColor;\n\t\t}\n\t\tif( IsSelected() ) {\n\t\t\tiTextColor = pInfo->dwSelectedTextColor;\n\t\t}\n\t\tif( !IsEnabled() ) {\n\t\t\tiTextColor = pInfo->dwDisabledTextColor;\n\t\t}\n\t\tint nLinks = 0;\n\t\tRECT rcText = rcItem;\n\t\trcText.left += pInfo->rcTextPadding.left;\n\t\trcText.right -= pInfo->rcTextPadding.right;\n\t\trcText.top += pInfo->rcTextPadding.top;\n\t\trcText.bottom -= pInfo->rcTextPadding.bottom;\n\n\t\tif( pInfo->bShowHtml )\n\t\t\tCRenderEngine::DrawHtmlText(hDC, m_pManager, rcText, m_sText, iTextColor, \\\n\t\t\tNULL, NULL, nLinks, DT_SINGLELINE | pInfo->m_uItemTextStyle);\n\t\telse\n\t\t\tCRenderEngine::DrawText(hDC, m_pManager, rcText, m_sText, iTextColor, \\\n\t\t\tpInfo->nFont, DT_SINGLELINE | pInfo->m_uItemTextStyle);\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCListTextElementUI::CListTextElementUI() : m_nLinks(0), m_nHoverLink(-1), m_pOwner(NULL)\n\t{\n\t\t::ZeroMemory(&m_rcLinks, sizeof(m_rcLinks));\n\t}\n\n\tCListTextElementUI::~CListTextElementUI()\n\t{\n\t\tCDuiString* pText;\n\t\tfor( int it = 0; it < m_aTexts.GetSize(); it++ ) {\n\t\t\tpText = static_cast<CDuiString*>(m_aTexts[it]);\n\t\t\tif( pText ) delete pText;\n\t\t}\n\t\tm_aTexts.Empty();\n\t}\n\n\tLPCTSTR CListTextElementUI::GetClass() const\n\t{\n\t\treturn _T(\"ListTextElementUI\");\n\t}\n\n\tLPVOID CListTextElementUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_LISTTEXTELEMENT) == 0 ) return static_cast<CListTextElementUI*>(this);\n\t\treturn CListLabelElementUI::GetInterface(pstrName);\n\t}\n\n\tUINT CListTextElementUI::GetControlFlags() const\n\t{\n\t\treturn UIFLAG_WANTRETURN | ( (IsEnabled() && m_nLinks > 0) ? UIFLAG_SETCURSOR : 0);\n\t}\n\n\tLPCTSTR CListTextElementUI::GetText(int iIndex) const\n\t{\n\t\tCDuiString* pText = static_cast<CDuiString*>(m_aTexts.GetAt(iIndex));\n\t\tif( pText ) return pText->GetData();\n\t\treturn NULL;\n\t}\n\n\tvoid CListTextElementUI::SetText(int iIndex, LPCTSTR pstrText)\n\t{\n\t\tif( m_pOwner == NULL ) return;\n\t\tTListInfoUI* pInfo = m_pOwner->GetListInfo();\n\t\tif( iIndex < 0 || iIndex >= pInfo->nColumns ) return;\n\t\twhile( m_aTexts.GetSize() < pInfo->nColumns ) { m_aTexts.Add(NULL); }\n\n\t\tCDuiString* pText = static_cast<CDuiString*>(m_aTexts[iIndex]);\n\t\tif( (pText == NULL && pstrText == NULL) || (pText && *pText == pstrText) ) return;\n\n\t\tif ( pText ) //by cddjr 2011/10/20\n\t\t\tpText->Assign(pstrText);\n\t\telse\n\t\t\tm_aTexts.SetAt(iIndex, new CDuiString(pstrText));\n\t\tInvalidate();\n\t}\n\n\tvoid CListTextElementUI::SetOwner(CControlUI* pOwner)\n\t{\n\t\tCListElementUI::SetOwner(pOwner);\n\t\tm_pOwner = static_cast<IListUI*>(pOwner->GetInterface(_T(\"IList\")));\n\t}\n\n\tCDuiString* CListTextElementUI::GetLinkContent(int iIndex)\n\t{\n\t\tif( iIndex >= 0 && iIndex < m_nLinks ) return &m_sLinks[iIndex];\n\t\treturn NULL;\n\t}\n\n\tvoid CListTextElementUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pOwner != NULL ) m_pOwner->DoEvent(event);\n\t\t\telse CListLabelElementUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\t// When you hover over a link\n\t\tif( event.Type == UIEVENT_SETCURSOR ) {\n\t\t\tfor( int i = 0; i < m_nLinks; i++ ) {\n\t\t\t\tif( ::PtInRect(&m_rcLinks[i], event.ptMouse) ) {\n\t\t\t\t\t::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_HAND)));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}      \n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONUP && IsEnabled() ) {\n\t\t\tfor( int i = 0; i < m_nLinks; i++ ) {\n\t\t\t\tif( ::PtInRect(&m_rcLinks[i], event.ptMouse) ) {\n\t\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_LINK, i);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( m_nLinks > 0 && event.Type == UIEVENT_MOUSEMOVE ) {\n\t\t\tint nHoverLink = -1;\n\t\t\tfor( int i = 0; i < m_nLinks; i++ ) {\n\t\t\t\tif( ::PtInRect(&m_rcLinks[i], event.ptMouse) ) {\n\t\t\t\t\tnHoverLink = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(m_nHoverLink != nHoverLink) {\n\t\t\t\tInvalidate();\n\t\t\t\tm_nHoverLink = nHoverLink;\n\t\t\t}\n\t\t}\n\t\tif( m_nLinks > 0 && event.Type == UIEVENT_MOUSELEAVE ) {\n\t\t\tif(m_nHoverLink != -1) {\n\t\t\t\tInvalidate();\n\t\t\t\tm_nHoverLink = -1;\n\t\t\t}\n\t\t}\n\t\tCListLabelElementUI::DoEvent(event);\n\t}\n\n\tSIZE CListTextElementUI::EstimateSize(SIZE szAvailable)\n\t{\n\t\tTListInfoUI* pInfo = NULL;\n\t\tif( m_pOwner ) pInfo = m_pOwner->GetListInfo();\n\n\t\tSIZE cXY = m_cxyFixed;\n\t\tif( cXY.cy == 0 && m_pManager != NULL ) {\n\t\t\tcXY.cy = m_pManager->GetFontInfo(pInfo->nFont)->tm.tmHeight + 8;\n\t\t\tif( pInfo ) cXY.cy += pInfo->rcTextPadding.top + pInfo->rcTextPadding.bottom;\n\t\t}\n\n\t\treturn cXY;\n\t}\n\n\tvoid CListTextElementUI::DrawItemText(HDC hDC, const RECT& rcItem)\n\t{\n\t\tif( m_pOwner == NULL ) return;\n\t\tTListInfoUI* pInfo = m_pOwner->GetListInfo();\n\t\tDWORD iTextColor = pInfo->dwTextColor;\n\n\t\tif( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\tiTextColor = pInfo->dwHotTextColor;\n\t\t}\n\t\tif( IsSelected() ) {\n\t\t\tiTextColor = pInfo->dwSelectedTextColor;\n\t\t}\n\t\tif( !IsEnabled() ) {\n\t\t\tiTextColor = pInfo->dwDisabledTextColor;\n\t\t}\n\t\tIListCallbackUI* pCallback = m_pOwner->GetTextCallback();\n\t\t//ASSERT(pCallback);\n\t\t//if( pCallback == NULL ) return;\n\n\t\tm_nLinks = 0;\n\t\tint nLinks = lengthof(m_rcLinks);\n\t\tfor( int i = 0; i < pInfo->nColumns; i++ )\n\t\t{\n\t\t\tRECT rcItem = { pInfo->rcColumn[i].left, m_rcItem.top, pInfo->rcColumn[i].right, m_rcItem.bottom };\n\t\t\trcItem.left += pInfo->rcTextPadding.left;\n\t\t\trcItem.right -= pInfo->rcTextPadding.right;\n\t\t\trcItem.top += pInfo->rcTextPadding.top;\n\t\t\trcItem.bottom -= pInfo->rcTextPadding.bottom;\n\n\t\t\tCDuiString strText;//ʹLPCTSTR̫ by cddjr 2011/10/20\n\t\t\tif( pCallback ) strText = pCallback->GetItemText(this, m_iIndex, i);\n\t\t\telse strText.Assign(GetText(i));\n\t\t\tif( pInfo->bShowHtml )\n\t\t\t\tCRenderEngine::DrawHtmlText(hDC, m_pManager, rcItem, strText.GetData(), iTextColor, \\\n\t\t\t\t&m_rcLinks[m_nLinks], &m_sLinks[m_nLinks], nLinks, DT_SINGLELINE | pInfo->m_uItemTextStyle);\n\t\t\telse\n\t\t\t\tCRenderEngine::DrawText(hDC, m_pManager, rcItem, strText.GetData(), iTextColor, \\\n\t\t\t\tpInfo->nFont, DT_SINGLELINE | pInfo->m_uItemTextStyle);\n\n\t\t\tm_nLinks += nLinks;\n\t\t\tnLinks = lengthof(m_rcLinks) - m_nLinks; \n\t\t}\n\t\tfor( int i = m_nLinks; i < lengthof(m_rcLinks); i++ ) {\n\t\t\t::ZeroMemory(m_rcLinks + i, sizeof(RECT));\n\t\t\t((CDuiString*)(m_sLinks + i))->Empty();\n\t\t}\n\t}\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCListContainerElementUI::CListContainerElementUI() : \n\t\tm_iIndex(-1),\n\t\tm_pOwner(NULL), \n\t\tm_bSelected(false),\n\t\tm_uButtonState(0)\n\t{\n\t}\n\n\tLPCTSTR CListContainerElementUI::GetClass() const\n\t{\n\t\treturn _T(\"ListContainerElementUI\");\n\t}\n\n\tUINT CListContainerElementUI::GetControlFlags() const\n\t{\n\t\treturn UIFLAG_WANTRETURN;\n\t}\n\n\tLPVOID CListContainerElementUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_LISTITEM) == 0 ) return static_cast<IListItemUI*>(this);\n\t\tif( _tcscmp(pstrName, DUI_CTR_LISTCONTAINERELEMENT) == 0 ) return static_cast<CListContainerElementUI*>(this);\n\t\treturn CContainerUI::GetInterface(pstrName);\n\t}\n\n\tIListOwnerUI* CListContainerElementUI::GetOwner()\n\t{\n\t\treturn m_pOwner;\n\t}\n\n\tvoid CListContainerElementUI::SetOwner(CControlUI* pOwner)\n\t{\n\t\tm_pOwner = static_cast<IListOwnerUI*>(pOwner->GetInterface(_T(\"IListOwner\")));\n\t}\n\n\tvoid CListContainerElementUI::SetVisible(bool bVisible)\n\t{\n\t\tCContainerUI::SetVisible(bVisible);\n\t\tif( !IsVisible() && m_bSelected)\n\t\t{\n\t\t\tm_bSelected = false;\n\t\t\tif( m_pOwner != NULL ) m_pOwner->SelectItem(-1);\n\t\t}\n\t}\n\n\tvoid CListContainerElementUI::SetEnabled(bool bEnable)\n\t{\n\t\tCControlUI::SetEnabled(bEnable);\n\t\tif( !IsEnabled() ) {\n\t\t\tm_uButtonState = 0;\n\t\t}\n\t}\n\n\tint CListContainerElementUI::GetIndex() const\n\t{\n\t\treturn m_iIndex;\n\t}\n\n\tvoid CListContainerElementUI::SetIndex(int iIndex)\n\t{\n\t\tm_iIndex = iIndex;\n\t}\n\n\tvoid CListContainerElementUI::Invalidate()\n\t{\n\t\tif( !IsVisible() ) return;\n\n\t\tif( GetParent() ) {\n\t\t\tCContainerUI* pParentContainer = static_cast<CContainerUI*>(GetParent()->GetInterface(_T(\"Container\")));\n\t\t\tif( pParentContainer ) {\n\t\t\t\tRECT rc = pParentContainer->GetPos();\n\t\t\t\tRECT rcInset = pParentContainer->GetInset();\n\t\t\t\trc.left += rcInset.left;\n\t\t\t\trc.top += rcInset.top;\n\t\t\t\trc.right -= rcInset.right;\n\t\t\t\trc.bottom -= rcInset.bottom;\n\t\t\t\tCScrollBarUI* pVerticalScrollBar = pParentContainer->GetVerticalScrollBar();\n\t\t\t\tif( pVerticalScrollBar && pVerticalScrollBar->IsVisible() ) rc.right -= pVerticalScrollBar->GetFixedWidth();\n\t\t\t\tCScrollBarUI* pHorizontalScrollBar = pParentContainer->GetHorizontalScrollBar();\n\t\t\t\tif( pHorizontalScrollBar && pHorizontalScrollBar->IsVisible() ) rc.bottom -= pHorizontalScrollBar->GetFixedHeight();\n\n\t\t\t\tRECT invalidateRc = m_rcItem;\n\t\t\t\tif( !::IntersectRect(&invalidateRc, &m_rcItem, &rc) ) \n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tCControlUI* pParent = GetParent();\n\t\t\t\tRECT rcTemp;\n\t\t\t\tRECT rcParent;\n\t\t\t\twhile( pParent = pParent->GetParent() )\n\t\t\t\t{\n\t\t\t\t\trcTemp = invalidateRc;\n\t\t\t\t\trcParent = pParent->GetPos();\n\t\t\t\t\tif( !::IntersectRect(&invalidateRc, &rcTemp, &rcParent) ) \n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif( m_pManager != NULL ) m_pManager->Invalidate(invalidateRc);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCContainerUI::Invalidate();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tCContainerUI::Invalidate();\n\t\t}\n\t}\n\n\tbool CListContainerElementUI::Activate()\n\t{\n\t\tif( !CContainerUI::Activate() ) return false;\n\t\tif( m_pManager != NULL ) m_pManager->SendNotify(this, DUI_MSGTYPE_ITEMACTIVATE);\n\t\treturn true;\n\t}\n\n\tbool CListContainerElementUI::IsSelected() const\n\t{\n\t\treturn m_bSelected;\n\t}\n\n\tbool CListContainerElementUI::Select(bool bSelect)\n\t{\n\t\tif( !IsEnabled() ) return false;\n\t\tif( bSelect == m_bSelected ) return true;\n\t\tm_bSelected = bSelect;\n\t\tif( bSelect && m_pOwner != NULL ) m_pOwner->SelectItem(m_iIndex);\n\t\tInvalidate();\n\n\t\treturn true;\n\t}\n\n\tbool CListContainerElementUI::IsExpanded() const\n\t{\n\t\treturn false;\n\t}\n\n\tbool CListContainerElementUI::Expand(bool /*bExpand = true*/)\n\t{\n\t\treturn false;\n\t}\n\n\tvoid CListContainerElementUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pOwner != NULL ) m_pOwner->DoEvent(event);\n\t\t\telse CContainerUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_DBLCLICK )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tActivate();\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_KEYDOWN && IsEnabled() )\n\t\t{\n\t\t\tif( event.chKey == VK_RETURN ) {\n\t\t\t\tActivate();\n\t\t\t\tInvalidate();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONDOWN )\n\t\t{\n\t\t\tif( IsEnabled() ){\n\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_ITEMCLICK);\n\t\t\t\tSelect();\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_RBUTTONDOWN ) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONUP ) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEMOVE )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEENTER )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_uButtonState |= UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSELEAVE )\n\t\t{\n\t\t\tif( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\t\tm_uButtonState &= ~UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// An important twist: The list-item will send the event not to its immediate\n\t\t// parent but to the \"attached\" list. A list may actually embed several components\n\t\t// in its path to the item, but key-presses etc. needs to go to the actual list.\n\t\tif( m_pOwner != NULL ) m_pOwner->DoEvent(event); else CControlUI::DoEvent(event);\n\t}\n\n\tvoid CListContainerElementUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"selected\")) == 0 ) Select();\n\t\telse CContainerUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CListContainerElementUI::DoPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\tif( !::IntersectRect(&m_rcPaint, &rcPaint, &m_rcItem) ) return;\n\t\tDrawItemBk(hDC, m_rcItem);\n\t\tCContainerUI::DoPaint(hDC, rcPaint);\n\t}\n\n\tvoid CListContainerElementUI::DrawItemText(HDC hDC, const RECT& rcItem)\n\t{\n\t\treturn;\n\t}\n\n\tvoid CListContainerElementUI::DrawItemBk(HDC hDC, const RECT& rcItem)\n\t{\n\t\tASSERT(m_pOwner);\n\t\tif( m_pOwner == NULL ) return;\n\t\tTListInfoUI* pInfo = m_pOwner->GetListInfo();\n\t\tDWORD iBackColor = 0;\n\t\tif( !pInfo->bAlternateBk || m_iIndex % 2 == 0 ) iBackColor = pInfo->dwBkColor;\n\n\t\tif( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\tiBackColor = pInfo->dwHotBkColor;\n\t\t}\n\t\tif( IsSelected() ) {\n\t\t\tiBackColor = pInfo->dwSelectedBkColor;\n\t\t}\n\t\tif( !IsEnabled() ) {\n\t\t\tiBackColor = pInfo->dwDisabledBkColor;\n\t\t}\n\t\tif ( iBackColor != 0 ) {\n\t\t\tCRenderEngine::DrawColor(hDC, m_rcItem, GetAdjustColor(iBackColor));\n\t\t}\n\n\t\tif( !IsEnabled() ) {\n\t\t\tif( !pInfo->sDisabledImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)pInfo->sDisabledImage) ) pInfo->sDisabledImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\tif( IsSelected() ) {\n\t\t\tif( !pInfo->sSelectedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)pInfo->sSelectedImage) ) pInfo->sSelectedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\tif( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\tif( !pInfo->sHotImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)pInfo->sHotImage) ) pInfo->sHotImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\tif( !m_sBkImage.IsEmpty() ) {\n\t\t\tif( !pInfo->bAlternateBk || m_iIndex % 2 == 0 ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sBkImage) ) m_sBkImage.Empty();\n\t\t\t}\n\t\t}\n\n\t\tif( m_sBkImage.IsEmpty() ) {\n\t\t\tif( !pInfo->sBkImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)pInfo->sBkImage) ) pInfo->sBkImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif ( pInfo->dwLineColor != 0 ) {\n\t\t\tRECT rcLine = { m_rcItem.left, m_rcItem.bottom - 1, m_rcItem.right, m_rcItem.bottom - 1 };\n\t\t\tCRenderEngine::DrawLine(hDC, rcLine, 1, GetAdjustColor(pInfo->dwLineColor));\n\t\t}\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Control/UIList.h",
    "content": "#ifndef __UILIST_H__\n#define __UILIST_H__\n\n#pragma once\n#include \"Layout/UIVerticalLayout.h\"\n#include \"Layout/UIHorizontalLayout.h\"\n\nnamespace DuiLib {\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\ttypedef int (CALLBACK *PULVCompareFunc)(UINT_PTR, UINT_PTR, UINT_PTR);\n\n\tclass CListHeaderUI;\n\n#define UILIST_MAX_COLUMNS 32\n\n\ttypedef struct tagTListInfoUI\n\t{\n\t\tint nColumns;\n\t\tRECT rcColumn[UILIST_MAX_COLUMNS];\n\t\tint nFont;\n\t\tUINT m_uItemTextStyle;\n\t\tRECT rcTextPadding;\n\t\tDWORD dwTextColor;\n\t\tDWORD dwBkColor;\n\t\tCDuiString sBkImage;\n\t\tbool bAlternateBk;\n\t\tDWORD dwSelectedTextColor;\n\t\tDWORD dwSelectedBkColor;\n\t\tCDuiString sSelectedImage;\n\t\tDWORD dwHotTextColor;\n\t\tDWORD dwHotBkColor;\n\t\tCDuiString sHotImage;\n\t\tDWORD dwDisabledTextColor;\n\t\tDWORD dwDisabledBkColor;\n\t\tCDuiString sDisabledImage;\n\t\tDWORD dwLineColor;\n\t\tbool bShowHtml;\n\t\tbool bMultiExpandable;\n\t} TListInfoUI;\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass IListCallbackUI\n\t{\n\tpublic:\n\t\tvirtual LPCTSTR GetItemText(CControlUI* pList, int iItem, int iSubItem) = 0;\n\t};\n\n\tclass IListOwnerUI\n\t{\n\tpublic:\n\t\tvirtual TListInfoUI* GetListInfo() = 0;\n\t\tvirtual int GetCurSel() const = 0;\n\t\tvirtual bool SelectItem(int iIndex, bool bTakeFocus = false) = 0;\n\t\tvirtual void DoEvent(TEventUI& event) = 0;\n\t};\n\n\tclass IListUI : public IListOwnerUI\n\t{\n\tpublic:\n\t\tvirtual CListHeaderUI* GetHeader() const = 0;\n\t\tvirtual CContainerUI* GetList() const = 0;\n\t\tvirtual IListCallbackUI* GetTextCallback() const = 0;\n\t\tvirtual void SetTextCallback(IListCallbackUI* pCallback) = 0;\n\t\tvirtual bool ExpandItem(int iIndex, bool bExpand = true) = 0;\n\t\tvirtual int GetExpandedItem() const = 0;\n\t};\n\n\tclass IListItemUI\n\t{\n\tpublic:\n\t\tvirtual int GetIndex() const = 0;\n\t\tvirtual void SetIndex(int iIndex) = 0;\n\t\tvirtual IListOwnerUI* GetOwner() = 0;\n\t\tvirtual void SetOwner(CControlUI* pOwner) = 0;\n\t\tvirtual bool IsSelected() const = 0;\n\t\tvirtual bool Select(bool bSelect = true) = 0;\n\t\tvirtual bool IsExpanded() const = 0;\n\t\tvirtual bool Expand(bool bExpand = true) = 0;\n\t\tvirtual void DrawItemText(HDC hDC, const RECT& rcItem) = 0;\n\t};\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass CListBodyUI;\n\tclass CListHeaderUI;\n\n\tclass UILIB_API CListUI : public CVerticalLayoutUI, public IListUI\n\t{\n\tpublic:\n\t\tCListUI();\n\t\t~CListUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tUINT GetControlFlags() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tbool GetScrollSelect();\n\t\tvoid SetScrollSelect(bool bScrollSelect);\n\t\tint GetCurSel() const;\n\t\tbool SelectItem(int iIndex, bool bTakeFocus = false);\n\n\t\tCListHeaderUI* GetHeader() const;  \n\t\tCContainerUI* GetList() const;\n\t\tTListInfoUI* GetListInfo();\n\n\t\tCControlUI* GetItemAt(int iIndex) const;\n\t\tint GetItemIndex(CControlUI* pControl) const;\n\t\tbool SetItemIndex(CControlUI* pControl, int iIndex);\n\t\tint GetCount() const;\n\t\tbool Add(CControlUI* pControl);\n\t\tbool AddAt(CControlUI* pControl, int iIndex);\n\t\tbool Remove(CControlUI* pControl);\n\t\tbool RemoveAt(int iIndex);\n\t\tvoid RemoveAll();\n\n\t\tvoid EnsureVisible(int iIndex);\n\t\tvoid Scroll(int dx, int dy);\n\n\t\tint GetChildPadding() const;\n\t\tvoid SetChildPadding(int iPadding);\n\n\t\tvoid SetItemFont(int index);\n\t\tvoid SetItemTextStyle(UINT uStyle);\n\t\tvoid SetItemTextPadding(RECT rc);\n\t\tvoid SetItemTextColor(DWORD dwTextColor);\n\t\tvoid SetItemBkColor(DWORD dwBkColor);\n\t\tvoid SetItemBkImage(LPCTSTR pStrImage);\n\t\tvoid SetAlternateBk(bool bAlternateBk);\n\t\tvoid SetSelectedItemTextColor(DWORD dwTextColor);\n\t\tvoid SetSelectedItemBkColor(DWORD dwBkColor);\n\t\tvoid SetSelectedItemImage(LPCTSTR pStrImage); \n\t\tvoid SetHotItemTextColor(DWORD dwTextColor);\n\t\tvoid SetHotItemBkColor(DWORD dwBkColor);\n\t\tvoid SetHotItemImage(LPCTSTR pStrImage);\n\t\tvoid SetDisabledItemTextColor(DWORD dwTextColor);\n\t\tvoid SetDisabledItemBkColor(DWORD dwBkColor);\n\t\tvoid SetDisabledItemImage(LPCTSTR pStrImage);\n\t\tvoid SetItemLineColor(DWORD dwLineColor);\n\t\tbool IsItemShowHtml();\n\t\tvoid SetItemShowHtml(bool bShowHtml = true);\n\t\tRECT GetItemTextPadding() const;\n\t\tDWORD GetItemTextColor() const;\n\t\tDWORD GetItemBkColor() const;\n\t\tLPCTSTR GetItemBkImage() const;\n\t\tbool IsAlternateBk() const;\n\t\tDWORD GetSelectedItemTextColor() const;\n\t\tDWORD GetSelectedItemBkColor() const;\n\t\tLPCTSTR GetSelectedItemImage() const;\n\t\tDWORD GetHotItemTextColor() const;\n\t\tDWORD GetHotItemBkColor() const;\n\t\tLPCTSTR GetHotItemImage() const;\n\t\tDWORD GetDisabledItemTextColor() const;\n\t\tDWORD GetDisabledItemBkColor() const;\n\t\tLPCTSTR GetDisabledItemImage() const;\n\t\tDWORD GetItemLineColor() const;\n\n\t\tvoid SetMultiExpanding(bool bMultiExpandable); \n\t\tint GetExpandedItem() const;\n\t\tbool ExpandItem(int iIndex, bool bExpand = true);\n\n\t\tvoid SetPos(RECT rc);\n\t\tvoid DoEvent(TEventUI& event);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tIListCallbackUI* GetTextCallback() const;\n\t\tvoid SetTextCallback(IListCallbackUI* pCallback);\n\n\t\tSIZE GetScrollPos() const;\n\t\tSIZE GetScrollRange() const;\n\t\tvoid SetScrollPos(SIZE szPos);\n\t\tvoid LineUp();\n\t\tvoid LineDown();\n\t\tvoid PageUp();\n\t\tvoid PageDown();\n\t\tvoid HomeUp();\n\t\tvoid EndDown();\n\t\tvoid LineLeft();\n\t\tvoid LineRight();\n\t\tvoid PageLeft();\n\t\tvoid PageRight();\n\t\tvoid HomeLeft();\n\t\tvoid EndRight();\n\t\tvoid EnableScrollBarEx(bool bAddScroll, ScrollType st);\n\t\tvirtual CScrollBarUI* GetVerticalScrollBar() const;\n\t\tvirtual CScrollBarUI* GetHorizontalScrollBar() const;\n\t\tBOOL SortItems(PULVCompareFunc pfnCompare, UINT_PTR dwData);\n\tprotected:\n\t\tbool m_bScrollSelect;\n\t\tint m_iCurSel;\n\t\tint m_iExpandedItem;\n\t\tIListCallbackUI* m_pCallback;\n\t\tCListBodyUI* m_pList;\n\t\tCListHeaderUI* m_pHeader;\n\t\tTListInfoUI m_ListInfo;\n\t};\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\n\tclass UILIB_API CListBodyUI : public CVerticalLayoutUI\n\t{\n\tpublic:\n\t\tCListBodyUI(CListUI* pOwner);\n\n\t\tvoid SetScrollPos(SIZE szPos);\n\t\tvoid SetPos(RECT rc);\n\t\tvoid DoEvent(TEventUI& event);\n\t\tBOOL SortItems(PULVCompareFunc pfnCompare, UINT_PTR dwData);\n\tprotected:\n\t\tstatic int __cdecl ItemComareFunc(void *pvlocale, const void *item1, const void *item2);\n\t\tint __cdecl ItemComareFunc(const void *item1, const void *item2);\n\tprotected:\n\t\tCListUI* m_pOwner;\n\t\tPULVCompareFunc m_pCompareFunc;\n\t\tUINT_PTR m_compareData;\n\t};\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass UILIB_API CListHeaderUI : public CHorizontalLayoutUI\n\t{\n\tpublic:\n\t\tCListHeaderUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tSIZE EstimateSize(SIZE szAvailable);\n\t};\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass UILIB_API CListHeaderItemUI : public CControlUI\n\t{\n\tpublic:\n\t\tCListHeaderItemUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\t\tUINT GetControlFlags() const;\n\n\t\tvoid SetEnabled(bool bEnable = true);\n\n\t\tbool IsDragable() const;\n\t\tvoid SetDragable(bool bDragable);\n\t\tDWORD GetSepWidth() const;\n\t\tvoid SetSepWidth(int iWidth);\n\t\tDWORD GetTextStyle() const;\n\t\tvoid SetTextStyle(UINT uStyle);\n\t\tDWORD GetTextColor() const;\n\t\tvoid SetTextColor(DWORD dwTextColor);\n\t\tvoid SetTextPadding(RECT rc);\n\t\tRECT GetTextPadding() const;\n\t\tvoid SetFont(int index);\n\t\tbool IsShowHtml();\n\t\tvoid SetShowHtml(bool bShowHtml = true);\n\t\tLPCTSTR GetNormalImage() const;\n\t\tvoid SetNormalImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetHotImage() const;\n\t\tvoid SetHotImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetPushedImage() const;\n\t\tvoid SetPushedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetFocusedImage() const;\n\t\tvoid SetFocusedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetSepImage() const;\n\t\tvoid SetSepImage(LPCTSTR pStrImage);\n\n\t\tvoid DoEvent(TEventUI& event);\n\t\tSIZE EstimateSize(SIZE szAvailable);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\t\tRECT GetThumbRect() const;\n\n\t\tvoid PaintText(HDC hDC);\n\t\tvoid PaintStatusImage(HDC hDC);\n\n\tprotected:\n\t\tPOINT ptLastMouse;\n\t\tbool m_bDragable;\n\t\tUINT m_uButtonState;\n\t\tint m_iSepWidth;\n\t\tDWORD m_dwTextColor;\n\t\tint m_iFont;\n\t\tUINT m_uTextStyle;\n\t\tbool m_bShowHtml;\n\t\tRECT m_rcTextPadding;\n\t\tCDuiString m_sNormalImage;\n\t\tCDuiString m_sHotImage;\n\t\tCDuiString m_sPushedImage;\n\t\tCDuiString m_sFocusedImage;\n\t\tCDuiString m_sSepImage;\n\t\tCDuiString m_sSepImageModify;\n\t};\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass UILIB_API CListElementUI : public CControlUI, public IListItemUI\n\t{\n\tpublic:\n\t\tCListElementUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tUINT GetControlFlags() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tvoid SetEnabled(bool bEnable = true);\n\n\t\tint GetIndex() const;\n\t\tvoid SetIndex(int iIndex);\n\n\t\tIListOwnerUI* GetOwner();\n\t\tvoid SetOwner(CControlUI* pOwner);\n\t\tvoid SetVisible(bool bVisible = true);\n\n\t\tbool IsSelected() const;\n\t\tbool Select(bool bSelect = true);\n\t\tbool IsExpanded() const;\n\t\tbool Expand(bool bExpand = true);\n\n\t\tvoid Invalidate(); // ֱCControl::Invalidateᵼ¹ˢ£дˢ\n\t\tbool Activate();\n\n\t\tvoid DoEvent(TEventUI& event);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvoid DrawItemBk(HDC hDC, const RECT& rcItem);\n\n\tprotected:\n\t\tint m_iIndex;\n\t\tbool m_bSelected;\n\t\tUINT m_uButtonState;\n\t\tIListOwnerUI* m_pOwner;\n\t};\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass UILIB_API CListLabelElementUI : public CListElementUI\n\t{\n\tpublic:\n\t\tCListLabelElementUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tvoid DoEvent(TEventUI& event);\n\t\tSIZE EstimateSize(SIZE szAvailable);\n\t\tvoid DoPaint(HDC hDC, const RECT& rcPaint);\n\n\t\tvoid DrawItemText(HDC hDC, const RECT& rcItem);\n\t};\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass UILIB_API CListTextElementUI : public CListLabelElementUI\n\t{\n\tpublic:\n\t\tCListTextElementUI();\n\t\t~CListTextElementUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\t\tUINT GetControlFlags() const;\n\n\t\tLPCTSTR GetText(int iIndex) const;\n\t\tvoid SetText(int iIndex, LPCTSTR pstrText);\n\n\t\tvoid SetOwner(CControlUI* pOwner);\n\t\tCDuiString* GetLinkContent(int iIndex);\n\n\t\tvoid DoEvent(TEventUI& event);\n\t\tSIZE EstimateSize(SIZE szAvailable);\n\n\t\tvoid DrawItemText(HDC hDC, const RECT& rcItem);\n\n\tprotected:\n\t\tenum { MAX_LINK = 8 };\n\t\tint m_nLinks;\n\t\tRECT m_rcLinks[MAX_LINK];\n\t\tCDuiString m_sLinks[MAX_LINK];\n\t\tint m_nHoverLink;\n\t\tIListUI* m_pOwner;\n\t\tCStdPtrArray m_aTexts;\n\t};\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass UILIB_API CListContainerElementUI : public CContainerUI, public IListItemUI\n\t{\n\tpublic:\n\t\tCListContainerElementUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tUINT GetControlFlags() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tint GetIndex() const;\n\t\tvoid SetIndex(int iIndex);\n\n\t\tIListOwnerUI* GetOwner();\n\t\tvoid SetOwner(CControlUI* pOwner);\n\t\tvoid SetVisible(bool bVisible = true);\n\t\tvoid SetEnabled(bool bEnable = true);\n\n\t\tbool IsSelected() const;\n\t\tbool Select(bool bSelect = true);\n\t\tbool IsExpanded() const;\n\t\tbool Expand(bool bExpand = true);\n\n\t\tvoid Invalidate(); // ֱCControl::Invalidateᵼ¹ˢ£дˢ\n\t\tbool Activate();\n\n\t\tvoid DoEvent(TEventUI& event);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\t\tvoid DoPaint(HDC hDC, const RECT& rcPaint);\n\n\t\tvoid DrawItemText(HDC hDC, const RECT& rcItem);    \n\t\tvoid DrawItemBk(HDC hDC, const RECT& rcItem);\n\n\tprotected:\n\t\tint m_iIndex;\n\t\tbool m_bSelected;\n\t\tUINT m_uButtonState;\n\t\tIListOwnerUI* m_pOwner;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UILIST_H__\n"
  },
  {
    "path": "DuiLib/Control/UIMediaPlayer.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"UIMediaPlayer.h\"\n#include <windows.h>\n#include <comdef.h>\n\nnamespace DuiLib\n{\n\tCMediaPlayerUI::CMediaPlayerUI( ) :m_volume(100)\n\t{\n\t\tm_clsid = __uuidof(WMPLib::WindowsMediaPlayer);\n\t\tm_strUrl.Empty( );\n\t}\n\n\tCMediaPlayerUI::~CMediaPlayerUI( )\n\t{\n\t\tReleaseControl( );\n\t}\n\n\tLPCTSTR CMediaPlayerUI::GetClass( ) const\n\t{\n\t\treturn DUI_CTR_MEDIAPLAYER;\n\t}\n\n\tLPVOID CMediaPlayerUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif (_tcscmp(pstrName, DUI_CTR_MEDIAPLAYER) == 0)\n\t\t{\n\t\t\treturn static_cast<CMediaPlayerUI*>(this);\n\t\t}\n\t\treturn CActiveXUI::GetInterface(pstrName);\n\t}\n\tvoid CMediaPlayerUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif (_tcscmp(pstrName, _T(\"url\")) == 0)\n\t\t{\n\t\t\tm_strUrl = pstrValue;\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"volume\")) == 0)\n\t\t{\n\t\t\tTCHAR* pstr;\n\t\t\tlong value = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);\n\t\t\tSetVolume(value);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCActiveXUI::SetAttribute(pstrName, pstrValue);\n\t\t}\n\n\t}\n\n\tvoid CMediaPlayerUI::SetVisible(bool bVisible)\n\t{\n\t\tCActiveXUI::SetInnerVisible(bVisible);\n\t\tif ((m_hwndHost != NULL) && (wmp_ != NULL))\n\t\t{\n\t\t\tif (bVisible)\n\t\t\t{\n\t\t\t\t::ShowWindow(m_hwndHost, SW_SHOW);\n\t\t\t\twmp_->PutuiMode(\"None\");//Full, Mini, None, Invisible\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//::ShowWindow(m_hwndHost, SW_HIDE);\n\t\t\t\twmp_->PutuiMode(\"Invisible\");\n\t\t\t}\n\t\t}\n\n\t}\n\tvoid CMediaPlayerUI::SetInnerVisible(bool bVisible)\n\t{\n\n\t\tCControlUI::SetInnerVisible(bVisible);\n\t\tif ((m_hwndHost != NULL) && (wmp_ != NULL))\n\t\t{\n\t\t\tif (bVisible)\n\t\t\t{\n\t\t\t\t::ShowWindow(m_hwndHost, SW_SHOW);\n\t\t\t\twmp_->PutuiMode(\"full\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twmp_->PutuiMode(\"Invisible\");\n\t\t\t}\n\t\t}\n\t}\n\tbool CMediaPlayerUI::DoCreateControl( )\n\t{\n\t\tHRESULT hr;\n\n\t\tif (!CActiveXUI::DoCreateControl( ))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tGetControl(__uuidof(WMPLib::IWMPPlayer4), (LPVOID*)&wmp_);\n\n\t\tif (wmp_)\n\t\t{\n\t\t\t//Ϊ޴ģʽ\n\t\t\thr = wmp_->put_windowlessVideo(VARIANT_TRUE);\n\t\t\twmp_->put_stretchToFit(TRUE);\n\t\t\tif (!m_strUrl.IsEmpty( ))\n\t\t\t{\n\n\t\t\t\thr = wmp_->put_URL(CComBSTR(m_strUrl.GetData( )));\n\t\t\t}\n\n\t\t}\n\n\n\t\treturn true;\n\n\t}\n\tvoid CMediaPlayerUI::ReleaseControl( )\n\t{\n\t\tm_bCreated = false;\n\t}\n\n\tbool CMediaPlayerUI::Play(LPCWSTR pszUrl)\n\t{\n\t\tif (!wmp_)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\twmp_->close( );\n\t\twmp_->put_URL(CComBSTR(pszUrl));\n\t\treturn true;\n\t}\n\n\tvoid CMediaPlayerUI::SetVolume(long value)\n\t{\n\t\tif (m_volume != value)\n\t\t{\n\t\t\tm_volume = value;\n\t\t\tCComQIPtr<WMPLib::IWMPSettings> wmpSet;\n\t\t\tGetControl(__uuidof(WMPLib::IWMPSettings), (LPVOID*)&wmpSet);\n\t\t\tif (wmpSet)\n\t\t\t{\n\t\t\t\twmpSet->Putvolume(m_volume);\n\t\t\t}\n\t\t}\n\n\t}\n\n\tlong CMediaPlayerUI::GetVolume( )\n\t{\n\t\tCComQIPtr<WMPLib::IWMPSettings> wmpSet;\n\t\tGetControl(__uuidof(WMPLib::IWMPSettings), (LPVOID*)&wmpSet);\n\t\tif (wmpSet)\n\t\t{\n\t\t\treturn\twmpSet->Getvolume( );\n\t\t}\n\n\t\treturn m_volume;\n\t}\n\n\tvoid CMediaPlayerUI::SetDelayCreate(bool bDelayCreate)\n\t{\n\t\tif (m_bDelayCreate == bDelayCreate) return;\n\t\tif (bDelayCreate == false) {\n\t\t\tif (m_bCreated == false && m_clsid != IID_NULL) DoCreateControl( );\n\t\t}\n\t\tm_bDelayCreate = bDelayCreate;\n\t}\n\n\tbool CMediaPlayerUI::CreateControl(const CLSID clsid)\n\t{\n\t\tASSERT(clsid != IID_NULL);\n\t\tif (clsid == IID_NULL) return false;\n\t\tm_bCreated = false;\n\t\tm_clsid = clsid;\n\t\tif (!m_bDelayCreate) DoCreateControl( );\n\t\treturn true;\n\t}\n\n}"
  },
  {
    "path": "DuiLib/Control/UIMediaPlayer.h",
    "content": "#ifndef __UIMEDIAPLAYER_H_\n#define __UIMEDIAPLAYER_H_\n\n#pragma once\n#include <atlcomcli.h>\n//class CActiveXCtrl;\n//class CActiveXUI;\n#include \"../Utils/wmp.tlh\"\n\nnamespace DuiLib\n{\n\tclass UILIB_API CMediaPlayerUI :public CActiveXUI\n\t{\n\tpublic:\n\t\tCMediaPlayerUI( );\n\t\tvirtual ~CMediaPlayerUI( );\n\n\n\t\tvirtual LPCTSTR GetClass( ) const;\n\t\tvirtual LPVOID GetInterface(LPCTSTR pstrName);\n\t\tvirtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvirtual void SetVisible(bool bVisible = true);\n\t\tvirtual void SetInnerVisible(bool bVisible = true);\n\t\tvirtual bool DoCreateControl( );\n\t\tvirtual void ReleaseControl( );\n\n\t\tvirtual\tbool CreateControl(const CLSID clsid);\n\t\tvirtual\tvoid SetDelayCreate(bool bDelayCreate);\n\n\tpublic:\n\t\tbool Play(LPCWSTR pszUrl);\n\t\tvoid SetVolume(long value);\n\t\tlong GetVolume( );\n\tprotected:\n\t\t\n\t\tCDuiString m_strUrl;\n\t\tCComQIPtr<WMPLib::IWMPPlayer4> wmp_;\n\tprivate:\n\t\tlong\tm_volume;\n\t};\n\n\n}\n\n\n#endif\n"
  },
  {
    "path": "DuiLib/Control/UIOption.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIOption.h\"\n\nnamespace DuiLib\n{\n\tCOptionUI::COptionUI() : m_bSelected(false), m_dwSelectedTextColor(0), m_dwSelectedBkColor(0xFFE6E6E6)\n\t{\n\t}\n\n\tCOptionUI::~COptionUI()\n\t{\n\t\tif( !m_sGroupName.IsEmpty() && m_pManager ) m_pManager->RemoveOptionGroup(m_sGroupName, this);\n\t}\n\n\tLPCTSTR COptionUI::GetClass() const\n\t{\n\t\treturn _T(\"OptionUI\");\n\t}\n\n\tLPVOID COptionUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_OPTION) == 0 ) return static_cast<COptionUI*>(this);\n\t\treturn CButtonUI::GetInterface(pstrName);\n\t}\n\n\tvoid COptionUI::SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit)\n\t{\n\t\tCControlUI::SetManager(pManager, pParent, bInit);\n\t\tif( bInit && !m_sGroupName.IsEmpty() ) {\n\t\t\tif (m_pManager) m_pManager->AddOptionGroup(m_sGroupName, this);\n\t\t}\n\t}\n\n\tLPCTSTR COptionUI::GetGroup() const\n\t{\n\t\treturn m_sGroupName;\n\t}\n\n\tvoid COptionUI::SetGroup(LPCTSTR pStrGroupName)\n\t{\n\t\tif( pStrGroupName == NULL ) {\n\t\t\tif( m_sGroupName.IsEmpty() ) return;\n\t\t\tm_sGroupName.Empty();\n\t\t}\n\t\telse {\n\t\t\tif( m_sGroupName == pStrGroupName ) return;\n\t\t\tif (!m_sGroupName.IsEmpty() && m_pManager) m_pManager->RemoveOptionGroup(m_sGroupName, this);\n\t\t\tm_sGroupName = pStrGroupName;\n\t\t}\n\n\t\tif( !m_sGroupName.IsEmpty() ) {\n\t\t\tif (m_pManager) m_pManager->AddOptionGroup(m_sGroupName, this);\n\t\t}\n\t\telse {\n\t\t\tif (m_pManager) m_pManager->RemoveOptionGroup(m_sGroupName, this);\n\t\t}\n\n\t\tSelected(m_bSelected);\n\t}\n\n\tbool COptionUI::IsSelected() const\n\t{\n\t\treturn m_bSelected;\n\t}\n\n\tvoid COptionUI::Selected(bool bSelected)\n\t{\n\t\tif( m_bSelected == bSelected ) return;\n\t\tm_bSelected = bSelected;\n\t\tif( m_bSelected ) m_uButtonState |= UISTATE_SELECTED;\n\t\telse m_uButtonState &= ~UISTATE_SELECTED;\n\n\t\tif( m_pManager != NULL ) {\n\t\t\tif( !m_sGroupName.IsEmpty() ) {\n\t\t\t\tif( m_bSelected ) {\n\t\t\t\t\tCStdPtrArray* aOptionGroup = m_pManager->GetOptionGroup(m_sGroupName);\n\t\t\t\t\tfor( int i = 0; i < aOptionGroup->GetSize(); i++ ) {\n\t\t\t\t\t\tCOptionUI* pControl = static_cast<COptionUI*>(aOptionGroup->GetAt(i));\n\t\t\t\t\t\tif( pControl != this ) {\n\t\t\t\t\t\t\tpControl->Selected(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_SELECTCHANGED);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_SELECTCHANGED);\n\t\t\t}\n\t\t}\n\n\t\tInvalidate();\n\t}\n\n\tbool COptionUI::Activate()\n\t{\n\t\tif( !CButtonUI::Activate() ) return false;\n\t\tif( !m_sGroupName.IsEmpty() ) Selected(true);\n\t\telse Selected(!m_bSelected);\n\n\t\treturn true;\n\t}\n\n\tvoid COptionUI::SetEnabled(bool bEnable)\n\t{\n\t\tCControlUI::SetEnabled(bEnable);\n\t\tif( !IsEnabled() ) {\n\t\t\tif( m_bSelected ) m_uButtonState = UISTATE_SELECTED;\n\t\t\telse m_uButtonState = 0;\n\t\t}\n\t}\n\n\tLPCTSTR COptionUI::GetSelectedImage()\n\t{\n\t\treturn m_sSelectedImage;\n\t}\n\n\tvoid COptionUI::SetSelectedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sSelectedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR COptionUI::GetSelectedHotImage()\n\t{\n\t\treturn m_sSelectedHotImage;\n\t}\n\n\tvoid COptionUI::SetSelectedHotImage( LPCTSTR pStrImage )\n\t{\n\t\tm_sSelectedHotImage = pStrImage;\n\t\tInvalidate();\n\t}\n\tLPCTSTR COptionUI::GetSelectedPushedImage()\n\t{\n\t\treturn m_sSelectedPushedImage;\n\t}\n\n\tvoid COptionUI::SetSelectedPushedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sSelectedPushedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\tvoid COptionUI::SetSelectedTextColor(DWORD dwTextColor)\n\t{\n\t\tm_dwSelectedTextColor = dwTextColor;\n\t}\n\n\tDWORD COptionUI::GetSelectedTextColor()\n\t{\n\t\tif (m_dwSelectedTextColor == 0) m_dwSelectedTextColor = m_pManager->GetDefaultFontColor();\n\t\treturn m_dwSelectedTextColor;\n\t}\n\n\tvoid COptionUI::SetSelectedBkColor( DWORD dwBkColor )\n\t{\n\t\tm_dwSelectedBkColor = dwBkColor;\n\t}\n\n\tDWORD COptionUI::GetSelectBkColor()\n\t{\n\t\treturn m_dwSelectedBkColor;\n\t}\n\n\tLPCTSTR COptionUI::GetForeImage()\n\t{\n\t\treturn m_sForeImage;\n\t}\n\n\tvoid COptionUI::SetForeImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sForeImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tSIZE COptionUI::EstimateSize(SIZE szAvailable)\n\t{\n\t\tif( m_cxyFixed.cy == 0 ) return CSize(m_cxyFixed.cx, m_pManager->GetFontInfo(GetFont())->tm.tmHeight + 8);\n\t\treturn CControlUI::EstimateSize(szAvailable);\n\t}\n\n\tvoid COptionUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"group\")) == 0 ) SetGroup(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"selected\")) == 0 ) Selected(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"selectedimage\")) == 0 ) SetSelectedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"selectedhotimage\")) == 0 ) SetSelectedHotImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"selectedpushedimage\")) == 0 ) SetSelectedPushedImage(pstrValue);\n\t\t//\telse if( _tcscmp(pstrName, _T(\"foreimage\")) == 0 ) SetForeImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"selectedbkcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetSelectedBkColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"selectedtextcolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetSelectedTextColor(clrColor);\n\t\t}\n\t\telse CButtonUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid COptionUI::PaintStatusImage(HDC hDC)\n\t{\n\n\t\tif (IsSelected())\n\t\t{\n\n\t\t\tif( (m_uButtonState & UISTATE_PUSHED) != 0 && !m_sSelectedPushedImage.IsEmpty()) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sSelectedPushedImage) )\n\t\t\t\t\tm_sSelectedPushedImage.Empty();\n\t\t\t\telse goto Label_ForeImage;\n\t\t\t}\n\t\t\telse if( (m_uButtonState & UISTATE_HOT) != 0  && !m_sSelectedHotImage.IsEmpty()) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sSelectedHotImage) )\n\t\t\t\t\tm_sSelectedHotImage.Empty();\n\t\t\t\telse goto Label_ForeImage;\n\t\t\t}\n\t\t\telse if( (m_uButtonState & UISTATE_SELECTED) != 0 ) \n\t\t\t{\n\t\t\t\tif( !m_sSelectedImage.IsEmpty() )\n\t\t\t\t{\n\t\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sSelectedImage) ) m_sSelectedImage.Empty();\n\t\t\t\t\telse goto Label_ForeImage;\n\t\t\t\t}\n\t\t\t\telse if(m_dwSelectedBkColor != 0)\n\t\t\t\t{\n\t\t\t\t\tCRenderEngine::DrawColor(hDC, m_rcPaint, GetAdjustColor(m_dwSelectedBkColor));\n\t\t\t\t\treturn;\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t}\n\n\n\t\tCButtonUI::PaintStatusImage(hDC);\n\nLabel_ForeImage:\n\t\tif( !m_sForeImage.IsEmpty() ) {\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sForeImage) ) m_sForeImage.Empty();\n\t\t}\n\t}\n\n\tvoid COptionUI::PaintText(HDC hDC)\n\t{\n\t\tif( (m_uButtonState & UISTATE_SELECTED) != 0 )\n\t\t{\n\t\t\tDWORD oldTextColor = m_dwTextColor;\n\t\t\tif( m_dwSelectedTextColor != 0 ) m_dwTextColor = m_dwSelectedTextColor;\n\n\t\t\tif( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor();\n\t\t\tif( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor();\n\n\t\t\tif( m_sText.IsEmpty() ) return;\n\t\t\tint nLinks = 0;\n\t\t\tRECT rc = m_rcItem;\n\t\t\trc.left += m_rcTextPadding.left;\n\t\t\trc.right -= m_rcTextPadding.right;\n\t\t\trc.top += m_rcTextPadding.top;\n\t\t\trc.bottom -= m_rcTextPadding.bottom;\n\n\t\t\tif( m_bShowHtml )\n\t\t\t\tCRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, IsEnabled()?m_dwTextColor:m_dwDisabledTextColor, \\\n\t\t\t\tNULL, NULL, nLinks, m_uTextStyle);\n\t\t\telse\n\t\t\t\tCRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, IsEnabled()?m_dwTextColor:m_dwDisabledTextColor, \\\n\t\t\t\tm_iFont, m_uTextStyle);\n\n\t\t\tm_dwTextColor = oldTextColor;\n\t\t}\n\t\telse\n\t\t\tCButtonUI::PaintText(hDC);\n\t}\n}"
  },
  {
    "path": "DuiLib/Control/UIOption.h",
    "content": "#ifndef __UIOPTION_H__\n#define __UIOPTION_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass UILIB_API COptionUI : public CButtonUI\n\t{\n\tpublic:\n\t\tCOptionUI();\n\t\t~COptionUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tvoid SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit = true);\n\n\t\tbool Activate();\n\t\tvoid SetEnabled(bool bEnable = true);\n\n\t\tLPCTSTR GetSelectedImage();\n\t\tvoid SetSelectedImage(LPCTSTR pStrImage);\n\n\t\tLPCTSTR GetSelectedHotImage();\n\t\tvoid SetSelectedHotImage(LPCTSTR pStrImage);\n\n\t\tvoid SetSelectedTextColor(DWORD dwTextColor);\n\t\tDWORD GetSelectedTextColor();\n\n\t\tLPCTSTR GetSelectedPushedImage();\n\t\tvoid SetSelectedPushedImage(LPCTSTR pStrImage);\n\n\t\tvoid SetSelectedBkColor(DWORD dwBkColor);\n\t\tDWORD GetSelectBkColor();\n\n\t\tLPCTSTR GetForeImage();\n\t\tvoid SetForeImage(LPCTSTR pStrImage);\n\n\t\tLPCTSTR GetGroup() const;\n\t\tvoid SetGroup(LPCTSTR pStrGroupName = NULL);\n\t\tbool IsSelected() const;\n\t\tvirtual void Selected(bool bSelected);\n\n\t\tSIZE EstimateSize(SIZE szAvailable);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvoid PaintStatusImage(HDC hDC);\n\t\tvoid PaintText(HDC hDC);\n\n\tprotected:\n\t\tbool\t\t\tm_bSelected;\n\t\tCDuiString\t\tm_sGroupName;\n\n\t\tDWORD\t\t\tm_dwSelectedBkColor;\n\t\tDWORD\t\t\tm_dwSelectedTextColor;\n\n\t\tCDuiString\t\tm_sSelectedImage;\n\t\tCDuiString\t\tm_sSelectedHotImage;\n\t\tCDuiString\t\tm_sSelectedPushedImage;\n\t\tCDuiString\t\tm_sForeImage;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UIOPTION_H__"
  },
  {
    "path": "DuiLib/Control/UIProgress.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIProgress.h\"\n\nnamespace DuiLib\n{\n\tCProgressUI::CProgressUI() : m_bHorizontal(true), m_nMin(0), m_nMax(100), m_nValue(0), m_bStretchForeImage(true)\n\t{\n\t\tm_uTextStyle = DT_SINGLELINE | DT_CENTER;\n\t\tSetFixedHeight(12);\n\t}\n\n\tLPCTSTR CProgressUI::GetClass() const\n\t{\n\t\treturn _T(\"ProgressUI\");\n\t}\n\n\tLPVOID CProgressUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_PROGRESS) == 0 ) return static_cast<CProgressUI*>(this);\n\t\treturn CLabelUI::GetInterface(pstrName);\n\t}\n\n\tbool CProgressUI::IsHorizontal()\n\t{\n\t\treturn m_bHorizontal;\n\t}\n\n\tvoid CProgressUI::SetHorizontal(bool bHorizontal)\n\t{\n\t\tif( m_bHorizontal == bHorizontal ) return;\n\n\t\tm_bHorizontal = bHorizontal;\n\t\tInvalidate();\n\t}\n\n\tint CProgressUI::GetMinValue() const\n\t{\n\t\treturn m_nMin;\n\t}\n\n\tvoid CProgressUI::SetMinValue(int nMin)\n\t{\n\t\tm_nMin = nMin;\n\t\tInvalidate();\n\t}\n\n\tint CProgressUI::GetMaxValue() const\n\t{\n\t\treturn m_nMax;\n\t}\n\n\tvoid CProgressUI::SetMaxValue(int nMax)\n\t{\n\t\tm_nMax = nMax;\n\t\tInvalidate();\n\t}\n\n\tint CProgressUI::GetValue() const\n\t{\n\t\treturn m_nValue;\n\t}\n\n\tvoid CProgressUI::SetValue(int nValue)\n\t{\n\t\tif(nValue == m_nValue || nValue<m_nMin || nValue > m_nMax)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tm_nValue = nValue;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CProgressUI::GetForeImage() const\n\t{\n\t\treturn m_sForeImage;\n\t}\n\n\tvoid CProgressUI::SetForeImage(LPCTSTR pStrImage)\n\t{\n\t\tif( m_sForeImage == pStrImage ) return;\n\n\t\tm_sForeImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tvoid CProgressUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"foreimage\")) == 0 ) SetForeImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"hor\")) == 0 ) SetHorizontal(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"min\")) == 0 ) SetMinValue(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"max\")) == 0 ) SetMaxValue(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"value\")) == 0 ) SetValue(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"isstretchfore\"))==0) SetStretchForeImage(_tcscmp(pstrValue, _T(\"true\")) == 0? true : false);\n\t\telse CLabelUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CProgressUI::PaintStatusImage(HDC hDC)\n\t{\n\t\tif( m_nMax <= m_nMin ) m_nMax = m_nMin + 1;\n\t\tif( m_nValue > m_nMax ) m_nValue = m_nMax;\n\t\tif( m_nValue < m_nMin ) m_nValue = m_nMin;\n\n\t\tRECT rc = {0};\n\t\tif( m_bHorizontal ) {\n\t\t\trc.right = (m_nValue - m_nMin) * (m_rcItem.right - m_rcItem.left) / (m_nMax - m_nMin);\n\t\t\trc.bottom = m_rcItem.bottom - m_rcItem.top;\n\t\t}\n\t\telse {\n\t\t\trc.top = (m_rcItem.bottom - m_rcItem.top) * (m_nMax - m_nValue) / (m_nMax - m_nMin);\n\t\t\trc.right = m_rcItem.right - m_rcItem.left;\n\t\t\trc.bottom = m_rcItem.bottom - m_rcItem.top;\n\t\t}\n\n\t\tif( !m_sForeImage.IsEmpty() ) {\n\t\t\tm_sForeImageModify.Empty();\n\t\t\tif (m_bStretchForeImage)\n\t\t\t\tm_sForeImageModify.SmallFormat(_T(\"dest='%d,%d,%d,%d'\"), rc.left, rc.top, rc.right, rc.bottom);\n\t\t\telse\n\t\t\t\tm_sForeImageModify.SmallFormat(_T(\"dest='%d,%d,%d,%d' source='%d,%d,%d,%d'\")\n\t\t\t\t, rc.left, rc.top, rc.right, rc.bottom\n\t\t\t\t, rc.left, rc.top, rc.right, rc.bottom);\n\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sForeImage, (LPCTSTR)m_sForeImageModify) ) m_sForeImage.Empty();\n\t\t\telse return;\n\t\t}\n\t}\n\n\tbool CProgressUI::IsStretchForeImage()\n\t{\n\t\treturn m_bStretchForeImage;\n\t}\n\n\tvoid CProgressUI::SetStretchForeImage( bool bStretchForeImage /*= true*/ )\n\t{\n\t\tif (m_bStretchForeImage==bStretchForeImage)\t\treturn;\n\t\tm_bStretchForeImage=bStretchForeImage;\n\t\tInvalidate();\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Control/UIProgress.h",
    "content": "#ifndef __UIPROGRESS_H__\n#define __UIPROGRESS_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass UILIB_API CProgressUI : public CLabelUI\n\t{\n\tpublic:\n\t\tCProgressUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tbool IsHorizontal();\n\t\tvoid SetHorizontal(bool bHorizontal = true);\n\t\tbool IsStretchForeImage();\n\t\tvoid SetStretchForeImage(bool bStretchForeImage = true);\n\t\tint GetMinValue() const;\n\t\tvoid SetMinValue(int nMin);\n\t\tint GetMaxValue() const;\n\t\tvoid SetMaxValue(int nMax);\n\t\tint GetValue() const;\n\t\tvoid SetValue(int nValue);\n\t\tLPCTSTR GetForeImage() const;\n\t\tvoid SetForeImage(LPCTSTR pStrImage);\n\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\t\tvoid PaintStatusImage(HDC hDC);\n\n\tprotected:\n\t\tbool m_bHorizontal;\n\t\tbool m_bStretchForeImage;\n\t\tint m_nMax;\n\t\tint m_nMin;\n\t\tint m_nValue;\n\n\t\tCDuiString m_sForeImage;\n\t\tCDuiString m_sForeImageModify;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UIPROGRESS_H__\n"
  },
  {
    "path": "DuiLib/Control/UIRichEdit.cpp",
    "content": "﻿#include \"stdafx.h\"\n#include <wchar.h>\n#include <oledlg.h> \n#pragma comment(lib,\"OleDlg.lib\")\n\n// These constants are for backward compatibility. They are the \n// sizes used for initialization and reset in RichEdit 1.0\n\nnamespace DuiLib\n{\n\n\tconst LONG cInitTextMax = (32 * 1024) - 1;\n\n\tEXTERN_C const IID IID_ITextServices = { // 8d33f740-cf58-11ce-a89d-00aa006cadc5\n\t\t0x8d33f740,\n\t\t0xcf58,\n\t\t0x11ce,\n\t\t{ 0xa8, 0x9d, 0x00, 0xaa, 0x00, 0x6c, 0xad, 0xc5 }\n\t};\n\n\tEXTERN_C const IID IID_ITextHost = { /* c5bdd8d0-d26e-11ce-a89e-00aa006cadc5 */\n\t\t0xc5bdd8d0,\n\t\t0xd26e,\n\t\t0x11ce,\n\t\t{ 0xa8, 0x9e, 0x00, 0xaa, 0x00, 0x6c, 0xad, 0xc5 }\n\t};\n\n#ifndef LY_PER_INCH\n#define LY_PER_INCH 1440\n#endif\n\n#ifndef HIMETRIC_PER_INCH\n#define HIMETRIC_PER_INCH 2540\n#endif\n\n#include <textserv.h>\n\n\tclass CRichEditOleCallback : public IRichEditOleCallback\n\t{\n\tprotected:\n\t\tULONG m_cRef;\t\t\t// Object Reference Count  \n\t\tint m_iNumStorages;\n\t\tIStorage* pStorage;\n\t\tCRichEditUI *m_pRichEditUI;\n\tpublic:\n\t\t// Constructors and Destructor\n\t\tCRichEditOleCallback(CRichEditUI *pRichEditUI);\n\t\tvirtual ~CRichEditOleCallback( );\n\n\tpublic:\n\t\t// IUnknown Interface Members\n\t\tSTDMETHODIMP \t\t QueryInterface(REFIID riid, LPVOID* ppv);\n\t\tSTDMETHODIMP_(ULONG) AddRef(void);\n\t\tSTDMETHODIMP_(ULONG) Release(void);\n\n\t\t// IRichEditOleCallback Interface Members\n\t\tSTDMETHODIMP GetNewStorage(LPSTORAGE* ppStg);\n\t\tSTDMETHODIMP GetInPlaceContext(LPOLEINPLACEFRAME* ppFrame,\n\t\t\tLPOLEINPLACEUIWINDOW* ppDoc,\n\t\t\tLPOLEINPLACEFRAMEINFO pFrameInfo);\n\t\tSTDMETHODIMP ShowContainerUI(BOOL fShow);\n\t\tSTDMETHODIMP QueryInsertObject(LPCLSID pclsid, LPSTORAGE pStg, LONG cp);\n\t\tSTDMETHODIMP DeleteObject(LPOLEOBJECT pOleObj);\n\t\tSTDMETHODIMP QueryAcceptData(LPDATAOBJECT pDataObj, CLIPFORMAT* pcfFormat,\n\t\t\tDWORD reco, BOOL fReally, HGLOBAL hMetaPict);\n\t\tSTDMETHODIMP ContextSensitiveHelp(BOOL fEnterMode);\n\t\tSTDMETHODIMP GetClipboardData(CHARRANGE* pchrg, DWORD reco,\n\t\t\tLPDATAOBJECT* ppDataObject);\n\t\tSTDMETHODIMP GetDragDropEffect(BOOL fDrag, DWORD grfKeyState,\n\t\t\tLPDWORD pdwEffect);\n\t\tSTDMETHODIMP GetContextMenu(WORD seltype, LPOLEOBJECT pOleObj,\n\t\t\tCHARRANGE* pchrg, HMENU* phMenu);\n\n\t};\n\n\n\tCRichEditOleCallback::CRichEditOleCallback(CRichEditUI *pRichEditUI)\n\t\t: m_cRef(0), m_pRichEditUI(NULL)\n\n\t{\n\t\tpStorage = NULL;\n\t\tm_iNumStorages = 0;\n\t\tm_cRef = 0;\n\n\t\t// set up OLE storage\n\n\t\tHRESULT hResult = ::StgCreateDocfile(NULL,\n\t\t\tSTGM_TRANSACTED | STGM_READWRITE | STGM_SHARE_EXCLUSIVE /*| STGM_DELETEONRELEASE */ | STGM_CREATE,\n\t\t\t0, &pStorage);\n\n\t\tif (pStorage == NULL ||\n\t\t\thResult != S_OK)\n\t\t{\n\t\t\t;//AfxThrowOleException( hResult );\n\t\t}\n\n\t\tm_pRichEditUI = pRichEditUI;\n\t}\n\n\tCRichEditOleCallback::~CRichEditOleCallback( )\n\t{\n\n\t}\n\t/////////////////////////////////////////////////////////////////////////////\n\t// IUnknown Interface members\n\t//\n\n\tHRESULT CRichEditOleCallback::QueryInterface(REFIID riid, LPVOID* ppv)\n\t{\n\t\t*ppv = NULL;\n\n\t\t//提示重复声明,直接改名字算了\n\t\tGUID IID_IRichEditOleCallback2 = { 0x00020D03, 0x0, 0x0, { 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46 } };\n\n\t\tif (IID_IUnknown == riid)\n\t\t{\n\t\t\t*ppv = (LPUNKNOWN) this;\n\t\t}\n\t\telse if (IID_IRichEditOleCallback2 == riid)\n\t\t{\n\t\t\t*ppv = (LPRICHEDITOLECALLBACK) this;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//\t\tDebugTrace(TEXT(\"E_NOINTERFACE.\\r\\n\"));\n\t\t}\n\n\t\tif (NULL == *ppv)\n\t\t\treturn ResultFromScode(E_NOINTERFACE);\n\n\t\t((LPUNKNOWN)*ppv)->AddRef( );\n\t\treturn NOERROR;\n\t}\n\n\tULONG CRichEditOleCallback::AddRef(void)\n\t{\n\t\tm_cRef++;\n\t\t//DebugCount(TEXT(\"CRichEditOleCallback::AddRef().  Count = %d.\\r\\n\"),m_cRef);\n\t\treturn m_cRef;\n\t}\n\n\tULONG CRichEditOleCallback::Release(void)\n\t{\n\t\tm_cRef--;\n\t\t//\tDebugCount(TEXT(\"CRichEditOleCallback::Release().  Count = %d.\\r\\n\"),m_cRef);\n\n\t\tif (0 == m_cRef)\n\t\t{\n\t\t\tdelete this;\n\t\t\treturn m_cRef;\n\t\t}\n\t\treturn 0;\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////\n\t// IRichEditOleCallback Interface Members\n\t//\n\n\t//\n\t//  FUNCTION:   CRichEditOleCallback::GetNewStorage\n\t//\n\t//  PURPOSE:    Gets a storage for a new object.\n\t//\n\t//  PARAMETERS:\n\t//      ppStg - Where to return the storage.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\t//  COMMENTS:\n\t//      Implemented in the document object.\n\t//\n\n\tHRESULT CRichEditOleCallback::GetNewStorage(LPSTORAGE* ppStg)\n\t{\n\t\t/*\n\t\tif (!ppStg)\n\t\treturn E_INVALIDARG;\n\n\t\t*ppStg = NULL;\n\n\t\t//\n\t\t// We need to create a new storage for an object to occupy.  We're going\n\t\t// to do this the easy way and just create a storage on an HGLOBAL and let\n\t\t// OLE do the management.  When it comes to saving things we'll just let\n\t\t// the RichEdit control do the work.  Keep in mind this is not efficient,\n\t\t// but this program is just for demonstration.\n\t\t//\n\n\t\tLPLOCKBYTES pLockBytes;\n\t\tHRESULT hr = CreateILockBytesOnHGlobal(NULL, TRUE, &pLockBytes);\n\t\tif (FAILED(hr))\n\t\treturn hr;\n\n\t\thr = StgCreateDocfileOnILockBytes(pLockBytes,\n\t\tSTGM_SHARE_EXCLUSIVE | STGM_CREATE |\n\t\tSTGM_READWRITE,\n\t\t0,\n\t\tppStg);\n\t\tpLockBytes->Release();\n\t\treturn (hr);\n\t\t*/\n\n\t\tm_iNumStorages++;\n\n\t\tWCHAR tName[50];\n\t\tswprintf(tName, L\"REOLEStorage%d\", m_iNumStorages);\n\n\t\tHRESULT hResult = pStorage->CreateStorage(tName,\n\t\t\tSTGM_TRANSACTED | STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE,\n\t\t\t0, 0, ppStg);\n\n\t\tif (hResult != S_OK)\n\t\t{\n\t\t\t;//::AfxThrowOleException( hResult );\n\t\t}\n\n\t\treturn hResult;\n\t}\n\n\n\t//\n\t//  FUNCTION:   CRichEditOleCallback::GetInPlaceContext\n\t//\n\t//  PURPOSE:    Gets the context information for an in place object.\n\t//\n\t//  PARAMETERS:\n\t//      ppFrame    - Pointer to the frame window object.\n\t//\t\tppDoc      - Pointer to the document window object.\n\t//\t\tpFrameInfo - Pointer to the frame window information.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\t//\n\n\tHRESULT CRichEditOleCallback::GetInPlaceContext(LPOLEINPLACEFRAME* ppFrame,\n\t\tLPOLEINPLACEUIWINDOW* ppDoc,\n\t\tLPOLEINPLACEFRAMEINFO pFrameInfo)\n\t{\n\t\t//\tDebugTrace(TEXT(\"CRichEditOleCallback::GetInPlaceContext()\\r\\n\"));\n\n\t\t//\n\t\t// Validate the arguments\n\t\t//\n\t\tif (!ppFrame || !ppDoc || !pFrameInfo)\n\t\t{\n\t\t\t//DebugMsg(TEXT(\"CRichEditOleCallback::GetInPlaceContext() received an\") TEXT(\" invalid argument.\\r\\n\"));\n\t\t\treturn E_INVALIDARG;\n\t\t}\n\n\t\t/*\n\t\t//\n\t\t// Return the appropriate interface pointers.\n\t\t//\n\t\t*ppDoc = (LPOLEINPLACEUIWINDOW) m_pDoc->GetInPlaceFrame();\n\t\tif (*ppDoc)\n\t\t(*ppDoc)->AddRef();\n\n\t\t*ppFrame = m_pDoc->GetInPlaceFrame();\n\t\tif (*ppFrame)\n\t\t(*ppFrame)->AddRef();\n\t\t*/\n\n\n\t\t//\n\t\t// Fill in the default frame window information.\n\t\t//\n\t\tpFrameInfo->fMDIApp = FALSE;\n\t\t//pFrameInfo->hwndFrame = m_pDoc->GetFrameWindow();\n\t\t//pFrameInfo->haccel = m_pDoc->GetInPlaceAccel();\n\n\t\t//\n\t\t// Note: CopyAcceleratorTable() returns the number of items in the table\n\t\t// \t     if the\tlpAccelDest is NULL.\n\t\t//\n\t\tpFrameInfo->cAccelEntries = CopyAcceleratorTable(pFrameInfo->haccel,\n\t\t\tNULL, 0);\n\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:\tCRichEditOleCallback::ShowContainerUI\n\t//\n\t//  PURPOSE:\tHandles the showing or hiding of the container UI.\n\t//\n\t//  PARAMETERS:\n\t//      fShow - TRUE if the function should display the UI, FALSE to hide it.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT CRichEditOleCallback::ShowContainerUI(BOOL fShow)\n\t{\n\t\t//\tDebugTrace(TEXT(\"CRichEditOleCallback::ShowContainerUI()\\r\\n\"));\n\n\t\t/*\n\t\tif (!m_pDoc->GetInPlaceFrame()) \t// This should never fail, but just in case...\n\t\treturn E_FAIL;\n\n\t\tif (fShow)\n\t\t{\n\t\t(m_pDoc->GetInPlaceFrame())->ReinstateUI();\n\t\t//SetFocus(m_hwndEdit);\n\t\t}\n\t\telse\n\t\t(m_pDoc->GetInPlaceFrame())->ShowUIAndTools(FALSE, FALSE);\n\t\t*/\n\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:\tCRichEditOleCallback::QueryInsertObject\n\t//\n\t//  PURPOSE:    Called to ask whether an object should be inserted.  We're\n\t//\t\t\t\tgoing to allow everything to be inserted.\n\t//\n\n\tHRESULT CRichEditOleCallback::QueryInsertObject(LPCLSID /* pclsid */,\n\t\tLPSTORAGE /* pStg */,\n\t\tLONG /* cp */)\n\t{\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:   CRichEditOleCallback::DeleteObject\n\t//\n\t//  PURPOSE:    Notification that an object is going to be deleted.\n\t//\n\n\tHRESULT CRichEditOleCallback::DeleteObject(LPOLEOBJECT /* pOleObj */)\n\t{\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:   CRichEditOleCallback::QueryAcceptData\n\t//\n\t//  PURPOSE:    Called to ask whether the data that is being pasted or\n\t//\t\t\t\tdragged should be accepted.  We accept everything.\n\t//\n\n\tHRESULT CRichEditOleCallback::QueryAcceptData(LPDATAOBJECT /* pDataObj */,\n\t\tCLIPFORMAT* /* pcfFormat */,\n\t\tDWORD /* reco */,\n\t\tBOOL /* fReally */,\n\t\tHGLOBAL /* hMetaPict */)\n\t{\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:   CRichEditOleCallback::ContextSensitiveHelp\n\t//\n\t//  PURPOSE:    Tells the application that it should transition into or out of\n\t//\t\t\t\tcontext sensitive help mode.  We don't implement help at all\n\t//\t\t\t\tso blow this off.\n\t//\n\n\tHRESULT CRichEditOleCallback::ContextSensitiveHelp(BOOL fEnterMode)\n\t{\n\t\treturn E_NOTIMPL;\n\t}\n\n\n\t//\n\t//  FUNCTION:   CRichEditOleCallback::GetClipboardData\n\t//\n\t//  PURPOSE:    Called when the rich edit needs to provide clipboard data.\n\t//\t\t\t\tWe'll let the rich edit control handle this one.\n\t//\n\n\tHRESULT CRichEditOleCallback::GetClipboardData(CHARRANGE* /* pchrg */,\n\t\tDWORD /* reco */,\n\t\tLPDATAOBJECT* ppDataObject)\n\n\t{\n\t\t*ppDataObject = NULL;\n\t\treturn E_NOTIMPL;\n\t}\n\n\n\t//\n\t//  FUNCTION:   CRichEditOleCallback::GetDragDropEffect\n\t//\n\t//  PURPOSE:    Allows us to determine the drag cursor effect when the user\n\t//\t\t\t\tis dragging something over us.  We'll let the rich edit control\n\t//\t\t\t\thandle this one as well.\n\t//\n\n\tHRESULT CRichEditOleCallback::GetDragDropEffect(BOOL /* fDrag */,\n\t\tDWORD /* grfKeyState */,\n\t\tLPDWORD /* pdwEffect */)\n\t{\n\t\treturn E_NOTIMPL;\n\t}\n\n\n\t//\n\t//  FUNCTION:   CRichEditOleCallback::GetContextMenu\n\t//\n\t//  PURPOSE:    Creates the context menu for alternate mouse clicks in the\n\t//\t\t\t\tRichEdit control.\n\t//\n\t//  PARAMETERS:\n\t//      seltype - Selection type\n\t//\t\tpOleObj - IOleObject interface of the selected object, if any\n\t//\t\tpchrg   - Selection range\n\t//\t\tphMenu  - Place to return the constructed menu\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT CRichEditOleCallback::GetContextMenu(WORD seltype,\n\t\tLPOLEOBJECT pOleObj,\n\t\tCHARRANGE* pchrg,\n\t\tHMENU* phMenu)\n\t{\n\t\tHMENU hMenuVerbs = NULL;\n\n\t\t//\n\t\t// First create the menu.\n\t\t//\n\t\t*phMenu = CreatePopupMenu( );\n\t\tif (!*phMenu)\n\t\t\treturn E_FAIL;\n\n\t\t//\n\t\t// Now put the verbs on the menu if we have a selected object.\n\t\t//\n\t\tif (pOleObj)\n\t\t{\n\t\t\tOleUIAddVerbMenu(pOleObj, NULL, *phMenu, 0, IDM_VERBMIN, IDM_VERBMAX, TRUE, ID_EDIT_CONVERT, &hMenuVerbs);\n\n\t\t\tAppendMenu(*phMenu, MF_SEPARATOR, 0, NULL);\n\t\t}\n\n\t\t//\n\t\t// If there isn't anything selected, then gray out the cut and copy\n\t\t// menu items.\n\t\t//\n\t\tUINT mf = MF_STRING | MF_BYCOMMAND;\n\t\tmf |= (pchrg->cpMin == pchrg->cpMax ? MF_GRAYED : MF_ENABLED);\n\n\t\t//\n\t\t// Add the cut, copy, and paste verbs.\n\t\t//\n\t\tAppendMenu(*phMenu, mf, CRICHEDITUI_ID_EDIT_CUT, TEXT(\"Cu&t\"));\n\t\tAppendMenu(*phMenu, mf, CRICHEDITUI_ID_EDIT_COPY, TEXT(\"&Copy\"));\n\n\t\t//\n\t\t// Now decide if there is something that can be pasted into the Rich Edit\n\t\t// control.\n\t\t//\n\t\tmf = MF_STRING | MF_BYCOMMAND;\n\n\t\tLRESULT result;\n\t\tmf |= (m_pRichEditUI->TxSendMessage(EM_CANPASTE, 0, 0, &result) ? MF_ENABLED : MF_GRAYED);\n\t\tAppendMenu(*phMenu, mf, CRICHEDITUI_ID_EDIT_PASTE, TEXT(\"&Paste\"));\n\n\t\treturn S_OK;\n\t}\n\n\n\n\n\t//\n\t// Description - This class implements the application's IOleWindow,\n\t// IOleInPlaceUIWindow, and IOleInPlaceFrame interfaces.  \n\t//\n\n\n\tclass COleInPlaceFrame : public IOleInPlaceFrame\n\t{\n\tprivate:\n\t\tULONG m_cRef;\t  \t\t\t// Object reference count\n\t\tHWND  m_hwndFrame;\t\t\t// Application frame window\n\t\tBOOL  m_fHelpMode;\t\t\t// Context-Sensitive help mode flag\n\n\tpublic:\n\t\t//\n\t\t// Constructors and Destructors\n\t\t//\n\t\tCOleInPlaceFrame(HWND hwndFrame = NULL)\n\t\t\t: m_hwndFrame(hwndFrame), m_cRef(0), m_fHelpMode(FALSE)\n\t\t{\n\t\t}\n\t\t~COleInPlaceFrame( );\n\n\t\t//\n\t\t// IUnknown Interface members\n\t\t//\n\t\tSTDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv);\n\t\tSTDMETHODIMP_(ULONG) AddRef( );\n\t\tSTDMETHODIMP_(ULONG) Release( );\n\n\t\t//\n\t\t// IOleWindow Interface members\n\t\t//\n\t\tSTDMETHODIMP GetWindow(HWND* pHwnd);\n\t\tSTDMETHODIMP ContextSensitiveHelp(BOOL fEnterMode);\n\n\t\t//\n\t\t// IOleInPlaceUIWindow Interface members\n\t\t//\n\t\tSTDMETHODIMP GetBorder(LPRECT prcBorder);\n\t\tSTDMETHODIMP RequestBorderSpace(LPCBORDERWIDTHS pbw);\n\t\tSTDMETHODIMP SetBorderSpace(LPCBORDERWIDTHS pbw);\n\t\tSTDMETHODIMP SetActiveObject(LPOLEINPLACEACTIVEOBJECT pInPlaceActiveObject,\n\t\t\tLPCOLESTR szObjName);\n\n\t\t//\n\t\t// IOleInPlaceFrame Interface members\n\t\t//\n\t\tSTDMETHODIMP InsertMenus(HMENU hmenuShared,\n\t\t\tLPOLEMENUGROUPWIDTHS pMenuWidths);\n\t\tSTDMETHODIMP SetMenu(HMENU hmenuShared, HOLEMENU holemenu,\n\t\t\tHWND hwndActiveObject);\n\t\tSTDMETHODIMP RemoveMenus(HMENU hmenuShared);\n\t\tSTDMETHODIMP SetStatusText(LPCOLESTR szStatusText);\n\t\tSTDMETHODIMP EnableModeless(BOOL fEnable);\n\t\tSTDMETHODIMP TranslateAccelerator(LPMSG pMsg, WORD wID);\n\n\t\t//\n\t\t// UI Helpers\n\t\t//\n\t\tvoid ShowUIAndTools(BOOL fShow, BOOL fMenu);\n\t\tvoid ReinstateUI(void);\n\tpublic:\n\t\tstatic LPOLEINPLACEACTIVEOBJECT g_pActiveObject;\n\t};\n\n\n\n\tCOleInPlaceFrame::~COleInPlaceFrame( )\n\t{\n\t\t// if (m_cRef != 0) DebugMsg(TEXT(\"WARNING!!! Object destroyed with m_cRef = %d!\\r\\n\"),m_cRef);\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////\n\t// IUnknown Interface members\n\t//\n\n\tHRESULT COleInPlaceFrame::QueryInterface(REFIID riid, LPVOID* ppv)\n\t{\n\t\t*ppv = NULL;\n\n\t\t//DebugTrace(TEXT(\"COleInPlaceFrame::QueryInterface() returns \"));\n\n\t\tif (IID_IUnknown == riid)\n\t\t{\n\t\t\t//\t\tDebugTrace(TEXT(\"IUnknown.\\r\\n\"));\n\t\t\t*ppv = (LPUNKNOWN) this;\n\t\t}\n\t\telse if (IID_IOleWindow == riid)\n\t\t{\n\t\t\t//\t\tDebugTrace(TEXT(\"IOleWindow.\\r\\n\"));\n\t\t\t*ppv = (LPOLEWINDOW) this;\n\t\t}\n\t\telse if (IID_IOleInPlaceUIWindow == riid)\n\t\t{\n\t\t\t//\t\tDebugTrace(TEXT(\"IOleInPlaceUIWindow.\\r\\n\"));\n\t\t\t*ppv = (LPOLEINPLACEUIWINDOW) this;\n\t\t}\n\t\telse if (IID_IOleInPlaceFrame == riid)\n\t\t{\n\t\t\t//\t\tDebugTrace(TEXT(\"IOleInPlaceFrame.\\r\\n\"));\n\t\t\t*ppv = (LPOLEINPLACEFRAME) this;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//\t\tDebugTrace(TEXT(\" E_NOINTERFACE\\r\\n\"));\n\t\t}\n\n\n\n\t\tif (NULL == *ppv)\n\t\t\treturn ResultFromScode(E_NOINTERFACE);\n\n\t\t((LPUNKNOWN)*ppv)->AddRef( );\n\t\treturn NOERROR;\n\t}\n\n\tULONG COleInPlaceFrame::AddRef( )\n\t{\n\t\tm_cRef++;\n\t\t//DebugCount(TEXT(\"COleInPlaceFrame::AddRef().  Count = %d.\\r\\n\"),m_cRef);\n\t\treturn m_cRef;\n\t}\n\n\tULONG COleInPlaceFrame::Release( )\n\t{\n\t\tm_cRef--;\n\t\t//DebugCount(TEXT(\"COleInPlaceFrame::Release().  Count = %d.\\r\\n\"),m_cRef);\n\n\t\tif (0 == m_cRef)\n\t\t\tdelete this;\n\n\t\treturn m_cRef;\n\t}\n\n\n\n\t/////////////////////////////////////////////////////////////////////////////\n\t// IOleWindow Interface members\n\t//\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::GetWindow\n\t//\n\t//  PURPOSE:    Returns the window handle of the top level application window.\n\t//\n\t//  PARAMETERS:\n\t//      (out) pHwnd - Pointer where we return the handle of the frame window.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT COleInPlaceFrame::GetWindow(HWND* pHwnd)\n\t{\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::GetWindow.\\r\\n\"));\n\t\tif (!pHwnd)\n\t\t\treturn E_INVALIDARG;\n\n\t\t*pHwnd = m_hwndFrame;\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::ContextSensitiveHelp\n\t//\n\t//  PURPOSE:    Notifies the frame that the object has entered context help\n\t//\t\t\t\tmode.\n\t//\n\t//  PARAMETERS:\n\t//      (in)  fEnterMode - TRUE if the object is entering help mode, FALSE if\n\t//\t\t\t\t\t \t   leaving help mode.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT COleInPlaceFrame::ContextSensitiveHelp(BOOL fEnterMode)\n\t{\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::ContextSensitiveHelp.\\r\\n\"));\n\t\tif (m_fHelpMode != fEnterMode)\n\t\t{\n\t\t\tm_fHelpMode = fEnterMode;\n\n\t\t\t//\n\t\t\t// We're just going to forward the context sensitive help stuff\n\t\t\t// to the inplace active object since we don't support context\n\t\t\t// help ourselves.\n\t\t\t//\n\t\t\tif (g_pActiveObject)\n\t\t\t{\n\t\t\t\tLPOLEINPLACEOBJECT pInPlaceObject;\n\t\t\t\tg_pActiveObject->QueryInterface(IID_IOleInPlaceObject,\n\t\t\t\t\t(LPVOID*)&pInPlaceObject);\n\t\t\t\tif (pInPlaceObject)\n\t\t\t\t{\n\t\t\t\t\tpInPlaceObject->ContextSensitiveHelp(fEnterMode);\n\t\t\t\t\tpInPlaceObject->Release( );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn S_OK;\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////\n\t// IOleInPlaceUIWindow Interface members\n\t//\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::GetBorder\n\t//\n\t//  PURPOSE:    The object is asking for a rectangle in which it can put\n\t//\t\t\t\ttoolbars and similar controls while active in place.\n\t//\n\t//  PARAMETERS:\n\t//      (out) prcBorder - Pointer to a rectangle containing the area that the\n\t//\t\t\t\t\t\t  object can use.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT COleInPlaceFrame::GetBorder(LPRECT prcBorder)\n\t{\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::GetBorder.\\r\\n\"));\n\t\tif (!prcBorder)\n\t\t\treturn E_INVALIDARG;\n\n\t\t//\n\t\t// Get the client area of the frame window.  We need to subtract the\n\t\t// area occupied by any toolbars or status bars we want to keep while\n\t\t// the object is active.\n\t\t//\n\n\t\tGetClientRect(m_hwndFrame, prcBorder);\n\t\t//prcBorder->bottom -= g_pStatusBar->GetHeight();\n\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::RequestBorderSpace\n\t//\n\t//  PURPOSE:    Determines whether tools can be installed around the objects\n\t//\t\t\t\twindow frame while the object is active in place.\n\t//\n\t//  PARAMETERS:\n\t//      (in) pbw - Requested border space\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT COleInPlaceFrame::RequestBorderSpace(LPCBORDERWIDTHS pbw)\n\t{\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::RequestBorderSpace.\\r\\n\"));\n\t\t// Accept all requests\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::SetBorderSpace\n\t//\n\t//  PURPOSE:    Allocates space for the border requested by the active\n\t//\t\t\t\tin place object.\n\t//\n\t//  PARAMETERS:\n\t//      (in) pbw - Pointer to the structure containing the requested widths\n\t//\t\t\t\t   in pixels of the tools.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\t//  COMMENTS:\n\t//\t\tIf the pbw is NULL, then the object is saying it doesn't have any of\n\t//\t\tit's own tools and we can leave our tools visible.  If pbw = \n\t//\t\t{0, 0, 0, 0), then the object has no tools, but it doesn't want our\n\t//\t\ttools visible either.\n\t//\n\n\tHRESULT COleInPlaceFrame::SetBorderSpace(LPCBORDERWIDTHS pbw)\n\t{\n\t\tRECT rcClient;\t\t\t// Rectangle of the current frame client area\n\t\tRECT rcOldEdit;\t\t\t// Old rectangle for the edit control\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::SetBorderSpace.\\r\\n\"));\n\n\t\t//\n\t\t// Remember the previous position of the client window in coordinates\n\t\t// relative to the frame window.\n\t\t//\n\t\t//GetWindowRect(GetDlgItem(m_hwndFrame, IDC_EDIT), &rcOldEdit);\n\t\tMapWindowPoints(NULL, m_hwndFrame, (LPPOINT)&rcOldEdit, 2);\n\n\t\t//\n\t\t// Get the client window rect.  We also need to subtract the area of any\n\t\t// status bars or tools that shouldn't disappear when the object is\n\t\t// active.\n\t\t//\n\t\tGetClientRect(m_hwndFrame, &rcClient);\n\t\t//rcClient.bottom -= g_pStatusBar->GetHeight();\n\n\t\tif (pbw)\n\t\t{\n\t\t\t//\n\t\t\t// Set the space for the object tools.\n\t\t\t//\n\t\t\trcClient.left += pbw->left;\n\t\t\trcClient.top += pbw->top;\n\t\t\trcClient.right -= pbw->right;\n\t\t\trcClient.bottom -= pbw->bottom;\n\n\t\t\t//\n\t\t\t// Save the new border widths.  We also need to add space for any\n\t\t\t// status bars or tools that are still visible.\n\t\t\t//\n\t\t\t//CopyRect(&g_rcBorderSpace, pbw);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//\n\t\t\t// No tools, reset the border space.  If we have any of our own tools\n\t\t\t// such as a status bar we need to add it to this rect.\n\t\t\t//\n\t\t\t//SetRect(&g_rcBorderSpace, 0, 0, 0, 0);\n\t\t}\n\n\t\t//\n\t\t// Only move the window if the rectangles have changed.\n\t\t//\n\t\tif (memcmp(&rcClient, &rcOldEdit, sizeof(RECT)))\n\t\t{\n\t\t\t//::SetWindowPos(m_hwndEdit, 0, rcClient.left,  rcClient.top,  rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, SWP_NOZORDER | SWP_NOACTIVATE);\n\n\t\t\t//DebugTrace(TEXT(\"Move Window in SetBorderSpace.\\r\\n\"));\n\t\t}\n\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::SetActiveObject\n\t//\n\t//  PURPOSE:\tCalled by the object to provide the frame window a direct\n\t// \t\t\t\tchannel of communication with the active in-place object.\n\t//\n\t//  PARAMETERS:\n\t//      (in) pInPlaceActiveObject - New active object, or NULL if none.\n\t//\t\t(in) szObjName            - Name of the new active object.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT COleInPlaceFrame::SetActiveObject(LPOLEINPLACEACTIVEOBJECT pInPlaceActiveObject,\n\t\tLPCOLESTR szObjName)\n\t{\n\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::SetActiveObject.\\r\\n\"));\n\n\t\t//\n\t\t// If object we have is same as the object passed then return S_OK.\n\t\t//\n\t\tif (pInPlaceActiveObject == g_pActiveObject)\n\t\t\treturn S_OK;\n\n\t\t//\n\t\t// If we already have an active object, free that first.\n\t\t//\n\t\tif (g_pActiveObject)\n\t\t\tg_pActiveObject->Release( );\n\n\t\t//\n\t\t// If we're given an object, AddRef it, and also update our global\n\t\t// pointer as well.\n\t\t//\n\t\tif (pInPlaceActiveObject)\n\t\t\tpInPlaceActiveObject->AddRef( );\n\n\t\tg_pActiveObject = pInPlaceActiveObject;\n\n\t\treturn S_OK;\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////\n\t// IOleInPlaceFrame Interface members\n\t//\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::InsertMenus\n\t//\n\t//  PURPOSE:    Called by the object server to allow the container to insert\n\t//\t\t\t\tits menu groups in the composite menu that will be used\n\t//\t\t\t\tduring the in-place session.\n\t//\n\t//  PARAMETERS:\n\t//      (in) hmenuShared      - Specifies a handle to an empty menu.\n\t//\t\t(in, out) pMenuWidths - Pointers to an array of six LONG values.  The\n\t//\t\t\t\t\t\t\t\tcontainer fills elemts 0, 2, and 4 to reflect\n\t//\t\t\t\t\t\t\t\tthe number of menu elements it provies in the\n\t//\t\t\t\t\t\t\t\tFile, View, and Window menu groups.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT COleInPlaceFrame::InsertMenus(HMENU hmenuShared,\n\t\tLPOLEMENUGROUPWIDTHS pMenuWidths)\n\t{\n\t\t//DebugTrace(TEXT(\"COleInPlaceFrame::InsertMenus.\\r\\n\"));\n\t\tif (!hmenuShared || !pMenuWidths)\n\t\t\treturn E_INVALIDARG;\n\n\t\t//TCHAR szMenuString[64];\n\n\t\t//\n\t\t// Add the file menu\n\t\t//\n\t\t//GetMenuString(g_hmenuMain, 0, szMenuString, sizeof(szMenuString), MF_BYPOSITION);\n\t\t//AppendMenu(hmenuShared, MF_POPUP, (UINT) GetSubMenu(g_hmenuMain, 0),szMenuString);\n\t\tpMenuWidths->width[0] = 1;\n\n\t\t//\n\t\t// Don't want to add the view menu. \n\t\t//\n\t\tpMenuWidths->width[2] = 0;\n\n\t\t//\n\t\t// Don't have a window menu either.\n\t\t//\n\t\tpMenuWidths->width[4] = 0;\n\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::SetMenu\n\t//\n\t//  PURPOSE:    Installs the composite menu into the window frame containing\n\t//\t\t\t\tthe object that is being activated in place.\n\t//\n\t//  PARAMETERS:\n\t//      (in) hmenuShared \t  - Handle to the composite menu.\n\t//\t\t(in) holemenu \t\t  - Handle to the menu descriptor.\n\t//\t\t(in) hwndActiveObject - Handle to the object's active window.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT COleInPlaceFrame::SetMenu(HMENU hmenuShared, HOLEMENU holemenu,\n\t\tHWND hwndActiveObject)\n\t{\n\t\t//::SetMenu(m_hwndFrame, (holemenu ? hmenuShared : g_hmenuMain));\n\t\tDrawMenuBar(m_hwndFrame);\n\n\t\t//\n\t\t// Pass the menu descriptor to OLE.\n\t\t//\n\t\treturn OleSetMenuDescriptor(holemenu, m_hwndFrame, hwndActiveObject,\n\t\t\t(LPOLEINPLACEFRAME) this, g_pActiveObject);\n\t}\n\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::RemoveMenus\n\t//\n\t//  PURPOSE:    Called by the object server to give the container a chance\n\t//\t\t\t\tto remove it's menu elements from the in-place composite menu.\n\t//\n\t//  PARAMETERS:\n\t//      (in) hmenuShared - Handle to the composite menu.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT COleInPlaceFrame::RemoveMenus(HMENU hmenuShared)\n\t{\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::RemoveMenus.\\r\\n\"));\n\t\tif (!hmenuShared)\n\t\t\treturn E_INVALIDARG;\n\n\t\tint nResult;\n\n\t\twhile ((nResult = GetMenuItemCount(hmenuShared)) && (nResult != -1))\n\t\t\tRemoveMenu(hmenuShared, 0, MF_BYPOSITION);\n\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::SetStatusText\n\t//\n\t//  PURPOSE:\tSets and displays status text about the in-place object in\n\t//\t\t\t\tthe containers frame window status bar.\n\t//\n\t//  PARAMETERS:\n\t//      (in) szStatusText -\tString containing the message to display.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT COleInPlaceFrame::SetStatusText(LPCOLESTR szStatusText)\n\t{\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::SetStatusText.\\r\\n\"));\n\n\t\t//\n\t\t// This string is sent to us in Unicode.  We need to decide if we should\n\t\t// translate it first.\n\t\t//\n#ifndef UNICODE\n\t\tUINT cch = lstrlenW(szStatusText) + 1;\n\t\tLPSTR pszMessage = new char[cch];\n\n\t\tZeroMemory(pszMessage, cch);\n\n\t\tWideCharToMultiByte(CP_ACP, 0, szStatusText, -1, pszMessage, cch, NULL, NULL);\n\t\t//\tg_pStatusBar->ShowMessage(pszMessage);\n\n\t\tdelete[] pszMessage;\n#else\n\t\t//g_pStatusBar->ShowMessage(szStatusText);\n#endif\n\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::EnableModeless\n\t//\n\t//  PURPOSE:    Enables or disables modeless dialogs that are owned by the\n\t//\t\t\t\tframe window.\n\t//\n\t//  PARAMETERS:\n\t//      fEnable - TRUE if the dialogs should be enabled, or FALSE to disable.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT COleInPlaceFrame::EnableModeless(BOOL fEnable)\n\t{\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::EnableModeless.\\r\\n\"));\n\n\t\t//\n\t\t// We don't have any modeless dialogs.\n\t\t//\n\t\treturn S_OK;\n\t}\n\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::TranslateAccelerator\n\t//\n\t//  PURPOSE:    Translates keystrokes intended for the container frame while\n\t//\t\t\t\tan object is active in place.\n\t//\n\t//  PARAMETERS:\n\t//      (in) pMsg - Pointer to the message to translate.\n\t//\t\t(in) wID  - Command ID value corresponding to the keystroke in the\n\t//\t\t\t\t\tcontainer provided accelerator table.\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\n\tHRESULT COleInPlaceFrame::TranslateAccelerator(LPMSG pMsg, WORD wID)\n\t{\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::TranslateAccelerator.\\r\\n\"));\n\t\tif (!pMsg)\n\t\t\treturn E_INVALIDARG;\n\n\t\tHACCEL m_hAccelInPlace = NULL;\n\n\t\tif (!::TranslateAccelerator(m_hwndFrame, m_hAccelInPlace, pMsg))\n\t\t\treturn (S_FALSE);\n\n\t\treturn S_OK;\n\t}\n\n\t/////////////////////////////////////////////////////////////////////////////\n\t// UI Helpers\n\t//\n\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::ShowUIAndTools\n\t//\n\t//  PURPOSE:    Shows or hides the application's menu and/or tools.  This\n\t//\t\t\t\tis called as in-place objects are activated and deactivated.\n\t//\n\t//  PARAMETERS:\n\t//      (in) fShow - TRUE if the app should show it's own UI and tools\n\t//\t\t(in) fMenu - TRUE if the app should show it's own menu\n\t//\n\t//  RETURN VALUE:\n\t//      Returns an HRESULT signifying success or failure.\n\t//\n\t//  COMMENTS:\n\t//\t\tfShow will be FALSE if we should hide our own tools.  We don't \n\t//\t\tcurrently have any tools so for now we just ignore this.\n\t//\n\n\tvoid COleInPlaceFrame::ShowUIAndTools(BOOL fShow, BOOL fMenu)\n\t{\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::ShowUIAndTools.\\r\\n\"));\n\t\tif (fShow)\n\t\t{\n\t\t\t// \n\t\t\t// First reset the menu if necessary.\n\t\t\t//\n\t\t\tif (fMenu)\n\t\t\t\tthis->SetMenu(NULL, NULL, NULL);\n\n\t\t\t//\n\t\t\t// Also redraw any tools we had hidden.\n\t\t\t//\n\t\t\t//g_pToolbar->Show(TRUE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//g_pToolbar->Show(FALSE);\n\t\t}\n\t}\n\n\n\t//\n\t//  FUNCTION:   COleInPlaceFrame::ReinstateUI\n\t//\n\t//  PURPOSE:    Restores the applications tools after an object has\n\t//\t\t\t\tbeen deactivated.\n\t//\n\n\tvoid COleInPlaceFrame::ReinstateUI(void)\n\t{\n\t\tRECT rc;\n\t\t//\tDebugTrace(TEXT(\"COleInPlaceFrame::ReinstateUI.\\r\\n\"));\n\n\t\t//\n\t\t// Set the default border widths\n\t\t//\n\t\t//SetRect(&rc, 0, g_pToolbar->GetHeight(), 0, 0);\n\t\tSetBorderSpace(&rc);\n\n\t\t//\n\t\t// Show our menu and tools\n\t\t//\n\t\tShowUIAndTools(TRUE, TRUE);\n\t};\n\n\tclass CTxtWinHost : public ITextHost\n\t{\n\tpublic:\n\t\tCTxtWinHost( );\n\t\tBOOL Init(CRichEditUI *re, const CREATESTRUCT *pcs);\n\t\tvirtual ~CTxtWinHost( );\n\n\t\tITextServices* GetTextServices(void) { return pserv; }\n\t\tvoid SetClientRect(RECT *prc);\n\t\tRECT* GetClientRect( ) { return &rcClient; }\n\t\tBOOL GetWordWrap(void) { return fWordWrap; }\n\t\tvoid SetWordWrap(BOOL fWordWrap);\n\t\tBOOL GetReadOnly( );\n\t\tvoid SetReadOnly(BOOL fReadOnly);\n\t\tvoid SetFont(HFONT hFont);\n\t\tvoid SetColor(DWORD dwColor);\n\t\tSIZEL* GetExtent( );\n\t\tvoid SetExtent(SIZEL *psizelExtent);\n\t\tvoid LimitText(LONG nChars);\n\t\tBOOL IsCaptured( );\n\n\t\tBOOL GetAllowBeep( );\n\t\tvoid SetAllowBeep(BOOL fAllowBeep);\n\t\tWORD GetDefaultAlign( );\n\t\tvoid SetDefaultAlign(WORD wNewAlign);\n\t\tBOOL GetRichTextFlag( );\n\t\tvoid SetRichTextFlag(BOOL fNew);\n\t\tLONG GetDefaultLeftIndent( );\n\t\tvoid SetDefaultLeftIndent(LONG lNewIndent);\n\t\tBOOL SetSaveSelection(BOOL fSaveSelection);\n\t\tHRESULT OnTxInPlaceDeactivate( );\n\t\tHRESULT OnTxInPlaceActivate(LPCRECT prcClient);\n\t\tBOOL GetActiveState(void) { return fInplaceActive; }\n\t\tBOOL DoSetCursor(RECT *prc, POINT *pt);\n\t\tvoid SetTransparent(BOOL fTransparent);\n\t\tvoid GetControlRect(LPRECT prc);\n\t\tLONG SetAccelPos(LONG laccelpos);\n\t\tWCHAR SetPasswordChar(WCHAR chPasswordChar);\n\t\tvoid SetDisabled(BOOL fOn);\n\t\tLONG SetSelBarWidth(LONG lSelBarWidth);\n\t\tBOOL GetTimerState( );\n\n\t\tvoid SetCharFormat(CHARFORMAT2W &c);\n\t\tvoid SetParaFormat(PARAFORMAT2 &p);\n\n\t\t// -----------------------------\n\t\t//\tIUnknown interface\n\t\t// -----------------------------\n\t\tvirtual HRESULT _stdcall QueryInterface(REFIID riid, void **ppvObject);\n\t\tvirtual ULONG _stdcall AddRef(void);\n\t\tvirtual ULONG _stdcall Release(void);\n\n\t\t// -----------------------------\n\t\t//\tITextHost interface\n\t\t// -----------------------------\n\t\tvirtual HDC TxGetDC( );\n\t\tvirtual INT TxReleaseDC(HDC hdc);\n\t\tvirtual BOOL TxShowScrollBar(INT fnBar, BOOL fShow);\n\t\tvirtual BOOL TxEnableScrollBar(INT fuSBFlags, INT fuArrowflags);\n\t\tvirtual BOOL TxSetScrollRange(INT fnBar, LONG nMinPos, INT nMaxPos, BOOL fRedraw);\n\t\tvirtual BOOL TxSetScrollPos(INT fnBar, INT nPos, BOOL fRedraw);\n\t\tvirtual void TxInvalidateRect(LPCRECT prc, BOOL fMode);\n\t\tvirtual void TxViewChange(BOOL fUpdate);\n\t\tvirtual BOOL TxCreateCaret(HBITMAP hbmp, INT xWidth, INT yHeight);\n\t\tvirtual BOOL TxShowCaret(BOOL fShow);\n\t\tvirtual BOOL TxSetCaretPos(INT x, INT y);\n\t\tvirtual BOOL TxSetTimer(UINT idTimer, UINT uTimeout);\n\t\tvirtual void TxKillTimer(UINT idTimer);\n\t\tvirtual void TxScrollWindowEx(INT dx, INT dy, LPCRECT lprcScroll, LPCRECT lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate, UINT fuScroll);\n\t\tvirtual void TxSetCapture(BOOL fCapture);\n\t\tvirtual void TxSetFocus( );\n\t\tvirtual void TxSetCursor(HCURSOR hcur, BOOL fText);\n\t\tvirtual BOOL TxScreenToClient(LPPOINT lppt);\n\t\tvirtual BOOL TxClientToScreen(LPPOINT lppt);\n\t\tvirtual HRESULT TxActivate(LONG * plOldState);\n\t\tvirtual HRESULT TxDeactivate(LONG lNewState);\n\t\tvirtual HRESULT TxGetClientRect(LPRECT prc);\n\t\tvirtual HRESULT TxGetViewInset(LPRECT prc);\n\t\tvirtual HRESULT TxGetCharFormat(const CHARFORMATW **ppCF);\n\t\tvirtual HRESULT TxGetParaFormat(const PARAFORMAT **ppPF);\n\t\tvirtual COLORREF TxGetSysColor(int nIndex);\n\t\tvirtual HRESULT TxGetBackStyle(TXTBACKSTYLE *pstyle);\n\t\tvirtual HRESULT TxGetMaxLength(DWORD *plength);\n\t\tvirtual HRESULT TxGetScrollBars(DWORD *pdwScrollBar);\n\t\tvirtual HRESULT TxGetPasswordChar(TCHAR *pch);\n\t\tvirtual HRESULT TxGetAcceleratorPos(LONG *pcp);\n\t\tvirtual HRESULT TxGetExtent(LPSIZEL lpExtent);\n\t\tvirtual HRESULT OnTxCharFormatChange(const CHARFORMATW * pcf);\n\t\tvirtual HRESULT OnTxParaFormatChange(const PARAFORMAT * ppf);\n\t\tvirtual HRESULT TxGetPropertyBits(DWORD dwMask, DWORD *pdwBits);\n\t\tvirtual HRESULT TxNotify(DWORD iNotify, void *pv);\n\t\tvirtual HIMC TxImmGetContext(void);\n\t\tvirtual void TxImmReleaseContext(HIMC himc);\n\t\tvirtual HRESULT TxGetSelectionBarWidth(LONG *lSelBarWidth);\n\n\tprivate:\n\t\tCRichEditUI *m_re;\n\t\tULONG\tcRefs;\t\t\t\t\t// Reference Count\n\t\tITextServices\t*pserv;\t\t    // pointer to Text Services object\n\t\t// Properties\n\n\t\tDWORD\t\tdwStyle;\t\t\t\t// style bits\n\n\t\tunsigned\tfEnableAutoWordSel : 1;\t// enable Word style auto word selection?\n\t\tunsigned\tfWordWrap : 1;\t// Whether control should word wrap\n\t\tunsigned\tfAllowBeep : 1;\t// Whether beep is allowed\n\t\tunsigned\tfRich : 1;\t// Whether control is rich text\n\t\tunsigned\tfSaveSelection : 1;\t// Whether to save the selection when inactive\n\t\tunsigned\tfInplaceActive : 1; // Whether control is inplace active\n\t\tunsigned\tfTransparent : 1; // Whether control is transparent\n\t\tunsigned\tfTimer : 1;\t// A timer is set\n\t\tunsigned    fCaptured : 1;\n\n\t\tLONG\t\tlSelBarWidth;\t\t\t// Width of the selection bar\n\t\tLONG  \t\tcchTextMost;\t\t\t// maximum text size\n\t\tDWORD\t\tdwEventMask;\t\t\t// DoEvent mask to pass on to parent window\n\t\tLONG\t\ticf;\n\t\tLONG\t\tipf;\n\t\tRECT\t\trcClient;\t\t\t\t// Client Rect for this control\n\t\tSIZEL\t\tsizelExtent;\t\t\t// Extent array\n\t\tCHARFORMAT2W cf;\t\t\t\t\t// Default character format\n\t\tPARAFORMAT2\tpf;\t\t\t\t\t    // Default paragraph format\n\t\tLONG\t\tlaccelpos;\t\t\t\t// Accelerator position\n\t\tWCHAR\t\tchPasswordChar;\t\t    // Password character\n\t};\n\n\t// Convert Pixels on the X axis to Himetric\n\tLONG DXtoHimetricX(LONG dx, LONG xPerInch)\n\t{\n\t\treturn (LONG)MulDiv(dx, HIMETRIC_PER_INCH, xPerInch);\n\t}\n\n\t// Convert Pixels on the Y axis to Himetric\n\tLONG DYtoHimetricY(LONG dy, LONG yPerInch)\n\t{\n\t\treturn (LONG)MulDiv(dy, HIMETRIC_PER_INCH, yPerInch);\n\t}\n\n\tHRESULT InitDefaultCharFormat(CRichEditUI* re, CHARFORMAT2W* pcf, HFONT hfont)\n\t{\n\t\tmemset(pcf, 0, sizeof(CHARFORMAT2W));\n\t\tLOGFONT lf;\n\t\tif (!hfont)\n\t\t\thfont = re->GetManager( )->GetFont(re->GetFont( ));\n\t\t::GetObject(hfont, sizeof(LOGFONT), &lf);\n\n\t\tDWORD dwColor = re->GetTextColor( );\n\t\tpcf->cbSize = sizeof(CHARFORMAT2W);\n\t\tpcf->crTextColor = RGB(GetBValue(dwColor), GetGValue(dwColor), GetRValue(dwColor));\n\t\tLONG yPixPerInch = GetDeviceCaps(re->GetManager( )->GetPaintDC( ), LOGPIXELSY);\n\t\tpcf->yHeight = -lf.lfHeight * LY_PER_INCH / yPixPerInch;\n\t\tpcf->yOffset = 0;\n\t\tpcf->dwEffects = 0;\n\t\tpcf->dwMask = CFM_SIZE | CFM_OFFSET | CFM_FACE | CFM_CHARSET | CFM_COLOR | CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE;\n\t\tif (lf.lfWeight >= FW_BOLD)\n\t\t\tpcf->dwEffects |= CFE_BOLD;\n\t\tif (lf.lfItalic)\n\t\t\tpcf->dwEffects |= CFE_ITALIC;\n\t\tif (lf.lfUnderline)\n\t\t\tpcf->dwEffects |= CFE_UNDERLINE;\n\t\tpcf->bCharSet = lf.lfCharSet;\n\t\tpcf->bPitchAndFamily = lf.lfPitchAndFamily;\n#ifdef _UNICODE\n\t\t_tcscpy(pcf->szFaceName, lf.lfFaceName);\n#else\n\t\t//need to thunk pcf->szFaceName to a standard char string.in this case it's easy because our thunk is also our copy\n\t\tMultiByteToWideChar(CP_ACP, 0, lf.lfFaceName, LF_FACESIZE, pcf->szFaceName, LF_FACESIZE) ;\n#endif\n\n\t\treturn S_OK;\n\t}\n\n\tHRESULT InitDefaultParaFormat(CRichEditUI* re, PARAFORMAT2* ppf)\n\t{\n\t\tmemset(ppf, 0, sizeof(PARAFORMAT2));\n\t\tppf->cbSize = sizeof(PARAFORMAT2);\n\t\tppf->dwMask = PFM_ALL;\n\t\tppf->wAlignment = PFA_LEFT;\n\t\tppf->cTabCount = 1;\n\t\tppf->rgxTabs[0] = lDefaultTab;\n\n\t\treturn S_OK;\n\t}\n\n\tHRESULT CreateHost(CRichEditUI *re, const CREATESTRUCT *pcs, CTxtWinHost **pptec)\n\t{\n\t\tHRESULT hr = E_FAIL;\n\t\t//GdiSetBatchLimit(1);\n\n\t\tCTxtWinHost *phost = new CTxtWinHost( );\n\t\tif (phost)\n\t\t{\n\t\t\tif (phost->Init(re, pcs))\n\t\t\t{\n\t\t\t\t*pptec = phost;\n\t\t\t\thr = S_OK;\n\t\t\t}\n\t\t}\n\n\t\tif (FAILED(hr))\n\t\t{\n\t\t\tdelete phost;\n\t\t}\n\n\t\treturn TRUE;\n\t}\n\n\tCTxtWinHost::CTxtWinHost( ) : m_re(NULL)\n\t{\n\t\t::ZeroMemory(&cRefs, sizeof(CTxtWinHost) - offsetof(CTxtWinHost, cRefs));\n\t\tcchTextMost = cInitTextMax;\n\t\tlaccelpos = -1;\n\t}\n\n\tCTxtWinHost::~CTxtWinHost( )\n\t{\n\t\tpserv->OnTxInPlaceDeactivate( );\n\t\tpserv->Release( );\n\t}\n\n\t////////////////////// Create/Init/Destruct Commands ///////////////////////\n\n\tBOOL CTxtWinHost::Init(CRichEditUI *re, const CREATESTRUCT *pcs)\n\t{\n\t\tIUnknown *pUnk = nullptr;\n\t\tHRESULT hr;\n\n\t\tm_re = re;\n\t\t// Initialize Reference count\n\t\tcRefs = 1;\n\n\t\t// Create and cache CHARFORMAT for this control\n\t\tif (FAILED(InitDefaultCharFormat(re, &cf, NULL)))\n\t\t\tgoto err;\n\n\t\t// Create and cache PARAFORMAT for this control\n\t\tif (FAILED(InitDefaultParaFormat(re, &pf)))\n\t\t\tgoto err;\n\n\t\t// edit controls created without a window are multiline by default\n\t\t// so that paragraph formats can be\n\t\tdwStyle = ES_MULTILINE;\n\n\t\t// edit controls are rich by default\n\t\tfRich = re->IsRich( );\n\n\t\tcchTextMost = re->GetLimitText( );\n\n\t\tif (pcs)\n\t\t{\n\t\t\tdwStyle = pcs->style;\n\n\t\t\tif (!(dwStyle & (ES_AUTOHSCROLL | WS_HSCROLL)))\n\t\t\t{\n\t\t\t\tfWordWrap = TRUE;\n\t\t\t}\n\t\t}\n\n\t\tif (!(dwStyle & ES_LEFT))\n\t\t{\n\t\t\tif (dwStyle & ES_CENTER)\n\t\t\t\tpf.wAlignment = PFA_CENTER;\n\t\t\telse if (dwStyle & ES_RIGHT)\n\t\t\t\tpf.wAlignment = PFA_RIGHT;\n\t\t}\n\n\t\tfInplaceActive = TRUE;\n\n\t\t// Create Text Services component\n\t\t//if(FAILED(CreateTextServices(NULL, this, &pUnk)))\n\t\t//    goto err;\n\n\t\tPCreateTextServices TextServicesProc;\n\t\tHMODULE hmod = LoadLibrary(_T(\"msftedit.dll\"));\n\t\tif (hmod)\n\t\t{\n\t\t\tTextServicesProc = (PCreateTextServices)GetProcAddress(hmod, \"CreateTextServices\");\n\t\t}\n\n\t\tif (TextServicesProc)\n\t\t{\n\t\t\tHRESULT hr = TextServicesProc(NULL, this, &pUnk);\n\t\t}\n\n\t\tif (!pUnk){\n\t\t\tgoto err;\n\t\t}\n\t\thr = pUnk->QueryInterface(IID_ITextServices, (void **)&pserv);\n\n\t\t// Whether the previous call succeeded or failed we are done\n\t\t// with the private interface.\n\t\tpUnk->Release( );\n\n\t\tif (FAILED(hr))\n\t\t{\n\t\t\tgoto err;\n\t\t}\n\n\t\t// Set window text\n\t\tif (pcs && pcs->lpszName)\n\t\t{\n#ifdef _UNICODE\t\t\n\t\t\tif (FAILED(pserv->TxSetText((TCHAR *)pcs->lpszName)))\n\t\t\t\tgoto err;\n#else\n\t\t\tsize_t iLen = _tcslen(pcs->lpszName);\n\t\t\tLPWSTR lpText = new WCHAR[iLen + 1];\n\t\t\t::ZeroMemory(lpText, (iLen + 1) * sizeof(WCHAR));\n\t\t\t::MultiByteToWideChar(CP_ACP, 0, pcs->lpszName, -1, (LPWSTR)lpText, iLen) ;\n\t\t\tif(FAILED(pserv->TxSetText((LPWSTR)lpText))) {\n\t\t\t\tdelete[] lpText;\n\t\t\t\tgoto err;\n\t\t\t}\n\t\t\tdelete[] lpText;\n#endif\n\t\t}\n\n\t\treturn TRUE;\n\n\terr:\n\t\treturn FALSE;\n\t}\n\n\t/////////////////////////////////  IUnknown ////////////////////////////////\n\n\n\tHRESULT CTxtWinHost::QueryInterface(REFIID riid, void **ppvObject)\n\t{\n\t\tHRESULT hr = E_NOINTERFACE;\n\t\t*ppvObject = NULL;\n\n\t\tif (IsEqualIID(riid, IID_IUnknown)\n\t\t\t|| IsEqualIID(riid, IID_ITextHost))\n\t\t{\n\t\t\tAddRef( );\n\t\t\t*ppvObject = (ITextHost *) this;\n\t\t\thr = S_OK;\n\t\t}\n\n\t\treturn hr;\n\t}\n\n\tULONG CTxtWinHost::AddRef(void)\n\t{\n\t\treturn ++cRefs;\n\t}\n\n\tULONG CTxtWinHost::Release(void)\n\t{\n\t\tULONG c_Refs = --cRefs;\n\n\t\tif (c_Refs == 0)\n\t\t{\n\t\t\tdelete this;\n\t\t}\n\n\t\treturn c_Refs;\n\t}\n\n\t/////////////////////////////////  Far East Support  //////////////////////////////////////\n\n\tHIMC CTxtWinHost::TxImmGetContext(void)\n\t{\n\t\tHIMC himc;\n\n\t\thimc = ImmGetContext(m_re->GetManager( )->GetPaintWindow( ));\n\n\t\treturn himc;\n\t}\n\n\tvoid CTxtWinHost::TxImmReleaseContext(HIMC himc)\n\t{\n\t\t::ImmReleaseContext(m_re->GetManager( )->GetPaintWindow( ), himc);\n\t}\n\n\t//////////////////////////// ITextHost Interface  ////////////////////////////\n\n\tHDC CTxtWinHost::TxGetDC( )\n\t{\n\t\treturn m_re->GetManager( )->GetPaintDC( );\n\t}\n\n\tint CTxtWinHost::TxReleaseDC(HDC hdc)\n\t{\n\t\treturn 1;\n\t}\n\n\tBOOL CTxtWinHost::TxShowScrollBar(INT fnBar, BOOL fShow)\n\t{\n\t\tCScrollBarUI* pVerticalScrollBar = m_re->GetVerticalScrollBar( );\n\t\tCScrollBarUI* pHorizontalScrollBar = m_re->GetHorizontalScrollBar( );\n\t\tif (fnBar == SB_VERT && pVerticalScrollBar) {\n\t\t\tpVerticalScrollBar->SetVisible(fShow == TRUE);\n\t\t}\n\t\telse if (fnBar == SB_HORZ && pHorizontalScrollBar) {\n\t\t\tpHorizontalScrollBar->SetVisible(fShow == TRUE);\n\t\t}\n\t\telse if (fnBar == SB_BOTH) {\n\t\t\tif (pVerticalScrollBar) pVerticalScrollBar->SetVisible(fShow == TRUE);\n\t\t\tif (pHorizontalScrollBar) pHorizontalScrollBar->SetVisible(fShow == TRUE);\n\t\t}\n\t\treturn TRUE;\n\t}\n\n\tBOOL CTxtWinHost::TxEnableScrollBar(INT fuSBFlags, INT fuArrowflags)\n\t{\n\t\tif (fuSBFlags == SB_VERT) {\n\t\t\tm_re->EnableScrollBarEx(true, CContainerUI::ScrollType::EVSCROLL);\n\t\t\tm_re->GetVerticalScrollBar( )->SetVisible(fuArrowflags != ESB_DISABLE_BOTH);\n\t\t}\n\t\telse if (fuSBFlags == SB_HORZ) {\n\t\t\tm_re->EnableScrollBarEx(true, CContainerUI::ScrollType::EHSCROLL);\n\t\t\tm_re->GetHorizontalScrollBar( )->SetVisible(fuArrowflags != ESB_DISABLE_BOTH);\n\t\t}\n\t\telse if (fuSBFlags == SB_BOTH) {\n\t\t\tm_re->EnableScrollBarEx(true, CContainerUI::ScrollType::EVSCROLL);\n\t\t\tm_re->EnableScrollBarEx(true, CContainerUI::ScrollType::EHSCROLL);\n\t\t\tm_re->GetVerticalScrollBar( )->SetVisible(fuArrowflags != ESB_DISABLE_BOTH);\n\t\t\tm_re->GetHorizontalScrollBar( )->SetVisible(fuArrowflags != ESB_DISABLE_BOTH);\n\t\t}\n\t\treturn TRUE;\n\t}\n\n\tBOOL CTxtWinHost::TxSetScrollRange(INT fnBar, LONG nMinPos, INT nMaxPos, BOOL fRedraw)\n\t{\n\t\tCScrollBarUI* pVerticalScrollBar = m_re->GetVerticalScrollBar( );\n\t\tCScrollBarUI* pHorizontalScrollBar = m_re->GetHorizontalScrollBar( );\n\t\tif (fnBar == SB_VERT && pVerticalScrollBar) {\n\t\t\tif (nMaxPos - nMinPos - rcClient.bottom + rcClient.top <= 0) {\n\t\t\t\tpVerticalScrollBar->SetVisible(false);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpVerticalScrollBar->SetVisible(true);\n\t\t\t\tpVerticalScrollBar->SetScrollRange(nMaxPos - nMinPos - rcClient.bottom + rcClient.top);\n\t\t\t}\n\t\t}\n\t\telse if (fnBar == SB_HORZ && pHorizontalScrollBar) {\n\t\t\tif (nMaxPos - nMinPos - rcClient.right + rcClient.left <= 0) {\n\t\t\t\tpHorizontalScrollBar->SetVisible(false);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpHorizontalScrollBar->SetVisible(true);\n\t\t\t\tpHorizontalScrollBar->SetScrollRange(nMaxPos - nMinPos - rcClient.right + rcClient.left);\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}\n\n\tBOOL CTxtWinHost::TxSetScrollPos(INT fnBar, INT nPos, BOOL fRedraw)\n\t{\n\t\tCScrollBarUI* pVerticalScrollBar = m_re->GetVerticalScrollBar( );\n\t\tCScrollBarUI* pHorizontalScrollBar = m_re->GetHorizontalScrollBar( );\n\t\tif (fnBar == SB_VERT && pVerticalScrollBar) {\n\t\t\tpVerticalScrollBar->SetScrollPos(nPos);\n\t\t}\n\t\telse if (fnBar == SB_HORZ && pHorizontalScrollBar) {\n\t\t\tpHorizontalScrollBar->SetScrollPos(nPos);\n\t\t}\n\t\treturn TRUE;\n\t}\n\n\tvoid CTxtWinHost::TxInvalidateRect(LPCRECT prc, BOOL fMode)\n\t{\n\t\tif (prc == NULL) {\n\t\t\tm_re->GetManager( )->Invalidate(rcClient);\n\t\t\treturn;\n\t\t}\n\t\tRECT rc = *prc;\n\t\tm_re->GetManager( )->Invalidate(rc);\n\t}\n\n\tvoid CTxtWinHost::TxViewChange(BOOL fUpdate)\n\t{\n\t\tif (m_re->OnTxViewChanged( )) m_re->Invalidate( );\n\t}\n\n\tBOOL CTxtWinHost::TxCreateCaret(HBITMAP hbmp, INT xWidth, INT yHeight)\n\t{\n\t\treturn ::CreateCaret(m_re->GetManager( )->GetPaintWindow( ), hbmp, xWidth, yHeight);\n\t}\n\n\tBOOL CTxtWinHost::TxShowCaret(BOOL fShow)\n\t{\n\t\tif (fShow)\n\t\t\treturn ::ShowCaret(m_re->GetManager( )->GetPaintWindow( ));\n\t\telse\n\t\t\treturn ::HideCaret(m_re->GetManager( )->GetPaintWindow( ));\n\t}\n\n\tBOOL CTxtWinHost::TxSetCaretPos(INT x, INT y)\n\t{\n\t\treturn ::SetCaretPos(x, y);\n\t}\n\n\tBOOL CTxtWinHost::TxSetTimer(UINT idTimer, UINT uTimeout)\n\t{\n\t\tfTimer = TRUE;\n\t\treturn m_re->GetManager( )->SetTimer(m_re, idTimer, uTimeout) == TRUE;\n\t}\n\n\tvoid CTxtWinHost::TxKillTimer(UINT idTimer)\n\t{\n\t\tm_re->GetManager( )->KillTimer(m_re, idTimer);\n\t\tfTimer = FALSE;\n\t}\n\n\tvoid CTxtWinHost::TxScrollWindowEx(INT dx, INT dy, LPCRECT lprcScroll, LPCRECT lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate, UINT fuScroll)\n\t{\n\t\treturn;\n\t}\n\n\tvoid CTxtWinHost::TxSetCapture(BOOL fCapture)\n\t{\n\t\tif (fCapture) m_re->GetManager( )->SetCapture( );\n\t\telse m_re->GetManager( )->ReleaseCapture( );\n\t\tfCaptured = fCapture;\n\t}\n\n\tvoid CTxtWinHost::TxSetFocus( )\n\t{\n\t\tm_re->SetFocus( );\n\t}\n\n\tvoid CTxtWinHost::TxSetCursor(HCURSOR hcur, BOOL fText)\n\t{\n\t\t::SetCursor(hcur);\n\t}\n\n\tBOOL CTxtWinHost::TxScreenToClient(LPPOINT lppt)\n\t{\n\t\treturn ::ScreenToClient(m_re->GetManager( )->GetPaintWindow( ), lppt);\n\t}\n\n\tBOOL CTxtWinHost::TxClientToScreen(LPPOINT lppt)\n\t{\n\t\treturn ::ClientToScreen(m_re->GetManager( )->GetPaintWindow( ), lppt);\n\t}\n\n\tHRESULT CTxtWinHost::TxActivate(LONG *plOldState)\n\t{\n\t\treturn S_OK;\n\t}\n\n\tHRESULT CTxtWinHost::TxDeactivate(LONG lNewState)\n\t{\n\t\treturn S_OK;\n\t}\n\n\tHRESULT CTxtWinHost::TxGetClientRect(LPRECT prc)\n\t{\n\t\t*prc = rcClient;\n\t\tGetControlRect(prc);\n\t\treturn NOERROR;\n\t}\n\n\tHRESULT CTxtWinHost::TxGetViewInset(LPRECT prc)\n\t{\n\t\tprc->left = prc->right = prc->top = prc->bottom = 0;\n\t\treturn NOERROR;\n\t}\n\n\tHRESULT CTxtWinHost::TxGetCharFormat(const CHARFORMATW **ppCF)\n\t{\n\t\t*ppCF = &cf;\n\t\treturn NOERROR;\n\t}\n\n\tHRESULT CTxtWinHost::TxGetParaFormat(const PARAFORMAT **ppPF)\n\t{\n\t\t*ppPF = &pf;\n\t\treturn NOERROR;\n\t}\n\n\tCOLORREF CTxtWinHost::TxGetSysColor(int nIndex)\n\t{\n\t\treturn ::GetSysColor(nIndex);\n\t}\n\n\tHRESULT CTxtWinHost::TxGetBackStyle(TXTBACKSTYLE *pstyle)\n\t{\n\t\t*pstyle = !fTransparent ? TXTBACK_OPAQUE : TXTBACK_TRANSPARENT;\n\t\treturn NOERROR;\n\t}\n\n\tHRESULT CTxtWinHost::TxGetMaxLength(DWORD *pLength)\n\t{\n\t\t*pLength = cchTextMost;\n\t\treturn NOERROR;\n\t}\n\n\tHRESULT CTxtWinHost::TxGetScrollBars(DWORD *pdwScrollBar)\n\t{\n\t\t*pdwScrollBar = dwStyle & (WS_VSCROLL | WS_HSCROLL | ES_AUTOVSCROLL |\n\t\t\tES_AUTOHSCROLL | ES_DISABLENOSCROLL);\n\n\t\treturn NOERROR;\n\t}\n\n\tHRESULT CTxtWinHost::TxGetPasswordChar(TCHAR *pch)\n\t{\n#ifdef _UNICODE\n\t\t*pch = chPasswordChar;\n#else\n\t\t::WideCharToMultiByte(CP_ACP, 0, &chPasswordChar, 1, pch, 1, NULL, NULL) ;\n#endif\n\t\treturn NOERROR;\n\t}\n\n\tHRESULT CTxtWinHost::TxGetAcceleratorPos(LONG *pcp)\n\t{\n\t\t*pcp = laccelpos;\n\t\treturn S_OK;\n\t}\n\n\tHRESULT CTxtWinHost::OnTxCharFormatChange(const CHARFORMATW *pcf)\n\t{\n\t\treturn S_OK;\n\t}\n\n\tHRESULT CTxtWinHost::OnTxParaFormatChange(const PARAFORMAT *ppf)\n\t{\n\t\treturn S_OK;\n\t}\n\n\tHRESULT CTxtWinHost::TxGetPropertyBits(DWORD dwMask, DWORD *pdwBits)\n\t{\n\t\tDWORD dwProperties = 0;\n\n\t\tif (fRich)\n\t\t{\n\t\t\tdwProperties = TXTBIT_RICHTEXT;\n\t\t}\n\n\t\tif (dwStyle & ES_MULTILINE)\n\t\t{\n\t\t\tdwProperties |= TXTBIT_MULTILINE;\n\t\t}\n\n\t\tif (dwStyle & ES_READONLY)\n\t\t{\n\t\t\tdwProperties |= TXTBIT_READONLY;\n\t\t}\n\n\t\tif (dwStyle & ES_PASSWORD)\n\t\t{\n\t\t\tdwProperties |= TXTBIT_USEPASSWORD;\n\t\t}\n\n\t\tif (!(dwStyle & ES_NOHIDESEL))\n\t\t{\n\t\t\tdwProperties |= TXTBIT_HIDESELECTION;\n\t\t}\n\n\t\tif (fEnableAutoWordSel)\n\t\t{\n\t\t\tdwProperties |= TXTBIT_AUTOWORDSEL;\n\t\t}\n\n\t\tif (fWordWrap)\n\t\t{\n\t\t\tdwProperties |= TXTBIT_WORDWRAP;\n\t\t}\n\n\t\tif (fAllowBeep)\n\t\t{\n\t\t\tdwProperties |= TXTBIT_ALLOWBEEP;\n\t\t}\n\n\t\tif (fSaveSelection)\n\t\t{\n\t\t\tdwProperties |= TXTBIT_SAVESELECTION;\n\t\t}\n\n\t\t*pdwBits = dwProperties & dwMask;\n\t\treturn NOERROR;\n\t}\n\n\n\tHRESULT CTxtWinHost::TxNotify(DWORD iNotify, void *pv)\n\t{\n\t\tif (iNotify == EN_REQUESTRESIZE) {\n\t\t\tRECT rc;\n\t\t\tREQRESIZE *preqsz = (REQRESIZE *)pv;\n\t\t\tGetControlRect(&rc);\n\t\t\trc.bottom = rc.top + preqsz->rc.bottom;\n\t\t\trc.right = rc.left + preqsz->rc.right;\n\t\t\tSetClientRect(&rc);\n\t\t}\n\t\tm_re->OnTxNotify(iNotify, pv);\n\t\treturn S_OK;\n\t}\n\n\tHRESULT CTxtWinHost::TxGetExtent(LPSIZEL lpExtent)\n\t{\n\t\t*lpExtent = sizelExtent;\n\t\treturn S_OK;\n\t}\n\n\tHRESULT\tCTxtWinHost::TxGetSelectionBarWidth(LONG *plSelBarWidth)\n\t{\n\t\t*plSelBarWidth = lSelBarWidth;\n\t\treturn S_OK;\n\t}\n\n\tvoid CTxtWinHost::SetWordWrap(BOOL fWordWrap)\n\t{\n\t\tfWordWrap = fWordWrap;\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_WORDWRAP, fWordWrap ? TXTBIT_WORDWRAP : 0);\n\t}\n\n\tBOOL CTxtWinHost::GetReadOnly( )\n\t{\n\t\treturn (dwStyle & ES_READONLY) != 0;\n\t}\n\n\tvoid CTxtWinHost::SetReadOnly(BOOL fReadOnly)\n\t{\n\t\tif (fReadOnly)\n\t\t{\n\t\t\tdwStyle |= ES_READONLY;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdwStyle &= ~ES_READONLY;\n\t\t}\n\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_READONLY,\n\t\t\tfReadOnly ? TXTBIT_READONLY : 0);\n\t}\n\n\tvoid CTxtWinHost::SetFont(HFONT hFont)\n\t{\n\t\tif (hFont == NULL) return;\n\t\tLOGFONT lf;\n\t\t::GetObject(hFont, sizeof(LOGFONT), &lf);\n\t\tLONG yPixPerInch = ::GetDeviceCaps(m_re->GetManager( )->GetPaintDC( ), LOGPIXELSY);\n\t\tcf.yHeight = -lf.lfHeight * LY_PER_INCH / yPixPerInch;\n\t\tif (lf.lfWeight >= FW_BOLD)\n\t\t\tcf.dwEffects |= CFE_BOLD;\n\t\tif (lf.lfItalic)\n\t\t\tcf.dwEffects |= CFE_ITALIC;\n\t\tif (lf.lfUnderline)\n\t\t\tcf.dwEffects |= CFE_UNDERLINE;\n\t\tcf.bCharSet = lf.lfCharSet;\n\t\tcf.bPitchAndFamily = lf.lfPitchAndFamily;\n#ifdef _UNICODE\n\t\t_tcscpy(cf.szFaceName, lf.lfFaceName);\n#else\n\t\t//need to thunk pcf->szFaceName to a standard char string.in this case it's easy because our thunk is also our copy\n\t\tMultiByteToWideChar(CP_ACP, 0, lf.lfFaceName, LF_FACESIZE, cf.szFaceName, LF_FACESIZE) ;\n#endif\n\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_CHARFORMATCHANGE,\n\t\t\tTXTBIT_CHARFORMATCHANGE);\n\t}\n\n\tvoid CTxtWinHost::SetColor(DWORD dwColor)\n\t{\n\t\tcf.crTextColor = RGB(GetBValue(dwColor), GetGValue(dwColor), GetRValue(dwColor));\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_CHARFORMATCHANGE,\n\t\t\tTXTBIT_CHARFORMATCHANGE);\n\t}\n\n\tSIZEL* CTxtWinHost::GetExtent( )\n\t{\n\t\treturn &sizelExtent;\n\t}\n\n\tvoid CTxtWinHost::SetExtent(SIZEL *psizelExtent)\n\t{\n\t\tsizelExtent = *psizelExtent;\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_EXTENTCHANGE, TXTBIT_EXTENTCHANGE);\n\t}\n\n\tvoid CTxtWinHost::LimitText(LONG nChars)\n\t{\n\t\tcchTextMost = nChars;\n\t\tif (cchTextMost <= 0) cchTextMost = cInitTextMax;\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_MAXLENGTHCHANGE, TXTBIT_MAXLENGTHCHANGE);\n\t}\n\n\tBOOL CTxtWinHost::IsCaptured( )\n\t{\n\t\treturn fCaptured;\n\t}\n\n\tBOOL CTxtWinHost::GetAllowBeep( )\n\t{\n\t\treturn fAllowBeep;\n\t}\n\n\tvoid CTxtWinHost::SetAllowBeep(BOOL fAllowBeep)\n\t{\n\t\tfAllowBeep = fAllowBeep;\n\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_ALLOWBEEP,\n\t\t\tfAllowBeep ? TXTBIT_ALLOWBEEP : 0);\n\t}\n\n\tWORD CTxtWinHost::GetDefaultAlign( )\n\t{\n\t\treturn pf.wAlignment;\n\t}\n\n\tvoid CTxtWinHost::SetDefaultAlign(WORD wNewAlign)\n\t{\n\t\tpf.wAlignment = wNewAlign;\n\n\t\t// Notify control of property change\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_PARAFORMATCHANGE, 0);\n\t}\n\n\tBOOL CTxtWinHost::GetRichTextFlag( )\n\t{\n\t\treturn fRich;\n\t}\n\n\tvoid CTxtWinHost::SetRichTextFlag(BOOL fNew)\n\t{\n\t\tfRich = fNew;\n\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_RICHTEXT,\n\t\t\tfNew ? TXTBIT_RICHTEXT : 0);\n\t}\n\n\tLONG CTxtWinHost::GetDefaultLeftIndent( )\n\t{\n\t\treturn pf.dxOffset;\n\t}\n\n\tvoid CTxtWinHost::SetDefaultLeftIndent(LONG lNewIndent)\n\t{\n\t\tpf.dxOffset = lNewIndent;\n\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_PARAFORMATCHANGE, 0);\n\t}\n\n\tvoid CTxtWinHost::SetClientRect(RECT *prc)\n\t{\n\t\trcClient = *prc;\n\n\t\tLONG xPerInch = ::GetDeviceCaps(m_re->GetManager( )->GetPaintDC( ), LOGPIXELSX);\n\t\tLONG yPerInch = ::GetDeviceCaps(m_re->GetManager( )->GetPaintDC( ), LOGPIXELSY);\n\t\tsizelExtent.cx = DXtoHimetricX(rcClient.right - rcClient.left, xPerInch);\n\t\tsizelExtent.cy = DYtoHimetricY(rcClient.bottom - rcClient.top, yPerInch);\n\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_VIEWINSETCHANGE, TXTBIT_VIEWINSETCHANGE);\n\t}\n\n\tBOOL CTxtWinHost::SetSaveSelection(BOOL f_SaveSelection)\n\t{\n\t\tBOOL fResult = f_SaveSelection;\n\n\t\tfSaveSelection = f_SaveSelection;\n\n\t\t// notify text services of property change\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_SAVESELECTION,\n\t\t\tfSaveSelection ? TXTBIT_SAVESELECTION : 0);\n\n\t\treturn fResult;\n\t}\n\n\tHRESULT\tCTxtWinHost::OnTxInPlaceDeactivate( )\n\t{\n\t\tHRESULT hr = pserv->OnTxInPlaceDeactivate( );\n\n\t\tif (SUCCEEDED(hr))\n\t\t{\n\t\t\tfInplaceActive = FALSE;\n\t\t}\n\n\t\treturn hr;\n\t}\n\n\tHRESULT\tCTxtWinHost::OnTxInPlaceActivate(LPCRECT prcClient)\n\t{\n\t\tfInplaceActive = TRUE;\n\n\t\tHRESULT hr = pserv->OnTxInPlaceActivate(prcClient);\n\n\t\tif (FAILED(hr))\n\t\t{\n\t\t\tfInplaceActive = FALSE;\n\t\t}\n\n\t\treturn hr;\n\t}\n\n\tBOOL CTxtWinHost::DoSetCursor(RECT *prc, POINT *pt)\n\t{\n\t\tRECT rc = prc ? *prc : rcClient;\n\n\t\t// Is this in our rectangle?\n\t\tif (PtInRect(&rc, *pt))\n\t\t{\n\t\t\tRECT *prcClient = (!fInplaceActive || prc) ? &rc : NULL;\n\t\t\tpserv->OnTxSetCursor(DVASPECT_CONTENT, -1, NULL, NULL, m_re->GetManager( )->GetPaintDC( ),\n\t\t\t\tNULL, prcClient, pt->x, pt->y);\n\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}\n\n\tvoid CTxtWinHost::GetControlRect(LPRECT prc)\n\t{\n\t\tprc->top = rcClient.top;\n\t\tprc->bottom = rcClient.bottom;\n\t\tprc->left = rcClient.left;\n\t\tprc->right = rcClient.right;\n\t}\n\n\tvoid CTxtWinHost::SetTransparent(BOOL f_Transparent)\n\t{\n\t\tfTransparent = f_Transparent;\n\n\t\t// notify text services of property change\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_BACKSTYLECHANGE, 0);\n\t}\n\n\tLONG CTxtWinHost::SetAccelPos(LONG l_accelpos)\n\t{\n\t\tLONG laccelposOld = l_accelpos;\n\n\t\tlaccelpos = l_accelpos;\n\n\t\t// notify text services of property change\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_SHOWACCELERATOR, 0);\n\n\t\treturn laccelposOld;\n\t}\n\n\tWCHAR CTxtWinHost::SetPasswordChar(WCHAR ch_PasswordChar)\n\t{\n\t\tWCHAR chOldPasswordChar = chPasswordChar;\n\n\t\tchPasswordChar = ch_PasswordChar;\n\n\t\t// notify text services of property change\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_USEPASSWORD,\n\t\t\t(chPasswordChar != 0) ? TXTBIT_USEPASSWORD : 0);\n\n\t\treturn chOldPasswordChar;\n\t}\n\n\tvoid CTxtWinHost::SetDisabled(BOOL fOn)\n\t{\n\t\tcf.dwMask |= CFM_COLOR | CFM_DISABLED;\n\t\tcf.dwEffects |= CFE_AUTOCOLOR | CFE_DISABLED;\n\n\t\tif (!fOn)\n\t\t{\n\t\t\tcf.dwEffects &= ~CFE_DISABLED;\n\t\t}\n\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_CHARFORMATCHANGE,\n\t\t\tTXTBIT_CHARFORMATCHANGE);\n\t}\n\n\tLONG CTxtWinHost::SetSelBarWidth(LONG l_SelBarWidth)\n\t{\n\t\tLONG lOldSelBarWidth = lSelBarWidth;\n\n\t\tlSelBarWidth = l_SelBarWidth;\n\n\t\tif (lSelBarWidth)\n\t\t{\n\t\t\tdwStyle |= ES_SELECTIONBAR;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdwStyle &= (~ES_SELECTIONBAR);\n\t\t}\n\n\t\tpserv->OnTxPropertyBitsChange(TXTBIT_SELBARCHANGE, TXTBIT_SELBARCHANGE);\n\n\t\treturn lOldSelBarWidth;\n\t}\n\n\tBOOL CTxtWinHost::GetTimerState( )\n\t{\n\t\treturn fTimer;\n\t}\n\n\tvoid CTxtWinHost::SetCharFormat(CHARFORMAT2W &c)\n\t{\n\t\tcf = c;\n\t}\n\n\tvoid CTxtWinHost::SetParaFormat(PARAFORMAT2 &p)\n\t{\n\t\tpf = p;\n\t}\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCRichEditUI::CRichEditUI( ) : m_pTwh(NULL), m_bVScrollBarFixing(false), m_bWantReturn(true),\n\t\tm_bWantCtrlReturn(true), m_bRich(true), m_bReadOnly(false), m_bWordWrap(false), m_dwTextColor(0), m_iFont(-1),\n\t\tm_iLimitText(cInitTextMax), m_lTwhStyle(ES_MULTILINE), m_bInited(false), m_chLeadByte(0)\n\t{\n\n\t\tm_bWantTab = true;\n#ifndef _UNICODE\n\t\tm_fAccumulateDBC =true;\n#else\n\tm_fAccumulateDBC= false;\n\t::ZeroMemory(&m_rcTextPadding, sizeof(m_rcTextPadding));\n#endif\n\t}\n\n\tCRichEditUI::~CRichEditUI( )\n\t{\n\t\tif (m_pTwh) {\n\t\t\tm_pTwh->Release( );\n\t\t\tm_pManager->RemoveMessageFilter(this);\n\t\t}\n\n\t\tif (m_pRichEditOle)\n\t\t{\n#pragma message(\"------>待检查释放时候引起奔溃的问题\")\n\t\t\t//\tm_pRichEditOle->Release( );\n\t\t}\n\n\t\tif (m_pCallback)\n\t\t{\n\t\t\tm_pCallback->Release( );\n\t\t}\n\t}\n\n\tLPCTSTR CRichEditUI::GetClass( ) const\n\t{\n\t\treturn _T(\"RichEditUI\");\n\t}\n\n\tLPVOID CRichEditUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif (_tcscmp(pstrName, DUI_CTR_RICHEDIT) == 0) return static_cast<CRichEditUI*>(this);\n\t\treturn CContainerUI::GetInterface(pstrName);\n\t}\n\n\tUINT CRichEditUI::GetControlFlags( ) const\n\t{\n\t\tif (!IsEnabled( )) return CControlUI::GetControlFlags( );\n\n\t\treturn UIFLAG_SETCURSOR | UIFLAG_TABSTOP;\n\t}\n\n\tbool CRichEditUI::IsWantTab( )\n\t{\n\t\treturn m_bWantTab;\n\t}\n\n\tvoid CRichEditUI::SetWantTab(bool bWantTab)\n\t{\n\t\tm_bWantTab = bWantTab;\n\t}\n\n\tbool CRichEditUI::IsWantReturn( )\n\t{\n\t\treturn m_bWantReturn;\n\t}\n\n\tvoid CRichEditUI::SetWantReturn(bool bWantReturn)\n\t{\n\t\tm_bWantReturn = bWantReturn;\n\t}\n\n\tbool CRichEditUI::IsWantCtrlReturn( )\n\t{\n\t\treturn m_bWantCtrlReturn;\n\t}\n\n\tvoid CRichEditUI::SetWantCtrlReturn(bool bWantCtrlReturn)\n\t{\n\t\tm_bWantCtrlReturn = bWantCtrlReturn;\n\t}\n\tRECT CRichEditUI::GetTextPadding() const\n\t{\n\t\treturn m_rcTextPadding;\n\t}\n\n\tvoid CRichEditUI::SetTextPadding(RECT rc)\n\t{\n\t\tm_rcTextPadding = rc;\n\t\tInvalidate();\n\t}\n\tbool CRichEditUI::IsRich( )\n\t{\n\t\treturn m_bRich;\n\t}\n\n\tvoid CRichEditUI::SetRich(bool bRich)\n\t{\n\t\tm_bRich = bRich;\n\t\tif (m_pTwh) m_pTwh->SetRichTextFlag(bRich);\n\t}\n\n\tbool CRichEditUI::IsReadOnly( )\n\t{\n\t\treturn m_bReadOnly;\n\t}\n\n\tvoid CRichEditUI::SetReadOnly(bool bReadOnly)\n\t{\n\t\tm_bReadOnly = bReadOnly;\n\t\tif (m_pTwh) m_pTwh->SetReadOnly(bReadOnly);\n\t}\n\n\tbool CRichEditUI::GetWordWrap( )\n\t{\n\t\treturn m_bWordWrap;\n\t}\n\n\tvoid CRichEditUI::SetWordWrap(bool bWordWrap)\n\t{\n\t\tm_bWordWrap = bWordWrap;\n\t\tif (m_pTwh) m_pTwh->SetWordWrap(bWordWrap);\n\t}\n\n\tint CRichEditUI::GetFont( )\n\t{\n\t\treturn m_iFont;\n\t}\n\n\tvoid CRichEditUI::SetFont(int index)\n\t{\n\t\tm_iFont = index;\n\t\tif (m_pTwh) {\n\t\t\tm_pTwh->SetFont(GetManager( )->GetFont(m_iFont));\n\t\t}\n\t}\n\n\tvoid CRichEditUI::SetFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic)\n\t{\n\t\tif (m_pTwh) {\n\t\t\tLOGFONT lf = { 0 };\n\t\t\t::GetObject(::GetStockObject(DEFAULT_GUI_FONT), sizeof(LOGFONT), &lf);\n\t\t\t_tcsncpy(lf.lfFaceName, pStrFontName, LF_FACESIZE);\n\t\t\tlf.lfCharSet = DEFAULT_CHARSET;\n\t\t\tlf.lfHeight = -nSize;\n\t\t\tif (bBold) lf.lfWeight += FW_BOLD;\n\t\t\tif (bUnderline) lf.lfUnderline = TRUE;\n\t\t\tif (bItalic) lf.lfItalic = TRUE;\n\t\t\tHFONT hFont = ::CreateFontIndirect(&lf);\n\t\t\tif (hFont == NULL) return;\n\t\t\tm_pTwh->SetFont(hFont);\n\t\t\t::DeleteObject(hFont);\n\t\t}\n\t}\n\n\tLONG CRichEditUI::GetWinStyle( )\n\t{\n\t\treturn m_lTwhStyle;\n\t}\n\n\tvoid CRichEditUI::SetWinStyle(LONG lStyle)\n\t{\n\t\tm_lTwhStyle = lStyle;\n\t}\n\n\tDWORD CRichEditUI::GetTextColor( )\n\t{\n\t\treturn m_dwTextColor;\n\t}\n\n\tvoid CRichEditUI::SetTextColor(DWORD dwTextColor)\n\t{\n\t\tm_dwTextColor = dwTextColor;\n\t\tif (m_pTwh) {\n\t\t\tm_pTwh->SetColor(dwTextColor);\n\t\t}\n\t}\n\n\tint CRichEditUI::GetLimitText( )\n\t{\n\t\treturn m_iLimitText;\n\t}\n\n\tvoid CRichEditUI::SetLimitText(int iChars)\n\t{\n\t\tm_iLimitText = iChars;\n\t\tif (m_pTwh) {\n\t\t\tm_pTwh->LimitText(m_iLimitText);\n\t\t}\n\t}\n\n\tlong CRichEditUI::GetTextLength(DWORD dwFlags) const\n\t{\n\t\tGETTEXTLENGTHEX textLenEx;\n\t\ttextLenEx.flags = dwFlags;\n#ifdef _UNICODE\n\t\ttextLenEx.codepage = 1200;\n#else\n\t\ttextLenEx.codepage = CP_ACP;\n#endif\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_GETTEXTLENGTHEX, (WPARAM)&textLenEx, 0, &lResult);\n\t\treturn (long)lResult;\n\t}\n\n\tCDuiString CRichEditUI::GetText( ) const\n\t{\n\t\tlong lLen = GetTextLength(GTL_DEFAULT);\n\t\tLPTSTR lpText = NULL;\n\t\tGETTEXTEX gt;\n\t\tgt.flags = GT_DEFAULT;\n#ifdef _UNICODE\n\t\tgt.cb = sizeof(TCHAR) * (lLen + 1);\n\t\tgt.codepage = 1200;\n\t\tlpText = new TCHAR[lLen + 1];\n\t\t::ZeroMemory(lpText, (lLen + 1) * sizeof(TCHAR));\n#else\n\t\tgt.cb = sizeof(TCHAR) * lLen * 2 + 1;\n\t\tgt.codepage = CP_ACP;\n\t\tlpText = new TCHAR[lLen * 2 + 1];\n\t\t::ZeroMemory(lpText, (lLen * 2 + 1) * sizeof(TCHAR));\n#endif\n\t\tgt.lpDefaultChar = NULL;\n\t\tgt.lpUsedDefChar = NULL;\n\t\tTxSendMessage(EM_GETTEXTEX, (WPARAM)&gt, (LPARAM)lpText, 0);\n\t\tCDuiString sText(lpText);\n\t\tdelete[] lpText;\n\t\treturn sText;\n\t}\n\n\tvoid CRichEditUI::SetText(LPCTSTR pstrText)\n\t{\n\t\tm_sText = pstrText;\n\t\tif (!m_pTwh) return;\n\t\tSetSel(0, -1);\n\t\tReplaceSel(pstrText, FALSE);\n\t}\n\n\tbool CRichEditUI::GetModify( ) const\n\t{\n\t\tif (!m_pTwh) return false;\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_GETMODIFY, 0, 0, &lResult);\n\t\treturn (BOOL)lResult == TRUE;\n\t}\n\n\tvoid CRichEditUI::SetModify(bool bModified) const\n\t{\n\t\tTxSendMessage(EM_SETMODIFY, bModified, 0, 0);\n\t}\n\n\tvoid CRichEditUI::GetSel(CHARRANGE &cr) const\n\t{\n\t\tTxSendMessage(EM_EXGETSEL, 0, (LPARAM)&cr, 0);\n\t}\n\n\tvoid CRichEditUI::GetSel(long& nStartChar, long& nEndChar) const\n\t{\n\t\tCHARRANGE cr;\n\t\tTxSendMessage(EM_EXGETSEL, 0, (LPARAM)&cr, 0);\n\t\tnStartChar = cr.cpMin;\n\t\tnEndChar = cr.cpMax;\n\t}\n\n\tint CRichEditUI::SetSel(CHARRANGE &cr)\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_EXSETSEL, 0, (LPARAM)&cr, &lResult);\n\t\treturn (int)lResult;\n\t}\n\n\tint CRichEditUI::SetSel(long nStartChar, long nEndChar)\n\t{\n\t\tCHARRANGE cr;\n\t\tcr.cpMin = nStartChar;\n\t\tcr.cpMax = nEndChar;\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_EXSETSEL, 0, (LPARAM)&cr, &lResult);\n\t\treturn (int)lResult;\n\t}\n\n\tvoid CRichEditUI::ReplaceSel(LPCTSTR lpszNewText, bool bCanUndo)\n\t{\n#ifdef _UNICODE\t\t\n\t\tTxSendMessage(EM_REPLACESEL, (WPARAM)bCanUndo, (LPARAM)lpszNewText, 0);\n#else\n\t\tint iLen = _tcslen(lpszNewText);\n\t\tLPWSTR lpText = new WCHAR[iLen + 1];\n\t\t::ZeroMemory(lpText, (iLen + 1) * sizeof(WCHAR));\n\t\t::MultiByteToWideChar(CP_ACP, 0, lpszNewText, -1, (LPWSTR)lpText, iLen) ;\n\t\tTxSendMessage(EM_REPLACESEL, (WPARAM) bCanUndo, (LPARAM)lpText, 0); \n\t\tdelete[] lpText;\n#endif\n\t}\n\n\tvoid CRichEditUI::ReplaceSelW(LPCWSTR lpszNewText, bool bCanUndo)\n\t{\n\t\tTxSendMessage(EM_REPLACESEL, (WPARAM)bCanUndo, (LPARAM)lpszNewText, 0);\n\t}\n\n\tCDuiString CRichEditUI::GetSelText( ) const\n\t{\n\t\tif (!m_pTwh) return CDuiString( );\n\t\tCHARRANGE cr;\n\t\tcr.cpMin = cr.cpMax = 0;\n\t\tTxSendMessage(EM_EXGETSEL, 0, (LPARAM)&cr, 0);\n\t\tLPWSTR lpText = NULL;\n\t\tlpText = new WCHAR[cr.cpMax - cr.cpMin + 1];\n\t\t::ZeroMemory(lpText, (cr.cpMax - cr.cpMin + 1) * sizeof(WCHAR));\n\t\tTxSendMessage(EM_GETSELTEXT, 0, (LPARAM)lpText, 0);\n\t\tCDuiString sText;\n\t\tsText = (LPCWSTR)lpText;\n\t\tdelete[] lpText;\n\t\treturn sText;\n\t}\n\n\tint CRichEditUI::SetSelAll( )\n\t{\n\t\treturn SetSel(0, -1);\n\t}\n\n\tint CRichEditUI::SetSelNone( )\n\t{\n\t\treturn SetSel(-1, 0);\n\t}\n\n\tbool CRichEditUI::GetZoom(int& nNum, int& nDen) const\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_GETZOOM, (WPARAM)&nNum, (LPARAM)&nDen, &lResult);\n\t\treturn (BOOL)lResult == TRUE;\n\t}\n\n\tbool CRichEditUI::SetZoom(int nNum, int nDen)\n\t{\n\t\tif (nNum < 0 || nNum > 64) return false;\n\t\tif (nDen < 0 || nDen > 64) return false;\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_SETZOOM, nNum, nDen, &lResult);\n\t\treturn (BOOL)lResult == TRUE;\n\t}\n\n\tbool CRichEditUI::SetZoomOff( )\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_SETZOOM, 0, 0, &lResult);\n\t\treturn (BOOL)lResult == TRUE;\n\t}\n\n\tWORD CRichEditUI::GetSelectionType( ) const\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_SELECTIONTYPE, 0, 0, &lResult);\n\t\treturn (WORD)lResult;\n\t}\n\n\tbool CRichEditUI::GetAutoURLDetect( ) const\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_GETAUTOURLDETECT, 0, 0, &lResult);\n\t\treturn (BOOL)lResult == TRUE;\n\t}\n\n\tbool CRichEditUI::SetAutoURLDetect(bool bAutoDetect)\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_AUTOURLDETECT, bAutoDetect, 0, &lResult);\n\t\treturn (BOOL)lResult == FALSE;\n\t}\n\n\tDWORD CRichEditUI::GetEventMask( ) const\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_GETEVENTMASK, 0, 0, &lResult);\n\t\treturn (DWORD)lResult;\n\t}\n\n\tDWORD CRichEditUI::SetEventMask(DWORD dwEventMask)\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_SETEVENTMASK, 0, dwEventMask, &lResult);\n\t\treturn (DWORD)lResult;\n\t}\n\n\tCDuiString CRichEditUI::GetTextRange(long nStartChar, long nEndChar) const\n\t{\n\t\tTEXTRANGEW tr = { 0 };\n\t\ttr.chrg.cpMin = nStartChar;\n\t\ttr.chrg.cpMax = nEndChar;\n\t\tLPWSTR lpText = NULL;\n\t\tlpText = new WCHAR[nEndChar - nStartChar + 1];\n\t\t::ZeroMemory(lpText, (nEndChar - nStartChar + 1) * sizeof(WCHAR));\n\t\ttr.lpstrText = lpText;\n\t\tTxSendMessage(EM_GETTEXTRANGE, 0, (LPARAM)&tr, 0);\n\t\tCDuiString sText;\n\t\tsText = (LPCWSTR)lpText;\n\t\tdelete[] lpText;\n\t\treturn sText;\n\t}\n\n\tvoid CRichEditUI::HideSelection(bool bHide, bool bChangeStyle)\n\t{\n\t\tTxSendMessage(EM_HIDESELECTION, bHide, bChangeStyle, 0);\n\t}\n\n\tvoid CRichEditUI::ScrollCaret( )\n\t{\n\t\tTxSendMessage(EM_SCROLLCARET, 0, 0, 0);\n\t}\n\n\tint CRichEditUI::InsertText(long nInsertAfterChar, LPCTSTR lpstrText, bool bCanUndo)\n\t{\n\t\tint nRet = SetSel(nInsertAfterChar, nInsertAfterChar);\n\t\tReplaceSel(lpstrText, bCanUndo);\n\t\treturn nRet;\n\t}\n\n\tint CRichEditUI::AppendText(LPCTSTR lpstrText, bool bCanUndo)\n\t{\n\t\tint nRet = SetSel(-1, -1);\n\t\tReplaceSel(lpstrText, bCanUndo);\n\t\treturn nRet;\n\t}\n\n\tDWORD CRichEditUI::GetDefaultCharFormat(CHARFORMAT2 &cf) const\n\t{\n\t\tcf.cbSize = sizeof(CHARFORMAT2);\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_GETCHARFORMAT, 0, (LPARAM)&cf, &lResult);\n\t\treturn (DWORD)lResult;\n\t}\n\n\tbool CRichEditUI::SetDefaultCharFormat(CHARFORMAT2 &cf)\n\t{\n\t\tif (!m_pTwh) return false;\n\t\tcf.cbSize = sizeof(CHARFORMAT2);\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_SETCHARFORMAT, 0, (LPARAM)&cf, &lResult);\n\t\tif ((BOOL)lResult == TRUE) {\n\t\t\tCHARFORMAT2W cfw;\n\t\t\tcfw.cbSize = sizeof(CHARFORMAT2W);\n\t\t\tTxSendMessage(EM_GETCHARFORMAT, 1, (LPARAM)&cfw, 0);\n\t\t\tm_pTwh->SetCharFormat(cfw);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tDWORD CRichEditUI::GetSelectionCharFormat(CHARFORMAT2 &cf) const\n\t{\n\t\tcf.cbSize = sizeof(CHARFORMAT2);\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_GETCHARFORMAT, 1, (LPARAM)&cf, &lResult);\n\t\treturn (DWORD)lResult;\n\t}\n\n\tbool CRichEditUI::SetSelectionCharFormat(CHARFORMAT2 &cf)\n\t{\n\t\tif (!m_pTwh) return false;\n\t\tcf.cbSize = sizeof(CHARFORMAT2);\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf, &lResult);\n\t\treturn (BOOL)lResult == TRUE;\n\t}\n\n\tbool CRichEditUI::SetWordCharFormat(CHARFORMAT2 &cf)\n\t{\n\t\tif (!m_pTwh) return false;\n\t\tcf.cbSize = sizeof(CHARFORMAT2);\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM)&cf, &lResult);\n\t\treturn (BOOL)lResult == TRUE;\n\t}\n\n\tDWORD CRichEditUI::GetParaFormat(PARAFORMAT2 &pf) const\n\t{\n\t\tpf.cbSize = sizeof(PARAFORMAT2);\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_GETPARAFORMAT, 0, (LPARAM)&pf, &lResult);\n\t\treturn (DWORD)lResult;\n\t}\n\n\tbool CRichEditUI::SetParaFormat(PARAFORMAT2 &pf)\n\t{\n\t\tif (!m_pTwh) return false;\n\t\tpf.cbSize = sizeof(PARAFORMAT2);\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_SETPARAFORMAT, 0, (LPARAM)&pf, &lResult);\n\t\tif ((BOOL)lResult == TRUE) {\n\t\t\tm_pTwh->SetParaFormat(pf);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CRichEditUI::Redo( )\n\t{\n\t\tif (!m_pTwh) return false;\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_REDO, 0, 0, &lResult);\n\t\treturn (BOOL)lResult == TRUE;\n\t}\n\n\tbool CRichEditUI::Undo( )\n\t{\n\t\tif (!m_pTwh) return false;\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_UNDO, 0, 0, &lResult);\n\t\treturn (BOOL)lResult == TRUE;\n\t}\n\n\tvoid CRichEditUI::Clear( )\n\t{\n\t\tTxSendMessage(WM_CLEAR, 0, 0, 0);\n\t}\n\n\tvoid CRichEditUI::Copy( )\n\t{\n\t\tTxSendMessage(WM_COPY, 0, 0, 0);\n\t}\n\n\tvoid CRichEditUI::Cut( )\n\t{\n\t\tTxSendMessage(WM_CUT, 0, 0, 0);\n\t}\n\n\tvoid CRichEditUI::Paste( )\n\t{\n\t\tTxSendMessage(WM_PASTE, 0, 0, 0);\n\t}\n\n\tint CRichEditUI::GetLineCount( ) const\n\t{\n\t\tif (!m_pTwh) return 0;\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_GETLINECOUNT, 0, 0, &lResult);\n\t\treturn (int)lResult;\n\t}\n\n\tCDuiString CRichEditUI::GetLine(int nIndex, int nMaxLength) const\n\t{\n\t\tLPWSTR lpText = NULL;\n\t\tlpText = new WCHAR[nMaxLength + 1];\n\t\t::ZeroMemory(lpText, (nMaxLength + 1) * sizeof(WCHAR));\n\t\t*(LPWORD)lpText = (WORD)nMaxLength;\n\t\tTxSendMessage(EM_GETLINE, nIndex, (LPARAM)lpText, 0);\n\t\tCDuiString sText;\n\t\tsText = (LPCWSTR)lpText;\n\t\tdelete[] lpText;\n\t\treturn sText;\n\t}\n\n\tint CRichEditUI::LineIndex(int nLine) const\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_LINEINDEX, nLine, 0, &lResult);\n\t\treturn (int)lResult;\n\t}\n\n\tint CRichEditUI::LineLength(int nLine) const\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_LINELENGTH, nLine, 0, &lResult);\n\t\treturn (int)lResult;\n\t}\n\n\tbool CRichEditUI::LineScroll(int nLines, int nChars)\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_LINESCROLL, nChars, nLines, &lResult);\n\t\treturn (BOOL)lResult == TRUE;\n\t}\n\n\tCPoint CRichEditUI::GetCharPos(long lChar) const\n\t{\n\t\tCPoint pt;\n\t\tTxSendMessage(EM_POSFROMCHAR, (WPARAM)&pt, (LPARAM)lChar, 0);\n\t\treturn pt;\n\t}\n\n\tlong CRichEditUI::LineFromChar(long nIndex) const\n\t{\n\t\tif (!m_pTwh) return 0L;\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_EXLINEFROMCHAR, 0, nIndex, &lResult);\n\t\treturn (long)lResult;\n\t}\n\n\tCPoint CRichEditUI::PosFromChar(UINT nChar) const\n\t{\n\t\tPOINTL pt;\n\t\tTxSendMessage(EM_POSFROMCHAR, (WPARAM)&pt, nChar, 0);\n\t\treturn CPoint(pt.x, pt.y);\n\t}\n\n\tint CRichEditUI::CharFromPos(CPoint pt) const\n\t{\n\t\tPOINTL ptl = { pt.x, pt.y };\n\t\tif (!m_pTwh) return 0;\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_CHARFROMPOS, 0, (LPARAM)&ptl, &lResult);\n\t\treturn (int)lResult;\n\t}\n\n\tvoid CRichEditUI::EmptyUndoBuffer( )\n\t{\n\t\tTxSendMessage(EM_EMPTYUNDOBUFFER, 0, 0, 0);\n\t}\n\n\tUINT CRichEditUI::SetUndoLimit(UINT nLimit)\n\t{\n\t\tif (!m_pTwh) return 0;\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_SETUNDOLIMIT, (WPARAM)nLimit, 0, &lResult);\n\t\treturn (UINT)lResult;\n\t}\n\n\tlong CRichEditUI::StreamIn(int nFormat, EDITSTREAM &es)\n\t{\n\t\tif (!m_pTwh) return 0L;\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_STREAMIN, nFormat, (LPARAM)&es, &lResult);\n\t\treturn (long)lResult;\n\t}\n\n\tlong CRichEditUI::StreamOut(int nFormat, EDITSTREAM &es)\n\t{\n\t\tif (!m_pTwh) return 0L;\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_STREAMOUT, nFormat, (LPARAM)&es, &lResult);\n\t\treturn (long)lResult;\n\t}\n\n\tbool CRichEditUI::SetOLECallback(IRichEditOleCallback *pCallback)\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_SETOLECALLBACK, 0, (LPARAM)pCallback, &lResult);\n\t\tif ((BOOL)lResult == TRUE) {\n\t\t\tpCallback->AddRef( );\n\t\t\tm_pCallback = pCallback;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\n\tIRichEditOleCallback *CRichEditUI::GetOLECallback( )\n\t{\n\t\treturn m_pCallback;\n\t}\n\n\tLPRICHEDITOLE CRichEditUI::GetRichEditOle( )\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_GETOLEINTERFACE, 0, (LPARAM)(LPVOID*)&m_pRichEditOle, &lResult);\n\t\tif ((BOOL)lResult == TRUE) {\n\t\t\tm_pRichEditOle->AddRef( );\n\t\t\treturn m_pRichEditOle;\n\t\t}\n\t\treturn NULL;\n\t}\n\tvoid CRichEditUI::DoInit( )\n\t{\n\t\tif (m_bInited)\n\t\t\treturn;\n\n\t\tCREATESTRUCT cs;\n\t\tcs.style = m_lTwhStyle;\n\t\tcs.x = 0;\n\t\tcs.y = 0;\n\t\tcs.cy = 0;\n\t\tcs.cx = 0;\n\t\tcs.lpszName = m_sText.GetData( );\n\t\tCreateHost(this, &cs, &m_pTwh);\n\t\tif (m_pTwh) {\n\t\t\tm_pTwh->SetTransparent(TRUE);\n\t\t\tLRESULT lResult;\n\t\t\tm_pTwh->GetTextServices( )->TxSendMessage(EM_SETLANGOPTIONS, 0, 0, &lResult);\n\t\t\tm_pTwh->OnTxInPlaceActivate(NULL);\n\t\t\tm_pManager->AddMessageFilter(this);\n\t\t}\n\n\t\tIRichEditOleCallback *pCallback = new CRichEditOleCallback(this);\n\t\tSetOLECallback(pCallback);\n\n\t\tm_bInited = true;\n\t}\n\n\tHRESULT CRichEditUI::TxSendMessage(UINT msg, WPARAM wparam, LPARAM lparam, LRESULT *plresult) const\n\t{\n\t\tif (m_pTwh) {\n\t\t\tif (msg == WM_KEYDOWN && TCHAR(wparam) == VK_RETURN)\n\t\t\t{\n\t\t\t\tif (!m_bWantReturn || (::GetKeyState(VK_CONTROL) < 0 && !m_bWantCtrlReturn))\n\t\t\t\t{\n\t\t\t\t\tif (m_pManager != NULL) m_pManager->SendNotify((CControlUI*)this, DUI_MSGTYPE_RETURN);\n\t\t\t\t\treturn S_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn m_pTwh->GetTextServices( )->TxSendMessage(msg, wparam, lparam, plresult);\n\t\t}\n\t\treturn S_FALSE;\n\t}\n\n\tIDropTarget* CRichEditUI::GetTxDropTarget( )\n\t{\n\t\tIDropTarget *pdt = NULL;\n\t\tif (m_pTwh->GetTextServices( )->TxGetDropTarget(&pdt) == NOERROR) return pdt;\n\t\treturn NULL;\n\t}\n\n\tbool CRichEditUI::OnTxViewChanged( )\n\t{\n\t\treturn true;\n\t}\n\n\tbool CRichEditUI::SetDropAcceptFile(bool bAccept)\n\t{\n\t\tLRESULT lResult;\n\t\tTxSendMessage(EM_SETEVENTMASK, 0, ENM_DROPFILES | ENM_LINK, // ENM_CHANGE| ENM_CORRECTTEXT | ENM_DRAGDROPDONE | ENM_DROPFILES | ENM_IMECHANGE | ENM_LINK | ENM_OBJECTPOSITIONS | ENM_PROTECTED | ENM_REQUESTRESIZE | ENM_SCROLL | ENM_SELCHANGE | ENM_UPDATE,\n\t\t\t&lResult);\n\t\treturn (BOOL)lResult == FALSE;\n\t}\n\nvoid CRichEditUI::OnTxNotify(DWORD iNotify, void *pv)\n{\n\tswitch(iNotify)\n\t{ \n\tcase EN_DROPFILES:   \n\tcase EN_MSGFILTER:   \n\tcase EN_OLEOPFAILED:   \n\tcase EN_PROTECTED:   \n\tcase EN_SAVECLIPBOARD:   \n\tcase EN_SELCHANGE:   \n\tcase EN_STOPNOUNDO:   \n\tcase EN_LINK:   \n\tcase EN_OBJECTPOSITIONS:   \n\tcase EN_DRAGDROPDONE:   \n\t\t{\n\t\t\tif (pv)                        // Fill out NMHDR portion of pv   \n\t\t\t{\n\t\t\t\tLONG nId = GetWindowLong(this->GetManager( )->GetPaintWindow( ), GWL_ID);\n\t\t\t\tNMHDR  *phdr = (NMHDR *)pv;\n\t\t\t\tphdr->hwndFrom = this->GetManager( )->GetPaintWindow( );\n\t\t\t\tphdr->idFrom = nId;\n\t\t\t\tphdr->code = iNotify;\n\n\t\t\t\tif (SendMessage(this->GetManager( )->GetPaintWindow( ), WM_NOTIFY, (WPARAM)nId, (LPARAM)pv))\n\t\t\t\t{\n\t\t\t\t\t//hr = S_FALSE;   \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\n// 多行非rich格式的richedit有一个滚动条bug，在最后一行是空行时，LineDown和SetScrollPos无法滚动到最后\n// 引入iPos就是为了修正这个bug\n\tvoid CRichEditUI::SetScrollPos(SIZE szPos)\n\t{\n\t\tint cx = 0;\n\t\tint cy = 0;\n\t\tif (m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible( )) {\n\t\t\tint iLastScrollPos = m_pVerticalScrollBar->GetScrollPos( );\n\t\t\tm_pVerticalScrollBar->SetScrollPos(szPos.cy);\n\t\t\tcy = m_pVerticalScrollBar->GetScrollPos( ) - iLastScrollPos;\n\t\t}\n\t\tif (m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible( )) {\n\t\t\tint iLastScrollPos = m_pHorizontalScrollBar->GetScrollPos( );\n\t\t\tm_pHorizontalScrollBar->SetScrollPos(szPos.cx);\n\t\t\tcx = m_pHorizontalScrollBar->GetScrollPos( ) - iLastScrollPos;\n\t\t}\n\t\tif (cy != 0) {\n\t\t\tint iPos = 0;\n\t\t\tif (m_pTwh && !m_bRich && m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible( ))\n\t\t\t\tiPos = m_pVerticalScrollBar->GetScrollPos( );\n\t\t\tWPARAM wParam = MAKEWPARAM(SB_THUMBPOSITION, m_pVerticalScrollBar->GetScrollPos( ));\n\t\t\tTxSendMessage(WM_VSCROLL, wParam, 0L, 0);\n\t\t\tif (m_pTwh && !m_bRich && m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible( )) {\n\t\t\t\tif (cy > 0 && m_pVerticalScrollBar->GetScrollPos( ) <= iPos)\n\t\t\t\t\tm_pVerticalScrollBar->SetScrollPos(iPos);\n\t\t\t}\n\t\t}\n\t\tif (cx != 0) {\n\t\t\tWPARAM wParam = MAKEWPARAM(SB_THUMBPOSITION, m_pHorizontalScrollBar->GetScrollPos( ));\n\t\t\tTxSendMessage(WM_HSCROLL, wParam, 0L, 0);\n\t\t}\n\t}\n\n\tvoid CRichEditUI::LineUp( )\n\t{\n\t\tTxSendMessage(WM_VSCROLL, SB_LINEUP, 0L, 0);\n\t\tCContainerUI::LineUp( );\n\t}\n\n\tvoid CRichEditUI::LineDown( )\n\t{\n\t\t//   int iPos = 0;\n\t\t//     if( m_pTwh && !m_bRich && m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) \n\t\t//         iPos = m_pVerticalScrollBar->GetScrollPos();\n\t\tTxSendMessage(WM_VSCROLL, SB_LINEDOWN, 0L, 0);\n\t\t//     if( m_pTwh && !m_bRich && m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) {\n\t\t//         if( m_pVerticalScrollBar->GetScrollPos() <= iPos )\n\t\t//             m_pVerticalScrollBar->SetScrollPos(m_pVerticalScrollBar->GetScrollRange());\n\t\t//     }\n\n\t\tCContainerUI::LineDown( );\n\t}\n\n\tvoid CRichEditUI::PageUp( )\n\t{\n\t\tTxSendMessage(WM_VSCROLL, SB_PAGEUP, 0L, 0);\n\t\tCContainerUI::PageUp( );\n\t}\n\n\tvoid CRichEditUI::PageDown( )\n\t{\n\t\tTxSendMessage(WM_VSCROLL, SB_PAGEDOWN, 0L, 0);\n\t\tCContainerUI::PageUp( );\n\t}\n\n\tvoid CRichEditUI::HomeUp( )\n\t{\n\t\tTxSendMessage(WM_VSCROLL, SB_TOP, 0L, 0);\n\t\tCContainerUI::HomeUp( );\n\t}\n\n\tvoid CRichEditUI::EndDown( )\n\t{\n\t\tTxSendMessage(WM_VSCROLL, SB_BOTTOM, 0L, 0);\n\t\tCContainerUI::EndDown( );\n\t}\n\n\tvoid CRichEditUI::LineLeft( )\n\t{\n\t\tTxSendMessage(WM_HSCROLL, SB_LINELEFT, 0L, 0);\n\n\t\tCContainerUI::LineLeft( );\n\t}\n\n\tvoid CRichEditUI::LineRight( )\n\t{\n\t\tTxSendMessage(WM_HSCROLL, SB_LINERIGHT, 0L, 0);\n\t\tCContainerUI::LineRight( );\n\t}\n\n\tvoid CRichEditUI::PageLeft( )\n\t{\n\t\tTxSendMessage(WM_HSCROLL, SB_PAGELEFT, 0L, 0);\n\t\tCContainerUI::PageLeft( );\n\t}\n\n\tvoid CRichEditUI::PageRight( )\n\t{\n\t\tTxSendMessage(WM_HSCROLL, SB_PAGERIGHT, 0L, 0);\n\t\tCContainerUI::PageRight( );\n\t}\n\n\tvoid CRichEditUI::HomeLeft( )\n\t{\n\t\tTxSendMessage(WM_HSCROLL, SB_LEFT, 0L, 0);\n\t\tCContainerUI::HomeLeft( );\n\t}\n\n\tvoid CRichEditUI::EndRight( )\n\t{\n\t\tTxSendMessage(WM_HSCROLL, SB_RIGHT, 0L, 0);\n\t\tCContainerUI::EndRight( );\n\t}\n\n\tvoid CRichEditUI::DoEvent(TEventUI& event)\n\t{\n\t\tif (!IsMouseEnabled( ) && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND) {\n\t\t\tif (m_pParent != NULL) m_pParent->DoEvent(event);\n\t\t\telse CControlUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.Type == UIEVENT_SETCURSOR && IsEnabled( ))\n\t\t{\n\t\t\tif (m_pTwh && m_pTwh->DoSetCursor(NULL, &event.ptMouse)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (event.Type == UIEVENT_SETFOCUS) {\n\t\t\tif (m_pTwh) {\n\t\t\t\tm_pTwh->OnTxInPlaceActivate(NULL);\n\t\t\t\tm_pTwh->GetTextServices( )->TxSendMessage(WM_SETFOCUS, 0, 0, 0);\n\t\t\t}\n\t\t\tm_bFocused = true;\n\t\t\tInvalidate( );\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_KILLFOCUS)  {\n\t\t\tif (m_pTwh) {\n\t\t\t\tm_pTwh->OnTxInPlaceActivate(NULL);\n\t\t\t\tm_pTwh->GetTextServices( )->TxSendMessage(WM_KILLFOCUS, 0, 0, 0);\n\t\t\t}\n\t\t\tm_bFocused = false;\n\t\t\tInvalidate( );\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_TIMER) {\n\t\t\tif (m_pTwh) {\n\t\t\t\tm_pTwh->GetTextServices( )->TxSendMessage(WM_TIMER, event.wParam, event.lParam, 0);\n\t\t\t}\n\t\t}\n\t\tif (event.Type == UIEVENT_SCROLLWHEEL) {\n\t\t\tif ((event.wKeyState & MK_CONTROL) != 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_MOUSEMOVE)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_BUTTONUP)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_MOUSEENTER)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type == UIEVENT_MOUSELEAVE)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event.Type > UIEVENT__KEYBEGIN && event.Type < UIEVENT__KEYEND)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tCContainerUI::DoEvent(event);\n\t}\n\n\tSIZE CRichEditUI::EstimateSize(SIZE szAvailable)\n\t{\n    //return CSize(m_rcItem); // 这种方式在第一次设置大小之后就大小不变了\n\t\treturn CContainerUI::EstimateSize(szAvailable);\n\t}\n\n\tvoid CRichEditUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\t\trc = m_rcItem;\n\n\t\trc.left += m_rcInset.left;\n\t\trc.top += m_rcInset.top;\n\t\trc.right -= m_rcInset.right;\n\t\trc.bottom -= m_rcInset.bottom;\n\t\tbool bVScrollBarVisiable = false;\n\t\tif (m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible( )) {\n\t\t\tbVScrollBarVisiable = true;\n\t\t\trc.right -= m_pVerticalScrollBar->GetFixedWidth( );\n\t\t}\n\t\tif (m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible( )) {\n\t\t\trc.bottom -= m_pHorizontalScrollBar->GetFixedHeight( );\n\t\t}\n\n\tif( m_pTwh ) {\n\t\tRECT rcRich = rc;\n\t\trcRich.left += m_rcTextPadding.left;\n\t\trcRich.right -= m_rcTextPadding.right;\n\t\trcRich.top += m_rcTextPadding.top;\n\t\trcRich.bottom -= m_rcTextPadding.bottom;\n\t\tm_pTwh->SetClientRect(&rcRich);\n\t\tif( bVScrollBarVisiable && (!m_pVerticalScrollBar->IsVisible() || m_bVScrollBarFixing) ) {\n\t\t\tLONG lWidth = rcRich.right - rcRich.left + m_pVerticalScrollBar->GetFixedWidth();\n\t\t\tLONG lHeight = 0;\n\t\t\tSIZEL szExtent = { -1, -1 };\n\t\t\tm_pTwh->GetTextServices()->TxGetNaturalSize(\n\t\t\t\tDVASPECT_CONTENT, \n\t\t\t\tGetManager()->GetPaintDC(), \n\t\t\t\tNULL,\n\t\t\t\tNULL,\n\t\t\t\tTXTNS_FITTOCONTENT,\n\t\t\t\t&szExtent,\n\t\t\t\t&lWidth,\n\t\t\t\t&lHeight);\n\t\t\tif( lHeight > rcRich.bottom - rcRich.top ) {\n\t\t\t\tm_pVerticalScrollBar->SetVisible(true);\n\t\t\t\tm_pVerticalScrollBar->SetScrollPos(0);\n\t\t\t\tm_bVScrollBarFixing = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( m_bVScrollBarFixing ) {\n\t\t\t\t\tm_pVerticalScrollBar->SetVisible(false);\n\t\t\t\t\tm_bVScrollBarFixing = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t\tif (m_pVerticalScrollBar != NULL && m_pVerticalScrollBar->IsVisible( )) {\n\t\t\tRECT rcScrollBarPos = { rc.right, rc.top, rc.right + m_pVerticalScrollBar->GetFixedWidth( ), rc.bottom };\n\t\t\tm_pVerticalScrollBar->SetPos(rcScrollBarPos);\n\t\t}\n\t\tif (m_pHorizontalScrollBar != NULL && m_pHorizontalScrollBar->IsVisible( )) {\n\t\t\tRECT rcScrollBarPos = { rc.left, rc.bottom, rc.right, rc.bottom + m_pHorizontalScrollBar->GetFixedHeight( ) };\n\t\t\tm_pHorizontalScrollBar->SetPos(rcScrollBarPos);\n\t\t}\n\n\tSIZE szAvailable = { rc.right - rc.left, rc.bottom - rc.top };\n\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) \n\t\tszAvailable.cx += m_pHorizontalScrollBar->GetScrollRange();\n\n\tint nAdjustables = 0;\n\tint cxFixed = 0;\n\tint nEstimateNum = 0;\n\tfor( int it1 = 0; it1 < m_items.GetSize(); it1++ ) {\n\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it1]);\n\t\tif( !pControl->IsVisible() ) continue;\n\t\tif( pControl->IsFloat() ) continue;\n\t\tSIZE sz = pControl->EstimateSize(szAvailable);\n\t\tif( sz.cx == 0 ) {\n\t\t\tnAdjustables++;\n\t\t}\n\t\telse {\n\t\t\tif( sz.cx < pControl->GetMinWidth() ) sz.cx = pControl->GetMinWidth();\n\t\t\tif( sz.cx > pControl->GetMaxWidth() ) sz.cx = pControl->GetMaxWidth();\n\t\t}\n\t\tcxFixed += sz.cx +  pControl->GetPadding().left + pControl->GetPadding().right;\n\t\tnEstimateNum++;\n\t}\n\tcxFixed += (nEstimateNum - 1) * m_iChildPadding;\n\n\tint cxExpand = 0;\n    int cxNeeded = 0;\n\tif( nAdjustables > 0 ) cxExpand = MAX(0, (szAvailable.cx - cxFixed) / nAdjustables);\n\t// Position the elements\n\tSIZE szRemaining = szAvailable;\n\tint iPosX = rc.left;\n\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) {\n\t\tiPosX -= m_pHorizontalScrollBar->GetScrollPos();\n\t}\n\tint iAdjustable = 0;\n\tint cxFixedRemaining = cxFixed;\n\tfor( int it2 = 0; it2 < m_items.GetSize(); it2++ ) {\n\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it2]);\n\t\tif( !pControl->IsVisible() ) continue;\n\t\tif( pControl->IsFloat() ) {\n\t\t\tSetFloatPos(it2);\n\t\t\tcontinue;\n\t\t}\n\t\tRECT rcPadding = pControl->GetPadding();\n\t\tszRemaining.cx -= rcPadding.left;\n\t\tSIZE sz = pControl->EstimateSize(szRemaining);\n\t\tif( sz.cx == 0 ) {\n\t\t\tiAdjustable++;\n\t\t\tsz.cx = cxExpand;\n\n\t\t\tif( sz.cx < pControl->GetMinWidth() ) sz.cx = pControl->GetMinWidth();\n\t\t\tif( sz.cx > pControl->GetMaxWidth() ) sz.cx = pControl->GetMaxWidth();\n\t\t}\n\t\telse {\n\t\t\tif( sz.cx < pControl->GetMinWidth() ) sz.cx = pControl->GetMinWidth();\n\t\t\tif( sz.cx > pControl->GetMaxWidth() ) sz.cx = pControl->GetMaxWidth();\n\n\t\t}\n\n\t\tsz.cy = pControl->GetFixedHeight();\n\t\tif( sz.cy == 0 ) sz.cy = rc.bottom - rc.top - rcPadding.top - rcPadding.bottom;\n\t\tif( sz.cy < 0 ) sz.cy = 0;\n\t\tif( sz.cy < pControl->GetMinHeight() ) sz.cy = pControl->GetMinHeight();\n\t\tif( sz.cy > pControl->GetMaxHeight() ) sz.cy = pControl->GetMaxHeight();\n\n\t\tRECT rcCtrl = { iPosX + rcPadding.left, rc.top + rcPadding.top, iPosX + sz.cx + rcPadding.left , rc.top + rcPadding.top + sz.cy};\n\t\tpControl->SetPos(rcCtrl);\n\t\tiPosX += sz.cx + m_iChildPadding + rcPadding.left + rcPadding.right;\n        cxNeeded += sz.cx + rcPadding.left + rcPadding.right;\n\t\tszRemaining.cx -= sz.cx + m_iChildPadding + rcPadding.right;\n\t}\n    cxNeeded += (nEstimateNum - 1) * m_iChildPadding;\n\t//reddrain\n\tif( m_pHorizontalScrollBar != NULL ) {\n\t\tif( cxNeeded > rc.right - rc.left ) {\n\t\t\tif( m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\t\tm_pHorizontalScrollBar->SetScrollRange(cxNeeded - (rc.right - rc.left));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tm_pHorizontalScrollBar->SetVisible(true);\n\t\t\t\tm_pHorizontalScrollBar->SetScrollRange(cxNeeded - (rc.right - rc.left));\n\t\t\t\tm_pHorizontalScrollBar->SetScrollPos(0);\n\t\t\t\trc.bottom -= m_pHorizontalScrollBar->GetFixedHeight();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif( m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\t\tm_pHorizontalScrollBar->SetVisible(false);\n\t\t\t\tm_pHorizontalScrollBar->SetScrollRange(0);\n\t\t\t\tm_pHorizontalScrollBar->SetScrollPos(0);\n\t\t\t\trc.bottom += m_pHorizontalScrollBar->GetFixedHeight();\n\t\t\t}\n\t\t}\n\t}\n\t//redrain\n\n}\n\n\tvoid CRichEditUI::DoPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\tRECT rcTemp = { 0 };\n\t\tif (!::IntersectRect(&rcTemp, &rcPaint, &m_rcItem)) return;\n\n\t\tCRenderClip clip;\n\t\tCRenderClip::GenerateClip(hDC, rcTemp, clip);\n\t\tCControlUI::DoPaint(hDC, rcPaint);\n\n\t\tif (m_pTwh) {\n\t\t\tRECT rc;\n\t\t\tm_pTwh->GetControlRect(&rc);\n\t\t\t// Remember wparam is actually the hdc and lparam is the update\n\t\t\t// rect because this message has been preprocessed by the window.\n\t\t\tm_pTwh->GetTextServices( )->TxDraw(\n\t\t\t\tDVASPECT_CONTENT,  \t\t// Draw Aspect\n\t\t\t\t/*-1*/0,\t\t\t\t// Lindex\n\t\t\t\tNULL,\t\t\t\t\t// Info for drawing optimazation\n\t\t\t\tNULL,\t\t\t\t\t// target device information\n\t\t\t\thDC,\t\t\t        // Draw device HDC\n\t\t\t\tNULL, \t\t\t\t   \t// Target device HDC\n\t\t\t\t(RECTL*)&rc,\t\t\t// Bounding client rectangle\n\t\t\t\tNULL, \t\t            // Clipping rectangle for metafiles\n\t\t\t\t(RECT*)&rcPaint,\t\t// Update rectangle\n\t\t\t\tNULL, \t   \t\t\t\t// Call back function\n\t\t\t\tNULL,\t\t\t\t\t// Call back parameter\n\t\t\t\t0);\t\t\t\t        // What view of the object\n\t\t\tif (m_bVScrollBarFixing) {\n\t\t\t\tLONG lWidth = rc.right - rc.left + m_pVerticalScrollBar->GetFixedWidth( );\n\t\t\t\tLONG lHeight = 0;\n\t\t\t\tSIZEL szExtent = { -1, -1 };\n\t\t\t\tm_pTwh->GetTextServices( )->TxGetNaturalSize(\n\t\t\t\t\tDVASPECT_CONTENT,\n\t\t\t\t\tGetManager( )->GetPaintDC( ),\n\t\t\t\t\tNULL,\n\t\t\t\t\tNULL,\n\t\t\t\t\tTXTNS_FITTOCONTENT,\n\t\t\t\t\t&szExtent,\n\t\t\t\t\t&lWidth,\n\t\t\t\t\t&lHeight);\n\t\t\t\tif (lHeight <= rc.bottom - rc.top) {\n\t\t\t\t\tNeedUpdate( );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (m_items.GetSize( ) > 0) {\n\t\t\tRECT rc = m_rcItem;\n\t\t\trc.left += m_rcInset.left;\n\t\t\trc.top += m_rcInset.top;\n\t\t\trc.right -= m_rcInset.right;\n\t\t\trc.bottom -= m_rcInset.bottom;\n\t\t\tif (m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible( )) rc.right -= m_pVerticalScrollBar->GetFixedWidth( );\n\t\t\tif (m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible( )) rc.bottom -= m_pHorizontalScrollBar->GetFixedHeight( );\n\n\t\t\tif (!::IntersectRect(&rcTemp, &rcPaint, &rc)) {\n\t\t\t\tfor (int it = 0; it < m_items.GetSize( ); it++) {\n\t\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it]);\n\t\t\t\t\tif (!pControl->IsVisible( )) continue;\n\t\t\t\t\tif (!::IntersectRect(&rcTemp, &rcPaint, &pControl->GetPos( ))) continue;\n\t\t\t\t\tif (pControl->IsFloat( )) {\n\t\t\t\t\t\tif (!::IntersectRect(&rcTemp, &m_rcItem, &pControl->GetPos( ))) continue;\n\t\t\t\t\t\tpControl->DoPaint(hDC, rcPaint);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCRenderClip childClip;\n\t\t\t\tCRenderClip::GenerateClip(hDC, rcTemp, childClip);\n\t\t\t\tfor (int it = 0; it < m_items.GetSize( ); it++) {\n\t\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it]);\n\t\t\t\t\tif (!pControl->IsVisible( )) continue;\n\t\t\t\t\tif (!::IntersectRect(&rcTemp, &rcPaint, &pControl->GetPos( ))) continue;\n\t\t\t\t\tif (pControl->IsFloat( )) {\n\t\t\t\t\t\tif (!::IntersectRect(&rcTemp, &m_rcItem, &pControl->GetPos( ))) continue;\n\t\t\t\t\t\tCRenderClip::UseOldClipBegin(hDC, childClip);\n\t\t\t\t\t\tpControl->DoPaint(hDC, rcPaint);\n\t\t\t\t\t\tCRenderClip::UseOldClipEnd(hDC, childClip);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!::IntersectRect(&rcTemp, &rc, &pControl->GetPos( ))) continue;\n\t\t\t\t\t\tpControl->DoPaint(hDC, rcPaint);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (m_pVerticalScrollBar != NULL && m_pVerticalScrollBar->IsVisible( )) {\n\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &m_pVerticalScrollBar->GetPos( ))) {\n\t\t\t\tm_pVerticalScrollBar->DoPaint(hDC, rcPaint);\n\t\t\t}\n\t\t}\n\n\t\tif (m_pHorizontalScrollBar != NULL && m_pHorizontalScrollBar->IsVisible( )) {\n\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &m_pHorizontalScrollBar->GetPos( ))) {\n\t\t\t\tm_pHorizontalScrollBar->DoPaint(hDC, rcPaint);\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CRichEditUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif (_tcscmp(pstrName, _T(\"vscrollbar\")) == 0) {\n\t\t\tif (_tcscmp(pstrValue, _T(\"true\")) == 0)\n\t\t\t{\n\t\t\t\tm_lTwhStyle |= ES_DISABLENOSCROLL | WS_VSCROLL;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_lTwhStyle &= ~WS_VSCROLL;\n\t\t\t}\n\t\t}\n\t\tif (_tcscmp(pstrName, _T(\"autovscroll\")) == 0) {\n\t\t\tif (_tcscmp(pstrValue, _T(\"true\")) == 0)\n\t\t\t{\n\t\t\t\tm_lTwhStyle |= ES_AUTOVSCROLL;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_lTwhStyle &= ~ES_AUTOVSCROLL;\n\t\t\t}\n\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"hscrollbar\")) == 0) {\n\t\t\tif (_tcscmp(pstrValue, _T(\"true\")) == 0)\n\t\t\t{\n\t\t\t\tm_lTwhStyle |= ES_DISABLENOSCROLL | WS_HSCROLL;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_lTwhStyle &= ~WS_HSCROLL;\n\t\t\t}\n\t\t}\n\t\tif (_tcscmp(pstrName, _T(\"autohscroll\")) == 0) {\n\t\t\tif (_tcscmp(pstrValue, _T(\"true\")) == 0)\n\t\t\t{\n\t\t\t\tm_lTwhStyle |= ES_AUTOHSCROLL;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_lTwhStyle &= ~ES_AUTOHSCROLL;\n\t\t\t}\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"wanttab\")) == 0) {\n\t\t\tSetWantTab(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"wantreturn\")) == 0) {\n\t\t\tSetWantReturn(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"wantctrlreturn\")) == 0) {\n\t\t\tSetWantCtrlReturn(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t}\n\t\t//else if (_tcscmp(pstrName, _T(\"transparent\")) == 0) {\n\t\t//\t(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t//}\n\t\telse if (_tcscmp(pstrName, _T(\"rich\")) == 0) {\n\t\t\tSetRich(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"multiline\")) == 0) {\n\t\t\tif (_tcscmp(pstrValue, _T(\"false\")) == 0)\n\t\t\t{\n\t\t\t\tm_lTwhStyle &= ~ES_MULTILINE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_lTwhStyle |= ES_MULTILINE;\n\t\t\t}\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"readonly\")) == 0) {\n\t\t\tif (_tcscmp(pstrValue, _T(\"true\")) == 0)\n\t\t\t{\n\t\t\t\tm_lTwhStyle |= ES_READONLY;\n\t\t\t\tSetReadOnly(true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_lTwhStyle &= ~ES_READONLY;\n\t\t\t\tSetReadOnly(false);\n\t\t\t}\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"password\")) == 0) {\n\t\t\tif (_tcscmp(pstrValue, _T(\"true\")) == 0)\n\t\t\t{\n\t\t\t\tm_lTwhStyle |= ES_PASSWORD;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_lTwhStyle &= ~ES_PASSWORD;\n\t\t\t}\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"align\")) == 0) {\n\t\t\tif (_tcsstr(pstrValue, _T(\"left\")) != NULL) {\n\t\t\t\tm_lTwhStyle &= ~(ES_CENTER | ES_RIGHT);\n\t\t\t\tm_lTwhStyle |= ES_LEFT;\n\t\t\t}\n\t\t\tif (_tcsstr(pstrValue, _T(\"center\")) != NULL) {\n\t\t\t\tm_lTwhStyle &= ~(ES_LEFT | ES_RIGHT);\n\t\t\t\tm_lTwhStyle |= ES_CENTER;\n\t\t\t}\n\t\t\tif (_tcsstr(pstrValue, _T(\"right\")) != NULL) {\n\t\t\t\tm_lTwhStyle &= ~(ES_LEFT | ES_CENTER);\n\t\t\t\tm_lTwhStyle |= ES_RIGHT;\n\t\t\t}\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"font\")) == 0) SetFont(_ttoi(pstrValue));\n\t\telse if (_tcscmp(pstrName, _T(\"textcolor\")) == 0) {\n\t\t\twhile (*pstrValue > _T('\\0') && *pstrValue <= _T(' ')) pstrValue = ::CharNext(pstrValue);\n\t\t\tif (*pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetTextColor(clrColor);\n\t\t}\n\telse if( _tcscmp(pstrName, _T(\"textpadding\")) == 0 ) {\n\t\tRECT rcTextPadding = { 0 };\n\t\tLPTSTR pstr = NULL;\n\t\trcTextPadding.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\trcTextPadding.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\trcTextPadding.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\trcTextPadding.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\tSetTextPadding(rcTextPadding);\n\t}\n\t\telse CContainerUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tLRESULT CRichEditUI::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled)\n\t{\n\t\tif (!IsVisible( ) || !IsEnabled( )) return 0;\n\t\tif (!IsMouseEnabled( ) && uMsg >= WM_MOUSEFIRST && uMsg <= WM_MOUSELAST) return 0;\n\t\tif (uMsg == WM_MOUSEWHEEL && (LOWORD(wParam) & MK_CONTROL) == 0) return 0;\n\n\t\tif (uMsg == WM_IME_COMPOSITION)\n\t\t{\n\t\t// 解决微软输入法位置异常的问题\n\t\t\tHIMC hIMC = ImmGetContext(GetManager( )->GetPaintWindow( ));\n\t\t\tif (hIMC)\n\t\t\t{\n\t\t\t\t// Set composition window position near caret position\n\t\t\t\tPOINT point;\n\t\t\t\tGetCaretPos(&point);\n\n\t\t\t\tCOMPOSITIONFORM Composition;\n\t\t\t\tComposition.dwStyle = CFS_POINT;\n\t\t\t\tComposition.ptCurrentPos.x = point.x;\n\t\t\t\tComposition.ptCurrentPos.y = point.y;\n\t\t\t\tImmSetCompositionWindow(hIMC, &Composition);\n\n\t\t\t\tImmReleaseContext(GetManager( )->GetPaintWindow( ), hIMC);\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\tbool bWasHandled = true;\n\t\tif ((uMsg >= WM_MOUSEFIRST && uMsg <= WM_MOUSELAST) || uMsg == WM_SETCURSOR) {\n\t\t\tif (!m_pTwh->IsCaptured( )) {\n\t\t\t\tswitch (uMsg) {\n\t\t\t\tcase WM_LBUTTONDOWN:\n\t\t\t\tcase WM_LBUTTONUP:\n\t\t\t\tcase WM_LBUTTONDBLCLK:\n\t\t\t\tcase WM_RBUTTONDOWN:\n\t\t\t\tcase WM_RBUTTONUP:\n\t\t\t\t{\n\t\t\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\t\tCControlUI* pHover = GetManager( )->FindControl(pt);\n\t\t\t\t\tif (pHover != this) {\n\t\t\t\t\t\tbWasHandled = false;\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Mouse message only go when captured or inside rect\n\t\t\tDWORD dwHitResult = m_pTwh->IsCaptured( ) ? HITRESULT_HIT : HITRESULT_OUTSIDE;\n\t\t\tif (dwHitResult == HITRESULT_OUTSIDE) {\n\t\t\t\tRECT rc;\n\t\t\t\tm_pTwh->GetControlRect(&rc);\n\t\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\tif (uMsg == WM_MOUSEWHEEL) ::ScreenToClient(GetManager( )->GetPaintWindow( ), &pt);\n\t\t\t\tif (::PtInRect(&rc, pt) && !GetManager( )->IsCaptured( )) dwHitResult = HITRESULT_HIT;\n\t\t\t}\n\t\t\tif (dwHitResult != HITRESULT_HIT) return 0;\n\t\t\tif (uMsg == WM_SETCURSOR) bWasHandled = false;\n\t\t\telse if (uMsg == WM_LBUTTONDOWN || uMsg == WM_LBUTTONDBLCLK || uMsg == WM_RBUTTONDOWN) {\n\t\t\t\tSetFocus( );\n\t\t\t}\n\t\t}\n#ifdef _UNICODE\n\t\telse if (uMsg >= WM_KEYFIRST && uMsg <= WM_KEYLAST) {\n#else\n\t\telse if( (uMsg >= WM_KEYFIRST && uMsg <= WM_KEYLAST) || uMsg == WM_CHAR || uMsg == WM_IME_CHAR ) {\n#endif\n\t\t\tif (!IsFocused( )) return 0;\n\t\t}\n\t\telse if (uMsg == WM_CONTEXTMENU) {\n\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t::ScreenToClient(GetManager( )->GetPaintWindow( ), &pt);\n\t\t\tCControlUI* pHover = GetManager( )->FindControl(pt);\n\t\t\tif (pHover != this) {\n\t\t\t\tbWasHandled = false;\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\telse if (uMsg == WM_KILLFOCUS)\n\t\t{\n\t\t\t//fix bug,当嵌入Windows控件时，如果别的windows控件（如嵌入的IE，它是该窗口的一个子窗口）得到Focus的时候，自己的焦点并没有去掉，造成下次不能再输入\n\t\t\tif (m_bFocused && this->GetManager())\n\t\t\t{\n\t\t\t\tthis->GetManager( )->SetFocus(NULL);\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tswitch (uMsg) {\n\t\t\tcase WM_HELP:\n\t\t\t\tbWasHandled = false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\n\t\tif (WM_CHAR == uMsg)\n\t\t{\n#ifndef _UNICODE\n\t\t\t// check if we are waiting for 2 consecutive WM_CHAR messages\n\t\t\tif ( IsAccumulateDBCMode() )\n\t\t\t{\n\t\t\t\tif ( (GetKeyState(VK_KANA) & 0x1) )\n\t\t\t\t{\n\t\t\t\t\t// turn off accumulate mode\n\t\t\t\t\tSetAccumulateDBCMode ( false );\n\t\t\t\t\tm_chLeadByte = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ( !m_chLeadByte )\n\t\t\t\t\t{\n\t\t\t\t\t\t// This is the first WM_CHAR message, \n\t\t\t\t\t\t// accumulate it if this is a LeadByte.  Otherwise, fall thru to\n\t\t\t\t\t\t// regular WM_CHAR processing.\n\t\t\t\t\t\tif ( IsDBCSLeadByte ( (BYTE)(WORD)wParam ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// save the Lead Byte and don't process this message\n\t\t\t\t\t\t\tm_chLeadByte = (WORD)wParam << 8 ;\n\n\t\t\t\t\t\t\t//TCHAR a = (WORD)wParam << 8 ;\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// This is the second WM_CHAR message,\n\t\t\t\t\t\t// combine the current byte with previous byte.\n\t\t\t\t\t\t// This DBC will be handled as WM_IME_CHAR.\n\t\t\t\t\t\twParam |= m_chLeadByte;\n\t\t\t\t\t\tuMsg = WM_IME_CHAR;\n\n\t\t\t\t\t\t// setup to accumulate more WM_CHAR\n\t\t\t\t\t\tm_chLeadByte = 0; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n#endif\n\t\t}\n\n\t\tLRESULT lResult = 0;\n\t\tHRESULT Hr = TxSendMessage(uMsg, wParam, lParam, &lResult);\n\t\tif (Hr == S_OK){\n\t\t\tbHandled = bWasHandled;\n\t\t}\n\t\telse if ((uMsg >= WM_KEYFIRST && uMsg <= WM_KEYLAST) || uMsg == WM_CHAR || uMsg == WM_IME_CHAR){\n\t\t\tbHandled = bWasHandled;\n\t\t\t//atl+... 按键消息传给父控件\n\t\t\tif (uMsg == WM_SYSKEYDOWN)//posted to the window with the keyboard focus when the user presses the F10 key (which activates the menu bar) or holds down the ALT key and then presses another key\n\t\t\t{\n\t\t\t\tbHandled = false;\n\t\t\t}\n\t\t}\n\t\telse if (uMsg >= WM_MOUSEFIRST && uMsg <= WM_MOUSELAST) {\n\t\t\tif (m_pTwh->IsCaptured( )) bHandled = bWasHandled;\n\t\t}\n\n\t\treturn lResult;\n\t}\n\n\tvoid CRichEditUI::SetAccumulateDBCMode(bool bDBCMode)\n\t{\n\t\tm_fAccumulateDBC = bDBCMode;\n\t}\n\n\tbool CRichEditUI::IsAccumulateDBCMode( )\n\t{\n\t\treturn m_fAccumulateDBC;\n\t}\n\n\tLPOLEINPLACEACTIVEOBJECT COleInPlaceFrame::g_pActiveObject = NULL;\n\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Control/UIRichEdit.h",
    "content": "#ifndef __UIRICHEDIT_H__\n#define __UIRICHEDIT_H__\n\n#pragma once\n#include <Imm.h>\n#include <richole.h>\n\n#pragma comment(lib,\"imm32.lib\")\n\n#define IDM_VERBMIN                     40200\n#define IDM_VERBMAX                     40300\n#define ID_EDIT_CONVERT                 40013\n#define CRICHEDITUI_ID_EDIT_CUT                     40006\n#define CRICHEDITUI_ID_EDIT_COPY                    40007\n#define CRICHEDITUI_ID_EDIT_PASTE                   40008\n\nnamespace DuiLib\n{\n\n\tclass CTxtWinHost;\n\tclass CRichEditOleCallback;\n\tclass COleInPlaceFrame;\n\n\n\tclass UILIB_API CRichEditUI : public CContainerUI, public IMessageFilterUI\n\t{\n\tpublic:\n\t\tCRichEditUI( );\n\t\t~CRichEditUI( );\n\n\t\tLPCTSTR GetClass( ) const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\t\tUINT GetControlFlags( ) const;\n\n\t\tbool IsWantTab( );\n\t\tvoid SetWantTab(bool bWantTab = true);\n\t\tbool IsWantReturn( );\n\t\tvoid SetWantReturn(bool bWantReturn = true);\n\t\tbool IsWantCtrlReturn( );\n\t\tvoid SetWantCtrlReturn(bool bWantCtrlReturn = true);\n\t\tbool IsRich( );\n\t\tvoid SetRich(bool bRich = true);\n\t\tbool IsReadOnly( );\n\t\tvoid SetReadOnly(bool bReadOnly = true);\n\t\tbool GetWordWrap( );\n\t\tvoid SetWordWrap(bool bWordWrap = true);\n\t\tint GetFont( );\n\t\tvoid SetFont(int index);\n\t\tvoid SetFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic);\n\t\tLONG GetWinStyle( );\n\t\tvoid SetWinStyle(LONG lStyle);\n\t\tDWORD GetTextColor( );\n\t\tvoid SetTextColor(DWORD dwTextColor);\n\t\tint GetLimitText( );\n\t\tvoid SetLimitText(int iChars);\n\t\tlong GetTextLength(DWORD dwFlags = GTL_DEFAULT) const;\n\t\tCDuiString GetText( ) const;\n\t\tvoid SetText(LPCTSTR pstrText);\n\t\tbool GetModify( ) const;\n\t\tvoid SetModify(bool bModified = true) const;\n\t\tvoid GetSel(CHARRANGE &cr) const;\n\t\tvoid GetSel(long& nStartChar, long& nEndChar) const;\n\t\tint SetSel(CHARRANGE &cr);\n\t\tint SetSel(long nStartChar, long nEndChar);\n\t\tvoid ReplaceSel(LPCTSTR lpszNewText, bool bCanUndo);\n\t\tvoid ReplaceSelW(LPCWSTR lpszNewText, bool bCanUndo = false);\n\t\tCDuiString GetSelText( ) const;\n\t\tint SetSelAll( );\n\t\tint SetSelNone( );\n\t\tWORD GetSelectionType( ) const;\n\t\tbool GetZoom(int& nNum, int& nDen) const;\n\t\tbool SetZoom(int nNum, int nDen);\n\t\tbool SetZoomOff( );\n\t\tbool GetAutoURLDetect( ) const;\n\t\tbool SetAutoURLDetect(bool bAutoDetect = true);\n\t\tDWORD GetEventMask( ) const;\n\t\tDWORD SetEventMask(DWORD dwEventMask);\n\t\tCDuiString GetTextRange(long nStartChar, long nEndChar) const;\n\t\tvoid HideSelection(bool bHide = true, bool bChangeStyle = false);\n\t\tvoid ScrollCaret( );\n\t\tint InsertText(long nInsertAfterChar, LPCTSTR lpstrText, bool bCanUndo = false);\n\t\tint AppendText(LPCTSTR lpstrText, bool bCanUndo = false);\n\t\tDWORD GetDefaultCharFormat(CHARFORMAT2 &cf) const;\n\t\tbool SetDefaultCharFormat(CHARFORMAT2 &cf);\n\t\tDWORD GetSelectionCharFormat(CHARFORMAT2 &cf) const;\n\t\tbool SetSelectionCharFormat(CHARFORMAT2 &cf);\n\t\tbool SetWordCharFormat(CHARFORMAT2 &cf);\n\t\tDWORD GetParaFormat(PARAFORMAT2 &pf) const;\n\t\tbool SetParaFormat(PARAFORMAT2 &pf);\n\t\tbool Redo( );\n\t\tbool Undo( );\n\t\tvoid Clear( );\n\t\tvoid Copy( );\n\t\tvoid Cut( );\n\t\tvoid Paste( );\n\t\tint GetLineCount( ) const;\n\t\tCDuiString GetLine(int nIndex, int nMaxLength) const;\n\t\tint LineIndex(int nLine = -1) const;\n\t\tint LineLength(int nLine = -1) const;\n\t\tbool LineScroll(int nLines, int nChars = 0);\n\t\tCPoint GetCharPos(long lChar) const;\n\t\tlong LineFromChar(long nIndex) const;\n\t\tCPoint PosFromChar(UINT nChar) const;\n\t\tint CharFromPos(CPoint pt) const;\n\t\tvoid EmptyUndoBuffer( );\n\t\tUINT SetUndoLimit(UINT nLimit);\n\t\tlong StreamIn(int nFormat, EDITSTREAM &es);\n\t\tlong StreamOut(int nFormat, EDITSTREAM &es);\n\t\tvoid SetAccumulateDBCMode(bool bDBCMode);\n\t\tbool IsAccumulateDBCMode( );\n\n\t\tbool SetOLECallback(IRichEditOleCallback *pCallback);\n\t\tIRichEditOleCallback *GetOLECallback( );\n\t\tLPRICHEDITOLE GetRichEditOle( );\n\n\n\t\tvoid DoInit( );\n\t\t// ע⣺TxSendMessageSendMessageģTxSendMessageûmultibyteunicodeԶתĹܣ\n\t\t// richedit2.0ڲunicodeʵֵģmultibyteУԼunicodemultibyteת\n\t\tbool SetDropAcceptFile(bool bAccept);\n\t\tvirtual HRESULT TxSendMessage(UINT msg, WPARAM wparam, LPARAM lparam, LRESULT *plresult) const;\n\t\tIDropTarget* GetTxDropTarget( );\n\t\tvirtual bool OnTxViewChanged( );\n\t\tvirtual void OnTxNotify(DWORD iNotify, void *pv);\n\n\t\tvoid SetScrollPos(SIZE szPos);\n\t\tvoid LineUp( );\n\t\tvoid LineDown( );\n\t\tvoid PageUp( );\n\t\tvoid PageDown( );\n\t\tvoid HomeUp( );\n\t\tvoid EndDown( );\n\t\tvoid LineLeft( );\n\t\tvoid LineRight( );\n\t\tvoid PageLeft( );\n\t\tvoid PageRight( );\n\t\tvoid HomeLeft( );\n\t\tvoid EndRight( );\n\n\t\tSIZE EstimateSize(SIZE szAvailable);\n\t\tvoid SetPos(RECT rc);\n\t\tvoid DoEvent(TEventUI& event);\n\t\tvoid DoPaint(HDC hDC, const RECT& rcPaint);\n\n\t\tRECT GetTextPadding() const;\n\t\tvoid SetTextPadding(RECT rc);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tLRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);\n\n\tprotected:\n\t\tCTxtWinHost* m_pTwh;\n\t\tbool m_bVScrollBarFixing;\n\t\tbool m_bWantTab;\n\t\tbool m_bWantReturn;\n\t\tbool m_bWantCtrlReturn;\n\t\tbool m_bRich;\n\t\tbool m_bReadOnly;\n\t\tbool m_bWordWrap;\n\t\tDWORD m_dwTextColor;\n\t\tint m_iFont;\n\t\tint m_iLimitText;\n\t\tLONG m_lTwhStyle;\n\t\tbool m_bInited;\n\t\tbool  m_fAccumulateDBC; // TRUE - need to cumulate ytes from 2 WM_CHAR msgs\n\t\t// we are in this mode when we receive VK_PROCESSKEY\n\t\tUINT m_chLeadByte; // use when we are in _fAccumulateDBC mode\n\n\t\tRECT m_rcTextPadding;\n\t\t\n\t\tLPRICHEDITOLE m_pRichEditOle;\n\t\tIRichEditOleCallback *m_pCallback;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UIRICHEDIT_H__\n"
  },
  {
    "path": "DuiLib/Control/UIScrollBar.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIScrollBar.h\"\n\nnamespace DuiLib\n{\n\tCScrollBarUI::CScrollBarUI() : m_bHorizontal(false), m_nRange(100), m_nScrollPos(0), m_nLineSize(8), \n\t\tm_pOwner(NULL), m_nLastScrollPos(0), m_nLastScrollOffset(0), m_nScrollRepeatDelay(0), m_uButton1State(0), \\\n\t\tm_uButton2State(0), m_uThumbState(0), m_bShowButton1(true), m_bShowButton2(true)\n\t{\n\t\t\n\t\tm_nScrollBarSize = DEFAULT_SCROLLBAR_SIZE;\n\t\tm_cxyFixed.cx = m_nScrollBarSize;\n\t\tptLastMouse.x = ptLastMouse.y = 0;\n\t\t::ZeroMemory(&m_rcThumb, sizeof(m_rcThumb));\n\t\t::ZeroMemory(&m_rcButton1, sizeof(m_rcButton1));\n\t\t::ZeroMemory(&m_rcButton2, sizeof(m_rcButton2));\n\t}\n\n\tLPCTSTR CScrollBarUI::GetClass() const\n\t{\n\t\treturn _T(\"ScrollBarUI\");\n\t}\n\n\tLPVOID CScrollBarUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_SCROLLBAR) == 0 ) return static_cast<CScrollBarUI*>(this);\n\t\treturn CControlUI::GetInterface(pstrName);\n\t}\n\n\tCContainerUI* CScrollBarUI::GetOwner() const\n\t{\n\t\treturn m_pOwner;\n\t}\n\n\tvoid CScrollBarUI::SetOwner(CContainerUI* pOwner)\n\t{\n\t\tm_pOwner = pOwner;\n\t}\n\n\tvoid CScrollBarUI::SetVisible(bool bVisible)\n\t{\n\t\tif( m_bVisible == bVisible ) return;\n\n\t\tbool v = IsVisible();\n\t\tm_bVisible = bVisible;\n\t\tif( m_bFocused ) m_bFocused = false;\n\t}\n\n\tvoid CScrollBarUI::SetEnabled(bool bEnable)\n\t{\n\t\tCControlUI::SetEnabled(bEnable);\n\t\tif( !IsEnabled() ) {\n\t\t\tm_uButton1State = 0;\n\t\t\tm_uButton2State = 0;\n\t\t\tm_uThumbState = 0;\n\t\t}\n\t}\n\n\tvoid CScrollBarUI::SetFocus()\n\t{\n\t\tif( m_pOwner != NULL ) m_pOwner->SetFocus();\n\t\telse CControlUI::SetFocus();\n\t}\n\n\tbool CScrollBarUI::IsHorizontal()\n\t{\n\t\treturn m_bHorizontal;\n\t}\n\n\tvoid CScrollBarUI::SetHorizontal(bool bHorizontal)\n\t{\n\t\tif( m_bHorizontal == bHorizontal ) return;\n\n\t\tm_bHorizontal = bHorizontal;\n\t\tif( m_bHorizontal ) {\n\t\t\tif( m_cxyFixed.cy == 0 ) {\n\t\t\t\tm_cxyFixed.cx = 0;\n\t\t\t\tm_cxyFixed.cy = m_nScrollBarSize;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif( m_cxyFixed.cx == 0 ) {\n\t\t\t\tm_cxyFixed.cx = m_nScrollBarSize;\n\t\t\t\tm_cxyFixed.cy = 0;\n\t\t\t}\n\t\t}\n\n\t\tif( m_pOwner != NULL ) m_pOwner->NeedUpdate(); else NeedParentUpdate();\n\t}\n\n\tint CScrollBarUI::GetScrollRange() const\n\t{\n\t\treturn m_nRange;\n\t}\n\n\tvoid CScrollBarUI::SetScrollRange(int nRange)\n\t{\n\t\tif( m_nRange == nRange ) return;\n\n\t\tm_nRange = nRange;\n\t\tif( m_nRange < 0 ) m_nRange = 0;\n\t\tif( m_nScrollPos > m_nRange ) m_nScrollPos = m_nRange;\n\t\tSetPos(m_rcItem);\n\t}\n\n\tint CScrollBarUI::GetScrollPos() const\n\t{\n\t\treturn m_nScrollPos;\n\t}\n\n\tvoid CScrollBarUI::SetScrollPos(int nPos)\n\t{\n\t\tif( m_nScrollPos == nPos ) return;\n\n\t\tm_nScrollPos = nPos;\n\t\tif( m_nScrollPos < 0 ) m_nScrollPos = 0;\n\t\tif( m_nScrollPos > m_nRange ) m_nScrollPos = m_nRange;\n\t\tSetPos(m_rcItem);\n\t}\n\n\tint CScrollBarUI::GetLineSize() const\n\t{\n\t\treturn m_nLineSize;\n\t}\n\n\tvoid CScrollBarUI::SetLineSize(int nSize)\n\t{\n\t\tm_nLineSize = nSize;\n\t}\n\n\tvoid CScrollBarUI::SetScrollBarSize(int nScrollBarSize)\n\t{\n\t\tif (nScrollBarSize == m_nScrollBarSize)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tm_nScrollBarSize = nScrollBarSize;\n\n\t\tif (m_bHorizontal) {\n\t\t\tm_cxyFixed.cx = 0;\n\t\t\tm_cxyFixed.cy = m_nScrollBarSize;\n\t\t}\n\t\telse {\n\t\t\tm_cxyFixed.cx = m_nScrollBarSize;\n\t\t\tm_cxyFixed.cy = 0;\n\t\t}\n\n\t\tif (m_pOwner != NULL) m_pOwner->NeedUpdate( ); else NeedParentUpdate( );\n\t\t\n\t}\n\tint CScrollBarUI::GetScrollBarSize( ) const\n\t{\n\t\treturn m_nScrollBarSize;\n\t}\n\n\tbool CScrollBarUI::GetShowButton1()\n\t{\n\t\treturn m_bShowButton1;\n\t}\n\n\tvoid CScrollBarUI::SetShowButton1(bool bShow)\n\t{\n\t\tm_bShowButton1 = bShow;\n\t\tSetPos(m_rcItem);\n\t}\n\n\tLPCTSTR CScrollBarUI::GetButton1NormalImage()\n\t{\n\t\treturn m_sButton1NormalImage;\n\t}\n\n\tvoid CScrollBarUI::SetButton1NormalImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sButton1NormalImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetButton1HotImage()\n\t{\n\t\treturn m_sButton1HotImage;\n\t}\n\n\tvoid CScrollBarUI::SetButton1HotImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sButton1HotImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetButton1PushedImage()\n\t{\n\t\treturn m_sButton1PushedImage;\n\t}\n\n\tvoid CScrollBarUI::SetButton1PushedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sButton1PushedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetButton1DisabledImage()\n\t{\n\t\treturn m_sButton1DisabledImage;\n\t}\n\n\tvoid CScrollBarUI::SetButton1DisabledImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sButton1DisabledImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tbool CScrollBarUI::GetShowButton2()\n\t{\n\t\treturn m_bShowButton2;\n\t}\n\n\tvoid CScrollBarUI::SetShowButton2(bool bShow)\n\t{\n\t\tm_bShowButton2 = bShow;\n\t\tSetPos(m_rcItem);\n\t}\n\n\tLPCTSTR CScrollBarUI::GetButton2NormalImage()\n\t{\n\t\treturn m_sButton2NormalImage;\n\t}\n\n\tvoid CScrollBarUI::SetButton2NormalImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sButton2NormalImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetButton2HotImage()\n\t{\n\t\treturn m_sButton2HotImage;\n\t}\n\n\tvoid CScrollBarUI::SetButton2HotImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sButton2HotImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetButton2PushedImage()\n\t{\n\t\treturn m_sButton2PushedImage;\n\t}\n\n\tvoid CScrollBarUI::SetButton2PushedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sButton2PushedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetButton2DisabledImage()\n\t{\n\t\treturn m_sButton2DisabledImage;\n\t}\n\n\tvoid CScrollBarUI::SetButton2DisabledImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sButton2DisabledImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetThumbNormalImage()\n\t{\n\t\treturn m_sThumbNormalImage;\n\t}\n\n\tvoid CScrollBarUI::SetThumbNormalImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sThumbNormalImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetThumbHotImage()\n\t{\n\t\treturn m_sThumbHotImage;\n\t}\n\n\tvoid CScrollBarUI::SetThumbHotImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sThumbHotImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetThumbPushedImage()\n\t{\n\t\treturn m_sThumbPushedImage;\n\t}\n\n\tvoid CScrollBarUI::SetThumbPushedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sThumbPushedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetThumbDisabledImage()\n\t{\n\t\treturn m_sThumbDisabledImage;\n\t}\n\n\tvoid CScrollBarUI::SetThumbDisabledImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sThumbDisabledImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetRailNormalImage()\n\t{\n\t\treturn m_sRailNormalImage;\n\t}\n\n\tvoid CScrollBarUI::SetRailNormalImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sRailNormalImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetRailHotImage()\n\t{\n\t\treturn m_sRailHotImage;\n\t}\n\n\tvoid CScrollBarUI::SetRailHotImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sRailHotImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetRailPushedImage()\n\t{\n\t\treturn m_sRailPushedImage;\n\t}\n\n\tvoid CScrollBarUI::SetRailPushedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sRailPushedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetRailDisabledImage()\n\t{\n\t\treturn m_sRailDisabledImage;\n\t}\n\n\tvoid CScrollBarUI::SetRailDisabledImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sRailDisabledImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetBkNormalImage()\n\t{\n\t\treturn m_sBkNormalImage;\n\t}\n\n\tvoid CScrollBarUI::SetBkNormalImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sBkNormalImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetBkHotImage()\n\t{\n\t\treturn m_sBkHotImage;\n\t}\n\n\tvoid CScrollBarUI::SetBkHotImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sBkHotImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetBkPushedImage()\n\t{\n\t\treturn m_sBkPushedImage;\n\t}\n\n\tvoid CScrollBarUI::SetBkPushedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sBkPushedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CScrollBarUI::GetBkDisabledImage()\n\t{\n\t\treturn m_sBkDisabledImage;\n\t}\n\n\tvoid CScrollBarUI::SetBkDisabledImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sBkDisabledImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tvoid CScrollBarUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\t\trc = m_rcItem;\n\n\t\tif( m_bHorizontal ) {\n\t\t\tint cx = rc.right - rc.left;\n\t\t\tif( m_bShowButton1 ) cx -= m_cxyFixed.cy;\n\t\t\tif( m_bShowButton2 ) cx -= m_cxyFixed.cy;\n\t\t\tif( cx > m_cxyFixed.cy ) {\n\t\t\t\tm_rcButton1.left = rc.left;\n\t\t\t\tm_rcButton1.top = rc.top;\n\t\t\t\tif( m_bShowButton1 ) {\n\t\t\t\t\tm_rcButton1.right = rc.left + m_cxyFixed.cy;\n\t\t\t\t\tm_rcButton1.bottom = rc.top + m_cxyFixed.cy;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tm_rcButton1.right = m_rcButton1.left;\n\t\t\t\t\tm_rcButton1.bottom = m_rcButton1.top;\n\t\t\t\t}\n\n\t\t\t\tm_rcButton2.top = rc.top;\n\t\t\t\tm_rcButton2.right = rc.right;\n\t\t\t\tif( m_bShowButton2 ) {\n\t\t\t\t\tm_rcButton2.left = rc.right - m_cxyFixed.cy;\n\t\t\t\t\tm_rcButton2.bottom = rc.top + m_cxyFixed.cy;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tm_rcButton2.left = m_rcButton2.right;\n\t\t\t\t\tm_rcButton2.bottom = m_rcButton2.top;\n\t\t\t\t}\n\n\t\t\t\tm_rcThumb.top = rc.top;\n\t\t\t\tm_rcThumb.bottom = rc.top + m_cxyFixed.cy;\n\t\t\t\tif( m_nRange > 0 ) {\n\t\t\t\t\tint cxThumb = cx * (rc.right - rc.left) / (m_nRange + rc.right - rc.left);\n\t\t\t\t\tif( cxThumb < m_cxyFixed.cy ) cxThumb = m_cxyFixed.cy;\n\n\t\t\t\t\tm_rcThumb.left = m_nScrollPos * (cx - cxThumb) / m_nRange + m_rcButton1.right;\n\t\t\t\t\tm_rcThumb.right = m_rcThumb.left + cxThumb;\n\t\t\t\t\tif( m_rcThumb.right > m_rcButton2.left ) {\n\t\t\t\t\t\tm_rcThumb.left = m_rcButton2.left - cxThumb;\n\t\t\t\t\t\tm_rcThumb.right = m_rcButton2.left;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tm_rcThumb.left = m_rcButton1.right;\n\t\t\t\t\tm_rcThumb.right = m_rcButton2.left;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint cxButton = (rc.right - rc.left) / 2;\n\t\t\t\tif( cxButton > m_cxyFixed.cy ) cxButton = m_cxyFixed.cy;\n\t\t\t\tm_rcButton1.left = rc.left;\n\t\t\t\tm_rcButton1.top = rc.top;\n\t\t\t\tif( m_bShowButton1 ) {\n\t\t\t\t\tm_rcButton1.right = rc.left + cxButton;\n\t\t\t\t\tm_rcButton1.bottom = rc.top + m_cxyFixed.cy;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tm_rcButton1.right = m_rcButton1.left;\n\t\t\t\t\tm_rcButton1.bottom = m_rcButton1.top;\n\t\t\t\t}\n\n\t\t\t\tm_rcButton2.top = rc.top;\n\t\t\t\tm_rcButton2.right = rc.right;\n\t\t\t\tif( m_bShowButton2 ) {\n\t\t\t\t\tm_rcButton2.left = rc.right - cxButton;\n\t\t\t\t\tm_rcButton2.bottom = rc.top + m_cxyFixed.cy;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tm_rcButton2.left = m_rcButton2.right;\n\t\t\t\t\tm_rcButton2.bottom = m_rcButton2.top;\n\t\t\t\t}\n\n\t\t\t\t::ZeroMemory(&m_rcThumb, sizeof(m_rcThumb));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tint cy = rc.bottom - rc.top;\n\t\t\tif( m_bShowButton1 ) cy -= m_cxyFixed.cx;\n\t\t\tif( m_bShowButton2 ) cy -= m_cxyFixed.cx;\n\t\t\tif( cy > m_cxyFixed.cx ) {\n\t\t\t\tm_rcButton1.left = rc.left;\n\t\t\t\tm_rcButton1.top = rc.top;\n\t\t\t\tif( m_bShowButton1 ) {\n\t\t\t\t\tm_rcButton1.right = rc.left + m_cxyFixed.cx;\n\t\t\t\t\tm_rcButton1.bottom = rc.top + m_cxyFixed.cx;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tm_rcButton1.right = m_rcButton1.left;\n\t\t\t\t\tm_rcButton1.bottom = m_rcButton1.top;\n\t\t\t\t}\n\n\t\t\t\tm_rcButton2.left = rc.left;\n\t\t\t\tm_rcButton2.bottom = rc.bottom;\n\t\t\t\tif( m_bShowButton2 ) {\n\t\t\t\t\tm_rcButton2.top = rc.bottom - m_cxyFixed.cx;\n\t\t\t\t\tm_rcButton2.right = rc.left + m_cxyFixed.cx;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tm_rcButton2.top = m_rcButton2.bottom;\n\t\t\t\t\tm_rcButton2.right = m_rcButton2.left;\n\t\t\t\t}\n\n\t\t\t\tm_rcThumb.left = rc.left;\n\t\t\t\tm_rcThumb.right = rc.left + m_cxyFixed.cx;\n\t\t\t\tif( m_nRange > 0 ) {\n\t\t\t\t\tint cyThumb = cy * (rc.bottom - rc.top) / (m_nRange + rc.bottom - rc.top);\n\t\t\t\t\tif( cyThumb < m_cxyFixed.cx ) cyThumb = m_cxyFixed.cx;\n\n\t\t\t\t\tm_rcThumb.top = m_nScrollPos * (cy - cyThumb) / m_nRange + m_rcButton1.bottom;\n\t\t\t\t\tm_rcThumb.bottom = m_rcThumb.top + cyThumb;\n\t\t\t\t\tif( m_rcThumb.bottom > m_rcButton2.top ) {\n\t\t\t\t\t\tm_rcThumb.top = m_rcButton2.top - cyThumb;\n\t\t\t\t\t\tm_rcThumb.bottom = m_rcButton2.top;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tm_rcThumb.top = m_rcButton1.bottom;\n\t\t\t\t\tm_rcThumb.bottom = m_rcButton2.top;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint cyButton = (rc.bottom - rc.top) / 2;\n\t\t\t\tif( cyButton > m_cxyFixed.cx ) cyButton = m_cxyFixed.cx;\n\t\t\t\tm_rcButton1.left = rc.left;\n\t\t\t\tm_rcButton1.top = rc.top;\n\t\t\t\tif( m_bShowButton1 ) {\n\t\t\t\t\tm_rcButton1.right = rc.left + m_cxyFixed.cx;\n\t\t\t\t\tm_rcButton1.bottom = rc.top + cyButton;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tm_rcButton1.right = m_rcButton1.left;\n\t\t\t\t\tm_rcButton1.bottom = m_rcButton1.top;\n\t\t\t\t}\n\n\t\t\t\tm_rcButton2.left = rc.left;\n\t\t\t\tm_rcButton2.bottom = rc.bottom;\n\t\t\t\tif( m_bShowButton2 ) {\n\t\t\t\t\tm_rcButton2.top = rc.bottom - cyButton;\n\t\t\t\t\tm_rcButton2.right = rc.left + m_cxyFixed.cx;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tm_rcButton2.top = m_rcButton2.bottom;\n\t\t\t\t\tm_rcButton2.right = m_rcButton2.left;\n\t\t\t\t}\n\n\t\t\t\t::ZeroMemory(&m_rcThumb, sizeof(m_rcThumb));\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CScrollBarUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pOwner != NULL ) m_pOwner->DoEvent(event);\n\t\t\telse CControlUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_SETFOCUS ) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_KILLFOCUS ) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK )\n\t\t{\n\t\t\tif( !IsEnabled() ) return;\n\n\t\t\tm_nLastScrollOffset = 0;\n\t\t\tm_nScrollRepeatDelay = 0;\n\t\t\tm_pManager->SetTimer(this, DEFAULT_TIMERID, 50U);\n\n\t\t\tif( ::PtInRect(&m_rcButton1, event.ptMouse) ) {\n\t\t\t\tm_uButton1State |= UISTATE_PUSHED;\n\t\t\t\tif( !m_bHorizontal ) {\n\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->LineUp(); \n\t\t\t\t\telse SetScrollPos(m_nScrollPos - m_nLineSize);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->LineLeft(); \n\t\t\t\t\telse SetScrollPos(m_nScrollPos - m_nLineSize);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if( ::PtInRect(&m_rcButton2, event.ptMouse) ) {\n\t\t\t\tm_uButton2State |= UISTATE_PUSHED;\n\t\t\t\tif( !m_bHorizontal ) {\n\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->LineDown(); \n\t\t\t\t\telse SetScrollPos(m_nScrollPos + m_nLineSize);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->LineRight(); \n\t\t\t\t\telse SetScrollPos(m_nScrollPos + m_nLineSize);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if( ::PtInRect(&m_rcThumb, event.ptMouse) ) {\n\t\t\t\tm_uThumbState |= UISTATE_CAPTURED | UISTATE_PUSHED;\n\t\t\t\tptLastMouse = event.ptMouse;\n\t\t\t\tm_nLastScrollPos = m_nScrollPos;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( !m_bHorizontal ) {\n\t\t\t\t\tif( event.ptMouse.y < m_rcThumb.top ) {\n\t\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->PageUp(); \n\t\t\t\t\t\telse SetScrollPos(m_nScrollPos + m_rcItem.top - m_rcItem.bottom);\n\t\t\t\t\t}\n\t\t\t\t\telse if ( event.ptMouse.y > m_rcThumb.bottom ){\n\t\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->PageDown(); \n\t\t\t\t\t\telse SetScrollPos(m_nScrollPos - m_rcItem.top + m_rcItem.bottom);                    \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif( event.ptMouse.x < m_rcThumb.left ) {\n\t\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->PageLeft(); \n\t\t\t\t\t\telse SetScrollPos(m_nScrollPos + m_rcItem.left - m_rcItem.right);\n\t\t\t\t\t}\n\t\t\t\t\telse if ( event.ptMouse.x > m_rcThumb.right ){\n\t\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->PageRight(); \n\t\t\t\t\t\telse SetScrollPos(m_nScrollPos - m_rcItem.left + m_rcItem.right);                    \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( m_pManager != NULL && m_pOwner == NULL ) m_pManager->SendNotify(this, DUI_MSGTYPE_SCROLL);\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONUP )\n\t\t{\n\t\t\tm_nScrollRepeatDelay = 0;\n\t\t\tm_nLastScrollOffset = 0;\n\t\t\tm_pManager->KillTimer(this, DEFAULT_TIMERID);\n\n\t\t\tif( (m_uThumbState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\tm_uThumbState &= ~( UISTATE_CAPTURED | UISTATE_PUSHED );\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\telse if( (m_uButton1State & UISTATE_PUSHED) != 0 ) {\n\t\t\t\tm_uButton1State &= ~UISTATE_PUSHED;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\telse if( (m_uButton2State & UISTATE_PUSHED) != 0 ) {\n\t\t\t\tm_uButton2State &= ~UISTATE_PUSHED;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEMOVE )\n\t\t{\n\t\t\tif( (m_uThumbState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\tif( !m_bHorizontal ) {\n\n\t\t\t\t\tint vRange = m_rcItem.bottom - m_rcItem.top - m_rcThumb.bottom + m_rcThumb.top - 2 * m_cxyFixed.cx;\n\n\t\t\t\t\tif (vRange != 0)\n\t\t\t\t\t\tm_nLastScrollOffset = (event.ptMouse.y - ptLastMouse.y) * m_nRange / vRange;\n\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\tint hRange = m_rcItem.right - m_rcItem.left - m_rcThumb.right + m_rcThumb.left - 2 * m_cxyFixed.cy;\n\n\t\t\t\t\tif (hRange != 0)\n\t\t\t\t\t\tm_nLastScrollOffset = (event.ptMouse.x - ptLastMouse.x) * m_nRange / hRange;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( (m_uThumbState & UISTATE_HOT) != 0 ) {\n\t\t\t\t\tif( !::PtInRect(&m_rcThumb, event.ptMouse) ) {\n\t\t\t\t\t\tm_uThumbState &= ~UISTATE_HOT;\n\t\t\t\t\t\tInvalidate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif( !IsEnabled() ) return;\n\t\t\t\t\tif( ::PtInRect(&m_rcThumb, event.ptMouse) ) {\n\t\t\t\t\t\tm_uThumbState |= UISTATE_HOT;\n\t\t\t\t\t\tInvalidate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_CONTEXTMENU )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_TIMER && event.wParam == DEFAULT_TIMERID )\n\t\t{\n\t\t\t++m_nScrollRepeatDelay;\n\t\t\tif( (m_uThumbState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\tif( !m_bHorizontal ) {\n\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->SetScrollPos(CSize(m_pOwner->GetScrollPos().cx, \\\n\t\t\t\t\t\tm_nLastScrollPos + m_nLastScrollOffset)); \n\t\t\t\t\telse SetScrollPos(m_nLastScrollPos + m_nLastScrollOffset);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->SetScrollPos(CSize(m_nLastScrollPos + m_nLastScrollOffset, \\\n\t\t\t\t\t\tm_pOwner->GetScrollPos().cy)); \n\t\t\t\t\telse SetScrollPos(m_nLastScrollPos + m_nLastScrollOffset);\n\t\t\t\t}\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\telse if( (m_uButton1State & UISTATE_PUSHED) != 0 ) {\n\t\t\t\tif( m_nScrollRepeatDelay <= 5 ) return;\n\t\t\t\tif( !m_bHorizontal ) {\n\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->LineUp(); \n\t\t\t\t\telse SetScrollPos(m_nScrollPos - m_nLineSize);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->LineLeft(); \n\t\t\t\t\telse SetScrollPos(m_nScrollPos - m_nLineSize);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if( (m_uButton2State & UISTATE_PUSHED) != 0 ) {\n\t\t\t\tif( m_nScrollRepeatDelay <= 5 ) return;\n\t\t\t\tif( !m_bHorizontal ) {\n\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->LineDown(); \n\t\t\t\t\telse SetScrollPos(m_nScrollPos + m_nLineSize);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->LineRight(); \n\t\t\t\t\telse SetScrollPos(m_nScrollPos + m_nLineSize);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( m_nScrollRepeatDelay <= 5 ) return;\n\t\t\t\tPOINT pt = { 0 };\n\t\t\t\t::GetCursorPos(&pt);\n\t\t\t\t::ScreenToClient(m_pManager->GetPaintWindow(), &pt);\n\t\t\t\tif( !m_bHorizontal ) {\n\t\t\t\t\tif( pt.y < m_rcThumb.top ) {\n\t\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->PageUp(); \n\t\t\t\t\t\telse SetScrollPos(m_nScrollPos + m_rcItem.top - m_rcItem.bottom);\n\t\t\t\t\t}\n\t\t\t\t\telse if ( pt.y > m_rcThumb.bottom ){\n\t\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->PageDown(); \n\t\t\t\t\t\telse SetScrollPos(m_nScrollPos - m_rcItem.top + m_rcItem.bottom);                    \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif( pt.x < m_rcThumb.left ) {\n\t\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->PageLeft(); \n\t\t\t\t\t\telse SetScrollPos(m_nScrollPos + m_rcItem.left - m_rcItem.right);\n\t\t\t\t\t}\n\t\t\t\t\telse if ( pt.x > m_rcThumb.right ){\n\t\t\t\t\t\tif( m_pOwner != NULL ) m_pOwner->PageRight(); \n\t\t\t\t\t\telse SetScrollPos(m_nScrollPos - m_rcItem.left + m_rcItem.right);                    \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( m_pManager != NULL && m_pOwner == NULL ) m_pManager->SendNotify(this, DUI_MSGTYPE_SCROLL);\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEENTER )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_uButton1State |= UISTATE_HOT;\n\t\t\t\tm_uButton2State |= UISTATE_HOT;\n\t\t\t\tif( ::PtInRect(&m_rcThumb, event.ptMouse) ) m_uThumbState |= UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSELEAVE )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_uButton1State &= ~UISTATE_HOT;\n\t\t\t\tm_uButton2State &= ~UISTATE_HOT;\n\t\t\t\tm_uThumbState &= ~UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif( m_pOwner != NULL ) m_pOwner->DoEvent(event); else CControlUI::DoEvent(event);\n\t}\n\n\tvoid CScrollBarUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"button1normalimage\")) == 0 ) SetButton1NormalImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"button1hotimage\")) == 0 ) SetButton1HotImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"button1pushedimage\")) == 0 ) SetButton1PushedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"button1disabledimage\")) == 0 ) SetButton1DisabledImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"button2normalimage\")) == 0 ) SetButton2NormalImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"button2hotimage\")) == 0 ) SetButton2HotImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"button2pushedimage\")) == 0 ) SetButton2PushedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"button2disabledimage\")) == 0 ) SetButton2DisabledImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"thumbnormalimage\")) == 0 ) SetThumbNormalImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"thumbhotimage\")) == 0 ) SetThumbHotImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"thumbpushedimage\")) == 0 ) SetThumbPushedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"thumbdisabledimage\")) == 0 ) SetThumbDisabledImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"railnormalimage\")) == 0 ) SetRailNormalImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"railhotimage\")) == 0 ) SetRailHotImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"railpushedimage\")) == 0 ) SetRailPushedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"raildisabledimage\")) == 0 ) SetRailDisabledImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"bknormalimage\")) == 0 ) SetBkNormalImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"bkhotimage\")) == 0 ) SetBkHotImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"bkpushedimage\")) == 0 ) SetBkPushedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"bkdisabledimage\")) == 0 ) SetBkDisabledImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"hor\")) == 0 ) SetHorizontal(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"linesize\")) == 0 ) SetLineSize(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"range\")) == 0 ) SetScrollRange(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"value\")) == 0 ) SetScrollPos(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"scrollbarsize\")) == 0) SetScrollBarSize(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"showbutton1\")) == 0 ) SetShowButton1(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"showbutton2\")) == 0 ) SetShowButton2(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse CControlUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CScrollBarUI::DoPaint(HDC hDC, const RECT& rcPaint)\n\n\t{\n\t\tif( !::IntersectRect(&m_rcPaint, &rcPaint, &m_rcItem) ) return;\n\t\tPaintBk(hDC);\n\t\tPaintButton1(hDC);\n\t\tPaintButton2(hDC);\n\t\tPaintThumb(hDC);\n\t\tPaintRail(hDC);\n\t}\n\n\tvoid CScrollBarUI::PaintBk(HDC hDC)\n\t{\n\t\tif( !IsEnabled() ) m_uThumbState |= UISTATE_DISABLED;\n\t\telse m_uThumbState &= ~ UISTATE_DISABLED;\n\n\t\tif( (m_uThumbState & UISTATE_DISABLED) != 0 ) {\n\t\t\tif( !m_sBkDisabledImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sBkDisabledImage) ) m_sBkDisabledImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uThumbState & UISTATE_PUSHED) != 0 ) {\n\t\t\tif( !m_sBkPushedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sBkPushedImage) ) m_sBkPushedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uThumbState & UISTATE_HOT) != 0 ) {\n\t\t\tif( !m_sBkHotImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sBkHotImage) ) m_sBkHotImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif( !m_sBkNormalImage.IsEmpty() ) {\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sBkNormalImage) ) m_sBkNormalImage.Empty();\n\t\t\telse return;\n\t\t}\n\t}\n\n\tvoid CScrollBarUI::PaintButton1(HDC hDC)\n\t{\n\t\tif( !m_bShowButton1 ) return;\n\n\t\tif( !IsEnabled() ) m_uButton1State |= UISTATE_DISABLED;\n\t\telse m_uButton1State &= ~ UISTATE_DISABLED;\n\n\t\tm_sImageModify.Empty();\n\t\tm_sImageModify.SmallFormat(_T(\"dest='%d,%d,%d,%d'\"), m_rcButton1.left - m_rcItem.left, \\\n\t\t\tm_rcButton1.top - m_rcItem.top, m_rcButton1.right - m_rcItem.left, m_rcButton1.bottom - m_rcItem.top);\n\n\t\tif( (m_uButton1State & UISTATE_DISABLED) != 0 ) {\n\t\t\tif( !m_sButton1DisabledImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sButton1DisabledImage, (LPCTSTR)m_sImageModify) ) m_sButton1DisabledImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButton1State & UISTATE_PUSHED) != 0 ) {\n\t\t\tif( !m_sButton1PushedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sButton1PushedImage, (LPCTSTR)m_sImageModify) ) m_sButton1PushedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButton1State & UISTATE_HOT) != 0 ) {\n\t\t\tif( !m_sButton1HotImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sButton1HotImage, (LPCTSTR)m_sImageModify) ) m_sButton1HotImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif( !m_sButton1NormalImage.IsEmpty() ) {\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sButton1NormalImage, (LPCTSTR)m_sImageModify) ) m_sButton1NormalImage.Empty();\n\t\t\telse return;\n\t\t}\n\n\t\tDWORD dwBorderColor = 0xFF85E4FF;\n\t\tint nBorderSize = 2;\n\t\tCRenderEngine::DrawRect(hDC, m_rcButton1, nBorderSize, dwBorderColor);\n\t}\n\n\tvoid CScrollBarUI::PaintButton2(HDC hDC)\n\t{\n\t\tif( !m_bShowButton2 ) return;\n\n\t\tif( !IsEnabled() ) m_uButton2State |= UISTATE_DISABLED;\n\t\telse m_uButton2State &= ~ UISTATE_DISABLED;\n\n\t\tm_sImageModify.Empty();\n\t\tm_sImageModify.SmallFormat(_T(\"dest='%d,%d,%d,%d'\"), m_rcButton2.left - m_rcItem.left, \\\n\t\t\tm_rcButton2.top - m_rcItem.top, m_rcButton2.right - m_rcItem.left, m_rcButton2.bottom - m_rcItem.top);\n\n\t\tif( (m_uButton2State & UISTATE_DISABLED) != 0 ) {\n\t\t\tif( !m_sButton2DisabledImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sButton2DisabledImage, (LPCTSTR)m_sImageModify) ) m_sButton2DisabledImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButton2State & UISTATE_PUSHED) != 0 ) {\n\t\t\tif( !m_sButton2PushedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sButton2PushedImage, (LPCTSTR)m_sImageModify) ) m_sButton2PushedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButton2State & UISTATE_HOT) != 0 ) {\n\t\t\tif( !m_sButton2HotImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sButton2HotImage, (LPCTSTR)m_sImageModify) ) m_sButton2HotImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif( !m_sButton2NormalImage.IsEmpty() ) {\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sButton2NormalImage, (LPCTSTR)m_sImageModify) ) m_sButton2NormalImage.Empty();\n\t\t\telse return;\n\t\t}\n\n\t\tDWORD dwBorderColor = 0xFF85E4FF;\n\t\tint nBorderSize = 2;\n\t\tCRenderEngine::DrawRect(hDC, m_rcButton2, nBorderSize, dwBorderColor);\n\t}\n\n\tvoid CScrollBarUI::PaintThumb(HDC hDC)\n\t{\n\t\tif( m_rcThumb.left == 0 && m_rcThumb.top == 0 && m_rcThumb.right == 0 && m_rcThumb.bottom == 0 ) return;\n\t\tif( !IsEnabled() ) m_uThumbState |= UISTATE_DISABLED;\n\t\telse m_uThumbState &= ~ UISTATE_DISABLED;\n\n\t\tm_sImageModify.Empty();\n\t\tm_sImageModify.SmallFormat(_T(\"dest='%d,%d,%d,%d'\"), m_rcThumb.left - m_rcItem.left, \\\n\t\t\tm_rcThumb.top - m_rcItem.top, m_rcThumb.right - m_rcItem.left, m_rcThumb.bottom - m_rcItem.top);\n\n\t\tif( (m_uThumbState & UISTATE_DISABLED) != 0 ) {\n\t\t\tif( !m_sThumbDisabledImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sThumbDisabledImage, (LPCTSTR)m_sImageModify) ) m_sThumbDisabledImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uThumbState & UISTATE_PUSHED) != 0 ) {\n\t\t\tif( !m_sThumbPushedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sThumbPushedImage, (LPCTSTR)m_sImageModify) ) m_sThumbPushedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uThumbState & UISTATE_HOT) != 0 ) {\n\t\t\tif( !m_sThumbHotImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sThumbHotImage, (LPCTSTR)m_sImageModify) ) m_sThumbHotImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif( !m_sThumbNormalImage.IsEmpty() ) {\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sThumbNormalImage, (LPCTSTR)m_sImageModify) ) m_sThumbNormalImage.Empty();\n\t\t\telse return;\n\t\t}\n\n\t\tDWORD dwBorderColor = 0xFF85E4FF;\n\t\tint nBorderSize = 2;\n\t\tCRenderEngine::DrawRect(hDC, m_rcThumb, nBorderSize, dwBorderColor);\n\t}\n\n\tvoid CScrollBarUI::PaintRail(HDC hDC)\n\t{\n\t\tif( m_rcThumb.left == 0 && m_rcThumb.top == 0 && m_rcThumb.right == 0 && m_rcThumb.bottom == 0 ) return;\n\t\tif( !IsEnabled() ) m_uThumbState |= UISTATE_DISABLED;\n\t\telse m_uThumbState &= ~ UISTATE_DISABLED;\n\n\t\tm_sImageModify.Empty();\n\t\tif( !m_bHorizontal ) {\n\t\t\tm_sImageModify.SmallFormat(_T(\"dest='%d,%d,%d,%d'\"), m_rcThumb.left - m_rcItem.left, \\\n\t\t\t\t(m_rcThumb.top + m_rcThumb.bottom) / 2 - m_rcItem.top - m_cxyFixed.cx / 2, \\\n\t\t\t\tm_rcThumb.right - m_rcItem.left, \\\n\t\t\t\t(m_rcThumb.top + m_rcThumb.bottom) / 2 - m_rcItem.top + m_cxyFixed.cx - m_cxyFixed.cx / 2);\n\t\t}\n\t\telse {\n\t\t\tm_sImageModify.SmallFormat(_T(\"dest='%d,%d,%d,%d'\"), \\\n\t\t\t\t(m_rcThumb.left + m_rcThumb.right) / 2 - m_rcItem.left - m_cxyFixed.cy / 2, \\\n\t\t\t\tm_rcThumb.top - m_rcItem.top, \\\n\t\t\t\t(m_rcThumb.left + m_rcThumb.right) / 2 - m_rcItem.left + m_cxyFixed.cy - m_cxyFixed.cy / 2, \\\n\t\t\t\tm_rcThumb.bottom - m_rcItem.top);\n\t\t}\n\n\t\tif( (m_uThumbState & UISTATE_DISABLED) != 0 ) {\n\t\t\tif( !m_sRailDisabledImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sRailDisabledImage, (LPCTSTR)m_sImageModify) ) m_sRailDisabledImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uThumbState & UISTATE_PUSHED) != 0 ) {\n\t\t\tif( !m_sRailPushedImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sRailPushedImage, (LPCTSTR)m_sImageModify) ) m_sRailPushedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uThumbState & UISTATE_HOT) != 0 ) {\n\t\t\tif( !m_sRailHotImage.IsEmpty() ) {\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sRailHotImage, (LPCTSTR)m_sImageModify) ) m_sRailHotImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif( !m_sRailNormalImage.IsEmpty() ) {\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sRailNormalImage, (LPCTSTR)m_sImageModify) ) m_sRailNormalImage.Empty();\n\t\t\telse return;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Control/UIScrollBar.h",
    "content": "#ifndef __UISCROLLBAR_H__\n#define __UISCROLLBAR_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass UILIB_API CScrollBarUI : public CControlUI\n\t{\n\tpublic:\n\t\tCScrollBarUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tCContainerUI* GetOwner() const;\n\t\tvoid SetOwner(CContainerUI* pOwner);\n\n\t\tvoid SetVisible(bool bVisible = true);\n\t\tvoid SetEnabled(bool bEnable = true);\n\t\tvoid SetFocus();\n\n\t\tbool IsHorizontal();\n\t\tvoid SetHorizontal(bool bHorizontal = true);\n\t\tint GetScrollRange() const;\n\t\tvoid SetScrollRange(int nRange);\n\t\tint GetScrollPos() const;\n\t\tvoid SetScrollPos(int nPos);\n\t\tint GetLineSize() const;\n\t\tvoid SetLineSize(int nSize);\n\t\tvoid SetScrollBarSize(int nScrollBarSize);\n\t\tint GetScrollBarSize( ) const;\n\n\t\tbool GetShowButton1();\n\t\tvoid SetShowButton1(bool bShow);\n\t\tLPCTSTR GetButton1NormalImage();\n\t\tvoid SetButton1NormalImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetButton1HotImage();\n\t\tvoid SetButton1HotImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetButton1PushedImage();\n\t\tvoid SetButton1PushedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetButton1DisabledImage();\n\t\tvoid SetButton1DisabledImage(LPCTSTR pStrImage);\n\n\t\tbool GetShowButton2();\n\t\tvoid SetShowButton2(bool bShow);\n\t\tLPCTSTR GetButton2NormalImage();\n\t\tvoid SetButton2NormalImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetButton2HotImage();\n\t\tvoid SetButton2HotImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetButton2PushedImage();\n\t\tvoid SetButton2PushedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetButton2DisabledImage();\n\t\tvoid SetButton2DisabledImage(LPCTSTR pStrImage);\n\n\t\tLPCTSTR GetThumbNormalImage();\n\t\tvoid SetThumbNormalImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetThumbHotImage();\n\t\tvoid SetThumbHotImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetThumbPushedImage();\n\t\tvoid SetThumbPushedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetThumbDisabledImage();\n\t\tvoid SetThumbDisabledImage(LPCTSTR pStrImage);\n\n\t\tLPCTSTR GetRailNormalImage();\n\t\tvoid SetRailNormalImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetRailHotImage();\n\t\tvoid SetRailHotImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetRailPushedImage();\n\t\tvoid SetRailPushedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetRailDisabledImage();\n\t\tvoid SetRailDisabledImage(LPCTSTR pStrImage);\n\n\t\tLPCTSTR GetBkNormalImage();\n\t\tvoid SetBkNormalImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetBkHotImage();\n\t\tvoid SetBkHotImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetBkPushedImage();\n\t\tvoid SetBkPushedImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetBkDisabledImage();\n\t\tvoid SetBkDisabledImage(LPCTSTR pStrImage);\n\n\t\tvoid SetPos(RECT rc);\n\t\tvoid DoEvent(TEventUI& event);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvoid DoPaint(HDC hDC, const RECT& rcPaint);\n\n\t\tvoid PaintBk(HDC hDC);\n\t\tvoid PaintButton1(HDC hDC);\n\t\tvoid PaintButton2(HDC hDC);\n\t\tvoid PaintThumb(HDC hDC);\n\t\tvoid PaintRail(HDC hDC);\n\n\tprotected:\n\n\t\tenum\n\t\t{ \n\t\t\tDEFAULT_SCROLLBAR_SIZE = 16,\n\t\t\tDEFAULT_TIMERID = 10,\n\t\t};\n\n\t\tbool m_bHorizontal;\n\t\tint m_nRange;\n\t\tint m_nScrollPos;\n\t\tint m_nLineSize;\n\t\tint m_nScrollBarSize;\n\t\tCContainerUI* m_pOwner;\n\t\tPOINT ptLastMouse;\n\t\tint m_nLastScrollPos;\n\t\tint m_nLastScrollOffset;\n\t\tint m_nScrollRepeatDelay;\n\n\t\tCDuiString m_sBkNormalImage;\n\t\tCDuiString m_sBkHotImage;\n\t\tCDuiString m_sBkPushedImage;\n\t\tCDuiString m_sBkDisabledImage;\n\n\t\tbool m_bShowButton1;\n\t\tRECT m_rcButton1;\n\t\tUINT m_uButton1State;\n\t\tCDuiString m_sButton1NormalImage;\n\t\tCDuiString m_sButton1HotImage;\n\t\tCDuiString m_sButton1PushedImage;\n\t\tCDuiString m_sButton1DisabledImage;\n\n\t\tbool m_bShowButton2;\n\t\tRECT m_rcButton2;\n\t\tUINT m_uButton2State;\n\t\tCDuiString m_sButton2NormalImage;\n\t\tCDuiString m_sButton2HotImage;\n\t\tCDuiString m_sButton2PushedImage;\n\t\tCDuiString m_sButton2DisabledImage;\n\n\t\tRECT m_rcThumb;\n\t\tUINT m_uThumbState;\n\t\tCDuiString m_sThumbNormalImage;\n\t\tCDuiString m_sThumbHotImage;\n\t\tCDuiString m_sThumbPushedImage;\n\t\tCDuiString m_sThumbDisabledImage;\n\n\t\tCDuiString m_sRailNormalImage;\n\t\tCDuiString m_sRailHotImage;\n\t\tCDuiString m_sRailPushedImage;\n\t\tCDuiString m_sRailDisabledImage;\n\n\t\tCDuiString m_sImageModify;\n\t};\n}\n\n#endif // __UISCROLLBAR_H__"
  },
  {
    "path": "DuiLib/Control/UISlider.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"UISlider.h\"\n\nnamespace DuiLib\n{\n\tCSliderUI::CSliderUI() : m_uButtonState(0), m_nStep(1),m_bSendMoveNotify(false)\n\t{\n\t\tm_uTextStyle = DT_SINGLELINE | DT_CENTER;\n\t\tm_szThumb.cx = m_szThumb.cy = 10;\n\t}\n\n\tLPCTSTR CSliderUI::GetClass() const\n\t{\n\t\treturn _T(\"SliderUI\");\n\t}\n\n\tUINT CSliderUI::GetControlFlags() const\n\t{\n\t\tif( IsEnabled() ) return UIFLAG_SETCURSOR;\n\t\telse return 0;\n\t}\n\n\tLPVOID CSliderUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_SLIDER) == 0 ) return static_cast<CSliderUI*>(this);\n\t\treturn CProgressUI::GetInterface(pstrName);\n\t}\n\n\tvoid CSliderUI::SetEnabled(bool bEnable)\n\t{\n\t\tCControlUI::SetEnabled(bEnable);\n\t\tif( !IsEnabled() ) {\n\t\t\tm_uButtonState = 0;\n\t\t}\n\t}\n\n\tint CSliderUI::GetChangeStep()\n\t{\n\t\treturn m_nStep;\n\t}\n\n\tvoid CSliderUI::SetChangeStep(int step)\n\t{\n\t\tm_nStep = step;\n\t}\n\n\tvoid CSliderUI::SetThumbSize(SIZE szXY)\n\t{\n\t\tm_szThumb = szXY;\n\t}\n\n\tRECT CSliderUI::GetThumbRect() const\n\t{\n\t\tif( m_bHorizontal ) {\n\t\t\tint left = m_rcItem.left + (m_rcItem.right - m_rcItem.left - m_szThumb.cx) * (m_nValue - m_nMin) / (m_nMax - m_nMin);\n\t\t\tint top = (m_rcItem.bottom + m_rcItem.top - m_szThumb.cy) / 2;\n\t\t\treturn CDuiRect(left, top, left + m_szThumb.cx, top + m_szThumb.cy); \n\t\t}\n\t\telse {\n\t\t\tint left = (m_rcItem.right + m_rcItem.left - m_szThumb.cx) / 2;\n\t\t\tint top = m_rcItem.bottom - m_szThumb.cy - (m_rcItem.bottom - m_rcItem.top - m_szThumb.cy) * (m_nValue - m_nMin) / (m_nMax - m_nMin);\n\t\t\treturn CDuiRect(left, top, left + m_szThumb.cx, top + m_szThumb.cy); \n\t\t}\n\t}\n\n\tLPCTSTR CSliderUI::GetThumbImage() const\n\t{\n\t\treturn m_sThumbImage;\n\t}\n\n\tvoid CSliderUI::SetThumbImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sThumbImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CSliderUI::GetThumbHotImage() const\n\t{\n\t\treturn m_sThumbHotImage;\n\t}\n\n\tvoid CSliderUI::SetThumbHotImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sThumbHotImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CSliderUI::GetThumbPushedImage() const\n\t{\n\t\treturn m_sThumbPushedImage;\n\t}\n\n\tvoid CSliderUI::SetThumbPushedImage(LPCTSTR pStrImage)\n\t{\n\t\tm_sThumbPushedImage = pStrImage;\n\t\tInvalidate();\n\t}\n\t//ڻʱܵSetValueӰ\n\tvoid CSliderUI::SetValue(int nValue) \n\t{\n\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) \n\t\t\treturn;\n\t\tCProgressUI::SetValue(nValue);\n\t}\n\tvoid CSliderUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pParent != NULL ) m_pParent->DoEvent(event);\n\t\t\telse CProgressUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_uButtonState |= UISTATE_CAPTURED;\n\n\t\t\t\tint nValue;\n\t\t\t\t//ЩSlider굯֮ǰ͸ı们λ\n\t\t\t\tif( m_bHorizontal ) {\n\t\t\t\t\tif( event.ptMouse.x >= m_rcItem.right - m_szThumb.cx / 2 ) nValue = m_nMax;\n\t\t\t\t\telse if( event.ptMouse.x <= m_rcItem.left + m_szThumb.cx / 2 ) nValue = m_nMin;\n\t\t\t\t\telse nValue = m_nMin + (m_nMax - m_nMin) * (event.ptMouse.x - m_rcItem.left - m_szThumb.cx / 2 ) / (m_rcItem.right - m_rcItem.left - m_szThumb.cx);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif( event.ptMouse.y >= m_rcItem.bottom - m_szThumb.cy / 2 ) nValue = m_nMin;\n\t\t\t\t\telse if( event.ptMouse.y <= m_rcItem.top + m_szThumb.cy / 2  ) nValue = m_nMax;\n\t\t\t\t\telse nValue = m_nMin + (m_nMax - m_nMin) * (m_rcItem.bottom - event.ptMouse.y - m_szThumb.cy / 2 ) / (m_rcItem.bottom - m_rcItem.top - m_szThumb.cy);\n\t\t\t\t}\n\t\t\t\tif(m_nValue !=nValue && nValue>=m_nMin && nValue<=m_nMax)\n\t\t\t\t{\n\t\t\t\t\tm_nValue =nValue;\n\t\t\t\t\tInvalidate();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif( (event.Type == UIEVENT_BUTTONUP)||(event.Type==UIEVENT_RBUTTONUP) )\n\t\t{\n\t\t\tint nValue;\n\t\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\n                if( m_bHorizontal ) {\n                    if( event.ptMouse.x >= m_rcItem.right - m_szThumb.cx / 2 ) nValue = m_nMax;\n                    else if( event.ptMouse.x <= m_rcItem.left + m_szThumb.cx / 2 ) nValue = m_nMin;\n                    else nValue = m_nMin + (m_nMax - m_nMin) * (event.ptMouse.x - m_rcItem.left - m_szThumb.cx / 2 ) / (m_rcItem.right - m_rcItem.left - m_szThumb.cx);\n                }\n                else {\n                    if( event.ptMouse.y >= m_rcItem.bottom - m_szThumb.cy / 2 ) nValue = m_nMin;\n                    else if( event.ptMouse.y <= m_rcItem.top + m_szThumb.cy / 2  ) nValue = m_nMax;\n                    else nValue = m_nMin + (m_nMax - m_nMin) * (m_rcItem.bottom - event.ptMouse.y - m_szThumb.cy / 2 ) / (m_rcItem.bottom - m_rcItem.top - m_szThumb.cy);\n                }\n                if(/*m_nValue !=nValue && 2014.7.28 redrain עͺܹؼ϶޷DUI_MSGTYPE_VALUECHANGEDϢ*/nValue>=m_nMin && nValue<=m_nMax)\n                {\n                    m_nValue =nValue;\n                    m_pManager->SendNotify(this, DUI_MSGTYPE_VALUECHANGED);\n\n                }\n\n                m_uButtonState &= ~UISTATE_CAPTURED;\n                Invalidate();\n\n\t\t\t}\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_CONTEXTMENU )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_SCROLLWHEEL ) \n\t\t{\n\t\t\tswitch( LOWORD(event.wParam) ) {\n\t\t\tcase SB_LINEUP:\n\t\t\t\tSetValue(GetValue() + GetChangeStep());\n\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_VALUECHANGED);\n\t\t\t\treturn;\n\t\t\tcase SB_LINEDOWN:\n\t\t\t\tSetValue(GetValue() - GetChangeStep());\n\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_VALUECHANGED);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEMOVE )\n\t\t{\n\t\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\tif( m_bHorizontal ) {\n\t\t\t\t\tif( event.ptMouse.x >= m_rcItem.right - m_szThumb.cx / 2 ) m_nValue = m_nMax;\n\t\t\t\t\telse if( event.ptMouse.x <= m_rcItem.left + m_szThumb.cx / 2 ) m_nValue = m_nMin;\n\t\t\t\t\telse m_nValue = m_nMin + (m_nMax - m_nMin) * (event.ptMouse.x - m_rcItem.left - m_szThumb.cx / 2 ) / (m_rcItem.right - m_rcItem.left - m_szThumb.cx);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif( event.ptMouse.y >= m_rcItem.bottom - m_szThumb.cy / 2 ) m_nValue = m_nMin;\n\t\t\t\t\telse if( event.ptMouse.y <= m_rcItem.top + m_szThumb.cy / 2  ) m_nValue = m_nMax;\n\t\t\t\t\telse m_nValue = m_nMin + (m_nMax - m_nMin) * (m_rcItem.bottom - event.ptMouse.y - m_szThumb.cy / 2 ) / (m_rcItem.bottom - m_rcItem.top - m_szThumb.cy);\n\t\t\t\t}\n\t\t\t\tif (m_bSendMoveNotify) //дϢжSliderDUI_MSGTYPE_VALUECHANGED_MOVEϢڻҲϢڸıʱһ߻Ϳһ߸ı\n\t\t\t\t{\n\t\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_VALUECHANGED_MOVE);\n\t\t\t\t}\n\t\t\t\tInvalidate();\n\t\t\t}\n\n\t\t\t// Generate the appropriate mouse messages\n\t\t\tPOINT pt = event.ptMouse;\n\t\t\tRECT rcThumb = GetThumbRect();\n\t\t\tif( IsEnabled() && ::PtInRect(&rcThumb, event.ptMouse) ) {\n\n\t\t\t\tm_uButtonState |= UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}else\n\t\t\t{\n\t\t\t\tm_uButtonState &= ~UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_SETCURSOR )\n\t\t{\n\t\t\tRECT rcThumb = GetThumbRect();\n\t\t\tif( IsEnabled()) {\n\t\t\t\t::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_HAND)));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif( event.Type == UIEVENT_MOUSEENTER )\n\t\t{\n\t\t\t//ֻڻķΧڲűΪUISTATE_HOT\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSELEAVE )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_uButtonState &= ~UISTATE_HOT;\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tCControlUI::DoEvent(event);\n\t}\n\t//Ƿ񻬶з仯֪ͨ\n\tvoid CSliderUI::SetSendMoveNotify(bool bSendMoveNofify) \n\t{\n\t\tm_bSendMoveNotify = bSendMoveNofify;\n\t}\n\tbool CSliderUI::GetSendMoveNotify() const\n\t{\n\t\treturn m_bSendMoveNotify;\n\t}\n\n\tvoid CSliderUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"thumbimage\")) == 0 ) SetThumbImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"thumbhotimage\")) == 0 ) SetThumbHotImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"thumbpushedimage\")) == 0 ) SetThumbPushedImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"thumbsize\")) == 0 ) {\n\t\t\tSIZE szXY = {0};\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tszXY.cx = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\tszXY.cy = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr); \n\t\t\tSetThumbSize(szXY);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"step\")) == 0 ) {\n\t\t\tSetChangeStep(_ttoi(pstrValue));\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"sendmovenotify\")) == 0 ) {\n\t\t\tSetSendMoveNotify(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t}\n\t\telse CProgressUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CSliderUI::PaintStatusImage(HDC hDC)\n\t{\n\t\tCProgressUI::PaintStatusImage(hDC);\n\n\t\tRECT rcThumb = GetThumbRect();\n\t\trcThumb.left -= m_rcItem.left;\n\t\trcThumb.top -= m_rcItem.top;\n\t\trcThumb.right -= m_rcItem.left;\n\t\trcThumb.bottom -= m_rcItem.top;\n\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\tif( !m_sThumbPushedImage.IsEmpty() ) {\n\t\t\t\tm_sImageModify.Empty();\n\t\t\t\tm_sImageModify.SmallFormat(_T(\"dest='%d,%d,%d,%d'\"), rcThumb.left, rcThumb.top, rcThumb.right, rcThumb.bottom);\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sThumbPushedImage, (LPCTSTR)m_sImageModify) ) m_sThumbPushedImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\telse if( (m_uButtonState & UISTATE_HOT) != 0 ) {\n\t\t\tif( !m_sThumbHotImage.IsEmpty() ) {\n\t\t\t\tm_sImageModify.Empty();\n\t\t\t\tm_sImageModify.SmallFormat(_T(\"dest='%d,%d,%d,%d'\"), rcThumb.left, rcThumb.top, rcThumb.right, rcThumb.bottom);\n\t\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sThumbHotImage, (LPCTSTR)m_sImageModify) ) m_sThumbHotImage.Empty();\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\n\t\tif( !m_sThumbImage.IsEmpty() ) {\n\t\t\tm_sImageModify.Empty();\n\t\t\tm_sImageModify.SmallFormat(_T(\"dest='%d,%d,%d,%d'\"), rcThumb.left, rcThumb.top, rcThumb.right, rcThumb.bottom);\n\t\t\tif( !DrawImage(hDC, (LPCTSTR)m_sThumbImage, (LPCTSTR)m_sImageModify) ) m_sThumbImage.Empty();\n\t\t\telse return;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Control/UISlider.h",
    "content": "#ifndef __UISLIDER_H__\n#define __UISLIDER_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass UILIB_API CSliderUI : public CProgressUI\n\t{\n\tpublic:\n\t\tCSliderUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tUINT GetControlFlags() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tvoid SetEnabled(bool bEnable = true);\n\n\t\tint GetChangeStep();\n\t\tvoid SetChangeStep(int step);\n\t\tvoid SetThumbSize(SIZE szXY);\n\t\tRECT GetThumbRect() const;\n\t\tLPCTSTR GetThumbImage() const;\n\t\tvoid SetThumbImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetThumbHotImage() const;\n\t\tvoid SetThumbHotImage(LPCTSTR pStrImage);\n\t\tLPCTSTR GetThumbPushedImage() const;\n\t\tvoid SetThumbPushedImage(LPCTSTR pStrImage);\n\n\t\tvoid DoEvent(TEventUI& event);\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\t\tvoid PaintStatusImage(HDC hDC);\n\n\t\tvoid SetValue(int nValue);\n\t\tvoid SetSendMoveNotify(bool bCanSend);\n\t\tbool GetSendMoveNotify() const;\n\tprotected:\n\t\tSIZE m_szThumb;\n\t\tUINT m_uButtonState;\n\t\tint m_nStep;\n\n\t\tCDuiString m_sThumbImage;\n\t\tCDuiString m_sThumbHotImage;\n\t\tCDuiString m_sThumbPushedImage;\n\n\t\tCDuiString m_sImageModify;\n\t\tbool\t   m_bSendMoveNotify;\n\t};\n}\n\n#endif // __UISLIDER_H__"
  },
  {
    "path": "DuiLib/Control/UIText.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"UIText.h\"\n\nnamespace DuiLib\n{\n\tCTextUI::CTextUI() : m_nLinks(0), m_nHoverLink(-1)\n\t{\n\t\tm_uTextStyle = DT_WORDBREAK;//Զ\n\t\tm_rcTextPadding.left = 2;\n\t\tm_rcTextPadding.right = 2;\n\t\t::ZeroMemory(m_rcLinks, sizeof(m_rcLinks));\n\t}\n\n\tCTextUI::~CTextUI()\n\t{\n\t}\n\n\tLPCTSTR CTextUI::GetClass() const\n\t{\n\t\treturn _T(\"TextUI\");\n\t}\n\n\tLPVOID CTextUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_TEXT) == 0 ) return static_cast<CTextUI*>(this);\n\t\treturn CLabelUI::GetInterface(pstrName);\n\t}\n\n\tUINT CTextUI::GetControlFlags() const\n\t{\n\t\tif( IsEnabled() && m_nLinks > 0 ) return UIFLAG_SETCURSOR;\n\t\telse return 0;\n\t}\n\n\tCDuiString* CTextUI::GetLinkContent(int iIndex)\n\t{\n\t\tif( iIndex >= 0 && iIndex < m_nLinks ) return &m_sLinks[iIndex];\n\t\treturn NULL;\n\t}\n\n\tvoid CTextUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pParent != NULL ) m_pParent->DoEvent(event);\n\t\t\telse CLabelUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_SETCURSOR ) {\n\t\t\tfor( int i = 0; i < m_nLinks; i++ ) {\n\t\t\t\tif( ::PtInRect(&m_rcLinks[i], event.ptMouse) ) {\n\t\t\t\t\t::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_HAND)));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK && IsEnabled() ) {\n\t\t\tfor( int i = 0; i < m_nLinks; i++ ) {\n\t\t\t\tif( ::PtInRect(&m_rcLinks[i], event.ptMouse) ) {\n\t\t\t\t\tInvalidate();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( event.Type == UIEVENT_BUTTONUP && IsEnabled() ) {\n\t\t\tfor( int i = 0; i < m_nLinks; i++ ) {\n\t\t\t\tif( ::PtInRect(&m_rcLinks[i], event.ptMouse) ) {\n\t\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_LINK, i);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( event.Type == UIEVENT_CONTEXTMENU )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t// When you move over a link\n\t\tif( m_nLinks > 0 && event.Type == UIEVENT_MOUSEMOVE && IsEnabled() ) {\n\t\t\tint nHoverLink = -1;\n\t\t\tfor( int i = 0; i < m_nLinks; i++ ) {\n\t\t\t\tif( ::PtInRect(&m_rcLinks[i], event.ptMouse) ) {\n\t\t\t\t\tnHoverLink = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(m_nHoverLink != nHoverLink) {\n\t\t\t\tm_nHoverLink = nHoverLink;\n\t\t\t\tInvalidate();\n\t\t\t\treturn;\n\t\t\t}      \n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSELEAVE ) {\n\t\t\tif( m_nLinks > 0 && IsEnabled() ) {\n\t\t\t\tif(m_nHoverLink != -1) {\n\t\t\t\t\tm_nHoverLink = -1;\n\t\t\t\t\tInvalidate();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tCLabelUI::DoEvent(event);\n\t}\n\n\tSIZE CTextUI::EstimateSize(SIZE szAvailable)\n\t{\n\t\tRECT rcText = { 0, 0, MAX(szAvailable.cx, m_cxyFixed.cx), 9999 };\n\t\trcText.left += m_rcTextPadding.left;\n\t\trcText.right -= m_rcTextPadding.right;\n\t\tif( m_bShowHtml ) {   \n\t\t\tint nLinks = 0;\n\t\t\tCRenderEngine::DrawHtmlText(m_pManager->GetPaintDC(), m_pManager, rcText, m_sText, m_dwTextColor, NULL, NULL, nLinks, DT_CALCRECT | m_uTextStyle);\n\t\t}\n\t\telse {\n\t\t\tCRenderEngine::DrawText(m_pManager->GetPaintDC(), m_pManager, rcText, m_sText, m_dwTextColor, m_iFont, DT_CALCRECT | m_uTextStyle);\n\t\t}\n\t\tSIZE cXY = {rcText.right - rcText.left + m_rcTextPadding.left + m_rcTextPadding.right,\n\t\t\trcText.bottom - rcText.top + m_rcTextPadding.top + m_rcTextPadding.bottom};\n\n\t\tif( m_cxyFixed.cy != 0 ) cXY.cy = m_cxyFixed.cy;\n\t\treturn cXY;\n\t}\n\n\tvoid CTextUI::PaintText(HDC hDC)\n\t{\n\t\tif( m_sText.IsEmpty() ) {\n\t\t\tm_nLinks = 0;\n\t\t\treturn;\n\t\t}\n\n\t\tif( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor();\n\t\tif( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor();\n\n\t\tif( m_sText.IsEmpty() ) return;\n\n\t\tm_nLinks = lengthof(m_rcLinks);\n\t\tRECT rc = m_rcItem;\n\t\trc.left += m_rcTextPadding.left;\n\t\trc.right -= m_rcTextPadding.right;\n\t\trc.top += m_rcTextPadding.top;\n\t\trc.bottom -= m_rcTextPadding.bottom;\n\t\tif( IsEnabled() ) {\n\t\t\tif( m_bShowHtml )\n\t\t\t\tCRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, m_dwTextColor, \\\n\t\t\t\tm_rcLinks, m_sLinks, m_nLinks, m_uTextStyle);\n\t\t\telse\n\t\t\t\tCRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, m_dwTextColor, \\\n\t\t\t\tm_iFont, m_uTextStyle);\n\t\t}\n\t\telse {\n\t\t\tif( m_bShowHtml )\n\t\t\t\tCRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, m_dwDisabledTextColor, \\\n\t\t\t\tm_rcLinks, m_sLinks, m_nLinks, m_uTextStyle);\n\t\t\telse\n\t\t\t\tCRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, m_dwDisabledTextColor, \\\n\t\t\t\tm_iFont, m_uTextStyle);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Control/UIText.h",
    "content": "#ifndef __UITEXT_H__\n#define __UITEXT_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass UILIB_API CTextUI : public CLabelUI\n\t{\n\tpublic:\n\t\tCTextUI();\n\t\t~CTextUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tUINT GetControlFlags() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tCDuiString* GetLinkContent(int iIndex);\n\n\t\tvoid DoEvent(TEventUI& event);\n\t\tSIZE EstimateSize(SIZE szAvailable);\n\n\t\tvoid PaintText(HDC hDC);\n\n\tprotected:\n\t\tenum { MAX_LINK = 8 };\n\t\tint m_nLinks;\n\t\tRECT m_rcLinks[MAX_LINK];\n\t\tCDuiString m_sLinks[MAX_LINK];\n\t\tint m_nHoverLink;\n\t};\n\n} // namespace DuiLib\n\n#endif //__UITEXT_H__"
  },
  {
    "path": "DuiLib/Control/UITreeView.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"UITreeView.h\"\n\n#pragma warning( disable: 4251 )\nnamespace DuiLib\n{\n\tCTreeNodeUI::CTreeNodeUI( CTreeNodeUI* _ParentNode /*= NULL*/ )\n\t{\n\t\tm_dwItemTextColor\t\t= 0x00000000;\n\t\tm_dwItemHotTextColor\t= 0;\n\t\tm_dwSelItemTextColor\t= 0;\n\t\tm_dwSelItemHotTextColor\t= 0;\n\n\t\tpTreeView\t\t= NULL;\n\t\tm_bIsVisable\t= true;\n\t\tm_bIsCheckBox\t= false;\n\t\tpParentTreeNode\t= NULL;\n\n\t\tpHoriz\t\t\t= new CHorizontalLayoutUI();\n\t\tpFolderButton\t= new CCheckBoxUI();\n\t\tpDottedLine\t\t= new CLabelUI();\n\t\tpCheckBox\t\t= new CCheckBoxUI();\n\t\tpItemButton\t\t= new COptionUI();\n\n\t\tthis->SetFixedHeight(18);\n\t\t//\tthis->SetFixedWidth(250);\n\t\tpFolderButton->SetFixedWidth(GetFixedHeight());\n\t\tpDottedLine->SetFixedWidth(2);\n\t\tpCheckBox->SetFixedWidth(GetFixedHeight());\n\t\tpItemButton->SetAttribute(_T(\"align\"),_T(\"left\"));\n\n\t\tpDottedLine->SetVisible(false);\n\t\tpCheckBox->SetVisible(false);\n\t\tpItemButton->SetMouseEnabled(false);\n\n\t\tif(_ParentNode)\n\t\t{\n\t\t\tif (_tcsicmp(_ParentNode->GetClass(), _T(\"TreeNodeUI\")) != 0)\n\t\t\t\treturn;\n\n\t\t\tpDottedLine->SetVisible(_ParentNode->IsVisible());\n\t\t\tpDottedLine->SetFixedWidth(_ParentNode->GetDottedLine()->GetFixedWidth()+16);\n\t\t\tthis->SetParentNode(_ParentNode);\n\t\t}\n\n\t\tpHoriz->Add(pDottedLine);\n\t\tpHoriz->Add(pFolderButton);\n\t\tpHoriz->Add(pCheckBox);\n\t\tpHoriz->Add(pItemButton);\n\t\tAdd(pHoriz);\n\t}\n\n\tCTreeNodeUI::~CTreeNodeUI( void )\n\t{\n\n\t}\n\n\tLPCTSTR CTreeNodeUI::GetClass() const\n\t{\n\t\treturn _T(\"TreeNodeUI\");\n\t}\n\n\tLPVOID CTreeNodeUI::GetInterface( LPCTSTR pstrName )\n\t{\n\t\tif (_tcscmp(pstrName, DUI_CTR_TREENODE) == 0)\n\t\t{\n\t\t\treturn static_cast<CTreeNodeUI*>(this);\n\t\t}\n\t\treturn CListContainerElementUI::GetInterface(pstrName);\n\t}\n\n\tvoid CTreeNodeUI::DoEvent( TEventUI& event )\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pOwner != NULL ) m_pOwner->DoEvent(event);\n\t\t\telse CContainerUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tCListContainerElementUI::DoEvent(event);\n\n\t\tif( event.Type == UIEVENT_DBLCLICK )\n\t\t{\n\t\t\tif( IsEnabled() ) {\n\t\t\t\tm_pManager->SendNotify(this, _T(\"itemdbclick\"));\n\t\t\t\tInvalidate();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSEENTER )\n\t\t{\n\t\t\tif( IsEnabled()) {\n\t\t\t\tif(m_bSelected && GetSelItemHotTextColor())\n\t\t\t\t\tpItemButton->SetTextColor(GetSelItemHotTextColor());\n\t\t\t\telse\n\t\t\t\t\tpItemButton->SetTextColor(GetItemHotTextColor());\n\t\t\t}\n\t\t\telse \n\t\t\t\tpItemButton->SetTextColor(pItemButton->GetDisabledTextColor());\n\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_MOUSELEAVE )\n\t\t{\n\t\t\tif( IsEnabled()) {\n\t\t\t\tif(m_bSelected && GetSelItemTextColor())\n\t\t\t\t\tpItemButton->SetTextColor(GetSelItemTextColor());\n\t\t\t\telse if(!m_bSelected)\n\t\t\t\t\tpItemButton->SetTextColor(GetItemTextColor());\n\t\t\t}\n\t\t\telse \n\t\t\t\tpItemButton->SetTextColor(pItemButton->GetDisabledTextColor());\n\n\t\t\treturn;\n\t\t}\n\t}\n\n\tvoid CTreeNodeUI::Invalidate()\n\t{\n\t\tif( !IsVisible() )\n\t\t\treturn;\n\n\t\tif( GetParent() ) {\n\t\t\tCContainerUI* pParentContainer = static_cast<CContainerUI*>(GetParent()->GetInterface(_T(\"Container\")));\n\t\t\tif( pParentContainer ) {\n\t\t\t\tRECT rc = pParentContainer->GetPos();\n\t\t\t\tRECT rcInset = pParentContainer->GetInset();\n\t\t\t\trc.left += rcInset.left;\n\t\t\t\trc.top += rcInset.top;\n\t\t\t\trc.right -= rcInset.right;\n\t\t\t\trc.bottom -= rcInset.bottom;\n\t\t\t\tCScrollBarUI* pVerticalScrollBar = pParentContainer->GetVerticalScrollBar();\n\t\t\t\tif( pVerticalScrollBar && pVerticalScrollBar->IsVisible() ) rc.right -= pVerticalScrollBar->GetFixedWidth();\n\t\t\t\tCScrollBarUI* pHorizontalScrollBar = pParentContainer->GetHorizontalScrollBar();\n\t\t\t\tif( pHorizontalScrollBar && pHorizontalScrollBar->IsVisible() ) rc.bottom -= pHorizontalScrollBar->GetFixedHeight();\n\n\t\t\t\tRECT invalidateRc = m_rcItem;\n\t\t\t\tif( !::IntersectRect(&invalidateRc, &m_rcItem, &rc) ) \n\t\t\t\t\treturn;\n\n\t\t\t\tCControlUI* pParent = GetParent();\n\t\t\t\tRECT rcTemp;\n\t\t\t\tRECT rcParent;\n\t\t\t\twhile( pParent = pParent->GetParent() )\n\t\t\t\t{\n\t\t\t\t\trcTemp = invalidateRc;\n\t\t\t\t\trcParent = pParent->GetPos();\n\t\t\t\t\tif( !::IntersectRect(&invalidateRc, &rcTemp, &rcParent) ) \n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif( m_pManager != NULL ) m_pManager->Invalidate(invalidateRc);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCContainerUI::Invalidate();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tCContainerUI::Invalidate();\n\t\t}\n\t}\n\n\tbool CTreeNodeUI::Select( bool bSelect /*= true*/ )\n\t{\n\t\tbool nRet = CListContainerElementUI::Select(bSelect);\n\t\tif(m_bSelected)\n\t\t\tpItemButton->SetTextColor(GetSelItemTextColor());\n\t\telse \n\t\t\tpItemButton->SetTextColor(GetItemTextColor());\n\n\t\treturn nRet;\n\t}\n\n\t//************************************\n\t// : Add\n\t// : bool\n\t// Ϣ: CControlUI * _pTreeNodeUI\n\t// ˵: ͨڵӽڵ\n\t//************************************\n\tbool CTreeNodeUI::Add( CControlUI* _pTreeNodeUI )\n\t{\n\t\tif (_tcsicmp(_pTreeNodeUI->GetClass(), _T(\"TreeNodeUI\")) == 0)\n\t\t\treturn AddChildNode((CTreeNodeUI*)_pTreeNodeUI);\n\n\t\treturn CListContainerElementUI::Add(_pTreeNodeUI);\n\t}\n\n\t//************************************\n\t// : AddAt\n\t// : bool\n\t// Ϣ: CControlUI * pControl\n\t// Ϣ: int iIndex\t\t\t\tòԵǰڵµֵбͼ\n\t// ˵: TreeNodeָλòӽڵ(edit by joe 2014/7/28)\n\t//************************************\n\tbool CTreeNodeUI::AddAt( CControlUI* pControl, int iIndex )\n\t{\n\t\tif (!pControl)\n\t\t\treturn false;\n\n\t\tif(_tcsicmp(pControl->GetClass(), _T(\"TreeNodeUI\")) != 0)\n\t\t\treturn false;\n\n\t\tif (!GetFolderButton()->IsSelected())    //add byRedrain   2014.8.8\n\t\t{\n\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_ITEMDBCLICK);\n\t\t}\n\n\t\t//filter invalidate index\n\t\tint iDestIndex = iIndex;\n\t\tif (iDestIndex < 0)\n\t\t{\n\t\t\tiDestIndex = 0;\n\t\t}\n\t\telse if (iDestIndex > GetCountChild())\n\t\t{\n\t\t\tiDestIndex = GetCountChild();\n\t\t}\n\t\tif(iIndex != iDestIndex) iIndex = iDestIndex;\n\n\t\tCTreeNodeUI* pIndexNode = static_cast<CTreeNodeUI*>(mTreeNodes.GetAt(iIndex));\n\n\t\tpControl = CalLocation((CTreeNodeUI*)pControl);\n\n\t\tbool bRet = false;\n\t\tint iTreeIndex = -1;\n\t\tif (pTreeView)\n\t\t{\n\t\t\t//Get TreeView insert index\n\t\t\tif (pIndexNode)\n\t\t\t{\n\t\t\t\tiTreeIndex = pIndexNode->GetTreeIndex();\n\t\t\t\tbRet = pTreeView->AddAt((CTreeNodeUI*)pControl, iTreeIndex) >= 0;\n\t\t\t\tif (bRet)\n\t\t\t\t{\n\t\t\t\t\tmTreeNodes.InsertAt(iIndex, pControl);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tCTreeNodeUI *pChildNode = NULL;\n\t\t\t\t//insert child node position index(new node insert to tail, default add tail)\n\t\t\t\tint iChIndex = -1;\n\t\t\t\t//insert child node tree-view position index(new node insert to tail)\n\t\t\t\tint iChTreeIndex = -1;\n\t\t\t\t//search tree index reverse\n\t\t\t\tfor (int i = GetCountChild(); i > 0; i++)\n\t\t\t\t{\n\t\t\t\t\tpChildNode = GetChildNode(i - 1);\n\t\t\t\t\tiChTreeIndex = pChildNode->GetTreeIndex();\n\t\t\t\t\tif (iChTreeIndex >= GetTreeIndex() && iChTreeIndex <= GetTreeIndex() + GetCountChild() )\n\t\t\t\t\t{\n\t\t\t\t\t\t//new child node position\n\t\t\t\t\t\tiChIndex = i;\n\t\t\t\t\t\t//child node tree position\n\t\t\t\t\t\tiTreeIndex = iChTreeIndex + 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//child not find tree index directly insert to parent tail\n\t\t\t\tif (iTreeIndex <= GetTreeIndex())\n\t\t\t\t{\n\t\t\t\t\tiTreeIndex = GetTreeIndex() + 1;\n\t\t\t\t}\n\t\t\t\t//insert TreeNode to TreeView\n\t\t\t\tbRet = pTreeView->AddAt((CTreeNodeUI*)pControl, iTreeIndex) >= 0;\n\t\t\t\t//insert TreeNode to parent TreeNode\n\t\t\t\tif (bRet)\n\t\t\t\t{\n\t\t\t\t\tif (iChIndex > 0)\n\t\t\t\t\t\tbRet = mTreeNodes.InsertAt(iChIndex, pControl);\n\t\t\t\t\telse\n\t\t\t\t\t\tbRet = mTreeNodes.Add(pControl);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//parent TreeNode not bind TreeView just insert to parent TreeNode\n\t\t\tbRet = mTreeNodes.InsertAt(iIndex, pControl);\n\t\t}\n\t\treturn bRet;\n\t}\n\n\tbool CTreeNodeUI::Remove( CControlUI* pControl )\n\t{\n\t\treturn RemoveAt((CTreeNodeUI*)pControl);\n\t}\n\n\tvoid CTreeNodeUI::SetVisibleTag( bool _IsVisible )\n\t{\n\t\tm_bIsVisable = _IsVisible;\n\t}\n\n\tbool CTreeNodeUI::GetVisibleTag()\n\t{\n\t\treturn m_bIsVisable;\n\t}\n\n\tvoid CTreeNodeUI::SetItemText( LPCTSTR pstrValue )\n\t{\n\t\tpItemButton->SetText(pstrValue);\n\t}\n\n\tCDuiString CTreeNodeUI::GetItemText()\n\t{\n\t\treturn pItemButton->GetText();\n\t}\n\n\tvoid CTreeNodeUI::CheckBoxSelected( bool _Selected )\n\t{\n\t\tpCheckBox->Selected(_Selected);\n\t}\n\n\tbool CTreeNodeUI::IsCheckBoxSelected() const\n\t{\n\t\treturn pCheckBox->IsSelected();\n\t}\n\n\tbool CTreeNodeUI::IsHasChild() const\n\t{\n\t\treturn !mTreeNodes.IsEmpty();\n\t}\n\n\tbool CTreeNodeUI::AddChildNode( CTreeNodeUI* _pTreeNodeUI )\n\t{\n\t\tif (!_pTreeNodeUI)\n\t\t\treturn false;\n\n\t\tif (_tcsicmp(_pTreeNodeUI->GetClass(), _T(\"TreeNodeUI\")) != 0)\n\t\t\treturn false;\n\n\t\tif (!GetFolderButton()->IsSelected())    //add byRedrain   2014.8.8\n\t\t{\n\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_ITEMDBCLICK);\n\t\t}\n\n\t\t_pTreeNodeUI = CalLocation(_pTreeNodeUI);\n\n\t\tbool nRet = true;\n\n\t\tif(pTreeView){\n\t\t\tCTreeNodeUI* pNode = static_cast<CTreeNodeUI*>(mTreeNodes.GetAt(mTreeNodes.GetSize()-1));\n\t\t\tif(!pNode || !pNode->GetLastNode())\n\t\t\t\tnRet = pTreeView->AddAt(_pTreeNodeUI,GetTreeIndex()+1) >= 0;\n\t\t\telse nRet = pTreeView->AddAt(_pTreeNodeUI,pNode->GetLastNode()->GetTreeIndex()+1) >= 0;\n\t\t}\n\n\t\tif(nRet)\n\t\t\tmTreeNodes.Add(_pTreeNodeUI);\n\n\t\treturn nRet;\n\t}\n\n\tbool CTreeNodeUI::RemoveAt( CTreeNodeUI* _pTreeNodeUI )\n\t{\n\t\tint nIndex = mTreeNodes.Find(_pTreeNodeUI);\n\t\tCTreeNodeUI* pNode = static_cast<CTreeNodeUI*>(mTreeNodes.GetAt(nIndex));\n\t\tif(pNode && pNode == _pTreeNodeUI)\n\t\t{\n\t\t\twhile(pNode->IsHasChild())\n\t\t\t\tpNode->RemoveAt(static_cast<CTreeNodeUI*>(pNode->mTreeNodes.GetAt(0)));\n\n\t\t\tmTreeNodes.Remove(nIndex);\n\n\t\t\tif(pTreeView)\n\t\t\t\tpTreeView->Remove(_pTreeNodeUI);\n\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tvoid CTreeNodeUI::SetParentNode( CTreeNodeUI* _pParentTreeNode )\n\t{\n\t\tpParentTreeNode = _pParentTreeNode;\n\t}\n\n\tCTreeNodeUI* CTreeNodeUI::GetParentNode()\n\t{\n\t\treturn pParentTreeNode;\n\t}\n\n\tlong CTreeNodeUI::GetCountChild()\n\t{\n\t\treturn mTreeNodes.GetSize();\n\t}\n\n\tvoid CTreeNodeUI::SetTreeView( CTreeViewUI* _CTreeViewUI )\n\t{\n\t\tpTreeView = _CTreeViewUI;\n\t}\n\n\tCTreeViewUI* CTreeNodeUI::GetTreeView()\n\t{\n\t\treturn pTreeView;\n\t}\n\n\tvoid CTreeNodeUI::SetAttribute( LPCTSTR pstrName, LPCTSTR pstrValue )\n\t{\n\t\tif (_tcscmp(pstrName, _T(\"text\")) == 0)\n\t\t{\n\t\t\tpItemButton->SetText(pstrValue);\n\t\t\tCListContainerElementUI::SetAttribute(pstrName, pstrValue);\n\t\t}\n\t\telse if(_tcscmp(pstrName, _T(\"horizattr\")) == 0 )\n\t\t\tpHoriz->ApplyAttributeList(pstrValue);\n\t\telse if(_tcscmp(pstrName, _T(\"dotlineattr\")) == 0 )\n\t\t\tpDottedLine->ApplyAttributeList(pstrValue);\n\t\telse if(_tcscmp(pstrName, _T(\"folderattr\")) == 0 )\n\t\t\tpFolderButton->ApplyAttributeList(pstrValue);\n\t\telse if(_tcscmp(pstrName, _T(\"checkboxattr\")) == 0 )\n\t\t\tpCheckBox->ApplyAttributeList(pstrValue);\n\t\telse if(_tcscmp(pstrName, _T(\"itemattr\")) == 0 )\n\t\t\tpItemButton->ApplyAttributeList(pstrValue);\n\t\telse if(_tcscmp(pstrName, _T(\"itemtextcolor\")) == 0 ){\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetItemTextColor(clrColor);\n\t\t}\n\t\telse if(_tcscmp(pstrName, _T(\"itemhottextcolor\")) == 0 ){\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetItemHotTextColor(clrColor);\n\t\t}\n\t\telse if(_tcscmp(pstrName, _T(\"selitemtextcolor\")) == 0 ){\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetSelItemTextColor(clrColor);\n\t\t}\n\t\telse if(_tcscmp(pstrName, _T(\"selitemhottextcolor\")) == 0 ){\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetSelItemHotTextColor(clrColor);\n\t\t}\n\t\telse CListContainerElementUI::SetAttribute(pstrName,pstrValue);\n\t}\n\n\tCStdPtrArray CTreeNodeUI::GetTreeNodes()\n\t{\n\t\treturn mTreeNodes;\n\t}\n\n\tCTreeNodeUI* CTreeNodeUI::GetChildNode( int _nIndex )\n\t{\n\t\treturn static_cast<CTreeNodeUI*>(mTreeNodes.GetAt(_nIndex));\n\t}\n\n\tvoid CTreeNodeUI::SetVisibleFolderBtn( bool _IsVisibled )\n\t{\n\t\tpFolderButton->SetVisible(_IsVisibled);\n\t}\n\n\tbool CTreeNodeUI::GetVisibleFolderBtn()\n\t{\n\t\treturn pFolderButton->IsVisible();\n\t}\n\n\tvoid CTreeNodeUI::SetVisibleCheckBtn( bool _IsVisibled )\n\t{\n\t\tpCheckBox->SetVisible(_IsVisibled);\n\t}\n\n\tbool CTreeNodeUI::GetVisibleCheckBtn()\n\t{\n\t\treturn pCheckBox->IsVisible();\n\t}\n\n\tint CTreeNodeUI::GetTreeIndex()\n\t{\n\t\tif(!pTreeView)\n\t\t\treturn -1;\n\n\t\tfor(int nIndex = 0;nIndex < pTreeView->GetCount();nIndex++){\n\t\t\tif(this == pTreeView->GetItemAt(nIndex))\n\t\t\t\treturn nIndex;\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\tint CTreeNodeUI::GetNodeIndex()\n\t{\n\t\tif(!GetParentNode() && !pTreeView)\n\t\t\treturn -1;\n\n\t\tif(!GetParentNode() && pTreeView)\n\t\t\treturn GetTreeIndex();\n\n\t\treturn GetParentNode()->GetTreeNodes().Find(this);\n\t}\n\n\tCTreeNodeUI* CTreeNodeUI::GetLastNode( )\n\t{\n\t\tif(!IsHasChild())\n\t\t\treturn this;\n\n\t\tCTreeNodeUI* nRetNode = NULL;\n\n\t\tfor(int nIndex = 0;nIndex < GetTreeNodes().GetSize();nIndex++){\n\t\t\tCTreeNodeUI* pNode = static_cast<CTreeNodeUI*>(GetTreeNodes().GetAt(nIndex));\n\t\t\tif(!pNode)\n\t\t\t\tcontinue;\n\n\t\t\tCDuiString aa = pNode->GetItemText();\n\n\t\t\tif(pNode->IsHasChild())\n\t\t\t\tnRetNode = pNode->GetLastNode();\n\t\t\telse \n\t\t\t\tnRetNode = pNode;\n\t\t}\n\n\t\treturn nRetNode;\n\t}\n\n\tCTreeNodeUI* CTreeNodeUI::CalLocation( CTreeNodeUI* _pTreeNodeUI )\n\t{\n\t\t_pTreeNodeUI->GetDottedLine()->SetVisible(true);\n\t\t_pTreeNodeUI->GetDottedLine()->SetFixedWidth(pDottedLine->GetFixedWidth()+16);\n\t\t_pTreeNodeUI->SetParentNode(this);\n\t\t_pTreeNodeUI->GetItemButton()->SetGroup(pItemButton->GetGroup());\n\t\t_pTreeNodeUI->SetTreeView(pTreeView);\n\n\t\treturn _pTreeNodeUI;\n\t}\n\n\tvoid CTreeNodeUI::SetItemTextColor( DWORD _dwItemTextColor )\n\t{\n\t\tm_dwItemTextColor\t= _dwItemTextColor;\n\t\tpItemButton->SetTextColor(m_dwItemTextColor);\n\t}\n\n\tDWORD CTreeNodeUI::GetItemTextColor() const\n\t{\n\t\treturn m_dwItemTextColor;\n\t}\n\n\tvoid CTreeNodeUI::SetItemHotTextColor( DWORD _dwItemHotTextColor )\n\t{\n\t\tm_dwItemHotTextColor = _dwItemHotTextColor;\n\t\tInvalidate();\n\t}\n\n\tDWORD CTreeNodeUI::GetItemHotTextColor() const\n\t{\n\t\treturn m_dwItemHotTextColor;\n\t}\n\n\tvoid CTreeNodeUI::SetSelItemTextColor( DWORD _dwSelItemTextColor )\n\t{\n\t\tm_dwSelItemTextColor = _dwSelItemTextColor;\n\t\tInvalidate();\n\t}\n\n\tDWORD CTreeNodeUI::GetSelItemTextColor() const\n\t{\n\t\treturn m_dwSelItemTextColor;\n\t}\n\n\tvoid CTreeNodeUI::SetSelItemHotTextColor( DWORD _dwSelHotItemTextColor )\n\t{\n\t\tm_dwSelItemHotTextColor = _dwSelHotItemTextColor;\n\t\tInvalidate();\n\t}\n\n\tDWORD CTreeNodeUI::GetSelItemHotTextColor() const\n\t{\n\t\treturn m_dwSelItemHotTextColor;\n\t}\n\n\tCTreeViewUI::CTreeViewUI( void ) : m_bVisibleFolderBtn(true),m_bVisibleCheckBtn(false),m_uItemMinWidth(0)\n\t{\n\t\tthis->GetHeader()->SetVisible(false);\n\t}\n\n\tCTreeViewUI::~CTreeViewUI( void )\n\t{\n\n\t}\n\n\tLPCTSTR CTreeViewUI::GetClass() const\n\t{\n\t\treturn _T(\"TreeViewUI\");\n\t}\n\n\tLPVOID CTreeViewUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif (_tcscmp(pstrName, DUI_CTR_TREEVIEW) == 0)\n\t\t{\n\t\t\treturn static_cast<CTreeViewUI*>(this);\n\t\t}\n\t\treturn CListUI::GetInterface(pstrName);\n\t}\n\n\tbool CTreeViewUI::Add( CTreeNodeUI* pControl )\n\t{\n\t\tif (!pControl)\n\t\t\treturn false;\n\n\t\tif (_tcsicmp(pControl->GetClass(), _T(\"TreeNodeUI\")) != 0)\n\t\t\treturn false;\n\n\t\tpControl->OnNotify += MakeDelegate(this,&CTreeViewUI::OnDBClickItem);\n\t\tpControl->GetFolderButton()->OnNotify += MakeDelegate(this,&CTreeViewUI::OnFolderChanged);\n\t\tpControl->GetCheckBox()->OnNotify += MakeDelegate(this,&CTreeViewUI::OnCheckBoxChanged);\n\n\t\tpControl->SetVisibleCheckBtn(m_bVisibleCheckBtn);\n\t\tpControl->SetVisibleFolderBtn(false);\n\t\tif(m_uItemMinWidth > 0)\n\t\t\tpControl->SetMinWidth(m_uItemMinWidth);\n\n\t\tCListUI::Add(pControl);\n\n\t\tif(pControl->GetCountChild() > 0)\n\t\t{\n\t\t\tpControl->SetVisibleFolderBtn(m_bVisibleFolderBtn);\n\t\t\tint nCount = pControl->GetCountChild();\n\t\t\tfor(int nIndex = 0;nIndex < nCount;nIndex++)\n\t\t\t{\n\t\t\t\tCTreeNodeUI* pNode = pControl->GetChildNode(nIndex);\n\t\t\t\tif(pNode)\n\t\t\t\t\tAdd(pNode);\n\t\t\t}\n\t\t}\n\n\t\tpControl->SetTreeView(this);\n\t\treturn true;\n\t}\n\n\t//************************************\n\t// : AddAt\n\t// : long\n\t// Ϣ: CTreeNodeUI * pControl\n\t// Ϣ: int iIndex\n\t// ˵: ÷ὫĽڵλĽڵΪǸڵ㣬ʹAddAt(CTreeNodeUI* pControl,CTreeNodeUI* _IndexNode) \n\t//************************************\n\tlong CTreeViewUI::AddAt( CTreeNodeUI* pControl, int iIndex )\n\t{\n\t\tif (!pControl)\n\t\t\treturn -1;\n\n\t\tif (_tcsicmp(pControl->GetClass(), _T(\"TreeNodeUI\")) != 0)\n\t\t\treturn -1;\n\n\t\t//filter invalidate index\n\t\tint iDestIndex = iIndex;\n\t\tif (iDestIndex < 0)\n\t\t{\n\t\t\tiDestIndex = 0;\n\t\t}\n\t\telse if (iDestIndex > GetCount())\n\t\t{\n\t\t\tiDestIndex = GetCount();\n\t\t}\n\t\tif(iIndex != iDestIndex) iIndex = iDestIndex;\n\n\t\t//CTreeNodeUI* pParent = static_cast<CTreeNodeUI*>(GetItemAt(iIndex-1));\n\t\t//if(!pParent)\n\t\t//\treturn -1;\n\n\t\tpControl->OnNotify += MakeDelegate(this,&CTreeViewUI::OnDBClickItem);\n\t\tpControl->GetFolderButton()->OnNotify += MakeDelegate(this,&CTreeViewUI::OnFolderChanged);\n\t\tpControl->GetCheckBox()->OnNotify += MakeDelegate(this,&CTreeViewUI::OnCheckBoxChanged);\n\n\t\tpControl->SetVisibleCheckBtn(m_bVisibleCheckBtn);\n\t\tpControl->SetVisibleFolderBtn(m_bVisibleFolderBtn);\n\t\tif(m_uItemMinWidth > 0)\n\t\t\tpControl->SetMinWidth(m_uItemMinWidth);\n\n\t\tCListUI::AddAt(pControl,iIndex);\n\n\t\tif(pControl->GetCountChild() > 0)\n\t\t{\n\t\t\tint nCount = pControl->GetCountChild();\n\t\t\tfor(int nIndex = 0;nIndex < nCount;nIndex++)\n\t\t\t{\n\t\t\t\tCTreeNodeUI* pNode = pControl->GetChildNode(nIndex);\n\t\t\t\tif(pNode)\n\t\t\t\t\treturn AddAt(pNode,iIndex+1);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn iIndex+1;\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\n\tbool CTreeViewUI::AddAt( CTreeNodeUI* pControl,CTreeNodeUI* _IndexNode )\n\t{\n\t\tif(!_IndexNode && !pControl)\n\t\t\treturn false;\n\n\t\tint nItemIndex = -1;\n\n\t\tfor(int nIndex = 0;nIndex < GetCount();nIndex++){\n\t\t\tif(_IndexNode == GetItemAt(nIndex)){\n\t\t\t\tnItemIndex = nIndex;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(nItemIndex == -1)\n\t\t\treturn false;\n\n\t\treturn AddAt(pControl,nItemIndex) >= 0;\n\t}\n\n\t//************************************\n\t// : Remove\n\t// : bool\n\t// Ϣ: CTreeNodeUI * pControl\n\t// ˵: pControl Լµнڵ㽫һƳ\n\t//************************************\n\tbool CTreeViewUI::Remove( CTreeNodeUI* pControl )\n\t{\n\t\tif(pControl->GetCountChild() > 0)\n\t\t{\n\t\t\tint nCount = pControl->GetCountChild();\n\t\t\tfor(int nIndex = 0;nIndex < nCount;nIndex++)\n\t\t\t{\n\t\t\t\tCTreeNodeUI* pNode = pControl->GetChildNode(nIndex);\n\t\t\t\tif(pNode){\n\t\t\t\t\tpControl->Remove(pNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCListUI::Remove(pControl);\n\t\treturn true;\n\t}\n\n\t//************************************\n\t// : RemoveAt\n\t// : bool\n\t// Ϣ: int iIndex\n\t// ˵: iIndex Լµнڵ㽫һƳ\n\t//************************************\n\tbool CTreeViewUI::RemoveAt( int iIndex )\n\t{\n\t\tCTreeNodeUI* pItem = (CTreeNodeUI*)GetItemAt(iIndex);\n\t\tif(pItem->GetCountChild())\n\t\t\tRemove(pItem);\n\t\treturn true;\n\t}\n\n\tvoid CTreeViewUI::RemoveAll()\n\t{\n\t\tCListUI::RemoveAll();\n\t}\n\n\tvoid CTreeViewUI::Notify( TNotifyUI& msg )\n\t{\n\n\t}\n\n\tbool CTreeViewUI::OnCheckBoxChanged( void* param )\n\t{\n\t\tTNotifyUI* pMsg = (TNotifyUI*)param;\n\t\tif(pMsg->sType == _T(\"selectchanged\"))\n\t\t{\n\t\t\tCCheckBoxUI* pCheckBox = (CCheckBoxUI*)pMsg->pSender;\n\t\t\tCTreeNodeUI* pItem = (CTreeNodeUI*)pCheckBox->GetParent()->GetParent();\n\t\t\tSetItemCheckBox(pCheckBox->GetCheck(),pItem);\n\t\t\treturn true;\n\t\t}\n\t\treturn true;\n\t}\n\n\tbool CTreeViewUI::OnFolderChanged( void* param )\n\t{\n\t\tTNotifyUI* pMsg = (TNotifyUI*)param;\n\t\tif(pMsg->sType == _T(\"selectchanged\"))\n\t\t{\n\t\t\tCCheckBoxUI* pFolder = (CCheckBoxUI*)pMsg->pSender;\n\t\t\tCTreeNodeUI* pItem = (CTreeNodeUI*)pFolder->GetParent()->GetParent();\n\t\t\tpItem->SetVisibleTag(pFolder->GetCheck());  //edit by:Redrain  2014.8.8\n\t\t\tSetItemExpand(pFolder->GetCheck(),pItem);\n\t\t\treturn true;\n\t\t}\n\t\treturn true;\n\t}\n\n\tbool CTreeViewUI::OnDBClickItem( void* param )\n\t{\n\t\tTNotifyUI* pMsg = (TNotifyUI*)param;\n\t\tif(pMsg->sType == _T(\"itemdbclick\"))\n\t\t{\n\t\t\tCTreeNodeUI* pItem\t\t= static_cast<CTreeNodeUI*>(pMsg->pSender);\n\t\t\tCCheckBoxUI* pFolder\t= pItem->GetFolderButton();\n\t\t\tpFolder->Selected(!pFolder->IsSelected());    //edit by:Redrain  2014.8.8\n\t\t\tpItem->SetVisibleTag(pFolder->GetCheck());\n\t\t\tSetItemExpand(pFolder->GetCheck(),pItem);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CTreeViewUI::SetItemCheckBox( bool _Selected,CTreeNodeUI* _TreeNode /*= NULL*/ )\n\t{\n\t\tif(_TreeNode)\n\t\t{\n\t\t\tif(_TreeNode->GetCountChild() > 0)\n\t\t\t{\n\t\t\t\tint nCount = _TreeNode->GetCountChild();\n\t\t\t\tfor(int nIndex = 0;nIndex < nCount;nIndex++)\n\t\t\t\t{\n\t\t\t\t\tCTreeNodeUI* pItem = _TreeNode->GetChildNode(nIndex);\n\t\t\t\t\tpItem->GetCheckBox()->Selected(_Selected);\n\t\t\t\t\tif(pItem->GetCountChild())\n\t\t\t\t\t\tSetItemCheckBox(_Selected,pItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint nIndex = 0;\n\t\t\tint nCount = GetCount();\n\t\t\twhile(nIndex < nCount)\n\t\t\t{\n\t\t\t\tCTreeNodeUI* pItem = (CTreeNodeUI*)GetItemAt(nIndex);\n\t\t\t\tpItem->GetCheckBox()->Selected(_Selected);\n\t\t\t\tif(pItem->GetCountChild())\n\t\t\t\t\tSetItemCheckBox(_Selected,pItem);\n\n\t\t\t\tnIndex++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tvoid CTreeViewUI::SetItemExpand( bool _Expanded,CTreeNodeUI* _TreeNode /*= NULL*/ )\n\t{\n\t\tif(_TreeNode)\n\t\t{\n\t\t\tif(_TreeNode->GetCountChild() > 0)\n\t\t\t{\n\t\t\t\tint nCount = _TreeNode->GetCountChild();\n\t\t\t\tfor(int nIndex = 0;nIndex < nCount;nIndex++)\n\t\t\t\t{\n\t\t\t\t\tCTreeNodeUI* pItem = _TreeNode->GetChildNode(nIndex);\n\t\t\t\t\tpItem->SetVisible(_Expanded);\n\n\t\t\t\t\tif(pItem->GetCountChild() && !pItem->GetFolderButton()->IsSelected())\n\t\t\t\t\t\tSetItemExpand(_Expanded,pItem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint nIndex = 0;\n\t\t\tint nCount = GetCount();\n\t\t\twhile(nIndex < nCount)\n\t\t\t{\n\t\t\t\tCTreeNodeUI* pItem = (CTreeNodeUI*)GetItemAt(nIndex);\n\n\t\t\t\tpItem->SetVisible(_Expanded);\n\n\t\t\t\tif(pItem->GetCountChild() && !pItem->GetFolderButton()->IsSelected())\n\t\t\t\t\tSetItemExpand(_Expanded,pItem);\n\n\t\t\t\tnIndex++;\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CTreeViewUI::SetVisibleFolderBtn( bool _IsVisibled )\n\t{\n\t\tm_bVisibleFolderBtn = _IsVisibled;\n\t\tint nCount = this->GetCount();\n\t\tfor(int nIndex = 0;nIndex < nCount;nIndex++)\n\t\t{\n\t\t\tCTreeNodeUI* pItem = static_cast<CTreeNodeUI*>(this->GetItemAt(nIndex));\n\t\t\tpItem->GetFolderButton()->SetVisible(m_bVisibleFolderBtn);\n\t\t}\n\t}\n\n\tbool CTreeViewUI::GetVisibleFolderBtn()\n\t{\n\t\treturn m_bVisibleFolderBtn;\n\t}\n\n\tvoid CTreeViewUI::SetVisibleCheckBtn( bool _IsVisibled )\n\t{\n\t\tm_bVisibleCheckBtn = _IsVisibled;\n\t\tint nCount = this->GetCount();\n\t\tfor(int nIndex = 0;nIndex < nCount;nIndex++)\n\t\t{\n\t\t\tCTreeNodeUI* pItem = static_cast<CTreeNodeUI*>(this->GetItemAt(nIndex));\n\t\t\tpItem->GetCheckBox()->SetVisible(m_bVisibleCheckBtn);\n\t\t}\n\t}\n\n\tbool CTreeViewUI::GetVisibleCheckBtn()\n\t{\n\t\treturn m_bVisibleCheckBtn;\n\t}\n\n\tvoid CTreeViewUI::SetItemMinWidth( UINT _ItemMinWidth )\n\t{\n\t\tm_uItemMinWidth = _ItemMinWidth;\n\n\t\tfor(int nIndex = 0;nIndex < GetCount();nIndex++){\n\t\t\tCTreeNodeUI* pTreeNode = static_cast<CTreeNodeUI*>(GetItemAt(nIndex));\n\t\t\tif(pTreeNode)\n\t\t\t\tpTreeNode->SetMinWidth(GetItemMinWidth());\n\t\t}\n\t\tInvalidate();\n\t}\n\n\tUINT CTreeViewUI::GetItemMinWidth()\n\t{\n\t\treturn m_uItemMinWidth;\n\t}\n\n\tvoid CTreeViewUI::SetItemTextColor( DWORD _dwItemTextColor )\n\t{\n\t\tfor(int nIndex = 0;nIndex < GetCount();nIndex++){\n\t\t\tCTreeNodeUI* pTreeNode = static_cast<CTreeNodeUI*>(GetItemAt(nIndex));\n\t\t\tif(pTreeNode)\n\t\t\t\tpTreeNode->SetItemTextColor(_dwItemTextColor);\n\t\t}\n\t}\n\n\tvoid CTreeViewUI::SetItemHotTextColor( DWORD _dwItemHotTextColor )\n\t{\n\t\tfor(int nIndex = 0;nIndex < GetCount();nIndex++){\n\t\t\tCTreeNodeUI* pTreeNode = static_cast<CTreeNodeUI*>(GetItemAt(nIndex));\n\t\t\tif(pTreeNode)\n\t\t\t\tpTreeNode->SetItemHotTextColor(_dwItemHotTextColor);\n\t\t}\n\t}\n\n\tvoid CTreeViewUI::SetSelItemTextColor( DWORD _dwSelItemTextColor )\n\t{\n\t\tfor(int nIndex = 0;nIndex < GetCount();nIndex++){\n\t\t\tCTreeNodeUI* pTreeNode = static_cast<CTreeNodeUI*>(GetItemAt(nIndex));\n\t\t\tif(pTreeNode)\n\t\t\t\tpTreeNode->SetSelItemTextColor(_dwSelItemTextColor);\n\t\t}\n\t}\n\n\tvoid CTreeViewUI::SetSelItemHotTextColor( DWORD _dwSelHotItemTextColor )\n\t{\n\t\tfor(int nIndex = 0;nIndex < GetCount();nIndex++){\n\t\t\tCTreeNodeUI* pTreeNode = static_cast<CTreeNodeUI*>(GetItemAt(nIndex));\n\t\t\tif(pTreeNode)\n\t\t\t\tpTreeNode->SetSelItemHotTextColor(_dwSelHotItemTextColor);\n\t\t}\n\t}\n\n\tvoid CTreeViewUI::SetAttribute( LPCTSTR pstrName, LPCTSTR pstrValue )\n\t{\n\t\tif(_tcscmp(pstrName,_T(\"visiblefolderbtn\")) == 0)\n\t\t\tSetVisibleFolderBtn(_tcscmp(pstrValue,_T(\"true\")) == 0);\n\t\telse if(_tcscmp(pstrName,_T(\"visiblecheckbtn\")) == 0)\n\t\t\tSetVisibleCheckBtn(_tcscmp(pstrValue,_T(\"true\")) == 0);\n\t\telse if(_tcscmp(pstrName,_T(\"itemminwidth\")) == 0)\n\t\t\tSetItemMinWidth(_ttoi(pstrValue));\n\t\telse if(_tcscmp(pstrName, _T(\"itemtextcolor\")) == 0 ){\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetItemTextColor(clrColor);\n\t\t}\n\t\telse if(_tcscmp(pstrName, _T(\"itemhottextcolor\")) == 0 ){\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetItemHotTextColor(clrColor);\n\t\t}\n\t\telse if(_tcscmp(pstrName, _T(\"selitemtextcolor\")) == 0 ){\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetSelItemTextColor(clrColor);\n\t\t}\n\t\telse if(_tcscmp(pstrName, _T(\"selitemhottextcolor\")) == 0 ){\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetSelItemHotTextColor(clrColor);\n\t\t}\n\t\telse CListUI::SetAttribute(pstrName,pstrValue);\n\t}\n\n}"
  },
  {
    "path": "DuiLib/Control/UITreeView.h",
    "content": "#ifndef UITreeView_h__\n#define UITreeView_h__\n\n//#include <vector>\nusing namespace std;\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass CTreeViewUI;\n\tclass CCheckBoxUI;\n\tclass CLabelUI;\n\tclass COptionUI;\n\n\tclass UILIB_API CTreeNodeUI : public CListContainerElementUI\n\t{\n\tpublic:\n\t\tCTreeNodeUI(CTreeNodeUI* _ParentNode = NULL);\n\t\t~CTreeNodeUI(void);\n\n\tpublic:\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID\tGetInterface(LPCTSTR pstrName);\n\t\tvoid\tDoEvent(TEventUI& event);\n\t\tvoid\tInvalidate(); \n\t\tbool\tSelect(bool bSelect = true);\n\n\t\tbool\tAdd(CControlUI* _pTreeNodeUI);\n\t\tbool\tAddAt(CControlUI* pControl, int iIndex);\n\t\tbool\tRemove(CControlUI* pControl);\n\n\t\tvoid\tSetVisibleTag(bool _IsVisible);\n\t\tbool\tGetVisibleTag();\n\t\tvoid\tSetItemText(LPCTSTR pstrValue);\n\t\tCDuiString\tGetItemText();\n\t\tvoid\tCheckBoxSelected(bool _Selected);\n\t\tbool\tIsCheckBoxSelected() const;\n\t\tbool\tIsHasChild() const;\n\t\tlong\tGetTreeLevel() const;\n\t\tbool\tAddChildNode(CTreeNodeUI* _pTreeNodeUI);\n\t\tbool\tRemoveAt(CTreeNodeUI* _pTreeNodeUI);\n\t\tvoid\tSetParentNode(CTreeNodeUI* _pParentTreeNode);\n\t\tCTreeNodeUI* GetParentNode();\n\t\tlong\tGetCountChild();\n\t\tvoid\tSetTreeView(CTreeViewUI* _CTreeViewUI);\n\t\tCTreeViewUI* GetTreeView();\n\t\tCTreeNodeUI* GetChildNode(int _nIndex);\n\t\tvoid\tSetVisibleFolderBtn(bool _IsVisibled);\n\t\tbool\tGetVisibleFolderBtn();\n\t\tvoid\tSetVisibleCheckBtn(bool _IsVisibled);\n\t\tbool\tGetVisibleCheckBtn();\n\t\tvoid\tSetItemTextColor(DWORD _dwItemTextColor);\n\t\tDWORD\tGetItemTextColor() const;\n\t\tvoid\tSetItemHotTextColor(DWORD _dwItemHotTextColor);\n\t\tDWORD\tGetItemHotTextColor() const;\n\t\tvoid\tSetSelItemTextColor(DWORD _dwSelItemTextColor);\n\t\tDWORD\tGetSelItemTextColor() const;\n\t\tvoid\tSetSelItemHotTextColor(DWORD _dwSelHotItemTextColor);\n\t\tDWORD\tGetSelItemHotTextColor() const;\n\n\t\tvoid\tSetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tCStdPtrArray GetTreeNodes();\n\n\t\tint\t\t\t GetTreeIndex();\n\t\tint\t\t\t GetNodeIndex();\n\n\tprivate:\n\t\tCTreeNodeUI* GetLastNode();\n\t\tCTreeNodeUI* CalLocation(CTreeNodeUI* _pTreeNodeUI);\n\tpublic:\n\t\tCHorizontalLayoutUI*\tGetTreeNodeHoriznotal() const {return pHoriz;};\n\t\tCCheckBoxUI*\t\t\tGetFolderButton() const {return pFolderButton;};\n\t\tCLabelUI*\t\t\t\tGetDottedLine() const {return pDottedLine;};\n\t\tCCheckBoxUI*\t\t\tGetCheckBox() const {return pCheckBox;};\n\t\tCOptionUI*\t\t\t\tGetItemButton() const {return pItemButton;};\n\n\tpublic:\n\t\tlong\tm_iTreeLavel;\n\t\tbool\tm_bIsVisable;\n\t\tbool\tm_bIsCheckBox;\n\t\tDWORD\tm_dwItemTextColor;\n\t\tDWORD\tm_dwItemHotTextColor;\n\t\tDWORD\tm_dwSelItemTextColor;\n\t\tDWORD\tm_dwSelItemHotTextColor;\n\n\t\tCTreeViewUI*\t\t\tpTreeView;\n\t\tCHorizontalLayoutUI*\tpHoriz;\n\t\tCCheckBoxUI*\t\t\tpFolderButton;\n\t\tCLabelUI*\t\t\t\tpDottedLine;\n\t\tCCheckBoxUI*\t\t\tpCheckBox;\n\t\tCOptionUI*\t\t\t\tpItemButton;\n\n\t\tCTreeNodeUI*\t\t\tpParentTreeNode;\n\n\t\tCStdPtrArray\t\t\tmTreeNodes;\n\t};\n\n\tclass UILIB_API CTreeViewUI : public CListUI,public INotifyUI\n\t{\n\tpublic:\n\t\tCTreeViewUI(void);\n\t\t~CTreeViewUI(void);\n\n\tpublic:\n\t\tvirtual LPCTSTR GetClass() const;\n\t\tvirtual LPVOID\tGetInterface(LPCTSTR pstrName);\n\t\tvirtual bool Add(CTreeNodeUI* pControl );\n\t\tvirtual long AddAt(CTreeNodeUI* pControl, int iIndex );\n\t\tvirtual bool AddAt(CTreeNodeUI* pControl,CTreeNodeUI* _IndexNode);\n\t\tvirtual bool Remove(CTreeNodeUI* pControl);\n\t\tvirtual bool RemoveAt(int iIndex);\n\t\tvirtual void RemoveAll();\n\t\tvirtual bool OnCheckBoxChanged(void* param);\n\t\tvirtual bool OnFolderChanged(void* param);\n\t\tvirtual bool OnDBClickItem(void* param);\n\t\tvirtual bool SetItemCheckBox(bool _Selected,CTreeNodeUI* _TreeNode = NULL);\n\t\tvirtual void SetItemExpand(bool _Expanded,CTreeNodeUI* _TreeNode = NULL);\n\t\tvirtual void Notify(TNotifyUI& msg);\n\t\tvirtual void SetVisibleFolderBtn(bool _IsVisibled);\n\t\tvirtual bool GetVisibleFolderBtn();\n\t\tvirtual void SetVisibleCheckBtn(bool _IsVisibled);\n\t\tvirtual bool GetVisibleCheckBtn();\n\t\tvirtual void SetItemMinWidth(UINT _ItemMinWidth);\n\t\tvirtual UINT GetItemMinWidth();\n\t\tvirtual void SetItemTextColor(DWORD _dwItemTextColor);\n\t\tvirtual void SetItemHotTextColor(DWORD _dwItemHotTextColor);\n\t\tvirtual void SetSelItemTextColor(DWORD _dwSelItemTextColor);\n\t\tvirtual void SetSelItemHotTextColor(DWORD _dwSelHotItemTextColor);\n\n\t\tvirtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\tprivate:\n\t\tUINT m_uItemMinWidth;\n\t\tbool m_bVisibleFolderBtn;\n\t\tbool m_bVisibleCheckBtn;\n\t};\n}\n\n\n#endif // UITreeView_h__\n"
  },
  {
    "path": "DuiLib/Control/UIWebBrowser.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"UIWebBrowser.h\"\n#include <atlconv.h>\n#include <atlcomcli.h>\n#include <atltrace.h>\n#include \"../Utils/downloadmgr.h\"\n#include <mshtml.h>\n\n\nDuiLib::CWebBrowserUI::CWebBrowserUI()\n\t: m_pWebBrowser2(NULL)\n\t, _pHtmlWnd2(NULL)\n\t, m_pWebBrowserEventHandler(NULL)\n\t, m_bAutoNavi(false)\n\t, m_dwRef(0)\n\t, m_dwCookie(0)\n{\n\tm_clsid=CLSID_WebBrowser;\n\tm_sHomePage.Empty();\n\tm_pWebBrowserEventHandler = m_pDefaultWebBrowserEventHandler=new CWebBrowserEventHandler;\n}\n\nDuiLib::CWebBrowserUI::~CWebBrowserUI( )\n{\n\tReleaseControl( );\n\n\tif (m_pDefaultWebBrowserEventHandler)\n\t{\n\t\tdelete m_pDefaultWebBrowserEventHandler;\n\t\tm_pDefaultWebBrowserEventHandler = NULL;\n\t}\n}\n\nbool DuiLib::CWebBrowserUI::DoCreateControl()\n{\n\tif (!CActiveXUI::DoCreateControl())\n\t\treturn false;\n\tGetManager()->AddTranslateAccelerator(this);\n\tGetControl(IID_IWebBrowser2,(LPVOID*)&m_pWebBrowser2);\n\tif ( m_bAutoNavi)\n\t{\n\t\tif (!m_sHomePage.IsEmpty( ))\n\t\t{\n\t\t\tthis->Navigate2(m_sHomePage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis->Navigate2(_T(\"about:blank\"));\n\t\t}\n\n\t}\n\tRegisterEventHandler(TRUE);\n\treturn true;\n}\n\nvoid DuiLib::CWebBrowserUI::ReleaseControl()\n{\n\tm_bCreated=false;\n\tGetManager()->RemoveTranslateAccelerator(this);\n\tRegisterEventHandler(FALSE);\n}\n\n\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::GetTypeInfoCount( UINT *iTInfo )\n{\n\t*iTInfo = 0;\n\treturn E_NOTIMPL;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::GetTypeInfo( UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo )\n{\n\treturn E_NOTIMPL;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::GetIDsOfNames( REFIID riid, OLECHAR **rgszNames, UINT cNames, LCID lcid,DISPID *rgDispId )\n{\n\treturn E_NOTIMPL;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::Invoke( DISPID dispIdMember, REFIID riid, LCID lcid,WORD wFlags, DISPPARAMS* pDispParams,VARIANT* pVarResult, EXCEPINFO* pExcepInfo,UINT* puArgErr )\n{\n\tif ((riid != IID_NULL))\n\t\treturn E_INVALIDARG;\n\n\tswitch(dispIdMember)\n\t{\n\tcase DISPID_BEFORENAVIGATE2:\n\t\tBeforeNavigate2(\n\t\t\tpDispParams->rgvarg[6].pdispVal,\n\t\t\tpDispParams->rgvarg[5].pvarVal,\n\t\t\tpDispParams->rgvarg[4].pvarVal,\n\t\t\tpDispParams->rgvarg[3].pvarVal,\n\t\t\tpDispParams->rgvarg[2].pvarVal,\n\t\t\tpDispParams->rgvarg[1].pvarVal,\n\t\t\tpDispParams->rgvarg[0].pboolVal);\n\t\tbreak;\n\tcase DISPID_COMMANDSTATECHANGE:\n\t\tCommandStateChange(\n\t\t\tpDispParams->rgvarg[1].lVal,\n\t\t\tpDispParams->rgvarg[0].boolVal);\n\t\tbreak;\n\tcase DISPID_NAVIGATECOMPLETE2:\n\t\tNavigateComplete2(\n\t\t\tpDispParams->rgvarg[1].pdispVal,\n\t\t\tpDispParams->rgvarg[0].pvarVal);\n\t\tbreak;\n\tcase DISPID_NAVIGATEERROR:\n\t\tNavigateError(\n\t\t\tpDispParams->rgvarg[4].pdispVal,\n\t\t\tpDispParams->rgvarg[3].pvarVal,\n\t\t\tpDispParams->rgvarg[2].pvarVal,\n\t\t\tpDispParams->rgvarg[1].pvarVal,\n\t\t\tpDispParams->rgvarg[0].pboolVal);\n\t\tbreak;\n\tcase DISPID_STATUSTEXTCHANGE:\n\t\tbreak;\n\t\t//  \tcase DISPID_NEWWINDOW2:\n\t\t//  \t\tbreak;\n\tcase DISPID_NEWWINDOW3:\n\t\tNewWindow3(\n\t\t\tpDispParams->rgvarg[4].ppdispVal,\n\t\t\tpDispParams->rgvarg[3].pboolVal,\n\t\t\tpDispParams->rgvarg[2].uintVal,\n\t\t\tpDispParams->rgvarg[1].bstrVal,\n\t\t\tpDispParams->rgvarg[0].bstrVal);\n\t\tbreak;\n\tcase DISPID_DOCUMENTCOMPLETE:\n\t\tDocmentComplete(\n\t\t\tpDispParams->rgvarg[1].pdispVal,\n\t\t\tpDispParams->rgvarg[0].pvarVal);\n\t\tbreak;\n\tcase DISPID_NEWWINDOW2:\n\t\tNewWindow2(pDispParams->rgvarg[0].pboolVal,\n\t\t\tpDispParams->rgvarg[5].bstrVal);\n\t\tbreak;\n\t\t// \tcase DISPID_PROPERTYCHANGE:\n\t\t// \t\tif (pDispParams->cArgs>0 && pDispParams->rgvarg[0].vt == VT_BSTR) {\n\t\t// \t\t\tTRACE(_T(\"PropertyChange(%s)\\n\"), pDispParams->rgvarg[0].bstrVal);\n\t\t// \t\t}\n\t\t// \t\tbreak;\n\tdefault:\n\t\treturn DISP_E_MEMBERNOTFOUND;\n\t}\n\treturn S_OK;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::QueryInterface( REFIID riid, LPVOID *ppvObject )\n{\n\t*ppvObject = NULL;\n\n\tif( riid == IID_IDocHostUIHandler)\n\t\t*ppvObject = static_cast<IDocHostUIHandler*>(this);\n\telse if( riid == IID_IDispatch)\n\t\t*ppvObject = static_cast<IDispatch*>(this);\n\telse if( riid == IID_IServiceProvider)\n\t\t*ppvObject = static_cast<IServiceProvider*>(this);\n\telse if (riid == IID_IOleCommandTarget)\n\t\t*ppvObject = static_cast<IOleCommandTarget*>(this);\n\n\tif( *ppvObject != NULL )\n\t\tAddRef();\n\treturn *ppvObject == NULL ? E_NOINTERFACE : S_OK;\n}\n\nSTDMETHODIMP_(ULONG) DuiLib::CWebBrowserUI::AddRef()\n{\n\tInterlockedIncrement(&m_dwRef); \n\treturn m_dwRef;\n}\n\nSTDMETHODIMP_(ULONG) DuiLib::CWebBrowserUI::Release()\n{\n\tULONG ulRefCount = InterlockedDecrement(&m_dwRef);\n\treturn ulRefCount; \n}\n\nvoid DuiLib::CWebBrowserUI::Navigate2( LPCTSTR lpszUrl )\n{\n\tif (lpszUrl == NULL)\n\t\treturn;\n\n\tif (m_pWebBrowser2)\n\t{\n\t\tCVariant url;\n\t\turl.vt=VT_BSTR;\n\t\turl.bstrVal=T2BSTR(lpszUrl);\n\t\tHRESULT hr = m_pWebBrowser2->Navigate2(&url, NULL, NULL, NULL, NULL);\n\t}\n}\n\nvoid DuiLib::CWebBrowserUI::Refresh()\n{\n\tif (m_pWebBrowser2)\n\t{\n\t\tm_pWebBrowser2->Refresh();\n\t}\n}\nvoid DuiLib::CWebBrowserUI::GoBack()\n{\n\tif (m_pWebBrowser2)\n\t{\n\t\tm_pWebBrowser2->GoBack();\n\t}\n}\nvoid DuiLib::CWebBrowserUI::GoForward()\n{\n\tif (m_pWebBrowser2)\n\t{\n\t\tm_pWebBrowser2->GoForward();\n\t}\n}\n/// DWebBrowserEvents2\nvoid DuiLib::CWebBrowserUI::BeforeNavigate2( IDispatch *pDisp,VARIANT *&url,VARIANT *&Flags,VARIANT *&TargetFrameName,VARIANT *&PostData,VARIANT *&Headers,VARIANT_BOOL *&Cancel )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\tm_pWebBrowserEventHandler->BeforeNavigate2(pDisp,url,Flags,TargetFrameName,PostData,Headers,Cancel);\n\t}\n}\n\nvoid DuiLib::CWebBrowserUI::NavigateError( IDispatch *pDisp,VARIANT * &url,VARIANT *&TargetFrameName,VARIANT *&StatusCode,VARIANT_BOOL *&Cancel )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\tm_pWebBrowserEventHandler->NavigateError(pDisp,url,TargetFrameName,StatusCode,Cancel);\n\t}\n}\n\nvoid DuiLib::CWebBrowserUI::NavigateComplete2( IDispatch *pDisp,VARIANT *&url )\n{\n\tCComPtr<IDispatch> spDoc;   \n\tm_pWebBrowser2->get_Document(&spDoc);   \n\n\tif (spDoc)\n\t{   \n\t\tCComQIPtr<ICustomDoc, &IID_ICustomDoc> spCustomDoc(spDoc);   \n\t\tif (spCustomDoc)   \n\t\t\tspCustomDoc->SetUIHandler(this);   \n\t}\n\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\tm_pWebBrowserEventHandler->NavigateComplete2(pDisp,url);\n\t}\n}\n\nvoid DuiLib::CWebBrowserUI::ProgressChange( LONG nProgress, LONG nProgressMax )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\tm_pWebBrowserEventHandler->ProgressChange(nProgress,nProgressMax);\n\t}\n}\n\nvoid DuiLib::CWebBrowserUI::NewWindow3( IDispatch **pDisp, VARIANT_BOOL *&Cancel, DWORD dwFlags, BSTR bstrUrlContext, BSTR bstrUrl )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\tm_pWebBrowserEventHandler->NewWindow3(pDisp,Cancel,dwFlags,bstrUrlContext,bstrUrl);\n\t}\n}\nvoid DuiLib::CWebBrowserUI::NewWindow2(VARIANT_BOOL *&Cancel, BSTR bstrUrl)\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\tm_pWebBrowserEventHandler->NewWindow2(Cancel,bstrUrl);\n\t}\n}\nvoid DuiLib::CWebBrowserUI::CommandStateChange(long Command,VARIANT_BOOL Enable)\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\tm_pWebBrowserEventHandler->CommandStateChange(Command,Enable);\n\t}\n}\n\n// IDownloadManager\nSTDMETHODIMP DuiLib::CWebBrowserUI::Download( /* [in] */ IMoniker *pmk, /* [in] */ IBindCtx *pbc, /* [in] */ DWORD dwBindVerb, /* [in] */ LONG grfBINDF, /* [in] */ BINDINFO *pBindInfo, /* [in] */ LPCOLESTR pszHeaders, /* [in] */ LPCOLESTR pszRedir, /* [in] */ UINT uiCP )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->Download(pmk,pbc,dwBindVerb,grfBINDF,pBindInfo,pszHeaders,pszRedir,uiCP);\n\t}\n\treturn S_OK;\n}\n\n// IDocHostUIHandler\nSTDMETHODIMP DuiLib::CWebBrowserUI::ShowContextMenu( DWORD dwID, POINT* pptPosition, IUnknown* pCommandTarget, IDispatch* pDispatchObjectHit )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->ShowContextMenu(dwID,pptPosition,pCommandTarget,pDispatchObjectHit);\n\t}\n\treturn S_FALSE;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::GetHostInfo( DOCHOSTUIINFO* pInfo )\n{\n\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->GetHostInfo(pInfo);\n\t}\n\treturn E_NOTIMPL;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::ShowUI( DWORD dwID, IOleInPlaceActiveObject* pActiveObject, IOleCommandTarget* pCommandTarget, IOleInPlaceFrame* pFrame, IOleInPlaceUIWindow* pDoc )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->ShowUI(dwID,pActiveObject,pCommandTarget,pFrame,pDoc);\n\t}\n\treturn S_OK;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::HideUI()\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->HideUI();\n\t}\n\treturn S_OK;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::UpdateUI()\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->UpdateUI();\n\t}\n\treturn S_OK;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::EnableModeless( BOOL fEnable )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->EnableModeless(fEnable);\n\t}\n\treturn E_NOTIMPL;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::OnDocWindowActivate( BOOL fActivate )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->OnDocWindowActivate(fActivate);\n\t}\n\treturn E_NOTIMPL;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::OnFrameWindowActivate( BOOL fActivate )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->OnFrameWindowActivate(fActivate);\n\t}\n\treturn E_NOTIMPL;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::ResizeBorder( LPCRECT prcBorder, IOleInPlaceUIWindow* pUIWindow, BOOL fFrameWindow )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->ResizeBorder(prcBorder,pUIWindow,fFrameWindow);\n\t}\n\treturn E_NOTIMPL;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::TranslateAccelerator( LPMSG lpMsg, const GUID* pguidCmdGroup, DWORD nCmdID )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->TranslateAccelerator(lpMsg,pguidCmdGroup,nCmdID);\n\t}\n\treturn S_FALSE;\n}\n\nLRESULT DuiLib::CWebBrowserUI::TranslateAccelerator( MSG *pMsg )\n{\n\tif(pMsg->message < WM_KEYFIRST || pMsg->message > WM_KEYLAST)\n\t\treturn S_FALSE;\n\n\tif( m_pWebBrowser2 == NULL )\n\t\treturn E_NOTIMPL;\n\n\t// ǰWebڲǽ,ټ\n\tBOOL bIsChild = FALSE;\n\tHWND hTempWnd = NULL;\n\tHWND hWndFocus = ::GetFocus();\n\n\thTempWnd = hWndFocus;\n\twhile(hTempWnd != NULL)\n\t{\n\t\tif(hTempWnd == m_hwndHost)\n\t\t{\n\t\t\tbIsChild = TRUE;\n\t\t\tbreak;\n\t\t}\n\t\thTempWnd = ::GetParent(hTempWnd);\n\t}\n\tif(!bIsChild)\n\t\treturn S_FALSE;\n\n\tIOleInPlaceActiveObject *pObj;\n\tif (FAILED(m_pWebBrowser2->QueryInterface(IID_IOleInPlaceActiveObject, (LPVOID *)&pObj)))\n\t\treturn S_FALSE;\n\n\tHRESULT hResult = pObj->TranslateAccelerator(pMsg);\n\tpObj->Release();\n\treturn hResult;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::GetOptionKeyPath( LPOLESTR* pchKey, DWORD dwReserved )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->GetOptionKeyPath(pchKey,dwReserved);\n\t}\n\treturn E_NOTIMPL;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::GetDropTarget( IDropTarget* pDropTarget, IDropTarget** ppDropTarget )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->GetDropTarget(pDropTarget,ppDropTarget);\n\t}\n\treturn S_FALSE;\t// ʹϵͳק\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::GetExternal( IDispatch** ppDispatch )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->GetExternal(ppDispatch);\n\t}\n\treturn S_FALSE;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::TranslateUrl( DWORD dwTranslate, OLECHAR* pchURLIn, OLECHAR** ppchURLOut )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->TranslateUrl(dwTranslate,pchURLIn,ppchURLOut);\n\t}\n\telse\n\t{\n\t\t*ppchURLOut = 0;\n\t\treturn E_NOTIMPL;\n\t}\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::FilterDataObject( IDataObject* pDO, IDataObject** ppDORet )\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\treturn m_pWebBrowserEventHandler->FilterDataObject(pDO,ppDORet);\n\t}\n\telse\n\t{\n\t\t*ppDORet = 0;\n\t\treturn E_NOTIMPL;\n\t}\n}\n\nvoid DuiLib::CWebBrowserUI::SetWebBrowserEventHandler( CWebBrowserEventHandler* pEventHandler )\n{\n\tif (pEventHandler != NULL && m_pWebBrowserEventHandler != pEventHandler)\n\t{\n\t\tm_pWebBrowserEventHandler = pEventHandler;\n\t}\n}\n\nvoid DuiLib::CWebBrowserUI::Refresh2( int Level )\n{\n\tCVariant vLevel;\n\tvLevel.vt=VT_I4;\n\tvLevel.intVal=Level;\n\tm_pWebBrowser2->Refresh2(&vLevel);\n}\n\nvoid DuiLib::CWebBrowserUI::SetAttribute( LPCTSTR pstrName, LPCTSTR pstrValue )\n{\n\tif (_tcscmp(pstrName, _T(\"homepage\")) == 0)\n\t{\n\t\tm_sHomePage = pstrValue;\n\t}\n\telse if (_tcscmp(pstrName, _T(\"autonavi\"))==0)\n\t{\n\t\tm_bAutoNavi = (_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t}\n\telse\n\t\tCActiveXUI::SetAttribute(pstrName, pstrValue);\n}\n\nvoid DuiLib::CWebBrowserUI::NavigateHomePage()\n{\n\tif (!m_sHomePage.IsEmpty())\n\t\tthis->NavigateUrl(m_sHomePage);\n}\n\nvoid DuiLib::CWebBrowserUI::NavigateUrl( LPCTSTR lpszUrl )\n{\n\tif (m_pWebBrowser2 && lpszUrl)\n\t{\n\t\tm_pWebBrowser2->Navigate((BSTR)SysAllocString(T2BSTR(lpszUrl)),NULL,NULL,NULL,NULL);\n\t}\n}\n\nLPCTSTR DuiLib::CWebBrowserUI::GetClass() const\n{\n\treturn _T(\"WebBrowserUI\");\n}\n\nLPVOID DuiLib::CWebBrowserUI::GetInterface( LPCTSTR pstrName )\n{\n\tif( _tcscmp(pstrName, DUI_CTR_WEBBROWSER) == 0 ) return static_cast<CWebBrowserUI*>(this);\n\treturn CActiveXUI::GetInterface(pstrName);\n}\n\nvoid DuiLib::CWebBrowserUI::SetHomePage( LPCTSTR lpszUrl )\n{\n\tm_sHomePage.Format(_T(\"%s\"),lpszUrl);\n}\n\nLPCTSTR DuiLib::CWebBrowserUI::GetHomePage()\n{\n\treturn m_sHomePage;\n}\n\nvoid DuiLib::CWebBrowserUI::SetAutoNavigation( bool bAuto /*= TRUE*/ )\n{\n\tif (m_bAutoNavi==bAuto)\treturn;\n\n\tm_bAutoNavi=bAuto;\n}\n\nbool DuiLib::CWebBrowserUI::IsAutoNavigation()\n{\n\treturn m_bAutoNavi;\n}\n\nSTDMETHODIMP DuiLib::CWebBrowserUI::QueryService( REFGUID guidService, REFIID riid, void** ppvObject )\n{\n\tHRESULT hr = E_NOINTERFACE;\n\t*ppvObject = NULL;\n\n\tif ( guidService == SID_SDownloadManager && riid == IID_IDownloadManager)\n\t{\n\t\t*ppvObject = this;\n\t\treturn S_OK;\n\t}\n\n\treturn hr;\n}\n\nHRESULT DuiLib::CWebBrowserUI::RegisterEventHandler( BOOL inAdvise )\n{\n\tCComPtr<IWebBrowser2> pWebBrowser;\n\tCComPtr<IConnectionPointContainer>  pCPC;\n\tCComPtr<IConnectionPoint> pCP;\n\tHRESULT hr = GetControl(IID_IWebBrowser2, (void**)&pWebBrowser);\n\tif (FAILED(hr))\n\t\treturn hr;\n\thr=pWebBrowser->QueryInterface(IID_IConnectionPointContainer,(void **)&pCPC);\n\tif (FAILED(hr))\n\t\treturn hr;\n\thr=pCPC->FindConnectionPoint(DIID_DWebBrowserEvents2,&pCP);\n\tif (FAILED(hr))\n\t\treturn hr;\n\n\tif (inAdvise)\n\t{\n\t\thr = pCP->Advise((IDispatch*)this, &m_dwCookie);\n\t}\n\telse\n\t{\n\t\thr = pCP->Unadvise(m_dwCookie);\n\t}\n\treturn hr; \n}\n\nDISPID DuiLib::CWebBrowserUI::FindId( IDispatch *pObj, LPOLESTR pName )\n{\n\tDISPID id = 0;\n\tif(FAILED(pObj->GetIDsOfNames(IID_NULL,&pName,1,LOCALE_SYSTEM_DEFAULT,&id))) id = -1;\n\treturn id;\n}\n\nHRESULT DuiLib::CWebBrowserUI::InvokeMethod( IDispatch *pObj, LPOLESTR pMehtod, VARIANT *pVarResult, VARIANT *ps, int cArgs )\n{\n\tDISPID dispid = FindId(pObj, pMehtod);\n\tif(dispid == -1) return E_FAIL;\n\n\tDISPPARAMS dispparams;\n\tdispparams.cArgs = cArgs;\n\tdispparams.rgvarg = ps;\n\tdispparams.cNamedArgs = 0;\n\tdispparams.rgdispidNamedArgs = NULL;\n\n\treturn pObj->Invoke(dispid, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, &dispparams, pVarResult, NULL, NULL);\n}\n\nHRESULT DuiLib::CWebBrowserUI::GetProperty( IDispatch *pObj, LPOLESTR pName, VARIANT *pValue )\n{\n\tDISPID dispid = FindId(pObj, pName);\n\tif(dispid == -1) return E_FAIL;\n\n\tDISPPARAMS ps;\n\tps.cArgs = 0;\n\tps.rgvarg = NULL;\n\tps.cNamedArgs = 0;\n\tps.rgdispidNamedArgs = NULL;\n\n\treturn pObj->Invoke(dispid, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_PROPERTYGET, &ps, pValue, NULL, NULL);\n}\n\nHRESULT DuiLib::CWebBrowserUI::SetProperty( IDispatch *pObj, LPOLESTR pName, VARIANT *pValue )\n{\n\tDISPID dispid = FindId(pObj, pName);\n\tif(dispid == -1) return E_FAIL;\n\n\tDISPPARAMS ps;\n\tps.cArgs = 1;\n\tps.rgvarg = pValue;\n\tps.cNamedArgs = 0;\n\tps.rgdispidNamedArgs = NULL;\n\n\treturn pObj->Invoke(dispid, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_PROPERTYPUT, &ps, NULL, NULL, NULL);\n}\n\nIDispatch* DuiLib::CWebBrowserUI::GetHtmlWindow()\n{\n\tIDispatch* pDp =  NULL;\n\tHRESULT hr;\n\tif (m_pWebBrowser2)\n\t\thr=m_pWebBrowser2->get_Document(&pDp);\n\n\tif (FAILED(hr))\n\t\treturn NULL;\n\n\tCComQIPtr<IHTMLDocument2> pHtmlDoc2 = pDp;\n\n\tif (pHtmlDoc2 == NULL)\n\t\treturn NULL;\n\n\thr=pHtmlDoc2->get_parentWindow(&_pHtmlWnd2);\n\n\tif (FAILED(hr))\n\t\treturn NULL;\n\n\tIDispatch *pHtmlWindown = NULL;\n\thr=_pHtmlWnd2->QueryInterface(IID_IDispatch, (void**)&pHtmlWindown);\n\tif (FAILED(hr))\n\t\treturn NULL;\n\n\treturn pHtmlWindown;\n}\n\nIWebBrowser2* DuiLib::CWebBrowserUI::GetWebBrowser2( void )\n{\n\treturn m_pWebBrowser2;\n}\n\nHRESULT STDMETHODCALLTYPE DuiLib::CWebBrowserUI::QueryStatus( __RPC__in_opt const GUID *pguidCmdGroup, ULONG cCmds, __RPC__inout_ecount_full(cCmds ) OLECMD prgCmds[ ], __RPC__inout_opt OLECMDTEXT *pCmdText )\n{\n\tHRESULT hr = OLECMDERR_E_NOTSUPPORTED;\n\treturn hr;\n}\n\nHRESULT STDMETHODCALLTYPE DuiLib::CWebBrowserUI::Exec( __RPC__in_opt const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, __RPC__in_opt VARIANT *pvaIn, __RPC__inout_opt VARIANT *pvaOut )\n{\n\tHRESULT hr = S_OK;\n\n\tif (pguidCmdGroup && IsEqualGUID(*pguidCmdGroup, CGID_DocHostCommandHandler))\n\t{\n\n\t\tswitch (nCmdID) \n\t\t{\n\n\t\tcase OLECMDID_SHOWSCRIPTERROR:\n\t\t\t{\n\t\t\t\tIHTMLDocument2*             pDoc = NULL;\n\t\t\t\tIHTMLWindow2*               pWindow = NULL;\n\t\t\t\tIHTMLEventObj*              pEventObj = NULL;\n\t\t\t\tBSTR                        rgwszNames[5] = \n\t\t\t\t{ \n\t\t\t\t\t::SysAllocString(L\"errorLine\"),\n\t\t\t\t\t::SysAllocString(L\"errorCharacter\"),\n\t\t\t\t\t::SysAllocString(L\"errorCode\"),\n\t\t\t\t\t::SysAllocString(L\"errorMessage\"),\n\t\t\t\t\t::SysAllocString(L\"errorUrl\")\n\t\t\t\t};\n\t\t\t\tDISPID                      rgDispIDs[5];\n\t\t\t\tVARIANT                     rgvaEventInfo[5];\n\t\t\t\tDISPPARAMS                  params;\n\t\t\t\tBOOL                        fContinueRunningScripts = true;\n\t\t\t\tint                         i;\n\n\t\t\t\tparams.cArgs = 0;\n\t\t\t\tparams.cNamedArgs = 0;\n\n\t\t\t\t// Get the document that is currently being viewed.\n\t\t\t\thr = pvaIn->punkVal->QueryInterface(IID_IHTMLDocument2, (void **) &pDoc);    \n\t\t\t\t// Get document.parentWindow.\n\t\t\t\thr = pDoc->get_parentWindow(&pWindow);\n\t\t\t\tpDoc->Release();\n\t\t\t\t// Get the window.event object.\n\t\t\t\thr = pWindow->get_event(&pEventObj);\n\t\t\t\t// Get the error info from the window.event object.\n\t\t\t\tfor (i = 0; i < 5; i++) \n\t\t\t\t{  \n\t\t\t\t\t// Get the property's dispID.\n\t\t\t\t\thr = pEventObj->GetIDsOfNames(IID_NULL, &rgwszNames[i], 1, \n\t\t\t\t\t\tLOCALE_SYSTEM_DEFAULT, &rgDispIDs[i]);\n\t\t\t\t\t// Get the value of the property.\n\t\t\t\t\thr = pEventObj->Invoke(rgDispIDs[i], IID_NULL,\n\t\t\t\t\t\tLOCALE_SYSTEM_DEFAULT,\n\t\t\t\t\t\tDISPATCH_PROPERTYGET, &params, &rgvaEventInfo[i],\n\t\t\t\t\t\tNULL, NULL);\n\t\t\t\t\tSysFreeString(rgwszNames[i]);\n\t\t\t\t}\n\n\t\t\t\t// At this point, you would normally alert the user with \n\t\t\t\t// the information about the error, which is now contained\n\t\t\t\t// in rgvaEventInfo[]. Or, you could just exit silently.\n\n\t\t\t\t(*pvaOut).vt = VT_BOOL;\n\t\t\t\tif (fContinueRunningScripts)\n\t\t\t\t{\n\t\t\t\t\t// Continue running scripts on the page.\n\t\t\t\t\t(*pvaOut).boolVal = VARIANT_TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Stop running scripts on the page.\n\t\t\t\t\t(*pvaOut).boolVal = VARIANT_FALSE;   \n\t\t\t\t} \n\t\t\t\tbreak;\n\t\t\t}\n\t\tdefault:\n\t\t\thr = OLECMDERR_E_NOTSUPPORTED;\n\t\t\tbreak;\n\t\t}\n\t}\n\telse\n\t{\n\t\thr = OLECMDERR_E_UNKNOWNGROUP;\n\t}\n\treturn (hr);\n}\nbool DuiLib::CWebBrowserUI::CallJScript(const CDuiString& strFunc, const CDuiString& param, VARIANT* pVarResult)\n{\n\tCComPtr<IDispatch>   pScript;\n\tIDispatch* pDp = NULL;\n\tHRESULT hr;\n\tif (m_pWebBrowser2)\n\t\thr = m_pWebBrowser2->get_Document(&pDp);\n\n\tif (FAILED(hr))\n\t\treturn NULL;\n\n\tCComQIPtr<IHTMLDocument2> pHtmlDoc2 = pDp;\n\n\tif (pHtmlDoc2 == NULL)\n\t\treturn false;\n\t//ȡű\n\tpHtmlDoc2->get_Script(&pScript);\n\tif (NULL == pScript)\n\t{\n\t\treturn false;\n\t}\n\tCComBSTR bstrMember(strFunc);\n\tDISPID dispid;\n\thr = pScript->GetIDsOfNames(IID_NULL, &bstrMember, 1, LOCALE_SYSTEM_DEFAULT, &dispid);\n\tif (!SUCCEEDED(hr))\n\t{\n\t\treturn false;\n\t}\n\n\tDISPPARAMS dispparams;\n\tmemset(&dispparams, 0, sizeof(DISPPARAMS));\n\tdispparams.cArgs = 1;\n\tdispparams.rgvarg = new VARIANT[dispparams.cArgs];\n\tCComBSTR bstr(param);\n\tbstr.CopyTo(&dispparams.rgvarg[0].bstrVal);\n\tdispparams.rgvarg[0].vt = VT_BSTR;\n\tdispparams.cNamedArgs = 0;\n\n\tEXCEPINFO excepInfo;\n\tmemset(&excepInfo, 0, sizeof(EXCEPINFO));\n\tCComVariant vaResult;\n\t// initialize to invalid arg\n\tUINT nArgErr = (UINT)-1;\n\t// ִjs\n\thr = pScript->Invoke(dispid, IID_NULL, 0\n\t\t, DISPATCH_METHOD, &dispparams, &vaResult, &excepInfo, &nArgErr);\n\tdelete[] dispparams.rgvarg;\n\tif (!SUCCEEDED(hr))\n\t{\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nvoid DuiLib::CWebBrowserUI::DocmentComplete(IDispatch *pDisp, VARIANT *&url)\n{\n\tif (m_pWebBrowserEventHandler)\n\t{\n\t\tm_pWebBrowserEventHandler->DocmentComplete(pDisp, url);\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Control/UIWebBrowser.h",
    "content": "#ifndef __UIWEBBROWSER_H__\n#define __UIWEBBROWSER_H__\n\n#pragma once\n\n#include <MsHTML.h>\n//#pragma comment(lib,\"atlsd.lib\")\n\n#include \"../Utils/WebBrowserEventHandler.h\"\n#include <ExDisp.h>\n\nnamespace DuiLib\n{\n\tclass UILIB_API CWebBrowserUI\n\t\t: public CActiveXUI\n\t\t, public IDocHostUIHandler\n\t\t, public IServiceProvider\n\t\t, public IOleCommandTarget\n\t\t, public IDispatch\n\t\t, public ITranslateAccelerator\n\t{\n\tpublic:\n\t\t/// 캯\n\t\tCWebBrowserUI();\n\t\tvirtual ~CWebBrowserUI();\n\n\t\tvoid SetHomePage(LPCTSTR lpszUrl);\n\t\tLPCTSTR GetHomePage();\n\n\t\tvoid SetAutoNavigation(bool bAuto = TRUE);\n\t\tbool IsAutoNavigation();\n\n\t\tvoid SetWebBrowserEventHandler(CWebBrowserEventHandler* pEventHandler);\n\t\tvoid Navigate2(LPCTSTR lpszUrl);\n\t\tvoid Refresh();\n\t\tvoid Refresh2(int Level);\n\t\tvoid GoBack();\n\t\tvoid GoForward();\n\t\tvoid NavigateHomePage();\n\t\tvoid NavigateUrl(LPCTSTR lpszUrl);\n\t\tbool CallJScript(const CDuiString& strFunc, const CDuiString& paramArray, VARIANT* pVarResult);//JS\n\t\tvirtual bool DoCreateControl();\n\t\tIWebBrowser2* GetWebBrowser2(void);\n\t\tIDispatch*\t\t   GetHtmlWindow();\n\t\tstatic DISPID FindId(IDispatch *pObj, LPOLESTR pName);\n\t\tstatic HRESULT InvokeMethod(IDispatch *pObj, LPOLESTR pMehtod, VARIANT *pVarResult, VARIANT *ps, int cArgs);\n\t\tstatic HRESULT GetProperty(IDispatch *pObj, LPOLESTR pName, VARIANT *pValue);\n\t\tstatic HRESULT SetProperty(IDispatch *pObj, LPOLESTR pName, VARIANT *pValue);\n\n\tprotected:\n\t\tIWebBrowser2*\t\t\tm_pWebBrowser2; //ָ\n\t\tIHTMLWindow2*\t\t\t_pHtmlWnd2;\n\t\tLONG m_dwRef;\n\t\tDWORD m_dwCookie;\n\t\tvirtual void ReleaseControl();\n\t\tHRESULT RegisterEventHandler(BOOL inAdvise);\n\t\tvirtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\t\tCDuiString m_sHomePage;\t// Ĭҳ\n\t\tbool m_bAutoNavi;\t// ǷʱĬҳ\n\t\tCWebBrowserEventHandler* m_pWebBrowserEventHandler;\t//¼\n\t\tCWebBrowserEventHandler* m_pDefaultWebBrowserEventHandler;\t//¼\n\n\t\t// DWebBrowserEvents2\n\t\tvoid BeforeNavigate2( IDispatch *pDisp,VARIANT *&url,VARIANT *&Flags,VARIANT *&TargetFrameName,VARIANT *&PostData,VARIANT *&Headers,VARIANT_BOOL *&Cancel );\n\t\tvoid NavigateError(IDispatch *pDisp,VARIANT * &url,VARIANT *&TargetFrameName,VARIANT *&StatusCode,VARIANT_BOOL *&Cancel);\n\t\tvoid NavigateComplete2(IDispatch *pDisp,VARIANT *&url);\n\t\tvoid ProgressChange(LONG nProgress, LONG nProgressMax);\n\t\tvoid NewWindow3(IDispatch **pDisp, VARIANT_BOOL *&Cancel, DWORD dwFlags, BSTR bstrUrlContext, BSTR bstrUrl);\n\t\tvoid NewWindow2(VARIANT_BOOL *&Cancel, BSTR bstrUrl);\n\t\tvoid CommandStateChange(long Command,VARIANT_BOOL Enable);\n\t\tvoid DocmentComplete(IDispatch *pDisp, VARIANT *&url);\n\tpublic:\n\t\tvirtual LPCTSTR GetClass() const;\n\t\tvirtual LPVOID GetInterface( LPCTSTR pstrName );\n\n\t\t// IUnknown\n\t\tSTDMETHOD_(ULONG,AddRef)();\n\t\tSTDMETHOD_(ULONG,Release)();\n\t\tSTDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppvObject);\n\n\t\t// IDispatch\n\t\tvirtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount( __RPC__out UINT *pctinfo );\n\t\tvirtual HRESULT STDMETHODCALLTYPE GetTypeInfo( UINT iTInfo, LCID lcid, __RPC__deref_out_opt ITypeInfo **ppTInfo );\n\t\tvirtual HRESULT STDMETHODCALLTYPE GetIDsOfNames( __RPC__in REFIID riid, __RPC__in_ecount_full(cNames ) LPOLESTR *rgszNames, UINT cNames, LCID lcid, __RPC__out_ecount_full(cNames) DISPID *rgDispId);\n\t\tvirtual HRESULT STDMETHODCALLTYPE Invoke( DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr );\n\n\t\t// IDocHostUIHandler\n\t\tSTDMETHOD(ShowContextMenu)(DWORD dwID, POINT* pptPosition, IUnknown* pCommandTarget, IDispatch* pDispatchObjectHit);\n\t\tSTDMETHOD(GetHostInfo)(DOCHOSTUIINFO* pInfo);\n\t\tSTDMETHOD(ShowUI)(DWORD dwID, IOleInPlaceActiveObject* pActiveObject, IOleCommandTarget* pCommandTarget, IOleInPlaceFrame* pFrame, IOleInPlaceUIWindow* pDoc);\n\t\tSTDMETHOD(HideUI)();\n\t\tSTDMETHOD(UpdateUI)();\n\t\tSTDMETHOD(EnableModeless)(BOOL fEnable);\n\t\tSTDMETHOD(OnDocWindowActivate)(BOOL fActivate);\n\t\tSTDMETHOD(OnFrameWindowActivate)(BOOL fActivate);\n\t\tSTDMETHOD(ResizeBorder)(LPCRECT prcBorder, IOleInPlaceUIWindow* pUIWindow, BOOL fFrameWindow);\n\t\tSTDMETHOD(TranslateAccelerator)(LPMSG lpMsg, const GUID* pguidCmdGroup, DWORD nCmdID);\t//Ϣ\n\t\tSTDMETHOD(GetOptionKeyPath)(LPOLESTR* pchKey, DWORD dwReserved);\n\t\tSTDMETHOD(GetDropTarget)(IDropTarget* pDropTarget, IDropTarget** ppDropTarget);\n\t\tSTDMETHOD(GetExternal)(IDispatch** ppDispatch);\n\t\tSTDMETHOD(TranslateUrl)(DWORD dwTranslate, OLECHAR* pchURLIn, OLECHAR** ppchURLOut);\n\t\tSTDMETHOD(FilterDataObject)(IDataObject* pDO, IDataObject** ppDORet);\n\n\t\t// IServiceProvider\n\t\tSTDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void** ppvObject);\n\n\t\t// IOleCommandTarget\n\t\tvirtual HRESULT STDMETHODCALLTYPE QueryStatus( __RPC__in_opt const GUID *pguidCmdGroup, ULONG cCmds, __RPC__inout_ecount_full(cCmds ) OLECMD prgCmds[ ], __RPC__inout_opt OLECMDTEXT *pCmdText);\n\t\tvirtual HRESULT STDMETHODCALLTYPE Exec( __RPC__in_opt const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, __RPC__in_opt VARIANT *pvaIn, __RPC__inout_opt VARIANT *pvaOut );\n\n\t\t// IDownloadManager\n\t\tSTDMETHOD(Download)( \n\t\t\t/* [in] */ IMoniker *pmk,\n\t\t\t/* [in] */ IBindCtx *pbc,\n\t\t\t/* [in] */ DWORD dwBindVerb,\n\t\t\t/* [in] */ LONG grfBINDF,\n\t\t\t/* [in] */ BINDINFO *pBindInfo,\n\t\t\t/* [in] */ LPCOLESTR pszHeaders,\n\t\t\t/* [in] */ LPCOLESTR pszRedir,\n\t\t\t/* [in] */ UINT uiCP);\n\n\t\t// ITranslateAccelerator\n\t\t// DuilibϢַWebBrowser\n\t\tvirtual LRESULT TranslateAccelerator( MSG *pMsg );\n\t};\n} // namespace DuiLib\n#endif // __UIWEBBROWSER_H__"
  },
  {
    "path": "DuiLib/Core/UIBase.cpp",
    "content": "#include \"StdAfx.h\"\n\n#ifdef _DEBUG\n#include <shlwapi.h>\n#pragma comment(lib, \"shlwapi.lib\")\n#endif\n\nnamespace DuiLib {\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tvoid UILIB_API DUI__Trace(LPCTSTR pstrFormat, ...)\n\t{\n#ifdef _DEBUG\n\t\tCDuiString strMsg;\n\t\tva_list Args;\n\n\t\tva_start(Args, pstrFormat);\n\t\tstrMsg.Format(pstrFormat, Args);\n\t\tva_end(Args);\n\n\t\tstrMsg += _T(\"\\n\");\n\t\tOutputDebugString(strMsg.GetData());\n\n#endif\n\t}\n\n\tLPCTSTR DUI__TraceMsg(UINT uMsg)\n\t{\n#define MSGDEF(x) if(uMsg==x) return _T(#x)\n\t\tMSGDEF(WM_SETCURSOR);\n\t\tMSGDEF(WM_NCHITTEST);\n\t\tMSGDEF(WM_NCPAINT);\n\t\tMSGDEF(WM_PAINT);\n\t\tMSGDEF(WM_ERASEBKGND);\n\t\tMSGDEF(WM_NCMOUSEMOVE);  \n\t\tMSGDEF(WM_MOUSEMOVE);\n\t\tMSGDEF(WM_MOUSELEAVE);\n\t\tMSGDEF(WM_MOUSEHOVER);   \n\t\tMSGDEF(WM_NOTIFY);\n\t\tMSGDEF(WM_COMMAND);\n\t\tMSGDEF(WM_MEASUREITEM);\n\t\tMSGDEF(WM_DRAWITEM);   \n\t\tMSGDEF(WM_LBUTTONDOWN);\n\t\tMSGDEF(WM_LBUTTONUP);\n\t\tMSGDEF(WM_LBUTTONDBLCLK);\n\t\tMSGDEF(WM_RBUTTONDOWN);\n\t\tMSGDEF(WM_RBUTTONUP);\n\t\tMSGDEF(WM_RBUTTONDBLCLK);\n\t\tMSGDEF(WM_SETFOCUS);\n\t\tMSGDEF(WM_KILLFOCUS);  \n\t\tMSGDEF(WM_MOVE);\n\t\tMSGDEF(WM_SIZE);\n\t\tMSGDEF(WM_SIZING);\n\t\tMSGDEF(WM_MOVING);\n\t\tMSGDEF(WM_GETMINMAXINFO);\n\t\tMSGDEF(WM_CAPTURECHANGED);\n\t\tMSGDEF(WM_WINDOWPOSCHANGED);\n\t\tMSGDEF(WM_WINDOWPOSCHANGING);   \n\t\tMSGDEF(WM_NCCALCSIZE);\n\t\tMSGDEF(WM_NCCREATE);\n\t\tMSGDEF(WM_NCDESTROY);\n\t\tMSGDEF(WM_TIMER);\n\t\tMSGDEF(WM_KEYDOWN);\n\t\tMSGDEF(WM_KEYUP);\n\t\tMSGDEF(WM_CHAR);\n\t\tMSGDEF(WM_SYSKEYDOWN);\n\t\tMSGDEF(WM_SYSKEYUP);\n\t\tMSGDEF(WM_SYSCOMMAND);\n\t\tMSGDEF(WM_SYSCHAR);\n\t\tMSGDEF(WM_VSCROLL);\n\t\tMSGDEF(WM_HSCROLL);\n\t\tMSGDEF(WM_CHAR);\n\t\tMSGDEF(WM_SHOWWINDOW);\n\t\tMSGDEF(WM_PARENTNOTIFY);\n\t\tMSGDEF(WM_CREATE);\n\t\tMSGDEF(WM_NCACTIVATE);\n\t\tMSGDEF(WM_ACTIVATE);\n\t\tMSGDEF(WM_ACTIVATEAPP);   \n\t\tMSGDEF(WM_CLOSE);\n\t\tMSGDEF(WM_DESTROY);\n\t\tMSGDEF(WM_GETICON);   \n\t\tMSGDEF(WM_GETTEXT);\n\t\tMSGDEF(WM_GETTEXTLENGTH);   \n\t\tstatic TCHAR szMsg[10];\n\t\t::wsprintf(szMsg, _T(\"0x%04X\"), uMsg);\n\t\treturn szMsg;\n\t}\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\t//////////////////////////////////////////////////////////////////////////\n\t//\n\tDUI_BASE_BEGIN_MESSAGE_MAP(CNotifyPump)\n\t\tDUI_END_MESSAGE_MAP()\n\n\t\tstatic const DUI_MSGMAP_ENTRY* DuiFindMessageEntry(const DUI_MSGMAP_ENTRY* lpEntry,TNotifyUI& msg )\n\t{\n\t\tCDuiString sMsgType = msg.sType;\n\t\tCDuiString sCtrlName = msg.pSender->GetName();\n\t\tconst DUI_MSGMAP_ENTRY* pMsgTypeEntry = NULL;\n\t\twhile (lpEntry->nSig != DuiSig_end)\n\t\t{\n\t\t\tif(lpEntry->sMsgType==sMsgType)\n\t\t\t{\n\t\t\t\tif(!lpEntry->sCtrlName.IsEmpty())\n\t\t\t\t{\n\t\t\t\t\tif(lpEntry->sCtrlName==sCtrlName)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn lpEntry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpMsgTypeEntry = lpEntry;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlpEntry++;\n\t\t}\n\t\treturn pMsgTypeEntry;\n\t}\n\n\tbool CNotifyPump::AddVirtualWnd(CDuiString strName,CNotifyPump* pObject)\n\t{\n\t\tif( m_VirtualWndMap.Find(strName) == NULL )\n\t\t{\n\t\t\tm_VirtualWndMap.Insert(strName.GetData(),(LPVOID)pObject);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CNotifyPump::RemoveVirtualWnd(CDuiString strName)\n\t{\n\t\tif( m_VirtualWndMap.Find(strName) != NULL )\n\t\t{\n\t\t\tm_VirtualWndMap.Remove(strName);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CNotifyPump::LoopDispatch(TNotifyUI& msg)\n\t{\n\t\tconst DUI_MSGMAP_ENTRY* lpEntry = NULL;\n\t\tconst DUI_MSGMAP* pMessageMap = NULL;\n\n#ifndef UILIB_STATIC\n\t\tfor(pMessageMap = GetMessageMap(); pMessageMap!=NULL; pMessageMap = (*pMessageMap->pfnGetBaseMap)())\n#else\n\t\tfor(pMessageMap = GetMessageMap(); pMessageMap!=NULL; pMessageMap = pMessageMap->pBaseMap)\n#endif\n\t\t{\n#ifndef UILIB_STATIC\n\t\t\tASSERT(pMessageMap != (*pMessageMap->pfnGetBaseMap)());\n#else\n\t\t\tASSERT(pMessageMap != pMessageMap->pBaseMap);\n#endif\n\t\t\tif ((lpEntry = DuiFindMessageEntry(pMessageMap->lpEntries,msg)) != NULL)\n\t\t\t{\n\t\t\t\tgoto LDispatch;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\nLDispatch:\n\t\tunion DuiMessageMapFunctions mmf;\n\t\tmmf.pfn = lpEntry->pfn;\n\n\t\tbool bRet = false;\n\t\tint nSig;\n\t\tnSig = lpEntry->nSig;\n\t\tswitch (nSig)\n\t\t{\n\t\tdefault:\n\t\t\tASSERT(FALSE);\n\t\t\tbreak;\n\t\tcase DuiSig_lwl:\n\t\t\t(this->*mmf.pfn_Notify_lwl)(msg.wParam,msg.lParam);\n\t\t\tbRet = true;\n\t\t\tbreak;\n\t\tcase DuiSig_vn:\n\t\t\t(this->*mmf.pfn_Notify_vn)(msg);\n\t\t\tbRet = true;\n\t\t\tbreak;\n\t\t}\n\t\treturn bRet;\n\t}\n\n\tvoid CNotifyPump::NotifyPump(TNotifyUI& msg)\n\t{\n\t\t///ⴰ\n\t\tif( !msg.sVirtualWnd.IsEmpty() ){\n\t\t\tfor( int i = 0; i< m_VirtualWndMap.GetSize(); i++ ) {\n\t\t\t\tif( LPCTSTR key = m_VirtualWndMap.GetAt(i) ) {\n\t\t\t\t\tif( _tcsicmp(key, msg.sVirtualWnd.GetData()) == 0 ){\n\t\t\t\t\t\tCNotifyPump* pObject = static_cast<CNotifyPump*>(m_VirtualWndMap.Find(key, false));\n\t\t\t\t\t\tif( pObject && pObject->LoopDispatch(msg) )\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t///\n\t\t//\n\t\tLoopDispatch( msg );\n\t}\n\n\t//////////////////////////////////////////////////////////////////////////\n\t///\n\tCWindowWnd::CWindowWnd() : m_hWnd(NULL), m_OldWndProc(::DefWindowProc), m_bSubclassed(false)\n\t{\n\t}\n\n\tHWND CWindowWnd::GetHWND() const \n\t{ \n\t\treturn m_hWnd; \n\t}\n\tHWND CWindowWnd::GetSafeHwnd() const\n\t{\n\t\treturn this == NULL?NULL:m_hWnd;\n\t}\n\n\tUINT CWindowWnd::GetClassStyle() const\n\t{\n\t\treturn 0;\n\t}\n\n\tLPCTSTR CWindowWnd::GetSuperClassName() const\n\t{\n\t\treturn NULL;\n\t}\n\n\tCWindowWnd::operator HWND() const\n\t{\n\t\treturn m_hWnd;\n\t}\n\n\tHWND CWindowWnd::CreateDuiWindow( HWND hwndParent, LPCTSTR pstrWindowName,DWORD dwStyle /*=0*/, DWORD dwExStyle /*=0*/ )\n\t{\n\t\treturn Create(hwndParent,pstrWindowName,dwStyle,dwExStyle,0,0,0,0,NULL);\n\t}\n\n\tHWND CWindowWnd::Create(HWND hwndParent, LPCTSTR pstrName, DWORD dwStyle, DWORD dwExStyle, const RECT rc, HMENU hMenu)\n\t{\n\t\treturn Create(hwndParent, pstrName, dwStyle, dwExStyle, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hMenu);\n\t}\n\n\tHWND CWindowWnd::Create(HWND hwndParent, LPCTSTR pstrName, DWORD dwStyle, DWORD dwExStyle, int x, int y, int cx, int cy, HMENU hMenu)\n\t{\n\t\tif( GetSuperClassName() != NULL && !RegisterSuperclass() ) return NULL;\n\t\tif( GetSuperClassName() == NULL && !RegisterWindowClass() ) return NULL;\n\t\tm_hWnd = ::CreateWindowEx(dwExStyle, GetWindowClassName(), pstrName, dwStyle, x, y, cx, cy, hwndParent, hMenu, CPaintManagerUI::GetInstance(), this);\n\t\tASSERT(m_hWnd!=NULL);\n\t\treturn m_hWnd;\n\t}\n\n\tHWND CWindowWnd::Subclass(HWND hWnd)\n\t{\n\t\tASSERT(::IsWindow(hWnd));\n\t\tASSERT(m_hWnd==NULL);\n\t\tm_OldWndProc = SubclassWindow(hWnd, __WndProc);\n\t\tif( m_OldWndProc == NULL ) return NULL;\n\t\tm_bSubclassed = true;\n\t\tm_hWnd = hWnd;\n\t\t::SetWindowLongPtr(hWnd, GWLP_USERDATA, reinterpret_cast<LPARAM>(this));\n\t\treturn m_hWnd;\n\t}\n\n\tvoid CWindowWnd::Unsubclass()\n\t{\n\t\tASSERT(::IsWindow(m_hWnd));\n\t\tif( !::IsWindow(m_hWnd) ) return;\n\t\tif( !m_bSubclassed ) return;\n\t\tSubclassWindow(m_hWnd, m_OldWndProc);\n\t\tm_OldWndProc = ::DefWindowProc;\n\t\tm_bSubclassed = false;\n\t}\n\n\tvoid CWindowWnd::ShowWindow(bool bShow /*= true*/, bool bTakeFocus /*= false*/)\n\t{\n\t\tASSERT(::IsWindow(m_hWnd));\n\t\tif( !::IsWindow(m_hWnd) ) return;\n\t\t::ShowWindow(m_hWnd, bShow ? (bTakeFocus ? SW_SHOWNORMAL : SW_SHOWNOACTIVATE) : SW_HIDE);\n\t}\n\n\tUINT CWindowWnd::ShowModal()\n\t{\n\t\tASSERT(::IsWindow(m_hWnd));\n\t\tUINT nRet = 0;\n\t\tHWND hWndParent = GetWindowOwner(m_hWnd);\n\t\t::ShowWindow(m_hWnd, SW_SHOWNORMAL);\n\t\t::EnableWindow(hWndParent, FALSE);\n\t\tMSG msg = { 0 };\n\t\twhile( ::IsWindow(m_hWnd) && ::GetMessage(&msg, NULL, 0, 0) ) {\n\t\t\tif( msg.message == WM_CLOSE && msg.hwnd == m_hWnd ) {\n\t\t\t\tnRet = msg.wParam;\n\t\t\t\t::EnableWindow(hWndParent, TRUE);\n\t\t\t\t::SetFocus(hWndParent);\n\t\t\t}\n\t\t\tif( !CPaintManagerUI::TranslateMessage(&msg) ) {\n\t\t\t\t::TranslateMessage(&msg);\n\t\t\t\t::DispatchMessage(&msg);\n\t\t\t}\n\t\t\tif( msg.message == WM_QUIT ) break;\n\t\t}\n\t\t::EnableWindow(hWndParent, TRUE);\n\t\t::SetFocus(hWndParent);\n\t\tif( msg.message == WM_QUIT ) ::PostQuitMessage(msg.wParam);\n\t\treturn nRet;\n\t}\n\n\tvoid CWindowWnd::Close(UINT nRet/*= IDCANCEL,IDOK*/)\n\t{\n\t\tASSERT(::IsWindow(m_hWnd));\n\t\tif( !::IsWindow(m_hWnd) ) return;\n\t\tPostMessage(WM_CLOSE, (WPARAM)nRet, 0L);\n\t}\n\n\tvoid CWindowWnd::CenterWindow()\n\t{\n\t\tASSERT(::IsWindow(m_hWnd));\n\t\tASSERT((GetWindowStyle(m_hWnd)&WS_CHILD)==0);\n\t\tRECT rcDlg = { 0 };\n\t\t::GetWindowRect(m_hWnd, &rcDlg);\n\t\tRECT rcArea = { 0 };\n\t\tRECT rcCenter = { 0 };\n\t\tHWND hWnd=*this;\n\t\tHWND hWndParent = ::GetParent(m_hWnd);\n\t\tHWND hWndCenter = ::GetWindowOwner(m_hWnd);\n\t\tif (hWndCenter!=NULL)\n\t\t\thWnd=hWndCenter;\n\n\t\t// ʾģʽĻ\n\t\tMONITORINFO oMonitor = {};\n\t\toMonitor.cbSize = sizeof(oMonitor);\n\t\t::GetMonitorInfo(::MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST), &oMonitor);\n\t\trcArea = oMonitor.rcWork;\n\n\t\tif( (hWndCenter == NULL) || ::IsIconic(hWndCenter) )\n\t\t\trcCenter = rcArea;\n\t\telse\n\t\t\t::GetWindowRect(hWndCenter, &rcCenter);\n\n\t\tint DlgWidth = rcDlg.right - rcDlg.left;\n\t\tint DlgHeight = rcDlg.bottom - rcDlg.top;\n\n\t\t// Find dialog's upper left based on rcCenter\n\t\tint xLeft = (rcCenter.left + rcCenter.right) / 2 - DlgWidth / 2;\n\t\tint yTop = (rcCenter.top + rcCenter.bottom) / 2 - DlgHeight / 2;\n\n\t\t// The dialog is outside the screen, move it inside\n\t\tif( xLeft < rcArea.left ) xLeft = rcArea.left;\n\t\telse if( xLeft + DlgWidth > rcArea.right ) xLeft = rcArea.right - DlgWidth;\n\t\tif( yTop < rcArea.top ) yTop = rcArea.top;\n\t\telse if( yTop + DlgHeight > rcArea.bottom ) yTop = rcArea.bottom - DlgHeight;\n\t\t::SetWindowPos(m_hWnd, NULL, xLeft, yTop, -1, -1, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);\n\t}\n\n\n\tvoid CWindowWnd::BringToTop( )\n\t{\n\t\tlong lThreadID1 = ::GetWindowThreadProcessId(::GetForegroundWindow( ), 0);\n\t\tlong lThreadID2 = ::GetWindowThreadProcessId(m_hWnd, 0);\n\t\tif (lThreadID1 != lThreadID2)\n\t\t{\n\t\t\t::AttachThreadInput(lThreadID1, lThreadID2, TRUE);\n\t\t\t::AllowSetForegroundWindow(ASFW_ANY);\n\t\t\t::SetForegroundWindow(m_hWnd);\n\t\t\t::AttachThreadInput(lThreadID1, lThreadID2, false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t::SetForegroundWindow(m_hWnd);\n\t\t}\n\n\t\tDWORD dwStyle = ::GetWindowLong(m_hWnd, GWL_STYLE);\n\t\tif (dwStyle & WS_MINIMIZE)\n\t\t\t::ShowWindow(m_hWnd, SW_RESTORE);\n\t\telse\n\t\t\t::ShowWindow(m_hWnd, SW_SHOW);\n\t}\n\n\tvoid CWindowWnd::SetIcon(UINT nRes)\n\t{\n\t\tHICON hIcon = (HICON)::LoadImage(CPaintManagerUI::GetInstance(), MAKEINTRESOURCE(nRes), IMAGE_ICON,\n\t\t\t(::GetSystemMetrics(SM_CXICON) + 15) & ~15, (::GetSystemMetrics(SM_CYICON) + 15) & ~15,\t// ֹDPIͼģ\n\t\t\tLR_DEFAULTCOLOR);\n\t\tASSERT(hIcon);\n\t\t::SendMessage(m_hWnd, WM_SETICON, (WPARAM) TRUE, (LPARAM) hIcon);\n\n\t\thIcon = (HICON)::LoadImage(CPaintManagerUI::GetInstance(), MAKEINTRESOURCE(nRes), IMAGE_ICON,\n\t\t\t(::GetSystemMetrics(SM_CXICON) + 15) & ~15, (::GetSystemMetrics(SM_CYICON) + 15) & ~15,\t// ֹDPIͼģ\n\t\t\tLR_DEFAULTCOLOR);\n\t\tASSERT(hIcon);\n\t\t::SendMessage(m_hWnd, WM_SETICON, (WPARAM) FALSE, (LPARAM) hIcon);\n\t}\n\n\tbool CWindowWnd::RegisterWindowClass()\n\t{\n\t\tWNDCLASS wc = { 0 };\n\t\twc.style = GetClassStyle();\n\t\twc.cbClsExtra = 0;\n\t\twc.cbWndExtra = 0;\n\t\twc.hIcon = NULL;\n\t\twc.lpfnWndProc = CWindowWnd::__WndProc;\n\t\twc.hInstance = CPaintManagerUI::GetInstance();\n\t\twc.hCursor = ::LoadCursor(NULL, IDC_ARROW);\n\t\twc.hbrBackground = NULL;\n\t\twc.lpszMenuName  = NULL;\n\t\twc.lpszClassName = GetWindowClassName();\n\t\tATOM ret = ::RegisterClass(&wc);\n\t\tASSERT(ret!=NULL || ::GetLastError()==ERROR_CLASS_ALREADY_EXISTS);\n\t\treturn ret != NULL || ::GetLastError() == ERROR_CLASS_ALREADY_EXISTS;\n\t}\n\n\tbool CWindowWnd::RegisterSuperclass()\n\t{\n\t\t// Get the class information from an existing\n\t\t// window so we can subclass it later on...\n\t\tWNDCLASSEX wc = { 0 };\n\t\twc.cbSize = sizeof(WNDCLASSEX);\n\t\tif( !::GetClassInfoEx(NULL, GetSuperClassName(), &wc) ) {\n\t\t\tif( !::GetClassInfoEx(CPaintManagerUI::GetInstance(), GetSuperClassName(), &wc) ) {\n\t\t\t\tASSERT(!\"Unable to locate window class\");\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}\n\t\tm_OldWndProc = wc.lpfnWndProc;\n\t\twc.lpfnWndProc = CWindowWnd::__ControlProc;\n\t\twc.hInstance = CPaintManagerUI::GetInstance();\n\t\twc.lpszClassName = GetWindowClassName();\n\t\tATOM ret = ::RegisterClassEx(&wc);\n\t\tASSERT(ret!=NULL || ::GetLastError()==ERROR_CLASS_ALREADY_EXISTS);\n\t\treturn ret != NULL || ::GetLastError() == ERROR_CLASS_ALREADY_EXISTS;\n\t}\n\n\tLRESULT CALLBACK CWindowWnd::__WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)\n\t{\n\t\tCWindowWnd* pThis = NULL;\n\t\tif( uMsg == WM_NCCREATE ) {\n\t\t\tLPCREATESTRUCT lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);\n\t\t\tpThis = static_cast<CWindowWnd*>(lpcs->lpCreateParams);\n\t\t\tpThis->m_hWnd = hWnd;\n\t\t\t::SetWindowLongPtr(hWnd, GWLP_USERDATA, reinterpret_cast<LPARAM>(pThis));\n\t\t} \n\t\telse {\n\t\t\tpThis = reinterpret_cast<CWindowWnd*>(::GetWindowLongPtr(hWnd, GWLP_USERDATA));\n\t\t\tif( uMsg == WM_NCDESTROY && pThis != NULL ) {\n\t\t\t\tLRESULT lRes = ::CallWindowProc(pThis->m_OldWndProc, hWnd, uMsg, wParam, lParam);\n\t\t\t\t::SetWindowLongPtr(pThis->m_hWnd, GWLP_USERDATA, 0L);\n\t\t\t\tif( pThis->m_bSubclassed ) pThis->Unsubclass();\n\t\t\t\tpThis->m_hWnd = NULL;\n\t\t\t\tpThis->OnFinalMessage(hWnd);\n\t\t\t\treturn lRes;\n\t\t\t}\n\t\t}\n\t\tif( pThis != NULL ) {\n\t\t\treturn pThis->HandleMessage(uMsg, wParam, lParam);\n\t\t} \n\t\telse {\n\t\t\treturn ::DefWindowProc(hWnd, uMsg, wParam, lParam);\n\t\t}\n\t}\n\n\tLRESULT CALLBACK CWindowWnd::__ControlProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)\n\t{\n\t\tCWindowWnd* pThis = NULL;\n\t\tif( uMsg == WM_NCCREATE ) {\n\t\t\tLPCREATESTRUCT lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);\n\t\t\tpThis = static_cast<CWindowWnd*>(lpcs->lpCreateParams);\n\t\t\t::SetProp(hWnd, _T(\"WndX\"), (HANDLE) pThis);\n\t\t\tpThis->m_hWnd = hWnd;\n\t\t} \n\t\telse {\n\t\t\tpThis = reinterpret_cast<CWindowWnd*>(::GetProp(hWnd, _T(\"WndX\")));\n\t\t\tif( uMsg == WM_NCDESTROY && pThis != NULL ) {\n\t\t\t\tLRESULT lRes = ::CallWindowProc(pThis->m_OldWndProc, hWnd, uMsg, wParam, lParam);\n\t\t\t\tif( pThis->m_bSubclassed ) pThis->Unsubclass();\n\t\t\t\t::SetProp(hWnd, _T(\"WndX\"), NULL);\n\t\t\t\tpThis->m_hWnd = NULL;\n\t\t\t\tpThis->OnFinalMessage(hWnd);\n\t\t\t\treturn lRes;\n\t\t\t}\n\t\t}\n\t\tif( pThis != NULL ) {\n\t\t\treturn pThis->HandleMessage(uMsg, wParam, lParam);\n\t\t} \n\t\telse {\n\t\t\treturn ::DefWindowProc(hWnd, uMsg, wParam, lParam);\n\t\t}\n\t}\n\n\tLRESULT CWindowWnd::SendMessage(UINT uMsg, WPARAM wParam /*= 0*/, LPARAM lParam /*= 0*/)\n\t{\n\t\tASSERT(::IsWindow(m_hWnd));\n\t\treturn ::SendMessage(m_hWnd, uMsg, wParam, lParam);\n\t} \n\n\tLRESULT CWindowWnd::PostMessage(UINT uMsg, WPARAM wParam /*= 0*/, LPARAM lParam /*= 0*/)\n\t{\n\t\tASSERT(::IsWindow(m_hWnd));\n\t\treturn ::PostMessage(m_hWnd, uMsg, wParam, lParam);\n\t}\n\n\tvoid CWindowWnd::ResizeClient(int cx /*= -1*/, int cy /*= -1*/)\n\t{\n\t\tASSERT(::IsWindow(m_hWnd));\n\t\tRECT rc = { 0 };\n\t\tif( !::GetClientRect(m_hWnd, &rc) ) return;\n\t\tif( cx != -1 ) rc.right = cx;\n\t\tif( cy != -1 ) rc.bottom = cy;\n\t\tif( !::AdjustWindowRectEx(&rc, GetWindowStyle(m_hWnd), (!(GetWindowStyle(m_hWnd) & WS_CHILD) && (::GetMenu(m_hWnd) != NULL)), GetWindowExStyle(m_hWnd)) ) return;\n\t\t::SetWindowPos(m_hWnd, NULL, 0, 0, rc.right - rc.left, rc.bottom - rc.top, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);\n\t}\n\n\tLRESULT CWindowWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)\n\t{\n\t\treturn ::CallWindowProc(m_OldWndProc, m_hWnd, uMsg, wParam, lParam);\n\t}\n\n\tvoid CWindowWnd::OnFinalMessage(HWND /*hWnd*/)\n\t{\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Core/UIBase.h",
    "content": "#ifndef __UIBASE_H__\n#define __UIBASE_H__\n\n\n#pragma once\n\nnamespace DuiLib {\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n#define UI_WNDSTYLE_CONTAINER  (0)\n#define UI_WNDSTYLE_FRAME      (WS_VISIBLE | WS_OVERLAPPEDWINDOW)\n#define UI_WNDSTYLE_CHILD      (WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN)\n#define UI_WNDSTYLE_DIALOG     (WS_VISIBLE | WS_POPUPWINDOW | WS_CAPTION | WS_DLGFRAME | WS_CLIPSIBLINGS | WS_CLIPCHILDREN)\n\n#define UI_WNDSTYLE_EX_FRAME   (WS_EX_WINDOWEDGE)\n#define UI_WNDSTYLE_EX_DIALOG  (WS_EX_TOOLWINDOW | WS_EX_DLGMODALFRAME)\n\n#define UI_CLASSSTYLE_CONTAINER  (0)\n#define UI_CLASSSTYLE_FRAME      (CS_VREDRAW | CS_HREDRAW)\n#define UI_CLASSSTYLE_CHILD      (CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS | CS_SAVEBITS)\n#define UI_CLASSSTYLE_DIALOG     (CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS | CS_SAVEBITS)\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n#ifndef ASSERT\n#define ASSERT(expr)  _ASSERTE(expr)\n#endif\n\n#ifdef _DEBUG\n#ifndef DUITRACE\n#define DUITRACE DUI__Trace\n#endif\n#define DUITRACEMSG DUI__TraceMsg\n#else\n#ifndef DUITRACE\n#define DUITRACE\n#endif\n#define DUITRACEMSG _T(\"\")\n#endif\n\n\tvoid UILIB_API DUI__Trace(LPCTSTR pstrFormat, ...);\n\tLPCTSTR UILIB_API DUI__TraceMsg(UINT uMsg);\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass UILIB_API CNotifyPump\n\t{\n\tpublic:\n\t\tbool AddVirtualWnd(CDuiString strName,CNotifyPump* pObject);\n\t\tbool RemoveVirtualWnd(CDuiString strName);\n\t\tvoid NotifyPump(TNotifyUI& msg);\n\t\tbool LoopDispatch(TNotifyUI& msg);\n\t\tDUI_DECLARE_MESSAGE_MAP()\n\tprivate:\n\t\tCStdStringPtrMap m_VirtualWndMap;\n\t};\n\n\tclass UILIB_API CWindowWnd\n\t{\n\tpublic:\n\t\tCWindowWnd();\n\n\t\tHWND GetHWND() const;\n\t\tHWND GetSafeHwnd() const;\n\t\toperator HWND() const;\n\n\t\tbool RegisterWindowClass();\n\t\tbool RegisterSuperclass();\n\n\t\tHWND Create(HWND hwndParent, LPCTSTR pstrName, DWORD dwStyle, DWORD dwExStyle, const RECT rc, HMENU hMenu = NULL);\n\t\tHWND Create(HWND hwndParent, LPCTSTR pstrName, DWORD dwStyle, DWORD dwExStyle, int x = CW_USEDEFAULT, int y = CW_USEDEFAULT, int cx = CW_USEDEFAULT, int cy = CW_USEDEFAULT, HMENU hMenu = NULL);\n\t\tHWND CreateDuiWindow(HWND hwndParent, LPCTSTR pstrWindowName,DWORD dwStyle =0, DWORD dwExStyle =0);\n\t\tHWND Subclass(HWND hWnd);\n\t\tvoid Unsubclass();\n\t\tvoid ShowWindow(bool bShow = true, bool bTakeFocus = true);\n\t\tUINT ShowModal();\n\t\tvoid Close(UINT nRet = IDOK);\n\t\tvoid CenterWindow();\t// У֧չĻ\n\t\tvoid BringToTop( );\n\t\tvoid SetIcon(UINT nRes);\n\n\t\tLRESULT SendMessage(UINT uMsg, WPARAM wParam = 0, LPARAM lParam = 0L);\n\t\tLRESULT PostMessage(UINT uMsg, WPARAM wParam = 0, LPARAM lParam = 0L);\n\t\tvoid ResizeClient(int cx = -1, int cy = -1);\n\n\tprotected:\n\t\tvirtual LPCTSTR GetWindowClassName() const = 0;\n\t\tvirtual LPCTSTR GetSuperClassName() const;\n\t\tvirtual UINT GetClassStyle() const;\n\n\t\tvirtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);\n\t\tvirtual void OnFinalMessage(HWND hWnd);\n\n\t\tstatic LRESULT CALLBACK __WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);\n\t\tstatic LRESULT CALLBACK __ControlProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);\n\n\tprotected:\n\t\tHWND m_hWnd;\n\t\tWNDPROC m_OldWndProc;\n\t\tbool m_bSubclassed;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UIBASE_H__\n"
  },
  {
    "path": "DuiLib/Core/UIContainer - 副本.cpp",
    "content": "#include \"StdAfx.h\"\n\nnamespace DuiLib\n{\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCContainerUI::CContainerUI()\n\t\t: m_iChildPadding(0),\n\t\tm_bAutoDestroy(true),\n\t\tm_bDelayedDestroy(true),\n\t\tm_bMouseChildEnabled(true),\n\t\tm_pVerticalScrollBar(NULL),\n\t\tm_pHorizontalScrollBar(NULL),\n\t\tm_bScrollProcess(false),\n\t\tm_nScrollStepSize(0)\n\t{\n\t\t::ZeroMemory(&m_rcInset, sizeof(m_rcInset));\n\t}\n\n\tCContainerUI::~CContainerUI()\n\t{\n\t\tm_bDelayedDestroy = false;\n\t\tRemoveAll();\n\t\tif( m_pVerticalScrollBar ) delete m_pVerticalScrollBar;\n\t\tif( m_pHorizontalScrollBar ) delete m_pHorizontalScrollBar;\n\t}\n\n\tLPCTSTR CContainerUI::GetClass() const\n\t{\n\t\treturn _T(\"ContainerUI\");\n\t}\n\n\tLPVOID CContainerUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"IContainer\")) == 0 ) return static_cast<IContainerUI*>(this);\n\t\telse if( _tcscmp(pstrName, DUI_CTR_CONTAINER) == 0 ) return static_cast<CContainerUI*>(this);\n\t\treturn CControlUI::GetInterface(pstrName);\n\t}\n\n\tCControlUI* CContainerUI::GetItemAt(int iIndex) const\n\t{\n\t\tif( iIndex < 0 || iIndex >= m_items.GetSize() ) return NULL;\n\t\treturn static_cast<CControlUI*>(m_items[iIndex]);\n\t}\n\n\tint CContainerUI::GetItemIndex(CControlUI* pControl) const\n\t{\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tif( static_cast<CControlUI*>(m_items[it]) == pControl ) {\n\t\t\t\treturn it;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\tbool CContainerUI::SetItemIndex(CControlUI* pControl, int iIndex)\n\t{\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tif( static_cast<CControlUI*>(m_items[it]) == pControl ) {\n\t\t\t\tNeedUpdate();            \n\t\t\t\tm_items.Remove(it);\n\t\t\t\treturn m_items.InsertAt(iIndex, pControl);\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tint CContainerUI::GetCount() const\n\t{\n\t\treturn m_items.GetSize();\n\t}\n\n\tbool CContainerUI::Add(CControlUI* pControl)\n\t{\n\t\tif( pControl == NULL) return false;\n\n\t\tif( m_pManager != NULL ) m_pManager->InitControls(pControl, this);\n\t\tif( IsVisible() ) NeedUpdate();\n\t\telse pControl->SetInternVisible(false);\n\t\treturn m_items.Add(pControl);   \n\t}\n\n\tbool CContainerUI::AddAt(CControlUI* pControl, int iIndex)\n\t{\n\t\tif( pControl == NULL) return false;\n\n\t\tif( m_pManager != NULL ) m_pManager->InitControls(pControl, this);\n\t\tif( IsVisible() ) NeedUpdate();\n\t\telse pControl->SetInternVisible(false);\n\t\treturn m_items.InsertAt(iIndex, pControl);\n\t}\n\n\tbool CContainerUI::Remove(CControlUI* pControl)\n\t{\n\t\tif( pControl == NULL) return false;\n\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tif( static_cast<CControlUI*>(m_items[it]) == pControl ) {\n\t\t\t\tNeedUpdate();\n\t\t\t\tif( m_bAutoDestroy ) {\n\t\t\t\t\tif( m_bDelayedDestroy && m_pManager ) m_pManager->AddDelayedCleanup(pControl);             \n\t\t\t\t\telse delete pControl;\n\t\t\t\t}\n\t\t\t\treturn m_items.Remove(it);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CContainerUI::RemoveAt(int iIndex)\n\t{\n\t\tCControlUI* pControl = GetItemAt(iIndex);\n\t\tif (pControl != NULL) {\n\t\t\treturn CContainerUI::Remove(pControl);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tvoid CContainerUI::RemoveAll()\n\t{\n\t\tfor( int it = 0; m_bAutoDestroy && it < m_items.GetSize(); it++ ) {\n\t\t\tif( m_bDelayedDestroy && m_pManager ) m_pManager->AddDelayedCleanup(static_cast<CControlUI*>(m_items[it]));             \n\t\t\telse delete static_cast<CControlUI*>(m_items[it]);\n\t\t}\n\t\tm_items.Empty();\n\t\tNeedUpdate();\n\t}\n\n\tbool CContainerUI::IsAutoDestroy() const\n\t{\n\t\treturn m_bAutoDestroy;\n\t}\n\n\tvoid CContainerUI::SetAutoDestroy(bool bAuto)\n\t{\n\t\tm_bAutoDestroy = bAuto;\n\t}\n\n\tbool CContainerUI::IsDelayedDestroy() const\n\t{\n\t\treturn m_bDelayedDestroy;\n\t}\n\n\tvoid CContainerUI::SetDelayedDestroy(bool bDelayed)\n\t{\n\t\tm_bDelayedDestroy = bDelayed;\n\t}\n\n\tRECT CContainerUI::GetInset() const\n\t{\n\t\treturn m_rcInset;\n\t}\n\n\tvoid CContainerUI::SetInset(RECT rcInset)\n\t{\n\t\tm_rcInset = rcInset;\n\t\tNeedUpdate();\n\t}\n\n\tint CContainerUI::GetChildPadding() const\n\t{\n\t\treturn m_iChildPadding;\n\t}\n\n\tvoid CContainerUI::SetChildPadding(int iPadding)\n\t{\n\t\tm_iChildPadding = iPadding;\n\t\tNeedUpdate();\n\t}\n\n\tbool CContainerUI::IsMouseChildEnabled() const\n\t{\n\t\treturn m_bMouseChildEnabled;\n\t}\n\n\tvoid CContainerUI::SetMouseChildEnabled(bool bEnable)\n\t{\n\t\tm_bMouseChildEnabled = bEnable;\n\t}\n\n\tvoid CContainerUI::SetVisible(bool bVisible)\n\t{\n\t\tif( m_bVisible == bVisible ) return;\n\t\tCControlUI::SetVisible(bVisible);\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tstatic_cast<CControlUI*>(m_items[it])->SetInternVisible(IsVisible());\n\t\t}\n\t}\n\n\t// ߼ϣContainerؼ˷\n\t// ô˷ĽǣڲӿؼأؼȻʾЧ\n\tvoid CContainerUI::SetInternVisible(bool bVisible)\n\t{\n\t\tCControlUI::SetInternVisible(bVisible);\n\t\tif( m_items.IsEmpty() ) return;\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\t// ӿؼʾ״̬\n\t\t\t// InternVisible״̬ӦӿؼԼ\n\t\t\tstatic_cast<CControlUI*>(m_items[it])->SetInternVisible(IsVisible());\n\t\t}\n\t}\n\n\tvoid CContainerUI::SetEnabled(bool bEnabled)\n\t{\n\t\tif( m_bEnabled == bEnabled ) return;\n\n\t\tm_bEnabled = bEnabled;\n\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tstatic_cast<CControlUI*>(m_items[it])->SetEnabled(m_bEnabled);\n\t\t}\n\n\t\tInvalidate();\n\t}\n\n\tvoid CContainerUI::SetMouseEnabled(bool bEnabled)\n\t{\n\t\tif( m_pVerticalScrollBar != NULL ) m_pVerticalScrollBar->SetMouseEnabled(bEnabled);\n\t\tif( m_pHorizontalScrollBar != NULL ) m_pHorizontalScrollBar->SetMouseEnabled(bEnabled);\n\t\tCControlUI::SetMouseEnabled(bEnabled);\n\t}\n\n\tvoid CContainerUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pParent != NULL ) m_pParent->DoEvent(event);\n\t\t\telse CControlUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_SETFOCUS ) \n\t\t{\n\t\t\tm_bFocused = true;\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_KILLFOCUS ) \n\t\t{\n\t\t\tm_bFocused = false;\n\t\t\treturn;\n\t\t}\n\t\tif( m_pVerticalScrollBar != NULL && m_pVerticalScrollBar->IsVisible() && m_pVerticalScrollBar->IsEnabled() )\n\t\t{\n\t\t\tif( event.Type == UIEVENT_KEYDOWN ) \n\t\t\t{\n\t\t\t\tswitch( event.chKey ) {\n\t\t\t\tcase VK_DOWN:\n\t\t\t\t\tLineDown();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_UP:\n\t\t\t\t\tLineUp();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_NEXT:\n\t\t\t\t\tPageDown();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_PRIOR:\n\t\t\t\t\tPageUp();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_HOME:\n\t\t\t\t\tHomeUp();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_END:\n\t\t\t\t\tEndDown();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if( event.Type == UIEVENT_SCROLLWHEEL )\n\t\t\t{\n\t\t\t\tswitch( LOWORD(event.wParam) ) {\n\t\t\tcase SB_LINEUP:\n\t\t\t\tLineUp();\n\t\t\t\treturn;\n\t\t\tcase SB_LINEDOWN:\n\t\t\t\tLineDown();\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( m_pHorizontalScrollBar != NULL && m_pHorizontalScrollBar->IsVisible() && m_pHorizontalScrollBar->IsEnabled() ) {\n\t\t\tif( event.Type == UIEVENT_KEYDOWN ) \n\t\t\t{\n\t\t\t\tswitch( event.chKey ) {\n\t\t\tcase VK_DOWN:\n\t\t\t\tLineRight();\n\t\t\t\treturn;\n\t\t\tcase VK_UP:\n\t\t\t\tLineLeft();\n\t\t\t\treturn;\n\t\t\tcase VK_NEXT:\n\t\t\t\tPageRight();\n\t\t\t\treturn;\n\t\t\tcase VK_PRIOR:\n\t\t\t\tPageLeft();\n\t\t\t\treturn;\n\t\t\tcase VK_HOME:\n\t\t\t\tHomeLeft();\n\t\t\t\treturn;\n\t\t\tcase VK_END:\n\t\t\t\tEndRight();\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if( event.Type == UIEVENT_SCROLLWHEEL )\n\t\t\t{\n\t\t\t\tswitch( LOWORD(event.wParam) ) {\n\t\t\tcase SB_LINEUP:\n\t\t\t\tLineLeft();\n\t\t\t\treturn;\n\t\t\tcase SB_LINEDOWN:\n\t\t\t\tLineRight();\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCControlUI::DoEvent(event);\n\t}\n\n\tSIZE CContainerUI::GetScrollPos() const\n\t{\n\t\tSIZE sz = {0, 0};\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) sz.cy = m_pVerticalScrollBar->GetScrollPos();\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) sz.cx = m_pHorizontalScrollBar->GetScrollPos();\n\t\treturn sz;\n\t}\n\n\tSIZE CContainerUI::GetScrollRange() const\n\t{\n\t\tSIZE sz = {0, 0};\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) sz.cy = m_pVerticalScrollBar->GetScrollRange();\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) sz.cx = m_pHorizontalScrollBar->GetScrollRange();\n\t\treturn sz;\n\t}\n\n\tvoid CContainerUI::SetScrollPos(SIZE szPos)\n\t{\n\t\tint cx = 0;\n\t\tint cy = 0;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) {\n\t\t\tint iLastScrollPos = m_pVerticalScrollBar->GetScrollPos();\n\t\t\tm_pVerticalScrollBar->SetScrollPos(szPos.cy);\n\t\t\tcy = m_pVerticalScrollBar->GetScrollPos() - iLastScrollPos;\n\t\t}\n\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\tint iLastScrollPos = m_pHorizontalScrollBar->GetScrollPos();\n\t\t\tm_pHorizontalScrollBar->SetScrollPos(szPos.cx);\n\t\t\tcx = m_pHorizontalScrollBar->GetScrollPos() - iLastScrollPos;\n\t\t}\n\n\t\tif( cx == 0 && cy == 0 ) return;\n\n\t\tRECT rcPos;\n\t\tfor( int it2 = 0; it2 < m_items.GetSize(); it2++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it2]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) continue;\n\n\t\t\trcPos = pControl->GetPos();\n\t\t\trcPos.left -= cx;\n\t\t\trcPos.right -= cx;\n\t\t\trcPos.top -= cy;\n\t\t\trcPos.bottom -= cy;\n\t\t\tpControl->SetPos(rcPos);\n\t\t}\n\n\t\tInvalidate();\n\t}\n\n\tvoid CContainerUI::SetScrollStepSize(int nSize)\n\t{\n\t\tif (nSize >0)\n\t\t\tm_nScrollStepSize = nSize;\n\t}\n\n\tint CContainerUI::GetScrollStepSize() const\n\t{\n\t\treturn m_nScrollStepSize;\n\t}\n\n\tvoid CContainerUI::LineUp()\n\t{\n\t\tint cyLine = m_nScrollStepSize;\n\t\tif (m_nScrollStepSize == 0)\n\t\t{\n\t\t\tcyLine = 8;\n\t\t\tif( m_pManager ) cyLine = m_pManager->GetDefaultFontInfo()->tm.tmHeight + 8;\n\t\t}\n\t\t\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cy -= cyLine;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::LineDown()\n\t{\n\t\tint cyLine = m_nScrollStepSize;\n\t\tif (m_nScrollStepSize == 0)\n\t\t{\n\t\t\tcyLine = 8;\n\t\t\tif( m_pManager ) cyLine = m_pManager->GetDefaultFontInfo()->tm.tmHeight + 8;\n\t\t}\n\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cy += cyLine;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::PageUp()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tint iOffset = m_rcItem.bottom - m_rcItem.top - m_rcInset.top - m_rcInset.bottom;\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) iOffset -= m_pHorizontalScrollBar->GetFixedHeight();\n\t\tsz.cy -= iOffset;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::PageDown()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tint iOffset = m_rcItem.bottom - m_rcItem.top - m_rcInset.top - m_rcInset.bottom;\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) iOffset -= m_pHorizontalScrollBar->GetFixedHeight();\n\t\tsz.cy += iOffset;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::HomeUp()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cy = 0;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::EndDown()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cy = GetScrollRange().cy;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::LineLeft()\n\t{\n\t\tint cxLine = m_nScrollStepSize == 0 ? 8 : m_nScrollStepSize;\n\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cx -= cxLine;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::LineRight()\n\t{\n\t\tint cxLine = m_nScrollStepSize == 0 ? 8 : m_nScrollStepSize;\n\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cx += cxLine;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::PageLeft()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tint iOffset = m_rcItem.right - m_rcItem.left - m_rcInset.left - m_rcInset.right;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) iOffset -= m_pVerticalScrollBar->GetFixedWidth();\n\t\tsz.cx -= iOffset;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::PageRight()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tint iOffset = m_rcItem.right - m_rcItem.left - m_rcInset.left - m_rcInset.right;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) iOffset -= m_pVerticalScrollBar->GetFixedWidth();\n\t\tsz.cx += iOffset;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::HomeLeft()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cx = 0;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::EndRight()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cx = GetScrollRange().cx;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::EnableScrollBar(bool bEnableVertical, bool bEnableHorizontal)\n\t{\n\t\tif( bEnableVertical && !m_pVerticalScrollBar ) {\n\t\t\tm_pVerticalScrollBar = new CScrollBarUI;\n\t\t\tm_pVerticalScrollBar->SetOwner(this);\n\t\t\tm_pVerticalScrollBar->SetManager(m_pManager, NULL, false);\n//\t\t\tm_pVerticalScrollBar->SetVisible(false);    //ﱻ޸  Redrain\n\t\t\tif ( m_pManager ) {\n\t\t\t\tLPCTSTR pDefaultAttributes = m_pManager->GetDefaultAttributeList(_T(\"VScrollBar\"));\n\t\t\t\tif( pDefaultAttributes ) {\n\t\t\t\t\tm_pVerticalScrollBar->ApplyAttributeList(pDefaultAttributes);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if( !bEnableVertical && m_pVerticalScrollBar ) {\n\t\t\tdelete m_pVerticalScrollBar;\n\t\t\tm_pVerticalScrollBar = NULL;\n\t\t}\n\n\t\tif( bEnableHorizontal && !m_pHorizontalScrollBar ) {\n\t\t\tm_pHorizontalScrollBar = new CScrollBarUI;\n\t\t\tm_pHorizontalScrollBar->SetHorizontal(true);\n\t\t\tm_pHorizontalScrollBar->SetOwner(this);\n\t\t\tm_pHorizontalScrollBar->SetManager(m_pManager, NULL, false);\n//\t\t\tm_pHorizontalScrollBar->SetVisible(false);    //ﱻ޸  Redrain\n\n\t\t\tif ( m_pManager ) {\n\t\t\t\tLPCTSTR pDefaultAttributes = m_pManager->GetDefaultAttributeList(_T(\"HScrollBar\"));\n\t\t\t\tif( pDefaultAttributes ) {\n\t\t\t\t\tm_pHorizontalScrollBar->ApplyAttributeList(pDefaultAttributes);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if( !bEnableHorizontal && m_pHorizontalScrollBar ) {\n\t\t\tdelete m_pHorizontalScrollBar;\n\t\t\tm_pHorizontalScrollBar = NULL;\n\t\t}\n\n\t\tNeedUpdate();\n\t}\n\n\tCScrollBarUI* CContainerUI::GetVerticalScrollBar() const\n\t{\n\t\treturn m_pVerticalScrollBar;\n\t}\n\n\tCScrollBarUI* CContainerUI::GetHorizontalScrollBar() const\n\t{\n\t\treturn m_pHorizontalScrollBar;\n\t}\n\n\tint CContainerUI::FindSelectable(int iIndex, bool bForward /*= true*/) const\n\t{\n\t\t// NOTE: This is actually a helper-function for the list/combo/ect controls\n\t\t//       that allow them to find the next enabled/available selectable item\n\t\tif( GetCount() == 0 ) return -1;\n\t\tiIndex = CLAMP(iIndex, 0, GetCount() - 1);\n\t\tif( bForward ) {\n\t\t\tfor( int i = iIndex; i < GetCount(); i++ ) {\n\t\t\t\tif( GetItemAt(i)->GetInterface(_T(\"ListItem\")) != NULL \n\t\t\t\t\t&& GetItemAt(i)->IsVisible()\n\t\t\t\t\t&& GetItemAt(i)->IsEnabled() ) return i;\n\t\t\t}\n\t\t\treturn -1;\n\t\t}\n\t\telse {\n\t\t\tfor( int i = iIndex; i >= 0; --i ) {\n\t\t\t\tif( GetItemAt(i)->GetInterface(_T(\"ListItem\")) != NULL \n\t\t\t\t\t&& GetItemAt(i)->IsVisible()\n\t\t\t\t\t&& GetItemAt(i)->IsEnabled() ) return i;\n\t\t\t}\n\t\t\treturn FindSelectable(0, true);\n\t\t}\n\t}\n\n\tvoid CContainerUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\t\tif( m_items.IsEmpty() ) return;\n\t\trc.left += m_rcInset.left;\n\t\trc.top += m_rcInset.top;\n\t\trc.right -= m_rcInset.right;\n\t\trc.bottom -= m_rcInset.bottom;\n\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) {\n\t\t\t\tSetFloatPos(it);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpControl->SetPos(rc); // зfloatӿؼŴͻ\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CContainerUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"inset\")) == 0 ) {\n\t\t\tRECT rcInset = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\trcInset.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcInset.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\trcInset.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcInset.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\t\tSetInset(rcInset);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"mousechild\")) == 0 ) SetMouseChildEnabled(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"vscrollbar\")) == 0 ) {\n\t\t\tEnableScrollBar(_tcscmp(pstrValue, _T(\"true\")) == 0, GetHorizontalScrollBar() != NULL);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"vscrollbarstyle\")) == 0 ) {\n\t\t\tEnableScrollBar(true, GetHorizontalScrollBar() != NULL);\n\t\t\tif( GetVerticalScrollBar() ) GetVerticalScrollBar()->ApplyAttributeList(pstrValue);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"hscrollbar\")) == 0 ) {\n\t\t\tEnableScrollBar(GetVerticalScrollBar() != NULL, _tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"hscrollbarstyle\")) == 0 ) {\n\t\t\tEnableScrollBar(GetVerticalScrollBar() != NULL, true);\n\t\t\tif( GetHorizontalScrollBar() ) GetHorizontalScrollBar()->ApplyAttributeList(pstrValue);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"childpadding\")) == 0 ) SetChildPadding(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"scrollstepsize\")) == 0 ) SetScrollStepSize(_ttoi(pstrValue));\n\t\telse CControlUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CContainerUI::SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit)\n\t{\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tstatic_cast<CControlUI*>(m_items[it])->SetManager(pManager, this, bInit);\n\t\t}\n\n\t\tif( m_pVerticalScrollBar != NULL ) m_pVerticalScrollBar->SetManager(pManager, this, bInit);\n\t\tif( m_pHorizontalScrollBar != NULL ) m_pHorizontalScrollBar->SetManager(pManager, this, bInit);\n\t\tCControlUI::SetManager(pManager, pParent, bInit);\n\t}\n\n\tCControlUI* CContainerUI::FindControl(FINDCONTROLPROC Proc, LPVOID pData, UINT uFlags)\n\t{\n\t\t// Check if this guy is valid\n\t\tif( (uFlags & UIFIND_VISIBLE) != 0 && !IsVisible() ) return NULL;\n\t\tif( (uFlags & UIFIND_ENABLED) != 0 && !IsEnabled() ) return NULL;\n\t\tif( (uFlags & UIFIND_HITTEST) != 0 ) {\n\t\t\tif( !::PtInRect(&m_rcItem, *(static_cast<LPPOINT>(pData))) ) return NULL;\n\t\t\tif( !m_bMouseChildEnabled ) {\n\t\t\t\tCControlUI* pResult = NULL;\n\t\t\t\tif( m_pVerticalScrollBar != NULL ) pResult = m_pVerticalScrollBar->FindControl(Proc, pData, uFlags);\n\t\t\t\tif( pResult == NULL && m_pHorizontalScrollBar != NULL ) pResult = m_pHorizontalScrollBar->FindControl(Proc, pData, uFlags);\n\t\t\t\tif( pResult == NULL ) pResult = CControlUI::FindControl(Proc, pData, uFlags);\n\t\t\t\treturn pResult;\n\t\t\t}\n\t\t}\n\n\t\tCControlUI* pResult = NULL;\n\t\tif( m_pVerticalScrollBar != NULL ) pResult = m_pVerticalScrollBar->FindControl(Proc, pData, uFlags);\n\t\tif( pResult == NULL && m_pHorizontalScrollBar != NULL ) pResult = m_pHorizontalScrollBar->FindControl(Proc, pData, uFlags);\n\t\tif( pResult != NULL ) return pResult;\n\n\t\tif( (uFlags & UIFIND_ME_FIRST) != 0 ) {\n\t\t\tCControlUI* pControl = CControlUI::FindControl(Proc, pData, uFlags);\n\t\t\tif( pControl != NULL ) return pControl;\n\t\t}\n\t\tRECT rc = m_rcItem;\n\t\trc.left += m_rcInset.left;\n\t\trc.top += m_rcInset.top;\n\t\trc.right -= m_rcInset.right;\n\t\trc.bottom -= m_rcInset.bottom;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) rc.right -= m_pVerticalScrollBar->GetFixedWidth();\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) rc.bottom -= m_pHorizontalScrollBar->GetFixedHeight();\n\t\tif( (uFlags & UIFIND_TOP_FIRST) != 0 ) {\n\t\t\tfor( int it = m_items.GetSize() - 1; it >= 0; it-- ) {\n\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it])->FindControl(Proc, pData, uFlags);\n\t\t\t\tif( pControl != NULL ) {\n\t\t\t\t\tif( (uFlags & UIFIND_HITTEST) != 0 && !pControl->IsFloat() && !::PtInRect(&rc, *(static_cast<LPPOINT>(pData))) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse \n\t\t\t\t\t\treturn pControl;\n\t\t\t\t}            \n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it])->FindControl(Proc, pData, uFlags);\n\t\t\t\tif( pControl != NULL ) {\n\t\t\t\t\tif( (uFlags & UIFIND_HITTEST) != 0 && !pControl->IsFloat() && !::PtInRect(&rc, *(static_cast<LPPOINT>(pData))) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse \n\t\t\t\t\t\treturn pControl;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\n\t\tif( pResult == NULL && (uFlags & UIFIND_ME_FIRST) == 0 ) pResult = CControlUI::FindControl(Proc, pData, uFlags);\n\t\treturn pResult;\n\t}\n\n\tvoid CContainerUI::DoPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\tRECT rcTemp = { 0 };\n\t\tif( !::IntersectRect(&rcTemp, &rcPaint, &m_rcItem) ) return;\n\n\t\tCRenderClip clip;\n\t\tCRenderClip::GenerateClip(hDC, rcTemp, clip);\n\t\tCControlUI::DoPaint(hDC, rcPaint);\n\n\t\tif( m_items.GetSize() > 0 ) {\n\t\t\tRECT rc = m_rcItem;\n\t\t\trc.left += m_rcInset.left;\n\t\t\trc.top += m_rcInset.top;\n\t\t\trc.right -= m_rcInset.right;\n\t\t\trc.bottom -= m_rcInset.bottom;\n\t\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) rc.right -= m_pVerticalScrollBar->GetFixedWidth();\n\t\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) rc.bottom -= m_pHorizontalScrollBar->GetFixedHeight();\n\n\t\t\tif( !::IntersectRect(&rcTemp, &rcPaint, &rc) ) {\n\t\t\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it]);\n\t\t\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\t\t\tif( !::IntersectRect(&rcTemp, &rcPaint, &pControl->GetPos()) ) continue;\n\t\t\t\t\tif( pControl ->IsFloat() ) {\n\t\t\t\t\t\tif( !::IntersectRect(&rcTemp, &m_rcItem, &pControl->GetPos()) ) continue;\n\t\t\t\t\t\tpControl->DoPaint(hDC, rcPaint);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCRenderClip childClip;\n\t\t\t\tCRenderClip::GenerateClip(hDC, rcTemp, childClip);\n\t\t\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it]);\n\t\t\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\t\t\tif( !::IntersectRect(&rcTemp, &rcPaint, &pControl->GetPos()) ) continue;\n\t\t\t\t\tif( pControl ->IsFloat() ) {\n\t\t\t\t\t\tif( !::IntersectRect(&rcTemp, &m_rcItem, &pControl->GetPos()) ) continue;\n\t\t\t\t\t\tCRenderClip::UseOldClipBegin(hDC, childClip);\n\t\t\t\t\t\tpControl->DoPaint(hDC, rcPaint);\n\t\t\t\t\t\tCRenderClip::UseOldClipEnd(hDC, childClip);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif( !::IntersectRect(&rcTemp, &rc, &pControl->GetPos()) ) continue;\n\t\t\t\t\t\tpControl->DoPaint(hDC, rcPaint);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( m_pVerticalScrollBar != NULL && m_pVerticalScrollBar->IsVisible() ) {\n\t\t\tif( ::IntersectRect(&rcTemp, &rcPaint, &m_pVerticalScrollBar->GetPos()) ) {\n\t\t\t\tm_pVerticalScrollBar->DoPaint(hDC, rcPaint);\n\t\t\t}\n\t\t}\n\n\t\tif( m_pHorizontalScrollBar != NULL && m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\tif( ::IntersectRect(&rcTemp, &rcPaint, &m_pHorizontalScrollBar->GetPos()) ) {\n\t\t\t\tm_pHorizontalScrollBar->DoPaint(hDC, rcPaint);\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CContainerUI::SetFloatPos(int iIndex)\n\t{\n\t\t// ΪCControlUI::SetPosfloatĲӰ죬ﲻܶfloatӹӰ\n\t\tif( iIndex < 0 || iIndex >= m_items.GetSize() ) return;\n\n\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[iIndex]);\n\n\t\tif( !pControl->IsVisible() ) return;\n\t\tif( !pControl->IsFloat() ) return;\n\n\t\tSIZE szXY = pControl->GetFixedXY();\n\t\tSIZE sz = {pControl->GetFixedWidth(), pControl->GetFixedHeight()};\n\t\tRECT rcCtrl = { 0 };\n\t\tif( szXY.cx >= 0 ) {\n\t\t\trcCtrl.left = m_rcItem.left + szXY.cx;\n\t\t\trcCtrl.right = m_rcItem.left + szXY.cx + sz.cx;\n\t\t}\n\t\telse {\n\t\t\trcCtrl.left = m_rcItem.right + szXY.cx - sz.cx;\n\t\t\trcCtrl.right = m_rcItem.right + szXY.cx;\n\t\t}\n\t\tif( szXY.cy >= 0 ) {\n\t\t\trcCtrl.top = m_rcItem.top + szXY.cy;\n\t\t\trcCtrl.bottom = m_rcItem.top + szXY.cy + sz.cy;\n\t\t}\n\t\telse {\n\t\t\trcCtrl.top = m_rcItem.bottom + szXY.cy - sz.cy;\n\t\t\trcCtrl.bottom = m_rcItem.bottom + szXY.cy;\n\t\t}\n\t\tif( pControl->IsRelativePos() )\n\t\t{\n\t\t\tTRelativePosUI tRelativePos = pControl->GetRelativePos();\n\t\t\tSIZE szParent = {m_rcItem.right-m_rcItem.left,m_rcItem.bottom-m_rcItem.top};\n\t\t\tif(tRelativePos.szParent.cx != 0)\n\t\t\t{\n\t\t\t\tint nIncrementX = szParent.cx-tRelativePos.szParent.cx;\n\t\t\t\tint nIncrementY = szParent.cy-tRelativePos.szParent.cy;\n\t\t\t\trcCtrl.left += (nIncrementX*tRelativePos.nMoveXPercent/100);\n\t\t\t\trcCtrl.top += (nIncrementY*tRelativePos.nMoveYPercent/100);\n\t\t\t\trcCtrl.right = rcCtrl.left+sz.cx+(nIncrementX*tRelativePos.nZoomXPercent/100);\n\t\t\t\trcCtrl.bottom = rcCtrl.top+sz.cy+(nIncrementY*tRelativePos.nZoomYPercent/100);\n\t\t\t}\n\t\t\tpControl->SetRelativeParentSize(szParent);\n\t\t}\n\t\tpControl->SetPos(rcCtrl);\n\t}\n\n\tvoid CContainerUI::ProcessScrollBar(RECT rc, int cxRequired, int cyRequired)\n\t{\n\t\tif( m_pHorizontalScrollBar != NULL && m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\tRECT rcScrollBarPos = { rc.left, rc.bottom, rc.right, rc.bottom + m_pHorizontalScrollBar->GetFixedHeight()};\n\t\t\tm_pHorizontalScrollBar->SetPos(rcScrollBarPos);\n\t\t}\n\n\t\tif( m_pVerticalScrollBar == NULL ) return;\n\n\t\tif( cyRequired > rc.bottom - rc.top && !m_pVerticalScrollBar->IsVisible() ) {\n\t\t\tm_pVerticalScrollBar->SetVisible(true);\n\t\tm_pVerticalScrollBar->SetScrollRange(cyRequired - (rc.bottom - rc.top));\n\t\t\tm_pVerticalScrollBar->SetScrollPos(0);\n\t\t\tm_bScrollProcess = true;\n\t\t\tSetPos(m_rcItem);\n\t\t\tm_bScrollProcess = false;\n\t\t\treturn;\n\t\t}\n\t\t// No scrollbar required\n\t\tif( !m_pVerticalScrollBar->IsVisible() ) return;\n\n\t\t// Scroll not needed anymore?\n\t\tint cyScroll = cyRequired - (rc.bottom - rc.top);\n\t\tif( cyScroll <= 0 && !m_bScrollProcess) {\n\t\t\tm_pVerticalScrollBar->SetVisible(false);\n\t\t\tm_pVerticalScrollBar->SetScrollPos(0);\n\t\t\tm_pVerticalScrollBar->SetScrollRange(0);\n\t\t\tSetPos(m_rcItem);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tRECT rcScrollBarPos = { rc.right, rc.top, rc.right + m_pVerticalScrollBar->GetFixedWidth(), rc.bottom };\n\t\t\tm_pVerticalScrollBar->SetPos(rcScrollBarPos);\n\n\t\t\tif( m_pVerticalScrollBar->GetScrollRange() != cyScroll ) {\n\t\t\t\tint iScrollPos = m_pVerticalScrollBar->GetScrollPos();\n\t\t\t\tm_pVerticalScrollBar->SetScrollRange(::abs(cyScroll));\n\t\t\t\tif( m_pVerticalScrollBar->GetScrollRange() == 0 ) {\n\t\t\t\t\tm_pVerticalScrollBar->SetVisible(false);\n\t\t\t\t\tm_pVerticalScrollBar->SetScrollPos(0);\n\t\t\t\t}\n\t\t\t\tif( iScrollPos > m_pVerticalScrollBar->GetScrollPos() ) {\n\t\t\t\t\tSetPos(m_rcItem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tbool CContainerUI::SetSubControlText( LPCTSTR pstrSubControlName,LPCTSTR pstrText )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl!=NULL)\n\t\t{\n\t\t\tpSubControl->SetText(pstrText);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t\treturn FALSE;\n\t}\n\n\tbool CContainerUI::SetSubControlFixedHeight( LPCTSTR pstrSubControlName,int cy )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl!=NULL)\n\t\t{\n\t\t\tpSubControl->SetFixedHeight(cy);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t\treturn FALSE;\n\t}\n\n\tbool CContainerUI::SetSubControlFixedWdith( LPCTSTR pstrSubControlName,int cx )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl!=NULL)\n\t\t{\n\t\t\tpSubControl->SetFixedWidth(cx);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t\treturn FALSE;\n\t}\n\n\tbool CContainerUI::SetSubControlUserData( LPCTSTR pstrSubControlName,LPCTSTR pstrText )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl!=NULL)\n\t\t{\n\t\t\tpSubControl->SetUserData(pstrText);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t\treturn FALSE;\n\t}\n\n\tDuiLib::CDuiString CContainerUI::GetSubControlText( LPCTSTR pstrSubControlName )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl==NULL)\n\t\t\treturn _T(\"\");\n\t\telse\n\t\t\treturn pSubControl->GetText();\n\t}\n\n\tint CContainerUI::GetSubControlFixedHeight( LPCTSTR pstrSubControlName )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl==NULL)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn pSubControl->GetFixedHeight();\n\t}\n\n\tint CContainerUI::GetSubControlFixedWdith( LPCTSTR pstrSubControlName )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl==NULL)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn pSubControl->GetFixedWidth();\n\t}\n\n\tconst CDuiString CContainerUI::GetSubControlUserData( LPCTSTR pstrSubControlName )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl==NULL)\n\t\t\treturn _T(\"\");\n\t\telse\n\t\t\treturn pSubControl->GetUserData();\n\t}\n\n\tCControlUI* CContainerUI::FindSubControl( LPCTSTR pstrSubControlName )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=static_cast<CControlUI*>(GetManager()->FindSubControlByName(this,pstrSubControlName));\n\t\treturn pSubControl;\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Core/UIContainer - 副本.h",
    "content": "#ifndef __UICONTAINER_H__\n#define __UICONTAINER_H__\n\n#pragma once\n\nnamespace DuiLib {\n/////////////////////////////////////////////////////////////////////////////////////\n//\n\nclass IContainerUI\n{\npublic:\n    virtual CControlUI* GetItemAt(int iIndex) const = 0;\n    virtual int GetItemIndex(CControlUI* pControl) const  = 0;\n    virtual bool SetItemIndex(CControlUI* pControl, int iIndex)  = 0;\n    virtual int GetCount() const = 0;\n    virtual bool Add(CControlUI* pControl) = 0;\n    virtual bool AddAt(CControlUI* pControl, int iIndex)  = 0;\n    virtual bool Remove(CControlUI* pControl) = 0;\n    virtual bool RemoveAt(int iIndex)  = 0;\n    virtual void RemoveAll() = 0;\n};\n\n\n/////////////////////////////////////////////////////////////////////////////////////\n//\nclass CScrollBarUI;\n\nclass UILIB_API CContainerUI : public CControlUI, public IContainerUI\n{\npublic:\n    CContainerUI();\n    virtual ~CContainerUI();\n\npublic:\n    LPCTSTR GetClass() const;\n    LPVOID GetInterface(LPCTSTR pstrName);\n\n    CControlUI* GetItemAt(int iIndex) const;\n    int GetItemIndex(CControlUI* pControl) const;\n    bool SetItemIndex(CControlUI* pControl, int iIndex);\n    int GetCount() const;\n    bool Add(CControlUI* pControl);\n    bool AddAt(CControlUI* pControl, int iIndex);\n    bool Remove(CControlUI* pControl);\n    bool RemoveAt(int iIndex);\n    void RemoveAll();\n\n    void DoEvent(TEventUI& event);\n    void SetVisible(bool bVisible = true);\n    void SetInternVisible(bool bVisible = true);\n\tvoid SetEnabled(bool bEnabled);\n    void SetMouseEnabled(bool bEnable = true);\n\n    virtual RECT GetInset() const;\n    virtual void SetInset(RECT rcInset); // ڱ߾࣬൱ÿͻ\n    virtual int GetChildPadding() const;\n    virtual void SetChildPadding(int iPadding);\n    virtual bool IsAutoDestroy() const;\n    virtual void SetAutoDestroy(bool bAuto);\n    virtual bool IsDelayedDestroy() const;\n    virtual void SetDelayedDestroy(bool bDelayed);\n    virtual bool IsMouseChildEnabled() const;\n    virtual void SetMouseChildEnabled(bool bEnable = true);\n\n    virtual int FindSelectable(int iIndex, bool bForward = true) const;\n\n    void SetPos(RECT rc);\n    void DoPaint(HDC hDC, const RECT& rcPaint);\n\n    void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n    void SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit = true);\n    CControlUI* FindControl(FINDCONTROLPROC Proc, LPVOID pData, UINT uFlags);\n\n\tbool SetSubControlText(LPCTSTR pstrSubControlName,LPCTSTR pstrText);\n\tbool SetSubControlFixedHeight(LPCTSTR pstrSubControlName,int cy);\n\tbool SetSubControlFixedWdith(LPCTSTR pstrSubControlName,int cx);\n\tbool SetSubControlUserData(LPCTSTR pstrSubControlName,LPCTSTR pstrText);\n\n\tCDuiString GetSubControlText(LPCTSTR pstrSubControlName);\n\tint GetSubControlFixedHeight(LPCTSTR pstrSubControlName);\n\tint GetSubControlFixedWdith(LPCTSTR pstrSubControlName);\n\tconst CDuiString GetSubControlUserData(LPCTSTR pstrSubControlName);\n\tCControlUI* FindSubControl(LPCTSTR pstrSubControlName);\n\n    virtual SIZE GetScrollPos() const;\n    virtual SIZE GetScrollRange() const;\n    virtual void SetScrollPos(SIZE szPos);\n\tvirtual void SetScrollStepSize(int nSize);\n\tvirtual int GetScrollStepSize() const;\n    virtual void LineUp();\n    virtual void LineDown();\n    virtual void PageUp();\n    virtual void PageDown();\n    virtual void HomeUp();\n    virtual void EndDown();\n    virtual void LineLeft();\n    virtual void LineRight();\n    virtual void PageLeft();\n    virtual void PageRight();\n    virtual void HomeLeft();\n    virtual void EndRight();\n    virtual void EnableScrollBar(bool bEnableVertical = true, bool bEnableHorizontal = false);\n    virtual CScrollBarUI* GetVerticalScrollBar() const;\n    virtual CScrollBarUI* GetHorizontalScrollBar() const;\n\nprotected:\n    virtual void SetFloatPos(int iIndex);\n    virtual void ProcessScrollBar(RECT rc, int cxRequired, int cyRequired);\n\nprotected:\n    CStdPtrArray m_items;\n    RECT m_rcInset;\n    int m_iChildPadding;\n    bool m_bAutoDestroy;\n    bool m_bDelayedDestroy;\n    bool m_bMouseChildEnabled;\n    bool m_bScrollProcess; // ֹSetPosѭ\n\tint\t m_nScrollStepSize;\n\n    CScrollBarUI* m_pVerticalScrollBar;\n    CScrollBarUI* m_pHorizontalScrollBar;\n};\n\n} // namespace DuiLib\n\n#endif // __UICONTAINER_H__\n"
  },
  {
    "path": "DuiLib/Core/UIContainer.cpp",
    "content": "#include \"StdAfx.h\"\n\nnamespace DuiLib\n{\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCContainerUI::CContainerUI()\n\t\t: m_iChildPadding(0),\n\t\tm_bAutoDestroy(true),\n\t\tm_bDelayedDestroy(true),\n\t\tm_bMouseChildEnabled(true),\n\t\tm_pVerticalScrollBar(NULL),\n\t\tm_pHorizontalScrollBar(NULL),\n\t\tm_bScrollProcess(false)\n\t{\n\t\t::ZeroMemory(&m_rcInset, sizeof(m_rcInset));\n\t}\n\n\tCContainerUI::~CContainerUI()\n\t{\n\t\tm_bDelayedDestroy = false;\n\t\tRemoveAll();\n\t\tif( m_pVerticalScrollBar ) delete m_pVerticalScrollBar;\n\t\tif( m_pHorizontalScrollBar ) delete m_pHorizontalScrollBar;\n\t}\n\n\tLPCTSTR CContainerUI::GetClass() const\n\t{\n\t\treturn _T(\"ContainerUI\");\n\t}\n\n\tLPVOID CContainerUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"IContainer\")) == 0 ) return static_cast<IContainerUI*>(this);\n\t\telse if( _tcscmp(pstrName, DUI_CTR_CONTAINER) == 0 ) return static_cast<CContainerUI*>(this);\n\t\treturn CControlUI::GetInterface(pstrName);\n\t}\n\n\tCControlUI* CContainerUI::GetItemAt(int iIndex) const\n\t{\n\t\tif( iIndex < 0 || iIndex >= m_items.GetSize() ) return NULL;\n\t\treturn static_cast<CControlUI*>(m_items[iIndex]);\n\t}\n\n\tint CContainerUI::GetItemIndex(CControlUI* pControl) const\n\t{\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tif( static_cast<CControlUI*>(m_items[it]) == pControl ) {\n\t\t\t\treturn it;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\tbool CContainerUI::SetItemIndex(CControlUI* pControl, int iIndex)\n\t{\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tif( static_cast<CControlUI*>(m_items[it]) == pControl ) {\n\t\t\t\tNeedUpdate();            \n\t\t\t\tm_items.Remove(it);\n\t\t\t\treturn m_items.InsertAt(iIndex, pControl);\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tint CContainerUI::GetCount() const\n\t{\n\t\treturn m_items.GetSize();\n\t}\n\n\tbool CContainerUI::Add(CControlUI* pControl)\n\t{\n\t\tif( pControl == NULL) return false;\n\n\t\tif( m_pManager != NULL ) m_pManager->InitControls(pControl, this);\n\t\tif( IsVisible() ) NeedUpdate();\n\t\telse pControl->SetInnerVisible(false);\n\t\treturn m_items.Add(pControl);   \n\t}\n\n\tbool CContainerUI::AddAt(CControlUI* pControl, int iIndex)\n\t{\n\t\tif( pControl == NULL) return false;\n\n\t\tif( m_pManager != NULL ) m_pManager->InitControls(pControl, this);\n\t\tif( IsVisible() ) NeedUpdate();\n\t\telse pControl->SetInnerVisible(false);\n\t\treturn m_items.InsertAt(iIndex, pControl);\n\t}\n\n\tbool CContainerUI::Remove(CControlUI* pControl)\n\t{\n\t\tif( pControl == NULL) return false;\n\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tif( static_cast<CControlUI*>(m_items[it]) == pControl ) {\n\t\t\t\tNeedUpdate();\n\t\t\t\tif( m_bAutoDestroy ) {\n\t\t\t\t\tif( m_bDelayedDestroy && m_pManager ) m_pManager->AddDelayedCleanup(pControl);             \n\t\t\t\t\telse delete pControl;\n\t\t\t\t}\n\t\t\t\treturn m_items.Remove(it);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CContainerUI::RemoveAt(int iIndex)\n\t{\n\t\tCControlUI* pControl = GetItemAt(iIndex);\n\t\tif (pControl != NULL) {\n\t\t\treturn CContainerUI::Remove(pControl);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tvoid CContainerUI::RemoveAll()\n\t{\n\t\tfor( int it = 0; m_bAutoDestroy && it < m_items.GetSize(); it++ ) {\n\t\t\tif( m_bDelayedDestroy && m_pManager ) m_pManager->AddDelayedCleanup(static_cast<CControlUI*>(m_items[it]));             \n\t\t\telse delete static_cast<CControlUI*>(m_items[it]);\n\t\t}\n\t\tm_items.Empty();\n\t\tNeedUpdate();\n\t}\n\n\tbool CContainerUI::IsAutoDestroy() const\n\t{\n\t\treturn m_bAutoDestroy;\n\t}\n\n\tvoid CContainerUI::SetAutoDestroy(bool bAuto)\n\t{\n\t\tm_bAutoDestroy = bAuto;\n\t}\n\n\tbool CContainerUI::IsDelayedDestroy() const\n\t{\n\t\treturn m_bDelayedDestroy;\n\t}\n\n\tvoid CContainerUI::SetDelayedDestroy(bool bDelayed)\n\t{\n\t\tm_bDelayedDestroy = bDelayed;\n\t}\n\n\tRECT CContainerUI::GetInset() const\n\t{\n\t\treturn m_rcInset;\n\t}\n\n\tvoid CContainerUI::SetInset(RECT rcInset)\n\t{\n\t\tm_rcInset = rcInset;\n\t\tNeedUpdate();\n\t}\n\n\tint CContainerUI::GetChildPadding() const\n\t{\n\t\treturn m_iChildPadding;\n\t}\n\n\tvoid CContainerUI::SetChildPadding(int iPadding)\n\t{\n\t\tm_iChildPadding = iPadding;\n\t\tNeedUpdate();\n\t}\n\n\tbool CContainerUI::IsMouseChildEnabled() const\n\t{\n\t\treturn m_bMouseChildEnabled;\n\t}\n\n\tvoid CContainerUI::SetMouseChildEnabled(bool bEnable)\n\t{\n\t\tm_bMouseChildEnabled = bEnable;\n\t}\n\n\tvoid CContainerUI::SetVisible(bool bVisible)\n\t{\n\t\tif( m_bVisible == bVisible ) return;\n\t\tCControlUI::SetVisible(bVisible);\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tstatic_cast<CControlUI*>(m_items[it])->SetInnerVisible(IsVisible());\n\t\t}\n\t}\n\n\t// ߼ϣContainerؼ˷\n\t// ô˷ĽǣڲӿؼأؼȻʾЧ\n\tvoid CContainerUI::SetInnerVisible(bool bVisible)\n\t{\n\t\tCControlUI::SetInnerVisible(bVisible);\n\t\tif( m_items.IsEmpty() ) return;\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\t// ӿؼʾ״̬\n\t\t\t// InternVisible״̬ӦӿؼԼ\n\t\t\tstatic_cast<CControlUI*>(m_items[it])->SetInnerVisible(IsVisible());\n\t\t}\n\t}\n\n\tvoid CContainerUI::SetMouseEnabled(bool bEnabled)\n\t{\n\t\tif( m_pVerticalScrollBar != NULL ) m_pVerticalScrollBar->SetMouseEnabled(bEnabled);\n\t\tif( m_pHorizontalScrollBar != NULL ) m_pHorizontalScrollBar->SetMouseEnabled(bEnabled);\n\t\tCControlUI::SetMouseEnabled(bEnabled);\n\t}\n\n\tvoid CContainerUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {\n\t\t\tif( m_pParent != NULL ) m_pParent->DoEvent(event);\n\t\t\telse CControlUI::DoEvent(event);\n\t\t\treturn;\n\t\t}\n\n\t\tif( event.Type == UIEVENT_SETFOCUS ) \n\t\t{\n\t\t\tm_bFocused = true;\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_KILLFOCUS ) \n\t\t{\n\t\t\tm_bFocused = false;\n\t\t\treturn;\n\t\t}\n\t\tif( m_pVerticalScrollBar != NULL && m_pVerticalScrollBar->IsVisible() && m_pVerticalScrollBar->IsEnabled() )\n\t\t{\n\t\t\tif( event.Type == UIEVENT_KEYDOWN ) \n\t\t\t{\n\t\t\t\tswitch( event.chKey ) {\n\t\t\t\tcase VK_DOWN:\n\t\t\t\t\tLineDown();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_UP:\n\t\t\t\t\tLineUp();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_NEXT:\n\t\t\t\t\tPageDown();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_PRIOR:\n\t\t\t\t\tPageUp();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_HOME:\n\t\t\t\t\tHomeUp();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_END:\n\t\t\t\t\tEndDown();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if( event.Type == UIEVENT_SCROLLWHEEL )\n\t\t\t{\n\t\t\t\tswitch( LOWORD(event.wParam) ) {\n\t\t\t\tcase SB_LINEUP:\n\t\t\t\t\tLineUp();\n\t\t\t\t\treturn;\n\t\t\t\tcase SB_LINEDOWN:\n\t\t\t\t\tLineDown();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( m_pHorizontalScrollBar != NULL && m_pHorizontalScrollBar->IsVisible() && m_pHorizontalScrollBar->IsEnabled() ) {\n\t\t\tif( event.Type == UIEVENT_KEYDOWN ) \n\t\t\t{\n\t\t\t\tswitch( event.chKey ) {\n\t\t\t\tcase VK_DOWN:\n\t\t\t\t\tLineRight();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_UP:\n\t\t\t\t\tLineLeft();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_NEXT:\n\t\t\t\t\tPageRight();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_PRIOR:\n\t\t\t\t\tPageLeft();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_HOME:\n\t\t\t\t\tHomeLeft();\n\t\t\t\t\treturn;\n\t\t\t\tcase VK_END:\n\t\t\t\t\tEndRight();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if( event.Type == UIEVENT_SCROLLWHEEL )\n\t\t\t{\n\t\t\t\tswitch( LOWORD(event.wParam) ) {\n\t\t\t\tcase SB_LINEUP:\n\t\t\t\t\tLineLeft();\n\t\t\t\t\treturn;\n\t\t\t\tcase SB_LINEDOWN:\n\t\t\t\t\tLineRight();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCControlUI::DoEvent(event);\n\t}\n\n\tSIZE CContainerUI::GetScrollPos() const\n\t{\n\t\tSIZE sz = {0, 0};\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) sz.cy = m_pVerticalScrollBar->GetScrollPos();\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) sz.cx = m_pHorizontalScrollBar->GetScrollPos();\n\t\treturn sz;\n\t}\n\n\tSIZE CContainerUI::GetScrollRange() const\n\t{\n\t\tSIZE sz = {0, 0};\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) sz.cy = m_pVerticalScrollBar->GetScrollRange();\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) sz.cx = m_pHorizontalScrollBar->GetScrollRange();\n\t\treturn sz;\n\t}\n\n\tvoid CContainerUI::SetScrollPos(SIZE szPos)\n\t{\n\t\tint cx = 0;\n\t\tint cy = 0;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) {\n\t\t\tint iLastScrollPos = m_pVerticalScrollBar->GetScrollPos();\n\t\t\tm_pVerticalScrollBar->SetScrollPos(szPos.cy);\n\t\t\tcy = m_pVerticalScrollBar->GetScrollPos() - iLastScrollPos;\n\t\t}\n\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\tint iLastScrollPos = m_pHorizontalScrollBar->GetScrollPos();\n\t\t\tm_pHorizontalScrollBar->SetScrollPos(szPos.cx);\n\t\t\tcx = m_pHorizontalScrollBar->GetScrollPos() - iLastScrollPos;\n\t\t}\n\n\t\tif( cx == 0 && cy == 0 ) return;\n\n\t\tRECT rcPos;\n\t\tfor( int it2 = 0; it2 < m_items.GetSize(); it2++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it2]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) continue;\n\n\t\t\trcPos = pControl->GetPos();\n\t\t\trcPos.left -= cx;\n\t\t\trcPos.right -= cx;\n\t\t\trcPos.top -= cy;\n\t\t\trcPos.bottom -= cy;\n\t\t\tpControl->SetPos(rcPos);\n\t\t}\n\n\t\tInvalidate();\n\t}\n\n\tvoid CContainerUI::LineUp()\n\t{\n\t\tint cyLine = 8;\n\t\tif( m_pManager ) cyLine = m_pManager->GetDefaultFontInfo()->tm.tmHeight + 8;\n\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cy -= cyLine;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::LineDown()\n\t{\n\t\tint cyLine = 8;\n\t\tif( m_pManager ) cyLine = m_pManager->GetDefaultFontInfo()->tm.tmHeight + 8;\n\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cy += cyLine;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::PageUp()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tint iOffset = m_rcItem.bottom - m_rcItem.top - m_rcInset.top - m_rcInset.bottom;\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) iOffset -= m_pHorizontalScrollBar->GetFixedHeight();\n\t\tsz.cy -= iOffset;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::PageDown()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tint iOffset = m_rcItem.bottom - m_rcItem.top - m_rcInset.top - m_rcInset.bottom;\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) iOffset -= m_pHorizontalScrollBar->GetFixedHeight();\n\t\tsz.cy += iOffset;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::HomeUp()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cy = 0;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::EndDown()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cy = GetScrollRange().cy;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::LineLeft()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cx -= 8;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::LineRight()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cx += 8;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::PageLeft()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tint iOffset = m_rcItem.right - m_rcItem.left - m_rcInset.left - m_rcInset.right;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) iOffset -= m_pVerticalScrollBar->GetFixedWidth();\n\t\tsz.cx -= iOffset;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::PageRight()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tint iOffset = m_rcItem.right - m_rcItem.left - m_rcInset.left - m_rcInset.right;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) iOffset -= m_pVerticalScrollBar->GetFixedWidth();\n\t\tsz.cx += iOffset;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::HomeLeft()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cx = 0;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::EndRight()\n\t{\n\t\tSIZE sz = GetScrollPos();\n\t\tsz.cx = GetScrollRange().cx;\n\t\tSetScrollPos(sz);\n\t}\n\n\tvoid CContainerUI::EnableScrollBarEx(bool bAddScroll, ScrollType st)\n\t{\n\t\tif (st == ScrollType::EVSCROLL)\n\t\t{\n\n\t\t\tif (bAddScroll && !m_pVerticalScrollBar)\n\t\t\t{\n\t\t\t\tm_pVerticalScrollBar = new CScrollBarUI;\n\t\t\t\tm_pVerticalScrollBar->SetOwner(this);\n\t\t\t\tm_pVerticalScrollBar->SetManager(m_pManager, NULL, false);\n\t\t\t\t//һʼʾ˴ֱʱûԶӿؼĿȣӿؼʾбVisibleĳʼ״̬trueˢһκContainerŷʾˮƽȻŵӿؼĿȡ\n\t\t\t\t//m_pVerticalScrollBar->SetVisible(false);    // \n\t\t\t\tif (m_pManager) {\n\t\t\t\t\tLPCTSTR pDefaultAttributes = m_pManager->GetDefaultAttributeList(_T(\"VScrollBar\"));\n\t\t\t\t\tif (pDefaultAttributes) {\n\t\t\t\t\t\tm_pVerticalScrollBar->ApplyAttributeList(pDefaultAttributes);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!bAddScroll && m_pVerticalScrollBar) {\n\t\t\t\tdelete m_pVerticalScrollBar;\n\t\t\t\tm_pVerticalScrollBar = NULL;\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\tif (bAddScroll && !m_pHorizontalScrollBar) {\n\t\t\t\tm_pHorizontalScrollBar = new CScrollBarUI;\n\t\t\t\tm_pHorizontalScrollBar->SetHorizontal(true);\n\t\t\t\tm_pHorizontalScrollBar->SetOwner(this);\n\t\t\t\tm_pHorizontalScrollBar->SetManager(m_pManager, NULL, false);\n\t\t\t\t//m_pHorizontalScrollBar->SetVisible(false);    // \n\n\t\t\t\tif (m_pManager) {\n\t\t\t\t\tLPCTSTR pDefaultAttributes = m_pManager->GetDefaultAttributeList(_T(\"HScrollBar\"));\n\t\t\t\t\tif (pDefaultAttributes) {\n\t\t\t\t\t\tm_pHorizontalScrollBar->ApplyAttributeList(pDefaultAttributes);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!bAddScroll && m_pHorizontalScrollBar) {\n\t\t\t\tdelete m_pHorizontalScrollBar;\n\t\t\t\tm_pHorizontalScrollBar = NULL;\n\t\t\t}\n\n\t\t}\n\n\n\n\n\t\tNeedUpdate();\n\t}\n\n\tCScrollBarUI* CContainerUI::GetVerticalScrollBar() const\n\t{\n\t\treturn m_pVerticalScrollBar;\n\t}\n\n\tCScrollBarUI* CContainerUI::GetHorizontalScrollBar() const\n\t{\n\t\treturn m_pHorizontalScrollBar;\n\t}\n\n\tint CContainerUI::FindSelectable(int iIndex, bool bForward /*= true*/) const\n\t{\n\t\t// NOTE: This is actually a helper-function for the list/combo/ect controls\n\t\t//       that allow them to find the next enabled/available selectable item\n\t\tif( GetCount() == 0 ) return -1;\n\t\tiIndex = CLAMP(iIndex, 0, GetCount() - 1);\n\t\tif( bForward ) {\n\t\t\tfor( int i = iIndex; i < GetCount(); i++ ) {\n\t\t\t\tif( GetItemAt(i)->GetInterface(_T(\"ListItem\")) != NULL \n\t\t\t\t\t&& GetItemAt(i)->IsVisible()\n\t\t\t\t\t&& GetItemAt(i)->IsEnabled() ) return i;\n\t\t\t}\n\t\t\treturn -1;\n\t\t}\n\t\telse {\n\t\t\tfor( int i = iIndex; i >= 0; --i ) {\n\t\t\t\tif( GetItemAt(i)->GetInterface(_T(\"ListItem\")) != NULL \n\t\t\t\t\t&& GetItemAt(i)->IsVisible()\n\t\t\t\t\t&& GetItemAt(i)->IsEnabled() ) return i;\n\t\t\t}\n\t\t\treturn FindSelectable(0, true);\n\t\t}\n\t}\n\n\tvoid CContainerUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\t\tif( m_items.IsEmpty() ) return;\n\t\trc.left += m_rcInset.left;\n\t\trc.top += m_rcInset.top;\n\t\trc.right -= m_rcInset.right;\n\t\trc.bottom -= m_rcInset.bottom;\n\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) {\n\t\t\t\tSetFloatPos(it);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpControl->SetPos(rc); // зfloatӿؼŴͻ\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CContainerUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"inset\")) == 0 ) {\n\t\t\tRECT rcInset = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\trcInset.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcInset.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\trcInset.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcInset.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\t\tSetInset(rcInset);\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"mousechild\")) == 0)\n\t\t{\n\t\t\tSetMouseChildEnabled(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"vscrollbar\")) == 0 ) \n\t\t{\n\n\t\t\tEnableScrollBarEx(_tcscmp(pstrValue, _T(\"true\")) == 0,ScrollType::EVSCROLL);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"vscrollbarstyle\")) == 0 )\n\t\t{\n\t\t\tEnableScrollBarEx(true, ScrollType::EVSCROLL);\n\t\t\tif (GetVerticalScrollBar())\n\t\t\t{\n\t\t\t\tGetVerticalScrollBar()->ApplyAttributeList(pstrValue);\n\t\t\t}\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"hscrollbar\")) == 0 ) \n\t\t{\n\t\t\tEnableScrollBarEx( _tcscmp(pstrValue, _T(\"true\")) == 0,ScrollType::EHSCROLL);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"hscrollbarstyle\")) == 0 )\n\t\t{\n\t\t\tEnableScrollBarEx(true, ScrollType::EHSCROLL);\n\t\t\tif (GetHorizontalScrollBar())\n\t\t\t{\n\t\t\t\tGetHorizontalScrollBar()->ApplyAttributeList(pstrValue);\n\t\t\t}\n\t\t}\n\t\telse if (_tcscmp(pstrName, _T(\"childpadding\")) == 0)\n\t\t{\n\t\t\tSetChildPadding(_ttoi(pstrValue));\n\t\t}\n\t\telse CControlUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CContainerUI::SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit)\n\t{\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tstatic_cast<CControlUI*>(m_items[it])->SetManager(pManager, this, bInit);\n\t\t}\n\n\t\tif( m_pVerticalScrollBar != NULL ) m_pVerticalScrollBar->SetManager(pManager, this, bInit);\n\t\tif( m_pHorizontalScrollBar != NULL ) m_pHorizontalScrollBar->SetManager(pManager, this, bInit);\n\t\tCControlUI::SetManager(pManager, pParent, bInit);\n\t}\n\n\tCControlUI* CContainerUI::FindControl(FINDCONTROLPROC Proc, LPVOID pData, UINT uFlags)\n\t{\n\t\t// Check if this guy is valid\n\t\tif( (uFlags & UIFIND_VISIBLE) != 0 && !IsVisible() ) return NULL;\n\t\tif( (uFlags & UIFIND_ENABLED) != 0 && !IsEnabled() ) return NULL;\n\t\tif( (uFlags & UIFIND_HITTEST) != 0 ) {\n\t\t\tif( !::PtInRect(&m_rcItem, *(static_cast<LPPOINT>(pData))) ) return NULL;\n\t\t\tif( !m_bMouseChildEnabled ) {\n\t\t\t\tCControlUI* pResult = NULL;\n\t\t\t\tif( m_pVerticalScrollBar != NULL ) pResult = m_pVerticalScrollBar->FindControl(Proc, pData, uFlags);\n\t\t\t\tif( pResult == NULL && m_pHorizontalScrollBar != NULL ) pResult = m_pHorizontalScrollBar->FindControl(Proc, pData, uFlags);\n\t\t\t\tif( pResult == NULL ) pResult = CControlUI::FindControl(Proc, pData, uFlags);\n\t\t\t\treturn pResult;\n\t\t\t}\n\t\t}\n\n\t\tCControlUI* pResult = NULL;\n\t\tif( m_pVerticalScrollBar != NULL ) pResult = m_pVerticalScrollBar->FindControl(Proc, pData, uFlags);\n\t\tif( pResult == NULL && m_pHorizontalScrollBar != NULL ) pResult = m_pHorizontalScrollBar->FindControl(Proc, pData, uFlags);\n\t\tif( pResult != NULL ) return pResult;\n\n\t\tif( (uFlags & UIFIND_ME_FIRST) != 0 ) {\n\t\t\tCControlUI* pControl = CControlUI::FindControl(Proc, pData, uFlags);\n\t\t\tif( pControl != NULL ) return pControl;\n\t\t}\n\t\tRECT rc = m_rcItem;\n\t\trc.left += m_rcInset.left;\n\t\trc.top += m_rcInset.top;\n\t\trc.right -= m_rcInset.right;\n\t\trc.bottom -= m_rcInset.bottom;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) rc.right -= m_pVerticalScrollBar->GetFixedWidth();\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) rc.bottom -= m_pHorizontalScrollBar->GetFixedHeight();\n\t\tif( (uFlags & UIFIND_TOP_FIRST) != 0 ) {\n\t\t\tfor( int it = m_items.GetSize() - 1; it >= 0; it-- ) {\n\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it])->FindControl(Proc, pData, uFlags);\n\t\t\t\tif( pControl != NULL ) {\n\t\t\t\t\tif( (uFlags & UIFIND_HITTEST) != 0 && !pControl->IsFloat() && !::PtInRect(&rc, *(static_cast<LPPOINT>(pData))) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse \n\t\t\t\t\t\treturn pControl;\n\t\t\t\t}            \n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it])->FindControl(Proc, pData, uFlags);\n\t\t\t\tif( pControl != NULL ) {\n\t\t\t\t\tif( (uFlags & UIFIND_HITTEST) != 0 && !pControl->IsFloat() && !::PtInRect(&rc, *(static_cast<LPPOINT>(pData))) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse \n\t\t\t\t\t\treturn pControl;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\n\t\tif( pResult == NULL && (uFlags & UIFIND_ME_FIRST) == 0 ) pResult = CControlUI::FindControl(Proc, pData, uFlags);\n\t\treturn pResult;\n\t}\n\n\tvoid CContainerUI::DoPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\tRECT rcTemp = { 0 };\n\t\tif( !::IntersectRect(&rcTemp, &rcPaint, &m_rcItem) ) return;\n\n\t\tCRenderClip clip;\n\t\tCRenderClip::GenerateClip(hDC, rcTemp, clip);\n\t\tCControlUI::DoPaint(hDC, rcPaint);\n\n\t\tif( m_items.GetSize() > 0 ) {\n\t\t\tRECT rc = m_rcItem;\n\t\t\trc.left += m_rcInset.left;\n\t\t\trc.top += m_rcInset.top;\n\t\t\trc.right -= m_rcInset.right;\n\t\t\trc.bottom -= m_rcInset.bottom;\n\t\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) rc.right -= m_pVerticalScrollBar->GetFixedWidth();\n\t\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) rc.bottom -= m_pHorizontalScrollBar->GetFixedHeight();\n\n\t\t\tif( !::IntersectRect(&rcTemp, &rcPaint, &rc) ) {\n\t\t\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it]);\n\t\t\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\t\t\tif( !::IntersectRect(&rcTemp, &rcPaint, &pControl->GetPos()) ) continue;\n\t\t\t\t\tif( pControl ->IsFloat() ) {\n\t\t\t\t\t\tif( !::IntersectRect(&rcTemp, &m_rcItem, &pControl->GetPos()) ) continue;\n\t\t\t\t\t\tpControl->DoPaint(hDC, rcPaint);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCRenderClip childClip;\n\t\t\t\tCRenderClip::GenerateClip(hDC, rcTemp, childClip);\n\t\t\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it]);\n\t\t\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\t\t\tif( !::IntersectRect(&rcTemp, &rcPaint, &pControl->GetPos()) ) continue;\n\t\t\t\t\tif( pControl ->IsFloat() ) {\n\t\t\t\t\t\tif( !::IntersectRect(&rcTemp, &m_rcItem, &pControl->GetPos()) ) continue;\n\t\t\t\t\t\tCRenderClip::UseOldClipBegin(hDC, childClip);\n\t\t\t\t\t\tpControl->DoPaint(hDC, rcPaint);\n\t\t\t\t\t\tCRenderClip::UseOldClipEnd(hDC, childClip);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif( !::IntersectRect(&rcTemp, &rc, &pControl->GetPos()) ) continue;\n\t\t\t\t\t\tpControl->DoPaint(hDC, rcPaint);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( m_pVerticalScrollBar != NULL && m_pVerticalScrollBar->IsVisible() ) {\n\t\t\tif( ::IntersectRect(&rcTemp, &rcPaint, &m_pVerticalScrollBar->GetPos()) ) {\n\t\t\t\tm_pVerticalScrollBar->DoPaint(hDC, rcPaint);\n\t\t\t}\n\t\t}\n\n\t\tif( m_pHorizontalScrollBar != NULL && m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\tif( ::IntersectRect(&rcTemp, &rcPaint, &m_pHorizontalScrollBar->GetPos()) ) {\n\t\t\t\tm_pHorizontalScrollBar->DoPaint(hDC, rcPaint);\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CContainerUI::SetFloatPos(int iIndex)\n\t{\n\t\t// ΪCControlUI::SetPosfloatĲӰ죬ﲻܶfloatӹӰ\n\t\tif( iIndex < 0 || iIndex >= m_items.GetSize() ) return;\n\n\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[iIndex]);\n\n\t\tif( !pControl->IsVisible() ) return;\n\t\tif( !pControl->IsFloat() ) return;\n\n\t\tSIZE szXY = pControl->GetFixedXY();\n\t\tSIZE sz = {pControl->GetFixedWidth(), pControl->GetFixedHeight()};\n\t\tRECT rcCtrl = { 0 };\n\t\tif( szXY.cx >= 0 ) {\n\t\t\trcCtrl.left = m_rcItem.left + szXY.cx;\n\t\t\trcCtrl.right = m_rcItem.left + szXY.cx + sz.cx;\n\t\t}\n\t\telse {\n\t\t\trcCtrl.left = m_rcItem.right + szXY.cx - sz.cx;\n\t\t\trcCtrl.right = m_rcItem.right + szXY.cx;\n\t\t}\n\t\tif( szXY.cy >= 0 ) {\n\t\t\trcCtrl.top = m_rcItem.top + szXY.cy;\n\t\t\trcCtrl.bottom = m_rcItem.top + szXY.cy + sz.cy;\n\t\t}\n\t\telse {\n\t\t\trcCtrl.top = m_rcItem.bottom + szXY.cy - sz.cy;\n\t\t\trcCtrl.bottom = m_rcItem.bottom + szXY.cy;\n\t\t}\n\t\tif( pControl->IsRelativePos() )\n\t\t{\n\t\t\tTRelativePosUI tRelativePos = pControl->GetRelativePos();\n\t\t\tSIZE szParent = {m_rcItem.right-m_rcItem.left,m_rcItem.bottom-m_rcItem.top};\n\t\t\tif(tRelativePos.szParent.cx != 0)\n\t\t\t{\n\t\t\t\tint nIncrementX = szParent.cx-tRelativePos.szParent.cx;\n\t\t\t\tint nIncrementY = szParent.cy-tRelativePos.szParent.cy;\n\t\t\t\trcCtrl.left += (nIncrementX*tRelativePos.nMoveXPercent/100);\n\t\t\t\trcCtrl.top += (nIncrementY*tRelativePos.nMoveYPercent/100);\n\t\t\t\trcCtrl.right = rcCtrl.left+sz.cx+(nIncrementX*tRelativePos.nZoomXPercent/100);\n\t\t\t\trcCtrl.bottom = rcCtrl.top+sz.cy+(nIncrementY*tRelativePos.nZoomYPercent/100);\n\t\t\t}\n\t\t\tpControl->SetRelativeParentSize(szParent);\n\t\t}\n\t\tpControl->SetPos(rcCtrl);\n\t}\n\n\tvoid CContainerUI::ProcessScrollBar(RECT rc, int cxRequired, int cyRequired)\n\t{\n\t\tif( m_pHorizontalScrollBar != NULL && m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\tRECT rcScrollBarPos = { rc.left, rc.bottom, rc.right, rc.bottom + m_pHorizontalScrollBar->GetFixedHeight()};\n\t\t\tm_pHorizontalScrollBar->SetPos(rcScrollBarPos);\n\t\t}\n\n\t\tif( m_pVerticalScrollBar == NULL ) return;\n\n\t\tif( cyRequired > rc.bottom - rc.top && !m_pVerticalScrollBar->IsVisible() ) {\n\t\t\tm_pVerticalScrollBar->SetVisible(true);\n\t\t\tm_pVerticalScrollBar->SetScrollRange(cyRequired - (rc.bottom - rc.top));\n\t\t\tm_pVerticalScrollBar->SetScrollPos(0);\n\t\t\tm_bScrollProcess = true;\n\t\t\tSetPos(m_rcItem);\n\t\t\tm_bScrollProcess = false;\n\t\t\treturn;\n\t\t}\n\t\t// No scrollbar required\n\t\tif( !m_pVerticalScrollBar->IsVisible() ) return;\n\n\t\t// Scroll not needed anymore?\n\t\tint cyScroll = cyRequired - (rc.bottom - rc.top);\n\t\tif( cyScroll <= 0 && !m_bScrollProcess) {\n\t\t\tm_pVerticalScrollBar->SetVisible(false);\n\t\t\tm_pVerticalScrollBar->SetScrollPos(0);\n\t\t\tm_pVerticalScrollBar->SetScrollRange(0);\n\t\t\tSetPos(m_rcItem);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tRECT rcScrollBarPos = { rc.right, rc.top, rc.right + m_pVerticalScrollBar->GetFixedWidth(), rc.bottom };\n\t\t\tm_pVerticalScrollBar->SetPos(rcScrollBarPos);\n\n\t\t\tif( m_pVerticalScrollBar->GetScrollRange() != cyScroll ) {\n\t\t\t\tint iScrollPos = m_pVerticalScrollBar->GetScrollPos();\n\t\t\t\tm_pVerticalScrollBar->SetScrollRange(::abs(cyScroll));\n\t\t\t\tif( m_pVerticalScrollBar->GetScrollRange() == 0 ) {\n\t\t\t\t\tm_pVerticalScrollBar->SetVisible(false);\n\t\t\t\t\tm_pVerticalScrollBar->SetScrollPos(0);\n\t\t\t\t}\n\t\t\t\tif( iScrollPos > m_pVerticalScrollBar->GetScrollPos() ) {\n\t\t\t\t\tSetPos(m_rcItem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tbool CContainerUI::SetSubControlText( LPCTSTR pstrSubControlName,LPCTSTR pstrText )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl!=NULL)\n\t\t{\n\t\t\tpSubControl->SetText(pstrText);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t\treturn FALSE;\n\t}\n\n\tbool CContainerUI::SetSubControlFixedHeight( LPCTSTR pstrSubControlName,int cy )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl!=NULL)\n\t\t{\n\t\t\tpSubControl->SetFixedHeight(cy);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t\treturn FALSE;\n\t}\n\n\tbool CContainerUI::SetSubControlFixedWdith( LPCTSTR pstrSubControlName,int cx )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl!=NULL)\n\t\t{\n\t\t\tpSubControl->SetFixedWidth(cx);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t\treturn FALSE;\n\t}\n\n\tbool CContainerUI::SetSubControlUserData( LPCTSTR pstrSubControlName,LPCTSTR pstrText )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl!=NULL)\n\t\t{\n\t\t\tpSubControl->SetUserData(pstrText);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t\treturn FALSE;\n\t}\n\n\tDuiLib::CDuiString CContainerUI::GetSubControlText( LPCTSTR pstrSubControlName )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl==NULL)\n\t\t\treturn _T(\"\");\n\t\telse\n\t\t\treturn pSubControl->GetText();\n\t}\n\n\tint CContainerUI::GetSubControlFixedHeight( LPCTSTR pstrSubControlName )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl==NULL)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn pSubControl->GetFixedHeight();\n\t}\n\n\tint CContainerUI::GetSubControlFixedWdith( LPCTSTR pstrSubControlName )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl==NULL)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn pSubControl->GetFixedWidth();\n\t}\n\n\tconst CDuiString CContainerUI::GetSubControlUserData( LPCTSTR pstrSubControlName )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=this->FindSubControl(pstrSubControlName);\n\t\tif (pSubControl==NULL)\n\t\t\treturn _T(\"\");\n\t\telse\n\t\t\treturn pSubControl->GetUserData();\n\t}\n\n\tCControlUI* CContainerUI::FindSubControl( LPCTSTR pstrSubControlName )\n\t{\n\t\tCControlUI* pSubControl=NULL;\n\t\tpSubControl=static_cast<CControlUI*>(GetManager()->FindSubControlByName(this,pstrSubControlName));\n\t\treturn pSubControl;\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Core/UIContainer.h",
    "content": "#ifndef __UICONTAINER_H__\n#define __UICONTAINER_H__\n\n#pragma once\n\nnamespace DuiLib {\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass IContainerUI\n\t{\n\tpublic:\n\t\tvirtual CControlUI* GetItemAt(int iIndex) const = 0;\n\t\tvirtual int GetItemIndex(CControlUI* pControl) const  = 0;\n\t\tvirtual bool SetItemIndex(CControlUI* pControl, int iIndex)  = 0;\n\t\tvirtual int GetCount() const = 0;\n\t\tvirtual bool Add(CControlUI* pControl) = 0;\n\t\tvirtual bool AddAt(CControlUI* pControl, int iIndex)  = 0;\n\t\tvirtual bool Remove(CControlUI* pControl) = 0;\n\t\tvirtual bool RemoveAt(int iIndex)  = 0;\n\t\tvirtual void RemoveAll() = 0;\n\t};\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\tclass CScrollBarUI;\n\n\tclass UILIB_API CContainerUI : public CControlUI, public IContainerUI\n\t{\n\n\tpublic:\n\t\tenum ScrollType\n\t\t{\n\t\t\tEVSCROLL = 0,\n\t\t\tEHSCROLL,\n\t\t};\n\tpublic:\n\t\tCContainerUI();\n\t\tvirtual ~CContainerUI();\n\n\tpublic:\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tCControlUI* GetItemAt(int iIndex) const;\n\t\tint GetItemIndex(CControlUI* pControl) const;\n\t\tbool SetItemIndex(CControlUI* pControl, int iIndex);\n\t\tint GetCount() const;\n\t\tbool Add(CControlUI* pControl);\n\t\tbool AddAt(CControlUI* pControl, int iIndex);\n\t\tbool Remove(CControlUI* pControl);\n\t\tbool RemoveAt(int iIndex);\n\t\tvoid RemoveAll();\n\n\t\tvoid DoEvent(TEventUI& event);\n\t\tvoid SetVisible(bool bVisible = true);\n\t\tvoid SetInnerVisible(bool bVisible = true);\n\t\tvoid SetMouseEnabled(bool bEnable = true);\n\n\t\tvirtual RECT GetInset() const;\n\t\tvirtual void SetInset(RECT rcInset); // ڱ߾࣬൱ÿͻ\n\t\tvirtual int GetChildPadding() const;\n\t\tvirtual void SetChildPadding(int iPadding);\n\t\tvirtual bool IsAutoDestroy() const;\n\t\tvirtual void SetAutoDestroy(bool bAuto);\n\t\tvirtual bool IsDelayedDestroy() const;\n\t\tvirtual void SetDelayedDestroy(bool bDelayed);\n\t\tvirtual bool IsMouseChildEnabled() const;\n\t\tvirtual void SetMouseChildEnabled(bool bEnable = true);\n\n\t\tvirtual int FindSelectable(int iIndex, bool bForward = true) const;\n\n\t\tvoid SetPos(RECT rc);\n\t\tvoid DoPaint(HDC hDC, const RECT& rcPaint);\n\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\t\tvoid SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit = true);\n\t\tCControlUI* FindControl(FINDCONTROLPROC Proc, LPVOID pData, UINT uFlags);\n\n\t\tbool SetSubControlText(LPCTSTR pstrSubControlName,LPCTSTR pstrText);\n\t\tbool SetSubControlFixedHeight(LPCTSTR pstrSubControlName,int cy);\n\t\tbool SetSubControlFixedWdith(LPCTSTR pstrSubControlName,int cx);\n\t\tbool SetSubControlUserData(LPCTSTR pstrSubControlName,LPCTSTR pstrText);\n\n\t\tCDuiString GetSubControlText(LPCTSTR pstrSubControlName);\n\t\tint GetSubControlFixedHeight(LPCTSTR pstrSubControlName);\n\t\tint GetSubControlFixedWdith(LPCTSTR pstrSubControlName);\n\t\tconst CDuiString GetSubControlUserData(LPCTSTR pstrSubControlName);\n\t\tCControlUI* FindSubControl(LPCTSTR pstrSubControlName);\n\n\t\tvirtual SIZE GetScrollPos() const;\n\t\tvirtual SIZE GetScrollRange() const;\n\t\tvirtual void SetScrollPos(SIZE szPos);\n\t\tvirtual void LineUp();\n\t\tvirtual void LineDown();\n\t\tvirtual void PageUp();\n\t\tvirtual void PageDown();\n\t\tvirtual void HomeUp();\n\t\tvirtual void EndDown();\n\t\tvirtual void LineLeft();\n\t\tvirtual void LineRight();\n\t\tvirtual void PageLeft();\n\t\tvirtual void PageRight();\n\t\tvirtual void HomeLeft();\n\t\tvirtual void EndRight();\n\t\tvirtual void EnableScrollBarEx(bool bAddScroll, ScrollType st);\n\t\tvirtual CScrollBarUI* GetVerticalScrollBar() const;\n\t\tvirtual CScrollBarUI* GetHorizontalScrollBar() const;\n\n\tprotected:\n\t\tvirtual void SetFloatPos(int iIndex);\n\t\tvirtual void ProcessScrollBar(RECT rc, int cxRequired, int cyRequired);\n\n\tprotected:\n\t\tCStdPtrArray m_items;\n\t\tRECT m_rcInset;\n\t\tint m_iChildPadding;\n\t\tbool m_bAutoDestroy;\n\t\tbool m_bDelayedDestroy;\n\t\tbool m_bMouseChildEnabled;\n\t\tbool m_bScrollProcess; // ֹSetPosѭ\n\n\t\tCScrollBarUI* m_pVerticalScrollBar;\n\t\tCScrollBarUI* m_pHorizontalScrollBar;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UICONTAINER_H__\n"
  },
  {
    "path": "DuiLib/Core/UIControl.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"UIControl.h\"\n\nnamespace DuiLib {\n\n\tCControlUI::CControlUI() : \n\t\tm_pManager(NULL), \n\t\tm_pParent(NULL), \n\t\tm_bUpdateNeeded(true),\n\t\tm_bMenuUsed(false),\n\t\tm_bWantTab(false),\n\t\tm_bVisible(true), \n\t\tm_bInternVisible(true),\n\t\tm_bFocused(false),\n\t\tm_bEnabled(true),\n\t\tm_bMouseEnabled(true),\n\t\tm_bKeyboardEnabled(true),\n\t\tm_bFloat(false),\n\t\tm_bSetPos(false),\n\t\tm_chShortcut('\\0'),\n\t\tm_pTag(NULL),\n\t\tm_dwBackColor(0),\n\t\tm_dwBackColor2(0),\n\t\tm_dwBackColor3(0),\n\t\tm_dwBorderColor(0),\n\t\tm_dwFocusBorderColor(0),\n\t\tm_bColorHSL(false),\n\t\tm_nBorderSize(0),\n\t\tm_nBorderStyle(PS_SOLID),\n\t\tm_nTooltipWidth(300)\n\t{\n\t\tm_cXY.cx = m_cXY.cy = 0;\n\t\tm_cxyFixed.cx = m_cxyFixed.cy = 0;\n\t\tm_cxyMin.cx = m_cxyMin.cy = 0;\n\t\tm_cxyMax.cx = m_cxyMax.cy = 9999;\n\t\tm_cxyBorderRound.cx = m_cxyBorderRound.cy = 0;\n\n\t\t::ZeroMemory(&m_rcPadding, sizeof(RECT));\n\t\t::ZeroMemory(&m_rcItem, sizeof(RECT));\n\t\t::ZeroMemory(&m_rcPaint, sizeof(RECT));\n\t\t::ZeroMemory(&m_rcBorderSize,sizeof(RECT));\n\t\t::ZeroMemory(&m_tRelativePos, sizeof(TRelativePosUI));\n\t}\n\n\tCControlUI::~CControlUI()\n\t{\n\t\tif( OnDestroy ) OnDestroy(this);\n\t\tif( m_pManager != NULL ) m_pManager->ReapObjects(this);\n\t}\n\n\tCDuiString CControlUI::GetName() const\n\t{\n\t\treturn m_sName;\n\t}\n\n\tvoid CControlUI::SetName(LPCTSTR pstrName)\n\t{\n\t\tm_sName = pstrName;\n\t}\n\n\tLPVOID CControlUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_CONTROL) == 0 ) return this;\n\t\treturn NULL;\n\t}\n\n\tLPCTSTR CControlUI::GetClass() const\n\t{\n\t\treturn _T(\"ControlUI\");\n\t}\n\n\tUINT CControlUI::GetControlFlags() const\n\t{\n\t\treturn 0;\n\t}\n\n\tbool CControlUI::Activate()\n\t{\n\t\tif( !IsVisible() ) return false;\n\t\tif( !IsEnabled() ) return false;\n\t\treturn true;\n\t}\n\n\tCPaintManagerUI* CControlUI::GetManager() const\n\t{\n\t\treturn m_pManager;\n\t}\n\n\tvoid CControlUI::SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit)\n\t{\n\t\tm_pManager = pManager;\n\t\tm_pParent = pParent;\n\t\tif( bInit && m_pParent ) Init();\n\t}\n\n\tCControlUI* CControlUI::GetParent() const\n\t{\n\t\treturn m_pParent;\n\t}\n\n\tCDuiString CControlUI::GetText() const\n\t{\n\t\treturn m_sText;\n\t}\n\n\tvoid CControlUI::SetText(LPCTSTR pstrText)\n\t{\n\t\tif( m_sText == pstrText ) return;\n\n\t\tm_sText = pstrText;\n\t\tInvalidate();\n\t}\n\n\tDWORD CControlUI::GetBkColor() const\n\t{\n\t\treturn m_dwBackColor;\n\t}\n\n\tvoid CControlUI::SetBkColor(DWORD dwBackColor)\n\t{\n\t\tif( m_dwBackColor == dwBackColor ) return;\n\n\t\tm_dwBackColor = dwBackColor;\n\t\tInvalidate();\n\t}\n\n\tDWORD CControlUI::GetBkColor2() const\n\t{\n\t\treturn m_dwBackColor2;\n\t}\n\n\tvoid CControlUI::SetBkColor2(DWORD dwBackColor)\n\t{\n\t\tif( m_dwBackColor2 == dwBackColor ) return;\n\n\t\tm_dwBackColor2 = dwBackColor;\n\t\tInvalidate();\n\t}\n\n\tDWORD CControlUI::GetBkColor3() const\n\t{\n\t\treturn m_dwBackColor3;\n\t}\n\n\tvoid CControlUI::SetBkColor3(DWORD dwBackColor)\n\t{\n\t\tif( m_dwBackColor3 == dwBackColor ) return;\n\n\t\tm_dwBackColor3 = dwBackColor;\n\t\tInvalidate();\n\t}\n\n\tLPCTSTR CControlUI::GetBkImage()\n\t{\n\t\treturn m_sBkImage;\n\t}\n\n\tvoid CControlUI::SetBkImage(LPCTSTR pStrImage)\n\t{\n\t\tif( m_sBkImage == pStrImage ) return;\n\n\t\tm_sBkImage = pStrImage;\n\t\tInvalidate();\n\t}\n\n\tDWORD CControlUI::GetBorderColor() const\n\t{\n\t\treturn m_dwBorderColor;\n\t}\n\n\tvoid CControlUI::SetBorderColor(DWORD dwBorderColor)\n\t{\n\t\tif( m_dwBorderColor == dwBorderColor ) return;\n\n\t\tm_dwBorderColor = dwBorderColor;\n\t\tInvalidate();\n\t}\n\n\tDWORD CControlUI::GetFocusBorderColor() const\n\t{\n\t\treturn m_dwFocusBorderColor;\n\t}\n\n\tvoid CControlUI::SetFocusBorderColor(DWORD dwBorderColor)\n\t{\n\t\tif( m_dwFocusBorderColor == dwBorderColor ) return;\n\n\t\tm_dwFocusBorderColor = dwBorderColor;\n\t\tInvalidate();\n\t}\n\n\tbool CControlUI::IsColorHSL() const\n\t{\n\t\treturn m_bColorHSL;\n\t}\n\n\tvoid CControlUI::SetColorHSL(bool bColorHSL)\n\t{\n\t\tif( m_bColorHSL == bColorHSL ) return;\n\n\t\tm_bColorHSL = bColorHSL;\n\t\tInvalidate();\n\t}\n\n\tint CControlUI::GetBorderSize() const\n\t{\n\t\treturn m_nBorderSize;\n\t}\n\n\tvoid CControlUI::SetBorderSize(int nSize)\n\t{\n\t\tif( m_nBorderSize == nSize ) return;\n\n\t\tm_nBorderSize = nSize;\n\t\tInvalidate();\n\t}\n\n\tvoid CControlUI::SetBorderSize( RECT rc )\n\t{\n\t\tm_rcBorderSize = rc;\n\t\tInvalidate();\n\t}\n\n\tSIZE CControlUI::GetBorderRound() const\n\t{\n\t\treturn m_cxyBorderRound;\n\t}\n\n\tvoid CControlUI::SetBorderRound(SIZE cxyRound)\n\t{\n\t\tm_cxyBorderRound = cxyRound;\n\t\tInvalidate();\n\t}\n\n\tbool CControlUI::DrawImage(HDC hDC, LPCTSTR pStrImage, LPCTSTR pStrModify)\n\t{\n\t\treturn CRenderEngine::DrawImageString(hDC, m_pManager, m_rcItem, m_rcPaint, pStrImage, pStrModify);\n\t}\n\n\tbool CControlUI::DrawImage(HDC hDC, LPCTSTR pStrImage, LPCTSTR pStrModify, bool bNeedAlpha, BYTE bNewFade)\n\t{\n\t\treturn CRenderEngine::DrawImageString(hDC, m_pManager, m_rcItem, m_rcPaint, pStrImage, pStrModify, bNeedAlpha, bNewFade);\n\t}\n\n\tconst RECT& CControlUI::GetPos() const\n\t{\n\t\treturn m_rcItem;\n\t}\n\n\tvoid CControlUI::SetPos(RECT rc)\n\t{\n\t\tif( rc.right < rc.left ) rc.right = rc.left;\n\t\tif( rc.bottom < rc.top ) rc.bottom = rc.top;\n\n\t\tCDuiRect invalidateRc = m_rcItem;\n\t\tif( ::IsRectEmpty(&invalidateRc) ) invalidateRc = rc;\n\n\t\tm_rcItem = rc;\n\t\tif( m_pManager == NULL ) return;\n\n\t\tif( !m_bSetPos ) {\n\t\t\tm_bSetPos = true;\n\t\t\tif( OnSize ) OnSize(this);\n\t\t\tm_bSetPos = false;\n\t\t}\n\n\t\tif( m_bFloat ) {\n\t\t\tCControlUI* pParent = GetParent();\n\t\t\tif( pParent != NULL ) {\n\t\t\t\tRECT rcParentPos = pParent->GetPos();\n\t\t\t\tif( m_cXY.cx >= 0 ) m_cXY.cx = m_rcItem.left - rcParentPos.left;\n\t\t\t\telse m_cXY.cx = m_rcItem.right - rcParentPos.right;\n\t\t\t\tif( m_cXY.cy >= 0 ) m_cXY.cy = m_rcItem.top - rcParentPos.top;\n\t\t\t\telse m_cXY.cy = m_rcItem.bottom - rcParentPos.bottom;\n\t\t\t\tm_cxyFixed.cx = m_rcItem.right - m_rcItem.left;\n\t\t\t\tm_cxyFixed.cy = m_rcItem.bottom - m_rcItem.top;\n\t\t\t}\n\t\t}\n\n\t\tm_bUpdateNeeded = false;\n\t\tinvalidateRc.Join(m_rcItem);\n\n\t\tCControlUI* pParent = this;\n\t\tRECT rcTemp;\n\t\tRECT rcParent;\n\t\twhile( pParent = pParent->GetParent() )\n\t\t{\n\t\t\trcTemp = invalidateRc;\n\t\t\trcParent = pParent->GetPos();\n\t\t\tif( !::IntersectRect(&invalidateRc, &rcTemp, &rcParent) ) \n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tm_pManager->Invalidate(invalidateRc);\n\t}\n\n\tint CControlUI::GetWidth() const\n\t{\n\t\treturn m_rcItem.right - m_rcItem.left;\n\t}\n\n\tint CControlUI::GetHeight() const\n\t{\n\t\treturn m_rcItem.bottom - m_rcItem.top;\n\t}\n\n\tint CControlUI::GetX() const\n\t{\n\t\treturn m_rcItem.left;\n\t}\n\n\tint CControlUI::GetY() const\n\t{\n\t\treturn m_rcItem.top;\n\t}\n\n\tRECT CControlUI::GetPadding() const\n\t{\n\t\treturn m_rcPadding;\n\t}\n\n\tvoid CControlUI::SetPadding(RECT rcPadding)\n\t{\n\t\tm_rcPadding = rcPadding;\n\t\tNeedParentUpdate();\n\t}\n\n\tSIZE CControlUI::GetFixedXY() const\n\t{\n\t\treturn m_cXY;\n\t}\n\n\tvoid CControlUI::SetFixedXY(SIZE szXY)\n\t{\n\t\tm_cXY.cx = szXY.cx;\n\t\tm_cXY.cy = szXY.cy;\n\t\tif( !m_bFloat ) NeedParentUpdate();\n\t\telse NeedUpdate();\n\t}\n\n\tint CControlUI::GetFixedWidth() const\n\t{\n\t\treturn m_cxyFixed.cx;\n\t}\n\n\tvoid CControlUI::SetFixedWidth(int cx)\n\t{\n\t\tif( cx < 0 ) return; \n\t\tm_cxyFixed.cx = cx;\n\t\tif( !m_bFloat ) NeedParentUpdate();\n\t\telse NeedUpdate();\n\t}\n\n\tint CControlUI::GetFixedHeight() const\n\t{\n\t\treturn m_cxyFixed.cy;\n\t}\n\n\tvoid CControlUI::SetFixedHeight(int cy)\n\t{\n\t\tif( cy < 0 ) return; \n\t\tm_cxyFixed.cy = cy;\n\t\tif( !m_bFloat ) NeedParentUpdate();\n\t\telse NeedUpdate();\n\t}\n\n\tint CControlUI::GetMinWidth() const\n\t{\n\t\treturn m_cxyMin.cx;\n\t}\n\n\tvoid CControlUI::SetMinWidth(int cx)\n\t{\n\t\tif( m_cxyMin.cx == cx ) return;\n\n\t\tif( cx < 0 ) return; \n\t\tm_cxyMin.cx = cx;\n\t\tif( !m_bFloat ) NeedParentUpdate();\n\t\telse NeedUpdate();\n\t}\n\n\tint CControlUI::GetMaxWidth() const\n\t{\n\t\treturn m_cxyMax.cx;\n\t}\n\n\tvoid CControlUI::SetMaxWidth(int cx)\n\t{\n\t\tif( m_cxyMax.cx == cx ) return;\n\n\t\tif( cx < 0 ) return; \n\t\tm_cxyMax.cx = cx;\n\t\tif( !m_bFloat ) NeedParentUpdate();\n\t\telse NeedUpdate();\n\t}\n\n\tint CControlUI::GetMinHeight() const\n\t{\n\t\treturn m_cxyMin.cy;\n\t}\n\n\tvoid CControlUI::SetMinHeight(int cy)\n\t{\n\t\tif( m_cxyMin.cy == cy ) return;\n\n\t\tif( cy < 0 ) return; \n\t\tm_cxyMin.cy = cy;\n\t\tif( !m_bFloat ) NeedParentUpdate();\n\t\telse NeedUpdate();\n\t}\n\n\tint CControlUI::GetMaxHeight() const\n\t{\n\t\treturn m_cxyMax.cy;\n\t}\n\n\tvoid CControlUI::SetMaxHeight(int cy)\n\t{\n\t\tif( m_cxyMax.cy == cy ) return;\n\n\t\tif( cy < 0 ) return; \n\t\tm_cxyMax.cy = cy;\n\t\tif( !m_bFloat ) NeedParentUpdate();\n\t\telse NeedUpdate();\n\t}\n\n\tvoid CControlUI::SetRelativePos(SIZE szMove,SIZE szZoom)\n\t{\n\t\tm_tRelativePos.bRelative = TRUE;\n\t\tm_tRelativePos.nMoveXPercent = szMove.cx;\n\t\tm_tRelativePos.nMoveYPercent = szMove.cy;\n\t\tm_tRelativePos.nZoomXPercent = szZoom.cx;\n\t\tm_tRelativePos.nZoomYPercent = szZoom.cy;\n\t}\n\n\tvoid CControlUI::SetRelativeParentSize(SIZE sz)\n\t{\n\t\tm_tRelativePos.szParent = sz;\n\t}\n\n\tTRelativePosUI CControlUI::GetRelativePos() const\n\t{\n\t\treturn m_tRelativePos;\n\t}\n\n\tbool CControlUI::IsRelativePos() const\n\t{\n\t\treturn m_tRelativePos.bRelative;\n\t}\n\n\tCDuiString CControlUI::GetToolTip() const\n\t{\n\t\treturn m_sToolTip;\n\t}\n\n\tvoid CControlUI::SetToolTip(LPCTSTR pstrText)\n\t{\n\t\tCDuiString strTemp(pstrText);\n\t\tstrTemp.Replace(_T(\"<n>\"),_T(\"\\r\\n\"));\n\t\tm_sToolTip=strTemp;\n\t}\n\n\tvoid CControlUI::SetToolTipWidth( int nWidth )\n\t{\n\t\tm_nTooltipWidth=nWidth;\n\t}\n\n\tint CControlUI::GetToolTipWidth( void )\n\t{\n\t\treturn m_nTooltipWidth;\n\t}\n\n\tTCHAR CControlUI::GetShortcut() const\n\t{\n\t\treturn m_chShortcut;\n\t}\n\n\tvoid CControlUI::SetShortcut(TCHAR ch)\n\t{\n\t\tm_chShortcut = ch;\n\t}\n\n\tbool CControlUI::IsContextMenuUsed() const\n\t{\n\t\treturn m_bMenuUsed;\n\t}\n\n\tvoid CControlUI::SetContextMenuUsed(bool bMenuUsed)\n\t{\n\t\tm_bMenuUsed = bMenuUsed;\n\t}\n\n\tvoid CControlUI::SetWantTab(bool bWant)\n\t{\n\t\tm_bWantTab = bWant;\n\t}\n\n\tbool CControlUI::IsWantTab() const\n\t{\n\t\treturn m_bWantTab;\n\t}\n\n\tconst CDuiString& CControlUI::GetUserData()\n\t{\n\t\treturn m_sUserData;\n\t}\n\n\tvoid CControlUI::SetUserData(LPCTSTR pstrText)\n\t{\n\t\tm_sUserData = pstrText;\n\t}\n\n\tUINT_PTR CControlUI::GetTag() const\n\t{\n\t\treturn m_pTag;\n\t}\n\n\tvoid CControlUI::SetTag(UINT_PTR pTag)\n\t{\n\t\tm_pTag = pTag;\n\t}\n\n\tbool CControlUI::IsVisible() const\n\t{\n\n\t\treturn m_bVisible && m_bInternVisible;\n\t}\n\n\tvoid CControlUI::SetVisible(bool bVisible)\n\t{\n\t\tif( m_bVisible == bVisible ) return;\n\n\t\tbool v = IsVisible();\n\t\tm_bVisible = bVisible;\n\t\tif( m_bFocused ) m_bFocused = false;\n\t\tif (!bVisible && m_pManager && m_pManager->GetFocus() == this) {\n\t\t\tm_pManager->SetFocus(NULL) ;\n\t\t}\n\t\tif( IsVisible() != v ) {\n\t\t\tNeedParentUpdate();\n\t\t}\n\t}\n\n    bool CControlUI::IsRealVisible() const\n    {\n        return m_bVisible;\n    }\n\n    bool  CControlUI::IsInnerVisible() const\n    {\n        return m_bInternVisible;\n    }\n\n\tvoid CControlUI::SetInnerVisible(bool bVisible)\n\t{\n\t\tm_bInternVisible = bVisible;\n\t\tif (!bVisible && m_pManager && m_pManager->GetFocus() == this) {\n\t\t\tm_pManager->SetFocus(NULL) ;\n\t\t}\n\t}\n\n\n\tbool CControlUI::IsEnabled() const\n\t{\n\t\treturn m_bEnabled;\n\t}\n\n\tvoid CControlUI::SetEnabled(bool bEnabled)\n\t{\n\t\tif( m_bEnabled == bEnabled ) return;\n\n\t\tm_bEnabled = bEnabled;\n\t\tInvalidate();\n\t}\n\n\tbool CControlUI::IsMouseEnabled() const\n\t{\n\t\treturn m_bMouseEnabled;\n\t}\n\n\tvoid CControlUI::SetMouseEnabled(bool bEnabled)\n\t{\n\t\tm_bMouseEnabled = bEnabled;\n\t}\n\n\tbool CControlUI::IsKeyboardEnabled() const\n\t{\n\t\treturn m_bKeyboardEnabled ;\n\t}\n\tvoid CControlUI::SetKeyboardEnabled(bool bEnabled)\n\t{\n\t\tm_bKeyboardEnabled = bEnabled ; \n\t}\n\n\tbool CControlUI::IsFocused() const\n\t{\n\t\treturn m_bFocused;\n\t}\n\n\tvoid CControlUI::SetFocus()\n\t{\n\t\tif( m_pManager != NULL ) m_pManager->SetFocus(this);\n\t}\n\n\tbool CControlUI::IsFloat() const\n\t{\n\t\treturn m_bFloat;\n\t}\n\n\tvoid CControlUI::SetFloat(bool bFloat)\n\t{\n\t\tif( m_bFloat == bFloat ) return;\n\n\t\tm_bFloat = bFloat;\n\t\tNeedParentUpdate();\n\t}\n\n\tCControlUI* CControlUI::FindControl(FINDCONTROLPROC Proc, LPVOID pData, UINT uFlags)\n\t{\n\t\tif( (uFlags & UIFIND_VISIBLE) != 0 && !IsVisible() ) return NULL;\n\t\tif( (uFlags & UIFIND_ENABLED) != 0 && !IsEnabled() ) return NULL;\n\t\tif( (uFlags & UIFIND_HITTEST) != 0 && (!m_bMouseEnabled || !::PtInRect(&m_rcItem, * static_cast<LPPOINT>(pData))) ) return NULL;\n\t\treturn Proc(this, pData);\n\t}\n\n\tvoid CControlUI::Invalidate()\n\t{\n\t\tif( !IsVisible() ) return;\n\n\t\tRECT invalidateRc = m_rcItem;\n\n\t\tCControlUI* pParent = this;\n\t\tRECT rcTemp;\n\t\tRECT rcParent;\n\t\twhile( pParent = pParent->GetParent() )\n\t\t{\n\t\t\trcTemp = invalidateRc;\n\t\t\trcParent = pParent->GetPos();\n\t\t\tif( !::IntersectRect(&invalidateRc, &rcTemp, &rcParent) ) \n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif( m_pManager != NULL ) m_pManager->Invalidate(invalidateRc);\n\t}\n\n\tbool CControlUI::IsUpdateNeeded() const\n\t{\n\t\treturn m_bUpdateNeeded;\n\t}\n\n\tvoid CControlUI::NeedUpdate()\n\t{\n\t\tif( !IsVisible() ) return;\n\t\tm_bUpdateNeeded = true;\n\t\tInvalidate();\n\n\t\tif( m_pManager != NULL ) m_pManager->NeedUpdate();\n\t}\n\n\tvoid CControlUI::NeedParentUpdate()\n\t{\n\t\tif( GetParent() ) {\n\t\t\tGetParent()->NeedUpdate();\n\t\t\tGetParent()->Invalidate();\n\t\t}\n\t\telse {\n\t\t\tNeedUpdate();\n\t\t}\n\n\t\tif( m_pManager != NULL ) m_pManager->NeedUpdate();\n\t}\n\n\tDWORD CControlUI::GetAdjustColor(DWORD dwColor)\n\t{\n\t\tif( !m_bColorHSL ) return dwColor;\n\t\tshort H, S, L;\n\t\tCPaintManagerUI::GetHSL(&H, &S, &L);\n\t\treturn CRenderEngine::AdjustColor(dwColor, H, S, L);\n\t}\n\n\tvoid CControlUI::Init()\n\t{\n\t\tDoInit();\n\t\tif( OnInit ) OnInit(this);\n\t}\n\n\tvoid CControlUI::DoInit()\n\t{\n\n\t}\n\n\tvoid CControlUI::Event(TEventUI& event)\n\t{\n\t\t//ǿvoid*ΪӦ()\n\t\tif( OnEvent((void*)&event) ) DoEvent(event);\n\t}\n\n\tvoid CControlUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( event.Type == UIEVENT_SETCURSOR )\n\t\t{\n\t\t\t::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW)));\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_SETFOCUS ) \n\t\t{\n\t\t\tm_bFocused = true;\n\t\t\tInvalidate();\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_KILLFOCUS ) \n\t\t{\n\t\t\tm_bFocused = false;\n\t\t\tInvalidate();\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_TIMER )\n\t\t{\n\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_TIMER, event.wParam, event.lParam);\n\t\t\treturn;\n\t\t}\n\t\tif( event.Type == UIEVENT_CONTEXTMENU )\n\t\t{\n\t\t\tif( IsContextMenuUsed() ) {\n\t\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_MENU, event.wParam, event.lParam);\n\t\t\t\t// return;\n\t\t\t}\n\t\t}\n\t\tif( m_pParent != NULL ) m_pParent->DoEvent(event);\n\t}\n\n\n\tvoid CControlUI::SetVirtualWnd(LPCTSTR pstrValue)\n\t{\n\t\tm_sVirtualWnd = pstrValue;\n\t\tm_pManager->UsedVirtualWnd(true);\n\t}\n\n\tCDuiString CControlUI::GetVirtualWnd() const\n\t{\n\t\tCDuiString str;\n\t\tif( !m_sVirtualWnd.IsEmpty() ){\n\t\t\tstr = m_sVirtualWnd;\n\t\t}\n\t\telse{\n\t\t\tCControlUI* pParent = GetParent();\n\t\t\tif( pParent != NULL){\n\t\t\t\tstr = pParent->GetVirtualWnd();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstr = _T(\"\");\n\t\t\t}\n\t\t}\n\t\treturn str;\n\t}\n\n\tCDuiString CControlUI::GetCurVirtualWnd() const\n\t{\n\t\tCDuiString str;\n\t\tif( !m_sVirtualWnd.IsEmpty() )\n\t\t{\n\t\t\tstr = m_sVirtualWnd;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstr=_T(\"\");\n\t\t}\n\n\t\treturn str;\n\t}\n\n\tvoid CControlUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"pos\")) == 0 ) {\n\t\t\tRECT rcPos = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\trcPos.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcPos.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\trcPos.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcPos.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\t\tSIZE szXY = {rcPos.left >= 0 ? rcPos.left : rcPos.right, rcPos.top >= 0 ? rcPos.top : rcPos.bottom};\n\t\t\tSetFixedXY(szXY);\n\t\t\tSetFixedWidth(rcPos.right - rcPos.left);\n\t\t\tSetFixedHeight(rcPos.bottom - rcPos.top);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"relativepos\")) == 0 ) {\n\t\t\tSIZE szMove,szZoom;\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tszMove.cx = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\tszMove.cy = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\tszZoom.cx = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\tszZoom.cy = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr); \n\t\t\tSetRelativePos(szMove,szZoom);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"padding\")) == 0 ) {\n\t\t\tRECT rcPadding = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\trcPadding.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcPadding.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\trcPadding.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\trcPadding.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\t\tSetPadding(rcPadding);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"bkcolor\")) == 0 || _tcscmp(pstrName, _T(\"bkcolor1\")) == 0 ) {\n\t\t\twhile( *pstrValue > _T('\\0') && *pstrValue <= _T(' ') ) pstrValue = ::CharNext(pstrValue);\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetBkColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"bkcolor2\")) == 0 ) {\n\t\t\twhile( *pstrValue > _T('\\0') && *pstrValue <= _T(' ') ) pstrValue = ::CharNext(pstrValue);\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetBkColor2(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"bkcolor3\")) == 0 ) {\n\t\t\twhile( *pstrValue > _T('\\0') && *pstrValue <= _T(' ') ) pstrValue = ::CharNext(pstrValue);\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetBkColor3(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"bordercolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetBorderColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"focusbordercolor\")) == 0 ) {\n\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\tSetFocusBorderColor(clrColor);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"colorhsl\")) == 0 ) \n\t\t{\n\t\t\tSetColorHSL(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"bordersize\")) == 0 ) {\n\t\t\tCDuiString nValue = pstrValue;\n\t\t\tif(nValue.Find(',') < 0)\n\t\t\t{\n\t\t\t\tSetBorderSize(_ttoi(pstrValue));\n\t\t\t\tRECT rcPadding = {0};\n\t\t\t\tSetBorderSize(rcPadding);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tRECT rcPadding = { 0 };\n\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\trcPadding.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);\n\t\t\t\trcPadding.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);\n\t\t\t\trcPadding.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);\n\t\t\t\trcPadding.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);\n\t\t\t\tSetBorderSize(rcPadding);\n\t\t\t}\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"leftbordersize\")) == 0 ) SetLeftBorderSize(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"topbordersize\")) == 0 ) SetTopBorderSize(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"rightbordersize\")) == 0 ) SetRightBorderSize(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"bottombordersize\")) == 0 ) SetBottomBorderSize(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"borderstyle\")) == 0 ) SetBorderStyle(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"borderround\")) == 0 ) {\n\t\t\tSIZE cxyRound = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tcxyRound.cx = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\tcxyRound.cy = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);     \n\t\t\tSetBorderRound(cxyRound);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"bkimage\")) == 0 ) SetBkImage(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"width\")) == 0 ) SetFixedWidth(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"height\")) == 0 ) SetFixedHeight(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"minwidth\")) == 0 ) SetMinWidth(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"minheight\")) == 0 ) SetMinHeight(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"maxwidth\")) == 0 ) SetMaxWidth(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"maxheight\")) == 0 ) SetMaxHeight(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"name\")) == 0 ) SetName(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"text\")) == 0 ) SetText(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"tooltip\")) == 0 ) SetToolTip(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"userdata\")) == 0 ) SetUserData(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"enabled\")) == 0 ) SetEnabled(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"mouse\")) == 0 ) SetMouseEnabled(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"keyboard\")) == 0 ) SetKeyboardEnabled(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"visible\")) == 0 ) SetVisible(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"float\")) == 0 ) SetFloat(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"shortcut\")) == 0 ) SetShortcut(pstrValue[0]);\n\t\telse if( _tcscmp(pstrName, _T(\"menu\")) == 0 ) SetContextMenuUsed(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse if( _tcscmp(pstrName, _T(\"virtualwnd\")) == 0 ) SetVirtualWnd(pstrValue);\n\t\telse if( _tcscmp(pstrName, _T(\"wanttab\")) == 0)\tSetWantTab(_tcscmp(pstrValue, _T(\"true\"))== 0);\n\t\telse{\n\t\t\t// Ů ע: δ֪\n#ifdef _DEBUG\n\t\t\tCDuiString tmp;\n\t\t\ttmp += _T(\"δ֪!\\n\");\n\t\t\tif(GetName().GetLength()){\n\t\t\t\ttmp += _T(\"\\nؼ: \");\n\t\t\t\ttmp += GetName();\n\t\t\t}\n\t\t\ttmp += _T(\"\\nؼ: \");\n\t\t\ttmp += GetClass();\n\t\t\ttmp += _T(\"\\n: \");\n\t\t\ttmp += pstrName;\n\t\t\ttmp += _T(\"\\nֵ: \");\n\t\t\ttmp += pstrValue;\n\t\t\t//::MessageBox(GetManager()?GetManager()->GetPaintWindow():nullptr,tmp,_T(\"Warning\"),MB_ICONEXCLAMATION);\n#endif\n\t\t}\n\n\t}\n\n\tCControlUI* CControlUI::ApplyAttributeList(LPCTSTR pstrList)\n\t{\n\t\tCDuiString sItem;\n\t\tCDuiString sValue;\n\t\twhile( *pstrList != _T('\\0') ) {\n\t\t\tsItem.Empty();\n\t\t\tsValue.Empty();\n\t\t\twhile( *pstrList != _T('\\0') && *pstrList != _T('=') ) {\n\t\t\t\tLPTSTR pstrTemp = ::CharNext(pstrList);\n\t\t\t\twhile( pstrList < pstrTemp) {\n\t\t\t\t\tsItem += *pstrList++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tASSERT( *pstrList == _T('=') );\n\t\t\tif( *pstrList++ != _T('=') ) return this;\n\t\t\tASSERT( *pstrList == _T('\\\"') );\n\t\t\tif( *pstrList++ != _T('\\\"') ) return this;\n\t\t\twhile( *pstrList != _T('\\0') && *pstrList != _T('\\\"') ) {\n\t\t\t\tLPTSTR pstrTemp = ::CharNext(pstrList);\n\t\t\t\twhile( pstrList < pstrTemp) {\n\t\t\t\t\tsValue += *pstrList++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tASSERT( *pstrList == _T('\\\"') );\n\t\t\tif( *pstrList++ != _T('\\\"') ) return this;\n\t\t\tSetAttribute(sItem, sValue);\n\t\t\tif( *pstrList++ != _T(' ') ) return this;\n\t\t}\n\t\treturn this;\n\t}\n\n\tSIZE CControlUI::EstimateSize(SIZE szAvailable)\n\t{\n\t\treturn m_cxyFixed;\n\t}\n\n\tvoid CControlUI::DoPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\tif( !::IntersectRect(&m_rcPaint, &rcPaint, &m_rcItem) ) return;\n\n\t\t// ѭ򣺱ɫ->ͼ->״̬ͼ->ı->߿\n\t\tif( m_cxyBorderRound.cx > 0 || m_cxyBorderRound.cy > 0 ) {\n\t\t\tCRenderClip roundClip;\n\t\t\tCRenderClip::GenerateRoundClip(hDC, m_rcPaint,  m_rcItem, m_cxyBorderRound.cx, m_cxyBorderRound.cy, roundClip);\n\t\t\tPaintBkColor(hDC);\n\t\t\tPaintBkImage(hDC);\n\t\t\tPaintStatusImage(hDC);\n\t\t\tPaintText(hDC);\n\t\t\tPaintBorder(hDC);\n\t\t}\n\t\telse {\n\t\t\tPaintBkColor(hDC);\n\t\t\tPaintBkImage(hDC);\n\t\t\tPaintStatusImage(hDC);\n\t\t\tPaintText(hDC);\n\t\t\tPaintBorder(hDC);\n\t\t}\n\t}\n\n\tvoid CControlUI::PaintBkColor(HDC hDC)\n\t{\n\t\tif( m_dwBackColor != 0 ) {\n\t\t\tif( m_dwBackColor2 != 0 ) {\n\t\t\t\tif( m_dwBackColor3 != 0 ) {\n\t\t\t\t\tRECT rc = m_rcItem;\n\t\t\t\t\trc.bottom = (rc.bottom + rc.top) / 2;\n\t\t\t\t\tCRenderEngine::DrawGradient(hDC, rc, GetAdjustColor(m_dwBackColor), GetAdjustColor(m_dwBackColor2), true, 8);\n\t\t\t\t\trc.top = rc.bottom;\n\t\t\t\t\trc.bottom = m_rcItem.bottom;\n\t\t\t\t\tCRenderEngine::DrawGradient(hDC, rc, GetAdjustColor(m_dwBackColor2), GetAdjustColor(m_dwBackColor3), true, 8);\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t\tCRenderEngine::DrawGradient(hDC, m_rcItem, GetAdjustColor(m_dwBackColor), GetAdjustColor(m_dwBackColor2), true, 16);\n\t\t\t}\n\t\t\telse if( m_dwBackColor >= 0xFF000000 ) CRenderEngine::DrawColor(hDC, m_rcPaint, GetAdjustColor(m_dwBackColor));\n\t\t\telse CRenderEngine::DrawColor(hDC, m_rcItem, GetAdjustColor(m_dwBackColor));\n\t\t}\n\t}\n\n\tvoid CControlUI::PaintBkImage(HDC hDC)\n\t{\n\t\tif( m_sBkImage.IsEmpty() ) return;\n\t\tif( !DrawImage(hDC, (LPCTSTR)m_sBkImage) ) m_sBkImage.Empty();\n\t}\n\n\tvoid CControlUI::PaintStatusImage(HDC hDC)\n\t{\n\t\treturn;\n\t}\n\n\tvoid CControlUI::PaintText(HDC hDC)\n\t{\n\t\treturn;\n\t}\n\n\tvoid CControlUI::PaintBorder(HDC hDC)\n\t{\n\t\tif(m_dwBorderColor != 0 || m_dwFocusBorderColor != 0)\n\t\t{\n\t\t\tif(m_nBorderSize > 0 && ( m_cxyBorderRound.cx > 0 || m_cxyBorderRound.cy > 0 ))//ԲǱ߿\n\t\t\t{\n\t\t\t\tif (IsFocused() && m_dwFocusBorderColor != 0)\n\t\t\t\t\tCRenderEngine::DrawRoundRect(hDC, m_rcItem, m_nBorderSize, m_cxyBorderRound.cx, m_cxyBorderRound.cy, GetAdjustColor(m_dwFocusBorderColor));\n\t\t\t\telse\n\t\t\t\t\tCRenderEngine::DrawRoundRect(hDC, m_rcItem, m_nBorderSize, m_cxyBorderRound.cx, m_cxyBorderRound.cy, GetAdjustColor(m_dwBorderColor));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (IsFocused() && m_dwFocusBorderColor != 0 && m_nBorderSize > 0)\n\t\t\t\t\tCRenderEngine::DrawRect(hDC, m_rcItem, m_nBorderSize, GetAdjustColor(m_dwFocusBorderColor));\n\t\t\t\telse if(m_rcBorderSize.left > 0 || m_rcBorderSize.top > 0 || m_rcBorderSize.right > 0 || m_rcBorderSize.bottom > 0)\n\t\t\t\t{\n\t\t\t\t\tRECT rcBorder;\n\n\t\t\t\t\tif(m_rcBorderSize.left > 0){\n\t\t\t\t\t\trcBorder\t\t= m_rcItem;\n\t\t\t\t\t\trcBorder.right\t= m_rcItem.left;\n\t\t\t\t\t\tCRenderEngine::DrawLine(hDC,rcBorder,m_rcBorderSize.left,GetAdjustColor(m_dwBorderColor),m_nBorderStyle);\n\t\t\t\t\t}\n\t\t\t\t\tif(m_rcBorderSize.top > 0){\n\t\t\t\t\t\trcBorder\t\t= m_rcItem;\n\t\t\t\t\t\trcBorder.bottom\t= m_rcItem.top;\n\t\t\t\t\t\tCRenderEngine::DrawLine(hDC,rcBorder,m_rcBorderSize.top,GetAdjustColor(m_dwBorderColor),m_nBorderStyle);\n\t\t\t\t\t}\n\t\t\t\t\tif(m_rcBorderSize.right > 0){\n\t\t\t\t\t\trcBorder\t\t= m_rcItem;\n\t\t\t\t\t\trcBorder.left\t= m_rcItem.right;\n\t\t\t\t\t\tCRenderEngine::DrawLine(hDC,rcBorder,m_rcBorderSize.right,GetAdjustColor(m_dwBorderColor),m_nBorderStyle);\n\t\t\t\t\t}\n\t\t\t\t\tif(m_rcBorderSize.bottom > 0){\n\t\t\t\t\t\trcBorder\t\t= m_rcItem;\n\t\t\t\t\t\trcBorder.top\t= m_rcItem.bottom;\n\t\t\t\t\t\tCRenderEngine::DrawLine(hDC,rcBorder,m_rcBorderSize.bottom,GetAdjustColor(m_dwBorderColor),m_nBorderStyle);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(m_nBorderSize > 0)\n\t\t\t\t\tCRenderEngine::DrawRect(hDC, m_rcItem, m_nBorderSize, GetAdjustColor(m_dwBorderColor));\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CControlUI::DoPostPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\treturn;\n\t}\n\n\tint CControlUI::GetLeftBorderSize() const\n\t{\n\t\treturn m_rcBorderSize.left;\n\t}\n\n\n\tvoid CControlUI::SetLeftBorderSize( int nSize )\n\t{\n\t\tm_rcBorderSize.left = nSize;\n\t\tInvalidate();\n\t}\n\n\tint CControlUI::GetTopBorderSize() const\n\t{\n\t\treturn m_rcBorderSize.top;\n\t}\n\n\tvoid CControlUI::SetTopBorderSize( int nSize )\n\t{\n\t\tm_rcBorderSize.top = nSize;\n\t\tInvalidate();\n\t}\n\n\tint CControlUI::GetRightBorderSize() const\n\t{\n\t\treturn m_rcBorderSize.right;\n\t}\n\n\tvoid CControlUI::SetRightBorderSize( int nSize )\n\t{\n\t\tm_rcBorderSize.right = nSize;\n\t\tInvalidate();\n\t}\n\n\tint CControlUI::GetBottomBorderSize() const\n\t{\n\t\treturn m_rcBorderSize.bottom;\n\t}\n\n\tvoid CControlUI::SetBottomBorderSize( int nSize )\n\t{\n\t\tm_rcBorderSize.bottom = nSize;\n\t\tInvalidate();\n\t}\n\n\tint CControlUI::GetBorderStyle() const\n\t{\n\t\treturn m_nBorderStyle;\n\t}\n\n\n\tvoid CControlUI::SetBorderStyle( int nStyle )\n\t{\n\t\tm_nBorderStyle = nStyle;\n\t\tInvalidate();\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Core/UIControl.h",
    "content": "#ifndef __UICONTROL_H__\n#define __UICONTROL_H__\n\n#pragma once\n\nnamespace DuiLib {\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\ttypedef CControlUI* (CALLBACK* FINDCONTROLPROC)(CControlUI*, LPVOID);\n\tclass CEventSource;\n\n\tclass UILIB_API CControlUI\n\t{\n\tpublic:\n\t\tCControlUI();\n\t\tvirtual ~CControlUI();\n\n\tpublic:\n\t\tvirtual CDuiString GetName() const;\n\t\tvirtual void SetName(LPCTSTR pstrName);\n\t\tvirtual LPCTSTR GetClass() const;\n\t\tvirtual LPVOID GetInterface(LPCTSTR pstrName);\n\t\tvirtual UINT GetControlFlags() const;\n\n\t\tvirtual bool Activate();\n\t\tvirtual CPaintManagerUI* GetManager() const;\n\t\tvirtual void SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit = true);\n\t\tvirtual CControlUI* GetParent() const;\n\n\t\t// ı\n\t\tvirtual CDuiString GetText() const;\n\t\tvirtual void SetText(LPCTSTR pstrText);\n\n\t\t// ͼ\n\t\tDWORD GetBkColor() const;\n\t\tvoid SetBkColor(DWORD dwBackColor);\n\t\tDWORD GetBkColor2() const;\n\t\tvoid SetBkColor2(DWORD dwBackColor);\n\t\tDWORD GetBkColor3() const;\n\t\tvoid SetBkColor3(DWORD dwBackColor);\n\t\tLPCTSTR GetBkImage();\n\t\tvoid SetBkImage(LPCTSTR pStrImage);\n\t\tDWORD GetFocusBorderColor() const;\n\t\tvoid SetFocusBorderColor(DWORD dwBorderColor);\n\t\tbool IsColorHSL() const;\n\t\tvoid SetColorHSL(bool bColorHSL);\n\t\tSIZE GetBorderRound() const;\n\t\tvoid SetBorderRound(SIZE cxyRound);\n\t\tbool DrawImage(HDC hDC, LPCTSTR pStrImage, LPCTSTR pStrModify = NULL);\n\t\tbool DrawImage(HDC hDC, LPCTSTR pStrImage, LPCTSTR pStrModify, bool bNeedAlpha, BYTE bNewFade);\n\t\t//߿\n\t\tint GetBorderSize() const;\n\t\tvoid SetBorderSize(int nSize);\n\t\tDWORD GetBorderColor() const;\n\t\tvoid SetBorderColor(DWORD dwBorderColor);\n\n\t\tvoid SetBorderSize(RECT rc);\n\t\tint GetLeftBorderSize() const;\n\t\tvoid SetLeftBorderSize(int nSize);\n\t\tint GetTopBorderSize() const;\n\t\tvoid SetTopBorderSize(int nSize);\n\t\tint GetRightBorderSize() const;\n\t\tvoid SetRightBorderSize(int nSize);\n\t\tint GetBottomBorderSize() const;\n\t\tvoid SetBottomBorderSize(int nSize);\n\t\tint GetBorderStyle() const;\n\t\tvoid SetBorderStyle(int nStyle);\n\n\t\t// λ\n\t\tvirtual const RECT& GetPos() const;\n\t\tvirtual void SetPos(RECT rc);\n\t\tvirtual int GetWidth() const;\n\t\tvirtual int GetHeight() const;\n\t\tvirtual int GetX() const;\n\t\tvirtual int GetY() const;\n\t\tvirtual RECT GetPadding() const;\n\t\tvirtual void SetPadding(RECT rcPadding); // ߾࣬ϲ㴰ڻ\n\t\tvirtual SIZE GetFixedXY() const;         // ʵʴСλʹGetPosȡõԤĲοֵ\n\t\tvirtual void SetFixedXY(SIZE szXY);      // floatΪtrueʱЧ\n\t\tvirtual int GetFixedWidth() const;       // ʵʴСλʹGetPosȡõԤĲοֵ\n\t\tvirtual void SetFixedWidth(int cx);      // ԤĲοֵ\n\t\tvirtual int GetFixedHeight() const;      // ʵʴСλʹGetPosȡõԤĲοֵ\n\t\tvirtual void SetFixedHeight(int cy);     // ԤĲοֵ\n\t\tvirtual int GetMinWidth() const;\n\t\tvirtual void SetMinWidth(int cx);\n\t\tvirtual int GetMaxWidth() const;\n\t\tvirtual void SetMaxWidth(int cx);\n\t\tvirtual int GetMinHeight() const;\n\t\tvirtual void SetMinHeight(int cy);\n\t\tvirtual int GetMaxHeight() const;\n\t\tvirtual void SetMaxHeight(int cy);\n\t\tvirtual void SetRelativePos(SIZE szMove,SIZE szZoom);\n\t\tvirtual void SetRelativeParentSize(SIZE sz);\n\t\tvirtual TRelativePosUI GetRelativePos() const;\n\t\tvirtual bool IsRelativePos() const;\n\n\t\t// ʾ\n\t\tvirtual CDuiString GetToolTip() const;\n\t\tvirtual void SetToolTip(LPCTSTR pstrText);\n\t\tvirtual void SetToolTipWidth(int nWidth);\n\t\tvirtual int\t  GetToolTipWidth(void);\t// ToolTip\n\n\t\t//\n\t\t//TAB ӦûҪvirtual\n\t\tvirtual void SetWantTab(bool bWant = true);\n\t\tvirtual bool IsWantTab() const;\n\n\t\t// ݼ\n\t\tvirtual TCHAR GetShortcut() const;\n\t\tvirtual void SetShortcut(TCHAR ch);\n\n\t\t// ˵\n\t\tvirtual bool IsContextMenuUsed() const;\n\t\tvirtual void SetContextMenuUsed(bool bMenuUsed);\n\t\t// û\n\t\tvirtual const CDuiString& GetUserData(); // ûʹ\n\t\tvirtual void SetUserData(LPCTSTR pstrText); // ûʹ\n\t\tvirtual UINT_PTR GetTag() const; // ûʹ\n\t\tvirtual void SetTag(UINT_PTR pTag); // ûʹ\n\n\t\t// һЩҪ\n\t\tvirtual bool IsVisible() const;\n                bool IsRealVisible() const;\n\t\tvirtual void SetVisible(bool bVisible = true);\n        virtual bool IsInnerVisible() const;\n\t\tvirtual void SetInnerVisible(bool bVisible = true); // ڲãЩUIӵдھҪд˺\n\t\tvirtual bool IsEnabled() const;\n\t\tvirtual void SetEnabled(bool bEnable = true);\n\t\tvirtual bool IsMouseEnabled() const;\n\t\tvirtual void SetMouseEnabled(bool bEnable = true);\n\t\tvirtual bool IsKeyboardEnabled() const;\n\t\tvirtual void SetKeyboardEnabled(bool bEnable = true);\n\t\tvirtual bool IsFocused() const;\n\t\tvirtual void SetFocus();\n\t\tvirtual bool IsFloat() const;\n\t\tvirtual void SetFloat(bool bFloat = true);\n\n\t\tvirtual CControlUI* FindControl(FINDCONTROLPROC Proc, LPVOID pData, UINT uFlags);\n\n\t\tvoid Invalidate();\n\t\tbool IsUpdateNeeded() const;\n\t\tvoid NeedUpdate();\n\t\tvoid NeedParentUpdate();\n\t\tDWORD GetAdjustColor(DWORD dwColor);\n\n\t\tvirtual void Init();\n\t\tvirtual void DoInit();\n\n\t\tvirtual void Event(TEventUI& event);\n\t\tvirtual void DoEvent(TEventUI& event);\n\n\t\tvirtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\t\tCControlUI* ApplyAttributeList(LPCTSTR pstrList);\n\n\t\tvirtual SIZE EstimateSize(SIZE szAvailable);\n\n\t\tvirtual void DoPaint(HDC hDC, const RECT& rcPaint);\n\t\tvirtual void PaintBkColor(HDC hDC);\n\t\tvirtual void PaintBkImage(HDC hDC);\n\t\tvirtual void PaintStatusImage(HDC hDC);\n\t\tvirtual void PaintText(HDC hDC);\n\t\tvirtual void PaintBorder(HDC hDC);\n\n\t\tvirtual void DoPostPaint(HDC hDC, const RECT& rcPaint);\n\n\t\t//ⴰڲ\n\t\tvoid SetVirtualWnd(LPCTSTR pstrValue);\n\t\t//ȡؼⴰڣδãҸؼ\n\t\tCDuiString GetVirtualWnd() const;\n\t\t//ȡǰؼⴰ\n\t\tCDuiString GetCurVirtualWnd()  const;\n\n\tpublic:\n\t\tCEventSource OnInit;\n\t\tCEventSource OnDestroy;\n\t\tCEventSource OnSize;\n\t\tCEventSource OnEvent;\n\t\tCEventSource OnNotify;\n\n\tprotected:\n\t\tCPaintManagerUI* m_pManager;\n\t\tCControlUI* m_pParent;\n\t\tCDuiString m_sVirtualWnd;\n\t\tCDuiString m_sName;\n\t\tbool m_bUpdateNeeded;\n\t\tbool m_bMenuUsed;\n\t\tbool m_bWantTab;\n\t\tRECT m_rcItem;\n\t\tRECT m_rcPadding;\n\t\tSIZE m_cXY;\n\t\tSIZE m_cxyFixed;\n\t\tSIZE m_cxyMin;\n\t\tSIZE m_cxyMax;\n\t\tbool m_bVisible;\n\t\tbool m_bInternVisible;\n\t\tbool m_bEnabled;\n\t\tbool m_bMouseEnabled;\n\t\tbool m_bKeyboardEnabled ;\n\t\tbool m_bFocused;\n\t\tbool m_bFloat;\n\t\tbool m_bSetPos; // ֹSetPosѭ\n\t\tTRelativePosUI m_tRelativePos;\n\n\t\tCDuiString m_sText; \n\t\tCDuiString m_sToolTip;\n\t\tTCHAR m_chShortcut;\n\t\tCDuiString m_sUserData;\n\t\tUINT_PTR m_pTag;\n\n\t\tDWORD m_dwBackColor;\n\t\tDWORD m_dwBackColor2;\n\t\tDWORD m_dwBackColor3;\n\t\tCDuiString m_sBkImage;\n\t\tCDuiString m_sForeImage;\n\t\tDWORD m_dwBorderColor;\n\t\tDWORD m_dwFocusBorderColor;\n\t\tbool m_bColorHSL;\n\t\tint m_nBorderSize;\n\t\tint m_nBorderStyle;\n\t\tint m_nTooltipWidth;\n\t\tSIZE m_cxyBorderRound;\n\t\tRECT m_rcPaint;\n\t\tRECT m_rcBorderSize;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UICONTROL_H__\n"
  },
  {
    "path": "DuiLib/Core/UIDefine.h",
    "content": "#pragma once\n//////////////BEGINϢӳ궨////////////////////////////////////////////////////\n///\n\nnamespace DuiLib\n{\n\n\tenum DuiSig\n\t{\n\t\tDuiSig_end = 0, // [marks end of message map]\n\t\tDuiSig_lwl,     // LRESULT (WPARAM, LPARAM)\n\t\tDuiSig_vn,      // void (TNotifyUI)\n\t};\n\n\tclass CControlUI;\n\n\t// Structure for notifications to the outside world\n\ttypedef struct tagTNotifyUI \n\t{\n\t\tCDuiString sType;\n\t\tCDuiString sVirtualWnd;\n\t\tCControlUI* pSender;\n\t\tDWORD dwTimestamp;\n\t\tPOINT ptMouse;\n\t\tWPARAM wParam;\n\t\tLPARAM lParam;\n\t} TNotifyUI;\n\n\tclass CNotifyPump;\n\ttypedef void (CNotifyPump::*DUI_PMSG)(TNotifyUI& msg);  //ָ\n\n\tunion DuiMessageMapFunctions\n\t{\n\t\tDUI_PMSG pfn;   // generic member function pointer\n\t\tLRESULT (CNotifyPump::*pfn_Notify_lwl)(WPARAM, LPARAM);\n\t\tvoid (CNotifyPump::*pfn_Notify_vn)(TNotifyUI&);\n\t};\n\n\t//Ϣ\n\t//////////////////////////////////////////////////////////////////////////\n\n//¼\n#define DUI_MSGTYPE_WINDOWINIT             (_T(\"windowinit\"))\n//ͨ¼\n#define DUI_MSGTYPE_TIMER                  (_T(\"timer\"))\n#define DUI_MSGTYPE_CLICK                  (_T(\"click\"))\n#define DUI_MSGTYPE_DBCLICK                (_T(\"dbclick\"))\n#define DUI_MSGTYPE_SETFOCUS               (_T(\"setfocus\"))\n#define DUI_MSGTYPE_KILLFOCUS              (_T(\"killfocus\"))\n#define DUI_MSGTYPE_BUTTONDOWN \t\t   \t   (_T(\"buttondown\"))\n#define DUI_MSGTYPE_MOUSEENTER\t\t\t   (_T(\"mouseenter\"))\n#define DUI_MSGTYPE_MOUSELEAVE\t\t\t   (_T(\"mouseleave\"))\n#define DUI_MSGTYPE_MENU                   (_T(\"menu\"))\n#define DUI_MSGTYPE_LINK                   (_T(\"link\"))\n\n\n\n#define DUI_MSGTYPE_RETURN                 (_T(\"return\"))\n#define DUI_MSGTYPE_SCROLL                 (_T(\"scroll\"))\n\n#define DUI_MSGTYPE_DROPDOWN               (_T(\"dropdown\"))\n\n#define DUI_MSGTYPE_TABSELECT              (_T(\"tabselect\"))\n\n#define DUI_MSGTYPE_TEXTCHANGED            (_T(\"textchanged\"))\n\n#define DUI_MSGTYPE_HEADERCLICK            (_T(\"headerclick\"))\n\n#define DUI_MSGTYPE_ITEMCLICK \t\t   \t   (_T(\"itemclick\"))\n#define DUI_MSGTYPE_ITEMRCLICK \t\t\t   (_T(\"itemrclick\"))\n#define DUI_MSGTYPE_ITEMDBCLICK            (_T(\"itemdbclick\"))\n#define DUI_MSGTYPE_ITEMSELECT \t\t   \t   (_T(\"itemselect\"))\n#define DUI_MSGTYPE_ITEMEXPAND             (_T(\"itemexpand\"))\n#define DUI_MSGTYPE_ITEMCOLLAPSE           (_T(\"itemcollapse\"))\n#define DUI_MSGTYPE_ITEMACTIVATE           (_T(\"itemactivate\"))\n//\n#define DUI_MSGTYPE_SHOWACTIVEX            (_T(\"showactivex\"))\n//slider\n#define DUI_MSGTYPE_VALUECHANGED           (_T(\"valuechanged\"))\n#define DUI_MSGTYPE_VALUECHANGED_MOVE      (_T(\"movevaluechanged\"))\n//optioncheckbox¼\n#define DUI_MSGTYPE_SELECTCHANGED \t\t   (_T(\"selectchanged\"))\n//ɫ¼\n#define DUI_MSGTYPE_COLORCHANGED\t\t   (_T(\"colorchanged\"))\n\t//////////////////////////////////////////////////////////////////////////\n\n\n\n\tstruct DUI_MSGMAP_ENTRY;\n\tstruct DUI_MSGMAP\n\t{\n#ifndef UILIB_STATIC\n\t\tconst DUI_MSGMAP* (PASCAL* pfnGetBaseMap)();\n#else\n\t\tconst DUI_MSGMAP* pBaseMap;\n#endif\n\t\tconst DUI_MSGMAP_ENTRY* lpEntries;\n\t};\n\n\t//ṹ\n\tstruct DUI_MSGMAP_ENTRY //һṹ壬ϢϢ\n\t{\n\t\tCDuiString sMsgType;          // DUIϢ\n\t\tCDuiString sCtrlName;         // ؼ\n\t\tUINT       nSig;              // Ǻָ\n\t\tDUI_PMSG   pfn;               // ָָ\n\t};\n\n\t//\n#ifndef UILIB_STATIC\n#define DUI_DECLARE_MESSAGE_MAP()                                         \\\nprivate:                                                                  \\\n\tstatic const DUI_MSGMAP_ENTRY _messageEntries[];                      \\\nprotected:                                                                \\\n\tstatic const DUI_MSGMAP messageMap;                                   \\\n\tstatic const DUI_MSGMAP* PASCAL _GetBaseMessageMap();                 \\\n\tvirtual const DUI_MSGMAP* GetMessageMap() const;                      \\\n\n#else\n#define DUI_DECLARE_MESSAGE_MAP()                                         \\\nprivate:                                                                  \\\n\tstatic const DUI_MSGMAP_ENTRY _messageEntries[];                      \\\nprotected:                                                                \\\n\tstatic  const DUI_MSGMAP messageMap;\t\t\t\t                  \\\n\tvirtual const DUI_MSGMAP* GetMessageMap() const;                      \\\n\n#endif\n\n\n\t//ʼ\n#ifndef UILIB_STATIC\n#define DUI_BASE_BEGIN_MESSAGE_MAP(theClass)                              \\\n\tconst DUI_MSGMAP* PASCAL theClass::_GetBaseMessageMap()               \\\n\t{ return NULL; }                                                  \\\n\tconst DUI_MSGMAP* theClass::GetMessageMap() const                     \\\n\t{ return &theClass::messageMap; }                                 \\\n\tUILIB_COMDAT const DUI_MSGMAP theClass::messageMap =                  \\\n\t{  &theClass::_GetBaseMessageMap, &theClass::_messageEntries[0] };\\\n\tUILIB_COMDAT const DUI_MSGMAP_ENTRY theClass::_messageEntries[] =     \\\n\t{                                                                     \\\n\n#else\n#define DUI_BASE_BEGIN_MESSAGE_MAP(theClass)                              \\\n\tconst DUI_MSGMAP* theClass::GetMessageMap() const                     \\\n\t{ return &theClass::messageMap; }                                 \\\n\tUILIB_COMDAT const DUI_MSGMAP theClass::messageMap =                  \\\n\t{  NULL, &theClass::_messageEntries[0] };                         \\\n\tUILIB_COMDAT const DUI_MSGMAP_ENTRY theClass::_messageEntries[] =     \\\n\t{                                                                     \\\n\n#endif\n\n\n\t//ʼ\n#ifndef UILIB_STATIC\n#define DUI_BEGIN_MESSAGE_MAP(theClass, baseClass)                        \\\n\tconst DUI_MSGMAP* PASCAL theClass::_GetBaseMessageMap()               \\\n\t{ return &baseClass::messageMap; }                                \\\n\tconst DUI_MSGMAP* theClass::GetMessageMap() const                     \\\n\t{ return &theClass::messageMap; }                                 \\\n\tUILIB_COMDAT const DUI_MSGMAP theClass::messageMap =                  \\\n\t{ &theClass::_GetBaseMessageMap, &theClass::_messageEntries[0] }; \\\n\tUILIB_COMDAT const DUI_MSGMAP_ENTRY theClass::_messageEntries[] =     \\\n\t{                                                                     \\\n\n#else\n#define DUI_BEGIN_MESSAGE_MAP(theClass, baseClass)                        \\\n\tconst DUI_MSGMAP* theClass::GetMessageMap() const                     \\\n\t{ return &theClass::messageMap; }                                 \\\n\tUILIB_COMDAT const DUI_MSGMAP theClass::messageMap =                  \\\n\t{ &baseClass::messageMap, &theClass::_messageEntries[0] };        \\\n\tUILIB_COMDAT const DUI_MSGMAP_ENTRY theClass::_messageEntries[] =     \\\n\t{                                                                     \\\n\n#endif\n\n\n\t//\n#define DUI_END_MESSAGE_MAP()                                             \\\n\t{ _T(\"\"), _T(\"\"), DuiSig_end, (DUI_PMSG)0 }                           \\\n\t};                                                                        \\\n\n\n\t//Ϣ--ִк\n#define DUI_ON_MSGTYPE(msgtype, memberFxn)                                \\\n\t{ msgtype, _T(\"\"), DuiSig_vn, (DUI_PMSG)&memberFxn},                  \\\n\n\n\t//Ϣ--ؼ--ִк\n#define DUI_ON_MSGTYPE_CTRNAME(msgtype,ctrname,memberFxn)                 \\\n\t{ msgtype, ctrname, DuiSig_vn, (DUI_PMSG)&memberFxn },                \\\n\n\n\t//clickϢĿؼ--ִк\n#define DUI_ON_CLICK_CTRNAME(ctrname,memberFxn)                           \\\n\t{ DUI_MSGTYPE_CLICK, ctrname, DuiSig_vn, (DUI_PMSG)&memberFxn },      \\\n\n\n\t//selectchangedϢĿؼ--ִк\n#define DUI_ON_SELECTCHANGED_CTRNAME(ctrname,memberFxn)                   \\\n\t{ DUI_MSGTYPE_SELECTCHANGED,ctrname,DuiSig_vn,(DUI_PMSG)&memberFxn }, \\\n\n\n\t//killfocusϢĿؼ--ִк\n#define DUI_ON_KILLFOCUS_CTRNAME(ctrname,memberFxn)                       \\\n\t{ DUI_MSGTYPE_KILLFOCUS,ctrname,DuiSig_vn,(DUI_PMSG)&memberFxn },     \\\n\n\n\t//menuϢĿؼ--ִк\n#define DUI_ON_MENU_CTRNAME(ctrname,memberFxn)                            \\\n\t{ DUI_MSGTYPE_MENU,ctrname,DuiSig_vn,(DUI_PMSG)&memberFxn },          \\\n\n\n\t//ؼ޹صϢ\n\n\t//timerϢ--ִк\n#define DUI_ON_TIMER()                                                    \\\n\t{ DUI_MSGTYPE_TIMER, _T(\"\"), DuiSig_vn,(DUI_PMSG)&OnTimer },          \\\n\n\n\t///\n\t//////////////ENDϢӳ궨////////////////////////////////////////////////////\n\n\n\t//////////////BEGINؼƺ궨//////////////////////////////////////////////////\n\t///\n\n\t//Base Control\n\n#define  DUI_CTR_EDIT                            (_T(\"Edit\"))\n#define  DUI_CTR_LIST                            (_T(\"List\"))\n#define  DUI_CTR_TEXT                            (_T(\"Text\"))\n\n#define  DUI_CTR_COMBO                           (_T(\"Combo\"))\n#define  DUI_CTR_LABEL                           (_T(\"Label\"))\n#define  DUI_CTR_FLASH\t\t\t\t\t\t\t (_T(\"Flash\"))\n\n#define  DUI_CTR_BUTTON                          (_T(\"Button\"))\n#define  DUI_CTR_FADEBUTTON                      (_T(\"FadeButton\"))\n#define  DUI_CTR_OPTION                          (_T(\"Option\"))\n#define  DUI_CTR_SLIDER                          (_T(\"Slider\"))\n\n#define  DUI_CTR_CONTROL                         (_T(\"Control\"))\n#define  DUI_CTR_ACTIVEX                         (_T(\"ActiveX\"))\n\n#define  DUI_CTR_LISTITEM                        (_T(\"ListItem\"))\n#define  DUI_CTR_PROGRESS                        (_T(\"Progress\"))\n#define  DUI_CTR_RICHEDIT                        (_T(\"RichEdit\"))\n#define  DUI_CTR_CHECKBOX                        (_T(\"CheckBox\"))\n#define  DUI_CTR_COMBOBOX                        (_T(\"ComboBox\"))\n#define  DUI_CTR_DATETIME                        (_T(\"DateTime\"))\n#define  DUI_CTR_TREEVIEW                        (_T(\"TreeView\"))\n#define  DUI_CTR_TREENODE                        (_T(\"TreeNode\"))\n\n#define  DUI_CTR_CONTAINER                       (_T(\"Container\"))\n#define  DUI_CTR_TABLAYOUT                       (_T(\"TabLayout\"))\n#define  DUI_CTR_SCROLLBAR                       (_T(\"ScrollBar\"))\n\n#define  DUI_CTR_LISTHEADER                      (_T(\"ListHeader\"))\n#define  DUI_CTR_TILELAYOUT                      (_T(\"TileLayout\"))\n#define  DUI_CTR_WEBBROWSER                      (_T(\"WebBrowser\"))\n\n#define  DUI_CTR_CHILDLAYOUT                     (_T(\"ChildLayout\"))\n#define  DUI_CTR_LISTELEMENT                     (_T(\"ListElement\"))\n#define  DUI_CTR_MEDIAPLAYER\t\t\t\t\t (_T(\"MediaPLayer\"))\n\n#define  DUI_CTR_DIALOGLAYOUT                    (_T(\"DialogLayout\"))\n\n#define  DUI_CTR_VERTICALLAYOUT                  (_T(\"VerticalLayout\"))\n#define  DUI_CTR_LISTHEADERITEM                  (_T(\"ListHeaderItem\"))\n\n#define  DUI_CTR_LISTTEXTELEMENT                  (_T(\"ListTextElement\"))\n\n#define  DUI_CTR_HORIZONTALLAYOUT                 (_T(\"HorizontalLayout\"))\n#define  DUI_CTR_LISTLABELELEMENT                 (_T(\"ListLabelElement\"))\n\n#define  DUI_CTR_LISTCONTAINERELEMENT             (_T(\"ListContainerElement\"))\n\n#define DUI_CTR_TREEVIEW\t\t\t\t\t\t  (_T(\"TreeView\"))\t\n#define DUI_CTR_TREENODE\t\t\t\t\t      (_T(\"TreeNode\"))\n\t//extend Control\n\n#define DUI_CTR_COLORPALETTE\t\t\t\t\t  (_T(\"ColorPalette\"))\n#define DUI_CTR_HYPERLINK\t\t\t\t\t      (_T(\"HyperLink\"))\n#define DUI_CTR_IPADDRESS\t\t\t\t\t      (_T(\"IPAddress\"))\n\n#define DUI_CTR_WKEWEBKIT                         (_T(\"WKEWebkit\"))\n\n\t//////////////ENDؼƺ궨//////////////////////////////////////////////////\n\n\t}// namespace DuiLib\n\n"
  },
  {
    "path": "DuiLib/Core/UIDlgBuilder.cpp",
    "content": "#include \"StdAfx.h\"\n\nnamespace DuiLib {\n\n\tCDialogBuilder::CDialogBuilder() : m_pCallback(NULL), m_pstrtype(NULL)\n\t{\n\n\t}\n\n\tCControlUI* CDialogBuilder::Create(STRINGorID xml, LPCTSTR type, IDialogBuilderCallback* pCallback, \n\t\tCPaintManagerUI* pManager, CControlUI* pParent)\n\t{\n\t\t//ԴIDΪ0-65535ֽڣַָΪ4ֽ\n\t\t//ַ<ͷΪXMLַΪXMLļ\n\n\t\tif( HIWORD(xml.m_lpstr) != NULL ) {\n\t\t\tif( *(xml.m_lpstr) == _T('<') ) {\n\t\t\t\tif( !m_xml.Load(xml.m_lpstr) ) return NULL;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( !m_xml.LoadFromFile(xml.m_lpstr) ) return NULL;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tHRSRC hResource = ::FindResource(CPaintManagerUI::GetResourceDll(), xml.m_lpstr, type);\n\t\t\tif( hResource == NULL ) return NULL;\n\t\t\tHGLOBAL hGlobal = ::LoadResource(CPaintManagerUI::GetResourceDll(), hResource);\n\t\t\tif( hGlobal == NULL ) {\n\t\t\t\tFreeResource(hResource);\n\t\t\t\treturn NULL;\n\t\t\t}\n\n\t\t\tm_pCallback = pCallback;\n\t\t\tif( !m_xml.LoadFromMem((BYTE*)::LockResource(hGlobal), ::SizeofResource(CPaintManagerUI::GetResourceDll(), hResource) )) return NULL;\n\t\t\t::FreeResource(hResource);\n\t\t\tm_pstrtype = type;\n\t\t}\n\n\t\treturn Create(pCallback, pManager, pParent);\n\t}\n\n\tCControlUI* CDialogBuilder::Create(IDialogBuilderCallback* pCallback, CPaintManagerUI* pManager, CControlUI* pParent)\n\t{\n\t\tm_pCallback = pCallback;\n\t\tCMarkupNode root = m_xml.GetRoot();\n\t\tif( !root.IsValid() ) return NULL;\n\n\t\tif( pManager ) {\n\t\t\tLPCTSTR pstrClass = NULL;\n\t\t\tint nAttributes = 0;\n\t\t\tLPCTSTR pstrName = NULL;\n\t\t\tLPCTSTR pstrValue = NULL;\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tfor( CMarkupNode node = root.GetChild() ; node.IsValid(); node = node.GetSibling() ) {\n\t\t\t\tpstrClass = node.GetName();\n\t\t\t\tif( _tcscmp(pstrClass, _T(\"Image\")) == 0 ) {\n\t\t\t\t\tnAttributes = node.GetAttributeCount();\n\t\t\t\t\tLPCTSTR pImageName = NULL;\n\t\t\t\t\tLPCTSTR pImageResType = NULL;\n\t\t\t\t\tDWORD mask = 0;\n\t\t\t\t\tfor( int i = 0; i < nAttributes; i++ ) {\n\t\t\t\t\t\tpstrName = node.GetAttributeName(i);\n\t\t\t\t\t\tpstrValue = node.GetAttributeValue(i);\n\t\t\t\t\t\tif( _tcscmp(pstrName, _T(\"name\")) == 0 ) {\n\t\t\t\t\t\t\tpImageName = pstrValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"restype\")) == 0 ) {\n\t\t\t\t\t\t\tpImageResType = pstrValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"mask\")) == 0 ) {\n\t\t\t\t\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\t\t\t\t\tmask = _tcstoul(pstrValue, &pstr, 16);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( pImageName ) pManager->AddImage(pImageName, pImageResType, mask);\n\t\t\t\t}\n\t\t\t\telse if( _tcscmp(pstrClass, _T(\"Font\")) == 0 ) {\n\t\t\t\t\tnAttributes = node.GetAttributeCount();\n\t\t\t\t\tLPCTSTR pFontName = NULL;\n\t\t\t\t\tint size = 12;\n\t\t\t\t\tbool bold = false;\n\t\t\t\t\tbool underline = false;\n\t\t\t\t\tbool italic = false;\n\t\t\t\t\tbool defaultfont = false;\n\t\t\t\t\tfor( int i = 0; i < nAttributes; i++ ) {\n\t\t\t\t\t\tpstrName = node.GetAttributeName(i);\n\t\t\t\t\t\tpstrValue = node.GetAttributeValue(i);\n\t\t\t\t\t\tif( _tcscmp(pstrName, _T(\"name\")) == 0 ) {\n\t\t\t\t\t\t\tpFontName = pstrValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"size\")) == 0 ) {\n\t\t\t\t\t\t\tsize = _tcstol(pstrValue, &pstr, 10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"bold\")) == 0 ) {\n\t\t\t\t\t\t\tbold = (_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"underline\")) == 0 ) {\n\t\t\t\t\t\t\tunderline = (_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"italic\")) == 0 ) {\n\t\t\t\t\t\t\titalic = (_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"default\")) == 0 ) {\n\t\t\t\t\t\t\tdefaultfont = (_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( pFontName ) {\n\t\t\t\t\t\tpManager->AddFont(pFontName, size, bold, underline, italic);\n\t\t\t\t\t\tif( defaultfont ) pManager->SetDefaultFont(pFontName, size, bold, underline, italic);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (_tcscmp(pstrClass,_T(\"String\"))==0)\n\t\t\t\t{\n\t\t\t\t\tLPCTSTR pStringName = NULL;\n\t\t\t\t\tLPCTSTR pStringValue = NULL;\n\t\t\t\t\tnAttributes = node.GetAttributeCount();\n\n\t\t\t\t\tfor( int i = 0; i < nAttributes; i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tpstrName = node.GetAttributeName(i);\n\t\t\t\t\t\tpstrValue = node.GetAttributeValue(i);\n\n\t\t\t\t\t\tif( _tcscmp(pstrName, _T(\"name\")) == 0 ) {\n\t\t\t\t\t\t\tpStringName = pstrValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"value\")) == 0 ) {\n\t\t\t\t\t\t\tpStringValue = pstrValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (pStringName)\n\t\t\t\t\t{\n\t\t\t\t\t\tpManager->AddResString(pStringName,new CDuiString(pStringValue));\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if( _tcscmp(pstrClass, _T(\"Default\")) == 0 ) {\n\t\t\t\t\tnAttributes = node.GetAttributeCount();\n\t\t\t\t\tLPCTSTR pControlName = NULL;\n\t\t\t\t\tLPCTSTR pControlValue = NULL;\n\t\t\t\t\tfor( int i = 0; i < nAttributes; i++ ) {\n\t\t\t\t\t\tpstrName = node.GetAttributeName(i);\n\t\t\t\t\t\tpstrValue = node.GetAttributeValue(i);\n\t\t\t\t\t\tif( _tcscmp(pstrName, _T(\"name\")) == 0 ) {\n\t\t\t\t\t\t\tpControlName = pstrValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"value\")) == 0 ) {\n\t\t\t\t\t\t\tpControlValue = pstrValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( pControlName ) {\n\t\t\t\t\t\tpManager->AddDefaultAttributeList(pControlName, pControlValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpstrClass = root.GetName();\n\t\t\tif( _tcscmp(pstrClass, _T(\"Window\")) == 0 ) {\n\t\t\t\tif( pManager->GetPaintWindow() ) {\n\t\t\t\t\tint nAttributes = root.GetAttributeCount();\n\t\t\t\t\tfor( int i = 0; i < nAttributes; i++ ) {\n\t\t\t\t\t\tpstrName = root.GetAttributeName(i);\n\t\t\t\t\t\tpstrValue = root.GetAttributeValue(i);\n\t\t\t\t\t\tif( _tcscmp(pstrName, _T(\"size\")) == 0 ) {\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\tint cx = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\t\tint cy = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr); \n\t\t\t\t\t\t\tpManager->SetInitSize(cx, cy);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"sizebox\")) == 0 ) {\n\t\t\t\t\t\t\tRECT rcSizeBox = { 0 };\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\trcSizeBox.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\t\trcSizeBox.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\t\t\t\t\trcSizeBox.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\t\trcSizeBox.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\t\t\t\t\t\tpManager->SetSizeBox(rcSizeBox);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"caption\")) == 0 ) {\n\t\t\t\t\t\t\tRECT rcCaption = { 0 };\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\trcCaption.left = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\t\trcCaption.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\t\t\t\t\trcCaption.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\t\trcCaption.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);    \n\t\t\t\t\t\t\tpManager->SetCaptionRect(rcCaption);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"roundcorner\")) == 0 ) {\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\tint cx = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\t\tint cy = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr); \n\t\t\t\t\t\t\tpManager->SetRoundCorner(cx, cy);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"mininfo\")) == 0 ) {\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\tint cx = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\t\tint cy = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr); \n\t\t\t\t\t\t\tpManager->SetMinInfo(cx, cy);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"maxinfo\")) == 0 ) {\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\tint cx = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\t\tint cy = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr); \n\t\t\t\t\t\t\tpManager->SetMaxInfo(cx, cy);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"showdirty\")) == 0 ) {\n\t\t\t\t\t\t\tpManager->SetShowUpdateRect(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"alpha\")) == 0 ) {\n\t\t\t\t\t\t\tpManager->SetTransparent(_ttoi(pstrValue));\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"bktrans\")) == 0 ) {\n\t\t\t\t\t\t\tpManager->SetBackgroundTransparent(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"disabledfontcolor\")) == 0 ) {\n\t\t\t\t\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\t\t\t\t\tpManager->SetDefaultDisabledColor(clrColor);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"defaultfontcolor\")) == 0 ) {\n\t\t\t\t\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\t\t\t\t\tpManager->SetDefaultFontColor(clrColor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"linkfontcolor\")) == 0 ) {\n\t\t\t\t\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\t\t\t\t\tpManager->SetDefaultLinkFontColor(clrColor);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"linkhoverfontcolor\")) == 0 ) {\n\t\t\t\t\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\t\t\t\t\tpManager->SetDefaultLinkHoverFontColor(clrColor);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if( _tcscmp(pstrName, _T(\"selectedcolor\")) == 0 ) {\n\t\t\t\t\t\t\tif( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\tDWORD clrColor = _tcstoul(pstrValue, &pstr, 16);\n\t\t\t\t\t\t\tpManager->SetDefaultSelectedBkColor(clrColor);\n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn _Parse(&root, pParent, pManager);\n\t}\n\n\tCMarkup* CDialogBuilder::GetMarkup()\n\t{\n\t\treturn &m_xml;\n\t}\n\n\tvoid CDialogBuilder::GetLastErrorMessage(LPTSTR pstrMessage, SIZE_T cchMax) const\n\t{\n\t\treturn m_xml.GetLastErrorMessage(pstrMessage, cchMax);\n\t}\n\n\tvoid CDialogBuilder::GetLastErrorLocation(LPTSTR pstrSource, SIZE_T cchMax) const\n\t{\n\t\treturn m_xml.GetLastErrorLocation(pstrSource, cchMax);\n\t}\n\n\tCControlUI* CDialogBuilder::_Parse(CMarkupNode* pRoot, CControlUI* pParent, CPaintManagerUI* pManager)\n\t{\n\t\tIContainerUI* pContainer = NULL;\n\t\tCControlUI* pReturn = NULL;\n\t\tfor( CMarkupNode node = pRoot->GetChild() ; node.IsValid(); node = node.GetSibling() ) {\n\t\t\tLPCTSTR pstrClass = node.GetName();\n\t\t\tif( _tcscmp(pstrClass, _T(\"Image\")) == 0 || _tcscmp(pstrClass, _T(\"Font\")) == 0||_tcscmp(pstrClass, _T(\"String\")) == 0 \\\n\t\t\t\t|| _tcscmp(pstrClass, _T(\"Default\")) == 0 ) continue;\n\n\t\t\tCControlUI* pControl = NULL;\n\t\t\tif( _tcscmp(pstrClass, _T(\"Include\")) == 0 ) {\n\t\t\t\tif( !node.HasAttributes() ) continue;\n\t\t\t\tint count = 1;\n\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\tTCHAR szValue[500] = { 0 };\n\t\t\t\tSIZE_T cchLen = lengthof(szValue) - 1;\n\t\t\t\tif ( node.GetAttributeValue(_T(\"count\"), szValue, cchLen) )\n\t\t\t\t\tcount = _tcstol(szValue, &pstr, 10);\n\t\t\t\tcchLen = lengthof(szValue) - 1;\n\t\t\t\tif ( !node.GetAttributeValue(_T(\"source\"), szValue, cchLen) ) continue;\n\t\t\t\tfor ( int i = 0; i < count; i++ ) {\n\t\t\t\t\tCDialogBuilder builder;\n\t\t\t\t\tif( m_pstrtype != NULL ) { // ʹԴdllԴжȡ\n\t\t\t\t\t\tWORD id = (WORD)_tcstol(szValue, &pstr, 10); \n\t\t\t\t\t\tpControl = builder.Create((UINT)id, m_pstrtype, m_pCallback, pManager, pParent);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tpControl = builder.Create((LPCTSTR)szValue, (UINT)0, m_pCallback, pManager, pParent);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//ؼXML\n\t\t\telse if( _tcscmp(pstrClass, _T(\"TreeNode\")) == 0 ) {\n\t\t\t\tCTreeNodeUI* pParentNode\t= static_cast<CTreeNodeUI*>(pParent->GetInterface(_T(\"TreeNode\")));\n\t\t\t\tCTreeNodeUI* pNode\t\t\t= new CTreeNodeUI();\n\t\t\t\tif(pParentNode){\n\t\t\t\t\tif(!pParentNode->Add(pNode)){\n\t\t\t\t\t\tdelete pNode;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// пؼĬȳʼĬ\n\t\t\t\tif( pManager ) {\n\t\t\t\t\tpNode->SetManager(pManager, NULL, false);\n\t\t\t\t\tLPCTSTR pDefaultAttributes = pManager->GetDefaultAttributeList(pstrClass);\n\t\t\t\t\tif( pDefaultAttributes ) {\n\t\t\t\t\t\tpNode->ApplyAttributeList(pDefaultAttributes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// ԲĬ\n\t\t\t\tif( node.HasAttributes() ) {\n\t\t\t\t\tTCHAR szValue[500] = { 0 };\n\t\t\t\t\tSIZE_T cchLen = lengthof(szValue) - 1;\n\t\t\t\t\t// Set ordinary attributes\n\t\t\t\t\tint nAttributes = node.GetAttributeCount();\n\t\t\t\t\tfor( int i = 0; i < nAttributes; i++ ) {\n\t\t\t\t\t\tpNode->SetAttribute(node.GetAttributeName(i), node.GetAttributeValue(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//ӽڵ㼰ӿؼ\n\t\t\t\tif(node.HasChildren()){\n\t\t\t\t\tCControlUI* pSubControl = _Parse(&node,pNode,pManager);\n\t\t\t\t\tif(pSubControl && _tcscmp(pSubControl->GetClass(),_T(\"TreeNodeUI\")) != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t// \t\t\t\t\tpSubControl->SetFixedWidth(30);\n\t\t\t\t\t\t// \t\t\t\t\tCHorizontalLayoutUI* pHorz = pNode->GetTreeNodeHoriznotal();\n\t\t\t\t\t\t// \t\t\t\t\tpHorz->Add(new CEditUI());\n\t\t\t\t\t\t// \t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(!pParentNode){\n\t\t\t\t\tCTreeViewUI* pTreeView = static_cast<CTreeViewUI*>(pParent->GetInterface(_T(\"TreeView\")));\n\t\t\t\t\tASSERT(pTreeView);\n\t\t\t\t\tif( pTreeView == NULL ) return NULL;\n\t\t\t\t\tif( !pTreeView->Add(pNode) ) {\n\t\t\t\t\t\tdelete pNode;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSIZE_T cchLen = _tcslen(pstrClass);\n\t\t\t\tswitch( cchLen ) {\n\t\t\t\tcase 4:\n\t\t\t\t\tif( _tcscmp(pstrClass, DUI_CTR_EDIT) == 0 )                   pControl = new CEditUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_LIST) == 0 )              pControl = new CListUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_TEXT) == 0 )              pControl = new CTextUI;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tif( _tcscmp(pstrClass, DUI_CTR_COMBO) == 0 )                  pControl = new CComboUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_LABEL) == 0 )             pControl = new CLabelUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_FLASH) == 0 )             pControl = new CFlashUI;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tif( _tcscmp(pstrClass, DUI_CTR_BUTTON) == 0 )                 pControl = new CButtonUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_OPTION) == 0 )            pControl = new COptionUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_SLIDER) == 0 )            pControl = new CSliderUI;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tif( _tcscmp(pstrClass, DUI_CTR_CONTROL) == 0 )                pControl = new CControlUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_ACTIVEX) == 0 )           pControl = new CActiveXUI;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tif( _tcscmp(pstrClass, DUI_CTR_PROGRESS) == 0 )               pControl = new CProgressUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_RICHEDIT) == 0 )          pControl = new CRichEditUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_CHECKBOX) == 0 )\t\t  pControl = new CCheckBoxUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_COMBOBOX) == 0 )\t\t  pControl = new CComboBoxUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_DATETIME) == 0 )\t\t  pControl = new CDateTimeUI;\n\t\t\t\t\telse if (_tcscmp(pstrClass, DUI_CTR_TREEVIEW) == 0)\t\t\t  pControl = new CTreeViewUI;\n\t\t\t\t\telse if (_tcscmp(pstrClass, DUI_CTR_TREENODE) == 0)\t\t\t  pControl = new CTreeNodeUI;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\t\tif( _tcscmp(pstrClass, DUI_CTR_CONTAINER) == 0 )              pControl = new CContainerUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_TABLAYOUT) == 0 )         pControl = new CTabLayoutUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_SCROLLBAR) == 0 )         pControl = new CScrollBarUI;\n                    else if (_tcscmp(pstrClass,DUI_CTR_IPADDRESS)==0)             pControl = new CIPAddressUI;\n                  \n\t\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\t\tif( _tcscmp(pstrClass, DUI_CTR_LISTHEADER) == 0 )             pControl = new CListHeaderUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_TILELAYOUT) == 0 )        pControl = new CTileLayoutUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_WEBBROWSER) == 0 )        pControl = new CWebBrowserUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_FADEBUTTON) == 0 )\t\t  pControl = new CFadeButtonUI;\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\t\tif (_tcscmp(pstrClass, DUI_CTR_CHILDLAYOUT) == 0)\t\t\t  pControl = new CChildLayoutUI;\n\t\t\t\t\telse if (_tcscmp(pstrClass, DUI_CTR_MEDIAPLAYER) == 0)        pControl = new CMediaPlayerUI;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\t\tif (_tcscmp(pstrClass, DUI_CTR_COLORPALETTE) == 0)\t\t\t  pControl = new CColorPaletteUI;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 14:\n\t\t\t\t\tif( _tcscmp(pstrClass, DUI_CTR_VERTICALLAYOUT) == 0 )         pControl = new CVerticalLayoutUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_LISTHEADERITEM) == 0 )    pControl = new CListHeaderItemUI;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 15:\n\t\t\t\t\tif( _tcscmp(pstrClass, DUI_CTR_LISTTEXTELEMENT) == 0 )        pControl = new CListTextElementUI;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 16:\n\t\t\t\t\tif( _tcscmp(pstrClass, DUI_CTR_HORIZONTALLAYOUT) == 0 )       pControl = new CHorizontalLayoutUI;\n\t\t\t\t\telse if( _tcscmp(pstrClass, DUI_CTR_LISTLABELELEMENT) == 0 )  pControl = new CListLabelElementUI;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 20:\n\t\t\t\t\tif( _tcscmp(pstrClass, DUI_CTR_LISTCONTAINERELEMENT) == 0 )   pControl = new CListContainerElementUI;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// User-supplied control factory\n\t\t\t\tif( pControl == NULL ) {\n\t\t\t\t\tCStdPtrArray* pPlugins = CPaintManagerUI::GetPlugins();\n\t\t\t\t\tLPCREATECONTROL lpCreateControl = NULL;\n\t\t\t\t\tfor( int i = 0; i < pPlugins->GetSize(); ++i ) {\n\t\t\t\t\t\tlpCreateControl = (LPCREATECONTROL)pPlugins->GetAt(i);\n\t\t\t\t\t\tif( lpCreateControl != NULL ) {\n\t\t\t\t\t\t\tpControl = lpCreateControl(pstrClass);\n\t\t\t\t\t\t\tif( pControl != NULL ) break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( pControl == NULL && m_pCallback != NULL ) {\n\t\t\t\t\t//Ĭϵؼ\n\t\t\t\t\tpControl = m_pCallback->CreateControl(pstrClass);\n\t\t\t\t}\n\t\t\t}\n\n#ifndef _DEBUG\n\t\t\tASSERT(pControl);\n#endif // _DEBUG\n\t\t\tif( pControl == NULL )\n\t\t\t{\n#ifdef _DEBUG\n\t\t\t\tDUITRACE(_T(\"δ֪ؼ:%s\"),pstrClass);\n                continue;\n#else\n\t\t\t\tcontinue;\n#endif\n\t\t\t}\n\n\t\t\t// Add children\n\t\t\tif( node.HasChildren() ) {\n\t\t\t\t_Parse(&node, pControl, pManager);\n\t\t\t}\n\t\t\t// Attach to parent\n\t\t\t// ΪĳЩԺ͸أselectedAdd\n\t\t\tif( pParent != NULL ) {\n\t\t\t\tCTreeNodeUI* pContainerNode = static_cast<CTreeNodeUI*>(pParent->GetInterface(_T(\"TreeNode\")));\n\t\t\t\tif(pContainerNode)\n\t\t\t\t\tpContainerNode->GetTreeNodeHoriznotal()->Add(pControl);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif( pContainer == NULL ) pContainer = static_cast<IContainerUI*>(pParent->GetInterface(_T(\"IContainer\")));\n\t\t\t\t\tASSERT(pContainer&&\"Unkonw Container\");\n\t\t\t\t\tif( pContainer == NULL ) return NULL;\n\t\t\t\t\tif( !pContainer->Add(pControl) ) {\n\t\t\t\t\t\tdelete pControl;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Init default attributes\n\t\t\tif( pManager ) {\n\t\t\t\tpControl->SetManager(pManager, NULL, false);\n\t\t\t\tLPCTSTR pDefaultAttributes = pManager->GetDefaultAttributeList(pstrClass);\n\t\t\t\tif( pDefaultAttributes ) {\n\t\t\t\t\tpControl->ApplyAttributeList(pDefaultAttributes);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Process attributes\n\t\t\tif( node.HasAttributes() ) {\n\t\t\t\tTCHAR szValue[500] = { 0 };\n\t\t\t\tSIZE_T cchLen = lengthof(szValue) - 1;\n\t\t\t\t// Set ordinary attributes\n\t\t\t\tint nAttributes = node.GetAttributeCount();\n\t\t\t\tfor( int i = 0; i < nAttributes; i++ ) {\n\t\t\t\t\tpControl->SetAttribute(node.GetAttributeName(i), node.GetAttributeValue(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( pManager ) {\n\t\t\t\tpControl->SetManager(NULL, NULL, false);\n\t\t\t}\n\t\t\t// Return first item\n\t\t\tif( pReturn == NULL ) pReturn = pControl;\n\t\t}\n\t\treturn pReturn;\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Core/UIDlgBuilder.h",
    "content": "#ifndef __UIDLGBUILDER_H__\n#define __UIDLGBUILDER_H__\n\n#pragma once\n\nnamespace DuiLib {\n\n\tclass IDialogBuilderCallback\n\t{\n\tpublic:\n\t\tvirtual CControlUI* CreateControl(LPCTSTR pstrClass) = 0;\n\t};\n\n\n\tclass UILIB_API CDialogBuilder\n\t{\n\tpublic:\n\t\tCDialogBuilder();\n\t\tCControlUI* Create(STRINGorID xml, LPCTSTR type = NULL, IDialogBuilderCallback* pCallback = NULL,\n\t\t\tCPaintManagerUI* pManager = NULL, CControlUI* pParent = NULL);\n\t\tCControlUI* Create(IDialogBuilderCallback* pCallback = NULL, CPaintManagerUI* pManager = NULL,\n\t\t\tCControlUI* pParent = NULL);\n\n\t\tCMarkup* GetMarkup();\n\n\t\tvoid GetLastErrorMessage(LPTSTR pstrMessage, SIZE_T cchMax) const;\n\t\tvoid GetLastErrorLocation(LPTSTR pstrSource, SIZE_T cchMax) const;\n\tprivate:\n\t\tCControlUI* _Parse(CMarkupNode* parent, CControlUI* pParent = NULL, CPaintManagerUI* pManager = NULL);\n\n\t\tCMarkup m_xml;\n\t\tIDialogBuilderCallback* m_pCallback;\n\t\tLPCTSTR m_pstrtype;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UIDLGBUILDER_H__\n"
  },
  {
    "path": "DuiLib/Core/UIManager.cpp",
    "content": "#include \"StdAfx.h\"\n#include <zmouse.h>\n\n#include <GdiPlus.h>\n#pragma comment( lib, \"GdiPlus.lib\" )\n\n\n\nULONG_PTR\t\t\t\tg_gdiplusToken;\nGdiplusStartupInput\t\tg_gdiplusStartupInput;\n\n#ifdef __USE_7ZIPRESOURCE\n#include \"XUn7zip.h\"\n#else\n#include \"..\\Utils\\zip\\XUnZip.h\"\n#endif\nnamespace DuiLib {\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tstatic UINT MapKeyState()\n\t{\n\t\tUINT uState = 0;\n\t\tif( ::GetKeyState(VK_CONTROL) < 0 ) uState |= MK_CONTROL;\n\t\tif( ::GetKeyState(VK_RBUTTON) < 0 ) uState |= MK_RBUTTON;\n\t\tif( ::GetKeyState(VK_LBUTTON) < 0 ) uState |= MK_LBUTTON;\n\t\tif( ::GetKeyState(VK_SHIFT) < 0 ) uState |= MK_SHIFT;\n\t\tif( ::GetKeyState(VK_MENU) < 0 ) uState |= MK_ALT;\n\t\treturn uState;\n\t}\n\n\ttypedef struct tagFINDTABINFO\n\t{\n\t\tCControlUI* pFocus;\n\t\tCControlUI* pLast;\n\t\tbool bForward;\n\t\tbool bNextIsIt;\n\t} FINDTABINFO;\n\n\ttypedef struct tagFINDSHORTCUT\n\t{\n\t\tTCHAR ch;\n\t\tbool bPickNext;\n\t} FINDSHORTCUT;\n\n\ttypedef struct tagTIMERINFO\n\t{\n\t\tCControlUI* pSender;\n\t\tUINT nLocalID;\n\t\tHWND hWnd;\n\t\tUINT uWinTimer;\n\t\tbool bKilled;\n\t} TIMERINFO;\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\n\tHPEN m_hUpdateRectPen = NULL;\n\tHINSTANCE CPaintManagerUI::m_hInstance = NULL;\n\tHINSTANCE CPaintManagerUI::m_hResourceInstance = NULL;\n\tCDuiString CPaintManagerUI::m_pStrDefaultFontName;//added by cddjr at 05/18/2012\n\tCDuiString CPaintManagerUI::m_pStrResourcePath;\n\tCDuiString CPaintManagerUI::m_pStrResourceZip;\n\tbool CPaintManagerUI::m_bCachedResourceZip = false;\n\n#ifdef __USE_7ZIPRESOURCE\n\tCUnCompression* CPaintManagerUI::m_pResHandle = new CXUn7zip();\n#else\n\tCUnCompression* CPaintManagerUI::m_pResHandle = new CDUIUnZip();\n#endif\n\n\tshort CPaintManagerUI::m_H = 180;\n\tshort CPaintManagerUI::m_S = 100;\n\tshort CPaintManagerUI::m_L = 100;\n\tCStdPtrArray CPaintManagerUI::m_aPreMessages;\n\tCStdPtrArray CPaintManagerUI::m_aPlugins;\n\n\n\tCPaintManagerUI::CPaintManagerUI() :\n\t\tm_hWndPaint(NULL),\n\t\tm_hDcPaint(NULL),\n\t\tm_hDcOffscreen(NULL),\n\t\tm_hDcBackground(NULL),\n\t\tm_hbmpOffscreen(NULL),\n\t\tm_hbmpBackground(NULL),\n\t\tm_hwndTooltip(NULL),\n\t\tm_bShowUpdateRect(false),\n\t\tm_uTimerID(0x1000),\n\t\tm_pRoot(NULL),\n\t\tm_pFocus(NULL),\n\t\tm_pEventHover(NULL),\n\t\tm_pEventClick(NULL),\n\t\tm_pEventKey(NULL),\n\t\tm_bFirstLayout(true),\n\t\tm_bFocusNeeded(false),\n\t\tm_bUpdateNeeded(false),\n\t\tm_bMouseTracking(false),\n\t\tm_bMouseCapture(false),\n\t\tm_bOffscreenPaint(true),\n\t\tm_bAlphaBackground(false),\n\t\tm_bUsedVirtualWnd(false),\n\t\tm_nOpacity(255),\n\t\tm_pParentResourcePM(NULL)\n\t{\n\t\tASSERT(m_pResHandle != NULL&&\"heap for zip/7z** invalid\");\n\t\tm_dwDefaultDisabledColor = 0xFFA7A6AA;\n\t\tm_dwDefaultFontColor = 0xFF000000;\n\t\tm_dwDefaultLinkFontColor = 0xFF0000FF;\n\t\tm_dwDefaultLinkHoverFontColor = 0xFFD3215F;\n\t\tm_dwDefaultSelectedBkColor = 0xFFBAE4FF;\n\t\tLOGFONT lf = { 0 };\n\t\t::GetObject(::GetStockObject(DEFAULT_GUI_FONT), sizeof(LOGFONT), &lf);\n\t\tlf.lfCharSet = DEFAULT_CHARSET;\n\t\tif (CPaintManagerUI::m_pStrDefaultFontName.GetLength()>0)\n\t\t{\n\t\t\t_tcscpy_s(lf.lfFaceName, LF_FACESIZE, CPaintManagerUI::m_pStrDefaultFontName.GetData());\n\t\t}\n\t\tHFONT hDefaultFont = ::CreateFontIndirect(&lf);\n\t\tm_DefaultFontInfo.hFont = hDefaultFont;\n\t\tm_DefaultFontInfo.sFontName = lf.lfFaceName;\n\t\tm_DefaultFontInfo.iSize = -lf.lfHeight;\n\t\tm_DefaultFontInfo.bBold = (lf.lfWeight >= FW_BOLD);\n\t\tm_DefaultFontInfo.bUnderline = (lf.lfUnderline == TRUE);\n\t\tm_DefaultFontInfo.bItalic = (lf.lfItalic == TRUE);\n\t\t::ZeroMemory(&m_DefaultFontInfo.tm, sizeof(m_DefaultFontInfo.tm));\n\n\t\tif( m_hUpdateRectPen == NULL ) {\n\t\t\tm_hUpdateRectPen = ::CreatePen(PS_SOLID, 1, RGB(220, 0, 0));\n\t\t\t// Boot Windows Common Controls (for the ToolTip control)\n\t\t\t::InitCommonControls();\n\t\t\t::LoadLibrary(_T(\"msimg32.dll\"));\n\t\t}\n\n\t\tm_szMinWindow.cx = 0;\n\t\tm_szMinWindow.cy = 0;\n\t\tm_szMaxWindow.cx = 0;\n\t\tm_szMaxWindow.cy = 0;\n\t\tm_szInitWindowSize.cx = 0;\n\t\tm_szInitWindowSize.cy = 0;\n\t\tm_szRoundCorner.cx = m_szRoundCorner.cy = 0;\n\t\t::ZeroMemory(&m_rcSizeBox, sizeof(m_rcSizeBox));\n\t\t::ZeroMemory(&m_rcCaption, sizeof(m_rcCaption));\n\t\tm_ptLastMousePos.x = m_ptLastMousePos.y = -1;\n\t\tStartupGdiPlus();\n\n\t}\n\n\n\tCPaintManagerUI::~CPaintManagerUI()\n\t{\n\t\t// Delete the control-tree structures\n\t\tfor( int i = 0; i < m_aDelayedCleanup.GetSize(); i++ ) delete static_cast<CControlUI*>(m_aDelayedCleanup[i]);\n\t\tfor( int i = 0; i < m_aAsyncNotify.GetSize(); i++ ) delete static_cast<TNotifyUI*>(m_aAsyncNotify[i]);\n\t\tm_mNameHash.Resize(0);\n\t\tdelete m_pRoot;\n\n\t\t::DeleteObject(m_DefaultFontInfo.hFont);\n\t\tRemoveAllFonts();\n\t\tRemoveAllResStrings();\n\t\tRemoveAllImages();\n\t\tRemoveAllDefaultAttributeList();\n\t\tRemoveAllOptionGroups();\n\t\tRemoveAllTimers();\n\n\n\t\t// Reset other parts...\n\t\tif( m_hwndTooltip != NULL ) ::DestroyWindow(m_hwndTooltip);\n\t\tif( m_hDcOffscreen != NULL ) ::DeleteDC(m_hDcOffscreen);\n\t\tif( m_hDcBackground != NULL ) ::DeleteDC(m_hDcBackground);\n\t\tif( m_hbmpOffscreen != NULL ) ::DeleteObject(m_hbmpOffscreen);\n\t\tif( m_hbmpBackground != NULL ) ::DeleteObject(m_hbmpBackground);\n\t\tif( m_hDcPaint != NULL ) ::ReleaseDC(m_hWndPaint, m_hDcPaint);\n\t\tif (m_hUpdateRectPen != NULL){\n\t\t\t::DeleteObject(m_hUpdateRectPen);\n\t\t}\n\t\tm_aPreMessages.Remove(m_aPreMessages.Find(this));\n\t\tShutdownGdiPlus();\n\t}\n\n\tbool CPaintManagerUI::StartupGdiPlus()\n\t{\n\t\treturn ::GdiplusStartup(&g_gdiplusToken, &g_gdiplusStartupInput, nullptr) == Gdiplus::Ok;\n\t}\n\n\tbool CPaintManagerUI::ShutdownGdiPlus()\n\t{\n\t\t::GdiplusShutdown(g_gdiplusToken);\n\t\tg_gdiplusToken = 0;\n\t\treturn true;\n\t}\n\n\tvoid CPaintManagerUI::Init(HWND hWnd)\n\t{\n\t\tASSERT(::IsWindow(hWnd));\n\t\t// Remember the window context we came from\n\t\tm_hWndPaint = hWnd;\n\t\tm_hDcPaint = ::GetDC(hWnd);\n\t\t// We'll want to filter messages globally too\n\t\tm_aPreMessages.Add(this);\n\t}\n\n\tHINSTANCE CPaintManagerUI::GetInstance()\n\t{\n\t\treturn m_hInstance;\n\t}\n\n\tCDuiString CPaintManagerUI::GetInstancePath()\n\t{\n\t\tif( m_hInstance == NULL ) return _T('\\0');\n\n\t\tTCHAR tszModule[MAX_PATH + 1] = { 0 };\n\t\t::GetModuleFileName(m_hInstance, tszModule, MAX_PATH);\n\t\tCDuiString sInstancePath = tszModule;\n\t\tint pos = sInstancePath.ReverseFind(_T('\\\\'));\n\t\tif( pos >= 0 ) sInstancePath = sInstancePath.Left(pos + 1);\n\t\treturn sInstancePath;\n\t}\n\n\tCDuiString CPaintManagerUI::GetCurrentPath()\n\t{\n\t\tTCHAR tszModule[MAX_PATH + 1] = { 0 };\n\t\t::GetCurrentDirectory(MAX_PATH, tszModule);\n\t\treturn tszModule;\n\t}\n\n\tHINSTANCE CPaintManagerUI::GetResourceDll()\n\t{\n\t\tif( m_hResourceInstance == NULL ) return m_hInstance;\n\t\treturn m_hResourceInstance;\n\t}\n\n\tconst CDuiString& CPaintManagerUI::GetResourcePath()\n\t{\n\t\treturn m_pStrResourcePath;\n\t}\n\n\tconst CDuiString& CPaintManagerUI::GetResourceZip()\n\t{\n\t\treturn m_pStrResourceZip;\n\t}\n\n\tbool CPaintManagerUI::IsCachedResourceZip()\n\t{\n\t\treturn m_bCachedResourceZip;\n\t}\n\n\tBOOL CPaintManagerUI::CompressedPacketOpen(const TCHAR* filepath)\n\t{ \n\t\tASSERT(m_pResHandle != NULL);\n\t\treturn m_pResHandle->Open(filepath);\n\t}\n\n\tBOOL CPaintManagerUI::FindCompressedPacketResource(LPCTSTR lpszName, int *index, DWORD64 *dw64Ze)\n\t{\n\t\treturn m_pResHandle->Find(lpszName,index,dw64Ze);\n\t}\n\n\tBOOL CPaintManagerUI::GetCompressedPacketResource(int index, void *dst, DWORD64 len)\n\t{\n\t\treturn m_pResHandle->Get(index, dst, len);\n\t}\n\n\tvoid CPaintManagerUI::SetInstance(HINSTANCE hInst)\n\t{\n\t\tm_hInstance = hInst;\n\t}\n\n\tvoid CPaintManagerUI::SetCurrentPath(LPCTSTR pStrPath)\n\t{\n\t\t::SetCurrentDirectory(pStrPath);\n\t}\n\n\tvoid CPaintManagerUI::SetResourceDll(HINSTANCE hInst)\n\t{\n\t\tm_hResourceInstance = hInst;\n\t}\n\n\tvoid CPaintManagerUI::SetResourcePath(LPCTSTR pStrPath)\n\t{\n\t\tm_pStrResourcePath = pStrPath;\n\t\tif( m_pStrResourcePath.IsEmpty() ) return;\n\t\tTCHAR cEnd = m_pStrResourcePath.GetAt(m_pStrResourcePath.GetLength() - 1);\n\t\tif( cEnd != _T('\\\\') && cEnd != _T('/') ) m_pStrResourcePath += _T('\\\\');\n\t}\n\n\tvoid CPaintManagerUI::SetCompressedPacketResource(LPVOID pVoid, unsigned int len)\n\t{\n\t\tif( m_pStrResourceZip == _T(\"membuffer\") ) return;\n\t\tif( m_bCachedResourceZip && m_pResHandle->IsOpen() ) {\n\t\t\tm_pResHandle->Close();\n\t\t}\n\t\tm_pStrResourceZip = _T(\"membuffer\");\n\t\tm_bCachedResourceZip = true;\n\t\tif( m_bCachedResourceZip ) \n\t\t\tm_pResHandle->Open(pVoid, len);\n\t}\n\n\tvoid CPaintManagerUI::SetCompressedPacketResource(LPCTSTR pStrPath, bool bCachedResourceZip)\n\t{\n\t\tif( m_pStrResourceZip == pStrPath && m_bCachedResourceZip == bCachedResourceZip ) return;\n\t\tif( m_bCachedResourceZip && m_pResHandle->IsOpen() ) {\n\t\t\tm_pResHandle->Close();\n\t\t}\n\t\tm_pStrResourceZip = pStrPath;\n\t\tm_bCachedResourceZip = bCachedResourceZip;\n\t\tif( m_bCachedResourceZip ) {\n\t\t\tCDuiString sFile = CPaintManagerUI::GetResourcePath();\n\t\t\tsFile += CPaintManagerUI::GetResourceZip();\n\t\t\tm_pResHandle->Open( sFile.GetData() );\n\t\t}\n\t}\n\n\tvoid CPaintManagerUI::GetHSL(short* H, short* S, short* L)\n\t{\n\t\t*H = m_H;\n\t\t*S = m_S;\n\t\t*L = m_L;\n\t}\n\n\tvoid CPaintManagerUI::SetHSL(bool bUseHSL, short H, short S, short L)\n\t{\n\t\tif( H == m_H && S == m_S && L == m_L ) return;\n\t\tm_H = CLAMP(H, 0, 360);\n\t\tm_S = CLAMP(S, 0, 200);\n\t\tm_L = CLAMP(L, 0, 200);\n\t\tfor( int i = 0; i < m_aPreMessages.GetSize(); i++ ) {\n\t\t\tCPaintManagerUI* pManager = static_cast<CPaintManagerUI*>(m_aPreMessages[i]);\n\t\t\tif( pManager != NULL && pManager->GetRoot() != NULL )\n\t\t\t\tpManager->GetRoot()->Invalidate();\n\t\t}\n\t}\n\n\tvoid CPaintManagerUI::ReloadSkin()\n\t{\n\t\tfor( int i = 0; i < m_aPreMessages.GetSize(); i++ ) {\n\t\t\tCPaintManagerUI* pManager = static_cast<CPaintManagerUI*>(m_aPreMessages[i]);\n\t\t\tpManager->ReloadAllImages();\n\t\t}\n\t}\n\n\tbool CPaintManagerUI::LoadPlugin(LPCTSTR pstrModuleName)\n\t{\n\t\tASSERT( !::IsBadStringPtr(pstrModuleName,-1) || pstrModuleName == NULL );\n\t\tif( pstrModuleName == NULL ) return false;\n\t\tHMODULE hModule = ::LoadLibrary(pstrModuleName);\n\t\tif( hModule != NULL ) {\n\t\t\tLPCREATECONTROL lpCreateControl = (LPCREATECONTROL)::GetProcAddress(hModule, \"CreateControl\");\n\t\t\tif( lpCreateControl != NULL ) {\n\t\t\t\tif( m_aPlugins.Find(lpCreateControl) >= 0 ) return true;\n\t\t\t\tm_aPlugins.Add(lpCreateControl);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tCStdPtrArray* CPaintManagerUI::GetPlugins()\n\t{\n\t\treturn &m_aPlugins;\n\t}\n\n\tHWND CPaintManagerUI::GetPaintWindow() const\n\t{\n\t\treturn m_hWndPaint;\n\t}\n\n\tHWND CPaintManagerUI::GetTooltipWindow() const\n\t{\n\t\treturn m_hwndTooltip;\n\t}\n\n\tHDC CPaintManagerUI::GetPaintDC() const\n\t{\n\t\treturn m_hDcPaint;\n\t}\n\n\tPOINT CPaintManagerUI::GetMousePos() const\n\t{\n\t\treturn m_ptLastMousePos;\n\t}\n\n\tSIZE CPaintManagerUI::GetClientSize() const\n\t{\n\t\tRECT rcClient = { 0 };\n\t\t::GetClientRect(m_hWndPaint, &rcClient);\n\t\treturn CSize(rcClient.right - rcClient.left, rcClient.bottom - rcClient.top);\n\t}\n\n\tSIZE CPaintManagerUI::GetInitSize()\n\t{\n\t\treturn m_szInitWindowSize;\n\t}\n\n\tvoid CPaintManagerUI::SetInitSize(int cx, int cy)\n\t{\n\t\tm_szInitWindowSize.cx = cx;\n\t\tm_szInitWindowSize.cy = cy;\n\t\tif( m_pRoot == NULL && m_hWndPaint != NULL ) {\n\t\t\t::SetWindowPos(m_hWndPaint, NULL, 0, 0, cx, cy, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);\n\t\t}\n\t}\n\n\tRECT& CPaintManagerUI::GetSizeBox()\n\t{\n\t\treturn m_rcSizeBox;\n\t}\n\n\tvoid CPaintManagerUI::SetSizeBox(RECT& rcSizeBox)\n\t{\n\t\tm_rcSizeBox = rcSizeBox;\n\t}\n\n\tRECT& CPaintManagerUI::GetCaptionRect()\n\t{\n\t\treturn m_rcCaption;\n\t}\n\n\tvoid CPaintManagerUI::SetCaptionRect(RECT& rcCaption)\n\t{\n\t\tm_rcCaption = rcCaption;\n\t}\n\n\tSIZE CPaintManagerUI::GetRoundCorner() const\n\t{\n\t\treturn m_szRoundCorner;\n\t}\n\n\tvoid CPaintManagerUI::SetRoundCorner(int cx, int cy)\n\t{\n\t\tm_szRoundCorner.cx = cx;\n\t\tm_szRoundCorner.cy = cy;\n\t}\n\n\tSIZE CPaintManagerUI::GetMinInfo() const\n\t{\n\t\treturn m_szMinWindow;\n\t}\n\n\tvoid CPaintManagerUI::SetMinInfo(int cx, int cy)\n\t{\n\t\tASSERT(cx>=0 && cy>=0);\n\t\tm_szMinWindow.cx = cx;\n\t\tm_szMinWindow.cy = cy;\n\t}\n\n\tSIZE CPaintManagerUI::GetMaxInfo() const\n\t{\n\t\treturn m_szMaxWindow;\n\t}\n\n\tvoid CPaintManagerUI::SetMaxInfo(int cx, int cy)\n\t{\n\t\tASSERT(cx>=0 && cy>=0);\n\t\tm_szMaxWindow.cx = cx;\n\t\tm_szMaxWindow.cy = cy;\n\t}\n\n\tint CPaintManagerUI::GetTransparent() const\n\t{\n\t\treturn m_nOpacity;\n\t}\n\tvoid CPaintManagerUI::SetTransparent(int nOpacity)\n\t{\n\t\tif (nOpacity<0)\n\t\t\tm_nOpacity = 0;\n\t\telse if (nOpacity>255)\n\t\t\tm_nOpacity = 255;\n\t\telse\n\t\t\tm_nOpacity = nOpacity;\n\t\tif( m_hWndPaint != NULL ) {\n\t\t\ttypedef BOOL (__stdcall *PFUNCSETLAYEREDWINDOWATTR)(HWND, COLORREF, BYTE, DWORD);\n\t\t\tPFUNCSETLAYEREDWINDOWATTR fSetLayeredWindowAttributes;\n\n\t\t\tDWORD dwStyle = ::GetWindowLong(m_hWndPaint, GWL_EXSTYLE);\n\t\t\tDWORD dwNewStyle = dwStyle;\n\t\t\tif( nOpacity >= 0 && nOpacity < 256 ) dwNewStyle |= WS_EX_LAYERED;\n\t\t\telse dwNewStyle &= ~WS_EX_LAYERED;\n\t\t\tif(dwStyle != dwNewStyle) ::SetWindowLong(m_hWndPaint, GWL_EXSTYLE, dwNewStyle);\n\n\t\t\tHMODULE hUser32 = ::GetModuleHandle(_T(\"User32.dll\"));\n\t\t\tif (hUser32)\n\t\t\t{\n\t\t\t\tfSetLayeredWindowAttributes =\n\t\t\t\t\t(PFUNCSETLAYEREDWINDOWATTR)::GetProcAddress(hUser32, \"SetLayeredWindowAttributes\");\n\t\t\t\tif( fSetLayeredWindowAttributes == NULL ) return;\n\t\t\t\tfSetLayeredWindowAttributes(m_hWndPaint, 0, nOpacity, LWA_ALPHA);\n\t\t\t}\t\n\t\t}\n\t}\n\n\tvoid CPaintManagerUI::SetBackgroundTransparent(bool bTrans)\n\t{\n\t\tm_bAlphaBackground = bTrans;\n\t}\n\n\tbool CPaintManagerUI::IsShowUpdateRect() const\n\t{\n\t\treturn m_bShowUpdateRect;\n\t}\n\n\tvoid CPaintManagerUI::SetShowUpdateRect(bool show)\n\t{\n\t\tm_bShowUpdateRect = show;\n\t}\n\n\tbool CPaintManagerUI::PreMessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& /*lRes*/)\n\t{\n\t\tfor( int i = 0; i < m_aPreMessageFilters.GetSize(); i++ ) \n\t\t{\n\t\t\tbool bHandled = false;\n\t\t\tLRESULT lResult = static_cast<IMessageFilterUI*>(m_aPreMessageFilters[i])->MessageHandler(uMsg, wParam, lParam, bHandled);\n\t\t\tif( bHandled ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tswitch( uMsg ) {\n\t\t\t//case WM_KEYDOWN:\n\t\t\t//    {\n\t\t\t//       // Tabbing between controls\n\t\t\t//       if( wParam == VK_TAB ) {\n\t\t\t//           if( m_pFocus && m_pFocus->IsVisible() && m_pFocus->IsEnabled() && _tcsstr(m_pFocus->GetClass(), _T(\"RichEditUI\")) != NULL ) {\n\t\t\t//               if( static_cast<CRichEditUI*>(m_pFocus)->IsWantTab() ) return false;\n\t\t\t//           }\n\t\t\t//           SetNextTabControl(::GetKeyState(VK_SHIFT) >= 0);\n\t\t\t//           return true;\n\t\t\t//       }\n\t\t\t//    }\n\t\t\t//    break;\n\t\tcase WM_KEYDOWN:\n\t\t\t{\n\t\t\t\t// Tabbing between controls\n\t\t\t\tif( wParam == VK_TAB ) {\n\t\t\t\t\tif( m_pFocus && m_pFocus->IsVisible() && m_pFocus->IsEnabled() ){\n\t\t\t\t\t\tif(m_pFocus->IsWantTab()){\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSetNextTabControl(::GetKeyState(VK_SHIFT) >= 0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_SYSCHAR:\n\t\t\t{\n\t\t\t\t// Handle ALT-shortcut key-combinations\n\t\t\t\tFINDSHORTCUT fs = { 0 };\n\t\t\t\tfs.ch = toupper((int)wParam);\n\t\t\t\tCControlUI* pControl = m_pRoot->FindControl(__FindControlFromShortcut, &fs, UIFIND_ENABLED | UIFIND_ME_FIRST | UIFIND_TOP_FIRST);\n\t\t\t\tif( pControl != NULL ) {\n\t\t\t\t\tpControl->SetFocus();\n\t\t\t\t\tpControl->Activate();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_SYSKEYDOWN:\n\t\t\t{\n\t\t\t\tif( m_pFocus != NULL ) {\n\t\t\t\t\tTEventUI event = { 0 };\n\t\t\t\t\tevent.Type = UIEVENT_SYSKEY;\n\t\t\t\t\tevent.chKey = (TCHAR)wParam;\n\t\t\t\t\tevent.ptMouse = m_ptLastMousePos;\n\t\t\t\t\tevent.wKeyState = MapKeyState();\n\t\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\t\t\tm_pFocus->Event(event);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CPaintManagerUI::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lRes)\n\t{\n\t\t//#ifdef _DEBUG\n\t\t//    switch( uMsg ) {\n\t\t//    case WM_NCPAINT:\n\t\t//    case WM_NCHITTEST:\n\t\t//    case WM_SETCURSOR:\n\t\t//       break;\n\t\t//    default:\n\t\t//       DUITRACE(_T(\"MSG: %-20s (%08ld)\"), DUITRACEMSG(uMsg), ::GetTickCount());\n\t\t//    }\n\t\t//#endif\n\t\t// Not ready yet?\n\t\tif( m_hWndPaint == NULL ) return false;\n\n\t\tTNotifyUI* pMsg = NULL;\n\t\twhile( pMsg = static_cast<TNotifyUI*>(m_aAsyncNotify.GetAt(0)) ) {\n\t\t\tm_aAsyncNotify.Remove(0);\n\t\t\tif( pMsg->pSender != NULL ) {\n\t\t\t\tif( pMsg->pSender->OnNotify ) pMsg->pSender->OnNotify((void*)pMsg);\n\t\t\t}\n\t\t\tfor( int j = 0; j < m_aNotifiers.GetSize(); j++ ) {\n\t\t\t\tstatic_cast<INotifyUI*>(m_aNotifiers[j])->Notify(*pMsg);\n\t\t\t}\n\t\t\tdelete pMsg;\n\t\t}\n\n\t\t// Cycle through listeners\n\t\tfor( int i = 0; i < m_aMessageFilters.GetSize(); i++ ) \n\t\t{\n\t\t\tbool bHandled = false;\n\t\t\tLRESULT lResult = static_cast<IMessageFilterUI*>(m_aMessageFilters[i])->MessageHandler(uMsg, wParam, lParam, bHandled);\n\t\t\tif( bHandled ) {\n\t\t\t\tlRes = lResult;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t// Custom handling of events\n\t\tswitch( uMsg ) {\n\t\tcase WM_APP + 1:\n\t\t\t{\n\t\t\t\tfor( int i = 0; i < m_aDelayedCleanup.GetSize(); i++ ) \n\t\t\t\t\tdelete static_cast<CControlUI*>(m_aDelayedCleanup[i]);\n\t\t\t\tm_aDelayedCleanup.Empty();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_CLOSE:\n\t\t\t{\n\t\t\t\t// Make sure all matching \"closing\" events are sent\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.ptMouse = m_ptLastMousePos;\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\t\tif( m_pEventHover != NULL ) {\n\t\t\t\t\tevent.Type = UIEVENT_MOUSELEAVE;\n\t\t\t\t\tevent.pSender = m_pEventHover;\n\t\t\t\t\tm_pEventHover->Event(event);\n\t\t\t\t}\n\t\t\t\tif( m_pEventClick != NULL ) {\n\t\t\t\t\tevent.Type = UIEVENT_BUTTONUP;\n\t\t\t\t\tevent.pSender = m_pEventClick;\n\t\t\t\t\tm_pEventClick->Event(event);\n\t\t\t\t}\n\n\t\t\t\tSetFocus(NULL);\n\n\t\t\t\t// Hmmph, the usual Windows tricks to avoid\n\t\t\t\t// focus loss...\n\t\t\t\tHWND hwndParent = GetWindowOwner(m_hWndPaint);\n\t\t\t\tif( hwndParent != NULL ) ::SetFocus(hwndParent);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_ERASEBKGND:\n\t\t\t{\n\t\t\t\t// We'll do the painting here...\n\t\t\t\tlRes = 1;\n\t\t\t}\n\t\t\treturn true;\n\t\tcase WM_PAINT:\n\t\t\t{\n\t\t\t\t// Should we paint?\n\t\t\t\tRECT rcPaint = { 0 };\n\t\t\t\tif( !::GetUpdateRect(m_hWndPaint, &rcPaint, FALSE) ) return true;\n\t\t\t\tif( m_pRoot == NULL ) {\n\t\t\t\t\tPAINTSTRUCT ps = { 0 };\n\t\t\t\t\t::BeginPaint(m_hWndPaint, &ps);\n\t\t\t\t\t::EndPaint(m_hWndPaint, &ps);\n\t\t\t\t\treturn true;\n\t\t\t\t}            \n\t\t\t\t// Do we need to resize anything?\n\t\t\t\t// This is the time where we layout the controls on the form.\n\t\t\t\t// We delay this even from the WM_SIZE messages since resizing can be\n\t\t\t\t// a very expensize operation.\n\t\t\t\tif( m_bUpdateNeeded ) {\n\t\t\t\t\tm_bUpdateNeeded = false;\n\t\t\t\t\tRECT rcClient = { 0 };\n\t\t\t\t\t::GetClientRect(m_hWndPaint, &rcClient);\n\t\t\t\t\tif( !::IsRectEmpty(&rcClient) ) {\n\t\t\t\t\t\tif( m_pRoot->IsUpdateNeeded() ) {\n\t\t\t\t\t\t\tif (!::IsIconic(m_hWndPaint)) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tm_pRoot->SetPos(rcClient);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif( m_hDcOffscreen   != NULL )  ::DeleteDC(m_hDcOffscreen);\n\t\t\t\t\t\t\tif( m_hDcBackground  != NULL )  ::DeleteDC(m_hDcBackground);\n\t\t\t\t\t\t\tif( m_hbmpOffscreen  != NULL )  ::DeleteObject(m_hbmpOffscreen);\n\t\t\t\t\t\t\tif( m_hbmpBackground != NULL )  ::DeleteObject(m_hbmpBackground);\n\t\t\t\t\t\t\tm_hDcOffscreen = NULL;\n\t\t\t\t\t\t\tm_hDcBackground = NULL;\n\t\t\t\t\t\t\tm_hbmpOffscreen = NULL;\n\t\t\t\t\t\t\tm_hbmpBackground = NULL;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tCControlUI* pControl = NULL;\n\t\t\t\t\t\t\twhile( pControl = m_pRoot->FindControl(__FindControlFromUpdate, NULL, UIFIND_VISIBLE | UIFIND_ME_FIRST) ) {\n\t\t\t\t\t\t\t\tpControl->SetPos( pControl->GetPos() );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// We'll want to notify the window when it is first initialized\n\t\t\t\t\t\t// with the correct layout. The window form would take the time\n\t\t\t\t\t\t// to submit swipes/animations.\n\t\t\t\t\t\tif( m_bFirstLayout ) {\n\t\t\t\t\t\t\tm_bFirstLayout = false;\n\t\t\t\t\t\t\tSendNotify(m_pRoot, DUI_MSGTYPE_WINDOWINIT,  0, 0, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Set focus to first control?\n\t\t\t\tif( m_bFocusNeeded ) {\n\t\t\t\t\tSetNextTabControl();\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t\t// Render screen\n\t\t\t\t//\n\t\t\t\t// Prepare offscreen bitmap?\n\t\t\t\tif( m_bOffscreenPaint && m_hbmpOffscreen == NULL )\n\t\t\t\t{\n\t\t\t\t\tRECT rcClient = { 0 };\n\t\t\t\t\t::GetClientRect(m_hWndPaint, &rcClient);\n\t\t\t\t\tm_hDcOffscreen = ::CreateCompatibleDC(m_hDcPaint);\n\t\t\t\t\tm_hbmpOffscreen = ::CreateCompatibleBitmap(m_hDcPaint, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top); \n\t\t\t\t\tASSERT(m_hDcOffscreen);\n\t\t\t\t\tASSERT(m_hbmpOffscreen);\n\t\t\t\t}\n\t\t\t\t// Begin Windows paint\n\t\t\t\tPAINTSTRUCT ps = { 0 };\n\t\t\t\t::BeginPaint(m_hWndPaint, &ps);\n\t\t\t\tif( m_bOffscreenPaint )\n\t\t\t\t{\n\t\t\t\t\tHBITMAP hOldBitmap = (HBITMAP) ::SelectObject(m_hDcOffscreen, m_hbmpOffscreen);\n\t\t\t\t\tint iSaveDC = ::SaveDC(m_hDcOffscreen);\n\t\t\t\t\tif( m_bAlphaBackground ) {\n\t\t\t\t\t\tif( m_hbmpBackground == NULL ) {\n\t\t\t\t\t\t\tRECT rcClient = { 0 };\n\t\t\t\t\t\t\t::GetClientRect(m_hWndPaint, &rcClient);\n\t\t\t\t\t\t\tm_hDcBackground = ::CreateCompatibleDC(m_hDcPaint);;\n\t\t\t\t\t\t\tm_hbmpBackground = ::CreateCompatibleBitmap(m_hDcPaint, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top); \n\t\t\t\t\t\t\tASSERT(m_hDcBackground);\n\t\t\t\t\t\t\tASSERT(m_hbmpBackground);\n\t\t\t\t\t\t\t::SelectObject(m_hDcBackground, m_hbmpBackground);\n\t\t\t\t\t\t\t::BitBlt(m_hDcBackground, ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right - ps.rcPaint.left,\n\t\t\t\t\t\t\t\tps.rcPaint.bottom - ps.rcPaint.top, ps.hdc, ps.rcPaint.left, ps.rcPaint.top, SRCCOPY);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t::SelectObject(m_hDcBackground, m_hbmpBackground);\n\t\t\t\t\t\t::BitBlt(m_hDcOffscreen, ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right - ps.rcPaint.left,\n\t\t\t\t\t\t\tps.rcPaint.bottom - ps.rcPaint.top, m_hDcBackground, ps.rcPaint.left, ps.rcPaint.top, SRCCOPY);\n\t\t\t\t\t}\n\t\t\t\t\tm_pRoot->DoPaint(m_hDcOffscreen, ps.rcPaint);\n\t\t\t\t\tfor( int i = 0; i < m_aPostPaintControls.GetSize(); i++ ) {\n\t\t\t\t\t\tCControlUI* pPostPaintControl = static_cast<CControlUI*>(m_aPostPaintControls[i]);\n\t\t\t\t\t\tpPostPaintControl->DoPostPaint(m_hDcOffscreen, ps.rcPaint);\n\t\t\t\t\t}\n\t\t\t\t\t::RestoreDC(m_hDcOffscreen, iSaveDC);\n\t\t\t\t\t::BitBlt(ps.hdc, ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right - ps.rcPaint.left,\n\t\t\t\t\t\tps.rcPaint.bottom - ps.rcPaint.top, m_hDcOffscreen, ps.rcPaint.left, ps.rcPaint.top, SRCCOPY);\n\t\t\t\t\t::SelectObject(m_hDcOffscreen, hOldBitmap);\n\n\t\t\t\t\tif( m_bShowUpdateRect ) {\n\t\t\t\t\t\tHPEN hOldPen = (HPEN)::SelectObject(ps.hdc, m_hUpdateRectPen);\n\t\t\t\t\t\t::SelectObject(ps.hdc, ::GetStockObject(HOLLOW_BRUSH));\n\t\t\t\t\t\t::Rectangle(ps.hdc, rcPaint.left, rcPaint.top, rcPaint.right, rcPaint.bottom);\n\t\t\t\t\t\t::SelectObject(ps.hdc, hOldPen);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// A standard paint job\n\t\t\t\t\tint iSaveDC = ::SaveDC(ps.hdc);\n\t\t\t\t\tm_pRoot->DoPaint(ps.hdc, ps.rcPaint);\n\t\t\t\t\t::RestoreDC(ps.hdc, iSaveDC);\n\t\t\t\t}\n\t\t\t\t// All Done!\n\t\t\t\t::EndPaint(m_hWndPaint, &ps);\n\t\t\t}\n\t\t\t// If any of the painting requested a resize again, we'll need\n\t\t\t// to invalidate the entire window once more.\n\t\t\tif( m_bUpdateNeeded ) {\n\t\t\t\t::InvalidateRect(m_hWndPaint, NULL, FALSE);\n\t\t\t}\n\t\t\treturn true;\n\t\tcase WM_PRINTCLIENT:\n\t\t\t{\n\t\t\t\tRECT rcClient;\n\t\t\t\t::GetClientRect(m_hWndPaint, &rcClient);\n\t\t\t\tHDC hDC = (HDC) wParam;\n\t\t\t\tint save = ::SaveDC(hDC);\n\t\t\t\tm_pRoot->DoPaint(hDC, rcClient);\n\t\t\t\t// Check for traversing children. The crux is that WM_PRINT will assume\n\t\t\t\t// that the DC is positioned at frame coordinates and will paint the child\n\t\t\t\t// control at the wrong position. We'll simulate the entire thing instead.\n\t\t\t\tif( (lParam & PRF_CHILDREN) != 0 ) {\n\t\t\t\t\tHWND hWndChild = ::GetWindow(m_hWndPaint, GW_CHILD);\n\t\t\t\t\twhile( hWndChild != NULL ) {\n\t\t\t\t\t\tRECT rcPos = { 0 };\n\t\t\t\t\t\t::GetWindowRect(hWndChild, &rcPos);\n\t\t\t\t\t\t::MapWindowPoints(HWND_DESKTOP, m_hWndPaint, reinterpret_cast<LPPOINT>(&rcPos), 2);\n\t\t\t\t\t\t::SetWindowOrgEx(hDC, -rcPos.left, -rcPos.top, NULL);\n\t\t\t\t\t\t// NOTE: We use WM_PRINT here rather than the expected WM_PRINTCLIENT\n\t\t\t\t\t\t//       since the latter will not print the nonclient correctly for\n\t\t\t\t\t\t//       EDIT controls.\n\t\t\t\t\t\t::SendMessage(hWndChild, WM_PRINT, wParam, lParam | PRF_NONCLIENT);\n\t\t\t\t\t\thWndChild = ::GetWindow(hWndChild, GW_HWNDNEXT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t::RestoreDC(hDC, save);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_GETMINMAXINFO:\n\t\t\t{\n\t\t\t\tLPMINMAXINFO lpMMI = (LPMINMAXINFO) lParam;\n\t\t\t\tif( m_szMinWindow.cx > 0 ) lpMMI->ptMinTrackSize.x = m_szMinWindow.cx;\n\t\t\t\tif( m_szMinWindow.cy > 0 ) lpMMI->ptMinTrackSize.y = m_szMinWindow.cy;\n\t\t\t\tif( m_szMaxWindow.cx > 0 ) lpMMI->ptMaxTrackSize.x = m_szMaxWindow.cx;\n\t\t\t\tif( m_szMaxWindow.cy > 0 ) lpMMI->ptMaxTrackSize.y = m_szMaxWindow.cy;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_SIZE:\n\t\t\t{\n\t\t\t\tif( m_pFocus != NULL ) {\n\t\t\t\t\tTEventUI event = { 0 };\n\t\t\t\t\tevent.Type = UIEVENT_WINDOWSIZE;\n\t\t\t\t\tevent.pSender = m_pFocus;\n\t\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n                    event.wParam = wParam;\n                    event.lParam = lParam;\n\t\t\t\t\tm_pFocus->Event(event);\n\t\t\t\t}\n\t\t\t\tif( m_pRoot != NULL ) m_pRoot->NeedUpdate();\n\t\t\t}\n\t\t\treturn true;\n\t\tcase WM_TIMER:\n\t\t\t{\n\t\t\t\tfor( int i = 0; i < m_aTimers.GetSize(); i++ ) {\n\t\t\t\t\tconst TIMERINFO* pTimer = static_cast<TIMERINFO*>(m_aTimers[i]);\n\t\t\t\t\tif( pTimer->hWnd == m_hWndPaint && pTimer->uWinTimer == LOWORD(wParam) && pTimer->bKilled == false) {\n\t\t\t\t\t\tTEventUI event = { 0 };\n\t\t\t\t\t\tevent.Type = UIEVENT_TIMER;\n\t\t\t\t\t\tevent.pSender = pTimer->pSender;\n\t\t\t\t\t\tevent.wParam = pTimer->nLocalID;\n\t\t\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\t\t\t\tpTimer->pSender->Event(event);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_MOUSEHOVER:\n\t\t\t{\n\t\t\t\tm_bMouseTracking = false;\n\t\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\tCControlUI* pHover = FindControl(pt);\n\t\t\t\tif( pHover == NULL ) break;\n\t\t\t\t// Generate mouse hover event\n\t\t\t\tif( m_pEventHover != NULL ) {\n\t\t\t\t\tTEventUI event = { 0 };\n\t\t\t\t\tevent.ptMouse = pt;\n\t\t\t\t\tevent.Type = UIEVENT_MOUSEHOVER;\n\t\t\t\t\tevent.pSender = m_pEventHover;\n\t\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n                    event.wParam = wParam;\n                    event.lParam = lParam;\n\t\t\t\t\tm_pEventHover->Event(event);\n\t\t\t\t}\n\t\t\t\t// Create tooltip information\n\t\t\t\tCDuiString sToolTip = pHover->GetToolTip();\n\t\t\t\tif( sToolTip.IsEmpty() ) return true;\n\t\t\t\t::ZeroMemory(&m_ToolTip, sizeof(TOOLINFO));\n\t\t\t\tm_ToolTip.cbSize = sizeof(TOOLINFO);\n\t\t\t\tm_ToolTip.uFlags = TTF_IDISHWND;\n\t\t\t\tm_ToolTip.hwnd = m_hWndPaint;\n\t\t\t\tm_ToolTip.uId = (UINT_PTR) m_hWndPaint;\n\t\t\t\tm_ToolTip.hinst = m_hInstance;\n\t\t\t\tm_ToolTip.lpszText = const_cast<LPTSTR>( (LPCTSTR) sToolTip );\n\t\t\t\tm_ToolTip.rect = pHover->GetPos();\n\t\t\t\tif( m_hwndTooltip == NULL ) {\n\t\t\t\t\tm_hwndTooltip = ::CreateWindowEx(0, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, m_hWndPaint, NULL, m_hInstance, NULL);\n\t\t\t\t\t::SendMessage(m_hwndTooltip, TTM_ADDTOOL, 0, (LPARAM) &m_ToolTip);\n\t\t\t\t}\n\t\t\t\t::SendMessage( m_hwndTooltip,TTM_SETMAXTIPWIDTH,0, pHover->GetToolTipWidth());\n\t\t\t\t::SendMessage(m_hwndTooltip, TTM_SETTOOLINFO, 0, (LPARAM) &m_ToolTip);\n\t\t\t\t::SendMessage(m_hwndTooltip, TTM_TRACKACTIVATE, TRUE, (LPARAM) &m_ToolTip);\n\t\t\t}\n\t\t\treturn true;\n\t\tcase WM_MOUSELEAVE:\n\t\t\t{\n\t\t\t\tif( m_hwndTooltip != NULL ) ::SendMessage(m_hwndTooltip, TTM_TRACKACTIVATE, FALSE, (LPARAM) &m_ToolTip);\n\t\t\t\tif( m_bMouseTracking ) ::SendMessage(m_hWndPaint, WM_MOUSEMOVE, 0, (LPARAM) -1);\n\t\t\t\tm_bMouseTracking = false;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_MOUSEMOVE:\n\t\t\t{\n\t\t\t\t// Start tracking this entire window again...\n\t\t\t\tif( !m_bMouseTracking ) \n                {\n\t\t\t\t\tTRACKMOUSEEVENT tme = { 0 };\n\t\t\t\t\ttme.cbSize = sizeof(TRACKMOUSEEVENT);\n\t\t\t\t\ttme.dwFlags = TME_HOVER | TME_LEAVE;\n\t\t\t\t\ttme.hwndTrack = m_hWndPaint;\n\t\t\t\t\ttme.dwHoverTime = m_hwndTooltip == NULL ? 400UL : (DWORD) ::SendMessage(m_hwndTooltip, TTM_GETDELAYTIME, TTDT_INITIAL, 0L);\n\t\t\t\t\t_TrackMouseEvent(&tme);\n\t\t\t\t\tm_bMouseTracking = true;\n\t\t\t\t}\n\t\t\t\t// Generate the appropriate mouse messages\n\t\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\tm_ptLastMousePos = pt;\n\t\t\t\tCControlUI* pNewHover = FindControl(pt);\n\t\t\t\tif( pNewHover != NULL && pNewHover->GetManager() != this ) break;\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.ptMouse = pt;\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n                event.wParam = wParam;\n                event.lParam = lParam;\n\t\t\t\tif( pNewHover != m_pEventHover && m_pEventHover != NULL ) \n                {\n\t\t\t\t\tevent.Type = UIEVENT_MOUSELEAVE;\n\t\t\t\t\tevent.pSender = m_pEventHover;\n\t\t\t\t\tm_pEventHover->Event(event);\n\t\t\t\t\tm_pEventHover = NULL;\n\t\t\t\t\tif( m_hwndTooltip != NULL ) ::SendMessage(m_hwndTooltip, TTM_TRACKACTIVATE, FALSE, (LPARAM) &m_ToolTip);\n\t\t\t\t}\n\t\t\t\tif( pNewHover != m_pEventHover && pNewHover != NULL ) \n                {\n\t\t\t\t\tevent.Type = UIEVENT_MOUSEENTER;\n\t\t\t\t\tevent.pSender = pNewHover;\n\t\t\t\t\tpNewHover->Event(event);\n\t\t\t\t\tm_pEventHover = pNewHover;\n\t\t\t\t}\n\t\t\t\tif( m_pEventClick != NULL ) \n                {\n\t\t\t\t\tevent.Type = UIEVENT_MOUSEMOVE;\n\t\t\t\t\tevent.pSender = m_pEventClick;\n\t\t\t\t\tm_pEventClick->Event(event);\n\t\t\t\t}\n\t\t\t\telse if( pNewHover != NULL ) \n                {\n\t\t\t\t\tevent.Type = UIEVENT_MOUSEMOVE;\n\t\t\t\t\tevent.pSender = pNewHover;\n\t\t\t\t\tpNewHover->Event(event);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_LBUTTONDOWN:\n\t\t\t{\n\t\t\t\t// We alway set focus back to our app (this helps\n\t\t\t\t// when Win32 child windows are placed on the dialog\n\t\t\t\t// and we need to remove them on focus change).\n\t\t\t\t::SetFocus(m_hWndPaint);\n\t\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\tm_ptLastMousePos = pt;\n\t\t\t\tCControlUI* pControl = FindControl(pt);\n\t\t\t\tif( pControl == NULL ) break;\n\t\t\t\tif( pControl->GetManager() != this ) break;\n\t\t\t\tm_pEventClick = pControl;\n\t\t\t\tpControl->SetFocus();\n\t\t\t\tSetCapture();\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.Type = UIEVENT_BUTTONDOWN;\n\t\t\t\tevent.pSender = pControl;\n\t\t\t\tevent.wParam = wParam;\n\t\t\t\tevent.lParam = lParam;\n\t\t\t\tevent.ptMouse = pt;\n\t\t\t\tevent.wKeyState = (WORD)wParam;\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\t\tpControl->Event(event);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_LBUTTONDBLCLK:\n\t\t\t{\n\t\t\t\t::SetFocus(m_hWndPaint);\n\t\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\tm_ptLastMousePos = pt;\n\t\t\t\tCControlUI* pControl = FindControl(pt);\n\t\t\t\tif( pControl == NULL ) break;\n\t\t\t\tif( pControl->GetManager() != this ) break;\n\t\t\t\tSetCapture();\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.Type = UIEVENT_DBLCLICK;\n\t\t\t\tevent.pSender = pControl;\n\t\t\t\tevent.ptMouse = pt;\n\t\t\t\tevent.wKeyState = (WORD)wParam;\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n                event.wParam = wParam;\n                event.lParam = lParam;\n\t\t\t\tpControl->Event(event);\n\t\t\t\tm_pEventClick = pControl;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_LBUTTONUP:\n\t\t\t{\n\t\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\tm_ptLastMousePos = pt;\n\t\t\t\tif( m_pEventClick == NULL ) break;\n\t\t\t\tReleaseCapture();\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.Type = UIEVENT_BUTTONUP;\n\t\t\t\tevent.pSender = m_pEventClick;\n\t\t\t\tevent.wParam = wParam;\n\t\t\t\tevent.lParam = lParam;\n\t\t\t\tevent.ptMouse = pt;\n\t\t\t\tevent.wKeyState = (WORD)wParam;\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\t\tm_pEventClick->Event(event);\n\t\t\t\tm_pEventClick = NULL;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_RBUTTONDOWN:\n\t\t\t{\n\t\t\t\t::SetFocus(m_hWndPaint);\n\t\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\tm_ptLastMousePos = pt;\n\t\t\t\tCControlUI* pControl = FindControl(pt);\n\t\t\t\tif( pControl == NULL ) break;\n\t\t\t\tif( pControl->GetManager() != this ) break;\n\t\t\t\tpControl->SetFocus();\n\t\t\t\tSetCapture();\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.Type = UIEVENT_RBUTTONDOWN;\n\t\t\t\tevent.pSender = pControl;\n\t\t\t\tevent.wParam = wParam;\n\t\t\t\tevent.lParam = lParam;\n\t\t\t\tevent.ptMouse = pt;\n\t\t\t\tevent.wKeyState = (WORD)wParam;\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\t\tpControl->Event(event);\n\t\t\t\tm_pEventClick = pControl;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_RBUTTONUP:\n\t\t\t{\n\t\t\t\tReleaseCapture();\n\n\t\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\tm_ptLastMousePos = pt;\n\t\t\t\tm_pEventClick = FindControl(pt);\n\t\t\t\tif(m_pEventClick == NULL) break;\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.Type = UIEVENT_RBUTTONUP;\n\t\t\t\tevent.pSender = m_pEventClick;\n\t\t\t\tevent.wParam = wParam;\n\t\t\t\tevent.lParam = lParam;\n\t\t\t\tevent.ptMouse = pt;\n\t\t\t\tevent.wKeyState = (WORD)wParam;\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\t\tm_pEventClick->Event(event);\n\t\t\t\tm_pEventClick = NULL;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_CONTEXTMENU:\n\t\t\t{\n\t\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\t::ScreenToClient(m_hWndPaint, &pt);\n\t\t\t\t// Ů ע: ΪʲôҪʹWM_RBUTTONDOWNʱĿؼ??????\n\t\t\t\t// ûҼ, ϶, ô Ǿ ** ͬһؼ!!!\n\t\t\t\t//m_ptLastMousePos = pt;\n\t\t\t\t//if( m_pEventClick == NULL ) break;\n\t\t\t\tm_pEventClick = FindControl(pt);\n\t\t\t\tif(m_pEventClick == NULL) break;\n\t\t\t\t// Ů ע: ΪʲôҪReleaseCapture() ???\n\t\t\t\t// ѵ WM_RBUTTONUP  Release???\n\t\t\t\t// ReleaseCapture();\n\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.Type = UIEVENT_CONTEXTMENU;\n\t\t\t\tevent.pSender = m_pEventClick;\n\t\t\t\tevent.ptMouse = pt;\n\t\t\t\tevent.wKeyState = (WORD)wParam;\n                event.wParam=wParam;\n\t\t\t\tevent.lParam = (LPARAM)m_pEventClick;\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n\n\t\t\t\tm_pEventClick->Event(event);\n\t\t\t\tm_pEventClick = NULL;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_MOUSEWHEEL:\n\t\t\t{\n\t\t\t\tPOINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\n\t\t\t\t::ScreenToClient(m_hWndPaint, &pt);\n\t\t\t\tm_ptLastMousePos = pt;\n\t\t\t\tCControlUI* pControl = FindControl(pt);\n\t\t\t\tif( pControl == NULL ) break;\n\t\t\t\tif( pControl->GetManager() != this ) break;\n\t\t\t\tint zDelta = (int) (short) HIWORD(wParam);\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.Type = UIEVENT_SCROLLWHEEL;\n\t\t\t\tevent.pSender = pControl;\n\n                CDuiString str = pControl->GetClass();\n                //˴Ƿף֤ʷ\n                if (_tcsicmp(pControl->GetClass(),_T(\"WKEWebkitUI\"))==0)\n                    event.wParam = wParam;\n                else\n\t\t\t\t    event.wParam = MAKELPARAM(zDelta < 0 ? SB_LINEDOWN : SB_LINEUP, 0);\n\t\t\t\t\n                //////////////////////////////////////////////////////////////////////////\n\t\t\t\tevent.lParam = lParam;\n                event.wKeyState = MapKeyState();\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\t\tpControl->Event(event);\n\n\t\t\t\t// Let's make sure that the scroll item below the cursor is the same as before...\n\t\t\t\t::SendMessage(m_hWndPaint, WM_MOUSEMOVE, 0, (LPARAM) MAKELPARAM(m_ptLastMousePos.x, m_ptLastMousePos.y));\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_CHAR:\n\t\t\t{\n\t\t\t\tif( m_pFocus == NULL ) break;\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.Type = UIEVENT_CHAR;\n\t\t\t\tevent.chKey = (TCHAR)wParam;\n\t\t\t\tevent.ptMouse = m_ptLastMousePos;\n\t\t\t\tevent.wKeyState = MapKeyState();\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n                event.wParam=wParam;\n\t\t\t\tm_pFocus->Event(event);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_KEYDOWN:\n\t\t\t{\n\t\t\t\tif( m_pFocus == NULL ) break;\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.Type = UIEVENT_KEYDOWN;\n\t\t\t\tevent.chKey = (TCHAR)wParam;\n\t\t\t\tevent.ptMouse = m_ptLastMousePos;\n\t\t\t\tevent.wKeyState = MapKeyState();\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n                event.wParam=wParam;\n\t\t\t\tm_pFocus->Event(event);\n\t\t\t\tm_pEventKey = m_pFocus;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_KEYUP:\n\t\t\t{\n\t\t\t\tif( m_pEventKey == NULL ) break;\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.Type = UIEVENT_KEYUP;\n\t\t\t\tevent.chKey = (TCHAR)wParam;\n\t\t\t\tevent.ptMouse = m_ptLastMousePos;\n\t\t\t\tevent.wKeyState = MapKeyState();\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n                event.wParam=wParam;\n\t\t\t\tm_pEventKey->Event(event);\n\t\t\t\tm_pEventKey = NULL;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_SETCURSOR:\n\t\t\t{\n\t\t\t\tif( LOWORD(lParam) != HTCLIENT ) break;\n\t\t\t\tif( m_bMouseCapture ) return true;\n\n\t\t\t\tPOINT pt = { 0 };\n\t\t\t\t::GetCursorPos(&pt);\n\t\t\t\t::ScreenToClient(m_hWndPaint, &pt);\n\t\t\t\tCControlUI* pControl = FindControl(pt);\n\t\t\t\tif( pControl == NULL ) break;\n\t\t\t\tif( (pControl->GetControlFlags() & UIFLAG_SETCURSOR) == 0 ) break;\n\t\t\t\tTEventUI event = { 0 };\n\t\t\t\tevent.Type = UIEVENT_SETCURSOR;\n\t\t\t\tevent.wParam = wParam;\n\t\t\t\tevent.lParam = lParam;\n\t\t\t\tevent.ptMouse = pt;\n\t\t\t\tevent.wKeyState = MapKeyState();\n\t\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\t\tpControl->Event(event);\n\t\t\t}\n\t\t\treturn true;\n\t\tcase WM_NOTIFY:\n\t\t\t{\n\t\t\t\tLPNMHDR lpNMHDR = (LPNMHDR) lParam;\n\t\t\t\tif( lpNMHDR != NULL ) lRes = ::SendMessage(lpNMHDR->hwndFrom, OCM__BASE + uMsg, wParam, lParam);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_COMMAND:\n\t\t\t{\n\t\t\t\tif( lParam == 0 ) break;\n\t\t\t\tHWND hWndChild = (HWND) lParam;\n\t\t\t\tlRes = ::SendMessage(hWndChild, OCM__BASE + uMsg, wParam, lParam);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WM_CTLCOLOREDIT:\n\t\tcase WM_CTLCOLORSTATIC:\n\t\t\t{\n\t\t\t\t// Refer To: http://msdn.microsoft.com/en-us/library/bb761691(v=vs.85).aspx\n\t\t\t\t// Read-only or disabled edit controls do not send the WM_CTLCOLOREDIT message; instead, they send the WM_CTLCOLORSTATIC message.\n\t\t\t\tif( lParam == 0 ) break;\n\t\t\t\tHWND hWndChild = (HWND) lParam;\n\t\t\t\tlRes = ::SendMessage(hWndChild, OCM__BASE + uMsg, wParam, lParam);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tbreak;\n        case WM_IME_STARTCOMPOSITION:      //뷨\n            {\n                if( m_pFocus == NULL ) break;\n                TEventUI event = { 0 };\n                event.Type = UIEVENT_IME_STARTCOMPOSITION;\n                event.wParam = wParam;\n                event.lParam = lParam;\n                m_pFocus->Event(event);\n            }\n            break;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\tpMsg = NULL;\n\t\twhile( pMsg = static_cast<TNotifyUI*>(m_aAsyncNotify.GetAt(0)) ) {\n\t\t\tm_aAsyncNotify.Remove(0);\n\t\t\tif( pMsg->pSender != NULL ) {\n\t\t\t\tif( pMsg->pSender->OnNotify ) pMsg->pSender->OnNotify((void*)pMsg);//ǿvoid*ΪӦ()\n\t\t\t}\n\t\t\tfor( int j = 0; j < m_aNotifiers.GetSize(); j++ ) {\n\t\t\t\tstatic_cast<INotifyUI*>(m_aNotifiers[j])->Notify(*pMsg);\n\t\t\t}\n\t\t\tdelete pMsg;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tvoid CPaintManagerUI::NeedUpdate()\n\t{\n\t\tm_bUpdateNeeded = true;\n\t}\n\n\tvoid CPaintManagerUI::Invalidate(RECT& rcItem)\n\t{\n\t\t::InvalidateRect(m_hWndPaint, &rcItem, FALSE);\n\t}\n\n\tbool CPaintManagerUI::AttachDialog(CControlUI* pControl)\n\t{\n\t\tASSERT(::IsWindow(m_hWndPaint));\n\t\t// Reset any previous attachment\n\t\tSetFocus(NULL);\n\t\tm_pEventKey = NULL;\n\t\tm_pEventHover = NULL;\n\t\tm_pEventClick = NULL;\n\t\t// Remove the existing control-tree. We might have gotten inside this function as\n\t\t// a result of an event fired or similar, so we cannot just delete the objects and\n\t\t// pull the internal memory of the calling code. We'll delay the cleanup.\n\t\tif( m_pRoot != NULL ) {\n\t\t\tm_aPostPaintControls.Empty();\n\t\t\tAddDelayedCleanup(m_pRoot);\n\t\t}\n\t\t// Set the dialog root element\n\t\tm_pRoot = pControl;\n\t\t// Go ahead...\n\t\tm_bUpdateNeeded = true;\n\t\tm_bFirstLayout = true;\n\t\tm_bFocusNeeded = true;\n\t\t// Initiate all control\n\n\t\tif (pControl)\n\t\t{\n\t\t\tInitControls(pControl);\n\t\t\tpControl->Init();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tbool CPaintManagerUI::InitControls(CControlUI* pControl, CControlUI* pParent /*= NULL*/)\n\t{\n\t\tASSERT(pControl);\n\t\tif( pControl == NULL ) return false;\n\t\tpControl->SetManager(this, pParent != NULL ? pParent : pControl->GetParent(), true);\n\t\tpControl->FindControl(__FindControlFromNameHash, this, UIFIND_ALL);\n\t\treturn true;\n\t}\n\n\tvoid CPaintManagerUI::ReapObjects(CControlUI* pControl)\n\t{\n\t\tif( pControl == m_pEventKey ) m_pEventKey = NULL;\n\t\tif( pControl == m_pEventHover ) m_pEventHover = NULL;\n\t\tif( pControl == m_pEventClick ) m_pEventClick = NULL;\n\t\tif( pControl == m_pFocus ) m_pFocus = NULL;\n\t\tKillTimer(pControl);\n\t\tconst CDuiString& sName = pControl->GetName();\n\t\tif( !sName.IsEmpty() ) {\n\t\t\tif( pControl == FindControl(sName) ) m_mNameHash.Remove(sName);\n\t\t}\n\t\tfor( int i = 0; i < m_aAsyncNotify.GetSize(); i++ ) {\n\t\t\tTNotifyUI* pMsg = static_cast<TNotifyUI*>(m_aAsyncNotify[i]);\n\t\t\tif( pMsg->pSender == pControl ) pMsg->pSender = NULL;\n\t\t}    \n\t}\n\n\tbool CPaintManagerUI::AddOptionGroup(LPCTSTR pStrGroupName, CControlUI* pControl)\n\t{\n\t\tLPVOID lp = m_mOptionGroup.Find(pStrGroupName);\n\t\tif( lp ) {\n\t\t\tCStdPtrArray* aOptionGroup = static_cast<CStdPtrArray*>(lp);\n\t\t\tfor( int i = 0; i < aOptionGroup->GetSize(); i++ ) {\n\t\t\t\tif( static_cast<CControlUI*>(aOptionGroup->GetAt(i)) == pControl ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\taOptionGroup->Add(pControl);\n\t\t}\n\t\telse {\n\t\t\tCStdPtrArray* aOptionGroup = new CStdPtrArray(6);\n\t\t\taOptionGroup->Add(pControl);\n\t\t\tm_mOptionGroup.Insert(pStrGroupName, aOptionGroup);\n\t\t}\n\t\treturn true;\n\t}\n\n\tCStdPtrArray* CPaintManagerUI::GetOptionGroup(LPCTSTR pStrGroupName)\n\t{\n\t\tLPVOID lp = m_mOptionGroup.Find(pStrGroupName);\n\t\tif( lp ) return static_cast<CStdPtrArray*>(lp);\n\t\treturn NULL;\n\t}\n\n\tvoid CPaintManagerUI::RemoveOptionGroup(LPCTSTR pStrGroupName, CControlUI* pControl)\n\t{\n\t\tLPVOID lp = m_mOptionGroup.Find(pStrGroupName);\n\t\tif( lp ) {\n\t\t\tCStdPtrArray* aOptionGroup = static_cast<CStdPtrArray*>(lp);\n\t\t\tif( aOptionGroup == NULL ) return;\n\t\t\tfor( int i = 0; i < aOptionGroup->GetSize(); i++ ) {\n\t\t\t\tif( static_cast<CControlUI*>(aOptionGroup->GetAt(i)) == pControl ) {\n\t\t\t\t\taOptionGroup->Remove(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( aOptionGroup->IsEmpty() ) {\n\t\t\t\tdelete aOptionGroup;\n\t\t\t\tm_mOptionGroup.Remove(pStrGroupName);\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CPaintManagerUI::RemoveAllOptionGroups()\n\t{\n\t\tCStdPtrArray* aOptionGroup;\n\t\tfor( int i = 0; i< m_mOptionGroup.GetSize(); i++ ) {\n\t\t\tif(LPCTSTR key = m_mOptionGroup.GetAt(i)) {\n\t\t\t\taOptionGroup = static_cast<CStdPtrArray*>(m_mOptionGroup.Find(key));\n\t\t\t\tdelete aOptionGroup;\n\t\t\t}\n\t\t}\n\t\tm_mOptionGroup.RemoveAll();\n\t}\n\n\tvoid CPaintManagerUI::MessageLoop()\n\t{\n\t\tMSG msg = { 0 };\n\t\twhile( ::GetMessage(&msg, NULL, 0, 0) ) {\n\t\t\tif( !CPaintManagerUI::TranslateMessage(&msg) ) {\n\t\t\t\t::TranslateMessage(&msg);\n\t\t\t\t::DispatchMessage(&msg);\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CPaintManagerUI::Term()\n\t{\n\t\tif( m_bCachedResourceZip && m_pResHandle->IsOpen() ) {\n\t\t\tm_pResHandle->Close();\n\t\t}\n\t\tdelete m_pResHandle;\n\t\tm_pResHandle = NULL;\n\t}\n\n\tCControlUI* CPaintManagerUI::GetFocus() const\n\t{\n\t\treturn m_pFocus;\n\t}\n\n\tvoid CPaintManagerUI::SetFocus(CControlUI* pControl)\n\t{\n\t\t// Paint manager window has focus?\n\t\tHWND hFocusWnd = ::GetFocus();\n\t\tif( hFocusWnd != m_hWndPaint && pControl != m_pFocus ) ::SetFocus(m_hWndPaint);\n\t\t// Already has focus?\n\t\tif( pControl == m_pFocus ) return;\n\t\t// Remove focus from old control\n\t\tif( m_pFocus != NULL ) \n\t\t{\n\t\t\tTEventUI event = { 0 };\n\t\t\tevent.Type = UIEVENT_KILLFOCUS;\n\t\t\tevent.pSender = pControl;\n\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\tm_pFocus->Event(event);\n\t\t\tSendNotify(m_pFocus, DUI_MSGTYPE_KILLFOCUS);\n\t\t\tm_pFocus = NULL;\n\t\t}\n\t\tif( pControl == NULL ) return;\n\t\t// Set focus to new control\n\t\tif( pControl != NULL \n\t\t\t&& pControl->GetManager() == this \n\t\t\t&& pControl->IsVisible() \n\t\t\t&& pControl->IsEnabled() ) \n\t\t{\n\t\t\tm_pFocus = pControl;\n\t\t\tTEventUI event = { 0 };\n\t\t\tevent.Type = UIEVENT_SETFOCUS;\n\t\t\tevent.pSender = pControl;\n\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\tm_pFocus->Event(event);\n\t\t\tSendNotify(m_pFocus, DUI_MSGTYPE_SETFOCUS);\n\t\t}\n\t}\n\n\tvoid CPaintManagerUI::SetFocusNeeded(CControlUI* pControl)\n\t{\n\t\t::SetFocus(m_hWndPaint);\n\t\tif( pControl == NULL ) return;\n\t\tif( m_pFocus != NULL ) {\n\t\t\tTEventUI event = { 0 };\n\t\t\tevent.Type = UIEVENT_KILLFOCUS;\n\t\t\tevent.pSender = pControl;\n\t\t\tevent.dwTimestamp = ::GetTickCount();\n\t\t\tm_pFocus->Event(event);\n\t\t\tSendNotify(m_pFocus, DUI_MSGTYPE_KILLFOCUS);\n\t\t\tm_pFocus = NULL;\n\t\t}\n\t\tFINDTABINFO info = { 0 };\n\t\tinfo.pFocus = pControl;\n\t\tinfo.bForward = false;\n\t\tm_pFocus = m_pRoot->FindControl(__FindControlFromTab, &info, UIFIND_VISIBLE | UIFIND_ENABLED | UIFIND_ME_FIRST);\n\t\tm_bFocusNeeded = true;\n\t\tif( m_pRoot != NULL ) m_pRoot->NeedUpdate();\n\t}\n\n\tbool CPaintManagerUI::SetTimer(CControlUI* pControl, UINT nTimerID, UINT uElapse)\n\t{\n\t\tASSERT(pControl!=NULL);\n\t\tASSERT(uElapse>0);\n\t\tfor( int i = 0; i< m_aTimers.GetSize(); i++ ) {\n\t\t\tTIMERINFO* pTimer = static_cast<TIMERINFO*>(m_aTimers[i]);\n\t\t\tif( pTimer->pSender == pControl\n\t\t\t\t&& pTimer->hWnd == m_hWndPaint\n\t\t\t\t&& pTimer->nLocalID == nTimerID ) {\n\t\t\t\t\tif( pTimer->bKilled == true ) {\n\t\t\t\t\t\tif( ::SetTimer(m_hWndPaint, pTimer->uWinTimer, uElapse, NULL) ) {\n\t\t\t\t\t\t\tpTimer->bKilled = false;\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tm_uTimerID = (++m_uTimerID) % 0xFF;\n\t\tif( !::SetTimer(m_hWndPaint, m_uTimerID, uElapse, NULL) ) return FALSE;\n\t\tTIMERINFO* pTimer = new TIMERINFO;\n\t\tif( pTimer == NULL ) return FALSE;\n\t\tpTimer->hWnd = m_hWndPaint;\n\t\tpTimer->pSender = pControl;\n\t\tpTimer->nLocalID = nTimerID;\n\t\tpTimer->uWinTimer = m_uTimerID;\n\t\tpTimer->bKilled = false;\n\t\treturn m_aTimers.Add(pTimer);\n\t}\n\n\tbool CPaintManagerUI::KillTimer(CControlUI* pControl, UINT nTimerID)\n\t{\n\t\tASSERT(pControl!=NULL);\n\t\tfor( int i = 0; i< m_aTimers.GetSize(); i++ ) {\n\t\t\tTIMERINFO* pTimer = static_cast<TIMERINFO*>(m_aTimers[i]);\n\t\t\tif( pTimer->pSender == pControl\n\t\t\t\t&& pTimer->hWnd == m_hWndPaint\n\t\t\t\t&& pTimer->nLocalID == nTimerID )\n\t\t\t{\n\t\t\t\tif( pTimer->bKilled == false ) {\n\t\t\t\t\tif( ::IsWindow(m_hWndPaint) ) ::KillTimer(pTimer->hWnd, pTimer->uWinTimer);\n\t\t\t\t\tpTimer->bKilled = true;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tvoid CPaintManagerUI::KillTimer(CControlUI* pControl)\n\t{\n\t\tASSERT(pControl!=NULL);\n\t\tint count = m_aTimers.GetSize();\n\t\tfor( int i = 0, j = 0; i < count; i++ ) {\n\t\t\tTIMERINFO* pTimer = static_cast<TIMERINFO*>(m_aTimers[i - j]);\n\t\t\tif( pTimer->pSender == pControl && pTimer->hWnd == m_hWndPaint ) {\n\t\t\t\tif( pTimer->bKilled == false ) ::KillTimer(pTimer->hWnd, pTimer->uWinTimer);\n\t\t\t\tdelete pTimer;\n\t\t\t\tm_aTimers.Remove(i - j);\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CPaintManagerUI::RemoveAllTimers()\n\t{\n\t\tfor( int i = 0; i < m_aTimers.GetSize(); i++ ) {\n\t\t\tTIMERINFO* pTimer = static_cast<TIMERINFO*>(m_aTimers[i]);\n\t\t\tif( pTimer->hWnd == m_hWndPaint ) {\n\t\t\t\tif( pTimer->bKilled == false ) {\n\t\t\t\t\tif( ::IsWindow(m_hWndPaint) ) ::KillTimer(m_hWndPaint, pTimer->uWinTimer);\n\t\t\t\t}\n\t\t\t\tdelete pTimer;\n\t\t\t}\n\t\t}\n\n\t\tm_aTimers.Empty();\n\t}\n\n\tvoid CPaintManagerUI::SetCapture()\n\t{\n\t\t::SetCapture(m_hWndPaint);\n\t\tm_bMouseCapture = true;\n\t}\n\n\tvoid CPaintManagerUI::ReleaseCapture()\n\t{\n\t\t::ReleaseCapture();\n\t\tm_bMouseCapture = false;\n\t}\n\n\tbool CPaintManagerUI::IsCaptured()\n\t{\n\t\treturn m_bMouseCapture;\n\t}\n\n\tbool CPaintManagerUI::SetNextTabControl(bool bForward)\n\t{\n\t\t// If we're in the process of restructuring the layout we can delay the\n\t\t// focus calulation until the next repaint.\n\t\tif( m_bUpdateNeeded && bForward ) {\n\t\t\tm_bFocusNeeded = true;\n\t\t\t::InvalidateRect(m_hWndPaint, NULL, FALSE);\n\t\t\treturn true;\n\t\t}\n\t\t// Find next/previous tabbable control\n\t\tFINDTABINFO info1 = { 0 };\n\t\tinfo1.pFocus = m_pFocus;\n\t\tinfo1.bForward = bForward;\n\t\tCControlUI* pControl = m_pRoot->FindControl(__FindControlFromTab, &info1, UIFIND_VISIBLE | UIFIND_ENABLED | UIFIND_ME_FIRST);\n\t\tif( pControl == NULL ) {  \n\t\t\tif( bForward ) {\n\t\t\t\t// Wrap around\n\t\t\t\tFINDTABINFO info2 = { 0 };\n\t\t\t\tinfo2.pFocus = bForward ? NULL : info1.pLast;\n\t\t\t\tinfo2.bForward = bForward;\n\t\t\t\tpControl = m_pRoot->FindControl(__FindControlFromTab, &info2, UIFIND_VISIBLE | UIFIND_ENABLED | UIFIND_ME_FIRST);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpControl = info1.pLast;\n\t\t\t}\n\t\t}\n\t\tif( pControl != NULL ) SetFocus(pControl);\n\t\tm_bFocusNeeded = false;\n\t\treturn true;\n\t}\n\n\tbool CPaintManagerUI::AddNotifier(INotifyUI* pNotifier)\n\t{\n\t\tASSERT(m_aNotifiers.Find(pNotifier)<0);\n\t\treturn m_aNotifiers.Add(pNotifier);\n\t}\n\n\tbool CPaintManagerUI::RemoveNotifier(INotifyUI* pNotifier)\n\t{\n\t\tfor( int i = 0; i < m_aNotifiers.GetSize(); i++ ) {\n\t\t\tif( static_cast<INotifyUI*>(m_aNotifiers[i]) == pNotifier ) {\n\t\t\t\treturn m_aNotifiers.Remove(i);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CPaintManagerUI::AddPreMessageFilter(IMessageFilterUI* pFilter)\n\t{\n\t\tASSERT(m_aPreMessageFilters.Find(pFilter)<0);\n\t\treturn m_aPreMessageFilters.Add(pFilter);\n\t}\n\n\tbool CPaintManagerUI::RemovePreMessageFilter(IMessageFilterUI* pFilter)\n\t{\n\t\tfor( int i = 0; i < m_aPreMessageFilters.GetSize(); i++ ) {\n\t\t\tif( static_cast<IMessageFilterUI*>(m_aPreMessageFilters[i]) == pFilter ) {\n\t\t\t\treturn m_aPreMessageFilters.Remove(i);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CPaintManagerUI::AddMessageFilter(IMessageFilterUI* pFilter)\n\t{\n\t\tASSERT(m_aMessageFilters.Find(pFilter)<0);\n\t\treturn m_aMessageFilters.Add(pFilter);\n\t}\n\n\tbool CPaintManagerUI::RemoveMessageFilter(IMessageFilterUI* pFilter)\n\t{\n\t\tfor( int i = 0; i < m_aMessageFilters.GetSize(); i++ ) {\n\t\t\tif( static_cast<IMessageFilterUI*>(m_aMessageFilters[i]) == pFilter ) {\n\t\t\t\treturn m_aMessageFilters.Remove(i);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tint CPaintManagerUI::GetPostPaintCount() const\n\t{\n\t\treturn m_aPostPaintControls.GetSize();\n\t}\n\n\tbool CPaintManagerUI::AddPostPaint(CControlUI* pControl)\n\t{\n\t\tASSERT(m_aPostPaintControls.Find(pControl) < 0);\n\t\treturn m_aPostPaintControls.Add(pControl);\n\t}\n\n\tbool CPaintManagerUI::RemovePostPaint(CControlUI* pControl)\n\t{\n\t\tfor( int i = 0; i < m_aPostPaintControls.GetSize(); i++ ) {\n\t\t\tif( static_cast<CControlUI*>(m_aPostPaintControls[i]) == pControl ) {\n\t\t\t\treturn m_aPostPaintControls.Remove(i);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CPaintManagerUI::SetPostPaintIndex(CControlUI* pControl, int iIndex)\n\t{\n\t\tRemovePostPaint(pControl);\n\t\treturn m_aPostPaintControls.InsertAt(iIndex, pControl);\n\t}\n\n\tvoid CPaintManagerUI::AddDelayedCleanup(CControlUI* pControl)\n\t{\n\t\tpControl->SetManager(this, NULL, false);\n\t\tm_aDelayedCleanup.Add(pControl);\n\t\t::PostMessage(m_hWndPaint, WM_APP + 1, 0, 0L);\n\t}\n\n\tvoid CPaintManagerUI::SendNotify(CControlUI* pControl, LPCTSTR pstrMessage, WPARAM wParam /*= 0*/, LPARAM lParam /*= 0*/, bool bAsync /*= false*/)\n\t{\n\t\tTNotifyUI Msg;\n\t\tMsg.pSender = pControl;\n\t\tMsg.sType = pstrMessage;\n\t\tMsg.wParam = wParam;\n\t\tMsg.lParam = lParam;\n\t\tSendNotify(Msg, bAsync);\n\t}\n\n\tvoid CPaintManagerUI::SendNotify(TNotifyUI& Msg, bool bAsync /*= false*/)\n\t{\n\t\tMsg.ptMouse = m_ptLastMousePos;\n\t\tMsg.dwTimestamp = ::GetTickCount();\n\t\tif( m_bUsedVirtualWnd )\n\t\t{\n\t\t\tMsg.sVirtualWnd = Msg.pSender->GetVirtualWnd();\n\t\t}\n\n\t\tif( !bAsync ) {\n\t\t\t// Send to all listeners\n\t\t\tif( Msg.pSender != NULL ) {\n\t\t\t\tif( Msg.pSender->OnNotify ) Msg.pSender->OnNotify((void*)&Msg);\n\t\t\t}\n\t\t\tfor( int i = 0; i < m_aNotifiers.GetSize(); i++ ) {\n\t\t\t\tstatic_cast<INotifyUI*>(m_aNotifiers[i])->Notify(Msg);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tTNotifyUI *pMsg = new TNotifyUI;\n\t\t\tpMsg->pSender = Msg.pSender;\n\t\t\tpMsg->sType = Msg.sType;\n\t\t\tpMsg->wParam = Msg.wParam;\n\t\t\tpMsg->lParam = Msg.lParam;\n\t\t\tpMsg->ptMouse = Msg.ptMouse;\n\t\t\tpMsg->dwTimestamp = Msg.dwTimestamp;\n\t\t\tm_aAsyncNotify.Add(pMsg);\n\t\t}\n\t}\n\n\tbool CPaintManagerUI::UseParentResource(CPaintManagerUI* pm)\n\t{\n\t\tif( pm == NULL ) {\n\t\t\tm_pParentResourcePM = NULL;\n\t\t\treturn true;\n\t\t}\n\t\tif( pm == this ) return false;\n\n\t\tCPaintManagerUI* pParentPM = pm->GetParentResource();\n\t\twhile( pParentPM ) {\n\t\t\tif( pParentPM == this ) return false;\n\t\t\tpParentPM = pParentPM->GetParentResource();\n\t\t}\n\t\tm_pParentResourcePM = pm;\n\t\treturn true;\n\t}\n\n\tCPaintManagerUI* CPaintManagerUI::GetParentResource() const\n\t{\n\t\treturn m_pParentResourcePM;\n\t}\n\n\tDWORD CPaintManagerUI::GetDefaultDisabledColor() const\n\t{\n\t\tif( m_pParentResourcePM ) return m_pParentResourcePM->GetDefaultDisabledColor();\n\t\treturn m_dwDefaultDisabledColor;\n\t}\n\n\tvoid CPaintManagerUI::SetDefaultDisabledColor(DWORD dwColor)\n\t{\n\t\tm_dwDefaultDisabledColor = dwColor;\n\t}\n\n\tDWORD CPaintManagerUI::GetDefaultFontColor() const\n\t{\n\t\tif( m_pParentResourcePM ) return m_pParentResourcePM->GetDefaultFontColor();\n\t\treturn m_dwDefaultFontColor;\n\t}\n\n\tvoid CPaintManagerUI::SetDefaultFontColor(DWORD dwColor)\n\t{\n\t\tm_dwDefaultFontColor = dwColor;\n\t}\n\n\tDWORD CPaintManagerUI::GetDefaultLinkFontColor() const\n\t{\n\t\tif( m_pParentResourcePM ) return m_pParentResourcePM->GetDefaultLinkFontColor();\n\t\treturn m_dwDefaultLinkFontColor;\n\t}\n\n\tvoid CPaintManagerUI::SetDefaultLinkFontColor(DWORD dwColor)\n\t{\n\t\tm_dwDefaultLinkFontColor = dwColor;\n\t}\n\n\tDWORD CPaintManagerUI::GetDefaultLinkHoverFontColor() const\n\t{\n\t\tif( m_pParentResourcePM ) return m_pParentResourcePM->GetDefaultLinkHoverFontColor();\n\t\treturn m_dwDefaultLinkHoverFontColor;\n\t}\n\n\tvoid CPaintManagerUI::SetDefaultLinkHoverFontColor(DWORD dwColor)\n\t{\n\t\tm_dwDefaultLinkHoverFontColor = dwColor;\n\t}\n\n\tDWORD CPaintManagerUI::GetDefaultSelectedBkColor() const\n\t{\n\t\tif( m_pParentResourcePM ) return m_pParentResourcePM->GetDefaultSelectedBkColor();\n\t\treturn m_dwDefaultSelectedBkColor;\n\t}\n\n\tvoid CPaintManagerUI::SetDefaultSelectedBkColor(DWORD dwColor)\n\t{\n\t\tm_dwDefaultSelectedBkColor = dwColor;\n\t}\n\n\tTFontInfo* CPaintManagerUI::GetDefaultFontInfo()\n\t{\n\t\tif( m_pParentResourcePM ) return m_pParentResourcePM->GetDefaultFontInfo();\n\n\t\tif( m_DefaultFontInfo.tm.tmHeight == 0 ) {\n\t\t\tHFONT hOldFont = (HFONT) ::SelectObject(m_hDcPaint, m_DefaultFontInfo.hFont);\n\t\t\t::GetTextMetrics(m_hDcPaint, &m_DefaultFontInfo.tm);\n\t\t\t::SelectObject(m_hDcPaint, hOldFont);\n\t\t}\n\t\treturn &m_DefaultFontInfo;\n\t}\n\n\tvoid CPaintManagerUI::SetDefaultFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic)\n\t{\n\t\tLOGFONT lf = { 0 };\n\t\t::GetObject(::GetStockObject(DEFAULT_GUI_FONT), sizeof(LOGFONT), &lf);\n\t\t_tcsncpy(lf.lfFaceName, pStrFontName, LF_FACESIZE);\n\t\tlf.lfCharSet = DEFAULT_CHARSET;\n\t\tlf.lfHeight = -nSize;\n\t\tif( bBold ) lf.lfWeight += FW_BOLD;\n\t\tif( bUnderline ) lf.lfUnderline = TRUE;\n\t\tif( bItalic ) lf.lfItalic = TRUE;\n\t\tHFONT hFont = ::CreateFontIndirect(&lf);\n\t\tif( hFont == NULL ) return;\n\n\t\t::DeleteObject(m_DefaultFontInfo.hFont);\n\t\tm_DefaultFontInfo.hFont = hFont;\n\t\tm_DefaultFontInfo.sFontName = pStrFontName;\n\t\tm_DefaultFontInfo.iSize = nSize;\n\t\tm_DefaultFontInfo.bBold = bBold;\n\t\tm_DefaultFontInfo.bUnderline = bUnderline;\n\t\tm_DefaultFontInfo.bItalic = bItalic;\n\t\t::ZeroMemory(&m_DefaultFontInfo.tm, sizeof(m_DefaultFontInfo.tm));\n\t\tif( m_hDcPaint ) {\n\t\t\tHFONT hOldFont = (HFONT) ::SelectObject(m_hDcPaint, hFont);\n\t\t\t::GetTextMetrics(m_hDcPaint, &m_DefaultFontInfo.tm);\n\t\t\t::SelectObject(m_hDcPaint, hOldFont);\n\t\t}\n\t}\n\n\tDWORD CPaintManagerUI::GetCustomFontCount() const\n\t{\n\t\treturn m_aCustomFonts.GetSize();\n\t}\n\n\tHFONT CPaintManagerUI::AddFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic)\n\t{\n\t\tLOGFONT lf = { 0 };\n\t\t::GetObject(::GetStockObject(DEFAULT_GUI_FONT), sizeof(LOGFONT), &lf);\n\t\t_tcsncpy(lf.lfFaceName, pStrFontName, LF_FACESIZE);\n\t\tlf.lfCharSet = DEFAULT_CHARSET;\n\t\tlf.lfHeight = -nSize;\n\t\tif( bBold ) lf.lfWeight += FW_BOLD;\n\t\tif( bUnderline ) lf.lfUnderline = TRUE;\n\t\tif( bItalic ) lf.lfItalic = TRUE;\n\t\tHFONT hFont = ::CreateFontIndirect(&lf);\n\t\tif( hFont == NULL ) return NULL;\n\n\t\tTFontInfo* pFontInfo = new TFontInfo;\n\t\tif( !pFontInfo ) return false;\n\t\t::ZeroMemory(pFontInfo, sizeof(TFontInfo));\n\t\tpFontInfo->hFont = hFont;\n\t\tpFontInfo->sFontName = pStrFontName;\n\t\tpFontInfo->iSize = nSize;\n\t\tpFontInfo->bBold = bBold;\n\t\tpFontInfo->bUnderline = bUnderline;\n\t\tpFontInfo->bItalic = bItalic;\n\t\tif( m_hDcPaint ) {\n\t\t\tHFONT hOldFont = (HFONT) ::SelectObject(m_hDcPaint, hFont);\n\t\t\t::GetTextMetrics(m_hDcPaint, &pFontInfo->tm);\n\t\t\t::SelectObject(m_hDcPaint, hOldFont);\n\t\t}\n\t\tif( !m_aCustomFonts.Add(pFontInfo) ) {\n\t\t\t::DeleteObject(hFont);\n\t\t\tdelete pFontInfo;\n\t\t\treturn NULL;\n\t\t}\n\n\t\treturn hFont;\n\t}\n\n\tHFONT CPaintManagerUI::AddFontAt(int index, LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic)\n\t{\n\t\tLOGFONT lf = { 0 };\n\t\t::GetObject(::GetStockObject(DEFAULT_GUI_FONT), sizeof(LOGFONT), &lf);\n\t\t_tcsncpy(lf.lfFaceName, pStrFontName, LF_FACESIZE);\n\t\tlf.lfCharSet = DEFAULT_CHARSET;\n\t\tlf.lfHeight = -nSize;\n\t\tif( bBold ) lf.lfWeight += FW_BOLD;\n\t\tif( bUnderline ) lf.lfUnderline = TRUE;\n\t\tif( bItalic ) lf.lfItalic = TRUE;\n\t\tHFONT hFont = ::CreateFontIndirect(&lf);\n\t\tif( hFont == NULL ) return NULL;\n\n\t\tTFontInfo* pFontInfo = new TFontInfo;\n\t\tif( !pFontInfo ) return false;\n\t\t::ZeroMemory(pFontInfo, sizeof(TFontInfo));\n\t\tpFontInfo->hFont = hFont;\n\t\tpFontInfo->sFontName = pStrFontName;\n\t\tpFontInfo->iSize = nSize;\n\t\tpFontInfo->bBold = bBold;\n\t\tpFontInfo->bUnderline = bUnderline;\n\t\tpFontInfo->bItalic = bItalic;\n\t\tif( m_hDcPaint ) {\n\t\t\tHFONT hOldFont = (HFONT) ::SelectObject(m_hDcPaint, hFont);\n\t\t\t::GetTextMetrics(m_hDcPaint, &pFontInfo->tm);\n\t\t\t::SelectObject(m_hDcPaint, hOldFont);\n\t\t}\n\t\tif( !m_aCustomFonts.InsertAt(index, pFontInfo) ) {\n\t\t\t::DeleteObject(hFont);\n\t\t\tdelete pFontInfo;\n\t\t\treturn NULL;\n\t\t}\n\n\t\treturn hFont;\n\t}\n\n\tHFONT CPaintManagerUI::GetFont(int index)\n\t{\n\t\tif( index < 0 || index >= m_aCustomFonts.GetSize() ) return GetDefaultFontInfo()->hFont;\n\t\tTFontInfo* pFontInfo = static_cast<TFontInfo*>(m_aCustomFonts[index]);\n\t\treturn pFontInfo->hFont;\n\t}\n\n\tHFONT CPaintManagerUI::GetFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic)\n\t{\n\t\tTFontInfo* pFontInfo = NULL;\n\t\tfor( int it = 0; it < m_aCustomFonts.GetSize(); it++ ) {\n\t\t\tpFontInfo = static_cast<TFontInfo*>(m_aCustomFonts[it]);\n\t\t\tif( pFontInfo->sFontName == pStrFontName && pFontInfo->iSize == nSize && \n\t\t\t\tpFontInfo->bBold == bBold && pFontInfo->bUnderline == bUnderline && pFontInfo->bItalic == bItalic) \n\t\t\t\treturn pFontInfo->hFont;\n\t\t}\n\t\tif( m_pParentResourcePM ) return m_pParentResourcePM->GetFont(pStrFontName, nSize, bBold, bUnderline, bItalic);\n\t\treturn NULL;\n\t}\n\n\tbool CPaintManagerUI::FindFont(HFONT hFont)\n\t{\n\t\tTFontInfo* pFontInfo = NULL;\n\t\tfor( int it = 0; it < m_aCustomFonts.GetSize(); it++ ) {\n\t\t\tpFontInfo = static_cast<TFontInfo*>(m_aCustomFonts[it]);\n\t\t\tif( pFontInfo->hFont == hFont ) return true;\n\t\t}\n\t\tif( m_pParentResourcePM ) return m_pParentResourcePM->FindFont(hFont);\n\t\treturn false;\n\t}\n\n\tbool CPaintManagerUI::FindFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic)\n\t{\n\t\tTFontInfo* pFontInfo = NULL;\n\t\tfor( int it = 0; it < m_aCustomFonts.GetSize(); it++ ) {\n\t\t\tpFontInfo = static_cast<TFontInfo*>(m_aCustomFonts[it]);\n\t\t\tif( pFontInfo->sFontName == pStrFontName && pFontInfo->iSize == nSize && \n\t\t\t\tpFontInfo->bBold == bBold && pFontInfo->bUnderline == bUnderline && pFontInfo->bItalic == bItalic) \n\t\t\t\treturn true;\n\t\t}\n\t\tif( m_pParentResourcePM ) return m_pParentResourcePM->FindFont(pStrFontName, nSize, bBold, bUnderline, bItalic);\n\t\treturn false;\n\t}\n\n\tint CPaintManagerUI::GetFontIndex(HFONT hFont)\n\t{\n\t\tTFontInfo* pFontInfo = NULL;\n\t\tfor( int it = 0; it < m_aCustomFonts.GetSize(); it++ ) {\n\t\t\tpFontInfo = static_cast<TFontInfo*>(m_aCustomFonts[it]);\n\t\t\tif( pFontInfo->hFont == hFont ) return it;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tint CPaintManagerUI::GetFontIndex(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic)\n\t{\n\t\tTFontInfo* pFontInfo = NULL;\n\t\tfor( int it = 0; it < m_aCustomFonts.GetSize(); it++ ) {\n\t\t\tpFontInfo = static_cast<TFontInfo*>(m_aCustomFonts[it]);\n\t\t\tif( pFontInfo->sFontName == pStrFontName && pFontInfo->iSize == nSize && \n\t\t\t\tpFontInfo->bBold == bBold && pFontInfo->bUnderline == bUnderline && pFontInfo->bItalic == bItalic) \n\t\t\t\treturn it;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tbool CPaintManagerUI::RemoveFont(HFONT hFont)\n\t{\n\t\tTFontInfo* pFontInfo = NULL;\n\t\tfor( int it = 0; it < m_aCustomFonts.GetSize(); it++ ) {\n\t\t\tpFontInfo = static_cast<TFontInfo*>(m_aCustomFonts[it]);\n\t\t\tif( pFontInfo->hFont == hFont ) {\n\t\t\t\t::DeleteObject(pFontInfo->hFont);\n\t\t\t\tdelete pFontInfo;\n\t\t\t\treturn m_aCustomFonts.Remove(it);\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tbool CPaintManagerUI::RemoveFontAt(int index)\n\t{\n\t\tif( index < 0 || index >= m_aCustomFonts.GetSize() ) return false;\n\t\tTFontInfo* pFontInfo = static_cast<TFontInfo*>(m_aCustomFonts[index]);\n\t\t::DeleteObject(pFontInfo->hFont);\n\t\tdelete pFontInfo;\n\t\treturn m_aCustomFonts.Remove(index);\n\t}\n\n\tvoid CPaintManagerUI::RemoveAllFonts()\n\t{\n\t\tTFontInfo* pFontInfo;\n\t\tfor( int it = 0; it < m_aCustomFonts.GetSize(); it++ ) {\n\t\t\tpFontInfo = static_cast<TFontInfo*>(m_aCustomFonts[it]);\n\t\t\t::DeleteObject(pFontInfo->hFont);\n\t\t\tdelete pFontInfo;\n\t\t}\n\t\tm_aCustomFonts.Empty();\n\t}\n\n\n\n\tvoid CPaintManagerUI::PaserString(CDuiString& sStr)\n\t{\n\t\tint nPos=-1;\n\t\tCDuiString sTmp=sStr;\n\n\t\t//ǿƲַ\n\t\tnPos = sTmp.Find(_T('@'));\n\t\tif (nPos==0)\n\t\t{\n\t\t\tsStr = sTmp.Mid(1);\n\t\t\treturn;\n\t\t}\n\t\t//#ַ\n\t\tnPos=sTmp.Find(_T('#'));\n\t\tif (nPos==0)\n\t\t{\n\t\t\tint nPos1 = sTmp.Find(_T(\"[\"),0,false);\n\t\t\twhile (nPos1 != -1)\n\t\t\t{\n\t\t\t\t//jump \\[\n\t\t\t\twhile ((nPos1!=-1)&&(sTmp[nPos1-1]==_T('\\\\')))\n\t\t\t\t{\n\n\t\t\t\t\tCDuiString sTmp1 = sTmp.Mid(0, nPos1-1);\n\t\t\t\t\tsTmp1 += sTmp.Mid(nPos1);\n\t\t\t\t\tsTmp = sTmp1;\n\t\t\t\t\tnPos1 = sTmp.Find(_T(\"[\"), nPos1,false);\n\t\t\t\t}\n\n\t\t\t\tint nPos2 = sTmp.Find(_T(\"]\"),nPos1,false);\n\t\t\t\t//jump \\]\n\t\t\t\twhile ((nPos2!=-1)&&(sTmp[nPos2-1]==_T('\\\\')))\n\t\t\t\t{\n\t\t\t\t\tCDuiString sTmp1 = sTmp.Mid(0, nPos2-1);\n\t\t\t\t\tsTmp1 += sTmp.Mid(nPos2);\n\t\t\t\t\tsTmp = sTmp1;\n\t\t\t\t\tnPos2 = sTmp.Find(_T(\"]\"), nPos2,false);\n\t\t\t\t}\n\n\t\t\t\tif (nPos2 > (nPos1 + 1))\n\t\t\t\t{\n\t\t\t\t\tCDuiString sKey = sTmp.Mid(nPos1 + 1, nPos2 - nPos1 - 1);\n\t\t\t\t\tCDuiString* sValue = GetResString(sKey.GetData( ));\n\t\t\t\t\tif (sValue)\n\t\t\t\t\t{\n\t\t\t\t\t\tsTmp.Replace(sTmp.Mid(nPos1, nPos2 - nPos1 + 1), sValue->GetData());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tsTmp.Replace(sTmp.Mid(nPos1, nPos2 - nPos1 + 1), _T(\"`ERR`\"));//δҵƥ\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnPos1 = sTmp.Find(_T(\"[\"), nPos1 + 1,false);\n\t\t\t}\n\n\t\t\tsTmp.Replace(_T(\"\\\\]\"),_T(\"]\"));//ȥ\\]\n\t\t\tsStr = sTmp.Mid(1);//ȥͷ#\n\t\t}\n\n\t}\n\n\n\n\t//ַ\n\tvoid CPaintManagerUI::AddResString(LPCTSTR key,CDuiString* value)\n\t{\n\t\tm_ResStringsHash.Insert(key,value);\n\n\t}\n\tCDuiString* CPaintManagerUI::GetResString(LPCTSTR key)\n\t{\n\t\tif (key==NULL)\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\n\t\treturn m_ResStringsHash.Find(key);\n\n\t}\n\n\tvoid CPaintManagerUI::RemoveAllResStrings()\n\t{\n\t\tCDuiString* pStr;\n\t\tfor (int nIdx=0;nIdx<m_ResStringsHash.GetSize();nIdx++)\n\t\t{\n\n\t\t\tpStr=m_ResStringsHash.GetAtObj(nIdx);\n\t\t\tif (pStr)\n\t\t\t{\n\t\t\t\tdelete pStr;\n\t\t\t}\n\t\t}\n\n\t\tm_ResStringsHash.RemoveAll();\n\t}\n\n\tTStdStringPtrMap<CDuiString*>* CPaintManagerUI::GetResStringsHash( )\n\t{\n\t\treturn &m_ResStringsHash;\n\t}\n\n\tTFontInfo* CPaintManagerUI::GetFontInfo(int index)\n\t{\n\t\tif( index < 0 || index >= m_aCustomFonts.GetSize() ) return GetDefaultFontInfo();\n\t\tTFontInfo* pFontInfo = static_cast<TFontInfo*>(m_aCustomFonts[index]);\n\t\tif( pFontInfo->tm.tmHeight == 0 ) {\n\t\t\tHFONT hOldFont = (HFONT) ::SelectObject(m_hDcPaint, pFontInfo->hFont);\n\t\t\t::GetTextMetrics(m_hDcPaint, &pFontInfo->tm);\n\t\t\t::SelectObject(m_hDcPaint, hOldFont);\n\t\t}\n\t\treturn pFontInfo;\n\t}\n\n\tTFontInfo* CPaintManagerUI::GetFontInfo(HFONT hFont)\n\t{\n\t\tTFontInfo* pFontInfo = NULL;\n\t\tfor( int it = 0; it < m_aCustomFonts.GetSize(); it++ ) {\n\t\t\tpFontInfo = static_cast<TFontInfo*>(m_aCustomFonts[it]);\n\t\t\tif( pFontInfo->hFont == hFont ) {\n\t\t\t\tif( pFontInfo->tm.tmHeight == 0 ) {\n\t\t\t\t\tHFONT hOldFont = (HFONT) ::SelectObject(m_hDcPaint, pFontInfo->hFont);\n\t\t\t\t\t::GetTextMetrics(m_hDcPaint, &pFontInfo->tm);\n\t\t\t\t\t::SelectObject(m_hDcPaint, hOldFont);\n\t\t\t\t}\n\t\t\t\treturn pFontInfo;\n\t\t\t}\n\t\t}\n\n\t\tif( m_pParentResourcePM ) return m_pParentResourcePM->GetFontInfo(hFont);\n\t\treturn GetDefaultFontInfo();\n\t}\n\n\tconst TImageInfo* CPaintManagerUI::GetImage(LPCTSTR bitmap)\n\t{\n\t\tTImageInfo* data = static_cast<TImageInfo*>(m_mImageHash.Find(bitmap));\n\t\tif( !data && m_pParentResourcePM ) return m_pParentResourcePM->GetImage(bitmap);\n\t\telse return data;\n\t}\n\n\tconst TImageInfo* CPaintManagerUI::GetImageEx(LPCTSTR bitmap, LPCTSTR type, DWORD mask)\n\t{\n\t\tTImageInfo* data = static_cast<TImageInfo*>(m_mImageHash.Find(bitmap));\n\t\tif( !data ) {\n\t\t\tif( AddImage(bitmap, type, mask) ) {\n\t\t\t\tdata = static_cast<TImageInfo*>(m_mImageHash.Find(bitmap));\n\t\t\t}\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tconst TImageInfo* CPaintManagerUI::AddImage(LPCTSTR bitmap, LPCTSTR type, DWORD mask)\n\t{\n\t\tTImageInfo* data = NULL;\n\t\tif( type != NULL ) {\n\t\t\tif( isdigit(*bitmap) ) {\n\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\tint iIndex = _tcstol(bitmap, &pstr, 10);\n\t\t\t\tdata = CRenderEngine::LoadImage(iIndex, type, mask);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tdata = CRenderEngine::LoadImage(bitmap, NULL, mask);\n\t\t}\n\n\t\tif( !data ) return NULL;\n\t\tif( type != NULL ) data->sResType = type;\n\t\tdata->dwMask = mask;\n\t\tif( !m_mImageHash.Insert(bitmap, data) ) {\n\t\t\t::DeleteObject(data->hBitmap);\n\t\t\tdelete data;\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tconst TImageInfo* CPaintManagerUI::AddImage(LPCTSTR bitmap, HBITMAP hBitmap, int iWidth, int iHeight, bool bAlpha)\n\t{\n\t\tif( hBitmap == NULL || iWidth <= 0 || iHeight <= 0 ) return NULL;\n\n\t\tTImageInfo* data = new TImageInfo;\n\t\tdata->hBitmap = hBitmap;\n\t\tdata->nX = iWidth;\n\t\tdata->nY = iHeight;\n\t\tdata->alphaChannel = bAlpha;\n\t\t//data->sResType = _T(\"\");\n\t\tdata->dwMask = 0;\n\t\tif( !m_mImageHash.Insert(bitmap, data) ) {\n\t\t\t::DeleteObject(data->hBitmap);\n\t\t\tdelete data;\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tbool CPaintManagerUI::RemoveImage(LPCTSTR bitmap)\n\t{\n\t\tconst TImageInfo* data = GetImage(bitmap);\n\t\tif( !data ) return false;\n\n\t\tCRenderEngine::FreeImage(data) ;\n\n\t\treturn m_mImageHash.Remove(bitmap);\n\t}\n\n\tvoid CPaintManagerUI::RemoveAllImages()\n\t{\n\t\tTImageInfo* data;\n\t\tfor( int i = 0; i< m_mImageHash.GetSize(); i++ ) {\n\t\t\tif(LPCTSTR key = m_mImageHash.GetAt(i)) {\n\t\t\t\tdata = static_cast<TImageInfo*>(m_mImageHash.Find(key, false));\n\t\t\t\tif (data) {\n\t\t\t\t\tCRenderEngine::FreeImage(data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tm_mImageHash.RemoveAll();\n\t}\n\n\tvoid CPaintManagerUI::ReloadAllImages()\n\t{\n\t\tbool bRedraw = false;\n\t\tTImageInfo* data=nullptr;\n\t\tTImageInfo* pNewData=nullptr;\n\t\tfor( int i = 0; i< m_mImageHash.GetSize(); i++ ) {\n\t\t\tif(LPCTSTR bitmap = m_mImageHash.GetAt(i)) {\n\t\t\t\tdata = static_cast<TImageInfo*>(m_mImageHash.Find(bitmap));\n\t\t\t\tif( data != NULL ) {\n\t\t\t\t\tif( !data->sResType.IsEmpty() ) {\n\t\t\t\t\t\tif( isdigit(*bitmap) ) {\n\t\t\t\t\t\t\tLPTSTR pstr = NULL;\n\t\t\t\t\t\t\tint iIndex = _tcstol(bitmap, &pstr, 10);\n\t\t\t\t\t\t\tpNewData = CRenderEngine::LoadImage(iIndex, data->sResType.GetData(), data->dwMask);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tpNewData = CRenderEngine::LoadImage(bitmap, NULL, data->dwMask);\n\t\t\t\t\t}\n\t\t\t\t\tif( pNewData == NULL ) continue;\n\n\t\t\t\t\tif( data->hBitmap != NULL ) ::DeleteObject(data->hBitmap);\n\t\t\t\t\tdata->hBitmap = pNewData->hBitmap;\n\t\t\t\t\tdata->nX = pNewData->nX;\n\t\t\t\t\tdata->nY = pNewData->nY;\n\t\t\t\t\tdata->alphaChannel = pNewData->alphaChannel;\n\n\t\t\t\t\tdelete pNewData;\n\t\t\t\t\tbRedraw = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( bRedraw && m_pRoot ) m_pRoot->Invalidate();\n\t}\n\n\tvoid CPaintManagerUI::AddDefaultAttributeList(LPCTSTR pStrControlName, LPCTSTR pStrControlAttrList)\n\t{\n\t\tCDuiString* pDefaultAttr = new CDuiString(pStrControlAttrList);\n\t\tif (pDefaultAttr != NULL)\n\t\t{\n\t\t\tif (m_DefaultAttrHash.Find(pStrControlName) == NULL)\n\t\t\t\tm_DefaultAttrHash.Set(pStrControlName, (LPVOID)pDefaultAttr);\n\t\t\telse\n\t\t\t\tdelete pDefaultAttr;\n\t\t}\n\t}\n\n\tLPCTSTR CPaintManagerUI::GetDefaultAttributeList(LPCTSTR pStrControlName) const\n\t{\n\t\tCDuiString* pDefaultAttr = static_cast<CDuiString*>(m_DefaultAttrHash.Find(pStrControlName));\n\t\tif( !pDefaultAttr && m_pParentResourcePM ) return m_pParentResourcePM->GetDefaultAttributeList(pStrControlName);\n\n\t\tif( pDefaultAttr ) return pDefaultAttr->GetData();\n\t\telse return NULL;\n\t}\n\n\tbool CPaintManagerUI::RemoveDefaultAttributeList(LPCTSTR pStrControlName)\n\t{\n\t\tCDuiString* pDefaultAttr = static_cast<CDuiString*>(m_DefaultAttrHash.Find(pStrControlName));\n\t\tif( !pDefaultAttr ) return false;\n\n\t\tdelete pDefaultAttr;\n\t\treturn m_DefaultAttrHash.Remove(pStrControlName);\n\t}\n\n\tconst CStdStringPtrMap& CPaintManagerUI::GetDefaultAttribultes() const\n\t{\n\t\treturn m_DefaultAttrHash;\n\t}\n\n\tvoid CPaintManagerUI::RemoveAllDefaultAttributeList()\n\t{\n\t\tCDuiString* pDefaultAttr;\n\t\tfor( int i = 0; i< m_DefaultAttrHash.GetSize(); i++ ) {\n\t\t\tif(LPCTSTR key = m_DefaultAttrHash.GetAt(i)) {\n\t\t\t\tpDefaultAttr = static_cast<CDuiString*>(m_DefaultAttrHash.Find(key));\n\t\t\t\tdelete pDefaultAttr;\n\t\t\t}\n\t\t}\n\t\tm_DefaultAttrHash.RemoveAll();\n\t}\n\n\tCControlUI* CPaintManagerUI::GetRoot() const\n\t{\n\t\t//жxmlǷسɹ,Ӧassert\n\t\t//ASSERT(m_pRoot);\n\t\treturn m_pRoot;\n\t}\n\n\tCControlUI* CPaintManagerUI::FindControl(POINT pt) const\n\t{\n\t\tASSERT(m_pRoot);\n\t\treturn m_pRoot->FindControl(__FindControlFromPoint, &pt, UIFIND_VISIBLE | UIFIND_HITTEST | UIFIND_TOP_FIRST);\n\t}\n\n\tCControlUI* CPaintManagerUI::FindControl(LPCTSTR pstrName) const\n\t{\n\t\tASSERT(m_pRoot);\n\t\treturn static_cast<CControlUI*>(m_mNameHash.Find(pstrName));\n\t}\n\n\tCControlUI* CPaintManagerUI::FindSubControlByPoint(CControlUI* pParent, POINT pt) const\n\t{\n\t\tif( pParent == NULL ) pParent = GetRoot();\n\t\tASSERT(pParent);\n\t\treturn pParent->FindControl(__FindControlFromPoint, &pt, UIFIND_VISIBLE | UIFIND_HITTEST | UIFIND_TOP_FIRST);\n\t}\n\n\tCControlUI* CPaintManagerUI::FindSubControlByName(CControlUI* pParent, LPCTSTR pstrName) const\n\t{\n\t\tif( pParent == NULL ) pParent = GetRoot();\n\t\tASSERT(pParent);\n\t\treturn pParent->FindControl(__FindControlFromName, (LPVOID)pstrName, UIFIND_ALL);\n\t}\n\n\tCControlUI* CPaintManagerUI::FindSubControlByClass(CControlUI* pParent, LPCTSTR pstrClass, int iIndex)\n\t{\n\t\tif( pParent == NULL ) pParent = GetRoot();\n\t\tASSERT(pParent);\n\t\tm_aFoundControls.Resize(iIndex + 1);\n\t\treturn pParent->FindControl(__FindControlFromClass, (LPVOID)pstrClass, UIFIND_ALL);\n\t}\n\n\tCStdPtrArray* CPaintManagerUI::FindSubControlsByClass(CControlUI* pParent, LPCTSTR pstrClass)\n\t{\n\t\tif( pParent == NULL ) pParent = GetRoot();\n\t\tASSERT(pParent);\n\t\tm_aFoundControls.Empty();\n\t\tpParent->FindControl(__FindControlsFromClass, (LPVOID)pstrClass, UIFIND_ALL);\n\t\treturn &m_aFoundControls;\n\t}\n\n\tCStdPtrArray* CPaintManagerUI::GetSubControlsByClass()\n\t{\n\t\treturn &m_aFoundControls;\n\t}\n\n\tCControlUI* CALLBACK CPaintManagerUI::__FindControlFromNameHash(CControlUI* pThis, LPVOID pData)\n\t{\n\t\tCPaintManagerUI* pManager = static_cast<CPaintManagerUI*>(pData);\n\t\tconst CDuiString& sName = pThis->GetName();\n\t\tif( sName.IsEmpty() ) return NULL;\n\t\t// Add this control to the hash list\n\t\tpManager->m_mNameHash.Set(sName, pThis);\n\t\treturn NULL; // Attempt to add all controls\n\t}\n\n\tCControlUI* CALLBACK CPaintManagerUI::__FindControlFromCount(CControlUI* /*pThis*/, LPVOID pData)\n\t{\n\t\tint* pnCount = static_cast<int*>(pData);\n\t\t(*pnCount)++;\n\t\treturn NULL;  // Count all controls\n\t}\n\n\tCControlUI* CALLBACK CPaintManagerUI::__FindControlFromPoint(CControlUI* pThis, LPVOID pData)\n\t{\n\t\tLPPOINT pPoint = static_cast<LPPOINT>(pData);\n\t\treturn ::PtInRect(&pThis->GetPos(), *pPoint) ? pThis : NULL;\n\t}\n\n\tCControlUI* CALLBACK CPaintManagerUI::__FindControlFromTab(CControlUI* pThis, LPVOID pData)\n\t{\n\t\tFINDTABINFO* pInfo = static_cast<FINDTABINFO*>(pData);\n\t\tif( pInfo->pFocus == pThis ) {\n\t\t\tif( pInfo->bForward ) pInfo->bNextIsIt = true;\n\t\t\treturn pInfo->bForward ? NULL : pInfo->pLast;\n\t\t}\n\t\tif( (pThis->GetControlFlags() & UIFLAG_TABSTOP) == 0 ) return NULL;\n\t\tpInfo->pLast = pThis;\n\t\tif( pInfo->bNextIsIt ) return pThis;\n\t\tif( pInfo->pFocus == NULL ) return pThis;\n\t\treturn NULL;  // Examine all controls\n\t}\n\n\tCControlUI* CALLBACK CPaintManagerUI::__FindControlFromShortcut(CControlUI* pThis, LPVOID pData)\n\t{\n\t\tif( !pThis->IsVisible() ) return NULL; \n\t\tFINDSHORTCUT* pFS = static_cast<FINDSHORTCUT*>(pData);\n\t\tif( pFS->ch == toupper(pThis->GetShortcut()) ) pFS->bPickNext = true;\n\t\tif( _tcsstr(pThis->GetClass(), _T(\"LabelUI\")) != NULL ) return NULL;   // Labels never get focus!\n\t\treturn pFS->bPickNext ? pThis : NULL;\n\t}\n\n\tCControlUI* CALLBACK CPaintManagerUI::__FindControlFromUpdate(CControlUI* pThis, LPVOID pData)\n\t{\n\t\treturn pThis->IsUpdateNeeded() ? pThis : NULL;\n\t}\n\n\tCControlUI* CALLBACK CPaintManagerUI::__FindControlFromName(CControlUI* pThis, LPVOID pData)\n\t{\n\t\tLPCTSTR pstrName = static_cast<LPCTSTR>(pData);\n\t\tconst CDuiString& sName = pThis->GetName();\n\t\tif( sName.IsEmpty() ) return NULL;\n\t\treturn (_tcsicmp(sName, pstrName) == 0) ? pThis : NULL;\n\t}\n\n\tCControlUI* CALLBACK CPaintManagerUI::__FindControlFromClass(CControlUI* pThis, LPVOID pData)\n\t{\n\t\tLPCTSTR pstrType = static_cast<LPCTSTR>(pData);\n\t\tLPCTSTR pType = pThis->GetClass();\n\t\tCStdPtrArray* pFoundControls = pThis->GetManager()->GetSubControlsByClass();\n\t\tif( _tcscmp(pstrType, _T(\"*\")) == 0 || _tcscmp(pstrType, pType) == 0 ) {\n\t\t\tint iIndex = -1;\n\t\t\twhile( pFoundControls->GetAt(++iIndex) != NULL ) ;\n\t\t\tif( iIndex < pFoundControls->GetSize() ) pFoundControls->SetAt(iIndex, pThis);\n\t\t}\n\t\tif( pFoundControls->GetAt(pFoundControls->GetSize() - 1) != NULL ) return pThis; \n\t\treturn NULL;\n\t}\n\n\tCControlUI* CALLBACK CPaintManagerUI::__FindControlsFromClass(CControlUI* pThis, LPVOID pData)\n\t{\n\t\tLPCTSTR pstrType = static_cast<LPCTSTR>(pData);\n\t\tLPCTSTR pType = pThis->GetClass();\n\t\tif( _tcscmp(pstrType, _T(\"*\")) == 0 || _tcscmp(pstrType, pType) == 0 ) \n\t\t\tpThis->GetManager()->GetSubControlsByClass()->Add((LPVOID)pThis);\n\t\treturn NULL;\n\t}\n\n\tbool CPaintManagerUI::TranslateAccelerator(LPMSG pMsg)\n\t{\n\t\tfor (int i = 0; i < m_aTranslateAccelerator.GetSize(); i++)\n\t\t{\n\t\t\tLRESULT lResult = static_cast<ITranslateAccelerator *>(m_aTranslateAccelerator[i])->TranslateAccelerator(pMsg);\n\t\t\tif( lResult == S_OK ) return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CPaintManagerUI::TranslateMessage(const LPMSG pMsg)\n\t{\n\t\t// Pretranslate Message takes care of system-wide messages, such as\n\t\t// tabbing and shortcut key-combos. We'll look for all messages for\n\t\t// each window and any child control attached.\n\t\tUINT uStyle = GetWindowStyle(pMsg->hwnd);\n\t\tUINT uChildRes = uStyle & WS_CHILD;\t\n\t\tLRESULT lRes = 0;\n\t\tif (uChildRes != 0)\n\t\t{\n\t\t\tHWND hWndParent = ::GetParent(pMsg->hwnd);\n\n\t\t\tfor( int i = 0; i < m_aPreMessages.GetSize(); i++ ) \n\t\t\t{\n\t\t\t\tCPaintManagerUI* pT = static_cast<CPaintManagerUI*>(m_aPreMessages[i]);        \n\t\t\t\tHWND hTempParent = hWndParent;\n\t\t\t\twhile(hTempParent)\n\t\t\t\t{\n\t\t\t\t\tif(pMsg->hwnd == pT->GetPaintWindow() || hTempParent == pT->GetPaintWindow())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (pT->TranslateAccelerator(pMsg))\n\t\t\t\t\t\t\treturn true;\n\n\t\t\t\t\t\tif( pT->PreMessageHandler(pMsg->message, pMsg->wParam, pMsg->lParam, lRes) ) \n\t\t\t\t\t\t\treturn true;\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\thTempParent = GetParent(hTempParent);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor( int i = 0; i < m_aPreMessages.GetSize(); i++ ) \n\t\t\t{\n\t\t\t\tCPaintManagerUI* pT = static_cast<CPaintManagerUI*>(m_aPreMessages[i]);\n\t\t\t\tif(pMsg->hwnd == pT->GetPaintWindow())\n\t\t\t\t{\n\t\t\t\t\tif (pT->TranslateAccelerator(pMsg))\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t\tif( pT->PreMessageHandler(pMsg->message, pMsg->wParam, pMsg->lParam, lRes) ) \n\t\t\t\t\t\treturn true;\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tbool CPaintManagerUI::AddTranslateAccelerator(ITranslateAccelerator *pTranslateAccelerator)\n\t{\n\t\tASSERT(m_aTranslateAccelerator.Find(pTranslateAccelerator) < 0);\n\t\treturn m_aTranslateAccelerator.Add(pTranslateAccelerator);\n\t}\n\n\tbool CPaintManagerUI::RemoveTranslateAccelerator(ITranslateAccelerator *pTranslateAccelerator)\n\t{\n\t\tfor (int i = 0; i < m_aTranslateAccelerator.GetSize(); i++)\n\t\t{\n\t\t\tif (static_cast<ITranslateAccelerator *>(m_aTranslateAccelerator[i]) == pTranslateAccelerator)\n\t\t\t{\n\t\t\t\treturn m_aTranslateAccelerator.Remove(i);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tvoid CPaintManagerUI::UsedVirtualWnd(bool bUsed)\n\t{\n\t\tm_bUsedVirtualWnd = bUsed;\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Core/UIManager.h",
    "content": "#ifndef __UIMANAGER_H__\n#define __UIMANAGER_H__\n\n#pragma once\n\nnamespace DuiLib {\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass CControlUI;\n\tclass CUnCompression;\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\ttypedef enum EVENTTYPE_UI\n\t{\n\t\tUIEVENT__ALL,\n\t\tUIEVENT__FIRST = 1,\n\t\tUIEVENT__KEYBEGIN,\n\t\tUIEVENT_KEYDOWN,\n\t\tUIEVENT_KEYUP,\n\t\tUIEVENT_CHAR,\n\t\tUIEVENT_SYSKEY,\n\t\tUIEVENT__KEYEND,\n\t\tUIEVENT__MOUSEBEGIN,\n\t\tUIEVENT_MOUSEMOVE,\n\t\tUIEVENT_MOUSELEAVE,\n\t\tUIEVENT_MOUSEENTER,\n\t\tUIEVENT_MOUSEHOVER,\n\t\tUIEVENT_BUTTONDOWN,\n\t\tUIEVENT_BUTTONUP,\n\t\tUIEVENT_RBUTTONDOWN,\n\t\tUIEVENT_RBUTTONUP,\n\t\tUIEVENT_DBLCLICK,\n\t\tUIEVENT_CONTEXTMENU,\n\t\tUIEVENT_SCROLLWHEEL,\n\t\tUIEVENT__MOUSEEND,\n\t\tUIEVENT_KILLFOCUS,\n\t\tUIEVENT_SETFOCUS,\n\t\tUIEVENT_WINDOWSIZE,\n\t\tUIEVENT_SETCURSOR,\n\t\tUIEVENT_TIMER,\n\t\tUIEVENT_NOTIFY,\n\t\tUIEVENT_COMMAND,\n        UIEVENT_IME_STARTCOMPOSITION,\n\t\tUIEVENT__LAST,\n\t};\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\t// Flags for CControlUI::GetControlFlags()\n#define UIFLAG_TABSTOP       0x00000001\n#define UIFLAG_SETCURSOR     0x00000002\n#define UIFLAG_WANTRETURN    0x00000004\n\n\t// Flags for FindControl()\n#define UIFIND_ALL           0x00000000\n#define UIFIND_VISIBLE       0x00000001\n#define UIFIND_ENABLED       0x00000002\n#define UIFIND_HITTEST       0x00000004\n#define UIFIND_TOP_FIRST     0x00000008\n#define UIFIND_ME_FIRST      0x80000000\n\n\t// Flags for the CDialogLayout stretching\n#define UISTRETCH_NEWGROUP   0x00000001\n#define UISTRETCH_NEWLINE    0x00000002\n#define UISTRETCH_MOVE_X     0x00000004\n#define UISTRETCH_MOVE_Y     0x00000008\n#define UISTRETCH_SIZE_X     0x00000010\n#define UISTRETCH_SIZE_Y     0x00000020\n\n\t// Flags used for controlling the paint\n#define UISTATE_FOCUSED      0x00000001\n#define UISTATE_SELECTED     0x00000002\n#define UISTATE_DISABLED     0x00000004\n#define UISTATE_HOT          0x00000008\n#define UISTATE_PUSHED       0x00000010\n#define UISTATE_READONLY     0x00000020\n#define UISTATE_CAPTURED     0x00000040\n\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\ttypedef struct tagTFontInfo\n\t{\n\t\tHFONT hFont;\n\t\tCDuiString sFontName;\n\t\tint iSize;\n\t\tbool bBold;\n\t\tbool bUnderline;\n\t\tbool bItalic;\n\t\tTEXTMETRIC tm;\n\t} TFontInfo;\n\n\ttypedef struct tagTImageInfo\n\t{\n\t\tHBITMAP hBitmap;\n\t\tint nX;\n\t\tint nY;\n\t\tbool alphaChannel;\n\t\tCDuiString sResType;\n\t\tDWORD dwMask;\n\t} TImageInfo;\n\n\t// Structure for notifications from the system\n\t// to the control implementation.\n\ttypedef struct tagTEventUI\n\t{\n\t\tint Type;\n\t\tCControlUI* pSender;\n\t\tDWORD dwTimestamp;\n\t\tPOINT ptMouse;\n\t\tTCHAR chKey;\n\t\tWORD wKeyState;\n\t\tWPARAM wParam;\n\t\tLPARAM lParam;\n\t} TEventUI;\n\n\t// Structure for relative position to the parent\n\ttypedef struct tagTRelativePosUI\n\t{\n\t\tbool bRelative;\n\t\tSIZE szParent;\n\t\tint nMoveXPercent;\n\t\tint nMoveYPercent;\n\t\tint nZoomXPercent;\n\t\tint nZoomYPercent;\n\t}TRelativePosUI;\n\n\t// Listener interface\n\tclass INotifyUI\n\t{\n\tpublic:\n\t\tvirtual void Notify(TNotifyUI& msg) = 0;\n\t};\n\n\t// MessageFilter interface\n\tclass IMessageFilterUI\n\t{\n\tpublic:\n\t\tvirtual LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled) = 0;\n\t};\n\n\tclass ITranslateAccelerator\n\t{\n\tpublic:\n\t\tvirtual LRESULT TranslateAccelerator(MSG *pMsg) = 0;\n\t};\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\ttypedef CControlUI* (*LPCREATECONTROL)(LPCTSTR pstrType);\n\n\n\tclass UILIB_API CPaintManagerUI\n\t{\n\tpublic:\n\t\tCPaintManagerUI();\n\t\t~CPaintManagerUI();\n\n\tpublic:\n\t\tvoid Init(HWND hWnd);\n\t\tvoid NeedUpdate();\n\t\tvoid Invalidate(RECT& rcItem);\n\n\t\tHDC GetPaintDC() const;\n\t\tHWND GetPaintWindow() const;\n\t\tHWND GetTooltipWindow() const;\n\n\t\tPOINT GetMousePos() const;\n\t\tSIZE GetClientSize() const;\n\t\tSIZE GetInitSize();\n\t\tvoid SetInitSize(int cx, int cy);\n\t\tRECT& GetSizeBox();\n\t\tvoid SetSizeBox(RECT& rcSizeBox);\n\t\tRECT& GetCaptionRect();\n\t\tvoid SetCaptionRect(RECT& rcCaption);\n\t\tSIZE GetRoundCorner() const;\n\t\tvoid SetRoundCorner(int cx, int cy);\n\t\tSIZE GetMinInfo() const;\n\t\tvoid SetMinInfo(int cx, int cy);\n\t\tSIZE GetMaxInfo() const;\n\t\tvoid SetMaxInfo(int cx, int cy);\n\t\tint GetTransparent() const;\n\t\tvoid SetTransparent(int nOpacity);\n\t\tvoid SetBackgroundTransparent(bool bTrans);\n\t\tbool IsShowUpdateRect() const;\n\t\tvoid SetShowUpdateRect(bool show);\n\n\t\tstatic HINSTANCE GetInstance();\n\t\tstatic CDuiString GetInstancePath();\n\t\tstatic CDuiString GetCurrentPath();\n\t\tstatic HINSTANCE GetResourceDll();\n\t\tstatic const CDuiString& GetResourcePath();\n\t\tstatic const CDuiString& GetResourceZip();\n\t\tstatic bool IsCachedResourceZip();\n\t\tstatic BOOL CompressedPacketOpen(const TCHAR* filepath);\n\t\tstatic BOOL FindCompressedPacketResource(LPCTSTR lpszName, int *index, DWORD64 *dw64Ze);\n\t\tstatic BOOL GetCompressedPacketResource(int index, void *dst, DWORD64 len);\n\t\tstatic void SetInstance(HINSTANCE hInst);\n\t\tstatic void SetCurrentPath(LPCTSTR pStrPath);\n\t\tstatic void SetResourceDll(HINSTANCE hInst);\n\t\tstatic void SetResourcePath(LPCTSTR pStrPath);\n\t\tstatic void SetCompressedPacketResource(LPVOID pVoid, unsigned int len);\n\t\tstatic void SetCompressedPacketResource(LPCTSTR pstrZip, bool bCachedResourceZip = false);\n\t\tstatic void GetHSL(short* H, short* S, short* L);\n\t\tstatic void SetHSL(bool bUseHSL, short H, short S, short L); // H:0~360, S:0~200, L:0~200 \n\t\tstatic void ReloadSkin();\n\t\tstatic bool LoadPlugin(LPCTSTR pstrModuleName);\n\t\tstatic CStdPtrArray* GetPlugins();\n\n\t\tbool UseParentResource(CPaintManagerUI* pm);\n\t\tCPaintManagerUI* GetParentResource() const;\n\n\t\tDWORD GetDefaultDisabledColor() const;\n\t\tvoid SetDefaultDisabledColor(DWORD dwColor);\n\t\tDWORD GetDefaultFontColor() const;\n\t\tvoid SetDefaultFontColor(DWORD dwColor);\n\t\tDWORD GetDefaultLinkFontColor() const;\n\t\tvoid SetDefaultLinkFontColor(DWORD dwColor);\n\t\tDWORD GetDefaultLinkHoverFontColor() const;\n\t\tvoid SetDefaultLinkHoverFontColor(DWORD dwColor);\n\t\tDWORD GetDefaultSelectedBkColor() const;\n\t\tvoid SetDefaultSelectedBkColor(DWORD dwColor);\n\t\tTFontInfo* GetDefaultFontInfo();\n\t\tvoid SetDefaultFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic);\n\t\tDWORD GetCustomFontCount() const;\n\t\tHFONT AddFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic);\n\t\tHFONT AddFontAt(int index, LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic);\n\t\tHFONT GetFont(int index);\n\t\tHFONT GetFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic);\n\t\tbool FindFont(HFONT hFont);\n\t\tbool FindFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic);\n\t\tint GetFontIndex(HFONT hFont);\n\t\tint GetFontIndex(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic);\n\t\tbool RemoveFont(HFONT hFont);\n\t\tbool RemoveFontAt(int index);\n\t\tvoid RemoveAllFonts();\n\t\tTFontInfo* GetFontInfo(int index);\n\t\tTFontInfo* GetFontInfo(HFONT hFont);\n\n\t\tconst TImageInfo* GetImage(LPCTSTR bitmap);\n\t\tconst TImageInfo* GetImageEx(LPCTSTR bitmap, LPCTSTR type = NULL, DWORD mask = 0);\n\t\tconst TImageInfo* AddImage(LPCTSTR bitmap, LPCTSTR type = NULL, DWORD mask = 0);\n\t\tconst TImageInfo* AddImage(LPCTSTR bitmap, HBITMAP hBitmap, int iWidth, int iHeight, bool bAlpha);\n\t\tbool RemoveImage(LPCTSTR bitmap);\n\t\tvoid RemoveAllImages();\n\t\tvoid ReloadAllImages();\n\n\t\tvoid AddResString(LPCTSTR key,CDuiString* value);\n\t\tCDuiString* GetResString(LPCTSTR key);\n\t\tvoid PaserString(CDuiString& sStr);\n\t\tCDuiString* FindResString(LPCTSTR key);\n\t\tvoid RemoveAllResStrings();\n\n\t\tTStdStringPtrMap<CDuiString*>* GetResStringsHash();\n\t\tvoid AddDefaultAttributeList(LPCTSTR pStrControlName, LPCTSTR pStrControlAttrList);\n\t\tLPCTSTR GetDefaultAttributeList(LPCTSTR pStrControlName) const;\n\t\tbool RemoveDefaultAttributeList(LPCTSTR pStrControlName);\n\t\tconst CStdStringPtrMap& GetDefaultAttribultes() const;\n\t\tvoid RemoveAllDefaultAttributeList();\n\n\t\tbool AttachDialog(CControlUI* pControl);\n\t\tbool InitControls(CControlUI* pControl, CControlUI* pParent = NULL);\n\t\tvoid ReapObjects(CControlUI* pControl);\n\n\t\tbool AddOptionGroup(LPCTSTR pStrGroupName, CControlUI* pControl);\n\t\tCStdPtrArray* GetOptionGroup(LPCTSTR pStrGroupName);\n\t\tvoid RemoveOptionGroup(LPCTSTR pStrGroupName, CControlUI* pControl);\n\t\tvoid RemoveAllOptionGroups();\n\n\t\tCControlUI* GetFocus() const;\n\t\tvoid SetFocus(CControlUI* pControl);\n\t\tvoid SetFocusNeeded(CControlUI* pControl);\n\n\t\tbool SetNextTabControl(bool bForward = true);\n\n\t\tbool SetTimer(CControlUI* pControl, UINT nTimerID, UINT uElapse);\n\t\tbool KillTimer(CControlUI* pControl, UINT nTimerID);\n\t\tvoid KillTimer(CControlUI* pControl);\n\t\tvoid RemoveAllTimers();\n\n\t\tvoid SetCapture();\n\t\tvoid ReleaseCapture();\n\t\tbool IsCaptured();\n\n\t\tbool AddNotifier(INotifyUI* pControl);\n\t\tbool RemoveNotifier(INotifyUI* pControl);   \n\t\tvoid SendNotify(TNotifyUI& Msg, bool bAsync = false);\n\t\tvoid SendNotify(CControlUI* pControl, LPCTSTR pstrMessage, WPARAM wParam = 0, LPARAM lParam = 0, bool bAsync = false);\n\n\t\tbool AddPreMessageFilter(IMessageFilterUI* pFilter);\n\t\tbool RemovePreMessageFilter(IMessageFilterUI* pFilter);\n\n\t\tbool AddMessageFilter(IMessageFilterUI* pFilter);\n\t\tbool RemoveMessageFilter(IMessageFilterUI* pFilter);\n\n\t\tint GetPostPaintCount() const;\n\t\tbool AddPostPaint(CControlUI* pControl);\n\t\tbool RemovePostPaint(CControlUI* pControl);\n\t\tbool SetPostPaintIndex(CControlUI* pControl, int iIndex);\n\n\t\tvoid AddDelayedCleanup(CControlUI* pControl);\n\n\t\tbool AddTranslateAccelerator(ITranslateAccelerator *pTranslateAccelerator);\n\t\tbool RemoveTranslateAccelerator(ITranslateAccelerator *pTranslateAccelerator);\n\t\tbool TranslateAccelerator(LPMSG pMsg);\n\n\t\tCControlUI* GetRoot() const;\n\t\tCControlUI* FindControl(POINT pt) const;\n\t\tCControlUI* FindControl(LPCTSTR pstrName) const;\n\t\tCControlUI* FindSubControlByPoint(CControlUI* pParent, POINT pt) const;\n\t\tCControlUI* FindSubControlByName(CControlUI* pParent, LPCTSTR pstrName) const;\n\t\tCControlUI* FindSubControlByClass(CControlUI* pParent, LPCTSTR pstrClass, int iIndex = 0);\n\t\tCStdPtrArray* FindSubControlsByClass(CControlUI* pParent, LPCTSTR pstrClass);\n\t\tCStdPtrArray* GetSubControlsByClass();\n\n\t\tstatic void MessageLoop();\n\t\tstatic bool TranslateMessage(const LPMSG pMsg);\n\t\tstatic void Term();\n\n\t\tbool MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lRes);\n\t\tbool PreMessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lRes);\n\t\tvoid UsedVirtualWnd(bool bUsed);\n\n\t\tbool StartupGdiPlus();\n\t\tbool ShutdownGdiPlus();\n\n\tprivate:\n\t\tstatic CControlUI* CALLBACK __FindControlFromNameHash(CControlUI* pThis, LPVOID pData);\n\t\tstatic CControlUI* CALLBACK __FindControlFromCount(CControlUI* pThis, LPVOID pData);\n\t\tstatic CControlUI* CALLBACK __FindControlFromPoint(CControlUI* pThis, LPVOID pData);\n\t\tstatic CControlUI* CALLBACK __FindControlFromTab(CControlUI* pThis, LPVOID pData);\n\t\tstatic CControlUI* CALLBACK __FindControlFromShortcut(CControlUI* pThis, LPVOID pData);\n\t\tstatic CControlUI* CALLBACK __FindControlFromUpdate(CControlUI* pThis, LPVOID pData);\n\t\tstatic CControlUI* CALLBACK __FindControlFromName(CControlUI* pThis, LPVOID pData);\n\t\tstatic CControlUI* CALLBACK __FindControlFromClass(CControlUI* pThis, LPVOID pData);\n\t\tstatic CControlUI* CALLBACK __FindControlsFromClass(CControlUI* pThis, LPVOID pData);\n\n\tprivate:\n\t\tHWND m_hWndPaint;\n\t\tint m_nOpacity;\n\t\tHDC m_hDcPaint;\n\t\tHDC m_hDcOffscreen;\n\t\tHDC m_hDcBackground;\n\t\tHBITMAP m_hbmpOffscreen;\n\t\tHBITMAP m_hbmpBackground;\n\t\tHWND m_hwndTooltip;\n\t\tTOOLINFO m_ToolTip;\n\t\tbool m_bShowUpdateRect;\n\t\t//\n\t\tCControlUI* m_pRoot;\n\t\tCControlUI* m_pFocus;\n\t\tCControlUI* m_pEventHover;\n\t\tCControlUI* m_pEventClick;\n\t\tCControlUI* m_pEventKey;\n\t\t//\n\t\tPOINT m_ptLastMousePos;\n\t\tSIZE m_szMinWindow;\n\t\tSIZE m_szMaxWindow;\n\t\tSIZE m_szInitWindowSize;\n\t\tRECT m_rcSizeBox;\n\t\tSIZE m_szRoundCorner;\n\t\tRECT m_rcCaption;\n\t\tUINT m_uTimerID;\n\t\tbool m_bFirstLayout;\n\t\tbool m_bUpdateNeeded;\n\t\tbool m_bFocusNeeded;\n\t\tbool m_bOffscreenPaint;\n\t\tbool m_bAlphaBackground;\n\t\tbool m_bMouseTracking;\n\t\tbool m_bMouseCapture;\n\t\tbool m_bUsedVirtualWnd;\n\n\t\t//\n\t\tCStdPtrArray m_aNotifiers;\n\t\tCStdPtrArray m_aTimers;\n\t\tCStdPtrArray m_aPreMessageFilters;\n\t\tCStdPtrArray m_aMessageFilters;\n\t\tCStdPtrArray m_aPostPaintControls;\n\t\tCStdPtrArray m_aDelayedCleanup;\n\t\tCStdPtrArray m_aAsyncNotify;\n\t\tCStdPtrArray m_aFoundControls;\n\t\tCStdStringPtrMap m_mNameHash;\n\t\tCStdStringPtrMap m_mOptionGroup;\n\t\t//\n\t\tCPaintManagerUI* m_pParentResourcePM;\n\t\tDWORD m_dwDefaultDisabledColor;\n\t\tDWORD m_dwDefaultFontColor;\n\t\tDWORD m_dwDefaultLinkFontColor;\n\t\tDWORD m_dwDefaultLinkHoverFontColor;\n\t\tDWORD m_dwDefaultSelectedBkColor;\n\t\tTFontInfo m_DefaultFontInfo;\n\t\tCStdPtrArray m_aCustomFonts;\n\n\t\tCStdStringPtrMap m_mImageHash;\n\t\tCStdStringPtrMap m_DefaultAttrHash;\n\t\t//ַԴ\n\t\tTStdStringPtrMap<CDuiString*> m_ResStringsHash;\n\t\t//\n\t\tstatic HINSTANCE m_hInstance;\n\t\tstatic HINSTANCE m_hResourceInstance;\n\t\tstatic CDuiString m_pStrResourcePath;\n\t\tstatic CDuiString m_pStrResourceZip;\n\t\tstatic bool m_bCachedResourceZip;\n\n\t\tstatic CUnCompression *m_pResHandle;\n\n\t\tstatic short m_H;\n\t\tstatic short m_S;\n\t\tstatic short m_L;\n\t\tstatic CStdPtrArray m_aPreMessages;\n\t\tstatic CStdPtrArray m_aPlugins;\n\n\tpublic:\n\t\tstatic CDuiString m_pStrDefaultFontName;\n\t\tCStdPtrArray m_aTranslateAccelerator;\n\t};\n\n} // namespace DuiLib\n\n#endif // __UIMANAGER_H__\n"
  },
  {
    "path": "DuiLib/Core/UIMarkup.cpp",
    "content": "#include \"StdAfx.h\"\n\n#ifndef TRACE\n#define TRACE\n#endif\n\nnamespace DuiLib {\n\n\t///////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\t//\n\n\tCMarkupNode::CMarkupNode() : m_pOwner(NULL)\n\t{\n\t}\n\n\tCMarkupNode::CMarkupNode(CMarkup* pOwner, int iPos) : m_pOwner(pOwner), m_iPos(iPos), m_nAttributes(0)\n\t{\n\t}\n\n\tCMarkupNode CMarkupNode::GetSibling()\n\t{\n\t\tif( m_pOwner == NULL ) return CMarkupNode();\n\t\tULONG iPos = m_pOwner->m_pElements[m_iPos].iNext;\n\t\tif( iPos == 0 ) return CMarkupNode();\n\t\treturn CMarkupNode(m_pOwner, iPos);\n\t}\n\n\tbool CMarkupNode::HasSiblings() const\n\t{\n\t\tif( m_pOwner == NULL ) return false;\n\t\tULONG iPos = m_pOwner->m_pElements[m_iPos].iNext;\n\t\treturn iPos > 0;\n\t}\n\n\tCMarkupNode CMarkupNode::GetChild()\n\t{\n\t\tif( m_pOwner == NULL ) return CMarkupNode();\n\t\tULONG iPos = m_pOwner->m_pElements[m_iPos].iChild;\n\t\tif( iPos == 0 ) return CMarkupNode();\n\t\treturn CMarkupNode(m_pOwner, iPos);\n\t}\n\n\tCMarkupNode CMarkupNode::GetChild(LPCTSTR pstrName)\n\t{\n\t\tif( m_pOwner == NULL ) return CMarkupNode();\n\t\tULONG iPos = m_pOwner->m_pElements[m_iPos].iChild;\n\t\twhile( iPos != 0 ) {\n\t\t\tif( _tcscmp(m_pOwner->m_pstrXML + m_pOwner->m_pElements[iPos].iStart, pstrName) == 0 ) {\n\t\t\t\treturn CMarkupNode(m_pOwner, iPos);\n\t\t\t}\n\t\t\tiPos = m_pOwner->m_pElements[iPos].iNext;\n\t\t}\n\t\treturn CMarkupNode();\n\t}\n\n\tbool CMarkupNode::HasChildren() const\n\t{\n\t\tif( m_pOwner == NULL ) return false;\n\t\treturn m_pOwner->m_pElements[m_iPos].iChild != 0;\n\t}\n\n\tCMarkupNode CMarkupNode::GetParent()\n\t{\n\t\tif( m_pOwner == NULL ) return CMarkupNode();\n\t\tULONG iPos = m_pOwner->m_pElements[m_iPos].iParent;\n\t\tif( iPos == 0 ) return CMarkupNode();\n\t\treturn CMarkupNode(m_pOwner, iPos);\n\t}\n\n\tbool CMarkupNode::IsValid() const\n\t{\n\t\treturn m_pOwner != NULL;\n\t}\n\n\tLPCTSTR CMarkupNode::GetName() const\n\t{\n\t\tif( m_pOwner == NULL ) return NULL;\n\t\treturn m_pOwner->m_pstrXML + m_pOwner->m_pElements[m_iPos].iStart;\n\t}\n\n\tLPCTSTR CMarkupNode::GetValue() const\n\t{\n\t\tif( m_pOwner == NULL ) return NULL;\n\t\treturn m_pOwner->m_pstrXML + m_pOwner->m_pElements[m_iPos].iData;\n\t}\n\n\tLPCTSTR CMarkupNode::GetAttributeName(int iIndex)\n\t{\n\t\tif( m_pOwner == NULL ) return NULL;\n\t\tif( m_nAttributes == 0 ) _MapAttributes();\n\t\tif( iIndex < 0 || iIndex >= m_nAttributes ) return _T(\"\");\n\t\treturn m_pOwner->m_pstrXML + m_aAttributes[iIndex].iName;\n\t}\n\n\tLPCTSTR CMarkupNode::GetAttributeValue(int iIndex)\n\t{\n\t\tif( m_pOwner == NULL ) return NULL;\n\t\tif( m_nAttributes == 0 ) _MapAttributes();\n\t\tif( iIndex < 0 || iIndex >= m_nAttributes ) return _T(\"\");\n\t\treturn m_pOwner->m_pstrXML + m_aAttributes[iIndex].iValue;\n\t}\n\n\tLPCTSTR CMarkupNode::GetAttributeValue(LPCTSTR pstrName)\n\t{\n\t\tif( m_pOwner == NULL ) return NULL;\n\t\tif( m_nAttributes == 0 ) _MapAttributes();\n\t\tfor( int i = 0; i < m_nAttributes; i++ ) {\n\t\t\tif( _tcscmp(m_pOwner->m_pstrXML + m_aAttributes[i].iName, pstrName) == 0 ) return m_pOwner->m_pstrXML + m_aAttributes[i].iValue;\n\t\t}\n\t\treturn _T(\"\");\n\t}\n\n\tbool CMarkupNode::GetAttributeValue(int iIndex, LPTSTR pstrValue, SIZE_T cchMax)\n\t{\n\t\tif( m_pOwner == NULL ) return false;\n\t\tif( m_nAttributes == 0 ) _MapAttributes();\n\t\tif( iIndex < 0 || iIndex >= m_nAttributes ) return false;\n\t\t_tcsncpy(pstrValue, m_pOwner->m_pstrXML + m_aAttributes[iIndex].iValue, cchMax);\n\t\treturn true;\n\t}\n\n\tbool CMarkupNode::GetAttributeValue(LPCTSTR pstrName, LPTSTR pstrValue, SIZE_T cchMax)\n\t{\n\t\tif( m_pOwner == NULL ) return false;\n\t\tif( m_nAttributes == 0 ) _MapAttributes();\n\t\tfor( int i = 0; i < m_nAttributes; i++ ) {\n\t\t\tif( _tcscmp(m_pOwner->m_pstrXML + m_aAttributes[i].iName, pstrName) == 0 ) {\n\t\t\t\t_tcsncpy(pstrValue, m_pOwner->m_pstrXML + m_aAttributes[i].iValue, cchMax);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tint CMarkupNode::GetAttributeCount()\n\t{\n\t\tif( m_pOwner == NULL ) return 0;\n\t\tif( m_nAttributes == 0 ) _MapAttributes();\n\t\treturn m_nAttributes;\n\t}\n\n\tbool CMarkupNode::HasAttributes()\n\t{\n\t\tif( m_pOwner == NULL ) return false;\n\t\tif( m_nAttributes == 0 ) _MapAttributes();\n\t\treturn m_nAttributes > 0;\n\t}\n\n\tbool CMarkupNode::HasAttribute(LPCTSTR pstrName)\n\t{\n\t\tif( m_pOwner == NULL ) return false;\n\t\tif( m_nAttributes == 0 ) _MapAttributes();\n\t\tfor( int i = 0; i < m_nAttributes; i++ ) {\n\t\t\tif( _tcscmp(m_pOwner->m_pstrXML + m_aAttributes[i].iName, pstrName) == 0 ) return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tvoid CMarkupNode::_MapAttributes()\n\t{\n\t\tm_nAttributes = 0;\n\t\tLPCTSTR pstr = m_pOwner->m_pstrXML + m_pOwner->m_pElements[m_iPos].iStart;\n\t\tLPCTSTR pstrEnd = m_pOwner->m_pstrXML + m_pOwner->m_pElements[m_iPos].iData;\n\t\tpstr += _tcslen(pstr) + 1;\n\t\twhile( pstr < pstrEnd ) {\n\t\t\tm_pOwner->_SkipWhitespace(pstr);\n\t\t\tm_aAttributes[m_nAttributes].iName = pstr - m_pOwner->m_pstrXML;\n\t\t\tpstr += _tcslen(pstr) + 1;\n\t\t\tm_pOwner->_SkipWhitespace(pstr);\n\t\t\tif( *pstr++ != _T('\\\"') ) return; // if( *pstr != _T('\\\"') ) { pstr = ::CharNext(pstr); return; }\n\n\t\t\tm_aAttributes[m_nAttributes++].iValue = pstr - m_pOwner->m_pstrXML;\n\t\t\tif( m_nAttributes >= MAX_XML_ATTRIBUTES ) return;\n\t\t\tpstr += _tcslen(pstr) + 1;\n\t\t}\n\t}\n\n\n\t///////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\t//\n\n\tCMarkup::CMarkup(LPCTSTR pstrXML)\n\t{\n\t\tm_pstrXML = NULL;\n\t\tm_pElements = NULL;\n\t\tm_nElements = 0;\n\t\tm_bPreserveWhitespace = true;\n\t\tif( pstrXML != NULL ) Load(pstrXML);\n\t}\n\n\tCMarkup::~CMarkup()\n\t{\n\t\tRelease();\n\t}\n\n\tbool CMarkup::IsValid() const\n\t{\n\t\treturn m_pElements != NULL;\n\t}\n\n\tvoid CMarkup::SetPreserveWhitespace(bool bPreserve)\n\t{\n\t\tm_bPreserveWhitespace = bPreserve;\n\t}\n\n\tbool CMarkup::Load(LPCTSTR pstrXML)\n\t{\n\t\tRelease();\n\t\tSIZE_T cchLen = _tcslen(pstrXML) + 1;\n\t\tm_pstrXML = static_cast<LPTSTR>(malloc(cchLen * sizeof(TCHAR)));\n\t\t::CopyMemory(m_pstrXML, pstrXML, cchLen * sizeof(TCHAR));\n\t\tbool bRes = _Parse();\n\t\tif( !bRes ) Release();\n\t\treturn bRes;\n\t}\n\n\tbool CMarkup::LoadFromMem(BYTE* pByte, DWORD dwSize, int encoding)\n\t{\n#ifdef _UNICODE\n\t\tif (encoding == XMLFILE_ENCODING_UTF8)\n\t\t{\n\t\t\tif( dwSize >= 3 && pByte[0] == 0xEF && pByte[1] == 0xBB && pByte[2] == 0xBF ) \n\t\t\t{\n\t\t\t\tpByte += 3; dwSize -= 3;\n\t\t\t}\n\t\t\tDWORD nWide = ::MultiByteToWideChar( CP_UTF8, 0, (LPCSTR)pByte, dwSize, NULL, 0 );\n\n\t\t\tm_pstrXML = static_cast<LPTSTR>(malloc((nWide + 1)*sizeof(TCHAR)));\n\t\t\t::MultiByteToWideChar( CP_UTF8, 0, (LPCSTR)pByte, dwSize, m_pstrXML, nWide );\n\t\t\tm_pstrXML[nWide] = _T('\\0');\n\t\t}\n\t\telse if (encoding == XMLFILE_ENCODING_ASNI)\n\t\t{\n\t\t\tDWORD nWide = ::MultiByteToWideChar( CP_ACP, 0, (LPCSTR)pByte, dwSize, NULL, 0 );\n\n\t\t\tm_pstrXML = static_cast<LPTSTR>(malloc((nWide + 1)*sizeof(TCHAR)));\n\t\t\t::MultiByteToWideChar( CP_ACP, 0, (LPCSTR)pByte, dwSize, m_pstrXML, nWide );\n\t\t\tm_pstrXML[nWide] = _T('\\0');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( dwSize >= 2 && ( ( pByte[0] == 0xFE && pByte[1] == 0xFF ) || ( pByte[0] == 0xFF && pByte[1] == 0xFE ) ) )\n\t\t\t{\n\t\t\t\tdwSize = dwSize / 2 - 1;\n\n\t\t\t\tif ( pByte[0] == 0xFE && pByte[1] == 0xFF )\n\t\t\t\t{\n\t\t\t\t\tpByte += 2;\n\n\t\t\t\t\tfor ( DWORD nSwap = 0 ; nSwap < dwSize ; nSwap ++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tregister CHAR nTemp = pByte[ ( nSwap << 1 ) + 0 ];\n\t\t\t\t\t\tpByte[ ( nSwap << 1 ) + 0 ] = pByte[ ( nSwap << 1 ) + 1 ];\n\t\t\t\t\t\tpByte[ ( nSwap << 1 ) + 1 ] = nTemp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpByte += 2;\n\t\t\t\t}\n\n\t\t\t\tm_pstrXML = static_cast<LPTSTR>(malloc((dwSize + 1)*sizeof(TCHAR)));\n\t\t\t\t::CopyMemory( m_pstrXML, pByte, dwSize * sizeof(TCHAR) );\n\t\t\t\tm_pstrXML[dwSize] = _T('\\0');\n\n\t\t\t\tpByte -= 2;\n\t\t\t}\n\t\t}\n#else // !_UNICODE\n\t\tif (encoding == XMLFILE_ENCODING_UTF8)\n\t\t{\n\t\t\tif( dwSize >= 3 && pByte[0] == 0xEF && pByte[1] == 0xBB && pByte[2] == 0xBF ) \n\t\t\t{\n\t\t\t\tpByte += 3; dwSize -= 3;\n\t\t\t}\n\t\t\tDWORD nWide = ::MultiByteToWideChar( CP_UTF8, 0, (LPCSTR)pByte, dwSize, NULL, 0 );\n\n\t\t\tLPWSTR w_str = static_cast<LPWSTR>(malloc((nWide + 1)*sizeof(WCHAR)));\n\t\t\t::MultiByteToWideChar( CP_UTF8, 0, (LPCSTR)pByte, dwSize, w_str, nWide );\n\t\t\tw_str[nWide] = L'\\0';\n\n\t\t\tDWORD wide = ::WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)w_str, nWide, NULL, 0, NULL, NULL);\n\n\t\t\tm_pstrXML = static_cast<LPTSTR>(malloc((wide + 1)*sizeof(TCHAR)));\n\t\t\t::WideCharToMultiByte( CP_ACP, 0, (LPCWSTR)w_str, nWide, m_pstrXML, wide, NULL, NULL);\n\t\t\tm_pstrXML[wide] = _T('\\0');\n\n\t\t\tfree(w_str);\n\t\t}\n\t\telse if (encoding == XMLFILE_ENCODING_UNICODE)\n\t\t{\n\t\t\tif ( dwSize >= 2 && ( ( pByte[0] == 0xFE && pByte[1] == 0xFF ) || ( pByte[0] == 0xFF && pByte[1] == 0xFE ) ) )\n\t\t\t{\n\t\t\t\tdwSize = dwSize / 2 - 1;\n\n\t\t\t\tif ( pByte[0] == 0xFE && pByte[1] == 0xFF )\n\t\t\t\t{\n\t\t\t\t\tpByte += 2;\n\n\t\t\t\t\tfor ( DWORD nSwap = 0 ; nSwap < dwSize ; nSwap ++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tregister CHAR nTemp = pByte[ ( nSwap << 1 ) + 0 ];\n\t\t\t\t\t\tpByte[ ( nSwap << 1 ) + 0 ] = pByte[ ( nSwap << 1 ) + 1 ];\n\t\t\t\t\t\tpByte[ ( nSwap << 1 ) + 1 ] = nTemp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpByte += 2;\n\t\t\t\t}\n\n\t\t\t\tDWORD nWide = ::WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)pByte, dwSize, NULL, 0, NULL, NULL);\n\t\t\t\tm_pstrXML = static_cast<LPTSTR>(malloc((nWide + 1)*sizeof(TCHAR)));\n\t\t\t\t::WideCharToMultiByte( CP_ACP, 0, (LPCWSTR)pByte, dwSize, m_pstrXML, nWide, NULL, NULL);\n\t\t\t\tm_pstrXML[nWide] = _T('\\0');\n\n\t\t\t\tpByte -= 2;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_pstrXML = static_cast<LPTSTR>(malloc((dwSize + 1)*sizeof(TCHAR)));\n\t\t\t::CopyMemory( m_pstrXML, pByte, dwSize * sizeof(TCHAR) );\n\t\t\tm_pstrXML[dwSize] = _T('\\0');\n\t\t}\n#endif // _UNICODE\n\n\t\tbool bRes = _Parse();\n\t\tif( !bRes ) Release();\n\t\treturn bRes;\n\t}\n\n\tbool CMarkup::LoadFromFile(LPCTSTR pstrFilename, int encoding)\n\t{\n\t\tRelease();\n\t\tCDuiString sFile = CPaintManagerUI::GetResourcePath();\n\t\tif( CPaintManagerUI::GetResourceZip().IsEmpty() ) {\n\t\t\tsFile += pstrFilename;\n\t\t\tHANDLE hFile = ::CreateFile(sFile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);\n\t\t\tif( hFile == INVALID_HANDLE_VALUE ) return _Failed(_T(\"Error opening file\"));\n\t\t\tDWORD dwSize = ::GetFileSize(hFile, NULL);\n\t\t\tif( dwSize == 0 ) return _Failed(_T(\"File is empty\"));\n\t\t\tif ( dwSize > 4096*1024 ) return _Failed(_T(\"File too large\"));\n\n\t\t\tDWORD dwRead = 0;\n\t\t\tBYTE* pByte = new BYTE[ dwSize ];\n\t\t\t::ReadFile( hFile, pByte, dwSize, &dwRead, NULL );\n\t\t\t::CloseHandle( hFile );\n\n\t\t\tif( dwRead != dwSize ) {\n\t\t\t\tdelete[] pByte;\n\t\t\t\tRelease();\n\t\t\t\treturn _Failed(_T(\"Could not read file\"));\n\t\t\t}\n\t\t\tbool ret = LoadFromMem(pByte, dwSize, encoding);\n\t\t\tdelete[] pByte;\n\n\t\t\treturn ret;\n\t\t}\n\t\telse {\n\n\t\t\tDWORD64 dw64Size = -1;\n\t\t\tint index = -1;\n\t\t\tif (!CPaintManagerUI::IsCachedResourceZip( ))\n\t\t\t{\n\t\t\t\tsFile += CPaintManagerUI::GetResourceZip( );\n\t\t\t\tif (!CPaintManagerUI::CompressedPacketOpen(sFile.GetData( )))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (!CPaintManagerUI::FindCompressedPacketResource(pstrFilename, &index, &dw64Size))\n\t\t\t{\n\t\t\t\treturn _Failed(_T(\"Could not find ziped file\"));\n\t\t\t}\n\t\t\tDWORD dwSize = dw64Size;\n\t\t\tASSERT( dw64Size == dwSize );\n\n\t\t\tif( dwSize == 0 ) return _Failed(_T(\"File is empty\"));\n\t\t\tif ( dwSize > 4096*1024 ) return _Failed(_T(\"File too large\"));\n\t\t\tBYTE* pByte = new BYTE[ dwSize ];\n\n\t\t\tif( !CPaintManagerUI::GetCompressedPacketResource(index,pByte,dw64Size) ) {\n\t\t\t\tdelete[] pByte;\n\t\t\t\treturn _Failed(_T(\"Could not unzip file\"));\n\t\t\t}\n\t\t\tbool ret = LoadFromMem(pByte, dwSize, encoding);\n\t\t\tdelete[] pByte;\n\n\t\t\treturn ret;\n\t\t}\n\t}\n\n\tvoid CMarkup::Release()\n\t{\n\t\tif( m_pstrXML != NULL ) free(m_pstrXML);\n\t\tif( m_pElements != NULL ) free(m_pElements);\n\t\tm_pstrXML = NULL;\n\t\tm_pElements = NULL;\n\t\tm_nElements;\n\t}\n\n\tvoid CMarkup::GetLastErrorMessage(LPTSTR pstrMessage, SIZE_T cchMax) const\n\t{\n\t\t_tcsncpy(pstrMessage, m_szErrorMsg, cchMax);\n\t}\n\n\tvoid CMarkup::GetLastErrorLocation(LPTSTR pstrSource, SIZE_T cchMax) const\n\t{\n\t\t_tcsncpy(pstrSource, m_szErrorXML, cchMax);\n\t}\n\n\tCMarkupNode CMarkup::GetRoot()\n\t{\n\t\tif( m_nElements == 0 ) return CMarkupNode();\n\t\treturn CMarkupNode(this, 1);\n\t}\n\n\tbool CMarkup::_Parse()\n\t{\n\t\t_ReserveElement(); // Reserve index 0 for errors\n\t\t::ZeroMemory(m_szErrorMsg, sizeof(m_szErrorMsg));\n\t\t::ZeroMemory(m_szErrorXML, sizeof(m_szErrorXML));\n\t\tLPTSTR pstrXML = m_pstrXML;\n\t\treturn _Parse(pstrXML, 0);\n\t}\n\n\tbool CMarkup::_Parse(LPTSTR& pstrText, ULONG iParent)\n\t{\n\t\t_SkipWhitespace(pstrText);\n\t\tULONG iPrevious = 0; \n\t\tfor( ; ; ) \n\t\t{\n\t\t\tif( *pstrText == _T('\\0') && iParent <= 1 ) return true;\n\t\t\t_SkipWhitespace(pstrText);\n\t\t\tif( *pstrText != _T('<') ) return _Failed(_T(\"Expected start tag\"), pstrText);\n\t\t\tif( pstrText[1] == _T('/') ) return true;\n\t\t\t*pstrText++ = _T('\\0');\n\t\t\t_SkipWhitespace(pstrText);\n\t\t\t// Skip comment or processing directive\n\t\t\tif( *pstrText == _T('!') || *pstrText == _T('?') ) {\n\t\t\t\tTCHAR ch = *pstrText;\n\t\t\t\tif( *pstrText == _T('!') ) ch = _T('-');\n\t\t\t\twhile( *pstrText != _T('\\0') && !(*pstrText == ch && *(pstrText + 1) == _T('>')) ) pstrText = ::CharNext(pstrText);\n\t\t\t\tif( *pstrText != _T('\\0') ) pstrText += 2;\n\t\t\t\t_SkipWhitespace(pstrText);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t_SkipWhitespace(pstrText);\n\t\t\t// Fill out element structure\n\t\t\tXMLELEMENT* pEl = _ReserveElement();\n\t\t\tULONG iPos = pEl - m_pElements;\n\t\t\tpEl->iStart = pstrText - m_pstrXML;\n\t\t\tpEl->iParent = iParent;\n\t\t\tpEl->iNext = pEl->iChild = 0;\n\t\t\tif( iPrevious != 0 ) m_pElements[iPrevious].iNext = iPos;\n\t\t\telse if( iParent > 0 ) m_pElements[iParent].iChild = iPos;\n\t\t\tiPrevious = iPos;\n\t\t\t// Parse name\n\t\t\tLPCTSTR pstrName = pstrText;\n\t\t\t_SkipIdentifier(pstrText);\n\t\t\tLPTSTR pstrNameEnd = pstrText;\n\t\t\tif( *pstrText == _T('\\0') ) return _Failed(_T(\"Error parsing element name\"), pstrText);\n\t\t\t// Parse attributes\n\t\t\tif( !_ParseAttributes(pstrText) ) return false;\n\t\t\t_SkipWhitespace(pstrText);\n\t\t\tif( pstrText[0] == _T('/') && pstrText[1] == _T('>') )\n\t\t\t{\n\t\t\t\tpEl->iData = pstrText - m_pstrXML;\n\t\t\t\t*pstrText = _T('\\0');\n\t\t\t\tpstrText += 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( *pstrText != _T('>') ) return _Failed(_T(\"Expected start-tag closing\"), pstrText);\n\t\t\t\t// Parse node data\n\t\t\t\tpEl->iData = ++pstrText - m_pstrXML;\n\t\t\t\tLPTSTR pstrDest = pstrText;\n\t\t\t\tif( !_ParseData(pstrText, pstrDest, _T('<')) ) return false;\n\t\t\t\t// Determine type of next element\n\t\t\t\tif( *pstrText == _T('\\0') && iParent <= 1 ) return true;\n\t\t\t\tif( *pstrText != _T('<') ) return _Failed(_T(\"Expected end-tag start\"), pstrText);\n\t\t\t\tif( pstrText[0] == _T('<') && pstrText[1] != _T('/') ) \n\t\t\t\t{\n\t\t\t\t\tif( !_Parse(pstrText, iPos) ) return false;\n\t\t\t\t}\n\t\t\t\tif( pstrText[0] == _T('<') && pstrText[1] == _T('/') ) \n\t\t\t\t{\n\t\t\t\t\t*pstrDest = _T('\\0');\n\t\t\t\t\t*pstrText = _T('\\0');\n\t\t\t\t\tpstrText += 2;\n\t\t\t\t\t_SkipWhitespace(pstrText);\n\t\t\t\t\tSIZE_T cchName = pstrNameEnd - pstrName;\n\t\t\t\t\tif( _tcsncmp(pstrText, pstrName, cchName) != 0 ) return _Failed(_T(\"Unmatched closing tag\"), pstrText);\n\t\t\t\t\tpstrText += cchName;\n\t\t\t\t\t_SkipWhitespace(pstrText);\n\t\t\t\t\tif( *pstrText++ != _T('>') ) return _Failed(_T(\"Unmatched closing tag\"), pstrText);\n\t\t\t\t}\n\t\t\t}\n\t\t\t*pstrNameEnd = _T('\\0');\n\t\t\t_SkipWhitespace(pstrText);\n\t\t}\n\t}\n\n\n\tCMarkup::XMLELEMENT* CMarkup::_ReserveElement()\n\t{\n\t\tif( m_nElements == 0 )\n\t\t{\n\t\t\tm_nReservedElements = 0;\n\t\t}\n\t\tif( m_nElements >= m_nReservedElements )\n\t\t{\n\t\t\tULONG nNewElement = (m_nReservedElements / 2) + 500;\n\t\t\tm_nReservedElements += nNewElement;\n\t\t\tm_pElements = static_cast<XMLELEMENT*>(realloc(m_pElements, m_nReservedElements * sizeof(XMLELEMENT)));\n\t\t\tmemset(m_pElements + m_nElements,0,nNewElement * sizeof(XMLELEMENT)); //Initialize new calloced memory\n\t\t}\n\t\treturn &m_pElements[m_nElements++];\n\t}\n\n\n\tvoid CMarkup::_SkipWhitespace(LPCTSTR& pstr) const\n\t{\n\t\twhile( *pstr > _T('\\0') && *pstr <= _T(' ') ) pstr = ::CharNext(pstr);\n\t}\n\n\tvoid CMarkup::_SkipWhitespace(LPTSTR& pstr) const\n\t{\n\t\twhile( *pstr > _T('\\0') && *pstr <= _T(' ') ) pstr = ::CharNext(pstr);\n\t}\n\n\tvoid CMarkup::_SkipIdentifier(LPCTSTR& pstr) const\n\t{\n\t\t// ֻӢģû\n\t\twhile( *pstr != _T('\\0') && (*pstr == _T('_') || *pstr == _T(':') || _istalnum(*pstr)) ) pstr = ::CharNext(pstr);\n\t}\n\n\tvoid CMarkup::_SkipIdentifier(LPTSTR& pstr) const\n\t{\n\t\t// ֻӢģû\n\t\twhile( *pstr != _T('\\0') && (*pstr == _T('_') || *pstr == _T(':') || _istalnum(*pstr)) ) pstr = ::CharNext(pstr);\n\t}\n\n\tbool CMarkup::_ParseAttributes(LPTSTR& pstrText)\n\t{   \n\t\tif( *pstrText == _T('>') ) return true;\n\t\tif (*pstrText==_T('/'))\n\t\t{\n\t\t\treturn true;//<ManualOpera /> <ManualOpera/>\n\t\t}\n\n\t\t*pstrText++ = _T('\\0');\n\n\t\t_SkipWhitespace(pstrText);\n\t\twhile( *pstrText != _T('\\0') && *pstrText != _T('>') && *pstrText != _T('/') ) {\n\t\t\t_SkipIdentifier(pstrText);\n\t\t\tLPTSTR pstrIdentifierEnd = pstrText;\n\t\t\t_SkipWhitespace(pstrText);\n\t\t\tif( *pstrText != _T('=') ) return _Failed(_T(\"Error while parsing attributes\"), pstrText);\n\t\t\t*pstrText++ = _T(' ');\n\t\t\t*pstrIdentifierEnd = _T('\\0');\n\t\t\t_SkipWhitespace(pstrText);\n\t\t\tif( *pstrText++ != _T('\\\"') ) return _Failed(_T(\"Expected attribute value\"), pstrText);\n\t\t\tLPTSTR pstrDest = pstrText;\n\t\t\tif( !_ParseData(pstrText, pstrDest, _T('\\\"')) ) return false;\n\t\t\tif( *pstrText == _T('\\0') ) return _Failed(_T(\"Error while parsing attribute string\"), pstrText);\n\t\t\t*pstrDest = _T('\\0');\n\t\t\tif( pstrText != pstrDest ) *pstrText = _T(' ');\n\t\t\tpstrText++;\n\t\t\t_SkipWhitespace(pstrText);\n\t\t}\n\t\treturn true;\n\t}\n\n\tbool CMarkup::_ParseData(LPTSTR& pstrText, LPTSTR& pstrDest, char cEnd)\n\t{\n\t\twhile( *pstrText != _T('\\0') && *pstrText != cEnd ) {\n\t\t\tif( *pstrText == _T('&') ) {\n\t\t\t\twhile( *pstrText == _T('&') ) {\n\t\t\t\t\t_ParseMetaChar(++pstrText, pstrDest);\n\t\t\t\t}\n\t\t\t\tif (*pstrText == cEnd)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif( *pstrText == _T(' ') ) {\n\t\t\t\t*pstrDest++ = *pstrText++;\n\t\t\t\tif( !m_bPreserveWhitespace ) _SkipWhitespace(pstrText);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tLPTSTR pstrTemp = ::CharNext(pstrText);\n\t\t\t\twhile( pstrText < pstrTemp) {\n\t\t\t\t\t*pstrDest++ = *pstrText++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Make sure that MapAttributes() works correctly when it parses\n\t\t// over a value that has been transformed.\n\t\tLPTSTR pstrFill = pstrDest + 1;\n\t\twhile( pstrFill < pstrText ) *pstrFill++ = _T(' ');\n\t\treturn true;\n\t}\n\n\tvoid CMarkup::_ParseMetaChar(LPTSTR& pstrText, LPTSTR& pstrDest)\n\t{\n\t\tif( pstrText[0] == _T('a') && pstrText[1] == _T('m') && pstrText[2] == _T('p') && pstrText[3] == _T(';') ) {\n\t\t\t*pstrDest++ = _T('&');\n\t\t\tpstrText += 4;\n\t\t}\n\t\telse if( pstrText[0] == _T('l') && pstrText[1] == _T('t') && pstrText[2] == _T(';') ) {\n\t\t\t*pstrDest++ = _T('<');\n\t\t\tpstrText += 3;\n\t\t}\n\t\telse if( pstrText[0] == _T('g') && pstrText[1] == _T('t') && pstrText[2] == _T(';') ) {\n\t\t\t*pstrDest++ = _T('>');\n\t\t\tpstrText += 3;\n\t\t}\n\t\telse if( pstrText[0] == _T('q') && pstrText[1] == _T('u') && pstrText[2] == _T('o') && pstrText[3] == _T('t') && pstrText[4] == _T(';') ) {\n\t\t\t*pstrDest++ = _T('\\\"');\n\t\t\tpstrText += 5;\n\t\t}\n\t\telse if( pstrText[0] == _T('a') && pstrText[1] == _T('p') && pstrText[2] == _T('o') && pstrText[3] == _T('s') && pstrText[4] == _T(';') ) {\n\t\t\t*pstrDest++ = _T('\\'');\n\t\t\tpstrText += 5;\n\t\t}\n\t\telse {\n\t\t\t*pstrDest++ = _T('&');\n\t\t}\n\t}\n\n\tbool CMarkup::_Failed(LPCTSTR pstrError, LPCTSTR pstrLocation)\n\t{\n\t\t// Register last error\n\t\tTRACE(_T(\"XML Error: %s\"), pstrError);\n\t\tif( pstrLocation != NULL ) TRACE(pstrLocation);\n\t\t_tcsncpy(m_szErrorMsg, pstrError, (sizeof(m_szErrorMsg) / sizeof(m_szErrorMsg[0])) - 1);\n\t\t_tcsncpy(m_szErrorXML, pstrLocation != NULL ? pstrLocation : _T(\"\"), lengthof(m_szErrorXML) - 1);\n\t\treturn false; // Always return 'false'\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Core/UIMarkup.h",
    "content": "#ifndef __UIMARKUP_H__\n#define __UIMARKUP_H__\n\n#pragma once\n\nnamespace DuiLib {\n\nenum\n{\n    XMLFILE_ENCODING_UTF8 = 0,\n    XMLFILE_ENCODING_UNICODE = 1,\n    XMLFILE_ENCODING_ASNI = 2,\n};\n\nclass CMarkup;\nclass CMarkupNode;\n\n\nclass UILIB_API CMarkup\n{\n    friend class CMarkupNode;\npublic:\n    CMarkup(LPCTSTR pstrXML = NULL);\n    ~CMarkup();\n\n    bool Load(LPCTSTR pstrXML);\n    bool LoadFromMem(BYTE* pByte, DWORD dwSize, int encoding = XMLFILE_ENCODING_UTF8);\n    bool LoadFromFile(LPCTSTR pstrFilename, int encoding = XMLFILE_ENCODING_UTF8);\n    void Release();\n    bool IsValid() const;\n\n    void SetPreserveWhitespace(bool bPreserve = true);\n    void GetLastErrorMessage(LPTSTR pstrMessage, SIZE_T cchMax) const;\n    void GetLastErrorLocation(LPTSTR pstrSource, SIZE_T cchMax) const;\n\n    CMarkupNode GetRoot();\n\nprivate:\n    typedef struct tagXMLELEMENT\n    {\n        ULONG iStart;\n        ULONG iChild;\n        ULONG iNext;\n        ULONG iParent;\n        ULONG iData;\n    } XMLELEMENT;\n\n    LPTSTR m_pstrXML;\n    XMLELEMENT* m_pElements;\n    ULONG m_nElements;\n    ULONG m_nReservedElements;\n    TCHAR m_szErrorMsg[100];\n    TCHAR m_szErrorXML[50];\n    bool m_bPreserveWhitespace;\n\nprivate:\n    bool _Parse();\n    bool _Parse(LPTSTR& pstrText, ULONG iParent);\n    XMLELEMENT* _ReserveElement();\n    inline void _SkipWhitespace(LPTSTR& pstr) const;\n    inline void _SkipWhitespace(LPCTSTR& pstr) const;\n    inline void _SkipIdentifier(LPTSTR& pstr) const;\n    inline void _SkipIdentifier(LPCTSTR& pstr) const;\n    bool _ParseData(LPTSTR& pstrText, LPTSTR& pstrData, char cEnd);\n    void _ParseMetaChar(LPTSTR& pstrText, LPTSTR& pstrDest);\n    bool _ParseAttributes(LPTSTR& pstrText);\n    bool _Failed(LPCTSTR pstrError, LPCTSTR pstrLocation = NULL);\n};\n\n\nclass UILIB_API CMarkupNode\n{\n    friend class CMarkup;\nprivate:\n    CMarkupNode();\n    CMarkupNode(CMarkup* pOwner, int iPos);\n\npublic:\n    bool IsValid() const;\n\n    CMarkupNode GetParent();\n    CMarkupNode GetSibling();\n    CMarkupNode GetChild();\n    CMarkupNode GetChild(LPCTSTR pstrName);\n\n    bool HasSiblings() const;\n    bool HasChildren() const;\n    LPCTSTR GetName() const;\n    LPCTSTR GetValue() const;\n\n    bool HasAttributes();\n    bool HasAttribute(LPCTSTR pstrName);\n    int GetAttributeCount();\n    LPCTSTR GetAttributeName(int iIndex);\n    LPCTSTR GetAttributeValue(int iIndex);\n    LPCTSTR GetAttributeValue(LPCTSTR pstrName);\n    bool GetAttributeValue(int iIndex, LPTSTR pstrValue, SIZE_T cchMax);\n    bool GetAttributeValue(LPCTSTR pstrName, LPTSTR pstrValue, SIZE_T cchMax);\n\nprivate:\n    void _MapAttributes();\n\n    enum { MAX_XML_ATTRIBUTES = 64 };\n\n    typedef struct\n    {\n        ULONG iName;\n        ULONG iValue;\n    } XMLATTRIBUTE;\n\n    int m_iPos;\n    int m_nAttributes;\n    XMLATTRIBUTE m_aAttributes[MAX_XML_ATTRIBUTES];\n    CMarkup* m_pOwner;\n};\n\n} // namespace DuiLib\n\n#endif // __UIMARKUP_H__\n"
  },
  {
    "path": "DuiLib/Core/UIRender.cpp",
    "content": "#include \"StdAfx.h\"\n\nextern \"C\"\n{\n\textern unsigned char *stbi_load_from_memory(unsigned char const *buffer, int len, int *x, int *y, \\\n\t\tint *comp, int req_comp);\n\textern void     stbi_image_free(void *retval_from_stbi_load);\n\n};\n\nnamespace DuiLib {\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCRenderClip::~CRenderClip()\n\t{\n\t\tASSERT(::GetObjectType(hDC) == OBJ_DC || ::GetObjectType(hDC) == OBJ_MEMDC);\n\t\tASSERT(::GetObjectType(hRgn) == OBJ_REGION);\n\t\tASSERT(::GetObjectType(hOldRgn) == OBJ_REGION);\n\t\t::SelectClipRgn(hDC, hOldRgn);\n\t\t::DeleteObject(hOldRgn);\n\t\t::DeleteObject(hRgn);\n\t}\n\n\tvoid CRenderClip::GenerateClip(HDC hDC, RECT rc, CRenderClip& clip)\n\t{\n\t\tRECT rcClip = { 0 };\n\t\t::GetClipBox(hDC, &rcClip);\n\t\tclip.hOldRgn = ::CreateRectRgnIndirect(&rcClip);\n\t\tclip.hRgn = ::CreateRectRgnIndirect(&rc);\n\t\t::ExtSelectClipRgn(hDC, clip.hRgn, RGN_AND);\n\t\tclip.hDC = hDC;\n\t\tclip.rcItem = rc;\n\t}\n\n\tvoid CRenderClip::GenerateRoundClip(HDC hDC, RECT rc, RECT rcItem, int width, int height, CRenderClip& clip)\n\t{\n\t\tRECT rcClip = { 0 };\n\t\t::GetClipBox(hDC, &rcClip);\n\t\tclip.hOldRgn = ::CreateRectRgnIndirect(&rcClip);\n\t\tclip.hRgn = ::CreateRectRgnIndirect(&rc);\n\t\tHRGN hRgnItem = ::CreateRoundRectRgn(rcItem.left, rcItem.top, rcItem.right + 1, rcItem.bottom + 1, width, height);\n\t\t::CombineRgn(clip.hRgn, clip.hRgn, hRgnItem, RGN_AND);\n\t\t::ExtSelectClipRgn(hDC, clip.hRgn, RGN_AND);\n\t\tclip.hDC = hDC;\n\t\tclip.rcItem = rc;\n\t\t::DeleteObject(hRgnItem);\n\t}\n\n\tvoid CRenderClip::UseOldClipBegin(HDC hDC, CRenderClip& clip)\n\t{\n\t\t::SelectClipRgn(hDC, clip.hOldRgn);\n\t}\n\n\tvoid CRenderClip::UseOldClipEnd(HDC hDC, CRenderClip& clip)\n\t{\n\t\t::SelectClipRgn(hDC, clip.hRgn);\n\t}\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tstatic const float OneThird = 1.0f / 3;\n\n\tstatic void RGBtoHSL(DWORD ARGB, float* H, float* S, float* L) {\n\t\tconst float\n\t\t\tR = (float)GetRValue(ARGB),\n\t\t\tG = (float)GetGValue(ARGB),\n\t\t\tB = (float)GetBValue(ARGB),\n\t\t\tnR = (R < 0 ? 0 : (R>255 ? 255 : R)) / 255,\n\t\t\tnG = (G < 0 ? 0 : (G>255 ? 255 : G)) / 255,\n\t\t\tnB = (B < 0 ? 0 : (B>255 ? 255 : B)) / 255,\n\t\t\tm = min(min(nR, nG), nB),\n\t\t\tM = max(max(nR, nG), nB);\n\t\t*L = (m + M) / 2;\n\t\tif (M == m) *H = *S = 0;\n\t\telse {\n\t\t\tconst float\n\t\t\t\tf = (nR == m) ? (nG - nB) : ((nG == m) ? (nB - nR) : (nR - nG)),\n\t\t\t\ti = (nR == m) ? 3.0f : ((nG == m) ? 5.0f : 1.0f);\n\t\t\t*H = (i - f / (M - m));\n\t\t\tif (*H >= 6) *H -= 6;\n\t\t\t*H *= 60;\n\t\t\t*S = (2 * (*L) <= 1) ? ((M - m) / (M + m)) : ((M - m) / (2 - M - m));\n\t\t}\n\t}\n\n\tstatic void HSLtoRGB(DWORD* ARGB, float H, float S, float L) {\n\t\tconst float\n\t\t\tq = 2 * L < 1 ? L*(1 + S) : (L + S - L*S),\n\t\t\tp = 2 * L - q,\n\t\t\th = H / 360,\n\t\t\ttr = h + OneThird,\n\t\t\ttg = h,\n\t\t\ttb = h - OneThird,\n\t\t\tntr = tr < 0 ? tr + 1 : (tr>1 ? tr - 1 : tr),\n\t\t\tntg = tg < 0 ? tg + 1 : (tg>1 ? tg - 1 : tg),\n\t\t\tntb = tb < 0 ? tb + 1 : (tb>1 ? tb - 1 : tb),\n\t\t\tR = 255 * (6 * ntr < 1 ? p + (q - p) * 6 * ntr : (2 * ntr < 1 ? q : (3 * ntr < 2 ? p + (q - p) * 6 * (2.0f*OneThird - ntr) : p))),\n\t\t\tG = 255 * (6 * ntg < 1 ? p + (q - p) * 6 * ntg : (2 * ntg < 1 ? q : (3 * ntg < 2 ? p + (q - p) * 6 * (2.0f*OneThird - ntg) : p))),\n\t\t\tB = 255 * (6 * ntb < 1 ? p + (q - p) * 6 * ntb : (2 * ntb < 1 ? q : (3 * ntb < 2 ? p + (q - p) * 6 * (2.0f*OneThird - ntb) : p)));\n\t\t*ARGB &= 0xFF000000;\n\t\t*ARGB |= RGB((BYTE)(R < 0 ? 0 : (R>255 ? 255 : R)), (BYTE)(G < 0 ? 0 : (G>255 ? 255 : G)), (BYTE)(B < 0 ? 0 : (B>255 ? 255 : B)));\n\t}\n\n\tstatic COLORREF PixelAlpha(COLORREF clrSrc, double src_darken, COLORREF clrDest, double dest_darken)\n\t{\n\t\treturn RGB(GetRValue(clrSrc) * src_darken + GetRValue(clrDest) * dest_darken,\n\t\t\tGetGValue(clrSrc) * src_darken + GetGValue(clrDest) * dest_darken,\n\t\t\tGetBValue(clrSrc) * src_darken + GetBValue(clrDest) * dest_darken);\n\n\t}\n\n\tstatic BOOL WINAPI AlphaBitBlt(HDC hDC, int nDestX, int nDestY, int dwWidth, int dwHeight, HDC hSrcDC, \\\n\t\tint nSrcX, int nSrcY, int wSrc, int hSrc, BLENDFUNCTION ftn)\n\t{\n\t\tHDC hTempDC = ::CreateCompatibleDC(hDC);\n\t\tif (NULL == hTempDC)\n\t\t\treturn FALSE;\n\n\t\t//Creates Source DIB\n\t\tLPBITMAPINFO lpbiSrc = NULL;\n\t\t// Fill in the BITMAPINFOHEADER\n\t\tlpbiSrc = (LPBITMAPINFO) new BYTE[sizeof(BITMAPINFOHEADER)];\n\t\tif (lpbiSrc == NULL)\n\t\t{\n\t\t\t::DeleteDC(hTempDC);\n\t\t\treturn FALSE;\n\t\t}\n\t\tlpbiSrc->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);\n\t\tlpbiSrc->bmiHeader.biWidth = dwWidth;\n\t\tlpbiSrc->bmiHeader.biHeight = dwHeight;\n\t\tlpbiSrc->bmiHeader.biPlanes = 1;\n\t\tlpbiSrc->bmiHeader.biBitCount = 32;\n\t\tlpbiSrc->bmiHeader.biCompression = BI_RGB;\n\t\tlpbiSrc->bmiHeader.biSizeImage = dwWidth * dwHeight;\n\t\tlpbiSrc->bmiHeader.biXPelsPerMeter = 0;\n\t\tlpbiSrc->bmiHeader.biYPelsPerMeter = 0;\n\t\tlpbiSrc->bmiHeader.biClrUsed = 0;\n\t\tlpbiSrc->bmiHeader.biClrImportant = 0;\n\n\t\tCOLORREF* pSrcBits = NULL;\n\t\tHBITMAP hSrcDib = CreateDIBSection(\n\t\t\thSrcDC, lpbiSrc, DIB_RGB_COLORS, (void **)&pSrcBits,\n\t\t\tNULL, NULL);\n\n\t\tif ((NULL == hSrcDib) || (NULL == pSrcBits))\n\t\t{\n\t\t\tdelete[] lpbiSrc;\n\t\t\t::DeleteDC(hTempDC);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tHBITMAP hOldTempBmp = (HBITMAP)::SelectObject(hTempDC, hSrcDib);\n\t\t::StretchBlt(hTempDC, 0, 0, dwWidth, dwHeight, hSrcDC, nSrcX, nSrcY, wSrc, hSrc, SRCCOPY);\n\t\t::SelectObject(hTempDC, hOldTempBmp);\n\n\t\t//Creates Destination DIB\n\t\tLPBITMAPINFO lpbiDest = NULL;\n\t\t// Fill in the BITMAPINFOHEADER\n\t\tlpbiDest = (LPBITMAPINFO) new BYTE[sizeof(BITMAPINFOHEADER)];\n\t\tif (lpbiDest == NULL)\n\t\t{\n\t\t\tdelete[] lpbiSrc;\n\t\t\t::DeleteObject(hSrcDib);\n\t\t\t::DeleteDC(hTempDC);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tlpbiDest->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);\n\t\tlpbiDest->bmiHeader.biWidth = dwWidth;\n\t\tlpbiDest->bmiHeader.biHeight = dwHeight;\n\t\tlpbiDest->bmiHeader.biPlanes = 1;\n\t\tlpbiDest->bmiHeader.biBitCount = 32;\n\t\tlpbiDest->bmiHeader.biCompression = BI_RGB;\n\t\tlpbiDest->bmiHeader.biSizeImage = dwWidth * dwHeight;\n\t\tlpbiDest->bmiHeader.biXPelsPerMeter = 0;\n\t\tlpbiDest->bmiHeader.biYPelsPerMeter = 0;\n\t\tlpbiDest->bmiHeader.biClrUsed = 0;\n\t\tlpbiDest->bmiHeader.biClrImportant = 0;\n\n\t\tCOLORREF* pDestBits = NULL;\n\t\tHBITMAP hDestDib = CreateDIBSection(\n\t\t\thDC, lpbiDest, DIB_RGB_COLORS, (void **)&pDestBits,\n\t\t\tNULL, NULL);\n\n\t\tif ((NULL == hDestDib) || (NULL == pDestBits))\n\t\t{\n\t\t\tdelete[] lpbiSrc;\n\t\t\t::DeleteObject(hSrcDib);\n\t\t\t::DeleteDC(hTempDC);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t::SelectObject(hTempDC, hDestDib);\n\t\t::BitBlt(hTempDC, 0, 0, dwWidth, dwHeight, hDC, nDestX, nDestY, SRCCOPY);\n\t\t::SelectObject(hTempDC, hOldTempBmp);\n\n\t\tdouble src_darken;\n\t\tBYTE nAlpha;\n\n\t\tfor (int pixel = 0; pixel < dwWidth * dwHeight; pixel++, pSrcBits++, pDestBits++)\n\t\t{\n\t\t\tnAlpha = LOBYTE(*pSrcBits >> 24);\n\t\t\tsrc_darken = (double)(nAlpha * ftn.SourceConstantAlpha) / 255.0 / 255.0;\n\t\t\tif (src_darken < 0.0) src_darken = 0.0;\n\t\t\t*pDestBits = PixelAlpha(*pSrcBits, src_darken, *pDestBits, 1.0 - src_darken);\n\t\t} //for\n\n\t\t::SelectObject(hTempDC, hDestDib);\n\t\t::BitBlt(hDC, nDestX, nDestY, dwWidth, dwHeight, hTempDC, 0, 0, SRCCOPY);\n\t\t::SelectObject(hTempDC, hOldTempBmp);\n\n\t\tdelete[] lpbiDest;\n\t\t::DeleteObject(hDestDib);\n\n\t\tdelete[] lpbiSrc;\n\t\t::DeleteObject(hSrcDib);\n\n\t\t::DeleteDC(hTempDC);\n\t\treturn TRUE;\n\t}\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tDWORD CRenderEngine::AdjustColor(DWORD dwColor, short H, short S, short L)\n\t{\n\t\tif (H == 180 && S == 100 && L == 100) return dwColor;\n\t\tfloat fH, fS, fL;\n\t\tfloat S1 = S / 100.0f;\n\t\tfloat L1 = L / 100.0f;\n\t\tRGBtoHSL(dwColor, &fH, &fS, &fL);\n\t\tfH += (H - 180);\n\t\tfH = fH > 0 ? fH : fH + 360;\n\t\tfS *= S1;\n\t\tfL *= L1;\n\t\tHSLtoRGB(&dwColor, fH, fS, fL);\n\t\treturn dwColor;\n\t}\n\n\tTImageInfo* CRenderEngine::LoadImage(STRINGorID bitmap, LPCTSTR type, DWORD mask)\n\t{\n\t\tLPBYTE pData = NULL;\n\t\tDWORD dwSize = 0;\n\n\t\tdo\n\t\t{\n\t\t\tif (type == NULL)\n\t\t\t{\n\t\t\t\tCDuiString sFile = CPaintManagerUI::GetResourcePath();\n\t\t\t\tif (CPaintManagerUI::GetResourceZip().IsEmpty()) \n\t\t\t\t{\n\t\t\t\t\tsFile += bitmap.m_lpstr;\n\t\t\t\t\tHANDLE hFile = ::CreateFile(sFile.GetData(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, \\\n\t\t\t\t\t\tFILE_ATTRIBUTE_NORMAL, NULL);\n\t\t\t\t\tif (hFile == INVALID_HANDLE_VALUE) break;\n\t\t\t\t\tdwSize = ::GetFileSize(hFile, NULL);\n\t\t\t\t\tif (dwSize == 0) break;\n\n\t\t\t\t\tDWORD dwRead = 0;\n\t\t\t\t\tpData = new BYTE[dwSize];\n\t\t\t\t\t::ReadFile(hFile, pData, dwSize, &dwRead, NULL);\n\t\t\t\t\t::CloseHandle(hFile);\n\n\t\t\t\t\tif (dwRead != dwSize) {\n\t\t\t\t\t\tdelete[] pData;\n\t\t\t\t\t\tpData = NULL;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tDWORD64 dw64Size = -1;\n\t\t\t\t\tint index = -1;\n\t\t\t\t\tif (!CPaintManagerUI::IsCachedResourceZip( ))\n\t\t\t\t\t{\n\t\t\t\t\t\tsFile += CPaintManagerUI::GetResourceZip( );\n\t\t\t\t\t\tif (!CPaintManagerUI::CompressedPacketOpen(sFile.GetData( )))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tif( !CPaintManagerUI::FindCompressedPacketResource(bitmap.m_lpstr,&index,&dw64Size) ) break;\n\t\t\t\t\tdwSize = dw64Size;\n\t\t\t\t\tASSERT( dw64Size == dwSize );\n\n\t\t\t\t\tif (dwSize == 0) break;\n\t\t\t\t\tpData = new BYTE[dwSize];\n\t\t\t\t\tif( !CPaintManagerUI::GetCompressedPacketResource(index,pData,dw64Size) )\n\t\t\t\t\t{\n\t\t\t\t\t\tdelete[] pData;\n\t\t\t\t\t\tpData = NULL;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tHRSRC hResource = ::FindResource(CPaintManagerUI::GetResourceDll(), bitmap.m_lpstr, type);\n\t\t\t\tif (hResource == NULL) break;\n\t\t\t\tHGLOBAL hGlobal = ::LoadResource(CPaintManagerUI::GetResourceDll(), hResource);\n\t\t\t\tif (hGlobal == NULL) {\n\t\t\t\t\tFreeResource(hResource);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdwSize = ::SizeofResource(CPaintManagerUI::GetResourceDll(), hResource);\n\t\t\t\tif (dwSize == 0) break;\n\t\t\t\tpData = new BYTE[dwSize];\n\t\t\t\t::CopyMemory(pData, (LPBYTE)::LockResource(hGlobal), dwSize);\n\t\t\t\t::FreeResource(hResource);\n\t\t\t}\n\t\t} while (0);\n\n\t\twhile (!pData)\n\t\t{\n\t\t\t//ͼƬ, ֱȥȡbitmap.m_lpstrָ·\n\t\t\tHANDLE hFile = ::CreateFile(bitmap.m_lpstr, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, \\\n\t\t\t\tFILE_ATTRIBUTE_NORMAL, NULL);\n\t\t\tif (hFile == INVALID_HANDLE_VALUE) break;\n\t\t\tdwSize = ::GetFileSize(hFile, NULL);\n\t\t\tif (dwSize == 0) break;\n\n\t\t\tDWORD dwRead = 0;\n\t\t\tpData = new BYTE[dwSize];\n\t\t\t::ReadFile(hFile, pData, dwSize, &dwRead, NULL);\n\t\t\t::CloseHandle(hFile);\n\n\t\t\tif (dwRead != dwSize) {\n\t\t\t\tdelete[] pData;\n\t\t\t\tpData = NULL;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tif (!pData)\n\t\t{\n\t\t\t//::MessageBox(0, _T(\"ȡͼƬʧܣ\"), _T(\"ץBUG\"), MB_OK);\n\t\t\treturn NULL;\n\t\t}\n\n\t\tLPBYTE pImage = NULL;\n\t\tint x, y, n;\n\t\tpImage = stbi_load_from_memory(pData, dwSize, &x, &y, &n, 4);\n\t\tdelete[] pData;\n\t\tif (!pImage) {\n\t\t\t//::MessageBox(0, _T(\"ͼƬʧ\"), _T(\"ץBUG\"), MB_OK);\n\t\t\treturn NULL;\n\t\t}\n\n\t\tBITMAPINFO bmi;\n\t\t::ZeroMemory(&bmi, sizeof(BITMAPINFO));\n\t\tbmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);\n\t\tbmi.bmiHeader.biWidth = x;\n\t\tbmi.bmiHeader.biHeight = -y;\n\t\tbmi.bmiHeader.biPlanes = 1;\n\t\tbmi.bmiHeader.biBitCount = 32;\n\t\tbmi.bmiHeader.biCompression = BI_RGB;\n\t\tbmi.bmiHeader.biSizeImage = x * y * 4;\n\n\t\tbool bAlphaChannel = false;\n\t\tLPBYTE pDest = NULL;\n\t\tHBITMAP hBitmap = ::CreateDIBSection(NULL, &bmi, DIB_RGB_COLORS, (void**)&pDest, NULL, 0);\n\t\tif (!hBitmap) {\n\t\t\t//::MessageBox(0, _T(\"CreateDIBSectionʧ\"), _T(\"ץBUG\"), MB_OK);\n\t\t\treturn NULL;\n\t\t}\n\n\t\tfor (int i = 0; i < x * y; i++)\n\t\t{\n\t\t\tpDest[i * 4 + 3] = pImage[i * 4 + 3];\n\t\t\tif (pDest[i * 4 + 3] < 255)\n\t\t\t{\n\t\t\t\tpDest[i * 4] = (BYTE)(DWORD(pImage[i * 4 + 2])*pImage[i * 4 + 3] / 255);\n\t\t\t\tpDest[i * 4 + 1] = (BYTE)(DWORD(pImage[i * 4 + 1])*pImage[i * 4 + 3] / 255);\n\t\t\t\tpDest[i * 4 + 2] = (BYTE)(DWORD(pImage[i * 4])*pImage[i * 4 + 3] / 255);\n\t\t\t\tbAlphaChannel = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpDest[i * 4] = pImage[i * 4 + 2];\n\t\t\t\tpDest[i * 4 + 1] = pImage[i * 4 + 1];\n\t\t\t\tpDest[i * 4 + 2] = pImage[i * 4];\n\t\t\t}\n\n\t\t\tif (*(DWORD*)(&pDest[i * 4]) == mask) {\n\t\t\t\tpDest[i * 4] = (BYTE)0;\n\t\t\t\tpDest[i * 4 + 1] = (BYTE)0;\n\t\t\t\tpDest[i * 4 + 2] = (BYTE)0;\n\t\t\t\tpDest[i * 4 + 3] = (BYTE)0;\n\t\t\t\tbAlphaChannel = true;\n\t\t\t}\n\t\t}\n\n\t\tstbi_image_free(pImage);\n\n\t\tTImageInfo* data = new TImageInfo;\n\t\tdata->hBitmap = hBitmap;\n\t\tdata->nX = x;\n\t\tdata->nY = y;\n\t\tdata->alphaChannel = bAlphaChannel;\n\t\treturn data;\n\t}\n\n\tvoid CRenderEngine::FreeImage(const TImageInfo* bitmap)\n\t{\n\t\tif (bitmap->hBitmap) {\n\t\t\t::DeleteObject(bitmap->hBitmap);\n\t\t}\n\t\tdelete bitmap;\n\t}\n\n\tvoid CRenderEngine::DrawImage(HDC hDC, HBITMAP hBitmap, const RECT& rc, const RECT& rcPaint,\n\t\tconst RECT& rcBmpPart, const RECT& rcCorners, bool alphaChannel,\n\t\tBYTE uFade, bool hole, bool xtiled, bool ytiled)\n\t{\n\t\tASSERT(::GetObjectType(hDC) == OBJ_DC || ::GetObjectType(hDC) == OBJ_MEMDC);\n\n\t\ttypedef BOOL(WINAPI *LPALPHABLEND)(HDC, int, int, int, int, HDC, int, int, int, int, BLENDFUNCTION);\n\t\tstatic LPALPHABLEND lpAlphaBlend = (LPALPHABLEND) ::GetProcAddress(::GetModuleHandle(_T(\"msimg32.dll\")), \"AlphaBlend\");\n\n\t\tif (lpAlphaBlend == NULL) lpAlphaBlend = AlphaBitBlt;\n\t\tif (hBitmap == NULL) return;\n\n\t\tHDC hCloneDC = ::CreateCompatibleDC(hDC);\n\t\tHBITMAP hOldBitmap = (HBITMAP) ::SelectObject(hCloneDC, hBitmap);\n\t\t::SetStretchBltMode(hDC, HALFTONE);\n\n\t\tRECT rcTemp = { 0 };\n\t\tRECT rcDest = { 0 };\n\t\tif (lpAlphaBlend && (alphaChannel || uFade < 255)) {\n\t\t\tBLENDFUNCTION bf = { AC_SRC_OVER, 0, uFade, AC_SRC_ALPHA };\n\t\t\t// middle\n\t\t\tif (!hole) {\n\t\t\t\trcDest.left = rc.left + rcCorners.left;\n\t\t\t\trcDest.top = rc.top + rcCorners.top;\n\t\t\t\trcDest.right = rc.right - rc.left - rcCorners.left - rcCorners.right;\n\t\t\t\trcDest.bottom = rc.bottom - rc.top - rcCorners.top - rcCorners.bottom;\n\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\tif (!xtiled && !ytiled) {\n\t\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\t\tlpAlphaBlend(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\t\trcBmpPart.left + rcCorners.left, rcBmpPart.top + rcCorners.top, \\\n\t\t\t\t\t\t\trcBmpPart.right - rcBmpPart.left - rcCorners.left - rcCorners.right, \\\n\t\t\t\t\t\t\trcBmpPart.bottom - rcBmpPart.top - rcCorners.top - rcCorners.bottom, bf);\n\t\t\t\t\t}\n\t\t\t\t\telse if (xtiled && ytiled) {\n\t\t\t\t\t\tLONG lWidth = rcBmpPart.right - rcBmpPart.left - rcCorners.left - rcCorners.right;\n\t\t\t\t\t\tLONG lHeight = rcBmpPart.bottom - rcBmpPart.top - rcCorners.top - rcCorners.bottom;\n\t\t\t\t\t\tint iTimesX = (rcDest.right - rcDest.left + lWidth - 1) / lWidth;\n\t\t\t\t\t\tint iTimesY = (rcDest.bottom - rcDest.top + lHeight - 1) / lHeight;\n\t\t\t\t\t\tfor (int j = 0; j < iTimesY; ++j) {\n\t\t\t\t\t\t\tLONG lDestTop = rcDest.top + lHeight * j;\n\t\t\t\t\t\t\tLONG lDestBottom = rcDest.top + lHeight * (j + 1);\n\t\t\t\t\t\t\tLONG lDrawHeight = lHeight;\n\t\t\t\t\t\t\tif (lDestBottom > rcDest.bottom) {\n\t\t\t\t\t\t\t\tlDrawHeight -= lDestBottom - rcDest.bottom;\n\t\t\t\t\t\t\t\tlDestBottom = rcDest.bottom;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor (int i = 0; i < iTimesX; ++i) {\n\t\t\t\t\t\t\t\tLONG lDestLeft = rcDest.left + lWidth * i;\n\t\t\t\t\t\t\t\tLONG lDestRight = rcDest.left + lWidth * (i + 1);\n\t\t\t\t\t\t\t\tLONG lDrawWidth = lWidth;\n\t\t\t\t\t\t\t\tif (lDestRight > rcDest.right) {\n\t\t\t\t\t\t\t\t\tlDrawWidth -= lDestRight - rcDest.right;\n\t\t\t\t\t\t\t\t\tlDestRight = rcDest.right;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlpAlphaBlend(hDC, rcDest.left + lWidth * i, rcDest.top + lHeight * j,\n\t\t\t\t\t\t\t\t\tlDestRight - lDestLeft, lDestBottom - lDestTop, hCloneDC,\n\t\t\t\t\t\t\t\t\trcBmpPart.left + rcCorners.left, rcBmpPart.top + rcCorners.top, lDrawWidth, lDrawHeight, bf);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (xtiled) {\n\t\t\t\t\t\tLONG lWidth = rcBmpPart.right - rcBmpPart.left - rcCorners.left - rcCorners.right;\n\t\t\t\t\t\tint iTimes = (rcDest.right - rcDest.left + lWidth - 1) / lWidth;\n\t\t\t\t\t\tfor (int i = 0; i < iTimes; ++i) {\n\t\t\t\t\t\t\tLONG lDestLeft = rcDest.left + lWidth * i;\n\t\t\t\t\t\t\tLONG lDestRight = rcDest.left + lWidth * (i + 1);\n\t\t\t\t\t\t\tLONG lDrawWidth = lWidth;\n\t\t\t\t\t\t\tif (lDestRight > rcDest.right) {\n\t\t\t\t\t\t\t\tlDrawWidth -= lDestRight - rcDest.right;\n\t\t\t\t\t\t\t\tlDestRight = rcDest.right;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlpAlphaBlend(hDC, lDestLeft, rcDest.top, lDestRight - lDestLeft, rcDest.bottom,\n\t\t\t\t\t\t\t\thCloneDC, rcBmpPart.left + rcCorners.left, rcBmpPart.top + rcCorners.top, \\\n\t\t\t\t\t\t\t\tlDrawWidth, rcBmpPart.bottom - rcBmpPart.top - rcCorners.top - rcCorners.bottom, bf);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse { // ytiled\n\t\t\t\t\t\tLONG lHeight = rcBmpPart.bottom - rcBmpPart.top - rcCorners.top - rcCorners.bottom;\n\t\t\t\t\t\tint iTimes = (rcDest.bottom - rcDest.top + lHeight - 1) / lHeight;\n\t\t\t\t\t\tfor (int i = 0; i < iTimes; ++i) {\n\t\t\t\t\t\t\tLONG lDestTop = rcDest.top + lHeight * i;\n\t\t\t\t\t\t\tLONG lDestBottom = rcDest.top + lHeight * (i + 1);\n\t\t\t\t\t\t\tLONG lDrawHeight = lHeight;\n\t\t\t\t\t\t\tif (lDestBottom > rcDest.bottom) {\n\t\t\t\t\t\t\t\tlDrawHeight -= lDestBottom - rcDest.bottom;\n\t\t\t\t\t\t\t\tlDestBottom = rcDest.bottom;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlpAlphaBlend(hDC, rcDest.left, rcDest.top + lHeight * i, rcDest.right, lDestBottom - lDestTop,\n\t\t\t\t\t\t\t\thCloneDC, rcBmpPart.left + rcCorners.left, rcBmpPart.top + rcCorners.top, \\\n\t\t\t\t\t\t\t\trcBmpPart.right - rcBmpPart.left - rcCorners.left - rcCorners.right, lDrawHeight, bf);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// left-top\n\t\t\tif (rcCorners.left > 0 && rcCorners.top > 0) {\n\t\t\t\trcDest.left = rc.left;\n\t\t\t\trcDest.top = rc.top;\n\t\t\t\trcDest.right = rcCorners.left;\n\t\t\t\trcDest.bottom = rcCorners.top;\n\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\tlpAlphaBlend(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\trcBmpPart.left, rcBmpPart.top, rcCorners.left, rcCorners.top, bf);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// top\n\t\t\tif (rcCorners.top > 0) {\n\t\t\t\trcDest.left = rc.left + rcCorners.left;\n\t\t\t\trcDest.top = rc.top;\n\t\t\t\trcDest.right = rc.right - rc.left - rcCorners.left - rcCorners.right;\n\t\t\t\trcDest.bottom = rcCorners.top;\n\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\tlpAlphaBlend(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\trcBmpPart.left + rcCorners.left, rcBmpPart.top, rcBmpPart.right - rcBmpPart.left - \\\n\t\t\t\t\t\trcCorners.left - rcCorners.right, rcCorners.top, bf);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// right-top\n\t\t\tif (rcCorners.right > 0 && rcCorners.top > 0) {\n\t\t\t\trcDest.left = rc.right - rcCorners.right;\n\t\t\t\trcDest.top = rc.top;\n\t\t\t\trcDest.right = rcCorners.right;\n\t\t\t\trcDest.bottom = rcCorners.top;\n\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\tlpAlphaBlend(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\trcBmpPart.right - rcCorners.right, rcBmpPart.top, rcCorners.right, rcCorners.top, bf);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// left\n\t\t\tif (rcCorners.left > 0) {\n\t\t\t\trcDest.left = rc.left;\n\t\t\t\trcDest.top = rc.top + rcCorners.top;\n\t\t\t\trcDest.right = rcCorners.left;\n\t\t\t\trcDest.bottom = rc.bottom - rc.top - rcCorners.top - rcCorners.bottom;\n\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\tlpAlphaBlend(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\trcBmpPart.left, rcBmpPart.top + rcCorners.top, rcCorners.left, rcBmpPart.bottom - \\\n\t\t\t\t\t\trcBmpPart.top - rcCorners.top - rcCorners.bottom, bf);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// right\n\t\t\tif (rcCorners.right > 0) {\n\t\t\t\trcDest.left = rc.right - rcCorners.right;\n\t\t\t\trcDest.top = rc.top + rcCorners.top;\n\t\t\t\trcDest.right = rcCorners.right;\n\t\t\t\trcDest.bottom = rc.bottom - rc.top - rcCorners.top - rcCorners.bottom;\n\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\tlpAlphaBlend(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\trcBmpPart.right - rcCorners.right, rcBmpPart.top + rcCorners.top, rcCorners.right, \\\n\t\t\t\t\t\trcBmpPart.bottom - rcBmpPart.top - rcCorners.top - rcCorners.bottom, bf);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// left-bottom\n\t\t\tif (rcCorners.left > 0 && rcCorners.bottom > 0) {\n\t\t\t\trcDest.left = rc.left;\n\t\t\t\trcDest.top = rc.bottom - rcCorners.bottom;\n\t\t\t\trcDest.right = rcCorners.left;\n\t\t\t\trcDest.bottom = rcCorners.bottom;\n\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\tlpAlphaBlend(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\trcBmpPart.left, rcBmpPart.bottom - rcCorners.bottom, rcCorners.left, rcCorners.bottom, bf);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// bottom\n\t\t\tif (rcCorners.bottom > 0) {\n\t\t\t\trcDest.left = rc.left + rcCorners.left;\n\t\t\t\trcDest.top = rc.bottom - rcCorners.bottom;\n\t\t\t\trcDest.right = rc.right - rc.left - rcCorners.left - rcCorners.right;\n\t\t\t\trcDest.bottom = rcCorners.bottom;\n\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\tlpAlphaBlend(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\trcBmpPart.left + rcCorners.left, rcBmpPart.bottom - rcCorners.bottom, \\\n\t\t\t\t\t\trcBmpPart.right - rcBmpPart.left - rcCorners.left - rcCorners.right, rcCorners.bottom, bf);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// right-bottom\n\t\t\tif (rcCorners.right > 0 && rcCorners.bottom > 0) {\n\t\t\t\trcDest.left = rc.right - rcCorners.right;\n\t\t\t\trcDest.top = rc.bottom - rcCorners.bottom;\n\t\t\t\trcDest.right = rcCorners.right;\n\t\t\t\trcDest.bottom = rcCorners.bottom;\n\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\tlpAlphaBlend(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\trcBmpPart.right - rcCorners.right, rcBmpPart.bottom - rcCorners.bottom, rcCorners.right, \\\n\t\t\t\t\t\trcCorners.bottom, bf);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (rc.right - rc.left == rcBmpPart.right - rcBmpPart.left \\\n\t\t\t\t&& rc.bottom - rc.top == rcBmpPart.bottom - rcBmpPart.top \\\n\t\t\t\t&& rcCorners.left == 0 && rcCorners.right == 0 && rcCorners.top == 0 && rcCorners.bottom == 0)\n\t\t\t{\n\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rc)) {\n\t\t\t\t\t::BitBlt(hDC, rcTemp.left, rcTemp.top, rcTemp.right - rcTemp.left, rcTemp.bottom - rcTemp.top, \\\n\t\t\t\t\t\thCloneDC, rcBmpPart.left + rcTemp.left - rc.left, rcBmpPart.top + rcTemp.top - rc.top, SRCCOPY);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// middle\n\t\t\t\tif (!hole) {\n\t\t\t\t\trcDest.left = rc.left + rcCorners.left;\n\t\t\t\t\trcDest.top = rc.top + rcCorners.top;\n\t\t\t\t\trcDest.right = rc.right - rc.left - rcCorners.left - rcCorners.right;\n\t\t\t\t\trcDest.bottom = rc.bottom - rc.top - rcCorners.top - rcCorners.bottom;\n\t\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\t\tif (!xtiled && !ytiled) {\n\t\t\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\t\t\t::StretchBlt(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\t\t\trcBmpPart.left + rcCorners.left, rcBmpPart.top + rcCorners.top, \\\n\t\t\t\t\t\t\t\trcBmpPart.right - rcBmpPart.left - rcCorners.left - rcCorners.right, \\\n\t\t\t\t\t\t\t\trcBmpPart.bottom - rcBmpPart.top - rcCorners.top - rcCorners.bottom, SRCCOPY);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (xtiled && ytiled) {\n\t\t\t\t\t\t\tLONG lWidth = rcBmpPart.right - rcBmpPart.left - rcCorners.left - rcCorners.right;\n\t\t\t\t\t\t\tLONG lHeight = rcBmpPart.bottom - rcBmpPart.top - rcCorners.top - rcCorners.bottom;\n\t\t\t\t\t\t\tint iTimesX = (rcDest.right - rcDest.left + lWidth - 1) / lWidth;\n\t\t\t\t\t\t\tint iTimesY = (rcDest.bottom - rcDest.top + lHeight - 1) / lHeight;\n\t\t\t\t\t\t\tfor (int j = 0; j < iTimesY; ++j) {\n\t\t\t\t\t\t\t\tLONG lDestTop = rcDest.top + lHeight * j;\n\t\t\t\t\t\t\t\tLONG lDestBottom = rcDest.top + lHeight * (j + 1);\n\t\t\t\t\t\t\t\tLONG lDrawHeight = lHeight;\n\t\t\t\t\t\t\t\tif (lDestBottom > rcDest.bottom) {\n\t\t\t\t\t\t\t\t\tlDrawHeight -= lDestBottom - rcDest.bottom;\n\t\t\t\t\t\t\t\t\tlDestBottom = rcDest.bottom;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor (int i = 0; i < iTimesX; ++i) {\n\t\t\t\t\t\t\t\t\tLONG lDestLeft = rcDest.left + lWidth * i;\n\t\t\t\t\t\t\t\t\tLONG lDestRight = rcDest.left + lWidth * (i + 1);\n\t\t\t\t\t\t\t\t\tLONG lDrawWidth = lWidth;\n\t\t\t\t\t\t\t\t\tif (lDestRight > rcDest.right) {\n\t\t\t\t\t\t\t\t\t\tlDrawWidth -= lDestRight - rcDest.right;\n\t\t\t\t\t\t\t\t\t\tlDestRight = rcDest.right;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t::BitBlt(hDC, rcDest.left + lWidth * i, rcDest.top + lHeight * j, \\\n\t\t\t\t\t\t\t\t\t\tlDestRight - lDestLeft, lDestBottom - lDestTop, hCloneDC, \\\n\t\t\t\t\t\t\t\t\t\trcBmpPart.left + rcCorners.left, rcBmpPart.top + rcCorners.top, SRCCOPY);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (xtiled) {\n\t\t\t\t\t\t\tLONG lWidth = rcBmpPart.right - rcBmpPart.left - rcCorners.left - rcCorners.right;\n\t\t\t\t\t\t\tint iTimes = (rcDest.right - rcDest.left + lWidth - 1) / lWidth;\n\t\t\t\t\t\t\tfor (int i = 0; i < iTimes; ++i) {\n\t\t\t\t\t\t\t\tLONG lDestLeft = rcDest.left + lWidth * i;\n\t\t\t\t\t\t\t\tLONG lDestRight = rcDest.left + lWidth * (i + 1);\n\t\t\t\t\t\t\t\tLONG lDrawWidth = lWidth;\n\t\t\t\t\t\t\t\tif (lDestRight > rcDest.right) {\n\t\t\t\t\t\t\t\t\tlDrawWidth -= lDestRight - rcDest.right;\n\t\t\t\t\t\t\t\t\tlDestRight = rcDest.right;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t::StretchBlt(hDC, lDestLeft, rcDest.top, lDestRight - lDestLeft, rcDest.bottom,\n\t\t\t\t\t\t\t\t\thCloneDC, rcBmpPart.left + rcCorners.left, rcBmpPart.top + rcCorners.top, \\\n\t\t\t\t\t\t\t\t\tlDrawWidth, rcBmpPart.bottom - rcBmpPart.top - rcCorners.top - rcCorners.bottom, SRCCOPY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse { // ytiled\n\t\t\t\t\t\t\tLONG lHeight = rcBmpPart.bottom - rcBmpPart.top - rcCorners.top - rcCorners.bottom;\n\t\t\t\t\t\t\tint iTimes = (rcDest.bottom - rcDest.top + lHeight - 1) / lHeight;\n\t\t\t\t\t\t\tfor (int i = 0; i < iTimes; ++i) {\n\t\t\t\t\t\t\t\tLONG lDestTop = rcDest.top + lHeight * i;\n\t\t\t\t\t\t\t\tLONG lDestBottom = rcDest.top + lHeight * (i + 1);\n\t\t\t\t\t\t\t\tLONG lDrawHeight = lHeight;\n\t\t\t\t\t\t\t\tif (lDestBottom > rcDest.bottom) {\n\t\t\t\t\t\t\t\t\tlDrawHeight -= lDestBottom - rcDest.bottom;\n\t\t\t\t\t\t\t\t\tlDestBottom = rcDest.bottom;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t::StretchBlt(hDC, rcDest.left, rcDest.top + lHeight * i, rcDest.right, lDestBottom - lDestTop,\n\t\t\t\t\t\t\t\t\thCloneDC, rcBmpPart.left + rcCorners.left, rcBmpPart.top + rcCorners.top, \\\n\t\t\t\t\t\t\t\t\trcBmpPart.right - rcBmpPart.left - rcCorners.left - rcCorners.right, lDrawHeight, SRCCOPY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// left-top\n\t\t\t\tif (rcCorners.left > 0 && rcCorners.top > 0) {\n\t\t\t\t\trcDest.left = rc.left;\n\t\t\t\t\trcDest.top = rc.top;\n\t\t\t\t\trcDest.right = rcCorners.left;\n\t\t\t\t\trcDest.bottom = rcCorners.top;\n\t\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\t\t::StretchBlt(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\t\trcBmpPart.left, rcBmpPart.top, rcCorners.left, rcCorners.top, SRCCOPY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// top\n\t\t\t\tif (rcCorners.top > 0) {\n\t\t\t\t\trcDest.left = rc.left + rcCorners.left;\n\t\t\t\t\trcDest.top = rc.top;\n\t\t\t\t\trcDest.right = rc.right - rc.left - rcCorners.left - rcCorners.right;\n\t\t\t\t\trcDest.bottom = rcCorners.top;\n\t\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\t\t::StretchBlt(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\t\trcBmpPart.left + rcCorners.left, rcBmpPart.top, rcBmpPart.right - rcBmpPart.left - \\\n\t\t\t\t\t\t\trcCorners.left - rcCorners.right, rcCorners.top, SRCCOPY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// right-top\n\t\t\t\tif (rcCorners.right > 0 && rcCorners.top > 0) {\n\t\t\t\t\trcDest.left = rc.right - rcCorners.right;\n\t\t\t\t\trcDest.top = rc.top;\n\t\t\t\t\trcDest.right = rcCorners.right;\n\t\t\t\t\trcDest.bottom = rcCorners.top;\n\t\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\t\t::StretchBlt(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\t\trcBmpPart.right - rcCorners.right, rcBmpPart.top, rcCorners.right, rcCorners.top, SRCCOPY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// left\n\t\t\t\tif (rcCorners.left > 0) {\n\t\t\t\t\trcDest.left = rc.left;\n\t\t\t\t\trcDest.top = rc.top + rcCorners.top;\n\t\t\t\t\trcDest.right = rcCorners.left;\n\t\t\t\t\trcDest.bottom = rc.bottom - rc.top - rcCorners.top - rcCorners.bottom;\n\t\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\t\t::StretchBlt(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\t\trcBmpPart.left, rcBmpPart.top + rcCorners.top, rcCorners.left, rcBmpPart.bottom - \\\n\t\t\t\t\t\t\trcBmpPart.top - rcCorners.top - rcCorners.bottom, SRCCOPY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// right\n\t\t\t\tif (rcCorners.right > 0) {\n\t\t\t\t\trcDest.left = rc.right - rcCorners.right;\n\t\t\t\t\trcDest.top = rc.top + rcCorners.top;\n\t\t\t\t\trcDest.right = rcCorners.right;\n\t\t\t\t\trcDest.bottom = rc.bottom - rc.top - rcCorners.top - rcCorners.bottom;\n\t\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\t\t::StretchBlt(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\t\trcBmpPart.right - rcCorners.right, rcBmpPart.top + rcCorners.top, rcCorners.right, \\\n\t\t\t\t\t\t\trcBmpPart.bottom - rcBmpPart.top - rcCorners.top - rcCorners.bottom, SRCCOPY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// left-bottom\n\t\t\t\tif (rcCorners.left > 0 && rcCorners.bottom > 0) {\n\t\t\t\t\trcDest.left = rc.left;\n\t\t\t\t\trcDest.top = rc.bottom - rcCorners.bottom;\n\t\t\t\t\trcDest.right = rcCorners.left;\n\t\t\t\t\trcDest.bottom = rcCorners.bottom;\n\t\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\t\t::StretchBlt(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\t\trcBmpPart.left, rcBmpPart.bottom - rcCorners.bottom, rcCorners.left, rcCorners.bottom, SRCCOPY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// bottom\n\t\t\t\tif (rcCorners.bottom > 0) {\n\t\t\t\t\trcDest.left = rc.left + rcCorners.left;\n\t\t\t\t\trcDest.top = rc.bottom - rcCorners.bottom;\n\t\t\t\t\trcDest.right = rc.right - rc.left - rcCorners.left - rcCorners.right;\n\t\t\t\t\trcDest.bottom = rcCorners.bottom;\n\t\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\t\t::StretchBlt(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\t\trcBmpPart.left + rcCorners.left, rcBmpPart.bottom - rcCorners.bottom, \\\n\t\t\t\t\t\t\trcBmpPart.right - rcBmpPart.left - rcCorners.left - rcCorners.right, rcCorners.bottom, SRCCOPY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// right-bottom\n\t\t\t\tif (rcCorners.right > 0 && rcCorners.bottom > 0) {\n\t\t\t\t\trcDest.left = rc.right - rcCorners.right;\n\t\t\t\t\trcDest.top = rc.bottom - rcCorners.bottom;\n\t\t\t\t\trcDest.right = rcCorners.right;\n\t\t\t\t\trcDest.bottom = rcCorners.bottom;\n\t\t\t\t\trcDest.right += rcDest.left;\n\t\t\t\t\trcDest.bottom += rcDest.top;\n\t\t\t\t\tif (::IntersectRect(&rcTemp, &rcPaint, &rcDest)) {\n\t\t\t\t\t\trcDest.right -= rcDest.left;\n\t\t\t\t\t\trcDest.bottom -= rcDest.top;\n\t\t\t\t\t\t::StretchBlt(hDC, rcDest.left, rcDest.top, rcDest.right, rcDest.bottom, hCloneDC, \\\n\t\t\t\t\t\t\trcBmpPart.right - rcCorners.right, rcBmpPart.bottom - rcCorners.bottom, rcCorners.right, \\\n\t\t\t\t\t\t\trcCorners.bottom, SRCCOPY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t::SelectObject(hCloneDC, hOldBitmap);\n\t\t::DeleteDC(hCloneDC);\n\t}\n\n\n\tbool DrawImage(HDC hDC, CPaintManagerUI* pManager, const RECT& rc, const RECT& rcPaint, const CDuiString& sImageName, \\\n\t\tconst CDuiString& sImageResType, RECT rcItem, RECT rcBmpPart, RECT rcCorner, DWORD dwMask, BYTE bFade, \\\n\t\tbool bHole, bool bTiledX, bool bTiledY)\n\t{\n\t\tif (sImageName.IsEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\tconst TImageInfo* data = NULL;\n\t\tif (sImageResType.IsEmpty()) {\n\t\t\tdata = pManager->GetImageEx((LPCTSTR)sImageName, NULL, dwMask);\n\t\t}\n\t\telse {\n\t\t\tdata = pManager->GetImageEx((LPCTSTR)sImageName, (LPCTSTR)sImageResType, dwMask);\n\t\t}\n\t\tif (!data) return false;\n\n\t\tif (rcBmpPart.left == 0 && rcBmpPart.right == 0 && rcBmpPart.top == 0 && rcBmpPart.bottom == 0) {\n\t\t\trcBmpPart.right = data->nX;\n\t\t\trcBmpPart.bottom = data->nY;\n\t\t}\n\t\tif (rcBmpPart.right > data->nX) rcBmpPart.right = data->nX;\n\t\tif (rcBmpPart.bottom > data->nY) rcBmpPart.bottom = data->nY;\n\n\t\tRECT rcTemp;\n\t\tif (!::IntersectRect(&rcTemp, &rcItem, &rc)) return true;\n\t\tif (!::IntersectRect(&rcTemp, &rcItem, &rcPaint)) return true;\n\n\t\tCRenderEngine::DrawImage(hDC, data->hBitmap, rcItem, rcPaint, rcBmpPart, rcCorner, data->alphaChannel, bFade, bHole, bTiledX, bTiledY);\n\n\t\treturn true;\n\t}\n\n\tbool DrawImage(HDC hDC, CPaintManagerUI* pManager, const RECT& rc, const RECT& rcPaint, const CDuiString& sImageName, \\\n\t\tconst CDuiString& sImageResType, RECT rcItem, RECT rcBmpPart, RECT rcCorner, DWORD dwMask, BYTE bFade, \\\n\t\tbool bHole, bool bTiledX, bool bTiledY, bool bNeedAlpha  )\n\t{\n\t\tif (sImageName.IsEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\tconst TImageInfo* data = NULL;\n\t\tif( sImageResType.IsEmpty() ) {\n\t\t\tdata = pManager->GetImageEx((LPCTSTR)sImageName, NULL, dwMask);\n\t\t}\n\t\telse {\n\t\t\tdata = pManager->GetImageEx((LPCTSTR)sImageName, (LPCTSTR)sImageResType, dwMask);\n\t\t}\n\t\tif( !data ) return false;    \n\n\t\tif( rcBmpPart.left == 0 && rcBmpPart.right == 0 && rcBmpPart.top == 0 && rcBmpPart.bottom == 0 ) {\n\t\t\trcBmpPart.right = data->nX;\n\t\t\trcBmpPart.bottom = data->nY;\n\t\t}\n\t\tif (rcBmpPart.right > data->nX) rcBmpPart.right = data->nX;\n\t\tif (rcBmpPart.bottom > data->nY) rcBmpPart.bottom = data->nY;\n\n\t\tRECT rcTemp;\n\t\tif( !::IntersectRect(&rcTemp, &rcItem, &rc) ) return true;\n\t\tif( !::IntersectRect(&rcTemp, &rcItem, &rcPaint) ) return true;\n\n\t\tif( !bNeedAlpha )\n\t\t\tCRenderEngine::DrawImage(hDC, data->hBitmap, rcItem, rcPaint, rcBmpPart, rcCorner, true, bFade, bHole, bTiledX, bTiledY);\n\t\telse\n\t\t\tCRenderEngine::DrawImage(hDC, data->hBitmap, rcItem, rcPaint, rcBmpPart, rcCorner, data->alphaChannel, bFade, bHole, bTiledX, bTiledY);\n\n\t\treturn true;\n\t}\n\n\tbool CRenderEngine::DrawImageString(HDC hDC, CPaintManagerUI* pManager, const RECT& rc, const RECT& rcPaint,\n\t\tLPCTSTR pStrImage, LPCTSTR pStrModify)\n\t{\n\t\tif ((pManager == NULL) || (hDC == NULL)) return false;\n\n\t\t// 1aaa.jpg\n\t\t/* 2file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' \n\t\tmask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false'\n\t\t*/\n\n\t\tCDuiString sImageName = pStrImage;\n\t\tCDuiString sImageResType;\n\t\tRECT rcItem = rc;\n\t\tRECT rcBmpPart = { 0 };\n\t\tRECT rcCorner = { 0 };\n\t\tDWORD dwMask = 0;\n\t\tBYTE bFade = 0xFF;\n\t\tbool bHole = false;\n\t\tbool bTiledX = false;\n\t\tbool bTiledY = false;\n\n\t\tint image_count = 0;\n\n\t\tCDuiString sItem;\n\t\tCDuiString sValue;\n\t\tLPTSTR pstr = NULL;\n\n\t\tfor (int i = 0; i < 2; ++i, image_count = 0) {\n\t\t\tif (i == 1)\n\t\t\t\tpStrImage = pStrModify;\n\n\t\t\tif (!pStrImage) continue;\n\n\t\t\twhile (*pStrImage != _T('\\0')) {\n\t\t\t\tsItem.Empty();\n\t\t\t\tsValue.Empty();\n\t\t\t\twhile (*pStrImage > _T('\\0') && *pStrImage <= _T(' ')) pStrImage = ::CharNext(pStrImage);\n\t\t\t\twhile (*pStrImage != _T('\\0') && *pStrImage != _T('=') && *pStrImage > _T(' ')) {\n\t\t\t\t\tLPTSTR pstrTemp = ::CharNext(pStrImage);\n\t\t\t\t\twhile (pStrImage < pstrTemp) {\n\t\t\t\t\t\tsItem += *pStrImage++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (*pStrImage > _T('\\0') && *pStrImage <= _T(' ')) pStrImage = ::CharNext(pStrImage);\n\t\t\t\tif (*pStrImage++ != _T('=')) break;\n\t\t\t\twhile (*pStrImage > _T('\\0') && *pStrImage <= _T(' ')) pStrImage = ::CharNext(pStrImage);\n\t\t\t\tif (*pStrImage++ != _T('\\'')) break;\n\t\t\t\twhile (*pStrImage != _T('\\0') && *pStrImage != _T('\\'')) {\n\t\t\t\t\tLPTSTR pstrTemp = ::CharNext(pStrImage);\n\t\t\t\t\twhile (pStrImage < pstrTemp) {\n\t\t\t\t\t\tsValue += *pStrImage++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (*pStrImage++ != _T('\\'')) break;\n\t\t\t\tif (!sValue.IsEmpty()) {\n\t\t\t\t\tif (sItem == _T(\"file\") || sItem == _T(\"res\")) {\n\t\t\t\t\t\tif (image_count > 0)\n\t\t\t\t\t\t\tDuiLib::DrawImage(hDC, pManager, rc, rcPaint, sImageName, sImageResType,\n\t\t\t\t\t\t\trcItem, rcBmpPart, rcCorner, dwMask, bFade, bHole, bTiledX, bTiledY);\n\n\t\t\t\t\t\tsImageName = sValue;\n\t\t\t\t\t\tif (sItem == _T(\"file\"))\n\t\t\t\t\t\t\t++image_count;\n\t\t\t\t\t}\n\t\t\t\t\telse if (sItem == _T(\"restype\")) {\n\t\t\t\t\t\tif (image_count > 0)\n\t\t\t\t\t\t\tDuiLib::DrawImage(hDC, pManager, rc, rcPaint, sImageName, sImageResType,\n\t\t\t\t\t\t\trcItem, rcBmpPart, rcCorner, dwMask, bFade, bHole, bTiledX, bTiledY);\n\n\t\t\t\t\t\tsImageResType = sValue;\n\t\t\t\t\t\t++image_count;\n\t\t\t\t\t}\n\t\t\t\t\telse if (sItem == _T(\"dest\")) {\n\t\t\t\t\t\trcItem.left = rc.left + _tcstol(sValue.GetData(), &pstr, 10);  ASSERT(pstr);\n\t\t\t\t\t\trcItem.top = rc.top + _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);\n\t\t\t\t\t\trcItem.right = rc.left + _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);\n\t\t\t\t\t\tif (rcItem.right > rc.right) rcItem.right = rc.right;\n\t\t\t\t\t\trcItem.bottom = rc.top + _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);\n\t\t\t\t\t\tif (rcItem.bottom > rc.bottom) rcItem.bottom = rc.bottom;\n\t\t\t\t\t}\n\t\t\t\t\telse if (sItem == _T(\"source\")) {\n\t\t\t\t\t\trcBmpPart.left = _tcstol(sValue.GetData(), &pstr, 10);  ASSERT(pstr);\n\t\t\t\t\t\trcBmpPart.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);\n\t\t\t\t\t\trcBmpPart.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);\n\t\t\t\t\t\trcBmpPart.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);\n\t\t\t\t\t}\n\t\t\t\t\telse if (sItem == _T(\"corner\")) {\n\t\t\t\t\t\trcCorner.left = _tcstol(sValue.GetData(), &pstr, 10);  ASSERT(pstr);\n\t\t\t\t\t\trcCorner.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);\n\t\t\t\t\t\trcCorner.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);\n\t\t\t\t\t\trcCorner.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);\n\t\t\t\t\t}\n\t\t\t\t\telse if (sItem == _T(\"mask\")) {\n\t\t\t\t\t\tif (sValue[0] == _T('#')) dwMask = _tcstoul(sValue.GetData() + 1, &pstr, 16);\n\t\t\t\t\t\telse dwMask = _tcstoul(sValue.GetData(), &pstr, 16);\n\t\t\t\t\t}\n\t\t\t\t\telse if (sItem == _T(\"fade\")) {\n\t\t\t\t\t\tbFade = (BYTE)_tcstoul(sValue.GetData(), &pstr, 10);\n\t\t\t\t\t}\n\t\t\t\t\telse if (sItem == _T(\"hole\")) {\n\t\t\t\t\t\tbHole = (_tcscmp(sValue.GetData(), _T(\"true\")) == 0);\n\t\t\t\t\t}\n\t\t\t\t\telse if (sItem == _T(\"xtiled\")) {\n\t\t\t\t\t\tbTiledX = (_tcscmp(sValue.GetData(), _T(\"true\")) == 0);\n\t\t\t\t\t}\n\t\t\t\t\telse if (sItem == _T(\"ytiled\")) {\n\t\t\t\t\t\tbTiledY = (_tcscmp(sValue.GetData(), _T(\"true\")) == 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (*pStrImage++ != _T(' ')) break;\n\t\t\t}\n\t\t}\n\n\t\tDuiLib::DrawImage(hDC, pManager, rc, rcPaint, sImageName, sImageResType,\n\t\t\trcItem, rcBmpPart, rcCorner, dwMask, bFade, bHole, bTiledX, bTiledY);\n\n\t\treturn true;\n\t}\n\n\tbool CRenderEngine::DrawImageString(HDC hDC, CPaintManagerUI* pManager, const RECT& rc, const RECT& rcPaint, \n\t\tLPCTSTR pStrImage, LPCTSTR pStrModify, bool bNeedAlpha, BYTE bNewFade)\n\t{\n\t\tif ((pManager == NULL) || (hDC == NULL)) return false;\n\n\t\t// 1aaa.jpg\n\t\t// 2file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' \n\t\t// mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false'\n\n\t\tCDuiString sImageName = pStrImage;\n\t\tCDuiString sImageResType;\n\t\tRECT rcItem = rc;\n\t\tRECT rcBmpPart = {0};\n\t\tRECT rcCorner = {0};\n\t\tDWORD dwMask = 0;\n\t\tBYTE bFade = 0xFF;\n\t\tbool bHole = false;\n\t\tbool bTiledX = false;\n\t\tbool bTiledY = false;\n\n\t\tint image_count = 0;\n\n\t\tCDuiString sItem;\n\t\tCDuiString sValue;\n\t\tLPTSTR pstr = NULL;\n\n\t\tfor( int i = 0; i < 2; ++i,image_count = 0 ) {\n\t\t\tif( i == 1)\n\t\t\t\tpStrImage = pStrModify;\n\n\t\t\tif( !pStrImage ) continue;\n\n\t\t\twhile( *pStrImage != _T('\\0') ) {\n\t\t\t\tsItem.Empty();\n\t\t\t\tsValue.Empty();\n\t\t\t\twhile( *pStrImage > _T('\\0') && *pStrImage <= _T(' ') ) pStrImage = ::CharNext(pStrImage);\n\t\t\t\twhile( *pStrImage != _T('\\0') && *pStrImage != _T('=') && *pStrImage > _T(' ') ) {\n\t\t\t\t\tLPTSTR pstrTemp = ::CharNext(pStrImage);\n\t\t\t\t\twhile( pStrImage < pstrTemp) {\n\t\t\t\t\t\tsItem += *pStrImage++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile( *pStrImage > _T('\\0') && *pStrImage <= _T(' ') ) pStrImage = ::CharNext(pStrImage);\n\t\t\t\tif( *pStrImage++ != _T('=') ) break;\n\t\t\t\twhile( *pStrImage > _T('\\0') && *pStrImage <= _T(' ') ) pStrImage = ::CharNext(pStrImage);\n\t\t\t\tif( *pStrImage++ != _T('\\'') ) break;\n\t\t\t\twhile( *pStrImage != _T('\\0') && *pStrImage != _T('\\'') ) {\n\t\t\t\t\tLPTSTR pstrTemp = ::CharNext(pStrImage);\n\t\t\t\t\twhile( pStrImage < pstrTemp) {\n\t\t\t\t\t\tsValue += *pStrImage++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( *pStrImage++ != _T('\\'') ) break;\n\t\t\t\tif( !sValue.IsEmpty() ) {\n\t\t\t\t\tif( sItem == _T(\"file\") || sItem == _T(\"res\") ) {\n\t\t\t\t\t\tif( image_count > 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( bNeedAlpha )\n\t\t\t\t\t\t\t\tDuiLib::DrawImage(hDC, pManager, rc, rcPaint, sImageName, sImageResType,rcItem, rcBmpPart, rcCorner, dwMask, bNewFade, bHole, bTiledX, bTiledY, bNeedAlpha);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tDuiLib::DrawImage(hDC, pManager, rc, rcPaint, sImageName, sImageResType,rcItem, rcBmpPart, rcCorner, dwMask, bFade, bHole, bTiledX, bTiledY);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsImageName = sValue;\n\t\t\t\t\t\tif( sItem == _T(\"file\") )\n\t\t\t\t\t\t\t++image_count;\n\t\t\t\t\t}\n\t\t\t\t\telse if( sItem == _T(\"restype\") ) {\n\t\t\t\t\t\tif( image_count > 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( bNeedAlpha )\n\t\t\t\t\t\t\t\tDuiLib::DrawImage(hDC, pManager, rc, rcPaint, sImageName, sImageResType,rcItem, rcBmpPart, rcCorner, dwMask, bNewFade, bHole, bTiledX, bTiledY, bNeedAlpha);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tDuiLib::DrawImage(hDC, pManager, rc, rcPaint, sImageName, sImageResType,rcItem, rcBmpPart, rcCorner, dwMask, bFade, bHole, bTiledX, bTiledY);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsImageResType = sValue;\n\t\t\t\t\t\t++image_count;\n\t\t\t\t\t}\n\t\t\t\t\telse if( sItem == _T(\"dest\") ) {\n\t\t\t\t\t\trcItem.left = rc.left + _tcstol(sValue.GetData(), &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\trcItem.top = rc.top + _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);\n\t\t\t\t\t\trcItem.right = rc.left + _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);\n\t\t\t\t\t\tif (rcItem.right > rc.right) rcItem.right = rc.right;\n\t\t\t\t\t\trcItem.bottom = rc.top + _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);\n\t\t\t\t\t\tif (rcItem.bottom > rc.bottom) rcItem.bottom = rc.bottom;\n\t\t\t\t\t}\n\t\t\t\t\telse if( sItem == _T(\"source\") ) {\n\t\t\t\t\t\trcBmpPart.left = _tcstol(sValue.GetData(), &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\trcBmpPart.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\t\t\t\trcBmpPart.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\trcBmpPart.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);  \n\t\t\t\t\t}\n\t\t\t\t\telse if( sItem == _T(\"corner\") ) {\n\t\t\t\t\t\trcCorner.left = _tcstol(sValue.GetData(), &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\trcCorner.top = _tcstol(pstr + 1, &pstr, 10);    ASSERT(pstr);    \n\t\t\t\t\t\trcCorner.right = _tcstol(pstr + 1, &pstr, 10);  ASSERT(pstr);    \n\t\t\t\t\t\trcCorner.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);\n\t\t\t\t\t}\n\t\t\t\t\telse if( sItem == _T(\"mask\") ) {\n\t\t\t\t\t\tif( sValue[0] == _T('#')) dwMask = _tcstoul(sValue.GetData() + 1, &pstr, 16);\n\t\t\t\t\t\telse dwMask = _tcstoul(sValue.GetData(), &pstr, 16);\n\t\t\t\t\t}\n\t\t\t\t\telse if( sItem == _T(\"fade\") ) {\n\t\t\t\t\t\tbFade = (BYTE)_tcstoul(sValue.GetData(), &pstr, 10);\n\t\t\t\t\t}\n\t\t\t\t\telse if( sItem == _T(\"hole\") ) {\n\t\t\t\t\t\tbHole = (_tcscmp(sValue.GetData(), _T(\"true\")) == 0);\n\t\t\t\t\t}\n\t\t\t\t\telse if( sItem == _T(\"xtiled\") ) {\n\t\t\t\t\t\tbTiledX = (_tcscmp(sValue.GetData(), _T(\"true\")) == 0);\n\t\t\t\t\t}\n\t\t\t\t\telse if( sItem == _T(\"ytiled\") ) {\n\t\t\t\t\t\tbTiledY = (_tcscmp(sValue.GetData(), _T(\"true\")) == 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( *pStrImage++ != _T(' ') ) break;\n\t\t\t}\n\t\t}\n\n\t\t// \tUiLib::DrawImage(hDC, pManager, rc, rcPaint, sImageName, sImageResType,\n\t\t// \t\trcItem, rcBmpPart, rcCorner, dwMask, bFade, bHole, bTiledX, bTiledY);\n\t\tif( bNeedAlpha )\n\t\t\tDuiLib::DrawImage(hDC, pManager, rc, rcPaint, sImageName, sImageResType,\n\t\t\trcItem, rcBmpPart, rcCorner, dwMask, bNewFade, bHole, bTiledX, bTiledY, bNeedAlpha);\n\t\telse\n\t\t\tDuiLib::DrawImage(hDC, pManager, rc, rcPaint, sImageName, sImageResType,\n\t\t\trcItem, rcBmpPart, rcCorner, dwMask, bFade, bHole, bTiledX, bTiledY);\n\t\treturn true;\n\t}\n\n\tvoid CRenderEngine::DrawColor(HDC hDC, const RECT& rc, DWORD color)\n\t{\n\t\tif (color <= 0x00FFFFFF) return;\n\t\tif (color >= 0xFF000000)\n\t\t{\n\t\t\t::SetBkColor(hDC, RGB(GetBValue(color), GetGValue(color), GetRValue(color)));\n\t\t\t::ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rc, NULL, 0, NULL);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Create a new 32bpp bitmap with room for an alpha channel\n\t\t\tBITMAPINFO bmi = { 0 };\n\t\t\tbmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);\n\t\t\tbmi.bmiHeader.biWidth = 1;\n\t\t\tbmi.bmiHeader.biHeight = 1;\n\t\t\tbmi.bmiHeader.biPlanes = 1;\n\t\t\tbmi.bmiHeader.biBitCount = 32;\n\t\t\tbmi.bmiHeader.biCompression = BI_RGB;\n\t\t\tbmi.bmiHeader.biSizeImage = 1 * 1 * sizeof(DWORD);\n\t\t\tLPDWORD pDest = NULL;\n\t\t\tHBITMAP hBitmap = ::CreateDIBSection(hDC, &bmi, DIB_RGB_COLORS, (LPVOID*)&pDest, NULL, 0);\n\t\t\tif (!hBitmap) return;\n\n\t\t\t*pDest = color;\n\n\t\t\tRECT rcBmpPart = { 0, 0, 1, 1 };\n\t\t\tRECT rcCorners = { 0 };\n\t\t\tDrawImage(hDC, hBitmap, rc, rc, rcBmpPart, rcCorners, true, 255);\n\t\t\t::DeleteObject(hBitmap);\n\t\t}\n\t}\n\n\tvoid CRenderEngine::DrawGradient(HDC hDC, const RECT& rc, DWORD dwFirst, DWORD dwSecond, bool bVertical, int nSteps)\n\t{\n\t\ttypedef BOOL(WINAPI *LPALPHABLEND)(HDC, int, int, int, int, HDC, int, int, int, int, BLENDFUNCTION);\n\t\tstatic LPALPHABLEND lpAlphaBlend = (LPALPHABLEND) ::GetProcAddress(::GetModuleHandle(_T(\"msimg32.dll\")), \"AlphaBlend\");\n\t\tif (lpAlphaBlend == NULL) lpAlphaBlend = AlphaBitBlt;\n\t\ttypedef BOOL(WINAPI *PGradientFill)(HDC, PTRIVERTEX, ULONG, PVOID, ULONG, ULONG);\n\t\tstatic PGradientFill lpGradientFill = (PGradientFill) ::GetProcAddress(::GetModuleHandle(_T(\"msimg32.dll\")), \"GradientFill\");\n\n\t\tBYTE bAlpha = (BYTE)(((dwFirst >> 24) + (dwSecond >> 24)) >> 1);\n\t\tif (bAlpha == 0) return;\n\t\tint cx = rc.right - rc.left;\n\t\tint cy = rc.bottom - rc.top;\n\t\tRECT rcPaint = rc;\n\t\tHDC hPaintDC = hDC;\n\t\tHBITMAP hPaintBitmap = NULL;\n\t\tHBITMAP hOldPaintBitmap = NULL;\n\t\tif (bAlpha < 255) {\n\t\t\trcPaint.left = rcPaint.top = 0;\n\t\t\trcPaint.right = cx;\n\t\t\trcPaint.bottom = cy;\n\t\t\thPaintDC = ::CreateCompatibleDC(hDC);\n\t\t\thPaintBitmap = ::CreateCompatibleBitmap(hDC, cx, cy);\n\t\t\tASSERT(hPaintDC);\n\t\t\tASSERT(hPaintBitmap);\n\t\t\thOldPaintBitmap = (HBITMAP) ::SelectObject(hPaintDC, hPaintBitmap);\n\t\t}\n\t\tif (lpGradientFill != NULL)\n\t\t{\n\t\t\tTRIVERTEX triv[2] =\n\t\t\t{\n\t\t\t\t{ rcPaint.left, rcPaint.top, GetBValue(dwFirst) << 8, GetGValue(dwFirst) << 8, GetRValue(dwFirst) << 8, 0xFF00 },\n\t\t\t\t{ rcPaint.right, rcPaint.bottom, GetBValue(dwSecond) << 8, GetGValue(dwSecond) << 8, GetRValue(dwSecond) << 8, 0xFF00 }\n\t\t\t};\n\t\t\tGRADIENT_RECT grc = { 0, 1 };\n\t\t\tlpGradientFill(hPaintDC, triv, 2, &grc, 1, bVertical ? GRADIENT_FILL_RECT_V : GRADIENT_FILL_RECT_H);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Determine how many shades\n\t\t\tint nShift = 1;\n\t\t\tif (nSteps >= 64) nShift = 6;\n\t\t\telse if (nSteps >= 32) nShift = 5;\n\t\t\telse if (nSteps >= 16) nShift = 4;\n\t\t\telse if (nSteps >= 8) nShift = 3;\n\t\t\telse if (nSteps >= 4) nShift = 2;\n\t\t\tint nLines = 1 << nShift;\n\t\t\tfor (int i = 0; i < nLines; i++) {\n\t\t\t\t// Do a little alpha blending\n\t\t\t\tBYTE bR = (BYTE)((GetBValue(dwSecond) * (nLines - i) + GetBValue(dwFirst) * i) >> nShift);\n\t\t\t\tBYTE bG = (BYTE)((GetGValue(dwSecond) * (nLines - i) + GetGValue(dwFirst) * i) >> nShift);\n\t\t\t\tBYTE bB = (BYTE)((GetRValue(dwSecond) * (nLines - i) + GetRValue(dwFirst) * i) >> nShift);\n\t\t\t\t// ... then paint with the resulting color\n\t\t\t\tHBRUSH hBrush = ::CreateSolidBrush(RGB(bR, bG, bB));\n\t\t\t\tRECT r2 = rcPaint;\n\t\t\t\tif (bVertical) {\n\t\t\t\t\tr2.bottom = rc.bottom - ((i * (rc.bottom - rc.top)) >> nShift);\n\t\t\t\t\tr2.top = rc.bottom - (((i + 1) * (rc.bottom - rc.top)) >> nShift);\n\t\t\t\t\tif ((r2.bottom - r2.top) > 0) ::FillRect(hDC, &r2, hBrush);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tr2.left = rc.right - (((i + 1) * (rc.right - rc.left)) >> nShift);\n\t\t\t\t\tr2.right = rc.right - ((i * (rc.right - rc.left)) >> nShift);\n\t\t\t\t\tif ((r2.right - r2.left) > 0) ::FillRect(hPaintDC, &r2, hBrush);\n\t\t\t\t}\n\t\t\t\t::DeleteObject(hBrush);\n\t\t\t}\n\t\t}\n\t\tif (bAlpha < 255) {\n\t\t\tBLENDFUNCTION bf = { AC_SRC_OVER, 0, bAlpha, AC_SRC_ALPHA };\n\t\t\tlpAlphaBlend(hDC, rc.left, rc.top, cx, cy, hPaintDC, 0, 0, cx, cy, bf);\n\t\t\t::SelectObject(hPaintDC, hOldPaintBitmap);\n\t\t\t::DeleteObject(hPaintBitmap);\n\t\t\t::DeleteDC(hPaintDC);\n\t\t}\n\t}\n\n\n\tvoid CRenderEngine::DrawLine(HDC hDC, const RECT& rc, int nSize, DWORD dwPenColor, int nStyle /*= PS_SOLID*/)\n\t{\n\t\tASSERT(::GetObjectType(hDC) == OBJ_DC || ::GetObjectType(hDC) == OBJ_MEMDC);\n\n\t\tLOGPEN lg;\n\t\tlg.lopnColor = RGB(GetBValue(dwPenColor), GetGValue(dwPenColor), GetRValue(dwPenColor));\n\t\tlg.lopnStyle = nStyle;\n\t\tlg.lopnWidth.x = nSize;\n\t\tHPEN hPen = CreatePenIndirect(&lg);\n\t\tHPEN hOldPen = (HPEN)::SelectObject(hDC, hPen);\n\t\tPOINT ptTemp = { 0 };\n\t\t::MoveToEx(hDC, rc.left, rc.top, &ptTemp);\n\t\t::LineTo(hDC, rc.right, rc.bottom);\n\t\t::SelectObject(hDC, hOldPen);\n\t\t::DeleteObject(hPen);\n\t}\n\n\tvoid CRenderEngine::DrawRect(HDC hDC, const RECT& rc, int nSize, DWORD dwPenColor)\n\t{\n\t\tASSERT(::GetObjectType(hDC) == OBJ_DC || ::GetObjectType(hDC) == OBJ_MEMDC);\n\t\tHPEN hPen = ::CreatePen(PS_SOLID | PS_INSIDEFRAME, nSize, RGB(GetBValue(dwPenColor), GetGValue(dwPenColor), GetRValue(dwPenColor)));\n\t\tHPEN hOldPen = (HPEN)::SelectObject(hDC, hPen);\n\t\t::SelectObject(hDC, ::GetStockObject(HOLLOW_BRUSH));\n\t\t::Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);\n\t\t::SelectObject(hDC, hOldPen);\n\t\t::DeleteObject(hPen);\n\t}\n\n\tvoid CRenderEngine::DrawRoundRect(HDC hDC, const RECT& rc, int nSize, int width, int height, DWORD dwPenColor)\n\t{\n\t\tASSERT(::GetObjectType(hDC) == OBJ_DC || ::GetObjectType(hDC) == OBJ_MEMDC);\n\t\tHPEN hPen = ::CreatePen(PS_SOLID | PS_INSIDEFRAME, nSize, RGB(GetBValue(dwPenColor), GetGValue(dwPenColor), GetRValue(dwPenColor)));\n\t\tHPEN hOldPen = (HPEN)::SelectObject(hDC, hPen);\n\t\t::SelectObject(hDC, ::GetStockObject(HOLLOW_BRUSH));\n\t\t::RoundRect(hDC, rc.left, rc.top, rc.right, rc.bottom, width, height);\n\t\t::SelectObject(hDC, hOldPen);\n\t\t::DeleteObject(hPen);\n\t}\n#if 1\n\tvoid CRenderEngine::DrawText(HDC hDC, CPaintManagerUI* pManager, RECT& rc, LPCTSTR pstrText, DWORD dwTextColor, int iFont, UINT uStyle)\n\t{\n\t\tASSERT(::GetObjectType(hDC)==OBJ_DC || ::GetObjectType(hDC)==OBJ_MEMDC);\n\t\tif( pstrText == NULL || pManager == NULL ) return;\n\t\t::SetBkMode(hDC, TRANSPARENT);\n\t\t::SetTextColor(hDC, RGB(GetBValue(dwTextColor), GetGValue(dwTextColor), GetRValue(dwTextColor)));\n\t\tHFONT hOldFont = (HFONT)::SelectObject(hDC, pManager->GetFont(iFont));\n\t\tCDuiString sDrawStr=pstrText;\n\t\tpManager->PaserString(sDrawStr);\n\t\t::DrawText(hDC, sDrawStr.GetData(), -1, &rc, uStyle | DT_NOPREFIX);\n\t\t::SelectObject(hDC, hOldFont);\n\t}\n#endif\n\n#if 0\n\t/*͸嵼͸,DGI+duilibдĳãʼж\n\tULONG_PTR m_gdiplusToken;\n\tGdiplus::GdiplusStartupInput StartupInput;\n\tGdiplusStartup(&m_gdiplusToken, &StartupInput, NULL);\n\tGdiplusShutdown(m_gdiplusToken);\n\t˴UImanage.cpp/.h\n\t*/\n\tvoid CRenderEngine::DrawText(HDC hDC, CPaintManagerUI* pManager, RECT& rc, LPCTSTR pstrText, DWORD dwTextColor, int iFont, UINT uStyle)\n\t{\n\t\tASSERT(::GetObjectType(hDC) == OBJ_DC || ::GetObjectType(hDC) == OBJ_MEMDC);\n\t\tif (pstrText == NULL || pManager == NULL) return;\n\t\t::SetBkMode(hDC, TRANSPARENT);\n\t\tBYTE alphaValue = (dwTextColor) >> 24;\n\n\t\tGdiplus::Graphics graphics(hDC);\n\t\tFont myFont(hDC, pManager->GetFont(iFont));\n\t\tRectF layoutRect(\n\t\t\tstatic_cast<REAL>(rc.left),\n\t\t\tstatic_cast<REAL>(rc.top),\n\t\t\tstatic_cast<REAL>(rc.right - rc.left),\n\t\t\tstatic_cast<REAL>(rc.bottom - rc.top));\n\t\tStringFormat format;\n\n\t\tint i = uStyle % 16;\n\n\t\tformat.SetAlignment(StringAlignmentNear);\n\t\tformat.SetLineAlignment(StringAlignmentNear);\n\n\n\t\tif (i & DT_CENTER) format.SetAlignment(StringAlignmentCenter);\n\t\tif (i & DT_RIGHT) format.SetAlignment(StringAlignmentFar);\n\t\tif (i & DT_VCENTER) format.SetLineAlignment(StringAlignmentCenter);\n\t\tif (i & DT_BOTTOM) format.SetLineAlignment(StringAlignmentFar);\n\n\t\tif (uStyle & DT_END_ELLIPSIS)format.SetTrimming(StringTrimmingEllipsisCharacter);\n\t\tif (uStyle & DT_SINGLELINE) format.SetFormatFlags(StringFormatFlagsNoWrap);\n\n\t\tColor textcolor(dwTextColor);\n\n\t\t//ﾭԣȡRBߵˣGetBValueGetRValueȡʽdwTextColorд뷽ʽͬ  \n\t\t//RGBд룬COLOR˳ʽȡǻֵߵ  \n\t\tBYTE R = GetBValue(dwTextColor);\n\t\tBYTE B = GetRValue(dwTextColor);\n\t\tBYTE G = GetGValue(dwTextColor);\n\t\tSolidBrush textBrush(Color(255, R, G, B));\n\n\n#ifdef UNICODE\n\t\tgraphics.DrawString(pstrText,\n\t\t\t-1,\n\t\t\t&myFont,\n\t\t\tlayoutRect,\n\t\t\t&format,\n\t\t\t&textBrush);\n#else\n\t\tint    textlen;\n\t\twchar_t * result;\n\t\ttextlen = MultiByteToWideChar(CP_ACP, 0, pstrText, -1, NULL, 0);\n\t\tresult = (wchar_t *)malloc((textlen + 1)*sizeof(wchar_t));\n\t\tmemset(result, 0, (textlen + 1)*sizeof(wchar_t));\n\t\tMultiByteToWideChar(CP_ACP, 0, pstrText, -1, (LPWSTR)result, textlen);\n\n\n\t\tgraphics.DrawString(result,\n\t\t\t-1,\n\t\t\t&myFont,\n\t\t\tlayoutRect,\n\t\t\t&format,\n\t\t\t&textBrush);\n\t\tfree(result);\n#endif // DEBUG\n\n\n\n\n\t}\n\n#endif\n\tvoid CRenderEngine::DrawHtmlText(HDC hDC, CPaintManagerUI* pManager, RECT& rc, LPCTSTR pstrText, DWORD dwTextColor, RECT* prcLinks, CDuiString* sLinks, int& nLinkRects, UINT uStyle)\n\t{\n\t\t// ǵxml༭ʹ<>Ų㣬ʹ{}Ŵ\n\t\t// ֱ֧ǩǶף<l><b>text</b></l>ǽǶӦñģ<l><b>text</l></b>\n\t\t// The string formatter supports a kind of \"mini-html\" that consists of various short tags:\n\t\t//\n\t\t//   Bold:             <b>text</b>\n\t\t//   Color:            <c #xxxxxx>text</c>  where x = RGB in hex\n\t\t//   Font:             <f x>text</f>        where x = font id\n\t\t//   Italic:           <i>text</i>\n\t\t//   Image:            <i x y z>            where x = image name and y = imagelist num and z(optional) = imagelist id\n\t\t//   Link:             <a x>text</a>        where x(optional) = link content, normal like app:notepad or http:www.xxx.com\n\t\t//   NewLine           <n>                  \n\t\t//   Paragraph:        <p x>text</p>        where x = extra pixels indent in p\n\t\t//   Raw Text:         <r>text</r>\n\t\t//   Selected:         <s>text</s>\n\t\t//   Underline:        <u>text</u>\n\t\t//   X Indent:         <x i>                where i = hor indent in pixels\n\t\t//   Y Indent:         <y i>                where i = ver indent in pixels \n\n\t\tASSERT(::GetObjectType(hDC) == OBJ_DC || ::GetObjectType(hDC) == OBJ_MEMDC);\n\t\tif (pstrText == NULL || pManager == NULL) return;\n\t\tif (::IsRectEmpty(&rc)) return;\n\n\t\tbool bDraw = (uStyle & DT_CALCRECT) == 0;\n\n\t\tCStdPtrArray aFontArray(10);\n\t\tCStdPtrArray aColorArray(10);\n\t\tCStdPtrArray aPIndentArray(10);\n\n\t\tRECT rcClip = { 0 };\n\t\t::GetClipBox(hDC, &rcClip);\n\t\tHRGN hOldRgn = ::CreateRectRgnIndirect(&rcClip);\n\t\tHRGN hRgn = ::CreateRectRgnIndirect(&rc);\n\t\tif (bDraw) ::ExtSelectClipRgn(hDC, hRgn, RGN_AND);\n\n\t\tTEXTMETRIC* pTm = &pManager->GetDefaultFontInfo()->tm;\n\t\tHFONT hOldFont = (HFONT) ::SelectObject(hDC, pManager->GetDefaultFontInfo()->hFont);\n\t\t::SetBkMode(hDC, TRANSPARENT);\n\t\t::SetTextColor(hDC, RGB(GetBValue(dwTextColor), GetGValue(dwTextColor), GetRValue(dwTextColor)));\n\t\tDWORD dwBkColor = pManager->GetDefaultSelectedBkColor();\n\t\t::SetBkColor(hDC, RGB(GetBValue(dwBkColor), GetGValue(dwBkColor), GetRValue(dwBkColor)));\n\n\t\t// If the drawstyle include a alignment, we'll need to first determine the text-size so\n\t\t// we can draw it at the correct position...\n\t\tif (((uStyle & DT_CENTER) != 0 || (uStyle & DT_RIGHT) != 0 || (uStyle & DT_VCENTER) != 0 || (uStyle & DT_BOTTOM) != 0) && (uStyle & DT_CALCRECT) == 0) {\n\t\t\tRECT rcText = { 0, 0, 9999, 100 };\n\t\t\tint nLinks = 0;\n\t\t\tDrawHtmlText(hDC, pManager, rcText, pstrText, dwTextColor, NULL, NULL, nLinks, uStyle | DT_CALCRECT);\n\t\t\tif ((uStyle & DT_SINGLELINE) != 0){\n\t\t\t\tif ((uStyle & DT_CENTER) != 0) {\n\t\t\t\t\trc.left = rc.left + ((rc.right - rc.left) / 2) - ((rcText.right - rcText.left) / 2);\n\t\t\t\t\trc.right = rc.left + (rcText.right - rcText.left);\n\t\t\t\t}\n\t\t\t\tif ((uStyle & DT_RIGHT) != 0) {\n\t\t\t\t\trc.left = rc.right - (rcText.right - rcText.left);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((uStyle & DT_VCENTER) != 0) {\n\t\t\t\trc.top = rc.top + ((rc.bottom - rc.top) / 2) - ((rcText.bottom - rcText.top) / 2);\n\t\t\t\trc.bottom = rc.top + (rcText.bottom - rcText.top);\n\t\t\t}\n\t\t\tif ((uStyle & DT_BOTTOM) != 0) {\n\t\t\t\trc.top = rc.bottom - (rcText.bottom - rcText.top);\n\t\t\t}\n\t\t}\n\n\t\tbool bHoverLink = false;\n\t\tCDuiString sHoverLink;\n\t\tPOINT ptMouse = pManager->GetMousePos();\n\t\tfor (int i = 0; !bHoverLink && i < nLinkRects; i++) {\n\t\t\tif (::PtInRect(prcLinks + i, ptMouse)) {\n\t\t\t\tsHoverLink = *(CDuiString*)(sLinks + i);\n\t\t\t\tbHoverLink = true;\n\t\t\t}\n\t\t}\n\n\t\tPOINT pt = { rc.left, rc.top };\n\t\tint iLinkIndex = 0;\n\t\tint cyLine = pTm->tmHeight + pTm->tmExternalLeading + (int)aPIndentArray.GetAt(aPIndentArray.GetSize() - 1);\n\t\tint cyMinHeight = 0;\n\t\tint cxMaxWidth = 0;\n\t\tPOINT ptLinkStart = { 0 };\n\t\tbool bLineEnd = false;\n\t\tbool bInRaw = false;\n\t\tbool bInLink = false;\n\t\tbool bInSelected = false;\n\t\tint iLineLinkIndex = 0;\n\n\t\t// Űϰͼĵײ룬ÿлƶҪȼ߶ȣٻ\n\t\tCStdPtrArray aLineFontArray;\n\t\tCStdPtrArray aLineColorArray;\n\t\tCStdPtrArray aLinePIndentArray;\n\t\tLPCTSTR pstrLineBegin = pstrText;\n\t\tbool bLineInRaw = false;\n\t\tbool bLineInLink = false;\n\t\tbool bLineInSelected = false;\n\t\tint cyLineHeight = 0;\n\t\tbool bLineDraw = false; // еĵڶ׶Σ\n\t\twhile (*pstrText != _T('\\0')) {\n\t\t\tif (pt.x >= rc.right || *pstrText == _T('\\n') || bLineEnd) {\n\t\t\t\tif (*pstrText == _T('\\n')) pstrText++;\n\t\t\t\tif (bLineEnd) bLineEnd = false;\n\t\t\t\tif (!bLineDraw) {\n\t\t\t\t\tif (bInLink && iLinkIndex < nLinkRects) {\n\t\t\t\t\t\t::SetRect(&prcLinks[iLinkIndex++], ptLinkStart.x, ptLinkStart.y, MIN(pt.x, rc.right), pt.y + cyLine);\n\t\t\t\t\t\tCDuiString *pStr1 = (CDuiString*)(sLinks + iLinkIndex - 1);\n\t\t\t\t\t\tCDuiString *pStr2 = (CDuiString*)(sLinks + iLinkIndex);\n\t\t\t\t\t\t*pStr2 = *pStr1;\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i = iLineLinkIndex; i < iLinkIndex; i++) {\n\t\t\t\t\t\tprcLinks[i].bottom = pt.y + cyLine;\n\t\t\t\t\t}\n\t\t\t\t\tif (bDraw) {\n\t\t\t\t\t\tbInLink = bLineInLink;\n\t\t\t\t\t\tiLinkIndex = iLineLinkIndex;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (bInLink && iLinkIndex < nLinkRects) iLinkIndex++;\n\t\t\t\t\tbLineInLink = bInLink;\n\t\t\t\t\tiLineLinkIndex = iLinkIndex;\n\t\t\t\t}\n\t\t\t\tif ((uStyle & DT_SINGLELINE) != 0 && (!bDraw || bLineDraw)) break;\n\t\t\t\tif (bDraw) bLineDraw = !bLineDraw; // !\n\t\t\t\tpt.x = rc.left;\n\t\t\t\tif (!bLineDraw) pt.y += cyLine;\n\t\t\t\tif (pt.y > rc.bottom && bDraw) break;\n\t\t\t\tptLinkStart = pt;\n\t\t\t\tcyLine = pTm->tmHeight + pTm->tmExternalLeading + (int)aPIndentArray.GetAt(aPIndentArray.GetSize() - 1);\n\t\t\t\tif (pt.x >= rc.right) break;\n\t\t\t}\n\t\t\telse if (!bInRaw && (*pstrText == _T('<') || *pstrText == _T('{'))\n\t\t\t\t&& (pstrText[1] >= _T('a') && pstrText[1] <= _T('z'))\n\t\t\t\t&& (pstrText[2] == _T(' ') || pstrText[2] == _T('>') || pstrText[2] == _T('}'))) {\n\t\t\t\t\tpstrText++;\n\t\t\t\t\tLPCTSTR pstrNextStart = NULL;\n\t\t\t\t\tswitch (*pstrText) {\n\t\t\t\t\tcase _T('a'):  // Link\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\twhile (*pstrText > _T('\\0') && *pstrText <= _T(' ')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\t\tif (iLinkIndex < nLinkRects && !bLineDraw) {\n\t\t\t\t\t\t\t\tCDuiString *pStr = (CDuiString*)(sLinks + iLinkIndex);\n\t\t\t\t\t\t\t\tpStr->Empty();\n\t\t\t\t\t\t\t\twhile (*pstrText != _T('\\0') && *pstrText != _T('>') && *pstrText != _T('}')) {\n\t\t\t\t\t\t\t\t\tLPCTSTR pstrTemp = ::CharNext(pstrText);\n\t\t\t\t\t\t\t\t\twhile (pstrText < pstrTemp) {\n\t\t\t\t\t\t\t\t\t\t*pStr += *pstrText++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tDWORD clrColor = pManager->GetDefaultLinkFontColor();\n\t\t\t\t\t\t\tif (bHoverLink && iLinkIndex < nLinkRects) {\n\t\t\t\t\t\t\t\tCDuiString *pStr = (CDuiString*)(sLinks + iLinkIndex);\n\t\t\t\t\t\t\t\tif (sHoverLink == *pStr) clrColor = pManager->GetDefaultLinkHoverFontColor();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//else if( prcLinks == NULL ) {\n\t\t\t\t\t\t\t//    if( ::PtInRect(&rc, ptMouse) )\n\t\t\t\t\t\t\t//        clrColor = pManager->GetDefaultLinkHoverFontColor();\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\taColorArray.Add((LPVOID)clrColor);\n\t\t\t\t\t\t\t::SetTextColor(hDC, RGB(GetBValue(clrColor), GetGValue(clrColor), GetRValue(clrColor)));\n\t\t\t\t\t\t\tTFontInfo* pFontInfo = pManager->GetDefaultFontInfo();\n\t\t\t\t\t\t\tif (aFontArray.GetSize() > 0) pFontInfo = (TFontInfo*)aFontArray.GetAt(aFontArray.GetSize() - 1);\n\t\t\t\t\t\t\tif (pFontInfo->bUnderline == false) {\n\t\t\t\t\t\t\t\tHFONT hFont = pManager->GetFont(pFontInfo->sFontName, pFontInfo->iSize, pFontInfo->bBold, true, pFontInfo->bItalic);\n\t\t\t\t\t\t\t\tif (hFont == NULL) hFont = pManager->AddFont(pFontInfo->sFontName, pFontInfo->iSize, pFontInfo->bBold, true, pFontInfo->bItalic);\n\t\t\t\t\t\t\t\tpFontInfo = pManager->GetFontInfo(hFont);\n\t\t\t\t\t\t\t\taFontArray.Add(pFontInfo);\n\t\t\t\t\t\t\t\tpTm = &pFontInfo->tm;\n\t\t\t\t\t\t\t\t::SelectObject(hDC, pFontInfo->hFont);\n\t\t\t\t\t\t\t\tcyLine = MAX(cyLine, pTm->tmHeight + pTm->tmExternalLeading + (int)aPIndentArray.GetAt(aPIndentArray.GetSize() - 1));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tptLinkStart = pt;\n\t\t\t\t\t\t\tbInLink = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase _T('b'):  // Bold\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\tTFontInfo* pFontInfo = pManager->GetDefaultFontInfo();\n\t\t\t\t\t\t\tif (aFontArray.GetSize() > 0) pFontInfo = (TFontInfo*)aFontArray.GetAt(aFontArray.GetSize() - 1);\n\t\t\t\t\t\t\tif (pFontInfo->bBold == false) {\n\t\t\t\t\t\t\t\tHFONT hFont = pManager->GetFont(pFontInfo->sFontName, pFontInfo->iSize, true, pFontInfo->bUnderline, pFontInfo->bItalic);\n\t\t\t\t\t\t\t\tif (hFont == NULL) hFont = pManager->AddFont(pFontInfo->sFontName, pFontInfo->iSize, true, pFontInfo->bUnderline, pFontInfo->bItalic);\n\t\t\t\t\t\t\t\tpFontInfo = pManager->GetFontInfo(hFont);\n\t\t\t\t\t\t\t\taFontArray.Add(pFontInfo);\n\t\t\t\t\t\t\t\tpTm = &pFontInfo->tm;\n\t\t\t\t\t\t\t\t::SelectObject(hDC, pFontInfo->hFont);\n\t\t\t\t\t\t\t\tcyLine = MAX(cyLine, pTm->tmHeight + pTm->tmExternalLeading + (int)aPIndentArray.GetAt(aPIndentArray.GetSize() - 1));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase _T('c'):  // Color\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\twhile (*pstrText > _T('\\0') && *pstrText <= _T(' ')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\t\tif (*pstrText == _T('#')) pstrText++;\n\t\t\t\t\t\t\tDWORD clrColor = _tcstol(pstrText, const_cast<LPTSTR*>(&pstrText), 16);\n\t\t\t\t\t\t\taColorArray.Add((LPVOID)clrColor);\n\t\t\t\t\t\t\t::SetTextColor(hDC, RGB(GetBValue(clrColor), GetGValue(clrColor), GetRValue(clrColor)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase _T('f'):  // Font\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\twhile (*pstrText > _T('\\0') && *pstrText <= _T(' ')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\t\tLPCTSTR pstrTemp = pstrText;\n\t\t\t\t\t\t\tint iFont = (int)_tcstol(pstrText, const_cast<LPTSTR*>(&pstrText), 10);\n\t\t\t\t\t\t\t//if( isdigit(*pstrText) ) { // debug汾쳣\n\t\t\t\t\t\t\tif (pstrTemp != pstrText) {\n\t\t\t\t\t\t\t\tTFontInfo* pFontInfo = pManager->GetFontInfo(iFont);\n\t\t\t\t\t\t\t\taFontArray.Add(pFontInfo);\n\t\t\t\t\t\t\t\tpTm = &pFontInfo->tm;\n\t\t\t\t\t\t\t\t::SelectObject(hDC, pFontInfo->hFont);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tCDuiString sFontName;\n\t\t\t\t\t\t\t\tint iFontSize = 10;\n\t\t\t\t\t\t\t\tCDuiString sFontAttr;\n\t\t\t\t\t\t\t\tbool bBold = false;\n\t\t\t\t\t\t\t\tbool bUnderline = false;\n\t\t\t\t\t\t\t\tbool bItalic = false;\n\t\t\t\t\t\t\t\twhile (*pstrText != _T('\\0') && *pstrText != _T('>') && *pstrText != _T('}') && *pstrText != _T(' ')) {\n\t\t\t\t\t\t\t\t\tpstrTemp = ::CharNext(pstrText);\n\t\t\t\t\t\t\t\t\twhile (pstrText < pstrTemp) {\n\t\t\t\t\t\t\t\t\t\tsFontName += *pstrText++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twhile (*pstrText > _T('\\0') && *pstrText <= _T(' ')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\t\t\tif (isdigit(*pstrText)) {\n\t\t\t\t\t\t\t\t\tiFontSize = (int)_tcstol(pstrText, const_cast<LPTSTR*>(&pstrText), 10);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twhile (*pstrText > _T('\\0') && *pstrText <= _T(' ')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\t\t\twhile (*pstrText != _T('\\0') && *pstrText != _T('>') && *pstrText != _T('}')) {\n\t\t\t\t\t\t\t\t\tpstrTemp = ::CharNext(pstrText);\n\t\t\t\t\t\t\t\t\twhile (pstrText < pstrTemp) {\n\t\t\t\t\t\t\t\t\t\tsFontAttr += *pstrText++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsFontAttr.MakeLower();\n\t\t\t\t\t\t\t\tif (sFontAttr.Find(_T(\"bold\")) >= 0) bBold = true;\n\t\t\t\t\t\t\t\tif (sFontAttr.Find(_T(\"underline\")) >= 0) bUnderline = true;\n\t\t\t\t\t\t\t\tif (sFontAttr.Find(_T(\"italic\")) >= 0) bItalic = true;\n\t\t\t\t\t\t\t\tHFONT hFont = pManager->GetFont(sFontName, iFontSize, bBold, bUnderline, bItalic);\n\t\t\t\t\t\t\t\tif (hFont == NULL) hFont = pManager->AddFont(sFontName, iFontSize, bBold, bUnderline, bItalic);\n\t\t\t\t\t\t\t\tTFontInfo* pFontInfo = pManager->GetFontInfo(hFont);\n\t\t\t\t\t\t\t\taFontArray.Add(pFontInfo);\n\t\t\t\t\t\t\t\tpTm = &pFontInfo->tm;\n\t\t\t\t\t\t\t\t::SelectObject(hDC, pFontInfo->hFont);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcyLine = MAX(cyLine, pTm->tmHeight + pTm->tmExternalLeading + (int)aPIndentArray.GetAt(aPIndentArray.GetSize() - 1));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase _T('i'):  // Italic or Image\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrNextStart = pstrText - 1;\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\tCDuiString sImageString = pstrText;\n\t\t\t\t\t\t\tint iWidth = 0;\n\t\t\t\t\t\t\tint iHeight = 0;\n\t\t\t\t\t\t\twhile (*pstrText > _T('\\0') && *pstrText <= _T(' ')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\t\tconst TImageInfo* pImageInfo = NULL;\n\t\t\t\t\t\t\tCDuiString sName;\n\t\t\t\t\t\t\twhile (*pstrText != _T('\\0') && *pstrText != _T('>') && *pstrText != _T('}') && *pstrText != _T(' ')) {\n\t\t\t\t\t\t\t\tLPCTSTR pstrTemp = ::CharNext(pstrText);\n\t\t\t\t\t\t\t\twhile (pstrText < pstrTemp) {\n\t\t\t\t\t\t\t\t\tsName += *pstrText++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (sName.IsEmpty()) { // Italic\n\t\t\t\t\t\t\t\tpstrNextStart = NULL;\n\t\t\t\t\t\t\t\tTFontInfo* pFontInfo = pManager->GetDefaultFontInfo();\n\t\t\t\t\t\t\t\tif (aFontArray.GetSize() > 0) pFontInfo = (TFontInfo*)aFontArray.GetAt(aFontArray.GetSize() - 1);\n\t\t\t\t\t\t\t\tif (pFontInfo->bItalic == false) {\n\t\t\t\t\t\t\t\t\tHFONT hFont = pManager->GetFont(pFontInfo->sFontName, pFontInfo->iSize, pFontInfo->bBold, pFontInfo->bUnderline, true);\n\t\t\t\t\t\t\t\t\tif (hFont == NULL) hFont = pManager->AddFont(pFontInfo->sFontName, pFontInfo->iSize, pFontInfo->bBold, pFontInfo->bUnderline, true);\n\t\t\t\t\t\t\t\t\tpFontInfo = pManager->GetFontInfo(hFont);\n\t\t\t\t\t\t\t\t\taFontArray.Add(pFontInfo);\n\t\t\t\t\t\t\t\t\tpTm = &pFontInfo->tm;\n\t\t\t\t\t\t\t\t\t::SelectObject(hDC, pFontInfo->hFont);\n\t\t\t\t\t\t\t\t\tcyLine = MAX(cyLine, pTm->tmHeight + pTm->tmExternalLeading + (int)aPIndentArray.GetAt(aPIndentArray.GetSize() - 1));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\twhile (*pstrText > _T('\\0') && *pstrText <= _T(' ')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\t\t\tint iImageListNum = (int)_tcstol(pstrText, const_cast<LPTSTR*>(&pstrText), 10);\n\t\t\t\t\t\t\t\tif (iImageListNum <= 0) iImageListNum = 1;\n\t\t\t\t\t\t\t\twhile (*pstrText > _T('\\0') && *pstrText <= _T(' ')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\t\t\tint iImageListIndex = (int)_tcstol(pstrText, const_cast<LPTSTR*>(&pstrText), 10);\n\t\t\t\t\t\t\t\tif (iImageListIndex < 0 || iImageListIndex >= iImageListNum) iImageListIndex = 0;\n\n\t\t\t\t\t\t\t\tif (_tcsstr(sImageString.GetData(), _T(\"file=\\'\")) != NULL || _tcsstr(sImageString.GetData(), _T(\"res=\\'\")) != NULL) {\n\t\t\t\t\t\t\t\t\tCDuiString sImageResType;\n\t\t\t\t\t\t\t\t\tCDuiString sImageName;\n\t\t\t\t\t\t\t\t\tLPCTSTR pStrImage = sImageString.GetData();\n\t\t\t\t\t\t\t\t\tCDuiString sItem;\n\t\t\t\t\t\t\t\t\tCDuiString sValue;\n\t\t\t\t\t\t\t\t\twhile (*pStrImage != _T('\\0')) {\n\t\t\t\t\t\t\t\t\t\tsItem.Empty();\n\t\t\t\t\t\t\t\t\t\tsValue.Empty();\n\t\t\t\t\t\t\t\t\t\twhile (*pStrImage > _T('\\0') && *pStrImage <= _T(' ')) pStrImage = ::CharNext(pStrImage);\n\t\t\t\t\t\t\t\t\t\twhile (*pStrImage != _T('\\0') && *pStrImage != _T('=') && *pStrImage > _T(' ')) {\n\t\t\t\t\t\t\t\t\t\t\tLPTSTR pstrTemp = ::CharNext(pStrImage);\n\t\t\t\t\t\t\t\t\t\t\twhile (pStrImage < pstrTemp) {\n\t\t\t\t\t\t\t\t\t\t\t\tsItem += *pStrImage++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\twhile (*pStrImage > _T('\\0') && *pStrImage <= _T(' ')) pStrImage = ::CharNext(pStrImage);\n\t\t\t\t\t\t\t\t\t\tif (*pStrImage++ != _T('=')) break;\n\t\t\t\t\t\t\t\t\t\twhile (*pStrImage > _T('\\0') && *pStrImage <= _T(' ')) pStrImage = ::CharNext(pStrImage);\n\t\t\t\t\t\t\t\t\t\tif (*pStrImage++ != _T('\\'')) break;\n\t\t\t\t\t\t\t\t\t\twhile (*pStrImage != _T('\\0') && *pStrImage != _T('\\'')) {\n\t\t\t\t\t\t\t\t\t\t\tLPTSTR pstrTemp = ::CharNext(pStrImage);\n\t\t\t\t\t\t\t\t\t\t\twhile (pStrImage < pstrTemp) {\n\t\t\t\t\t\t\t\t\t\t\t\tsValue += *pStrImage++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (*pStrImage++ != _T('\\'')) break;\n\t\t\t\t\t\t\t\t\t\tif (!sValue.IsEmpty()) {\n\t\t\t\t\t\t\t\t\t\t\tif (sItem == _T(\"file\") || sItem == _T(\"res\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tsImageName = sValue;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse if (sItem == _T(\"restype\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tsImageResType = sValue;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (*pStrImage++ != _T(' ')) break;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tpImageInfo = pManager->GetImageEx((LPCTSTR)sImageName, sImageResType);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tpImageInfo = pManager->GetImageEx((LPCTSTR)sName);\n\n\t\t\t\t\t\t\t\tif (pImageInfo) {\n\t\t\t\t\t\t\t\t\tiWidth = pImageInfo->nX;\n\t\t\t\t\t\t\t\t\tiHeight = pImageInfo->nY;\n\t\t\t\t\t\t\t\t\tif (iImageListNum > 1) iWidth /= iImageListNum;\n\n\t\t\t\t\t\t\t\t\tif (pt.x + iWidth > rc.right && pt.x > rc.left && (uStyle & DT_SINGLELINE) == 0) {\n\t\t\t\t\t\t\t\t\t\tbLineEnd = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tpstrNextStart = NULL;\n\t\t\t\t\t\t\t\t\t\tif (bDraw && bLineDraw) {\n\t\t\t\t\t\t\t\t\t\t\tCDuiRect rcImage(pt.x, pt.y + cyLineHeight - iHeight, pt.x + iWidth, pt.y + cyLineHeight);\n\t\t\t\t\t\t\t\t\t\t\tif (iHeight < cyLineHeight) {\n\t\t\t\t\t\t\t\t\t\t\t\trcImage.bottom -= (cyLineHeight - iHeight) / 2;\n\t\t\t\t\t\t\t\t\t\t\t\trcImage.top = rcImage.bottom - iHeight;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tCDuiRect rcBmpPart(0, 0, iWidth, iHeight);\n\t\t\t\t\t\t\t\t\t\t\trcBmpPart.left = iWidth * iImageListIndex;\n\t\t\t\t\t\t\t\t\t\t\trcBmpPart.right = iWidth * (iImageListIndex + 1);\n\t\t\t\t\t\t\t\t\t\t\tCDuiRect rcCorner(0, 0, 0, 0);\n\t\t\t\t\t\t\t\t\t\t\tDrawImage(hDC, pImageInfo->hBitmap, rcImage, rcImage, rcBmpPart, rcCorner, \\\n\t\t\t\t\t\t\t\t\t\t\t\tpImageInfo->alphaChannel, 255);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tcyLine = MAX(iHeight, cyLine);\n\t\t\t\t\t\t\t\t\t\tpt.x += iWidth;\n\t\t\t\t\t\t\t\t\t\tcyMinHeight = pt.y + iHeight;\n\t\t\t\t\t\t\t\t\t\tcxMaxWidth = MAX(cxMaxWidth, pt.x);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse pstrNextStart = NULL;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase _T('n'):  // Newline\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\tif ((uStyle & DT_SINGLELINE) != 0) break;\n\t\t\t\t\t\t\tbLineEnd = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase _T('p'):  // Paragraph\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\tif (pt.x > rc.left) bLineEnd = true;\n\t\t\t\t\t\t\twhile (*pstrText > _T('\\0') && *pstrText <= _T(' ')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\t\tint cyLineExtra = (int)_tcstol(pstrText, const_cast<LPTSTR*>(&pstrText), 10);\n\t\t\t\t\t\t\taPIndentArray.Add((LPVOID)cyLineExtra);\n\t\t\t\t\t\t\tcyLine = MAX(cyLine, pTm->tmHeight + pTm->tmExternalLeading + cyLineExtra);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase _T('r'):  // Raw Text\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\tbInRaw = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase _T('s'):  // Selected text background color\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\tbInSelected = !bInSelected;\n\t\t\t\t\t\t\tif (bDraw && bLineDraw) {\n\t\t\t\t\t\t\t\tif (bInSelected) ::SetBkMode(hDC, OPAQUE);\n\t\t\t\t\t\t\t\telse ::SetBkMode(hDC, TRANSPARENT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase _T('u'):  // Underline text\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\tTFontInfo* pFontInfo = pManager->GetDefaultFontInfo();\n\t\t\t\t\t\t\tif (aFontArray.GetSize() > 0) pFontInfo = (TFontInfo*)aFontArray.GetAt(aFontArray.GetSize() - 1);\n\t\t\t\t\t\t\tif (pFontInfo->bUnderline == false) {\n\t\t\t\t\t\t\t\tHFONT hFont = pManager->GetFont(pFontInfo->sFontName, pFontInfo->iSize, pFontInfo->bBold, true, pFontInfo->bItalic);\n\t\t\t\t\t\t\t\tif (hFont == NULL) hFont = pManager->AddFont(pFontInfo->sFontName, pFontInfo->iSize, pFontInfo->bBold, true, pFontInfo->bItalic);\n\t\t\t\t\t\t\t\tpFontInfo = pManager->GetFontInfo(hFont);\n\t\t\t\t\t\t\t\taFontArray.Add(pFontInfo);\n\t\t\t\t\t\t\t\tpTm = &pFontInfo->tm;\n\t\t\t\t\t\t\t\t::SelectObject(hDC, pFontInfo->hFont);\n\t\t\t\t\t\t\t\tcyLine = MAX(cyLine, pTm->tmHeight + pTm->tmExternalLeading + (int)aPIndentArray.GetAt(aPIndentArray.GetSize() - 1));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase _T('x'):  // X Indent\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\twhile (*pstrText > _T('\\0') && *pstrText <= _T(' ')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\t\tint iWidth = (int)_tcstol(pstrText, const_cast<LPTSTR*>(&pstrText), 10);\n\t\t\t\t\t\t\tpt.x += iWidth;\n\t\t\t\t\t\t\tcxMaxWidth = MAX(cxMaxWidth, pt.x);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase _T('y'):  // Y Indent\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\t\twhile (*pstrText > _T('\\0') && *pstrText <= _T(' ')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\t\tcyLine = (int)_tcstol(pstrText, const_cast<LPTSTR*>(&pstrText), 10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (pstrNextStart != NULL) pstrText = pstrNextStart;\n\t\t\t\t\telse {\n\t\t\t\t\t\twhile (*pstrText != _T('\\0') && *pstrText != _T('>') && *pstrText != _T('}')) pstrText = ::CharNext(pstrText);\n\t\t\t\t\t\tpstrText = ::CharNext(pstrText);\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!bInRaw && (*pstrText == _T('<') || *pstrText == _T('{')) && pstrText[1] == _T('/'))\n\t\t\t{\n\t\t\t\tpstrText++;\n\t\t\t\tpstrText++;\n\t\t\t\tswitch (*pstrText)\n\t\t\t\t{\n\t\t\t\tcase _T('c'):\n\t\t\t\t\t{\n\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\taColorArray.Remove(aColorArray.GetSize() - 1);\n\t\t\t\t\t\tDWORD clrColor = dwTextColor;\n\t\t\t\t\t\tif (aColorArray.GetSize() > 0) clrColor = (int)aColorArray.GetAt(aColorArray.GetSize() - 1);\n\t\t\t\t\t\t::SetTextColor(hDC, RGB(GetBValue(clrColor), GetGValue(clrColor), GetRValue(clrColor)));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase _T('p'):\n\t\t\t\t\tpstrText++;\n\t\t\t\t\tif (pt.x > rc.left) bLineEnd = true;\n\t\t\t\t\taPIndentArray.Remove(aPIndentArray.GetSize() - 1);\n\t\t\t\t\tcyLine = MAX(cyLine, pTm->tmHeight + pTm->tmExternalLeading + (int)aPIndentArray.GetAt(aPIndentArray.GetSize() - 1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase _T('s'):\n\t\t\t\t\t{\n\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\tbInSelected = !bInSelected;\n\t\t\t\t\t\tif (bDraw && bLineDraw) {\n\t\t\t\t\t\t\tif (bInSelected) ::SetBkMode(hDC, OPAQUE);\n\t\t\t\t\t\t\telse ::SetBkMode(hDC, TRANSPARENT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase _T('a'):\n\t\t\t\t\t{\n\t\t\t\t\t\tif (iLinkIndex < nLinkRects) {\n\t\t\t\t\t\t\tif (!bLineDraw) ::SetRect(&prcLinks[iLinkIndex], ptLinkStart.x, ptLinkStart.y, MIN(pt.x, rc.right), pt.y + pTm->tmHeight + pTm->tmExternalLeading);\n\t\t\t\t\t\t\tiLinkIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\taColorArray.Remove(aColorArray.GetSize() - 1);\n\t\t\t\t\t\tDWORD clrColor = dwTextColor;\n\t\t\t\t\t\tif (aColorArray.GetSize() > 0) clrColor = (int)aColorArray.GetAt(aColorArray.GetSize() - 1);\n\t\t\t\t\t\t::SetTextColor(hDC, RGB(GetBValue(clrColor), GetGValue(clrColor), GetRValue(clrColor)));\n\t\t\t\t\t\tbInLink = false;\n\t\t\t\t\t}\n\t\t\t\tcase _T('b'):\n\t\t\t\tcase _T('f'):\n\t\t\t\tcase _T('i'):\n\t\t\t\tcase _T('u'):\n\t\t\t\t\t{\n\t\t\t\t\t\tpstrText++;\n\t\t\t\t\t\taFontArray.Remove(aFontArray.GetSize() - 1);\n\t\t\t\t\t\tTFontInfo* pFontInfo = (TFontInfo*)aFontArray.GetAt(aFontArray.GetSize() - 1);\n\t\t\t\t\t\tif (pFontInfo == NULL) pFontInfo = pManager->GetDefaultFontInfo();\n\t\t\t\t\t\tif (pTm->tmItalic && pFontInfo->bItalic == false) {\n\t\t\t\t\t\t\tABC abc;\n\t\t\t\t\t\t\t::GetCharABCWidths(hDC, _T(' '), _T(' '), &abc);\n\t\t\t\t\t\t\tpt.x += abc.abcC / 2; // һбŵ, ȷӦhttp://support.microsoft.com/kb/244798/en-us\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpTm = &pFontInfo->tm;\n\t\t\t\t\t\t::SelectObject(hDC, pFontInfo->hFont);\n\t\t\t\t\t\tcyLine = MAX(cyLine, pTm->tmHeight + pTm->tmExternalLeading + (int)aPIndentArray.GetAt(aPIndentArray.GetSize() - 1));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\twhile (*pstrText != _T('\\0') && *pstrText != _T('>') && *pstrText != _T('}')) pstrText = ::CharNext(pstrText);\n\t\t\t\tpstrText = ::CharNext(pstrText);\n\t\t\t}\n\t\t\telse if (!bInRaw &&  *pstrText == _T('<') && pstrText[2] == _T('>') && (pstrText[1] == _T('{') || pstrText[1] == _T('}')))\n\t\t\t{\n\t\t\t\tSIZE szSpace = { 0 };\n\t\t\t\t::GetTextExtentPoint32(hDC, &pstrText[1], 1, &szSpace);\n\t\t\t\tif (bDraw && bLineDraw) ::TextOut(hDC, pt.x, pt.y + cyLineHeight - pTm->tmHeight - pTm->tmExternalLeading, &pstrText[1], 1);\n\t\t\t\tpt.x += szSpace.cx;\n\t\t\t\tcxMaxWidth = MAX(cxMaxWidth, pt.x);\n\t\t\t\tpstrText++; pstrText++; pstrText++;\n\t\t\t}\n\t\t\telse if (!bInRaw &&  *pstrText == _T('{') && pstrText[2] == _T('}') && (pstrText[1] == _T('<') || pstrText[1] == _T('>')))\n\t\t\t{\n\t\t\t\tSIZE szSpace = { 0 };\n\t\t\t\t::GetTextExtentPoint32(hDC, &pstrText[1], 1, &szSpace);\n\t\t\t\tif (bDraw && bLineDraw) ::TextOut(hDC, pt.x, pt.y + cyLineHeight - pTm->tmHeight - pTm->tmExternalLeading, &pstrText[1], 1);\n\t\t\t\tpt.x += szSpace.cx;\n\t\t\t\tcxMaxWidth = MAX(cxMaxWidth, pt.x);\n\t\t\t\tpstrText++; pstrText++; pstrText++;\n\t\t\t}\n\t\t\telse if (!bInRaw &&  *pstrText == _T(' '))\n\t\t\t{\n\t\t\t\tSIZE szSpace = { 0 };\n\t\t\t\t::GetTextExtentPoint32(hDC, _T(\" \"), 1, &szSpace);\n\t\t\t\t// Still need to paint the space because the font might have\n\t\t\t\t// underline formatting.\n\t\t\t\tif (bDraw && bLineDraw) ::TextOut(hDC, pt.x, pt.y + cyLineHeight - pTm->tmHeight - pTm->tmExternalLeading, _T(\" \"), 1);\n\t\t\t\tpt.x += szSpace.cx;\n\t\t\t\tcxMaxWidth = MAX(cxMaxWidth, pt.x);\n\t\t\t\tpstrText++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tPOINT ptPos = pt;\n\t\t\t\tint cchChars = 0;\n\t\t\t\tint cchSize = 0;\n\t\t\t\tint cchLastGoodWord = 0;\n\t\t\t\tint cchLastGoodSize = 0;\n\t\t\t\tLPCTSTR p = pstrText;\n\t\t\t\tLPCTSTR pstrNext;\n\t\t\t\tSIZE szText = { 0 };\n\t\t\t\tif (!bInRaw && *p == _T('<') || *p == _T('{')) p++, cchChars++, cchSize++;\n\t\t\t\twhile (*p != _T('\\0') && *p != _T('\\n')) {\n\t\t\t\t\t// This part makes sure that we're word-wrapping if needed or providing support\n\t\t\t\t\t// for DT_END_ELLIPSIS. Unfortunately the GetTextExtentPoint32() call is pretty\n\t\t\t\t\t// slow when repeated so often.\n\t\t\t\t\t// TODO: Rewrite and use GetTextExtentExPoint() instead!\n\t\t\t\t\tif (bInRaw) {\n\t\t\t\t\t\tif ((*p == _T('<') || *p == _T('{')) && p[1] == _T('/')\n\t\t\t\t\t\t\t&& p[2] == _T('r') && (p[3] == _T('>') || p[3] == _T('}'))) {\n\t\t\t\t\t\t\t\tp += 4;\n\t\t\t\t\t\t\t\tbInRaw = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (*p == _T('<') || *p == _T('{')) break;\n\t\t\t\t\t}\n\t\t\t\t\tpstrNext = ::CharNext(p);\n\t\t\t\t\tcchChars++;\n\t\t\t\t\tcchSize += (int)(pstrNext - p);\n\t\t\t\t\tszText.cx = cchChars * pTm->tmMaxCharWidth;\n\t\t\t\t\tif (pt.x + szText.cx >= rc.right) {\n\t\t\t\t\t\t::GetTextExtentPoint32(hDC, pstrText, cchSize, &szText);\n\t\t\t\t\t}\n\t\t\t\t\tif (pt.x + szText.cx > rc.right) {\n\t\t\t\t\t\tif (pt.x + szText.cx > rc.right && pt.x != rc.left) {\n\t\t\t\t\t\t\tcchChars--;\n\t\t\t\t\t\t\tcchSize -= (int)(pstrNext - p);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((uStyle & DT_WORDBREAK) != 0 && cchLastGoodWord > 0) {\n\t\t\t\t\t\t\tcchChars = cchLastGoodWord;\n\t\t\t\t\t\t\tcchSize = cchLastGoodSize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((uStyle & DT_END_ELLIPSIS) != 0 && cchChars > 0) {\n\t\t\t\t\t\t\tcchChars -= 1;\n\t\t\t\t\t\t\tLPCTSTR pstrPrev = ::CharPrev(pstrText, p);\n\t\t\t\t\t\t\tif (cchChars > 0) {\n\t\t\t\t\t\t\t\tcchChars -= 1;\n\t\t\t\t\t\t\t\tpstrPrev = ::CharPrev(pstrText, pstrPrev);\n\t\t\t\t\t\t\t\tcchSize -= (int)(p - pstrPrev);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tcchSize -= (int)(p - pstrPrev);\n\t\t\t\t\t\t\tpt.x = rc.right;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbLineEnd = true;\n\t\t\t\t\t\tcxMaxWidth = MAX(cxMaxWidth, pt.x);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (!((p[0] >= _T('a') && p[0] <= _T('z')) || (p[0] >= _T('A') && p[0] <= _T('Z')))) {\n\t\t\t\t\t\tcchLastGoodWord = cchChars;\n\t\t\t\t\t\tcchLastGoodSize = cchSize;\n\t\t\t\t\t}\n\t\t\t\t\tif (*p == _T(' ')) {\n\t\t\t\t\t\tcchLastGoodWord = cchChars;\n\t\t\t\t\t\tcchLastGoodSize = cchSize;\n\t\t\t\t\t}\n\t\t\t\t\tp = ::CharNext(p);\n\t\t\t\t}\n\n\t\t\t\t::GetTextExtentPoint32(hDC, pstrText, cchSize, &szText);\n\t\t\t\tif (bDraw && bLineDraw) {\n\t\t\t\t\tif ((uStyle & DT_SINGLELINE) == 0 && (uStyle & DT_CENTER) != 0) {\n\t\t\t\t\t\tptPos.x += (rc.right - rc.left - szText.cx) / 2;\n\t\t\t\t\t}\n\t\t\t\t\telse if ((uStyle & DT_SINGLELINE) == 0 && (uStyle & DT_RIGHT) != 0) {\n\t\t\t\t\t\tptPos.x += (rc.right - rc.left - szText.cx);\n\t\t\t\t\t}\n\t\t\t\t\t::TextOut(hDC, ptPos.x, ptPos.y + cyLineHeight - pTm->tmHeight - pTm->tmExternalLeading, pstrText, cchSize);\n\t\t\t\t\tif (pt.x >= rc.right && (uStyle & DT_END_ELLIPSIS) != 0)\n\t\t\t\t\t\t::TextOut(hDC, ptPos.x + szText.cx, ptPos.y, _T(\"...\"), 3);\n\t\t\t\t}\n\t\t\t\tpt.x += szText.cx;\n\t\t\t\tcxMaxWidth = MAX(cxMaxWidth, pt.x);\n\t\t\t\tpstrText += cchSize;\n\t\t\t}\n\n\t\t\tif (pt.x >= rc.right || *pstrText == _T('\\n') || *pstrText == _T('\\0')) bLineEnd = true;\n\t\t\tif (bDraw && bLineEnd) {\n\t\t\t\tif (!bLineDraw) {\n\t\t\t\t\taFontArray.Resize(aLineFontArray.GetSize());\n\t\t\t\t\t::CopyMemory(aFontArray.GetData(), aLineFontArray.GetData(), aLineFontArray.GetSize() * sizeof(LPVOID));\n\t\t\t\t\taColorArray.Resize(aLineColorArray.GetSize());\n\t\t\t\t\t::CopyMemory(aColorArray.GetData(), aLineColorArray.GetData(), aLineColorArray.GetSize() * sizeof(LPVOID));\n\t\t\t\t\taPIndentArray.Resize(aLinePIndentArray.GetSize());\n\t\t\t\t\t::CopyMemory(aPIndentArray.GetData(), aLinePIndentArray.GetData(), aLinePIndentArray.GetSize() * sizeof(LPVOID));\n\n\t\t\t\t\tcyLineHeight = cyLine;\n\t\t\t\t\tpstrText = pstrLineBegin;\n\t\t\t\t\tbInRaw = bLineInRaw;\n\t\t\t\t\tbInSelected = bLineInSelected;\n\n\t\t\t\t\tDWORD clrColor = dwTextColor;\n\t\t\t\t\tif (aColorArray.GetSize() > 0) clrColor = (int)aColorArray.GetAt(aColorArray.GetSize() - 1);\n\t\t\t\t\t::SetTextColor(hDC, RGB(GetBValue(clrColor), GetGValue(clrColor), GetRValue(clrColor)));\n\t\t\t\t\tTFontInfo* pFontInfo = (TFontInfo*)aFontArray.GetAt(aFontArray.GetSize() - 1);\n\t\t\t\t\tif (pFontInfo == NULL) pFontInfo = pManager->GetDefaultFontInfo();\n\t\t\t\t\tpTm = &pFontInfo->tm;\n\t\t\t\t\t::SelectObject(hDC, pFontInfo->hFont);\n\t\t\t\t\tif (bInSelected) ::SetBkMode(hDC, OPAQUE);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\taLineFontArray.Resize(aFontArray.GetSize());\n\t\t\t\t\t::CopyMemory(aLineFontArray.GetData(), aFontArray.GetData(), aFontArray.GetSize() * sizeof(LPVOID));\n\t\t\t\t\taLineColorArray.Resize(aColorArray.GetSize());\n\t\t\t\t\t::CopyMemory(aLineColorArray.GetData(), aColorArray.GetData(), aColorArray.GetSize() * sizeof(LPVOID));\n\t\t\t\t\taLinePIndentArray.Resize(aPIndentArray.GetSize());\n\t\t\t\t\t::CopyMemory(aLinePIndentArray.GetData(), aPIndentArray.GetData(), aPIndentArray.GetSize() * sizeof(LPVOID));\n\t\t\t\t\tpstrLineBegin = pstrText;\n\t\t\t\t\tbLineInSelected = bInSelected;\n\t\t\t\t\tbLineInRaw = bInRaw;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tASSERT(iLinkIndex <= nLinkRects);\n\t\t}\n\n\t\tnLinkRects = iLinkIndex;\n\n\t\t// Return size of text when requested\n\t\tif ((uStyle & DT_CALCRECT) != 0) {\n\t\t\trc.bottom = MAX(cyMinHeight, pt.y + cyLine);\n\t\t\trc.right = MIN(rc.right, cxMaxWidth);\n\t\t}\n\n\t\tif (bDraw) ::SelectClipRgn(hDC, hOldRgn);\n\t\t::DeleteObject(hOldRgn);\n\t\t::DeleteObject(hRgn);\n\n\t\t::SelectObject(hDC, hOldFont);\n\t}\n\n\tHBITMAP CRenderEngine::GenerateBitmap(CPaintManagerUI* pManager, CControlUI* pControl, RECT rc)\n\t{\n\t\tint cx = rc.right - rc.left;\n\t\tint cy = rc.bottom - rc.top;\n\n\t\tHDC hPaintDC = ::CreateCompatibleDC(pManager->GetPaintDC());\n\t\tHBITMAP hPaintBitmap = ::CreateCompatibleBitmap(pManager->GetPaintDC(), rc.right, rc.bottom);\n\t\tASSERT(hPaintDC);\n\t\tASSERT(hPaintBitmap);\n\t\tHBITMAP hOldPaintBitmap = (HBITMAP) ::SelectObject(hPaintDC, hPaintBitmap);\n\t\tpControl->DoPaint(hPaintDC, rc);\n\n\t\tBITMAPINFO bmi = { 0 };\n\t\tbmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);\n\t\tbmi.bmiHeader.biWidth = cx;\n\t\tbmi.bmiHeader.biHeight = cy;\n\t\tbmi.bmiHeader.biPlanes = 1;\n\t\tbmi.bmiHeader.biBitCount = 32;\n\t\tbmi.bmiHeader.biCompression = BI_RGB;\n\t\tbmi.bmiHeader.biSizeImage = cx * cy * sizeof(DWORD);\n\t\tLPDWORD pDest = NULL;\n\t\tHDC hCloneDC = ::CreateCompatibleDC(pManager->GetPaintDC());\n\t\tHBITMAP hBitmap = ::CreateDIBSection(pManager->GetPaintDC(), &bmi, DIB_RGB_COLORS, (LPVOID*)&pDest, NULL, 0);\n\t\tASSERT(hCloneDC);\n\t\tASSERT(hBitmap);\n\t\tif (hBitmap != NULL)\n\t\t{\n\t\t\tHBITMAP hOldBitmap = (HBITMAP) ::SelectObject(hCloneDC, hBitmap);\n\t\t\t::BitBlt(hCloneDC, 0, 0, cx, cy, hPaintDC, rc.left, rc.top, SRCCOPY);\n\t\t\t::SelectObject(hCloneDC, hOldBitmap);\n\t\t\t::DeleteDC(hCloneDC);\n\t\t\t::GdiFlush();\n\t\t}\n\n\t\t// Cleanup\n\t\t::SelectObject(hPaintDC, hOldPaintBitmap);\n\t\t::DeleteObject(hPaintBitmap);\n\t\t::DeleteDC(hPaintDC);\n\n\t\treturn hBitmap;\n\t}\n\n\tSIZE CRenderEngine::GetTextSize(HDC hDC, CPaintManagerUI* pManager, LPCTSTR pstrText, int iFont, UINT uStyle)\n\t{\n\t\tSIZE size = { 0, 0 };\n\t\tASSERT(::GetObjectType(hDC) == OBJ_DC || ::GetObjectType(hDC) == OBJ_MEMDC);\n\t\tif (pstrText == NULL || pManager == NULL) return size;\n\t\t::SetBkMode(hDC, TRANSPARENT);\n\t\tHFONT hOldFont = (HFONT)::SelectObject(hDC, pManager->GetFont(iFont));\n\t\tGetTextExtentPoint32(hDC, pstrText, _tcslen(pstrText), &size);\n\t\t::SelectObject(hDC, hOldFont);\n\t\treturn size;\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Core/UIRender.h",
    "content": "#ifndef __UIRENDER_H__\n#define __UIRENDER_H__\n\n#pragma once\n\nnamespace DuiLib {\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass UILIB_API CRenderClip\n\t{\n\tpublic:\n\t\t~CRenderClip();\n\t\tRECT rcItem;\n\t\tHDC hDC;\n\t\tHRGN hRgn;\n\t\tHRGN hOldRgn;\n\n\t\tstatic void GenerateClip(HDC hDC, RECT rc, CRenderClip& clip);\n\t\tstatic void GenerateRoundClip(HDC hDC, RECT rc, RECT rcItem, int width, int height, CRenderClip& clip);\n\t\tstatic void UseOldClipBegin(HDC hDC, CRenderClip& clip);\n\t\tstatic void UseOldClipEnd(HDC hDC, CRenderClip& clip);\n\t};\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass UILIB_API CRenderEngine\n\t{\n\tpublic:\n\t\tstatic DWORD AdjustColor(DWORD dwColor, short H, short S, short L);\n\t\tstatic TImageInfo* LoadImage(STRINGorID bitmap, LPCTSTR type = NULL, DWORD mask = 0);\n\t\tstatic void FreeImage(const TImageInfo* bitmap);\n\t\tstatic void DrawImage(HDC hDC, HBITMAP hBitmap, const RECT& rc, const RECT& rcPaint, \\\n\t\t\tconst RECT& rcBmpPart, const RECT& rcCorners, bool alphaChannel, BYTE uFade = 255, \n\t\t\tbool hole = false, bool xtiled = false, bool ytiled = false);\n\t\tstatic bool DrawImageString(HDC hDC, CPaintManagerUI* pManager, const RECT& rcItem, const RECT& rcPaint, \n\t\t\tLPCTSTR pStrImage, LPCTSTR pStrModify = NULL);\n\t\tstatic bool DrawImageString(HDC hDC, CPaintManagerUI* pManager, const RECT& rc, const RECT& rcPaint, \n\t\t\tLPCTSTR pStrImage, LPCTSTR pStrModify, bool bNeedAlpha, BYTE bNewFade);\n\t\tstatic void DrawColor(HDC hDC, const RECT& rc, DWORD color);\n\t\tstatic void DrawGradient(HDC hDC, const RECT& rc, DWORD dwFirst, DWORD dwSecond, bool bVertical, int nSteps);\n\n\t\t// ºеɫalphaֵЧ\n\t\tstatic void DrawLine(HDC hDC, const RECT& rc, int nSize, DWORD dwPenColor,int nStyle = PS_SOLID);\n\t\tstatic void DrawRect(HDC hDC, const RECT& rc, int nSize, DWORD dwPenColor);\n\t\tstatic void DrawRoundRect(HDC hDC, const RECT& rc, int width, int height, int nSize, DWORD dwPenColor);\n\t\tstatic void DrawText(HDC hDC, CPaintManagerUI* pManager, RECT& rc, LPCTSTR pstrText, \\\n\t\t\tDWORD dwTextColor, int iFont, UINT uStyle);\n\t\tstatic void DrawHtmlText(HDC hDC, CPaintManagerUI* pManager, RECT& rc, LPCTSTR pstrText, \n\t\t\tDWORD dwTextColor, RECT* pLinks, CDuiString* sLinks, int& nLinkRects, UINT uStyle);\n\t\tstatic HBITMAP GenerateBitmap(CPaintManagerUI* pManager, CControlUI* pControl, RECT rc);\n\t\tstatic SIZE GetTextSize(HDC hDC, CPaintManagerUI* pManager , LPCTSTR pstrText, int iFont, UINT uStyle);\n\t};\n\n} // namespace DuiLib\n\n#endif // __UIRENDER_H__\n"
  },
  {
    "path": "DuiLib/DuiLib.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<VisualStudioProject\n\tProjectType=\"Visual C++\"\n\tVersion=\"9.00\"\n\tName=\"DuiLib\"\n\tProjectGUID=\"{E106ACD7-4E53-4AEE-942B-D0DD426DB34E}\"\n\tRootNamespace=\"DuiLib\"\n\tTargetFrameworkVersion=\"0\"\n\t>\n\t<Platforms>\n\t\t<Platform\n\t\t\tName=\"Win32\"\n\t\t/>\n\t</Platforms>\n\t<ToolFiles>\n\t</ToolFiles>\n\t<Configurations>\n\t\t<Configuration\n\t\t\tName=\"Release|Win32\"\n\t\t\tOutputDirectory=\".\\Build\\Release\"\n\t\t\tIntermediateDirectory=\".\\Build\\Release\"\n\t\t\tConfigurationType=\"2\"\n\t\t\tInheritedPropertySheets=\"$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops\"\n\t\t\tUseOfMFC=\"0\"\n\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\n\t\t\tCharacterSet=\"2\"\n\t\t\t>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPreBuildEventTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCCustomBuildTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCMIDLTool\"\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\n\t\t\t\tMkTypLibCompatible=\"true\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tTargetEnvironment=\"1\"\n\t\t\t\tTypeLibraryName=\".\\Release/DuiLib.tlb\"\n\t\t\t\tHeaderFileName=\"\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\tOptimization=\"1\"\n\t\t\t\tInlineFunctionExpansion=\"1\"\n\t\t\t\tAdditionalIncludeDirectories=\"\"\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_WINDOWS;UILIB_EXPORTS\"\n\t\t\t\tStringPooling=\"true\"\n\t\t\t\tEnableFunctionLevelLinking=\"true\"\n\t\t\t\tUsePrecompiledHeader=\"2\"\n\t\t\t\tPrecompiledHeaderFile=\".\\Build\\Release/DuiLib.pch\"\n\t\t\t\tWarningLevel=\"3\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCResourceCompilerTool\"\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\n\t\t\t\tCulture=\"1030\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPreLinkEventTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCLinkerTool\"\n\t\t\t\tOutputFile=\"../bin/DuiLib.dll\"\n\t\t\t\tLinkIncremental=\"1\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tAdditionalLibraryDirectories=\".\\lib\"\n\t\t\t\tGenerateManifest=\"false\"\n\t\t\t\tDelayLoadDLLs=\"\"\n\t\t\t\tBaseAddress=\"0x11000000\"\n\t\t\t\tImportLibrary=\"../Lib/DuiLib.lib\"\n\t\t\t\tTargetMachine=\"1\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCALinkTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCManifestTool\"\n\t\t\t\tEmbedManifest=\"false\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCXDCMakeTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCBscMakeTool\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tOutputFile=\".\\Release/DuiLib.bsc\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCFxCopTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCAppVerifierTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPostBuildEventTool\"\n\t\t\t/>\n\t\t</Configuration>\n\t\t<Configuration\n\t\t\tName=\"Debug|Win32\"\n\t\t\tOutputDirectory=\".\\Build\\Debug\"\n\t\t\tIntermediateDirectory=\".\\Build\\Debug\"\n\t\t\tConfigurationType=\"2\"\n\t\t\tInheritedPropertySheets=\"$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops\"\n\t\t\tUseOfMFC=\"0\"\n\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\n\t\t\tCharacterSet=\"2\"\n\t\t\t>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPreBuildEventTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCCustomBuildTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCMIDLTool\"\n\t\t\t\tPreprocessorDefinitions=\"_DEBUG\"\n\t\t\t\tMkTypLibCompatible=\"true\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tTargetEnvironment=\"1\"\n\t\t\t\tTypeLibraryName=\".\\Debug/DuiLib.tlb\"\n\t\t\t\tHeaderFileName=\"\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\tOptimization=\"0\"\n\t\t\t\tAdditionalIncludeDirectories=\"\"\n\t\t\t\tPreprocessorDefinitions=\"WIN32;_DEBUG;_WINDOWS;UILIB_EXPORTS\"\n\t\t\t\tMinimalRebuild=\"true\"\n\t\t\t\tBasicRuntimeChecks=\"3\"\n\t\t\t\tRuntimeLibrary=\"1\"\n\t\t\t\tUsePrecompiledHeader=\"2\"\n\t\t\t\tPrecompiledHeaderThrough=\"stdafx.h\"\n\t\t\t\tPrecompiledHeaderFile=\".\\Build\\Debug/DuiLib.pch\"\n\t\t\t\tWarningLevel=\"3\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tDetect64BitPortabilityProblems=\"false\"\n\t\t\t\tDebugInformationFormat=\"3\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCResourceCompilerTool\"\n\t\t\t\tPreprocessorDefinitions=\"_DEBUG\"\n\t\t\t\tCulture=\"1033\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPreLinkEventTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCLinkerTool\"\n\t\t\t\tOutputFile=\"../bin/DuiLib_d.dll\"\n\t\t\t\tLinkIncremental=\"1\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tAdditionalLibraryDirectories=\".\\lib\"\n\t\t\t\tGenerateManifest=\"false\"\n\t\t\t\tDelayLoadDLLs=\"\"\n\t\t\t\tGenerateDebugInformation=\"true\"\n\t\t\t\tProgramDatabaseFile=\"$(OutDir)\\$(TargetName).pdb\"\n\t\t\t\tBaseAddress=\"0x11000000\"\n\t\t\t\tImportLibrary=\"../lib/DuiLib_d.lib\"\n\t\t\t\tTargetMachine=\"1\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCALinkTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCManifestTool\"\n\t\t\t\tEmbedManifest=\"false\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCXDCMakeTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCBscMakeTool\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tOutputFile=\".\\Debug/DuiLib.bsc\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCFxCopTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCAppVerifierTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPostBuildEventTool\"\n\t\t\t/>\n\t\t</Configuration>\n\t\t<Configuration\n\t\t\tName=\"UnicodeDebug|Win32\"\n\t\t\tOutputDirectory=\".\\Build\\Debug_u\"\n\t\t\tIntermediateDirectory=\".\\Build\\Debug_u\"\n\t\t\tConfigurationType=\"2\"\n\t\t\tInheritedPropertySheets=\"$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops\"\n\t\t\tUseOfMFC=\"0\"\n\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\n\t\t\tCharacterSet=\"1\"\n\t\t\t>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPreBuildEventTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCCustomBuildTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCMIDLTool\"\n\t\t\t\tPreprocessorDefinitions=\"_DEBUG\"\n\t\t\t\tMkTypLibCompatible=\"true\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tTargetEnvironment=\"1\"\n\t\t\t\tTypeLibraryName=\".\\Debug/DuiLib.tlb\"\n\t\t\t\tHeaderFileName=\"\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\tOptimization=\"0\"\n\t\t\t\tAdditionalIncludeDirectories=\"\"\n\t\t\t\tPreprocessorDefinitions=\"WIN32;_DEBUG;_WINDOWS;UILIB_EXPORTS\"\n\t\t\t\tMinimalRebuild=\"true\"\n\t\t\t\tBasicRuntimeChecks=\"3\"\n\t\t\t\tRuntimeLibrary=\"1\"\n\t\t\t\tUsePrecompiledHeader=\"2\"\n\t\t\t\tPrecompiledHeaderThrough=\"stdafx.h\"\n\t\t\t\tPrecompiledHeaderFile=\".\\Build\\Debug_u/DuiLib.pch\"\n\t\t\t\tWarningLevel=\"3\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tDebugInformationFormat=\"3\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCResourceCompilerTool\"\n\t\t\t\tPreprocessorDefinitions=\"_DEBUG\"\n\t\t\t\tCulture=\"1033\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPreLinkEventTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCLinkerTool\"\n\t\t\t\tOutputFile=\"../bin/DuiLib_ud.dll\"\n\t\t\t\tLinkIncremental=\"1\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tAdditionalLibraryDirectories=\"\"\n\t\t\t\tGenerateManifest=\"false\"\n\t\t\t\tDelayLoadDLLs=\"\"\n\t\t\t\tGenerateDebugInformation=\"true\"\n\t\t\t\tProgramDatabaseFile=\"$(OutDir)\\$(TargetName).pdb\"\n\t\t\t\tBaseAddress=\"0x11000000\"\n\t\t\t\tImportLibrary=\"../Lib/DuiLib_ud.lib\"\n\t\t\t\tTargetMachine=\"1\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCALinkTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCManifestTool\"\n\t\t\t\tEmbedManifest=\"false\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCXDCMakeTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCBscMakeTool\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tOutputFile=\".\\Debug/DuiLib.bsc\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCFxCopTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCAppVerifierTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPostBuildEventTool\"\n\t\t\t/>\n\t\t</Configuration>\n\t\t<Configuration\n\t\t\tName=\"UnicodeRelease|Win32\"\n\t\t\tOutputDirectory=\".\\Build\\Release_u\"\n\t\t\tIntermediateDirectory=\".\\Build\\Release_u\"\n\t\t\tConfigurationType=\"2\"\n\t\t\tInheritedPropertySheets=\"$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops\"\n\t\t\tUseOfMFC=\"0\"\n\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\n\t\t\tCharacterSet=\"1\"\n\t\t\t>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPreBuildEventTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCCustomBuildTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCMIDLTool\"\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\n\t\t\t\tMkTypLibCompatible=\"true\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tTargetEnvironment=\"1\"\n\t\t\t\tTypeLibraryName=\".\\Release/DuiLib.tlb\"\n\t\t\t\tHeaderFileName=\"\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\tOptimization=\"1\"\n\t\t\t\tInlineFunctionExpansion=\"1\"\n\t\t\t\tAdditionalIncludeDirectories=\"\"\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_WINDOWS;UILIB_EXPORTS\"\n\t\t\t\tStringPooling=\"true\"\n\t\t\t\tEnableFunctionLevelLinking=\"true\"\n\t\t\t\tUsePrecompiledHeader=\"2\"\n\t\t\t\tPrecompiledHeaderFile=\".\\Build\\Release_u/DuiLib.pch\"\n\t\t\t\tWarningLevel=\"3\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCResourceCompilerTool\"\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\n\t\t\t\tCulture=\"1030\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPreLinkEventTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCLinkerTool\"\n\t\t\t\tOutputFile=\"../bin/DuiLib_u.dll\"\n\t\t\t\tLinkIncremental=\"1\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tAdditionalLibraryDirectories=\"\"\n\t\t\t\tGenerateManifest=\"false\"\n\t\t\t\tDelayLoadDLLs=\"\"\n\t\t\t\tBaseAddress=\"0x11000000\"\n\t\t\t\tImportLibrary=\"../Lib/DuiLib_u.lib\"\n\t\t\t\tTargetMachine=\"1\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCALinkTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCManifestTool\"\n\t\t\t\tEmbedManifest=\"false\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCXDCMakeTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCBscMakeTool\"\n\t\t\t\tSuppressStartupBanner=\"true\"\n\t\t\t\tOutputFile=\".\\Release/DuiLib.bsc\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCFxCopTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCAppVerifierTool\"\n\t\t\t/>\n\t\t\t<Tool\n\t\t\t\tName=\"VCPostBuildEventTool\"\n\t\t\t/>\n\t\t</Configuration>\n\t</Configurations>\n\t<References>\n\t</References>\n\t<Files>\n\t\t<Filter\n\t\t\tName=\"Source Files\"\n\t\t\tFilter=\"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\n\t\t\t>\n\t\t\t<File\n\t\t\t\tRelativePath=\".\\StdAfx.cpp\"\n\t\t\t\t>\n\t\t\t\t<FileConfiguration\n\t\t\t\t\tName=\"Release|Win32\"\n\t\t\t\t\t>\n\t\t\t\t\t<Tool\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\n\t\t\t\t\t\tPrecompiledHeaderFile=\".\\Build\\Release/DuiLib.pch\"\n\t\t\t\t\t/>\n\t\t\t\t</FileConfiguration>\n\t\t\t\t<FileConfiguration\n\t\t\t\t\tName=\"Debug|Win32\"\n\t\t\t\t\t>\n\t\t\t\t\t<Tool\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\n\t\t\t\t\t\tPrecompiledHeaderFile=\".\\Build\\Debug/DuiLib.pch\"\n\t\t\t\t\t/>\n\t\t\t\t</FileConfiguration>\n\t\t\t\t<FileConfiguration\n\t\t\t\t\tName=\"UnicodeDebug|Win32\"\n\t\t\t\t\t>\n\t\t\t\t\t<Tool\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\n\t\t\t\t\t/>\n\t\t\t\t</FileConfiguration>\n\t\t\t\t<FileConfiguration\n\t\t\t\t\tName=\"UnicodeRelease|Win32\"\n\t\t\t\t\t>\n\t\t\t\t\t<Tool\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\n\t\t\t\t\t/>\n\t\t\t\t</FileConfiguration>\n\t\t\t</File>\n\t\t\t<File\n\t\t\t\tRelativePath=\".\\UIlib.cpp\"\n\t\t\t\t>\n\t\t\t</File>\n\t\t\t<File\n\t\t\t\tRelativePath=\".\\Utils\\WinImplBase.cpp\"\n\t\t\t\t>\n\t\t\t</File>\n\t\t\t<Filter\n\t\t\t\tName=\"Utils\"\n\t\t\t\t>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Utils\\stb_image.c\"\n\t\t\t\t\t>\n\t\t\t\t\t<FileConfiguration\n\t\t\t\t\t\tName=\"Release|Win32\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<Tool\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\t\tUsePrecompiledHeader=\"0\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FileConfiguration>\n\t\t\t\t\t<FileConfiguration\n\t\t\t\t\t\tName=\"Debug|Win32\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<Tool\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\t\tUsePrecompiledHeader=\"0\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FileConfiguration>\n\t\t\t\t\t<FileConfiguration\n\t\t\t\t\t\tName=\"UnicodeDebug|Win32\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<Tool\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\t\tUsePrecompiledHeader=\"0\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FileConfiguration>\n\t\t\t\t\t<FileConfiguration\n\t\t\t\t\t\tName=\"UnicodeRelease|Win32\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<Tool\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\t\tUsePrecompiledHeader=\"0\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FileConfiguration>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Utils\\UIDelegate.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Utils\\Utils.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Utils\\XUnzip.cpp\"\n\t\t\t\t\t>\n\t\t\t\t\t<FileConfiguration\n\t\t\t\t\t\tName=\"Release|Win32\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<Tool\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\t\tUsePrecompiledHeader=\"0\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FileConfiguration>\n\t\t\t\t\t<FileConfiguration\n\t\t\t\t\t\tName=\"Debug|Win32\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<Tool\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\t\tUsePrecompiledHeader=\"0\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FileConfiguration>\n\t\t\t\t\t<FileConfiguration\n\t\t\t\t\t\tName=\"UnicodeDebug|Win32\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<Tool\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\t\tUsePrecompiledHeader=\"0\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FileConfiguration>\n\t\t\t\t\t<FileConfiguration\n\t\t\t\t\t\tName=\"UnicodeRelease|Win32\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<Tool\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\n\t\t\t\t\t\t\tUsePrecompiledHeader=\"0\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FileConfiguration>\n\t\t\t\t</File>\n\t\t\t</Filter>\n\t\t\t<Filter\n\t\t\t\tName=\"Core\"\n\t\t\t\t>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIBase.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIContainer.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIControl.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIDlgBuilder.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIManager.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIMarkup.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIRender.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t</Filter>\n\t\t\t<Filter\n\t\t\t\tName=\"Layout\"\n\t\t\t\t>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Layout\\UIChildLayout.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Layout\\UIHorizontalLayout.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Layout\\UITabLayout.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Layout\\UITileLayout.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Layout\\UIVerticalLayout.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t</Filter>\n\t\t\t<Filter\n\t\t\t\tName=\"Control\"\n\t\t\t\t>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIActiveX.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIButton.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UICheckBox.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UICombo.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIComboBox.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIDateTime.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIEdit.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIFlash.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UILabel.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIList.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIOption.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIProgress.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIRichEdit.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIScrollBar.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UISlider.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIText.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UITreeView.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIWebBrowser.cpp\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t</Filter>\n\t\t</Filter>\n\t\t<Filter\n\t\t\tName=\"Header Files\"\n\t\t\tFilter=\"h;hpp;hxx;hm;inl\"\n\t\t\t>\n\t\t\t<File\n\t\t\t\tRelativePath=\".\\StdAfx.h\"\n\t\t\t\t>\n\t\t\t</File>\n\t\t\t<File\n\t\t\t\tRelativePath=\".\\UIlib.h\"\n\t\t\t\t>\n\t\t\t</File>\n\t\t\t<Filter\n\t\t\t\tName=\"Utils\"\n\t\t\t\t>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Utils\\downloadmgr.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Utils\\FlashEventHandler.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Utils\\UIDelegate.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Utils\\Utils.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Utils\\WebBrowserEventHandler.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Utils\\WinImplBase.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t</Filter>\n\t\t\t<Filter\n\t\t\t\tName=\"Core\"\n\t\t\t\t>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIBase.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIContainer.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIControl.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIDefine.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIDlgBuilder.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIManager.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIMarkup.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Core\\UIRender.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t</Filter>\n\t\t\t<Filter\n\t\t\t\tName=\"Layout\"\n\t\t\t\t>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Layout\\UIChildLayout.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Layout\\UIHorizontalLayout.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Layout\\UITabLayout.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Layout\\UITileLayout.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Layout\\UIVerticalLayout.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t</Filter>\n\t\t\t<Filter\n\t\t\t\tName=\"Control\"\n\t\t\t\t>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIActiveX.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIButton.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UICheckBox.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UICombo.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIComboBox.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIDateTime.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIEdit.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIFlash.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UILabel.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIList.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIOption.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIProgress.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIRichEdit.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIScrollBar.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UISlider.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIText.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UITreeView.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t\t<File\n\t\t\t\t\tRelativePath=\".\\Control\\UIWebBrowser.h\"\n\t\t\t\t\t>\n\t\t\t\t</File>\n\t\t\t</Filter>\n\t\t</Filter>\n\t\t<Filter\n\t\t\tName=\"Resource Files\"\n\t\t\tFilter=\"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\n\t\t\t>\n\t\t</Filter>\n\t</Files>\n\t<Globals>\n\t</Globals>\n</VisualStudioProject>\n"
  },
  {
    "path": "DuiLib/DuiLib.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"UnicodeDebug|Win32\">\n      <Configuration>UnicodeDebug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"UnicodeRelease|Win32\">\n      <Configuration>UnicodeRelease</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectGuid>{E106ACD7-4E53-4AEE-942B-D0DD426DB34E}</ProjectGuid>\n    <RootNamespace>DuiLib</RootNamespace>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <PlatformToolset>v140_xp</PlatformToolset>\n    <UseOfMfc>false</UseOfMfc>\n    <CharacterSet>Unicode</CharacterSet>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <PlatformToolset>v140_xp</PlatformToolset>\n    <UseOfMfc>false</UseOfMfc>\n    <CharacterSet>Unicode</CharacterSet>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup>\n    <_ProjectFileVersion>11.0.61030.0</_ProjectFileVersion>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'\">\n    <OutDir>$(solutiondir)Build\\Debug_u\\</OutDir>\n    <IntDir>$(solutiondir)Build\\Debug_u\\</IntDir>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>false</GenerateManifest>\n    <EmbedManifest>false</EmbedManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'\">\n    <OutDir>$(solutiondir)Build\\Release_u</OutDir>\n    <IntDir>$(solutiondir)Build\\Release_u</IntDir>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>false</GenerateManifest>\n    <EmbedManifest>false</EmbedManifest>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'\">\n    <Midl>\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <MkTypLibCompatible>true</MkTypLibCompatible>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <TargetEnvironment>Win32</TargetEnvironment>\n      <TypeLibraryName>.\\Debug/DuiLib.tlb</TypeLibraryName>\n      <HeaderFileName />\n    </Midl>\n    <ClCompile>\n      <Optimization>Disabled</Optimization>\n      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;UILIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <MinimalRebuild>true</MinimalRebuild>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>\n      <PrecompiledHeaderOutputFile>$(solutiondir)Build\\Debug_u\\DuiLib.pch</PrecompiledHeaderOutputFile>\n      <WarningLevel>Level3</WarningLevel>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n    </ClCompile>\n    <ResourceCompile>\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <Culture>0x0409</Culture>\n    </ResourceCompile>\n    <Link>\n      <OutputFile>../bin/DuiLib_ud.dll</OutputFile>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>\n      <BaseAddress>0x11000000</BaseAddress>\n      <ImportLibrary>../Lib/DuiLib_ud.lib</ImportLibrary>\n      <TargetMachine>MachineX86</TargetMachine>\n      <SubSystem>Windows</SubSystem>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <Bscmake>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <OutputFile>.\\Debug/DuiLib.bsc</OutputFile>\n    </Bscmake>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'\">\n    <Midl>\n      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <MkTypLibCompatible>true</MkTypLibCompatible>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <TargetEnvironment>Win32</TargetEnvironment>\n      <TypeLibraryName>.\\Release/DuiLib.tlb</TypeLibraryName>\n      <HeaderFileName />\n    </Midl>\n    <ClCompile>\n      <Optimization>MinSpace</Optimization>\n      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;UILIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <StringPooling>true</StringPooling>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderOutputFile>$(solutiondir)Build\\Release_u\\DuiLib.pch</PrecompiledHeaderOutputFile>\n      <WarningLevel>Level3</WarningLevel>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n    </ClCompile>\n    <ResourceCompile>\n      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <Culture>0x0406</Culture>\n    </ResourceCompile>\n    <Link>\n      <OutputFile>../bin/DuiLib_u.dll</OutputFile>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <BaseAddress>0x11000000</BaseAddress>\n      <ImportLibrary>../Lib/DuiLib_u.lib</ImportLibrary>\n      <TargetMachine>MachineX86</TargetMachine>\n      <SubSystem>Windows</SubSystem>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <Bscmake>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <OutputFile>.\\Release/DuiLib.bsc</OutputFile>\n    </Bscmake>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"Control\\UIAnimation.cpp\" />\n    <ClCompile Include=\"Control\\UIColorPalette.cpp\" />\n    <ClCompile Include=\"Control\\UIFadeButton.cpp\" />\n    <ClCompile Include=\"Control\\UIHyperlink.cpp\" />\n    <ClCompile Include=\"Control\\UIIpAddress.cpp\" />\n    <ClCompile Include=\"Control\\UIMediaPlayer.cpp\" />\n    <ClCompile Include=\"StdAfx.cpp\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeaderOutputFile Condition=\"'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'\">$(solutiondir)Build\\Release_u\\DuiLib.pch</PrecompiledHeaderOutputFile>\n      <PrecompiledHeaderOutputFile Condition=\"'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'\">$(solutiondir)Build\\Debug_u\\DuiLib.pch</PrecompiledHeaderOutputFile>\n    </ClCompile>\n    <ClCompile Include=\"UIlib.cpp\" />\n    <ClCompile Include=\"Utils\\WinImplBase.cpp\" />\n    <ClCompile Include=\"Utils\\stb_image.c\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'\">\n      </PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'\">\n      </PrecompiledHeader>\n    </ClCompile>\n    <ClCompile Include=\"Utils\\UIDelegate.cpp\" />\n    <ClCompile Include=\"Utils\\Utils.cpp\" />\n    <ClCompile Include=\"Core\\UIBase.cpp\" />\n    <ClCompile Include=\"Core\\UIContainer.cpp\" />\n    <ClCompile Include=\"Core\\UIControl.cpp\" />\n    <ClCompile Include=\"Core\\UIDlgBuilder.cpp\" />\n    <ClCompile Include=\"Core\\UIManager.cpp\" />\n    <ClCompile Include=\"Core\\UIMarkup.cpp\" />\n    <ClCompile Include=\"Core\\UIRender.cpp\" />\n    <ClCompile Include=\"Layout\\UIChildLayout.cpp\" />\n    <ClCompile Include=\"Layout\\UIHorizontalLayout.cpp\" />\n    <ClCompile Include=\"Layout\\UITabLayout.cpp\" />\n    <ClCompile Include=\"Layout\\UITileLayout.cpp\" />\n    <ClCompile Include=\"Layout\\UIVerticalLayout.cpp\" />\n    <ClCompile Include=\"Control\\UIActiveX.cpp\" />\n    <ClCompile Include=\"Control\\UIButton.cpp\" />\n    <ClCompile Include=\"Control\\UICheckBox.cpp\" />\n    <ClCompile Include=\"Control\\UICombo.cpp\" />\n    <ClCompile Include=\"Control\\UIComboBox.cpp\" />\n    <ClCompile Include=\"Control\\UIDateTime.cpp\" />\n    <ClCompile Include=\"Control\\UIEdit.cpp\" />\n    <ClCompile Include=\"Control\\UIFlash.cpp\" />\n    <ClCompile Include=\"Control\\UILabel.cpp\" />\n    <ClCompile Include=\"Control\\UIList.cpp\" />\n    <ClCompile Include=\"Control\\UIOption.cpp\" />\n    <ClCompile Include=\"Control\\UIProgress.cpp\" />\n    <ClCompile Include=\"Control\\UIRichEdit.cpp\" />\n    <ClCompile Include=\"Control\\UIScrollBar.cpp\" />\n    <ClCompile Include=\"Control\\UISlider.cpp\" />\n    <ClCompile Include=\"Control\\UIText.cpp\" />\n    <ClCompile Include=\"Control\\UITreeView.cpp\" />\n    <ClCompile Include=\"Control\\UIWebBrowser.cpp\" />\n    <ClCompile Include=\"Utils\\Zip\\XUnZip.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"Control\\UIAnimation.h\" />\n    <ClInclude Include=\"Control\\UIColorPalette.h\" />\n    <ClInclude Include=\"Control\\UIFadeButton.h\" />\n    <ClInclude Include=\"Control\\UIHyperlink.h\" />\n    <ClInclude Include=\"Control\\UIIpAddress.h\" />\n    <ClInclude Include=\"Control\\UIMediaPlayer.h\" />\n    <ClInclude Include=\"StdAfx.h\" />\n    <ClInclude Include=\"UIlib.h\" />\n    <ClInclude Include=\"Utils\\downloadmgr.h\" />\n    <ClInclude Include=\"Utils\\FlashEventHandler.h\" />\n    <ClInclude Include=\"Utils\\stb_image.h\" />\n    <ClInclude Include=\"Utils\\UIDelegate.h\" />\n    <ClInclude Include=\"Utils\\UnCompression.h\" />\n    <ClInclude Include=\"Utils\\Utils.h\" />\n    <ClInclude Include=\"Utils\\WebBrowserEventHandler.h\" />\n    <ClInclude Include=\"Utils\\WinImplBase.h\" />\n    <ClInclude Include=\"Core\\UIBase.h\" />\n    <ClInclude Include=\"Core\\UIContainer.h\" />\n    <ClInclude Include=\"Core\\UIControl.h\" />\n    <ClInclude Include=\"Core\\UIDefine.h\" />\n    <ClInclude Include=\"Core\\UIDlgBuilder.h\" />\n    <ClInclude Include=\"Core\\UIManager.h\" />\n    <ClInclude Include=\"Core\\UIMarkup.h\" />\n    <ClInclude Include=\"Core\\UIRender.h\" />\n    <ClInclude Include=\"Layout\\UIChildLayout.h\" />\n    <ClInclude Include=\"Layout\\UIHorizontalLayout.h\" />\n    <ClInclude Include=\"Layout\\UITabLayout.h\" />\n    <ClInclude Include=\"Layout\\UITileLayout.h\" />\n    <ClInclude Include=\"Layout\\UIVerticalLayout.h\" />\n    <ClInclude Include=\"Control\\UIActiveX.h\" />\n    <ClInclude Include=\"Control\\UIButton.h\" />\n    <ClInclude Include=\"Control\\UICheckBox.h\" />\n    <ClInclude Include=\"Control\\UICombo.h\" />\n    <ClInclude Include=\"Control\\UIComboBox.h\" />\n    <ClInclude Include=\"Control\\UIDateTime.h\" />\n    <ClInclude Include=\"Control\\UIEdit.h\" />\n    <ClInclude Include=\"Control\\UIFlash.h\" />\n    <ClInclude Include=\"Control\\UILabel.h\" />\n    <ClInclude Include=\"Control\\UIList.h\" />\n    <ClInclude Include=\"Control\\UIOption.h\" />\n    <ClInclude Include=\"Control\\UIProgress.h\" />\n    <ClInclude Include=\"Control\\UIRichEdit.h\" />\n    <ClInclude Include=\"Control\\UIScrollBar.h\" />\n    <ClInclude Include=\"Control\\UISlider.h\" />\n    <ClInclude Include=\"Control\\UIText.h\" />\n    <ClInclude Include=\"Control\\UITreeView.h\" />\n    <ClInclude Include=\"Control\\UIWebBrowser.h\" />\n    <ClInclude Include=\"Utils\\Zip\\XUnZip.h\" />\n    <ClInclude Include=\"Utils\\Zip\\XUnZipBase.h\" />\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "DuiLib/DuiLib.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Source Files\">\n      <UniqueIdentifier>{232caa65-5221-4dde-aa8e-9862603c7d36}</UniqueIdentifier>\n      <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>\n    </Filter>\n    <Filter Include=\"Source Files\\Utils\">\n      <UniqueIdentifier>{6c3a96cf-d302-478e-9e48-20c5eae9aa58}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Source Files\\Core\">\n      <UniqueIdentifier>{727448b4-96a0-4ec1-ab77-6c526cc765ae}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Source Files\\Layout\">\n      <UniqueIdentifier>{712affb0-7fb0-42c4-9b32-dad40622bb71}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Source Files\\Control\">\n      <UniqueIdentifier>{b5e5b016-2160-43a3-9e2f-c800551b5cdb}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Header Files\">\n      <UniqueIdentifier>{0bc8d500-59a9-48f4-b0f9-da5a7a403519}</UniqueIdentifier>\n      <Extensions>h;hpp;hxx;hm;inl</Extensions>\n    </Filter>\n    <Filter Include=\"Header Files\\Utils\">\n      <UniqueIdentifier>{4c34ae14-e140-4a40-8d93-ff4a437975b5}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Header Files\\Core\">\n      <UniqueIdentifier>{8299d41f-a73e-446a-8e63-510771cc9238}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Header Files\\Layout\">\n      <UniqueIdentifier>{e89aa122-b91d-4fe9-ad7c-e133e3d68661}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Header Files\\Control\">\n      <UniqueIdentifier>{767d5bd7-b5a5-4906-8540-b4f58bc00d0a}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{f594f485-57c2-4ab3-8fef-368387bf3e38}</UniqueIdentifier>\n      <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n    <Filter Include=\"Source Files\\Utils\\Zip\">\n      <UniqueIdentifier>{0f7b3766-91c9-434c-8178-a1dc3f8db247}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Header Files\\Utils\\zip\">\n      <UniqueIdentifier>{2bb8fe18-a99e-47ab-b40a-a34f0c8a5ec9}</UniqueIdentifier>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"StdAfx.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"UIlib.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Utils\\WinImplBase.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Utils\\stb_image.c\">\n      <Filter>Source Files\\Utils</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Utils\\UIDelegate.cpp\">\n      <Filter>Source Files\\Utils</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Utils\\Utils.cpp\">\n      <Filter>Source Files\\Utils</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Core\\UIBase.cpp\">\n      <Filter>Source Files\\Core</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Core\\UIContainer.cpp\">\n      <Filter>Source Files\\Core</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Core\\UIControl.cpp\">\n      <Filter>Source Files\\Core</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Core\\UIDlgBuilder.cpp\">\n      <Filter>Source Files\\Core</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Core\\UIManager.cpp\">\n      <Filter>Source Files\\Core</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Core\\UIMarkup.cpp\">\n      <Filter>Source Files\\Core</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Core\\UIRender.cpp\">\n      <Filter>Source Files\\Core</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Layout\\UIChildLayout.cpp\">\n      <Filter>Source Files\\Layout</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Layout\\UIHorizontalLayout.cpp\">\n      <Filter>Source Files\\Layout</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Layout\\UITabLayout.cpp\">\n      <Filter>Source Files\\Layout</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Layout\\UITileLayout.cpp\">\n      <Filter>Source Files\\Layout</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Layout\\UIVerticalLayout.cpp\">\n      <Filter>Source Files\\Layout</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIActiveX.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIButton.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UICheckBox.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UICombo.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIComboBox.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIDateTime.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIEdit.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIFlash.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UILabel.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIList.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIOption.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIProgress.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIRichEdit.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIScrollBar.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UISlider.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIText.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UITreeView.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIWebBrowser.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIColorPalette.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Utils\\Zip\\XUnZip.cpp\">\n      <Filter>Source Files\\Utils\\Zip</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIAnimation.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIFadeButton.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIHyperlink.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIMediaPlayer.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n    <ClCompile Include=\"Control\\UIIpAddress.cpp\">\n      <Filter>Source Files\\Control</Filter>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"StdAfx.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"UIlib.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Utils\\downloadmgr.h\">\n      <Filter>Header Files\\Utils</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Utils\\FlashEventHandler.h\">\n      <Filter>Header Files\\Utils</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Utils\\UIDelegate.h\">\n      <Filter>Header Files\\Utils</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Utils\\Utils.h\">\n      <Filter>Header Files\\Utils</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Utils\\WebBrowserEventHandler.h\">\n      <Filter>Header Files\\Utils</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Utils\\WinImplBase.h\">\n      <Filter>Header Files\\Utils</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Core\\UIBase.h\">\n      <Filter>Header Files\\Core</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Core\\UIContainer.h\">\n      <Filter>Header Files\\Core</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Core\\UIControl.h\">\n      <Filter>Header Files\\Core</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Core\\UIDefine.h\">\n      <Filter>Header Files\\Core</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Core\\UIDlgBuilder.h\">\n      <Filter>Header Files\\Core</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Core\\UIManager.h\">\n      <Filter>Header Files\\Core</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Core\\UIMarkup.h\">\n      <Filter>Header Files\\Core</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Core\\UIRender.h\">\n      <Filter>Header Files\\Core</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Layout\\UIChildLayout.h\">\n      <Filter>Header Files\\Layout</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Layout\\UIHorizontalLayout.h\">\n      <Filter>Header Files\\Layout</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Layout\\UITabLayout.h\">\n      <Filter>Header Files\\Layout</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Layout\\UITileLayout.h\">\n      <Filter>Header Files\\Layout</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Layout\\UIVerticalLayout.h\">\n      <Filter>Header Files\\Layout</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIActiveX.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIButton.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UICheckBox.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UICombo.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIComboBox.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIDateTime.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIEdit.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIFlash.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UILabel.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIList.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIOption.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIProgress.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIRichEdit.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIScrollBar.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UISlider.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIText.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UITreeView.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIWebBrowser.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIColorPalette.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Utils\\UnCompression.h\">\n      <Filter>Header Files\\Utils</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Utils\\Zip\\XUnZip.h\">\n      <Filter>Header Files\\Utils\\zip</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Utils\\Zip\\XUnZipBase.h\">\n      <Filter>Header Files\\Utils\\zip</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIAnimation.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIFadeButton.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIHyperlink.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIMediaPlayer.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Control\\UIIpAddress.h\">\n      <Filter>Header Files\\Control</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Utils\\stb_image.h\">\n      <Filter>Source Files\\Utils</Filter>\n    </ClInclude>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "DuiLib/Ex/ShadowWindow.h",
    "content": "#ifndef __SHADOWWINDOW_H__\n#define __SHADOWWINDOW_H__\n\n\n/*\nڴεʱ򣬻⡣ڲȻǷεӰ\nʹ÷\nCShadowWindow::Initialize(GetPaintManager()->GetInstance());\nm_WndShadow.Create(m_hWnd);\nm_WndShadow.SetSize(5);\nm_WndShadow.SetPosition(0, 0);\n\n*/\n\n#include <windows.h>\n#include <math.h>\n\nnamespace DuiLib\n{\n#ifndef AC_SRC_ALPHA\n#define AC_SRC_ALPHA 0x01\n#endif\n\n#ifndef ULW_ALPHA\n#define ULW_ALPHA 0x00000002\n#endif\n\n\t// Vista aero related message\n#ifndef WM_DWMCOMPOSITIONCHANGED\n#define WM_DWMCOMPOSITIONCHANGED 0x031E\n#endif\n\n\ttypedef BOOL(WINAPI *pfnUpdateLayeredWindow)(HWND hWnd,HDC hdcDst,POINT *pptDst,\n\t\tSIZE *psize,HDC hdcSrc,POINT *pptSrc,COLORREF crKey,\n\t\tBLENDFUNCTION *pblend,DWORD dwFlags);\n\ttypedef HRESULT(WINAPI *pfnDwmIsCompositionEnabled)(BOOL *pfEnabled);\n\ttypedef void(__stdcall *pfnAdjustShadows)(void * pCallbackData,LPBITMAPINFO pBmpinfo,UINT32 *pShadBits,long lxShadowSize,long lcxOffset,long lcyOffset);\n\n\n\n\tclass CShadowWindow\n\t{\n\tpublic:\n\t\tstatic CShadowWindow * pCShadowWindow_;\n\t\tstatic HWND hParent_;\n\tpublic:\n\t\tenum ShadowStatus\n\t\t{\n\t\t\tSS_ENABLED=1,\t// Shadow is enabled, if not, the following one is always FALSE\n\t\t\tSS_VISABLE=1<<1,\t// Shadow window is visible\n\t\t\tSS_PARENTVISIBLE=1<<2,\t// Parent window is visible, if not, the above one is always FALSE\n\t\t\tSS_DISABLEDBYAERO=1<<3\t// Shadow is enabled, but do not show because areo is enabled\n\t\t};\n\tprotected:\n#pragma warning(push)\n#pragma warning(disable:4786)\n\n#pragma warning(pop) \n\t\tstatic HINSTANCE s_hInstance;\n\t\tstatic pfnUpdateLayeredWindow s_UpdateLayeredWindow;\n\n\t\tstatic BOOL s_bVista;\t// Whether running on Win Vista\n\t\tstatic pfnDwmIsCompositionEnabled s_DwmIsCompositionEnabled;\n\n\t\tLONG m_OriParentProc;\t// Original WndProc of parent window\n\t\tBYTE m_Status;\n\t\tpfnAdjustShadows m_fAdjustShadows;\n\t\tvoid * m_pCallbackData;\n\t\tunsigned char m_nDarkness;\t// Darkness, transparency of blurred area\n\t\tunsigned char m_nSharpness;\t// Sharpness, width of blurred border of shadow window\n\t\tsigned char m_nSize;\t// Shadow window size, relative to parent window size\n\n\t\t// The X and Y offsets of shadow window,\n\t\t// relative to the parent window, at center of both windows (not top-left corner), signed\n\t\tsigned char m_nxOffset;\n\t\tsigned char m_nyOffset;\n\t\t// Restore last parent window size, used to determine the update strategy when parent window is resized\n\t\tLPARAM m_WndSize;\n\t\t// Set this to TRUE if the shadow should not be update until next WM_PAINT is received\n\t\tBOOL m_bUpdate;\n\t\tCOLORREF m_Color;\t// Color of shadow\n\tpublic:\n\t\tHWND m_hWnd;\n\tprotected:\n\t\t//static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);\n\t\tstatic LRESULT CALLBACK ParentProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)\n\t\t{\n\t\t\tCShadowWindow *pThis=NULL;\n\t\t\tif (hParent_==hwnd)\n\t\t\t{\n\t\t\t\tpThis=pCShadowWindow_;\n\t\t\t}\n#pragma warning(push)\n#pragma warning(disable: 4312)\n\t\t\tWNDPROC pDefProc=(WNDPROC)pThis->m_OriParentProc;\n#pragma warning(pop)\n\n\t\t\tswitch(uMsg)\n\t\t\t{\n\t\t\tcase WM_MOVE:\n\t\t\t\tif(pThis->m_Status & SS_VISABLE)\n\t\t\t\t{\n\t\t\t\t\tRECT WndRect;\n\t\t\t\t\tGetWindowRect(hwnd,&WndRect);\n\t\t\t\t\tSetWindowPos(pThis->m_hWnd,0,\n\t\t\t\t\t\tWndRect.left+pThis->m_nxOffset-pThis->m_nSize,WndRect.top+pThis->m_nyOffset-pThis->m_nSize,\n\t\t\t\t\t\t0,0,SWP_NOSIZE|SWP_NOACTIVATE);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase WM_SIZE:\n\t\t\t\tif(pThis->m_Status & SS_ENABLED && !(pThis->m_Status & SS_DISABLEDBYAERO))\n\t\t\t\t{\n\t\t\t\t\tif(SIZE_MAXIMIZED==wParam||SIZE_MINIMIZED==wParam)\n\t\t\t\t\t{\n\t\t\t\t\t\tShowWindow(pThis->m_hWnd,SW_HIDE);\n\t\t\t\t\t\tpThis->m_Status&=~SS_VISABLE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tLONG lParentStyle=GetWindowLong(hwnd,GWL_STYLE);\n\t\t\t\t\t\tif(WS_VISIBLE & lParentStyle)\t// Parent may be resized even if invisible\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpThis->m_Status|=SS_PARENTVISIBLE;\n\t\t\t\t\t\t\tif(!(pThis->m_Status & SS_VISABLE))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpThis->m_Status|=SS_VISABLE;\n\t\t\t\t\t\t\t\t// Update before show, because if not, restore from maximized will\n\t\t\t\t\t\t\t\t// see a glance misplaced shadow\n\t\t\t\t\t\t\t\tpThis->Update(hwnd);\n\t\t\t\t\t\t\t\tShowWindow(pThis->m_hWnd,SW_SHOWNA);\n\t\t\t\t\t\t\t\t// If restore from minimized, the window region will not be updated until WM_PAINT:(\n\t\t\t\t\t\t\t\tpThis->m_bUpdate=TRUE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Awful! It seems that if the window size was not decreased\n\t\t\t\t\t\t\t// the window region would never be updated until WM_PAINT was sent.\n\t\t\t\t\t\t\t// So do not Update() until next WM_PAINT is received in this case\n\t\t\t\t\t\t\telse if(LOWORD(lParam)>LOWORD(pThis->m_WndSize)||HIWORD(lParam)>HIWORD(pThis->m_WndSize))\n\t\t\t\t\t\t\t\tpThis->m_bUpdate=TRUE;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tpThis->Update(hwnd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpThis->m_WndSize=lParam;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase WM_PAINT:\n\t\t\t\t{\n\t\t\t\t\tif(pThis->m_bUpdate)\n\t\t\t\t\t{\n\t\t\t\t\t\tpThis->Update(hwnd);\n\t\t\t\t\t\tpThis->m_bUpdate=FALSE;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase WM_EXITSIZEMOVE:\n\t\t\t\tif(pThis->m_Status & SS_VISABLE)\n\t\t\t\t{\n\t\t\t\t\tpThis->Update(hwnd);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase WM_SHOWWINDOW:\n\t\t\t\tif(pThis->m_Status & SS_ENABLED && !(pThis->m_Status & SS_DISABLEDBYAERO))\n\t\t\t\t{\n\t\t\t\t\tLRESULT lResult=pDefProc(hwnd,uMsg,wParam,lParam);\n\t\t\t\t\tif(!wParam)\t// the window is being hidden\n\t\t\t\t\t{\n\t\t\t\t\t\tShowWindow(pThis->m_hWnd,SW_HIDE);\n\t\t\t\t\t\tpThis->m_Status&=~(SS_VISABLE|SS_PARENTVISIBLE);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// \t\t\t\tpThis->m_Status |= SS_VISABLE | SS_PARENTVISIBLE;\n\t\t\t\t\t\t// \t\t\t\tShowWindow(pThis->m_hWnd, SW_SHOWNA);\n\t\t\t\t\t\t// \t\t\t\tpThis->Update(hwnd);\n\t\t\t\t\t\tpThis->m_bUpdate=TRUE;\n\t\t\t\t\t\tpThis->Show(hwnd);\n\t\t\t\t\t}\n\t\t\t\t\treturn lResult;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase WM_DESTROY:\n\t\t\t\tDestroyWindow(pThis->m_hWnd);\n\t\t\t\tbreak;\n\n\t\t\tcase WM_NCDESTROY:\n\t\t\t\tpCShadowWindow_=NULL;\n\t\t\t\tbreak;\n\n\t\t\tcase WM_DWMCOMPOSITIONCHANGED:\n\t\t\t\t{\n\t\t\t\t\tBOOL bAero=FALSE;\n\t\t\t\t\tif(s_DwmIsCompositionEnabled)\t// \"if\" is actually not necessary here :P\n\t\t\t\t\t\ts_DwmIsCompositionEnabled(&bAero);\n\t\t\t\t\tif(bAero)\n\t\t\t\t\t\tpThis->m_Status|=SS_DISABLEDBYAERO;\n\t\t\t\t\telse\n\t\t\t\t\t\tpThis->m_Status&=~SS_DISABLEDBYAERO;\n\n\t\t\t\t\tpThis->Show(hwnd);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Call the default(original) window procedure for other messages or messages processed but not returned\n\t\t\treturn pDefProc(hwnd,uMsg,wParam,lParam);\n\t\t}\n\t\tvoid Update(HWND hParent)\n\t\t{\n\t\t\tRECT WndRect;\n\t\t\tGetWindowRect(hParent,&WndRect);\n\t\t\tint nShadWndWid=WndRect.right-WndRect.left+m_nSize*2;\n\t\t\tint nShadWndHei=WndRect.bottom-WndRect.top+m_nSize*2;\n\n\t\t\t// Create the alpha blending bitmap\n\t\t\tBITMAPINFO bmi;        // bitmap header\n\n\t\t\tZeroMemory(&bmi,sizeof(BITMAPINFO));\n\t\t\tbmi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);\n\t\t\tbmi.bmiHeader.biWidth=nShadWndWid;\n\t\t\tbmi.bmiHeader.biHeight=nShadWndHei;\n\t\t\tbmi.bmiHeader.biPlanes=1;\n\t\t\tbmi.bmiHeader.biBitCount=32;         // four 8-bit components\n\t\t\tbmi.bmiHeader.biCompression=BI_RGB;\n\t\t\tbmi.bmiHeader.biSizeImage=nShadWndWid * nShadWndHei*4;\n\n\t\t\tBYTE *pvBits;          // pointer to DIB section\n\t\t\tHBITMAP hbitmap=CreateDIBSection(NULL,&bmi,DIB_RGB_COLORS,(void **)&pvBits,NULL,0);\n\n\t\t\tZeroMemory(pvBits,bmi.bmiHeader.biSizeImage);\n\t\t\tMakeShadow((UINT32 *)pvBits,hParent,&WndRect);\n\t\t\tif(m_fAdjustShadows)\n\t\t\t\tm_fAdjustShadows(m_pCallbackData,&bmi,(UINT32 *)pvBits,m_nSize,m_nxOffset,m_nyOffset);\n\t\t\tHDC hMemDC=CreateCompatibleDC(NULL);\n\t\t\tHBITMAP hOriBmp=(HBITMAP)SelectObject(hMemDC,hbitmap);\n\n\t\t\tPOINT ptDst={WndRect.left+m_nxOffset-m_nSize,WndRect.top+m_nyOffset-m_nSize};\n\t\t\tPOINT ptSrc={0,0};\n\t\t\tSIZE WndSize={nShadWndWid,nShadWndHei};\n\t\t\tBLENDFUNCTION blendPixelFunction={AC_SRC_OVER,0,255,AC_SRC_ALPHA};\n\n\t\t\tMoveWindow(m_hWnd,ptDst.x,ptDst.y,nShadWndWid,nShadWndHei,FALSE);\n\n\t\t\tBOOL bRet=s_UpdateLayeredWindow(m_hWnd,NULL,&ptDst,&WndSize,hMemDC,\n\t\t\t\t&ptSrc,0,&blendPixelFunction,ULW_ALPHA);\n\n\t\t\t_ASSERT(bRet); // something was wrong....\n\n\t\t\t// Delete used resources\n\t\t\tSelectObject(hMemDC,hOriBmp);\n\t\t\tDeleteObject(hbitmap);\n\t\t\tDeleteDC(hMemDC);\n\t\t}\n\n\t\t// Fill in the shadow window alpha blend bitmap with shadow image pixels\n\t\tvoid MakeShadow(UINT32 *pShadBits,HWND hParent,RECT *rcParent)\n\t\t{\n\t\t\t// The shadow algorithm:\n\t\t\t// Get the region of parent window,\n\t\t\t// Apply morphologic erosion to shrink it into the size (ShadowWndSize - Sharpness)\n\t\t\t// Apply modified (with blur effect) morphologic dilation to make the blurred border\n\t\t\t// The algorithm is optimized by assuming parent window is just \"one piece\" and without \"wholes\" on it\n\n\t\t\t// Get the region of parent window,\n\t\t\t// Create a full rectangle region in case of the window region is not defined\n\t\t\tHRGN hParentRgn=CreateRectRgn(0,0,rcParent->right-rcParent->left,rcParent->bottom-rcParent->top);\n\t\t\tGetWindowRgn(hParent,hParentRgn);\n\n\t\t\t// Determine the Start and end point of each horizontal scan line\n\t\t\tSIZE szParent={rcParent->right-rcParent->left,rcParent->bottom-rcParent->top};\n\t\t\tSIZE szShadow={szParent.cx+2*m_nSize,szParent.cy+2*m_nSize};\n\t\t\t// Extra 2 lines (set to be empty) in ptAnchors are used in dilation\n\t\t\tint nAnchors=max(szParent.cy,szShadow.cy);\t// # of anchor points pares\n\t\t\tint(*ptAnchors)[2]=new int[nAnchors+2][2];\n\t\t\tint(*ptAnchorsOri)[2]=new int[szParent.cy][2];\t// anchor points, will not modify during erosion\n\t\t\tptAnchors[0][0]=szParent.cx;\n\t\t\tptAnchors[0][1]=0;\n\t\t\tptAnchors[nAnchors+1][0]=szParent.cx;\n\t\t\tptAnchors[nAnchors+1][1]=0;\n\t\t\tif(m_nSize>0)\n\t\t\t{\n\t\t\t\t// Put the parent window anchors at the center\n\t\t\t\tfor(int i=0; i<m_nSize; i++)\n\t\t\t\t{\n\t\t\t\t\tptAnchors[i+1][0]=szParent.cx;\n\t\t\t\t\tptAnchors[i+1][1]=0;\n\t\t\t\t\tptAnchors[szShadow.cy-i][0]=szParent.cx;\n\t\t\t\t\tptAnchors[szShadow.cy-i][1]=0;\n\t\t\t\t}\n\t\t\t\tptAnchors+=m_nSize;\n\t\t\t}\n\t\t\tfor(int i=0; i<szParent.cy; i++)\n\t\t\t{\n\t\t\t\t// find start point\n\t\t\t\tint j;\n\t\t\t\tfor(j=0; j<szParent.cx; j++)\n\t\t\t\t{\n\t\t\t\t\tif(PtInRegion(hParentRgn,j,i))\n\t\t\t\t\t{\n\t\t\t\t\t\tptAnchors[i+1][0]=j+m_nSize;\n\t\t\t\t\t\tptAnchorsOri[i][0]=j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(j>=szParent.cx)\t// Start point not found\n\t\t\t\t{\n\t\t\t\t\tptAnchors[i+1][0]=szParent.cx;\n\t\t\t\t\tptAnchorsOri[i][1]=0;\n\t\t\t\t\tptAnchors[i+1][0]=szParent.cx;\n\t\t\t\t\tptAnchorsOri[i][1]=0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// find end point\n\t\t\t\t\tfor(j=szParent.cx-1; j>=ptAnchors[i+1][0]; j--)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(PtInRegion(hParentRgn,j,i))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tptAnchors[i+1][1]=j+1+m_nSize;\n\t\t\t\t\t\t\tptAnchorsOri[i][1]=j+1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// \t\tif(0 != ptAnchorsOri[i][1])\n\t\t\t\t// \t\t\t_RPTF2(_CRT_WARN, \"%d %d\\n\", ptAnchorsOri[i][0], ptAnchorsOri[i][1]);\n\t\t\t}\n\n\t\t\tif(m_nSize>0)\n\t\t\t\tptAnchors-=m_nSize;\t// Restore pos of ptAnchors for erosion\n\t\t\tint(*ptAnchorsTmp)[2]=new int[nAnchors+2][2];\t// Store the result of erosion\n\t\t\t// First and last line should be empty\n\t\t\tptAnchorsTmp[0][0]=szParent.cx;\n\t\t\tptAnchorsTmp[0][1]=0;\n\t\t\tptAnchorsTmp[nAnchors+1][0]=szParent.cx;\n\t\t\tptAnchorsTmp[nAnchors+1][1]=0;\n\t\t\tint nEroTimes=0;\n\t\t\t// morphologic erosion\n\t\t\tfor(int i=0; i<m_nSharpness-m_nSize; i++)\n\t\t\t{\n\t\t\t\tnEroTimes++;\n\t\t\t\t//ptAnchorsTmp[1][0] = szParent.cx;\n\t\t\t\t//ptAnchorsTmp[1][1] = 0;\n\t\t\t\t//ptAnchorsTmp[szParent.cy + 1][0] = szParent.cx;\n\t\t\t\t//ptAnchorsTmp[szParent.cy + 1][1] = 0;\n\t\t\t\tfor(int j=1; j < nAnchors+1; j++)\n\t\t\t\t{\n\t\t\t\t\tptAnchorsTmp[j][0]=max(ptAnchors[j-1][0],max(ptAnchors[j][0],ptAnchors[j+1][0]))+1;\n\t\t\t\t\tptAnchorsTmp[j][1]=min(ptAnchors[j-1][1],min(ptAnchors[j][1],ptAnchors[j+1][1]))-1;\n\t\t\t\t}\n\t\t\t\t// Exchange ptAnchors and ptAnchorsTmp;\n\t\t\t\tint(*ptAnchorsXange)[2]=ptAnchorsTmp;\n\t\t\t\tptAnchorsTmp=ptAnchors;\n\t\t\t\tptAnchors=ptAnchorsXange;\n\t\t\t}\n\n\t\t\t// morphologic dilation\n\t\t\tptAnchors+=(m_nSize<0?-m_nSize:0)+1;\t// now coordinates in ptAnchors are same as in shadow window\n\t\t\t// Generate the kernel\n\t\t\tint nKernelSize=m_nSize>m_nSharpness?m_nSize:m_nSharpness;\n\t\t\tint nCenterSize=m_nSize > m_nSharpness?(m_nSize-m_nSharpness):0;\n\t\t\tUINT32 *pKernel=new UINT32[(2*nKernelSize+1) * (2*nKernelSize+1)];\n\t\t\tUINT32 *pKernelIter=pKernel;\n\t\t\tfor(int i=0; i<=2*nKernelSize; i++)\n\t\t\t{\n\t\t\t\tfor(int j=0; j<=2*nKernelSize; j++)\n\t\t\t\t{\n\t\t\t\t\tdouble dLength=sqrt((i-nKernelSize) * (i-nKernelSize)+(j-nKernelSize) * (double)(j-nKernelSize));\n\t\t\t\t\tif(dLength<nCenterSize)\n\t\t\t\t\t\t*pKernelIter=m_nDarkness<<24|PreMultiply(m_Color,m_nDarkness);\n\t\t\t\t\telse if(dLength<=nKernelSize)\n\t\t\t\t\t{\n\t\t\t\t\t\tUINT32 nFactor=((UINT32)((1-(dLength-nCenterSize)/(m_nSharpness+1)) * m_nDarkness));\n\t\t\t\t\t\t*pKernelIter=nFactor<<24|PreMultiply(m_Color,nFactor);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t*pKernelIter=0;\n\t\t\t\t\t//TRACE(\"%d \", *pKernelIter >> 24);\n\t\t\t\t\tpKernelIter++;\n\t\t\t\t}\n\t\t\t\t//TRACE(\"\\n\");\n\t\t\t}\n\t\t\t// Generate blurred border\n\t\t\tfor(int i=nKernelSize; i<szShadow.cy-nKernelSize; i++)\n\t\t\t{\n\t\t\t\tint j;\n\t\t\t\tif(ptAnchors[i][0]<ptAnchors[i][1])\n\t\t\t\t{\n\n\t\t\t\t\t// Start of line\n\t\t\t\t\tfor(j=ptAnchors[i][0];\n\t\t\t\t\t\tj<min(max(ptAnchors[i-1][0],ptAnchors[i+1][0])+1,ptAnchors[i][1]);\n\t\t\t\t\t\tj++)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int k=0; k<=2*nKernelSize; k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tUINT32 *pPixel=pShadBits+\n\t\t\t\t\t\t\t\t(szShadow.cy-i-1+nKernelSize-k) * szShadow.cx+j-nKernelSize;\n\t\t\t\t\t\t\tUINT32 *pKernelPixel=pKernel+k * (2*nKernelSize+1);\n\t\t\t\t\t\t\tfor(int l=0; l<=2*nKernelSize; l++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(*pPixel<*pKernelPixel)\n\t\t\t\t\t\t\t\t\t*pPixel=*pKernelPixel;\n\t\t\t\t\t\t\t\tpPixel++;\n\t\t\t\t\t\t\t\tpKernelPixel++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t// for() start of line\n\n\t\t\t\t\t// End of line\n\t\t\t\t\tfor(j=max(j,min(ptAnchors[i-1][1],ptAnchors[i+1][1])-1);\n\t\t\t\t\t\tj<ptAnchors[i][1];\n\t\t\t\t\t\tj++)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int k=0; k<=2*nKernelSize; k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tUINT32 *pPixel=pShadBits+\n\t\t\t\t\t\t\t\t(szShadow.cy-i-1+nKernelSize-k) * szShadow.cx+j-nKernelSize;\n\t\t\t\t\t\t\tUINT32 *pKernelPixel=pKernel+k * (2*nKernelSize+1);\n\t\t\t\t\t\t\tfor(int l=0; l<=2*nKernelSize; l++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(*pPixel<*pKernelPixel)\n\t\t\t\t\t\t\t\t\t*pPixel=*pKernelPixel;\n\t\t\t\t\t\t\t\tpPixel++;\n\t\t\t\t\t\t\t\tpKernelPixel++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t// for() end of line\n\n\t\t\t\t}\n\t\t\t}\t// for() Generate blurred border\n\n\t\t\t// Erase unwanted parts and complement missing\n\t\t\tUINT32 clCenter=m_nDarkness<<24|PreMultiply(m_Color,m_nDarkness);\n\t\t\tfor(int i=min(nKernelSize,max(m_nSize-m_nyOffset,0));\n\t\t\t\ti<max(szShadow.cy-nKernelSize,min(szParent.cy+m_nSize-m_nyOffset,szParent.cy+2*m_nSize));\n\t\t\t\ti++)\n\t\t\t{\n\t\t\t\tUINT32 *pLine=pShadBits+(szShadow.cy-i-1) * szShadow.cx;\n\t\t\t\tif(i-m_nSize+m_nyOffset<0||i-m_nSize+m_nyOffset>=szParent.cy)\t// Line is not covered by parent window\n\t\t\t\t{\n\t\t\t\t\tfor(int j=ptAnchors[i][0]; j<ptAnchors[i][1]; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t*(pLine+j)=clCenter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor(int j=ptAnchors[i][0];\n\t\t\t\t\t\tj<min(ptAnchorsOri[i-m_nSize+m_nyOffset][0]+m_nSize-m_nxOffset,ptAnchors[i][1]);\n\t\t\t\t\t\tj++)\n\t\t\t\t\t\t*(pLine+j)=clCenter;\n\t\t\t\t\tfor(int j=max(ptAnchorsOri[i-m_nSize+m_nyOffset][0]+m_nSize-m_nxOffset,0);\n\t\t\t\t\t\tj<min(ptAnchorsOri[i-m_nSize+m_nyOffset][1]+m_nSize-m_nxOffset,szShadow.cx);\n\t\t\t\t\t\tj++)\n\t\t\t\t\t\t*(pLine+j)=0;\n\t\t\t\t\tfor(int j=max(ptAnchorsOri[i-m_nSize+m_nyOffset][1]+m_nSize-m_nxOffset,ptAnchors[i][0]);\n\t\t\t\t\t\tj<ptAnchors[i][1];\n\t\t\t\t\t\tj++)\n\t\t\t\t\t\t*(pLine+j)=clCenter;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Delete used resources\n\t\t\tdelete[](ptAnchors-(m_nSize<0?-m_nSize:0)-1);\n\t\t\tdelete[] ptAnchorsTmp;\n\t\t\tdelete[] ptAnchorsOri;\n\t\t\tdelete[] pKernel;\n\t\t\tDeleteObject(hParentRgn);\n\n\t\t}\n\n\t\t// Helper to calculate the alpha-premultiled value for a pixel\n\t\tinline DWORD PreMultiply(COLORREF cl,unsigned char nAlpha)\n\t\t{\n\t\t\t// It's strange that the byte order of RGB in 32b BMP is reverse to in COLORREF\n\t\t\treturn (GetRValue(cl) * (DWORD)nAlpha/255)<<16|\n\t\t\t\t(GetGValue(cl) * (DWORD)nAlpha/255)<<8|\n\t\t\t\t(GetBValue(cl) * (DWORD)nAlpha/255);\n\t\t}\n\n\t\t// Show or hide the shadow, depending on the enabled status stored in m_Status\n\t\tvoid Show(HWND hParentWnd)\n\t\t{\n\t\t\tm_Status&=SS_ENABLED|SS_DISABLEDBYAERO;\n\n\t\t\tif((m_Status & SS_ENABLED)&&!(m_Status & SS_DISABLEDBYAERO))\t// Enabled\n\t\t\t{\n\t\t\t\t// Determine the show state of shadow according to parent window's state\n\t\t\t\tLONG lParentStyle=GetWindowLong(hParentWnd,GWL_STYLE);\n\n\t\t\t\tif(WS_VISIBLE & lParentStyle)\t// Parent visible\n\t\t\t\t{\n\t\t\t\t\tm_Status|=SS_PARENTVISIBLE;\n\n\t\t\t\t\t// Parent is normal, show the shadow\n\t\t\t\t\tif(!((WS_MAXIMIZE|WS_MINIMIZE) & lParentStyle))\t// Parent visible but does not need shadow\n\t\t\t\t\t\tm_Status|=SS_VISABLE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(m_Status & SS_VISABLE)\n\t\t\t{\n\t\t\t\tShowWindow(m_hWnd,SW_SHOWNA);\n\t\t\t\tUpdate(hParentWnd);\n\t\t\t}\n\t\t\telse\n\t\t\t\tShowWindow(m_hWnd,SW_HIDE);\n\t\t}\n\tpublic:\n\t\tstatic BOOL Initialize(HINSTANCE hInstance,BOOL bUseAero=FALSE)\n\t\t{\n\t\t\tif(NULL!=s_UpdateLayeredWindow)\n\t\t\t\treturn FALSE;\n\t\t\tHMODULE hSysDll=LoadLibrary(_T(\"USER32.DLL\"));\n\t\t\ts_UpdateLayeredWindow=\n\t\t\t\t(pfnUpdateLayeredWindow)GetProcAddress(hSysDll,\n\t\t\t\t\"UpdateLayeredWindow\");\n\t\t\tif(NULL==s_UpdateLayeredWindow)\n\t\t\t\treturn FALSE;\n\t\t\t/*\n\t\t\t   ü(2766556)-- ע͵ͿˣȻVISTAϣửӰ,ΪDUILIBһ㶼ֻͻ?\n\t\t\t*/\n\t\t\t//-------\n\t\t\tif(bUseAero)\n\t\t\t{\n\t\t\t\thSysDll=LoadLibrary(_T(\"dwmapi.dll\"));\n\t\t\t\tif(hSysDll)\t// Loaded dwmapi.dll succefull, must on Vista or above\n\t\t\t\t{\n\t\t\t\t\ts_bVista=TRUE;\n\t\t\t\t\ts_DwmIsCompositionEnabled=\n\t\t\t\t\t\t(pfnDwmIsCompositionEnabled)GetProcAddress(hSysDll,\n\t\t\t\t\t\t\"DwmIsCompositionEnabled\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t//------\n\t\t\ts_hInstance=hInstance;\n\n\t\t\tWNDCLASSEX wcex;\n\t\t\tmemset(&wcex,0,sizeof(wcex));\n\t\t\twcex.cbSize=sizeof(WNDCLASSEX);\n\t\t\twcex.style=CS_HREDRAW|CS_VREDRAW;\n\t\t\twcex.lpfnWndProc=DefWindowProc;\n\t\t\twcex.cbClsExtra=0;\n\t\t\twcex.cbWndExtra=0;\n\t\t\twcex.hInstance=hInstance;\n\t\t\twcex.hIcon=NULL;\n\t\t\twcex.hCursor=LoadCursor(NULL,IDC_ARROW);\n\t\t\twcex.hbrBackground=(HBRUSH)(COLOR_WINDOW+1);\n\t\t\twcex.lpszMenuName=NULL;\n\t\t\twcex.lpszClassName=_T(\"SilentMoon.ShadowWindow.Class\");\n\t\t\twcex.hIconSm=NULL;\n\t\t\tRegisterClassEx(&wcex);\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tvoid Create(HWND hParentWnd)\n\t\t{\n\t\t\tif(NULL==s_UpdateLayeredWindow)\n\t\t\t\treturn;\n\t\t\t_ASSERT(s_hInstance!=INVALID_HANDLE_VALUE);\n\n\t\t\thParent_=hParentWnd;\n\t\t\tpCShadowWindow_=this;\n\n\n\t\t\tm_hWnd=CreateWindowEx(WS_EX_LAYERED|WS_EX_TRANSPARENT,_T(\"SilentMoon.ShadowWindow.Class\"),NULL, WS_POPUPWINDOW,CW_USEDEFAULT,0,0,0,hParentWnd,NULL,s_hInstance,NULL);\n\n\t\t\tm_Status=SS_ENABLED;\n\t\t\tBOOL bAero=FALSE;\n\t\t\tif(s_DwmIsCompositionEnabled)\n\t\t\t\ts_DwmIsCompositionEnabled(&bAero);\n\t\t\tif(bAero)\n\t\t\t\tm_Status|=SS_DISABLEDBYAERO;\n\t\t\tShow(hParentWnd);\n\t\t\tm_OriParentProc=GetWindowLong(hParentWnd,GWL_WNDPROC);\n#pragma warning(push)\n#pragma warning(disable: 4311)\n\t\t\tSetWindowLong(hParentWnd,GWL_WNDPROC,(LONG)ParentProc);\n#pragma warning(pop)\n\t\t}\n\t\tBOOL SetSize(int NewSize=0)\n\t\t{\n\t\t\tif(NewSize>20||NewSize<-20)\n\t\t\t\treturn FALSE;\n\n\t\t\tm_nSize=(signed char)NewSize;\n\t\t\tif(SS_VISABLE & m_Status)\n\t\t\t\tUpdate(GetParent(m_hWnd));\n\t\t\treturn TRUE;\n\t\t}\n\t\tint GetSize()\n\t\t{\n\t\t\treturn m_nSize;\n\t\t}\n\t\tBOOL SetSharpness(unsigned int NewSharpness=5)\n\t\t{\n\t\t\tif(NewSharpness>20)\n\t\t\t\treturn FALSE;\n\n\t\t\tm_nSharpness=(unsigned char)NewSharpness;\n\t\t\tif(SS_VISABLE & m_Status)\n\t\t\t\tUpdate(GetParent(m_hWnd));\n\t\t\treturn TRUE;\n\t\t}\n\t\tunsigned GetSharpness()\n\t\t{\n\t\t\treturn m_nSharpness;\n\t\t}\n\t\tBOOL SetDarkness(unsigned int NewDarkness=200)\n\t\t{\n\t\t\tif(NewDarkness>255)\n\t\t\t\treturn FALSE;\n\n\t\t\tm_nDarkness=(unsigned char)NewDarkness;\n\t\t\tif(SS_VISABLE & m_Status)\n\t\t\t\tUpdate(GetParent(m_hWnd));\n\t\t\treturn TRUE;\n\t\t}\n\t\tunsigned GetDarkness()\n\t\t{\n\t\t\treturn m_nDarkness;\n\t\t}\n\t\tBOOL SetPosition(int NewXOffset=5,int NewYOffset=5)\n\t\t{\n\t\t\tif(NewXOffset>20||NewXOffset<-20||\n\t\t\t\tNewYOffset > 20||NewYOffset<-20)\n\t\t\t\treturn FALSE;\n\n\t\t\tm_nxOffset=(signed char)NewXOffset;\n\t\t\tm_nyOffset=(signed char)NewYOffset;\n\t\t\tif(SS_VISABLE & m_Status)\n\t\t\t\tUpdate(GetParent(m_hWnd));\n\t\t\treturn TRUE;\n\t\t}\n\t\tvoid GetPosition(int * pnxOffset,int *pnyOffset)\n\t\t{\n\t\t\tif(pnxOffset)\n\t\t\t\t*pnxOffset=m_nxOffset;\n\t\t\tif(pnyOffset)\n\t\t\t\t*pnyOffset=m_nyOffset;\n\t\t}\n\t\tBOOL SetColor(COLORREF NewColor=0)\n\t\t{\n\t\t\tm_Color=NewColor;\n\t\t\tif(SS_VISABLE & m_Status)\n\t\t\t\tUpdate(GetParent(m_hWnd));\n\t\t\treturn TRUE;\n\t\t}\n\t\tCOLORREF GetColor()\n\t\t{\n\t\t\treturn m_Color;\n\t\t}\n\t\tvoid SetAdjustShadowBmpCallback(pfnAdjustShadows fNewCallback, void * pCallbackData)\n\t\t{\n\t\t\tif(m_fAdjustShadows!=fNewCallback && pCallbackData!=m_pCallbackData)\n\t\t\t{\n\t\t\t\tm_fAdjustShadows=fNewCallback;\n\t\t\t\tm_pCallbackData=pCallbackData;\n\t\t\t\tif(SS_VISABLE & m_Status)\n\t\t\t\t\tUpdate(GetParent(m_hWnd));\n\t\t\t}\n\t\t}\n\t\tpfnAdjustShadows GetAdjustShadowBmpCallback(void ** ppCallbackData)\n\t\t{\n\t\t\tif(ppCallbackData)\n\t\t\t\t*ppCallbackData=m_pCallbackData;\n\t\t\treturn m_fAdjustShadows;\n\t\t}\n\tpublic:\n\t\tCShadowWindow(void)\n\t\t\t: m_hWnd((HWND)INVALID_HANDLE_VALUE)\n\t\t\t,m_OriParentProc(NULL)\n\t\t\t,m_nDarkness(150)\n\t\t\t,m_nSharpness(5)\n\t\t\t,m_nSize(0)\n\t\t\t,m_nxOffset(5)\n\t\t\t,m_nyOffset(5)\n\t\t\t,m_Color(RGB(0,0,0))\n\t\t\t,m_WndSize(0)\n\t\t\t,m_bUpdate(FALSE)\n\t\t\t,m_fAdjustShadows(NULL)\n\t\t\t,m_pCallbackData(NULL)\n\t\t{\n\n\t\t}\n\t\tvirtual ~CShadowWindow()\n\t\t{\n\n\t\t}\n\n\t};\n\t_declspec(selectany) pfnUpdateLayeredWindow DuiLib::CShadowWindow::s_UpdateLayeredWindow=NULL;\n\t_declspec(selectany) pfnDwmIsCompositionEnabled DuiLib::CShadowWindow::s_DwmIsCompositionEnabled=NULL;\n\t_declspec(selectany) BOOL DuiLib::CShadowWindow::s_bVista=FALSE;\n\t_declspec(selectany) HINSTANCE DuiLib::CShadowWindow::s_hInstance;\n\n#pragma warning(push)\n#pragma warning(disable:4786)\n\n\t_declspec(selectany) CShadowWindow*\tCShadowWindow::pCShadowWindow_;\n\t_declspec(selectany) HWND DuiLib::CShadowWindow::hParent_;\n#pragma warning(pop) \n}\n\n#endif\n\n"
  },
  {
    "path": "DuiLib/Layout/UIChildLayout.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIChildLayout.h\"\n\nnamespace DuiLib\n{\n\tCChildLayoutUI::CChildLayoutUI()\n\t{\n\n\t}\n\n\tLPCTSTR CChildLayoutUI::GetClass() const\n\t{\n\t\treturn _T(\"ChildLayoutUI\");\n\t}\n\n\tLPVOID CChildLayoutUI::GetInterface( LPCTSTR pstrName )\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_CHILDLAYOUT) == 0 ) return static_cast<CChildLayoutUI*>(this);\n\t\treturn CControlUI::GetInterface(pstrName);\n\t}\n\n\tvoid CChildLayoutUI::Init()\n\t{\n\t\tif (!m_pstrXMLFile.IsEmpty())\n\t\t{\n\t\t\tCDialogBuilder builder;\n\t\t\tCContainerUI* pChildWindow = dynamic_cast<CContainerUI*>(builder.Create(m_pstrXMLFile.GetData(), (UINT)0, NULL, m_pManager));\n\t\t\tif (pChildWindow)\n\t\t\t{\n\t\t\t\tthis->Add(pChildWindow);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis->RemoveAll();\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid CChildLayoutUI::SetAttribute( LPCTSTR pstrName, LPCTSTR pstrValue )\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"xmlfile\")) == 0 )\n\t\t\tSetChildLayoutXML(pstrValue);\n\t\telse\n\t\t\tCContainerUI::SetAttribute(pstrName,pstrValue);\n\t}\n\n\tvoid CChildLayoutUI::SetChildLayoutXML( DuiLib::CDuiString pXML )\n\t{\n\t\tm_pstrXMLFile=pXML;\n\t}\n\n\tDuiLib::CDuiString CChildLayoutUI::GetChildLayoutXML()\n\t{\n\t\treturn m_pstrXMLFile;\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Layout/UIChildLayout.h",
    "content": "#ifndef __UICHILDLAYOUT_H__\n#define __UICHILDLAYOUT_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass UILIB_API CChildLayoutUI : public CContainerUI\n\t{\n\tpublic:\n\t\tCChildLayoutUI();\n\n\t\tvoid Init();\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\t\tvoid SetChildLayoutXML(CDuiString pXML);\n\t\tDuiLib::CDuiString GetChildLayoutXML();\n\t\tvirtual LPVOID GetInterface(LPCTSTR pstrName);\n\t\tvirtual LPCTSTR GetClass() const;\n\n\tprivate:\n\t\tDuiLib::CDuiString m_pstrXMLFile;\n\t};\n} // namespace DuiLib\n#endif // __UICHILDLAYOUT_H__\n"
  },
  {
    "path": "DuiLib/Layout/UIHorizontalLayout.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIHorizontalLayout.h\"\n\nnamespace DuiLib\n{\n\tCHorizontalLayoutUI::CHorizontalLayoutUI() : m_iSepWidth(0), m_uButtonState(0), m_bImmMode(false)\n\t{\n\t\tptLastMouse.x = ptLastMouse.y = 0;\n\t\t::ZeroMemory(&m_rcNewPos, sizeof(m_rcNewPos));\n\t}\n\n\tLPCTSTR CHorizontalLayoutUI::GetClass() const\n\t{\n\t\treturn _T(\"HorizontalLayoutUI\");\n\t}\n\n\tLPVOID CHorizontalLayoutUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_HORIZONTALLAYOUT) == 0 ) return static_cast<CHorizontalLayoutUI*>(this);\n\t\treturn CContainerUI::GetInterface(pstrName);\n\t}\n\n\tUINT CHorizontalLayoutUI::GetControlFlags() const\n\t{\n\t\tif( IsEnabled() && m_iSepWidth != 0 ) return UIFLAG_SETCURSOR;\n\t\telse return 0;\n\t}\n\n\tvoid CHorizontalLayoutUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\t\trc = m_rcItem;\n\n\t\t// Adjust for inset\n\t\trc.left += m_rcInset.left;\n\t\trc.top += m_rcInset.top;\n\t\trc.right -= m_rcInset.right;\n\t\trc.bottom -= m_rcInset.bottom;\n\n\t\tif( m_items.GetSize() == 0) {\n\t\t\tProcessScrollBar(rc, 0, 0);\n\t\t\treturn;\n\t\t}\n\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) rc.right -= m_pVerticalScrollBar->GetFixedWidth();\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) rc.bottom -= m_pHorizontalScrollBar->GetFixedHeight();\n\n\t\t// Determine the width of elements that are sizeable\n\t\tSIZE szAvailable = { rc.right - rc.left, rc.bottom - rc.top };\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) \n\t\t\tszAvailable.cx += m_pHorizontalScrollBar->GetScrollRange();\n\n\t\tint nAdjustables = 0;\n\t\tint cxFixed = 0;\n\t\tint nEstimateNum = 0;\n\t\tfor( int it1 = 0; it1 < m_items.GetSize(); it1++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it1]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) continue;\n\t\t\tSIZE sz = pControl->EstimateSize(szAvailable);\n\t\t\tif( sz.cx == 0 ) {\n\t\t\t\tnAdjustables++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( sz.cx < pControl->GetMinWidth() ) sz.cx = pControl->GetMinWidth();\n\t\t\t\tif( sz.cx > pControl->GetMaxWidth() ) sz.cx = pControl->GetMaxWidth();\n\t\t\t}\n\t\t\tcxFixed += sz.cx +  pControl->GetPadding().left + pControl->GetPadding().right;\n\t\t\tnEstimateNum++;\n\t\t}\n\t\tcxFixed += (nEstimateNum - 1) * m_iChildPadding;\n\n\t\tint cxExpand = 0;\n\t\tint cxNeeded = 0;\n\t\tif( nAdjustables > 0 ) cxExpand = MAX(0, (szAvailable.cx - cxFixed) / nAdjustables);\n\t\t// Position the elements\n\t\tSIZE szRemaining = szAvailable;\n\t\tint iPosX = rc.left;\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\tiPosX -= m_pHorizontalScrollBar->GetScrollPos();\n\t\t}\n\t\tint iAdjustable = 0;\n\t\tint cxFixedRemaining = cxFixed;\n\t\tfor( int it2 = 0; it2 < m_items.GetSize(); it2++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it2]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) {\n\t\t\t\tSetFloatPos(it2);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tRECT rcPadding = pControl->GetPadding();\n\t\t\tszRemaining.cx += rcPadding.left;\n\t\t\tSIZE sz = pControl->EstimateSize(szRemaining);\n\t\t\tif( sz.cx == 0 ) {\n\t\t\t\tiAdjustable++;\n\t\t\t\tsz.cx = cxExpand;\n\t\t\t\t// Distribute remaining to last element (usually round-off left-overs)\n\t\t\t\tif( iAdjustable == nAdjustables ) {\n\t\t\t\t\tsz.cx = MAX(0, szRemaining.cx - rcPadding.right - cxFixedRemaining);\n\t\t\t\t}\n\t\t\t\tif( sz.cx < pControl->GetMinWidth() ) sz.cx = pControl->GetMinWidth();\n\t\t\t\tif( sz.cx > pControl->GetMaxWidth() ) sz.cx = pControl->GetMaxWidth();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( sz.cx < pControl->GetMinWidth() ) sz.cx = pControl->GetMinWidth();\n\t\t\t\tif( sz.cx > pControl->GetMaxWidth() ) sz.cx = pControl->GetMaxWidth();\n\t\t\t\t // redrain bug1cxFixedRemainingֻȥ˱ֵĿؼĿȣûмȥpaddingԺchildpaddingռݵĿ  \n\t\t\t\tcxFixedRemaining -= sz.cx + rcPadding.left + rcPadding.right;\n\t\t\t}\n\n\t\t\tcxFixedRemaining -= m_iChildPadding;\n\n\t\t\tsz.cy = pControl->GetFixedHeight();\n\t\t\tif( sz.cy == 0 ) sz.cy = rc.bottom - rc.top - rcPadding.top - rcPadding.bottom;\n\t\t\tif( sz.cy < 0 ) sz.cy = 0;\n\t\t\tif( sz.cy < pControl->GetMinHeight() ) sz.cy = pControl->GetMinHeight();\n\t\t\tif( sz.cy > pControl->GetMaxHeight() ) sz.cy = pControl->GetMaxHeight();\n\t\t\t// redrain bug2ԿȵĴ㣬ӦürcPadding.rightֵ  \n\t\t\tRECT rcCtrl = { iPosX + rcPadding.left, rc.top + rcPadding.top, iPosX + sz.cx + rcPadding.left , rc.top + rcPadding.top + sz.cy};  \n\t\t\tpControl->SetPos(rcCtrl);\n\t\t\tiPosX += sz.cx + m_iChildPadding + rcPadding.left + rcPadding.right;\n\t\t\tcxNeeded += sz.cx + rcPadding.left + rcPadding.right;\n\t\t\tszRemaining.cx -= sz.cx + m_iChildPadding + rcPadding.right;\n\t\t}\n\t\tcxNeeded += (nEstimateNum - 1) * m_iChildPadding;\n\t\t//reddrain\n\t\tif( m_pHorizontalScrollBar != NULL ) {\n\t\t\tif( cxNeeded > rc.right - rc.left )\n\t\t\t{\n\t\t\t\tif( m_pHorizontalScrollBar->IsVisible() )\n\t\t\t\t{\n\t\t\t\t\tm_pHorizontalScrollBar->SetScrollRange(cxNeeded - (rc.right - rc.left));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tm_pHorizontalScrollBar->SetVisible(true);\n\t\t\t\t\tm_pHorizontalScrollBar->SetScrollRange(cxNeeded - (rc.right - rc.left));\n\t\t\t\t\tm_pHorizontalScrollBar->SetScrollPos(0);\n\t\t\t\t\trc.bottom -= m_pHorizontalScrollBar->GetFixedHeight();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( m_pHorizontalScrollBar->IsVisible() )\n\t\t\t\t{\n\t\t\t\t\tm_pHorizontalScrollBar->SetVisible(false);\n\t\t\t\t\tm_pHorizontalScrollBar->SetScrollRange(0);\n\t\t\t\t\tm_pHorizontalScrollBar->SetScrollPos(0);\n\t\t\t\t\trc.bottom += m_pHorizontalScrollBar->GetFixedHeight();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//redrain\n\t\t// Process the scrollbar\n\t\tProcessScrollBar(rc, cxNeeded, 0);\n\t}\n\n\tvoid CHorizontalLayoutUI::DoPostPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 && !m_bImmMode ) {\n\t\t\tRECT rcSeparator = GetThumbRect(true);\n\t\t\tCRenderEngine::DrawColor(hDC, rcSeparator, 0xAA000000);\n\t\t}\n\t}\n\n\tvoid CHorizontalLayoutUI::SetSepWidth(int iWidth)\n\t{\n\t\tm_iSepWidth = iWidth;\n\t}\n\n\tint CHorizontalLayoutUI::GetSepWidth() const\n\t{\n\t\treturn m_iSepWidth;\n\t}\n\n\tvoid CHorizontalLayoutUI::SetSepImmMode(bool bImmediately)\n\t{\n\t\tif( m_bImmMode == bImmediately ) return;\n\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 && !m_bImmMode && m_pManager != NULL ) {\n\t\t\tm_pManager->RemovePostPaint(this);\n\t\t}\n\n\t\tm_bImmMode = bImmediately;\n\t}\n\n\tbool CHorizontalLayoutUI::IsSepImmMode() const\n\t{\n\t\treturn m_bImmMode;\n\t}\n\n\tvoid CHorizontalLayoutUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"sepwidth\")) == 0 ) SetSepWidth(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"sepimm\")) == 0 ) SetSepImmMode(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse CContainerUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CHorizontalLayoutUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( m_iSepWidth != 0 ) {\n\t\t\tif( event.Type == UIEVENT_BUTTONDOWN && IsEnabled() )\n\t\t\t{\n\t\t\t\tRECT rcSeparator = GetThumbRect(false);\n\t\t\t\tif( ::PtInRect(&rcSeparator, event.ptMouse) ) {\n\t\t\t\t\tm_uButtonState |= UISTATE_CAPTURED;\n\t\t\t\t\tptLastMouse = event.ptMouse;\n\t\t\t\t\tm_rcNewPos = m_rcItem;\n\t\t\t\t\tif( !m_bImmMode && m_pManager ) m_pManager->AddPostPaint(this);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( event.Type == UIEVENT_BUTTONUP )\n\t\t\t{\n\t\t\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\t\tm_uButtonState &= ~UISTATE_CAPTURED;\n\t\t\t\t\tm_rcItem = m_rcNewPos;\n\t\t\t\t\tif( !m_bImmMode && m_pManager ) m_pManager->RemovePostPaint(this);\n\t\t\t\t\tNeedParentUpdate();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( event.Type == UIEVENT_MOUSEMOVE )\n\t\t\t{\n\t\t\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\t\tLONG cx = event.ptMouse.x - ptLastMouse.x;\n\t\t\t\t\tptLastMouse = event.ptMouse;\n\t\t\t\t\tRECT rc = m_rcNewPos;\n\t\t\t\t\tif( m_iSepWidth >= 0 ) {\n\t\t\t\t\t\tif( cx > 0 && event.ptMouse.x < m_rcNewPos.right - m_iSepWidth ) return;\n\t\t\t\t\t\tif( cx < 0 && event.ptMouse.x > m_rcNewPos.right ) return;\n\t\t\t\t\t\trc.right += cx;\n\t\t\t\t\t\tif( rc.right - rc.left <= GetMinWidth() ) {\n\t\t\t\t\t\t\tif( m_rcNewPos.right - m_rcNewPos.left <= GetMinWidth() ) return;\n\t\t\t\t\t\t\trc.right = rc.left + GetMinWidth();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( rc.right - rc.left >= GetMaxWidth() ) {\n\t\t\t\t\t\t\tif( m_rcNewPos.right - m_rcNewPos.left >= GetMaxWidth() ) return;\n\t\t\t\t\t\t\trc.right = rc.left + GetMaxWidth();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif( cx > 0 && event.ptMouse.x < m_rcNewPos.left ) return;\n\t\t\t\t\t\tif( cx < 0 && event.ptMouse.x > m_rcNewPos.left - m_iSepWidth ) return;\n\t\t\t\t\t\trc.left += cx;\n\t\t\t\t\t\tif( rc.right - rc.left <= GetMinWidth() ) {\n\t\t\t\t\t\t\tif( m_rcNewPos.right - m_rcNewPos.left <= GetMinWidth() ) return;\n\t\t\t\t\t\t\trc.left = rc.right - GetMinWidth();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( rc.right - rc.left >= GetMaxWidth() ) {\n\t\t\t\t\t\t\tif( m_rcNewPos.right - m_rcNewPos.left >= GetMaxWidth() ) return;\n\t\t\t\t\t\t\trc.left = rc.right - GetMaxWidth();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tCDuiRect rcInvalidate = GetThumbRect(true);\n\t\t\t\t\tm_rcNewPos = rc;\n\t\t\t\t\tm_cxyFixed.cx = m_rcNewPos.right - m_rcNewPos.left;\n\n\t\t\t\t\tif( m_bImmMode ) {\n\t\t\t\t\t\tm_rcItem = m_rcNewPos;\n\t\t\t\t\t\tNeedParentUpdate();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\trcInvalidate.Join(GetThumbRect(true));\n\t\t\t\t\t\trcInvalidate.Join(GetThumbRect(false));\n\t\t\t\t\t\tif( m_pManager ) m_pManager->Invalidate(rcInvalidate);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( event.Type == UIEVENT_SETCURSOR )\n\t\t\t{\n\t\t\t\tRECT rcSeparator = GetThumbRect(false);\n\t\t\t\tif( IsEnabled() && ::PtInRect(&rcSeparator, event.ptMouse) ) {\n\t\t\t\t\t::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_SIZEWE)));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCContainerUI::DoEvent(event);\n\t}\n\n\tRECT CHorizontalLayoutUI::GetThumbRect(bool bUseNew) const\n\t{\n\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 && bUseNew) {\n\t\t\tif( m_iSepWidth >= 0 ) return CDuiRect(m_rcNewPos.right - m_iSepWidth, m_rcNewPos.top, m_rcNewPos.right, m_rcNewPos.bottom);\n\t\t\telse return CDuiRect(m_rcNewPos.left, m_rcNewPos.top, m_rcNewPos.left - m_iSepWidth, m_rcNewPos.bottom);\n\t\t}\n\t\telse {\n\t\t\tif( m_iSepWidth >= 0 ) return CDuiRect(m_rcItem.right - m_iSepWidth, m_rcItem.top, m_rcItem.right, m_rcItem.bottom);\n\t\t\telse return CDuiRect(m_rcItem.left, m_rcItem.top, m_rcItem.left - m_iSepWidth, m_rcItem.bottom);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Layout/UIHorizontalLayout.h",
    "content": "#ifndef __UIHORIZONTALLAYOUT_H__\n#define __UIHORIZONTALLAYOUT_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass UILIB_API CHorizontalLayoutUI : public CContainerUI\n\t{\n\tpublic:\n\t\tCHorizontalLayoutUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\t\tUINT GetControlFlags() const;\n\n\t\tvoid SetSepWidth(int iWidth);\n\t\tint GetSepWidth() const;\n\t\tvoid SetSepImmMode(bool bImmediately);\n\t\tbool IsSepImmMode() const;\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\t\tvoid DoEvent(TEventUI& event);\n\n\t\tvoid SetPos(RECT rc);\n\t\tvoid DoPostPaint(HDC hDC, const RECT& rcPaint);\n\n\t\tRECT GetThumbRect(bool bUseNew = false) const;\n\n\tprotected:\n\t\tint m_iSepWidth;\n\t\tUINT m_uButtonState;\n\t\tPOINT ptLastMouse;\n\t\tRECT m_rcNewPos;\n\t\tbool m_bImmMode;\n\t};\n}\n#endif // __UIHORIZONTALLAYOUT_H__\n"
  },
  {
    "path": "DuiLib/Layout/UITabLayout.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UITabLayout.h\"\n\nnamespace DuiLib\n{\n\tCTabLayoutUI::CTabLayoutUI() : m_iCurSel(-1)\n\t{\n\t}\n\n\tLPCTSTR CTabLayoutUI::GetClass() const\n\t{\n\t\treturn _T(\"TabLayoutUI\");\n\t}\n\n\tLPVOID CTabLayoutUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_TABLAYOUT) == 0 ) return static_cast<CTabLayoutUI*>(this);\n\t\treturn CContainerUI::GetInterface(pstrName);\n\t}\n\n\tbool CTabLayoutUI::Add(CControlUI* pControl)\n\t{\n\t\tbool ret = CContainerUI::Add(pControl);\n\t\tif( !ret ) return ret;\n\n\t\tif(m_iCurSel == -1 && pControl->IsVisible())\n\t\t{\n\t\t\tm_iCurSel = GetItemIndex(pControl);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpControl->SetVisible(false);\n\t\t}\n\n\t\treturn ret;\n\t}\n\n\tbool CTabLayoutUI::AddAt(CControlUI* pControl, int iIndex)\n\t{\n\t\tbool ret = CContainerUI::AddAt(pControl, iIndex);\n\t\tif( !ret ) return ret;\n\n\t\tif(m_iCurSel == -1 && pControl->IsVisible())\n\t\t{\n\t\t\tm_iCurSel = GetItemIndex(pControl);\n\t\t}\n\t\telse if( m_iCurSel != -1 && iIndex <= m_iCurSel )\n\t\t{\n\t\t\tm_iCurSel += 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpControl->SetVisible(false);\n\t\t}\n\n\t\treturn ret;\n\t}\n\n\tbool CTabLayoutUI::Remove(CControlUI* pControl)\n\t{\n\t\tif( pControl == NULL) return false;\n\n\t\tint index = GetItemIndex(pControl);\n\t\tbool ret = CContainerUI::Remove(pControl);\n\t\tif( !ret ) return false;\n\n\t\tif( m_iCurSel == index)\n\t\t{\n\t\t\tif( GetCount() > 0 )\n\t\t\t{\n\t\t\t\tm_iCurSel=0;\n\t\t\t\tGetItemAt(m_iCurSel)->SetVisible(true);\n\t\t\t}\n\t\t\telse\n\t\t\t\tm_iCurSel=-1;\n\t\t\tNeedParentUpdate();\n\t\t}\n\t\telse if( m_iCurSel > index )\n\t\t{\n\t\t\tm_iCurSel -= 1;\n\t\t}\n\n\t\treturn ret;\n\t}\n\n\tvoid CTabLayoutUI::RemoveAll()\n\t{\n\t\tm_iCurSel = -1;\n\t\tCContainerUI::RemoveAll();\n\t\tNeedParentUpdate();\n\t}\n\n\tint CTabLayoutUI::GetCurSel() const\n\t{\n\t\treturn m_iCurSel;\n\t}\n\n\tbool CTabLayoutUI::SelectItem(int iIndex)\n\t{\n\t\tif( iIndex < 0 || iIndex >= m_items.GetSize() ) return false;\n\t\tif( iIndex == m_iCurSel ) return true;\n\n\t\tint iOldSel = m_iCurSel;\n\t\tm_iCurSel = iIndex;\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ )\n\t\t{\n\t\t\tif( it == iIndex ) {\n\t\t\t\tGetItemAt(it)->SetVisible(true);\n\t\t\t\tGetItemAt(it)->SetFocus();\n\t\t\t\tSetPos(m_rcItem);\n\t\t\t}\n\t\t\telse GetItemAt(it)->SetVisible(false);\n\t\t}\n\t\tNeedParentUpdate();\n\n\t\tif( m_pManager != NULL ) {\n\t\t\tm_pManager->SetNextTabControl();\n\t\t\tm_pManager->SendNotify(this, DUI_MSGTYPE_TABSELECT, m_iCurSel, iOldSel);\n\t\t}\n\t\treturn true;\n\t}\n\n\tbool CTabLayoutUI::SelectItem( CControlUI* pControl )\n\t{\n\t\tint iIndex=GetItemIndex(pControl);\n\t\tif (iIndex==-1)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn SelectItem(iIndex);\n\t}\n\n\tvoid CTabLayoutUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\n\t\tif( _tcscmp(pstrName, _T(\"selectedid\")) == 0 ) \n\t\t{\n\t\t\tSelectItem(_ttoi(pstrValue));\n\t\t\treturn;//scenic עӦѡǸǩûҪٴס\n\t\t}\n\n\t\treturn CContainerUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CTabLayoutUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\t\trc = m_rcItem;\n\n\t\t// Adjust for inset\n\t\trc.left += m_rcInset.left;\n\t\trc.top += m_rcInset.top;\n\t\trc.right -= m_rcInset.right;\n\t\trc.bottom -= m_rcInset.bottom;\n\n\t\tfor( int it = 0; it < m_items.GetSize(); it++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) {\n\t\t\t\tSetFloatPos(it);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif( it != m_iCurSel ) continue;\n\n\t\t\tRECT rcPadding = pControl->GetPadding();\n\t\t\trc.left += rcPadding.left;\n\t\t\trc.top += rcPadding.top;\n\t\t\trc.right -= rcPadding.right;\n\t\t\trc.bottom -= rcPadding.bottom;\n\n\t\t\tSIZE szAvailable = { rc.right - rc.left, rc.bottom - rc.top };\n\n\t\t\tSIZE sz = pControl->EstimateSize(szAvailable);\n\t\t\tif( sz.cx == 0 ) {\n\t\t\t\tsz.cx = MAX(0, szAvailable.cx);\n\t\t\t}\n\t\t\tif( sz.cx < pControl->GetMinWidth() ) sz.cx = pControl->GetMinWidth();\n\t\t\tif( sz.cx > pControl->GetMaxWidth() ) sz.cx = pControl->GetMaxWidth();\n\n\t\t\tif(sz.cy == 0) {\n\t\t\t\tsz.cy = MAX(0, szAvailable.cy);\n\t\t\t}\n\t\t\tif( sz.cy < pControl->GetMinHeight() ) sz.cy = pControl->GetMinHeight();\n\t\t\tif( sz.cy > pControl->GetMaxHeight() ) sz.cy = pControl->GetMaxHeight();\n\n\t\t\tRECT rcCtrl = { rc.left, rc.top, rc.left + sz.cx, rc.top + sz.cy};\n\t\t\tpControl->SetPos(rcCtrl);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Layout/UITabLayout.h",
    "content": "#ifndef __UITABLAYOUT_H__\n#define __UITABLAYOUT_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass UILIB_API CTabLayoutUI : public CContainerUI\n\t{\n\tpublic:\n\t\tCTabLayoutUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tbool Add(CControlUI* pControl);\n\t\tbool AddAt(CControlUI* pControl, int iIndex);\n\t\tbool Remove(CControlUI* pControl);\n\t\tvoid RemoveAll();\n\t\tint GetCurSel() const;\n\t\tbool SelectItem(int iIndex);\n\t\tbool SelectItem(CControlUI* pControl);\n\n\t\tvoid SetPos(RECT rc);\n\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\tprotected:\n\t\tint m_iCurSel;\n\t};\n}\n#endif // __UITABLAYOUT_H__\n"
  },
  {
    "path": "DuiLib/Layout/UITileLayout.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UITileLayout.h\"\n\nnamespace DuiLib\n{\n\tCTileLayoutUI::CTileLayoutUI() : m_nColumns(1)\n\t{\n\t\tm_szItem.cx = m_szItem.cy = 0;\n\t}\n\n\tLPCTSTR CTileLayoutUI::GetClass() const\n\t{\n\t\treturn _T(\"TileLayoutUI\");\n\t}\n\n\tLPVOID CTileLayoutUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_TILELAYOUT) == 0 ) return static_cast<CTileLayoutUI*>(this);\n\t\treturn CContainerUI::GetInterface(pstrName);\n\t}\n\n\tSIZE CTileLayoutUI::GetItemSize() const\n\t{\n\t\treturn m_szItem;\n\t}\n\n\tvoid CTileLayoutUI::SetItemSize(SIZE szItem)\n\t{\n\t\tif( m_szItem.cx != szItem.cx || m_szItem.cy != szItem.cy ) {\n\t\t\tm_szItem = szItem;\n\t\t\tNeedUpdate();\n\t\t}\n\t}\n\n\tint CTileLayoutUI::GetColumns() const\n\t{\n\t\treturn m_nColumns;\n\t}\n\n\tvoid CTileLayoutUI::SetColumns(int nCols)\n\t{\n\t\tif( nCols <= 0 ) return;\n\t\tm_nColumns = nCols;\n\t\tNeedUpdate();\n\t}\n\n\tvoid CTileLayoutUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"itemsize\")) == 0 ) {\n\t\t\tSIZE szItem = { 0 };\n\t\t\tLPTSTR pstr = NULL;\n\t\t\tszItem.cx = _tcstol(pstrValue, &pstr, 10);  ASSERT(pstr);    \n\t\t\tszItem.cy = _tcstol(pstr + 1, &pstr, 10);   ASSERT(pstr);     \n\t\t\tSetItemSize(szItem);\n\t\t}\n\t\telse if( _tcscmp(pstrName, _T(\"columns\")) == 0 ) SetColumns(_ttoi(pstrValue));\n\t\telse CContainerUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CTileLayoutUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\t\trc = m_rcItem;\n\n\t\t// Adjust for inset\n\t\trc.left += m_rcInset.left;\n\t\trc.top += m_rcInset.top;\n\t\trc.right -= m_rcInset.right;\n\t\trc.bottom -= m_rcInset.bottom;\n\n\t\tif( m_items.GetSize() == 0) {\n\t\t\tProcessScrollBar(rc, 0, 0);\n\t\t\treturn;\n\t\t}\n\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) rc.right -= m_pVerticalScrollBar->GetFixedWidth();\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) rc.bottom -= m_pHorizontalScrollBar->GetFixedHeight();\n\n\t\t// Position the elements\n\t\tif( m_szItem.cx > 0 ) m_nColumns = (rc.right - rc.left) / m_szItem.cx;\n\t\tif( m_nColumns == 0 ) m_nColumns = 1;\n\n\t\tint cyNeeded = 0;\n\t\tint cxWidth = (rc.right - rc.left) / m_nColumns;\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) \n\t\t\tcxWidth = (rc.right - rc.left + m_pHorizontalScrollBar->GetScrollRange() ) / m_nColumns; ;\n\n\t\tint cyHeight = 0;\n\t\tint iCount = 0;\n\t\tPOINT ptTile = { rc.left, rc.top };\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) {\n\t\t\tptTile.y -= m_pVerticalScrollBar->GetScrollPos();\n\t\t}\n\t\tint iPosX = rc.left;\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\tiPosX -= m_pHorizontalScrollBar->GetScrollPos();\n\t\t\tptTile.x = iPosX;\n\t\t}\n\t\tfor( int it1 = 0; it1 < m_items.GetSize(); it1++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it1]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) {\n\t\t\t\tSetFloatPos(it1);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Determine size\n\t\t\tRECT rcTile = { ptTile.x, ptTile.y, ptTile.x + cxWidth, ptTile.y };\n\t\t\tif( (iCount % m_nColumns) == 0 )\n\t\t\t{\n\t\t\t\tint iIndex = iCount;\n\t\t\t\tfor( int it2 = it1; it2 < m_items.GetSize(); it2++ ) {\n\t\t\t\t\tCControlUI* pLineControl = static_cast<CControlUI*>(m_items[it2]);\n\t\t\t\t\tif( !pLineControl->IsVisible() ) continue;\n\t\t\t\t\tif( pLineControl->IsFloat() ) continue;\n\n\t\t\t\t\tRECT rcPadding = pLineControl->GetPadding();\n\t\t\t\t\tSIZE szAvailable = { rcTile.right - rcTile.left - rcPadding.left - rcPadding.right, 9999 };\n\t\t\t\t\tif( iIndex == iCount || (iIndex + 1) % m_nColumns == 0 ) {\n\t\t\t\t\t\tszAvailable.cx -= m_iChildPadding / 2;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tszAvailable.cx -= m_iChildPadding;\n\t\t\t\t\t}\n\n\t\t\t\t\tif( szAvailable.cx < pControl->GetMinWidth() ) szAvailable.cx = pControl->GetMinWidth();\n\t\t\t\t\tif( szAvailable.cx > pControl->GetMaxWidth() ) szAvailable.cx = pControl->GetMaxWidth();\n\n\t\t\t\t\tSIZE szTile = pLineControl->EstimateSize(szAvailable);\n\t\t\t\t\tif( szTile.cx < pControl->GetMinWidth() ) szTile.cx = pControl->GetMinWidth();\n\t\t\t\t\tif( szTile.cx > pControl->GetMaxWidth() ) szTile.cx = pControl->GetMaxWidth();\n\t\t\t\t\tif( szTile.cy < pControl->GetMinHeight() ) szTile.cy = pControl->GetMinHeight();\n\t\t\t\t\tif( szTile.cy > pControl->GetMaxHeight() ) szTile.cy = pControl->GetMaxHeight();\n\n\t\t\t\t\tcyHeight = MAX(cyHeight, szTile.cy + rcPadding.top + rcPadding.bottom);\n\t\t\t\t\tif( (++iIndex % m_nColumns) == 0) break;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tRECT rcPadding = pControl->GetPadding();\n\n\t\t\trcTile.left += rcPadding.left + m_iChildPadding / 2;\n\t\t\trcTile.right -= rcPadding.right + m_iChildPadding / 2;\n\t\t\tif( (iCount % m_nColumns) == 0 ) {\n\t\t\t\trcTile.left -= m_iChildPadding / 2;\n\t\t\t}\n\n\t\t\tif( ( (iCount + 1) % m_nColumns) == 0 ) {\n\t\t\t\trcTile.right += m_iChildPadding / 2;\n\t\t\t}\n\n\t\t\t// Set position\n\t\t\trcTile.top = ptTile.y + rcPadding.top;\n\t\t\trcTile.bottom = ptTile.y + cyHeight;\n\n\t\t\tSIZE szAvailable = { rcTile.right - rcTile.left, rcTile.bottom - rcTile.top };\n\t\t\tSIZE szTile = pControl->EstimateSize(szAvailable);\n\t\t\tif( szTile.cx == 0 ) szTile.cx = szAvailable.cx;\n\t\t\tif( szTile.cy == 0 ) szTile.cy = szAvailable.cy;\n\t\t\tif( szTile.cx < pControl->GetMinWidth() ) szTile.cx = pControl->GetMinWidth();\n\t\t\tif( szTile.cx > pControl->GetMaxWidth() ) szTile.cx = pControl->GetMaxWidth();\n\t\t\tif( szTile.cy < pControl->GetMinHeight() ) szTile.cy = pControl->GetMinHeight();\n\t\t\tif( szTile.cy > pControl->GetMaxHeight() ) szTile.cy = pControl->GetMaxHeight();\n\t\t\tRECT rcPos = {(rcTile.left + rcTile.right - szTile.cx) / 2, (rcTile.top + rcTile.bottom - szTile.cy) / 2,\n\t\t\t\t(rcTile.left + rcTile.right - szTile.cx) / 2 + szTile.cx, (rcTile.top + rcTile.bottom - szTile.cy) / 2 + szTile.cy};\n\t\t\tpControl->SetPos(rcPos);\n\n\t\t\tif( (++iCount % m_nColumns) == 0 ) {\n\t\t\t\tptTile.x = iPosX;\n\t\t\t\tptTile.y += cyHeight + m_iChildPadding;\n\t\t\t\tcyHeight = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tptTile.x += cxWidth;\n\t\t\t}\n\t\t\tcyNeeded = rcTile.bottom - rc.top;\n\t\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) cyNeeded += m_pVerticalScrollBar->GetScrollPos();\n\t\t}\n\n\t\t// Process the scrollbar\n\t\tProcessScrollBar(rc, 0, cyNeeded);\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Layout/UITileLayout.h",
    "content": "#ifndef __UITILELAYOUT_H__\n#define __UITILELAYOUT_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass UILIB_API CTileLayoutUI : public CContainerUI\n\t{\n\tpublic:\n\t\tCTileLayoutUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\n\t\tvoid SetPos(RECT rc);\n\n\t\tSIZE GetItemSize() const;\n\t\tvoid SetItemSize(SIZE szItem);\n\t\tint GetColumns() const;\n\t\tvoid SetColumns(int nCols);\n\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\n\tprotected:\n\t\tSIZE m_szItem;\n\t\tint m_nColumns;\n\t};\n}\n#endif // __UITILELAYOUT_H__\n"
  },
  {
    "path": "DuiLib/Layout/UIVerticalLayout.cpp",
    "content": "#include \"stdafx.h\"\n#include \"UIVerticalLayout.h\"\n\nnamespace DuiLib\n{\n\tCVerticalLayoutUI::CVerticalLayoutUI() : m_iSepHeight(0), m_uButtonState(0), m_bImmMode(false)\n\t{\n\t\tptLastMouse.x = ptLastMouse.y = 0;\n\t\t::ZeroMemory(&m_rcNewPos, sizeof(m_rcNewPos));\n\t}\n\n\tLPCTSTR CVerticalLayoutUI::GetClass() const\n\t{\n\t\treturn _T(\"VerticalLayoutUI\");\n\t}\n\n\tLPVOID CVerticalLayoutUI::GetInterface(LPCTSTR pstrName)\n\t{\n\t\tif( _tcscmp(pstrName, DUI_CTR_VERTICALLAYOUT) == 0 ) return static_cast<CVerticalLayoutUI*>(this);\n\t\treturn CContainerUI::GetInterface(pstrName);\n\t}\n\n\tUINT CVerticalLayoutUI::GetControlFlags() const\n\t{\n\t\tif( IsEnabled() && m_iSepHeight != 0 ) return UIFLAG_SETCURSOR;\n\t\telse return 0;\n\t}\n\n\tvoid CVerticalLayoutUI::SetPos(RECT rc)\n\t{\n\t\tCControlUI::SetPos(rc);\n\t\trc = m_rcItem;\n\n\t\t// Adjust for inset\n\t\trc.left += m_rcInset.left;\n\t\trc.top += m_rcInset.top;\n\t\trc.right -= m_rcInset.right;\n\t\trc.bottom -= m_rcInset.bottom;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) rc.right -= m_pVerticalScrollBar->GetFixedWidth();\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) rc.bottom -= m_pHorizontalScrollBar->GetFixedHeight();\n\n\t\tif( m_items.GetSize() == 0) {\n\t\t\tProcessScrollBar(rc, 0, 0);\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine the minimum size\n\t\tSIZE szAvailable = { rc.right - rc.left, rc.bottom - rc.top };\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) \n\t\t\tszAvailable.cx += m_pHorizontalScrollBar->GetScrollRange();\n\n\t\tint nAdjustables = 0;\n\t\tint cyFixed = 0;\n\t\tint nEstimateNum = 0;\n\t\tfor( int it1 = 0; it1 < m_items.GetSize(); it1++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it1]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) continue;\n\t\t\tSIZE sz = pControl->EstimateSize(szAvailable);\n\t\t\tif( sz.cy == 0 ) {\n\t\t\t\tnAdjustables++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( sz.cy < pControl->GetMinHeight() ) sz.cy = pControl->GetMinHeight();\n\t\t\t\tif( sz.cy > pControl->GetMaxHeight() ) sz.cy = pControl->GetMaxHeight();\n\t\t\t}\n\t\t\tcyFixed += sz.cy + pControl->GetPadding().top + pControl->GetPadding().bottom;\n\t\t\tnEstimateNum++;\n\t\t}\n\t\tcyFixed += (nEstimateNum - 1) * m_iChildPadding;\n\n\t\t// Place elements\n\t\tint cyNeeded = 0;\n\t\tint cyExpand = 0;\n\t\tif( nAdjustables > 0 ) cyExpand = MAX(0, (szAvailable.cy - cyFixed) / nAdjustables);\n\t\t// Position the elements\n\t\tSIZE szRemaining = szAvailable;\n\t\tint iPosY = rc.top;\n\t\tif( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible() ) {\n\t\t\tiPosY -= m_pVerticalScrollBar->GetScrollPos();\n\t\t}\n\t\tint iPosX = rc.left;\n\t\tif( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible() ) {\n\t\t\tiPosX -= m_pHorizontalScrollBar->GetScrollPos();\n\t\t}\n\t\tint iAdjustable = 0;\n\t\tint cyFixedRemaining = cyFixed;\n\t\tfor( int it2 = 0; it2 < m_items.GetSize(); it2++ ) {\n\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_items[it2]);\n\t\t\tif( !pControl->IsVisible() ) continue;\n\t\t\tif( pControl->IsFloat() ) {\n\t\t\t\tSetFloatPos(it2);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tRECT rcPadding = pControl->GetPadding();\n\t\t\tszRemaining.cy -= rcPadding.top;\n\t\t\tSIZE sz = pControl->EstimateSize(szRemaining);\n\t\t\tif( sz.cy == 0 ) {\n\t\t\t\tiAdjustable++;\n\t\t\t\tsz.cy = cyExpand;\n\t\t\t\t// Distribute remaining to last element (usually round-off left-overs)\n\t\t\t\tif( iAdjustable == nAdjustables ) {\n\t\t\t\t\t//////////////////////////////////////////////////////////////////////////\n\t\t\t\t\t///corrected by gechunping  on 2014_3_27\n\t\t\t\t\t///deleted origin /// sz.cy = MAX(0, szRemaining.cy - rcPadding.bottom - cyFixedRemaining);\n\t\t\t\t\t///corrected by gechunping  on 2014_3_27\n\t\t\t\t\t//////////////////////////////////////////////////////////////////////////\n\t\t\t\t} \n\t\t\t\tif( sz.cy < pControl->GetMinHeight() ) sz.cy = pControl->GetMinHeight();\n\t\t\t\tif( sz.cy > pControl->GetMaxHeight() ) sz.cy = pControl->GetMaxHeight();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( sz.cy < pControl->GetMinHeight() ) sz.cy = pControl->GetMinHeight();\n\t\t\t\tif( sz.cy > pControl->GetMaxHeight() ) sz.cy = pControl->GetMaxHeight();\n\t\t\t\tcyFixedRemaining -= sz.cy + rcPadding.top + rcPadding.bottom;\n\t\t\t}\n\n\t\t\tcyFixedRemaining -= m_iChildPadding;\n\n\t\t\tsz.cx = pControl->GetFixedWidth();\n\t\t\tif( sz.cx == 0 ) sz.cx = szAvailable.cx - rcPadding.left - rcPadding.right;\n\t\t\tif( sz.cx < 0 ) sz.cx = 0;\n\t\t\tif( sz.cx < pControl->GetMinWidth() ) sz.cx = pControl->GetMinWidth();\n\t\t\tif( sz.cx > pControl->GetMaxWidth() ) sz.cx = pControl->GetMaxWidth();\n\n\n\t\t\t//////////////////////////////////////////////////////////////////////////\n\t\t\t///corrected by gechunping  on 2014_3_27\n\t\t\t///origin///  RECT rcCtrl = { iPosX + rcPadding.left, iPosY + rcPadding.top, iPosX + rcPadding.left + sz.cx, iPosY + sz.cy + rcPadding.top + rcPadding.bottom };\n\t\t//err\tRECT rcCtrl = { iPosX + rcPadding.left, iPosY + rcPadding.top, iPosX + rcPadding.left + sz.cx, iPosY + sz.cy +  rcPadding.bottom };\n\t\t\tRECT rcCtrl = { iPosX + rcPadding.left, iPosY + rcPadding.top, iPosX + rcPadding.left + sz.cx, iPosY + sz.cy + rcPadding.top }; \n\t\t\t///corrected by gechunping  on 2014_3_27\n\t\t\t//////////////////////////////////////////////////////////////////////////\n\t\t\tpControl->SetPos(rcCtrl);\n\n\t\t\tiPosY += sz.cy + m_iChildPadding + rcPadding.top + rcPadding.bottom;\n\t\t\tcyNeeded += sz.cy + rcPadding.top + rcPadding.bottom;\n\t\t\tszRemaining.cy -= sz.cy + m_iChildPadding + rcPadding.bottom;\n\t\t}\n\t\tcyNeeded += (nEstimateNum - 1) * m_iChildPadding;\n\n\t\t// Process the scrollbar\n\t\tProcessScrollBar(rc, 0, cyNeeded);\n\t}\n\n\tvoid CVerticalLayoutUI::DoPostPaint(HDC hDC, const RECT& rcPaint)\n\t{\n\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 && !m_bImmMode ) {\n\t\t\tRECT rcSeparator = GetThumbRect(true);\n\t\t\tCRenderEngine::DrawColor(hDC, rcSeparator, 0xAA000000);\n\t\t}\n\t}\n\n\tvoid CVerticalLayoutUI::SetSepHeight(int iHeight)\n\t{\n\t\tm_iSepHeight = iHeight;\n\t}\n\n\tint CVerticalLayoutUI::GetSepHeight() const\n\t{\n\t\treturn m_iSepHeight;\n\t}\n\n\tvoid CVerticalLayoutUI::SetSepImmMode(bool bImmediately)\n\t{\n\t\tif( m_bImmMode == bImmediately ) return;\n\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 && !m_bImmMode && m_pManager != NULL ) {\n\t\t\tm_pManager->RemovePostPaint(this);\n\t\t}\n\n\t\tm_bImmMode = bImmediately;\n\t}\n\n\tbool CVerticalLayoutUI::IsSepImmMode() const\n\t{\n\t\treturn m_bImmMode;\n\t}\n\n\tvoid CVerticalLayoutUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)\n\t{\n\t\tif( _tcscmp(pstrName, _T(\"sepheight\")) == 0 ) SetSepHeight(_ttoi(pstrValue));\n\t\telse if( _tcscmp(pstrName, _T(\"sepimm\")) == 0 ) SetSepImmMode(_tcscmp(pstrValue, _T(\"true\")) == 0);\n\t\telse CContainerUI::SetAttribute(pstrName, pstrValue);\n\t}\n\n\tvoid CVerticalLayoutUI::DoEvent(TEventUI& event)\n\t{\n\t\tif( m_iSepHeight != 0 ) {\n\t\t\tif( event.Type == UIEVENT_BUTTONDOWN && IsEnabled() )\n\t\t\t{\n\t\t\t\tRECT rcSeparator = GetThumbRect(false);\n\t\t\t\tif( ::PtInRect(&rcSeparator, event.ptMouse) ) {\n\t\t\t\t\tm_uButtonState |= UISTATE_CAPTURED;\n\t\t\t\t\tptLastMouse = event.ptMouse;\n\t\t\t\t\tm_rcNewPos = m_rcItem;\n\t\t\t\t\tif( !m_bImmMode && m_pManager ) m_pManager->AddPostPaint(this);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( event.Type == UIEVENT_BUTTONUP )\n\t\t\t{\n\t\t\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\t\tm_uButtonState &= ~UISTATE_CAPTURED;\n\t\t\t\t\tm_rcItem = m_rcNewPos;\n\t\t\t\t\tif( !m_bImmMode && m_pManager ) m_pManager->RemovePostPaint(this);\n\t\t\t\t\tNeedParentUpdate();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( event.Type == UIEVENT_MOUSEMOVE )\n\t\t\t{\n\t\t\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {\n\t\t\t\t\tLONG cy = event.ptMouse.y - ptLastMouse.y;\n\t\t\t\t\tptLastMouse = event.ptMouse;\n\t\t\t\t\tRECT rc = m_rcNewPos;\n\t\t\t\t\tif( m_iSepHeight >= 0 ) {\n\t\t\t\t\t\tif( cy > 0 && event.ptMouse.y < m_rcNewPos.bottom + m_iSepHeight ) return;\n\t\t\t\t\t\tif( cy < 0 && event.ptMouse.y > m_rcNewPos.bottom ) return;\n\t\t\t\t\t\trc.bottom += cy;\n\t\t\t\t\t\tif( rc.bottom - rc.top <= GetMinHeight() ) {\n\t\t\t\t\t\t\tif( m_rcNewPos.bottom - m_rcNewPos.top <= GetMinHeight() ) return;\n\t\t\t\t\t\t\trc.bottom = rc.top + GetMinHeight();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( rc.bottom - rc.top >= GetMaxHeight() ) {\n\t\t\t\t\t\t\tif( m_rcNewPos.bottom - m_rcNewPos.top >= GetMaxHeight() ) return;\n\t\t\t\t\t\t\trc.bottom = rc.top + GetMaxHeight();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif( cy > 0 && event.ptMouse.y < m_rcNewPos.top ) return;\n\t\t\t\t\t\tif( cy < 0 && event.ptMouse.y > m_rcNewPos.top + m_iSepHeight ) return;\n\t\t\t\t\t\trc.top += cy;\n\t\t\t\t\t\tif( rc.bottom - rc.top <= GetMinHeight() ) {\n\t\t\t\t\t\t\tif( m_rcNewPos.bottom - m_rcNewPos.top <= GetMinHeight() ) return;\n\t\t\t\t\t\t\trc.top = rc.bottom - GetMinHeight();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( rc.bottom - rc.top >= GetMaxHeight() ) {\n\t\t\t\t\t\t\tif( m_rcNewPos.bottom - m_rcNewPos.top >= GetMaxHeight() ) return;\n\t\t\t\t\t\t\trc.top = rc.bottom - GetMaxHeight();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tCDuiRect rcInvalidate = GetThumbRect(true);\n\t\t\t\t\tm_rcNewPos = rc;\n\t\t\t\t\tm_cxyFixed.cy = m_rcNewPos.bottom - m_rcNewPos.top;\n\n\t\t\t\t\tif( m_bImmMode ) {\n\t\t\t\t\t\tm_rcItem = m_rcNewPos;\n\t\t\t\t\t\tNeedParentUpdate();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\trcInvalidate.Join(GetThumbRect(true));\n\t\t\t\t\t\trcInvalidate.Join(GetThumbRect(false));\n\t\t\t\t\t\tif( m_pManager ) m_pManager->Invalidate(rcInvalidate);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( event.Type == UIEVENT_SETCURSOR )\n\t\t\t{\n\t\t\t\tRECT rcSeparator = GetThumbRect(false);\n\t\t\t\tif( IsEnabled() && ::PtInRect(&rcSeparator, event.ptMouse) ) {\n\t\t\t\t\t::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_SIZENS)));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCContainerUI::DoEvent(event);\n\t}\n\n\tRECT CVerticalLayoutUI::GetThumbRect(bool bUseNew) const\n\t{\n\t\tif( (m_uButtonState & UISTATE_CAPTURED) != 0 && bUseNew) {\n\t\t\tif( m_iSepHeight >= 0 ) \n\t\t\t\treturn CDuiRect(m_rcNewPos.left, MAX(m_rcNewPos.bottom - m_iSepHeight, m_rcNewPos.top), \n\t\t\t\tm_rcNewPos.right, m_rcNewPos.bottom);\n\t\t\telse \n\t\t\t\treturn CDuiRect(m_rcNewPos.left, m_rcNewPos.top, m_rcNewPos.right, \n\t\t\t\tMIN(m_rcNewPos.top - m_iSepHeight, m_rcNewPos.bottom));\n\t\t}\n\t\telse {\n\t\t\tif( m_iSepHeight >= 0 ) \n\t\t\t\treturn CDuiRect(m_rcItem.left, MAX(m_rcItem.bottom - m_iSepHeight, m_rcItem.top), m_rcItem.right, \n\t\t\t\tm_rcItem.bottom);\n\t\t\telse \n\t\t\t\treturn CDuiRect(m_rcItem.left, m_rcItem.top, m_rcItem.right, \n\t\t\t\tMIN(m_rcItem.top - m_iSepHeight, m_rcItem.bottom));\n\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "DuiLib/Layout/UIVerticalLayout.h",
    "content": "#ifndef __UIVERTICALLAYOUT_H__\n#define __UIVERTICALLAYOUT_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\tclass UILIB_API CVerticalLayoutUI : public CContainerUI\n\t{\n\tpublic:\n\t\tCVerticalLayoutUI();\n\n\t\tLPCTSTR GetClass() const;\n\t\tLPVOID GetInterface(LPCTSTR pstrName);\n\t\tUINT GetControlFlags() const;\n\n\t\tvoid SetSepHeight(int iHeight);\n\t\tint GetSepHeight() const;\n\t\tvoid SetSepImmMode(bool bImmediately);\n\t\tbool IsSepImmMode() const;\n\t\tvoid SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);\n\t\tvoid DoEvent(TEventUI& event);\n\n\t\tvoid SetPos(RECT rc);\n\t\tvoid DoPostPaint(HDC hDC, const RECT& rcPaint);\n\n\t\tRECT GetThumbRect(bool bUseNew = false) const;\n\n\tprotected:\n\t\tint m_iSepHeight;\n\t\tUINT m_uButtonState;\n\t\tPOINT ptLastMouse;\n\t\tRECT m_rcNewPos;\n\t\tbool m_bImmMode;\n\t};\n}\n#endif // __UIVERTICALLAYOUT_H__\n"
  },
  {
    "path": "DuiLib/StdAfx.cpp",
    "content": "// stdafx.cpp : source file that includes just the standard includes\n//\tUIlib.pch will be the pre-compiled header\n//\tstdafx.obj will contain the pre-compiled type information\n\n#include \"StdAfx.h\"\n\n\n#pragma comment( lib, \"winmm.lib\" )\n#pragma comment( lib, \"comctl32.lib\" )\n"
  },
  {
    "path": "DuiLib/StdAfx.h",
    "content": "// stdafx.h : include file for standard system include files,\n//  or project specific include files that are used frequently, but\n//      are changed infrequently\n//\n\n\n// Required for VS 2008 (fails on XP and Win2000 without this fix)\n#include <SDKDDKVer.h>\n#ifndef _WIN32_WINNT\n#define _WIN32_WINNT 0x0500 \n#endif\n\n#if !defined(AFX_STDAFX_H__E30B2003_188B_4EB4_AB99_3F3734D6CE6C__INCLUDED_)\n#define AFX_STDAFX_H__E30B2003_188B_4EB4_AB99_3F3734D6CE6C__INCLUDED_\n\n#pragma once\n\n#ifdef __GNUC__\n// ôûҵminmaxͷļ-_-\n#ifndef min\n#define min(a,b) (((a) < (b)) ? (a) : (b))\n#endif\n#ifndef max\n#define max(a,b) (((a) > (b)) ? (a) : (b))\n#endif\n#endif\n\n#ifndef __FILET__\n#define __DUILIB_STR2WSTR(str)\tL##str\n#define _DUILIB_STR2WSTR(str)\t__DUILIB_STR2WSTR(str)\n#ifdef _UNICODE\n#define __FILET__\t_DUILIB_STR2WSTR(__FILE__)\n#define __FUNCTIONT__\t_DUILIB_STR2WSTR(__FUNCTION__)\n#else\n#define __FILET__\t__FILE__\n#define __FUNCTIONT__\t__FUNCTION__\n#endif\n#endif\n\n#define _CRT_SECURE_NO_DEPRECATE\n\n// Remove pointless warning messages\n#ifdef _MSC_VER\n#pragma warning (disable : 4511) // copy operator could not be generated\n#pragma warning (disable : 4512) // assignment operator could not be generated\n#pragma warning (disable : 4702) // unreachable code (bugs in Microsoft's STL)\n#pragma warning (disable : 4786) // identifier was truncated\n#pragma warning (disable : 4996) // function or variable may be unsafe (deprecated)\n#ifndef _CRT_SECURE_NO_WARNINGS\n#define _CRT_SECURE_NO_WARNINGS // eliminate deprecation warnings for VS2005\n#endif\n#endif // _MSC_VER\n#ifdef __BORLANDC__\n#pragma option -w-8027\t\t   // function not expanded inline\n#endif\n\n\n\n#include \"UIlib.h\"\n\n#include <olectl.h>\n\n#define lengthof(x) (sizeof(x)/sizeof(*x))\n#define MAX max\n#define MIN min\n#define CLAMP(x,a,b) (MIN(b,MAX(a,x)))\n\n//{{AFX_INSERT_LOCATION}}\n// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\n\n#endif // !defined(AFX_STDAFX_H__E30B2003_188B_4EB4_AB99_3F3734D6CE6C__INCLUDED_)\n"
  },
  {
    "path": "DuiLib/UIlib.cpp",
    "content": "// Copyright (c) 2010-2011, duilib develop team(www.duilib.com).\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or \n// without modification, are permitted provided that the \n// following conditions are met.\n//\n// Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//\n// Redistributions in binary form must reproduce the above \n// copyright notice, this list of conditions and the following\n// disclaimer in the documentation and/or other materials \n// provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \n// CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,\n// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF \n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n//\n// DirectUI - UI Library\n//\n// Written by Bjarke Viksoe (bjarke@viksoe.dk)\n// Copyright (c) 2006-2007 Bjarke Viksoe.\n//\n// This code may be used in compiled form in any way you desire. These\n// source files may be redistributed by any means PROVIDING it is \n// not sold for profit without the authors written consent, and \n// providing that this notice and the authors name is included. \n//\n// This file is provided \"as is\" with no expressed or implied warranty.\n// The author accepts no liability if it causes any damage to you or your\n// computer whatsoever. It's free, so don't hassle me about it.\n//\n// Beware of bugs.\n//\n//\n\n\n#include \"stdafx.h\"\n#include \"UIlib.h\"\n\n\nBOOL APIENTRY DllMain(HANDLE hModule, DWORD  dwReason, LPVOID /*lpReserved*/)\n{\n\tswitch( dwReason ) {\n\tcase DLL_PROCESS_ATTACH:\n\tcase DLL_THREAD_ATTACH:\n\tcase DLL_THREAD_DETACH:\n\tcase DLL_PROCESS_DETACH:\n\t\t::DisableThreadLibraryCalls((HMODULE)hModule);\n\t\tbreak;\n\t}\n\treturn TRUE;\n}\n\n"
  },
  {
    "path": "DuiLib/UIlib.h",
    "content": "// Copyright (c) 2010-2011, duilib develop team(www.duilib.com).\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or \n// without modification, are permitted provided that the \n// following conditions are met.\n//\n// Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//\n// Redistributions in binary form must reproduce the above \n// copyright notice, this list of conditions and the following\n// disclaimer in the documentation and/or other materials \n// provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \n// CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,\n// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF \n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#if defined(UILIB_EXPORTS)\n#if defined(_MSC_VER)\n#define UILIB_API __declspec(dllexport)\n#else\n#define UILIB_API \n#endif\n#else\n#if defined(_MSC_VER)\n#define UILIB_API __declspec(dllimport)\n#else\n#define UILIB_API \n#endif\n#endif\n\n#define UILIB_COMDAT __declspec(selectany)\n\n#if defined _M_IX86\n#pragma comment(linker, \"/manifestdependency:\\\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\\\"\")\n#elif defined _M_IA64\n#pragma comment(linker, \"/manifestdependency:\\\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\\\"\")\n#elif defined _M_X64\n#pragma comment(linker, \"/manifestdependency:\\\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\\\"\")\n#else\n#pragma comment(linker, \"/manifestdependency:\\\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\\\"\")\n#endif\n\n#include <windows.h>\n#include <windowsx.h>\n#include <commctrl.h>\n#include <stddef.h>\n#include <richedit.h>\n#include <tchar.h>\n#include <assert.h>\n#include <crtdbg.h>\n#include <malloc.h>\n\n#include \"Utils/Utils.h\"\n#include \"Utils/UIDelegate.h\"\n#include \"Core/UIDefine.h\"\n#include \"Core/UIManager.h\"\n#include \"Core/UIBase.h\"\n#include \"Core/UIControl.h\"\n#include \"Core/UIContainer.h\"\n#include \"Core/UIMarkup.h\"\n#include \"Core/UIDlgBuilder.h\"\n#include \"Core/UIRender.h\"\n#include \"Utils/WinImplBase.h\"\n#include \"Utils/UnCompression.h\"\n\n#include \"Layout/UIVerticalLayout.h\"\n#include \"Layout/UIHorizontalLayout.h\"\n#include \"Layout/UITileLayout.h\"\n#include \"Layout/UITabLayout.h\"\n#include \"Layout/UIChildLayout.h\"\n\n#include \"Control/UIList.h\"\n#include \"Control/UICombo.h\"\n#include \"Control/UIScrollBar.h\"\n#include \"Control/UITreeView.h\"\n\n#include \"Control/UILabel.h\"\n#include \"Control/UIText.h\"\n#include \"Control/UIEdit.h\"\n\n#include \"Control/UIButton.h\"\n#include \"Control/UIFadeButton.h\"\n#include \"Control/UIOption.h\"\n#include \"Control/UICheckBox.h\"\n\n#include \"Control/UIProgress.h\"\n#include \"Control/UISlider.h\"\n\n#include \"Control/UIComboBox.h\"\n#include \"Control/UIRichEdit.h\"\n#include \"Control/UIDateTime.h\"\n\n#include \"Control/UIActiveX.h\"\n#include \"Control/UIWebBrowser.h\"\n#include \"Control/UIFlash.h\"\n\n#include \"Control/UIColorPalette.h\"\n#include \"Control/UIHyperlink.h\"\n#include \"Control/UIMediaPlayer.h\"\n#include \"Control/UIIpAddress.h\""
  },
  {
    "path": "DuiLib/Utils/FlashEventHandler.h",
    "content": "/*\nڣ\t2012/11/05 15:09:48\nߣ\t\t\tdaviyang35@gmail.com\n\tFlashEventHandler\n*/\n#pragma once\n//#include <ExDisp.h>\n\nnamespace DuiLib\n{\n\tclass CFlashEventHandler\n\t{\n\tpublic:\n\t\tCFlashEventHandler() {}\n\t\t~CFlashEventHandler() {}\n\n\t\tvirtual ULONG STDMETHODCALLTYPE Release( void ) { return S_OK;}\n\t\tvirtual ULONG STDMETHODCALLTYPE AddRef( void ) { return S_OK;}\n\n\t\tvirtual HRESULT OnReadyStateChange ( long newState )\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT OnProgress (long percentDone )\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT FSCommand ( LPCTSTR command, LPCTSTR args )\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT FlashCall ( LPCTSTR request )\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\t};\n}"
  },
  {
    "path": "DuiLib/Utils/UIDelegate.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"UIDelegate.h\"\n\nnamespace DuiLib {\n\n\tCDelegateBase::CDelegateBase( void* pObject, FunVoid pFn )\n\t{\n\t\tm_pObject\t\t\t\t= pObject;\n\t\tm_unionFnType.pFunVoid\t= pFn;\n\t\tm_iEventType\t\t\t= UIEVENT__ALL;\n\t\tm_sNotifyTypeName.Empty();\n\t}\n\n\tCDelegateBase::CDelegateBase( void* pObject, FunTEvent pFn,UINT _iEventType /*= UIEVENT__ALL*/ )\n\t{\n\t\tm_pObject\t\t\t\t\t= pObject;\n\t\tm_unionFnType.pFunTEvent\t= pFn;\n\t\tm_iEventType\t\t\t\t= _iEventType;\n\t\tm_sNotifyTypeName.Empty();\n\t}\n\n\tCDelegateBase::CDelegateBase( void* pObject, FunTNotify pFn,LPCTSTR _sNotifyTypeName /*= NULL*/)\n\t{\n\t\tm_pObject\t\t\t\t\t= pObject;\n\t\tm_unionFnType.pFunTNotify\t= pFn;\n\t\tm_iEventType\t\t\t\t= UIEVENT__ALL;\n\n\t\tif(NULL != _sNotifyTypeName)\n\t\t\tm_sNotifyTypeName = _sNotifyTypeName;\n\t}\n\n\n\tCDelegateBase::CDelegateBase( const CDelegateBase& rhs )\n\t{\n\t\tm_pObject\t\t\t\t= rhs.m_pObject;\n\t\tm_unionFnType.pFunVoid\t= rhs.m_unionFnType.pFunVoid;\n\t\tm_iEventType\t\t\t= rhs.m_iEventType;\n\t\tm_sNotifyTypeName\t\t= rhs.m_sNotifyTypeName.GetData();\n\t}\n\n\tCDelegateBase::~CDelegateBase()\n\t{\n\t\tif(!m_sNotifyTypeName.IsEmpty())\n\t\t\tm_sNotifyTypeName.Empty();\n\t}\n\n\tbool CDelegateBase::Equals(const CDelegateBase& rhs) const \n\t{\n\t\treturn m_pObject == rhs.m_pObject && m_unionFnType.pFunVoid\t== rhs.m_unionFnType.pFunVoid && m_iEventType == rhs.m_iEventType && m_sNotifyTypeName == rhs.m_sNotifyTypeName.GetData(); \n\t}\n\n\t//\n\n\tCEventSource::CEventSource()\n\t{\n\t\tm_aDelegates.Empty();\n\t}\n\n\tCEventSource::~CEventSource()\n\t{\n\t\tfor( int i = 0; i < m_aDelegates.GetSize(); i++ ) {\n\t\t\tCDelegateBase* pObject = m_aDelegates.GetAt(i);\n\t\t\tif( pObject) delete pObject;\n\t\t\tpObject = NULL;\n\t\t}\n\t}\n\n\tCEventSource::operator bool()\n\t{\n\t\treturn m_aDelegates.GetSize() > 0;\n\t}\n\n\tvoid CEventSource::operator+= (const CDelegateBase& d)\n\t{ \n\t\tfor( int i = 0; i < m_aDelegates.GetSize(); i++ ) {\n\t\t\tCDelegateBase* pObject = m_aDelegates.GetAt(i);\n\t\t\tif( pObject && pObject->Equals(d) ) return;\n\t\t}\n\n\t\tm_aDelegates.Add(d.Copy());\n\t}\n\n\tvoid CEventSource::operator-= (const CDelegateBase& d) \n\t{\n\t\tfor( int i = 0; i < m_aDelegates.GetSize(); i++ ) {\n\t\t\tCDelegateBase* pObject = m_aDelegates.GetAt(i);\n\t\t\tif( pObject && pObject->Equals(d) ) {\n\t\t\t\tdelete pObject;\n\t\t\t\tm_aDelegates.Remove(i);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tbool CEventSource::operator() (void* param) \n\t{\n\t\tfor( int i = 0; i < m_aDelegates.GetSize(); i++ ) {\n\t\t\tCDelegateBase* pObject = m_aDelegates.GetAt(i);\n\t\t\tif( pObject && !pObject->Invoke(param) ) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tbool CEventSource::operator() (TEventUI* pTEventUI) \n\t{\n\t\tfor( int i = 0; i < m_aDelegates.GetSize(); i++ ) {\n\t\t\tCDelegateBase* pObject = m_aDelegates.GetAt(i);\n\t\t\tif( pObject && !pObject->Invoke(pTEventUI) ) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tbool CEventSource::operator() (TNotifyUI* pTNotifyUI) \n\t{\n\t\tfor( int i = 0; i < m_aDelegates.GetSize(); i++ ) {\n\t\t\tCDelegateBase* pObject = m_aDelegates.GetAt(i);\n\n\t\t\tif( pObject && !pObject->Invoke(pTNotifyUI) ) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\n\n}"
  },
  {
    "path": "DuiLib/Utils/UIDelegate.h",
    "content": "#ifndef __UIDELEGATE_H__\n#define __UIDELEGATE_H__\n\n#pragma once\n\n//#include \"StdAfx.h\"\n\nnamespace DuiLib {\n\n\ttypedef struct tagTEventUI TEventUI;\n\ttypedef struct tagTNotifyUI TNotifyUI;\n\n\ttypedef bool (*FunVoid)(void* pParam);\n\ttypedef bool (*FunTEvent)(TEventUI* pTEventUI);\n\ttypedef bool (*FunTNotify)(TNotifyUI* pTNotifyUI);\n\n\tclass CDelegateBase;\n\n\tclass UILIB_API IDelegate\n\t{\n\tpublic:\n\t\ttypedef union {\n\t\t\tFunVoid pFunVoid;\n\t\t\tFunTEvent pFunTEvent;\n\t\t\tFunTNotify pFunTNotify;\n\t\t}FnType;\n\n\tpublic:\n\t\tvirtual FunVoid GetFunVoid() const = 0;\n\t\tvirtual FunTEvent GetFunTEvent() const = 0;\n\t\tvirtual FunTNotify GetFunTNotify() const = 0;\n\n\tpublic:\n\t\tvirtual CDelegateBase* Copy() const = 0;\n\t\tvirtual bool Invoke(void* pParam) = 0;\n\t\tvirtual bool Invoke(TEventUI* pTEventUI) = 0;\n\t\tvirtual bool Invoke(TNotifyUI* pTNotifyUI) = 0;\n\t};\n\n\tclass UILIB_API CDelegateBase : public IDelegate\n\t{\n\tpublic:\n\t\tCDelegateBase(void* pObject, FunVoid pFn);\n\t\tCDelegateBase(void* pObject, FunTEvent pFn,UINT _iEventType);\n\t\tCDelegateBase(void* pObject, FunTNotify pFn,LPCTSTR _sNotifyTypeName);\n\t\tCDelegateBase(const CDelegateBase& rhs);\n\n\t\tvirtual ~CDelegateBase();\n\t\tFunVoid GetFunVoid() const{return m_unionFnType.pFunVoid;};\n\t\tFunTEvent GetFunTEvent() const{return m_unionFnType.pFunTEvent;};\n\t\tFunTNotify GetFunTNotify() const{return m_unionFnType.pFunTNotify;};\n\n\t\tbool Equals(const CDelegateBase& rhs) const;\n\t\tbool operator() (void* param){return Invoke(param);};\n\t\tbool operator() (TEventUI* pTEventUI,UINT _iEventType){return Invoke(pTEventUI);};\n\t\tbool operator() (TNotifyUI* pTNotifyUI,LPCTSTR _sNotifyTypeName){return Invoke(pTNotifyUI);};\n\n\t\tvoid* GetObj() const {return m_pObject;};\n\tprotected:\n\t\tvoid SetEventType(UINT _iEventType){m_iEventType = _iEventType;};\n\t\tvoid SetNotifyTypeName(CDuiString& _sNotifyTypeName){m_sNotifyTypeName = _sNotifyTypeName.GetData();};\n\t\tUINT GetEventType(){return m_iEventType;};\n\t\tCDuiString GetNotifyTypeName(){return m_sNotifyTypeName.GetData();};\n\n\tprivate:\n\t\tvoid* m_pObject;\n\t\tFnType m_unionFnType;\n\tprotected:\n\t\tUINT m_iEventType;\n\t\tCDuiString m_sNotifyTypeName;\n\t};\n\n\n\tclass UILIB_API CDelegateStatic: public CDelegateBase\n\t{\n\tpublic:\n\t\tCDelegateStatic(FunVoid pFunVoid) : CDelegateBase(NULL, pFunVoid) { } \n\t\tCDelegateStatic(FunTEvent pFunTEvent,UINT _iEventType) : CDelegateBase(NULL, pFunTEvent,_iEventType) { } \n\t\tCDelegateStatic(FunTNotify pFunTNotify,LPCTSTR _sNotifyTypeName) : CDelegateBase(NULL, pFunTNotify,_sNotifyTypeName) { } \n\t\tCDelegateStatic(const CDelegateStatic& rhs) : CDelegateBase(rhs) { } \n\t\tvirtual CDelegateBase* Copy() const { return new CDelegateStatic(*this); }\n\n\tprotected:\n\t\tvirtual bool Invoke(void* param)\n\t\t{\n\t\t\tFunVoid pFunVoid = GetFunVoid();\n\t\t\treturn pFunVoid(param); \n\t\t}\n\n\t\tvirtual bool Invoke(TEventUI* pTEventUI)\n\t\t{\n\t\t\tFunTEvent pFunTEvent = GetFunTEvent();\n\t\t\treturn !pFunTEvent(pTEventUI); \n\t\t};\n\n\t\tvirtual bool Invoke(TNotifyUI* pTNotifyUI)\n\t\t{\n\t\t\tFunTNotify pFunTNotify = GetFunTNotify();\n\t\t\treturn pFunTNotify(pTNotifyUI);\n\t\t};\n\t};\n\n\ttemplate <class O, class T>\n\tclass  CDelegate : public CDelegateBase\n\t{\n\t\ttypedef bool (T::*CMFunVoid)(void* pParam);\n\t\ttypedef bool (T::*CMFunTEvent)(TEventUI* pTEventUI);\n\t\ttypedef bool (T::*CMFunTNotify)(TNotifyUI* pTNotifyUI);\n\tpublic:\n\t\tCDelegate(O* pObj, CMFunVoid pCMFunVoid) : CDelegateBase(pObj, *(FunVoid*)&pCMFunVoid), m_pCMFunVoid(pCMFunVoid),m_pCMFunTEvent(NULL),m_pCMFunTNotify(NULL){\n\n\t\t}\n\t\tCDelegate(O* pObj, CMFunTEvent pCMFunTEvent,UINT _iEventType) : CDelegateBase(pObj, *(FunTEvent*)&pCMFunTEvent,_iEventType), m_pCMFunVoid(NULL),m_pCMFunTEvent(pCMFunTEvent),m_pCMFunTNotify(NULL){\n\t\t}\n\t\tCDelegate(O* pObj, CMFunTNotify pCMFunTNotify,LPCTSTR _sNotifyTypeName ) : CDelegateBase(pObj, *(FunTNotify*)&pCMFunTNotify,_sNotifyTypeName), m_pCMFunVoid(NULL),m_pCMFunTEvent(NULL),m_pCMFunTNotify(pCMFunTNotify){\n\t\t}\n\t\tCDelegate(const CDelegate& rhs) : CDelegateBase(rhs) {\n\t\t\tm_pCMFunVoid = rhs.m_pCMFunVoid;m_pCMFunTEvent = rhs.m_pCMFunTEvent;m_pCMFunTNotify = rhs.m_pCMFunTNotify;} \n\t\tvirtual CDelegateBase* Copy() const { return new CDelegate(*this); }\n\t\tvirtual ~CDelegate(){\n\n\t\t}\n\n\tprotected:\n\t\tvirtual bool Invoke(void* param)\n\t\t{\n\t\t\tO* pObject = (O*) GetObj();\n\t\t\tif(pObject && m_pCMFunVoid)\n\t\t\t\treturn (pObject->*m_pCMFunVoid)(param);\n\t\t\telse if(pObject && m_pCMFunTEvent)\n\t\t\t\treturn Invoke((TEventUI*)param);\n\t\t\telse if(pObject && m_pCMFunTNotify)\n\t\t\t\treturn Invoke((TNotifyUI*)param);\n\n\t\t\treturn true;\n\t\t} \n\n\t\tvirtual bool Invoke(TEventUI* pTEventUI)\n\t\t{\n\t\t\tO* pObject = (O*) GetObj();\n\t\t\tif(pObject && pTEventUI && GetEventType() == 0)\n\t\t\t\treturn (pObject->*m_pCMFunTEvent)(pTEventUI); \n\t\t\telse if(pObject && pTEventUI && pTEventUI->Type == GetEventType())\n\t\t\t\treturn (pObject->*m_pCMFunTEvent)(pTEventUI);\n\n\t\t\treturn true;\n\t\t};\n\n\t\tvirtual bool Invoke(TNotifyUI* pTNotifyUI)\n\t\t{\n\t\t\tO* pObject = (O*) GetObj();\n\t\t\tif(pObject && GetNotifyTypeName().IsEmpty())\n\t\t\t\treturn (pObject->*m_pCMFunTNotify)(pTNotifyUI);\n\t\t\telse if(pObject && pTNotifyUI && pTNotifyUI->sType == GetNotifyTypeName())\n\t\t\t\treturn (pObject->*m_pCMFunTNotify)(pTNotifyUI);\n\n\t\t\treturn true;\n\t\t};\n\n\tprivate:\n\t\tCMFunVoid m_pCMFunVoid;\n\t\tCMFunTEvent m_pCMFunTEvent;\n\t\tCMFunTNotify m_pCMFunTNotify;\n\t};\n\n\n\ttemplate <class O, class T>\n\tCDelegate<O, T>  MakeDelegate(O* pObject, bool (T::* pFn)(void*))\n\t{\n\t\treturn CDelegate<O, T>(pObject, pFn);\n\t}\n\n\ttemplate <class O, class T>\n\tCDelegate<O, T>  MakeDelegate(O* pObject, bool (T::* pFn)(TEventUI*),UINT _iEventType)\n\t{\n\t\treturn CDelegate<O, T>(pObject, pFn,_iEventType);\n\t}\n\n\ttemplate <class O, class T>\n\tCDelegate<O, T>  MakeDelegate(O* pObject, bool (T::* pFn)(TNotifyUI*),LPCTSTR _sNotifyTypeName)\n\t{\n\t\treturn CDelegate<O, T>(pObject, pFn,(LPCTSTR)_sNotifyTypeName);\n\t}\n\n\tinline CDelegateStatic MakeDelegate(FunVoid pFunVoid)\n\t{\n\t\treturn CDelegateStatic(pFunVoid);\n\t}\n\n\tinline CDelegateStatic MakeDelegate(FunTEvent pFunTEvent,UINT _iEventType)\n\t{\n\t\treturn CDelegateStatic(pFunTEvent,_iEventType); \n\t}\n\n\tinline CDelegateStatic MakeDelegate(FunTNotify pFunTNotify,LPCTSTR _sNotifyTypeName)\n\t{\n\t\treturn CDelegateStatic(pFunTNotify,_sNotifyTypeName); \n\t}\n\n\tclass UILIB_API CEventSource\n\t{\n\tpublic:\n\t\tCEventSource();\n\t\t~CEventSource();\n\t\toperator bool();\n\t\tvoid operator+= (const CDelegateBase& d); // add const for gcc\n\t\tvoid operator+= (FunVoid pFunVoid){\n\t\t\t(*this) += MakeDelegate(pFunVoid);\n\t\t};\n\t\tvoid operator-= (const CDelegateBase& d);\n\t\tvoid operator-= (FunVoid pFunVoid){(*this) -= MakeDelegate(pFunVoid);};\n\t\tbool operator() (void* param);\n\t\tbool operator() (TEventUI* pTEventUI);\n\t\tbool operator() (TNotifyUI* pTNotifyUI);\n\n\tprotected:\n\t\tTStdPtrArray<CDelegateBase*> m_aDelegates;\n\t};\n\n}\n\n\n#endif // __UIDELEGATE_H__\n\n"
  },
  {
    "path": "DuiLib/Utils/UnCompression.h",
    "content": "#ifndef DUILIB_CUNCOMPRESSION_H_\n#define DUILIB_CUNCOMPRESSION_H_\n\n#pragma once\n\nnamespace DuiLib\n{\n\n\tclass CUnCompression\n\t{\n\tpublic:\n\t\tvirtual BOOL Open(const TCHAR *filepath) = 0;\n\t\tvirtual BOOL Open(void *z, unsigned int len) = 0;\n\t\tvirtual BOOL IsOpen( ) = 0;\n\t\tvirtual BOOL Close( ) = 0;\n\n\t\tvirtual BOOL Find(const TCHAR *name, int* index, DWORD64 *size) = 0;\n\t\tvirtual BOOL Get(int index, void *dst, DWORD64 len) = 0;\n\t};\n\n}\n#endif"
  },
  {
    "path": "DuiLib/Utils/Utils.cpp",
    "content": "#include \"stdafx.h\"\n#include \"Utils.h\"\n\nnamespace DuiLib\n{\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tCPoint::CPoint()\n\t{\n\t\tx = y = 0;\n\t}\n\n\tCPoint::CPoint(const POINT& src)\n\t{\n\t\tx = src.x;\n\t\ty = src.y;\n\t}\n\n\tCPoint::CPoint(int _x, int _y)\n\t{\n\t\tx = _x;\n\t\ty = _y;\n\t}\n\n\tCPoint::CPoint(LPARAM lParam)\n\t{\n\t\tx = GET_X_LPARAM(lParam);\n\t\ty = GET_Y_LPARAM(lParam);\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCSize::CSize()\n\t{\n\t\tcx = cy = 0;\n\t}\n\n\tCSize::CSize(const SIZE& src)\n\t{\n\t\tcx = src.cx;\n\t\tcy = src.cy;\n\t}\n\n\tCSize::CSize(const RECT rc)\n\t{\n\t\tcx = rc.right - rc.left;\n\t\tcy = rc.bottom - rc.top;\n\t}\n\n\tCSize::CSize(int _cx, int _cy)\n\t{\n\t\tcx = _cx;\n\t\tcy = _cy;\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCDuiRect::CDuiRect()\n\t{\n\t\tleft = top = right = bottom = 0;\n\t}\n\n\tCDuiRect::CDuiRect(const RECT& src)\n\t{\n\t\tleft = src.left;\n\t\ttop = src.top;\n\t\tright = src.right;\n\t\tbottom = src.bottom;\n\t}\n\n\tCDuiRect::CDuiRect(int iLeft, int iTop, int iRight, int iBottom)\n\t{\n\t\tleft = iLeft;\n\t\ttop = iTop;\n\t\tright = iRight;\n\t\tbottom = iBottom;\n\t}\n\n\tint CDuiRect::GetWidth() const\n\t{\n\t\treturn right - left;\n\t}\n\n\tint CDuiRect::GetHeight() const\n\t{\n\t\treturn bottom - top;\n\t}\n\n\tvoid CDuiRect::Empty()\n\t{\n\t\tleft = top = right = bottom = 0;\n\t}\n\n\tbool CDuiRect::IsNull() const\n\t{\n\t\treturn (left == 0 && right == 0 && top == 0 && bottom == 0); \n\t}\n\n\tvoid CDuiRect::Join(const RECT& rc)\n\t{\n\t\tif( rc.left < left ) left = rc.left;\n\t\tif( rc.top < top ) top = rc.top;\n\t\tif( rc.right > right ) right = rc.right;\n\t\tif( rc.bottom > bottom ) bottom = rc.bottom;\n\t}\n\n\tvoid CDuiRect::ResetOffset()\n\t{\n\t\t::OffsetRect(this, -left, -top);\n\t}\n\n\tvoid CDuiRect::Normalize()\n\t{\n\t\tif( left > right ) { int iTemp = left; left = right; right = iTemp; }\n\t\tif( top > bottom ) { int iTemp = top; top = bottom; bottom = iTemp; }\n\t}\n\n\tvoid CDuiRect::Offset(int cx, int cy)\n\t{\n\t\t::OffsetRect(this, cx, cy);\n\t}\n\n\tvoid CDuiRect::Inflate(int cx, int cy)\n\t{\n\t\t::InflateRect(this, cx, cy);\n\t}\n\n\tvoid CDuiRect::Deflate(int cx, int cy)\n\t{\n\t\t::InflateRect(this, -cx, -cy);\n\t}\n\n\tvoid CDuiRect::Union(CDuiRect& rc)\n\t{\n\t\t::UnionRect(this, this, &rc);\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCStdPtrArray::CStdPtrArray(int iPreallocSize) : m_ppVoid(NULL), m_nCount(0), m_nAllocated(iPreallocSize)\n\t{\n\t\tASSERT(iPreallocSize>=0);\n\t\tif( iPreallocSize > 0 ) m_ppVoid = static_cast<LPVOID*>(malloc(iPreallocSize * sizeof(LPVOID)));\n\t}\n\n\tCStdPtrArray::CStdPtrArray(const CStdPtrArray& src) : m_ppVoid(NULL), m_nCount(0), m_nAllocated(0)\n\t{\n\t\tfor(int i=0; i<src.GetSize(); i++)\n\t\t\tAdd(src.GetAt(i));\n\t}\n\n\tCStdPtrArray::~CStdPtrArray()\n\t{\n\t\tif( m_ppVoid != NULL ) free(m_ppVoid);\n\t}\n\n\tvoid CStdPtrArray::Empty()\n\t{\n\t\tif( m_ppVoid != NULL ) free(m_ppVoid);\n\t\tm_ppVoid = NULL;\n\t\tm_nCount = m_nAllocated = 0;\n\t}\n\n\tvoid CStdPtrArray::Resize(int iSize)\n\t{\n\t\tEmpty();\n\t\tm_ppVoid = static_cast<LPVOID*>(malloc(iSize * sizeof(LPVOID)));\n\t\t::ZeroMemory(m_ppVoid, iSize * sizeof(LPVOID));\n\t\tm_nAllocated = iSize;\n\t\tm_nCount = iSize;\n\t}\n\n\tbool CStdPtrArray::IsEmpty() const\n\t{\n\t\treturn m_nCount == 0;\n\t}\n\n\tbool CStdPtrArray::Add(LPVOID pData)\n\t{\n\t\tif( ++m_nCount >= m_nAllocated) {\n\t\t\tint nAllocated = m_nAllocated * 2;\n\t\t\tif( nAllocated == 0 ) nAllocated = 11;\n\t\t\tLPVOID* ppVoid = static_cast<LPVOID*>(realloc(m_ppVoid, nAllocated * sizeof(LPVOID)));\n\t\t\tif( ppVoid != NULL ) {\n\t\t\t\tm_nAllocated = nAllocated;\n\t\t\t\tm_ppVoid = ppVoid;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t--m_nCount;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tm_ppVoid[m_nCount - 1] = pData;\n\t\treturn true;\n\t}\n\n\tbool CStdPtrArray::InsertAt(int iIndex, LPVOID pData)\n\t{\n\t\tif( iIndex == m_nCount ) return Add(pData);\n\t\tif( iIndex < 0 || iIndex > m_nCount ) return false;\n\t\tif( ++m_nCount >= m_nAllocated) {\n\t\t\tint nAllocated = m_nAllocated * 2;\n\t\t\tif( nAllocated == 0 ) nAllocated = 11;\n\t\t\tLPVOID* ppVoid = static_cast<LPVOID*>(realloc(m_ppVoid, nAllocated * sizeof(LPVOID)));\n\t\t\tif( ppVoid != NULL ) {\n\t\t\t\tm_nAllocated = nAllocated;\n\t\t\t\tm_ppVoid = ppVoid;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t--m_nCount;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tmemmove(&m_ppVoid[iIndex + 1], &m_ppVoid[iIndex], (m_nCount - iIndex - 1) * sizeof(LPVOID));\n\t\tm_ppVoid[iIndex] = pData;\n\t\treturn true;\n\t}\n\n\tbool CStdPtrArray::SetAt(int iIndex, LPVOID pData)\n\t{\n\t\tif( iIndex < 0 || iIndex >= m_nCount ) return false;\n\t\tm_ppVoid[iIndex] = pData;\n\t\treturn true;\n\t}\n\n\tbool CStdPtrArray::Remove(int iIndex)\n\t{\n\t\tif( iIndex < 0 || iIndex >= m_nCount ) return false;\n\t\tif( iIndex < --m_nCount ) ::CopyMemory(m_ppVoid + iIndex, m_ppVoid + iIndex + 1, (m_nCount - iIndex) * sizeof(LPVOID));\n\t\treturn true;\n\t}\n\n\tint CStdPtrArray::Find(LPVOID pData) const\n\t{\n\t\tfor( int i = 0; i < m_nCount; i++ ) if( m_ppVoid[i] == pData ) return i;\n\t\treturn -1;\n\t}\n\n\tint CStdPtrArray::GetSize() const\n\t{\n\t\treturn m_nCount;\n\t}\n\n\tLPVOID* CStdPtrArray::GetData()\n\t{\n\t\treturn m_ppVoid;\n\t}\n\n\tLPVOID CStdPtrArray::GetAt(int iIndex) const\n\t{\n\t\tif( iIndex < 0 || iIndex >= m_nCount ) return NULL;\n\t\treturn m_ppVoid[iIndex];\n\t}\n\n\tLPVOID CStdPtrArray::operator[] (int iIndex) const\n\t{\n\t\tASSERT(iIndex>=0 && iIndex<m_nCount);\n\t\treturn m_ppVoid[iIndex];\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCStdValArray::CStdValArray(int iElementSize, int iPreallocSize /*= 0*/) : \n\t\tm_pVoid(NULL), \n\t\tm_nCount(0), \n\t\tm_iElementSize(iElementSize), \n\t\tm_nAllocated(iPreallocSize)\n\t{\n\t\tASSERT(iElementSize>0);\n\t\tASSERT(iPreallocSize>=0);\n\t\tif( iPreallocSize > 0 ) m_pVoid = static_cast<LPBYTE>(malloc(iPreallocSize * m_iElementSize));\n\t}\n\n\tCStdValArray::~CStdValArray()\n\t{\n\t\tif( m_pVoid != NULL ) free(m_pVoid);\n\t}\n\n\tvoid CStdValArray::Empty()\n\t{   \n\t\tm_nCount = 0;  // NOTE: We keep the memory in place\n\t}\n\n\tbool CStdValArray::IsEmpty() const\n\t{\n\t\treturn m_nCount == 0;\n\t}\n\n\tbool CStdValArray::Add(LPCVOID pData)\n\t{\n\t\tif( ++m_nCount >= m_nAllocated) {\n\t\t\tint nAllocated = m_nAllocated * 2;\n\t\t\tif( nAllocated == 0 ) nAllocated = 11;\n\t\t\tLPBYTE pVoid = static_cast<LPBYTE>(realloc(m_pVoid, nAllocated * m_iElementSize));\n\t\t\tif( pVoid != NULL ) {\n\t\t\t\tm_nAllocated = nAllocated;\n\t\t\t\tm_pVoid = pVoid;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t--m_nCount;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t::CopyMemory(m_pVoid + ((m_nCount - 1) * m_iElementSize), pData, m_iElementSize);\n\t\treturn true;\n\t}\n\n\tbool CStdValArray::Remove(int iIndex)\n\t{\n\t\tif( iIndex < 0 || iIndex >= m_nCount ) return false;\n\t\tif( iIndex < --m_nCount ) ::CopyMemory(m_pVoid + (iIndex * m_iElementSize), m_pVoid + ((iIndex + 1) * m_iElementSize), (m_nCount - iIndex) * m_iElementSize);\n\t\treturn true;\n\t}\n\n\tint CStdValArray::GetSize() const\n\t{\n\t\treturn m_nCount;\n\t}\n\n\tLPVOID CStdValArray::GetData()\n\t{\n\t\treturn static_cast<LPVOID>(m_pVoid);\n\t}\n\n\tLPVOID CStdValArray::GetAt(int iIndex) const\n\t{\n\t\tif( iIndex < 0 || iIndex >= m_nCount ) return NULL;\n\t\treturn m_pVoid + (iIndex * m_iElementSize);\n\t}\n\n\tLPVOID CStdValArray::operator[] (int iIndex) const\n\t{\n\t\tASSERT(iIndex>=0 && iIndex<m_nCount);\n\t\treturn m_pVoid + (iIndex * m_iElementSize);\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCDuiString::CDuiString() : m_pstr(m_szBuffer)\n\t{\n\t\tm_szBuffer[0] = '\\0';\n\t}\n\n\tCDuiString::CDuiString(const TCHAR ch) : m_pstr(m_szBuffer)\n\t{\n\t\tm_szBuffer[0] = ch;\n\t\tm_szBuffer[1] = '\\0';\n\t}\n\n\tCDuiString::CDuiString(LPCTSTR lpsz, int nLen) : m_pstr(m_szBuffer)\n\t{      \n\t\tASSERT(!::IsBadStringPtr(lpsz,-1) || lpsz==NULL);\n\t\tm_szBuffer[0] = '\\0';\n\t\tAssign(lpsz, nLen);\n\t}\n\n\tCDuiString::CDuiString(const CDuiString& src) : m_pstr(m_szBuffer)\n\t{\n\t\tm_szBuffer[0] = '\\0';\n\t\tAssign(src.m_pstr);\n\t}\n\n\tCDuiString::~CDuiString()\n\t{\n\t\tif( m_pstr != m_szBuffer ) free(m_pstr);\n\t}\n\n\tint CDuiString::GetLength() const\n\t{ \n\t\treturn (int) _tcslen(m_pstr); \n\t}\n\n\tCDuiString::operator LPCTSTR() const \n\t{ \n\t\treturn m_pstr; \n\t}\n\n\tvoid CDuiString::Append(LPCTSTR pstr)\n\t{\n\t\tint nNewLength = GetLength() + (int) _tcslen(pstr);\n\t\tif( nNewLength >= MAX_LOCAL_STRING_LEN ) {\n\t\t\tif( m_pstr == m_szBuffer ) {\n\t\t\t\tm_pstr = static_cast<LPTSTR>(malloc((nNewLength + 1) * sizeof(TCHAR)));\n\t\t\t\t_tcscpy(m_pstr, m_szBuffer);\n\t\t\t\t_tcscat(m_pstr, pstr);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tm_pstr = static_cast<LPTSTR>(realloc(m_pstr, (nNewLength + 1) * sizeof(TCHAR)));\n\t\t\t\t_tcscat(m_pstr, pstr);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif( m_pstr != m_szBuffer ) {\n\t\t\t\tfree(m_pstr);\n\t\t\t\tm_pstr = m_szBuffer;\n\t\t\t}\n\t\t\t_tcscat(m_szBuffer, pstr);\n\t\t}\n\t}\n\n\tvoid CDuiString::Assign(LPCTSTR pstr, int cchMax)\n\t{\n\t\tif( pstr == NULL ) pstr = _T(\"\");\n\t\tcchMax = (cchMax < 0 ? (int) _tcslen(pstr) : cchMax);\n\t\tif( cchMax < MAX_LOCAL_STRING_LEN ) {\n\t\t\tif( m_pstr != m_szBuffer ) {\n\t\t\t\tfree(m_pstr);\n\t\t\t\tm_pstr = m_szBuffer;\n\t\t\t}\n\t\t}\n\t\telse if( cchMax > GetLength() || m_pstr == m_szBuffer ) {\n\t\t\tif( m_pstr == m_szBuffer ) m_pstr = NULL;\n\t\t\tm_pstr = static_cast<LPTSTR>(realloc(m_pstr, (cchMax + 1) * sizeof(TCHAR)));\n\t\t}\n\t\t_tcsncpy(m_pstr, pstr, cchMax);\n\t\tm_pstr[cchMax] = '\\0';\n\t}\n\n\tbool CDuiString::IsEmpty() const \n\t{ \n\t\treturn m_pstr[0] == '\\0'; \n\t}\n\n\tint CDuiString::SafeStrlen(LPCTSTR lpsz)\n\t{\n\t\treturn (lpsz == NULL) ? 0 : lstrlen(lpsz);\n\t}\n\tvoid CDuiString::Empty() \n\t{ \n\t\tif( m_pstr != m_szBuffer ) free(m_pstr);\n\t\tm_pstr = m_szBuffer;\n\t\tm_szBuffer[0] = '\\0'; \n\t}\n\n\tLPCTSTR CDuiString::GetData() const\n\t{\n\t\treturn m_pstr;\n\t}\n\n\tTCHAR CDuiString::GetAt(int nIndex) const\n\t{\n\t\treturn m_pstr[nIndex];\n\t}\n\n\tTCHAR CDuiString::operator[] (int nIndex) const\n\t{ \n\t\treturn m_pstr[nIndex];\n\t}   \n\n\tconst CDuiString& CDuiString::operator=(const CDuiString& src)\n\t{      \n\t\tAssign(src);\n\t\treturn *this;\n\t}\n\n\tconst CDuiString& CDuiString::operator=(LPCTSTR lpStr)\n\t{      \n\t\tif ( lpStr )\n\t\t{\n\t\t\tASSERT(!::IsBadStringPtr(lpStr,-1));\n\t\t\tAssign(lpStr);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tEmpty();\n\t\t}\n\t\treturn *this;\n\t}\n\n#ifdef _UNICODE\n\n\tconst CDuiString& CDuiString::operator=(LPCSTR lpStr)\n\t{\n\t\tif ( lpStr )\n\t\t{\n\t\t\tASSERT(!::IsBadStringPtrA(lpStr,-1));\n\t\t\tint cchStr = (int) strlen(lpStr) + 1;\n\t\t\tLPWSTR pwstr = (LPWSTR) _alloca(cchStr);\n\t\t\tif( pwstr != NULL ) ::MultiByteToWideChar(::GetACP(), 0, lpStr, -1, pwstr, cchStr) ;\n\t\t\tAssign(pwstr);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tEmpty();\n\t\t}\n\t\treturn *this;\n\t}\n\n\tconst CDuiString& CDuiString::operator+=(LPCSTR lpStr)\n\t{\n\t\tif ( lpStr )\n\t\t{\n\t\t\tASSERT(!::IsBadStringPtrA(lpStr,-1));\n\t\t\tint cchStr = (int) strlen(lpStr) + 1;\n\t\t\tLPWSTR pwstr = (LPWSTR) _alloca(cchStr);\n\t\t\tif( pwstr != NULL ) ::MultiByteToWideChar(::GetACP(), 0, lpStr, -1, pwstr, cchStr) ;\n\t\t\tAppend(pwstr);\n\t\t}\n\n\t\treturn *this;\n\t}\n\n#else\n\n\tconst CDuiString& CDuiString::operator=(LPCWSTR lpwStr)\n\t{      \n\t\tif ( lpwStr )\n\t\t{\n\t\t\tASSERT(!::IsBadStringPtrW(lpwStr,-1));\n\t\t\tint cchStr = ((int) wcslen(lpwStr) * 2) + 1;\n\t\t\tLPSTR pstr = (LPSTR) _alloca(cchStr);\n\t\t\tif( pstr != NULL ) ::WideCharToMultiByte(::GetACP(), 0, lpwStr, -1, pstr, cchStr, NULL, NULL);\n\t\t\tAssign(pstr);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tEmpty();\n\t\t}\n\n\t\treturn *this;\n\t}\n\n\tconst CDuiString& CDuiString::operator+=(LPCWSTR lpwStr)\n\t{\n\t\tif ( lpwStr )\n\t\t{\n\t\t\tASSERT(!::IsBadStringPtrW(lpwStr,-1));\n\t\t\tint cchStr = ((int) wcslen(lpwStr) * 2) + 1;\n\t\t\tLPSTR pstr = (LPSTR) _alloca(cchStr);\n\t\t\tif( pstr != NULL ) ::WideCharToMultiByte(::GetACP(), 0, lpwStr, -1, pstr, cchStr, NULL, NULL);\n\t\t\tAppend(pstr);\n\t\t}\n\n\t\treturn *this;\n\t}\n\n#endif // _UNICODE\n\n\tconst CDuiString& CDuiString::operator=(const TCHAR ch)\n\t{\n\t\tEmpty();\n\t\tm_szBuffer[0] = ch;\n\t\tm_szBuffer[1] = '\\0';\n\t\treturn *this;\n\t}\n\n\tCDuiString CDuiString::operator+(const CDuiString& src) const\n\t{\n\t\tCDuiString sTemp = *this;\n\t\tsTemp.Append(src);\n\t\treturn sTemp;\n\t}\n\n\tCDuiString CDuiString::operator+(LPCTSTR lpStr) const\n\t{\n\t\tif ( lpStr )\n\t\t{\n\t\t\tASSERT(!::IsBadStringPtr(lpStr,-1));\n\t\t\tCDuiString sTemp = *this;\n\t\t\tsTemp.Append(lpStr);\n\t\t\treturn sTemp;\n\t\t}\n\n\t\treturn *this;\n\t}\n\n\tconst CDuiString& CDuiString::operator+=(const CDuiString& src)\n\t{      \n\t\tAppend(src);\n\t\treturn *this;\n\t}\n\n\tconst CDuiString& CDuiString::operator+=(LPCTSTR lpStr)\n\t{      \n\t\tif ( lpStr )\n\t\t{\n\t\t\tASSERT(!::IsBadStringPtr(lpStr,-1));\n\t\t\tAppend(lpStr);\n\t\t}\n\n\t\treturn *this;\n\t}\n\n\tconst CDuiString& CDuiString::operator+=(const TCHAR ch)\n\t{      \n\t\tTCHAR str[] = { ch, '\\0' };\n\t\tAppend(str);\n\t\treturn *this;\n\t}\n\t//\tbool CDuiString::operator == ( const CDuiString& duistr ) const{return (Compare(duistr.GetData()) == 0); };\n\t//\tbool CDuiString::operator == (LPCTSTR str) const { return (Compare(str) == 0); };\n\tbool CDuiString::operator != (LPCTSTR str) const { return (Compare(str) != 0); };\n\tbool CDuiString::operator <= (LPCTSTR str) const { return (Compare(str) <= 0); };\n\tbool CDuiString::operator <  (LPCTSTR str) const { return (Compare(str) <  0); };\n\tbool CDuiString::operator >= (LPCTSTR str) const { return (Compare(str) >= 0); };\n\tbool CDuiString::operator >  (LPCTSTR str) const { return (Compare(str) >  0); };\n\n\tvoid CDuiString::SetAt(int nIndex, TCHAR ch)\n\t{\n\t\tASSERT(nIndex>=0 && nIndex<GetLength());\n\t\tm_pstr[nIndex] = ch;\n\t}\n\tvoid CDuiString::Insert(int nIndex, TCHAR ch)\n\t{\n\t\tCDuiString sTemp;\n\n\t\tif (nIndex < 0)\n\t\t{\n\t\t\tnIndex=0;\n\t\t}\n\n\t\tint strLenth=GetLength();\n\n\t\tif (nIndex>strLenth)\n\t\t{\n\t\t\tnIndex = strLenth;\n\t\t}\n\n\t\tsTemp=Mid(0,nIndex);\n\t\tsTemp+=ch;\n\t\tsTemp+=Mid(nIndex);\n\t\tAssign(sTemp);\n\n\t}\n\tvoid CDuiString::Insert(int nIndex, LPCTSTR pstr)\n\t{\n\n\t\tCDuiString sTemp;\n\n\t\tif (nIndex < 0)\n\t\t{\n\t\t\tnIndex=0;\n\t\t}\n\n\t\tint strLenth=GetLength();\n\n\t\tif (nIndex>strLenth)\n\t\t{\n\t\t\tnIndex = strLenth;\n\t\t}\n\n\t\tsTemp=Mid(0,nIndex);\n\t\tsTemp+=pstr;\n\t\tsTemp+=Mid(nIndex);\n\t\tAssign(sTemp);\n\n\t}\n\n\tint CDuiString::Compare(LPCTSTR lpsz) const \n\t{ \n\t\treturn _tcscmp(m_pstr, lpsz); \n\t}\n\n\tint CDuiString::CompareNoCase(LPCTSTR lpsz) const \n\t{ \n\t\treturn _tcsicmp(m_pstr, lpsz); \n\t}\n\n\tvoid CDuiString::MakeUpper() \n\t{ \n\t\t_tcsupr(m_pstr); \n\t}\n\n\tvoid CDuiString::MakeLower() \n\t{ \n\t\t_tcslwr(m_pstr); \n\t}\n\tvoid CDuiString::MakeReverse()\n\t{\n\t\t_tcsrev(m_pstr);\n\t}\n\tCDuiString CDuiString::Left(int iLength) const\n\t{\n\t\tif( iLength < 0 ) iLength = 0;\n\t\tif( iLength > GetLength() ) iLength = GetLength();\n\t\treturn CDuiString(m_pstr, iLength);\n\t}\n\n\tCDuiString CDuiString::Mid(int iPos, int iLength) const\n\t{\n\t\tif( iLength < 0 ) iLength = GetLength() - iPos;\n\t\tif( iPos + iLength > GetLength() ) iLength = GetLength() - iPos;\n\t\tif( iLength <= 0 ) return CDuiString();\n\t\treturn CDuiString(m_pstr + iPos, iLength);\n\t}\n\n\tCDuiString CDuiString::Right(int iLength) const\n\t{\n\t\tint iPos = GetLength() - iLength;\n\t\tif( iPos < 0 ) {\n\t\t\tiPos = 0;\n\t\t\tiLength = GetLength();\n\t\t}\n\t\treturn CDuiString(m_pstr + iPos, iLength);\n\t}\n\n\tint CDuiString::Find(TCHAR ch, int iPos /*= 0*/) const\n\t{\n\t\tASSERT(iPos>=0 && iPos<=GetLength());\n\t\tif( iPos != 0 && (iPos < 0 || iPos >= GetLength()) ) return -1;\n\t\tLPCTSTR p = _tcschr(m_pstr + iPos, ch);\n\t\tif( p == NULL ) return -1;\n\t\treturn (int)(p - m_pstr);\n\t}\n\n\n\tint CDuiString::Find(LPCTSTR pstrSub, int iPos, bool casesensitive) const\n\t{\n\t\tASSERT(!::IsBadStringPtr(pstrSub,-1));\n\t\tASSERT(iPos>=0 && iPos<=GetLength());\n\n\t\tauto laStrIStr = [](LPCTSTR str1, LPCTSTR str2)->LPCTSTR\n\t\t{\n\t\t\tTCHAR *cp = (TCHAR *) str1;\n\t\t\tTCHAR *s1, *s2;\n\n\t\t\tif ( !*str2 )\n\t\t\t\treturn((TCHAR *)str1);\n\n\t\t\twhile (*cp)\n\t\t\t{\n\t\t\t\ts1 = cp;\n\t\t\t\ts2 = (TCHAR *) str2;\n\n\t\t\t\twhile ( *s1 && *s2 && (!(*s1-*s2) || !((*s1|0x20)-(*s2|0x20))))\n\t\t\t\t{\n\t\t\t\t\ts1++, s2++;\n\t\t\t\t}\n\n\t\t\t\tif (!*s2)\n\t\t\t\t\treturn(cp);\n\n\t\t\t\tcp++;\n\t\t\t}\n\n\t\t\treturn(NULL);\n\t\t};\n\t\tif( iPos != 0 && (iPos < 0 || iPos > GetLength()) ) return -1;\n\n\t\tLPCTSTR p;\n\t\tif(casesensitive)\n\t\t\tp = _tcsstr(m_pstr + iPos, pstrSub);\n\t\telse\n\t\t\tp = laStrIStr(m_pstr + iPos, pstrSub);\n\n\t\tif( p == NULL ) return -1;\n\t\treturn (int)(p - m_pstr);\n\t}\n\n\tint CDuiString::ReverseFind(TCHAR ch) const\n\t{\n\t\tLPCTSTR p = _tcsrchr(m_pstr, ch);\n\t\tif( p == NULL ) return -1;\n\t\treturn (int)(p - m_pstr);\n\t}\n\n\tint CDuiString::Replace(LPCTSTR pstrFrom, LPCTSTR pstrTo)\n\t{\n\t\tCDuiString sTemp;\n\t\tint nCount = 0;\n\t\tint iPos = Find(pstrFrom);\n\t\tif( iPos < 0 ) return 0;\n\t\tint cchFrom = (int) _tcslen(pstrFrom);\n\t\tint cchTo = (int) _tcslen(pstrTo);\n\t\twhile( iPos >= 0 ) {\n\t\t\tsTemp = Left(iPos);\n\t\t\tsTemp += pstrTo;\n\t\t\tsTemp += Mid(iPos + cchFrom);\n\t\t\tAssign(sTemp);\n\t\t\tiPos = Find(pstrFrom, iPos + cchTo);\n\t\t\tnCount++;\n\t\t}\n\t\treturn nCount;\n\t}\n\n\n\tvoid CDuiString::TrimLeft(LPCTSTR lpszTargets)\n\t{\n\t\tCDuiString sTemp;\n\n\t\tif (SafeStrlen(lpszTargets) == 0)\n\t\t\treturn;\n\n\t\tLPCTSTR lpsz = m_pstr;\n\n\t\twhile (*lpsz != '\\0')\n\t\t{\n\t\t\tif (_tcschr(lpszTargets, *lpsz) == NULL)\n\t\t\t\tbreak;\n\t\t\tlpsz = _tcsinc(lpsz);\n\t\t}\n\n\t\tif (lpsz != m_pstr)\n\t\t{\n\t\t\tsTemp=Mid(lpsz-m_pstr);\n\t\t\tAssign(sTemp);\n\t\t}\n\n\t}\n\tvoid CDuiString::TrimLeft(TCHAR chTarget)\n\t{\n\t\tCDuiString sTemp;\n\t\tLPCTSTR lpsz = m_pstr;\n\n\t\twhile (chTarget == *lpsz)\n\t\t\tlpsz = _tcsinc(lpsz);\n\n\t\tif (lpsz != m_pstr)\n\t\t{\n\t\t\tsTemp=Mid(lpsz-m_pstr);\n\t\t\tAssign(sTemp);\n\n\t\t}\n\t}\n\tvoid CDuiString::TrimLeft()\n\t{\n\t\tLPCTSTR lpsz = m_pstr;\n\t\tCDuiString sTemp;\n\t\twhile (_istspace(*lpsz))\n\t\t\tlpsz = _tcsinc(lpsz);\n\n\t\tif (lpsz != m_pstr)\n\t\t{\n\t\t\tsTemp=Mid(lpsz-m_pstr);\n\t\t\tAssign(sTemp);\n\n\t\t}\n\t}\n\n\tvoid CDuiString::TrimRight()\n\t{\n\n\t\tLPTSTR lpsz = m_pstr;\n\t\tLPTSTR lpszLast = NULL;\n\n\t\twhile (*lpsz != '\\0')\n\t\t{\n\t\t\tif (_istspace(*lpsz))\n\t\t\t{\n\t\t\t\tif (lpszLast == NULL)\n\t\t\t\t\tlpszLast = lpsz;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlpszLast = NULL;\n\t\t\t}\n\n\t\t\tlpsz = _tcsinc(lpsz);\n\t\t}\n\n\t\tif (lpszLast != NULL)\n\t\t{\n\t\t\t*lpszLast = '\\0';\n\t\t}\n\n\t}\n\tvoid CDuiString::TrimRight(LPCTSTR lpszTargetList)\n\t{\n\n\t\tLPTSTR lpsz = m_pstr;\n\t\tLPTSTR lpszLast = NULL;\n\n\t\twhile (*lpsz != '\\0')\n\t\t{\n\t\t\tif (_tcschr(lpszTargetList, *lpsz) != NULL)\n\t\t\t{\n\t\t\t\tif (lpszLast == NULL)\n\t\t\t\t\tlpszLast = lpsz;\n\t\t\t}\n\t\t\telse\n\t\t\t\tlpszLast = NULL;\n\t\t\tlpsz = _tcsinc(lpsz);\n\t\t}\n\n\t\tif (lpszLast != NULL)\n\t\t{\n\t\t\t*lpszLast = '\\0';\n\t\t}\n\n\t}\n\n\n\n\tvoid CDuiString::TrimRight(TCHAR chTarget)\n\t{\n\t\tLPTSTR lpsz = m_pstr;\n\t\tLPTSTR lpszLast = NULL;\n\n\t\twhile (*lpsz != '\\0')\n\t\t{\n\t\t\tif (*lpsz == chTarget)\n\t\t\t{\n\t\t\t\tif (lpszLast == NULL)\n\t\t\t\t\tlpszLast = lpsz;\n\t\t\t}\n\t\t\telse\n\t\t\t\tlpszLast = NULL;\n\t\t\tlpsz = _tcsinc(lpsz);\n\t\t}\n\n\t\tif (lpszLast != NULL)\n\t\t{\n\t\t\t*lpszLast = '\\0';\n\t\t}\n\n\t}\n\tvoid CDuiString::Trim(LPCTSTR lpszTargetList)\n\t{\n\t\tTrimLeft(lpszTargetList);\n\t\tTrimRight(lpszTargetList);\n\t}\n\tvoid CDuiString::Trim(TCHAR chTarget)\n\t{\n\t\tTrimLeft(chTarget);\n\t\tTrimRight(chTarget);\n\t}\n\tvoid CDuiString::Trim()\n\t{\n\t\tTrimLeft();\n\t\tTrimRight();\n\t}\n\n\tint CDuiString::Remove(TCHAR chRemove)\n\t{\n\n\t\tLPTSTR pstrSource = m_pstr;\n\t\tLPTSTR pstrDest = m_pstr;\n\t\tLPTSTR pstrEnd = m_pstr +GetLength();\n\n\t\twhile (pstrSource < pstrEnd)\n\t\t{\n\t\t\tif (*pstrSource != chRemove)\n\t\t\t{\n\t\t\t\t*pstrDest = *pstrSource; \n\t\t\t\tpstrDest = _tcsinc(pstrDest);\n\t\t\t}\n\t\t\tpstrSource = _tcsinc(pstrSource);\n\t\t}\n\t\t*pstrDest = '\\0';\n\t\t//Ƴַĸ\n\t\tint nCount = pstrSource - pstrDest;\n\n\t\treturn nCount;\n\t}\n\n\tint CDuiString::Format(LPCTSTR pstrFormat, va_list Args)\n\t{\n#if _MSC_VER <= 1400\n\n\t\tTCHAR *szBuffer = NULL;\n\t\tint size = 512, nLen, counts;\n\n\t\t//\n\t\t//  allocate with init size\n\t\t//\n\n\t\tszBuffer = (TCHAR*)malloc(size);\n\t\tZeroMemory(szBuffer, size);\n\n\t\twhile (TRUE){\n\t\t\tcounts = size / sizeof(TCHAR);\n\t\t\tnLen = _vsntprintf (szBuffer, counts, pstrFormat, Args);\n\t\t\tif (nLen != -1 && nLen < counts){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//\n\t\t\t//  expand the buffer.\n\t\t\t//\n\n\t\t\tif (nLen == -1){\n\t\t\t\tsize *= 2;\n\t\t\t}else{\n\t\t\t\tsize += 1 * sizeof(TCHAR);\n\t\t\t}\n\n\n\t\t\t//\n\t\t\t//  realloc the buffer.\n\t\t\t//\n\n\t\t\tif ((szBuffer = (TCHAR*)realloc(szBuffer, size)) != NULL){\n\t\t\t\tZeroMemory(szBuffer, size);\n\t\t\t}else{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tAssign(szBuffer);\n\t\tfree(szBuffer);\n\t\treturn nLen;\n#else\n\t\tint nLen, totalLen;\n\t\tTCHAR *szBuffer;\n\n\t\tnLen = _vsntprintf(NULL, 0, pstrFormat, Args);\n\t\ttotalLen = (nLen + 1)*sizeof(TCHAR);\n\t\tszBuffer = (TCHAR*)malloc(totalLen);\n\t\tZeroMemory(szBuffer, totalLen);\n\t\tnLen = _vsntprintf(szBuffer, nLen + 1, pstrFormat, Args);\n\n\t\tAssign(szBuffer);\n\t\tfree(szBuffer);\n\n\t\treturn nLen;\n\n#endif\n\t}\n\n\tint CDuiString::Format(LPCTSTR pstrFormat, ...)\n\t{\n\t\tint nRet;\n\t\tva_list Args;\n\n\t\tva_start(Args, pstrFormat);\n\t\tnRet = Format(pstrFormat, Args);\n\t\tva_end(Args);\n\n\t\treturn nRet;\n\n\t}\n\n\tint CDuiString::SmallFormat(LPCTSTR pstrFormat, ...)\n\t{\n\t\tCDuiString sFormat = pstrFormat;\n\t\tTCHAR szBuffer[64] = { 0 };\n\t\tva_list argList;\n\t\tva_start(argList, pstrFormat);\n\t\tint iRet = ::_vsntprintf(szBuffer, sizeof(szBuffer), sFormat, argList);\n\t\tva_end(argList);\n\t\tAssign(szBuffer);\n\t\treturn iRet;\n\t}\n\n\n\n\n\t/////////////////////////////////////////////////////////////////////////////\n\n\n\tstatic UINT HashKey(LPCTSTR Key)\n\t{\n\t\tUINT i = 0;\n\t\tSIZE_T len = _tcslen(Key);\n\t\t//i=i*2^32+i+key[i]\n\t\twhile( len-- > 0 ) i = (i << 5) + i + Key[len];\n\t\treturn i;\n\t}\n\n\tstatic UINT HashKey(const CDuiString& Key)\n\t{\n\t\treturn HashKey((LPCTSTR)Key);\n\t};\n\n\tCStdStringPtrMap::CStdStringPtrMap(int nSize) : m_nCount(0)\n\t{\n\t\tif( nSize < 16 ) nSize = 16;\n\t\tm_nBuckets = nSize;\n\t\tm_aT = new TITEM*[nSize];\n\t\tmemset(m_aT, 0, nSize * sizeof(TITEM*));\n\t}\n\n\tCStdStringPtrMap::~CStdStringPtrMap()\n\t{\n\t\tif( m_aT ) {\n\t\t\tint len = m_nBuckets;\n\t\t\twhile( len-- ) {\n\t\t\t\tTITEM* pItem = m_aT[len];\n\t\t\t\twhile( pItem ) {\n\t\t\t\t\tTITEM* pKill = pItem;\n\t\t\t\t\tpItem = pItem->pNext;\n\t\t\t\t\tdelete pKill;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdelete [] m_aT;\n\t\t\tm_aT = NULL;\n\t\t}\n\t}\n\n\tvoid CStdStringPtrMap::RemoveAll()\n\t{\n\t\tthis->Resize(m_nBuckets);\n\t}\n\n\tvoid CStdStringPtrMap::Resize(int nSize)\n\t{\n\t\tif( m_aT ) {\n\t\t\tint len = m_nBuckets;\n\t\t\twhile( len-- ) {\n\t\t\t\tTITEM* pItem = m_aT[len];\n\t\t\t\twhile( pItem ) {\n\t\t\t\t\tTITEM* pKill = pItem;\n\t\t\t\t\tpItem = pItem->pNext;\n\t\t\t\t\tdelete pKill;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdelete [] m_aT;\n\t\t\tm_aT = NULL;\n\t\t}\n\n\t\tif( nSize < 0 ) nSize = 0;\n\t\tif( nSize > 0 ) {\n\t\t\tm_aT = new TITEM*[nSize];\n\t\t\tmemset(m_aT, 0, nSize * sizeof(TITEM*));\n\t\t} \n\t\tm_nBuckets = nSize;\n\t\tm_nCount = 0;\n\t}\n\n\t// boptimize:Żǰƣʹüӿٶ\n\tLPVOID CStdStringPtrMap::Find(LPCTSTR key, bool optimize) const\n\t{\n\t\tif( m_nBuckets == 0 || GetSize() == 0 ) return NULL;\n\n\t\tUINT slot = HashKey(key) % m_nBuckets;\n\t\tfor( TITEM* pItem = m_aT[slot]; pItem; pItem = pItem->pNext ) {\n\t\t\tif( pItem->Key == key ) {\n\t\t\t\tif (optimize && pItem != m_aT[slot]) {\n\t\t\t\t\tif (pItem->pNext) {\n\t\t\t\t\t\tpItem->pNext->pPrev = pItem->pPrev;\n\t\t\t\t\t}\n\t\t\t\t\tpItem->pPrev->pNext = pItem->pNext;\n\t\t\t\t\tpItem->pPrev = NULL;\n\t\t\t\t\tpItem->pNext = m_aT[slot];\n\t\t\t\t\tpItem->pNext->pPrev = pItem;\n\t\t\t\t\t//itemƶͷ\n\t\t\t\t\tm_aT[slot] = pItem;\n\t\t\t\t}\n\t\t\t\treturn pItem->Data;\n\t\t\t}        \n\t\t}\n\n\t\treturn NULL;\n\t}\n\n\tbool CStdStringPtrMap::Insert(LPCTSTR key, LPVOID pData)\n\t{\n\t\tif( m_nBuckets == 0 ) return false;\n\t\tif( Find(key) ) return false;\n\n\t\t// Add first in bucket\n\t\tUINT slot = HashKey(key) % m_nBuckets;\n\t\tTITEM* pItem = new TITEM;\n\t\tpItem->Key = key;\n\t\tpItem->Data = pData;\n\t\tpItem->pPrev = NULL;\n\t\tpItem->pNext = m_aT[slot];\n\t\tif (pItem->pNext)\n\t\t\tpItem->pNext->pPrev = pItem;\n\t\tm_aT[slot] = pItem;\n\t\tm_nCount++;\n\t\treturn true;\n\t}\n\n\tLPVOID CStdStringPtrMap::Set(LPCTSTR key, LPVOID pData)\n\t{\n\t\tif( m_nBuckets == 0 ) return pData;\n\n\t\tif (GetSize()>0) {\n\t\t\tUINT slot = HashKey(key) % m_nBuckets;\n\t\t\t// Modify existing item\n\t\t\tfor( TITEM* pItem = m_aT[slot]; pItem; pItem = pItem->pNext ) {\n\t\t\t\tif( pItem->Key == key ) {\n\t\t\t\t\tLPVOID pOldData = pItem->Data;\n\t\t\t\t\tpItem->Data = pData;\n\t\t\t\t\treturn pOldData;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tInsert(key, pData);\n\t\treturn NULL;\n\t}\n\n\tbool CStdStringPtrMap::Remove(LPCTSTR key)\n\t{\n\t\tif( m_nBuckets == 0 || GetSize() == 0 ) return false;\n\n\t\tUINT slot = HashKey(key) % m_nBuckets;\n\t\tTITEM** ppItem = &m_aT[slot];\n\t\twhile( *ppItem ) {\n\t\t\tif( (*ppItem)->Key == key ) {\n\t\t\t\tTITEM* pKill = *ppItem;\n\t\t\t\t*ppItem = (*ppItem)->pNext;\n\t\t\t\tif (*ppItem)\n\t\t\t\t\t(*ppItem)->pPrev = pKill->pPrev;\n\t\t\t\tdelete pKill;\n\t\t\t\tm_nCount--;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tppItem = &((*ppItem)->pNext);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tint CStdStringPtrMap::GetSize() const\n\t{\n#if 0//def _DEBUG\n\t\tint nCount = 0;\n\t\tint len = m_nBuckets;\n\t\twhile( len-- ) {\n\t\t\tfor( const TITEM* pItem = m_aT[len]; pItem; pItem = pItem->pNext ) nCount++;\n\t\t}\n\t\tASSERT(m_nCount==nCount);\n#endif\n\t\treturn m_nCount;\n\t}\n\n\tLPCTSTR CStdStringPtrMap::GetAt(int iIndex) const\n\t{\n\t\tif( m_nBuckets == 0 || GetSize() == 0 ) return false;\n\n\t\tint pos = 0;\n\t\tint len = m_nBuckets;\n\t\twhile( len-- ) {\n\t\t\tfor( TITEM* pItem = m_aT[len]; pItem; pItem = pItem->pNext ) {\n\t\t\t\tif( pos++ == iIndex ) {\n\t\t\t\t\treturn pItem->Key.GetData();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn NULL;\n\t}\n\n\tLPCTSTR CStdStringPtrMap::operator[] (int nIndex) const\n\t{\n\t\treturn GetAt(nIndex);\n\t}\n\n\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\t//\n\n\tCWaitCursor::CWaitCursor()\n\t{\n\t\tm_hOrigCursor = ::SetCursor(::LoadCursor(NULL, IDC_WAIT));\n\t}\n\n\tCWaitCursor::~CWaitCursor()\n\t{\n\t\t::SetCursor(m_hOrigCursor);\n\t}\n\n} // namespace DuiLib\n"
  },
  {
    "path": "DuiLib/Utils/Utils.h",
    "content": "#ifndef __UTILS_H__\n#define __UTILS_H__\n\n#pragma once\n\nnamespace DuiLib\n{\n\t/////////////////////////////////////////////////////////////////////////////////////\n\t//\n\n\tclass STRINGorID\n\t{\n\tpublic:\n\t\tSTRINGorID(LPCTSTR lpString) : m_lpstr(lpString)\n\t\t{ }\n\t\tSTRINGorID(UINT nID) : m_lpstr(MAKEINTRESOURCE(nID))\n\t\t{ }\n\t\tLPCTSTR m_lpstr;\n\t};\n\n\n#pragma region CPoint\n\tclass UILIB_API CPoint : public tagPOINT\n\t{\n\tpublic:\n\t\tCPoint();\n\t\tCPoint(const POINT& src);\n\t\tCPoint(int x, int y);\n\t\tCPoint(LPARAM lParam);\n\t};\n\n#pragma endregion\n#pragma region CSize\n\n\tclass UILIB_API CSize : public tagSIZE\n\t{\n\tpublic:\n\t\tCSize();\n\t\tCSize(const SIZE& src);\n\t\tCSize(const RECT rc);\n\t\tCSize(int cx, int cy);\n\t};\n\n#pragma endregion\n#pragma region CDuiRect\n\n\tclass UILIB_API CDuiRect : public tagRECT\n\t{\n\tpublic:\n\t\tCDuiRect();\n\t\tCDuiRect(const RECT& src);\n\t\tCDuiRect(int iLeft, int iTop, int iRight, int iBottom);\n\n\t\tint GetWidth() const;\n\t\tint GetHeight() const;\n\t\tvoid Empty();\n\t\tbool IsNull() const;\n\t\t//ϲ\n\t\tvoid Join(const RECT& rc);\n\t\t\n\t\tvoid ResetOffset();\n\t\t//ʽ(left<right,top<bottom)\n\t\tvoid Normalize();\n\t\tvoid Offset(int cx, int cy);\n\t\t//\n\t\tvoid Inflate(int cx, int cy);\n\t\t//\n\t\tvoid Deflate(int cx, int cy);\n\t\t//\n\t\tvoid Union(CDuiRect& rc);\n\t};\n#pragma endregion\n#pragma region CStdPtrArray\n\n\tclass UILIB_API CStdPtrArray\n\t{\n\tpublic:\n\t\tCStdPtrArray(int iPreallocSize = 0);\n\t\tCStdPtrArray(const CStdPtrArray& src);\n\t\t~CStdPtrArray();\n\n\t\tvoid Empty();\n\t\tvoid Resize(int iSize);\n\t\tbool IsEmpty() const;\n\t\tint Find(LPVOID iIndex) const;\n\t\tbool Add(LPVOID pData);\n\t\tbool SetAt(int iIndex, LPVOID pData);\n\t\tbool InsertAt(int iIndex, LPVOID pData);\n\t\tbool Remove(int iIndex);\n\t\tint GetSize() const;\n\t\tLPVOID* GetData();\n\n\t\tLPVOID GetAt(int iIndex) const;\n\t\tLPVOID operator[] (int nIndex) const;\n\n\tprotected:\n\t\tLPVOID* m_ppVoid;\n\t\tint m_nCount;\t  //ָ\n\t\tint m_nAllocated; //ѷڴ\n\t};\n\n\ttemplate<typename T = LPVOID>\n\tclass  TStdPtrArray : public CStdPtrArray\n\t{\n\tpublic:\n\t\tTStdPtrArray(int iPreallocSize = 0):CStdPtrArray(iPreallocSize){};\n\t\tTStdPtrArray(const TStdPtrArray& src):CStdPtrArray(src){};\n\t\tint Find(T iIndex) const {return CStdPtrArray::Find(iIndex);};\n\t\tbool Add(T pData){return CStdPtrArray::Add(pData);};\n\t\tbool SetAt(int iIndex, T pData){return CStdPtrArray::SetAt(iIndex,pData);};\n\t\tbool InsertAt(int iIndex, T pData){return CStdPtrArray::InsertAt(iIndex,pData);};\n\t\tbool Remove(int iIndex,bool bDeleteObj = false){\n\t\t\tif(bDeleteObj){\n\t\t\t\tT p = GetAt(iIndex);\n\t\t\t\tif(p)\n\t\t\t\t\tdelete p;\n\t\t\t}\n\t\t\treturn CStdPtrArray::Remove(iIndex);\n\t\t}\n\t\tT* GetData(){return static_cast<T>(CStdPtrArray::GetData());};\n\t\tT GetAt(int iIndex) const {return static_cast<T>(CStdPtrArray::GetAt(iIndex));};\n\t\tT operator[] (int nIndex) const{return static_cast<T>(CStdPtrArray::operator[](nIndex));};\n\t};\n\n\n#pragma endregion\n#pragma region CStdValArray\n\n\tclass UILIB_API CStdValArray\n\t{\n\tpublic:\n\t\tCStdValArray(int iElementSize, int iPreallocSize = 0);\n\t\t~CStdValArray();\n\n\t\tvoid Empty();\n\t\tbool IsEmpty() const;\n\t\tbool Add(LPCVOID pData);\n\t\tbool Remove(int iIndex);\n\t\tint GetSize() const;\n\t\tLPVOID GetData();\n\n\t\tLPVOID GetAt(int iIndex) const;\n\t\tLPVOID operator[] (int nIndex) const;\n\n\tprotected:\n\t\tLPBYTE m_pVoid;\n\t\tint m_iElementSize;\n\t\tint m_nCount;\n\t\tint m_nAllocated;\n\t};\n\n\ttemplate<typename T = LPVOID,typename T1 = T>\n\tclass  TStdValArray : public CStdValArray\n\t{\n\tpublic:\n\t\tTStdValArray(int iElementSize = sizeof(T), int iPreallocSize = 0):CStdValArray(iElementSize,iPreallocSize){};\n\t\tbool Add(const T1 pData)\n\t\t{\n\t\t\treturn CStdValArray::Add((LPCVOID)&pData);\n\t\t};\n\t\tbool InsertAt(int iIndex,const T pData)\n\t\t{\n\t\t\tif (iIndex == m_nCount)\n\t\t\t{\n\t\t\t\treturn Add(pData);\n\t\t\t}\n\t\t\tif (iIndex < 0 || iIndex > m_nCount)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif( ++m_nCount >= m_nAllocated) \n\t\t\t{\n\t\t\t\tint nAllocated = m_nAllocated * 2;\n\t\t\t\tif( nAllocated == 0 ) nAllocated = 11;\n\t\t\t\tLPBYTE pVoid = static_cast<LPBYTE>(realloc(m_pVoid, nAllocated * m_iElementSize));\n\t\t\t\tif( pVoid != NULL )\n\t\t\t\t{\n\t\t\t\t\tm_nAllocated = nAllocated;\n\t\t\t\t\tm_pVoid = pVoid;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t--m_nCount;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmemmove(&m_pVoid + (iIndex+1) * m_iElementSize, &m_pVoid + iIndex * m_iElementSize,m_iElementSize);\n\t\t\t::CopyMemory(m_pVoid + (iIndex * m_iElementSize), &pData, m_iElementSize);\n\t\t\treturn true;\n\t\t}\n\t\tT GetData()\n\t\t{\n\t\t\treturn static_cast<T>(CStdValArray::GetData());\n\t\t};\n\t\tT GetAt(int iIndex) const \n\t\t{\n\t\t\treturn *static_cast<T1*>(CStdValArray::GetAt(iIndex));\n\t\t};\n\t\tT operator[] (int nIndex) const\n\t\t{\n\t\t\treturn (T)CStdValArray:::operator[](nIndex);\n\t\t};\n\t};\n\n#pragma endregion\n#pragma region CDuiString\n\n\t/*\n\ttemplate<typename T>\n\tclass CTDUIString\n\t{\n\tpublic:\n\tenum { MAX_LOCAL_STRING_LEN = 63 };\n\t//캯\n\tCTDUIString();\n\tCTDUIString(const T ch);\n\tCTDUIString(const CTDUIString& src);\n\tCTDUIString(const T* lpsz, int nLen = -1);\n\t~CTDUIString();\n\n\tprotected:\n\tT* m_pstr;\n\tT m_szBuffer[MAX_LOCAL_STRING_LEN + 1];\n\t};\n\n\n\n\tCTDUIString<TCHAR> mytstring;\n\tCTDUIString<WCHAR> mywtstring;\n\tCTDUIString<CHAR> mystring;\n\t*/\n\tclass UILIB_API CDuiString\n\t{\n\tpublic:\n\t\tenum { MAX_LOCAL_STRING_LEN = 63 };\n\n\t\t//캯\n\t\tCDuiString();\n\t\tCDuiString(const TCHAR ch);\n\t\tCDuiString(const CDuiString& src);\n\t\tCDuiString(LPCTSTR lpsz, int nLen = -1);\n\t\t~CDuiString();\n\n\t\tvoid Empty();\n\t\tint GetLength() const;\n\t\tbool IsEmpty() const;\n\t\tint SafeStrlen(LPCTSTR lpsz);\n\n\t\tvoid Append(LPCTSTR pstr);\n\t\tvoid Assign(LPCTSTR pstr, int nLength = -1);\n\t\tLPCTSTR GetData() const;\n\n\t\tTCHAR GetAt(int nIndex) const;\n\t\tvoid SetAt(int nIndex, TCHAR ch);\n\t\t//һַ,\n\t\tvoid Insert(int nIndex, TCHAR ch); \n\t\tvoid Insert(int nIndex, LPCTSTR pstr);\n\n\t\t//ת\n\t\toperator LPCTSTR() const;\n\t\t//\n\t\tTCHAR operator[] (int nIndex) const;\n\t\tconst CDuiString& operator=(const CDuiString& src);\n\t\tconst CDuiString& operator=(const TCHAR ch);\n\t\tconst CDuiString& operator=(LPCTSTR pstr);\n#ifdef _UNICODE\n\t\tconst CDuiString& CDuiString::operator=(LPCSTR lpStr);\n\t\tconst CDuiString& CDuiString::operator+=(LPCSTR lpStr);\n#else\n\t\tconst CDuiString& CDuiString::operator=(LPCWSTR lpwStr);\n\t\tconst CDuiString& CDuiString::operator+=(LPCWSTR lpwStr);\n#endif\n\t\tCDuiString operator+(const CDuiString& src) const;\n\t\tCDuiString operator+(LPCTSTR pstr) const;\n\t\tconst CDuiString& operator+=(const CDuiString& src);\n\t\tconst CDuiString& operator+=(LPCTSTR pstr);\n\t\tconst CDuiString& operator+=(const TCHAR ch);\n\n\t\tbool operator != (LPCTSTR str) const;\n\t\tbool operator <= (LPCTSTR str) const;\n\t\tbool operator <  (LPCTSTR str) const;\n\t\tbool operator >= (LPCTSTR str) const;\n\t\tbool operator >  (LPCTSTR str) const;\n\n\t\tint Compare(LPCTSTR pstr) const;\n\t\tint CompareNoCase(LPCTSTR pstr) const;\n\n\t\tvoid MakeUpper();\n\t\tvoid MakeLower();\n\t\tvoid MakeReverse();\n\t\t//ü\n\t\tCDuiString Left(int nLength) const;\n\t\tCDuiString Mid(int iPos, int nLength = -1) const;\n\t\tCDuiString Right(int nLength) const;\n\t\t//\n\t\tint Find(TCHAR ch, int iPos = 0) const;\n\t\tint Find(LPCTSTR pstr, int iPos = 0, bool casesensitive=true) const;\n\t\tint ReverseFind(TCHAR ch) const;\n\t\t//滻\n\t\tint Replace(LPCTSTR pstrFrom, LPCTSTR pstrTo);\n\t\t//޼ַ\n\t\tvoid TrimLeft(LPCTSTR lpszTargets);\n\t\tvoid TrimLeft(TCHAR chTarget);\n\t\tvoid TrimLeft();\n\t\tvoid TrimRight(LPCTSTR lpszTargetList);\n\t\tvoid TrimRight(TCHAR chTarget);\n\t\tvoid TrimRight();\n\t\tvoid Trim(LPCTSTR lpszTargetList);\n\t\tvoid Trim(TCHAR chTarget);\n\t\tvoid Trim();\n\t\t//\n\t\tint Remove(TCHAR chRemove);\n\t\t//63λַʽ\n\t\tint __cdecl Format(LPCTSTR pstrFormat, ...);\n\t\tint __cdecl Format(LPCTSTR pstrFormat, va_list Args);\n\t\t//һθʽ1024ȵַʽ\n\t\tint __cdecl SmallFormat(LPCTSTR pstrFormat, ...);\n\tprotected:\n\t\tLPTSTR m_pstr;\n\t\tTCHAR m_szBuffer[MAX_LOCAL_STRING_LEN + 1];\n\t};\n\n\n\tbool operator==(const DuiLib::CDuiString& s1, const DuiLib::CDuiString& s2);\n\tbool operator==(const DuiLib::CDuiString& s1, LPCTSTR  s2);\n\tbool operator==(LPCTSTR s1, const DuiLib::CDuiString& s2);\n\n\tinline bool operator==(const CDuiString& s1, const CDuiString& s2)\n\t{ return s1.Compare(s2.GetData()) == 0; }\n\tinline bool operator==(const CDuiString& s1, LPCTSTR s2)\n\t{ return s1.Compare(s2) == 0; }\n\tinline bool operator==(LPCTSTR s1, const CDuiString& s2)\n\t{ return s2.Compare(s1) == 0; }\n\n#pragma endregion\n\n\tstruct TITEM\n\t{\n\t\tCDuiString Key;\n\t\tLPVOID Data;\n\t\tstruct TITEM* pPrev;\n\t\tstruct TITEM* pNext;\n\t};\n\n#pragma region CStdStringPtrMap\n\tclass UILIB_API CStdStringPtrMap\n\t{\n\tpublic:\n\t\tCStdStringPtrMap(int nSize = 83);\n\t\t~CStdStringPtrMap();\n\n\t\tvoid Resize(int nSize = 83);\n\t\tLPVOID Find(LPCTSTR key, bool optimize = true) const;\n\t\tbool Insert(LPCTSTR key, LPVOID pData);\n\t\tLPVOID Set(LPCTSTR key, LPVOID pData);\n\t\tbool Remove(LPCTSTR key);\n\t\tvoid RemoveAll();\n\t\tint GetSize() const;\n\t\tLPCTSTR GetAt(int iIndex) const;\n\t\tLPCTSTR operator[] (int nIndex) const;\n\n\tprotected:\n\t\tTITEM** m_aT;\n\t\tint m_nBuckets;//\n\t\tint m_nCount;\n\t};\n\n\ttemplate<typename T = LPVOID>\n\tclass UILIB_API TStdStringPtrMap : public CStdStringPtrMap\n\t{\n\tpublic:\n\t\tTStdStringPtrMap(int nSize = 83):CStdStringPtrMap(nSize){};\n\t\tT GetAtObj(int iIndex) const {\n\t\t\tLPCTSTR nkey = GetAt(iIndex);\n\t\t\tif(!nkey)\n\t\t\t\treturn NULL;\n\t\t\treturn Find(nkey);\n\t\t}\n\t\tT Find(LPCTSTR key, bool optimize = true) const{return static_cast<T>(CStdStringPtrMap::Find(key,optimize));};\n\t\tbool Insert(LPCTSTR key,T pData){return CStdStringPtrMap::Insert(key,pData);};\n\t\tT Set(LPCTSTR key,T pData){return static_cast<T>(CStdStringPtrMap::Set(key,pData));};\n\t};\n\n#pragma endregion \n#pragma region CWaitCursor\n\tclass UILIB_API CWaitCursor\n\t{\n\tpublic:\n\t\tCWaitCursor();\n\t\t~CWaitCursor();\n\n\tprotected:\n\t\tHCURSOR m_hOrigCursor;\n\t};\n\n#pragma endregion \n#pragma region CVariant\n\n\tclass UILIB_API CVariant : public VARIANT\n\t{\n\tpublic:\n\t\tCVariant() \n\t\t{ \n\t\t\tVariantInit(this); \n\t\t}\n\t\tCVariant(int i)\n\t\t{\n\t\t\tVariantInit(this);\n\t\t\tthis->vt = VT_I4;\n\t\t\tthis->intVal = i;\n\t\t}\n\t\tCVariant(float f)\n\t\t{\n\t\t\tVariantInit(this);\n\t\t\tthis->vt = VT_R4;\n\t\t\tthis->fltVal = f;\n\t\t}\n\t\tCVariant(LPOLESTR s)\n\t\t{\n\t\t\tVariantInit(this);\n\t\t\tthis->vt = VT_BSTR;\n\t\t\tthis->bstrVal = s;\n\t\t}\n\t\tCVariant(IDispatch *disp)\n\t\t{\n\t\t\tVariantInit(this);\n\t\t\tthis->vt = VT_DISPATCH;\n\t\t\tthis->pdispVal = disp;\n\t\t}\n\n\t\t~CVariant() \n\t\t{ \n\t\t\tVariantClear(this); \n\t\t}\n\t};\n#pragma endregion\n\n\n}// namespace DuiLib\n\n\n\n\n#endif // __UTILS_H__"
  },
  {
    "path": "DuiLib/Utils/WebBrowserEventHandler.h",
    "content": "#pragma once\n#include <ExDisp.h>\n#include <ExDispid.h>\n#include <mshtmhst.h>\n\nnamespace DuiLib\n{\n\tclass CWebBrowserEventHandler\n\t{\n\tpublic:\n\t\tCWebBrowserEventHandler() {}\n\t\t~CWebBrowserEventHandler() {}\n\t\t//Fires before navigation occurs in the given object (on either a window element or a frameset element).\n\t\tvirtual void BeforeNavigate2( IDispatch *pDisp,VARIANT *&url,VARIANT *&Flags,VARIANT *&TargetFrameName,VARIANT *&PostData,VARIANT *&Headers,VARIANT_BOOL *&Cancel ) {}\n\t\t//Fires when an error occurs during navigation.\n\t\tvirtual void NavigateError(IDispatch *pDisp,VARIANT * &url,VARIANT *&TargetFrameName,VARIANT *&StatusCode,VARIANT_BOOL *&Cancel) {}\n\t\t//Fires after a navigation to a link is completed on a window element or a frameSet element.\n\t\tvirtual void NavigateComplete2(IDispatch *pDisp,VARIANT *&url){}\n\t\t//Fires when the progress of a download operation is updated on the object.\n\t\tvirtual void ProgressChange(LONG nProgress, LONG nProgressMax){}\n\t\t//Raised when a new window is to be created. Extends NewWindow2 with additional information about the new window.\n\t\tvirtual void NewWindow3(IDispatch **pDisp, VARIANT_BOOL *&Cancel, DWORD dwFlags, BSTR bstrUrlContext, BSTR bstrUrl){}\n\t\t//Fires when a new window is to be created.\n\t\tvirtual void NewWindow2(VARIANT_BOOL *&Cancel, BSTR bstrUrl){}\n\t\t//Fires when the enabled state of a command changes.\n\t\tvirtual void CommandStateChange(long Command,VARIANT_BOOL Enable){}\n\t\t//Fires when a document is completely loaded and initialized.\n\t\tvirtual void DocmentComplete(IDispatch *pDisp, VARIANT *&url){}\n\t\t// interface IDocHostUIHandler\n\t\tvirtual HRESULT STDMETHODCALLTYPE ShowContextMenu(\n\t\t\t/* [in] */ DWORD dwID,\n\t\t\t/* [in] */ POINT __RPC_FAR *ppt,\n\t\t\t/* [in] */ IUnknown __RPC_FAR *pcmdtReserved,\n\t\t\t/* [in] */ IDispatch __RPC_FAR *pdispReserved)\n\t\t{\n\t\t\t//return E_NOTIMPL;\n\t\t\t// E_NOTIMPL ϵͳҼ˵\n\t\t\treturn S_OK;\n\t\t\t//S_OK ϵͳҼ˵\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE GetHostInfo(\n\t\t\t/* [out][in] */ DOCHOSTUIINFO __RPC_FAR *pInfo)\n\t\t{\n\t\t\t\n\t\t\tif (pInfo != NULL)\n\t\t\t{\n\t\t\t\tpInfo->cbSize = sizeof(DOCHOSTUIINFO);\n\t\t\t\tpInfo->dwFlags |= DOCHOSTUIFLAG_NO3DBORDER;// ȥ3D߿ һμػб߿ȷ about:blank, Ȼٷַ\n\t\t\t\tpInfo->dwDoubleClick = DOCHOSTUIDBLCLK_DEFAULT;\n\t\t\t\tpInfo->pchHostCss = 0;\n\t\t\t\tpInfo->pchHostNS = 0;\n\t\t\t}\n\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE ShowUI(\n\t\t\t/* [in] */ DWORD dwID,\n\t\t\t/* [in] */ IOleInPlaceActiveObject __RPC_FAR *pActiveObject,\n\t\t\t/* [in] */ IOleCommandTarget __RPC_FAR *pCommandTarget,\n\t\t\t/* [in] */ IOleInPlaceFrame __RPC_FAR *pFrame,\n\t\t\t/* [in] */ IOleInPlaceUIWindow __RPC_FAR *pDoc)\n\t\t{\n\t\t\treturn S_FALSE;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE HideUI( void)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE UpdateUI( void)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE EnableModeless(\n\t\t\t/* [in] */ BOOL fEnable)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE OnDocWindowActivate(\n\t\t\t/* [in] */ BOOL fActivate)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE OnFrameWindowActivate(\n\t\t\t/* [in] */ BOOL fActivate)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE ResizeBorder(\n\t\t\t/* [in] */ LPCRECT prcBorder,\n\t\t\t/* [in] */ IOleInPlaceUIWindow __RPC_FAR *pUIWindow,\n\t\t\t/* [in] */ BOOL fRameWindow)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE TranslateAccelerator(\n\t\t\t/* [in] */ LPMSG lpMsg,\n\t\t\t/* [in] */ const GUID __RPC_FAR *pguidCmdGroup,\n\t\t\t/* [in] */ DWORD nCmdID)\n\t\t{\n\t\t\treturn S_FALSE;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE GetOptionKeyPath(\n\t\t\t/* [out] */ LPOLESTR __RPC_FAR *pchKey,\n\t\t\t/* [in] */ DWORD dw)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE GetDropTarget(\n\t\t\t/* [in] */ IDropTarget __RPC_FAR *pDropTarget,\n\t\t\t/* [out] */ IDropTarget __RPC_FAR *__RPC_FAR *ppDropTarget)\n\t\t{\n\t\t\treturn E_NOTIMPL;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE GetExternal(\n\t\t\t/* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppDispatch)\n\t\t{\n\t\t\treturn E_NOTIMPL;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE TranslateUrl(\n\t\t\t/* [in] */ DWORD dwTranslate,\n\t\t\t/* [in] */ OLECHAR __RPC_FAR *pchURLIn,\n\t\t\t/* [out] */ OLECHAR __RPC_FAR *__RPC_FAR *ppchURLOut)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\tvirtual HRESULT STDMETHODCALLTYPE FilterDataObject(\n\t\t\t/* [in] */ IDataObject __RPC_FAR *pDO,\n\t\t\t/* [out] */ IDataObject __RPC_FAR *__RPC_FAR *ppDORet)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\n\t\t// \tvirtual HRESULT STDMETHODCALLTYPE GetOverrideKeyPath( \n\t\t// \t\t/* [annotation][out] */ \n\t\t// \t\t__deref_out  LPOLESTR *pchKey,\n\t\t// \t\t/* [in] */ DWORD dw)\n\t\t// \t{\n\t\t// \t\treturn E_NOTIMPL;\n\t\t// \t}\n\n\t\t// IDownloadManager\n\t\tvirtual HRESULT STDMETHODCALLTYPE Download( \n\t\t\t/* [in] */ IMoniker *pmk,\n\t\t\t/* [in] */ IBindCtx *pbc,\n\t\t\t/* [in] */ DWORD dwBindVerb,\n\t\t\t/* [in] */ LONG grfBINDF,\n\t\t\t/* [in] */ BINDINFO *pBindInfo,\n\t\t\t/* [in] */ LPCOLESTR pszHeaders,\n\t\t\t/* [in] */ LPCOLESTR pszRedir,\n\t\t\t/* [in] */ UINT uiCP)\n\t\t{\n\t\t\treturn S_OK;\n\t\t}\n\t};\n}\n"
  },
  {
    "path": "DuiLib/Utils/WinImplBase.cpp",
    "content": "#include \"stdafx.h\"\n#include \"WinImplBase.h\"\n\n#include <windows.h>\n\nnamespace DuiLib\n{\n\n\tLPBYTE WindowImplBase::m_lpResourceZIPBuffer=NULL;\n\n\tDUI_BEGIN_MESSAGE_MAP(WindowImplBase,CNotifyPump)\n\t\tDUI_ON_MSGTYPE(DUI_MSGTYPE_CLICK,OnClick)\n\t\tDUI_END_MESSAGE_MAP()\n\n\tWindowImplBase::WindowImplBase()\n\t{\n\t\tm_dwWindowPosState = SIZE_MINIMIZED;\n\t};\n\tWindowImplBase::~WindowImplBase()\n\t{\n\n\t};\n\tvoid WindowImplBase::OnFinalMessage( HWND hWnd )\n\t{\n\t\tm_PaintManager.RemovePreMessageFilter(this);\n\t\tm_PaintManager.RemoveNotifier(this);\n\t\tm_PaintManager.ReapObjects(m_PaintManager.GetRoot());\n\t}\n\n\tLRESULT WindowImplBase::ResponseDefaultKeyEvent(WPARAM wParam)\n\t{\n\t\tif (wParam == VK_RETURN)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\telse if (wParam == VK_ESCAPE)\n\t\t{\n\t\t\tClose();\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}\n\n\tUINT WindowImplBase::GetClassStyle() const\n\t{\n\t\treturn CS_DBLCLKS;\n\t}\n\n\tUILIB_RESOURCETYPE WindowImplBase::GetResourceType() const\n\t{\n\t\treturn UILIB_FILE;\n\t}\n\n\tCDuiString WindowImplBase::GetZIPFileName() const\n\t{\n\t\treturn _T(\"\");\n\t}\n\n\tLPCTSTR WindowImplBase::GetResourceID() const\n\t{\n\t\treturn _T(\"\");\n\t}\n\n\tCControlUI* WindowImplBase::CreateControl(LPCTSTR pstrClass)\n\t{\n\t\treturn NULL;\n\t}\n\tCPaintManagerUI* WindowImplBase::GetPaintManager()\n\t{\n\t\treturn &m_PaintManager;\n\t}\n\n\tCControlUI* WindowImplBase::FindControl(POINT pt)\n\t{\n\t\treturn m_PaintManager.FindControl(pt);\n\t}\n\n\tCControlUI* WindowImplBase::FindControl(LPCTSTR pstrName)\n\t{\n\t\treturn m_PaintManager.FindControl(pstrName);\n\t}\n\n\tLRESULT WindowImplBase::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM /*lParam*/, bool& bHandled)\n\t{\n\t\tif (uMsg == WM_KEYDOWN)\n\t\t{\n\t\t\tswitch (wParam)\n\t\t\t{\n\t\t\tcase VK_RETURN:\n\t\t\tcase VK_ESCAPE:\n\t\t\t\tbHandled = !!ResponseDefaultKeyEvent(wParam); //޸һESC¶ڹرյ\n\t\t\t\treturn 0;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}\n\n\tLRESULT WindowImplBase::OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n#if defined(WIN32) && !defined(UNDER_CE)\n\tLRESULT WindowImplBase::OnNcActivate(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled)\n\t{\n\t\tif( ::IsIconic(*this) ) bHandled = FALSE;\n\t\treturn (wParam == 0) ? TRUE : FALSE;\n\t}\n\n\tLRESULT WindowImplBase::OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\t//LPRECT pRect=NULL;\n\n\t\t//if ( wParam == TRUE)\n\t\t//{\n\t\t//\tLPNCCALCSIZE_PARAMS pParam = (LPNCCALCSIZE_PARAMS)lParam;\n\t\t//\tpRect=&pParam->rgrc[0];\n\t\t//}\n\t\t//else\n\t\t//{\n\t\t//\tpRect=(LPRECT)lParam;\n\t\t//}\n\n\t\t//if ( ::IsZoomed(m_hWnd))\n\t\t//{\t// ʱ㵱ǰʾʺϿ߶\n\t\t//\tMONITORINFO oMonitor = {};\n\t\t//\toMonitor.cbSize = sizeof(oMonitor);\n\t\t//\t::GetMonitorInfo(::MonitorFromWindow(*this, MONITOR_DEFAULTTONEAREST), &oMonitor);\n\t\t//\tCDuiRect rcWork = oMonitor.rcWork;\n\t\t//\tCDuiRect rcMonitor = oMonitor.rcMonitor;\n\t\t//\trcWork.Offset(-oMonitor.rcMonitor.left, -oMonitor.rcMonitor.top);\n\t\t//\t\n\t\t//\tpRect->top = pRect->left = 0;\n\t\t//\tpRect->right = pRect->left + rcWork.GetWidth();\n\t\t//\tpRect->bottom = pRect->top + rcWork.GetHeight();\n\t\t//\t//ʱ޶󴰿ڵķΧ\n\t\t//\tSIZE sz = m_PaintManager.GetMaxInfo();\n\t\t//\tif(sz.cx != 0 && sz.cy!= 0)\n\t\t//\t{\n\t\t//\t\tpRect->right = pRect->right>sz.cx?sz.cx:pRect->right;\n\t\t//\t\tpRect->bottom = pRect->bottom>sz.cy?sz.cy:pRect->bottom;\n\t\t//\t}\n\n\t\t//\treturn WVR_REDRAW;\n\t\t//}\n\n\t\treturn WVR_REDRAW;\n\t}\n\n\tLRESULT WindowImplBase::OnNcPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)\n\t{\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tPOINT pt; pt.x = GET_X_LPARAM(lParam); pt.y = GET_Y_LPARAM(lParam);\n\t\t::ScreenToClient(*this, &pt);\n\n\t\tRECT rcClient;\n\t\t::GetClientRect(*this, &rcClient);\n\n\t\tif( !::IsZoomed(*this) )\n\t\t{\n\t\t\tRECT rcSizeBox = m_PaintManager.GetSizeBox();\n\t\t\tif( pt.y < rcClient.top + rcSizeBox.top )\n\t\t\t{\n\t\t\t\tif( pt.x < rcClient.left + rcSizeBox.left ) return HTTOPLEFT;\n\t\t\t\tif( pt.x > rcClient.right - rcSizeBox.right ) return HTTOPRIGHT;\n\t\t\t\treturn HTTOP;\n\t\t\t}\n\t\t\telse if( pt.y > rcClient.bottom - rcSizeBox.bottom )\n\t\t\t{\n\t\t\t\tif( pt.x < rcClient.left + rcSizeBox.left ) return HTBOTTOMLEFT;\n\t\t\t\tif( pt.x > rcClient.right - rcSizeBox.right ) return HTBOTTOMRIGHT;\n\t\t\t\treturn HTBOTTOM;\n\t\t\t}\n\n\t\t\tif( pt.x < rcClient.left + rcSizeBox.left ) return HTLEFT;\n\t\t\tif( pt.x > rcClient.right - rcSizeBox.right ) return HTRIGHT;\n\t\t}\n\n\t\tRECT rcCaption = m_PaintManager.GetCaptionRect();\n\t\tif( pt.x >= rcClient.left + rcCaption.left && pt.x < rcClient.right - rcCaption.right \\\n\t\t\t&& pt.y >= rcCaption.top && pt.y < rcCaption.bottom ) {\n\t\t\t\tCControlUI* pControl = static_cast<CControlUI*>(m_PaintManager.FindControl(pt));\n\t\t\t\t//˵ĿؼᱻduilibǷǿͻһ\n\t\t\t\tif( pControl && _tcsicmp(pControl->GetClass(), _T(\"ButtonUI\")) != 0 && \n\t\t\t\t\t_tcsicmp(pControl->GetClass(), _T(\"OptionUI\")) != 0 &&\n\t\t\t\t\t_tcsicmp(pControl->GetClass(), _T(\"TextUI\"))   != 0 &&  \n\t\t\t\t\t_tcsicmp(pControl->GetClass(), _T(\"SliderUI\")) != 0 &&  \n\t\t\t\t\t_tcsicmp(pControl->GetClass(), _T(\"EditUI\"))   != 0)\n\t\t\t\t{\n\t\t\t\t\treturn HTCAPTION;\n\t\t\t\t}\n\t\t}\n\n\t\treturn HTCLIENT;\n\t}\n\n\tLRESULT WindowImplBase::OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\t\n\n\t\tMONITORINFO Monitor = {};\n\t\tMonitor.cbSize = sizeof(Monitor);\n\t\t::GetMonitorInfo(::MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST), &Monitor);\n\t\tCDuiRect rcWork = Monitor.rcWork;\n\t\tCDuiRect rcMonitor = Monitor.rcMonitor;\n\t\trcWork.Offset(-Monitor.rcMonitor.left, -Monitor.rcMonitor.top);\n\n\t\t// ʱȷԭ\n        LPMINMAXINFO lpMMI = (LPMINMAXINFO) lParam;\n\t\tlpMMI->ptMaxPosition.x\t= rcWork.left;\n\t\tlpMMI->ptMaxPosition.y\t= rcWork.top;\n\n\t\tlpMMI->ptMaxTrackSize.x =rcWork.GetWidth();\n\t\tlpMMI->ptMaxTrackSize.y =rcWork.GetHeight();\n\n\t\tlpMMI->ptMinTrackSize.x =m_PaintManager.GetMinInfo().cx;\n\t\tlpMMI->ptMinTrackSize.y =m_PaintManager.GetMinInfo().cy;\n\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnMouseWheel(UINT /*uMsg*/,UINT fwKeys,int ndelta,CPoint point,BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnMouseHover(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n#endif\n\n\tLRESULT WindowImplBase::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tSIZE szRoundCorner = m_PaintManager.GetRoundCorner();\n#if defined(WIN32) && !defined(UNDER_CE)\n\t\tif( !::IsIconic(*this) && (szRoundCorner.cx != 0 || szRoundCorner.cy != 0) ) {\n\t\t\tCDuiRect rcWnd;\n\t\t\t::GetWindowRect(*this, &rcWnd);\n\t\t\trcWnd.Offset(-rcWnd.left, -rcWnd.top);\n\t\t\trcWnd.right++; rcWnd.bottom++;\n\t\t\tHRGN hRgn = ::CreateRoundRectRgn(rcWnd.left, rcWnd.top, rcWnd.right, rcWnd.bottom, szRoundCorner.cx, szRoundCorner.cy);\n\t\t\t::SetWindowRgn(*this, hRgn, TRUE);\n\t\t\t::DeleteObject(hRgn);\n\t\t}\n#endif\n\t\t// л󻯰ťͻԭť״̬\n\t\tif (wParam != m_dwWindowPosState && (wParam == SIZE_MAXIMIZED || wParam == SIZE_RESTORED) && GetPaintManager()->GetRoot())\n\t\t{\n\t\t\tCControlUI* pbtnMax = static_cast<CControlUI*>(m_PaintManager.FindControl(_T(\"maxbtn\")));       // 󻯰ť\n\t\t\tCControlUI* pbtnRestore = static_cast<CControlUI*>(m_PaintManager.FindControl(_T(\"restorebtn\")));   // ԭť\n\t\t\tif (pbtnMax && pbtnRestore){\n\t\t\t\tif (wParam == SIZE_MAXIMIZED){\n\t\t\t\t\tpbtnMax->SetVisible(false);\n\t\t\t\t\tpbtnRestore->SetVisible(true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tpbtnMax->SetVisible(true);\n\t\t\t\t\tpbtnRestore->SetVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//m_dwWindowPosStateһεĴ״̬, ֻе״̬ͬʱŻлť.\n\t\tm_dwWindowPosState = wParam;\n\n\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tif (wParam == SC_CLOSE)\n\t\t{\n\t\t\tbHandled = TRUE;\n\t\t\tSendMessage(WM_CLOSE);\n\t\t\treturn 0;\n\t\t}\n#if defined(WIN32) && !defined(UNDER_CE)\n\t\tLRESULT lRes = CWindowWnd::HandleMessage(uMsg, wParam, lParam);\n#else\n\t\tLRESULT lRes = CWindowWnd::HandleMessage(uMsg, wParam, lParam);\n#endif\n\t\treturn lRes;\n\t}\n\n\tLRESULT WindowImplBase::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\t// ʽ\n\t\tLONG styleValue = ::GetWindowLong(*this, GWL_STYLE);\n\t\tstyleValue &= ~WS_CAPTION;\n\t\t::SetWindowLong(*this, GWL_STYLE, styleValue | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);\n\n\t\t// ڳߴ\n\t\tRECT rcClient;\n\t\t::GetClientRect(*this, &rcClient);\n\t\t::SetWindowPos(*this, NULL, rcClient.left, rcClient.top, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, SWP_FRAMECHANGED);\n\n\t\tm_PaintManager.Init(m_hWnd);\n\t\t// עPreMessageϢ\n\t\tm_PaintManager.AddPreMessageFilter(this);\n\n\t\t// \n\t\tCControlUI* pRoot=NULL;\n\t\tCDialogBuilder builder;\n\t\tWIN32_FIND_DATA FindFileData;\n\t\tHANDLE hDir;\n\n\t\tif (m_PaintManager.GetResourcePath().IsEmpty())\n\t\t{\t// Դ·\n\t\t\tCDuiString strResourcePath=m_PaintManager.GetInstancePath();\n\t\t\tstrResourcePath+=GetSkinFolder().GetData();\n\n\n\t\t\thDir = FindFirstFile(strResourcePath.GetData(), &FindFileData);\n\t\t\tif (hDir == INVALID_HANDLE_VALUE) \n\t\t\t{\n\t\t\t\t//assert(0&&\"Invalid skin path \\n\"); //Դ·Ч\n\t\t\t} else\n\t\t\t{\n\t\t\t\tm_PaintManager.SetResourcePath(strResourcePath.GetData());\n\t\t\t\tFindClose(hDir);\n\t\t\t}\n\t\t}\n\n\t\tswitch(GetResourceType())\n\t\t{\n\t\tcase UILIB_ZIP:\n\t\t\tm_PaintManager.SetCompressedPacketResource(GetZIPFileName().GetData(), true);\n\t\t\tbreak;\n\t\tcase UILIB_ZIPRESOURCE:\n\t\t\t{\n\t\t\t\tHRSRC hResource = ::FindResource(m_PaintManager.GetResourceDll(), GetResourceID(), _T(\"ZIPRES\"));\n\t\t\t\tif( hResource == NULL )\n\t\t\t\t\treturn 0L;\n\t\t\t\tDWORD dwSize = 0;\n\t\t\t\tHGLOBAL hGlobal = ::LoadResource(m_PaintManager.GetResourceDll(), hResource);\n\t\t\t\tif( hGlobal == NULL ) \n\t\t\t\t{\n#if defined(WIN32) && !defined(UNDER_CE)\n\t\t\t\t\t::FreeResource(hResource);\n#endif\n\t\t\t\t\treturn 0L;\n\t\t\t\t}\n\t\t\t\tdwSize = ::SizeofResource(m_PaintManager.GetResourceDll(), hResource);\n\t\t\t\tif( dwSize == 0 )\n\t\t\t\t\treturn 0L;\n\t\t\t\tm_lpResourceZIPBuffer = new BYTE[ dwSize ];\n\t\t\t\tif (m_lpResourceZIPBuffer != NULL)\n\t\t\t\t{\n\t\t\t\t\t::CopyMemory(m_lpResourceZIPBuffer, (LPBYTE)::LockResource(hGlobal), dwSize);\n\t\t\t\t}\n#if defined(WIN32) && !defined(UNDER_CE)\n\t\t\t\t::FreeResource(hResource);\n#endif\n\t\t\t\tm_PaintManager.SetCompressedPacketResource(m_lpResourceZIPBuffer, dwSize);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t\n\t\tif (GetResourceType()==UILIB_RESOURCE)\n\t\t{\n\t\t\tSTRINGorID xml(_ttoi(GetSkinFile().GetData()));\n\t\t\tpRoot = builder.Create(xml, _T(\"xml\"), this, &m_PaintManager);\n\t\t}\n\t\telse\n\t\t\tpRoot = builder.Create(GetSkinFile().GetData(), (UINT)0, this, &m_PaintManager);\n\t\t//ASSERT(pRoot&&\"Load Resouse fail ,check fold and path ,or err in file\");\n\t\tif (pRoot==NULL)\n\t\t{\n\t\t\tCDuiString sError = _T(\"Դļʧܣ\");\n            sError+=GetSkinFolder();\n            sError+=\" : \";\n\t\t\tsError += GetSkinFile();\n\t\t\tMessageBox(GetForegroundWindow(), sError, _T(\"Duilib\") ,MB_OK|MB_ICONERROR);\n\t\t\tExitProcess(1);\n\t\t\treturn 0;\n\t\t}\n\t\tm_PaintManager.AttachDialog(pRoot);\n\t\t// Notify¼ӿ\n\t\tm_PaintManager.AddNotifier(this);\n\t\tm_PaintManager.SetBackgroundTransparent(TRUE);\n\t\t// ڳʼ\n\t\tInitWindow();\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnKeyDown( UINT /*uMsg*/,UINT nChar, UINT nRepCnt, UINT nFlags,BOOL& bHandled )\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\tLRESULT WindowImplBase::OnKeyUp(UINT /*uMsg*/, UINT nChar, UINT nRepCnt, UINT nFlags ,BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnSysKeyDown( UINT /*uMsg*/,UINT nChar, UINT nRepCnt, UINT nFlags,BOOL& bHandled )\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\tLRESULT WindowImplBase::OnSysKeyUp(UINT /*uMsg*/, UINT nChar, UINT nRepCnt, UINT nFlags ,BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnKillFocus(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnSetFocus(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnLButtonDown(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLRESULT WindowImplBase::OnLButtonUp(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\tLRESULT WindowImplBase::OnRButtonDown(UINT /*uMsg*/, UINT nFlags, CPoint point ,BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\tLRESULT WindowImplBase::OnRButtonUp(UINT /*uMsg*/, UINT nFlags, CPoint point ,BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\tLRESULT WindowImplBase::OnMouseMove(UINT /*uMsg*/, UINT nFlags, CPoint point ,BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n    LRESULT WindowImplBase::OnPointerDown(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)\n    {\n        bHandled = FALSE;\n        return 0;\n    }\n    LRESULT WindowImplBase::OnPointerUp(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)\n    {\n        bHandled = FALSE;\n        return 0;\n    }\n\n\n#if(WINVER >= 0x0601)\n\tLRESULT WindowImplBase::OnTouch(UINT /*uMsg*/, UINT cInputs,HTOUCHINPUT hTouchInput,BOOL& bHandled)\n\t{\n\t\t//ʹʾ\n\t\t/*\n\t\tPTOUCHINPUT pInputs = new TOUCHINPUT[cInputs];\n\t\tif (NULL != pInputs)\n\t\t{\n\t\tif (GetTouchInputInfo(hTouchInput,cInputs,pInputs,sizeof(TOUCHINPUT)))\n\t\t{\n\t\t// process pInputs\n\t\tif (!CloseTouchInputHandle(hTouchInput))\n\t\t{\n\t\t// error handling\n\t\t}\n\n\t\tbHandled = TRUE;\n\n\t\t}\n\t\telse\n\t\t{\n\t\t// GetLastError() and error handling\n\t\t}\n\n\t\tdelete[] pInputs;\n\t\t}\n\t\telse\n\t\t{\n\t\t// error handling, presumably out of memory\n\t\t}\n\t\t*/\n\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n#endif\n\n\tLRESULT WindowImplBase::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)\n\t{\n\t\tLRESULT lRes = 0;\n\t\tBOOL bHandled = TRUE;\n\t\tCPoint pt;\n\t\tswitch (uMsg)\n\t\t{\n\t\tcase WM_CREATE:\t\t\tlRes = OnCreate(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_CLOSE:\t\t\tlRes = OnClose(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_DESTROY:\t\tlRes = OnDestroy(uMsg, wParam, lParam, bHandled); break;\n#if defined(WIN32) && !defined(UNDER_CE)\n\t\tcase WM_NCACTIVATE:\t\tlRes = OnNcActivate(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_NCCALCSIZE:\t\tlRes = OnNcCalcSize(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_NCPAINT:\t\tlRes = OnNcPaint(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_NCHITTEST:\t\tlRes = OnNcHitTest(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_GETMINMAXINFO:\tlRes = OnGetMinMaxInfo(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_MOUSEWHEEL:\t\n\t\t\t{\n\t\t\t\tpt.x = GET_X_LPARAM( lParam );\n\t\t\t\tpt.y = GET_Y_LPARAM( lParam );\n\t\t\t\tlRes = OnMouseWheel(uMsg,GET_KEYSTATE_WPARAM(wParam),GET_WHEEL_DELTA_WPARAM(wParam),pt,bHandled);\n\t\t\t\tbreak;\n\t\t\t}\n#endif\n\t\tcase WM_SIZE:\t\t\tlRes = OnSize(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_CHAR:\t\t    lRes = OnChar(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_SYSCOMMAND:\t\tlRes = OnSysCommand(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_KEYDOWN:\n\t\t\t{\n\t\t\t\tlRes = OnKeyDown( uMsg,wParam, lParam&0xff, lParam>>16 ,bHandled);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase WM_KEYUP:\n\t\t\t{\n\t\t\t\tlRes = OnKeyUp(uMsg, wParam, lParam&0xff, lParam>>16,bHandled );\n\t\t\t\tbreak;\t\n\t\t\t}\n\t\tcase WM_SYSKEYDOWN:\n\t\t\t{\n\t\t\t\tlRes=OnSysKeyDown(uMsg,wParam,lParam&0xff,lParam>>16,bHandled);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase WM_SYSKEYUP:\n\t\t\t{\n\t\t\t\tlRes=OnSysKeyUp(uMsg,wParam,lParam&0xff,lParam>>16,bHandled);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase WM_KILLFOCUS:\t\tlRes = OnKillFocus(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_SETFOCUS:\t\tlRes = OnSetFocus(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_LBUTTONUP:\t\tlRes = OnLButtonUp(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_LBUTTONDOWN:\tlRes = OnLButtonDown(uMsg, wParam, lParam, bHandled); break;\n\t\tcase WM_RBUTTONDOWN:\n\t\t\t{\n\t\t\t\tlRes = OnRButtonDown(uMsg,wParam,lParam,bHandled);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase WM_RBUTTONUP:\n\t\t\t{\n\t\t\t\tlRes = OnRButtonUp(uMsg,wParam,lParam,bHandled);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase WM_MOUSEMOVE:\t\n\t\t\t{\n\t\t\t\tpt.x = GET_X_LPARAM( lParam );\n\t\t\t\tpt.y = GET_Y_LPARAM( lParam );\n\t\t\t\tlRes = OnMouseMove(uMsg, wParam, pt, bHandled);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase WM_MOUSEHOVER:\n\t\t\t{\n\t\t\t\tlRes = OnMouseHover(uMsg, wParam, lParam, bHandled);\n\t\t\t\tbreak;\n\t\t\t}\n#if(WINVER >= 0x0601)\n\t\tcase WM_TOUCH:\n\t\t\t{\n\t\t\t\tUINT cInputs = LOWORD(wParam);\n\t\t\t\tHTOUCHINPUT hTouchInput=(HTOUCHINPUT)lParam;\n\t\t\t\tlRes = OnTouch(uMsg, cInputs, hTouchInput, bHandled);\n\t\t\t\t//If the application does not process the message, it must call DefWindowProc\n\t\t\t\tif (lRes==FALSE)\n\t\t\t\t{\n\t\t\t\t\t::DefWindowProc(*this,uMsg,wParam,lParam);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n#endif\n#if(WINVER >= 0x0602)\n        case WM_POINTERUP:\n            {\n                lRes = OnPointerUp(uMsg,wParam,lParam,bHandled);\n                break;\n\n            }\n\t\tcase WM_POINTERDOWN:\n\t\t\t{\n                lRes = OnPointerDown(uMsg,wParam,lParam,bHandled);\n                break;\n\t\t\t}\n#endif\n\t\tdefault:\n\t\t\t{\n\t\t\t\tbHandled = FALSE; break;\n\t\t\t}\n\t\t}\n\t\tif (bHandled)\n\t\t{\n\t\t\treturn lRes;\n\t\t}\n\t\tlRes = HandleCustomMessage(uMsg, wParam, lParam, bHandled);\n\n\t\tif(bHandled)\n\t\t{\n\t\t\treturn lRes;\n\t\t}\n\t\tif (m_PaintManager.MessageHandler(uMsg, wParam, lParam, lRes))\n\t\t{\n\t\t\treturn lRes;\n\t\t}\n\n\t\treturn CWindowWnd::HandleMessage(uMsg, wParam, lParam);\n\t}\n\n\tLRESULT WindowImplBase::HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)\n\t{\n\t\tbHandled = FALSE;\n\t\treturn 0;\n\t}\n\n\tLONG WindowImplBase::GetStyle()\n\t{\n\t\tLONG styleValue = ::GetWindowLong(*this, GWL_STYLE);\n\t\tstyleValue &= ~WS_CAPTION;\n\n\t\treturn styleValue;\n\t}\n\n\tvoid WindowImplBase::OnClick(TNotifyUI& msg)\n\t{\n\t\tCDuiString sCtrlName = msg.pSender->GetName();\n\t\tif( sCtrlName == _T(\"closebtn\") )\n\t\t{\n\t\t\tClose();\n\t\t\treturn; \n\t\t}\n\t\telse if (sCtrlName == _T(\"minbtn\"))\n\t\t{\n\t\t\t::ShowWindow(GetHWND(), SW_MINIMIZE);\n\t\t\treturn;\n\t\t}\n\t\telse if (sCtrlName == _T(\"maxbtn\"))\n\t\t{\n\t\t\t::ShowWindow(GetHWND(), SW_MAXIMIZE);\n\t\t\treturn;\n\t\t}\n\t\telse if (sCtrlName == _T(\"restorebtn\"))\n\t\t{\n\t\t\t::ShowWindow(GetHWND(), SW_RESTORE);\n\t\t\treturn;\n\t\t}\n\n\t\treturn;\n\t}\n\n\n\n\t/*\n\tduilibοMFCATL/WTLϢƣ\n\t1DUI_BEGIN_MESSAGE_MAPMFCBEGIN_MESSAGE_MAP\n\t2HandleMessageMFCDefWindowProc\n\tҪעbHandledģATLġbHandledATLе£\n\tϢӦǰATLΪTRUEϢӦ֮ҪATLĬϵWindowProc()Ϣ\n\tԽbHandledΪFALSEMFCͬ MFCʽصûӦʵֵĬϵϢġ\n\t3duilibṩһNotifyNotifyڴduilibԼһϢϢμduilibUIDefine.hSendNotify\n\t4:ΪؼϢϢΪNotifyõһףSendNotify\n\t*/\n\tvoid WindowImplBase::Notify(TNotifyUI& msg)\n\t{\n\t\treturn CNotifyPump::NotifyPump(msg);\n\t}\n\n    int WindowImplBase::DuiMessageBox(HWND hWnd,LPCTSTR lpText,LPCTSTR lpCaption,UINT uType)\n    {\n        CDuiString strText=lpText;\n        CDuiString strCaption=lpCaption;\n        m_PaintManager.PaserString(strText);\n        m_PaintManager.PaserString(strCaption);\n        return MessageBox(hWnd,strText.GetData(),strCaption.GetData(),uType);\n    }\n\n}\n\n"
  },
  {
    "path": "DuiLib/Utils/WinImplBase.h",
    "content": "#ifndef WIN_IMPL_BASE_HPP\n#define WIN_IMPL_BASE_HPP\n#include <sdkddkver.h>\n\nnamespace DuiLib\n{\n\n\tenum UILIB_RESOURCETYPE\n\t{\n\t\tUILIB_FILE=1,\t\t\t\t    // Դļ\n\t\tUILIB_ZIP,\t\t\t\t\t\t// Դzipѹ\n\t\tUILIB_RESOURCE,\t\t\t        // Դ\n\t\tUILIB_ZIPRESOURCE,\t            // Դzipѹ\n\t};\n\n\tclass UILIB_API WindowImplBase\n\t\t: public CWindowWnd\n\t\t, public CNotifyPump\n\t\t, public INotifyUI\n\t\t, public IMessageFilterUI\n\t\t, public IDialogBuilderCallback\n\t{\n\tpublic:\n\t\tWindowImplBase();\n\t\tvirtual ~WindowImplBase();\n\t\tvirtual void InitWindow(){};\n\t\tvirtual void OnFinalMessage( HWND hWnd );\n\t\tvirtual void Notify(TNotifyUI& msg);\n\n\t\tDUI_DECLARE_MESSAGE_MAP()\n\t    virtual void OnClick(TNotifyUI& msg);\n\n\tprotected:\n\t\tvirtual CDuiString GetSkinFolder() = 0;\n\t\tvirtual CDuiString GetSkinFile() = 0;\n\t\tvirtual LPCTSTR GetWindowClassName(void) const = 0 ;\n\t\tvirtual LRESULT ResponseDefaultKeyEvent(WPARAM wParam);\n\n\t\tCPaintManagerUI m_PaintManager;\n\t\tstatic LPBYTE m_lpResourceZIPBuffer;\n\tpublic:\n\t\tCPaintManagerUI* GetPaintManager();\n\t\tCControlUI* FindControl(POINT pt);\n\t\tCControlUI* FindControl(LPCTSTR pstrName);\n\n\tpublic:\n\t\tvirtual UINT GetClassStyle() const;\n\t\tvirtual UILIB_RESOURCETYPE GetResourceType() const;\n\t\tvirtual CDuiString GetZIPFileName() const;\n\t\tvirtual LPCTSTR GetResourceID() const;\n\t\tvirtual CControlUI* CreateControl(LPCTSTR pstrClass);\n\t\tvirtual LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM /*lParam*/, bool& /*bHandled*/);\n\t\tvirtual LRESULT OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);\n\t\tvirtual LRESULT OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);\n\n#if defined(WIN32) && !defined(UNDER_CE)\n\t\tvirtual LRESULT OnNcActivate(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled);\n\t\tvirtual LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tvirtual LRESULT OnNcPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);\n\t\tvirtual LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tvirtual LRESULT OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tvirtual LRESULT OnMouseWheel(UINT /*uMsg*/,UINT fwKeys,int ndelta,CPoint point,BOOL& bHandled);\n\t\tvirtual LRESULT OnMouseHover(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n#endif\n\t\tvirtual LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tvirtual LRESULT OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tvirtual LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tvirtual LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tvirtual LRESULT OnKeyDown( UINT /*uMsg*/,UINT nChar, UINT nRepCnt, UINT nFlags,BOOL& bHandled );\n\t\tvirtual LRESULT OnKeyUp(UINT /*uMsg*/, UINT nChar, UINT nRepCnt, UINT nFlags ,BOOL& bHandled);\n\t\tvirtual LRESULT OnSysKeyDown( UINT /*uMsg*/,UINT nChar, UINT nRepCnt, UINT nFlags,BOOL& bHandled );\n\t\tvirtual LRESULT OnSysKeyUp(UINT /*uMsg*/, UINT nChar, UINT nRepCnt, UINT nFlags ,BOOL& bHandled);\n\n\t\tvirtual LRESULT OnKillFocus(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);\n\t\tvirtual LRESULT OnSetFocus(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);\n\t\tvirtual LRESULT OnLButtonDown(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);\n\t\tvirtual LRESULT OnLButtonUp(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);\n\t\tvirtual LRESULT OnRButtonDown(UINT /*uMsg*/, UINT nFlags, CPoint point ,BOOL& bHandled);\n\t\tvirtual LRESULT OnRButtonUp(UINT /*uMsg*/, UINT nFlags, CPoint point ,BOOL& bHandled);\n\t\tvirtual LRESULT OnMouseMove(UINT /*uMsg*/, UINT nFlags, CPoint point ,BOOL& bHandled);\n\n        virtual LRESULT OnPointerDown(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);\n        virtual LRESULT OnPointerUp(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);\n\n\n#if(WINVER >= 0x0601)\n\t\tvirtual\tLRESULT OnTouch(UINT /*uMsg*/, UINT cInputs,HTOUCHINPUT hTouchInput,BOOL& bHandled);\n#endif\n\t\tvirtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);\n\t\tvirtual LRESULT HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);\n\t\tvirtual LONG GetStyle();\n\n\tprotected:\n\t\t\n\t\tWPARAM\tm_dwWindowPosState;\n    public:\n        int DuiMessageBox(HWND hWnd,LPCTSTR lpText,LPCTSTR lpCaption,UINT uType);\n\n\t};\n}\n\n#endif // WIN_IMPL_BASE_HPP\n"
  },
  {
    "path": "DuiLib/Utils/Zip/XUnZip.cpp",
    "content": "#include \"StdAfx.h\"\n#include \"XUnZip.h\"\n#include \"XUnZipBase.h\"\n\n\nBOOL CDUIUnZip::Open(const TCHAR *filepath)\n{\n\n\tif (filepath == NULL)\n\t{\n\t\treturn FALSE;\n\t}\n\n\tTUnzip *pHandle = new TUnzip( );\n\tASSERT(pHandle != NULL);\n\tif (ZR_OK != pHandle->Open((void*)(filepath), 0, ZIP_FILENAME))\n\t{\n\t\tdelete pHandle;\n\t\tpHandle = NULL;\n\t\treturn FALSE;\n\t}\n\n\tm_db = (HANDLE)pHandle;\n\n\treturn TRUE;\n}\n\nBOOL CDUIUnZip::Open(void *z, unsigned int len)\n{\n\tTUnzip *pHandle = new TUnzip( );\n\tASSERT(pHandle != NULL);\n\tif (ZR_OK != pHandle->Open(z, len, ZIP_MEMORY))\n\t{\n\t\tdelete pHandle;\n\t\tpHandle = NULL;\n\t\treturn FALSE;\n\t}\n\tm_db = (HANDLE)pHandle;\n\n\treturn TRUE;\n}\n\nBOOL CDUIUnZip::IsOpen( )\n{\n\treturn m_db == NULL;\n}\n\nBOOL  CDUIUnZip::Close( )\n{\n\tif (m_db == NULL)\n\t\treturn TRUE;\n\n\tTUnzip *pHandle = (TUnzip *)m_db;\n\tif (ZR_OK == pHandle->Close( ))\n\t{\n\t\tdelete pHandle;\n\t\tpHandle = NULL;\n\t\tm_db = NULL;\n\t\treturn TRUE;\n\t}\n\n\treturn FALSE;\n}\n\nBOOL CDUIUnZip::Find(const TCHAR *name, int* index, DWORD64 *size)\n{\n\tZIPENTRY ze;\n\tTUnzip *pHandle = (TUnzip *)m_db;\n\tASSERT(pHandle != NULL);\n\tif (pHandle == NULL)\n\t{\n\t\treturn FALSE;\n\t}\n\tif (ZR_OK == pHandle->Find(name, false, index, &ze))\n\t{\n\t\t*size = ze.unc_size;\n\t\treturn TRUE;\n\t}\n\treturn FALSE;\n}\n\nBOOL CDUIUnZip::Get(int index, void *dst, DWORD64 len)\n{\n\tTUnzip *pHandle = (TUnzip *)m_db;\n\tASSERT(pHandle != NULL);\n\tZRESULT res = pHandle->Unzip(index, dst, len, ZIP_MEMORY);\n\tif (ZR_OK != res && ZR_MORE != res)\n\t{\n\t\treturn FALSE;\n\t}\n\treturn TRUE;\n}"
  },
  {
    "path": "DuiLib/Utils/Zip/XUnZip.h",
    "content": "#ifndef XUNZIP_HPP\n#define XUNZIP_HPP\n\n#include \"..\\UnCompression.h\"\n\nclass CDUIUnZip : public DuiLib::CUnCompression\n{\npublic:\n\tCDUIUnZip() : m_db(NULL){}\n\tvirtual BOOL Open(const TCHAR *filepath);\n\tvirtual BOOL Open(void *z, unsigned int len);\n\tvirtual BOOL IsOpen();\n\tvirtual BOOL Close();\n\n\tvirtual BOOL Find(const TCHAR *name, int* index, DWORD64 *size);\n\tvirtual BOOL Get(int index, void *dst, DWORD64 len);\nprivate:\n\tHANDLE m_db;\n};\n#endif"
  },
  {
    "path": "DuiLib/Utils/Zip/XUnZipBase.h",
    "content": "#ifndef XUNZIPBASE_HPP\n#define XUNZIPBASE_HPP\n\n// XUnzip.cpp  Version 1.3\n//\n// Authors:      Mark Adler et al. (see below)\n//\n// Modified by:  Lucian Wischik\n//               lu@wischik.com\n//\n// Version 1.0   - Turned C files into just a single CPP file\n//               - Made them compile cleanly as C++ files\n//               - Gave them simpler APIs\n//               - Added the ability to zip/unzip directly in memory without \n//                 any intermediate files\n// \n// Modified by:  Hans Dietrich\n//               hdietrich@gmail.com\n//\n// Version 1.3:  - Corrected size bug introduced by 1.2\n//\n// Version 1.2:  - Many bug fixes.  See CodeProject article for list.\n//\n// Version 1.1:  - Added Unicode support to CreateZip() and ZipAdd()\n//               - Changed file names to avoid conflicts with Lucian's files\n//\n///////////////////////////////////////////////////////////////////////////////\n//\n// Lucian Wischik's comments:\n// --------------------------\n// THIS FILE is almost entirely based upon code by Info-ZIP.\n// It has been modified by Lucian Wischik.\n// The original code may be found at http://www.info-zip.org\n// The original copyright text follows.\n//\n///////////////////////////////////////////////////////////////////////////////\n//\n// Original authors' comments:\n// ---------------------------\n// This is version 2002-Feb-16 of the Info-ZIP copyright and license. The \n// definitive version of this document should be available at \n// ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely.\n// \n// Copyright (c) 1990-2002 Info-ZIP.  All rights reserved.\n//\n// For the purposes of this copyright and license, \"Info-ZIP\" is defined as\n// the following set of individuals:\n//\n//   Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois,\n//   Jean-loup Gailly, Hunter Goatley, Ian Gorman, Chris Herborth, Dirk Haase,\n//   Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, \n//   David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, \n//   Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, \n//   Kai Uwe Rommel, Steve Salisbury, Dave Smith, Christian Spieler, \n//   Antoine Verheijen, Paul von Behren, Rich Wales, Mike White\n//\n// This software is provided \"as is\", without warranty of any kind, express\n// or implied.  In no event shall Info-ZIP or its contributors be held liable\n// for any direct, indirect, incidental, special or consequential damages\n// arising out of the use of or inability to use this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n//    1. Redistributions of source code must retain the above copyright notice,\n//       definition, disclaimer, and this list of conditions.\n//\n//    2. Redistributions in binary form (compiled executables) must reproduce \n//       the above copyright notice, definition, disclaimer, and this list of \n//       conditions in documentation and/or other materials provided with the \n//       distribution. The sole exception to this condition is redistribution \n//       of a standard UnZipSFX binary as part of a self-extracting archive; \n//       that is permitted without inclusion of this license, as long as the \n//       normal UnZipSFX banner has not been removed from the binary or disabled.\n//\n//    3. Altered versions--including, but not limited to, ports to new \n//       operating systems, existing ports with new graphical interfaces, and \n//       dynamic, shared, or static library versions--must be plainly marked \n//       as such and must not be misrepresented as being the original source.  \n//       Such altered versions also must not be misrepresented as being \n//       Info-ZIP releases--including, but not limited to, labeling of the \n//       altered versions with the names \"Info-ZIP\" (or any variation thereof, \n//       including, but not limited to, different capitalizations), \n//       \"Pocket UnZip\", \"WiZ\" or \"MacZip\" without the explicit permission of \n//       Info-ZIP.  Such altered versions are further prohibited from \n//       misrepresentative use of the Zip-Bugs or Info-ZIP e-mail addresses or \n//       of the Info-ZIP URL(s).\n//\n//    4. Info-ZIP retains the right to use the names \"Info-ZIP\", \"Zip\", \"UnZip\",\n//       \"UnZipSFX\", \"WiZ\", \"Pocket UnZip\", \"Pocket Zip\", and \"MacZip\" for its \n//       own source and binary releases.\n//\n///////////////////////////////////////////////////////////////////////////////\n\n\n//#define _USE_32BIT_TIME_T\t//+++1.2\n\n#include <time.h>\n#include <stdio.h>\n\n\n#pragma warning(disable : 4996)\t// disable bogus deprecation warning\n\n// THIS FILE is almost entirely based upon code by Jean-loup Gailly\n// and Mark Adler. It has been modified by Lucian Wischik.\n// The original code may be found at http://www.gzip.org/zlib/\n// The original copyright text follows.\n//\n//\n//\n// zlib.h -- interface of the 'zlib' general purpose compression library\n//  version 1.1.3, July 9th, 1998\n//\n//  Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler\n//\n//  This software is provided 'as-is', without any express or implied\n//  warranty.  In no event will the authors be held liable for any damages\n//  arising from the use of this software.\n//\n//  Permission is granted to anyone to use this software for any purpose,\n//  including commercial applications, and to alter it and redistribute it\n//  freely, subject to the following restrictions:\n//\n//  1. The origin of this software must not be misrepresented; you must not\n//     claim that you wrote the original software. If you use this software\n//     in a product, an acknowledgment in the product documentation would be\n//     appreciated but is not required.\n//  2. Altered source versions must be plainly marked as such, and must not be\n//     misrepresented as being the original software.\n//  3. This notice may not be removed or altered from any source distribution.\n//\n//  Jean-loup Gailly        Mark Adler\n//  jloup@gzip.org          madler@alumni.caltech.edu\n//\n//\n//  The data format used by the zlib library is described by RFCs (Request for\n//  Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt\n//  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).\n//\n//\n//     The 'zlib' compression library provides in-memory compression and\n//  decompression functions, including integrity checks of the uncompressed\n//  data.  This version of the library supports only one compression method\n//  (deflation) but other algorithms will be added later and will have the same\n//  stream interface.\n//\n//     Compression can be done in a single step if the buffers are large\n//  enough (for example if an input file is mmap'ed), or can be done by\n//  repeated calls of the compression function.  In the latter case, the\n//  application must provide more input and/or consume the output\n//  (providing more output space) before each call.\n//\n//     The library also supports reading and writing files in gzip (.gz) format\n//  with an interface similar to that of stdio.\n//\n//     The library does not install any signal handler. The decoder checks\n//  the consistency of the compressed data, so the library should never\n//  crash even in case of corrupted input.\n//\n// for more info about .ZIP format, see ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip\n//   PkWare has also a specification at ftp://ftp.pkware.com/probdesc.zip\n\n#define zmalloc(len) malloc(len)\n\n#define zfree(p) free(p)\n\n/*\nvoid *zmalloc(unsigned int len)\n{ char *buf = new char[len+32];\n  for (int i=0; i<16; i++)\n  { buf[i]=i;\n    buf[len+31-i]=i;\n  }\n  *((unsigned int*)buf) = len;\n  char c[1000]; wsprintf(c,\"malloc 0x%lx  - %lu\",buf+16,len);\n  OutputDebugString(c);\n  return buf+16;\n}\n\nvoid zfree(void *buf)\n{ char c[1000]; wsprintf(c,\"free   0x%lx\",buf);\n  OutputDebugString(c);\n  char *p = ((char*)buf)-16;\n  unsigned int len = *((unsigned int*)p);\n  bool blown=false;\n  for (int i=0; i<16; i++)\n  { char lo = p[i];\n    char hi = p[len+31-i];\n    if (hi!=i || (lo!=i && i>4)) blown=true;\n  }\n  if (blown)\n  { OutputDebugString(\"BLOWN!!!\");\n  }\n  delete[] p;\n}\n*/\n\nDECLARE_HANDLE(HZIP);\t// An HZIP identifies a zip file that has been opened\n\ntypedef DWORD ZRESULT;\n// return codes from any of the zip functions. Listed later.\n\n#define ZIP_HANDLE   1\n#define ZIP_FILENAME 2\n#define ZIP_MEMORY   3\n\ntypedef struct\n{ int index;                 // index of this file within the zip\nchar name[MAX_PATH];       // filename within the zip\nDWORD attr;                // attributes, as in GetFileAttributes.\nFILETIME atime,ctime,mtime;// access, create, modify filetimes\nlong comp_size;            // sizes of item, compressed and uncompressed. These\nlong unc_size;             // may be -1 if not yet known (e.g. being streamed in)\n} ZIPENTRY;\n\ntypedef struct\n{ int index;                 // index of this file within the zip\nTCHAR name[MAX_PATH];      // filename within the zip\nDWORD attr;                // attributes, as in GetFileAttributes.\nFILETIME atime,ctime,mtime;// access, create, modify filetimes\nlong comp_size;            // sizes of item, compressed and uncompressed. These\nlong unc_size;             // may be -1 if not yet known (e.g. being streamed in)\n} ZIPENTRYW;\n\n// These are the result codes:\n#define ZR_OK         0x00000000     // nb. the pseudo-code zr-recent is never returned,\n#define ZR_RECENT     0x00000001     // but can be passed to FormatZipMessage.\n// The following come from general system stuff (e.g. files not openable)\n#define ZR_GENMASK    0x0000FF00\n#define ZR_NODUPH     0x00000100     // couldn't duplicate the handle\n#define ZR_NOFILE     0x00000200     // couldn't create/open the file\n#define ZR_NOALLOC    0x00000300     // failed to allocate some resource\n#define ZR_WRITE      0x00000400     // a general error writing to the file\n#define ZR_NOTFOUND   0x00000500     // couldn't find that file in the zip\n#define ZR_MORE       0x00000600     // there's still more data to be unzipped\n#define ZR_CORRUPT    0x00000700     // the zipfile is corrupt or not a zipfile\n#define ZR_READ       0x00000800     // a general error reading the file\n// The following come from mistakes on the part of the caller\n#define ZR_CALLERMASK 0x00FF0000\n#define ZR_ARGS       0x00010000     // general mistake with the arguments\n#define ZR_NOTMMAP    0x00020000     // tried to ZipGetMemory, but that only works on mmap zipfiles, which yours wasn't\n#define ZR_MEMSIZE    0x00030000     // the memory size is too small\n#define ZR_FAILED     0x00040000     // the thing was already failed when you called this function\n#define ZR_ENDED      0x00050000     // the zip creation has already been closed\n#define ZR_MISSIZE    0x00060000     // the indicated input file size turned out mistaken\n#define ZR_PARTIALUNZ 0x00070000     // the file had already been partially unzipped\n#define ZR_ZMODE      0x00080000     // tried to mix creating/opening a zip \n// The following come from bugs within the zip library itself\n#define ZR_BUGMASK    0xFF000000\n#define ZR_NOTINITED  0x01000000     // initialisation didn't work\n#define ZR_SEEK       0x02000000     // trying to seek in an unseekable file\n#define ZR_NOCHANGE   0x04000000     // changed its mind on storage, but not allowed\n#define ZR_FLATE      0x05000000     // an internal error in the de/inflation code\n\n#pragma warning(disable : 4702)   // unreachable code\n\nstatic ZRESULT zopenerror = ZR_OK; //+++1.2\n\ntypedef struct tm_unz_s\n{ unsigned int tm_sec;            // seconds after the minute - [0,59]\n  unsigned int tm_min;            // minutes after the hour - [0,59]\n  unsigned int tm_hour;           // hours since midnight - [0,23]\n  unsigned int tm_mday;           // day of the month - [1,31]\n  unsigned int tm_mon;            // months since January - [0,11]\n  unsigned int tm_year;           // years - [1980..2044]\n} tm_unz;\n\n\n// unz_global_info structure contain global data about the ZIPfile\ntypedef struct unz_global_info_s\n{ unsigned long number_entry;         // total number of entries in the central dir on this disk\n  unsigned long size_comment;         // size of the global comment of the zipfile\n} unz_global_info;\n\n// unz_file_info contain information about a file in the zipfile\ntypedef struct unz_file_info_s\n{ unsigned long version;              // version made by                 2 bytes\n  unsigned long version_needed;       // version needed to extract       2 bytes\n  unsigned long flag;                 // general purpose bit flag        2 bytes\n  unsigned long compression_method;   // compression method              2 bytes\n  unsigned long dosDate;              // last mod file date in Dos fmt   4 bytes\n  unsigned long crc;                  // crc-32                          4 bytes\n  unsigned long compressed_size;      // compressed size                 4 bytes\n  unsigned long uncompressed_size;    // uncompressed size               4 bytes\n  unsigned long size_filename;        // filename length                 2 bytes\n  unsigned long size_file_extra;      // extra field length              2 bytes\n  unsigned long size_file_comment;    // file comment length             2 bytes\n  unsigned long disk_num_start;       // disk number start               2 bytes\n  unsigned long internal_fa;          // internal file attributes        2 bytes\n  unsigned long external_fa;          // external file attributes        4 bytes\n  tm_unz tmu_date;\n} unz_file_info;\n\n\n#define UNZ_OK                  (0)\n#define UNZ_END_OF_LIST_OF_FILE (-100)\n#define UNZ_ERRNO               (Z_ERRNO)\n#define UNZ_EOF                 (0)\n#define UNZ_PARAMERROR          (-102)\n#define UNZ_BADZIPFILE          (-103)\n#define UNZ_INTERNALERROR       (-104)\n#define UNZ_CRCERROR            (-105)\n\n\n\n\n\n\n\n#define ZLIB_VERSION \"1.1.3\"\n\n\n// Allowed flush values; see deflate() for details\n#define Z_NO_FLUSH      0\n#define Z_SYNC_FLUSH    2\n#define Z_FULL_FLUSH    3\n#define Z_FINISH        4\n\n\n// compression levels\n#define Z_NO_COMPRESSION         0\n#define Z_BEST_SPEED             1\n#define Z_BEST_COMPRESSION       9\n#define Z_DEFAULT_COMPRESSION  (-1)\n\n// compression strategy; see deflateInit2() for details\n#define Z_FILTERED            1\n#define Z_HUFFMAN_ONLY        2\n#define Z_DEFAULT_STRATEGY    0\n\n// Possible values of the data_type field\n#define Z_BINARY   0\n#define Z_ASCII    1\n#define Z_UNKNOWN  2\n\n// The deflate compression method (the only one supported in this version)\n#define Z_DEFLATED   8\n\n// for initializing zalloc, zfree, opaque\n#define Z_NULL  0\n\n// case sensitivity when searching for filenames\n#define CASE_SENSITIVE 1\n#define CASE_INSENSITIVE 2\n\n\n// Return codes for the compression/decompression functions. Negative\n// values are errors, positive values are used for special but normal events.\n#define Z_OK            0\n#define Z_STREAM_END    1\n#define Z_NEED_DICT     2\n#define Z_ERRNO        (-1)\n#define Z_STREAM_ERROR (-2)\n#define Z_DATA_ERROR   (-3)\n#define Z_MEM_ERROR    (-4)\n#define Z_BUF_ERROR    (-5)\n#define Z_VERSION_ERROR (-6)\n\n\n\n// Basic data types\ntypedef unsigned char  Byte;  // 8 bits\ntypedef unsigned int   uInt;  // 16 bits or more\ntypedef unsigned long  uLong; // 32 bits or more\ntypedef void *voidpf;\ntypedef void     *voidp;\ntypedef long z_off_t;\n\n\n\n\n\n\n\n\n\n\n\n\ntypedef voidpf (*alloc_func) (voidpf opaque, uInt items, uInt size);\ntypedef void   (*free_func)  (voidpf opaque, voidpf address);\n\nstruct internal_state;\n\ntypedef struct z_stream_s {\n    Byte    *next_in;  // next input byte\n    uInt     avail_in;  // number of bytes available at next_in\n    uLong    total_in;  // total nb of input bytes read so far\n\n    Byte    *next_out; // next output byte should be put there\n    uInt     avail_out; // remaining free space at next_out\n    uLong    total_out; // total nb of bytes output so far\n\n    char     *msg;      // last error message, NULL if no error\n    struct internal_state *state; // not visible by applications\n\n    alloc_func zalloc;  // used to allocate the internal state\n    free_func  zfree;   // used to free the internal state\n    voidpf     opaque;  // private data object passed to zalloc and zfree\n\n    int     data_type;  // best guess about the data type: ascii or binary\n    uLong   adler;      // adler32 value of the uncompressed data\n    uLong   reserved;   // reserved for future use\n} z_stream;\n\ntypedef z_stream *z_streamp;\n\n\n//   The application must update next_in and avail_in when avail_in has\n//   dropped to zero. It must update next_out and avail_out when avail_out\n//   has dropped to zero. The application must initialize zalloc, zfree and\n//   opaque before calling the init function. All other fields are set by the\n//   compression library and must not be updated by the application.\n//\n//   The opaque value provided by the application will be passed as the first\n//   parameter for calls of zalloc and zfree. This can be useful for custom\n//   memory management. The compression library attaches no meaning to the\n//   opaque value.\n//\n//   zalloc must return Z_NULL if there is not enough memory for the object.\n//   If zlib is used in a multi-threaded application, zalloc and zfree must be\n//   thread safe.\n//\n//   The fields total_in and total_out can be used for statistics or\n//   progress reports. After compression, total_in holds the total size of\n//   the uncompressed data and may be saved for use in the decompressor\n//   (particularly if the decompressor wants to decompress everything in\n//   a single step).\n//\n\n\n// basic functions\n\nconst char *zlibVersion ();\n// The application can compare zlibVersion and ZLIB_VERSION for consistency.\n// If the first character differs, the library code actually used is\n// not compatible with the zlib.h header file used by the application.\n// This check is automatically made by inflateInit.\n\n\n\n\n\n\nint inflate (z_streamp strm, int flush);\n//\n//    inflate decompresses as much data as possible, and stops when the input\n//  buffer becomes empty or the output buffer becomes full. It may some\n//  introduce some output latency (reading input without producing any output)\n//  except when forced to flush.\n//\n//  The detailed semantics are as follows. inflate performs one or both of the\n//  following actions:\n//\n//  - Decompress more input starting at next_in and update next_in and avail_in\n//    accordingly. If not all input can be processed (because there is not\n//    enough room in the output buffer), next_in is updated and processing\n//    will resume at this point for the next call of inflate().\n//\n//  - Provide more output starting at next_out and update next_out and avail_out\n//    accordingly.  inflate() provides as much output as possible, until there\n//    is no more input data or no more space in the output buffer (see below\n//    about the flush parameter).\n//\n//  Before the call of inflate(), the application should ensure that at least\n//  one of the actions is possible, by providing more input and/or consuming\n//  more output, and updating the next_* and avail_* values accordingly.\n//  The application can consume the uncompressed output when it wants, for\n//  example when the output buffer is full (avail_out == 0), or after each\n//  call of inflate(). If inflate returns Z_OK and with zero avail_out, it\n//  must be called again after making room in the output buffer because there\n//  might be more output pending.\n//\n//    If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much\n//  output as possible to the output buffer. The flushing behavior of inflate is\n//  not specified for values of the flush parameter other than Z_SYNC_FLUSH\n//  and Z_FINISH, but the current implementation actually flushes as much output\n//  as possible anyway.\n//\n//    inflate() should normally be called until it returns Z_STREAM_END or an\n//  error. However if all decompression is to be performed in a single step\n//  (a single call of inflate), the parameter flush should be set to\n//  Z_FINISH. In this case all pending input is processed and all pending\n//  output is flushed; avail_out must be large enough to hold all the\n//  uncompressed data. (The size of the uncompressed data may have been saved\n//  by the compressor for this purpose.) The next operation on this stream must\n//  be inflateEnd to deallocate the decompression state. The use of Z_FINISH\n//  is never required, but can be used to inform inflate that a faster routine\n//  may be used for the single inflate() call.\n//\n//     If a preset dictionary is needed at this point (see inflateSetDictionary\n//  below), inflate sets strm-adler to the adler32 checksum of the\n//  dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise\n//  it sets strm->adler to the adler32 checksum of all output produced\n//  so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or\n//  an error code as described below. At the end of the stream, inflate()\n//  checks that its computed adler32 checksum is equal to that saved by the\n//  compressor and returns Z_STREAM_END only if the checksum is correct.\n//\n//    inflate() returns Z_OK if some progress has been made (more input processed\n//  or more output produced), Z_STREAM_END if the end of the compressed data has\n//  been reached and all uncompressed output has been produced, Z_NEED_DICT if a\n//  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was\n//  corrupted (input stream not conforming to the zlib format or incorrect\n//  adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent\n//  (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not\n//  enough memory, Z_BUF_ERROR if no progress is possible or if there was not\n//  enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR\n//  case, the application may then call inflateSync to look for a good\n//  compression block.\n//\n\n\nint inflateEnd (z_streamp strm);\n//\n//     All dynamically allocated data structures for this stream are freed.\n//   This function discards any unprocessed input and does not flush any\n//   pending output.\n//\n//     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state\n//   was inconsistent. In the error case, msg may be set but then points to a\n//   static string (which must not be deallocated).\n\n                        // Advanced functions \n\n//  The following functions are needed only in some special applications.\n\n\n\n\n\nint inflateSetDictionary (z_streamp strm,\n                                             const Byte *dictionary,\n                                             uInt  dictLength);\n//\n//     Initializes the decompression dictionary from the given uncompressed byte\n//   sequence. This function must be called immediately after a call of inflate\n//   if this call returned Z_NEED_DICT. The dictionary chosen by the compressor\n//   can be determined from the Adler32 value returned by this call of\n//   inflate. The compressor and decompressor must use exactly the same\n//   dictionary. \n//\n//     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a\n//   parameter is invalid (such as NULL dictionary) or the stream state is\n//   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the\n//   expected one (incorrect Adler32 value). inflateSetDictionary does not\n//   perform any decompression: this will be done by subsequent calls of\n//   inflate().\n\n\nint inflateSync (z_streamp strm);\n// \n//    Skips invalid compressed data until a full flush point can be found, or until all\n//  available input is skipped. No output is provided.\n//\n//    inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR\n//  if no more input was provided, Z_DATA_ERROR if no flush point has been found,\n//  or Z_STREAM_ERROR if the stream structure was inconsistent. In the success\n//  case, the application may save the current current value of total_in which\n//  indicates where valid compressed data was found. In the error case, the\n//  application may repeatedly call inflateSync, providing more input each time,\n//  until success or end of the input data.\n\n\nint inflateReset (z_streamp strm);\n//     This function is equivalent to inflateEnd followed by inflateInit,\n//   but does not free and reallocate all the internal decompression state.\n//   The stream will keep attributes that may have been set by inflateInit2.\n//\n//      inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source\n//   stream state was inconsistent (such as zalloc or state being NULL).\n//\n\n\n\n// checksum functions\n// These functions are not related to compression but are exported\n// anyway because they might be useful in applications using the\n// compression library.\n\nuLong adler32 (uLong adler, const Byte *buf, uInt len);\n//     Update a running Adler-32 checksum with the bytes buf[0..len-1] and\n//   return the updated checksum. If buf is NULL, this function returns\n//   the required initial value for the checksum.\n//   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed\n//   much faster. Usage example:\n//\n//     uLong adler = adler32(0L, Z_NULL, 0);\n//\n//     while (read_buffer(buffer, length) != EOF) {\n//       adler = adler32(adler, buffer, length);\n//     }\n//     if (adler != original_adler) error();\n\nuLong ucrc32   (uLong crc, const Byte *buf, uInt len);\n//     Update a running crc with the bytes buf[0..len-1] and return the updated\n//   crc. If buf is NULL, this function returns the required initial value\n//   for the crc. Pre- and post-conditioning (one's complement) is performed\n//   within this function so it shouldn't be done by the application.\n//   Usage example:\n//\n//     uLong crc = crc32(0L, Z_NULL, 0);\n//\n//     while (read_buffer(buffer, length) != EOF) {\n//       crc = crc32(crc, buffer, length);\n//     }\n//     if (crc != original_crc) error();\n\n\n\n\nconst char   *zError           (int err);\nint           inflateSyncPoint (z_streamp z);\nconst uLong *get_crc_table    (void);\n\n\n\ntypedef unsigned char  uch;\ntypedef uch uchf;\ntypedef unsigned short ush;\ntypedef ush ushf;\ntypedef unsigned long  ulg;\n\n\n\nconst char * const z_errmsg[10] = { // indexed by 2-zlib_error\n\"need dictionary\",     // Z_NEED_DICT       2\n\"stream end\",          // Z_STREAM_END      1\n\"\",                    // Z_OK              0\n\"file error\",          // Z_ERRNO         (-1)\n\"stream error\",        // Z_STREAM_ERROR  (-2)\n\"data error\",          // Z_DATA_ERROR    (-3)\n\"insufficient memory\", // Z_MEM_ERROR     (-4)\n\"buffer error\",        // Z_BUF_ERROR     (-5)\n\"incompatible version\",// Z_VERSION_ERROR (-6)\n\"\"};\n\n\n#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]\n\n#define ERR_RETURN(strm,err) \\\n  return (strm->msg = (char*)ERR_MSG(err), (err))\n// To be used only when the state is known to be valid \n\n        // common constants\n\n\n#define STORED_BLOCK 0\n#define STATIC_TREES 1\n#define DYN_TREES    2\n// The three kinds of block type \n\n#define MIN_MATCH  3\n#define MAX_MATCH  258\n// The minimum and maximum match lengths \n\n#define PRESET_DICT 0x20 // preset dictionary flag in zlib header \n\n        // target dependencies \n\n#define OS_CODE  0x0b  // Window 95 & Windows NT\n\n\n\n         // functions \n\n#define zmemzero(dest, len) memset(dest, 0, len)\n\n// Diagnostic functions\n#undef Assert\n#undef Trace\n#undef Tracev\n#undef Tracevv\n#undef Tracec\n#undef Tracecv\n\n#ifdef DEBUG\n\n\tint z_verbose = 0;\n\tvoid z_error (char *m) {fprintf(stderr, \"%s\\n\", m); exit(1);}\n\n#define Assert(cond,msg) {if(!(cond)) z_error(msg);}\n#define Trace(x) {if (z_verbose>=0) fprintf x ;}\n#define Tracev(x) {if (z_verbose>0) fprintf x ;}\n#define Tracevv(x) {if (z_verbose>1) fprintf x ;}\n#define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}\n#define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}\n\n#else\n\n#ifndef __noop\n#if _MSC_VER < 1300\n#define __noop ((void)0)\n#endif\n#endif\n\n#define Assert(cond,msg)\t__noop\n#define Trace(x)\t\t\t__noop\n#define Tracev(x)\t\t\t__noop\n#define Tracevv(x)\t\t\t__noop\n#define Tracec(c,x)\t\t\t__noop\n#define Tracecv(c,x)\t\t__noop\n\n#endif\n\n\ntypedef uLong (*check_func) (uLong check, const Byte *buf, uInt len);\nvoidpf zcalloc (voidpf opaque, unsigned items, unsigned size);\nvoid   zcfree  (voidpf opaque, voidpf ptr);\n\n#define ZALLOC(strm, items, size) \\\n           (*((strm)->zalloc))((strm)->opaque, (items), (size))\n#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))\n\n//void ZFREE(z_streamp strm,voidpf addr)\n//{ *((strm)->zfree))((strm)->opaque, addr);\n//}\n\n#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}\n\n\n\n\n// Huffman code lookup table entry--this entry is four bytes for machines\n// that have 16-bit pointers (e.g. PC's in the small or medium model).\n\n\ntypedef struct inflate_huft_s inflate_huft;\n\nstruct inflate_huft_s {\n  union {\n    struct {\n      Byte Exop;        // number of extra bits or operation\n      Byte Bits;        // number of bits in this code or subcode\n    } what;\n    uInt pad;           // pad structure to a power of 2 (4 bytes for\n  } word;               //  16-bit, 8 bytes for 32-bit int's)\n  uInt base;            // literal, length base, distance base, or table offset\n};\n\n// Maximum size of dynamic tree.  The maximum found in a long but non-\n//   exhaustive search was 1004 huft structures (850 for length/literals\n//   and 154 for distances, the latter actually the result of an\n//   exhaustive search).  The actual maximum is not known, but the\n//   value below is more than safe.\n#define MANY 1440\n\nint inflate_trees_bits (\n    uInt *,                    // 19 code lengths\n    uInt *,                    // bits tree desired/actual depth\n    inflate_huft * *,       // bits tree result\n    inflate_huft *,             // space for trees\n    z_streamp);                // for messages\n\nint inflate_trees_dynamic (\n    uInt,                       // number of literal/length codes\n    uInt,                       // number of distance codes\n    uInt *,                    // that many (total) code lengths\n    uInt *,                    // literal desired/actual bit depth\n    uInt *,                    // distance desired/actual bit depth\n    inflate_huft * *,       // literal/length tree result\n    inflate_huft * *,       // distance tree result\n    inflate_huft *,             // space for trees\n    z_streamp);                // for messages\n\nint inflate_trees_fixed (\n    uInt *,                    // literal desired/actual bit depth\n    uInt *,                    // distance desired/actual bit depth\n    const inflate_huft * *,       // literal/length tree result\n    const inflate_huft * *,       // distance tree result\n    z_streamp);                // for memory allocation\n\n\n\n\n\nstruct inflate_blocks_state;\ntypedef struct inflate_blocks_state inflate_blocks_statef;\n\ninflate_blocks_statef * inflate_blocks_new (\n    z_streamp z,\n    check_func c,               // check function\n    uInt w);                   // window size\n\nint inflate_blocks (\n    inflate_blocks_statef *,\n    z_streamp ,\n    int);                      // initial return code\n\nvoid inflate_blocks_reset (\n    inflate_blocks_statef *,\n    z_streamp ,\n    uLong *);                  // check value on output\n\nint inflate_blocks_free (\n    inflate_blocks_statef *,\n    z_streamp);\n\nvoid inflate_set_dictionary (\n    inflate_blocks_statef *s,\n    const Byte *d,  // dictionary\n    uInt  n);       // dictionary length\n\nint inflate_blocks_sync_point (\n    inflate_blocks_statef *s);\n\n\n\n\nstruct inflate_codes_state;\ntypedef struct inflate_codes_state inflate_codes_statef;\n\ninflate_codes_statef *inflate_codes_new (\n    uInt, uInt,\n    const inflate_huft *, const inflate_huft *,\n    z_streamp );\n\nint inflate_codes (\n    inflate_blocks_statef *,\n    z_streamp ,\n    int);\n\nvoid inflate_codes_free (\n    inflate_codes_statef *,\n    z_streamp );\n\n\n\n\ntypedef enum {\n      IBM_TYPE,     // get type bits (3, including end bit)\n      IBM_LENS,     // get lengths for stored\n      IBM_STORED,   // processing stored block\n      IBM_TABLE,    // get table lengths\n      IBM_BTREE,    // get bit lengths tree for a dynamic block\n      IBM_DTREE,    // get length, distance trees for a dynamic block\n      IBM_CODES,    // processing fixed or dynamic block\n      IBM_DRY,      // output remaining window bytes\n      IBM_DONE,     // finished last block, done \n      IBM_BAD}      // got a data error--stuck here \ninflate_block_mode;\n\n// inflate blocks semi-private state \nstruct inflate_blocks_state {\n\n  // mode \n  inflate_block_mode  mode;     // current inflate_block mode \n\n  // mode dependent information \n  union {\n    uInt left;          // if STORED, bytes left to copy \n    struct {\n      uInt table;               // table lengths (14 bits) \n      uInt index;               // index into blens (or border)\n      uInt *blens;             // bit lengths of codes\n      uInt bb;                  // bit length tree depth \n      inflate_huft *tb;         // bit length decoding tree \n    } trees;            // if DTREE, decoding info for trees \n    struct {\n      inflate_codes_statef \n         *codes;\n    } decode;           // if CODES, current state \n  } sub;                // submode\n  uInt last;            // true if this block is the last block \n\n  // mode independent information \n  uInt bitk;            // bits in bit buffer \n  uLong bitb;           // bit buffer \n  inflate_huft *hufts;  // single malloc for tree space \n  Byte *window;        // sliding window \n  Byte *end;           // one byte after sliding window \n  Byte *read;          // window read pointer \n  Byte *write;         // window write pointer \n  check_func checkfn;   // check function \n  uLong check;          // check on output \n\n};\n\n\n// defines for inflate input/output\n//   update pointers and return \n#define UPDBITS {s->bitb=b;s->bitk=k;}\n#define UPDIN {z->avail_in=n;z->total_in+=(uLong)(p-z->next_in);z->next_in=p;}\n#define UPDOUT {s->write=q;}\n#define UPDATE {UPDBITS UPDIN UPDOUT}\n#define LEAVE {UPDATE return inflate_flush(s,z,r);}\n//   get bytes and bits \n#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}\n#define NEEDBYTE {if(n)r=Z_OK;else LEAVE}\n#define NEXTBYTE (n--,*p++)\n#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}}\n#define DUMPBITS(j) {b>>=(j);k-=(j);}\n//   output bytes \n#define WAVAIL (uInt)(q<s->read?s->read-q-1:s->end-q)\n#define LOADOUT {q=s->write;m=(uInt)WAVAIL;m;}\n#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}}\n#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT}\n#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;}\n#define OUTBYTE(a) {*q++=(Byte)(a);m--;}\n//   load local pointers \n#define LOAD {LOADIN LOADOUT}\n\n// masks for lower bits (size given to avoid silly warnings with Visual C++) \n// And'ing with mask[n] masks the lower n bits\nconst uInt inflate_mask[17] = {\n    0x0000,\n    0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,\n    0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff\n};\n\n// copy as much as possible from the sliding window to the output area\nint inflate_flush (inflate_blocks_statef *, z_streamp, int);\n\nint inflate_fast (uInt, uInt, const inflate_huft *, const inflate_huft *, inflate_blocks_statef *, z_streamp );\n\n\n\nconst uInt fixed_bl = 9;\nconst uInt fixed_bd = 5;\nconst inflate_huft fixed_tl[] = {\n    {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115},\n    {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},192},\n    {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},160},\n    {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},224},\n    {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},144},\n    {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},208},\n    {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},176},\n    {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},240},\n    {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227},\n    {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},200},\n    {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},168},\n    {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},232},\n    {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},152},\n    {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},216},\n    {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},184},\n    {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},248},\n    {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163},\n    {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},196},\n    {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},164},\n    {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},228},\n    {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},148},\n    {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},212},\n    {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},180},\n    {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},244},\n    {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0},\n    {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},204},\n    {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},172},\n    {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},236},\n    {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},156},\n    {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},220},\n    {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},188},\n    {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},252},\n    {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131},\n    {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},194},\n    {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},162},\n    {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},226},\n    {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},146},\n    {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},210},\n    {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},178},\n    {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},242},\n    {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258},\n    {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},202},\n    {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},170},\n    {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},234},\n    {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},154},\n    {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},218},\n    {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},186},\n    {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},250},\n    {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195},\n    {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},198},\n    {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},166},\n    {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},230},\n    {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},150},\n    {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},214},\n    {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},182},\n    {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},246},\n    {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0},\n    {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},206},\n    {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},174},\n    {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},238},\n    {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},158},\n    {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},222},\n    {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},190},\n    {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},254},\n    {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115},\n    {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},193},\n    {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},161},\n    {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},225},\n    {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},145},\n    {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},209},\n    {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},177},\n    {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},241},\n    {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227},\n    {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},201},\n    {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},169},\n    {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},233},\n    {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},153},\n    {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},217},\n    {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},185},\n    {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},249},\n    {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163},\n    {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},197},\n    {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},165},\n    {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},229},\n    {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},149},\n    {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},213},\n    {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},181},\n    {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},245},\n    {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0},\n    {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},205},\n    {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},173},\n    {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},237},\n    {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},157},\n    {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},221},\n    {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},189},\n    {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},253},\n    {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131},\n    {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},195},\n    {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},163},\n    {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},227},\n    {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},147},\n    {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},211},\n    {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},179},\n    {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},243},\n    {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258},\n    {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},203},\n    {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},171},\n    {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},235},\n    {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},155},\n    {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},219},\n    {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},187},\n    {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},251},\n    {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195},\n    {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},199},\n    {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},167},\n    {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},231},\n    {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},151},\n    {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},215},\n    {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},183},\n    {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},247},\n    {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0},\n    {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},207},\n    {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},175},\n    {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},239},\n    {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},159},\n    {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},223},\n    {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},191},\n    {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},255}\n  };\nconst inflate_huft fixed_td[] = {\n    {{{80,5}},1}, {{{87,5}},257}, {{{83,5}},17}, {{{91,5}},4097},\n    {{{81,5}},5}, {{{89,5}},1025}, {{{85,5}},65}, {{{93,5}},16385},\n    {{{80,5}},3}, {{{88,5}},513}, {{{84,5}},33}, {{{92,5}},8193},\n    {{{82,5}},9}, {{{90,5}},2049}, {{{86,5}},129}, {{{192,5}},24577},\n    {{{80,5}},2}, {{{87,5}},385}, {{{83,5}},25}, {{{91,5}},6145},\n    {{{81,5}},7}, {{{89,5}},1537}, {{{85,5}},97}, {{{93,5}},24577},\n    {{{80,5}},4}, {{{88,5}},769}, {{{84,5}},49}, {{{92,5}},12289},\n    {{{82,5}},13}, {{{90,5}},3073}, {{{86,5}},193}, {{{192,5}},24577}\n  };\n\n\n\n\n\n\n\n// copy as much as possible from the sliding window to the output area\nint inflate_flush(inflate_blocks_statef *s,z_streamp z,int r)\n{\n  uInt n;\n  Byte *p;\n  Byte *q;\n\n  // local copies of source and destination pointers \n  p = z->next_out;\n  q = s->read;\n\n  // compute number of bytes to copy as far as end of window \n  n = (uInt)((q <= s->write ? s->write : s->end) - q);\n  if (n > z->avail_out) n = z->avail_out;\n  if (n && r == Z_BUF_ERROR) r = Z_OK;\n\n  // update counters\n  z->avail_out -= n;\n  z->total_out += n;\n\n  // update check information \n  if (s->checkfn != Z_NULL)\n    z->adler = s->check = (*s->checkfn)(s->check, q, n);\n\n  // copy as far as end of window \n  if (n!=0)          // check for n!=0 to avoid waking up CodeGuard\n  { memcpy(p, q, n);\n    p += n;\n    q += n;\n  }\n\n  // see if more to copy at beginning of window\n  if (q == s->end)\n  {\n    // wrap pointers \n    q = s->window;\n    if (s->write == s->end)\n      s->write = s->window;\n\n    // compute bytes to copy \n    n = (uInt)(s->write - q);\n    if (n > z->avail_out) n = z->avail_out;\n    if (n && r == Z_BUF_ERROR) r = Z_OK;\n\n    // update counters \n    z->avail_out -= n;\n    z->total_out += n;\n\n    // update check information \n    if (s->checkfn != Z_NULL)\n      z->adler = s->check = (*s->checkfn)(s->check, q, n);\n\n    // copy\n    memcpy(p, q, n);\n    p += n;\n    q += n;\n  }\n\n  // update pointers\n  z->next_out = p;\n  s->read = q;\n\n  // done\n  return r;\n}\n\n\n\n\n\n\n// simplify the use of the inflate_huft type with some defines\n#define exop word.what.Exop\n#define bits word.what.Bits\n\ntypedef enum {        // waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing \n      START,    // x: set up for LEN \n      LEN,      // i: get length/literal/eob next \n      LENEXT,   // i: getting length extra (have base) \n      DIST,     // i: get distance next \n      DISTEXT,  // i: getting distance extra \n      COPY,     // o: copying bytes in window, waiting for space\n      LIT,      // o: got literal, waiting for output space \n      WASH,     // o: got eob, possibly still output waiting \n      END,      // x: got eob and all data flushed \n      BADCODE}  // x: got error \ninflate_codes_mode;\n\n// inflate codes private state\nstruct inflate_codes_state {\n\n  // mode \n  inflate_codes_mode mode;      // current inflate_codes mode \n\n  // mode dependent information \n  uInt len;\n  union {\n    struct {\n      const inflate_huft *tree;       // pointer into tree \n      uInt need;                // bits needed \n    } code;             // if LEN or DIST, where in tree \n    uInt lit;           // if LIT, literal \n    struct {\n      uInt get;                 // bits to get for extra \n      uInt dist;                // distance back to copy from \n    } copy;             // if EXT or COPY, where and how much \n  } sub;                // submode\n\n  // mode independent information \n  Byte lbits;           // ltree bits decoded per branch \n  Byte dbits;           // dtree bits decoder per branch \n  const inflate_huft *ltree;          // literal/length/eob tree\n  const inflate_huft *dtree;          // distance tree\n\n};\n\n\ninflate_codes_statef *inflate_codes_new(\nuInt bl, uInt bd,\nconst inflate_huft *tl,\nconst inflate_huft *td, // need separate declaration for Borland C++\nz_streamp z)\n{\n  inflate_codes_statef *c;\n\n  if ((c = (inflate_codes_statef *)\n       ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL)\n  {\n    c->mode = START;\n    c->lbits = (Byte)bl;\n    c->dbits = (Byte)bd;\n    c->ltree = tl;\n    c->dtree = td;\n    Tracev((stderr, \"inflate:       codes new\\n\"));\n  }\n  return c;\n}\n\n\nint inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)\n{\n  uInt j;               // temporary storage\n  const inflate_huft *t;      // temporary pointer\n  uInt e;               // extra bits or operation\n  uLong b;              // bit buffer\n  uInt k;               // bits in bit buffer\n  Byte *p;             // input data pointer\n  uInt n;               // bytes available there\n  Byte *q;             // output window write pointer\n  uInt m;               // bytes to end of window or read pointer\n  Byte *f;             // pointer to copy strings from\n  inflate_codes_statef *c = s->sub.decode.codes;  // codes state\n\n  // copy input/output information to locals (UPDATE macro restores)\n  LOAD\n\n  // process input and output based on current state\n  for(;;) switch (c->mode)\n  {             // waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n    case START:         // x: set up for LEN\n#ifndef SLOW\n      if (m >= 258 && n >= 10)\n      {\n        UPDATE\n        r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z);\n        LOAD\n        if (r != Z_OK)\n        {\n          c->mode = r == Z_STREAM_END ? WASH : BADCODE;\n          break;\n        }\n      }\n#endif // !SLOW\n      c->sub.code.need = c->lbits;\n      c->sub.code.tree = c->ltree;\n      c->mode = LEN;\n    case LEN:           // i: get length/literal/eob next\n      j = c->sub.code.need;\n      NEEDBITS(j)\n      t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);\n      DUMPBITS(t->bits)\n      e = (uInt)(t->exop);\n      if (e == 0)               // literal \n      {\n        c->sub.lit = t->base;\n        Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?\n                 \"inflate:         literal '%c'\\n\" :\n                 \"inflate:         literal 0x%02x\\n\", t->base));\n        c->mode = LIT;\n        break;\n      }\n      if (e & 16)               // length \n      {\n        c->sub.copy.get = e & 15;\n        c->len = t->base;\n        c->mode = LENEXT;\n        break;\n      }\n      if ((e & 64) == 0)        // next table \n      {\n        c->sub.code.need = e;\n        c->sub.code.tree = t + t->base;\n        break;\n      }\n      if (e & 32)               // end of block \n      {\n        Tracevv((stderr, \"inflate:         end of block\\n\"));\n        c->mode = WASH;\n        break;\n      }\n      c->mode = BADCODE;        // invalid code \n      z->msg = (char*)\"invalid literal/length code\";\n      r = Z_DATA_ERROR;\n      LEAVE\n    case LENEXT:        // i: getting length extra (have base) \n      j = c->sub.copy.get;\n      NEEDBITS(j)\n      c->len += (uInt)b & inflate_mask[j];\n      DUMPBITS(j)\n      c->sub.code.need = c->dbits;\n      c->sub.code.tree = c->dtree;\n      Tracevv((stderr, \"inflate:         length %u\\n\", c->len));\n      c->mode = DIST;\n    case DIST:          // i: get distance next \n      j = c->sub.code.need;\n      NEEDBITS(j)\n      t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);\n      DUMPBITS(t->bits)\n      e = (uInt)(t->exop);\n      if (e & 16)               // distance \n      {\n        c->sub.copy.get = e & 15;\n        c->sub.copy.dist = t->base;\n        c->mode = DISTEXT;\n        break;\n      }\n      if ((e & 64) == 0)        // next table \n      {\n        c->sub.code.need = e;\n        c->sub.code.tree = t + t->base;\n        break;\n      }\n      c->mode = BADCODE;        // invalid code \n      z->msg = (char*)\"invalid distance code\";\n      r = Z_DATA_ERROR;\n      LEAVE\n    case DISTEXT:       // i: getting distance extra \n      j = c->sub.copy.get;\n      NEEDBITS(j)\n      c->sub.copy.dist += (uInt)b & inflate_mask[j];\n      DUMPBITS(j)\n      Tracevv((stderr, \"inflate:         distance %u\\n\", c->sub.copy.dist));\n      c->mode = COPY;\n    case COPY:          // o: copying bytes in window, waiting for space \n      f = (uInt)(q - s->window) < c->sub.copy.dist ?\n          s->end - (c->sub.copy.dist - (q - s->window)) :\n          q - c->sub.copy.dist;\n      while (c->len)\n      {\n        NEEDOUT\n        OUTBYTE(*f++)\n        if (f == s->end)\n          f = s->window;\n        c->len--;\n      }\n      c->mode = START;\n      break;\n    case LIT:           // o: got literal, waiting for output space \n      NEEDOUT\n      OUTBYTE(c->sub.lit)\n      c->mode = START;\n      break;\n    case WASH:          // o: got eob, possibly more output \n      if (k > 7)        // return unused byte, if any \n      {\n        Assert(k < 16, \"inflate_codes grabbed too many bytes\");\n        k -= 8;\n        n++;\n        p--;            // can always return one \n      }\n      FLUSH\n      if (s->read != s->write)\n        LEAVE\n      c->mode = END;\n    case END:\n      r = Z_STREAM_END;\n      LEAVE\n    case BADCODE:       // x: got error\n      r = Z_DATA_ERROR;\n      LEAVE\n    default:\n      r = Z_STREAM_ERROR;\n      LEAVE\n  }\n}\n\n\nvoid inflate_codes_free(inflate_codes_statef *c,z_streamp z)\n{ ZFREE(z, c);\n  Tracev((stderr, \"inflate:       codes free\\n\"));\n}\n\n\n\n// infblock.c -- interpret and process block types to last block\n// Copyright (C) 1995-1998 Mark Adler\n// For conditions of distribution and use, see copyright notice in zlib.h\n\n//struct inflate_codes_state {int dummy;}; // for buggy compilers \n\n\n\n// Table for deflate from PKZIP's appnote.txt.\nconst uInt border[] = { // Order of the bit length code lengths\n        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};\n\n//\n// Notes beyond the 1.93a appnote.txt:\n//\n// 1. Distance pointers never point before the beginning of the output stream.\n// 2. Distance pointers can point back across blocks, up to 32k away.\n// 3. There is an implied maximum of 7 bits for the bit length table and\n//    15 bits for the actual data.\n// 4. If only one code exists, then it is encoded using one bit.  (Zero\n//    would be more efficient, but perhaps a little confusing.)  If two\n//    codes exist, they are coded using one bit each (0 and 1).\n// 5. There is no way of sending zero distance codes--a dummy must be\n//    sent if there are none.  (History: a pre 2.0 version of PKZIP would\n//    store blocks with no distance codes, but this was discovered to be\n//    too harsh a criterion.)  Valid only for 1.93a.  2.04c does allow\n//    zero distance codes, which is sent as one code of zero bits in\n//    length.\n// 6. There are up to 286 literal/length codes.  Code 256 represents the\n//    end-of-block.  Note however that the static length tree defines\n//    288 codes just to fill out the Huffman codes.  Codes 286 and 287\n//    cannot be used though, since there is no length base or extra bits\n//    defined for them.  Similarily, there are up to 30 distance codes.\n//    However, static trees define 32 codes (all 5 bits) to fill out the\n//    Huffman codes, but the last two had better not show up in the data.\n// 7. Unzip can check dynamic Huffman blocks for complete code sets.\n//    The exception is that a single code would not be complete (see #4).\n// 8. The five bits following the block type is really the number of\n//    literal codes sent minus 257.\n// 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits\n//    (1+6+6).  Therefore, to output three times the length, you output\n//    three codes (1+1+1), whereas to output four times the same length,\n//    you only need two codes (1+3).  Hmm.\n//10. In the tree reconstruction algorithm, Code = Code + Increment\n//    only if BitLength(i) is not zero.  (Pretty obvious.)\n//11. Correction: 4 Bits: # of Bit Length codes - 4     (4 - 19)\n//12. Note: length code 284 can represent 227-258, but length code 285\n//    really is 258.  The last length deserves its own, short code\n//    since it gets used a lot in very redundant files.  The length\n//    258 is special since 258 - 3 (the min match length) is 255.\n//13. The literal/length and distance code bit lengths are read as a\n//    single stream of lengths.  It is possible (and advantageous) for\n//    a repeat code (16, 17, or 18) to go across the boundary between\n//    the two sets of lengths.\n\n\nvoid inflate_blocks_reset(inflate_blocks_statef *s, z_streamp z, uLong *c)\n{\n  if (c != Z_NULL)\n    *c = s->check;\n  if (s->mode == IBM_BTREE || s->mode == IBM_DTREE)\n    ZFREE(z, s->sub.trees.blens);\n  if (s->mode == IBM_CODES)\n    inflate_codes_free(s->sub.decode.codes, z);\n  s->mode = IBM_TYPE;\n  s->bitk = 0;\n  s->bitb = 0;\n  s->read = s->write = s->window;\n  if (s->checkfn != Z_NULL)\n    z->adler = s->check = (*s->checkfn)(0L, (const Byte *)Z_NULL, 0);\n  Tracev((stderr, \"inflate:   blocks reset\\n\"));\n}\n\n\ninflate_blocks_statef *inflate_blocks_new(z_streamp z, check_func c, uInt w)\n{\n  inflate_blocks_statef *s;\n\n  if ((s = (inflate_blocks_statef *)ZALLOC\n       (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL)\n    return s;\n  if ((s->hufts =\n       (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL)\n  {\n    ZFREE(z, s);\n    return Z_NULL;\n  }\n  if ((s->window = (Byte *)ZALLOC(z, 1, w)) == Z_NULL)\n  {\n    ZFREE(z, s->hufts);\n    ZFREE(z, s);\n    return Z_NULL;\n  }\n  s->end = s->window + w;\n  s->checkfn = c;\n  s->mode = IBM_TYPE;\n  Tracev((stderr, \"inflate:   blocks allocated\\n\"));\n  inflate_blocks_reset(s, z, Z_NULL);\n  return s;\n}\n\n\nint inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r)\n{\n  uInt t;               // temporary storage\n  uLong b;              // bit buffer\n  uInt k;               // bits in bit buffer\n  Byte *p;             // input data pointer\n  uInt n;               // bytes available there\n  Byte *q;             // output window write pointer\n  uInt m;               // bytes to end of window or read pointer \n\n  // copy input/output information to locals (UPDATE macro restores) \n  LOAD\n\n  // process input based on current state \n  for(;;) switch (s->mode)\n  {\n    case IBM_TYPE:\n      NEEDBITS(3)\n      t = (uInt)b & 7;\n      s->last = t & 1;\n      switch (t >> 1)\n      {\n        case 0:                         // stored \n          Tracev((stderr, \"inflate:     stored block%s\\n\",\n                 s->last ? \" (last)\" : \"\"));\n          DUMPBITS(3)\n          t = k & 7;                    // go to byte boundary \n          DUMPBITS(t)\n          s->mode = IBM_LENS;               // get length of stored block\n          break;\n        case 1:                         // fixed \n          Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n                 s->last ? \" (last)\" : \"\"));\n          {\n            uInt bl, bd;\n            const inflate_huft *tl, *td;\n\n            inflate_trees_fixed(&bl, &bd, &tl, &td, z);\n            s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);\n            if (s->sub.decode.codes == Z_NULL)\n            {\n              r = Z_MEM_ERROR;\n              LEAVE\n            }\n          }\n          DUMPBITS(3)\n          s->mode = IBM_CODES;\n          break;\n        case 2:                         // dynamic \n          Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n                 s->last ? \" (last)\" : \"\"));\n          DUMPBITS(3)\n          s->mode = IBM_TABLE;\n          break;\n        case 3:                         // illegal\n          DUMPBITS(3)\n          s->mode = IBM_BAD;\n          z->msg = (char*)\"invalid block type\";\n          r = Z_DATA_ERROR;\n          LEAVE\n      }\n      break;\n    case IBM_LENS:\n      NEEDBITS(32)\n      if ((((~b) >> 16) & 0xffff) != (b & 0xffff))\n      {\n        s->mode = IBM_BAD;\n        z->msg = (char*)\"invalid stored block lengths\";\n        r = Z_DATA_ERROR;\n        LEAVE\n      }\n      s->sub.left = (uInt)b & 0xffff;\n      b = k = 0;                      // dump bits \n      Tracev((stderr, \"inflate:       stored length %u\\n\", s->sub.left));\n      s->mode = s->sub.left ? IBM_STORED : (s->last ? IBM_DRY : IBM_TYPE);\n      break;\n    case IBM_STORED:\n      if (n == 0)\n        LEAVE\n      NEEDOUT\n      t = s->sub.left;\n      if (t > n) t = n;\n      if (t > m) t = m;\n      memcpy(q, p, t);\n      p += t;  n -= t;\n      q += t;  m -= t;\n      if ((s->sub.left -= t) != 0)\n        break;\n      Tracev((stderr, \"inflate:       stored end, %lu total out\\n\",\n              z->total_out + (q >= s->read ? q - s->read :\n              (s->end - s->read) + (q - s->window))));\n      s->mode = s->last ? IBM_DRY : IBM_TYPE;\n      break;\n    case IBM_TABLE:\n      NEEDBITS(14)\n      s->sub.trees.table = t = (uInt)b & 0x3fff;\n      // remove this section to workaround bug in pkzip\n      if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29)\n      {\n        s->mode = IBM_BAD;\n        z->msg = (char*)\"too many length or distance symbols\";\n        r = Z_DATA_ERROR;\n        LEAVE\n      }\n      // end remove\n      t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n      if ((s->sub.trees.blens = (uInt*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)\n      {\n        r = Z_MEM_ERROR;\n        LEAVE\n      }\n      DUMPBITS(14)\n      s->sub.trees.index = 0;\n      Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n      s->mode = IBM_BTREE;\n    case IBM_BTREE:\n      while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))\n      {\n        NEEDBITS(3)\n        s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7;\n        DUMPBITS(3)\n      }\n      while (s->sub.trees.index < 19)\n        s->sub.trees.blens[border[s->sub.trees.index++]] = 0;\n      s->sub.trees.bb = 7;\n      t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb,\n                             &s->sub.trees.tb, s->hufts, z);\n      if (t != Z_OK)\n      {\n        ZFREE(z, s->sub.trees.blens);\n        r = t;\n        if (r == Z_DATA_ERROR)\n          s->mode = IBM_BAD;\n        LEAVE\n      }\n      s->sub.trees.index = 0;\n      Tracev((stderr, \"inflate:       bits tree ok\\n\"));\n      s->mode = IBM_DTREE;\n    case IBM_DTREE:\n      while (t = s->sub.trees.table,\n             s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))\n      {\n        inflate_huft *h;\n        uInt i, j, c;\n\n        t = s->sub.trees.bb;\n        NEEDBITS(t)\n        h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]);\n        t = h->bits;\n        c = h->base;\n        if (c < 16)\n        {\n          DUMPBITS(t)\n          s->sub.trees.blens[s->sub.trees.index++] = c;\n        }\n        else // c == 16..18 \n        {\n          i = c == 18 ? 7 : c - 14;\n          j = c == 18 ? 11 : 3;\n          NEEDBITS(t + i)\n          DUMPBITS(t)\n          j += (uInt)b & inflate_mask[i];\n          DUMPBITS(i)\n          i = s->sub.trees.index;\n          t = s->sub.trees.table;\n          if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||\n              (c == 16 && i < 1))\n          {\n            ZFREE(z, s->sub.trees.blens);\n            s->mode = IBM_BAD;\n            z->msg = (char*)\"invalid bit length repeat\";\n            r = Z_DATA_ERROR;\n            LEAVE\n          }\n          c = c == 16 ? s->sub.trees.blens[i - 1] : 0;\n          do {\n            s->sub.trees.blens[i++] = c;\n          } while (--j);\n          s->sub.trees.index = i;\n        }\n      }\n      s->sub.trees.tb = Z_NULL;\n      {\n        uInt bl, bd;\n        inflate_huft *tl, *td;\n        inflate_codes_statef *c;\n\n        bl = 9;         // must be <= 9 for lookahead assumptions \n        bd = 6;         // must be <= 9 for lookahead assumptions\n        t = s->sub.trees.table;\n        t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),\n                                  s->sub.trees.blens, &bl, &bd, &tl, &td,\n                                  s->hufts, z);\n        ZFREE(z, s->sub.trees.blens);\n        if (t != Z_OK)\n        {\n          if (t == (uInt)Z_DATA_ERROR)\n            s->mode = IBM_BAD;\n          r = t;\n          LEAVE\n        }\n        Tracev((stderr, \"inflate:       trees ok\\n\"));\n        if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)\n        {\n          r = Z_MEM_ERROR;\n          LEAVE\n        }\n        s->sub.decode.codes = c;\n      }\n      s->mode = IBM_CODES;\n    case IBM_CODES:\n      UPDATE\n      if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)\n        return inflate_flush(s, z, r);\n      r = Z_OK;\n      inflate_codes_free(s->sub.decode.codes, z);\n      LOAD\n      Tracev((stderr, \"inflate:       codes end, %lu total out\\n\",\n              z->total_out + (q >= s->read ? q - s->read :\n              (s->end - s->read) + (q - s->window))));\n      if (!s->last)\n      {\n        s->mode = IBM_TYPE;\n        break;\n      }\n      s->mode = IBM_DRY;\n    case IBM_DRY:\n      FLUSH\n      if (s->read != s->write)\n        LEAVE\n      s->mode = IBM_DONE;\n    case IBM_DONE:\n      r = Z_STREAM_END;\n      LEAVE\n    case IBM_BAD:\n      r = Z_DATA_ERROR;\n      LEAVE\n    default:\n      r = Z_STREAM_ERROR;\n      LEAVE\n  }\n}\n\n\nint inflate_blocks_free(inflate_blocks_statef *s, z_streamp z)\n{\n  inflate_blocks_reset(s, z, Z_NULL);\n  ZFREE(z, s->window);\n  ZFREE(z, s->hufts);\n  ZFREE(z, s);\n  Tracev((stderr, \"inflate:   blocks freed\\n\"));\n  return Z_OK;\n}\n\n\n\n// inftrees.c -- generate Huffman trees for efficient decoding\n// Copyright (C) 1995-1998 Mark Adler\n// For conditions of distribution and use, see copyright notice in zlib.h\n//\n\n\n\nextern const char inflate_copyright[] =\n   \" \";//inflate 1.1.3 Copyright 1995-1998 Mark Adler \";\n// If you use the zlib library in a product, an acknowledgment is welcome\n// in the documentation of your product. If for some reason you cannot\n// include such an acknowledgment, I would appreciate that you keep this\n// copyright string in the executable of your product.\n\n\n\nint huft_build (\n    uInt *,            // code lengths in bits\n    uInt,               // number of codes\n    uInt,               // number of \"simple\" codes\n    const uInt *,      // list of base values for non-simple codes\n    const uInt *,      // list of extra bits for non-simple codes\n    inflate_huft **,// result: starting table\n    uInt *,            // maximum lookup bits (returns actual) \n    inflate_huft *,     // space for trees \n    uInt *,             // hufts used in space \n    uInt * );         // space for values \n\n// Tables for deflate from PKZIP's appnote.txt. \nconst uInt cplens[31] = { // Copy lengths for literal codes 257..285\n        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};\n        // see note #13 above about 258\nconst uInt cplext[31] = { // Extra bits for literal codes 257..285\n        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,\n        3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; // 112==invalid\nconst uInt cpdist[30] = { // Copy offsets for distance codes 0..29\n        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n        8193, 12289, 16385, 24577};\nconst uInt cpdext[30] = { // Extra bits for distance codes \n        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,\n        7, 7, 8, 8, 9, 9, 10, 10, 11, 11,\n        12, 12, 13, 13};\n\n//\n//   Huffman code decoding is performed using a multi-level table lookup.\n//   The fastest way to decode is to simply build a lookup table whose\n//   size is determined by the longest code.  However, the time it takes\n//   to build this table can also be a factor if the data being decoded\n//   is not very long.  The most common codes are necessarily the\n//   shortest codes, so those codes dominate the decoding time, and hence\n//   the speed.  The idea is you can have a shorter table that decodes the\n//   shorter, more probable codes, and then point to subsidiary tables for\n//   the longer codes.  The time it costs to decode the longer codes is\n//   then traded against the time it takes to make longer tables.\n//\n//   This results of this trade are in the variables lbits and dbits\n//   below.  lbits is the number of bits the first level table for literal/\n//   length codes can decode in one step, and dbits is the same thing for\n//   the distance codes.  Subsequent tables are also less than or equal to\n//   those sizes.  These values may be adjusted either when all of the\n//   codes are shorter than that, in which case the longest code length in\n//   bits is used, or when the shortest code is *longer* than the requested\n//   table size, in which case the length of the shortest code in bits is\n//   used.\n//\n//   There are two different values for the two tables, since they code a\n//   different number of possibilities each.  The literal/length table\n//   codes 286 possible values, or in a flat code, a little over eight\n//   bits.  The distance table codes 30 possible values, or a little less\n//   than five bits, flat.  The optimum values for speed end up being\n//   about one bit more than those, so lbits is 8+1 and dbits is 5+1.\n//   The optimum values may differ though from machine to machine, and\n//   possibly even between compilers.  Your mileage may vary.\n//\n\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong. \n#define BMAX 15         // maximum bit length of any code\n\nint huft_build(\nuInt *b,               // code lengths in bits (all assumed <= BMAX)\nuInt n,                 // number of codes (assumed <= 288)\nuInt s,                 // number of simple-valued codes (0..s-1)\nconst uInt *d,         // list of base values for non-simple codes\nconst uInt *e,         // list of extra bits for non-simple codes\ninflate_huft * *t,  // result: starting table\nuInt *m,               // maximum lookup bits, returns actual\ninflate_huft *hp,       // space for trees\nuInt *hn,               // hufts used in space\nuInt *v)               // working area: values in order of bit length\n// Given a list of code lengths and a maximum table size, make a set of\n// tables to decode that set of codes.  Return Z_OK on success, Z_BUF_ERROR\n// if the given code set is incomplete (the tables are still built in this\n// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of\n// lengths), or Z_MEM_ERROR if not enough memory.\n{\n\n  uInt a;                       // counter for codes of length k\n  uInt c[BMAX+1];               // bit length count table\n  uInt f;                       // i repeats in table every f entries \n  int g;                        // maximum code length \n  int h;                        // table level \n  register uInt i;              // counter, current code \n  register uInt j;              // counter\n  register int k;               // number of bits in current code \n  int l;                        // bits per table (returned in m) \n  uInt mask;                    // (1 << w) - 1, to avoid cc -O bug on HP \n  register uInt *p;            // pointer into c[], b[], or v[]\n  inflate_huft *q;              // points to current table \n  struct inflate_huft_s r;      // table entry for structure assignment \n  inflate_huft *u[BMAX];        // table stack \n  register int w;               // bits before this table == (l * h) \n  uInt x[BMAX+1];               // bit offsets, then code stack \n  uInt *xp;                    // pointer into x \n  int y;                        // number of dummy codes added \n  uInt z;                       // number of entries in current table \n\n\n  // Generate counts for each bit length \n  p = c;\n#define C0 *p++ = 0;\n#define C2 C0 C0 C0 C0\n#define C4 C2 C2 C2 C2\n  C4; p;                          // clear c[]--assume BMAX+1 is 16\n  p = b;  i = n;\n  do {\n    c[*p++]++;                  // assume all entries <= BMAX \n  } while (--i);\n  if (c[0] == n)                // null input--all zero length codes \n  {\n    *t = (inflate_huft *)Z_NULL;\n    *m = 0;\n    return Z_OK;\n  }\n\n\n  // Find minimum and maximum length, bound *m by those \n  l = *m;\n  for (j = 1; j <= BMAX; j++)\n    if (c[j])\n      break;\n  k = j;                        // minimum code length \n  if ((uInt)l < j)\n    l = j;\n  for (i = BMAX; i; i--)\n    if (c[i])\n      break;\n  g = i;                        // maximum code length \n  if ((uInt)l > i)\n    l = i;\n  *m = l;\n\n\n  // Adjust last length count to fill out codes, if needed \n  for (y = 1 << j; j < i; j++, y <<= 1)\n    if ((y -= c[j]) < 0)\n      return Z_DATA_ERROR;\n  if ((y -= c[i]) < 0)\n    return Z_DATA_ERROR;\n  c[i] += y;\n\n\n  // Generate starting offsets into the value table for each length \n  x[1] = j = 0;\n  p = c + 1;  xp = x + 2;\n  while (--i) {                 // note that i == g from above \n    *xp++ = (j += *p++);\n  }\n\n\n  // Make a table of values in order of bit lengths \n  p = b;  i = 0;\n  do {\n    if ((j = *p++) != 0)\n      v[x[j]++] = i;\n  } while (++i < n);\n  n = x[g];                     // set n to length of v \n\n\n  // Generate the Huffman codes and for each, make the table entries \n  x[0] = i = 0;                 // first Huffman code is zero \n  p = v;                        // grab values in bit order \n  h = -1;                       // no tables yet--level -1 \n  w = -l;                       // bits decoded == (l * h) \n  u[0] = (inflate_huft *)Z_NULL;        // just to keep compilers happy \n  q = (inflate_huft *)Z_NULL;   // ditto \n  z = 0;                        // ditto \n\n  // go through the bit lengths (k already is bits in shortest code) \n  for (; k <= g; k++)\n  {\n    a = c[k];\n    while (a--)\n    {\n      // here i is the Huffman code of length k bits for value *p \n      // make tables up to required level \n      while (k > w + l)\n      {\n        h++;\n        w += l;                 // previous table always l bits \n\n        // compute minimum size table less than or equal to l bits\n        z = g - w;\n        z = z > (uInt)l ? l : z;        // table size upper limit \n        if ((f = 1 << (j = k - w)) > a + 1)     // try a k-w bit table \n        {                       // too few codes for k-w bit table \n          f -= a + 1;           // deduct codes from patterns left \n          xp = c + k;\n          if (j < z)\n            while (++j < z)     // try smaller tables up to z bits \n            {\n              if ((f <<= 1) <= *++xp)\n                break;          // enough codes to use up j bits \n              f -= *xp;         // else deduct codes from patterns\n            }\n        }\n        z = 1 << j;             // table entries for j-bit table \n\n        // allocate new table \n        if (*hn + z > MANY)     // (note: doesn't matter for fixed) \n          return Z_MEM_ERROR;   // not enough memory \n        u[h] = q = hp + *hn;\n        *hn += z;\n\n        // connect to last table, if there is one \n        if (h)\n        {\n          x[h] = i;             // save pattern for backing up\n          r.bits = (Byte)l;     // bits to dump before this table \n          r.exop = (Byte)j;     // bits in this table \n          j = i >> (w - l);\n          r.base = (uInt)(q - u[h-1] - j);   // offset to this table \n          u[h-1][j] = r;        // connect to last table \n        }\n        else\n          *t = q;               // first table is returned result \n      }\n\n      // set up table entry in r \n      r.bits = (Byte)(k - w);\n      if (p >= v + n)\n        r.exop = 128 + 64;      // out of values--invalid code \n      else if (*p < s)\n      {\n        r.exop = (Byte)(*p < 256 ? 0 : 32 + 64);     // 256 is end-of-block \n        r.base = *p++;          // simple code is just the value \n      }\n      else\n      {\n        r.exop = (Byte)(e[*p - s] + 16 + 64);// non-simple--look up in lists \n        r.base = d[*p++ - s];\n      }\n\n      // fill code-like entries with r\n      f = 1 << (k - w);\n      for (j = i >> w; j < z; j += f)\n        q[j] = r;\n\n      // backwards increment the k-bit code i \n      for (j = 1 << (k - 1); i & j; j >>= 1)\n        i ^= j;\n      i ^= j;\n\n      // backup over finished tables \n      mask = (1 << w) - 1;      // needed on HP, cc -O bug \n      while ((i & mask) != x[h])\n      {\n        h--;                    // don't need to update q\n        w -= l;\n        mask = (1 << w) - 1;\n      }\n    }\n  }\n\n\n  // Return Z_BUF_ERROR if we were given an incomplete table \n  return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n}\n\n\nint inflate_trees_bits(\nuInt *c,               // 19 code lengths\nuInt *bb,              // bits tree desired/actual depth\ninflate_huft * *tb, // bits tree result\ninflate_huft *hp,       // space for trees\nz_streamp z)            // for messages\n{\n  int r;\n  uInt hn = 0;          // hufts used in space \n  uInt *v;             // work area for huft_build \n\n  if ((v = (uInt*)ZALLOC(z, 19, sizeof(uInt))) == Z_NULL)\n    return Z_MEM_ERROR;\n  r = huft_build(c, 19, 19, (uInt*)Z_NULL, (uInt*)Z_NULL,\n                 tb, bb, hp, &hn, v);\n  if (r == Z_DATA_ERROR)\n    z->msg = (char*)\"oversubscribed dynamic bit lengths tree\";\n  else if (r == Z_BUF_ERROR || *bb == 0)\n  {\n    z->msg = (char*)\"incomplete dynamic bit lengths tree\";\n    r = Z_DATA_ERROR;\n  }\n  ZFREE(z, v);\n  return r;\n}\n\n\nint inflate_trees_dynamic(\nuInt nl,                // number of literal/length codes\nuInt nd,                // number of distance codes\nuInt *c,               // that many (total) code lengths\nuInt *bl,              // literal desired/actual bit depth\nuInt *bd,              // distance desired/actual bit depth\ninflate_huft * *tl, // literal/length tree result\ninflate_huft * *td, // distance tree result\ninflate_huft *hp,       // space for trees\nz_streamp z)            // for messages\n{\n  int r;\n  uInt hn = 0;          // hufts used in space \n  uInt *v;             // work area for huft_build \n\n  // allocate work area \n  if ((v = (uInt*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL)\n    return Z_MEM_ERROR;\n\n  // build literal/length tree \n  r = huft_build(c, nl, 257, cplens, cplext, tl, bl, hp, &hn, v);\n  if (r != Z_OK || *bl == 0)\n  {\n    if (r == Z_DATA_ERROR)\n      z->msg = (char*)\"oversubscribed literal/length tree\";\n    else if (r != Z_MEM_ERROR)\n    {\n      z->msg = (char*)\"incomplete literal/length tree\";\n      r = Z_DATA_ERROR;\n    }\n    ZFREE(z, v);\n    return r;\n  }\n\n  // build distance tree \n  r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, hp, &hn, v);\n  if (r != Z_OK || (*bd == 0 && nl > 257))\n  {\n    if (r == Z_DATA_ERROR)\n      z->msg = (char*)\"oversubscribed distance tree\";\n    else if (r == Z_BUF_ERROR) {\n      z->msg = (char*)\"incomplete distance tree\";\n      r = Z_DATA_ERROR;\n    }\n    else if (r != Z_MEM_ERROR)\n    {\n      z->msg = (char*)\"empty distance tree with lengths\";\n      r = Z_DATA_ERROR;\n    }\n    ZFREE(z, v);\n    return r;\n  }\n\n  // done \n  ZFREE(z, v);\n  return Z_OK;\n}\n\n\n\n\n\nint inflate_trees_fixed(\nuInt *bl,               // literal desired/actual bit depth\nuInt *bd,               // distance desired/actual bit depth\nconst inflate_huft * * tl,     // literal/length tree result\nconst inflate_huft * *td,     // distance tree result\nz_streamp )             // for memory allocation\n{\n  *bl = fixed_bl;\n  *bd = fixed_bd;\n  *tl = fixed_tl;\n  *td = fixed_td;\n  return Z_OK;\n}\n\n\n// inffast.c -- process literals and length/distance pairs fast\n// Copyright (C) 1995-1998 Mark Adler\n// For conditions of distribution and use, see copyright notice in zlib.h\n//\n\n\n//struct inflate_codes_state {int dummy;}; // for buggy compilers \n\n\n// macros for bit input with no checking and for returning unused bytes \n#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<<k;k+=8;}}\n#define UNGRAB {c=z->avail_in-n;c=(k>>3)<c?k>>3:c;n+=c;p-=c;k-=c<<3;}\n\n// Called with number of bytes left to write in window at least 258\n// (the maximum string length) and number of input bytes available\n// at least ten.  The ten bytes are six bytes for the longest length/\n// distance pair plus four bytes for overloading the bit buffer. \n\nint inflate_fast(\nuInt bl, uInt bd,\nconst inflate_huft *tl,\nconst inflate_huft *td, // need separate declaration for Borland C++\ninflate_blocks_statef *s,\nz_streamp z)\n{\n  const inflate_huft *t;      // temporary pointer \n  uInt e;               // extra bits or operation \n  uLong b;              // bit buffer \n  uInt k;               // bits in bit buffer \n  Byte *p;             // input data pointer \n  uInt n;               // bytes available there \n  Byte *q;             // output window write pointer \n  uInt m;               // bytes to end of window or read pointer \n  uInt ml;              // mask for literal/length tree\n  uInt md;              // mask for distance tree \n  uInt c;               // bytes to copy \n  uInt d;               // distance back to copy from \n  Byte *r;             // copy source pointer \n\n  // load input, output, bit values \n  LOAD\n\n  // initialize masks \n  ml = inflate_mask[bl];\n  md = inflate_mask[bd];\n\n  // do until not enough input or output space for fast loop \n  do {                          // assume called with m >= 258 && n >= 10 \n    // get literal/length code \n    GRABBITS(20)                // max bits for literal/length code \n    if ((e = (t = tl + ((uInt)b & ml))->exop) == 0)\n    {\n      DUMPBITS(t->bits)\n      Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?\n                \"inflate:         * literal '%c'\\n\" :\n                \"inflate:         * literal 0x%02x\\n\", t->base));\n      *q++ = (Byte)t->base;\n      m--;\n      continue;\n    }\n    for (;;) {\n      DUMPBITS(t->bits)\n      if (e & 16)\n      {\n        // get extra bits for length \n        e &= 15;\n        c = t->base + ((uInt)b & inflate_mask[e]);\n        DUMPBITS(e)\n        Tracevv((stderr, \"inflate:         * length %u\\n\", c));\n\n        // decode distance base of block to copy \n        GRABBITS(15);           // max bits for distance code \n        e = (t = td + ((uInt)b & md))->exop;\n        for (;;) {\n          DUMPBITS(t->bits)\n          if (e & 16)\n          {\n            // get extra bits to add to distance base \n            e &= 15;\n            GRABBITS(e)         // get extra bits (up to 13) \n            d = t->base + ((uInt)b & inflate_mask[e]);\n            DUMPBITS(e)\n            Tracevv((stderr, \"inflate:         * distance %u\\n\", d));\n\n            // do the copy \n            m -= c;\n            if ((uInt)(q - s->window) >= d)     // offset before dest \n            {                                   //  just copy \n              r = q - d;\n              *q++ = *r++;  c--;        // minimum count is three, \n              *q++ = *r++;  c--;        //  so unroll loop a little \n            }\n            else                        // else offset after destination \n            {\n              e = d - (uInt)(q - s->window); // bytes from offset to end \n              r = s->end - e;           // pointer to offset \n              if (c > e)                // if source crosses, \n              {\n                c -= e;                 // copy to end of window \n                do {\n                  *q++ = *r++;\n                } while (--e);\n                r = s->window;          // copy rest from start of window \n              }\n            }\n            do {                        // copy all or what's left \n              *q++ = *r++;\n            } while (--c);\n            break;\n          }\n          else if ((e & 64) == 0)\n          {\n            t += t->base;\n            e = (t += ((uInt)b & inflate_mask[e]))->exop;\n          }\n          else\n          {\n            z->msg = (char*)\"invalid distance code\";\n            UNGRAB\n            UPDATE\n            return Z_DATA_ERROR;\n          }\n        };\n        break;\n      }\n      if ((e & 64) == 0)\n      {\n        t += t->base;\n        if ((e = (t += ((uInt)b & inflate_mask[e]))->exop) == 0)\n        {\n          DUMPBITS(t->bits)\n          Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?\n                    \"inflate:         * literal '%c'\\n\" :\n                    \"inflate:         * literal 0x%02x\\n\", t->base));\n          *q++ = (Byte)t->base;\n          m--;\n          break;\n        }\n      }\n      else if (e & 32)\n      {\n        Tracevv((stderr, \"inflate:         * end of block\\n\"));\n        UNGRAB\n        UPDATE\n        return Z_STREAM_END;\n      }\n      else\n      {\n        z->msg = (char*)\"invalid literal/length code\";\n        UNGRAB\n        UPDATE\n        return Z_DATA_ERROR;\n      }\n    };\n  } while (m >= 258 && n >= 10);\n\n  // not enough input or output--restore pointers and return\n  UNGRAB\n  UPDATE\n  return Z_OK;\n}\n\n\n\n\n\n\n// crc32.c -- compute the CRC-32 of a data stream\n// Copyright (C) 1995-1998 Mark Adler\n// For conditions of distribution and use, see copyright notice in zlib.h\n\n// @(#) $Id$\n\n\n\n\n\n\n// Table of CRC-32's of all single-byte values (made by make_crc_table)\nconst uLong crc_table[256] = {\n  0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,\n  0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,\n  0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,\n  0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,\n  0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,\n  0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,\n  0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,\n  0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,\n  0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,\n  0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,\n  0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,\n  0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,\n  0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,\n  0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,\n  0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,\n  0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,\n  0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,\n  0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,\n  0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,\n  0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,\n  0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,\n  0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,\n  0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,\n  0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,\n  0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,\n  0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,\n  0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,\n  0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,\n  0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,\n  0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,\n  0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,\n  0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,\n  0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,\n  0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,\n  0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,\n  0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,\n  0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,\n  0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,\n  0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,\n  0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,\n  0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,\n  0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,\n  0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,\n  0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,\n  0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,\n  0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,\n  0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,\n  0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,\n  0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,\n  0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,\n  0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,\n  0x2d02ef8dL\n};\n\nconst uLong * get_crc_table()\n{ return (const uLong *)crc_table;\n}\n\n#define CRC_DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);\n#define CRC_DO2(buf)  CRC_DO1(buf); CRC_DO1(buf);\n#define CRC_DO4(buf)  CRC_DO2(buf); CRC_DO2(buf);\n#define CRC_DO8(buf)  CRC_DO4(buf); CRC_DO4(buf);\n\nuLong ucrc32(uLong crc, const Byte *buf, uInt len)\n{ if (buf == Z_NULL) return 0L;\n  crc = crc ^ 0xffffffffL;\n  while (len >= 8)  {CRC_DO8(buf); len -= 8;}\n  if (len) do {CRC_DO1(buf);} while (--len);\n  return crc ^ 0xffffffffL;\n}\n\n\n// adler32.c -- compute the Adler-32 checksum of a data stream\n// Copyright (C) 1995-1998 Mark Adler\n// For conditions of distribution and use, see copyright notice in zlib.h\n\n// @(#) $Id$\n\n\n#define BASE 65521L // largest prime smaller than 65536\n#define NMAX 5552\n// NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1\n\n#define AD_DO1(buf,i)  {s1 += buf[i]; s2 += s1;}\n#define AD_DO2(buf,i)  AD_DO1(buf,i); AD_DO1(buf,i+1);\n#define AD_DO4(buf,i)  AD_DO2(buf,i); AD_DO2(buf,i+2);\n#define AD_DO8(buf,i)  AD_DO4(buf,i); AD_DO4(buf,i+4);\n#define AD_DO16(buf)   AD_DO8(buf,0); AD_DO8(buf,8);\n\n// =========================================================================\nuLong adler32(uLong adler, const Byte *buf, uInt len)\n{\n    unsigned long s1 = adler & 0xffff;\n    unsigned long s2 = (adler >> 16) & 0xffff;\n    int k;\n\n    if (buf == Z_NULL) return 1L;\n\n    while (len > 0) {\n        k = len < NMAX ? len : NMAX;\n        len -= k;\n        while (k >= 16) {\n            AD_DO16(buf);\n\t    buf += 16;\n            k -= 16;\n        }\n        if (k != 0) do {\n            s1 += *buf++;\n\t    s2 += s1;\n        } while (--k);\n        s1 %= BASE;\n        s2 %= BASE;\n    }\n    return (s2 << 16) | s1;\n}\n\n\n\n// zutil.c -- target dependent utility functions for the compression library\n// Copyright (C) 1995-1998 Jean-loup Gailly.\n// For conditions of distribution and use, see copyright notice in zlib.h\n// @(#) $Id$\n\n\n\n\n\n\nconst char * zlibVersion()\n{\n    return ZLIB_VERSION;\n}\n\n// exported to allow conversion of error code to string for compress() and\n// uncompress()\nconst char * zError(int err)\n{ return ERR_MSG(err);\n}\n\n\n\n\nvoidpf zcalloc (voidpf opaque, unsigned items, unsigned size)\n{\n    if (opaque) items += size - size; // make compiler happy\n    return (voidpf)calloc(items, size);\n}\n\nvoid  zcfree (voidpf opaque, voidpf ptr)\n{\n    zfree(ptr);\n    if (opaque) return; // make compiler happy\n}\n\n\n\n// inflate.c -- zlib interface to inflate modules\n// Copyright (C) 1995-1998 Mark Adler\n// For conditions of distribution and use, see copyright notice in zlib.h\n\n//struct inflate_blocks_state {int dummy;}; // for buggy compilers\n\ntypedef enum {\n      IM_METHOD,   // waiting for method byte\n      IM_FLAG,     // waiting for flag byte\n      IM_DICT4,    // four dictionary check bytes to go\n      IM_DICT3,    // three dictionary check bytes to go\n      IM_DICT2,    // two dictionary check bytes to go\n      IM_DICT1,    // one dictionary check byte to go\n      IM_DICT0,    // waiting for inflateSetDictionary\n      IM_BLOCKS,   // decompressing blocks\n      IM_CHECK4,   // four check bytes to go\n      IM_CHECK3,   // three check bytes to go\n      IM_CHECK2,   // two check bytes to go\n      IM_CHECK1,   // one check byte to go\n      IM_DONE,     // finished check, done\n      IM_BAD}      // got an error--stay here\ninflate_mode;\n\n// inflate private state\nstruct internal_state {\n\n  // mode\n  inflate_mode  mode;   // current inflate mode\n\n  // mode dependent information\n  union {\n    uInt method;        // if IM_FLAGS, method byte\n    struct {\n      uLong was;                // computed check value\n      uLong need;               // stream check value\n    } check;            // if CHECK, check values to compare\n    uInt marker;        // if IM_BAD, inflateSync's marker bytes count\n  } sub;        // submode\n\n  // mode independent information\n  int  nowrap;          // flag for no wrapper\n  uInt wbits;           // log2(window size)  (8..15, defaults to 15)\n  inflate_blocks_statef\n    *blocks;            // current inflate_blocks state\n\n};\n\nint inflateReset(z_streamp z)\n{\n  if (z == Z_NULL || z->state == Z_NULL)\n    return Z_STREAM_ERROR;\n  z->total_in = z->total_out = 0;\n  z->msg = Z_NULL;\n  z->state->mode = z->state->nowrap ? IM_BLOCKS : IM_METHOD;\n  inflate_blocks_reset(z->state->blocks, z, Z_NULL);\n  Tracev((stderr, \"inflate: reset\\n\"));\n  return Z_OK;\n}\n\nint inflateEnd(z_streamp z)\n{\n  if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL)\n    return Z_STREAM_ERROR;\n  if (z->state->blocks != Z_NULL)\n    inflate_blocks_free(z->state->blocks, z);\n  ZFREE(z, z->state);\n  z->state = Z_NULL;\n  Tracev((stderr, \"inflate: end\\n\"));\n  return Z_OK;\n}\n\n\nint inflateInit2(z_streamp z)\n{ const char *version = ZLIB_VERSION; int stream_size = sizeof(z_stream);\n  if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || stream_size != sizeof(z_stream)) return Z_VERSION_ERROR;\n\n  int w = -15; // MAX_WBITS: 32K LZ77 window.\n  // Warning: reducing MAX_WBITS makes minigzip unable to extract .gz files created by gzip.\n  // The memory requirements for deflate are (in bytes):\n  //            (1 << (windowBits+2)) +  (1 << (memLevel+9))\n  // that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)\n  // plus a few kilobytes for small objects. For example, if you want to reduce\n  // the default memory requirements from 256K to 128K, compile with\n  //     make CFLAGS=\"-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7\"\n  // Of course this will generally degrade compression (there's no free lunch).\n  //\n  //   The memory requirements for inflate are (in bytes) 1 << windowBits\n  // that is, 32K for windowBits=15 (default value) plus a few kilobytes\n  // for small objects.\n\n  // initialize state\n  if (z == Z_NULL) return Z_STREAM_ERROR;\n  z->msg = Z_NULL;\n  if (z->zalloc == Z_NULL)\n  {\n    z->zalloc = zcalloc;\n    z->opaque = (voidpf)0;\n  }\n  if (z->zfree == Z_NULL) z->zfree = zcfree;\n  if ((z->state = (struct internal_state *)\n       ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL)\n    return Z_MEM_ERROR;\n  z->state->blocks = Z_NULL;\n\n  // handle undocumented nowrap option (no zlib header or check)\n  z->state->nowrap = 0;\n  if (w < 0)\n  {\n    w = - w;\n    z->state->nowrap = 1;\n  }\n\n  // set window size\n  if (w < 8 || w > 15)\n  {\n    inflateEnd(z);\n    return Z_STREAM_ERROR;\n  }\n  z->state->wbits = (uInt)w;\n\n  // create inflate_blocks state\n  if ((z->state->blocks =\n      inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w))\n      == Z_NULL)\n  {\n    inflateEnd(z);\n    return Z_MEM_ERROR;\n  }\n  Tracev((stderr, \"inflate: allocated\\n\"));\n\n  // reset state \n  inflateReset(z);\n  return Z_OK;\n}\n\n\n\n#define IM_NEEDBYTE {if(z->avail_in==0)return r;r=f;}\n#define IM_NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)\n\nint inflate(z_streamp z, int f)\n{\n  int r;\n  uInt b;\n\n  if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL)\n    return Z_STREAM_ERROR;\n  f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n  r = Z_BUF_ERROR;\n  for (;;) switch (z->state->mode)\n  {\n    case IM_METHOD:\n      IM_NEEDBYTE\n      if (((z->state->sub.method = IM_NEXTBYTE) & 0xf) != Z_DEFLATED)\n      {\n        z->state->mode = IM_BAD;\n        z->msg = (char*)\"unknown compression method\";\n        z->state->sub.marker = 5;       // can't try inflateSync\n        break;\n      }\n      if ((z->state->sub.method >> 4) + 8 > z->state->wbits)\n      {\n        z->state->mode = IM_BAD;\n        z->msg = (char*)\"invalid window size\";\n        z->state->sub.marker = 5;       // can't try inflateSync\n        break;\n      }\n      z->state->mode = IM_FLAG;\n    case IM_FLAG:\n      IM_NEEDBYTE\n      b = IM_NEXTBYTE;\n      if (((z->state->sub.method << 8) + b) % 31)\n      {\n        z->state->mode = IM_BAD;\n        z->msg = (char*)\"incorrect header check\";\n        z->state->sub.marker = 5;       // can't try inflateSync \n        break;\n      }\n      Tracev((stderr, \"inflate: zlib header ok\\n\"));\n      if (!(b & PRESET_DICT))\n      {\n        z->state->mode = IM_BLOCKS;\n        break;\n      }\n      z->state->mode = IM_DICT4;\n    case IM_DICT4:\n      IM_NEEDBYTE\n      z->state->sub.check.need = (uLong)IM_NEXTBYTE << 24;\n      z->state->mode = IM_DICT3;\n    case IM_DICT3:\n      IM_NEEDBYTE\n      z->state->sub.check.need += (uLong)IM_NEXTBYTE << 16;\n      z->state->mode = IM_DICT2;\n    case IM_DICT2:\n      IM_NEEDBYTE\n      z->state->sub.check.need += (uLong)IM_NEXTBYTE << 8;\n      z->state->mode = IM_DICT1;\n    case IM_DICT1:\n      IM_NEEDBYTE; r;\n      z->state->sub.check.need += (uLong)IM_NEXTBYTE;\n      z->adler = z->state->sub.check.need;\n      z->state->mode = IM_DICT0;\n      return Z_NEED_DICT;\n    case IM_DICT0:\n      z->state->mode = IM_BAD;\n      z->msg = (char*)\"need dictionary\";\n      z->state->sub.marker = 0;       // can try inflateSync \n      return Z_STREAM_ERROR;\n    case IM_BLOCKS:\n      r = inflate_blocks(z->state->blocks, z, r);\n      if (r == Z_DATA_ERROR)\n      {\n        z->state->mode = IM_BAD;\n        z->state->sub.marker = 0;       // can try inflateSync \n        break;\n      }\n      if (r == Z_OK)\n        r = f;\n      if (r != Z_STREAM_END)\n        return r;\n      r = f;\n      inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was);\n      if (z->state->nowrap)\n      {\n        z->state->mode = IM_DONE;\n        break;\n      }\n      z->state->mode = IM_CHECK4;\n    case IM_CHECK4:\n      IM_NEEDBYTE\n      z->state->sub.check.need = (uLong)IM_NEXTBYTE << 24;\n      z->state->mode = IM_CHECK3;\n    case IM_CHECK3:\n      IM_NEEDBYTE\n      z->state->sub.check.need += (uLong)IM_NEXTBYTE << 16;\n      z->state->mode = IM_CHECK2;\n    case IM_CHECK2:\n      IM_NEEDBYTE\n      z->state->sub.check.need += (uLong)IM_NEXTBYTE << 8;\n      z->state->mode = IM_CHECK1;\n    case IM_CHECK1:\n      IM_NEEDBYTE\n      z->state->sub.check.need += (uLong)IM_NEXTBYTE;\n\n      if (z->state->sub.check.was != z->state->sub.check.need)\n      {\n        z->state->mode = IM_BAD;\n        z->msg = (char*)\"incorrect data check\";\n        z->state->sub.marker = 5;       // can't try inflateSync \n        break;\n      }\n      Tracev((stderr, \"inflate: zlib check ok\\n\"));\n      z->state->mode = IM_DONE;\n    case IM_DONE:\n      return Z_STREAM_END;\n    case IM_BAD:\n      return Z_DATA_ERROR;\n    default:\n      return Z_STREAM_ERROR;\n  }\n}\n\n\n\n#ifdef _UNICODE\n\nstatic int GetAnsiFileName(LPCWSTR name, char * buf, int nBufSize)\n{\n\tmemset(buf, 0, nBufSize);\n\n\tint n = WideCharToMultiByte(CP_ACP,\t// code page\n\t\t\t\t\t\t\t\t0,\t\t\t\t\t\t// performance and mapping flags\n\t\t\t\t\t\t\t\tname,\t\t\t\t\t// wide-character string\n\t\t\t\t\t\t\t\t-1,\t\t\t\t\t\t// number of chars in string\n\t\t\t\t\t\t\t\tbuf,\t\t\t\t\t// buffer for new string\n\t\t\t\t\t\t\t\tnBufSize,\t\t\t\t// size of buffer\n\t\t\t\t\t\t\t\tNULL,\t\t\t\t\t// default for unmappable chars\n\t\t\t\t\t\t\t\tNULL);\t\t\t\t\t// set when default char used\n\treturn n;\n}\n\nstatic int GetUnicodeFileName(const char * name, LPWSTR buf, int nBufSize)\n{\n\tmemset(buf, 0, nBufSize*sizeof(TCHAR));\n\n\tint n = MultiByteToWideChar(CP_ACP,\t\t// code page\n\t\t\t\t\t\t\t\t0,\t\t\t// character-type options\n\t\t\t\t\t\t\t\tname,\t\t// string to map\n\t\t\t\t\t\t\t\t-1,\t\t\t// number of bytes in string\n\t\t\t\t\t\t\t\tbuf,\t\t// wide-character buffer\n\t\t\t\t\t\t\t\tnBufSize);\t// size of buffer\n\n\treturn n;\n}\n\n#endif\n\n\n// unzip.c -- IO on .zip files using zlib\n// Version 0.15 beta, Mar 19th, 1998,\n// Read unzip.h for more info\n\n\n\n\n#define UNZ_BUFSIZE (16384)\n#define UNZ_MAXFILENAMEINZIP (256)\n#define SIZECENTRALDIRITEM (0x2e)\n#define SIZEZIPLOCALHEADER (0x1e)\n\n\n\n\nconst char unz_copyright[] = \" \";//unzip 0.15 Copyright 1998 Gilles Vollant \";\n\n// unz_file_info_interntal contain internal info about a file in zipfile\ntypedef struct unz_file_info_internal_s\n{\n    uLong offset_curfile;// relative offset of local header 4 bytes\n} unz_file_info_internal;\n\n\ntypedef struct\n{ bool is_handle; // either a handle or memory\n  bool canseek;\n  // for handles:\n  HANDLE h; bool herr; unsigned long initial_offset;\n  // for memory:\n  void *buf; unsigned int len,pos; // if it's a memory block\n} LUFILE;\n\n\nLUFILE *lufopen(void *z,unsigned int len,DWORD flags,ZRESULT *err)\n{ \n\tif (flags!=ZIP_HANDLE && flags!=ZIP_FILENAME && flags!=ZIP_MEMORY) \n\t{\n\t\t*err=ZR_ARGS; \n\t\treturn NULL;\n\t}\n\t//\n\tHANDLE h=0; bool canseek=false; *err=ZR_OK;\n\tif (flags==ZIP_HANDLE||flags==ZIP_FILENAME)\n\t{ \n\t\tif (flags==ZIP_HANDLE)\n\t\t{ \n\t\t\tHANDLE hf = z;\n\t\t\n\t\t\tBOOL res = DuplicateHandle(GetCurrentProcess(),hf,GetCurrentProcess(),&h,0,FALSE,DUPLICATE_SAME_ACCESS);\n\t\t\n\t\t\tif (!res) \n\t\t\t{\n\t\t\t\t*err=ZR_NODUPH; \n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{ \n\t\t\th = CreateFile((const TCHAR *)z, GENERIC_READ, FILE_SHARE_READ, \n\t\t\t\t\tNULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);\n\t\t\n\t\t\tif (h == INVALID_HANDLE_VALUE) \n\t\t\t{\n\t\t\t\t*err = ZR_NOFILE; \n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}\n\t\tDWORD type = GetFileType(h);\n\t\tcanseek = (type==FILE_TYPE_DISK);\n\t}\n\tLUFILE *lf = new LUFILE;\n\tif (flags==ZIP_HANDLE||flags==ZIP_FILENAME)\n\t{ \n\t\tlf->is_handle=true;\n\t\tlf->canseek=canseek;\n\t\tlf->h=h; lf->herr=false;\n\t\tlf->initial_offset=0;\n\t\tif (canseek) \n\t\t\tlf->initial_offset = SetFilePointer(h,0,NULL,FILE_CURRENT);\n\t}\n\telse\n\t{ \n\t\tlf->is_handle=false;\n\t\tlf->canseek=true;\n\t\tlf->buf=z; \n\t\tlf->len=len; \n\t\tlf->pos=0; \n\t\tlf->initial_offset=0;\n\t}\n\t*err=ZR_OK;\n\treturn lf;\n}\n\n\nint lufclose(LUFILE *stream)\n{ if (stream==NULL) return EOF;\n  if (stream->is_handle) CloseHandle(stream->h);\n  delete stream;\n  return 0;\n}\n\nint luferror(LUFILE *stream)\n{ if (stream->is_handle && stream->herr) return 1;\n  else return 0;\n}\n\nlong int luftell(LUFILE *stream)\n{ if (stream->is_handle && stream->canseek) return SetFilePointer(stream->h,0,NULL,FILE_CURRENT)-stream->initial_offset;\n  else if (stream->is_handle) return 0;\n  else return stream->pos;\n}\n\nint lufseek(LUFILE *stream, long offset, int whence)\n{ if (stream->is_handle && stream->canseek)\n  { if (whence==SEEK_SET) SetFilePointer(stream->h,stream->initial_offset+offset,0,FILE_BEGIN);\n    else if (whence==SEEK_CUR) SetFilePointer(stream->h,offset,NULL,FILE_CURRENT);\n    else if (whence==SEEK_END) SetFilePointer(stream->h,offset,NULL,FILE_END);\n    else return 19; // EINVAL\n    return 0;\n  }\n  else if (stream->is_handle) return 29; // ESPIPE\n  else\n  { if (whence==SEEK_SET) stream->pos=offset;\n    else if (whence==SEEK_CUR) stream->pos+=offset;\n    else if (whence==SEEK_END) stream->pos=stream->len+offset;\n    return 0;\n  }\n}\n\n\nsize_t lufread(void *ptr,size_t size,size_t n,LUFILE *stream)\n{ unsigned int toread = (unsigned int)(size*n);\n  if (stream->is_handle)\n  { DWORD red; BOOL res = ReadFile(stream->h,ptr,toread,&red,NULL);\n    if (!res) stream->herr=true;\n    return red/size;\n  }\n  if (stream->pos+toread > stream->len) toread = stream->len-stream->pos;\n  memcpy(ptr, (char*)stream->buf + stream->pos, toread); DWORD red = toread;\n  stream->pos += red;\n  return red/size;\n}\n\n\n\n\n// file_in_zip_read_info_s contain internal information about a file in zipfile,\n//  when reading and decompress it\ntypedef struct\n{\n\tchar  *read_buffer;         // internal buffer for compressed data\n\tz_stream stream;            // zLib stream structure for inflate\n\n\tuLong pos_in_zipfile;       // position in byte on the zipfile, for fseek\n\tuLong stream_initialised;   // flag set if stream structure is initialised\n\n\tuLong offset_local_extrafield;// offset of the local extra field\n\tuInt  size_local_extrafield;// size of the local extra field\n\tuLong pos_local_extrafield;   // position in the local extra field in read\n\n\tuLong crc32;                // crc32 of all data uncompressed\n\tuLong crc32_wait;           // crc32 we must obtain after decompress all\n\tuLong rest_read_compressed; // number of byte to be decompressed\n\tuLong rest_read_uncompressed;//number of byte to be obtained after decomp\n\tLUFILE* file;                 // io structore of the zipfile\n\tuLong compression_method;   // compression method (0==store)\n\tuLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx)\n} file_in_zip_read_info_s;\n\n\n// unz_s contain internal information about the zipfile\ntypedef struct\n{\n\tLUFILE* file;               // io structore of the zipfile\n\tunz_global_info gi;         // public global information\n\tuLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx)\n\tuLong num_file;             // number of the current file in the zipfile\n\tuLong pos_in_central_dir;   // pos of the current file in the central dir\n\tuLong current_file_ok;      // flag about the usability of the current file\n\tuLong central_pos;          // position of the beginning of the central dir\n\n\tuLong size_central_dir;     // size of the central directory\n\tuLong offset_central_dir;   // offset of start of central directory with respect to the starting disk number\n\n\tunz_file_info cur_file_info; // public info about the current file in zip\n\tunz_file_info_internal cur_file_info_internal; // private info about it\n    file_in_zip_read_info_s* pfile_in_zip_read; // structure about the current file if we are decompressing it\n} unz_s, *unzFile;\n\n\nint unzStringFileNameCompare (const char* fileName1,const char* fileName2,int iCaseSensitivity);\n//   Compare two filename (fileName1,fileName2).\n\nz_off_t unztell (unzFile file);\n//  Give the current position in uncompressed data\n\nint unzeof (unzFile file);\n//  return 1 if the end of file was reached, 0 elsewhere\n\nint unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len);\n//  Read extra field from the current file (opened by unzOpenCurrentFile)\n//  This is the local-header version of the extra field (sometimes, there is\n//    more info in the local-header version than in the central-header)\n//\n//  if buf==NULL, it return the size of the local extra field\n//\n//  if buf!=NULL, len is the size of the buffer, the extra header is copied in\n//\tbuf.\n//  the return value is the number of bytes copied in buf, or (if <0)\n//\tthe error code\n\n\n\n// ===========================================================================\n//   Read a byte from a gz_stream; update next_in and avail_in. Return EOF\n// for end of file.\n// IN assertion: the stream s has been sucessfully opened for reading.\n\nint unzlocal_getByte(LUFILE *fin,int *pi)\n{ unsigned char c;\n  int err = (int)lufread(&c, 1, 1, fin);\n  if (err==1)\n  { *pi = (int)c;\n    return UNZ_OK;\n  }\n  else\n  { if (luferror(fin)) return UNZ_ERRNO;\n    else return UNZ_EOF;\n  }\n}\n\n\n// ===========================================================================\n// Reads a long in LSB order from the given gz_stream. Sets\nint unzlocal_getShort (LUFILE *fin,uLong *pX)\n{\n    uLong x ;\n    int i;\n    int err;\n\n    err = unzlocal_getByte(fin,&i);\n    x = (uLong)i;\n\n    if (err==UNZ_OK)\n        err = unzlocal_getByte(fin,&i);\n    x += ((uLong)i)<<8;\n\n    if (err==UNZ_OK)\n        *pX = x;\n    else\n        *pX = 0;\n    return err;\n}\n\nint unzlocal_getLong (LUFILE *fin,uLong *pX)\n{\n    uLong x ;\n    int i;\n    int err;\n\n    err = unzlocal_getByte(fin,&i);\n    x = (uLong)i;\n    \n    if (err==UNZ_OK)\n        err = unzlocal_getByte(fin,&i);\n    x += ((uLong)i)<<8;\n\n    if (err==UNZ_OK)\n        err = unzlocal_getByte(fin,&i);\n    x += ((uLong)i)<<16;\n\n    if (err==UNZ_OK)\n        err = unzlocal_getByte(fin,&i);\n    x += ((uLong)i)<<24;\n   \n    if (err==UNZ_OK)\n        *pX = x;\n    else\n        *pX = 0;\n    return err;\n}\n\n\n// My own strcmpi / strcasecmp \nint strcmpcasenosensitive_internal (const char* fileName1,const char *fileName2)\n{\n\tfor (;;)\n\t{\n\t\tchar c1=*(fileName1++);\n\t\tchar c2=*(fileName2++);\n\t\tif ((c1>='a') && (c1<='z'))\n\t\t\tc1 -= (char)0x20;\n\t\tif ((c2>='a') && (c2<='z'))\n\t\t\tc2 -= (char)0x20;\n\t\tif (c1=='\\0')\n\t\t\treturn ((c2=='\\0') ? 0 : -1);\n\t\tif (c2=='\\0')\n\t\t\treturn 1;\n\t\tif (c1<c2)\n\t\t\treturn -1;\n\t\tif (c1>c2)\n\t\t\treturn 1;\n\t}\n}\n\n\n\n\n//\n// Compare two filename (fileName1,fileName2).\n// If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)\n// If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi or strcasecmp)\n//\nint unzStringFileNameCompare (const char*fileName1,const char*fileName2,int iCaseSensitivity)\n{ if (iCaseSensitivity==1) return strcmp(fileName1,fileName2);\n  else return strcmpcasenosensitive_internal(fileName1,fileName2);\n} \n\n#define BUFREADCOMMENT (0x400)\n\n\n//  Locate the Central directory of a zipfile (at the end, just before\n// the global comment)\nuLong unzlocal_SearchCentralDir(LUFILE *fin)\n{ if (lufseek(fin,0,SEEK_END) != 0) return 0;\n  uLong uSizeFile = luftell(fin);\n\n  uLong uMaxBack=0xffff; // maximum size of global comment\n  if (uMaxBack>uSizeFile) uMaxBack = uSizeFile;\n\n  unsigned char *buf = (unsigned char*)zmalloc(BUFREADCOMMENT+4);\n  if (buf==NULL) return 0;\n  uLong uPosFound=0;\n\n  uLong uBackRead = 4;\n  while (uBackRead<uMaxBack)\n  { uLong uReadSize,uReadPos ;\n    int i;\n    if (uBackRead+BUFREADCOMMENT>uMaxBack) uBackRead = uMaxBack;\n    else uBackRead+=BUFREADCOMMENT;\n    uReadPos = uSizeFile-uBackRead ;\n    uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);\n    if (lufseek(fin,uReadPos,SEEK_SET)!=0) break;\n    if (lufread(buf,(uInt)uReadSize,1,fin)!=1) break;\n    for (i=(int)uReadSize-3; (i--)>0;)\n    { if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&\t((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))\n      { uPosFound = uReadPos+i;\tbreak;\n      }\n    }\n    if (uPosFound!=0) break;\n  }\n  if (buf) zfree(buf);\n  return uPosFound;\n}\n\n\nint unzGoToFirstFile (unzFile file);\nint unzCloseCurrentFile (unzFile file);\n\n// Open a Zip file.\n// If the zipfile cannot be opened (file don't exist or in not valid), return NULL.\n// Otherwise, the return value is a unzFile Handle, usable with other unzip functions\nunzFile unzOpenInternal(LUFILE *fin)\n{ \n  zopenerror = ZR_OK; //+++1.2\n  if (fin==NULL) { zopenerror = ZR_ARGS; return NULL; }\t\t//+++1.2\n  if (unz_copyright[0]!=' ') {lufclose(fin); zopenerror = ZR_CORRUPT; return NULL; }\t//+++1.2\n\n  int err=UNZ_OK;\n  unz_s us;\n  uLong central_pos,uL;\n  central_pos = unzlocal_SearchCentralDir(fin);\n  if (central_pos==0) err=UNZ_ERRNO;\n  if (lufseek(fin,central_pos,SEEK_SET)!=0) err=UNZ_ERRNO;\n  // the signature, already checked\n  if (unzlocal_getLong(fin,&uL)!=UNZ_OK) err=UNZ_ERRNO;\n  // number of this disk\n  uLong number_disk;          // number of the current dist, used for spanning ZIP, unsupported, always 0\n  if (unzlocal_getShort(fin,&number_disk)!=UNZ_OK) err=UNZ_ERRNO;\n  // number of the disk with the start of the central directory\n  uLong number_disk_with_CD;  // number the the disk with central dir, used for spaning ZIP, unsupported, always 0\n  if (unzlocal_getShort(fin,&number_disk_with_CD)!=UNZ_OK) err=UNZ_ERRNO;\n  // total number of entries in the central dir on this disk\n  if (unzlocal_getShort(fin,&us.gi.number_entry)!=UNZ_OK) err=UNZ_ERRNO;\n  // total number of entries in the central dir\n  uLong number_entry_CD;      // total number of entries in the central dir (same than number_entry on nospan)\n  if (unzlocal_getShort(fin,&number_entry_CD)!=UNZ_OK) err=UNZ_ERRNO;\n  if ((number_entry_CD!=us.gi.number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) err=UNZ_BADZIPFILE;\n  // size of the central directory\n  if (unzlocal_getLong(fin,&us.size_central_dir)!=UNZ_OK) err=UNZ_ERRNO;\n  // offset of start of central directory with respect to the starting disk number\n  if (unzlocal_getLong(fin,&us.offset_central_dir)!=UNZ_OK) err=UNZ_ERRNO;\n  // zipfile comment length\n  if (unzlocal_getShort(fin,&us.gi.size_comment)!=UNZ_OK) err=UNZ_ERRNO;\n  if ((central_pos+fin->initial_offset<us.offset_central_dir+us.size_central_dir) && (err==UNZ_OK)) err=UNZ_BADZIPFILE;\n  //if (err!=UNZ_OK) {lufclose(fin);return NULL;}\n  if (err!=UNZ_OK) {lufclose(fin); zopenerror = err; return NULL;} //+++1.2\n\n  us.file=fin;\n  us.byte_before_the_zipfile = central_pos+fin->initial_offset - (us.offset_central_dir+us.size_central_dir);\n  us.central_pos = central_pos;\n  us.pfile_in_zip_read = NULL;\n  fin->initial_offset = 0; // since the zipfile itself is expected to handle this\n\n  unz_s *s = (unz_s*)zmalloc(sizeof(unz_s));\n  *s=us;\n  unzGoToFirstFile((unzFile)s);\n  return (unzFile)s;\n}\n\n\n\n//  Close a ZipFile opened with unzipOpen.\n//  If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),\n//    these files MUST be closed with unzipCloseCurrentFile before call unzipClose.\n//  return UNZ_OK if there is no problem.\nint unzClose (unzFile file)\n{\n\tunz_s* s;\n\tif (file==NULL)\n\t\treturn UNZ_PARAMERROR;\n\ts=(unz_s*)file;\n\n    if (s->pfile_in_zip_read!=NULL)\n        unzCloseCurrentFile(file);\n\n\tlufclose(s->file);\n\tif (s) zfree(s); // unused s=0;\n\treturn UNZ_OK;\n}\n\n\n//  Write info about the ZipFile in the *pglobal_info structure.\n//  No preparation of the structure is needed\n//  return UNZ_OK if there is no problem. \nint unzGetGlobalInfo (unzFile file,unz_global_info *pglobal_info)\n{\n\tunz_s* s;\n\tif (file==NULL)\n\t\treturn UNZ_PARAMERROR;\n\ts=(unz_s*)file;\n\t*pglobal_info=s->gi;\n\treturn UNZ_OK;\n}\n\n\n//   Translate date/time from Dos format to tm_unz (readable more easilty)\nvoid unzlocal_DosDateToTmuDate (uLong ulDosDate, tm_unz* ptm)\n{\n    uLong uDate;\n    uDate = (uLong)(ulDosDate>>16);\n    ptm->tm_mday = (uInt)(uDate&0x1f) ;\n    ptm->tm_mon =  (uInt)((((uDate)&0x1E0)/0x20)-1) ;\n    ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;\n\n    ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);\n    ptm->tm_min =  (uInt) ((ulDosDate&0x7E0)/0x20) ;\n    ptm->tm_sec =  (uInt) (2*(ulDosDate&0x1f)) ;\n}\n\n//  Get Info about the current file in the zipfile, with internal only info\nint unzlocal_GetCurrentFileInfoInternal (unzFile file,\n                                                  unz_file_info *pfile_info,\n                                                  unz_file_info_internal\n                                                  *pfile_info_internal,\n                                                  char *szFileName,\n\t\t\t\t\t\t\t\t\t\t\t\t  uLong fileNameBufferSize,\n                                                  void *extraField,\n\t\t\t\t\t\t\t\t\t\t\t\t  uLong extraFieldBufferSize,\n                                                  char *szComment,\n\t\t\t\t\t\t\t\t\t\t\t\t  uLong commentBufferSize);\n\nint unzlocal_GetCurrentFileInfoInternal (unzFile file, unz_file_info *pfile_info,\n   unz_file_info_internal *pfile_info_internal, char *szFileName,\n   uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize,\n   char *szComment, uLong commentBufferSize)\n{\n\tunz_s* s;\n\tunz_file_info file_info;\n\tunz_file_info_internal file_info_internal;\n\tint err=UNZ_OK;\n\tuLong uMagic;\n\tlong lSeek=0;\n\n\tif (file==NULL)\n\t\treturn UNZ_PARAMERROR;\n\ts=(unz_s*)file;\n\tif (lufseek(s->file,s->pos_in_central_dir+s->byte_before_the_zipfile,SEEK_SET)!=0)\n\t\terr=UNZ_ERRNO;\n\n\n\t// we check the magic\n\tif (err==UNZ_OK)\n\t\tif (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)\n\t\t\terr=UNZ_ERRNO;\n\t\telse if (uMagic!=0x02014b50)\n\t\t\terr=UNZ_BADZIPFILE;\n\n\tif (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getShort(s->file,&file_info.version_needed) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getShort(s->file,&file_info.flag) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getShort(s->file,&file_info.compression_method) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getLong(s->file,&file_info.dosDate) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n    unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);\n\n\tif (unzlocal_getLong(s->file,&file_info.crc) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getLong(s->file,&file_info.compressed_size) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getLong(s->file,&file_info.uncompressed_size) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getShort(s->file,&file_info.size_filename) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getShort(s->file,&file_info.size_file_extra) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getShort(s->file,&file_info.size_file_comment) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getShort(s->file,&file_info.disk_num_start) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getShort(s->file,&file_info.internal_fa) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getLong(s->file,&file_info.external_fa) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getLong(s->file,&file_info_internal.offset_curfile) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tlSeek+=file_info.size_filename;\n\tif ((err==UNZ_OK) && (szFileName!=NULL))\n\t{\n\t\tuLong uSizeRead ;\n\t\tif (file_info.size_filename<fileNameBufferSize)\n\t\t{\n\t\t\t*(szFileName+file_info.size_filename)='\\0';\n\t\t\tuSizeRead = file_info.size_filename;\n\t\t}\n\t\telse\n\t\t\tuSizeRead = fileNameBufferSize;\n\n\t\tif ((file_info.size_filename>0) && (fileNameBufferSize>0))\n\t\t\tif (lufread(szFileName,(uInt)uSizeRead,1,s->file)!=1)\n\t\t\t\terr=UNZ_ERRNO;\n\t\tlSeek -= uSizeRead;\n\t}\n\n\n\tif ((err==UNZ_OK) && (extraField!=NULL))\n\t{\n\t\tuLong uSizeRead ;\n\t\tif (file_info.size_file_extra<extraFieldBufferSize)\n\t\t\tuSizeRead = file_info.size_file_extra;\n\t\telse\n\t\t\tuSizeRead = extraFieldBufferSize;\n\n\t\tif (lSeek!=0)\n\t\t\tif (lufseek(s->file,lSeek,SEEK_CUR)==0)\n\t\t\t\tlSeek=0;\n\t\t\telse\n\t\t\t\terr=UNZ_ERRNO;\n\t\tif ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))\n\t\t\tif (lufread(extraField,(uInt)uSizeRead,1,s->file)!=1)\n\t\t\t\terr=UNZ_ERRNO;\n\t\tlSeek += file_info.size_file_extra - uSizeRead;\n\t}\n\telse\n\t\tlSeek+=file_info.size_file_extra;\n\n\n\tif ((err==UNZ_OK) && (szComment!=NULL))\n\t{\n\t\tuLong uSizeRead ;\n\t\tif (file_info.size_file_comment<commentBufferSize)\n\t\t{\n\t\t\t*(szComment+file_info.size_file_comment)='\\0';\n\t\t\tuSizeRead = file_info.size_file_comment;\n\t\t}\n\t\telse\n\t\t\tuSizeRead = commentBufferSize;\n\n\t\tif (lSeek!=0)\n\t\t\tif (lufseek(s->file,lSeek,SEEK_CUR)==0)\n\t\t\t\t{} // unused lSeek=0;\n\t\t\telse\n\t\t\t\terr=UNZ_ERRNO;\n\t\tif ((file_info.size_file_comment>0) && (commentBufferSize>0))\n\t\t\tif (lufread(szComment,(uInt)uSizeRead,1,s->file)!=1)\n\t\t\t\terr=UNZ_ERRNO;\n\t\t//unused lSeek+=file_info.size_file_comment - uSizeRead;\n\t}\n\telse {} //unused lSeek+=file_info.size_file_comment;\n\n\tif ((err==UNZ_OK) && (pfile_info!=NULL))\n\t\t*pfile_info=file_info;\n\n\tif ((err==UNZ_OK) && (pfile_info_internal!=NULL))\n\t\t*pfile_info_internal=file_info_internal;\n\n\treturn err;\n}\n\n\n\n//  Write info about the ZipFile in the *pglobal_info structure.\n//  No preparation of the structure is needed\n//  return UNZ_OK if there is no problem.\nint unzGetCurrentFileInfo (unzFile file, unz_file_info *pfile_info,\n  char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize,\n  char *szComment, uLong commentBufferSize)\n{ return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,szFileName,fileNameBufferSize,\n      extraField,extraFieldBufferSize, szComment,commentBufferSize);\n}\n\n\n//  Set the current file of the zipfile to the first file.\n//  return UNZ_OK if there is no problem\nint unzGoToFirstFile (unzFile file)\n{\n\tint err;\n\tunz_s* s;\n\tif (file==NULL) return UNZ_PARAMERROR;\n\ts=(unz_s*)file;\n\ts->pos_in_central_dir=s->offset_central_dir;\n\ts->num_file=0;\n\terr=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,\n\t\t\t\t\t\t\t\t\t\t\t &s->cur_file_info_internal,\n\t\t\t\t\t\t\t\t\t\t\t NULL,0,NULL,0,NULL,0);\n\ts->current_file_ok = (err == UNZ_OK);\n\treturn err;\n}\n\n\n//  Set the current file of the zipfile to the next file.\n//  return UNZ_OK if there is no problem\n//  return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.\nint unzGoToNextFile (unzFile file)\n{\n\tunz_s* s;\n\tint err;\n\n\tif (file==NULL)\n\t\treturn UNZ_PARAMERROR;\n\ts=(unz_s*)file;\n\tif (!s->current_file_ok)\n\t\treturn UNZ_END_OF_LIST_OF_FILE;\n\tif (s->num_file+1==s->gi.number_entry)\n\t\treturn UNZ_END_OF_LIST_OF_FILE;\n\n\ts->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +\n\t\t\ts->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;\n\ts->num_file++;\n\terr = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,\n\t\t\t\t\t\t\t\t\t\t\t   &s->cur_file_info_internal,\n\t\t\t\t\t\t\t\t\t\t\t   NULL,0,NULL,0,NULL,0);\n\ts->current_file_ok = (err == UNZ_OK);\n\treturn err;\n}\n\n\n//  Try locate the file szFileName in the zipfile.\n//  For the iCaseSensitivity signification, see unzStringFileNameCompare\n//  return value :\n//  UNZ_OK if the file is found. It becomes the current file.\n//  UNZ_END_OF_LIST_OF_FILE if the file is not found\nint unzLocateFile (unzFile file, const TCHAR *szFileName, int iCaseSensitivity)\n{\n\tunz_s* s;\n\tint err;\n\n\tuLong num_fileSaved;\n\tuLong pos_in_central_dirSaved;\n\n\tif (file==NULL)\n\t\treturn UNZ_PARAMERROR;\n\n    if (_tcslen(szFileName)>=UNZ_MAXFILENAMEINZIP)\n        return UNZ_PARAMERROR;\n\n\tchar szFileNameA[MAX_PATH];\n\n#ifdef _UNICODE\n\tGetAnsiFileName(szFileName, szFileNameA, MAX_PATH-1);\n#else\n\tstrcpy(szFileNameA, szFileName);\n#endif\n\n\t// support Windows subdirectory by:daviyang35\n\tint iLen=strlen(szFileNameA);\n\tfor (int i=0;i<iLen;i++)\n\t{\n\t\tif (szFileNameA[i]=='\\\\')\n\t\t{\n\t\t\tszFileNameA[i]='/';\n\t\t}\n\t}\n\n\ts=(unz_s*)file;\n\tif (!s->current_file_ok)\n\t\treturn UNZ_END_OF_LIST_OF_FILE;\n\n\tnum_fileSaved = s->num_file;\n\tpos_in_central_dirSaved = s->pos_in_central_dir;\n\n\terr = unzGoToFirstFile(file);\n\n\twhile (err == UNZ_OK)\n\t{\n\t\tchar szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];\n\t\tunzGetCurrentFileInfo(file,NULL,\n\t\t\t\t\t\t\t\tszCurrentFileName,sizeof(szCurrentFileName)-1,\n\t\t\t\t\t\t\t\tNULL,0,NULL,0);\n\t\tif (unzStringFileNameCompare(szCurrentFileName,szFileNameA,iCaseSensitivity)==0)\n\t\t\treturn UNZ_OK;\n\t\terr = unzGoToNextFile(file);\n\t}\n\n\ts->num_file = num_fileSaved ;\n\ts->pos_in_central_dir = pos_in_central_dirSaved ;\n\treturn err;\n}\n\n\n//  Read the local header of the current zipfile\n//  Check the coherency of the local header and info in the end of central\n//        directory about this file\n//  store in *piSizeVar the size of extra info in local header\n//        (filename and size of extra field data)\nint unzlocal_CheckCurrentFileCoherencyHeader (unz_s *s,uInt *piSizeVar,\n  uLong *poffset_local_extrafield, uInt  *psize_local_extrafield)\n{\n\tuLong uMagic,uData,uFlags;\n\tuLong size_filename;\n\tuLong size_extra_field;\n\tint err=UNZ_OK;\n\n\t*piSizeVar = 0;\n\t*poffset_local_extrafield = 0;\n\t*psize_local_extrafield = 0;\n\n\tif (lufseek(s->file,s->cur_file_info_internal.offset_curfile + s->byte_before_the_zipfile,SEEK_SET)!=0)\n\t\treturn UNZ_ERRNO;\n\n\n\tif (err==UNZ_OK)\n\t\tif (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)\n\t\t\terr=UNZ_ERRNO;\n\t\telse if (uMagic!=0x04034b50)\n\t\t\terr=UNZ_BADZIPFILE;\n\n\tif (unzlocal_getShort(s->file,&uData) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n//\telse if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))\n//\t\terr=UNZ_BADZIPFILE;\n\tif (unzlocal_getShort(s->file,&uFlags) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getShort(s->file,&uData) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\telse if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))\n\t\terr=UNZ_BADZIPFILE;\n\n    if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&\n                         (s->cur_file_info.compression_method!=Z_DEFLATED))\n        err=UNZ_BADZIPFILE;\n\n\tif (unzlocal_getLong(s->file,&uData) != UNZ_OK) // date/time\n\t\terr=UNZ_ERRNO;\n\n\tif (unzlocal_getLong(s->file,&uData) != UNZ_OK) // crc\n\t\terr=UNZ_ERRNO;\n\telse if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&\n\t\t                      ((uFlags & 8)==0))\n\t\terr=UNZ_BADZIPFILE;\n\n\tif (unzlocal_getLong(s->file,&uData) != UNZ_OK) // size compr\n\t\terr=UNZ_ERRNO;\n\telse if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) &&\n\t\t\t\t\t\t\t  ((uFlags & 8)==0))\n\t\terr=UNZ_BADZIPFILE;\n\n\tif (unzlocal_getLong(s->file,&uData) != UNZ_OK) // size uncompr\n\t\terr=UNZ_ERRNO;\n\telse if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) &&\n\t\t\t\t\t\t\t  ((uFlags & 8)==0))\n\t\terr=UNZ_BADZIPFILE;\n\n\n\tif (unzlocal_getShort(s->file,&size_filename) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\telse if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename))\n\t\terr=UNZ_BADZIPFILE;\n\n\t*piSizeVar += (uInt)size_filename;\n\n\tif (unzlocal_getShort(s->file,&size_extra_field) != UNZ_OK)\n\t\terr=UNZ_ERRNO;\n\t*poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +\n\t\t\t\t\t\t\t\t\tSIZEZIPLOCALHEADER + size_filename;\n\t*psize_local_extrafield = (uInt)size_extra_field;\n\n\t*piSizeVar += (uInt)size_extra_field;\n\n\treturn err;\n}\n\n\n\n\n\n//  Open for reading data the current file in the zipfile.\n//  If there is no error and the file is opened, the return value is UNZ_OK.\nint unzOpenCurrentFile (unzFile file)\n{\n\tint err;\n\tint Store;\n\tuInt iSizeVar;\n\tunz_s* s;\n\tfile_in_zip_read_info_s* pfile_in_zip_read_info;\n\tuLong offset_local_extrafield;  // offset of the local extra field\n\tuInt  size_local_extrafield;    // size of the local extra field\n\n\tif (file==NULL)\n\t\treturn UNZ_PARAMERROR;\n\ts=(unz_s*)file;\n\tif (!s->current_file_ok)\n\t\treturn UNZ_PARAMERROR;\n\n    if (s->pfile_in_zip_read != NULL)\n        unzCloseCurrentFile(file);\n\n\tif (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,\n\t\t\t\t&offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)\n\t\treturn UNZ_BADZIPFILE;\n\n\tpfile_in_zip_read_info = (file_in_zip_read_info_s*)zmalloc(sizeof(file_in_zip_read_info_s));\n\tif (pfile_in_zip_read_info==NULL)\n\t\treturn UNZ_INTERNALERROR;\n\n\tpfile_in_zip_read_info->read_buffer=(char*)zmalloc(UNZ_BUFSIZE);\n\tpfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;\n\tpfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;\n\tpfile_in_zip_read_info->pos_local_extrafield=0;\n\n\tif (pfile_in_zip_read_info->read_buffer==NULL)\n\t{\n\t\tif (pfile_in_zip_read_info!=0) zfree(pfile_in_zip_read_info); //unused pfile_in_zip_read_info=0;\n\t\treturn UNZ_INTERNALERROR;\n\t}\n\n\tpfile_in_zip_read_info->stream_initialised=0;\n\n\tif ((s->cur_file_info.compression_method!=0) && (s->cur_file_info.compression_method!=Z_DEFLATED))\n        { // unused err=UNZ_BADZIPFILE;\n        }\n\tStore = s->cur_file_info.compression_method==0;\n\n\tpfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;\n\tpfile_in_zip_read_info->crc32=0;\n\tpfile_in_zip_read_info->compression_method =\n            s->cur_file_info.compression_method;\n\tpfile_in_zip_read_info->file=s->file;\n\tpfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;\n\n    pfile_in_zip_read_info->stream.total_out = 0;\n\n\tif (!Store)\n\t{\n\t  pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;\n\t  pfile_in_zip_read_info->stream.zfree = (free_func)0;\n\t  pfile_in_zip_read_info->stream.opaque = (voidpf)0;\n\n          err=inflateInit2(&pfile_in_zip_read_info->stream);\n\t  if (err == Z_OK)\n\t    pfile_in_zip_read_info->stream_initialised=1;\n        // windowBits is passed < 0 to tell that there is no zlib header.\n        // Note that in this case inflate *requires* an extra \"dummy\" byte\n        // after the compressed stream in order to complete decompression and\n        // return Z_STREAM_END.\n        // In unzip, i don't wait absolutely Z_STREAM_END because I known the\n        // size of both compressed and uncompressed data\n\t}\n\tpfile_in_zip_read_info->rest_read_compressed =\n            s->cur_file_info.compressed_size ;\n\tpfile_in_zip_read_info->rest_read_uncompressed =\n            s->cur_file_info.uncompressed_size ;\n\n\n\tpfile_in_zip_read_info->pos_in_zipfile =\n            s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +\n\t\t\t  iSizeVar;\n\n\tpfile_in_zip_read_info->stream.avail_in = (uInt)0;\n\n\n\ts->pfile_in_zip_read = pfile_in_zip_read_info;\n    return UNZ_OK;\n}\n\n\n//  Read bytes from the current file.\n//  buf contain buffer where data must be copied\n//  len the size of buf.\n//  return the number of byte copied if somes bytes are copied\n//  return 0 if the end of file was reached\n//  return <0 with error code if there is an error\n//    (UNZ_ERRNO for IO error, or zLib error for uncompress error)\nint unzReadCurrentFile  (unzFile file, voidp buf, unsigned len)\n{ int err=UNZ_OK;\n  uInt iRead = 0;\n\n  unz_s *s = (unz_s*)file;\n  if (s==NULL) return UNZ_PARAMERROR;\n\n  file_in_zip_read_info_s* pfile_in_zip_read_info = s->pfile_in_zip_read;\n  if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR;\n  if ((pfile_in_zip_read_info->read_buffer == NULL)) return UNZ_END_OF_LIST_OF_FILE;\n  if (len==0) return 0;\n\n  pfile_in_zip_read_info->stream.next_out = (Byte*)buf;\n  pfile_in_zip_read_info->stream.avail_out = (uInt)len;\n\n  if (len>pfile_in_zip_read_info->rest_read_uncompressed)\n  { pfile_in_zip_read_info->stream.avail_out = (uInt)pfile_in_zip_read_info->rest_read_uncompressed;\n  }\n\n  while (pfile_in_zip_read_info->stream.avail_out>0)\n  { if ((pfile_in_zip_read_info->stream.avail_in==0) && (pfile_in_zip_read_info->rest_read_compressed>0))\n    { uInt uReadThis = UNZ_BUFSIZE;\n      if (pfile_in_zip_read_info->rest_read_compressed<uReadThis) uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;\n      if (uReadThis == 0) return UNZ_EOF;\n      if (lufseek(pfile_in_zip_read_info->file, pfile_in_zip_read_info->pos_in_zipfile + pfile_in_zip_read_info->byte_before_the_zipfile,SEEK_SET)!=0) return UNZ_ERRNO;\n      if (lufread(pfile_in_zip_read_info->read_buffer,uReadThis,1,pfile_in_zip_read_info->file)!=1) return UNZ_ERRNO;\n      pfile_in_zip_read_info->pos_in_zipfile += uReadThis;\n      pfile_in_zip_read_info->rest_read_compressed-=uReadThis;\n      pfile_in_zip_read_info->stream.next_in = (Byte*)pfile_in_zip_read_info->read_buffer;\n      pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;\n    }\n\n    if (pfile_in_zip_read_info->compression_method==0)\n    { uInt uDoCopy,i ;\n      if (pfile_in_zip_read_info->stream.avail_out < pfile_in_zip_read_info->stream.avail_in)\n      { uDoCopy = pfile_in_zip_read_info->stream.avail_out ;\n      }\n      else\n      { uDoCopy = pfile_in_zip_read_info->stream.avail_in ;\n      }\n      for (i=0;i<uDoCopy;i++)\n      { *(pfile_in_zip_read_info->stream.next_out+i) = *(pfile_in_zip_read_info->stream.next_in+i);\n      }\n      pfile_in_zip_read_info->crc32 = ucrc32(pfile_in_zip_read_info->crc32,pfile_in_zip_read_info->stream.next_out,uDoCopy);\n      pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;\n      pfile_in_zip_read_info->stream.avail_in -= uDoCopy;\n      pfile_in_zip_read_info->stream.avail_out -= uDoCopy;\n      pfile_in_zip_read_info->stream.next_out += uDoCopy;\n      pfile_in_zip_read_info->stream.next_in += uDoCopy;\n      pfile_in_zip_read_info->stream.total_out += uDoCopy;\n      iRead += uDoCopy;\n    }\n    else\n    { uLong uTotalOutBefore,uTotalOutAfter;\n      const Byte *bufBefore;\n      uLong uOutThis;\n      int flush=Z_SYNC_FLUSH;\n      uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;\n      bufBefore = pfile_in_zip_read_info->stream.next_out;\n      err=inflate(&pfile_in_zip_read_info->stream,flush);\n      uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;\n      uOutThis = uTotalOutAfter-uTotalOutBefore;\n      pfile_in_zip_read_info->crc32 = ucrc32(pfile_in_zip_read_info->crc32,bufBefore,(uInt)(uOutThis));\n      pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis;\n      iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);\n      if (err==Z_STREAM_END) return (iRead==0) ? UNZ_EOF : iRead;\t\t\t//+++1.3\n      //if (err==Z_STREAM_END) return (iRead==len) ? UNZ_EOF : iRead;\t\t//+++1.2\n\n\t  if (err != Z_OK) break;\n    }\n  }\n\n  if (err==Z_OK) return iRead;\n  \n  return iRead;\n}\n\n\n//  Give the current position in uncompressed data\nz_off_t unztell (unzFile file)\n{\n\tunz_s* s;\n\tfile_in_zip_read_info_s* pfile_in_zip_read_info;\n\tif (file==NULL)\n\t\treturn UNZ_PARAMERROR;\n\ts=(unz_s*)file;\n    pfile_in_zip_read_info=s->pfile_in_zip_read;\n\n\tif (pfile_in_zip_read_info==NULL)\n\t\treturn UNZ_PARAMERROR;\n\n\treturn (z_off_t)pfile_in_zip_read_info->stream.total_out;\n}\n\n\n//  return 1 if the end of file was reached, 0 elsewhere\nint unzeof (unzFile file)\n{\n\tunz_s* s;\n\tfile_in_zip_read_info_s* pfile_in_zip_read_info;\n\tif (file==NULL)\n\t\treturn UNZ_PARAMERROR;\n\ts=(unz_s*)file;\n    pfile_in_zip_read_info=s->pfile_in_zip_read;\n\n\tif (pfile_in_zip_read_info==NULL)\n\t\treturn UNZ_PARAMERROR;\n\n\tif (pfile_in_zip_read_info->rest_read_uncompressed == 0)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\n\n\n\n//  Read extra field from the current file (opened by unzOpenCurrentFile)\n//  This is the local-header version of the extra field (sometimes, there is\n//    more info in the local-header version than in the central-header)\n//  if buf==NULL, it return the size of the local extra field that can be read\n//  if buf!=NULL, len is the size of the buffer, the extra header is copied in buf.\n//  the return value is the number of bytes copied in buf, or (if <0) the error code\nint unzGetLocalExtrafield (unzFile file,voidp buf,unsigned len)\n{\n\tunz_s* s;\n\tfile_in_zip_read_info_s* pfile_in_zip_read_info;\n\tuInt read_now;\n\tuLong size_to_read;\n\n\tif (file==NULL)\n\t\treturn UNZ_PARAMERROR;\n\ts=(unz_s*)file;\n    pfile_in_zip_read_info=s->pfile_in_zip_read;\n\n\tif (pfile_in_zip_read_info==NULL)\n\t\treturn UNZ_PARAMERROR;\n\n\tsize_to_read = (pfile_in_zip_read_info->size_local_extrafield -\n\t\t\t\tpfile_in_zip_read_info->pos_local_extrafield);\n\n\tif (buf==NULL)\n\t\treturn (int)size_to_read;\n\n\tif (len>size_to_read)\n\t\tread_now = (uInt)size_to_read;\n\telse\n\t\tread_now = (uInt)len ;\n\n\tif (read_now==0)\n\t\treturn 0;\n\n\tif (lufseek(pfile_in_zip_read_info->file, pfile_in_zip_read_info->offset_local_extrafield +  pfile_in_zip_read_info->pos_local_extrafield,SEEK_SET)!=0)\n\t\treturn UNZ_ERRNO;\n\n\tif (lufread(buf,(uInt)size_to_read,1,pfile_in_zip_read_info->file)!=1)\n\t\treturn UNZ_ERRNO;\n\n\treturn (int)read_now;\n}\n\n//  Close the file in zip opened with unzipOpenCurrentFile\n//  Return UNZ_CRCERROR if all the file was read but the CRC is not good\nint unzCloseCurrentFile (unzFile file)\n{\n\tint err=UNZ_OK;\n\n\tunz_s* s;\n\tfile_in_zip_read_info_s* pfile_in_zip_read_info;\n\tif (file==NULL)\n\t\treturn UNZ_PARAMERROR;\n\ts=(unz_s*)file;\n    pfile_in_zip_read_info=s->pfile_in_zip_read;\n\n\tif (pfile_in_zip_read_info==NULL)\n\t\treturn UNZ_PARAMERROR;\n\n\n\tif (pfile_in_zip_read_info->rest_read_uncompressed == 0)\n\t{\n\t\tif (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)\n\t\t\terr=UNZ_CRCERROR;\n\t}\n\n\n\tif (pfile_in_zip_read_info->read_buffer!=0)\n        { void *buf = pfile_in_zip_read_info->read_buffer;\n          zfree(buf);\n          pfile_in_zip_read_info->read_buffer=0;\n        }\n\tpfile_in_zip_read_info->read_buffer = NULL;\n\tif (pfile_in_zip_read_info->stream_initialised)\n\t\tinflateEnd(&pfile_in_zip_read_info->stream);\n\n\tpfile_in_zip_read_info->stream_initialised = 0;\n        if (pfile_in_zip_read_info!=0) zfree(pfile_in_zip_read_info); // unused pfile_in_zip_read_info=0;\n\n    s->pfile_in_zip_read=NULL;\n\n\treturn err;\n}\n\n\n//  Get the global comment string of the ZipFile, in the szComment buffer.\n//  uSizeBuf is the size of the szComment buffer.\n//  return the number of byte copied or an error code <0\nint unzGetGlobalComment (unzFile file, char *szComment, uLong uSizeBuf)\n{ //int err=UNZ_OK;\n  unz_s* s;\n  uLong uReadThis ;\n  if (file==NULL) return UNZ_PARAMERROR;\n  s=(unz_s*)file;\n  uReadThis = uSizeBuf;\n  if (uReadThis>s->gi.size_comment) uReadThis = s->gi.size_comment;\n  if (lufseek(s->file,s->central_pos+22,SEEK_SET)!=0) return UNZ_ERRNO;\n  if (uReadThis>0)\n  { *szComment='\\0';\n    if (lufread(szComment,(uInt)uReadThis,1,s->file)!=1) return UNZ_ERRNO;\n  }\n  if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment)) *(szComment+s->gi.size_comment)='\\0';\n  return (int)uReadThis;\n}\n\n\n\n\n\nint unzOpenCurrentFile (unzFile file);\nint unzReadCurrentFile (unzFile file, void *buf, unsigned len);\nint unzCloseCurrentFile (unzFile file);\n\n\nFILETIME timet2filetime(time_t timer)\n{ \n\tstruct tm *tm = gmtime(&timer);\n\tSYSTEMTIME st;\n\tst.wYear = (WORD)(tm->tm_year+1900);\n\tst.wMonth = (WORD)(tm->tm_mon+1);\n\tst.wDay = (WORD)(tm->tm_mday);\n\tst.wHour = (WORD)(tm->tm_hour);\n\tst.wMinute = (WORD)(tm->tm_min);\n\tst.wSecond = (WORD)(tm->tm_sec);\n\tst.wMilliseconds=0;\n\tFILETIME ft;\n\tSystemTimeToFileTime(&st,&ft);\n\treturn ft;\n}\n\n///////////////////////////////////////////////////////////////////////////////\n///////////////////////////////////////////////////////////////////////////////\n///////////////////////////////////////////////////////////////////////////////\nclass TUnzip\n{ public:\nTUnzip() : uf(0), currentfile(-1), czei(-1) {}\n\nunzFile uf; int currentfile; ZIPENTRY cze; int czei;\nTCHAR rootdir[MAX_PATH];\n\nZRESULT Open(void *z,unsigned int len,DWORD flags);\nZRESULT Get(int index,ZIPENTRY *ze);\nZRESULT Find(const TCHAR *name,bool ic,int *index,ZIPENTRY *ze);\nZRESULT Unzip(int index,void *dst,unsigned int len,DWORD flags);\nZRESULT Close();\n};\n\n\nZRESULT TUnzip::Open(void *z,unsigned int len,DWORD flags)\n{\n\tif (uf!=0 || currentfile!=-1) \n\t\treturn ZR_NOTINITED;\n\tGetCurrentDirectory(MAX_PATH,rootdir);\n\t_tcscat(rootdir,_T(\"\\\\\"));\n\tif (flags==ZIP_HANDLE)\n\t{ \n\t\tDWORD type = GetFileType(z);\n\t\tif (type!=FILE_TYPE_DISK) \n\t\t\treturn ZR_SEEK;\n\t}\n\tZRESULT e; \n\tLUFILE *f = lufopen(z,len,flags,&e);\n\tif (f==NULL) \n\t\treturn e;\n\tuf = unzOpenInternal(f);\n\t//return ZR_OK;\n\treturn zopenerror;\t//+++1.2\n}\n\nZRESULT TUnzip::Get(int index,ZIPENTRY *ze)\n{ if (index<-1 || index>=(int)uf->gi.number_entry) \n\treturn ZR_ARGS;\n  if (currentfile!=-1) \n\t  unzCloseCurrentFile(uf); \n  currentfile=-1;\n  if (index==czei && index!=-1) {memcpy(ze,&cze,sizeof(ZIPENTRY)); return ZR_OK;}\n  if (index==-1)\n  { ze->index = uf->gi.number_entry;\n    ze->name[0]=0;\n    ze->attr=0;\n    ze->atime.dwLowDateTime=0; ze->atime.dwHighDateTime=0;\n    ze->ctime.dwLowDateTime=0; ze->ctime.dwHighDateTime=0;\n    ze->mtime.dwLowDateTime=0; ze->mtime.dwHighDateTime=0;\n    ze->comp_size=0;\n    ze->unc_size=0;\n    return ZR_OK;\n  }\n  if (index<(int)uf->num_file) unzGoToFirstFile(uf);\n  while ((int)uf->num_file<index) unzGoToNextFile(uf);\n  unz_file_info ufi; \n  char fn[MAX_PATH];\n  unzGetCurrentFileInfo(uf,&ufi,fn,MAX_PATH,NULL,0,NULL,0);\n\n  // now get the extra header. We do this ourselves, instead of\n  // calling unzOpenCurrentFile &c., to avoid allocating more than necessary.\n  unsigned int extralen,iSizeVar; unsigned long offset;\n  int res = unzlocal_CheckCurrentFileCoherencyHeader(uf,&iSizeVar,&offset,&extralen);\n  if (res!=UNZ_OK) return ZR_CORRUPT;\n  if (lufseek(uf->file,offset,SEEK_SET)!=0) return ZR_READ;\n  char *extra = new char[extralen];\n  if (lufread(extra,1,(uInt)extralen,uf->file)!=extralen) {delete[] extra; return ZR_READ;}\n  //\n  ze->index=uf->num_file;\n  strcpy(ze->name,fn);\n  // zip has an 'attribute' 32bit value. Its lower half is windows stuff\n  // its upper half is standard unix attr.\n  unsigned long a = ufi.external_fa;\n  bool uisdir  =   (a&0x40000000)!=0;\n  //bool uwriteable= (a&0x08000000)!=0;\n  bool uwriteable= (a&0x00800000)!=0;\t// ***hd***\n  //bool ureadable=  (a&0x01000000)!=0;\n  //bool uexecutable=(a&0x00400000)!=0;\n  bool wreadonly=  (a&0x00000001)!=0;\n  bool whidden=    (a&0x00000002)!=0;\n  bool wsystem=    (a&0x00000004)!=0;\n  bool wisdir=     (a&0x00000010)!=0;\n  bool warchive=   (a&0x00000020)!=0;\n  ze->attr=FILE_ATTRIBUTE_NORMAL;\n  if (uisdir || wisdir) ze->attr |= FILE_ATTRIBUTE_DIRECTORY;\n  if (warchive) ze->attr|=FILE_ATTRIBUTE_ARCHIVE;\n  if (whidden) ze->attr|=FILE_ATTRIBUTE_HIDDEN;\n  if (!uwriteable||wreadonly) ze->attr|=FILE_ATTRIBUTE_READONLY;\n  if (wsystem) ze->attr|=FILE_ATTRIBUTE_SYSTEM;\n  ze->comp_size = ufi.compressed_size;\n  ze->unc_size = ufi.uncompressed_size;\n  //\n  WORD dostime = (WORD)(ufi.dosDate&0xFFFF);\n  WORD dosdate = (WORD)((ufi.dosDate>>16)&0xFFFF);\n  FILETIME ft;\n  DosDateTimeToFileTime(dosdate,dostime,&ft);\n  ze->atime=ft; ze->ctime=ft; ze->mtime=ft;\n  // the zip will always have at least that dostime. But if it also has\n  // an extra header, then we'll instead get the info from that.\n  unsigned int epos=0;\n  while (epos+4<extralen)\n  { char etype[3]; etype[0]=extra[epos+0]; etype[1]=extra[epos+1]; etype[2]=0;\n    int size = extra[epos+2];\n    if (strcmp(etype,\"UT\")!=0) {epos += 4+size; continue;}\n    int flags = extra[epos+4];\n    bool hasmtime = (flags&1)!=0;\n    bool hasatime = (flags&2)!=0;\n    bool hasctime = (flags&4)!=0;\n    epos+=5;\n    if (hasmtime)\n    { time_t mtime = *(__time32_t*)(extra+epos); epos+=4;\n      ze->mtime = timet2filetime(mtime);\n    }\n    if (hasatime)\n    { time_t atime = *(__time32_t*)(extra+epos); epos+=4;\n      ze->atime = timet2filetime(atime);\n    }\n    if (hasctime)\n    { time_t ctime = *(__time32_t*)(extra+epos); \n      ze->ctime = timet2filetime(ctime);\n    }\n    break;\n  }\n  //\n  if (extra!=0) delete[] extra;\n  memcpy(&cze,ze,sizeof(ZIPENTRY)); czei=index;\n  return ZR_OK;\n}\n\nZRESULT TUnzip::Find(const TCHAR *name, bool ic, int *index, ZIPENTRY *ze)\n{ \n\tint res = unzLocateFile(uf,name,ic?CASE_INSENSITIVE:CASE_SENSITIVE);\n\tif (res!=UNZ_OK)\n\t{ \n\t\tif (index!=0) \n\t\t\t*index=-1;\n\t\tif (ze!=NULL) \n\t\t{\n\t\t\tZeroMemory(ze,sizeof(ZIPENTRY)); ze->index=-1;\n\t\t}\n\t\treturn ZR_NOTFOUND;\n\t}\n\tif (currentfile!=-1) \n\t\tunzCloseCurrentFile(uf); currentfile=-1;\n\tint i = (int)uf->num_file;\n\tif (index!=NULL) \n\t\t*index=i;\n\tif (ze!=NULL)\n\t{ \n\t\tZRESULT zres = Get(i,ze);\n\t\tif (zres!=ZR_OK) \n\t\t\treturn zres;\n\t}\n\treturn ZR_OK;\n}\n\nvoid EnsureDirectory(const TCHAR *rootdir, const TCHAR *dir)\n{ \n\tif (dir==NULL || dir[0] == _T('\\0')) \n\t\treturn;\n\tconst TCHAR *lastslash = dir, *c = lastslash;\n\twhile (*c != _T('\\0')) \n\t{\n\t\tif (*c==_T('/') || *c==_T('\\\\')) \n\t\tlastslash=c; \n\t\tc++;\n\t}\n\tconst TCHAR *name=lastslash;\n\tif (lastslash!=dir)\n\t{ \n\t\tTCHAR tmp[MAX_PATH]; \n\t\t_tcsncpy(tmp, dir, lastslash-dir);\n\t\ttmp[lastslash-dir] = _T('\\0');\n\t\tEnsureDirectory(rootdir,tmp);\n\t\tname++;\n\t}\n\tTCHAR cd[MAX_PATH]; \n\t_tcscpy(cd,rootdir); \n\t//_tcscat(cd,name);\n\t_tcscat(cd,dir);\t//+++1.2\n\tCreateDirectory(cd,NULL);\n}\n\nZRESULT TUnzip::Unzip(int index,void *dst,unsigned int len,DWORD flags)\n{ \n\tif (flags!=ZIP_MEMORY && flags!=ZIP_FILENAME && flags!=ZIP_HANDLE) \n\t\treturn ZR_ARGS;\n\tif (flags==ZIP_MEMORY)\n\t{ \n\t\tif (index!=currentfile)\n\t\t{ \n\t\t\tif (currentfile!=-1) \n\t\t\t\tunzCloseCurrentFile(uf); \n\t\t\tcurrentfile=-1;\n\t\t\tif (index>=(int)uf->gi.number_entry) \n\t\t\t\treturn ZR_ARGS;\n\t\t\tif (index<(int)uf->num_file) \n\t\t\t\tunzGoToFirstFile(uf);\n\t\t\twhile ((int)uf->num_file<index) \n\t\t\t\tunzGoToNextFile(uf);\n\t\t\tunzOpenCurrentFile(uf); \n\t\t\tcurrentfile=index;\n\t\t}\n\t\tint res = unzReadCurrentFile(uf,dst,len);\n\t\tif (res>0) \n\t\t\treturn ZR_MORE;\n\t\tunzCloseCurrentFile(uf); \n\t\tcurrentfile=-1;\n\t\tif (res==0) \n\t\t\treturn ZR_OK;\n\t\telse \n\t\t\treturn ZR_FLATE;\n\t}\n\n\t// otherwise we're writing to a handle or a file\n\tif (currentfile!=-1) \n\t\tunzCloseCurrentFile(uf); \n\tcurrentfile=-1;\n\tif (index >= (int)uf->gi.number_entry) \n\t\treturn ZR_ARGS;\n\tif (index < (int)uf->num_file) \n\t\tunzGoToFirstFile(uf);\n\twhile ((int)uf->num_file<index) \n\t\tunzGoToNextFile(uf);\n\tZIPENTRY ze; \n\tGet(index,&ze);\n\n\t// zipentry=directory is handled specially\n\tif ((ze.attr & FILE_ATTRIBUTE_DIRECTORY) != 0)\n\t{ \n\t\tif (flags==ZIP_HANDLE) \n\t\t\treturn ZR_OK; // don't do anything\n#ifdef _UNICODE\n\t\tTCHAR uname[MAX_PATH];\n\t\tGetUnicodeFileName(ze.name, uname, MAX_PATH-1);\n\t\tEnsureDirectory(rootdir, uname);\n#else\n\t\tEnsureDirectory(rootdir, ze.name);\n#endif\n\t\treturn ZR_OK;\n\t}\n\n\t// otherwise, we write the zipentry to a file/handle\n\tHANDLE h;\n\tif (flags==ZIP_HANDLE) \n\t\th=dst;\n\telse\n\t{ \n\t\tconst TCHAR *name = (const TCHAR *)dst;\n\t\tconst TCHAR *c = name;\n\t\twhile (*c) \n\t\t{\n\t\t\tif (*c == _T('/') || *c == _T('\\\\')) \n\t\t\t\tname = c + 1; \n\t\t\tc++;\n\t\t}\n\t\t// if it's a relative filename, ensure directories. We do this as a service  \n\t\t// to the caller so they can just unzip straight unto ze.name.\n\t\tif (name != (const TCHAR *)dst)\n\t\t{ \n\t\t\tTCHAR dir[MAX_PATH]; \n\t\t\t_tcscpy(dir,(const TCHAR*)dst); \n\t\t\tdir[name-(const TCHAR*)dst-1] = _T('\\0');\n\t\t\tbool isabsolute = (dir[0]==_T('/') || dir[0]==_T('\\\\') || dir[1]==_T(':'));\n\t\t\tisabsolute |= (_tcsstr(dir,_T(\"../\"))!=0) | (_tcsstr(dir,_T(\"..\\\\\"))!=0);\n\t\t\tif (!isabsolute) \n\t\t\t\tEnsureDirectory(rootdir,dir);\n\t\t}\n\t\th = ::CreateFile((const TCHAR*)dst, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, \n\t\t\t\tze.attr, NULL);\n\t}\n\n\tif (h == INVALID_HANDLE_VALUE)  \n\t\treturn ZR_NOFILE;\n\t\n\tunzOpenCurrentFile(uf);\n\tBYTE buf[16384];  \n\tbool haderr=false;\n\t\n\tfor (;;)\n\t{ \n\t\tint res = unzReadCurrentFile(uf,buf,16384);\n\t\tif (res<0) \n\t\t{\n\t\t\thaderr=true; \n\t\t\tbreak;\n\t\t}\n\t\tif (res==0) \n\t\t\tbreak;\n\t\tDWORD writ; \n\t\tBOOL bres = WriteFile(h,buf,res,&writ,NULL);\n\t\tif (!bres) \n\t\t{\n\t\t\thaderr=true; \n\t\t\tbreak;\n\t\t}\n\t}\n\tbool settime=false;\n\tDWORD type = GetFileType(h); \n\tif (type==FILE_TYPE_DISK && !haderr) \n\t\tsettime=true;\n\tif (settime) \n\t\tSetFileTime(h,&ze.ctime,&ze.atime,&ze.mtime);\n\tif (flags!=ZIP_HANDLE) \n\t\tCloseHandle(h);\n\tunzCloseCurrentFile(uf);\n\tif (haderr) \n\t\treturn ZR_WRITE;\n\treturn ZR_OK;\n}\n\nZRESULT TUnzip::Close()\n{ if (currentfile!=-1) unzCloseCurrentFile(uf); currentfile=-1;\n  if (uf!=0) unzClose(uf); uf=0;\n  return ZR_OK;\n}\n\nZRESULT lasterrorU=ZR_OK;\n\nunsigned int FormatZipMessageU(ZRESULT code, char *buf,unsigned int len)\n{ if (code==ZR_RECENT) code=lasterrorU;\n  const char *msg=\"unknown zip result code\";\n  switch (code)\n  { case ZR_OK: msg=\"Success\"; break;\n    case ZR_NODUPH: msg=\"Culdn't duplicate handle\"; break;\n    case ZR_NOFILE: msg=\"Couldn't create/open file\"; break;\n    case ZR_NOALLOC: msg=\"Failed to allocate memory\"; break;\n    case ZR_WRITE: msg=\"Error writing to file\"; break;\n    case ZR_NOTFOUND: msg=\"File not found in the zipfile\"; break;\n    case ZR_MORE: msg=\"Still more data to unzip\"; break;\n    case ZR_CORRUPT: msg=\"Zipfile is corrupt or not a zipfile\"; break;\n    case ZR_READ: msg=\"Error reading file\"; break;\n    case ZR_ARGS: msg=\"Caller: faulty arguments\"; break;\n    case ZR_PARTIALUNZ: msg=\"Caller: the file had already been partially unzipped\"; break;\n    case ZR_NOTMMAP: msg=\"Caller: can only get memory of a memory zipfile\"; break;\n    case ZR_MEMSIZE: msg=\"Caller: not enough space allocated for memory zipfile\"; break;\n    case ZR_FAILED: msg=\"Caller: there was a previous error\"; break;\n    case ZR_ENDED: msg=\"Caller: additions to the zip have already been ended\"; break;\n    case ZR_ZMODE: msg=\"Caller: mixing creation and opening of zip\"; break;\n    case ZR_NOTINITED: msg=\"Zip-bug: internal initialisation not completed\"; break;\n    case ZR_SEEK: msg=\"Zip-bug: trying to seek the unseekable\"; break;\n    case ZR_MISSIZE: msg=\"Zip-bug: the anticipated size turned out wrong\"; break;\n    case ZR_NOCHANGE: msg=\"Zip-bug: tried to change mind, but not allowed\"; break;\n    case ZR_FLATE: msg=\"Zip-bug: an internal error during flation\"; break;\n  }\n  unsigned int mlen=(unsigned int)strlen(msg);\n  if (buf==0 || len==0) return mlen;\n  unsigned int n=mlen; if (n+1>len) n=len-1;\n  strncpy(buf,msg,n); buf[n]=0;\n  return mlen;\n}\n\n#endif"
  },
  {
    "path": "DuiLib/Utils/downloadmgr.h",
    "content": "\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\n\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n/* File created by MIDL compiler version 5.03.0279 */\n/* at Mon Jul 23 17:42:46 2001\n*/\n/* Compiler settings for downloadmgr.idl:\nOicf (OptLev=i2), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext\nerror checks: allocation ref bounds_check enum stub_data \nVC __declspec() decoration level: \n__declspec(uuid()), __declspec(selectany), __declspec(novtable)\nDECLSPEC_UUID(), MIDL_INTERFACE()\n*/\n//@@MIDL_FILE_HEADING(  )\n\n\n/* verify that the <rpcndr.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCNDR_H_VERSION__\n#define __REQUIRED_RPCNDR_H_VERSION__ 440\n#endif\n\n#include \"rpc.h\"\n#include \"rpcndr.h\"\n\n#ifndef __RPCNDR_H_VERSION__\n#error this stub requires an updated version of <rpcndr.h>\n#endif // __RPCNDR_H_VERSION__\n\n#ifndef COM_NO_WINDOWS_H\n#include \"windows.h\"\n#include \"ole2.h\"\n#endif /*COM_NO_WINDOWS_H*/\n\n#ifndef __downloadmgr_h__\n#define __downloadmgr_h__\n\n/* Forward Declarations */ \n\n#ifndef __IDownloadManager_FWD_DEFINED__\n#define __IDownloadManager_FWD_DEFINED__\ntypedef interface IDownloadManager IDownloadManager;\n#endif \t/* __IDownloadManager_FWD_DEFINED__ */\n\n\n/* header files for imported files */\n#include \"unknwn.h\"\n#include \"ocidl.h\"\n\n#ifdef __cplusplus\nextern \"C\"{\n#endif \n\n\tvoid __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);\n\tvoid __RPC_USER MIDL_user_free( void __RPC_FAR * ); \n\n\t/* interface __MIDL_itf_downloadmgr_0000 */\n\t/* [local] */ \n\n\t//=--------------------------------------------------------------------------=\n\t// downloadmgr.h\n\t//=--------------------------------------------------------------------------=\n\t// (C) Copyright 2000 Microsoft Corporation.  All Rights Reserved.\n\t//\n\t// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n\t// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n\t// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n\t// PARTICULAR PURPOSE.\n\t//=--------------------------------------------------------------------------=\n\n#pragma comment(lib,\"uuid.lib\")\n\n\t//---------------------------------------------------------------------------=\n\t// Internet Explorer Download Manager Interfaces\n\n\t// --------------------------------------------------------------------------------\n\t// GUIDS\n\t// --------------------------------------------------------------------------------\n\t// {988934A4-064B-11D3-BB80-00104B35E7F9}\n\tDEFINE_GUID(IID_IDownloadManager, 0x988934a4, 0x064b, 0x11d3, 0xbb, 0x80, 0x0, 0x10, 0x4b, 0x35, 0xe7, 0xf9);\n#define SID_SDownloadManager IID_IDownloadManager\n\n\n\n\textern RPC_IF_HANDLE __MIDL_itf_downloadmgr_0000_v0_0_c_ifspec;\n\textern RPC_IF_HANDLE __MIDL_itf_downloadmgr_0000_v0_0_s_ifspec;\n\n#ifndef __IDownloadManager_INTERFACE_DEFINED__\n#define __IDownloadManager_INTERFACE_DEFINED__\n\n\t/* interface IDownloadManager */\n\t/* [local][unique][uuid][object][helpstring] */ \n\n\n\tEXTERN_C const IID IID_IDownloadManager;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n\n\tMIDL_INTERFACE(\"988934A4-064B-11D3-BB80-00104B35E7F9\")\nIDownloadManager : public IUnknown\n\t{\n\tpublic:\n\t\tvirtual HRESULT STDMETHODCALLTYPE Download( \n\t\t\t/* [in] */ IMoniker __RPC_FAR *pmk,\n\t\t\t/* [in] */ IBindCtx __RPC_FAR *pbc,\n\t\t\t/* [in] */ DWORD dwBindVerb,\n\t\t\t/* [in] */ LONG grfBINDF,\n\t\t\t/* [in] */ BINDINFO __RPC_FAR *pBindInfo,\n\t\t\t/* [in] */ LPCOLESTR pszHeaders,\n\t\t\t/* [in] */ LPCOLESTR pszRedir,\n\t\t\t/* [in] */ UINT uiCP) = 0;\n\n\t};\n\n#else \t/* C style interface */\n\n\ttypedef struct IDownloadManagerVtbl\n\t{\n\t\tBEGIN_INTERFACE\n\n\t\t\tHRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( \n\t\t\tIDownloadManager __RPC_FAR * This,\n\t\t\t/* [in] */ REFIID riid,\n\t\t\t/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);\n\n\t\t\tULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( \n\t\t\t\tIDownloadManager __RPC_FAR * This);\n\n\t\t\tULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( \n\t\t\t\tIDownloadManager __RPC_FAR * This);\n\n\t\t\tHRESULT ( STDMETHODCALLTYPE __RPC_FAR *Download )( \n\t\t\t\tIDownloadManager __RPC_FAR * This,\n\t\t\t\t/* [in] */ IMoniker __RPC_FAR *pmk,\n\t\t\t\t/* [in] */ IBindCtx __RPC_FAR *pbc,\n\t\t\t\t/* [in] */ DWORD dwBindVerb,\n\t\t\t\t/* [in] */ LONG grfBINDF,\n\t\t\t\t/* [in] */ BINDINFO __RPC_FAR *pBindInfo,\n\t\t\t\t/* [in] */ LPCOLESTR pszHeaders,\n\t\t\t\t/* [in] */ LPCOLESTR pszRedir,\n\t\t\t\t/* [in] */ UINT uiCP);\n\n\t\tEND_INTERFACE\n\t} IDownloadManagerVtbl;\n\n\tinterface IDownloadManager\n\t{\n\t\tCONST_VTBL struct IDownloadManagerVtbl __RPC_FAR *lpVtbl;\n\t};\n\n\n\n#ifdef COBJMACROS\n\n\n#define IDownloadManager_QueryInterface(This,riid,ppvObject)\t\\\n\t(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)\n\n#define IDownloadManager_AddRef(This)\t\\\n\t(This)->lpVtbl -> AddRef(This)\n\n#define IDownloadManager_Release(This)\t\\\n\t(This)->lpVtbl -> Release(This)\n\n\n#define IDownloadManager_Download(This,pmk,pbc,dwBindVerb,grfBINDF,pBindInfo,pszHeaders,pszRedir,uiCP)\t\\\n\t(This)->lpVtbl -> Download(This,pmk,pbc,dwBindVerb,grfBINDF,pBindInfo,pszHeaders,pszRedir,uiCP)\n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\tHRESULT STDMETHODCALLTYPE IDownloadManager_Download_Proxy( \n\t\tIDownloadManager __RPC_FAR * This,\n\t\t/* [in] */ IMoniker __RPC_FAR *pmk,\n\t\t/* [in] */ IBindCtx __RPC_FAR *pbc,\n\t\t/* [in] */ DWORD dwBindVerb,\n\t\t/* [in] */ LONG grfBINDF,\n\t\t/* [in] */ BINDINFO __RPC_FAR *pBindInfo,\n\t\t/* [in] */ LPCOLESTR pszHeaders,\n\t\t/* [in] */ LPCOLESTR pszRedir,\n\t\t/* [in] */ UINT uiCP);\n\n\n\tvoid __RPC_STUB IDownloadManager_Download_Stub(\n\t\tIRpcStubBuffer *This,\n\t\tIRpcChannelBuffer *_pRpcChannelBuffer,\n\t\tPRPC_MESSAGE _pRpcMessage,\n\t\tDWORD *_pdwStubPhase);\n\n\n\n#endif \t/* __IDownloadManager_INTERFACE_DEFINED__ */\n\n\n\t/* Additional Prototypes for ALL interfaces */\n\n\t/* end of Additional Prototypes */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n\n\n"
  },
  {
    "path": "DuiLib/Utils/stb_image.c",
    "content": "/* stb_image - v2.08 - public domain image loader - http://nothings.org/stb_image.h\n                                     no warranty implied; use at your own risk\n\n   Do this:\n      #define STB_IMAGE_IMPLEMENTATION\n   before you include this file in *one* C or C++ file to create the implementation.\n\n   // i.e. it should look like this:\n   #include ...\n   #include ...\n   #include ...\n   #define STB_IMAGE_IMPLEMENTATION\n   #include \"stb_image.h\"\n\n   You can #define STBI_ASSERT(x) before the #include to avoid using assert.h.\n   And #define STBI_MALLOC, STBI_REALLOC, and STBI_FREE to avoid using malloc,realloc,free\n\n\n   QUICK NOTES:\n      Primarily of interest to game developers and other people who can\n          avoid problematic images and only need the trivial interface\n\n      JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib)\n      PNG 1/2/4/8-bit-per-channel (16 bpc not supported)\n\n      TGA (not sure what subset, if a subset)\n      BMP non-1bpp, non-RLE\n      PSD (composited view only, no extra channels, 8/16 bit-per-channel)\n\n      GIF (*comp always reports as 4-channel)\n      HDR (radiance rgbE format)\n      PIC (Softimage PIC)\n      PNM (PPM and PGM binary only)\n\n      Animated GIF still needs a proper API, but here's one way to do it:\n          http://gist.github.com/urraka/685d9a6340b26b830d49\n\n      - decode from memory or through FILE (define STBI_NO_STDIO to remove code)\n      - decode from arbitrary I/O callbacks\n      - SIMD acceleration on x86/x64 (SSE2) and ARM (NEON)\n\n   Full documentation under \"DOCUMENTATION\" below.\n\n\n   Revision 2.00 release notes:\n\n      - Progressive JPEG is now supported.\n\n      - PPM and PGM binary formats are now supported, thanks to Ken Miller.\n\n      - x86 platforms now make use of SSE2 SIMD instructions for\n        JPEG decoding, and ARM platforms can use NEON SIMD if requested.\n        This work was done by Fabian \"ryg\" Giesen. SSE2 is used by\n        default, but NEON must be enabled explicitly; see docs.\n\n        With other JPEG optimizations included in this version, we see\n        2x speedup on a JPEG on an x86 machine, and a 1.5x speedup\n        on a JPEG on an ARM machine, relative to previous versions of this\n        library. The same results will not obtain for all JPGs and for all\n        x86/ARM machines. (Note that progressive JPEGs are significantly\n        slower to decode than regular JPEGs.) This doesn't mean that this\n        is the fastest JPEG decoder in the land; rather, it brings it\n        closer to parity with standard libraries. If you want the fastest\n        decode, look elsewhere. (See \"Philosophy\" section of docs below.)\n\n        See final bullet items below for more info on SIMD.\n\n      - Added STBI_MALLOC, STBI_REALLOC, and STBI_FREE macros for replacing\n        the memory allocator. Unlike other STBI libraries, these macros don't\n        support a context parameter, so if you need to pass a context in to\n        the allocator, you'll have to store it in a global or a thread-local\n        variable.\n\n      - Split existing STBI_NO_HDR flag into two flags, STBI_NO_HDR and\n        STBI_NO_LINEAR.\n            STBI_NO_HDR:     suppress implementation of .hdr reader format\n            STBI_NO_LINEAR:  suppress high-dynamic-range light-linear float API\n\n      - You can suppress implementation of any of the decoders to reduce\n        your code footprint by #defining one or more of the following\n        symbols before creating the implementation.\n\n            STBI_NO_JPEG\n            STBI_NO_PNG\n            STBI_NO_BMP\n            STBI_NO_PSD\n            STBI_NO_TGA\n            STBI_NO_GIF\n            STBI_NO_HDR\n            STBI_NO_PIC\n            STBI_NO_PNM   (.ppm and .pgm)\n\n      - You can request *only* certain decoders and suppress all other ones\n        (this will be more forward-compatible, as addition of new decoders\n        doesn't require you to disable them explicitly):\n\n            STBI_ONLY_JPEG\n            STBI_ONLY_PNG\n            STBI_ONLY_BMP\n            STBI_ONLY_PSD\n            STBI_ONLY_TGA\n            STBI_ONLY_GIF\n            STBI_ONLY_HDR\n            STBI_ONLY_PIC\n            STBI_ONLY_PNM   (.ppm and .pgm)\n\n         Note that you can define multiples of these, and you will get all\n         of them (\"only x\" and \"only y\" is interpreted to mean \"only x&y\").\n\n       - If you use STBI_NO_PNG (or _ONLY_ without PNG), and you still\n         want the zlib decoder to be available, #define STBI_SUPPORT_ZLIB\n\n      - Compilation of all SIMD code can be suppressed with\n            #define STBI_NO_SIMD\n        It should not be necessary to disable SIMD unless you have issues\n        compiling (e.g. using an x86 compiler which doesn't support SSE\n        intrinsics or that doesn't support the method used to detect\n        SSE2 support at run-time), and even those can be reported as\n        bugs so I can refine the built-in compile-time checking to be\n        smarter.\n\n      - The old STBI_SIMD system which allowed installing a user-defined\n        IDCT etc. has been removed. If you need this, don't upgrade. My\n        assumption is that almost nobody was doing this, and those who\n        were will find the built-in SIMD more satisfactory anyway.\n\n      - RGB values computed for JPEG images are slightly different from\n        previous versions of stb_image. (This is due to using less\n        integer precision in SIMD.) The C code has been adjusted so\n        that the same RGB values will be computed regardless of whether\n        SIMD support is available, so your app should always produce\n        consistent results. But these results are slightly different from\n        previous versions. (Specifically, about 3% of available YCbCr values\n        will compute different RGB results from pre-1.49 versions by +-1;\n        most of the deviating values are one smaller in the G channel.)\n\n      - If you must produce consistent results with previous versions of\n        stb_image, #define STBI_JPEG_OLD and you will get the same results\n        you used to; however, you will not get the SIMD speedups for\n        the YCbCr-to-RGB conversion step (although you should still see\n        significant JPEG speedup from the other changes).\n\n        Please note that STBI_JPEG_OLD is a temporary feature; it will be\n        removed in future versions of the library. It is only intended for\n        near-term back-compatibility use.\n\n\n   Latest revision history:\n      2.08  (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA\n      2.07  (2015-09-13) partial animated GIF support\n                         limited 16-bit PSD support\n                         minor bugs, code cleanup, and compiler warnings\n      2.06  (2015-04-19) fix bug where PSD returns wrong '*comp' value\n      2.05  (2015-04-19) fix bug in progressive JPEG handling, fix warning\n      2.04  (2015-04-15) try to re-enable SIMD on MinGW 64-bit\n      2.03  (2015-04-12) additional corruption checking\n                         stbi_set_flip_vertically_on_load\n                         fix NEON support; fix mingw support\n      2.02  (2015-01-19) fix incorrect assert, fix warning\n      2.01  (2015-01-17) fix various warnings\n      2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG\n      2.00  (2014-12-25) optimize JPEG, including x86 SSE2 & ARM NEON SIMD\n                         progressive JPEG\n                         PGM/PPM support\n                         STBI_MALLOC,STBI_REALLOC,STBI_FREE\n                         STBI_NO_*, STBI_ONLY_*\n                         GIF bugfix\n      1.48  (2014-12-14) fix incorrectly-named assert()\n      1.47  (2014-12-14) 1/2/4-bit PNG support (both grayscale and paletted)\n                         optimize PNG\n                         fix bug in interlaced PNG with user-specified channel count\n\n   See end of file for full revision history.\n\n\n ============================    Contributors    =========================\n\n Image formats                                Bug fixes & warning fixes\n    Sean Barrett (jpeg, png, bmp)                Marc LeBlanc\n    Nicolas Schulz (hdr, psd)                    Christpher Lloyd\n    Jonathan Dummer (tga)                        Dave Moore\n    Jean-Marc Lienher (gif)                      Won Chun\n    Tom Seddon (pic)                             the Horde3D community\n    Thatcher Ulrich (psd)                        Janez Zemva\n    Ken Miller (pgm, ppm)                        Jonathan Blow\n    urraka@github (animated gif)                 Laurent Gomila\n                                                 Aruelien Pocheville\n                                                 Ryamond Barbiero\n                                                 David Woo\n Extensions, features                            Martin Golini\n    Jetro Lauha (stbi_info)                      Roy Eltham\n    Martin \"SpartanJ\" Golini (stbi_info)         Luke Graham\n    James \"moose2000\" Brown (iPhone PNG)         Thomas Ruf\n    Ben \"Disch\" Wenger (io callbacks)            John Bartholomew\n    Omar Cornut (1/2/4-bit PNG)                  Ken Hamada\n    Nicolas Guillemot (vertical flip)            Cort Stratton\n    Richard Mitton (16-bit PSD)                  Blazej Dariusz Roszkowski\n                                                 Thibault Reuille\n                                                 Paul Du Bois\n                                                 Guillaume George\n                                                 Jerry Jansson\n                                                 Hayaki Saito\n                                                 Johan Duparc\n                                                 Ronny Chevalier\n Optimizations & bugfixes                        Michal Cichon\n    Fabian \"ryg\" Giesen                          Tero Hanninen\n    Arseny Kapoulkine                            Sergio Gonzalez\n                                                 Cass Everitt\n                                                 Engin Manap\n  If your name should be here but                Martins Mozeiko\n  isn't, let Sean know.                          Joseph Thomson\n                                                 Phil Jordan\n                                                 Nathan Reed\n                                                 Michaelangel007@github\n                                                 Nick Verigakis\n\nLICENSE\n\nThis software is in the public domain. Where that dedication is not\nrecognized, you are granted a perpetual, irrevocable license to copy,\ndistribute, and modify this file as you see fit.\n\n*/\n\n#include \"stb_image.h\"\n\n#ifdef STB_IMAGE_IMPLEMENTATION\n\n#if defined(STBI_ONLY_JPEG) || defined(STBI_ONLY_PNG) || defined(STBI_ONLY_BMP) \\\n  || defined(STBI_ONLY_TGA) || defined(STBI_ONLY_GIF) || defined(STBI_ONLY_PSD) \\\n  || defined(STBI_ONLY_HDR) || defined(STBI_ONLY_PIC) || defined(STBI_ONLY_PNM) \\\n  || defined(STBI_ONLY_ZLIB)\n   #ifndef STBI_ONLY_JPEG\n   #define STBI_NO_JPEG\n   #endif\n   #ifndef STBI_ONLY_PNG\n   #define STBI_NO_PNG\n   #endif\n   #ifndef STBI_ONLY_BMP\n   #define STBI_NO_BMP\n   #endif\n   #ifndef STBI_ONLY_PSD\n   #define STBI_NO_PSD\n   #endif\n   #ifndef STBI_ONLY_TGA\n   #define STBI_NO_TGA\n   #endif\n   #ifndef STBI_ONLY_GIF\n   #define STBI_NO_GIF\n   #endif\n   #ifndef STBI_ONLY_HDR\n   #define STBI_NO_HDR\n   #endif\n   #ifndef STBI_ONLY_PIC\n   #define STBI_NO_PIC\n   #endif\n   #ifndef STBI_ONLY_PNM\n   #define STBI_NO_PNM\n   #endif\n#endif\n\n#if defined(STBI_NO_PNG) && !defined(STBI_SUPPORT_ZLIB) && !defined(STBI_NO_ZLIB)\n#define STBI_NO_ZLIB\n#endif\n\n\n#include <stdarg.h>\n#include <stddef.h> // ptrdiff_t on osx\n#include <stdlib.h>\n#include <string.h>\n\n#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR)\n#include <math.h>  // ldexp\n#endif\n\n#ifndef STBI_NO_STDIO\n#include <stdio.h>\n#endif\n\n#ifndef STBI_ASSERT\n#include <assert.h>\n#define STBI_ASSERT(x) assert(x)\n#endif\n\n\n#ifndef _MSC_VER\n   #ifdef __cplusplus\n   #define stbi_inline inline\n   #else\n   #define stbi_inline\n   #endif\n#else\n   #define stbi_inline __forceinline\n#endif\n\n\n#ifdef _MSC_VER\ntypedef unsigned short stbi__uint16;\ntypedef   signed short stbi__int16;\ntypedef unsigned int   stbi__uint32;\ntypedef   signed int   stbi__int32;\n#else\n#include <stdint.h>\ntypedef uint16_t stbi__uint16;\ntypedef int16_t  stbi__int16;\ntypedef uint32_t stbi__uint32;\ntypedef int32_t  stbi__int32;\n#endif\n\n// should produce compiler error if size is wrong\ntypedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];\n\n#ifdef _MSC_VER\n#define STBI_NOTUSED(v)  (void)(v)\n#else\n#define STBI_NOTUSED(v)  (void)sizeof(v)\n#endif\n\n#ifdef _MSC_VER\n#define STBI_HAS_LROTL\n#endif\n\n#ifdef STBI_HAS_LROTL\n   #define stbi_lrot(x,y)  _lrotl(x,y)\n#else\n   #define stbi_lrot(x,y)  (((x) << (y)) | ((x) >> (32 - (y))))\n#endif\n\n#if defined(STBI_MALLOC) && defined(STBI_FREE) && defined(STBI_REALLOC)\n// ok\n#elif !defined(STBI_MALLOC) && !defined(STBI_FREE) && !defined(STBI_REALLOC)\n// ok\n#else\n#error \"Must define all or none of STBI_MALLOC, STBI_FREE, and STBI_REALLOC.\"\n#endif\n\n#ifndef STBI_MALLOC\n#define STBI_MALLOC(sz)    malloc(sz)\n#define STBI_REALLOC(p,sz) realloc(p,sz)\n#define STBI_FREE(p)       free(p)\n#endif\n\n// x86/x64 detection\n#if defined(__x86_64__) || defined(_M_X64)\n#define STBI__X64_TARGET\n#elif defined(__i386) || defined(_M_IX86)\n#define STBI__X86_TARGET\n#endif\n\n#if defined(__GNUC__) && (defined(STBI__X86_TARGET) || defined(STBI__X64_TARGET)) && !defined(__SSE2__) && !defined(STBI_NO_SIMD)\n// NOTE: not clear do we actually need this for the 64-bit path?\n// gcc doesn't support sse2 intrinsics unless you compile with -msse2,\n// (but compiling with -msse2 allows the compiler to use SSE2 everywhere;\n// this is just broken and gcc are jerks for not fixing it properly\n// http://www.virtualdub.org/blog/pivot/entry.php?id=363 )\n#define STBI_NO_SIMD\n#endif\n\n#if defined(__MINGW32__) && defined(STBI__X86_TARGET) && !defined(STBI_MINGW_ENABLE_SSE2) && !defined(STBI_NO_SIMD)\n// Note that __MINGW32__ doesn't actually mean 32-bit, so we have to avoid STBI__X64_TARGET\n//\n// 32-bit MinGW wants ESP to be 16-byte aligned, but this is not in the\n// Windows ABI and VC++ as well as Windows DLLs don't maintain that invariant.\n// As a result, enabling SSE2 on 32-bit MinGW is dangerous when not\n// simultaneously enabling \"-mstackrealign\".\n//\n// See https://github.com/nothings/stb/issues/81 for more information.\n//\n// So default to no SSE2 on 32-bit MinGW. If you've read this far and added\n// -mstackrealign to your build settings, feel free to #define STBI_MINGW_ENABLE_SSE2.\n#define STBI_NO_SIMD\n#endif\n\n#if !defined(STBI_NO_SIMD) && defined(STBI__X86_TARGET)\n#define STBI_SSE2\n#include <emmintrin.h>\n\n#ifdef _MSC_VER\n\n#if _MSC_VER >= 1400  // not VC6\n#include <intrin.h> // __cpuid\nstatic int stbi__cpuid3(void)\n{\n   int info[4];\n   __cpuid(info,1);\n   return info[3];\n}\n#else\nstatic int stbi__cpuid3(void)\n{\n   int res;\n   __asm {\n      mov  eax,1\n      cpuid\n      mov  res,edx\n   }\n   return res;\n}\n#endif\n\n#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name\n\nstatic int stbi__sse2_available()\n{\n   int info3 = stbi__cpuid3();\n   return ((info3 >> 26) & 1) != 0;\n}\n#else // assume GCC-style if not VC++\n#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16)))\n\nstatic int stbi__sse2_available()\n{\n#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 // GCC 4.8 or later\n   // GCC 4.8+ has a nice way to do this\n   return __builtin_cpu_supports(\"sse2\");\n#else\n   // portable way to do this, preferably without using GCC inline ASM?\n   // just bail for now.\n   return 0;\n#endif\n}\n#endif\n#endif\n\n// ARM NEON\n#if defined(STBI_NO_SIMD) && defined(STBI_NEON)\n#undef STBI_NEON\n#endif\n\n#ifdef STBI_NEON\n#include <arm_neon.h>\n// assume GCC or Clang on ARM targets\n#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16)))\n#endif\n\n#ifndef STBI_SIMD_ALIGN\n#define STBI_SIMD_ALIGN(type, name) type name\n#endif\n\n///////////////////////////////////////////////\n//\n//  stbi__context struct and start_xxx functions\n\n// stbi__context structure is our basic context used by all images, so it\n// contains all the IO context, plus some basic image information\ntypedef struct\n{\n   stbi__uint32 img_x, img_y;\n   int img_n, img_out_n;\n\n   stbi_io_callbacks io;\n   void *io_user_data;\n\n   int read_from_callbacks;\n   int buflen;\n   stbi_uc buffer_start[128];\n\n   stbi_uc *img_buffer, *img_buffer_end;\n   stbi_uc *img_buffer_original, *img_buffer_original_end;\n} stbi__context;\n\n\nstatic void stbi__refill_buffer(stbi__context *s);\n\n// initialize a memory-decode context\nstatic void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len)\n{\n   s->io.read = NULL;\n   s->read_from_callbacks = 0;\n   s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer;\n   s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len;\n}\n\n// initialize a callback-based context\nstatic void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user)\n{\n   s->io = *c;\n   s->io_user_data = user;\n   s->buflen = sizeof(s->buffer_start);\n   s->read_from_callbacks = 1;\n   s->img_buffer_original = s->buffer_start;\n   stbi__refill_buffer(s);\n   s->img_buffer_original_end = s->img_buffer_end;\n}\n\n#ifndef STBI_NO_STDIO\n\nstatic int stbi__stdio_read(void *user, char *data, int size)\n{\n   return (int) fread(data,1,size,(FILE*) user);\n}\n\nstatic void stbi__stdio_skip(void *user, int n)\n{\n   fseek((FILE*) user, n, SEEK_CUR);\n}\n\nstatic int stbi__stdio_eof(void *user)\n{\n   return feof((FILE*) user);\n}\n\nstatic stbi_io_callbacks stbi__stdio_callbacks =\n{\n   stbi__stdio_read,\n   stbi__stdio_skip,\n   stbi__stdio_eof,\n};\n\nstatic void stbi__start_file(stbi__context *s, FILE *f)\n{\n   stbi__start_callbacks(s, &stbi__stdio_callbacks, (void *) f);\n}\n\n//static void stop_file(stbi__context *s) { }\n\n#endif // !STBI_NO_STDIO\n\nstatic void stbi__rewind(stbi__context *s)\n{\n   // conceptually rewind SHOULD rewind to the beginning of the stream,\n   // but we just rewind to the beginning of the initial buffer, because\n   // we only use it after doing 'test', which only ever looks at at most 92 bytes\n   s->img_buffer = s->img_buffer_original;\n   s->img_buffer_end = s->img_buffer_original_end;\n}\n\n#ifndef STBI_NO_JPEG\nstatic int      stbi__jpeg_test(stbi__context *s);\nstatic stbi_uc *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);\nstatic int      stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp);\n#endif\n\n#ifndef STBI_NO_PNG\nstatic int      stbi__png_test(stbi__context *s);\nstatic stbi_uc *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);\nstatic int      stbi__png_info(stbi__context *s, int *x, int *y, int *comp);\n#endif\n\n#ifndef STBI_NO_BMP\nstatic int      stbi__bmp_test(stbi__context *s);\nstatic stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);\nstatic int      stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp);\n#endif\n\n#ifndef STBI_NO_TGA\nstatic int      stbi__tga_test(stbi__context *s);\nstatic stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);\nstatic int      stbi__tga_info(stbi__context *s, int *x, int *y, int *comp);\n#endif\n\n#ifndef STBI_NO_PSD\nstatic int      stbi__psd_test(stbi__context *s);\nstatic stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);\nstatic int      stbi__psd_info(stbi__context *s, int *x, int *y, int *comp);\n#endif\n\n#ifndef STBI_NO_HDR\nstatic int      stbi__hdr_test(stbi__context *s);\nstatic float   *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);\nstatic int      stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp);\n#endif\n\n#ifndef STBI_NO_PIC\nstatic int      stbi__pic_test(stbi__context *s);\nstatic stbi_uc *stbi__pic_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);\nstatic int      stbi__pic_info(stbi__context *s, int *x, int *y, int *comp);\n#endif\n\n#ifndef STBI_NO_GIF\nstatic int      stbi__gif_test(stbi__context *s);\nstatic stbi_uc *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);\nstatic int      stbi__gif_info(stbi__context *s, int *x, int *y, int *comp);\n#endif\n\n#ifndef STBI_NO_PNM\nstatic int      stbi__pnm_test(stbi__context *s);\nstatic stbi_uc *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);\nstatic int      stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp);\n#endif\n\n// this is not threadsafe\nstatic const char *stbi__g_failure_reason;\n\nSTBIDEF const char *stbi_failure_reason(void)\n{\n   return stbi__g_failure_reason;\n}\n\nstatic int stbi__err(const char *str)\n{\n   stbi__g_failure_reason = str;\n   return 0;\n}\n\nstatic void *stbi__malloc(size_t size)\n{\n    return STBI_MALLOC(size);\n}\n\n// stbi__err - error\n// stbi__errpf - error returning pointer to float\n// stbi__errpuc - error returning pointer to unsigned char\n\n#ifdef STBI_NO_FAILURE_STRINGS\n   #define stbi__err(x,y)  0\n#elif defined(STBI_FAILURE_USERMSG)\n   #define stbi__err(x,y)  stbi__err(y)\n#else\n   #define stbi__err(x,y)  stbi__err(x)\n#endif\n\n#define stbi__errpf(x,y)   ((float *)(size_t) (stbi__err(x,y)?NULL:NULL))\n#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))\n\nSTBIDEF void stbi_image_free(void *retval_from_stbi_load)\n{\n   STBI_FREE(retval_from_stbi_load);\n}\n\n#ifndef STBI_NO_LINEAR\nstatic float   *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp);\n#endif\n\n#ifndef STBI_NO_HDR\nstatic stbi_uc *stbi__hdr_to_ldr(float   *data, int x, int y, int comp);\n#endif\n\nstatic int stbi__vertically_flip_on_load = 0;\n\nSTBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip)\n{\n    stbi__vertically_flip_on_load = flag_true_if_should_flip;\n}\n\nstatic unsigned char *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp)\n{\n   #ifndef STBI_NO_JPEG\n   if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp);\n   #endif\n   #ifndef STBI_NO_PNG\n   if (stbi__png_test(s))  return stbi__png_load(s,x,y,comp,req_comp);\n   #endif\n   #ifndef STBI_NO_BMP\n   if (stbi__bmp_test(s))  return stbi__bmp_load(s,x,y,comp,req_comp);\n   #endif\n   #ifndef STBI_NO_GIF\n   if (stbi__gif_test(s))  return stbi__gif_load(s,x,y,comp,req_comp);\n   #endif\n   #ifndef STBI_NO_PSD\n   if (stbi__psd_test(s))  return stbi__psd_load(s,x,y,comp,req_comp);\n   #endif\n   #ifndef STBI_NO_PIC\n   if (stbi__pic_test(s))  return stbi__pic_load(s,x,y,comp,req_comp);\n   #endif\n   #ifndef STBI_NO_PNM\n   if (stbi__pnm_test(s))  return stbi__pnm_load(s,x,y,comp,req_comp);\n   #endif\n\n   #ifndef STBI_NO_HDR\n   if (stbi__hdr_test(s)) {\n      float *hdr = stbi__hdr_load(s, x,y,comp,req_comp);\n      return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp);\n   }\n   #endif\n\n   #ifndef STBI_NO_TGA\n   // test tga last because it's a crappy test!\n   if (stbi__tga_test(s))\n      return stbi__tga_load(s,x,y,comp,req_comp);\n   #endif\n\n   return stbi__errpuc(\"unknown image type\", \"Image not of any known type, or corrupt\");\n}\n\nstatic unsigned char *stbi__load_flip(stbi__context *s, int *x, int *y, int *comp, int req_comp)\n{\n   unsigned char *result = stbi__load_main(s, x, y, comp, req_comp);\n\n   if (stbi__vertically_flip_on_load && result != NULL) {\n      int w = *x, h = *y;\n      int depth = req_comp ? req_comp : *comp;\n      int row,col,z;\n      stbi_uc temp;\n\n      // @OPTIMIZE: use a bigger temp buffer and memcpy multiple pixels at once\n      for (row = 0; row < (h>>1); row++) {\n         for (col = 0; col < w; col++) {\n            for (z = 0; z < depth; z++) {\n               temp = result[(row * w + col) * depth + z];\n               result[(row * w + col) * depth + z] = result[((h - row - 1) * w + col) * depth + z];\n               result[((h - row - 1) * w + col) * depth + z] = temp;\n            }\n         }\n      }\n   }\n\n   return result;\n}\n\n#ifndef STBI_NO_HDR\nstatic void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp)\n{\n   if (stbi__vertically_flip_on_load && result != NULL) {\n      int w = *x, h = *y;\n      int depth = req_comp ? req_comp : *comp;\n      int row,col,z;\n      float temp;\n\n      // @OPTIMIZE: use a bigger temp buffer and memcpy multiple pixels at once\n      for (row = 0; row < (h>>1); row++) {\n         for (col = 0; col < w; col++) {\n            for (z = 0; z < depth; z++) {\n               temp = result[(row * w + col) * depth + z];\n               result[(row * w + col) * depth + z] = result[((h - row - 1) * w + col) * depth + z];\n               result[((h - row - 1) * w + col) * depth + z] = temp;\n            }\n         }\n      }\n   }\n}\n#endif\n\n#ifndef STBI_NO_STDIO\n\nstatic FILE *stbi__fopen(char const *filename, char const *mode)\n{\n   FILE *f;\n#if defined(_MSC_VER) && _MSC_VER >= 1400\n   if (0 != fopen_s(&f, filename, mode))\n      f=0;\n#else\n   f = fopen(filename, mode);\n#endif\n   return f;\n}\n\n\nSTBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp)\n{\n   FILE *f = stbi__fopen(filename, \"rb\");\n   unsigned char *result;\n   if (!f) return stbi__errpuc(\"can't fopen\", \"Unable to open file\");\n   result = stbi_load_from_file(f,x,y,comp,req_comp);\n   fclose(f);\n   return result;\n}\n\nSTBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp)\n{\n   unsigned char *result;\n   stbi__context s;\n   stbi__start_file(&s,f);\n   result = stbi__load_flip(&s,x,y,comp,req_comp);\n   if (result) {\n      // need to 'unget' all the characters in the IO buffer\n      fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR);\n   }\n   return result;\n}\n#endif //!STBI_NO_STDIO\n\nSTBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)\n{\n   stbi__context s;\n   stbi__start_mem(&s,buffer,len);\n   return stbi__load_flip(&s,x,y,comp,req_comp);\n}\n\nSTBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp)\n{\n   stbi__context s;\n   stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user);\n   return stbi__load_flip(&s,x,y,comp,req_comp);\n}\n\n#ifndef STBI_NO_LINEAR\nstatic float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp)\n{\n   unsigned char *data;\n   #ifndef STBI_NO_HDR\n   if (stbi__hdr_test(s)) {\n      float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp);\n      if (hdr_data)\n         stbi__float_postprocess(hdr_data,x,y,comp,req_comp);\n      return hdr_data;\n   }\n   #endif\n   data = stbi__load_flip(s, x, y, comp, req_comp);\n   if (data)\n      return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);\n   return stbi__errpf(\"unknown image type\", \"Image not of any known type, or corrupt\");\n}\n\nSTBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)\n{\n   stbi__context s;\n   stbi__start_mem(&s,buffer,len);\n   return stbi__loadf_main(&s,x,y,comp,req_comp);\n}\n\nSTBIDEF float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp)\n{\n   stbi__context s;\n   stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user);\n   return stbi__loadf_main(&s,x,y,comp,req_comp);\n}\n\n#ifndef STBI_NO_STDIO\nSTBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp)\n{\n   float *result;\n   FILE *f = stbi__fopen(filename, \"rb\");\n   if (!f) return stbi__errpf(\"can't fopen\", \"Unable to open file\");\n   result = stbi_loadf_from_file(f,x,y,comp,req_comp);\n   fclose(f);\n   return result;\n}\n\nSTBIDEF float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, int req_comp)\n{\n   stbi__context s;\n   stbi__start_file(&s,f);\n   return stbi__loadf_main(&s,x,y,comp,req_comp);\n}\n#endif // !STBI_NO_STDIO\n\n#endif // !STBI_NO_LINEAR\n\n// these is-hdr-or-not is defined independent of whether STBI_NO_LINEAR is\n// defined, for API simplicity; if STBI_NO_LINEAR is defined, it always\n// reports false!\n\nSTBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len)\n{\n   #ifndef STBI_NO_HDR\n   stbi__context s;\n   stbi__start_mem(&s,buffer,len);\n   return stbi__hdr_test(&s);\n   #else\n   STBI_NOTUSED(buffer);\n   STBI_NOTUSED(len);\n   return 0;\n   #endif\n}\n\n#ifndef STBI_NO_STDIO\nSTBIDEF int      stbi_is_hdr          (char const *filename)\n{\n   FILE *f = stbi__fopen(filename, \"rb\");\n   int result=0;\n   if (f) {\n      result = stbi_is_hdr_from_file(f);\n      fclose(f);\n   }\n   return result;\n}\n\nSTBIDEF int      stbi_is_hdr_from_file(FILE *f)\n{\n   #ifndef STBI_NO_HDR\n   stbi__context s;\n   stbi__start_file(&s,f);\n   return stbi__hdr_test(&s);\n   #else\n   STBI_NOTUSED(f);\n   return 0;\n   #endif\n}\n#endif // !STBI_NO_STDIO\n\nSTBIDEF int      stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user)\n{\n   #ifndef STBI_NO_HDR\n   stbi__context s;\n   stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user);\n   return stbi__hdr_test(&s);\n   #else\n   STBI_NOTUSED(clbk);\n   STBI_NOTUSED(user);\n   return 0;\n   #endif\n}\n\nstatic float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f;\nstatic float stbi__l2h_gamma=2.2f, stbi__l2h_scale=1.0f;\n\n#ifndef STBI_NO_LINEAR\nSTBIDEF void   stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = gamma; }\nSTBIDEF void   stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; }\n#endif\n\nSTBIDEF void   stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = 1/gamma; }\nSTBIDEF void   stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; }\n\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// Common code used by all image loaders\n//\n\nenum\n{\n   STBI__SCAN_load=0,\n   STBI__SCAN_type,\n   STBI__SCAN_header\n};\n\nstatic void stbi__refill_buffer(stbi__context *s)\n{\n   int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen);\n   if (n == 0) {\n      // at end of file, treat same as if from memory, but need to handle case\n      // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file\n      s->read_from_callbacks = 0;\n      s->img_buffer = s->buffer_start;\n      s->img_buffer_end = s->buffer_start+1;\n      *s->img_buffer = 0;\n   } else {\n      s->img_buffer = s->buffer_start;\n      s->img_buffer_end = s->buffer_start + n;\n   }\n}\n\nstbi_inline static stbi_uc stbi__get8(stbi__context *s)\n{\n   if (s->img_buffer < s->img_buffer_end)\n      return *s->img_buffer++;\n   if (s->read_from_callbacks) {\n      stbi__refill_buffer(s);\n      return *s->img_buffer++;\n   }\n   return 0;\n}\n\nstbi_inline static int stbi__at_eof(stbi__context *s)\n{\n   if (s->io.read) {\n      if (!(s->io.eof)(s->io_user_data)) return 0;\n      // if feof() is true, check if buffer = end\n      // special case: we've only got the special 0 character at the end\n      if (s->read_from_callbacks == 0) return 1;\n   }\n\n   return s->img_buffer >= s->img_buffer_end;\n}\n\nstatic void stbi__skip(stbi__context *s, int n)\n{\n   if (n < 0) {\n      s->img_buffer = s->img_buffer_end;\n      return;\n   }\n   if (s->io.read) {\n      int blen = (int) (s->img_buffer_end - s->img_buffer);\n      if (blen < n) {\n         s->img_buffer = s->img_buffer_end;\n         (s->io.skip)(s->io_user_data, n - blen);\n         return;\n      }\n   }\n   s->img_buffer += n;\n}\n\nstatic int stbi__getn(stbi__context *s, stbi_uc *buffer, int n)\n{\n   if (s->io.read) {\n      int blen = (int) (s->img_buffer_end - s->img_buffer);\n      if (blen < n) {\n         int res, count;\n\n         memcpy(buffer, s->img_buffer, blen);\n\n         count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen);\n         res = (count == (n-blen));\n         s->img_buffer = s->img_buffer_end;\n         return res;\n      }\n   }\n\n   if (s->img_buffer+n <= s->img_buffer_end) {\n      memcpy(buffer, s->img_buffer, n);\n      s->img_buffer += n;\n      return 1;\n   } else\n      return 0;\n}\n\nstatic int stbi__get16be(stbi__context *s)\n{\n   int z = stbi__get8(s);\n   return (z << 8) + stbi__get8(s);\n}\n\nstatic stbi__uint32 stbi__get32be(stbi__context *s)\n{\n   stbi__uint32 z = stbi__get16be(s);\n   return (z << 16) + stbi__get16be(s);\n}\n\n#if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF)\n// nothing\n#else\nstatic int stbi__get16le(stbi__context *s)\n{\n   int z = stbi__get8(s);\n   return z + (stbi__get8(s) << 8);\n}\n#endif\n\n#ifndef STBI_NO_BMP\nstatic stbi__uint32 stbi__get32le(stbi__context *s)\n{\n   stbi__uint32 z = stbi__get16le(s);\n   return z + (stbi__get16le(s) << 16);\n}\n#endif\n\n#define STBI__BYTECAST(x)  ((stbi_uc) ((x) & 255))  // truncate int to byte without warnings\n\n\n//////////////////////////////////////////////////////////////////////////////\n//\n//  generic converter from built-in img_n to req_comp\n//    individual types do this automatically as much as possible (e.g. jpeg\n//    does all cases internally since it needs to colorspace convert anyway,\n//    and it never has alpha, so very few cases ). png can automatically\n//    interleave an alpha=255 channel, but falls back to this for other cases\n//\n//  assume data buffer is malloced, so malloc a new one and free that one\n//  only failure mode is malloc failing\n\nstatic stbi_uc stbi__compute_y(int r, int g, int b)\n{\n   return (stbi_uc) (((r*77) + (g*150) +  (29*b)) >> 8);\n}\n\nstatic unsigned char *stbi__convert_format(unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y)\n{\n   int i,j;\n   unsigned char *good;\n\n   if (req_comp == img_n) return data;\n   STBI_ASSERT(req_comp >= 1 && req_comp <= 4);\n\n   good = (unsigned char *) stbi__malloc(req_comp * x * y);\n   if (good == NULL) {\n      STBI_FREE(data);\n      return stbi__errpuc(\"outofmem\", \"Out of memory\");\n   }\n\n   for (j=0; j < (int) y; ++j) {\n      unsigned char *src  = data + j * x * img_n   ;\n      unsigned char *dest = good + j * x * req_comp;\n\n      #define COMBO(a,b)  ((a)*8+(b))\n      #define CASE(a,b)   case COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)\n      // convert source image with img_n components to one with req_comp components;\n      // avoid switch per pixel, so use switch per scanline and massive macros\n      switch (COMBO(img_n, req_comp)) {\n         CASE(1,2) dest[0]=src[0], dest[1]=255; break;\n         CASE(1,3) dest[0]=dest[1]=dest[2]=src[0]; break;\n         CASE(1,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=255; break;\n         CASE(2,1) dest[0]=src[0]; break;\n         CASE(2,3) dest[0]=dest[1]=dest[2]=src[0]; break;\n         CASE(2,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=src[1]; break;\n         CASE(3,4) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2],dest[3]=255; break;\n         CASE(3,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break;\n         CASE(3,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = 255; break;\n         CASE(4,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break;\n         CASE(4,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = src[3]; break;\n         CASE(4,3) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2]; break;\n         default: STBI_ASSERT(0);\n      }\n      #undef CASE\n   }\n\n   STBI_FREE(data);\n   return good;\n}\n\n#ifndef STBI_NO_LINEAR\nstatic float   *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp)\n{\n   int i,k,n;\n   float *output = (float *) stbi__malloc(x * y * comp * sizeof(float));\n   if (output == NULL) { STBI_FREE(data); return stbi__errpf(\"outofmem\", \"Out of memory\"); }\n   // compute number of non-alpha components\n   if (comp & 1) n = comp; else n = comp-1;\n   for (i=0; i < x*y; ++i) {\n      for (k=0; k < n; ++k) {\n         output[i*comp + k] = (float) (pow(data[i*comp+k]/255.0f, stbi__l2h_gamma) * stbi__l2h_scale);\n      }\n      if (k < comp) output[i*comp + k] = data[i*comp+k]/255.0f;\n   }\n   STBI_FREE(data);\n   return output;\n}\n#endif\n\n#ifndef STBI_NO_HDR\n#define stbi__float2int(x)   ((int) (x))\nstatic stbi_uc *stbi__hdr_to_ldr(float   *data, int x, int y, int comp)\n{\n   int i,k,n;\n   stbi_uc *output = (stbi_uc *) stbi__malloc(x * y * comp);\n   if (output == NULL) { STBI_FREE(data); return stbi__errpuc(\"outofmem\", \"Out of memory\"); }\n   // compute number of non-alpha components\n   if (comp & 1) n = comp; else n = comp-1;\n   for (i=0; i < x*y; ++i) {\n      for (k=0; k < n; ++k) {\n         float z = (float) pow(data[i*comp+k]*stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f;\n         if (z < 0) z = 0;\n         if (z > 255) z = 255;\n         output[i*comp + k] = (stbi_uc) stbi__float2int(z);\n      }\n      if (k < comp) {\n         float z = data[i*comp+k] * 255 + 0.5f;\n         if (z < 0) z = 0;\n         if (z > 255) z = 255;\n         output[i*comp + k] = (stbi_uc) stbi__float2int(z);\n      }\n   }\n   STBI_FREE(data);\n   return output;\n}\n#endif\n\n//////////////////////////////////////////////////////////////////////////////\n//\n//  \"baseline\" JPEG/JFIF decoder\n//\n//    simple implementation\n//      - doesn't support delayed output of y-dimension\n//      - simple interface (only one output format: 8-bit interleaved RGB)\n//      - doesn't try to recover corrupt jpegs\n//      - doesn't allow partial loading, loading multiple at once\n//      - still fast on x86 (copying globals into locals doesn't help x86)\n//      - allocates lots of intermediate memory (full size of all components)\n//        - non-interleaved case requires this anyway\n//        - allows good upsampling (see next)\n//    high-quality\n//      - upsampled channels are bilinearly interpolated, even across blocks\n//      - quality integer IDCT derived from IJG's 'slow'\n//    performance\n//      - fast huffman; reasonable integer IDCT\n//      - some SIMD kernels for common paths on targets with SSE2/NEON\n//      - uses a lot of intermediate memory, could cache poorly\n\n#ifndef STBI_NO_JPEG\n\n// huffman decoding acceleration\n#define FAST_BITS   9  // larger handles more cases; smaller stomps less cache\n\ntypedef struct\n{\n   stbi_uc  fast[1 << FAST_BITS];\n   // weirdly, repacking this into AoS is a 10% speed loss, instead of a win\n   stbi__uint16 code[256];\n   stbi_uc  values[256];\n   stbi_uc  size[257];\n   unsigned int maxcode[18];\n   int    delta[17];   // old 'firstsymbol' - old 'firstcode'\n} stbi__huffman;\n\ntypedef struct\n{\n   stbi__context *s;\n   stbi__huffman huff_dc[4];\n   stbi__huffman huff_ac[4];\n   stbi_uc dequant[4][64];\n   stbi__int16 fast_ac[4][1 << FAST_BITS];\n\n// sizes for components, interleaved MCUs\n   int img_h_max, img_v_max;\n   int img_mcu_x, img_mcu_y;\n   int img_mcu_w, img_mcu_h;\n\n// definition of jpeg image component\n   struct\n   {\n      int id;\n      int h,v;\n      int tq;\n      int hd,ha;\n      int dc_pred;\n\n      int x,y,w2,h2;\n      stbi_uc *data;\n      void *raw_data, *raw_coeff;\n      stbi_uc *linebuf;\n      short   *coeff;   // progressive only\n      int      coeff_w, coeff_h; // number of 8x8 coefficient blocks\n   } img_comp[4];\n\n   stbi__uint32   code_buffer; // jpeg entropy-coded buffer\n   int            code_bits;   // number of valid bits\n   unsigned char  marker;      // marker seen while filling entropy buffer\n   int            nomore;      // flag if we saw a marker so must stop\n\n   int            progressive;\n   int            spec_start;\n   int            spec_end;\n   int            succ_high;\n   int            succ_low;\n   int            eob_run;\n\n   int scan_n, order[4];\n   int restart_interval, todo;\n\n// kernels\n   void (*idct_block_kernel)(stbi_uc *out, int out_stride, short data[64]);\n   void (*YCbCr_to_RGB_kernel)(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step);\n   stbi_uc *(*resample_row_hv_2_kernel)(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs);\n} stbi__jpeg;\n\nstatic int stbi__build_huffman(stbi__huffman *h, int *count)\n{\n   int i,j,k=0,code;\n   // build size list for each symbol (from JPEG spec)\n   for (i=0; i < 16; ++i)\n      for (j=0; j < count[i]; ++j)\n         h->size[k++] = (stbi_uc) (i+1);\n   h->size[k] = 0;\n\n   // compute actual symbols (from jpeg spec)\n   code = 0;\n   k = 0;\n   for(j=1; j <= 16; ++j) {\n      // compute delta to add to code to compute symbol id\n      h->delta[j] = k - code;\n      if (h->size[k] == j) {\n         while (h->size[k] == j)\n            h->code[k++] = (stbi__uint16) (code++);\n         if (code-1 >= (1 << j)) return stbi__err(\"bad code lengths\",\"Corrupt JPEG\");\n      }\n      // compute largest code + 1 for this size, preshifted as needed later\n      h->maxcode[j] = code << (16-j);\n      code <<= 1;\n   }\n   h->maxcode[j] = 0xffffffff;\n\n   // build non-spec acceleration table; 255 is flag for not-accelerated\n   memset(h->fast, 255, 1 << FAST_BITS);\n   for (i=0; i < k; ++i) {\n      int s = h->size[i];\n      if (s <= FAST_BITS) {\n         int c = h->code[i] << (FAST_BITS-s);\n         int m = 1 << (FAST_BITS-s);\n         for (j=0; j < m; ++j) {\n            h->fast[c+j] = (stbi_uc) i;\n         }\n      }\n   }\n   return 1;\n}\n\n// build a table that decodes both magnitude and value of small ACs in\n// one go.\nstatic void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h)\n{\n   int i;\n   for (i=0; i < (1 << FAST_BITS); ++i) {\n      stbi_uc fast = h->fast[i];\n      fast_ac[i] = 0;\n      if (fast < 255) {\n         int rs = h->values[fast];\n         int run = (rs >> 4) & 15;\n         int magbits = rs & 15;\n         int len = h->size[fast];\n\n         if (magbits && len + magbits <= FAST_BITS) {\n            // magnitude code followed by receive_extend code\n            int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits);\n            int m = 1 << (magbits - 1);\n            if (k < m) k += (-1 << magbits) + 1;\n            // if the result is small enough, we can fit it in fast_ac table\n            if (k >= -128 && k <= 127)\n               fast_ac[i] = (stbi__int16) ((k << 8) + (run << 4) + (len + magbits));\n         }\n      }\n   }\n}\n\nstatic void stbi__grow_buffer_unsafe(stbi__jpeg *j)\n{\n   do {\n      int b = j->nomore ? 0 : stbi__get8(j->s);\n      if (b == 0xff) {\n         int c = stbi__get8(j->s);\n         if (c != 0) {\n            j->marker = (unsigned char) c;\n            j->nomore = 1;\n            return;\n         }\n      }\n      j->code_buffer |= b << (24 - j->code_bits);\n      j->code_bits += 8;\n   } while (j->code_bits <= 24);\n}\n\n// (1 << n) - 1\nstatic stbi__uint32 stbi__bmask[17]={0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535};\n\n// decode a jpeg huffman value from the bitstream\nstbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h)\n{\n   unsigned int temp;\n   int c,k;\n\n   if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);\n\n   // look at the top FAST_BITS and determine what symbol ID it is,\n   // if the code is <= FAST_BITS\n   c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1);\n   k = h->fast[c];\n   if (k < 255) {\n      int s = h->size[k];\n      if (s > j->code_bits)\n         return -1;\n      j->code_buffer <<= s;\n      j->code_bits -= s;\n      return h->values[k];\n   }\n\n   // naive test is to shift the code_buffer down so k bits are\n   // valid, then test against maxcode. To speed this up, we've\n   // preshifted maxcode left so that it has (16-k) 0s at the\n   // end; in other words, regardless of the number of bits, it\n   // wants to be compared against something shifted to have 16;\n   // that way we don't need to shift inside the loop.\n   temp = j->code_buffer >> 16;\n   for (k=FAST_BITS+1 ; ; ++k)\n      if (temp < h->maxcode[k])\n         break;\n   if (k == 17) {\n      // error! code not found\n      j->code_bits -= 16;\n      return -1;\n   }\n\n   if (k > j->code_bits)\n      return -1;\n\n   // convert the huffman code to the symbol id\n   c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k];\n   STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]);\n\n   // convert the id to a symbol\n   j->code_bits -= k;\n   j->code_buffer <<= k;\n   return h->values[c];\n}\n\n// bias[n] = (-1<<n) + 1\nstatic int const stbi__jbias[16] = {0,-1,-3,-7,-15,-31,-63,-127,-255,-511,-1023,-2047,-4095,-8191,-16383,-32767};\n\n// combined JPEG 'receive' and JPEG 'extend', since baseline\n// always extends everything it receives.\nstbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n)\n{\n   unsigned int k;\n   int sgn;\n   if (j->code_bits < n) stbi__grow_buffer_unsafe(j);\n\n   sgn = (stbi__int32)j->code_buffer >> 31; // sign bit is always in MSB\n   k = stbi_lrot(j->code_buffer, n);\n   STBI_ASSERT(n >= 0 && n < (int) (sizeof(stbi__bmask)/sizeof(*stbi__bmask)));\n   j->code_buffer = k & ~stbi__bmask[n];\n   k &= stbi__bmask[n];\n   j->code_bits -= n;\n   return k + (stbi__jbias[n] & ~sgn);\n}\n\n// get some unsigned bits\nstbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n)\n{\n   unsigned int k;\n   if (j->code_bits < n) stbi__grow_buffer_unsafe(j);\n   k = stbi_lrot(j->code_buffer, n);\n   j->code_buffer = k & ~stbi__bmask[n];\n   k &= stbi__bmask[n];\n   j->code_bits -= n;\n   return k;\n}\n\nstbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j)\n{\n   unsigned int k;\n   if (j->code_bits < 1) stbi__grow_buffer_unsafe(j);\n   k = j->code_buffer;\n   j->code_buffer <<= 1;\n   --j->code_bits;\n   return k & 0x80000000;\n}\n\n// given a value that's at position X in the zigzag stream,\n// where does it appear in the 8x8 matrix coded as row-major?\nstatic stbi_uc stbi__jpeg_dezigzag[64+15] =\n{\n    0,  1,  8, 16,  9,  2,  3, 10,\n   17, 24, 32, 25, 18, 11,  4,  5,\n   12, 19, 26, 33, 40, 48, 41, 34,\n   27, 20, 13,  6,  7, 14, 21, 28,\n   35, 42, 49, 56, 57, 50, 43, 36,\n   29, 22, 15, 23, 30, 37, 44, 51,\n   58, 59, 52, 45, 38, 31, 39, 46,\n   53, 60, 61, 54, 47, 55, 62, 63,\n   // let corrupt input sample past end\n   63, 63, 63, 63, 63, 63, 63, 63,\n   63, 63, 63, 63, 63, 63, 63\n};\n\n// decode one 64-entry block--\nstatic int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, stbi__int16 *fac, int b, stbi_uc *dequant)\n{\n   int diff,dc,k;\n   int t;\n\n   if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);\n   t = stbi__jpeg_huff_decode(j, hdc);\n   if (t < 0) return stbi__err(\"bad huffman code\",\"Corrupt JPEG\");\n\n   // 0 all the ac values now so we can do it 32-bits at a time\n   memset(data,0,64*sizeof(data[0]));\n\n   diff = t ? stbi__extend_receive(j, t) : 0;\n   dc = j->img_comp[b].dc_pred + diff;\n   j->img_comp[b].dc_pred = dc;\n   data[0] = (short) (dc * dequant[0]);\n\n   // decode AC components, see JPEG spec\n   k = 1;\n   do {\n      unsigned int zig;\n      int c,r,s;\n      if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);\n      c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1);\n      r = fac[c];\n      if (r) { // fast-AC path\n         k += (r >> 4) & 15; // run\n         s = r & 15; // combined length\n         j->code_buffer <<= s;\n         j->code_bits -= s;\n         // decode into unzigzag'd location\n         zig = stbi__jpeg_dezigzag[k++];\n         data[zig] = (short) ((r >> 8) * dequant[zig]);\n      } else {\n         int rs = stbi__jpeg_huff_decode(j, hac);\n         if (rs < 0) return stbi__err(\"bad huffman code\",\"Corrupt JPEG\");\n         s = rs & 15;\n         r = rs >> 4;\n         if (s == 0) {\n            if (rs != 0xf0) break; // end block\n            k += 16;\n         } else {\n            k += r;\n            // decode into unzigzag'd location\n            zig = stbi__jpeg_dezigzag[k++];\n            data[zig] = (short) (stbi__extend_receive(j,s) * dequant[zig]);\n         }\n      }\n   } while (k < 64);\n   return 1;\n}\n\nstatic int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__huffman *hdc, int b)\n{\n   int diff,dc;\n   int t;\n   if (j->spec_end != 0) return stbi__err(\"can't merge dc and ac\", \"Corrupt JPEG\");\n\n   if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);\n\n   if (j->succ_high == 0) {\n      // first scan for DC coefficient, must be first\n      memset(data,0,64*sizeof(data[0])); // 0 all the ac values now\n      t = stbi__jpeg_huff_decode(j, hdc);\n      diff = t ? stbi__extend_receive(j, t) : 0;\n\n      dc = j->img_comp[b].dc_pred + diff;\n      j->img_comp[b].dc_pred = dc;\n      data[0] = (short) (dc << j->succ_low);\n   } else {\n      // refinement scan for DC coefficient\n      if (stbi__jpeg_get_bit(j))\n         data[0] += (short) (1 << j->succ_low);\n   }\n   return 1;\n}\n\n// @OPTIMIZE: store non-zigzagged during the decode passes,\n// and only de-zigzag when dequantizing\nstatic int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64], stbi__huffman *hac, stbi__int16 *fac)\n{\n   int k;\n   if (j->spec_start == 0) return stbi__err(\"can't merge dc and ac\", \"Corrupt JPEG\");\n\n   if (j->succ_high == 0) {\n      int shift = j->succ_low;\n\n      if (j->eob_run) {\n         --j->eob_run;\n         return 1;\n      }\n\n      k = j->spec_start;\n      do {\n         unsigned int zig;\n         int c,r,s;\n         if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);\n         c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1);\n         r = fac[c];\n         if (r) { // fast-AC path\n            k += (r >> 4) & 15; // run\n            s = r & 15; // combined length\n            j->code_buffer <<= s;\n            j->code_bits -= s;\n            zig = stbi__jpeg_dezigzag[k++];\n            data[zig] = (short) ((r >> 8) << shift);\n         } else {\n            int rs = stbi__jpeg_huff_decode(j, hac);\n            if (rs < 0) return stbi__err(\"bad huffman code\",\"Corrupt JPEG\");\n            s = rs & 15;\n            r = rs >> 4;\n            if (s == 0) {\n               if (r < 15) {\n                  j->eob_run = (1 << r);\n                  if (r)\n                     j->eob_run += stbi__jpeg_get_bits(j, r);\n                  --j->eob_run;\n                  break;\n               }\n               k += 16;\n            } else {\n               k += r;\n               zig = stbi__jpeg_dezigzag[k++];\n               data[zig] = (short) (stbi__extend_receive(j,s) << shift);\n            }\n         }\n      } while (k <= j->spec_end);\n   } else {\n      // refinement scan for these AC coefficients\n\n      short bit = (short) (1 << j->succ_low);\n\n      if (j->eob_run) {\n         --j->eob_run;\n         for (k = j->spec_start; k <= j->spec_end; ++k) {\n            short *p = &data[stbi__jpeg_dezigzag[k]];\n            if (*p != 0)\n               if (stbi__jpeg_get_bit(j))\n                  if ((*p & bit)==0) {\n                     if (*p > 0)\n                        *p += bit;\n                     else\n                        *p -= bit;\n                  }\n         }\n      } else {\n         k = j->spec_start;\n         do {\n            int r,s;\n            int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh\n            if (rs < 0) return stbi__err(\"bad huffman code\",\"Corrupt JPEG\");\n            s = rs & 15;\n            r = rs >> 4;\n            if (s == 0) {\n               if (r < 15) {\n                  j->eob_run = (1 << r) - 1;\n                  if (r)\n                     j->eob_run += stbi__jpeg_get_bits(j, r);\n                  r = 64; // force end of block\n               } else {\n                  // r=15 s=0 should write 16 0s, so we just do\n                  // a run of 15 0s and then write s (which is 0),\n                  // so we don't have to do anything special here\n               }\n            } else {\n               if (s != 1) return stbi__err(\"bad huffman code\", \"Corrupt JPEG\");\n               // sign bit\n               if (stbi__jpeg_get_bit(j))\n                  s = bit;\n               else\n                  s = -bit;\n            }\n\n            // advance by r\n            while (k <= j->spec_end) {\n               short *p = &data[stbi__jpeg_dezigzag[k++]];\n               if (*p != 0) {\n                  if (stbi__jpeg_get_bit(j))\n                     if ((*p & bit)==0) {\n                        if (*p > 0)\n                           *p += bit;\n                        else\n                           *p -= bit;\n                     }\n               } else {\n                  if (r == 0) {\n                     *p = (short) s;\n                     break;\n                  }\n                  --r;\n               }\n            }\n         } while (k <= j->spec_end);\n      }\n   }\n   return 1;\n}\n\n// take a -128..127 value and stbi__clamp it and convert to 0..255\nstbi_inline static stbi_uc stbi__clamp(int x)\n{\n   // trick to use a single test to catch both cases\n   if ((unsigned int) x > 255) {\n      if (x < 0) return 0;\n      if (x > 255) return 255;\n   }\n   return (stbi_uc) x;\n}\n\n#define stbi__f2f(x)  ((int) (((x) * 4096 + 0.5)))\n#define stbi__fsh(x)  ((x) << 12)\n\n// derived from jidctint -- DCT_ISLOW\n#define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \\\n   int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \\\n   p2 = s2;                                    \\\n   p3 = s6;                                    \\\n   p1 = (p2+p3) * stbi__f2f(0.5411961f);       \\\n   t2 = p1 + p3*stbi__f2f(-1.847759065f);      \\\n   t3 = p1 + p2*stbi__f2f( 0.765366865f);      \\\n   p2 = s0;                                    \\\n   p3 = s4;                                    \\\n   t0 = stbi__fsh(p2+p3);                      \\\n   t1 = stbi__fsh(p2-p3);                      \\\n   x0 = t0+t3;                                 \\\n   x3 = t0-t3;                                 \\\n   x1 = t1+t2;                                 \\\n   x2 = t1-t2;                                 \\\n   t0 = s7;                                    \\\n   t1 = s5;                                    \\\n   t2 = s3;                                    \\\n   t3 = s1;                                    \\\n   p3 = t0+t2;                                 \\\n   p4 = t1+t3;                                 \\\n   p1 = t0+t3;                                 \\\n   p2 = t1+t2;                                 \\\n   p5 = (p3+p4)*stbi__f2f( 1.175875602f);      \\\n   t0 = t0*stbi__f2f( 0.298631336f);           \\\n   t1 = t1*stbi__f2f( 2.053119869f);           \\\n   t2 = t2*stbi__f2f( 3.072711026f);           \\\n   t3 = t3*stbi__f2f( 1.501321110f);           \\\n   p1 = p5 + p1*stbi__f2f(-0.899976223f);      \\\n   p2 = p5 + p2*stbi__f2f(-2.562915447f);      \\\n   p3 = p3*stbi__f2f(-1.961570560f);           \\\n   p4 = p4*stbi__f2f(-0.390180644f);           \\\n   t3 += p1+p4;                                \\\n   t2 += p2+p3;                                \\\n   t1 += p2+p4;                                \\\n   t0 += p1+p3;\n\nstatic void stbi__idct_block(stbi_uc *out, int out_stride, short data[64])\n{\n   int i,val[64],*v=val;\n   stbi_uc *o;\n   short *d = data;\n\n   // columns\n   for (i=0; i < 8; ++i,++d, ++v) {\n      // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing\n      if (d[ 8]==0 && d[16]==0 && d[24]==0 && d[32]==0\n           && d[40]==0 && d[48]==0 && d[56]==0) {\n         //    no shortcut                 0     seconds\n         //    (1|2|3|4|5|6|7)==0          0     seconds\n         //    all separate               -0.047 seconds\n         //    1 && 2|3 && 4|5 && 6|7:    -0.047 seconds\n         int dcterm = d[0] << 2;\n         v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm;\n      } else {\n         STBI__IDCT_1D(d[ 0],d[ 8],d[16],d[24],d[32],d[40],d[48],d[56])\n         // constants scaled things up by 1<<12; let's bring them back\n         // down, but keep 2 extra bits of precision\n         x0 += 512; x1 += 512; x2 += 512; x3 += 512;\n         v[ 0] = (x0+t3) >> 10;\n         v[56] = (x0-t3) >> 10;\n         v[ 8] = (x1+t2) >> 10;\n         v[48] = (x1-t2) >> 10;\n         v[16] = (x2+t1) >> 10;\n         v[40] = (x2-t1) >> 10;\n         v[24] = (x3+t0) >> 10;\n         v[32] = (x3-t0) >> 10;\n      }\n   }\n\n   for (i=0, v=val, o=out; i < 8; ++i,v+=8,o+=out_stride) {\n      // no fast case since the first 1D IDCT spread components out\n      STBI__IDCT_1D(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7])\n      // constants scaled things up by 1<<12, plus we had 1<<2 from first\n      // loop, plus horizontal and vertical each scale by sqrt(8) so together\n      // we've got an extra 1<<3, so 1<<17 total we need to remove.\n      // so we want to round that, which means adding 0.5 * 1<<17,\n      // aka 65536. Also, we'll end up with -128 to 127 that we want\n      // to encode as 0..255 by adding 128, so we'll add that before the shift\n      x0 += 65536 + (128<<17);\n      x1 += 65536 + (128<<17);\n      x2 += 65536 + (128<<17);\n      x3 += 65536 + (128<<17);\n      // tried computing the shifts into temps, or'ing the temps to see\n      // if any were out of range, but that was slower\n      o[0] = stbi__clamp((x0+t3) >> 17);\n      o[7] = stbi__clamp((x0-t3) >> 17);\n      o[1] = stbi__clamp((x1+t2) >> 17);\n      o[6] = stbi__clamp((x1-t2) >> 17);\n      o[2] = stbi__clamp((x2+t1) >> 17);\n      o[5] = stbi__clamp((x2-t1) >> 17);\n      o[3] = stbi__clamp((x3+t0) >> 17);\n      o[4] = stbi__clamp((x3-t0) >> 17);\n   }\n}\n\n#ifdef STBI_SSE2\n// sse2 integer IDCT. not the fastest possible implementation but it\n// produces bit-identical results to the generic C version so it's\n// fully \"transparent\".\nstatic void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])\n{\n   // This is constructed to match our regular (generic) integer IDCT exactly.\n   __m128i row0, row1, row2, row3, row4, row5, row6, row7;\n   __m128i tmp;\n\n   // dot product constant: even elems=x, odd elems=y\n   #define dct_const(x,y)  _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))\n\n   // out(0) = c0[even]*x + c0[odd]*y   (c0, x, y 16-bit, out 32-bit)\n   // out(1) = c1[even]*x + c1[odd]*y\n   #define dct_rot(out0,out1, x,y,c0,c1) \\\n      __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \\\n      __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \\\n      __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \\\n      __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \\\n      __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \\\n      __m128i out1##_h = _mm_madd_epi16(c0##hi, c1)\n\n   // out = in << 12  (in 16-bit, out 32-bit)\n   #define dct_widen(out, in) \\\n      __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \\\n      __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4)\n\n   // wide add\n   #define dct_wadd(out, a, b) \\\n      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \\\n      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)\n\n   // wide sub\n   #define dct_wsub(out, a, b) \\\n      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \\\n      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)\n\n   // butterfly a/b, add bias, then shift by \"s\" and pack\n   #define dct_bfly32o(out0, out1, a,b,bias,s) \\\n      { \\\n         __m128i abiased_l = _mm_add_epi32(a##_l, bias); \\\n         __m128i abiased_h = _mm_add_epi32(a##_h, bias); \\\n         dct_wadd(sum, abiased, b); \\\n         dct_wsub(dif, abiased, b); \\\n         out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \\\n         out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \\\n      }\n\n   // 8-bit interleave step (for transposes)\n   #define dct_interleave8(a, b) \\\n      tmp = a; \\\n      a = _mm_unpacklo_epi8(a, b); \\\n      b = _mm_unpackhi_epi8(tmp, b)\n\n   // 16-bit interleave step (for transposes)\n   #define dct_interleave16(a, b) \\\n      tmp = a; \\\n      a = _mm_unpacklo_epi16(a, b); \\\n      b = _mm_unpackhi_epi16(tmp, b)\n\n   #define dct_pass(bias,shift) \\\n      { \\\n         /* even part */ \\\n         dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \\\n         __m128i sum04 = _mm_add_epi16(row0, row4); \\\n         __m128i dif04 = _mm_sub_epi16(row0, row4); \\\n         dct_widen(t0e, sum04); \\\n         dct_widen(t1e, dif04); \\\n         dct_wadd(x0, t0e, t3e); \\\n         dct_wsub(x3, t0e, t3e); \\\n         dct_wadd(x1, t1e, t2e); \\\n         dct_wsub(x2, t1e, t2e); \\\n         /* odd part */ \\\n         dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \\\n         dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \\\n         __m128i sum17 = _mm_add_epi16(row1, row7); \\\n         __m128i sum35 = _mm_add_epi16(row3, row5); \\\n         dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \\\n         dct_wadd(x4, y0o, y4o); \\\n         dct_wadd(x5, y1o, y5o); \\\n         dct_wadd(x6, y2o, y5o); \\\n         dct_wadd(x7, y3o, y4o); \\\n         dct_bfly32o(row0,row7, x0,x7,bias,shift); \\\n         dct_bfly32o(row1,row6, x1,x6,bias,shift); \\\n         dct_bfly32o(row2,row5, x2,x5,bias,shift); \\\n         dct_bfly32o(row3,row4, x3,x4,bias,shift); \\\n      }\n\n   __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f));\n   __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f( 0.765366865f), stbi__f2f(0.5411961f));\n   __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f));\n   __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f));\n   __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f( 0.298631336f), stbi__f2f(-1.961570560f));\n   __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f( 3.072711026f));\n   __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f( 2.053119869f), stbi__f2f(-0.390180644f));\n   __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f( 1.501321110f));\n\n   // rounding biases in column/row passes, see stbi__idct_block for explanation.\n   __m128i bias_0 = _mm_set1_epi32(512);\n   __m128i bias_1 = _mm_set1_epi32(65536 + (128<<17));\n\n   // load\n   row0 = _mm_load_si128((const __m128i *) (data + 0*8));\n   row1 = _mm_load_si128((const __m128i *) (data + 1*8));\n   row2 = _mm_load_si128((const __m128i *) (data + 2*8));\n   row3 = _mm_load_si128((const __m128i *) (data + 3*8));\n   row4 = _mm_load_si128((const __m128i *) (data + 4*8));\n   row5 = _mm_load_si128((const __m128i *) (data + 5*8));\n   row6 = _mm_load_si128((const __m128i *) (data + 6*8));\n   row7 = _mm_load_si128((const __m128i *) (data + 7*8));\n\n   // column pass\n   dct_pass(bias_0, 10);\n\n   {\n      // 16bit 8x8 transpose pass 1\n      dct_interleave16(row0, row4);\n      dct_interleave16(row1, row5);\n      dct_interleave16(row2, row6);\n      dct_interleave16(row3, row7);\n\n      // transpose pass 2\n      dct_interleave16(row0, row2);\n      dct_interleave16(row1, row3);\n      dct_interleave16(row4, row6);\n      dct_interleave16(row5, row7);\n\n      // transpose pass 3\n      dct_interleave16(row0, row1);\n      dct_interleave16(row2, row3);\n      dct_interleave16(row4, row5);\n      dct_interleave16(row6, row7);\n   }\n\n   // row pass\n   dct_pass(bias_1, 17);\n\n   {\n      // pack\n      __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7\n      __m128i p1 = _mm_packus_epi16(row2, row3);\n      __m128i p2 = _mm_packus_epi16(row4, row5);\n      __m128i p3 = _mm_packus_epi16(row6, row7);\n\n      // 8bit 8x8 transpose pass 1\n      dct_interleave8(p0, p2); // a0e0a1e1...\n      dct_interleave8(p1, p3); // c0g0c1g1...\n\n      // transpose pass 2\n      dct_interleave8(p0, p1); // a0c0e0g0...\n      dct_interleave8(p2, p3); // b0d0f0h0...\n\n      // transpose pass 3\n      dct_interleave8(p0, p2); // a0b0c0d0...\n      dct_interleave8(p1, p3); // a4b4c4d4...\n\n      // store\n      _mm_storel_epi64((__m128i *) out, p0); out += out_stride;\n      _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride;\n      _mm_storel_epi64((__m128i *) out, p2); out += out_stride;\n      _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride;\n      _mm_storel_epi64((__m128i *) out, p1); out += out_stride;\n      _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride;\n      _mm_storel_epi64((__m128i *) out, p3); out += out_stride;\n      _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p3, 0x4e));\n   }\n\n#undef dct_const\n#undef dct_rot\n#undef dct_widen\n#undef dct_wadd\n#undef dct_wsub\n#undef dct_bfly32o\n#undef dct_interleave8\n#undef dct_interleave16\n#undef dct_pass\n}\n\n#endif // STBI_SSE2\n\n#ifdef STBI_NEON\n\n// NEON integer IDCT. should produce bit-identical\n// results to the generic C version.\nstatic void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])\n{\n   int16x8_t row0, row1, row2, row3, row4, row5, row6, row7;\n\n   int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f));\n   int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f));\n   int16x4_t rot0_2 = vdup_n_s16(stbi__f2f( 0.765366865f));\n   int16x4_t rot1_0 = vdup_n_s16(stbi__f2f( 1.175875602f));\n   int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f));\n   int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f));\n   int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f));\n   int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f));\n   int16x4_t rot3_0 = vdup_n_s16(stbi__f2f( 0.298631336f));\n   int16x4_t rot3_1 = vdup_n_s16(stbi__f2f( 2.053119869f));\n   int16x4_t rot3_2 = vdup_n_s16(stbi__f2f( 3.072711026f));\n   int16x4_t rot3_3 = vdup_n_s16(stbi__f2f( 1.501321110f));\n\n#define dct_long_mul(out, inq, coeff) \\\n   int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \\\n   int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff)\n\n#define dct_long_mac(out, acc, inq, coeff) \\\n   int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \\\n   int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff)\n\n#define dct_widen(out, inq) \\\n   int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \\\n   int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12)\n\n// wide add\n#define dct_wadd(out, a, b) \\\n   int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \\\n   int32x4_t out##_h = vaddq_s32(a##_h, b##_h)\n\n// wide sub\n#define dct_wsub(out, a, b) \\\n   int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \\\n   int32x4_t out##_h = vsubq_s32(a##_h, b##_h)\n\n// butterfly a/b, then shift using \"shiftop\" by \"s\" and pack\n#define dct_bfly32o(out0,out1, a,b,shiftop,s) \\\n   { \\\n      dct_wadd(sum, a, b); \\\n      dct_wsub(dif, a, b); \\\n      out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \\\n      out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \\\n   }\n\n#define dct_pass(shiftop, shift) \\\n   { \\\n      /* even part */ \\\n      int16x8_t sum26 = vaddq_s16(row2, row6); \\\n      dct_long_mul(p1e, sum26, rot0_0); \\\n      dct_long_mac(t2e, p1e, row6, rot0_1); \\\n      dct_long_mac(t3e, p1e, row2, rot0_2); \\\n      int16x8_t sum04 = vaddq_s16(row0, row4); \\\n      int16x8_t dif04 = vsubq_s16(row0, row4); \\\n      dct_widen(t0e, sum04); \\\n      dct_widen(t1e, dif04); \\\n      dct_wadd(x0, t0e, t3e); \\\n      dct_wsub(x3, t0e, t3e); \\\n      dct_wadd(x1, t1e, t2e); \\\n      dct_wsub(x2, t1e, t2e); \\\n      /* odd part */ \\\n      int16x8_t sum15 = vaddq_s16(row1, row5); \\\n      int16x8_t sum17 = vaddq_s16(row1, row7); \\\n      int16x8_t sum35 = vaddq_s16(row3, row5); \\\n      int16x8_t sum37 = vaddq_s16(row3, row7); \\\n      int16x8_t sumodd = vaddq_s16(sum17, sum35); \\\n      dct_long_mul(p5o, sumodd, rot1_0); \\\n      dct_long_mac(p1o, p5o, sum17, rot1_1); \\\n      dct_long_mac(p2o, p5o, sum35, rot1_2); \\\n      dct_long_mul(p3o, sum37, rot2_0); \\\n      dct_long_mul(p4o, sum15, rot2_1); \\\n      dct_wadd(sump13o, p1o, p3o); \\\n      dct_wadd(sump24o, p2o, p4o); \\\n      dct_wadd(sump23o, p2o, p3o); \\\n      dct_wadd(sump14o, p1o, p4o); \\\n      dct_long_mac(x4, sump13o, row7, rot3_0); \\\n      dct_long_mac(x5, sump24o, row5, rot3_1); \\\n      dct_long_mac(x6, sump23o, row3, rot3_2); \\\n      dct_long_mac(x7, sump14o, row1, rot3_3); \\\n      dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \\\n      dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \\\n      dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \\\n      dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \\\n   }\n\n   // load\n   row0 = vld1q_s16(data + 0*8);\n   row1 = vld1q_s16(data + 1*8);\n   row2 = vld1q_s16(data + 2*8);\n   row3 = vld1q_s16(data + 3*8);\n   row4 = vld1q_s16(data + 4*8);\n   row5 = vld1q_s16(data + 5*8);\n   row6 = vld1q_s16(data + 6*8);\n   row7 = vld1q_s16(data + 7*8);\n\n   // add DC bias\n   row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0));\n\n   // column pass\n   dct_pass(vrshrn_n_s32, 10);\n\n   // 16bit 8x8 transpose\n   {\n// these three map to a single VTRN.16, VTRN.32, and VSWP, respectively.\n// whether compilers actually get this is another story, sadly.\n#define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; }\n#define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); }\n#define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); }\n\n      // pass 1\n      dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6\n      dct_trn16(row2, row3);\n      dct_trn16(row4, row5);\n      dct_trn16(row6, row7);\n\n      // pass 2\n      dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4\n      dct_trn32(row1, row3);\n      dct_trn32(row4, row6);\n      dct_trn32(row5, row7);\n\n      // pass 3\n      dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0\n      dct_trn64(row1, row5);\n      dct_trn64(row2, row6);\n      dct_trn64(row3, row7);\n\n#undef dct_trn16\n#undef dct_trn32\n#undef dct_trn64\n   }\n\n   // row pass\n   // vrshrn_n_s32 only supports shifts up to 16, we need\n   // 17. so do a non-rounding shift of 16 first then follow\n   // up with a rounding shift by 1.\n   dct_pass(vshrn_n_s32, 16);\n\n   {\n      // pack and round\n      uint8x8_t p0 = vqrshrun_n_s16(row0, 1);\n      uint8x8_t p1 = vqrshrun_n_s16(row1, 1);\n      uint8x8_t p2 = vqrshrun_n_s16(row2, 1);\n      uint8x8_t p3 = vqrshrun_n_s16(row3, 1);\n      uint8x8_t p4 = vqrshrun_n_s16(row4, 1);\n      uint8x8_t p5 = vqrshrun_n_s16(row5, 1);\n      uint8x8_t p6 = vqrshrun_n_s16(row6, 1);\n      uint8x8_t p7 = vqrshrun_n_s16(row7, 1);\n\n      // again, these can translate into one instruction, but often don't.\n#define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; }\n#define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); }\n#define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); }\n\n      // sadly can't use interleaved stores here since we only write\n      // 8 bytes to each scan line!\n\n      // 8x8 8-bit transpose pass 1\n      dct_trn8_8(p0, p1);\n      dct_trn8_8(p2, p3);\n      dct_trn8_8(p4, p5);\n      dct_trn8_8(p6, p7);\n\n      // pass 2\n      dct_trn8_16(p0, p2);\n      dct_trn8_16(p1, p3);\n      dct_trn8_16(p4, p6);\n      dct_trn8_16(p5, p7);\n\n      // pass 3\n      dct_trn8_32(p0, p4);\n      dct_trn8_32(p1, p5);\n      dct_trn8_32(p2, p6);\n      dct_trn8_32(p3, p7);\n\n      // store\n      vst1_u8(out, p0); out += out_stride;\n      vst1_u8(out, p1); out += out_stride;\n      vst1_u8(out, p2); out += out_stride;\n      vst1_u8(out, p3); out += out_stride;\n      vst1_u8(out, p4); out += out_stride;\n      vst1_u8(out, p5); out += out_stride;\n      vst1_u8(out, p6); out += out_stride;\n      vst1_u8(out, p7);\n\n#undef dct_trn8_8\n#undef dct_trn8_16\n#undef dct_trn8_32\n   }\n\n#undef dct_long_mul\n#undef dct_long_mac\n#undef dct_widen\n#undef dct_wadd\n#undef dct_wsub\n#undef dct_bfly32o\n#undef dct_pass\n}\n\n#endif // STBI_NEON\n\n#define STBI__MARKER_none  0xff\n// if there's a pending marker from the entropy stream, return that\n// otherwise, fetch from the stream and get a marker. if there's no\n// marker, return 0xff, which is never a valid marker value\nstatic stbi_uc stbi__get_marker(stbi__jpeg *j)\n{\n   stbi_uc x;\n   if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; }\n   x = stbi__get8(j->s);\n   if (x != 0xff) return STBI__MARKER_none;\n   while (x == 0xff)\n      x = stbi__get8(j->s);\n   return x;\n}\n\n// in each scan, we'll have scan_n components, and the order\n// of the components is specified by order[]\n#define STBI__RESTART(x)     ((x) >= 0xd0 && (x) <= 0xd7)\n\n// after a restart interval, stbi__jpeg_reset the entropy decoder and\n// the dc prediction\nstatic void stbi__jpeg_reset(stbi__jpeg *j)\n{\n   j->code_bits = 0;\n   j->code_buffer = 0;\n   j->nomore = 0;\n   j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = 0;\n   j->marker = STBI__MARKER_none;\n   j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;\n   j->eob_run = 0;\n   // no more than 1<<31 MCUs if no restart_interal? that's plenty safe,\n   // since we don't even allow 1<<30 pixels\n}\n\nstatic int stbi__parse_entropy_coded_data(stbi__jpeg *z)\n{\n   stbi__jpeg_reset(z);\n   if (!z->progressive) {\n      if (z->scan_n == 1) {\n         int i,j;\n         STBI_SIMD_ALIGN(short, data[64]);\n         int n = z->order[0];\n         // non-interleaved data, we just need to process one block at a time,\n         // in trivial scanline order\n         // number of blocks to do just depends on how many actual \"pixels\" this\n         // component has, independent of interleaved MCU blocking and such\n         int w = (z->img_comp[n].x+7) >> 3;\n         int h = (z->img_comp[n].y+7) >> 3;\n         for (j=0; j < h; ++j) {\n            for (i=0; i < w; ++i) {\n               int ha = z->img_comp[n].ha;\n               if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0;\n               z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data);\n               // every data block is an MCU, so countdown the restart interval\n               if (--z->todo <= 0) {\n                  if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);\n                  // if it's NOT a restart, then just bail, so we get corrupt data\n                  // rather than no data\n                  if (!STBI__RESTART(z->marker)) return 1;\n                  stbi__jpeg_reset(z);\n               }\n            }\n         }\n         return 1;\n      } else { // interleaved\n         int i,j,k,x,y;\n         STBI_SIMD_ALIGN(short, data[64]);\n         for (j=0; j < z->img_mcu_y; ++j) {\n            for (i=0; i < z->img_mcu_x; ++i) {\n               // scan an interleaved mcu... process scan_n components in order\n               for (k=0; k < z->scan_n; ++k) {\n                  int n = z->order[k];\n                  // scan out an mcu's worth of this component; that's just determined\n                  // by the basic H and V specified for the component\n                  for (y=0; y < z->img_comp[n].v; ++y) {\n                     for (x=0; x < z->img_comp[n].h; ++x) {\n                        int x2 = (i*z->img_comp[n].h + x)*8;\n                        int y2 = (j*z->img_comp[n].v + y)*8;\n                        int ha = z->img_comp[n].ha;\n                        if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0;\n                        z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data);\n                     }\n                  }\n               }\n               // after all interleaved components, that's an interleaved MCU,\n               // so now count down the restart interval\n               if (--z->todo <= 0) {\n                  if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);\n                  if (!STBI__RESTART(z->marker)) return 1;\n                  stbi__jpeg_reset(z);\n               }\n            }\n         }\n         return 1;\n      }\n   } else {\n      if (z->scan_n == 1) {\n         int i,j;\n         int n = z->order[0];\n         // non-interleaved data, we just need to process one block at a time,\n         // in trivial scanline order\n         // number of blocks to do just depends on how many actual \"pixels\" this\n         // component has, independent of interleaved MCU blocking and such\n         int w = (z->img_comp[n].x+7) >> 3;\n         int h = (z->img_comp[n].y+7) >> 3;\n         for (j=0; j < h; ++j) {\n            for (i=0; i < w; ++i) {\n               short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w);\n               if (z->spec_start == 0) {\n                  if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n))\n                     return 0;\n               } else {\n                  int ha = z->img_comp[n].ha;\n                  if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha]))\n                     return 0;\n               }\n               // every data block is an MCU, so countdown the restart interval\n               if (--z->todo <= 0) {\n                  if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);\n                  if (!STBI__RESTART(z->marker)) return 1;\n                  stbi__jpeg_reset(z);\n               }\n            }\n         }\n         return 1;\n      } else { // interleaved\n         int i,j,k,x,y;\n         for (j=0; j < z->img_mcu_y; ++j) {\n            for (i=0; i < z->img_mcu_x; ++i) {\n               // scan an interleaved mcu... process scan_n components in order\n               for (k=0; k < z->scan_n; ++k) {\n                  int n = z->order[k];\n                  // scan out an mcu's worth of this component; that's just determined\n                  // by the basic H and V specified for the component\n                  for (y=0; y < z->img_comp[n].v; ++y) {\n                     for (x=0; x < z->img_comp[n].h; ++x) {\n                        int x2 = (i*z->img_comp[n].h + x);\n                        int y2 = (j*z->img_comp[n].v + y);\n                        short *data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w);\n                        if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n))\n                           return 0;\n                     }\n                  }\n               }\n               // after all interleaved components, that's an interleaved MCU,\n               // so now count down the restart interval\n               if (--z->todo <= 0) {\n                  if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);\n                  if (!STBI__RESTART(z->marker)) return 1;\n                  stbi__jpeg_reset(z);\n               }\n            }\n         }\n         return 1;\n      }\n   }\n}\n\nstatic void stbi__jpeg_dequantize(short *data, stbi_uc *dequant)\n{\n   int i;\n   for (i=0; i < 64; ++i)\n      data[i] *= dequant[i];\n}\n\nstatic void stbi__jpeg_finish(stbi__jpeg *z)\n{\n   if (z->progressive) {\n      // dequantize and idct the data\n      int i,j,n;\n      for (n=0; n < z->s->img_n; ++n) {\n         int w = (z->img_comp[n].x+7) >> 3;\n         int h = (z->img_comp[n].y+7) >> 3;\n         for (j=0; j < h; ++j) {\n            for (i=0; i < w; ++i) {\n               short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w);\n               stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]);\n               z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data);\n            }\n         }\n      }\n   }\n}\n\nstatic int stbi__process_marker(stbi__jpeg *z, int m)\n{\n   int L;\n   switch (m) {\n      case STBI__MARKER_none: // no marker found\n         return stbi__err(\"expected marker\",\"Corrupt JPEG\");\n\n      case 0xDD: // DRI - specify restart interval\n         if (stbi__get16be(z->s) != 4) return stbi__err(\"bad DRI len\",\"Corrupt JPEG\");\n         z->restart_interval = stbi__get16be(z->s);\n         return 1;\n\n      case 0xDB: // DQT - define quantization table\n         L = stbi__get16be(z->s)-2;\n         while (L > 0) {\n            int q = stbi__get8(z->s);\n            int p = q >> 4;\n            int t = q & 15,i;\n            if (p != 0) return stbi__err(\"bad DQT type\",\"Corrupt JPEG\");\n            if (t > 3) return stbi__err(\"bad DQT table\",\"Corrupt JPEG\");\n            for (i=0; i < 64; ++i)\n               z->dequant[t][stbi__jpeg_dezigzag[i]] = stbi__get8(z->s);\n            L -= 65;\n         }\n         return L==0;\n\n      case 0xC4: // DHT - define huffman table\n         L = stbi__get16be(z->s)-2;\n         while (L > 0) {\n            stbi_uc *v;\n            int sizes[16],i,n=0;\n            int q = stbi__get8(z->s);\n            int tc = q >> 4;\n            int th = q & 15;\n            if (tc > 1 || th > 3) return stbi__err(\"bad DHT header\",\"Corrupt JPEG\");\n            for (i=0; i < 16; ++i) {\n               sizes[i] = stbi__get8(z->s);\n               n += sizes[i];\n            }\n            L -= 17;\n            if (tc == 0) {\n               if (!stbi__build_huffman(z->huff_dc+th, sizes)) return 0;\n               v = z->huff_dc[th].values;\n            } else {\n               if (!stbi__build_huffman(z->huff_ac+th, sizes)) return 0;\n               v = z->huff_ac[th].values;\n            }\n            for (i=0; i < n; ++i)\n               v[i] = stbi__get8(z->s);\n            if (tc != 0)\n               stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th);\n            L -= n;\n         }\n         return L==0;\n   }\n   // check for comment block or APP blocks\n   if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) {\n      stbi__skip(z->s, stbi__get16be(z->s)-2);\n      return 1;\n   }\n   return 0;\n}\n\n// after we see SOS\nstatic int stbi__process_scan_header(stbi__jpeg *z)\n{\n   int i;\n   int Ls = stbi__get16be(z->s);\n   z->scan_n = stbi__get8(z->s);\n   if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return stbi__err(\"bad SOS component count\",\"Corrupt JPEG\");\n   if (Ls != 6+2*z->scan_n) return stbi__err(\"bad SOS len\",\"Corrupt JPEG\");\n   for (i=0; i < z->scan_n; ++i) {\n      int id = stbi__get8(z->s), which;\n      int q = stbi__get8(z->s);\n      for (which = 0; which < z->s->img_n; ++which)\n         if (z->img_comp[which].id == id)\n            break;\n      if (which == z->s->img_n) return 0; // no match\n      z->img_comp[which].hd = q >> 4;   if (z->img_comp[which].hd > 3) return stbi__err(\"bad DC huff\",\"Corrupt JPEG\");\n      z->img_comp[which].ha = q & 15;   if (z->img_comp[which].ha > 3) return stbi__err(\"bad AC huff\",\"Corrupt JPEG\");\n      z->order[i] = which;\n   }\n\n   {\n      int aa;\n      z->spec_start = stbi__get8(z->s);\n      z->spec_end   = stbi__get8(z->s); // should be 63, but might be 0\n      aa = stbi__get8(z->s);\n      z->succ_high = (aa >> 4);\n      z->succ_low  = (aa & 15);\n      if (z->progressive) {\n         if (z->spec_start > 63 || z->spec_end > 63  || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13)\n            return stbi__err(\"bad SOS\", \"Corrupt JPEG\");\n      } else {\n         if (z->spec_start != 0) return stbi__err(\"bad SOS\",\"Corrupt JPEG\");\n         if (z->succ_high != 0 || z->succ_low != 0) return stbi__err(\"bad SOS\",\"Corrupt JPEG\");\n         z->spec_end = 63;\n      }\n   }\n\n   return 1;\n}\n\nstatic int stbi__process_frame_header(stbi__jpeg *z, int scan)\n{\n   stbi__context *s = z->s;\n   int Lf,p,i,q, h_max=1,v_max=1,c;\n   Lf = stbi__get16be(s);         if (Lf < 11) return stbi__err(\"bad SOF len\",\"Corrupt JPEG\"); // JPEG\n   p  = stbi__get8(s);            if (p != 8) return stbi__err(\"only 8-bit\",\"JPEG format not supported: 8-bit only\"); // JPEG baseline\n   s->img_y = stbi__get16be(s);   if (s->img_y == 0) return stbi__err(\"no header height\", \"JPEG format not supported: delayed height\"); // Legal, but we don't handle it--but neither does IJG\n   s->img_x = stbi__get16be(s);   if (s->img_x == 0) return stbi__err(\"0 width\",\"Corrupt JPEG\"); // JPEG requires\n   c = stbi__get8(s);\n   if (c != 3 && c != 1) return stbi__err(\"bad component count\",\"Corrupt JPEG\");    // JFIF requires\n   s->img_n = c;\n   for (i=0; i < c; ++i) {\n      z->img_comp[i].data = NULL;\n      z->img_comp[i].linebuf = NULL;\n   }\n\n   if (Lf != 8+3*s->img_n) return stbi__err(\"bad SOF len\",\"Corrupt JPEG\");\n\n   for (i=0; i < s->img_n; ++i) {\n      z->img_comp[i].id = stbi__get8(s);\n      if (z->img_comp[i].id != i+1)   // JFIF requires\n         if (z->img_comp[i].id != i)  // some version of jpegtran outputs non-JFIF-compliant files!\n            return stbi__err(\"bad component ID\",\"Corrupt JPEG\");\n      q = stbi__get8(s);\n      z->img_comp[i].h = (q >> 4);  if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err(\"bad H\",\"Corrupt JPEG\");\n      z->img_comp[i].v = q & 15;    if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err(\"bad V\",\"Corrupt JPEG\");\n      z->img_comp[i].tq = stbi__get8(s);  if (z->img_comp[i].tq > 3) return stbi__err(\"bad TQ\",\"Corrupt JPEG\");\n   }\n\n   if (scan != STBI__SCAN_load) return 1;\n\n   if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err(\"too large\", \"Image too large to decode\");\n\n   for (i=0; i < s->img_n; ++i) {\n      if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h;\n      if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v;\n   }\n\n   // compute interleaved mcu info\n   z->img_h_max = h_max;\n   z->img_v_max = v_max;\n   z->img_mcu_w = h_max * 8;\n   z->img_mcu_h = v_max * 8;\n   z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w;\n   z->img_mcu_y = (s->img_y + z->img_mcu_h-1) / z->img_mcu_h;\n\n   for (i=0; i < s->img_n; ++i) {\n      // number of effective pixels (e.g. for non-interleaved MCU)\n      z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max;\n      z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max-1) / v_max;\n      // to simplify generation, we'll allocate enough memory to decode\n      // the bogus oversized data from using interleaved MCUs and their\n      // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't\n      // discard the extra data until colorspace conversion\n      z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8;\n      z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8;\n      z->img_comp[i].raw_data = stbi__malloc(z->img_comp[i].w2 * z->img_comp[i].h2+15);\n\n      if (z->img_comp[i].raw_data == NULL) {\n         for(--i; i >= 0; --i) {\n            STBI_FREE(z->img_comp[i].raw_data);\n            z->img_comp[i].raw_data = NULL;\n         }\n         return stbi__err(\"outofmem\", \"Out of memory\");\n      }\n      // align blocks for idct using mmx/sse\n      z->img_comp[i].data = (stbi_uc*) (((size_t) z->img_comp[i].raw_data + 15) & ~15);\n      z->img_comp[i].linebuf = NULL;\n      if (z->progressive) {\n         z->img_comp[i].coeff_w = (z->img_comp[i].w2 + 7) >> 3;\n         z->img_comp[i].coeff_h = (z->img_comp[i].h2 + 7) >> 3;\n         z->img_comp[i].raw_coeff = STBI_MALLOC(z->img_comp[i].coeff_w * z->img_comp[i].coeff_h * 64 * sizeof(short) + 15);\n         z->img_comp[i].coeff = (short*) (((size_t) z->img_comp[i].raw_coeff + 15) & ~15);\n      } else {\n         z->img_comp[i].coeff = 0;\n         z->img_comp[i].raw_coeff = 0;\n      }\n   }\n\n   return 1;\n}\n\n// use comparisons since in some cases we handle more than one case (e.g. SOF)\n#define stbi__DNL(x)         ((x) == 0xdc)\n#define stbi__SOI(x)         ((x) == 0xd8)\n#define stbi__EOI(x)         ((x) == 0xd9)\n#define stbi__SOF(x)         ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2)\n#define stbi__SOS(x)         ((x) == 0xda)\n\n#define stbi__SOF_progressive(x)   ((x) == 0xc2)\n\nstatic int stbi__decode_jpeg_header(stbi__jpeg *z, int scan)\n{\n   int m;\n   z->marker = STBI__MARKER_none; // initialize cached marker to empty\n   m = stbi__get_marker(z);\n   if (!stbi__SOI(m)) return stbi__err(\"no SOI\",\"Corrupt JPEG\");\n   if (scan == STBI__SCAN_type) return 1;\n   m = stbi__get_marker(z);\n   while (!stbi__SOF(m)) {\n      if (!stbi__process_marker(z,m)) return 0;\n      m = stbi__get_marker(z);\n      while (m == STBI__MARKER_none) {\n         // some files have extra padding after their blocks, so ok, we'll scan\n         if (stbi__at_eof(z->s)) return stbi__err(\"no SOF\", \"Corrupt JPEG\");\n         m = stbi__get_marker(z);\n      }\n   }\n   z->progressive = stbi__SOF_progressive(m);\n   if (!stbi__process_frame_header(z, scan)) return 0;\n   return 1;\n}\n\n// decode image to YCbCr format\nstatic int stbi__decode_jpeg_image(stbi__jpeg *j)\n{\n   int m;\n   for (m = 0; m < 4; m++) {\n      j->img_comp[m].raw_data = NULL;\n      j->img_comp[m].raw_coeff = NULL;\n   }\n   j->restart_interval = 0;\n   if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0;\n   m = stbi__get_marker(j);\n   while (!stbi__EOI(m)) {\n      if (stbi__SOS(m)) {\n         if (!stbi__process_scan_header(j)) return 0;\n         if (!stbi__parse_entropy_coded_data(j)) return 0;\n         if (j->marker == STBI__MARKER_none ) {\n            // handle 0s at the end of image data from IP Kamera 9060\n            while (!stbi__at_eof(j->s)) {\n               int x = stbi__get8(j->s);\n               if (x == 255) {\n                  j->marker = stbi__get8(j->s);\n                  break;\n               } else if (x != 0) {\n                  return stbi__err(\"junk before marker\", \"Corrupt JPEG\");\n               }\n            }\n            // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0\n         }\n      } else {\n         if (!stbi__process_marker(j, m)) return 0;\n      }\n      m = stbi__get_marker(j);\n   }\n   if (j->progressive)\n      stbi__jpeg_finish(j);\n   return 1;\n}\n\n// static jfif-centered resampling (across block boundaries)\n\ntypedef stbi_uc *(*resample_row_func)(stbi_uc *out, stbi_uc *in0, stbi_uc *in1,\n                                    int w, int hs);\n\n#define stbi__div4(x) ((stbi_uc) ((x) >> 2))\n\nstatic stbi_uc *resample_row_1(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)\n{\n   STBI_NOTUSED(out);\n   STBI_NOTUSED(in_far);\n   STBI_NOTUSED(w);\n   STBI_NOTUSED(hs);\n   return in_near;\n}\n\nstatic stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)\n{\n   // need to generate two samples vertically for every one in input\n   int i;\n   STBI_NOTUSED(hs);\n   for (i=0; i < w; ++i)\n      out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2);\n   return out;\n}\n\nstatic stbi_uc*  stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)\n{\n   // need to generate two samples horizontally for every one in input\n   int i;\n   stbi_uc *input = in_near;\n\n   if (w == 1) {\n      // if only one sample, can't do any interpolation\n      out[0] = out[1] = input[0];\n      return out;\n   }\n\n   out[0] = input[0];\n   out[1] = stbi__div4(input[0]*3 + input[1] + 2);\n   for (i=1; i < w-1; ++i) {\n      int n = 3*input[i]+2;\n      out[i*2+0] = stbi__div4(n+input[i-1]);\n      out[i*2+1] = stbi__div4(n+input[i+1]);\n   }\n   out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2);\n   out[i*2+1] = input[w-1];\n\n   STBI_NOTUSED(in_far);\n   STBI_NOTUSED(hs);\n\n   return out;\n}\n\n#define stbi__div16(x) ((stbi_uc) ((x) >> 4))\n\nstatic stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)\n{\n   // need to generate 2x2 samples for every one in input\n   int i,t0,t1;\n   if (w == 1) {\n      out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2);\n      return out;\n   }\n\n   t1 = 3*in_near[0] + in_far[0];\n   out[0] = stbi__div4(t1+2);\n   for (i=1; i < w; ++i) {\n      t0 = t1;\n      t1 = 3*in_near[i]+in_far[i];\n      out[i*2-1] = stbi__div16(3*t0 + t1 + 8);\n      out[i*2  ] = stbi__div16(3*t1 + t0 + 8);\n   }\n   out[w*2-1] = stbi__div4(t1+2);\n\n   STBI_NOTUSED(hs);\n\n   return out;\n}\n\n#if defined(STBI_SSE2) || defined(STBI_NEON)\nstatic stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)\n{\n   // need to generate 2x2 samples for every one in input\n   int i=0,t0,t1;\n\n   if (w == 1) {\n      out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2);\n      return out;\n   }\n\n   t1 = 3*in_near[0] + in_far[0];\n   // process groups of 8 pixels for as long as we can.\n   // note we can't handle the last pixel in a row in this loop\n   // because we need to handle the filter boundary conditions.\n   for (; i < ((w-1) & ~7); i += 8) {\n#if defined(STBI_SSE2)\n      // load and perform the vertical filtering pass\n      // this uses 3*x + y = 4*x + (y - x)\n      __m128i zero  = _mm_setzero_si128();\n      __m128i farb  = _mm_loadl_epi64((__m128i *) (in_far + i));\n      __m128i nearb = _mm_loadl_epi64((__m128i *) (in_near + i));\n      __m128i farw  = _mm_unpacklo_epi8(farb, zero);\n      __m128i nearw = _mm_unpacklo_epi8(nearb, zero);\n      __m128i diff  = _mm_sub_epi16(farw, nearw);\n      __m128i nears = _mm_slli_epi16(nearw, 2);\n      __m128i curr  = _mm_add_epi16(nears, diff); // current row\n\n      // horizontal filter works the same based on shifted vers of current\n      // row. \"prev\" is current row shifted right by 1 pixel; we need to\n      // insert the previous pixel value (from t1).\n      // \"next\" is current row shifted left by 1 pixel, with first pixel\n      // of next block of 8 pixels added in.\n      __m128i prv0 = _mm_slli_si128(curr, 2);\n      __m128i nxt0 = _mm_srli_si128(curr, 2);\n      __m128i prev = _mm_insert_epi16(prv0, t1, 0);\n      __m128i next = _mm_insert_epi16(nxt0, 3*in_near[i+8] + in_far[i+8], 7);\n\n      // horizontal filter, polyphase implementation since it's convenient:\n      // even pixels = 3*cur + prev = cur*4 + (prev - cur)\n      // odd  pixels = 3*cur + next = cur*4 + (next - cur)\n      // note the shared term.\n      __m128i bias  = _mm_set1_epi16(8);\n      __m128i curs = _mm_slli_epi16(curr, 2);\n      __m128i prvd = _mm_sub_epi16(prev, curr);\n      __m128i nxtd = _mm_sub_epi16(next, curr);\n      __m128i curb = _mm_add_epi16(curs, bias);\n      __m128i even = _mm_add_epi16(prvd, curb);\n      __m128i odd  = _mm_add_epi16(nxtd, curb);\n\n      // interleave even and odd pixels, then undo scaling.\n      __m128i int0 = _mm_unpacklo_epi16(even, odd);\n      __m128i int1 = _mm_unpackhi_epi16(even, odd);\n      __m128i de0  = _mm_srli_epi16(int0, 4);\n      __m128i de1  = _mm_srli_epi16(int1, 4);\n\n      // pack and write output\n      __m128i outv = _mm_packus_epi16(de0, de1);\n      _mm_storeu_si128((__m128i *) (out + i*2), outv);\n#elif defined(STBI_NEON)\n      // load and perform the vertical filtering pass\n      // this uses 3*x + y = 4*x + (y - x)\n      uint8x8_t farb  = vld1_u8(in_far + i);\n      uint8x8_t nearb = vld1_u8(in_near + i);\n      int16x8_t diff  = vreinterpretq_s16_u16(vsubl_u8(farb, nearb));\n      int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2));\n      int16x8_t curr  = vaddq_s16(nears, diff); // current row\n\n      // horizontal filter works the same based on shifted vers of current\n      // row. \"prev\" is current row shifted right by 1 pixel; we need to\n      // insert the previous pixel value (from t1).\n      // \"next\" is current row shifted left by 1 pixel, with first pixel\n      // of next block of 8 pixels added in.\n      int16x8_t prv0 = vextq_s16(curr, curr, 7);\n      int16x8_t nxt0 = vextq_s16(curr, curr, 1);\n      int16x8_t prev = vsetq_lane_s16(t1, prv0, 0);\n      int16x8_t next = vsetq_lane_s16(3*in_near[i+8] + in_far[i+8], nxt0, 7);\n\n      // horizontal filter, polyphase implementation since it's convenient:\n      // even pixels = 3*cur + prev = cur*4 + (prev - cur)\n      // odd  pixels = 3*cur + next = cur*4 + (next - cur)\n      // note the shared term.\n      int16x8_t curs = vshlq_n_s16(curr, 2);\n      int16x8_t prvd = vsubq_s16(prev, curr);\n      int16x8_t nxtd = vsubq_s16(next, curr);\n      int16x8_t even = vaddq_s16(curs, prvd);\n      int16x8_t odd  = vaddq_s16(curs, nxtd);\n\n      // undo scaling and round, then store with even/odd phases interleaved\n      uint8x8x2_t o;\n      o.val[0] = vqrshrun_n_s16(even, 4);\n      o.val[1] = vqrshrun_n_s16(odd,  4);\n      vst2_u8(out + i*2, o);\n#endif\n\n      // \"previous\" value for next iter\n      t1 = 3*in_near[i+7] + in_far[i+7];\n   }\n\n   t0 = t1;\n   t1 = 3*in_near[i] + in_far[i];\n   out[i*2] = stbi__div16(3*t1 + t0 + 8);\n\n   for (++i; i < w; ++i) {\n      t0 = t1;\n      t1 = 3*in_near[i]+in_far[i];\n      out[i*2-1] = stbi__div16(3*t0 + t1 + 8);\n      out[i*2  ] = stbi__div16(3*t1 + t0 + 8);\n   }\n   out[w*2-1] = stbi__div4(t1+2);\n\n   STBI_NOTUSED(hs);\n\n   return out;\n}\n#endif\n\nstatic stbi_uc *stbi__resample_row_generic(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)\n{\n   // resample with nearest-neighbor\n   int i,j;\n   STBI_NOTUSED(in_far);\n   for (i=0; i < w; ++i)\n      for (j=0; j < hs; ++j)\n         out[i*hs+j] = in_near[i];\n   return out;\n}\n\n#ifdef STBI_JPEG_OLD\n// this is the same YCbCr-to-RGB calculation that stb_image has used\n// historically before the algorithm changes in 1.49\n#define float2fixed(x)  ((int) ((x) * 65536 + 0.5))\nstatic void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step)\n{\n   int i;\n   for (i=0; i < count; ++i) {\n      int y_fixed = (y[i] << 16) + 32768; // rounding\n      int r,g,b;\n      int cr = pcr[i] - 128;\n      int cb = pcb[i] - 128;\n      r = y_fixed + cr*float2fixed(1.40200f);\n      g = y_fixed - cr*float2fixed(0.71414f) - cb*float2fixed(0.34414f);\n      b = y_fixed                            + cb*float2fixed(1.77200f);\n      r >>= 16;\n      g >>= 16;\n      b >>= 16;\n      if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }\n      if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }\n      if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }\n      out[0] = (stbi_uc)r;\n      out[1] = (stbi_uc)g;\n      out[2] = (stbi_uc)b;\n      out[3] = 255;\n      out += step;\n   }\n}\n#else\n// this is a reduced-precision calculation of YCbCr-to-RGB introduced\n// to make sure the code produces the same results in both SIMD and scalar\n#define float2fixed(x)  (((int) ((x) * 4096.0f + 0.5f)) << 8)\nstatic void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step)\n{\n   int i;\n   for (i=0; i < count; ++i) {\n      int y_fixed = (y[i] << 20) + (1<<19); // rounding\n      int r,g,b;\n      int cr = pcr[i] - 128;\n      int cb = pcb[i] - 128;\n      r = y_fixed +  cr* float2fixed(1.40200f);\n      g = y_fixed + (cr*-float2fixed(0.71414f)) + ((cb*-float2fixed(0.34414f)) & 0xffff0000);\n      b = y_fixed                               +   cb* float2fixed(1.77200f);\n      r >>= 20;\n      g >>= 20;\n      b >>= 20;\n      if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }\n      if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }\n      if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }\n      out[0] = (stbi_uc)r;\n      out[1] = (stbi_uc)g;\n      out[2] = (stbi_uc)b;\n      out[3] = 255;\n      out += step;\n   }\n}\n#endif\n\n#if defined(STBI_SSE2) || defined(STBI_NEON)\nstatic void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc const *pcb, stbi_uc const *pcr, int count, int step)\n{\n   int i = 0;\n\n#ifdef STBI_SSE2\n   // step == 3 is pretty ugly on the final interleave, and i'm not convinced\n   // it's useful in practice (you wouldn't use it for textures, for example).\n   // so just accelerate step == 4 case.\n   if (step == 4) {\n      // this is a fairly straightforward implementation and not super-optimized.\n      __m128i signflip  = _mm_set1_epi8(-0x80);\n      __m128i cr_const0 = _mm_set1_epi16(   (short) ( 1.40200f*4096.0f+0.5f));\n      __m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f));\n      __m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f));\n      __m128i cb_const1 = _mm_set1_epi16(   (short) ( 1.77200f*4096.0f+0.5f));\n      __m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128);\n      __m128i xw = _mm_set1_epi16(255); // alpha channel\n\n      for (; i+7 < count; i += 8) {\n         // load\n         __m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i));\n         __m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i));\n         __m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i));\n         __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128\n         __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128\n\n         // unpack to short (and left-shift cr, cb by 8)\n         __m128i yw  = _mm_unpacklo_epi8(y_bias, y_bytes);\n         __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased);\n         __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased);\n\n         // color transform\n         __m128i yws = _mm_srli_epi16(yw, 4);\n         __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw);\n         __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw);\n         __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1);\n         __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1);\n         __m128i rws = _mm_add_epi16(cr0, yws);\n         __m128i gwt = _mm_add_epi16(cb0, yws);\n         __m128i bws = _mm_add_epi16(yws, cb1);\n         __m128i gws = _mm_add_epi16(gwt, cr1);\n\n         // descale\n         __m128i rw = _mm_srai_epi16(rws, 4);\n         __m128i bw = _mm_srai_epi16(bws, 4);\n         __m128i gw = _mm_srai_epi16(gws, 4);\n\n         // back to byte, set up for transpose\n         __m128i brb = _mm_packus_epi16(rw, bw);\n         __m128i gxb = _mm_packus_epi16(gw, xw);\n\n         // transpose to interleave channels\n         __m128i t0 = _mm_unpacklo_epi8(brb, gxb);\n         __m128i t1 = _mm_unpackhi_epi8(brb, gxb);\n         __m128i o0 = _mm_unpacklo_epi16(t0, t1);\n         __m128i o1 = _mm_unpackhi_epi16(t0, t1);\n\n         // store\n         _mm_storeu_si128((__m128i *) (out + 0), o0);\n         _mm_storeu_si128((__m128i *) (out + 16), o1);\n         out += 32;\n      }\n   }\n#endif\n\n#ifdef STBI_NEON\n   // in this version, step=3 support would be easy to add. but is there demand?\n   if (step == 4) {\n      // this is a fairly straightforward implementation and not super-optimized.\n      uint8x8_t signflip = vdup_n_u8(0x80);\n      int16x8_t cr_const0 = vdupq_n_s16(   (short) ( 1.40200f*4096.0f+0.5f));\n      int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f));\n      int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f));\n      int16x8_t cb_const1 = vdupq_n_s16(   (short) ( 1.77200f*4096.0f+0.5f));\n\n      for (; i+7 < count; i += 8) {\n         // load\n         uint8x8_t y_bytes  = vld1_u8(y + i);\n         uint8x8_t cr_bytes = vld1_u8(pcr + i);\n         uint8x8_t cb_bytes = vld1_u8(pcb + i);\n         int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip));\n         int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip));\n\n         // expand to s16\n         int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4));\n         int16x8_t crw = vshll_n_s8(cr_biased, 7);\n         int16x8_t cbw = vshll_n_s8(cb_biased, 7);\n\n         // color transform\n         int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0);\n         int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0);\n         int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1);\n         int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1);\n         int16x8_t rws = vaddq_s16(yws, cr0);\n         int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1);\n         int16x8_t bws = vaddq_s16(yws, cb1);\n\n         // undo scaling, round, convert to byte\n         uint8x8x4_t o;\n         o.val[0] = vqrshrun_n_s16(rws, 4);\n         o.val[1] = vqrshrun_n_s16(gws, 4);\n         o.val[2] = vqrshrun_n_s16(bws, 4);\n         o.val[3] = vdup_n_u8(255);\n\n         // store, interleaving r/g/b/a\n         vst4_u8(out, o);\n         out += 8*4;\n      }\n   }\n#endif\n\n   for (; i < count; ++i) {\n      int y_fixed = (y[i] << 20) + (1<<19); // rounding\n      int r,g,b;\n      int cr = pcr[i] - 128;\n      int cb = pcb[i] - 128;\n      r = y_fixed + cr* float2fixed(1.40200f);\n      g = y_fixed + cr*-float2fixed(0.71414f) + ((cb*-float2fixed(0.34414f)) & 0xffff0000);\n      b = y_fixed                             +   cb* float2fixed(1.77200f);\n      r >>= 20;\n      g >>= 20;\n      b >>= 20;\n      if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }\n      if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }\n      if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }\n      out[0] = (stbi_uc)r;\n      out[1] = (stbi_uc)g;\n      out[2] = (stbi_uc)b;\n      out[3] = 255;\n      out += step;\n   }\n}\n#endif\n\n// set up the kernels\nstatic void stbi__setup_jpeg(stbi__jpeg *j)\n{\n   j->idct_block_kernel = stbi__idct_block;\n   j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row;\n   j->resample_row_hv_2_kernel = stbi__resample_row_hv_2;\n\n#ifdef STBI_SSE2\n   if (stbi__sse2_available()) {\n      j->idct_block_kernel = stbi__idct_simd;\n      #ifndef STBI_JPEG_OLD\n      j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd;\n      #endif\n      j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd;\n   }\n#endif\n\n#ifdef STBI_NEON\n   j->idct_block_kernel = stbi__idct_simd;\n   #ifndef STBI_JPEG_OLD\n   j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd;\n   #endif\n   j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd;\n#endif\n}\n\n// clean up the temporary component buffers\nstatic void stbi__cleanup_jpeg(stbi__jpeg *j)\n{\n   int i;\n   for (i=0; i < j->s->img_n; ++i) {\n      if (j->img_comp[i].raw_data) {\n         STBI_FREE(j->img_comp[i].raw_data);\n         j->img_comp[i].raw_data = NULL;\n         j->img_comp[i].data = NULL;\n      }\n      if (j->img_comp[i].raw_coeff) {\n         STBI_FREE(j->img_comp[i].raw_coeff);\n         j->img_comp[i].raw_coeff = 0;\n         j->img_comp[i].coeff = 0;\n      }\n      if (j->img_comp[i].linebuf) {\n         STBI_FREE(j->img_comp[i].linebuf);\n         j->img_comp[i].linebuf = NULL;\n      }\n   }\n}\n\ntypedef struct\n{\n   resample_row_func resample;\n   stbi_uc *line0,*line1;\n   int hs,vs;   // expansion factor in each axis\n   int w_lores; // horizontal pixels pre-expansion\n   int ystep;   // how far through vertical expansion we are\n   int ypos;    // which pre-expansion row we're on\n} stbi__resample;\n\nstatic stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp, int req_comp)\n{\n   int n, decode_n;\n   z->s->img_n = 0; // make stbi__cleanup_jpeg safe\n\n   // validate req_comp\n   if (req_comp < 0 || req_comp > 4) return stbi__errpuc(\"bad req_comp\", \"Internal error\");\n\n   // load a jpeg image from whichever source, but leave in YCbCr format\n   if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; }\n\n   // determine actual number of components to generate\n   n = req_comp ? req_comp : z->s->img_n;\n\n   if (z->s->img_n == 3 && n < 3)\n      decode_n = 1;\n   else\n      decode_n = z->s->img_n;\n\n   // resample and color-convert\n   {\n      int k;\n      unsigned int i,j;\n      stbi_uc *output;\n      stbi_uc *coutput[4];\n\n      stbi__resample res_comp[4];\n\n      for (k=0; k < decode_n; ++k) {\n         stbi__resample *r = &res_comp[k];\n\n         // allocate line buffer big enough for upsampling off the edges\n         // with upsample factor of 4\n         z->img_comp[k].linebuf = (stbi_uc *) stbi__malloc(z->s->img_x + 3);\n         if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc(\"outofmem\", \"Out of memory\"); }\n\n         r->hs      = z->img_h_max / z->img_comp[k].h;\n         r->vs      = z->img_v_max / z->img_comp[k].v;\n         r->ystep   = r->vs >> 1;\n         r->w_lores = (z->s->img_x + r->hs-1) / r->hs;\n         r->ypos    = 0;\n         r->line0   = r->line1 = z->img_comp[k].data;\n\n         if      (r->hs == 1 && r->vs == 1) r->resample = resample_row_1;\n         else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2;\n         else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2;\n         else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel;\n         else                               r->resample = stbi__resample_row_generic;\n      }\n\n      // can't error after this so, this is safe\n      output = (stbi_uc *) stbi__malloc(n * z->s->img_x * z->s->img_y + 1);\n      if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc(\"outofmem\", \"Out of memory\"); }\n\n      // now go ahead and resample\n      for (j=0; j < z->s->img_y; ++j) {\n         stbi_uc *out = output + n * z->s->img_x * j;\n         for (k=0; k < decode_n; ++k) {\n            stbi__resample *r = &res_comp[k];\n            int y_bot = r->ystep >= (r->vs >> 1);\n            coutput[k] = r->resample(z->img_comp[k].linebuf,\n                                     y_bot ? r->line1 : r->line0,\n                                     y_bot ? r->line0 : r->line1,\n                                     r->w_lores, r->hs);\n            if (++r->ystep >= r->vs) {\n               r->ystep = 0;\n               r->line0 = r->line1;\n               if (++r->ypos < z->img_comp[k].y)\n                  r->line1 += z->img_comp[k].w2;\n            }\n         }\n         if (n >= 3) {\n            stbi_uc *y = coutput[0];\n            if (z->s->img_n == 3) {\n               z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);\n            } else\n               for (i=0; i < z->s->img_x; ++i) {\n                  out[0] = out[1] = out[2] = y[i];\n                  out[3] = 255; // not used if n==3\n                  out += n;\n               }\n         } else {\n            stbi_uc *y = coutput[0];\n            if (n == 1)\n               for (i=0; i < z->s->img_x; ++i) out[i] = y[i];\n            else\n               for (i=0; i < z->s->img_x; ++i) *out++ = y[i], *out++ = 255;\n         }\n      }\n      stbi__cleanup_jpeg(z);\n      *out_x = z->s->img_x;\n      *out_y = z->s->img_y;\n      if (comp) *comp  = z->s->img_n; // report original components, not output\n      return output;\n   }\n}\n\nstatic unsigned char *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)\n{\n   stbi__jpeg j;\n   j.s = s;\n   stbi__setup_jpeg(&j);\n   return load_jpeg_image(&j, x,y,comp,req_comp);\n}\n\nstatic int stbi__jpeg_test(stbi__context *s)\n{\n   int r;\n   stbi__jpeg j;\n   j.s = s;\n   stbi__setup_jpeg(&j);\n   r = stbi__decode_jpeg_header(&j, STBI__SCAN_type);\n   stbi__rewind(s);\n   return r;\n}\n\nstatic int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp)\n{\n   if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) {\n      stbi__rewind( j->s );\n      return 0;\n   }\n   if (x) *x = j->s->img_x;\n   if (y) *y = j->s->img_y;\n   if (comp) *comp = j->s->img_n;\n   return 1;\n}\n\nstatic int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp)\n{\n   stbi__jpeg j;\n   j.s = s;\n   return stbi__jpeg_info_raw(&j, x, y, comp);\n}\n#endif\n\n// public domain zlib decode    v0.2  Sean Barrett 2006-11-18\n//    simple implementation\n//      - all input must be provided in an upfront buffer\n//      - all output is written to a single output buffer (can malloc/realloc)\n//    performance\n//      - fast huffman\n\n#ifndef STBI_NO_ZLIB\n\n// fast-way is faster to check than jpeg huffman, but slow way is slower\n#define STBI__ZFAST_BITS  9 // accelerate all cases in default tables\n#define STBI__ZFAST_MASK  ((1 << STBI__ZFAST_BITS) - 1)\n\n// zlib-style huffman encoding\n// (jpegs packs from left, zlib from right, so can't share code)\ntypedef struct\n{\n   stbi__uint16 fast[1 << STBI__ZFAST_BITS];\n   stbi__uint16 firstcode[16];\n   int maxcode[17];\n   stbi__uint16 firstsymbol[16];\n   stbi_uc  size[288];\n   stbi__uint16 value[288];\n} stbi__zhuffman;\n\nstbi_inline static int stbi__bitreverse16(int n)\n{\n  n = ((n & 0xAAAA) >>  1) | ((n & 0x5555) << 1);\n  n = ((n & 0xCCCC) >>  2) | ((n & 0x3333) << 2);\n  n = ((n & 0xF0F0) >>  4) | ((n & 0x0F0F) << 4);\n  n = ((n & 0xFF00) >>  8) | ((n & 0x00FF) << 8);\n  return n;\n}\n\nstbi_inline static int stbi__bit_reverse(int v, int bits)\n{\n   STBI_ASSERT(bits <= 16);\n   // to bit reverse n bits, reverse 16 and shift\n   // e.g. 11 bits, bit reverse and shift away 5\n   return stbi__bitreverse16(v) >> (16-bits);\n}\n\nstatic int stbi__zbuild_huffman(stbi__zhuffman *z, stbi_uc *sizelist, int num)\n{\n   int i,k=0;\n   int code, next_code[16], sizes[17];\n\n   // DEFLATE spec for generating codes\n   memset(sizes, 0, sizeof(sizes));\n   memset(z->fast, 0, sizeof(z->fast));\n   for (i=0; i < num; ++i)\n      ++sizes[sizelist[i]];\n   sizes[0] = 0;\n   for (i=1; i < 16; ++i)\n      if (sizes[i] > (1 << i))\n         return stbi__err(\"bad sizes\", \"Corrupt PNG\");\n   code = 0;\n   for (i=1; i < 16; ++i) {\n      next_code[i] = code;\n      z->firstcode[i] = (stbi__uint16) code;\n      z->firstsymbol[i] = (stbi__uint16) k;\n      code = (code + sizes[i]);\n      if (sizes[i])\n         if (code-1 >= (1 << i)) return stbi__err(\"bad codelengths\",\"Corrupt PNG\");\n      z->maxcode[i] = code << (16-i); // preshift for inner loop\n      code <<= 1;\n      k += sizes[i];\n   }\n   z->maxcode[16] = 0x10000; // sentinel\n   for (i=0; i < num; ++i) {\n      int s = sizelist[i];\n      if (s) {\n         int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s];\n         stbi__uint16 fastv = (stbi__uint16) ((s << 9) | i);\n         z->size [c] = (stbi_uc     ) s;\n         z->value[c] = (stbi__uint16) i;\n         if (s <= STBI__ZFAST_BITS) {\n            int j = stbi__bit_reverse(next_code[s],s);\n            while (j < (1 << STBI__ZFAST_BITS)) {\n               z->fast[j] = fastv;\n               j += (1 << s);\n            }\n         }\n         ++next_code[s];\n      }\n   }\n   return 1;\n}\n\n// zlib-from-memory implementation for PNG reading\n//    because PNG allows splitting the zlib stream arbitrarily,\n//    and it's annoying structurally to have PNG call ZLIB call PNG,\n//    we require PNG read all the IDATs and combine them into a single\n//    memory buffer\n\ntypedef struct\n{\n   stbi_uc *zbuffer, *zbuffer_end;\n   int num_bits;\n   stbi__uint32 code_buffer;\n\n   char *zout;\n   char *zout_start;\n   char *zout_end;\n   int   z_expandable;\n\n   stbi__zhuffman z_length, z_distance;\n} stbi__zbuf;\n\nstbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z)\n{\n   if (z->zbuffer >= z->zbuffer_end) return 0;\n   return *z->zbuffer++;\n}\n\nstatic void stbi__fill_bits(stbi__zbuf *z)\n{\n   do {\n      STBI_ASSERT(z->code_buffer < (1U << z->num_bits));\n      z->code_buffer |= (unsigned int) stbi__zget8(z) << z->num_bits;\n      z->num_bits += 8;\n   } while (z->num_bits <= 24);\n}\n\nstbi_inline static unsigned int stbi__zreceive(stbi__zbuf *z, int n)\n{\n   unsigned int k;\n   if (z->num_bits < n) stbi__fill_bits(z);\n   k = z->code_buffer & ((1 << n) - 1);\n   z->code_buffer >>= n;\n   z->num_bits -= n;\n   return k;\n}\n\nstatic int stbi__zhuffman_decode_slowpath(stbi__zbuf *a, stbi__zhuffman *z)\n{\n   int b,s,k;\n   // not resolved by fast table, so compute it the slow way\n   // use jpeg approach, which requires MSbits at top\n   k = stbi__bit_reverse(a->code_buffer, 16);\n   for (s=STBI__ZFAST_BITS+1; ; ++s)\n      if (k < z->maxcode[s])\n         break;\n   if (s == 16) return -1; // invalid code!\n   // code size is s, so:\n   b = (k >> (16-s)) - z->firstcode[s] + z->firstsymbol[s];\n   STBI_ASSERT(z->size[b] == s);\n   a->code_buffer >>= s;\n   a->num_bits -= s;\n   return z->value[b];\n}\n\nstbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z)\n{\n   int b,s;\n   if (a->num_bits < 16) stbi__fill_bits(a);\n   b = z->fast[a->code_buffer & STBI__ZFAST_MASK];\n   if (b) {\n      s = b >> 9;\n      a->code_buffer >>= s;\n      a->num_bits -= s;\n      return b & 511;\n   }\n   return stbi__zhuffman_decode_slowpath(a, z);\n}\n\nstatic int stbi__zexpand(stbi__zbuf *z, char *zout, int n)  // need to make room for n bytes\n{\n   char *q;\n   int cur, limit;\n   z->zout = zout;\n   if (!z->z_expandable) return stbi__err(\"output buffer limit\",\"Corrupt PNG\");\n   cur   = (int) (z->zout     - z->zout_start);\n   limit = (int) (z->zout_end - z->zout_start);\n   while (cur + n > limit)\n      limit *= 2;\n   q = (char *) STBI_REALLOC(z->zout_start, limit);\n   if (q == NULL) return stbi__err(\"outofmem\", \"Out of memory\");\n   z->zout_start = q;\n   z->zout       = q + cur;\n   z->zout_end   = q + limit;\n   return 1;\n}\n\nstatic int stbi__zlength_base[31] = {\n   3,4,5,6,7,8,9,10,11,13,\n   15,17,19,23,27,31,35,43,51,59,\n   67,83,99,115,131,163,195,227,258,0,0 };\n\nstatic int stbi__zlength_extra[31]=\n{ 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 };\n\nstatic int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,\n257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0};\n\nstatic int stbi__zdist_extra[32] =\n{ 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};\n\nstatic int stbi__parse_huffman_block(stbi__zbuf *a)\n{\n   char *zout = a->zout;\n   for(;;) {\n      int z = stbi__zhuffman_decode(a, &a->z_length);\n      if (z < 256) {\n         if (z < 0) return stbi__err(\"bad huffman code\",\"Corrupt PNG\"); // error in huffman codes\n         if (zout >= a->zout_end) {\n            if (!stbi__zexpand(a, zout, 1)) return 0;\n            zout = a->zout;\n         }\n         *zout++ = (char) z;\n      } else {\n         stbi_uc *p;\n         int len,dist;\n         if (z == 256) {\n            a->zout = zout;\n            return 1;\n         }\n         z -= 257;\n         len = stbi__zlength_base[z];\n         if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]);\n         z = stbi__zhuffman_decode(a, &a->z_distance);\n         if (z < 0) return stbi__err(\"bad huffman code\",\"Corrupt PNG\");\n         dist = stbi__zdist_base[z];\n         if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]);\n         if (zout - a->zout_start < dist) return stbi__err(\"bad dist\",\"Corrupt PNG\");\n         if (zout + len > a->zout_end) {\n            if (!stbi__zexpand(a, zout, len)) return 0;\n            zout = a->zout;\n         }\n         p = (stbi_uc *) (zout - dist);\n         if (dist == 1) { // run of one byte; common in images.\n            stbi_uc v = *p;\n            if (len) { do *zout++ = v; while (--len); }\n         } else {\n            if (len) { do *zout++ = *p++; while (--len); }\n         }\n      }\n   }\n}\n\nstatic int stbi__compute_huffman_codes(stbi__zbuf *a)\n{\n   static stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 };\n   stbi__zhuffman z_codelength;\n   stbi_uc lencodes[286+32+137];//padding for maximum single op\n   stbi_uc codelength_sizes[19];\n   int i,n;\n\n   int hlit  = stbi__zreceive(a,5) + 257;\n   int hdist = stbi__zreceive(a,5) + 1;\n   int hclen = stbi__zreceive(a,4) + 4;\n\n   memset(codelength_sizes, 0, sizeof(codelength_sizes));\n   for (i=0; i < hclen; ++i) {\n      int s = stbi__zreceive(a,3);\n      codelength_sizes[length_dezigzag[i]] = (stbi_uc) s;\n   }\n   if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0;\n\n   n = 0;\n   while (n < hlit + hdist) {\n      int c = stbi__zhuffman_decode(a, &z_codelength);\n      if (c < 0 || c >= 19) return stbi__err(\"bad codelengths\", \"Corrupt PNG\");\n      if (c < 16)\n         lencodes[n++] = (stbi_uc) c;\n      else if (c == 16) {\n         c = stbi__zreceive(a,2)+3;\n         memset(lencodes+n, lencodes[n-1], c);\n         n += c;\n      } else if (c == 17) {\n         c = stbi__zreceive(a,3)+3;\n         memset(lencodes+n, 0, c);\n         n += c;\n      } else {\n         STBI_ASSERT(c == 18);\n         c = stbi__zreceive(a,7)+11;\n         memset(lencodes+n, 0, c);\n         n += c;\n      }\n   }\n   if (n != hlit+hdist) return stbi__err(\"bad codelengths\",\"Corrupt PNG\");\n   if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0;\n   if (!stbi__zbuild_huffman(&a->z_distance, lencodes+hlit, hdist)) return 0;\n   return 1;\n}\n\nstatic int stbi__parse_uncomperssed_block(stbi__zbuf *a)\n{\n   stbi_uc header[4];\n   int len,nlen,k;\n   if (a->num_bits & 7)\n      stbi__zreceive(a, a->num_bits & 7); // discard\n   // drain the bit-packed data into header\n   k = 0;\n   while (a->num_bits > 0) {\n      header[k++] = (stbi_uc) (a->code_buffer & 255); // suppress MSVC run-time check\n      a->code_buffer >>= 8;\n      a->num_bits -= 8;\n   }\n   STBI_ASSERT(a->num_bits == 0);\n   // now fill header the normal way\n   while (k < 4)\n      header[k++] = stbi__zget8(a);\n   len  = header[1] * 256 + header[0];\n   nlen = header[3] * 256 + header[2];\n   if (nlen != (len ^ 0xffff)) return stbi__err(\"zlib corrupt\",\"Corrupt PNG\");\n   if (a->zbuffer + len > a->zbuffer_end) return stbi__err(\"read past buffer\",\"Corrupt PNG\");\n   if (a->zout + len > a->zout_end)\n      if (!stbi__zexpand(a, a->zout, len)) return 0;\n   memcpy(a->zout, a->zbuffer, len);\n   a->zbuffer += len;\n   a->zout += len;\n   return 1;\n}\n\nstatic int stbi__parse_zlib_header(stbi__zbuf *a)\n{\n   int cmf   = stbi__zget8(a);\n   int cm    = cmf & 15;\n   /* int cinfo = cmf >> 4; */\n   int flg   = stbi__zget8(a);\n   if ((cmf*256+flg) % 31 != 0) return stbi__err(\"bad zlib header\",\"Corrupt PNG\"); // zlib spec\n   if (flg & 32) return stbi__err(\"no preset dict\",\"Corrupt PNG\"); // preset dictionary not allowed in png\n   if (cm != 8) return stbi__err(\"bad compression\",\"Corrupt PNG\"); // DEFLATE required for png\n   // window = 1 << (8 + cinfo)... but who cares, we fully buffer output\n   return 1;\n}\n\n// @TODO: should statically initialize these for optimal thread safety\nstatic stbi_uc stbi__zdefault_length[288], stbi__zdefault_distance[32];\nstatic void stbi__init_zdefaults(void)\n{\n   int i;   // use <= to match clearly with spec\n   for (i=0; i <= 143; ++i)     stbi__zdefault_length[i]   = 8;\n   for (   ; i <= 255; ++i)     stbi__zdefault_length[i]   = 9;\n   for (   ; i <= 279; ++i)     stbi__zdefault_length[i]   = 7;\n   for (   ; i <= 287; ++i)     stbi__zdefault_length[i]   = 8;\n\n   for (i=0; i <=  31; ++i)     stbi__zdefault_distance[i] = 5;\n}\n\nstatic int stbi__parse_zlib(stbi__zbuf *a, int parse_header)\n{\n   int final, type;\n   if (parse_header)\n      if (!stbi__parse_zlib_header(a)) return 0;\n   a->num_bits = 0;\n   a->code_buffer = 0;\n   do {\n      final = stbi__zreceive(a,1);\n      type = stbi__zreceive(a,2);\n      if (type == 0) {\n         if (!stbi__parse_uncomperssed_block(a)) return 0;\n      } else if (type == 3) {\n         return 0;\n      } else {\n         if (type == 1) {\n            // use fixed code lengths\n            if (!stbi__zdefault_distance[31]) stbi__init_zdefaults();\n            if (!stbi__zbuild_huffman(&a->z_length  , stbi__zdefault_length  , 288)) return 0;\n            if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance,  32)) return 0;\n         } else {\n            if (!stbi__compute_huffman_codes(a)) return 0;\n         }\n         if (!stbi__parse_huffman_block(a)) return 0;\n      }\n   } while (!final);\n   return 1;\n}\n\nstatic int stbi__do_zlib(stbi__zbuf *a, char *obuf, int olen, int exp, int parse_header)\n{\n   a->zout_start = obuf;\n   a->zout       = obuf;\n   a->zout_end   = obuf + olen;\n   a->z_expandable = exp;\n\n   return stbi__parse_zlib(a, parse_header);\n}\n\nSTBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen)\n{\n   stbi__zbuf a;\n   char *p = (char *) stbi__malloc(initial_size);\n   if (p == NULL) return NULL;\n   a.zbuffer = (stbi_uc *) buffer;\n   a.zbuffer_end = (stbi_uc *) buffer + len;\n   if (stbi__do_zlib(&a, p, initial_size, 1, 1)) {\n      if (outlen) *outlen = (int) (a.zout - a.zout_start);\n      return a.zout_start;\n   } else {\n      STBI_FREE(a.zout_start);\n      return NULL;\n   }\n}\n\nSTBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen)\n{\n   return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen);\n}\n\nSTBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header)\n{\n   stbi__zbuf a;\n   char *p = (char *) stbi__malloc(initial_size);\n   if (p == NULL) return NULL;\n   a.zbuffer = (stbi_uc *) buffer;\n   a.zbuffer_end = (stbi_uc *) buffer + len;\n   if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) {\n      if (outlen) *outlen = (int) (a.zout - a.zout_start);\n      return a.zout_start;\n   } else {\n      STBI_FREE(a.zout_start);\n      return NULL;\n   }\n}\n\nSTBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen)\n{\n   stbi__zbuf a;\n   a.zbuffer = (stbi_uc *) ibuffer;\n   a.zbuffer_end = (stbi_uc *) ibuffer + ilen;\n   if (stbi__do_zlib(&a, obuffer, olen, 0, 1))\n      return (int) (a.zout - a.zout_start);\n   else\n      return -1;\n}\n\nSTBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen)\n{\n   stbi__zbuf a;\n   char *p = (char *) stbi__malloc(16384);\n   if (p == NULL) return NULL;\n   a.zbuffer = (stbi_uc *) buffer;\n   a.zbuffer_end = (stbi_uc *) buffer+len;\n   if (stbi__do_zlib(&a, p, 16384, 1, 0)) {\n      if (outlen) *outlen = (int) (a.zout - a.zout_start);\n      return a.zout_start;\n   } else {\n      STBI_FREE(a.zout_start);\n      return NULL;\n   }\n}\n\nSTBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen)\n{\n   stbi__zbuf a;\n   a.zbuffer = (stbi_uc *) ibuffer;\n   a.zbuffer_end = (stbi_uc *) ibuffer + ilen;\n   if (stbi__do_zlib(&a, obuffer, olen, 0, 0))\n      return (int) (a.zout - a.zout_start);\n   else\n      return -1;\n}\n#endif\n\n// public domain \"baseline\" PNG decoder   v0.10  Sean Barrett 2006-11-18\n//    simple implementation\n//      - only 8-bit samples\n//      - no CRC checking\n//      - allocates lots of intermediate memory\n//        - avoids problem of streaming data between subsystems\n//        - avoids explicit window management\n//    performance\n//      - uses stb_zlib, a PD zlib implementation with fast huffman decoding\n\n#ifndef STBI_NO_PNG\ntypedef struct\n{\n   stbi__uint32 length;\n   stbi__uint32 type;\n} stbi__pngchunk;\n\nstatic stbi__pngchunk stbi__get_chunk_header(stbi__context *s)\n{\n   stbi__pngchunk c;\n   c.length = stbi__get32be(s);\n   c.type   = stbi__get32be(s);\n   return c;\n}\n\nstatic int stbi__check_png_header(stbi__context *s)\n{\n   static stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 };\n   int i;\n   for (i=0; i < 8; ++i)\n      if (stbi__get8(s) != png_sig[i]) return stbi__err(\"bad png sig\",\"Not a PNG\");\n   return 1;\n}\n\ntypedef struct\n{\n   stbi__context *s;\n   stbi_uc *idata, *expanded, *out;\n} stbi__png;\n\n\nenum {\n   STBI__F_none=0,\n   STBI__F_sub=1,\n   STBI__F_up=2,\n   STBI__F_avg=3,\n   STBI__F_paeth=4,\n   // synthetic filters used for first scanline to avoid needing a dummy row of 0s\n   STBI__F_avg_first,\n   STBI__F_paeth_first\n};\n\nstatic stbi_uc first_row_filter[5] =\n{\n   STBI__F_none,\n   STBI__F_sub,\n   STBI__F_none,\n   STBI__F_avg_first,\n   STBI__F_paeth_first\n};\n\nstatic int stbi__paeth(int a, int b, int c)\n{\n   int p = a + b - c;\n   int pa = abs(p-a);\n   int pb = abs(p-b);\n   int pc = abs(p-c);\n   if (pa <= pb && pa <= pc) return a;\n   if (pb <= pc) return b;\n   return c;\n}\n\nstatic stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 };\n\n// create the png data from post-deflated data\nstatic int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color)\n{\n   stbi__context *s = a->s;\n   stbi__uint32 i,j,stride = x*out_n;\n   stbi__uint32 img_len, img_width_bytes;\n   int k;\n   int img_n = s->img_n; // copy it into a local for later\n\n   STBI_ASSERT(out_n == s->img_n || out_n == s->img_n+1);\n   a->out = (stbi_uc *) stbi__malloc(x * y * out_n); // extra bytes to write off the end into\n   if (!a->out) return stbi__err(\"outofmem\", \"Out of memory\");\n\n   img_width_bytes = (((img_n * x * depth) + 7) >> 3);\n   img_len = (img_width_bytes + 1) * y;\n   if (s->img_x == x && s->img_y == y) {\n      if (raw_len != img_len) return stbi__err(\"not enough pixels\",\"Corrupt PNG\");\n   } else { // interlaced:\n      if (raw_len < img_len) return stbi__err(\"not enough pixels\",\"Corrupt PNG\");\n   }\n\n   for (j=0; j < y; ++j) {\n      stbi_uc *cur = a->out + stride*j;\n      stbi_uc *prior = cur - stride;\n      int filter = *raw++;\n      int filter_bytes = img_n;\n      int width = x;\n      if (filter > 4)\n         return stbi__err(\"invalid filter\",\"Corrupt PNG\");\n\n      if (depth < 8) {\n         STBI_ASSERT(img_width_bytes <= x);\n         cur += x*out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place\n         filter_bytes = 1;\n         width = img_width_bytes;\n      }\n\n      // if first row, use special filter that doesn't sample previous row\n      if (j == 0) filter = first_row_filter[filter];\n\n      // handle first byte explicitly\n      for (k=0; k < filter_bytes; ++k) {\n         switch (filter) {\n            case STBI__F_none       : cur[k] = raw[k]; break;\n            case STBI__F_sub        : cur[k] = raw[k]; break;\n            case STBI__F_up         : cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;\n            case STBI__F_avg        : cur[k] = STBI__BYTECAST(raw[k] + (prior[k]>>1)); break;\n            case STBI__F_paeth      : cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0,prior[k],0)); break;\n            case STBI__F_avg_first  : cur[k] = raw[k]; break;\n            case STBI__F_paeth_first: cur[k] = raw[k]; break;\n         }\n      }\n\n      if (depth == 8) {\n         if (img_n != out_n)\n            cur[img_n] = 255; // first pixel\n         raw += img_n;\n         cur += out_n;\n         prior += out_n;\n      } else {\n         raw += 1;\n         cur += 1;\n         prior += 1;\n      }\n\n      // this is a little gross, so that we don't switch per-pixel or per-component\n      if (depth < 8 || img_n == out_n) {\n         int nk = (width - 1)*img_n;\n         #define CASE(f) \\\n             case f:     \\\n                for (k=0; k < nk; ++k)\n         switch (filter) {\n            // \"none\" filter turns into a memcpy here; make that explicit.\n            case STBI__F_none:         memcpy(cur, raw, nk); break;\n            CASE(STBI__F_sub)          cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); break;\n            CASE(STBI__F_up)           cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;\n            CASE(STBI__F_avg)          cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); break;\n            CASE(STBI__F_paeth)        cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); break;\n            CASE(STBI__F_avg_first)    cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); break;\n            CASE(STBI__F_paeth_first)  cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); break;\n         }\n         #undef CASE\n         raw += nk;\n      } else {\n         STBI_ASSERT(img_n+1 == out_n);\n         #define CASE(f) \\\n             case f:     \\\n                for (i=x-1; i >= 1; --i, cur[img_n]=255,raw+=img_n,cur+=out_n,prior+=out_n) \\\n                   for (k=0; k < img_n; ++k)\n         switch (filter) {\n            CASE(STBI__F_none)         cur[k] = raw[k]; break;\n            CASE(STBI__F_sub)          cur[k] = STBI__BYTECAST(raw[k] + cur[k-out_n]); break;\n            CASE(STBI__F_up)           cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;\n            CASE(STBI__F_avg)          cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-out_n])>>1)); break;\n            CASE(STBI__F_paeth)        cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-out_n],prior[k],prior[k-out_n])); break;\n            CASE(STBI__F_avg_first)    cur[k] = STBI__BYTECAST(raw[k] + (cur[k-out_n] >> 1)); break;\n            CASE(STBI__F_paeth_first)  cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-out_n],0,0)); break;\n         }\n         #undef CASE\n      }\n   }\n\n   // we make a separate pass to expand bits to pixels; for performance,\n   // this could run two scanlines behind the above code, so it won't\n   // intefere with filtering but will still be in the cache.\n   if (depth < 8) {\n      for (j=0; j < y; ++j) {\n         stbi_uc *cur = a->out + stride*j;\n         stbi_uc *in  = a->out + stride*j + x*out_n - img_width_bytes;\n         // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit\n         // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop\n         stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range\n\n         // note that the final byte might overshoot and write more data than desired.\n         // we can allocate enough data that this never writes out of memory, but it\n         // could also overwrite the next scanline. can it overwrite non-empty data\n         // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel.\n         // so we need to explicitly clamp the final ones\n\n         if (depth == 4) {\n            for (k=x*img_n; k >= 2; k-=2, ++in) {\n               *cur++ = scale * ((*in >> 4)       );\n               *cur++ = scale * ((*in     ) & 0x0f);\n            }\n            if (k > 0) *cur++ = scale * ((*in >> 4)       );\n         } else if (depth == 2) {\n            for (k=x*img_n; k >= 4; k-=4, ++in) {\n               *cur++ = scale * ((*in >> 6)       );\n               *cur++ = scale * ((*in >> 4) & 0x03);\n               *cur++ = scale * ((*in >> 2) & 0x03);\n               *cur++ = scale * ((*in     ) & 0x03);\n            }\n            if (k > 0) *cur++ = scale * ((*in >> 6)       );\n            if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03);\n            if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03);\n         } else if (depth == 1) {\n            for (k=x*img_n; k >= 8; k-=8, ++in) {\n               *cur++ = scale * ((*in >> 7)       );\n               *cur++ = scale * ((*in >> 6) & 0x01);\n               *cur++ = scale * ((*in >> 5) & 0x01);\n               *cur++ = scale * ((*in >> 4) & 0x01);\n               *cur++ = scale * ((*in >> 3) & 0x01);\n               *cur++ = scale * ((*in >> 2) & 0x01);\n               *cur++ = scale * ((*in >> 1) & 0x01);\n               *cur++ = scale * ((*in     ) & 0x01);\n            }\n            if (k > 0) *cur++ = scale * ((*in >> 7)       );\n            if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01);\n            if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01);\n            if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01);\n            if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01);\n            if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01);\n            if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01);\n         }\n         if (img_n != out_n) {\n            int q;\n            // insert alpha = 255\n            cur = a->out + stride*j;\n            if (img_n == 1) {\n               for (q=x-1; q >= 0; --q) {\n                  cur[q*2+1] = 255;\n                  cur[q*2+0] = cur[q];\n               }\n            } else {\n               STBI_ASSERT(img_n == 3);\n               for (q=x-1; q >= 0; --q) {\n                  cur[q*4+3] = 255;\n                  cur[q*4+2] = cur[q*3+2];\n                  cur[q*4+1] = cur[q*3+1];\n                  cur[q*4+0] = cur[q*3+0];\n               }\n            }\n         }\n      }\n   }\n\n   return 1;\n}\n\nstatic int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced)\n{\n   stbi_uc *final;\n   int p;\n   if (!interlaced)\n      return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color);\n\n   // de-interlacing\n   final = (stbi_uc *) stbi__malloc(a->s->img_x * a->s->img_y * out_n);\n   for (p=0; p < 7; ++p) {\n      int xorig[] = { 0,4,0,2,0,1,0 };\n      int yorig[] = { 0,0,4,0,2,0,1 };\n      int xspc[]  = { 8,8,4,4,2,2,1 };\n      int yspc[]  = { 8,8,8,4,4,2,2 };\n      int i,j,x,y;\n      // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1\n      x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p];\n      y = (a->s->img_y - yorig[p] + yspc[p]-1) / yspc[p];\n      if (x && y) {\n         stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y;\n         if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) {\n            STBI_FREE(final);\n            return 0;\n         }\n         for (j=0; j < y; ++j) {\n            for (i=0; i < x; ++i) {\n               int out_y = j*yspc[p]+yorig[p];\n               int out_x = i*xspc[p]+xorig[p];\n               memcpy(final + out_y*a->s->img_x*out_n + out_x*out_n,\n                      a->out + (j*x+i)*out_n, out_n);\n            }\n         }\n         STBI_FREE(a->out);\n         image_data += img_len;\n         image_data_len -= img_len;\n      }\n   }\n   a->out = final;\n\n   return 1;\n}\n\nstatic int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int out_n)\n{\n   stbi__context *s = z->s;\n   stbi__uint32 i, pixel_count = s->img_x * s->img_y;\n   stbi_uc *p = z->out;\n\n   // compute color-based transparency, assuming we've\n   // already got 255 as the alpha value in the output\n   STBI_ASSERT(out_n == 2 || out_n == 4);\n\n   if (out_n == 2) {\n      for (i=0; i < pixel_count; ++i) {\n         p[1] = (p[0] == tc[0] ? 0 : 255);\n         p += 2;\n      }\n   } else {\n      for (i=0; i < pixel_count; ++i) {\n         if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2])\n            p[3] = 0;\n         p += 4;\n      }\n   }\n   return 1;\n}\n\nstatic int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int pal_img_n)\n{\n   stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y;\n   stbi_uc *p, *temp_out, *orig = a->out;\n\n   p = (stbi_uc *) stbi__malloc(pixel_count * pal_img_n);\n   if (p == NULL) return stbi__err(\"outofmem\", \"Out of memory\");\n\n   // between here and free(out) below, exitting would leak\n   temp_out = p;\n\n   if (pal_img_n == 3) {\n      for (i=0; i < pixel_count; ++i) {\n         int n = orig[i]*4;\n         p[0] = palette[n  ];\n         p[1] = palette[n+1];\n         p[2] = palette[n+2];\n         p += 3;\n      }\n   } else {\n      for (i=0; i < pixel_count; ++i) {\n         int n = orig[i]*4;\n         p[0] = palette[n  ];\n         p[1] = palette[n+1];\n         p[2] = palette[n+2];\n         p[3] = palette[n+3];\n         p += 4;\n      }\n   }\n   STBI_FREE(a->out);\n   a->out = temp_out;\n\n   STBI_NOTUSED(len);\n\n   return 1;\n}\n\nstatic int stbi__unpremultiply_on_load = 0;\nstatic int stbi__de_iphone_flag = 0;\n\nSTBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply)\n{\n   stbi__unpremultiply_on_load = flag_true_if_should_unpremultiply;\n}\n\nSTBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert)\n{\n   stbi__de_iphone_flag = flag_true_if_should_convert;\n}\n\nstatic void stbi__de_iphone(stbi__png *z)\n{\n   stbi__context *s = z->s;\n   stbi__uint32 i, pixel_count = s->img_x * s->img_y;\n   stbi_uc *p = z->out;\n\n   if (s->img_out_n == 3) {  // convert bgr to rgb\n      for (i=0; i < pixel_count; ++i) {\n         stbi_uc t = p[0];\n         p[0] = p[2];\n         p[2] = t;\n         p += 3;\n      }\n   } else {\n      STBI_ASSERT(s->img_out_n == 4);\n      if (stbi__unpremultiply_on_load) {\n         // convert bgr to rgb and unpremultiply\n         for (i=0; i < pixel_count; ++i) {\n            stbi_uc a = p[3];\n            stbi_uc t = p[0];\n            if (a) {\n               p[0] = p[2] * 255 / a;\n               p[1] = p[1] * 255 / a;\n               p[2] =  t   * 255 / a;\n            } else {\n               p[0] = p[2];\n               p[2] = t;\n            }\n            p += 4;\n         }\n      } else {\n         // convert bgr to rgb\n         for (i=0; i < pixel_count; ++i) {\n            stbi_uc t = p[0];\n            p[0] = p[2];\n            p[2] = t;\n            p += 4;\n         }\n      }\n   }\n}\n\n#define STBI__PNG_TYPE(a,b,c,d)  (((a) << 24) + ((b) << 16) + ((c) << 8) + (d))\n\nstatic int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)\n{\n   stbi_uc palette[1024], pal_img_n=0;\n   stbi_uc has_trans=0, tc[3];\n   stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0;\n   int first=1,k,interlace=0, color=0, depth=0, is_iphone=0;\n   stbi__context *s = z->s;\n\n   z->expanded = NULL;\n   z->idata = NULL;\n   z->out = NULL;\n\n   if (!stbi__check_png_header(s)) return 0;\n\n   if (scan == STBI__SCAN_type) return 1;\n\n   for (;;) {\n      stbi__pngchunk c = stbi__get_chunk_header(s);\n      switch (c.type) {\n         case STBI__PNG_TYPE('C','g','B','I'):\n            is_iphone = 1;\n            stbi__skip(s, c.length);\n            break;\n         case STBI__PNG_TYPE('I','H','D','R'): {\n            int comp,filter;\n            if (!first) return stbi__err(\"multiple IHDR\",\"Corrupt PNG\");\n            first = 0;\n            if (c.length != 13) return stbi__err(\"bad IHDR len\",\"Corrupt PNG\");\n            s->img_x = stbi__get32be(s); if (s->img_x > (1 << 24)) return stbi__err(\"too large\",\"Very large image (corrupt?)\");\n            s->img_y = stbi__get32be(s); if (s->img_y > (1 << 24)) return stbi__err(\"too large\",\"Very large image (corrupt?)\");\n            depth = stbi__get8(s);  if (depth != 1 && depth != 2 && depth != 4 && depth != 8)  return stbi__err(\"1/2/4/8-bit only\",\"PNG not supported: 1/2/4/8-bit only\");\n            color = stbi__get8(s);  if (color > 6)         return stbi__err(\"bad ctype\",\"Corrupt PNG\");\n            if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err(\"bad ctype\",\"Corrupt PNG\");\n            comp  = stbi__get8(s);  if (comp) return stbi__err(\"bad comp method\",\"Corrupt PNG\");\n            filter= stbi__get8(s);  if (filter) return stbi__err(\"bad filter method\",\"Corrupt PNG\");\n            interlace = stbi__get8(s); if (interlace>1) return stbi__err(\"bad interlace method\",\"Corrupt PNG\");\n            if (!s->img_x || !s->img_y) return stbi__err(\"0-pixel image\",\"Corrupt PNG\");\n            if (!pal_img_n) {\n               s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0);\n               if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err(\"too large\", \"Image too large to decode\");\n               if (scan == STBI__SCAN_header) return 1;\n            } else {\n               // if paletted, then pal_n is our final components, and\n               // img_n is # components to decompress/filter.\n               s->img_n = 1;\n               if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err(\"too large\",\"Corrupt PNG\");\n               // if SCAN_header, have to scan to see if we have a tRNS\n            }\n            break;\n         }\n\n         case STBI__PNG_TYPE('P','L','T','E'):  {\n            if (first) return stbi__err(\"first not IHDR\", \"Corrupt PNG\");\n            if (c.length > 256*3) return stbi__err(\"invalid PLTE\",\"Corrupt PNG\");\n            pal_len = c.length / 3;\n            if (pal_len * 3 != c.length) return stbi__err(\"invalid PLTE\",\"Corrupt PNG\");\n            for (i=0; i < pal_len; ++i) {\n               palette[i*4+0] = stbi__get8(s);\n               palette[i*4+1] = stbi__get8(s);\n               palette[i*4+2] = stbi__get8(s);\n               palette[i*4+3] = 255;\n            }\n            break;\n         }\n\n         case STBI__PNG_TYPE('t','R','N','S'): {\n            if (first) return stbi__err(\"first not IHDR\", \"Corrupt PNG\");\n            if (z->idata) return stbi__err(\"tRNS after IDAT\",\"Corrupt PNG\");\n            if (pal_img_n) {\n               if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; }\n               if (pal_len == 0) return stbi__err(\"tRNS before PLTE\",\"Corrupt PNG\");\n               if (c.length > pal_len) return stbi__err(\"bad tRNS len\",\"Corrupt PNG\");\n               pal_img_n = 4;\n               for (i=0; i < c.length; ++i)\n                  palette[i*4+3] = stbi__get8(s);\n            } else {\n               if (!(s->img_n & 1)) return stbi__err(\"tRNS with alpha\",\"Corrupt PNG\");\n               if (c.length != (stbi__uint32) s->img_n*2) return stbi__err(\"bad tRNS len\",\"Corrupt PNG\");\n               has_trans = 1;\n               for (k=0; k < s->img_n; ++k)\n                  tc[k] = (stbi_uc) (stbi__get16be(s) & 255) * stbi__depth_scale_table[depth]; // non 8-bit images will be larger\n            }\n            break;\n         }\n\n         case STBI__PNG_TYPE('I','D','A','T'): {\n            if (first) return stbi__err(\"first not IHDR\", \"Corrupt PNG\");\n            if (pal_img_n && !pal_len) return stbi__err(\"no PLTE\",\"Corrupt PNG\");\n            if (scan == STBI__SCAN_header) { s->img_n = pal_img_n; return 1; }\n            if ((int)(ioff + c.length) < (int)ioff) return 0;\n            if (ioff + c.length > idata_limit) {\n               stbi_uc *p;\n               if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096;\n               while (ioff + c.length > idata_limit)\n                  idata_limit *= 2;\n               p = (stbi_uc *) STBI_REALLOC(z->idata, idata_limit); if (p == NULL) return stbi__err(\"outofmem\", \"Out of memory\");\n               z->idata = p;\n            }\n            if (!stbi__getn(s, z->idata+ioff,c.length)) return stbi__err(\"outofdata\",\"Corrupt PNG\");\n            ioff += c.length;\n            break;\n         }\n\n         case STBI__PNG_TYPE('I','E','N','D'): {\n            stbi__uint32 raw_len, bpl;\n            if (first) return stbi__err(\"first not IHDR\", \"Corrupt PNG\");\n            if (scan != STBI__SCAN_load) return 1;\n            if (z->idata == NULL) return stbi__err(\"no IDAT\",\"Corrupt PNG\");\n            // initial guess for decoded data size to avoid unnecessary reallocs\n            bpl = (s->img_x * depth + 7) / 8; // bytes per line, per component\n            raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */;\n            z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, raw_len, (int *) &raw_len, !is_iphone);\n            if (z->expanded == NULL) return 0; // zlib should set error\n            STBI_FREE(z->idata); z->idata = NULL;\n            if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans)\n               s->img_out_n = s->img_n+1;\n            else\n               s->img_out_n = s->img_n;\n            if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, depth, color, interlace)) return 0;\n            if (has_trans)\n               if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0;\n            if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2)\n               stbi__de_iphone(z);\n            if (pal_img_n) {\n               // pal_img_n == 3 or 4\n               s->img_n = pal_img_n; // record the actual colors we had\n               s->img_out_n = pal_img_n;\n               if (req_comp >= 3) s->img_out_n = req_comp;\n               if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n))\n                  return 0;\n            }\n            STBI_FREE(z->expanded); z->expanded = NULL;\n            return 1;\n         }\n\n         default:\n            // if critical, fail\n            if (first) return stbi__err(\"first not IHDR\", \"Corrupt PNG\");\n            if ((c.type & (1 << 29)) == 0) {\n               #ifndef STBI_NO_FAILURE_STRINGS\n               // not threadsafe\n               static char invalid_chunk[] = \"XXXX PNG chunk not known\";\n               invalid_chunk[0] = STBI__BYTECAST(c.type >> 24);\n               invalid_chunk[1] = STBI__BYTECAST(c.type >> 16);\n               invalid_chunk[2] = STBI__BYTECAST(c.type >>  8);\n               invalid_chunk[3] = STBI__BYTECAST(c.type >>  0);\n               #endif\n               return stbi__err(invalid_chunk, \"PNG not supported: unknown PNG chunk type\");\n            }\n            stbi__skip(s, c.length);\n            break;\n      }\n      // end of PNG chunk, read and skip CRC\n      stbi__get32be(s);\n   }\n}\n\nstatic unsigned char *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp)\n{\n   unsigned char *result=NULL;\n   if (req_comp < 0 || req_comp > 4) return stbi__errpuc(\"bad req_comp\", \"Internal error\");\n   if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) {\n      result = p->out;\n      p->out = NULL;\n      if (req_comp && req_comp != p->s->img_out_n) {\n         result = stbi__convert_format(result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y);\n         p->s->img_out_n = req_comp;\n         if (result == NULL) return result;\n      }\n      *x = p->s->img_x;\n      *y = p->s->img_y;\n      if (n) *n = p->s->img_out_n;\n   }\n   STBI_FREE(p->out);      p->out      = NULL;\n   STBI_FREE(p->expanded); p->expanded = NULL;\n   STBI_FREE(p->idata);    p->idata    = NULL;\n\n   return result;\n}\n\nstatic unsigned char *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)\n{\n   stbi__png p;\n   p.s = s;\n   return stbi__do_png(&p, x,y,comp,req_comp);\n}\n\nstatic int stbi__png_test(stbi__context *s)\n{\n   int r;\n   r = stbi__check_png_header(s);\n   stbi__rewind(s);\n   return r;\n}\n\nstatic int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp)\n{\n   if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) {\n      stbi__rewind( p->s );\n      return 0;\n   }\n   if (x) *x = p->s->img_x;\n   if (y) *y = p->s->img_y;\n   if (comp) *comp = p->s->img_n;\n   return 1;\n}\n\nstatic int stbi__png_info(stbi__context *s, int *x, int *y, int *comp)\n{\n   stbi__png p;\n   p.s = s;\n   return stbi__png_info_raw(&p, x, y, comp);\n}\n#endif\n\n// Microsoft/Windows BMP image\n\n#ifndef STBI_NO_BMP\nstatic int stbi__bmp_test_raw(stbi__context *s)\n{\n   int r;\n   int sz;\n   if (stbi__get8(s) != 'B') return 0;\n   if (stbi__get8(s) != 'M') return 0;\n   stbi__get32le(s); // discard filesize\n   stbi__get16le(s); // discard reserved\n   stbi__get16le(s); // discard reserved\n   stbi__get32le(s); // discard data offset\n   sz = stbi__get32le(s);\n   r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124);\n   return r;\n}\n\nstatic int stbi__bmp_test(stbi__context *s)\n{\n   int r = stbi__bmp_test_raw(s);\n   stbi__rewind(s);\n   return r;\n}\n\n\n// returns 0..31 for the highest set bit\nstatic int stbi__high_bit(unsigned int z)\n{\n   int n=0;\n   if (z == 0) return -1;\n   if (z >= 0x10000) n += 16, z >>= 16;\n   if (z >= 0x00100) n +=  8, z >>=  8;\n   if (z >= 0x00010) n +=  4, z >>=  4;\n   if (z >= 0x00004) n +=  2, z >>=  2;\n   if (z >= 0x00002) n +=  1, z >>=  1;\n   return n;\n}\n\nstatic int stbi__bitcount(unsigned int a)\n{\n   a = (a & 0x55555555) + ((a >>  1) & 0x55555555); // max 2\n   a = (a & 0x33333333) + ((a >>  2) & 0x33333333); // max 4\n   a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits\n   a = (a + (a >> 8)); // max 16 per 8 bits\n   a = (a + (a >> 16)); // max 32 per 8 bits\n   return a & 0xff;\n}\n\nstatic int stbi__shiftsigned(int v, int shift, int bits)\n{\n   int result;\n   int z=0;\n\n   if (shift < 0) v <<= -shift;\n   else v >>= shift;\n   result = v;\n\n   z = bits;\n   while (z < 8) {\n      result += v >> z;\n      z += bits;\n   }\n   return result;\n}\n\nstatic stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)\n{\n   stbi_uc *out;\n   unsigned int mr=0,mg=0,mb=0,ma=0, all_a=255;\n   stbi_uc pal[256][4];\n   int psize=0,i,j,compress=0,width;\n   int bpp, flip_vertically, pad, target, offset, hsz;\n   if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc(\"not BMP\", \"Corrupt BMP\");\n   stbi__get32le(s); // discard filesize\n   stbi__get16le(s); // discard reserved\n   stbi__get16le(s); // discard reserved\n   offset = stbi__get32le(s);\n   hsz = stbi__get32le(s);\n   if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc(\"unknown BMP\", \"BMP type not supported: unknown\");\n   if (hsz == 12) {\n      s->img_x = stbi__get16le(s);\n      s->img_y = stbi__get16le(s);\n   } else {\n      s->img_x = stbi__get32le(s);\n      s->img_y = stbi__get32le(s);\n   }\n   if (stbi__get16le(s) != 1) return stbi__errpuc(\"bad BMP\", \"bad BMP\");\n   bpp = stbi__get16le(s);\n   if (bpp == 1) return stbi__errpuc(\"monochrome\", \"BMP type not supported: 1-bit\");\n   flip_vertically = ((int) s->img_y) > 0;\n   s->img_y = abs((int) s->img_y);\n   if (hsz == 12) {\n      if (bpp < 24)\n         psize = (offset - 14 - 24) / 3;\n   } else {\n      compress = stbi__get32le(s);\n      if (compress == 1 || compress == 2) return stbi__errpuc(\"BMP RLE\", \"BMP type not supported: RLE\");\n      stbi__get32le(s); // discard sizeof\n      stbi__get32le(s); // discard hres\n      stbi__get32le(s); // discard vres\n      stbi__get32le(s); // discard colorsused\n      stbi__get32le(s); // discard max important\n      if (hsz == 40 || hsz == 56) {\n         if (hsz == 56) {\n            stbi__get32le(s);\n            stbi__get32le(s);\n            stbi__get32le(s);\n            stbi__get32le(s);\n         }\n         if (bpp == 16 || bpp == 32) {\n            mr = mg = mb = 0;\n            if (compress == 0) {\n               if (bpp == 32) {\n                  mr = 0xffu << 16;\n                  mg = 0xffu <<  8;\n                  mb = 0xffu <<  0;\n                  ma = 0xffu << 24;\n                  all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0\n               } else {\n                  mr = 31u << 10;\n                  mg = 31u <<  5;\n                  mb = 31u <<  0;\n               }\n            } else if (compress == 3) {\n               mr = stbi__get32le(s);\n               mg = stbi__get32le(s);\n               mb = stbi__get32le(s);\n               // not documented, but generated by photoshop and handled by mspaint\n               if (mr == mg && mg == mb) {\n                  // ?!?!?\n                  return stbi__errpuc(\"bad BMP\", \"bad BMP\");\n               }\n            } else\n               return stbi__errpuc(\"bad BMP\", \"bad BMP\");\n         }\n      } else {\n         STBI_ASSERT(hsz == 108 || hsz == 124);\n         mr = stbi__get32le(s);\n         mg = stbi__get32le(s);\n         mb = stbi__get32le(s);\n         ma = stbi__get32le(s);\n         stbi__get32le(s); // discard color space\n         for (i=0; i < 12; ++i)\n            stbi__get32le(s); // discard color space parameters\n         if (hsz == 124) {\n            stbi__get32le(s); // discard rendering intent\n            stbi__get32le(s); // discard offset of profile data\n            stbi__get32le(s); // discard size of profile data\n            stbi__get32le(s); // discard reserved\n         }\n      }\n      if (bpp < 16)\n         psize = (offset - 14 - hsz) >> 2;\n   }\n   s->img_n = ma ? 4 : 3;\n   if (req_comp && req_comp >= 3) // we can directly decode 3 or 4\n      target = req_comp;\n   else\n      target = s->img_n; // if they want monochrome, we'll post-convert\n   out = (stbi_uc *) stbi__malloc(target * s->img_x * s->img_y);\n   if (!out) return stbi__errpuc(\"outofmem\", \"Out of memory\");\n   if (bpp < 16) {\n      int z=0;\n      if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc(\"invalid\", \"Corrupt BMP\"); }\n      for (i=0; i < psize; ++i) {\n         pal[i][2] = stbi__get8(s);\n         pal[i][1] = stbi__get8(s);\n         pal[i][0] = stbi__get8(s);\n         if (hsz != 12) stbi__get8(s);\n         pal[i][3] = 255;\n      }\n      stbi__skip(s, offset - 14 - hsz - psize * (hsz == 12 ? 3 : 4));\n      if (bpp == 4) width = (s->img_x + 1) >> 1;\n      else if (bpp == 8) width = s->img_x;\n      else { STBI_FREE(out); return stbi__errpuc(\"bad bpp\", \"Corrupt BMP\"); }\n      pad = (-width)&3;\n      for (j=0; j < (int) s->img_y; ++j) {\n         for (i=0; i < (int) s->img_x; i += 2) {\n            int v=stbi__get8(s),v2=0;\n            if (bpp == 4) {\n               v2 = v & 15;\n               v >>= 4;\n            }\n            out[z++] = pal[v][0];\n            out[z++] = pal[v][1];\n            out[z++] = pal[v][2];\n            if (target == 4) out[z++] = 255;\n            if (i+1 == (int) s->img_x) break;\n            v = (bpp == 8) ? stbi__get8(s) : v2;\n            out[z++] = pal[v][0];\n            out[z++] = pal[v][1];\n            out[z++] = pal[v][2];\n            if (target == 4) out[z++] = 255;\n         }\n         stbi__skip(s, pad);\n      }\n   } else {\n      int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0;\n      int z = 0;\n      int easy=0;\n      stbi__skip(s, offset - 14 - hsz);\n      if (bpp == 24) width = 3 * s->img_x;\n      else if (bpp == 16) width = 2*s->img_x;\n      else /* bpp = 32 and pad = 0 */ width=0;\n      pad = (-width) & 3;\n      if (bpp == 24) {\n         easy = 1;\n      } else if (bpp == 32) {\n         if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000)\n            easy = 2;\n      }\n      if (!easy) {\n         if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc(\"bad masks\", \"Corrupt BMP\"); }\n         // right shift amt to put high bit in position #7\n         rshift = stbi__high_bit(mr)-7; rcount = stbi__bitcount(mr);\n         gshift = stbi__high_bit(mg)-7; gcount = stbi__bitcount(mg);\n         bshift = stbi__high_bit(mb)-7; bcount = stbi__bitcount(mb);\n         ashift = stbi__high_bit(ma)-7; acount = stbi__bitcount(ma);\n      }\n      for (j=0; j < (int) s->img_y; ++j) {\n         if (easy) {\n            for (i=0; i < (int) s->img_x; ++i) {\n               unsigned char a;\n               out[z+2] = stbi__get8(s);\n               out[z+1] = stbi__get8(s);\n               out[z+0] = stbi__get8(s);\n               z += 3;\n               a = (easy == 2 ? stbi__get8(s) : 255);\n               all_a |= a;\n               if (target == 4) out[z++] = a;\n            }\n         } else {\n            for (i=0; i < (int) s->img_x; ++i) {\n               stbi__uint32 v = (bpp == 16 ? (stbi__uint32) stbi__get16le(s) : stbi__get32le(s));\n               int a;\n               out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount));\n               out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount));\n               out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount));\n               a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255);\n               all_a |= a;\n               if (target == 4) out[z++] = STBI__BYTECAST(a);\n            }\n         }\n         stbi__skip(s, pad);\n      }\n   }\n   \n   // if alpha channel is all 0s, replace with all 255s\n   if (target == 4 && all_a == 0)\n      for (i=4*s->img_x*s->img_y-1; i >= 0; i -= 4)\n         out[i] = 255;\n\n   if (flip_vertically) {\n      stbi_uc t;\n      for (j=0; j < (int) s->img_y>>1; ++j) {\n         stbi_uc *p1 = out +      j     *s->img_x*target;\n         stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target;\n         for (i=0; i < (int) s->img_x*target; ++i) {\n            t = p1[i], p1[i] = p2[i], p2[i] = t;\n         }\n      }\n   }\n\n   if (req_comp && req_comp != target) {\n      out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y);\n      if (out == NULL) return out; // stbi__convert_format frees input on failure\n   }\n\n   *x = s->img_x;\n   *y = s->img_y;\n   if (comp) *comp = s->img_n;\n   return out;\n}\n#endif\n\n// Targa Truevision - TGA\n// by Jonathan Dummer\n#ifndef STBI_NO_TGA\nstatic int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp)\n{\n    int tga_w, tga_h, tga_comp;\n    int sz;\n    stbi__get8(s);                   // discard Offset\n    sz = stbi__get8(s);              // color type\n    if( sz > 1 ) {\n        stbi__rewind(s);\n        return 0;      // only RGB or indexed allowed\n    }\n    sz = stbi__get8(s);              // image type\n    // only RGB or grey allowed, +/- RLE\n    if ((sz != 1) && (sz != 2) && (sz != 3) && (sz != 9) && (sz != 10) && (sz != 11)) return 0;\n    stbi__skip(s,9);\n    tga_w = stbi__get16le(s);\n    if( tga_w < 1 ) {\n        stbi__rewind(s);\n        return 0;   // test width\n    }\n    tga_h = stbi__get16le(s);\n    if( tga_h < 1 ) {\n        stbi__rewind(s);\n        return 0;   // test height\n    }\n    sz = stbi__get8(s);               // bits per pixel\n    // only RGB or RGBA or grey allowed\n    if ((sz != 8) && (sz != 16) && (sz != 24) && (sz != 32)) {\n        stbi__rewind(s);\n        return 0;\n    }\n    tga_comp = sz;\n    if (x) *x = tga_w;\n    if (y) *y = tga_h;\n    if (comp) *comp = tga_comp / 8;\n    return 1;                   // seems to have passed everything\n}\n\nstatic int stbi__tga_test(stbi__context *s)\n{\n   int res;\n   int sz;\n   stbi__get8(s);      //   discard Offset\n   sz = stbi__get8(s);   //   color type\n   if ( sz > 1 ) return 0;   //   only RGB or indexed allowed\n   sz = stbi__get8(s);   //   image type\n   if ( (sz != 1) && (sz != 2) && (sz != 3) && (sz != 9) && (sz != 10) && (sz != 11) ) return 0;   //   only RGB or grey allowed, +/- RLE\n   stbi__get16be(s);      //   discard palette start\n   stbi__get16be(s);      //   discard palette length\n   stbi__get8(s);         //   discard bits per palette color entry\n   stbi__get16be(s);      //   discard x origin\n   stbi__get16be(s);      //   discard y origin\n   if ( stbi__get16be(s) < 1 ) return 0;      //   test width\n   if ( stbi__get16be(s) < 1 ) return 0;      //   test height\n   sz = stbi__get8(s);   //   bits per pixel\n   if ( (sz != 8) && (sz != 16) && (sz != 24) && (sz != 32) )\n      res = 0;\n   else\n      res = 1;\n   stbi__rewind(s);\n   return res;\n}\n\nstatic stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)\n{\n   //   read in the TGA header stuff\n   int tga_offset = stbi__get8(s);\n   int tga_indexed = stbi__get8(s);\n   int tga_image_type = stbi__get8(s);\n   int tga_is_RLE = 0;\n   int tga_palette_start = stbi__get16le(s);\n   int tga_palette_len = stbi__get16le(s);\n   int tga_palette_bits = stbi__get8(s);\n   int tga_x_origin = stbi__get16le(s);\n   int tga_y_origin = stbi__get16le(s);\n   int tga_width = stbi__get16le(s);\n   int tga_height = stbi__get16le(s);\n   int tga_bits_per_pixel = stbi__get8(s);\n   int tga_comp = tga_bits_per_pixel / 8;\n   int tga_inverted = stbi__get8(s);\n   //   image data\n   unsigned char *tga_data;\n   unsigned char *tga_palette = NULL;\n   int i, j;\n   unsigned char raw_data[4];\n   int RLE_count = 0;\n   int RLE_repeating = 0;\n   int read_next_pixel = 1;\n\n   //   do a tiny bit of precessing\n   if ( tga_image_type >= 8 )\n   {\n      tga_image_type -= 8;\n      tga_is_RLE = 1;\n   }\n   /* int tga_alpha_bits = tga_inverted & 15; */\n   tga_inverted = 1 - ((tga_inverted >> 5) & 1);\n\n   //   error check\n   if ( //(tga_indexed) ||\n      (tga_width < 1) || (tga_height < 1) ||\n      (tga_image_type < 1) || (tga_image_type > 3) ||\n      ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16) &&\n      (tga_bits_per_pixel != 24) && (tga_bits_per_pixel != 32))\n      )\n   {\n      return NULL; // we don't report this as a bad TGA because we don't even know if it's TGA\n   }\n\n   //   If I'm paletted, then I'll use the number of bits from the palette\n   if ( tga_indexed )\n   {\n      tga_comp = tga_palette_bits / 8;\n   }\n\n   //   tga info\n   *x = tga_width;\n   *y = tga_height;\n   if (comp) *comp = tga_comp;\n\n   tga_data = (unsigned char*)stbi__malloc( (size_t)tga_width * tga_height * tga_comp );\n   if (!tga_data) return stbi__errpuc(\"outofmem\", \"Out of memory\");\n\n   // skip to the data's starting position (offset usually = 0)\n   stbi__skip(s, tga_offset );\n\n   if ( !tga_indexed && !tga_is_RLE) {\n      for (i=0; i < tga_height; ++i) {\n         int row = tga_inverted ? tga_height -i - 1 : i;\n         stbi_uc *tga_row = tga_data + row*tga_width*tga_comp;\n         stbi__getn(s, tga_row, tga_width * tga_comp);\n      }\n   } else  {\n      //   do I need to load a palette?\n      if ( tga_indexed)\n      {\n         //   any data to skip? (offset usually = 0)\n         stbi__skip(s, tga_palette_start );\n         //   load the palette\n         tga_palette = (unsigned char*)stbi__malloc( tga_palette_len * tga_palette_bits / 8 );\n         if (!tga_palette) {\n            STBI_FREE(tga_data);\n            return stbi__errpuc(\"outofmem\", \"Out of memory\");\n         }\n         if (!stbi__getn(s, tga_palette, tga_palette_len * tga_palette_bits / 8 )) {\n            STBI_FREE(tga_data);\n            STBI_FREE(tga_palette);\n            return stbi__errpuc(\"bad palette\", \"Corrupt TGA\");\n         }\n      }\n      //   load the data\n      for (i=0; i < tga_width * tga_height; ++i)\n      {\n         //   if I'm in RLE mode, do I need to get a RLE stbi__pngchunk?\n         if ( tga_is_RLE )\n         {\n            if ( RLE_count == 0 )\n            {\n               //   yep, get the next byte as a RLE command\n               int RLE_cmd = stbi__get8(s);\n               RLE_count = 1 + (RLE_cmd & 127);\n               RLE_repeating = RLE_cmd >> 7;\n               read_next_pixel = 1;\n            } else if ( !RLE_repeating )\n            {\n               read_next_pixel = 1;\n            }\n         } else\n         {\n            read_next_pixel = 1;\n         }\n         //   OK, if I need to read a pixel, do it now\n         if ( read_next_pixel )\n         {\n            //   load however much data we did have\n            if ( tga_indexed )\n            {\n               //   read in 1 byte, then perform the lookup\n               int pal_idx = stbi__get8(s);\n               if ( pal_idx >= tga_palette_len )\n               {\n                  //   invalid index\n                  pal_idx = 0;\n               }\n               pal_idx *= tga_bits_per_pixel / 8;\n               for (j = 0; j*8 < tga_bits_per_pixel; ++j)\n               {\n                  raw_data[j] = tga_palette[pal_idx+j];\n               }\n            } else\n            {\n               //   read in the data raw\n               for (j = 0; j*8 < tga_bits_per_pixel; ++j)\n               {\n                  raw_data[j] = stbi__get8(s);\n               }\n            }\n            //   clear the reading flag for the next pixel\n            read_next_pixel = 0;\n         } // end of reading a pixel\n\n         // copy data\n         for (j = 0; j < tga_comp; ++j)\n           tga_data[i*tga_comp+j] = raw_data[j];\n\n         //   in case we're in RLE mode, keep counting down\n         --RLE_count;\n      }\n      //   do I need to invert the image?\n      if ( tga_inverted )\n      {\n         for (j = 0; j*2 < tga_height; ++j)\n         {\n            int index1 = j * tga_width * tga_comp;\n            int index2 = (tga_height - 1 - j) * tga_width * tga_comp;\n            for (i = tga_width * tga_comp; i > 0; --i)\n            {\n               unsigned char temp = tga_data[index1];\n               tga_data[index1] = tga_data[index2];\n               tga_data[index2] = temp;\n               ++index1;\n               ++index2;\n            }\n         }\n      }\n      //   clear my palette, if I had one\n      if ( tga_palette != NULL )\n      {\n         STBI_FREE( tga_palette );\n      }\n   }\n\n   // swap RGB\n   if (tga_comp >= 3)\n   {\n      unsigned char* tga_pixel = tga_data;\n      for (i=0; i < tga_width * tga_height; ++i)\n      {\n         unsigned char temp = tga_pixel[0];\n         tga_pixel[0] = tga_pixel[2];\n         tga_pixel[2] = temp;\n         tga_pixel += tga_comp;\n      }\n   }\n\n   // convert to target component count\n   if (req_comp && req_comp != tga_comp)\n      tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height);\n\n   //   the things I do to get rid of an error message, and yet keep\n   //   Microsoft's C compilers happy... [8^(\n   tga_palette_start = tga_palette_len = tga_palette_bits =\n         tga_x_origin = tga_y_origin = 0;\n   //   OK, done\n   return tga_data;\n}\n#endif\n\n// *************************************************************************************************\n// Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB\n\n#ifndef STBI_NO_PSD\nstatic int stbi__psd_test(stbi__context *s)\n{\n   int r = (stbi__get32be(s) == 0x38425053);\n   stbi__rewind(s);\n   return r;\n}\n\nstatic stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)\n{\n   int   pixelCount;\n   int channelCount, compression;\n   int channel, i, count, len;\n   int bitdepth;\n   int w,h;\n   stbi_uc *out;\n\n   // Check identifier\n   if (stbi__get32be(s) != 0x38425053)   // \"8BPS\"\n      return stbi__errpuc(\"not PSD\", \"Corrupt PSD image\");\n\n   // Check file type version.\n   if (stbi__get16be(s) != 1)\n      return stbi__errpuc(\"wrong version\", \"Unsupported version of PSD image\");\n\n   // Skip 6 reserved bytes.\n   stbi__skip(s, 6 );\n\n   // Read the number of channels (R, G, B, A, etc).\n   channelCount = stbi__get16be(s);\n   if (channelCount < 0 || channelCount > 16)\n      return stbi__errpuc(\"wrong channel count\", \"Unsupported number of channels in PSD image\");\n\n   // Read the rows and columns of the image.\n   h = stbi__get32be(s);\n   w = stbi__get32be(s);\n\n   // Make sure the depth is 8 bits.\n   bitdepth = stbi__get16be(s);\n   if (bitdepth != 8 && bitdepth != 16)\n      return stbi__errpuc(\"unsupported bit depth\", \"PSD bit depth is not 8 or 16 bit\");\n\n   // Make sure the color mode is RGB.\n   // Valid options are:\n   //   0: Bitmap\n   //   1: Grayscale\n   //   2: Indexed color\n   //   3: RGB color\n   //   4: CMYK color\n   //   7: Multichannel\n   //   8: Duotone\n   //   9: Lab color\n   if (stbi__get16be(s) != 3)\n      return stbi__errpuc(\"wrong color format\", \"PSD is not in RGB color format\");\n\n   // Skip the Mode Data.  (It's the palette for indexed color; other info for other modes.)\n   stbi__skip(s,stbi__get32be(s) );\n\n   // Skip the image resources.  (resolution, pen tool paths, etc)\n   stbi__skip(s, stbi__get32be(s) );\n\n   // Skip the reserved data.\n   stbi__skip(s, stbi__get32be(s) );\n\n   // Find out if the data is compressed.\n   // Known values:\n   //   0: no compression\n   //   1: RLE compressed\n   compression = stbi__get16be(s);\n   if (compression > 1)\n      return stbi__errpuc(\"bad compression\", \"PSD has an unknown compression format\");\n\n   // Create the destination image.\n   out = (stbi_uc *) stbi__malloc(4 * w*h);\n   if (!out) return stbi__errpuc(\"outofmem\", \"Out of memory\");\n   pixelCount = w*h;\n\n   // Initialize the data to zero.\n   //memset( out, 0, pixelCount * 4 );\n\n   // Finally, the image data.\n   if (compression) {\n      // RLE as used by .PSD and .TIFF\n      // Loop until you get the number of unpacked bytes you are expecting:\n      //     Read the next source byte into n.\n      //     If n is between 0 and 127 inclusive, copy the next n+1 bytes literally.\n      //     Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times.\n      //     Else if n is 128, noop.\n      // Endloop\n\n      // The RLE-compressed data is preceeded by a 2-byte data count for each row in the data,\n      // which we're going to just skip.\n      stbi__skip(s, h * channelCount * 2 );\n\n      // Read the RLE data by channel.\n      for (channel = 0; channel < 4; channel++) {\n         stbi_uc *p;\n\n         p = out+channel;\n         if (channel >= channelCount) {\n            // Fill this channel with default data.\n            for (i = 0; i < pixelCount; i++, p += 4)\n               *p = (channel == 3 ? 255 : 0);\n         } else {\n            // Read the RLE data.\n            count = 0;\n            while (count < pixelCount) {\n               len = stbi__get8(s);\n               if (len == 128) {\n                  // No-op.\n               } else if (len < 128) {\n                  // Copy next len+1 bytes literally.\n                  len++;\n                  count += len;\n                  while (len) {\n                     *p = stbi__get8(s);\n                     p += 4;\n                     len--;\n                  }\n               } else if (len > 128) {\n                  stbi_uc   val;\n                  // Next -len+1 bytes in the dest are replicated from next source byte.\n                  // (Interpret len as a negative 8-bit int.)\n                  len ^= 0x0FF;\n                  len += 2;\n                  val = stbi__get8(s);\n                  count += len;\n                  while (len) {\n                     *p = val;\n                     p += 4;\n                     len--;\n                  }\n               }\n            }\n         }\n      }\n\n   } else {\n      // We're at the raw image data.  It's each channel in order (Red, Green, Blue, Alpha, ...)\n      // where each channel consists of an 8-bit value for each pixel in the image.\n\n      // Read the data by channel.\n      for (channel = 0; channel < 4; channel++) {\n         stbi_uc *p;\n\n         p = out + channel;\n         if (channel >= channelCount) {\n            // Fill this channel with default data.\n            stbi_uc val = channel == 3 ? 255 : 0;\n            for (i = 0; i < pixelCount; i++, p += 4)\n               *p = val;\n         } else {\n            // Read the data.\n            if (bitdepth == 16) {\n               for (i = 0; i < pixelCount; i++, p += 4)\n                  *p = (stbi_uc) (stbi__get16be(s) >> 8);\n            } else {\n               for (i = 0; i < pixelCount; i++, p += 4)\n                  *p = stbi__get8(s);\n            }\n         }\n      }\n   }\n\n   if (req_comp && req_comp != 4) {\n      out = stbi__convert_format(out, 4, req_comp, w, h);\n      if (out == NULL) return out; // stbi__convert_format frees input on failure\n   }\n\n   if (comp) *comp = 4;\n   *y = h;\n   *x = w;\n\n   return out;\n}\n#endif\n\n// *************************************************************************************************\n// Softimage PIC loader\n// by Tom Seddon\n//\n// See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format\n// See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/\n\n#ifndef STBI_NO_PIC\nstatic int stbi__pic_is4(stbi__context *s,const char *str)\n{\n   int i;\n   for (i=0; i<4; ++i)\n      if (stbi__get8(s) != (stbi_uc)str[i])\n         return 0;\n\n   return 1;\n}\n\nstatic int stbi__pic_test_core(stbi__context *s)\n{\n   int i;\n\n   if (!stbi__pic_is4(s,\"\\x53\\x80\\xF6\\x34\"))\n      return 0;\n\n   for(i=0;i<84;++i)\n      stbi__get8(s);\n\n   if (!stbi__pic_is4(s,\"PICT\"))\n      return 0;\n\n   return 1;\n}\n\ntypedef struct\n{\n   stbi_uc size,type,channel;\n} stbi__pic_packet;\n\nstatic stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest)\n{\n   int mask=0x80, i;\n\n   for (i=0; i<4; ++i, mask>>=1) {\n      if (channel & mask) {\n         if (stbi__at_eof(s)) return stbi__errpuc(\"bad file\",\"PIC file too short\");\n         dest[i]=stbi__get8(s);\n      }\n   }\n\n   return dest;\n}\n\nstatic void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src)\n{\n   int mask=0x80,i;\n\n   for (i=0;i<4; ++i, mask>>=1)\n      if (channel&mask)\n         dest[i]=src[i];\n}\n\nstatic stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int height,int *comp, stbi_uc *result)\n{\n   int act_comp=0,num_packets=0,y,chained;\n   stbi__pic_packet packets[10];\n\n   // this will (should...) cater for even some bizarre stuff like having data\n    // for the same channel in multiple packets.\n   do {\n      stbi__pic_packet *packet;\n\n      if (num_packets==sizeof(packets)/sizeof(packets[0]))\n         return stbi__errpuc(\"bad format\",\"too many packets\");\n\n      packet = &packets[num_packets++];\n\n      chained = stbi__get8(s);\n      packet->size    = stbi__get8(s);\n      packet->type    = stbi__get8(s);\n      packet->channel = stbi__get8(s);\n\n      act_comp |= packet->channel;\n\n      if (stbi__at_eof(s))          return stbi__errpuc(\"bad file\",\"file too short (reading packets)\");\n      if (packet->size != 8)  return stbi__errpuc(\"bad format\",\"packet isn't 8bpp\");\n   } while (chained);\n\n   *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel?\n\n   for(y=0; y<height; ++y) {\n      int packet_idx;\n\n      for(packet_idx=0; packet_idx < num_packets; ++packet_idx) {\n         stbi__pic_packet *packet = &packets[packet_idx];\n         stbi_uc *dest = result+y*width*4;\n\n         switch (packet->type) {\n            default:\n               return stbi__errpuc(\"bad format\",\"packet has bad compression type\");\n\n            case 0: {//uncompressed\n               int x;\n\n               for(x=0;x<width;++x, dest+=4)\n                  if (!stbi__readval(s,packet->channel,dest))\n                     return 0;\n               break;\n            }\n\n            case 1://Pure RLE\n               {\n                  int left=width, i;\n\n                  while (left>0) {\n                     stbi_uc count,value[4];\n\n                     count=stbi__get8(s);\n                     if (stbi__at_eof(s))   return stbi__errpuc(\"bad file\",\"file too short (pure read count)\");\n\n                     if (count > left)\n                        count = (stbi_uc) left;\n\n                     if (!stbi__readval(s,packet->channel,value))  return 0;\n\n                     for(i=0; i<count; ++i,dest+=4)\n                        stbi__copyval(packet->channel,dest,value);\n                     left -= count;\n                  }\n               }\n               break;\n\n            case 2: {//Mixed RLE\n               int left=width;\n               while (left>0) {\n                  int count = stbi__get8(s), i;\n                  if (stbi__at_eof(s))  return stbi__errpuc(\"bad file\",\"file too short (mixed read count)\");\n\n                  if (count >= 128) { // Repeated\n                     stbi_uc value[4];\n\n                     if (count==128)\n                        count = stbi__get16be(s);\n                     else\n                        count -= 127;\n                     if (count > left)\n                        return stbi__errpuc(\"bad file\",\"scanline overrun\");\n\n                     if (!stbi__readval(s,packet->channel,value))\n                        return 0;\n\n                     for(i=0;i<count;++i, dest += 4)\n                        stbi__copyval(packet->channel,dest,value);\n                  } else { // Raw\n                     ++count;\n                     if (count>left) return stbi__errpuc(\"bad file\",\"scanline overrun\");\n\n                     for(i=0;i<count;++i, dest+=4)\n                        if (!stbi__readval(s,packet->channel,dest))\n                           return 0;\n                  }\n                  left-=count;\n               }\n               break;\n            }\n         }\n      }\n   }\n\n   return result;\n}\n\nstatic stbi_uc *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int req_comp)\n{\n   stbi_uc *result;\n   int i, x,y;\n\n   for (i=0; i<92; ++i)\n      stbi__get8(s);\n\n   x = stbi__get16be(s);\n   y = stbi__get16be(s);\n   if (stbi__at_eof(s))  return stbi__errpuc(\"bad file\",\"file too short (pic header)\");\n   if ((1 << 28) / x < y) return stbi__errpuc(\"too large\", \"Image too large to decode\");\n\n   stbi__get32be(s); //skip `ratio'\n   stbi__get16be(s); //skip `fields'\n   stbi__get16be(s); //skip `pad'\n\n   // intermediate buffer is RGBA\n   result = (stbi_uc *) stbi__malloc(x*y*4);\n   memset(result, 0xff, x*y*4);\n\n   if (!stbi__pic_load_core(s,x,y,comp, result)) {\n      STBI_FREE(result);\n      result=0;\n   }\n   *px = x;\n   *py = y;\n   if (req_comp == 0) req_comp = *comp;\n   result=stbi__convert_format(result,4,req_comp,x,y);\n\n   return result;\n}\n\nstatic int stbi__pic_test(stbi__context *s)\n{\n   int r = stbi__pic_test_core(s);\n   stbi__rewind(s);\n   return r;\n}\n#endif\n\n// *************************************************************************************************\n// GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by stb\n\n#ifndef STBI_NO_GIF\ntypedef struct\n{\n   stbi__int16 prefix;\n   stbi_uc first;\n   stbi_uc suffix;\n} stbi__gif_lzw;\n\ntypedef struct\n{\n   int w,h;\n   stbi_uc *out, *old_out;             // output buffer (always 4 components)\n   int flags, bgindex, ratio, transparent, eflags, delay;\n   stbi_uc  pal[256][4];\n   stbi_uc lpal[256][4];\n   stbi__gif_lzw codes[4096];\n   stbi_uc *color_table;\n   int parse, step;\n   int lflags;\n   int start_x, start_y;\n   int max_x, max_y;\n   int cur_x, cur_y;\n   int line_size;\n} stbi__gif;\n\nstatic int stbi__gif_test_raw(stbi__context *s)\n{\n   int sz;\n   if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0;\n   sz = stbi__get8(s);\n   if (sz != '9' && sz != '7') return 0;\n   if (stbi__get8(s) != 'a') return 0;\n   return 1;\n}\n\nstatic int stbi__gif_test(stbi__context *s)\n{\n   int r = stbi__gif_test_raw(s);\n   stbi__rewind(s);\n   return r;\n}\n\nstatic void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp)\n{\n   int i;\n   for (i=0; i < num_entries; ++i) {\n      pal[i][2] = stbi__get8(s);\n      pal[i][1] = stbi__get8(s);\n      pal[i][0] = stbi__get8(s);\n      pal[i][3] = transp == i ? 0 : 255;\n   }\n}\n\nstatic int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info)\n{\n   stbi_uc version;\n   if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8')\n      return stbi__err(\"not GIF\", \"Corrupt GIF\");\n\n   version = stbi__get8(s);\n   if (version != '7' && version != '9')    return stbi__err(\"not GIF\", \"Corrupt GIF\");\n   if (stbi__get8(s) != 'a')                return stbi__err(\"not GIF\", \"Corrupt GIF\");\n\n   stbi__g_failure_reason = \"\";\n   g->w = stbi__get16le(s);\n   g->h = stbi__get16le(s);\n   g->flags = stbi__get8(s);\n   g->bgindex = stbi__get8(s);\n   g->ratio = stbi__get8(s);\n   g->transparent = -1;\n\n   if (comp != 0) *comp = 4;  // can't actually tell whether it's 3 or 4 until we parse the comments\n\n   if (is_info) return 1;\n\n   if (g->flags & 0x80)\n      stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1);\n\n   return 1;\n}\n\nstatic int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp)\n{\n   stbi__gif g;\n   if (!stbi__gif_header(s, &g, comp, 1)) {\n      stbi__rewind( s );\n      return 0;\n   }\n   if (x) *x = g.w;\n   if (y) *y = g.h;\n   return 1;\n}\n\nstatic void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code)\n{\n   stbi_uc *p, *c;\n\n   // recurse to decode the prefixes, since the linked-list is backwards,\n   // and working backwards through an interleaved image would be nasty\n   if (g->codes[code].prefix >= 0)\n      stbi__out_gif_code(g, g->codes[code].prefix);\n\n   if (g->cur_y >= g->max_y) return;\n\n   p = &g->out[g->cur_x + g->cur_y];\n   c = &g->color_table[g->codes[code].suffix * 4];\n\n   if (c[3] >= 128) {\n      p[0] = c[2];\n      p[1] = c[1];\n      p[2] = c[0];\n      p[3] = c[3];\n   }\n   g->cur_x += 4;\n\n   if (g->cur_x >= g->max_x) {\n      g->cur_x = g->start_x;\n      g->cur_y += g->step;\n\n      while (g->cur_y >= g->max_y && g->parse > 0) {\n         g->step = (1 << g->parse) * g->line_size;\n         g->cur_y = g->start_y + (g->step >> 1);\n         --g->parse;\n      }\n   }\n}\n\nstatic stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g)\n{\n   stbi_uc lzw_cs;\n   stbi__int32 len, init_code;\n   stbi__uint32 first;\n   stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear;\n   stbi__gif_lzw *p;\n\n   lzw_cs = stbi__get8(s);\n   if (lzw_cs > 12) return NULL;\n   clear = 1 << lzw_cs;\n   first = 1;\n   codesize = lzw_cs + 1;\n   codemask = (1 << codesize) - 1;\n   bits = 0;\n   valid_bits = 0;\n   for (init_code = 0; init_code < clear; init_code++) {\n      g->codes[init_code].prefix = -1;\n      g->codes[init_code].first = (stbi_uc) init_code;\n      g->codes[init_code].suffix = (stbi_uc) init_code;\n   }\n\n   // support no starting clear code\n   avail = clear+2;\n   oldcode = -1;\n\n   len = 0;\n   for(;;) {\n      if (valid_bits < codesize) {\n         if (len == 0) {\n            len = stbi__get8(s); // start new block\n            if (len == 0)\n               return g->out;\n         }\n         --len;\n         bits |= (stbi__int32) stbi__get8(s) << valid_bits;\n         valid_bits += 8;\n      } else {\n         stbi__int32 code = bits & codemask;\n         bits >>= codesize;\n         valid_bits -= codesize;\n         // @OPTIMIZE: is there some way we can accelerate the non-clear path?\n         if (code == clear) {  // clear code\n            codesize = lzw_cs + 1;\n            codemask = (1 << codesize) - 1;\n            avail = clear + 2;\n            oldcode = -1;\n            first = 0;\n         } else if (code == clear + 1) { // end of stream code\n            stbi__skip(s, len);\n            while ((len = stbi__get8(s)) > 0)\n               stbi__skip(s,len);\n            return g->out;\n         } else if (code <= avail) {\n            if (first) return stbi__errpuc(\"no clear code\", \"Corrupt GIF\");\n\n            if (oldcode >= 0) {\n               p = &g->codes[avail++];\n               if (avail > 4096)        return stbi__errpuc(\"too many codes\", \"Corrupt GIF\");\n               p->prefix = (stbi__int16) oldcode;\n               p->first = g->codes[oldcode].first;\n               p->suffix = (code == avail) ? p->first : g->codes[code].first;\n            } else if (code == avail)\n               return stbi__errpuc(\"illegal code in raster\", \"Corrupt GIF\");\n\n            stbi__out_gif_code(g, (stbi__uint16) code);\n\n            if ((avail & codemask) == 0 && avail <= 0x0FFF) {\n               codesize++;\n               codemask = (1 << codesize) - 1;\n            }\n\n            oldcode = code;\n         } else {\n            return stbi__errpuc(\"illegal code in raster\", \"Corrupt GIF\");\n         }\n      }\n   }\n}\n\nstatic void stbi__fill_gif_background(stbi__gif *g, int x0, int y0, int x1, int y1)\n{\n   int x, y;\n   stbi_uc *c = g->pal[g->bgindex];\n   for (y = y0; y < y1; y += 4 * g->w) {\n      for (x = x0; x < x1; x += 4) {\n         stbi_uc *p  = &g->out[y + x];\n         p[0] = c[2];\n         p[1] = c[1];\n         p[2] = c[0];\n         p[3] = 0;\n      }\n   }\n}\n\n// this function is designed to support animated gifs, although stb_image doesn't support it\nstatic stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp)\n{\n   int i;\n   stbi_uc *prev_out = 0;\n\n   if (g->out == 0 && !stbi__gif_header(s, g, comp,0))\n      return 0; // stbi__g_failure_reason set by stbi__gif_header\n\n   prev_out = g->out;\n   g->out = (stbi_uc *) stbi__malloc(4 * g->w * g->h);\n   if (g->out == 0) return stbi__errpuc(\"outofmem\", \"Out of memory\");\n\n   switch ((g->eflags & 0x1C) >> 2) {\n      case 0: // unspecified (also always used on 1st frame)\n         stbi__fill_gif_background(g, 0, 0, 4 * g->w, 4 * g->w * g->h);\n         break;\n      case 1: // do not dispose\n         if (prev_out) memcpy(g->out, prev_out, 4 * g->w * g->h);\n         g->old_out = prev_out;\n         break;\n      case 2: // dispose to background\n         if (prev_out) memcpy(g->out, prev_out, 4 * g->w * g->h);\n         stbi__fill_gif_background(g, g->start_x, g->start_y, g->max_x, g->max_y);\n         break;\n      case 3: // dispose to previous\n         if (g->old_out) {\n            for (i = g->start_y; i < g->max_y; i += 4 * g->w)\n               memcpy(&g->out[i + g->start_x], &g->old_out[i + g->start_x], g->max_x - g->start_x);\n         }\n         break;\n   }\n\n   for (;;) {\n      switch (stbi__get8(s)) {\n         case 0x2C: /* Image Descriptor */\n         {\n            int prev_trans = -1;\n            stbi__int32 x, y, w, h;\n            stbi_uc *o;\n\n            x = stbi__get16le(s);\n            y = stbi__get16le(s);\n            w = stbi__get16le(s);\n            h = stbi__get16le(s);\n            if (((x + w) > (g->w)) || ((y + h) > (g->h)))\n               return stbi__errpuc(\"bad Image Descriptor\", \"Corrupt GIF\");\n\n            g->line_size = g->w * 4;\n            g->start_x = x * 4;\n            g->start_y = y * g->line_size;\n            g->max_x   = g->start_x + w * 4;\n            g->max_y   = g->start_y + h * g->line_size;\n            g->cur_x   = g->start_x;\n            g->cur_y   = g->start_y;\n\n            g->lflags = stbi__get8(s);\n\n            if (g->lflags & 0x40) {\n               g->step = 8 * g->line_size; // first interlaced spacing\n               g->parse = 3;\n            } else {\n               g->step = g->line_size;\n               g->parse = 0;\n            }\n\n            if (g->lflags & 0x80) {\n               stbi__gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1);\n               g->color_table = (stbi_uc *) g->lpal;\n            } else if (g->flags & 0x80) {\n               if (g->transparent >= 0 && (g->eflags & 0x01)) {\n                  prev_trans = g->pal[g->transparent][3];\n                  g->pal[g->transparent][3] = 0;\n               }\n               g->color_table = (stbi_uc *) g->pal;\n            } else\n               return stbi__errpuc(\"missing color table\", \"Corrupt GIF\");\n\n            o = stbi__process_gif_raster(s, g);\n            if (o == NULL) return NULL;\n\n            if (prev_trans != -1)\n               g->pal[g->transparent][3] = (stbi_uc) prev_trans;\n\n            return o;\n         }\n\n         case 0x21: // Comment Extension.\n         {\n            int len;\n            if (stbi__get8(s) == 0xF9) { // Graphic Control Extension.\n               len = stbi__get8(s);\n               if (len == 4) {\n                  g->eflags = stbi__get8(s);\n                  g->delay = stbi__get16le(s);\n                  g->transparent = stbi__get8(s);\n               } else {\n                  stbi__skip(s, len);\n                  break;\n               }\n            }\n            while ((len = stbi__get8(s)) != 0)\n               stbi__skip(s, len);\n            break;\n         }\n\n         case 0x3B: // gif stream termination code\n            return (stbi_uc *) s; // using '1' causes warning on some compilers\n\n         default:\n            return stbi__errpuc(\"unknown code\", \"Corrupt GIF\");\n      }\n   }\n\n   STBI_NOTUSED(req_comp);\n}\n\nstatic stbi_uc *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)\n{\n   stbi_uc *u = 0;\n   stbi__gif g;\n   memset(&g, 0, sizeof(g));\n\n   u = stbi__gif_load_next(s, &g, comp, req_comp);\n   if (u == (stbi_uc *) s) u = 0;  // end of animated gif marker\n   if (u) {\n      *x = g.w;\n      *y = g.h;\n      if (req_comp && req_comp != 4)\n         u = stbi__convert_format(u, 4, req_comp, g.w, g.h);\n   }\n   else if (g.out)\n      STBI_FREE(g.out);\n\n   return u;\n}\n\nstatic int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp)\n{\n   return stbi__gif_info_raw(s,x,y,comp);\n}\n#endif\n\n// *************************************************************************************************\n// Radiance RGBE HDR loader\n// originally by Nicolas Schulz\n#ifndef STBI_NO_HDR\nstatic int stbi__hdr_test_core(stbi__context *s)\n{\n   const char *signature = \"#?RADIANCE\\n\";\n   int i;\n   for (i=0; signature[i]; ++i)\n      if (stbi__get8(s) != signature[i])\n         return 0;\n   return 1;\n}\n\nstatic int stbi__hdr_test(stbi__context* s)\n{\n   int r = stbi__hdr_test_core(s);\n   stbi__rewind(s);\n   return r;\n}\n\n#define STBI__HDR_BUFLEN  1024\nstatic char *stbi__hdr_gettoken(stbi__context *z, char *buffer)\n{\n   int len=0;\n   char c = '\\0';\n\n   c = (char) stbi__get8(z);\n\n   while (!stbi__at_eof(z) && c != '\\n') {\n      buffer[len++] = c;\n      if (len == STBI__HDR_BUFLEN-1) {\n         // flush to end of line\n         while (!stbi__at_eof(z) && stbi__get8(z) != '\\n')\n            ;\n         break;\n      }\n      c = (char) stbi__get8(z);\n   }\n\n   buffer[len] = 0;\n   return buffer;\n}\n\nstatic void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp)\n{\n   if ( input[3] != 0 ) {\n      float f1;\n      // Exponent\n      f1 = (float) ldexp(1.0f, input[3] - (int)(128 + 8));\n      if (req_comp <= 2)\n         output[0] = (input[0] + input[1] + input[2]) * f1 / 3;\n      else {\n         output[0] = input[0] * f1;\n         output[1] = input[1] * f1;\n         output[2] = input[2] * f1;\n      }\n      if (req_comp == 2) output[1] = 1;\n      if (req_comp == 4) output[3] = 1;\n   } else {\n      switch (req_comp) {\n         case 4: output[3] = 1; /* fallthrough */\n         case 3: output[0] = output[1] = output[2] = 0;\n                 break;\n         case 2: output[1] = 1; /* fallthrough */\n         case 1: output[0] = 0;\n                 break;\n      }\n   }\n}\n\nstatic float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)\n{\n   char buffer[STBI__HDR_BUFLEN];\n   char *token;\n   int valid = 0;\n   int width, height;\n   stbi_uc *scanline;\n   float *hdr_data;\n   int len;\n   unsigned char count, value;\n   int i, j, k, c1,c2, z;\n\n\n   // Check identifier\n   if (strcmp(stbi__hdr_gettoken(s,buffer), \"#?RADIANCE\") != 0)\n      return stbi__errpf(\"not HDR\", \"Corrupt HDR image\");\n\n   // Parse header\n   for(;;) {\n      token = stbi__hdr_gettoken(s,buffer);\n      if (token[0] == 0) break;\n      if (strcmp(token, \"FORMAT=32-bit_rle_rgbe\") == 0) valid = 1;\n   }\n\n   if (!valid)    return stbi__errpf(\"unsupported format\", \"Unsupported HDR format\");\n\n   // Parse width and height\n   // can't use sscanf() if we're not using stdio!\n   token = stbi__hdr_gettoken(s,buffer);\n   if (strncmp(token, \"-Y \", 3))  return stbi__errpf(\"unsupported data layout\", \"Unsupported HDR format\");\n   token += 3;\n   height = (int) strtol(token, &token, 10);\n   while (*token == ' ') ++token;\n   if (strncmp(token, \"+X \", 3))  return stbi__errpf(\"unsupported data layout\", \"Unsupported HDR format\");\n   token += 3;\n   width = (int) strtol(token, NULL, 10);\n\n   *x = width;\n   *y = height;\n\n   if (comp) *comp = 3;\n   if (req_comp == 0) req_comp = 3;\n\n   // Read data\n   hdr_data = (float *) stbi__malloc(height * width * req_comp * sizeof(float));\n\n   // Load image data\n   // image data is stored as some number of sca\n   if ( width < 8 || width >= 32768) {\n      // Read flat data\n      for (j=0; j < height; ++j) {\n         for (i=0; i < width; ++i) {\n            stbi_uc rgbe[4];\n           main_decode_loop:\n            stbi__getn(s, rgbe, 4);\n            stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp);\n         }\n      }\n   } else {\n      // Read RLE-encoded data\n      scanline = NULL;\n\n      for (j = 0; j < height; ++j) {\n         c1 = stbi__get8(s);\n         c2 = stbi__get8(s);\n         len = stbi__get8(s);\n         if (c1 != 2 || c2 != 2 || (len & 0x80)) {\n            // not run-length encoded, so we have to actually use THIS data as a decoded\n            // pixel (note this can't be a valid pixel--one of RGB must be >= 128)\n            stbi_uc rgbe[4];\n            rgbe[0] = (stbi_uc) c1;\n            rgbe[1] = (stbi_uc) c2;\n            rgbe[2] = (stbi_uc) len;\n            rgbe[3] = (stbi_uc) stbi__get8(s);\n            stbi__hdr_convert(hdr_data, rgbe, req_comp);\n            i = 1;\n            j = 0;\n            STBI_FREE(scanline);\n            goto main_decode_loop; // yes, this makes no sense\n         }\n         len <<= 8;\n         len |= stbi__get8(s);\n         if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf(\"invalid decoded scanline length\", \"corrupt HDR\"); }\n         if (scanline == NULL) scanline = (stbi_uc *) stbi__malloc(width * 4);\n\n         for (k = 0; k < 4; ++k) {\n            i = 0;\n            while (i < width) {\n               count = stbi__get8(s);\n               if (count > 128) {\n                  // Run\n                  value = stbi__get8(s);\n                  count -= 128;\n                  for (z = 0; z < count; ++z)\n                     scanline[i++ * 4 + k] = value;\n               } else {\n                  // Dump\n                  for (z = 0; z < count; ++z)\n                     scanline[i++ * 4 + k] = stbi__get8(s);\n               }\n            }\n         }\n         for (i=0; i < width; ++i)\n            stbi__hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp);\n      }\n      STBI_FREE(scanline);\n   }\n\n   return hdr_data;\n}\n\nstatic int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp)\n{\n   char buffer[STBI__HDR_BUFLEN];\n   char *token;\n   int valid = 0;\n\n   if (strcmp(stbi__hdr_gettoken(s,buffer), \"#?RADIANCE\") != 0) {\n       stbi__rewind( s );\n       return 0;\n   }\n\n   for(;;) {\n      token = stbi__hdr_gettoken(s,buffer);\n      if (token[0] == 0) break;\n      if (strcmp(token, \"FORMAT=32-bit_rle_rgbe\") == 0) valid = 1;\n   }\n\n   if (!valid) {\n       stbi__rewind( s );\n       return 0;\n   }\n   token = stbi__hdr_gettoken(s,buffer);\n   if (strncmp(token, \"-Y \", 3)) {\n       stbi__rewind( s );\n       return 0;\n   }\n   token += 3;\n   *y = (int) strtol(token, &token, 10);\n   while (*token == ' ') ++token;\n   if (strncmp(token, \"+X \", 3)) {\n       stbi__rewind( s );\n       return 0;\n   }\n   token += 3;\n   *x = (int) strtol(token, NULL, 10);\n   *comp = 3;\n   return 1;\n}\n#endif // STBI_NO_HDR\n\n#ifndef STBI_NO_BMP\nstatic int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp)\n{\n   int hsz;\n   if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') {\n       stbi__rewind( s );\n       return 0;\n   }\n   stbi__skip(s,12);\n   hsz = stbi__get32le(s);\n   if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) {\n       stbi__rewind( s );\n       return 0;\n   }\n   if (hsz == 12) {\n      *x = stbi__get16le(s);\n      *y = stbi__get16le(s);\n   } else {\n      *x = stbi__get32le(s);\n      *y = stbi__get32le(s);\n   }\n   if (stbi__get16le(s) != 1) {\n       stbi__rewind( s );\n       return 0;\n   }\n   *comp = stbi__get16le(s) / 8;\n   return 1;\n}\n#endif\n\n#ifndef STBI_NO_PSD\nstatic int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp)\n{\n   int channelCount;\n   if (stbi__get32be(s) != 0x38425053) {\n       stbi__rewind( s );\n       return 0;\n   }\n   if (stbi__get16be(s) != 1) {\n       stbi__rewind( s );\n       return 0;\n   }\n   stbi__skip(s, 6);\n   channelCount = stbi__get16be(s);\n   if (channelCount < 0 || channelCount > 16) {\n       stbi__rewind( s );\n       return 0;\n   }\n   *y = stbi__get32be(s);\n   *x = stbi__get32be(s);\n   if (stbi__get16be(s) != 8) {\n       stbi__rewind( s );\n       return 0;\n   }\n   if (stbi__get16be(s) != 3) {\n       stbi__rewind( s );\n       return 0;\n   }\n   *comp = 4;\n   return 1;\n}\n#endif\n\n#ifndef STBI_NO_PIC\nstatic int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp)\n{\n   int act_comp=0,num_packets=0,chained;\n   stbi__pic_packet packets[10];\n\n   if (!stbi__pic_is4(s,\"\\x53\\x80\\xF6\\x34\")) {\n      stbi__rewind(s);\n      return 0;\n   }\n\n   stbi__skip(s, 88);\n\n   *x = stbi__get16be(s);\n   *y = stbi__get16be(s);\n   if (stbi__at_eof(s)) {\n      stbi__rewind( s);\n      return 0;\n   }\n   if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) {\n      stbi__rewind( s );\n      return 0;\n   }\n\n   stbi__skip(s, 8);\n\n   do {\n      stbi__pic_packet *packet;\n\n      if (num_packets==sizeof(packets)/sizeof(packets[0]))\n         return 0;\n\n      packet = &packets[num_packets++];\n      chained = stbi__get8(s);\n      packet->size    = stbi__get8(s);\n      packet->type    = stbi__get8(s);\n      packet->channel = stbi__get8(s);\n      act_comp |= packet->channel;\n\n      if (stbi__at_eof(s)) {\n          stbi__rewind( s );\n          return 0;\n      }\n      if (packet->size != 8) {\n          stbi__rewind( s );\n          return 0;\n      }\n   } while (chained);\n\n   *comp = (act_comp & 0x10 ? 4 : 3);\n\n   return 1;\n}\n#endif\n\n// *************************************************************************************************\n// Portable Gray Map and Portable Pixel Map loader\n// by Ken Miller\n//\n// PGM: http://netpbm.sourceforge.net/doc/pgm.html\n// PPM: http://netpbm.sourceforge.net/doc/ppm.html\n//\n// Known limitations:\n//    Does not support comments in the header section\n//    Does not support ASCII image data (formats P2 and P3)\n//    Does not support 16-bit-per-channel\n\n#ifndef STBI_NO_PNM\n\nstatic int      stbi__pnm_test(stbi__context *s)\n{\n   char p, t;\n   p = (char) stbi__get8(s);\n   t = (char) stbi__get8(s);\n   if (p != 'P' || (t != '5' && t != '6')) {\n       stbi__rewind( s );\n       return 0;\n   }\n   return 1;\n}\n\nstatic stbi_uc *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)\n{\n   stbi_uc *out;\n   if (!stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n))\n      return 0;\n   *x = s->img_x;\n   *y = s->img_y;\n   *comp = s->img_n;\n\n   out = (stbi_uc *) stbi__malloc(s->img_n * s->img_x * s->img_y);\n   if (!out) return stbi__errpuc(\"outofmem\", \"Out of memory\");\n   stbi__getn(s, out, s->img_n * s->img_x * s->img_y);\n\n   if (req_comp && req_comp != s->img_n) {\n      out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y);\n      if (out == NULL) return out; // stbi__convert_format frees input on failure\n   }\n   return out;\n}\n\nstatic int      stbi__pnm_isspace(char c)\n{\n   return c == ' ' || c == '\\t' || c == '\\n' || c == '\\v' || c == '\\f' || c == '\\r';\n}\n\nstatic void     stbi__pnm_skip_whitespace(stbi__context *s, char *c)\n{\n   while (!stbi__at_eof(s) && stbi__pnm_isspace(*c))\n      *c = (char) stbi__get8(s);\n}\n\nstatic int      stbi__pnm_isdigit(char c)\n{\n   return c >= '0' && c <= '9';\n}\n\nstatic int      stbi__pnm_getinteger(stbi__context *s, char *c)\n{\n   int value = 0;\n\n   while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) {\n      value = value*10 + (*c - '0');\n      *c = (char) stbi__get8(s);\n   }\n\n   return value;\n}\n\nstatic int      stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp)\n{\n   int maxv;\n   char c, p, t;\n\n   stbi__rewind( s );\n\n   // Get identifier\n   p = (char) stbi__get8(s);\n   t = (char) stbi__get8(s);\n   if (p != 'P' || (t != '5' && t != '6')) {\n       stbi__rewind( s );\n       return 0;\n   }\n\n   *comp = (t == '6') ? 3 : 1;  // '5' is 1-component .pgm; '6' is 3-component .ppm\n\n   c = (char) stbi__get8(s);\n   stbi__pnm_skip_whitespace(s, &c);\n\n   *x = stbi__pnm_getinteger(s, &c); // read width\n   stbi__pnm_skip_whitespace(s, &c);\n\n   *y = stbi__pnm_getinteger(s, &c); // read height\n   stbi__pnm_skip_whitespace(s, &c);\n\n   maxv = stbi__pnm_getinteger(s, &c);  // read max value\n\n   if (maxv > 255)\n      return stbi__err(\"max value > 255\", \"PPM image not 8-bit\");\n   else\n      return 1;\n}\n#endif\n\nstatic int stbi__info_main(stbi__context *s, int *x, int *y, int *comp)\n{\n   #ifndef STBI_NO_JPEG\n   if (stbi__jpeg_info(s, x, y, comp)) return 1;\n   #endif\n\n   #ifndef STBI_NO_PNG\n   if (stbi__png_info(s, x, y, comp))  return 1;\n   #endif\n\n   #ifndef STBI_NO_GIF\n   if (stbi__gif_info(s, x, y, comp))  return 1;\n   #endif\n\n   #ifndef STBI_NO_BMP\n   if (stbi__bmp_info(s, x, y, comp))  return 1;\n   #endif\n\n   #ifndef STBI_NO_PSD\n   if (stbi__psd_info(s, x, y, comp))  return 1;\n   #endif\n\n   #ifndef STBI_NO_PIC\n   if (stbi__pic_info(s, x, y, comp))  return 1;\n   #endif\n\n   #ifndef STBI_NO_PNM\n   if (stbi__pnm_info(s, x, y, comp))  return 1;\n   #endif\n\n   #ifndef STBI_NO_HDR\n   if (stbi__hdr_info(s, x, y, comp))  return 1;\n   #endif\n\n   // test tga last because it's a crappy test!\n   #ifndef STBI_NO_TGA\n   if (stbi__tga_info(s, x, y, comp))\n       return 1;\n   #endif\n   return stbi__err(\"unknown image type\", \"Image not of any known type, or corrupt\");\n}\n\n#ifndef STBI_NO_STDIO\nSTBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp)\n{\n    FILE *f = stbi__fopen(filename, \"rb\");\n    int result;\n    if (!f) return stbi__err(\"can't fopen\", \"Unable to open file\");\n    result = stbi_info_from_file(f, x, y, comp);\n    fclose(f);\n    return result;\n}\n\nSTBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp)\n{\n   int r;\n   stbi__context s;\n   long pos = ftell(f);\n   stbi__start_file(&s, f);\n   r = stbi__info_main(&s,x,y,comp);\n   fseek(f,pos,SEEK_SET);\n   return r;\n}\n#endif // !STBI_NO_STDIO\n\nSTBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp)\n{\n   stbi__context s;\n   stbi__start_mem(&s,buffer,len);\n   return stbi__info_main(&s,x,y,comp);\n}\n\nSTBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp)\n{\n   stbi__context s;\n   stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user);\n   return stbi__info_main(&s,x,y,comp);\n}\n\n#endif // STB_IMAGE_IMPLEMENTATION\n\n/*\n   revision history:\n      2.08  (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA\n      2.07  (2015-09-13) fix compiler warnings\n                         partial animated GIF support\n                         limited 16-bit PSD support\n                         #ifdef unused functions\n                         bug with < 92 byte PIC,PNM,HDR,TGA\n      2.06  (2015-04-19) fix bug where PSD returns wrong '*comp' value\n      2.05  (2015-04-19) fix bug in progressive JPEG handling, fix warning\n      2.04  (2015-04-15) try to re-enable SIMD on MinGW 64-bit\n      2.03  (2015-04-12) extra corruption checking (mmozeiko)\n                         stbi_set_flip_vertically_on_load (nguillemot)\n                         fix NEON support; fix mingw support\n      2.02  (2015-01-19) fix incorrect assert, fix warning\n      2.01  (2015-01-17) fix various warnings; suppress SIMD on gcc 32-bit without -msse2\n      2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG\n      2.00  (2014-12-25) optimize JPG, including x86 SSE2 & NEON SIMD (ryg)\n                         progressive JPEG (stb)\n                         PGM/PPM support (Ken Miller)\n                         STBI_MALLOC,STBI_REALLOC,STBI_FREE\n                         GIF bugfix -- seemingly never worked\n                         STBI_NO_*, STBI_ONLY_*\n      1.48  (2014-12-14) fix incorrectly-named assert()\n      1.47  (2014-12-14) 1/2/4-bit PNG support, both direct and paletted (Omar Cornut & stb)\n                         optimize PNG (ryg)\n                         fix bug in interlaced PNG with user-specified channel count (stb)\n      1.46  (2014-08-26)\n              fix broken tRNS chunk (colorkey-style transparency) in non-paletted PNG\n      1.45  (2014-08-16)\n              fix MSVC-ARM internal compiler error by wrapping malloc\n      1.44  (2014-08-07)\n              various warning fixes from Ronny Chevalier\n      1.43  (2014-07-15)\n              fix MSVC-only compiler problem in code changed in 1.42\n      1.42  (2014-07-09)\n              don't define _CRT_SECURE_NO_WARNINGS (affects user code)\n              fixes to stbi__cleanup_jpeg path\n              added STBI_ASSERT to avoid requiring assert.h\n      1.41  (2014-06-25)\n              fix search&replace from 1.36 that messed up comments/error messages\n      1.40  (2014-06-22)\n              fix gcc struct-initialization warning\n      1.39  (2014-06-15)\n              fix to TGA optimization when req_comp != number of components in TGA;\n              fix to GIF loading because BMP wasn't rewinding (whoops, no GIFs in my test suite)\n              add support for BMP version 5 (more ignored fields)\n      1.38  (2014-06-06)\n              suppress MSVC warnings on integer casts truncating values\n              fix accidental rename of 'skip' field of I/O\n      1.37  (2014-06-04)\n              remove duplicate typedef\n      1.36  (2014-06-03)\n              convert to header file single-file library\n              if de-iphone isn't set, load iphone images color-swapped instead of returning NULL\n      1.35  (2014-05-27)\n              various warnings\n              fix broken STBI_SIMD path\n              fix bug where stbi_load_from_file no longer left file pointer in correct place\n              fix broken non-easy path for 32-bit BMP (possibly never used)\n              TGA optimization by Arseny Kapoulkine\n      1.34  (unknown)\n              use STBI_NOTUSED in stbi__resample_row_generic(), fix one more leak in tga failure case\n      1.33  (2011-07-14)\n              make stbi_is_hdr work in STBI_NO_HDR (as specified), minor compiler-friendly improvements\n      1.32  (2011-07-13)\n              support for \"info\" function for all supported filetypes (SpartanJ)\n      1.31  (2011-06-20)\n              a few more leak fixes, bug in PNG handling (SpartanJ)\n      1.30  (2011-06-11)\n              added ability to load files via callbacks to accomidate custom input streams (Ben Wenger)\n              removed deprecated format-specific test/load functions\n              removed support for installable file formats (stbi_loader) -- would have been broken for IO callbacks anyway\n              error cases in bmp and tga give messages and don't leak (Raymond Barbiero, grisha)\n              fix inefficiency in decoding 32-bit BMP (David Woo)\n      1.29  (2010-08-16)\n              various warning fixes from Aurelien Pocheville\n      1.28  (2010-08-01)\n              fix bug in GIF palette transparency (SpartanJ)\n      1.27  (2010-08-01)\n              cast-to-stbi_uc to fix warnings\n      1.26  (2010-07-24)\n              fix bug in file buffering for PNG reported by SpartanJ\n      1.25  (2010-07-17)\n              refix trans_data warning (Won Chun)\n      1.24  (2010-07-12)\n              perf improvements reading from files on platforms with lock-heavy fgetc()\n              minor perf improvements for jpeg\n              deprecated type-specific functions so we'll get feedback if they're needed\n              attempt to fix trans_data warning (Won Chun)\n      1.23    fixed bug in iPhone support\n      1.22  (2010-07-10)\n              removed image *writing* support\n              stbi_info support from Jetro Lauha\n              GIF support from Jean-Marc Lienher\n              iPhone PNG-extensions from James Brown\n              warning-fixes from Nicolas Schulz and Janez Zemva (i.stbi__err. Janez (U+017D)emva)\n      1.21    fix use of 'stbi_uc' in header (reported by jon blow)\n      1.20    added support for Softimage PIC, by Tom Seddon\n      1.19    bug in interlaced PNG corruption check (found by ryg)\n      1.18  (2008-08-02)\n              fix a threading bug (local mutable static)\n      1.17    support interlaced PNG\n      1.16    major bugfix - stbi__convert_format converted one too many pixels\n      1.15    initialize some fields for thread safety\n      1.14    fix threadsafe conversion bug\n              header-file-only version (#define STBI_HEADER_FILE_ONLY before including)\n      1.13    threadsafe\n      1.12    const qualifiers in the API\n      1.11    Support installable IDCT, colorspace conversion routines\n      1.10    Fixes for 64-bit (don't use \"unsigned long\")\n              optimized upsampling by Fabian \"ryg\" Giesen\n      1.09    Fix format-conversion for PSD code (bad global variables!)\n      1.08    Thatcher Ulrich's PSD code integrated by Nicolas Schulz\n      1.07    attempt to fix C++ warning/errors again\n      1.06    attempt to fix C++ warning/errors again\n      1.05    fix TGA loading to return correct *comp and use good luminance calc\n      1.04    default float alpha is 1, not 255; use 'void *' for stbi_image_free\n      1.03    bugfixes to STBI_NO_STDIO, STBI_NO_HDR\n      1.02    support for (subset of) HDR files, float interface for preferred access to them\n      1.01    fix bug: possible bug in handling right-side up bmps... not sure\n              fix bug: the stbi__bmp_load() and stbi__tga_load() functions didn't work at all\n      1.00    interface to zlib that skips zlib header\n      0.99    correct handling of alpha in palette\n      0.98    TGA loader by lonesock; dynamically add loaders (untested)\n      0.97    jpeg errors on too large a file; also catch another malloc failure\n      0.96    fix detection of invalid v value - particleman@mollyrocket forum\n      0.95    during header scan, seek to markers in case of padding\n      0.94    STBI_NO_STDIO to disable stdio usage; rename all #defines the same\n      0.93    handle jpegtran output; verbose errors\n      0.92    read 4,8,16,24,32-bit BMP files of several formats\n      0.91    output 24-bit Windows 3.0 BMP files\n      0.90    fix a few more warnings; bump version number to approach 1.0\n      0.61    bugfixes due to Marc LeBlanc, Christopher Lloyd\n      0.60    fix compiling as c++\n      0.59    fix warnings: merge Dave Moore's -Wall fixes\n      0.58    fix bug: zlib uncompressed mode len/nlen was wrong endian\n      0.57    fix bug: jpg last huffman symbol before marker was >9 bits but less than 16 available\n      0.56    fix bug: zlib uncompressed mode len vs. nlen\n      0.55    fix bug: restart_interval not initialized to 0\n      0.54    allow NULL for 'int *comp'\n      0.53    fix bug in png 3->4; speedup png decoding\n      0.52    png handles req_comp=3,4 directly; minor cleanup; jpeg comments\n      0.51    obey req_comp requests, 1-component jpegs return as 1-component,\n              on 'test' only check type, not whether we support this variant\n      0.50  (2006-11-19)\n              first released version\n*/\n"
  },
  {
    "path": "DuiLib/Utils/stb_image.h",
    "content": "\n#ifndef STBI_INCLUDE_STB_IMAGE_H\n#define STBI_INCLUDE_STB_IMAGE_H\n\n#define STB_IMAGE_IMPLEMENTATION\n#define STBI_NO_STDIO\n#define STBI_NO_WRITE\n#define STBI_NO_HDR\n\n\n// DOCUMENTATION\n//\n// Limitations:\n//    - no 16-bit-per-channel PNG\n//    - no 12-bit-per-channel JPEG\n//    - no JPEGs with arithmetic coding\n//    - no 1-bit BMP\n//    - GIF always returns *comp=4\n//\n// Basic usage (see HDR discussion below for HDR usage):\n//    int x,y,n;\n//    unsigned char *data = stbi_load(filename, &x, &y, &n, 0);\n//    // ... process data if not NULL ...\n//    // ... x = width, y = height, n = # 8-bit components per pixel ...\n//    // ... replace '0' with '1'..'4' to force that many components per pixel\n//    // ... but 'n' will always be the number that it would have been if you said 0\n//    stbi_image_free(data)\n//\n// Standard parameters:\n//    int *x       -- outputs image width in pixels\n//    int *y       -- outputs image height in pixels\n//    int *comp    -- outputs # of image components in image file\n//    int req_comp -- if non-zero, # of image components requested in result\n//\n// The return value from an image loader is an 'unsigned char *' which points\n// to the pixel data, or NULL on an allocation failure or if the image is\n// corrupt or invalid. The pixel data consists of *y scanlines of *x pixels,\n// with each pixel consisting of N interleaved 8-bit components; the first\n// pixel pointed to is top-left-most in the image. There is no padding between\n// image scanlines or between pixels, regardless of format. The number of\n// components N is 'req_comp' if req_comp is non-zero, or *comp otherwise.\n// If req_comp is non-zero, *comp has the number of components that _would_\n// have been output otherwise. E.g. if you set req_comp to 4, you will always\n// get RGBA output, but you can check *comp to see if it's trivially opaque\n// because e.g. there were only 3 channels in the source image.\n//\n// An output image with N components has the following components interleaved\n// in this order in each pixel:\n//\n//     N=#comp     components\n//       1           grey\n//       2           grey, alpha\n//       3           red, green, blue\n//       4           red, green, blue, alpha\n//\n// If image loading fails for any reason, the return value will be NULL,\n// and *x, *y, *comp will be unchanged. The function stbi_failure_reason()\n// can be queried for an extremely brief, end-user unfriendly explanation\n// of why the load failed. Define STBI_NO_FAILURE_STRINGS to avoid\n// compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly\n// more user-friendly ones.\n//\n// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.\n//\n// ===========================================================================\n//\n// Philosophy\n//\n// stb libraries are designed with the following priorities:\n//\n//    1. easy to use\n//    2. easy to maintain\n//    3. good performance\n//\n// Sometimes I let \"good performance\" creep up in priority over \"easy to maintain\",\n// and for best performance I may provide less-easy-to-use APIs that give higher\n// performance, in addition to the easy to use ones. Nevertheless, it's important\n// to keep in mind that from the standpoint of you, a client of this library,\n// all you care about is #1 and #3, and stb libraries do not emphasize #3 above all.\n//\n// Some secondary priorities arise directly from the first two, some of which\n// make more explicit reasons why performance can't be emphasized.\n//\n//    - Portable (\"ease of use\")\n//    - Small footprint (\"easy to maintain\")\n//    - No dependencies (\"ease of use\")\n//\n// ===========================================================================\n//\n// I/O callbacks\n//\n// I/O callbacks allow you to read from arbitrary sources, like packaged\n// files or some other source. Data read from callbacks are processed\n// through a small internal buffer (currently 128 bytes) to try to reduce\n// overhead.\n//\n// The three functions you must define are \"read\" (reads some bytes of data),\n// \"skip\" (skips some bytes of data), \"eof\" (reports if the stream is at the end).\n//\n// ===========================================================================\n//\n// SIMD support\n//\n// The JPEG decoder will try to automatically use SIMD kernels on x86 when\n// supported by the compiler. For ARM Neon support, you must explicitly\n// request it.\n//\n// (The old do-it-yourself SIMD API is no longer supported in the current\n// code.)\n//\n// On x86, SSE2 will automatically be used when available based on a run-time\n// test; if not, the generic C versions are used as a fall-back. On ARM targets,\n// the typical path is to have separate builds for NEON and non-NEON devices\n// (at least this is true for iOS and Android). Therefore, the NEON support is\n// toggled by a build flag: define STBI_NEON to get NEON loops.\n//\n// The output of the JPEG decoder is slightly different from versions where\n// SIMD support was introduced (that is, for versions before 1.49). The\n// difference is only +-1 in the 8-bit RGB channels, and only on a small\n// fraction of pixels. You can force the pre-1.49 behavior by defining\n// STBI_JPEG_OLD, but this will disable some of the SIMD decoding path\n// and hence cost some performance.\n//\n// If for some reason you do not want to use any of SIMD code, or if\n// you have issues compiling it, you can disable it entirely by\n// defining STBI_NO_SIMD.\n//\n// ===========================================================================\n//\n// HDR image support   (disable by defining STBI_NO_HDR)\n//\n// stb_image now supports loading HDR images in general, and currently\n// the Radiance .HDR file format, although the support is provided\n// generically. You can still load any file through the existing interface;\n// if you attempt to load an HDR file, it will be automatically remapped to\n// LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1;\n// both of these constants can be reconfigured through this interface:\n//\n//     stbi_hdr_to_ldr_gamma(2.2f);\n//     stbi_hdr_to_ldr_scale(1.0f);\n//\n// (note, do not use _inverse_ constants; stbi_image will invert them\n// appropriately).\n//\n// Additionally, there is a new, parallel interface for loading files as\n// (linear) floats to preserve the full dynamic range:\n//\n//    float *data = stbi_loadf(filename, &x, &y, &n, 0);\n//\n// If you load LDR images through this interface, those images will\n// be promoted to floating point values, run through the inverse of\n// constants corresponding to the above:\n//\n//     stbi_ldr_to_hdr_scale(1.0f);\n//     stbi_ldr_to_hdr_gamma(2.2f);\n//\n// Finally, given a filename (or an open file or memory block--see header\n// file for details) containing image data, you can query for the \"most\n// appropriate\" interface to use (that is, whether the image is HDR or\n// not), using:\n//\n//     stbi_is_hdr(char *filename);\n//\n// ===========================================================================\n//\n// iPhone PNG support:\n//\n// By default we convert iphone-formatted PNGs back to RGB, even though\n// they are internally encoded differently. You can disable this conversion\n// by by calling stbi_convert_iphone_png_to_rgb(0), in which case\n// you will always just get the native iphone \"format\" through (which\n// is BGR stored in RGB).\n//\n// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per\n// pixel to remove any premultiplied alpha *only* if the image file explicitly\n// says there's premultiplied data (currently only happens in iPhone images,\n// and only if iPhone convert-to-rgb processing is on).\n//\n\n\n#ifndef STBI_NO_STDIO\n#include <stdio.h>\n#endif // STBI_NO_STDIO\n\n#define STBI_VERSION 1\n\nenum\n{\n   STBI_default = 0, // only used for req_comp\n\n   STBI_grey       = 1,\n   STBI_grey_alpha = 2,\n   STBI_rgb        = 3,\n   STBI_rgb_alpha  = 4\n};\n\ntypedef unsigned char stbi_uc;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifdef STB_IMAGE_STATIC\n#define STBIDEF static\n#else\n#define STBIDEF extern\n#endif\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// PRIMARY API - works on images of any type\n//\n\n//\n// load image by filename, open file, or memory buffer\n//\n\ntypedef struct\n{\n   int      (*read)  (void *user,char *data,int size);   // fill 'data' with 'size' bytes.  return number of bytes actually read\n   void     (*skip)  (void *user,int n);                 // skip the next 'n' bytes, or 'unget' the last -n bytes if negative\n   int      (*eof)   (void *user);                       // returns nonzero if we are at end of file/data\n} stbi_io_callbacks;\n\nSTBIDEF stbi_uc *stbi_load               (char              const *filename,           int *x, int *y, int *comp, int req_comp);\nSTBIDEF stbi_uc *stbi_load_from_memory   (stbi_uc           const *buffer, int len   , int *x, int *y, int *comp, int req_comp);\nSTBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk  , void *user, int *x, int *y, int *comp, int req_comp);\n\n#ifndef STBI_NO_STDIO\nSTBIDEF stbi_uc *stbi_load_from_file  (FILE *f,                  int *x, int *y, int *comp, int req_comp);\n// for stbi_load_from_file, file pointer is left pointing immediately after image\n#endif\n\n#ifndef STBI_NO_LINEAR\n   STBIDEF float *stbi_loadf                 (char const *filename,           int *x, int *y, int *comp, int req_comp);\n   STBIDEF float *stbi_loadf_from_memory     (stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp);\n   STBIDEF float *stbi_loadf_from_callbacks  (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp);\n\n   #ifndef STBI_NO_STDIO\n   STBIDEF float *stbi_loadf_from_file  (FILE *f,                int *x, int *y, int *comp, int req_comp);\n   #endif\n#endif\n\n#ifndef STBI_NO_HDR\n   STBIDEF void   stbi_hdr_to_ldr_gamma(float gamma);\n   STBIDEF void   stbi_hdr_to_ldr_scale(float scale);\n#endif\n\n#ifndef STBI_NO_LINEAR\n   STBIDEF void   stbi_ldr_to_hdr_gamma(float gamma);\n   STBIDEF void   stbi_ldr_to_hdr_scale(float scale);\n#endif // STBI_NO_HDR\n\n// stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR\nSTBIDEF int    stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user);\nSTBIDEF int    stbi_is_hdr_from_memory(stbi_uc const *buffer, int len);\n#ifndef STBI_NO_STDIO\nSTBIDEF int      stbi_is_hdr          (char const *filename);\nSTBIDEF int      stbi_is_hdr_from_file(FILE *f);\n#endif // STBI_NO_STDIO\n\n\n// get a VERY brief reason for failure\n// NOT THREADSAFE\nSTBIDEF const char *stbi_failure_reason  (void);\n\n// free the loaded image -- this is just free()\nSTBIDEF void     stbi_image_free      (void *retval_from_stbi_load);\n\n// get image dimensions & components without fully decoding\nSTBIDEF int      stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp);\nSTBIDEF int      stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp);\n\n#ifndef STBI_NO_STDIO\nSTBIDEF int      stbi_info            (char const *filename,     int *x, int *y, int *comp);\nSTBIDEF int      stbi_info_from_file  (FILE *f,                  int *x, int *y, int *comp);\n\n#endif\n\n\n\n// for image formats that explicitly notate that they have premultiplied alpha,\n// we just return the colors as stored in the file. set this flag to force\n// unpremultiplication. results are undefined if the unpremultiply overflow.\nSTBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply);\n\n// indicate whether we should process iphone images back to canonical format,\n// or just pass them through \"as-is\"\nSTBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert);\n\n// flip the image vertically, so the first pixel in the output array is the bottom left\nSTBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip);\n\n// ZLIB client - used by PNG, available for other purposes\n\nSTBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen);\nSTBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header);\nSTBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen);\nSTBIDEF int   stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);\n\nSTBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen);\nSTBIDEF int   stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n//\n//\n////   end header file   /////////////////////////////////////////////////////\n#endif // STBI_INCLUDE_STB_IMAGE_H"
  },
  {
    "path": "DuiLib/Utils/wmp.tlh",
    "content": "﻿// Created by Microsoft (R) C/C++ Compiler Version 15.00.30729.01 (b08d7783).\n//\n// wmp.tlh\n//\n// C++ source equivalent of Win32 type library wmp.dll\n// compiler-generated file created 07/31/11 at 23:01:11 - DO NOT EDIT!\n\n#pragma once\n#pragma pack(push, 8)\n\n#include <comdef.h>\n\nnamespace WMPLib {\n\n//\n// Forward references and typedefs\n//\n\nstruct __declspec(uuid(\"6bf52a50-394a-11d3-b153-00c04f79faa6\"))\n/* LIBID */ __WMPLib;\nstruct __declspec(uuid(\"19a6627b-da9e-47c1-bb23-00b5e668236a\"))\n/* interface */ IWMPEvents;\nenum WMPPlaylistChangeEventType;\nstruct __declspec(uuid(\"1e7601fa-47ea-4107-9ea9-9004ed9684ff\"))\n/* interface */ IWMPEvents2;\nstruct __declspec(uuid(\"82a2986c-0293-4fd0-b279-b21b86c058be\"))\n/* interface */ IWMPSyncDevice;\nenum WMPDeviceStatus;\nenum WMPSyncState;\nstruct __declspec(uuid(\"1f504270-a66b-4223-8e96-26a06c63d69f\"))\n/* interface */ IWMPEvents3;\nstruct __declspec(uuid(\"56e2294f-69ed-4629-a869-aea72c0dcc2c\"))\n/* interface */ IWMPCdromRip;\nenum WMPRipState;\nstruct __declspec(uuid(\"bd94dbeb-417f-4928-aa06-087d56ed9b59\"))\n/* interface */ IWMPCdromBurn;\nenum WMPBurnFormat;\nstruct __declspec(uuid(\"d5f0f4f1-130c-11d3-b14e-00c04f79faa6\"))\n/* dual interface */ IWMPPlaylist;\nstruct __declspec(uuid(\"94d55e95-3fac-11d3-b155-00c04f79faa6\"))\n/* dual interface */ IWMPMedia;\nenum WMPBurnState;\nstruct __declspec(uuid(\"3df47861-7df1-4c1f-a81b-4c26f0f7a7c6\"))\n/* interface */ IWMPLibrary;\nenum WMPLibraryType;\nstruct __declspec(uuid(\"8363bc22-b4b4-4b19-989d-1cd765749dd1\"))\n/* dual interface */ IWMPMediaCollection;\nstruct __declspec(uuid(\"4a976298-8c0d-11d3-b389-00c04f68574b\"))\n/* dual interface */ IWMPStringCollection;\nenum WMPFolderScanState;\nenum WMPStringCollectionChangeEventType;\nstruct __declspec(uuid(\"26dabcfa-306b-404d-9a6f-630a8405048d\"))\n/* interface */ IWMPEvents4;\nstruct __declspec(uuid(\"6bf52a51-394a-11d3-b153-00c04f79faa6\"))\n/* dispinterface */ _WMPOCXEvents;\nstruct /* coclass */ WindowsMediaPlayer;\nstruct __declspec(uuid(\"6c497d62-8919-413c-82db-e935fb3ec584\"))\n/* dual interface */ IWMPPlayer4;\nstruct __declspec(uuid(\"7587c667-628f-499f-88e7-6a6f4e888464\"))\n/* dual interface */ IWMPCore3;\nstruct __declspec(uuid(\"bc17e5b7-7561-4c18-bb90-17d485775659\"))\n/* dual interface */ IWMPCore2;\nstruct __declspec(uuid(\"d84cca99-cce2-11d2-9ecc-0000f8085981\"))\n/* dual interface */ IWMPCore;\nenum WMPOpenState;\nenum WMPPlayState;\nstruct __declspec(uuid(\"74c09e02-f828-11d2-a74b-00a0c905f36e\"))\n/* dual interface */ IWMPControls;\nstruct __declspec(uuid(\"9104d1ab-80c9-4fed-abf0-2e6417a6df14\"))\n/* dual interface */ IWMPSettings;\nstruct __declspec(uuid(\"10a13217-23a7-439b-b1c0-d847c79b7774\"))\n/* dual interface */ IWMPPlaylistCollection;\nstruct __declspec(uuid(\"679409c0-99f7-11d3-9fb7-00105aa620bb\"))\n/* dual interface */ IWMPPlaylistArray;\nstruct __declspec(uuid(\"ec21b779-edef-462d-bba4-ad9dde2b29a7\"))\n/* dual interface */ IWMPNetwork;\nstruct __declspec(uuid(\"ee4c8fe2-34b2-11d3-a3bf-006097c9b344\"))\n/* dual interface */ IWMPCdromCollection;\nstruct __declspec(uuid(\"cfab6e98-8730-11d3-b388-00c04f68574b\"))\n/* dual interface */ IWMPCdrom;\nstruct __declspec(uuid(\"4f2df574-c588-11d3-9ed0-00c04fb6e937\"))\n/* dual interface */ IWMPClosedCaption;\nstruct __declspec(uuid(\"a12dcf7d-14ab-4c1b-a8cd-63909f06025b\"))\n/* dual interface */ IWMPError;\nstruct __declspec(uuid(\"3614c646-3b3b-4de7-a81e-930e3f2127b3\"))\n/* dual interface */ IWMPErrorItem;\nstruct __declspec(uuid(\"8da61686-4668-4a5c-ae5d-803193293dbe\"))\n/* dual interface */ IWMPDVD;\nstruct __declspec(uuid(\"40897764-ceab-47be-ad4a-8e28537f9bbf\"))\n/* dual interface */ IWMPPlayerApplication;\nstruct __declspec(uuid(\"54062b68-052a-4c25-a39f-8b63346511d4\"))\n/* dual interface */ IWMPPlayer3;\nstruct __declspec(uuid(\"0e6b01d1-d407-4c85-bf5f-1c01f6150280\"))\n/* dual interface */ IWMPPlayer2;\nstruct __declspec(uuid(\"6bf52a4f-394a-11d3-b153-00c04f79faa6\"))\n/* dual interface */ IWMPPlayer;\nstruct __declspec(uuid(\"f75ccec0-c67c-475c-931e-8719870bee7d\"))\n/* dual interface */ IWMPErrorItem2;\nstruct __declspec(uuid(\"6f030d25-0890-480f-9775-1f7e40ab5b8e\"))\n/* dual interface */ IWMPControls2;\nstruct __declspec(uuid(\"ab7c88bb-143e-4ea4-acc3-e4350b2106c3\"))\n/* dual interface */ IWMPMedia2;\nstruct __declspec(uuid(\"f118efc7-f03a-4fb4-99c9-1c02a5c1065b\"))\n/* dual interface */ IWMPMedia3;\nstruct __declspec(uuid(\"5c29bbe0-f87d-4c45-aa28-a70f0230ffa9\"))\n/* dual interface */ IWMPMetadataPicture;\nstruct __declspec(uuid(\"769a72db-13d2-45e2-9c48-53ca9d5b7450\"))\n/* dual interface */ IWMPMetadataText;\nstruct __declspec(uuid(\"fda937a4-eece-4da5-a0b6-39bf89ade2c2\"))\n/* dual interface */ IWMPSettings2;\nstruct __declspec(uuid(\"a1d1110e-d545-476a-9a78-ac3e4cb1e6bd\"))\n/* dual interface */ IWMPControls3;\nstruct __declspec(uuid(\"350ba78b-6bc8-4113-a5f5-312056934eb6\"))\n/* dual interface */ IWMPClosedCaption2;\nstruct __declspec(uuid(\"8ba957f5-fd8c-4791-b82d-f840401ee474\"))\n/* dual interface */ IWMPMediaCollection2;\nstruct __declspec(uuid(\"a00918f3-a6b0-4bfb-9189-fd834c7bc5a5\"))\n/* dual interface */ IWMPQuery;\nstruct __declspec(uuid(\"46ad648d-53f1-4a74-92e2-2a1b68d63fd4\"))\n/* dual interface */ IWMPStringCollection2;\nstruct __declspec(uuid(\"1d01fbdb-ade2-4c8d-9842-c190b95c3306\"))\n/* interface */ IWMPPlayerServices;\nstruct __declspec(uuid(\"1bb1592f-f040-418a-9f71-17c7512b4d70\"))\n/* interface */ IWMPPlayerServices2;\nstruct __declspec(uuid(\"cbb92747-741f-44fe-ab5b-f1a48f3b2a59\"))\n/* interface */ IWMPRemoteMediaServices;\nstruct __declspec(uuid(\"8b5050ff-e0a4-4808-b3a8-893a9e1ed894\"))\n/* interface */ IWMPSyncServices;\nstruct __declspec(uuid(\"39c2f8d5-1cf2-4d5e-ae09-d73492cf9eaa\"))\n/* interface */ IWMPLibraryServices;\nstruct __declspec(uuid(\"82cba86b-9f04-474b-a365-d6dd1466e541\"))\n/* interface */ IWMPLibrarySharingServices;\nstruct __declspec(uuid(\"dd578a4e-79b1-426c-bf8f-3add9072500b\"))\n/* interface */ IWMPLibrary2;\nstruct __declspec(uuid(\"788c8743-e57f-439d-a468-5bc77f2e59c6\"))\n/* interface */ IWMPFolderMonitorServices;\nstruct __declspec(uuid(\"88afb4b2-140a-44d2-91e6-4543da467cd1\"))\n/* interface */ IWMPSyncDevice2;\nstruct __declspec(uuid(\"b22c85f9-263c-4372-a0da-b518db9b4098\"))\n/* interface */ IWMPSyncDevice3;\nstruct __declspec(uuid(\"5f9cfd92-8cad-11d3-9a7e-00c04f8efb70\"))\n/* dual interface */ IWMPPlaylistCtrl;\nstruct __declspec(uuid(\"e41c88dd-2364-4ff7-a0f5-ca9859af783f\"))\n/* dual interface */ IAppDispatch;\nstruct __declspec(uuid(\"ef870383-83ab-4ea9-be48-56fa4251af10\"))\n/* dual interface */ IWMPSafeBrowser;\nstruct __declspec(uuid(\"21d077c1-4baa-11d3-bd45-00c04f6ea5ae\"))\n/* dual interface */ IWMPObjectExtendedProps;\nstruct __declspec(uuid(\"72f486b1-0d43-11d3-bd3f-00c04f6ea5ae\"))\n/* dual interface */ IWMPLayoutSubView;\nstruct __declspec(uuid(\"172e905d-80d9-4c2f-b7ce-2ccb771787a2\"))\n/* dual interface */ IWMPLayoutView;\nstruct __declspec(uuid(\"5af0bec1-46aa-11d3-bd45-00c04f6ea5ae\"))\n/* dual interface */ IWMPEventObject;\nstruct __declspec(uuid(\"6fcae13d-e492-4584-9c21-d2c052a2a33a\"))\n/* dual interface */ IWMPTheme;\nstruct __declspec(uuid(\"b2c2d18e-97af-4b6a-a56b-2ffff470fb81\"))\n/* dual interface */ IWMPLayoutSettingsDispatch;\nstruct __declspec(uuid(\"43d5ae92-4332-477c-8883-e0b3b063c5d2\"))\n/* dual interface */ IWMPWindow;\nstruct __declspec(uuid(\"98bb02d4-ed74-43cc-ad6a-45888f2e0dcc\"))\n/* dual interface */ IWMPBrandDispatch;\nstruct __declspec(uuid(\"504f112e-77cc-4e3c-a073-5371b31d9b36\"))\n/* dual interface */ IWMPNowPlayingHelperDispatch;\nstruct __declspec(uuid(\"2a2e0da3-19fa-4f82-be18-cd7d7a3b977f\"))\n/* dual interface */ IWMPNowDoingDispatch;\nstruct __declspec(uuid(\"946b023e-044c-4473-8018-74954f09dc7e\"))\n/* dual interface */ IWMPHoverPreviewDispatch;\nstruct __declspec(uuid(\"bb17fff7-1692-4555-918a-6af7bfacedd2\"))\n/* dispinterface */ IWMPButtonCtrlEvents;\nstruct /* coclass */ WMPButtonCtrl;\nstruct __declspec(uuid(\"87291b50-0c8e-11d3-bb2a-00a0c93ca73a\"))\n/* dual interface */ IWMPButtonCtrl;\nstruct /* coclass */ WMPListBoxCtrl;\nstruct __declspec(uuid(\"fc1880ce-83b9-43a7-a066-c44ce8c82583\"))\n/* dual interface */ IWMPListBoxCtrl;\nstruct __declspec(uuid(\"d255dfb8-c22a-42cf-b8b7-f15d7bcf65d6\"))\n/* dual interface */ IWMPListBoxItem;\nstruct __declspec(uuid(\"63d9d30f-ae4c-4678-8ca8-5720f4fe4419\"))\n/* dual interface */ IWMPPlaylistCtrlColumn;\nstruct __declspec(uuid(\"cdac14d2-8be4-11d3-bb48-00a0c93ca73a\"))\n/* dispinterface */ IWMPSliderCtrlEvents;\nstruct /* coclass */ WMPSliderCtrl;\nstruct __declspec(uuid(\"f2bf2c8f-405f-11d3-bb39-00a0c93ca73a\"))\n/* dual interface */ IWMPSliderCtrl;\nstruct __declspec(uuid(\"a85c0477-714c-4a06-b9f6-7c8ca38b45dc\"))\n/* dispinterface */ IWMPVideoCtrlEvents;\nstruct /* coclass */ WMPVideoCtrl;\nstruct __declspec(uuid(\"61cecf10-fc3a-11d2-a1cd-005004602752\"))\n/* dual interface */ IWMPVideoCtrl;\nstruct /* coclass */ WMPEffects;\nstruct __declspec(uuid(\"a9efab80-0a60-4c3f-bbd1-4558dd2a9769\"))\n/* dual interface */ IWMPEffectsCtrl;\nstruct /* coclass */ WMPEqualizerSettingsCtrl;\nstruct __declspec(uuid(\"2bd3716f-a914-49fb-8655-996d5f495498\"))\n/* dual interface */ IWMPEqualizerSettingsCtrl;\nstruct /* coclass */ WMPVideoSettingsCtrl;\nstruct __declspec(uuid(\"07ec23da-ef73-4bde-a40f-f269e0b7afd6\"))\n/* dual interface */ IWMPVideoSettingsCtrl;\nstruct /* coclass */ WMPDolbyDigitalSettingsCtrl;\nstruct __declspec(uuid(\"bbd6801a-a1d4-4d05-9f2d-29e0024c3fd9\"))\n/* dual interface */ IWMPDolbyDigitalSettingsCtrl;\nstruct /* coclass */ WMPLibraryTreeCtrl;\nstruct __declspec(uuid(\"b738fcae-f089-45df-aed6-034b9e7db632\"))\n/* dual interface */ IWMPLibraryTreeCtrl;\nstruct /* coclass */ WMPEditCtrl;\nstruct __declspec(uuid(\"70e1217c-c617-4cfd-bd8a-69ca2043e70b\"))\n/* dual interface */ IWMPEditCtrl;\nstruct /* coclass */ WMPSkinList;\nstruct __declspec(uuid(\"8cea03a2-d0c5-4e97-9c38-a676a639a51d\"))\n/* dual interface */ IWMPSkinList;\nstruct __declspec(uuid(\"5d0ad945-289e-45c5-a9c6-f301f0152108\"))\n/* dual interface */ IWMPPluginUIHost;\nstruct /* coclass */ WMPMenuCtrl;\nstruct __declspec(uuid(\"158a7adc-33da-4039-a553-bddbbe389f5c\"))\n/* dual interface */ IWMPMenuCtrl;\nstruct /* coclass */ WMPAutoMenuCtrl;\nstruct __declspec(uuid(\"1ad13e0b-4f3a-41df-9be2-f9e6fe0a7875\"))\n/* dual interface */ IWMPAutoMenuCtrl;\nstruct /* coclass */ WMPRegionalButtonCtrl;\nstruct __declspec(uuid(\"58d507b1-2354-11d3-bd41-00c04f6ea5ae\"))\n/* dual interface */ IWMPRegionalButtonCtrl;\nstruct __declspec(uuid(\"50fc8d31-67ac-11d3-bd4c-00c04f6ea5ae\"))\n/* dispinterface */ IWMPRegionalButtonEvents;\nstruct /* coclass */ WMPRegionalButton;\nstruct __declspec(uuid(\"58d507b2-2354-11d3-bd41-00c04f6ea5ae\"))\n/* dual interface */ IWMPRegionalButton;\nstruct __declspec(uuid(\"95f45aa4-ed0a-11d2-ba67-0000f80855e6\"))\n/* dispinterface */ IWMPCustomSliderCtrlEvents;\nstruct /* coclass */ WMPCustomSliderCtrl;\nstruct __declspec(uuid(\"95f45aa2-ed0a-11d2-ba67-0000f80855e6\"))\n/* dual interface */ IWMPCustomSlider;\nstruct /* coclass */ WMPTextCtrl;\nstruct __declspec(uuid(\"237dac8e-0e32-11d3-a2e2-00c04f79f88e\"))\n/* dual interface */ IWMPTextCtrl;\nstruct /* coclass */ WMPPlaylistCtrl;\nstruct __declspec(uuid(\"891eadb1-1c45-48b0-b704-49a888da98c4\"))\n/* dual interface */ ITaskCntrCtrl;\nstruct __declspec(uuid(\"d84cca96-cce2-11d2-9ecc-0000f8085981\"))\n/* dispinterface */ _WMPCoreEvents;\nstruct /* coclass */ WMPCore;\nstruct __declspec(uuid(\"6b550945-018f-11d3-b14a-00c04f79faa6\"))\n/* dual interface */ IWMPGraphEventHandler;\nstruct __declspec(uuid(\"f8578bfa-cd8f-4ce1-a684-5b7e85fca7dc\"))\n/* dual interface */ IBattery;\nstruct __declspec(uuid(\"40c6bde7-9c90-49d4-ad20-bef81a6c5f22\"))\n/* dual interface */ IBatteryPreset;\nstruct __declspec(uuid(\"f85e2d65-207d-48db-84b1-915e1735db17\"))\n/* dual interface */ IBatteryRandomPreset;\nstruct __declspec(uuid(\"876e7208-0172-4ebb-b08b-2e1d30dfe44c\"))\n/* dual interface */ IBatterySavedPreset;\nstruct __declspec(uuid(\"33e9291a-f6a9-11d2-9435-00a0c92a2f2d\"))\n/* dual interface */ IBarsEffect;\nstruct __declspec(uuid(\"e2cc638c-fd2c-409b-a1ea-5ddb72dc8e84\"))\n/* dual interface */ IWMPExternal;\nstruct __declspec(uuid(\"d10ccdff-472d-498c-b5fe-3630e5405e0a\"))\n/* dual interface */ IWMPExternalColors;\nstruct __declspec(uuid(\"54df358e-cf38-4010-99f1-f44b0e9000e5\"))\n/* dual interface */ IWMPSubscriptionServiceLimited;\nstruct __declspec(uuid(\"2e922378-ee70-4ceb-bbab-ce7ce4a04816\"))\n/* dual interface */ IWMPSubscriptionServiceExternal;\nstruct __declspec(uuid(\"e15e9ad1-8f20-4cc4-9ec7-1a328ca86a0d\"))\n/* dual interface */ IWMPDownloadManager;\nstruct __declspec(uuid(\"0a319c7f-85f9-436c-b88e-82fd88000e1c\"))\n/* dual interface */ IWMPDownloadCollection;\nstruct __declspec(uuid(\"9fbb3336-6da3-479d-b8ff-67d46e20a987\"))\n/* dual interface */ IWMPDownloadItem2;\nstruct __declspec(uuid(\"c9470e8e-3f6b-46a9-a0a9-452815c34297\"))\n/* dual interface */ IWMPDownloadItem;\nenum WMPSubscriptionDownloadState;\nstruct __declspec(uuid(\"5f0248c1-62b3-42d7-b927-029119e6ad14\"))\n/* dual interface */ IWMPSubscriptionServicePlayMedia;\nstruct __declspec(uuid(\"a915cea2-72df-41e1-a576-ef0bae5e5169\"))\n/* dual interface */ IWMPDiscoExternal;\nstruct __declspec(uuid(\"2d7ef888-1d3c-484a-a906-9f49d99bb344\"))\n/* dual interface */ IWMPCDDVDWizardExternal;\nenum WMP_WRITENAMESEX_TYPE;\nstruct __declspec(uuid(\"f81b2a59-02bc-4003-8b2f-c124af66fc66\"))\n/* dual interface */ IWMPBaseExternal;\nstruct __declspec(uuid(\"3148e685-b243-423d-8341-8480d6eff674\"))\n/* dual interface */ IWMPOfflineExternal;\nstruct __declspec(uuid(\"4e195db1-9e29-47fc-9ce1-de9937d32925\"))\n/* dual interface */ IWMPDMRAVTransportService;\nstruct __declspec(uuid(\"fb61cd38-8de7-4479-8b76-a8d097c20c70\"))\n/* dual interface */ IWMPDMRConnectionManagerService;\nstruct __declspec(uuid(\"ff4b1bda-19f0-42cf-8dda-19162950c543\"))\n/* dual interface */ IWMPDMRRenderingControlService;\n#if !defined(_WIN64)\ntypedef __w64 unsigned long ULONG_PTR;\n#else\ntypedef unsigned __int64 ULONG_PTR;\n#endif\n\n//\n// Smart pointer typedef declarations\n//\n\n_COM_SMARTPTR_TYPEDEF(IWMPEvents, __uuidof(IWMPEvents));\n_COM_SMARTPTR_TYPEDEF(IWMPSyncDevice, __uuidof(IWMPSyncDevice));\n_COM_SMARTPTR_TYPEDEF(IWMPEvents2, __uuidof(IWMPEvents2));\n_COM_SMARTPTR_TYPEDEF(IWMPCdromRip, __uuidof(IWMPCdromRip));\n_COM_SMARTPTR_TYPEDEF(IWMPStringCollection, __uuidof(IWMPStringCollection));\n_COM_SMARTPTR_TYPEDEF(_WMPOCXEvents, __uuidof(_WMPOCXEvents));\n_COM_SMARTPTR_TYPEDEF(IWMPSettings, __uuidof(IWMPSettings));\n_COM_SMARTPTR_TYPEDEF(IWMPNetwork, __uuidof(IWMPNetwork));\n_COM_SMARTPTR_TYPEDEF(IWMPClosedCaption, __uuidof(IWMPClosedCaption));\n_COM_SMARTPTR_TYPEDEF(IWMPErrorItem, __uuidof(IWMPErrorItem));\n_COM_SMARTPTR_TYPEDEF(IWMPError, __uuidof(IWMPError));\n_COM_SMARTPTR_TYPEDEF(IWMPDVD, __uuidof(IWMPDVD));\n_COM_SMARTPTR_TYPEDEF(IWMPPlayerApplication, __uuidof(IWMPPlayerApplication));\n_COM_SMARTPTR_TYPEDEF(IWMPErrorItem2, __uuidof(IWMPErrorItem2));\n_COM_SMARTPTR_TYPEDEF(IWMPMetadataPicture, __uuidof(IWMPMetadataPicture));\n_COM_SMARTPTR_TYPEDEF(IWMPMetadataText, __uuidof(IWMPMetadataText));\n_COM_SMARTPTR_TYPEDEF(IWMPSettings2, __uuidof(IWMPSettings2));\n_COM_SMARTPTR_TYPEDEF(IWMPClosedCaption2, __uuidof(IWMPClosedCaption2));\n_COM_SMARTPTR_TYPEDEF(IWMPQuery, __uuidof(IWMPQuery));\n_COM_SMARTPTR_TYPEDEF(IWMPStringCollection2, __uuidof(IWMPStringCollection2));\n_COM_SMARTPTR_TYPEDEF(IWMPPlayerServices, __uuidof(IWMPPlayerServices));\n_COM_SMARTPTR_TYPEDEF(IWMPPlayerServices2, __uuidof(IWMPPlayerServices2));\n_COM_SMARTPTR_TYPEDEF(IWMPRemoteMediaServices, __uuidof(IWMPRemoteMediaServices));\n_COM_SMARTPTR_TYPEDEF(IWMPSyncServices, __uuidof(IWMPSyncServices));\n_COM_SMARTPTR_TYPEDEF(IWMPLibrarySharingServices, __uuidof(IWMPLibrarySharingServices));\n_COM_SMARTPTR_TYPEDEF(IWMPFolderMonitorServices, __uuidof(IWMPFolderMonitorServices));\n_COM_SMARTPTR_TYPEDEF(IWMPSyncDevice2, __uuidof(IWMPSyncDevice2));\n_COM_SMARTPTR_TYPEDEF(IAppDispatch, __uuidof(IAppDispatch));\n_COM_SMARTPTR_TYPEDEF(IWMPSafeBrowser, __uuidof(IWMPSafeBrowser));\n_COM_SMARTPTR_TYPEDEF(IWMPObjectExtendedProps, __uuidof(IWMPObjectExtendedProps));\n_COM_SMARTPTR_TYPEDEF(IWMPLayoutSubView, __uuidof(IWMPLayoutSubView));\n_COM_SMARTPTR_TYPEDEF(IWMPLayoutView, __uuidof(IWMPLayoutView));\n_COM_SMARTPTR_TYPEDEF(IWMPEventObject, __uuidof(IWMPEventObject));\n_COM_SMARTPTR_TYPEDEF(IWMPTheme, __uuidof(IWMPTheme));\n_COM_SMARTPTR_TYPEDEF(IWMPLayoutSettingsDispatch, __uuidof(IWMPLayoutSettingsDispatch));\n_COM_SMARTPTR_TYPEDEF(IWMPWindow, __uuidof(IWMPWindow));\n_COM_SMARTPTR_TYPEDEF(IWMPBrandDispatch, __uuidof(IWMPBrandDispatch));\n_COM_SMARTPTR_TYPEDEF(IWMPNowPlayingHelperDispatch, __uuidof(IWMPNowPlayingHelperDispatch));\n_COM_SMARTPTR_TYPEDEF(IWMPNowDoingDispatch, __uuidof(IWMPNowDoingDispatch));\n_COM_SMARTPTR_TYPEDEF(IWMPHoverPreviewDispatch, __uuidof(IWMPHoverPreviewDispatch));\n_COM_SMARTPTR_TYPEDEF(IWMPButtonCtrlEvents, __uuidof(IWMPButtonCtrlEvents));\n_COM_SMARTPTR_TYPEDEF(IWMPButtonCtrl, __uuidof(IWMPButtonCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPListBoxCtrl, __uuidof(IWMPListBoxCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPListBoxItem, __uuidof(IWMPListBoxItem));\n_COM_SMARTPTR_TYPEDEF(IWMPPlaylistCtrlColumn, __uuidof(IWMPPlaylistCtrlColumn));\n_COM_SMARTPTR_TYPEDEF(IWMPSliderCtrlEvents, __uuidof(IWMPSliderCtrlEvents));\n_COM_SMARTPTR_TYPEDEF(IWMPSliderCtrl, __uuidof(IWMPSliderCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPVideoCtrlEvents, __uuidof(IWMPVideoCtrlEvents));\n_COM_SMARTPTR_TYPEDEF(IWMPVideoCtrl, __uuidof(IWMPVideoCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPEffectsCtrl, __uuidof(IWMPEffectsCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPEqualizerSettingsCtrl, __uuidof(IWMPEqualizerSettingsCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPVideoSettingsCtrl, __uuidof(IWMPVideoSettingsCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPDolbyDigitalSettingsCtrl, __uuidof(IWMPDolbyDigitalSettingsCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPEditCtrl, __uuidof(IWMPEditCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPSkinList, __uuidof(IWMPSkinList));\n_COM_SMARTPTR_TYPEDEF(IWMPPluginUIHost, __uuidof(IWMPPluginUIHost));\n_COM_SMARTPTR_TYPEDEF(IWMPMenuCtrl, __uuidof(IWMPMenuCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPAutoMenuCtrl, __uuidof(IWMPAutoMenuCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPRegionalButtonCtrl, __uuidof(IWMPRegionalButtonCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPRegionalButtonEvents, __uuidof(IWMPRegionalButtonEvents));\n_COM_SMARTPTR_TYPEDEF(IWMPRegionalButton, __uuidof(IWMPRegionalButton));\n_COM_SMARTPTR_TYPEDEF(IWMPCustomSliderCtrlEvents, __uuidof(IWMPCustomSliderCtrlEvents));\n_COM_SMARTPTR_TYPEDEF(IWMPCustomSlider, __uuidof(IWMPCustomSlider));\n_COM_SMARTPTR_TYPEDEF(IWMPTextCtrl, __uuidof(IWMPTextCtrl));\n_COM_SMARTPTR_TYPEDEF(ITaskCntrCtrl, __uuidof(ITaskCntrCtrl));\n_COM_SMARTPTR_TYPEDEF(_WMPCoreEvents, __uuidof(_WMPCoreEvents));\n_COM_SMARTPTR_TYPEDEF(IWMPGraphEventHandler, __uuidof(IWMPGraphEventHandler));\n_COM_SMARTPTR_TYPEDEF(IBattery, __uuidof(IBattery));\n_COM_SMARTPTR_TYPEDEF(IBatteryPreset, __uuidof(IBatteryPreset));\n_COM_SMARTPTR_TYPEDEF(IBatteryRandomPreset, __uuidof(IBatteryRandomPreset));\n_COM_SMARTPTR_TYPEDEF(IBatterySavedPreset, __uuidof(IBatterySavedPreset));\n_COM_SMARTPTR_TYPEDEF(IBarsEffect, __uuidof(IBarsEffect));\n_COM_SMARTPTR_TYPEDEF(IWMPExternal, __uuidof(IWMPExternal));\n_COM_SMARTPTR_TYPEDEF(IWMPExternalColors, __uuidof(IWMPExternalColors));\n_COM_SMARTPTR_TYPEDEF(IWMPSubscriptionServiceLimited, __uuidof(IWMPSubscriptionServiceLimited));\n_COM_SMARTPTR_TYPEDEF(IWMPDownloadItem, __uuidof(IWMPDownloadItem));\n_COM_SMARTPTR_TYPEDEF(IWMPDownloadItem2, __uuidof(IWMPDownloadItem2));\n_COM_SMARTPTR_TYPEDEF(IWMPDownloadCollection, __uuidof(IWMPDownloadCollection));\n_COM_SMARTPTR_TYPEDEF(IWMPDownloadManager, __uuidof(IWMPDownloadManager));\n_COM_SMARTPTR_TYPEDEF(IWMPSubscriptionServiceExternal, __uuidof(IWMPSubscriptionServiceExternal));\n_COM_SMARTPTR_TYPEDEF(IWMPSubscriptionServicePlayMedia, __uuidof(IWMPSubscriptionServicePlayMedia));\n_COM_SMARTPTR_TYPEDEF(IWMPDiscoExternal, __uuidof(IWMPDiscoExternal));\n_COM_SMARTPTR_TYPEDEF(IWMPCDDVDWizardExternal, __uuidof(IWMPCDDVDWizardExternal));\n_COM_SMARTPTR_TYPEDEF(IWMPBaseExternal, __uuidof(IWMPBaseExternal));\n_COM_SMARTPTR_TYPEDEF(IWMPOfflineExternal, __uuidof(IWMPOfflineExternal));\n_COM_SMARTPTR_TYPEDEF(IWMPDMRAVTransportService, __uuidof(IWMPDMRAVTransportService));\n_COM_SMARTPTR_TYPEDEF(IWMPDMRConnectionManagerService, __uuidof(IWMPDMRConnectionManagerService));\n_COM_SMARTPTR_TYPEDEF(IWMPDMRRenderingControlService, __uuidof(IWMPDMRRenderingControlService));\n_COM_SMARTPTR_TYPEDEF(IWMPEvents3, __uuidof(IWMPEvents3));\n_COM_SMARTPTR_TYPEDEF(IWMPEvents4, __uuidof(IWMPEvents4));\n_COM_SMARTPTR_TYPEDEF(IWMPCdromBurn, __uuidof(IWMPCdromBurn));\n_COM_SMARTPTR_TYPEDEF(IWMPPlaylist, __uuidof(IWMPPlaylist));\n_COM_SMARTPTR_TYPEDEF(IWMPMedia, __uuidof(IWMPMedia));\n_COM_SMARTPTR_TYPEDEF(IWMPMediaCollection, __uuidof(IWMPMediaCollection));\n_COM_SMARTPTR_TYPEDEF(IWMPLibrary, __uuidof(IWMPLibrary));\n_COM_SMARTPTR_TYPEDEF(IWMPControls, __uuidof(IWMPControls));\n_COM_SMARTPTR_TYPEDEF(IWMPPlaylistArray, __uuidof(IWMPPlaylistArray));\n_COM_SMARTPTR_TYPEDEF(IWMPPlaylistCollection, __uuidof(IWMPPlaylistCollection));\n_COM_SMARTPTR_TYPEDEF(IWMPCdrom, __uuidof(IWMPCdrom));\n_COM_SMARTPTR_TYPEDEF(IWMPCdromCollection, __uuidof(IWMPCdromCollection));\n_COM_SMARTPTR_TYPEDEF(IWMPCore, __uuidof(IWMPCore));\n_COM_SMARTPTR_TYPEDEF(IWMPCore2, __uuidof(IWMPCore2));\n_COM_SMARTPTR_TYPEDEF(IWMPCore3, __uuidof(IWMPCore3));\n_COM_SMARTPTR_TYPEDEF(IWMPPlayer4, __uuidof(IWMPPlayer4));\n_COM_SMARTPTR_TYPEDEF(IWMPPlayer3, __uuidof(IWMPPlayer3));\n_COM_SMARTPTR_TYPEDEF(IWMPPlayer2, __uuidof(IWMPPlayer2));\n_COM_SMARTPTR_TYPEDEF(IWMPPlayer, __uuidof(IWMPPlayer));\n_COM_SMARTPTR_TYPEDEF(IWMPControls2, __uuidof(IWMPControls2));\n_COM_SMARTPTR_TYPEDEF(IWMPMedia2, __uuidof(IWMPMedia2));\n_COM_SMARTPTR_TYPEDEF(IWMPMedia3, __uuidof(IWMPMedia3));\n_COM_SMARTPTR_TYPEDEF(IWMPControls3, __uuidof(IWMPControls3));\n_COM_SMARTPTR_TYPEDEF(IWMPMediaCollection2, __uuidof(IWMPMediaCollection2));\n_COM_SMARTPTR_TYPEDEF(IWMPLibraryServices, __uuidof(IWMPLibraryServices));\n_COM_SMARTPTR_TYPEDEF(IWMPLibrary2, __uuidof(IWMPLibrary2));\n_COM_SMARTPTR_TYPEDEF(IWMPSyncDevice3, __uuidof(IWMPSyncDevice3));\n_COM_SMARTPTR_TYPEDEF(IWMPPlaylistCtrl, __uuidof(IWMPPlaylistCtrl));\n_COM_SMARTPTR_TYPEDEF(IWMPLibraryTreeCtrl, __uuidof(IWMPLibraryTreeCtrl));\n\n//\n// Type library items\n//\n\nenum WMPPlaylistChangeEventType\n{\n    wmplcUnknown = 0,\n    wmplcClear = 1,\n    wmplcInfoChange = 2,\n    wmplcMove = 3,\n    wmplcDelete = 4,\n    wmplcInsert = 5,\n    wmplcAppend = 6,\n    wmplcPrivate = 7,\n    wmplcNameChange = 8,\n    wmplcMorph = 9,\n    wmplcSort = 10,\n    wmplcLast = 11\n};\n\nstruct __declspec(uuid(\"19a6627b-da9e-47c1-bb23-00b5e668236a\"))\nIWMPEvents : IUnknown\n{\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual void __stdcall OpenStateChange (\n        /*[in]*/ long NewState ) = 0;\n      virtual void __stdcall PlayStateChange (\n        /*[in]*/ long NewState ) = 0;\n      virtual void __stdcall AudioLanguageChange (\n        /*[in]*/ long LangID ) = 0;\n      virtual void __stdcall StatusChange ( ) = 0;\n      virtual void __stdcall ScriptCommand (\n        /*[in]*/ BSTR scType,\n        /*[in]*/ BSTR Param ) = 0;\n      virtual void __stdcall NewStream ( ) = 0;\n      virtual void __stdcall Disconnect (\n        /*[in]*/ long Result ) = 0;\n      virtual void __stdcall Buffering (\n        /*[in]*/ VARIANT_BOOL Start ) = 0;\n      virtual void __stdcall Error ( ) = 0;\n      virtual void __stdcall Warning (\n        /*[in]*/ long WarningType,\n        /*[in]*/ long Param,\n        /*[in]*/ BSTR Description ) = 0;\n      virtual void __stdcall EndOfStream (\n        /*[in]*/ long Result ) = 0;\n      virtual void __stdcall PositionChange (\n        /*[in]*/ double oldPosition,\n        /*[in]*/ double newPosition ) = 0;\n      virtual void __stdcall MarkerHit (\n        /*[in]*/ long MarkerNum ) = 0;\n      virtual void __stdcall DurationUnitChange (\n        /*[in]*/ long NewDurationUnit ) = 0;\n      virtual void __stdcall CdromMediaChange (\n        /*[in]*/ long CdromNum ) = 0;\n      virtual void __stdcall PlaylistChange (\n        /*[in]*/ IDispatch * Playlist,\n        /*[in]*/ enum WMPPlaylistChangeEventType change ) = 0;\n      virtual void __stdcall CurrentPlaylistChange (\n        /*[in]*/ enum WMPPlaylistChangeEventType change ) = 0;\n      virtual void __stdcall CurrentPlaylistItemAvailable (\n        /*[in]*/ BSTR bstrItemName ) = 0;\n      virtual void __stdcall MediaChange (\n        /*[in]*/ IDispatch * Item ) = 0;\n      virtual void __stdcall CurrentMediaItemAvailable (\n        /*[in]*/ BSTR bstrItemName ) = 0;\n      virtual void __stdcall CurrentItemChange (\n        /*[in]*/ IDispatch * pdispMedia ) = 0;\n      virtual void __stdcall MediaCollectionChange ( ) = 0;\n      virtual void __stdcall MediaCollectionAttributeStringAdded (\n        /*[in]*/ BSTR bstrAttribName,\n        /*[in]*/ BSTR bstrAttribVal ) = 0;\n      virtual void __stdcall MediaCollectionAttributeStringRemoved (\n        /*[in]*/ BSTR bstrAttribName,\n        /*[in]*/ BSTR bstrAttribVal ) = 0;\n      virtual void __stdcall MediaCollectionAttributeStringChanged (\n        /*[in]*/ BSTR bstrAttribName,\n        /*[in]*/ BSTR bstrOldAttribVal,\n        /*[in]*/ BSTR bstrNewAttribVal ) = 0;\n      virtual void __stdcall PlaylistCollectionChange ( ) = 0;\n      virtual void __stdcall PlaylistCollectionPlaylistAdded (\n        /*[in]*/ BSTR bstrPlaylistName ) = 0;\n      virtual void __stdcall PlaylistCollectionPlaylistRemoved (\n        /*[in]*/ BSTR bstrPlaylistName ) = 0;\n      virtual void __stdcall PlaylistCollectionPlaylistSetAsDeleted (\n        /*[in]*/ BSTR bstrPlaylistName,\n        /*[in]*/ VARIANT_BOOL varfIsDeleted ) = 0;\n      virtual void __stdcall ModeChange (\n        /*[in]*/ BSTR ModeName,\n        /*[in]*/ VARIANT_BOOL NewValue ) = 0;\n      virtual void __stdcall MediaError (\n        /*[in]*/ IDispatch * pMediaObject ) = 0;\n      virtual void __stdcall OpenPlaylistSwitch (\n        /*[in]*/ IDispatch * pItem ) = 0;\n      virtual void __stdcall DomainChange (\n        /*[in]*/ BSTR strDomain ) = 0;\n      virtual void __stdcall SwitchedToPlayerApplication ( ) = 0;\n      virtual void __stdcall SwitchedToControl ( ) = 0;\n      virtual void __stdcall PlayerDockedStateChange ( ) = 0;\n      virtual void __stdcall PlayerReconnect ( ) = 0;\n      virtual void __stdcall Click (\n        /*[in]*/ short nButton,\n        /*[in]*/ short nShiftState,\n        /*[in]*/ long fX,\n        /*[in]*/ long fY ) = 0;\n      virtual void __stdcall DoubleClick (\n        /*[in]*/ short nButton,\n        /*[in]*/ short nShiftState,\n        /*[in]*/ long fX,\n        /*[in]*/ long fY ) = 0;\n      virtual void __stdcall KeyDown (\n        /*[in]*/ short nKeyCode,\n        /*[in]*/ short nShiftState ) = 0;\n      virtual void __stdcall KeyPress (\n        /*[in]*/ short nKeyAscii ) = 0;\n      virtual void __stdcall KeyUp (\n        /*[in]*/ short nKeyCode,\n        /*[in]*/ short nShiftState ) = 0;\n      virtual void __stdcall MouseDown (\n        /*[in]*/ short nButton,\n        /*[in]*/ short nShiftState,\n        /*[in]*/ long fX,\n        /*[in]*/ long fY ) = 0;\n      virtual void __stdcall MouseMove (\n        /*[in]*/ short nButton,\n        /*[in]*/ short nShiftState,\n        /*[in]*/ long fX,\n        /*[in]*/ long fY ) = 0;\n      virtual void __stdcall MouseUp (\n        /*[in]*/ short nButton,\n        /*[in]*/ short nShiftState,\n        /*[in]*/ long fX,\n        /*[in]*/ long fY ) = 0;\n};\n\nenum WMPDeviceStatus\n{\n    wmpdsUnknown = 0,\n    wmpdsPartnershipExists = 1,\n    wmpdsPartnershipDeclined = 2,\n    wmpdsPartnershipAnother = 3,\n    wmpdsManualDevice = 4,\n    wmpdsNewDevice = 5,\n    wmpdsLast = 6\n};\n\nenum WMPSyncState\n{\n    wmpssUnknown = 0,\n    wmpssSynchronizing = 1,\n    wmpssStopped = 2,\n    wmpssEstimating = 3,\n    wmpssLast = 4\n};\n\nstruct __declspec(uuid(\"82a2986c-0293-4fd0-b279-b21b86c058be\"))\nIWMPSyncDevice : IUnknown\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetfriendlyName,put=PutfriendlyName))\n    _bstr_t friendlyName;\n    __declspec(property(get=GetdeviceName))\n    _bstr_t deviceName;\n    __declspec(property(get=GetdeviceId))\n    _bstr_t deviceId;\n    __declspec(property(get=GetpartnershipIndex))\n    long partnershipIndex;\n    __declspec(property(get=Getconnected))\n    VARIANT_BOOL connected;\n    __declspec(property(get=Getstatus))\n    enum WMPDeviceStatus status;\n    __declspec(property(get=GetsyncState))\n    enum WMPSyncState syncState;\n    __declspec(property(get=Getprogress))\n    long progress;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetfriendlyName ( );\n    void PutfriendlyName (\n        _bstr_t pbstrName );\n    _bstr_t GetdeviceName ( );\n    _bstr_t GetdeviceId ( );\n    long GetpartnershipIndex ( );\n    VARIANT_BOOL Getconnected ( );\n    enum WMPDeviceStatus Getstatus ( );\n    enum WMPSyncState GetsyncState ( );\n    long Getprogress ( );\n    _bstr_t getItemInfo (\n        _bstr_t bstrItemName );\n    HRESULT createPartnership (\n        VARIANT_BOOL vbShowUI );\n    HRESULT deletePartnership ( );\n    HRESULT Start ( );\n    HRESULT stop ( );\n    HRESULT showSettings ( );\n    VARIANT_BOOL isIdentical (\n        struct IWMPSyncDevice * pDevice );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_friendlyName (\n        /*[out,retval]*/ BSTR * pbstrName ) = 0;\n      virtual HRESULT __stdcall put_friendlyName (\n        /*[in]*/ BSTR pbstrName ) = 0;\n      virtual HRESULT __stdcall get_deviceName (\n        /*[out,retval]*/ BSTR * pbstrName ) = 0;\n      virtual HRESULT __stdcall get_deviceId (\n        /*[out,retval]*/ BSTR * pbstrDeviceId ) = 0;\n      virtual HRESULT __stdcall get_partnershipIndex (\n        /*[out,retval]*/ long * plIndex ) = 0;\n      virtual HRESULT __stdcall get_connected (\n        /*[out,retval]*/ VARIANT_BOOL * pvbConnected ) = 0;\n      virtual HRESULT __stdcall get_status (\n        /*[out,retval]*/ enum WMPDeviceStatus * pwmpds ) = 0;\n      virtual HRESULT __stdcall get_syncState (\n        /*[out,retval]*/ enum WMPSyncState * pwmpss ) = 0;\n      virtual HRESULT __stdcall get_progress (\n        /*[out,retval]*/ long * plProgress ) = 0;\n      virtual HRESULT __stdcall raw_getItemInfo (\n        /*[in]*/ BSTR bstrItemName,\n        /*[out,retval]*/ BSTR * pbstrVal ) = 0;\n      virtual HRESULT __stdcall raw_createPartnership (\n        /*[in]*/ VARIANT_BOOL vbShowUI ) = 0;\n      virtual HRESULT __stdcall raw_deletePartnership ( ) = 0;\n      virtual HRESULT __stdcall raw_Start ( ) = 0;\n      virtual HRESULT __stdcall raw_stop ( ) = 0;\n      virtual HRESULT __stdcall raw_showSettings ( ) = 0;\n      virtual HRESULT __stdcall raw_isIdentical (\n        /*[in]*/ struct IWMPSyncDevice * pDevice,\n        /*[out,retval]*/ VARIANT_BOOL * pvbool ) = 0;\n};\n\nstruct __declspec(uuid(\"1e7601fa-47ea-4107-9ea9-9004ed9684ff\"))\nIWMPEvents2 : IWMPEvents\n{\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual void __stdcall DeviceConnect (\n        /*[in]*/ struct IWMPSyncDevice * pDevice ) = 0;\n      virtual void __stdcall DeviceDisconnect (\n        /*[in]*/ struct IWMPSyncDevice * pDevice ) = 0;\n      virtual void __stdcall DeviceStatusChange (\n        /*[in]*/ struct IWMPSyncDevice * pDevice,\n        /*[in]*/ enum WMPDeviceStatus NewStatus ) = 0;\n      virtual void __stdcall DeviceSyncStateChange (\n        /*[in]*/ struct IWMPSyncDevice * pDevice,\n        /*[in]*/ enum WMPSyncState NewState ) = 0;\n      virtual void __stdcall DeviceSyncError (\n        /*[in]*/ struct IWMPSyncDevice * pDevice,\n        /*[in]*/ IDispatch * pMedia ) = 0;\n      virtual void __stdcall CreatePartnershipComplete (\n        /*[in]*/ struct IWMPSyncDevice * pDevice,\n        /*[in]*/ HRESULT hrResult ) = 0;\n};\n\nenum WMPRipState\n{\n    wmprsUnknown = 0,\n    wmprsRipping = 1,\n    wmprsStopped = 2\n};\n\nstruct __declspec(uuid(\"56e2294f-69ed-4629-a869-aea72c0dcc2c\"))\nIWMPCdromRip : IUnknown\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetripState))\n    enum WMPRipState ripState;\n    __declspec(property(get=GetripProgress))\n    long ripProgress;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    enum WMPRipState GetripState ( );\n    long GetripProgress ( );\n    HRESULT startRip ( );\n    HRESULT stopRip ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_ripState (\n        /*[out,retval]*/ enum WMPRipState * pwmprs ) = 0;\n      virtual HRESULT __stdcall get_ripProgress (\n        /*[out,retval]*/ long * plProgress ) = 0;\n      virtual HRESULT __stdcall raw_startRip ( ) = 0;\n      virtual HRESULT __stdcall raw_stopRip ( ) = 0;\n};\n\nenum WMPBurnFormat\n{\n    wmpbfAudioCD = 0,\n    wmpbfDataCD = 1\n};\n\nenum WMPBurnState\n{\n    wmpbsUnknown = 0,\n    wmpbsBusy = 1,\n    wmpbsReady = 2,\n    wmpbsWaitingForDisc = 3,\n    wmpbsRefreshStatusPending = 4,\n    wmpbsPreparingToBurn = 5,\n    wmpbsBurning = 6,\n    wmpbsStopped = 7,\n    wmpbsErasing = 8,\n    wmpbsDownloading = 9\n};\n\nenum WMPLibraryType\n{\n    wmpltUnknown = 0,\n    wmpltAll = 1,\n    wmpltLocal = 2,\n    wmpltRemote = 3,\n    wmpltDisc = 4,\n    wmpltPortableDevice = 5\n};\n\nstruct __declspec(uuid(\"4a976298-8c0d-11d3-b389-00c04f68574b\"))\nIWMPStringCollection : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getcount))\n    long count;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long Getcount ( );\n    _bstr_t Item (\n        long lIndex );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_count (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_Item (\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ BSTR * pbstrString ) = 0;\n};\n\nenum WMPFolderScanState\n{\n    wmpfssUnknown = 0,\n    wmpfssScanning = 1,\n    wmpfssUpdating = 2,\n    wmpfssStopped = 3\n};\n\nenum WMPStringCollectionChangeEventType\n{\n    wmpsccetUnknown = 0,\n    wmpsccetInsert = 1,\n    wmpsccetChange = 2,\n    wmpsccetDelete = 3,\n    wmpsccetClear = 4,\n    wmpsccetBeginUpdates = 5,\n    wmpsccetEndUpdates = 6\n};\n\nstruct __declspec(uuid(\"6bf52a51-394a-11d3-b153-00c04f79faa6\"))\n_WMPOCXEvents : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    // Methods:\n    HRESULT OpenStateChange (\n        long NewState );\n    HRESULT PlayStateChange (\n        long NewState );\n    HRESULT AudioLanguageChange (\n        long LangID );\n    HRESULT StatusChange ( );\n    HRESULT ScriptCommand (\n        _bstr_t scType,\n        _bstr_t Param );\n    HRESULT NewStream ( );\n    HRESULT Disconnect (\n        long Result );\n    HRESULT Buffering (\n        VARIANT_BOOL Start );\n    HRESULT Error ( );\n    HRESULT Warning (\n        long WarningType,\n        long Param,\n        _bstr_t Description );\n    HRESULT EndOfStream (\n        long Result );\n    HRESULT PositionChange (\n        double oldPosition,\n        double newPosition );\n    HRESULT MarkerHit (\n        long MarkerNum );\n    HRESULT DurationUnitChange (\n        long NewDurationUnit );\n    HRESULT CdromMediaChange (\n        long CdromNum );\n    HRESULT PlaylistChange (\n        IDispatch * Playlist,\n        enum WMPPlaylistChangeEventType change );\n    HRESULT CurrentPlaylistChange (\n        enum WMPPlaylistChangeEventType change );\n    HRESULT CurrentPlaylistItemAvailable (\n        _bstr_t bstrItemName );\n    HRESULT MediaChange (\n        IDispatch * Item );\n    HRESULT CurrentMediaItemAvailable (\n        _bstr_t bstrItemName );\n    HRESULT CurrentItemChange (\n        IDispatch * pdispMedia );\n    HRESULT MediaCollectionChange ( );\n    HRESULT MediaCollectionAttributeStringAdded (\n        _bstr_t bstrAttribName,\n        _bstr_t bstrAttribVal );\n    HRESULT MediaCollectionAttributeStringRemoved (\n        _bstr_t bstrAttribName,\n        _bstr_t bstrAttribVal );\n    HRESULT MediaCollectionAttributeStringChanged (\n        _bstr_t bstrAttribName,\n        _bstr_t bstrOldAttribVal,\n        _bstr_t bstrNewAttribVal );\n    HRESULT PlaylistCollectionChange ( );\n    HRESULT PlaylistCollectionPlaylistAdded (\n        _bstr_t bstrPlaylistName );\n    HRESULT PlaylistCollectionPlaylistRemoved (\n        _bstr_t bstrPlaylistName );\n    HRESULT PlaylistCollectionPlaylistSetAsDeleted (\n        _bstr_t bstrPlaylistName,\n        VARIANT_BOOL varfIsDeleted );\n    HRESULT ModeChange (\n        _bstr_t ModeName,\n        VARIANT_BOOL NewValue );\n    HRESULT MediaError (\n        IDispatch * pMediaObject );\n    HRESULT OpenPlaylistSwitch (\n        IDispatch * pItem );\n    HRESULT DomainChange (\n        _bstr_t strDomain );\n    HRESULT SwitchedToPlayerApplication ( );\n    HRESULT SwitchedToControl ( );\n    HRESULT PlayerDockedStateChange ( );\n    HRESULT PlayerReconnect ( );\n    HRESULT Click (\n        short nButton,\n        short nShiftState,\n        long fX,\n        long fY );\n    HRESULT DoubleClick (\n        short nButton,\n        short nShiftState,\n        long fX,\n        long fY );\n    HRESULT KeyDown (\n        short nKeyCode,\n        short nShiftState );\n    HRESULT KeyPress (\n        short nKeyAscii );\n    HRESULT KeyUp (\n        short nKeyCode,\n        short nShiftState );\n    HRESULT MouseDown (\n        short nButton,\n        short nShiftState,\n        long fX,\n        long fY );\n    HRESULT MouseMove (\n        short nButton,\n        short nShiftState,\n        long fX,\n        long fY );\n    HRESULT MouseUp (\n        short nButton,\n        short nShiftState,\n        long fX,\n        long fY );\n    HRESULT DeviceConnect (\n        struct IWMPSyncDevice * pDevice );\n    HRESULT DeviceDisconnect (\n        struct IWMPSyncDevice * pDevice );\n    HRESULT DeviceStatusChange (\n        struct IWMPSyncDevice * pDevice,\n        enum WMPDeviceStatus NewStatus );\n    HRESULT DeviceSyncStateChange (\n        struct IWMPSyncDevice * pDevice,\n        enum WMPSyncState NewState );\n    HRESULT DeviceSyncError (\n        struct IWMPSyncDevice * pDevice,\n        IDispatch * pMedia );\n    HRESULT CreatePartnershipComplete (\n        struct IWMPSyncDevice * pDevice,\n        HRESULT hrResult );\n    HRESULT DeviceEstimation (\n        struct IWMPSyncDevice * pDevice,\n        HRESULT hrResult,\n        __int64 qwEstimatedUsedSpace,\n        __int64 qwEstimatedSpace );\n    HRESULT CdromRipStateChange (\n        struct IWMPCdromRip * pCdromRip,\n        enum WMPRipState wmprs );\n    HRESULT CdromRipMediaError (\n        struct IWMPCdromRip * pCdromRip,\n        IDispatch * pMedia );\n    HRESULT CdromBurnStateChange (\n        struct IWMPCdromBurn * pCdromBurn,\n        enum WMPBurnState wmpbs );\n    HRESULT CdromBurnMediaError (\n        struct IWMPCdromBurn * pCdromBurn,\n        IDispatch * pMedia );\n    HRESULT CdromBurnError (\n        struct IWMPCdromBurn * pCdromBurn,\n        HRESULT hrError );\n    HRESULT LibraryConnect (\n        struct IWMPLibrary * pLibrary );\n    HRESULT LibraryDisconnect (\n        struct IWMPLibrary * pLibrary );\n    HRESULT FolderScanStateChange (\n        enum WMPFolderScanState wmpfss );\n    HRESULT StringCollectionChange (\n        IDispatch * pdispStringCollection,\n        enum WMPStringCollectionChangeEventType change,\n        long lCollectionIndex );\n    HRESULT MediaCollectionMediaAdded (\n        IDispatch * pdispMedia );\n    HRESULT MediaCollectionMediaRemoved (\n        IDispatch * pdispMedia );\n};\n\nstruct __declspec(uuid(\"6bf52a52-394a-11d3-b153-00c04f79faa6\"))\nWindowsMediaPlayer;\n    // [ default ] interface IWMPPlayer4\n    // interface IWMPPlayer3\n    // interface IWMPPlayer2\n    // interface IWMPPlayer\n    // interface IWMPControls\n    // interface IWMPSettings\n    // interface IWMPPlaylist\n    // interface IWMPMedia\n    // interface IWMPMediaCollection\n    // interface IWMPPlaylistCollection\n    // interface IWMPCdromCollection\n    // interface IWMPError\n    // interface IWMPErrorItem\n    // interface IWMPErrorItem2\n    // interface IWMPClosedCaption\n    // interface IWMPDVD\n    // interface IWMPControls2\n    // interface IWMPMedia2\n    // interface IWMPMedia3\n    // interface IWMPMetadataPicture\n    // interface IWMPMetadataText\n    // interface IWMPSettings2\n    // interface IWMPControls3\n    // interface IWMPClosedCaption2\n    // interface IWMPMediaCollection2\n    // interface IWMPStringCollection2\n    // [ default, source ] dispinterface _WMPOCXEvents\n\nenum WMPOpenState\n{\n    wmposUndefined = 0,\n    wmposPlaylistChanging = 1,\n    wmposPlaylistLocating = 2,\n    wmposPlaylistConnecting = 3,\n    wmposPlaylistLoading = 4,\n    wmposPlaylistOpening = 5,\n    wmposPlaylistOpenNoMedia = 6,\n    wmposPlaylistChanged = 7,\n    wmposMediaChanging = 8,\n    wmposMediaLocating = 9,\n    wmposMediaConnecting = 10,\n    wmposMediaLoading = 11,\n    wmposMediaOpening = 12,\n    wmposMediaOpen = 13,\n    wmposBeginCodecAcquisition = 14,\n    wmposEndCodecAcquisition = 15,\n    wmposBeginLicenseAcquisition = 16,\n    wmposEndLicenseAcquisition = 17,\n    wmposBeginIndividualization = 18,\n    wmposEndIndividualization = 19,\n    wmposMediaWaiting = 20,\n    wmposOpeningUnknownURL = 21\n};\n\nenum WMPPlayState\n{\n    wmppsUndefined = 0,\n    wmppsStopped = 1,\n    wmppsPaused = 2,\n    wmppsPlaying = 3,\n    wmppsScanForward = 4,\n    wmppsScanReverse = 5,\n    wmppsBuffering = 6,\n    wmppsWaiting = 7,\n    wmppsMediaEnded = 8,\n    wmppsTransitioning = 9,\n    wmppsReady = 10,\n    wmppsReconnecting = 11,\n    wmppsLast = 12\n};\n\nstruct __declspec(uuid(\"9104d1ab-80c9-4fed-abf0-2e6417a6df14\"))\nIWMPSettings : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetautoStart,put=PutautoStart))\n    VARIANT_BOOL autoStart;\n    __declspec(property(get=Getbalance,put=Putbalance))\n    long balance;\n    __declspec(property(get=GetinvokeURLs,put=PutinvokeURLs))\n    VARIANT_BOOL invokeURLs;\n    __declspec(property(get=Getmute,put=Putmute))\n    VARIANT_BOOL mute;\n    __declspec(property(get=GetplayCount,put=PutplayCount))\n    long playCount;\n    __declspec(property(get=Getrate,put=Putrate))\n    double rate;\n    __declspec(property(get=Getvolume,put=Putvolume))\n    long volume;\n    __declspec(property(get=GetbaseURL,put=PutbaseURL))\n    _bstr_t baseURL;\n    __declspec(property(get=GetdefaultFrame,put=PutdefaultFrame))\n    _bstr_t defaultFrame;\n    __declspec(property(get=GetenableErrorDialogs,put=PutenableErrorDialogs))\n    VARIANT_BOOL enableErrorDialogs;\n    __declspec(property(get=GetisAvailable))\n    VARIANT_BOOL isAvailable[];\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL GetisAvailable (\n        _bstr_t bstrItem );\n    VARIANT_BOOL GetautoStart ( );\n    void PutautoStart (\n        VARIANT_BOOL pfAutoStart );\n    _bstr_t GetbaseURL ( );\n    void PutbaseURL (\n        _bstr_t pbstrBaseURL );\n    _bstr_t GetdefaultFrame ( );\n    void PutdefaultFrame (\n        _bstr_t pbstrDefaultFrame );\n    VARIANT_BOOL GetinvokeURLs ( );\n    void PutinvokeURLs (\n        VARIANT_BOOL pfInvokeURLs );\n    VARIANT_BOOL Getmute ( );\n    void Putmute (\n        VARIANT_BOOL pfMute );\n    long GetplayCount ( );\n    void PutplayCount (\n        long plCount );\n    double Getrate ( );\n    void Putrate (\n        double pdRate );\n    long Getbalance ( );\n    void Putbalance (\n        long plBalance );\n    long Getvolume ( );\n    void Putvolume (\n        long plVolume );\n    VARIANT_BOOL getMode (\n        _bstr_t bstrMode );\n    HRESULT setMode (\n        _bstr_t bstrMode,\n        VARIANT_BOOL varfMode );\n    VARIANT_BOOL GetenableErrorDialogs ( );\n    void PutenableErrorDialogs (\n        VARIANT_BOOL pfEnableErrorDialogs );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_isAvailable (\n        /*[in]*/ BSTR bstrItem,\n        /*[out,retval]*/ VARIANT_BOOL * pIsAvailable ) = 0;\n      virtual HRESULT __stdcall get_autoStart (\n        /*[out,retval]*/ VARIANT_BOOL * pfAutoStart ) = 0;\n      virtual HRESULT __stdcall put_autoStart (\n        /*[in]*/ VARIANT_BOOL pfAutoStart ) = 0;\n      virtual HRESULT __stdcall get_baseURL (\n        /*[out,retval]*/ BSTR * pbstrBaseURL ) = 0;\n      virtual HRESULT __stdcall put_baseURL (\n        /*[in]*/ BSTR pbstrBaseURL ) = 0;\n      virtual HRESULT __stdcall get_defaultFrame (\n        /*[out,retval]*/ BSTR * pbstrDefaultFrame ) = 0;\n      virtual HRESULT __stdcall put_defaultFrame (\n        /*[in]*/ BSTR pbstrDefaultFrame ) = 0;\n      virtual HRESULT __stdcall get_invokeURLs (\n        /*[out,retval]*/ VARIANT_BOOL * pfInvokeURLs ) = 0;\n      virtual HRESULT __stdcall put_invokeURLs (\n        /*[in]*/ VARIANT_BOOL pfInvokeURLs ) = 0;\n      virtual HRESULT __stdcall get_mute (\n        /*[out,retval]*/ VARIANT_BOOL * pfMute ) = 0;\n      virtual HRESULT __stdcall put_mute (\n        /*[in]*/ VARIANT_BOOL pfMute ) = 0;\n      virtual HRESULT __stdcall get_playCount (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall put_playCount (\n        /*[in]*/ long plCount ) = 0;\n      virtual HRESULT __stdcall get_rate (\n        /*[out,retval]*/ double * pdRate ) = 0;\n      virtual HRESULT __stdcall put_rate (\n        /*[in]*/ double pdRate ) = 0;\n      virtual HRESULT __stdcall get_balance (\n        /*[out,retval]*/ long * plBalance ) = 0;\n      virtual HRESULT __stdcall put_balance (\n        /*[in]*/ long plBalance ) = 0;\n      virtual HRESULT __stdcall get_volume (\n        /*[out,retval]*/ long * plVolume ) = 0;\n      virtual HRESULT __stdcall put_volume (\n        /*[in]*/ long plVolume ) = 0;\n      virtual HRESULT __stdcall raw_getMode (\n        /*[in]*/ BSTR bstrMode,\n        /*[out,retval]*/ VARIANT_BOOL * pvarfMode ) = 0;\n      virtual HRESULT __stdcall raw_setMode (\n        /*[in]*/ BSTR bstrMode,\n        /*[in]*/ VARIANT_BOOL varfMode ) = 0;\n      virtual HRESULT __stdcall get_enableErrorDialogs (\n        /*[out,retval]*/ VARIANT_BOOL * pfEnableErrorDialogs ) = 0;\n      virtual HRESULT __stdcall put_enableErrorDialogs (\n        /*[in]*/ VARIANT_BOOL pfEnableErrorDialogs ) = 0;\n};\n\nstruct __declspec(uuid(\"ec21b779-edef-462d-bba4-ad9dde2b29a7\"))\nIWMPNetwork : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetbandWidth))\n    long bandWidth;\n    __declspec(property(get=GetrecoveredPackets))\n    long recoveredPackets;\n    __declspec(property(get=GetsourceProtocol))\n    _bstr_t sourceProtocol;\n    __declspec(property(get=GetreceivedPackets))\n    long receivedPackets;\n    __declspec(property(get=GetlostPackets))\n    long lostPackets;\n    __declspec(property(get=GetreceptionQuality))\n    long receptionQuality;\n    __declspec(property(get=GetbufferingCount))\n    long bufferingCount;\n    __declspec(property(get=GetbufferingProgress))\n    long bufferingProgress;\n    __declspec(property(get=GetbufferingTime,put=PutbufferingTime))\n    long bufferingTime;\n    __declspec(property(get=GetframeRate))\n    long frameRate;\n    __declspec(property(get=GetmaxBitRate))\n    long maxBitRate;\n    __declspec(property(get=GetbitRate))\n    long bitRate;\n    __declspec(property(get=GetmaxBandwidth,put=PutmaxBandwidth))\n    long maxBandwidth;\n    __declspec(property(get=GetdownloadProgress))\n    long downloadProgress;\n    __declspec(property(get=GetencodedFrameRate))\n    long encodedFrameRate;\n    __declspec(property(get=GetframesSkipped))\n    long framesSkipped;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long GetbandWidth ( );\n    long GetrecoveredPackets ( );\n    _bstr_t GetsourceProtocol ( );\n    long GetreceivedPackets ( );\n    long GetlostPackets ( );\n    long GetreceptionQuality ( );\n    long GetbufferingCount ( );\n    long GetbufferingProgress ( );\n    long GetbufferingTime ( );\n    void PutbufferingTime (\n        long plBufferingTime );\n    long GetframeRate ( );\n    long GetmaxBitRate ( );\n    long GetbitRate ( );\n    long getProxySettings (\n        _bstr_t bstrProtocol );\n    HRESULT setProxySettings (\n        _bstr_t bstrProtocol,\n        long lProxySetting );\n    _bstr_t getProxyName (\n        _bstr_t bstrProtocol );\n    HRESULT setProxyName (\n        _bstr_t bstrProtocol,\n        _bstr_t bstrProxyName );\n    long getProxyPort (\n        _bstr_t bstrProtocol );\n    HRESULT setProxyPort (\n        _bstr_t bstrProtocol,\n        long lProxyPort );\n    _bstr_t getProxyExceptionList (\n        _bstr_t bstrProtocol );\n    HRESULT setProxyExceptionList (\n        _bstr_t bstrProtocol,\n        _bstr_t pbstrExceptionList );\n    VARIANT_BOOL getProxyBypassForLocal (\n        _bstr_t bstrProtocol );\n    HRESULT setProxyBypassForLocal (\n        _bstr_t bstrProtocol,\n        VARIANT_BOOL fBypassForLocal );\n    long GetmaxBandwidth ( );\n    void PutmaxBandwidth (\n        long lMaxBandwidth );\n    long GetdownloadProgress ( );\n    long GetencodedFrameRate ( );\n    long GetframesSkipped ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_bandWidth (\n        /*[out,retval]*/ long * plBandwidth ) = 0;\n      virtual HRESULT __stdcall get_recoveredPackets (\n        /*[out,retval]*/ long * plRecoveredPackets ) = 0;\n      virtual HRESULT __stdcall get_sourceProtocol (\n        /*[out,retval]*/ BSTR * pbstrSourceProtocol ) = 0;\n      virtual HRESULT __stdcall get_receivedPackets (\n        /*[out,retval]*/ long * plReceivedPackets ) = 0;\n      virtual HRESULT __stdcall get_lostPackets (\n        /*[out,retval]*/ long * plLostPackets ) = 0;\n      virtual HRESULT __stdcall get_receptionQuality (\n        /*[out,retval]*/ long * plReceptionQuality ) = 0;\n      virtual HRESULT __stdcall get_bufferingCount (\n        /*[out,retval]*/ long * plBufferingCount ) = 0;\n      virtual HRESULT __stdcall get_bufferingProgress (\n        /*[out,retval]*/ long * plBufferingProgress ) = 0;\n      virtual HRESULT __stdcall get_bufferingTime (\n        /*[out,retval]*/ long * plBufferingTime ) = 0;\n      virtual HRESULT __stdcall put_bufferingTime (\n        /*[in]*/ long plBufferingTime ) = 0;\n      virtual HRESULT __stdcall get_frameRate (\n        /*[out,retval]*/ long * plFrameRate ) = 0;\n      virtual HRESULT __stdcall get_maxBitRate (\n        /*[out,retval]*/ long * plBitRate ) = 0;\n      virtual HRESULT __stdcall get_bitRate (\n        /*[out,retval]*/ long * plBitRate ) = 0;\n      virtual HRESULT __stdcall raw_getProxySettings (\n        /*[in]*/ BSTR bstrProtocol,\n        /*[out,retval]*/ long * plProxySetting ) = 0;\n      virtual HRESULT __stdcall raw_setProxySettings (\n        /*[in]*/ BSTR bstrProtocol,\n        /*[in]*/ long lProxySetting ) = 0;\n      virtual HRESULT __stdcall raw_getProxyName (\n        /*[in]*/ BSTR bstrProtocol,\n        /*[out,retval]*/ BSTR * pbstrProxyName ) = 0;\n      virtual HRESULT __stdcall raw_setProxyName (\n        /*[in]*/ BSTR bstrProtocol,\n        /*[in]*/ BSTR bstrProxyName ) = 0;\n      virtual HRESULT __stdcall raw_getProxyPort (\n        /*[in]*/ BSTR bstrProtocol,\n        /*[out,retval]*/ long * lProxyPort ) = 0;\n      virtual HRESULT __stdcall raw_setProxyPort (\n        /*[in]*/ BSTR bstrProtocol,\n        /*[in]*/ long lProxyPort ) = 0;\n      virtual HRESULT __stdcall raw_getProxyExceptionList (\n        /*[in]*/ BSTR bstrProtocol,\n        /*[out,retval]*/ BSTR * pbstrExceptionList ) = 0;\n      virtual HRESULT __stdcall raw_setProxyExceptionList (\n        /*[in]*/ BSTR bstrProtocol,\n        /*[in]*/ BSTR pbstrExceptionList ) = 0;\n      virtual HRESULT __stdcall raw_getProxyBypassForLocal (\n        /*[in]*/ BSTR bstrProtocol,\n        /*[out,retval]*/ VARIANT_BOOL * pfBypassForLocal ) = 0;\n      virtual HRESULT __stdcall raw_setProxyBypassForLocal (\n        /*[in]*/ BSTR bstrProtocol,\n        /*[in]*/ VARIANT_BOOL fBypassForLocal ) = 0;\n      virtual HRESULT __stdcall get_maxBandwidth (\n        /*[out,retval]*/ long * lMaxBandwidth ) = 0;\n      virtual HRESULT __stdcall put_maxBandwidth (\n        /*[in]*/ long lMaxBandwidth ) = 0;\n      virtual HRESULT __stdcall get_downloadProgress (\n        /*[out,retval]*/ long * plDownloadProgress ) = 0;\n      virtual HRESULT __stdcall get_encodedFrameRate (\n        /*[out,retval]*/ long * plFrameRate ) = 0;\n      virtual HRESULT __stdcall get_framesSkipped (\n        /*[out,retval]*/ long * plFrames ) = 0;\n};\n\nstruct __declspec(uuid(\"4f2df574-c588-11d3-9ed0-00c04fb6e937\"))\nIWMPClosedCaption : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetSAMIStyle,put=PutSAMIStyle))\n    _bstr_t SAMIStyle;\n    __declspec(property(get=GetSAMILang,put=PutSAMILang))\n    _bstr_t SAMILang;\n    __declspec(property(get=GetSAMIFileName,put=PutSAMIFileName))\n    _bstr_t SAMIFileName;\n    __declspec(property(get=GetcaptioningId,put=PutcaptioningId))\n    _bstr_t captioningId;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetSAMIStyle ( );\n    void PutSAMIStyle (\n        _bstr_t pbstrSAMIStyle );\n    _bstr_t GetSAMILang ( );\n    void PutSAMILang (\n        _bstr_t pbstrSAMILang );\n    _bstr_t GetSAMIFileName ( );\n    void PutSAMIFileName (\n        _bstr_t pbstrSAMIFileName );\n    _bstr_t GetcaptioningId ( );\n    void PutcaptioningId (\n        _bstr_t pbstrCaptioningID );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_SAMIStyle (\n        /*[out,retval]*/ BSTR * pbstrSAMIStyle ) = 0;\n      virtual HRESULT __stdcall put_SAMIStyle (\n        /*[in]*/ BSTR pbstrSAMIStyle ) = 0;\n      virtual HRESULT __stdcall get_SAMILang (\n        /*[out,retval]*/ BSTR * pbstrSAMILang ) = 0;\n      virtual HRESULT __stdcall put_SAMILang (\n        /*[in]*/ BSTR pbstrSAMILang ) = 0;\n      virtual HRESULT __stdcall get_SAMIFileName (\n        /*[out,retval]*/ BSTR * pbstrSAMIFileName ) = 0;\n      virtual HRESULT __stdcall put_SAMIFileName (\n        /*[in]*/ BSTR pbstrSAMIFileName ) = 0;\n      virtual HRESULT __stdcall get_captioningId (\n        /*[out,retval]*/ BSTR * pbstrCaptioningID ) = 0;\n      virtual HRESULT __stdcall put_captioningId (\n        /*[in]*/ BSTR pbstrCaptioningID ) = 0;\n};\n\nstruct __declspec(uuid(\"3614c646-3b3b-4de7-a81e-930e3f2127b3\"))\nIWMPErrorItem : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GeterrorCode))\n    long errorCode;\n    __declspec(property(get=GeterrorDescription))\n    _bstr_t errorDescription;\n    __declspec(property(get=GeterrorContext))\n    _variant_t errorContext;\n    __declspec(property(get=Getremedy))\n    long remedy;\n    __declspec(property(get=GetcustomUrl))\n    _bstr_t customUrl;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long GeterrorCode ( );\n    _bstr_t GeterrorDescription ( );\n    _variant_t GeterrorContext ( );\n    long Getremedy ( );\n    _bstr_t GetcustomUrl ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_errorCode (\n        /*[out,retval]*/ long * phr ) = 0;\n      virtual HRESULT __stdcall get_errorDescription (\n        /*[out,retval]*/ BSTR * pbstrDescription ) = 0;\n      virtual HRESULT __stdcall get_errorContext (\n        /*[out,retval]*/ VARIANT * pvarContext ) = 0;\n      virtual HRESULT __stdcall get_remedy (\n        /*[out,retval]*/ long * plRemedy ) = 0;\n      virtual HRESULT __stdcall get_customUrl (\n        /*[out,retval]*/ BSTR * pbstrCustomUrl ) = 0;\n};\n\nstruct __declspec(uuid(\"a12dcf7d-14ab-4c1b-a8cd-63909f06025b\"))\nIWMPError : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GeterrorCount))\n    long errorCount;\n    __declspec(property(get=GetItem))\n    IWMPErrorItemPtr Item[];\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT clearErrorQueue ( );\n    long GeterrorCount ( );\n    IWMPErrorItemPtr GetItem (\n        long dwIndex );\n    HRESULT webHelp ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_clearErrorQueue ( ) = 0;\n      virtual HRESULT __stdcall get_errorCount (\n        /*[out,retval]*/ long * plNumErrors ) = 0;\n      virtual HRESULT __stdcall get_Item (\n        /*[in]*/ long dwIndex,\n        /*[out,retval]*/ struct IWMPErrorItem * * ppErrorItem ) = 0;\n      virtual HRESULT __stdcall raw_webHelp ( ) = 0;\n};\n\nstruct __declspec(uuid(\"8da61686-4668-4a5c-ae5d-803193293dbe\"))\nIWMPDVD : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetisAvailable))\n    VARIANT_BOOL isAvailable[];\n    __declspec(property(get=Getdomain))\n    _bstr_t domain;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL GetisAvailable (\n        _bstr_t bstrItem );\n    _bstr_t Getdomain ( );\n    HRESULT topMenu ( );\n    HRESULT titleMenu ( );\n    HRESULT back ( );\n    HRESULT resume ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_isAvailable (\n        /*[in]*/ BSTR bstrItem,\n        /*[out,retval]*/ VARIANT_BOOL * pIsAvailable ) = 0;\n      virtual HRESULT __stdcall get_domain (\n        /*[out,retval]*/ BSTR * strDomain ) = 0;\n      virtual HRESULT __stdcall raw_topMenu ( ) = 0;\n      virtual HRESULT __stdcall raw_titleMenu ( ) = 0;\n      virtual HRESULT __stdcall raw_back ( ) = 0;\n      virtual HRESULT __stdcall raw_resume ( ) = 0;\n};\n\nstruct __declspec(uuid(\"40897764-ceab-47be-ad4a-8e28537f9bbf\"))\nIWMPPlayerApplication : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetplayerDocked))\n    VARIANT_BOOL playerDocked;\n    __declspec(property(get=GethasDisplay))\n    VARIANT_BOOL hasDisplay;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT switchToPlayerApplication ( );\n    HRESULT switchToControl ( );\n    VARIANT_BOOL GetplayerDocked ( );\n    VARIANT_BOOL GethasDisplay ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_switchToPlayerApplication ( ) = 0;\n      virtual HRESULT __stdcall raw_switchToControl ( ) = 0;\n      virtual HRESULT __stdcall get_playerDocked (\n        /*[out,retval]*/ VARIANT_BOOL * pbPlayerDocked ) = 0;\n      virtual HRESULT __stdcall get_hasDisplay (\n        /*[out,retval]*/ VARIANT_BOOL * pbHasDisplay ) = 0;\n};\n\nstruct __declspec(uuid(\"f75ccec0-c67c-475c-931e-8719870bee7d\"))\nIWMPErrorItem2 : IWMPErrorItem\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getcondition))\n    long condition;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long Getcondition ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_condition (\n        /*[out,retval]*/ long * plCondition ) = 0;\n};\n\nstruct __declspec(uuid(\"5c29bbe0-f87d-4c45-aa28-a70f0230ffa9\"))\nIWMPMetadataPicture : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetmimeType))\n    _bstr_t mimeType;\n    __declspec(property(get=GetpictureType))\n    _bstr_t pictureType;\n    __declspec(property(get=GetDescription))\n    _bstr_t Description;\n    __declspec(property(get=GetURL))\n    _bstr_t URL;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetmimeType ( );\n    _bstr_t GetpictureType ( );\n    _bstr_t GetDescription ( );\n    _bstr_t GetURL ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_mimeType (\n        /*[out,retval]*/ BSTR * pbstrMimeType ) = 0;\n      virtual HRESULT __stdcall get_pictureType (\n        /*[out,retval]*/ BSTR * pbstrPictureType ) = 0;\n      virtual HRESULT __stdcall get_Description (\n        /*[out,retval]*/ BSTR * pbstrDescription ) = 0;\n      virtual HRESULT __stdcall get_URL (\n        /*[out,retval]*/ BSTR * pbstrURL ) = 0;\n};\n\nstruct __declspec(uuid(\"769a72db-13d2-45e2-9c48-53ca9d5b7450\"))\nIWMPMetadataText : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetDescription))\n    _bstr_t Description;\n    __declspec(property(get=Gettext))\n    _bstr_t text;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetDescription ( );\n    _bstr_t Gettext ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_Description (\n        /*[out,retval]*/ BSTR * pbstrDescription ) = 0;\n      virtual HRESULT __stdcall get_text (\n        /*[out,retval]*/ BSTR * pbstrText ) = 0;\n};\n\nstruct __declspec(uuid(\"fda937a4-eece-4da5-a0b6-39bf89ade2c2\"))\nIWMPSettings2 : IWMPSettings\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetdefaultAudioLanguage))\n    long defaultAudioLanguage;\n    __declspec(property(get=GetmediaAccessRights))\n    _bstr_t mediaAccessRights;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long GetdefaultAudioLanguage ( );\n    _bstr_t GetmediaAccessRights ( );\n    VARIANT_BOOL requestMediaAccessRights (\n        _bstr_t bstrDesiredAccess );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_defaultAudioLanguage (\n        /*[out,retval]*/ long * plLangID ) = 0;\n      virtual HRESULT __stdcall get_mediaAccessRights (\n        /*[out,retval]*/ BSTR * pbstrRights ) = 0;\n      virtual HRESULT __stdcall raw_requestMediaAccessRights (\n        /*[in]*/ BSTR bstrDesiredAccess,\n        /*[out,retval]*/ VARIANT_BOOL * pvbAccepted ) = 0;\n};\n\nstruct __declspec(uuid(\"350ba78b-6bc8-4113-a5f5-312056934eb6\"))\nIWMPClosedCaption2 : IWMPClosedCaption\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetSAMILangCount))\n    long SAMILangCount;\n    __declspec(property(get=GetSAMIStyleCount))\n    long SAMIStyleCount;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long GetSAMILangCount ( );\n    _bstr_t getSAMILangName (\n        long nIndex );\n    long getSAMILangID (\n        long nIndex );\n    long GetSAMIStyleCount ( );\n    _bstr_t getSAMIStyleName (\n        long nIndex );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_SAMILangCount (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_getSAMILangName (\n        /*[in]*/ long nIndex,\n        /*[out,retval]*/ BSTR * pbstrName ) = 0;\n      virtual HRESULT __stdcall raw_getSAMILangID (\n        /*[in]*/ long nIndex,\n        /*[out,retval]*/ long * plLangID ) = 0;\n      virtual HRESULT __stdcall get_SAMIStyleCount (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_getSAMIStyleName (\n        /*[in]*/ long nIndex,\n        /*[out,retval]*/ BSTR * pbstrName ) = 0;\n};\n\nstruct __declspec(uuid(\"a00918f3-a6b0-4bfb-9189-fd834c7bc5a5\"))\nIWMPQuery : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT addCondition (\n        _bstr_t bstrAttribute,\n        _bstr_t bstrOperator,\n        _bstr_t bstrValue );\n    HRESULT beginNextGroup ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_addCondition (\n        /*[in]*/ BSTR bstrAttribute,\n        /*[in]*/ BSTR bstrOperator,\n        /*[in]*/ BSTR bstrValue ) = 0;\n      virtual HRESULT __stdcall raw_beginNextGroup ( ) = 0;\n};\n\nstruct __declspec(uuid(\"46ad648d-53f1-4a74-92e2-2a1b68d63fd4\"))\nIWMPStringCollection2 : IWMPStringCollection\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL isIdentical (\n        struct IWMPStringCollection2 * pIWMPStringCollection2 );\n    _bstr_t getItemInfo (\n        long lCollectionIndex,\n        _bstr_t bstrItemName );\n    long getAttributeCountByType (\n        long lCollectionIndex,\n        _bstr_t bstrType,\n        _bstr_t bstrLanguage );\n    _variant_t getItemInfoByType (\n        long lCollectionIndex,\n        _bstr_t bstrType,\n        _bstr_t bstrLanguage,\n        long lAttributeIndex );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_isIdentical (\n        /*[in]*/ struct IWMPStringCollection2 * pIWMPStringCollection2,\n        /*[out,retval]*/ VARIANT_BOOL * pvbool ) = 0;\n      virtual HRESULT __stdcall raw_getItemInfo (\n        /*[in]*/ long lCollectionIndex,\n        /*[in]*/ BSTR bstrItemName,\n        /*[out,retval]*/ BSTR * pbstrValue ) = 0;\n      virtual HRESULT __stdcall raw_getAttributeCountByType (\n        /*[in]*/ long lCollectionIndex,\n        /*[in]*/ BSTR bstrType,\n        /*[in]*/ BSTR bstrLanguage,\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_getItemInfoByType (\n        /*[in]*/ long lCollectionIndex,\n        /*[in]*/ BSTR bstrType,\n        /*[in]*/ BSTR bstrLanguage,\n        /*[in]*/ long lAttributeIndex,\n        /*[out,retval]*/ VARIANT * pvarValue ) = 0;\n};\n\nstruct __declspec(uuid(\"1d01fbdb-ade2-4c8d-9842-c190b95c3306\"))\nIWMPPlayerServices : IUnknown\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT activateUIPlugin (\n        _bstr_t bstrPlugin );\n    HRESULT setTaskPane (\n        _bstr_t bstrTaskPane );\n    HRESULT setTaskPaneURL (\n        _bstr_t bstrTaskPane,\n        _bstr_t bstrURL,\n        _bstr_t bstrFriendlyName );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_activateUIPlugin (\n        /*[in]*/ BSTR bstrPlugin ) = 0;\n      virtual HRESULT __stdcall raw_setTaskPane (\n        /*[in]*/ BSTR bstrTaskPane ) = 0;\n      virtual HRESULT __stdcall raw_setTaskPaneURL (\n        /*[in]*/ BSTR bstrTaskPane,\n        /*[in]*/ BSTR bstrURL,\n        /*[in]*/ BSTR bstrFriendlyName ) = 0;\n};\n\nstruct __declspec(uuid(\"1bb1592f-f040-418a-9f71-17c7512b4d70\"))\nIWMPPlayerServices2 : IWMPPlayerServices\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT setBackgroundProcessingPriority (\n        _bstr_t bstrPriority );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_setBackgroundProcessingPriority (\n        /*[in]*/ BSTR bstrPriority ) = 0;\n};\n\nstruct __declspec(uuid(\"cbb92747-741f-44fe-ab5b-f1a48f3b2a59\"))\nIWMPRemoteMediaServices : IUnknown\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT GetServiceType (\n        BSTR * pbstrType );\n    HRESULT GetApplicationName (\n        BSTR * pbstrName );\n    HRESULT GetScriptableObject (\n        BSTR * pbstrName,\n        IDispatch * * ppDispatch );\n    HRESULT GetCustomUIMode (\n        BSTR * pbstrFile );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_GetServiceType (\n        /*[out]*/ BSTR * pbstrType ) = 0;\n      virtual HRESULT __stdcall raw_GetApplicationName (\n        /*[out]*/ BSTR * pbstrName ) = 0;\n      virtual HRESULT __stdcall raw_GetScriptableObject (\n        /*[out]*/ BSTR * pbstrName,\n        /*[out]*/ IDispatch * * ppDispatch ) = 0;\n      virtual HRESULT __stdcall raw_GetCustomUIMode (\n        /*[out]*/ BSTR * pbstrFile ) = 0;\n};\n\nstruct __declspec(uuid(\"8b5050ff-e0a4-4808-b3a8-893a9e1ed894\"))\nIWMPSyncServices : IUnknown\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetdeviceCount))\n    long deviceCount;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long GetdeviceCount ( );\n    IWMPSyncDevicePtr getDevice (\n        long lIndex );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_deviceCount (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_getDevice (\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ struct IWMPSyncDevice * * ppDevice ) = 0;\n};\n\nstruct __declspec(uuid(\"82cba86b-9f04-474b-a365-d6dd1466e541\"))\nIWMPLibrarySharingServices : IUnknown\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL isLibraryShared ( );\n    VARIANT_BOOL isLibrarySharingEnabled ( );\n    HRESULT showLibrarySharing ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_isLibraryShared (\n        /*[out,retval]*/ VARIANT_BOOL * pvbShared ) = 0;\n      virtual HRESULT __stdcall raw_isLibrarySharingEnabled (\n        /*[out,retval]*/ VARIANT_BOOL * pvbEnabled ) = 0;\n      virtual HRESULT __stdcall raw_showLibrarySharing ( ) = 0;\n};\n\nstruct __declspec(uuid(\"788c8743-e57f-439d-a468-5bc77f2e59c6\"))\nIWMPFolderMonitorServices : IUnknown\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getcount))\n    long count;\n    __declspec(property(get=GetscanState))\n    enum WMPFolderScanState scanState;\n    __declspec(property(get=GetcurrentFolder))\n    _bstr_t currentFolder;\n    __declspec(property(get=GetscannedFilesCount))\n    long scannedFilesCount;\n    __declspec(property(get=GetaddedFilesCount))\n    long addedFilesCount;\n    __declspec(property(get=GetupdateProgress))\n    long updateProgress;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long Getcount ( );\n    _bstr_t Item (\n        long lIndex );\n    HRESULT add (\n        _bstr_t bstrFolder );\n    HRESULT remove (\n        long lIndex );\n    enum WMPFolderScanState GetscanState ( );\n    _bstr_t GetcurrentFolder ( );\n    long GetscannedFilesCount ( );\n    long GetaddedFilesCount ( );\n    long GetupdateProgress ( );\n    HRESULT startScan ( );\n    HRESULT stopScan ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_count (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_Item (\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ BSTR * pbstrFolder ) = 0;\n      virtual HRESULT __stdcall raw_add (\n        /*[in]*/ BSTR bstrFolder ) = 0;\n      virtual HRESULT __stdcall raw_remove (\n        /*[in]*/ long lIndex ) = 0;\n      virtual HRESULT __stdcall get_scanState (\n        /*[out,retval]*/ enum WMPFolderScanState * pwmpfss ) = 0;\n      virtual HRESULT __stdcall get_currentFolder (\n        /*[out,retval]*/ BSTR * pbstrFolder ) = 0;\n      virtual HRESULT __stdcall get_scannedFilesCount (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall get_addedFilesCount (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall get_updateProgress (\n        /*[out,retval]*/ long * plProgress ) = 0;\n      virtual HRESULT __stdcall raw_startScan ( ) = 0;\n      virtual HRESULT __stdcall raw_stopScan ( ) = 0;\n};\n\nstruct __declspec(uuid(\"88afb4b2-140a-44d2-91e6-4543da467cd1\"))\nIWMPSyncDevice2 : IWMPSyncDevice\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT setItemInfo (\n        _bstr_t bstrItemName,\n        _bstr_t bstrVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_setItemInfo (\n        /*[in]*/ BSTR bstrItemName,\n        /*[in]*/ BSTR bstrVal ) = 0;\n};\n\nstruct __declspec(uuid(\"e41c88dd-2364-4ff7-a0f5-ca9859af783f\"))\nIAppDispatch : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getheight,put=Putheight))\n    long height;\n    __declspec(property(get=GetnavigatePreviousEnabled))\n    VARIANT_BOOL navigatePreviousEnabled;\n    __declspec(property(get=GetnavigateNextEnabled))\n    VARIANT_BOOL navigateNextEnabled;\n    __declspec(property(get=GetpowerPersonality))\n    _bstr_t powerPersonality;\n    __declspec(property(get=GetexclusiveService))\n    _bstr_t exclusiveService;\n    __declspec(property(get=GetglassEnabled))\n    VARIANT_BOOL glassEnabled;\n    __declspec(property(get=GetserviceLoginVisible))\n    VARIANT_BOOL serviceLoginVisible;\n    __declspec(property(get=GetserviceLoginSignedIn))\n    VARIANT_BOOL serviceLoginSignedIn;\n    __declspec(property(get=GetinVistaPlus))\n    VARIANT_BOOL inVistaPlus;\n    __declspec(property(get=GetmenubarCurrentlyVisible))\n    VARIANT_BOOL menubarCurrentlyVisible;\n    __declspec(property(put=PutwindowText))\n    _bstr_t windowText;\n    __declspec(property(get=GetplayLibraryItemEnabled))\n    VARIANT_BOOL playLibraryItemEnabled;\n    __declspec(property(get=GetserviceGetInfo))\n    _variant_t serviceGetInfo[];\n    __declspec(property(get=GetfullScreenEnabled))\n    VARIANT_BOOL fullScreenEnabled;\n    __declspec(property(get=GetlibraryBasketMode,put=PutlibraryBasketMode))\n    long libraryBasketMode;\n    __declspec(property(get=GetlibraryBasketWidth))\n    long libraryBasketWidth;\n    __declspec(property(get=GetbreadcrumbItemCount))\n    long breadcrumbItemCount;\n    __declspec(property(get=GetbreadcrumbItemName))\n    _bstr_t breadcrumbItemName[];\n    __declspec(property(get=GetbreadcrumbItemHasMenu))\n    VARIANT_BOOL breadcrumbItemHasMenu[];\n    __declspec(property(get=GettitlebarVisible,put=PuttitlebarVisible))\n    VARIANT_BOOL titlebarVisible;\n    __declspec(property(get=GettitlebarAutoHide,put=PuttitlebarAutoHide))\n    VARIANT_BOOL titlebarAutoHide;\n    __declspec(property(get=GetcurrentTask,put=PutcurrentTask))\n    _bstr_t currentTask;\n    __declspec(property(get=GetsettingsVisible,put=PutsettingsVisible))\n    VARIANT_BOOL settingsVisible;\n    __declspec(property(get=GetplaylistVisible,put=PutplaylistVisible))\n    VARIANT_BOOL playlistVisible;\n    __declspec(property(get=GettaskbarVisible,put=PuttaskbarVisible))\n    VARIANT_BOOL taskbarVisible;\n    __declspec(property(get=GettitlebarCurrentlyVisible))\n    VARIANT_BOOL titlebarCurrentlyVisible;\n    __declspec(property(get=GetbgPluginRunning))\n    VARIANT_BOOL bgPluginRunning;\n    __declspec(property(get=Getmaximized))\n    VARIANT_BOOL maximized;\n    __declspec(property(get=GetpreviousEnabled))\n    VARIANT_BOOL previousEnabled;\n    __declspec(property(get=GetDPI))\n    long DPI;\n    __declspec(property(get=Gettop,put=Puttop))\n    long top;\n    __declspec(property(get=Getleft,put=Putleft))\n    long left;\n    __declspec(property(get=Getwidth,put=Putwidth))\n    long width;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL GettitlebarVisible ( );\n    void PuttitlebarVisible (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GettitlebarAutoHide ( );\n    void PuttitlebarAutoHide (\n        VARIANT_BOOL pVal );\n    _bstr_t GetcurrentTask ( );\n    void PutcurrentTask (\n        _bstr_t pVal );\n    long GetlibraryBasketMode ( );\n    void PutlibraryBasketMode (\n        long pVal );\n    long GetlibraryBasketWidth ( );\n    long GetbreadcrumbItemCount ( );\n    _bstr_t GetbreadcrumbItemName (\n        long lIndex );\n    VARIANT_BOOL GetbreadcrumbItemHasMenu (\n        long lIndex );\n    HRESULT breadcrumbItemClick (\n        long lIndex );\n    VARIANT_BOOL GetsettingsVisible ( );\n    void PutsettingsVisible (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetplaylistVisible ( );\n    void PutplaylistVisible (\n        VARIANT_BOOL pVal );\n    HRESULT gotoSkinMode ( );\n    HRESULT gotoPlayerMode ( );\n    HRESULT gotoLibraryMode (\n        long lButton );\n    HRESULT navigatePrevious ( );\n    HRESULT navigateNext ( );\n    HRESULT goFullScreen ( );\n    VARIANT_BOOL GetfullScreenEnabled ( );\n    VARIANT_BOOL GetserviceLoginVisible ( );\n    VARIANT_BOOL GetserviceLoginSignedIn ( );\n    HRESULT serviceLogin ( );\n    HRESULT serviceLogout ( );\n    _variant_t GetserviceGetInfo (\n        _bstr_t bstrItem );\n    VARIANT_BOOL GetnavigatePreviousEnabled ( );\n    VARIANT_BOOL GetnavigateNextEnabled ( );\n    HRESULT navigateToAddress (\n        _bstr_t address );\n    VARIANT_BOOL GetglassEnabled ( );\n    VARIANT_BOOL GetinVistaPlus ( );\n    HRESULT adjustLeft (\n        long nDistance );\n    VARIANT_BOOL GettaskbarVisible ( );\n    void PuttaskbarVisible (\n        VARIANT_BOOL pVal );\n    long GetDPI ( );\n    VARIANT_BOOL GetpreviousEnabled ( );\n    VARIANT_BOOL GetplayLibraryItemEnabled ( );\n    HRESULT previous ( );\n    VARIANT_BOOL GettitlebarCurrentlyVisible ( );\n    VARIANT_BOOL GetmenubarCurrentlyVisible ( );\n    VARIANT_BOOL GetbgPluginRunning ( );\n    HRESULT configurePlugins (\n        long nType );\n    _bstr_t getTimeString (\n        double dTime );\n    VARIANT_BOOL Getmaximized ( );\n    long Gettop ( );\n    void Puttop (\n        long pVal );\n    long Getleft ( );\n    void Putleft (\n        long pVal );\n    long Getwidth ( );\n    void Putwidth (\n        long pVal );\n    long Getheight ( );\n    void Putheight (\n        long pVal );\n    HRESULT setWindowPos (\n        long lTop,\n        long lLeft,\n        long lWidth,\n        long lHeight );\n    HRESULT logData (\n        _bstr_t ID,\n        _bstr_t data );\n    _bstr_t GetpowerPersonality ( );\n    HRESULT navigateNamespace (\n        _bstr_t address );\n    _bstr_t GetexclusiveService ( );\n    void PutwindowText (\n        _bstr_t _arg1 );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_titlebarVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_titlebarVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_titlebarAutoHide (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_titlebarAutoHide (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_currentTask (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_currentTask (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_libraryBasketMode (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_libraryBasketMode (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_libraryBasketWidth (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_breadcrumbItemCount (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_breadcrumbItemName (\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_breadcrumbItemHasMenu (\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall raw_breadcrumbItemClick (\n        /*[in]*/ long lIndex ) = 0;\n      virtual HRESULT __stdcall get_settingsVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_settingsVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_playlistVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_playlistVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall raw_gotoSkinMode ( ) = 0;\n      virtual HRESULT __stdcall raw_gotoPlayerMode ( ) = 0;\n      virtual HRESULT __stdcall raw_gotoLibraryMode (\n        /*[in]*/ long lButton ) = 0;\n      virtual HRESULT __stdcall raw_navigatePrevious ( ) = 0;\n      virtual HRESULT __stdcall raw_navigateNext ( ) = 0;\n      virtual HRESULT __stdcall raw_goFullScreen ( ) = 0;\n      virtual HRESULT __stdcall get_fullScreenEnabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_serviceLoginVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_serviceLoginSignedIn (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall raw_serviceLogin ( ) = 0;\n      virtual HRESULT __stdcall raw_serviceLogout ( ) = 0;\n      virtual HRESULT __stdcall get_serviceGetInfo (\n        /*[in]*/ BSTR bstrItem,\n        /*[out,retval]*/ VARIANT * pValue ) = 0;\n      virtual HRESULT __stdcall get_navigatePreviousEnabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_navigateNextEnabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall raw_navigateToAddress (\n        /*[in]*/ BSTR address ) = 0;\n      virtual HRESULT __stdcall get_glassEnabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_inVistaPlus (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall raw_adjustLeft (\n        /*[in]*/ long nDistance ) = 0;\n      virtual HRESULT __stdcall get_taskbarVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_taskbarVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_DPI (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_previousEnabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_playLibraryItemEnabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall raw_previous ( ) = 0;\n      virtual HRESULT __stdcall get_titlebarCurrentlyVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_menubarCurrentlyVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_bgPluginRunning (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall raw_configurePlugins (\n        /*[in]*/ long nType ) = 0;\n      virtual HRESULT __stdcall raw_getTimeString (\n        /*[in]*/ double dTime,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_maximized (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_top (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_top (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_left (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_left (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_width (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_width (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_height (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_height (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall raw_setWindowPos (\n        /*[in]*/ long lTop,\n        /*[in]*/ long lLeft,\n        /*[in]*/ long lWidth,\n        /*[in]*/ long lHeight ) = 0;\n      virtual HRESULT __stdcall raw_logData (\n        /*[in]*/ BSTR ID,\n        /*[in]*/ BSTR data ) = 0;\n      virtual HRESULT __stdcall get_powerPersonality (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall raw_navigateNamespace (\n        /*[in]*/ BSTR address ) = 0;\n      virtual HRESULT __stdcall get_exclusiveService (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_windowText (\n        /*[in]*/ BSTR _arg1 ) = 0;\n};\n\nstruct __declspec(uuid(\"ef870383-83ab-4ea9-be48-56fa4251af10\"))\nIWMPSafeBrowser : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetURL,put=PutURL))\n    _bstr_t URL;\n    __declspec(property(get=Getstatus))\n    long status;\n    __declspec(property(get=GetpendingDownloads))\n    long pendingDownloads;\n    __declspec(property(get=GetbaseURL))\n    _bstr_t baseURL;\n    __declspec(property(get=GetsecureLock))\n    long secureLock;\n    __declspec(property(get=Getbusy))\n    VARIANT_BOOL busy;\n    __declspec(property(get=GetfullURL))\n    _bstr_t fullURL;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetURL ( );\n    void PutURL (\n        _bstr_t pVal );\n    long Getstatus ( );\n    long GetpendingDownloads ( );\n    HRESULT showSAMIText (\n        _bstr_t samiText );\n    HRESULT showLyrics (\n        _bstr_t lyrics );\n    HRESULT loadSpecialPage (\n        _bstr_t pageName );\n    HRESULT goBack ( );\n    HRESULT goForward ( );\n    HRESULT stop ( );\n    HRESULT refresh ( );\n    _bstr_t GetbaseURL ( );\n    _bstr_t GetfullURL ( );\n    long GetsecureLock ( );\n    VARIANT_BOOL Getbusy ( );\n    HRESULT showCert ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_URL (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_URL (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_status (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_pendingDownloads (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall raw_showSAMIText (\n        /*[in]*/ BSTR samiText ) = 0;\n      virtual HRESULT __stdcall raw_showLyrics (\n        /*[in]*/ BSTR lyrics ) = 0;\n      virtual HRESULT __stdcall raw_loadSpecialPage (\n        /*[in]*/ BSTR pageName ) = 0;\n      virtual HRESULT __stdcall raw_goBack ( ) = 0;\n      virtual HRESULT __stdcall raw_goForward ( ) = 0;\n      virtual HRESULT __stdcall raw_stop ( ) = 0;\n      virtual HRESULT __stdcall raw_refresh ( ) = 0;\n      virtual HRESULT __stdcall get_baseURL (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_fullURL (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_secureLock (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_busy (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall raw_showCert ( ) = 0;\n};\n\nstruct __declspec(uuid(\"21d077c1-4baa-11d3-bd45-00c04f6ea5ae\"))\nIWMPObjectExtendedProps : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetresizeImages,put=PutresizeImages))\n    VARIANT_BOOL resizeImages;\n    __declspec(property(get=GetnineGridMargins,put=PutnineGridMargins))\n    _bstr_t nineGridMargins;\n    __declspec(property(get=GetresizeOptimize,put=PutresizeOptimize))\n    _bstr_t resizeOptimize;\n    __declspec(property(get=Getrotation,put=Putrotation))\n    float rotation;\n    __declspec(property(get=GetID))\n    _bstr_t ID;\n    __declspec(property(get=GetelementType))\n    _bstr_t elementType;\n    __declspec(property(get=Getleft,put=Putleft))\n    long left;\n    __declspec(property(get=Gettop,put=Puttop))\n    long top;\n    __declspec(property(get=Getwidth,put=Putwidth))\n    long width;\n    __declspec(property(get=Getheight,put=Putheight))\n    long height;\n    __declspec(property(get=GetzIndex,put=PutzIndex))\n    long zIndex;\n    __declspec(property(get=GetclippingImage,put=PutclippingImage))\n    _bstr_t clippingImage;\n    __declspec(property(get=GetclippingColor,put=PutclippingColor))\n    _bstr_t clippingColor;\n    __declspec(property(get=Getvisible,put=Putvisible))\n    VARIANT_BOOL visible;\n    __declspec(property(get=Getenabled,put=Putenabled))\n    VARIANT_BOOL enabled;\n    __declspec(property(get=GettabStop,put=PuttabStop))\n    VARIANT_BOOL tabStop;\n    __declspec(property(get=GetpassThrough,put=PutpassThrough))\n    VARIANT_BOOL passThrough;\n    __declspec(property(get=GethorizontalAlignment,put=PuthorizontalAlignment))\n    _bstr_t horizontalAlignment;\n    __declspec(property(get=GetverticalAlignment,put=PutverticalAlignment))\n    _bstr_t verticalAlignment;\n    __declspec(property(get=GetalphaBlend,put=PutalphaBlend))\n    long alphaBlend;\n    __declspec(property(get=GetaccName,put=PutaccName))\n    _bstr_t accName;\n    __declspec(property(get=GetaccDescription,put=PutaccDescription))\n    _bstr_t accDescription;\n    __declspec(property(get=GetaccKeyboardShortcut,put=PutaccKeyboardShortcut))\n    _bstr_t accKeyboardShortcut;\n    __declspec(property(get=Getright,put=Putright))\n    long right;\n    __declspec(property(get=Getbottom,put=Putbottom))\n    long bottom;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetID ( );\n    _bstr_t GetelementType ( );\n    long Getleft ( );\n    void Putleft (\n        long pVal );\n    long Gettop ( );\n    void Puttop (\n        long pVal );\n    long Getright ( );\n    void Putright (\n        long pVal );\n    long Getbottom ( );\n    void Putbottom (\n        long pVal );\n    long Getwidth ( );\n    void Putwidth (\n        long pVal );\n    long Getheight ( );\n    void Putheight (\n        long pVal );\n    long GetzIndex ( );\n    void PutzIndex (\n        long pVal );\n    _bstr_t GetclippingImage ( );\n    void PutclippingImage (\n        _bstr_t pVal );\n    _bstr_t GetclippingColor ( );\n    void PutclippingColor (\n        _bstr_t pVal );\n    VARIANT_BOOL Getvisible ( );\n    void Putvisible (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL Getenabled ( );\n    void Putenabled (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GettabStop ( );\n    void PuttabStop (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetpassThrough ( );\n    void PutpassThrough (\n        VARIANT_BOOL pVal );\n    _bstr_t GethorizontalAlignment ( );\n    void PuthorizontalAlignment (\n        _bstr_t pVal );\n    _bstr_t GetverticalAlignment ( );\n    void PutverticalAlignment (\n        _bstr_t pVal );\n    HRESULT moveTo (\n        long newX,\n        long newY,\n        long moveTime );\n    HRESULT slideTo (\n        long newX,\n        long newY,\n        long moveTime );\n    HRESULT moveSizeTo (\n        long newX,\n        long newY,\n        long newWidth,\n        long newHeight,\n        long moveTime,\n        VARIANT_BOOL fSlide );\n    long GetalphaBlend ( );\n    void PutalphaBlend (\n        long pVal );\n    HRESULT alphaBlendTo (\n        long newVal,\n        long alphaTime );\n    _bstr_t GetaccName ( );\n    void PutaccName (\n        _bstr_t pszName );\n    _bstr_t GetaccDescription ( );\n    void PutaccDescription (\n        _bstr_t pszDesc );\n    _bstr_t GetaccKeyboardShortcut ( );\n    void PutaccKeyboardShortcut (\n        _bstr_t pszShortcut );\n    VARIANT_BOOL GetresizeImages ( );\n    void PutresizeImages (\n        VARIANT_BOOL pVal );\n    _bstr_t GetnineGridMargins ( );\n    void PutnineGridMargins (\n        _bstr_t pszMargins );\n    _bstr_t GetresizeOptimize ( );\n    void PutresizeOptimize (\n        _bstr_t ppszResizeOptimize );\n    float Getrotation ( );\n    void Putrotation (\n        float pfVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_ID (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_elementType (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_left (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_left (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_top (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_top (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_right (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_right (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_bottom (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_bottom (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_width (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_width (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_height (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_height (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_zIndex (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_zIndex (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_clippingImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_clippingImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_clippingColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_clippingColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_visible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_visible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_enabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_enabled (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_tabStop (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_tabStop (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_passThrough (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_passThrough (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_horizontalAlignment (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_horizontalAlignment (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_verticalAlignment (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_verticalAlignment (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall raw_moveTo (\n        /*[in]*/ long newX,\n        /*[in]*/ long newY,\n        /*[in]*/ long moveTime ) = 0;\n      virtual HRESULT __stdcall raw_slideTo (\n        /*[in]*/ long newX,\n        /*[in]*/ long newY,\n        /*[in]*/ long moveTime ) = 0;\n      virtual HRESULT __stdcall raw_moveSizeTo (\n        /*[in]*/ long newX,\n        /*[in]*/ long newY,\n        /*[in]*/ long newWidth,\n        /*[in]*/ long newHeight,\n        /*[in]*/ long moveTime,\n        /*[in]*/ VARIANT_BOOL fSlide ) = 0;\n      virtual HRESULT __stdcall get_alphaBlend (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_alphaBlend (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall raw_alphaBlendTo (\n        /*[in]*/ long newVal,\n        /*[in]*/ long alphaTime ) = 0;\n      virtual HRESULT __stdcall get_accName (\n        /*[out,retval]*/ BSTR * pszName ) = 0;\n      virtual HRESULT __stdcall put_accName (\n        /*[in]*/ BSTR pszName ) = 0;\n      virtual HRESULT __stdcall get_accDescription (\n        /*[out,retval]*/ BSTR * pszDesc ) = 0;\n      virtual HRESULT __stdcall put_accDescription (\n        /*[in]*/ BSTR pszDesc ) = 0;\n      virtual HRESULT __stdcall get_accKeyboardShortcut (\n        /*[out,retval]*/ BSTR * pszShortcut ) = 0;\n      virtual HRESULT __stdcall put_accKeyboardShortcut (\n        /*[in]*/ BSTR pszShortcut ) = 0;\n      virtual HRESULT __stdcall get_resizeImages (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_resizeImages (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_nineGridMargins (\n        /*[out,retval]*/ BSTR * pszMargins ) = 0;\n      virtual HRESULT __stdcall put_nineGridMargins (\n        /*[in]*/ BSTR pszMargins ) = 0;\n      virtual HRESULT __stdcall get_resizeOptimize (\n        /*[out,retval]*/ BSTR * ppszResizeOptimize ) = 0;\n      virtual HRESULT __stdcall put_resizeOptimize (\n        /*[in]*/ BSTR ppszResizeOptimize ) = 0;\n      virtual HRESULT __stdcall get_rotation (\n        /*[out,retval]*/ float * pfVal ) = 0;\n      virtual HRESULT __stdcall put_rotation (\n        /*[in]*/ float pfVal ) = 0;\n};\n\nstruct __declspec(uuid(\"72f486b1-0d43-11d3-bd3f-00c04f6ea5ae\"))\nIWMPLayoutSubView : IWMPObjectExtendedProps\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetbackgroundImageHueShift,put=PutbackgroundImageHueShift))\n    float backgroundImageHueShift;\n    __declspec(property(get=GetbackgroundImageSaturation,put=PutbackgroundImageSaturation))\n    float backgroundImageSaturation;\n    __declspec(property(get=GetresizeBackgroundImage,put=PutresizeBackgroundImage))\n    VARIANT_BOOL resizeBackgroundImage;\n    __declspec(property(get=GettransparencyColor,put=PuttransparencyColor))\n    _bstr_t transparencyColor;\n    __declspec(property(get=GetbackgroundColor,put=PutbackgroundColor))\n    _bstr_t backgroundColor;\n    __declspec(property(get=GetbackgroundImage,put=PutbackgroundImage))\n    _bstr_t backgroundImage;\n    __declspec(property(get=GetbackgroundTiled,put=PutbackgroundTiled))\n    VARIANT_BOOL backgroundTiled;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GettransparencyColor ( );\n    void PuttransparencyColor (\n        _bstr_t pVal );\n    _bstr_t GetbackgroundColor ( );\n    void PutbackgroundColor (\n        _bstr_t pVal );\n    _bstr_t GetbackgroundImage ( );\n    void PutbackgroundImage (\n        _bstr_t pVal );\n    VARIANT_BOOL GetbackgroundTiled ( );\n    void PutbackgroundTiled (\n        VARIANT_BOOL pVal );\n    float GetbackgroundImageHueShift ( );\n    void PutbackgroundImageHueShift (\n        float pVal );\n    float GetbackgroundImageSaturation ( );\n    void PutbackgroundImageSaturation (\n        float pVal );\n    VARIANT_BOOL GetresizeBackgroundImage ( );\n    void PutresizeBackgroundImage (\n        VARIANT_BOOL pVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_transparencyColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_transparencyColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundTiled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundTiled (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundImageHueShift (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundImageHueShift (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundImageSaturation (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundImageSaturation (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_resizeBackgroundImage (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_resizeBackgroundImage (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"172e905d-80d9-4c2f-b7ce-2ccb771787a2\"))\nIWMPLayoutView : IWMPLayoutSubView\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Gettitle,put=Puttitle))\n    _bstr_t title;\n    __declspec(property(get=Getcategory,put=Putcategory))\n    _bstr_t category;\n    __declspec(property(get=GetfocusObjectID,put=PutfocusObjectID))\n    _bstr_t focusObjectID;\n    __declspec(property(get=GettitleBar))\n    VARIANT_BOOL titleBar;\n    __declspec(property(get=Getresizable))\n    VARIANT_BOOL resizable;\n    __declspec(property(get=GettimerInterval,put=PuttimerInterval))\n    long timerInterval;\n    __declspec(property(get=GetminWidth,put=PutminWidth))\n    long minWidth;\n    __declspec(property(get=GetmaxWidth,put=PutmaxWidth))\n    long maxWidth;\n    __declspec(property(get=GetminHeight,put=PutminHeight))\n    long minHeight;\n    __declspec(property(get=GetmaxHeight,put=PutmaxHeight))\n    long maxHeight;\n    __declspec(property(get=Getmaximized))\n    VARIANT_BOOL maximized;\n    __declspec(property(get=Getminimized))\n    VARIANT_BOOL minimized;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t Gettitle ( );\n    void Puttitle (\n        _bstr_t pVal );\n    _bstr_t Getcategory ( );\n    void Putcategory (\n        _bstr_t pVal );\n    _bstr_t GetfocusObjectID ( );\n    void PutfocusObjectID (\n        _bstr_t pVal );\n    VARIANT_BOOL GettitleBar ( );\n    VARIANT_BOOL Getresizable ( );\n    long GettimerInterval ( );\n    void PuttimerInterval (\n        long pVal );\n    long GetminWidth ( );\n    void PutminWidth (\n        long pVal );\n    long GetmaxWidth ( );\n    void PutmaxWidth (\n        long pVal );\n    long GetminHeight ( );\n    void PutminHeight (\n        long pVal );\n    long GetmaxHeight ( );\n    void PutmaxHeight (\n        long pVal );\n    HRESULT close ( );\n    HRESULT minimize ( );\n    HRESULT maximize ( );\n    HRESULT restore ( );\n    HRESULT size (\n        _bstr_t bstrDirection );\n    HRESULT returnToMediaCenter ( );\n    HRESULT updateWindow ( );\n    VARIANT_BOOL Getmaximized ( );\n    VARIANT_BOOL Getminimized ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_title (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_title (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_category (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_category (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_focusObjectID (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_focusObjectID (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_titleBar (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_resizable (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_timerInterval (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_timerInterval (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_minWidth (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_minWidth (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_maxWidth (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_maxWidth (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_minHeight (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_minHeight (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_maxHeight (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_maxHeight (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall raw_close ( ) = 0;\n      virtual HRESULT __stdcall raw_minimize ( ) = 0;\n      virtual HRESULT __stdcall raw_maximize ( ) = 0;\n      virtual HRESULT __stdcall raw_restore ( ) = 0;\n      virtual HRESULT __stdcall raw_size (\n        /*[in]*/ BSTR bstrDirection ) = 0;\n      virtual HRESULT __stdcall raw_returnToMediaCenter ( ) = 0;\n      virtual HRESULT __stdcall raw_updateWindow ( ) = 0;\n      virtual HRESULT __stdcall get_maximized (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_minimized (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"5af0bec1-46aa-11d3-bd45-00c04f6ea5ae\"))\nIWMPEventObject : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getx))\n    long x;\n    __declspec(property(get=Gety))\n    long y;\n    __declspec(property(get=GetclientX))\n    long clientX;\n    __declspec(property(get=GetclientY))\n    long clientY;\n    __declspec(property(get=GetoffsetX))\n    long offsetX;\n    __declspec(property(get=GetoffsetY))\n    long offsetY;\n    __declspec(property(get=GetscreenX))\n    long screenX;\n    __declspec(property(get=GetscreenY))\n    long screenY;\n    __declspec(property(get=GetscreenWidth))\n    long screenWidth;\n    __declspec(property(get=GetscreenHeight))\n    long screenHeight;\n    __declspec(property(get=GetpenOrTouch))\n    VARIANT_BOOL penOrTouch;\n    __declspec(property(get=GetsrcElement))\n    IDispatchPtr srcElement;\n    __declspec(property(get=GetaltKey))\n    VARIANT_BOOL altKey;\n    __declspec(property(get=GetctrlKey))\n    VARIANT_BOOL ctrlKey;\n    __declspec(property(get=GetshiftKey))\n    VARIANT_BOOL shiftKey;\n    __declspec(property(get=GetfromElement))\n    IDispatchPtr fromElement;\n    __declspec(property(get=GettoElement))\n    IDispatchPtr toElement;\n    __declspec(property(get=GetkeyCode,put=PutkeyCode))\n    long keyCode;\n    __declspec(property(get=Getbutton))\n    long button;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    IDispatchPtr GetsrcElement ( );\n    VARIANT_BOOL GetaltKey ( );\n    VARIANT_BOOL GetctrlKey ( );\n    VARIANT_BOOL GetshiftKey ( );\n    IDispatchPtr GetfromElement ( );\n    IDispatchPtr GettoElement ( );\n    void PutkeyCode (\n        long p );\n    long GetkeyCode ( );\n    long Getbutton ( );\n    long Getx ( );\n    long Gety ( );\n    long GetclientX ( );\n    long GetclientY ( );\n    long GetoffsetX ( );\n    long GetoffsetY ( );\n    long GetscreenX ( );\n    long GetscreenY ( );\n    long GetscreenWidth ( );\n    long GetscreenHeight ( );\n    VARIANT_BOOL GetpenOrTouch ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_srcElement (\n        /*[out,retval]*/ IDispatch * * p ) = 0;\n      virtual HRESULT __stdcall get_altKey (\n        /*[out,retval]*/ VARIANT_BOOL * p ) = 0;\n      virtual HRESULT __stdcall get_ctrlKey (\n        /*[out,retval]*/ VARIANT_BOOL * p ) = 0;\n      virtual HRESULT __stdcall get_shiftKey (\n        /*[out,retval]*/ VARIANT_BOOL * p ) = 0;\n      virtual HRESULT __stdcall get_fromElement (\n        /*[out,retval]*/ IDispatch * * p ) = 0;\n      virtual HRESULT __stdcall get_toElement (\n        /*[out,retval]*/ IDispatch * * p ) = 0;\n      virtual HRESULT __stdcall put_keyCode (\n        /*[in]*/ long p ) = 0;\n      virtual HRESULT __stdcall get_keyCode (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_button (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_x (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_y (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_clientX (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_clientY (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_offsetX (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_offsetY (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_screenX (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_screenY (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_screenWidth (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_screenHeight (\n        /*[out,retval]*/ long * p ) = 0;\n      virtual HRESULT __stdcall get_penOrTouch (\n        /*[out,retval]*/ VARIANT_BOOL * p ) = 0;\n};\n\nstruct __declspec(uuid(\"6fcae13d-e492-4584-9c21-d2c052a2a33a\"))\nIWMPTheme : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Gettitle))\n    _bstr_t title;\n    __declspec(property(get=Getversion))\n    float version;\n    __declspec(property(get=GetauthorVersion))\n    _bstr_t authorVersion;\n    __declspec(property(get=Getauthor))\n    _bstr_t author;\n    __declspec(property(get=Getcopyright))\n    _bstr_t copyright;\n    __declspec(property(get=GetcurrentViewID,put=PutcurrentViewID))\n    _bstr_t currentViewID;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t Gettitle ( );\n    float Getversion ( );\n    _bstr_t GetauthorVersion ( );\n    _bstr_t Getauthor ( );\n    _bstr_t Getcopyright ( );\n    _bstr_t GetcurrentViewID ( );\n    void PutcurrentViewID (\n        _bstr_t pVal );\n    HRESULT showErrorDialog ( );\n    HRESULT logString (\n        _bstr_t stringVal );\n    HRESULT openView (\n        _bstr_t viewID );\n    IDispatchPtr openViewRelative (\n        _bstr_t viewID,\n        long x,\n        long y );\n    HRESULT closeView (\n        _bstr_t viewID );\n    _bstr_t openDialog (\n        _bstr_t dialogType,\n        _bstr_t parameters );\n    _bstr_t loadString (\n        _bstr_t bstrString );\n    _bstr_t loadPreference (\n        _bstr_t bstrName );\n    HRESULT savePreference (\n        _bstr_t bstrName,\n        _bstr_t bstrValue );\n    HRESULT playSound (\n        _bstr_t bstrFilename );\n    IDispatchPtr openViewRelativeInternal (\n        _bstr_t viewID,\n        long nIndex,\n        long x,\n        long y,\n        long nWidth,\n        long nHeight,\n        _bstr_t bstrHorizontalAlignment,\n        _bstr_t bstrVerticalAlignment );\n    HRESULT setViewPosition (\n        _bstr_t viewID,\n        long nIndex,\n        long x,\n        long y,\n        long nWidth,\n        long nHeight,\n        _bstr_t bstrHorizontalAlignment,\n        _bstr_t bstrVerticalAlignment );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_title (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_version (\n        /*[out,retval]*/ float * pfVersion ) = 0;\n      virtual HRESULT __stdcall get_authorVersion (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_author (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_copyright (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_currentViewID (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_currentViewID (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall raw_showErrorDialog ( ) = 0;\n      virtual HRESULT __stdcall raw_logString (\n        /*[in]*/ BSTR stringVal ) = 0;\n      virtual HRESULT __stdcall raw_openView (\n        /*[in]*/ BSTR viewID ) = 0;\n      virtual HRESULT __stdcall raw_openViewRelative (\n        /*[in]*/ BSTR viewID,\n        /*[in]*/ long x,\n        /*[in]*/ long y,\n        /*[out,retval]*/ IDispatch * * ppView ) = 0;\n      virtual HRESULT __stdcall raw_closeView (\n        /*[in]*/ BSTR viewID ) = 0;\n      virtual HRESULT __stdcall raw_openDialog (\n        /*[in]*/ BSTR dialogType,\n        /*[in]*/ BSTR parameters,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall raw_loadString (\n        /*[in]*/ BSTR bstrString,\n        /*[out,retval]*/ BSTR * pbstrReturn ) = 0;\n      virtual HRESULT __stdcall raw_loadPreference (\n        /*[in]*/ BSTR bstrName,\n        /*[out,retval]*/ BSTR * pbstrValue ) = 0;\n      virtual HRESULT __stdcall raw_savePreference (\n        /*[in]*/ BSTR bstrName,\n        /*[in]*/ BSTR bstrValue ) = 0;\n      virtual HRESULT __stdcall raw_playSound (\n        BSTR bstrFilename ) = 0;\n      virtual HRESULT __stdcall raw_openViewRelativeInternal (\n        /*[in]*/ BSTR viewID,\n        /*[in]*/ long nIndex,\n        /*[in]*/ long x,\n        /*[in]*/ long y,\n        /*[in]*/ long nWidth,\n        /*[in]*/ long nHeight,\n        /*[in]*/ BSTR bstrHorizontalAlignment,\n        /*[in]*/ BSTR bstrVerticalAlignment,\n        /*[out,retval]*/ IDispatch * * ppView ) = 0;\n      virtual HRESULT __stdcall raw_setViewPosition (\n        /*[in]*/ BSTR viewID,\n        /*[in]*/ long nIndex,\n        /*[in]*/ long x,\n        /*[in]*/ long y,\n        /*[in]*/ long nWidth,\n        /*[in]*/ long nHeight,\n        /*[in]*/ BSTR bstrHorizontalAlignment,\n        /*[in]*/ BSTR bstrVerticalAlignment ) = 0;\n};\n\nstruct __declspec(uuid(\"b2c2d18e-97af-4b6a-a56b-2ffff470fb81\"))\nIWMPLayoutSettingsDispatch : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetcontrastMode))\n    _bstr_t contrastMode;\n    __declspec(property(get=GetdisplayView,put=PutdisplayView))\n    _bstr_t displayView;\n    __declspec(property(get=GetmetadataView,put=PutmetadataView))\n    _bstr_t metadataView;\n    __declspec(property(get=GetshowSettings,put=PutshowSettings))\n    VARIANT_BOOL showSettings;\n    __declspec(property(get=GetshowResizeBars,put=PutshowResizeBars))\n    VARIANT_BOOL showResizeBars;\n    __declspec(property(get=GetshowPlaylist,put=PutshowPlaylist))\n    VARIANT_BOOL showPlaylist;\n    __declspec(property(get=GetshowMetadata,put=PutshowMetadata))\n    VARIANT_BOOL showMetadata;\n    __declspec(property(get=GetsettingsWidth,put=PutsettingsWidth))\n    long settingsWidth;\n    __declspec(property(get=GetsettingsHeight,put=PutsettingsHeight))\n    long settingsHeight;\n    __declspec(property(get=GetplaylistWidth,put=PutplaylistWidth))\n    long playlistWidth;\n    __declspec(property(get=GetplaylistHeight,put=PutplaylistHeight))\n    long playlistHeight;\n    __declspec(property(get=GetmetadataWidth,put=PutmetadataWidth))\n    long metadataWidth;\n    __declspec(property(get=GetmetadataHeight,put=PutmetadataHeight))\n    long metadataHeight;\n    __declspec(property(get=GetfullScreenAvailable,put=PutfullScreenAvailable))\n    VARIANT_BOOL fullScreenAvailable;\n    __declspec(property(get=GetfullScreenRequest,put=PutfullScreenRequest))\n    VARIANT_BOOL fullScreenRequest;\n    __declspec(property(get=GetquickHide,put=PutquickHide))\n    VARIANT_BOOL quickHide;\n    __declspec(property(get=GetdisplayPreset,put=PutdisplayPreset))\n    long displayPreset;\n    __declspec(property(get=GetsettingsPreset,put=PutsettingsPreset))\n    long settingsPreset;\n    __declspec(property(get=GetmetadataPreset,put=PutmetadataPreset))\n    long metadataPreset;\n    __declspec(property(get=GetuserDisplayView))\n    _bstr_t userDisplayView;\n    __declspec(property(get=GetuserWMPDisplayView))\n    _bstr_t userWMPDisplayView;\n    __declspec(property(get=GetuserDisplayPreset))\n    long userDisplayPreset;\n    __declspec(property(get=GetuserWMPDisplayPreset))\n    long userWMPDisplayPreset;\n    __declspec(property(get=GetdynamicRangeControl,put=PutdynamicRangeControl))\n    long dynamicRangeControl;\n    __declspec(property(get=GetslowRate,put=PutslowRate))\n    float slowRate;\n    __declspec(property(get=GetfastRate,put=PutfastRate))\n    float fastRate;\n    __declspec(property(get=GetbuttonHueShift,put=PutbuttonHueShift))\n    float buttonHueShift;\n    __declspec(property(get=GetbuttonSaturation,put=PutbuttonSaturation))\n    float buttonSaturation;\n    __declspec(property(get=GetbackHueShift,put=PutbackHueShift))\n    float backHueShift;\n    __declspec(property(get=GetbackSaturation,put=PutbackSaturation))\n    float backSaturation;\n    __declspec(property(get=GetvizRequest,put=PutvizRequest))\n    long vizRequest;\n    __declspec(property(get=GetappColorLight))\n    _bstr_t appColorLight;\n    __declspec(property(get=GetappColorMedium))\n    _bstr_t appColorMedium;\n    __declspec(property(get=GetappColorDark))\n    _bstr_t appColorDark;\n    __declspec(property(get=GetitemPlayingColor))\n    _bstr_t itemPlayingColor;\n    __declspec(property(get=GetitemPlayingBackgroundColor))\n    _bstr_t itemPlayingBackgroundColor;\n    __declspec(property(get=GetitemErrorColor))\n    _bstr_t itemErrorColor;\n    __declspec(property(get=GetappColorLimited))\n    VARIANT_BOOL appColorLimited;\n    __declspec(property(get=GetappColorBlackBackground,put=PutappColorBlackBackground))\n    VARIANT_BOOL appColorBlackBackground;\n    __declspec(property(get=GetappColorVideoBorder,put=PutappColorVideoBorder))\n    _bstr_t appColorVideoBorder;\n    __declspec(property(get=GettoolbarButtonHighlight))\n    _bstr_t toolbarButtonHighlight;\n    __declspec(property(get=GettoolbarButtonShadow))\n    _bstr_t toolbarButtonShadow;\n    __declspec(property(get=GettoolbarButtonFace))\n    _bstr_t toolbarButtonFace;\n    __declspec(property(get=GetuserWMPSettingsView))\n    _bstr_t userWMPSettingsView;\n    __declspec(property(get=GetuserWMPSettingsPreset))\n    long userWMPSettingsPreset;\n    __declspec(property(get=GetuserWMPShowSettings))\n    VARIANT_BOOL userWMPShowSettings;\n    __declspec(property(get=GetuserWMPMetadataView))\n    _bstr_t userWMPMetadataView;\n    __declspec(property(get=GetuserWMPMetadataPreset))\n    long userWMPMetadataPreset;\n    __declspec(property(get=GetuserWMPShowMetadata))\n    VARIANT_BOOL userWMPShowMetadata;\n    __declspec(property(get=GetcaptionsHeight,put=PutcaptionsHeight))\n    long captionsHeight;\n    __declspec(property(get=GetsnapToVideo,put=PutsnapToVideo))\n    VARIANT_BOOL snapToVideo;\n    __declspec(property(get=GetpinFullScreenControls,put=PutpinFullScreenControls))\n    VARIANT_BOOL pinFullScreenControls;\n    __declspec(property(get=GetuserVideoStretchToFit,put=PutuserVideoStretchToFit))\n    VARIANT_BOOL userVideoStretchToFit;\n    __declspec(property(get=GetappColorAux1))\n    _bstr_t appColorAux1;\n    __declspec(property(get=GetappColorAux2))\n    _bstr_t appColorAux2;\n    __declspec(property(get=GetappColorAux3))\n    _bstr_t appColorAux3;\n    __declspec(property(get=GetappColorAux4))\n    _bstr_t appColorAux4;\n    __declspec(property(get=GetappColorAux5))\n    _bstr_t appColorAux5;\n    __declspec(property(get=GetappColorAux6))\n    _bstr_t appColorAux6;\n    __declspec(property(get=GetappColorAux7))\n    _bstr_t appColorAux7;\n    __declspec(property(get=GetappColorAux8))\n    _bstr_t appColorAux8;\n    __declspec(property(get=GetappColorAux9))\n    _bstr_t appColorAux9;\n    __declspec(property(get=GetappColorAux10))\n    _bstr_t appColorAux10;\n    __declspec(property(get=GetappColorAux11))\n    _bstr_t appColorAux11;\n    __declspec(property(get=GetappColorAux12))\n    _bstr_t appColorAux12;\n    __declspec(property(get=GetappColorAux13))\n    _bstr_t appColorAux13;\n    __declspec(property(get=GetappColorAux14))\n    _bstr_t appColorAux14;\n    __declspec(property(get=GetappColorAux15))\n    _bstr_t appColorAux15;\n    __declspec(property(get=Getstatus,put=Putstatus))\n    _bstr_t status;\n    __declspec(property(get=GetisMultiMon))\n    VARIANT_BOOL isMultiMon;\n    __declspec(property(get=GetexclusiveHueShift,put=PutexclusiveHueShift))\n    float exclusiveHueShift;\n    __declspec(property(get=GetexclusiveSaturation,put=PutexclusiveSaturation))\n    float exclusiveSaturation;\n    __declspec(property(get=GetthemeBkgColorActive))\n    _bstr_t themeBkgColorActive;\n    __declspec(property(get=GetthemeBkgColorInactive))\n    _bstr_t themeBkgColorInactive;\n    __declspec(property(get=GetthemeBkgColorIsActive,put=PutthemeBkgColorIsActive))\n    VARIANT_BOOL themeBkgColorIsActive;\n    __declspec(property(get=GeteffectType,put=PuteffectType))\n    _bstr_t effectType;\n    __declspec(property(get=GeteffectPreset,put=PuteffectPreset))\n    long effectPreset;\n    __declspec(property(get=GetsettingsView,put=PutsettingsView))\n    _bstr_t settingsView;\n    __declspec(property(get=GetvideoZoom,put=PutvideoZoom))\n    long videoZoom;\n    __declspec(property(get=GetvideoShrinkToFit,put=PutvideoShrinkToFit))\n    VARIANT_BOOL videoShrinkToFit;\n    __declspec(property(get=GetvideoStretchToFit,put=PutvideoStretchToFit))\n    VARIANT_BOOL videoStretchToFit;\n    __declspec(property(get=GetshowCaptions,put=PutshowCaptions))\n    VARIANT_BOOL showCaptions;\n    __declspec(property(get=GetshowTitles,put=PutshowTitles))\n    VARIANT_BOOL showTitles;\n    __declspec(property(get=GetshowEffects,put=PutshowEffects))\n    VARIANT_BOOL showEffects;\n    __declspec(property(get=GetshowFullScreenPlaylist,put=PutshowFullScreenPlaylist))\n    VARIANT_BOOL showFullScreenPlaylist;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GeteffectType ( );\n    void PuteffectType (\n        _bstr_t pVal );\n    long GeteffectPreset ( );\n    void PuteffectPreset (\n        long pVal );\n    _bstr_t GetsettingsView ( );\n    void PutsettingsView (\n        _bstr_t pVal );\n    long GetvideoZoom ( );\n    void PutvideoZoom (\n        long pVal );\n    VARIANT_BOOL GetvideoShrinkToFit ( );\n    void PutvideoShrinkToFit (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetvideoStretchToFit ( );\n    void PutvideoStretchToFit (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetuserVideoStretchToFit ( );\n    void PutuserVideoStretchToFit (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetshowCaptions ( );\n    void PutshowCaptions (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetshowTitles ( );\n    void PutshowTitles (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetshowEffects ( );\n    void PutshowEffects (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetshowFullScreenPlaylist ( );\n    void PutshowFullScreenPlaylist (\n        VARIANT_BOOL pVal );\n    _bstr_t GetcontrastMode ( );\n    _bstr_t getNamedString (\n        _bstr_t bstrName );\n    _bstr_t getDurationStringFromSeconds (\n        long lDurationVal );\n    _bstr_t GetdisplayView ( );\n    void PutdisplayView (\n        _bstr_t pVal );\n    _bstr_t GetmetadataView ( );\n    void PutmetadataView (\n        _bstr_t pVal );\n    VARIANT_BOOL GetshowSettings ( );\n    void PutshowSettings (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetshowResizeBars ( );\n    void PutshowResizeBars (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetshowPlaylist ( );\n    void PutshowPlaylist (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetshowMetadata ( );\n    void PutshowMetadata (\n        VARIANT_BOOL pVal );\n    long GetsettingsWidth ( );\n    void PutsettingsWidth (\n        long pVal );\n    long GetsettingsHeight ( );\n    void PutsettingsHeight (\n        long pVal );\n    long GetplaylistWidth ( );\n    void PutplaylistWidth (\n        long pVal );\n    long GetplaylistHeight ( );\n    void PutplaylistHeight (\n        long pVal );\n    long GetmetadataWidth ( );\n    void PutmetadataWidth (\n        long pVal );\n    long GetmetadataHeight ( );\n    void PutmetadataHeight (\n        long pVal );\n    VARIANT_BOOL GetfullScreenAvailable ( );\n    void PutfullScreenAvailable (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetfullScreenRequest ( );\n    void PutfullScreenRequest (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetquickHide ( );\n    void PutquickHide (\n        VARIANT_BOOL pVal );\n    long GetdisplayPreset ( );\n    void PutdisplayPreset (\n        long pVal );\n    long GetsettingsPreset ( );\n    void PutsettingsPreset (\n        long pVal );\n    long GetmetadataPreset ( );\n    void PutmetadataPreset (\n        long pVal );\n    _bstr_t GetuserDisplayView ( );\n    _bstr_t GetuserWMPDisplayView ( );\n    long GetuserDisplayPreset ( );\n    long GetuserWMPDisplayPreset ( );\n    long GetdynamicRangeControl ( );\n    void PutdynamicRangeControl (\n        long pVal );\n    float GetslowRate ( );\n    void PutslowRate (\n        float pVal );\n    float GetfastRate ( );\n    void PutfastRate (\n        float pVal );\n    float GetbuttonHueShift ( );\n    void PutbuttonHueShift (\n        float pVal );\n    float GetbuttonSaturation ( );\n    void PutbuttonSaturation (\n        float pVal );\n    float GetbackHueShift ( );\n    void PutbackHueShift (\n        float pVal );\n    float GetbackSaturation ( );\n    void PutbackSaturation (\n        float pVal );\n    long GetvizRequest ( );\n    void PutvizRequest (\n        long pVal );\n    _bstr_t GetappColorLight ( );\n    _bstr_t GetappColorMedium ( );\n    _bstr_t GetappColorDark ( );\n    _bstr_t GettoolbarButtonHighlight ( );\n    _bstr_t GettoolbarButtonShadow ( );\n    _bstr_t GettoolbarButtonFace ( );\n    _bstr_t GetitemPlayingColor ( );\n    _bstr_t GetitemPlayingBackgroundColor ( );\n    _bstr_t GetitemErrorColor ( );\n    VARIANT_BOOL GetappColorLimited ( );\n    VARIANT_BOOL GetappColorBlackBackground ( );\n    void PutappColorBlackBackground (\n        VARIANT_BOOL pVal );\n    _bstr_t GetappColorVideoBorder ( );\n    void PutappColorVideoBorder (\n        _bstr_t pVal );\n    _bstr_t GetappColorAux1 ( );\n    _bstr_t GetappColorAux2 ( );\n    _bstr_t GetappColorAux3 ( );\n    _bstr_t GetappColorAux4 ( );\n    _bstr_t GetappColorAux5 ( );\n    _bstr_t GetappColorAux6 ( );\n    _bstr_t GetappColorAux7 ( );\n    _bstr_t GetappColorAux8 ( );\n    _bstr_t GetappColorAux9 ( );\n    _bstr_t GetappColorAux10 ( );\n    _bstr_t GetappColorAux11 ( );\n    _bstr_t GetappColorAux12 ( );\n    _bstr_t GetappColorAux13 ( );\n    _bstr_t GetappColorAux14 ( );\n    _bstr_t GetappColorAux15 ( );\n    _bstr_t Getstatus ( );\n    void Putstatus (\n        _bstr_t pVal );\n    _bstr_t GetuserWMPSettingsView ( );\n    long GetuserWMPSettingsPreset ( );\n    VARIANT_BOOL GetuserWMPShowSettings ( );\n    _bstr_t GetuserWMPMetadataView ( );\n    long GetuserWMPMetadataPreset ( );\n    VARIANT_BOOL GetuserWMPShowMetadata ( );\n    long GetcaptionsHeight ( );\n    void PutcaptionsHeight (\n        long pVal );\n    VARIANT_BOOL GetsnapToVideo ( );\n    void PutsnapToVideo (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetpinFullScreenControls ( );\n    void PutpinFullScreenControls (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetisMultiMon ( );\n    float GetexclusiveHueShift ( );\n    void PutexclusiveHueShift (\n        float pVal );\n    float GetexclusiveSaturation ( );\n    void PutexclusiveSaturation (\n        float pVal );\n    VARIANT_BOOL GetthemeBkgColorIsActive ( );\n    void PutthemeBkgColorIsActive (\n        VARIANT_BOOL pVal );\n    _bstr_t GetthemeBkgColorActive ( );\n    _bstr_t GetthemeBkgColorInactive ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_effectType (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_effectType (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_effectPreset (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_effectPreset (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_settingsView (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_settingsView (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_videoZoom (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_videoZoom (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_videoShrinkToFit (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_videoShrinkToFit (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_videoStretchToFit (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_videoStretchToFit (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_userVideoStretchToFit (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_userVideoStretchToFit (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_showCaptions (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_showCaptions (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_showTitles (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_showTitles (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_showEffects (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_showEffects (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_showFullScreenPlaylist (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_showFullScreenPlaylist (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_contrastMode (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall raw_getNamedString (\n        /*[in]*/ BSTR bstrName,\n        /*[out,retval]*/ BSTR * pbstrVal ) = 0;\n      virtual HRESULT __stdcall raw_getDurationStringFromSeconds (\n        /*[in]*/ long lDurationVal,\n        /*[out,retval]*/ BSTR * pbstrVal ) = 0;\n      virtual HRESULT __stdcall get_displayView (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_displayView (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_metadataView (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_metadataView (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_showSettings (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_showSettings (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_showResizeBars (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_showResizeBars (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_showPlaylist (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_showPlaylist (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_showMetadata (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_showMetadata (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_settingsWidth (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_settingsWidth (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_settingsHeight (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_settingsHeight (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_playlistWidth (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_playlistWidth (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_playlistHeight (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_playlistHeight (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_metadataWidth (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_metadataWidth (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_metadataHeight (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_metadataHeight (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_fullScreenAvailable (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_fullScreenAvailable (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_fullScreenRequest (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_fullScreenRequest (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_quickHide (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_quickHide (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_displayPreset (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_displayPreset (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_settingsPreset (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_settingsPreset (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_metadataPreset (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_metadataPreset (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_userDisplayView (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_userWMPDisplayView (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_userDisplayPreset (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_userWMPDisplayPreset (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_dynamicRangeControl (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_dynamicRangeControl (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_slowRate (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_slowRate (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_fastRate (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_fastRate (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_buttonHueShift (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_buttonHueShift (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_buttonSaturation (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_buttonSaturation (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_backHueShift (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_backHueShift (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_backSaturation (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_backSaturation (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_vizRequest (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_vizRequest (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorLight (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorMedium (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorDark (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_toolbarButtonHighlight (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_toolbarButtonShadow (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_toolbarButtonFace (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_itemPlayingColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_itemPlayingBackgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_itemErrorColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorLimited (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorBlackBackground (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_appColorBlackBackground (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorVideoBorder (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_appColorVideoBorder (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux1 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux2 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux3 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux4 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux5 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux6 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux7 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux8 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux9 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux10 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux11 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux12 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux13 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux14 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_appColorAux15 (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_status (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_status (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_userWMPSettingsView (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_userWMPSettingsPreset (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_userWMPShowSettings (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_userWMPMetadataView (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_userWMPMetadataPreset (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_userWMPShowMetadata (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_captionsHeight (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_captionsHeight (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_snapToVideo (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_snapToVideo (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_pinFullScreenControls (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_pinFullScreenControls (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_isMultiMon (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_exclusiveHueShift (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_exclusiveHueShift (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_exclusiveSaturation (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_exclusiveSaturation (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_themeBkgColorIsActive (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_themeBkgColorIsActive (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_themeBkgColorActive (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_themeBkgColorInactive (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"43d5ae92-4332-477c-8883-e0b3b063c5d2\"))\nIWMPWindow : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetframeRate,put=PutframeRate))\n    long frameRate;\n    __declspec(property(get=GetmouseX))\n    long mouseX;\n    __declspec(property(get=GetmouseY))\n    long mouseY;\n    __declspec(property(put=Putonsizing))\n    IDispatchPtr onsizing;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT setWindowPos (\n        long x,\n        long y,\n        long height,\n        long width );\n    long GetframeRate ( );\n    void PutframeRate (\n        long pVal );\n    long GetmouseX ( );\n    long GetmouseY ( );\n    void Putonsizing (\n        IDispatch * _arg1 );\n    HRESULT openViewAlwaysOnTop (\n        _bstr_t bstrViewID );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_setWindowPos (\n        /*[in]*/ long x,\n        /*[in]*/ long y,\n        /*[in]*/ long height,\n        /*[in]*/ long width ) = 0;\n      virtual HRESULT __stdcall get_frameRate (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_frameRate (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_mouseX (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_mouseY (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_onsizing (\n        /*[in]*/ IDispatch * _arg1 ) = 0;\n      virtual HRESULT __stdcall raw_openViewAlwaysOnTop (\n        BSTR bstrViewID ) = 0;\n};\n\nstruct __declspec(uuid(\"98bb02d4-ed74-43cc-ad6a-45888f2e0dcc\"))\nIWMPBrandDispatch : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetfriendlyName))\n    _bstr_t friendlyName;\n    __declspec(property(get=GetguideButtonText))\n    _bstr_t guideButtonText;\n    __declspec(property(get=GetguideButtonTip))\n    _bstr_t guideButtonTip;\n    __declspec(property(get=GetguideMenuText))\n    _bstr_t guideMenuText;\n    __declspec(property(get=GetguideAccText))\n    _bstr_t guideAccText;\n    __declspec(property(get=Gettask1ButtonText))\n    _bstr_t task1ButtonText;\n    __declspec(property(get=Gettask1ButtonTip))\n    _bstr_t task1ButtonTip;\n    __declspec(property(get=Gettask1MenuText))\n    _bstr_t task1MenuText;\n    __declspec(property(get=Gettask1AccText))\n    _bstr_t task1AccText;\n    __declspec(property(get=GetguideUrl))\n    _bstr_t guideUrl;\n    __declspec(property(get=Gettask1Url))\n    _bstr_t task1Url;\n    __declspec(property(get=GetimageLargeUrl))\n    _bstr_t imageLargeUrl;\n    __declspec(property(get=GetimageSmallUrl))\n    _bstr_t imageSmallUrl;\n    __declspec(property(get=GetimageMenuUrl))\n    _bstr_t imageMenuUrl;\n    __declspec(property(get=GetinfoCenterUrl))\n    _bstr_t infoCenterUrl;\n    __declspec(property(get=GetalbumInfoUrl))\n    _bstr_t albumInfoUrl;\n    __declspec(property(get=GetbuyCDUrl))\n    _bstr_t buyCDUrl;\n    __declspec(property(get=GethtmlViewUrl))\n    _bstr_t htmlViewUrl;\n    __declspec(property(get=GetnavigateUrl))\n    _bstr_t navigateUrl;\n    __declspec(property(get=GetcookieUrl))\n    _bstr_t cookieUrl;\n    __declspec(property(get=GetdownloadStatusUrl))\n    _bstr_t downloadStatusUrl;\n    __declspec(property(get=GetcolorPlayer))\n    _bstr_t colorPlayer;\n    __declspec(property(get=GetcolorPlayerText))\n    _bstr_t colorPlayerText;\n    __declspec(property(get=GetnavigateDispid))\n    long navigateDispid;\n    __declspec(property(get=GetnavigateParams))\n    _bstr_t navigateParams;\n    __declspec(property(get=GetnavigatePane))\n    _bstr_t navigatePane;\n    __declspec(property(get=GetselectedPane,put=PutselectedPane))\n    _bstr_t selectedPane;\n    __declspec(property(put=PutselectedTask))\n    long selectedTask;\n    __declspec(property(get=GetfullServiceName))\n    _bstr_t fullServiceName;\n    __declspec(property(get=GetcontentPartnerSelected))\n    VARIANT_BOOL contentPartnerSelected;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetfullServiceName ( );\n    _bstr_t GetfriendlyName ( );\n    _bstr_t GetguideButtonText ( );\n    _bstr_t GetguideButtonTip ( );\n    _bstr_t GetguideMenuText ( );\n    _bstr_t GetguideAccText ( );\n    _bstr_t Gettask1ButtonText ( );\n    _bstr_t Gettask1ButtonTip ( );\n    _bstr_t Gettask1MenuText ( );\n    _bstr_t Gettask1AccText ( );\n    _bstr_t GetguideUrl ( );\n    _bstr_t Gettask1Url ( );\n    _bstr_t GetimageLargeUrl ( );\n    _bstr_t GetimageSmallUrl ( );\n    _bstr_t GetimageMenuUrl ( );\n    _bstr_t GetinfoCenterUrl ( );\n    _bstr_t GetalbumInfoUrl ( );\n    _bstr_t GetbuyCDUrl ( );\n    _bstr_t GethtmlViewUrl ( );\n    _bstr_t GetnavigateUrl ( );\n    _bstr_t GetcookieUrl ( );\n    _bstr_t GetdownloadStatusUrl ( );\n    _bstr_t GetcolorPlayer ( );\n    _bstr_t GetcolorPlayerText ( );\n    long GetnavigateDispid ( );\n    _bstr_t GetnavigateParams ( );\n    _bstr_t GetnavigatePane ( );\n    _bstr_t GetselectedPane ( );\n    void PutselectedPane (\n        _bstr_t pVal );\n    HRESULT setNavigateProps (\n        _bstr_t bstrPane,\n        long lDispid,\n        _bstr_t bstrParams );\n    _bstr_t getMediaParams (\n        IUnknown * pObject,\n        _bstr_t bstrURL );\n    void PutselectedTask (\n        long _arg1 );\n    VARIANT_BOOL GetcontentPartnerSelected ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_fullServiceName (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_friendlyName (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_guideButtonText (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_guideButtonTip (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_guideMenuText (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_guideAccText (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_task1ButtonText (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_task1ButtonTip (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_task1MenuText (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_task1AccText (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_guideUrl (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_task1Url (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_imageLargeUrl (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_imageSmallUrl (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_imageMenuUrl (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_infoCenterUrl (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_albumInfoUrl (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_buyCDUrl (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_htmlViewUrl (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_navigateUrl (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_cookieUrl (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_downloadStatusUrl (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_colorPlayer (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_colorPlayerText (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_navigateDispid (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_navigateParams (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_navigatePane (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_selectedPane (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_selectedPane (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall raw_setNavigateProps (\n        /*[in]*/ BSTR bstrPane,\n        /*[in]*/ long lDispid,\n        /*[in]*/ BSTR bstrParams ) = 0;\n      virtual HRESULT __stdcall raw_getMediaParams (\n        /*[in]*/ IUnknown * pObject,\n        /*[in]*/ BSTR bstrURL,\n        /*[out,retval]*/ BSTR * pbstrResult ) = 0;\n      virtual HRESULT __stdcall put_selectedTask (\n        /*[in]*/ long _arg1 ) = 0;\n      virtual HRESULT __stdcall get_contentPartnerSelected (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"504f112e-77cc-4e3c-a073-5371b31d9b36\"))\nIWMPNowPlayingHelperDispatch : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetbackgroundIndex,put=PutbackgroundIndex))\n    long backgroundIndex;\n    __declspec(property(get=GetMMOVisible))\n    VARIANT_BOOL MMOVisible;\n    __declspec(property(get=GetupNext))\n    _bstr_t upNext;\n    __declspec(property(get=GetplaybackOverlayVisible))\n    VARIANT_BOOL playbackOverlayVisible;\n    __declspec(property(get=Getremoted))\n    VARIANT_BOOL remoted;\n    __declspec(property(get=GetglassEnabled))\n    VARIANT_BOOL glassEnabled;\n    __declspec(property(get=GethighContrast))\n    VARIANT_BOOL highContrast;\n    __declspec(property(put=PuttestHighContrast))\n    _bstr_t testHighContrast;\n    __declspec(property(get=GetmetadataString,put=PutmetadataString))\n    _bstr_t metadataString;\n    __declspec(property(get=GetalbumArtAlpha))\n    long albumArtAlpha;\n    __declspec(property(get=GetplayerModeAlbumArtSelected))\n    VARIANT_BOOL playerModeAlbumArtSelected;\n    __declspec(property(get=GetinFullScreen))\n    VARIANT_BOOL inFullScreen;\n    __declspec(property(get=GetviewFriendlyName))\n    _bstr_t viewFriendlyName[];\n    __declspec(property(get=GetviewPresetCount))\n    long viewPresetCount[];\n    __declspec(property(get=GetviewPresetName))\n    _bstr_t viewPresetName[][];\n    __declspec(property(get=GeteffectFriendlyName))\n    _bstr_t effectFriendlyName[];\n    __declspec(property(get=GeteffectPresetName))\n    _bstr_t effectPresetName[][];\n    __declspec(property(get=GetcaptionsAvailable))\n    VARIANT_BOOL captionsAvailable;\n    __declspec(property(get=GetlinkAvailable))\n    long linkAvailable;\n    __declspec(property(get=GetlinkRequest,put=PutlinkRequest))\n    long linkRequest;\n    __declspec(property(get=GetlinkRequestParams,put=PutlinkRequestParams))\n    _bstr_t linkRequestParams;\n    __declspec(property(get=GeteditObj,put=PuteditObj))\n    IUnknownPtr editObj;\n    __declspec(property(get=GetnotificationString))\n    _bstr_t notificationString;\n    __declspec(property(get=GethtmlViewSecureLock,put=PuthtmlViewSecureLock))\n    long htmlViewSecureLock;\n    __declspec(property(get=GethtmlViewBaseURL,put=PuthtmlViewBaseURL))\n    _bstr_t htmlViewBaseURL;\n    __declspec(property(get=GethtmlViewBusy,put=PuthtmlViewBusy))\n    VARIANT_BOOL htmlViewBusy;\n    __declspec(property(get=GethtmlViewShowCert,put=PuthtmlViewShowCert))\n    VARIANT_BOOL htmlViewShowCert;\n    __declspec(property(get=GethtmlViewFullURL,put=PuthtmlViewFullURL))\n    _bstr_t htmlViewFullURL;\n    __declspec(property(get=GetpreviousEnabled,put=PutpreviousEnabled))\n    VARIANT_BOOL previousEnabled;\n    __declspec(property(get=GetdoPreviousNow,put=PutdoPreviousNow))\n    VARIANT_BOOL doPreviousNow;\n    __declspec(property(get=GetDPI))\n    long DPI;\n    __declspec(property(get=GetlastMessage,put=PutlastMessage))\n    _bstr_t lastMessage;\n    __declspec(property(get=GetinVistaPlus))\n    VARIANT_BOOL inVistaPlus;\n    __declspec(property(get=GetisBidi))\n    VARIANT_BOOL isBidi;\n    __declspec(property(get=GetisOCX))\n    VARIANT_BOOL isOCX;\n    __declspec(property(get=GethoverTransportsEnabled))\n    VARIANT_BOOL hoverTransportsEnabled;\n    __declspec(property(get=GetisAudioCD,put=PutisAudioCD))\n    VARIANT_BOOL isAudioCD;\n    __declspec(property(get=GetcanRip,put=PutcanRip))\n    VARIANT_BOOL canRip;\n    __declspec(property(get=GetisRipping,put=PutisRipping))\n    VARIANT_BOOL isRipping;\n    __declspec(property(get=GetcurrentDrive,put=PutcurrentDrive))\n    _bstr_t currentDrive;\n    __declspec(property(get=GetshowMMO,put=PutshowMMO))\n    VARIANT_BOOL showMMO;\n    __declspec(property(get=GetsuggestionsVisible))\n    VARIANT_BOOL suggestionsVisible;\n    __declspec(property(get=GetsuggestionsTextColor))\n    _bstr_t suggestionsTextColor;\n    __declspec(property(get=GetdoubleClickTime))\n    long doubleClickTime;\n    __declspec(property(get=GetplayAgain))\n    VARIANT_BOOL playAgain;\n    __declspec(property(get=GetpreviousPlaylistAvailable))\n    VARIANT_BOOL previousPlaylistAvailable;\n    __declspec(property(get=GetnextPlaylistAvailable))\n    VARIANT_BOOL nextPlaylistAvailable;\n    __declspec(property(get=GetbasketVisible,put=PutbasketVisible))\n    VARIANT_BOOL basketVisible;\n    __declspec(property(get=GetfontFace))\n    _bstr_t fontFace;\n    __declspec(property(get=GetfontSize))\n    long fontSize;\n    __declspec(property(get=GetbackgroundColor))\n    _bstr_t backgroundColor;\n    __declspec(property(get=GetmmoTextColor))\n    _bstr_t mmoTextColor;\n    __declspec(property(get=GetbackgroundVisible))\n    VARIANT_BOOL backgroundVisible;\n    __declspec(property(get=GetbackgroundEnabled,put=PutbackgroundEnabled))\n    VARIANT_BOOL backgroundEnabled;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetviewFriendlyName (\n        _bstr_t bstrView );\n    long GetviewPresetCount (\n        _bstr_t bstrView );\n    _bstr_t GetviewPresetName (\n        _bstr_t bstrView,\n        long nPresetIndex );\n    _bstr_t GeteffectFriendlyName (\n        _bstr_t bstrEffect );\n    _bstr_t GeteffectPresetName (\n        _bstr_t bstrEffect,\n        long nPresetIndex );\n    _bstr_t resolveDisplayView (\n        VARIANT_BOOL fSafe );\n    VARIANT_BOOL isValidDisplayView (\n        _bstr_t bstrView );\n    _bstr_t getSkinFile ( );\n    VARIANT_BOOL GetcaptionsAvailable ( );\n    long GetlinkAvailable ( );\n    long GetlinkRequest ( );\n    void PutlinkRequest (\n        long pVal );\n    _bstr_t GetlinkRequestParams ( );\n    void PutlinkRequestParams (\n        _bstr_t pVal );\n    long getCurrentArtID (\n        VARIANT_BOOL fLargeArt );\n    _bstr_t getTimeString (\n        double dTime );\n    _bstr_t getCurrentScriptCommand (\n        _bstr_t bstrType );\n    HRESULT calcLayout (\n        long lWidth,\n        long lHeight,\n        VARIANT_BOOL vbCaptions,\n        VARIANT_BOOL vbBanner );\n    long getLayoutSize (\n        long nProp );\n    IDispatchPtr getRootPlaylist (\n        IDispatch * pPlaylist );\n    _bstr_t getHTMLViewURL ( );\n    IUnknownPtr GeteditObj ( );\n    void PuteditObj (\n        IUnknown * ppVal );\n    _bstr_t getStatusString (\n        _bstr_t bstrStatusId );\n    long getStatusPct (\n        _bstr_t bstrStatusId );\n    long getStatusResult (\n        _bstr_t bstrStatusId );\n    long getStatusIcon (\n        _bstr_t bstrStatusId );\n    _bstr_t getStatusIdList ( );\n    _bstr_t GetnotificationString ( );\n    _bstr_t GethtmlViewBaseURL ( );\n    void PuthtmlViewBaseURL (\n        _bstr_t pVal );\n    _bstr_t GethtmlViewFullURL ( );\n    void PuthtmlViewFullURL (\n        _bstr_t pVal );\n    long GethtmlViewSecureLock ( );\n    void PuthtmlViewSecureLock (\n        long pVal );\n    VARIANT_BOOL GethtmlViewBusy ( );\n    void PuthtmlViewBusy (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GethtmlViewShowCert ( );\n    void PuthtmlViewShowCert (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetpreviousEnabled ( );\n    void PutpreviousEnabled (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetdoPreviousNow ( );\n    void PutdoPreviousNow (\n        VARIANT_BOOL pVal );\n    long GetDPI ( );\n    HRESULT clearColors ( );\n    _bstr_t GetlastMessage ( );\n    void PutlastMessage (\n        _bstr_t pVal );\n    VARIANT_BOOL GetinVistaPlus ( );\n    VARIANT_BOOL GetisBidi ( );\n    VARIANT_BOOL GetisOCX ( );\n    VARIANT_BOOL GethoverTransportsEnabled ( );\n    HRESULT initRipHelper ( );\n    VARIANT_BOOL GetisAudioCD ( );\n    void PutisAudioCD (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetcanRip ( );\n    void PutcanRip (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetisRipping ( );\n    void PutisRipping (\n        VARIANT_BOOL pVal );\n    _bstr_t GetcurrentDrive ( );\n    void PutcurrentDrive (\n        _bstr_t pVal );\n    HRESULT startRip ( );\n    HRESULT stopRip ( );\n    VARIANT_BOOL GetshowMMO ( );\n    void PutshowMMO (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetMMOVisible ( );\n    VARIANT_BOOL GetsuggestionsVisible ( );\n    _bstr_t GetsuggestionsTextColor ( );\n    _bstr_t GetfontFace ( );\n    long GetfontSize ( );\n    _bstr_t GetbackgroundColor ( );\n    long GetdoubleClickTime ( );\n    VARIANT_BOOL GetplayAgain ( );\n    VARIANT_BOOL GetpreviousPlaylistAvailable ( );\n    VARIANT_BOOL GetnextPlaylistAvailable ( );\n    HRESULT nextPlaylist ( );\n    HRESULT previousPlaylist ( );\n    HRESULT playOffsetMedia (\n        long iOffset );\n    VARIANT_BOOL GetbasketVisible ( );\n    void PutbasketVisible (\n        VARIANT_BOOL pVal );\n    _bstr_t GetmmoTextColor ( );\n    VARIANT_BOOL GetbackgroundVisible ( );\n    void PutbackgroundEnabled (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetbackgroundEnabled ( );\n    void PutbackgroundIndex (\n        long pVal );\n    long GetbackgroundIndex ( );\n    _bstr_t GetupNext ( );\n    VARIANT_BOOL GetplaybackOverlayVisible ( );\n    VARIANT_BOOL Getremoted ( );\n    VARIANT_BOOL GetglassEnabled ( );\n    VARIANT_BOOL GethighContrast ( );\n    void PuttestHighContrast (\n        _bstr_t _arg1 );\n    void GetsessionPlaylistCount (\n        long * pVal );\n    HRESULT setGestureStatus (\n        IDispatch * pObject,\n        long newVal );\n    _bstr_t GetmetadataString ( );\n    void PutmetadataString (\n        _bstr_t pVal );\n    long GetalbumArtAlpha ( );\n    VARIANT_BOOL GetplayerModeAlbumArtSelected ( );\n    VARIANT_BOOL GetinFullScreen ( );\n    HRESULT syncToAlbumArt (\n        IDispatch * pObject,\n        long iOffsetFromCurrentMedia,\n        _bstr_t bstrFallbackImage );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_viewFriendlyName (\n        /*[in]*/ BSTR bstrView,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_viewPresetCount (\n        /*[in]*/ BSTR bstrView,\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_viewPresetName (\n        /*[in]*/ BSTR bstrView,\n        /*[in]*/ long nPresetIndex,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_effectFriendlyName (\n        /*[in]*/ BSTR bstrEffect,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_effectPresetName (\n        /*[in]*/ BSTR bstrEffect,\n        /*[in]*/ long nPresetIndex,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall raw_resolveDisplayView (\n        /*[in]*/ VARIANT_BOOL fSafe,\n        /*[out,retval]*/ BSTR * pbstrVal ) = 0;\n      virtual HRESULT __stdcall raw_isValidDisplayView (\n        /*[in]*/ BSTR bstrView,\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall raw_getSkinFile (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_captionsAvailable (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_linkAvailable (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_linkRequest (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_linkRequest (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_linkRequestParams (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_linkRequestParams (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall raw_getCurrentArtID (\n        /*[in]*/ VARIANT_BOOL fLargeArt,\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall raw_getTimeString (\n        /*[in]*/ double dTime,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall raw_getCurrentScriptCommand (\n        /*[in]*/ BSTR bstrType,\n        /*[out,retval]*/ BSTR * pbstrCommand ) = 0;\n      virtual HRESULT __stdcall raw_calcLayout (\n        /*[in]*/ long lWidth,\n        /*[in]*/ long lHeight,\n        /*[in]*/ VARIANT_BOOL vbCaptions,\n        /*[in]*/ VARIANT_BOOL vbBanner ) = 0;\n      virtual HRESULT __stdcall raw_getLayoutSize (\n        /*[in]*/ long nProp,\n        /*[out,retval]*/ long * plValue ) = 0;\n      virtual HRESULT __stdcall raw_getRootPlaylist (\n        /*[in]*/ IDispatch * pPlaylist,\n        /*[out,retval]*/ IDispatch * * ppRootPlaylist ) = 0;\n      virtual HRESULT __stdcall raw_getHTMLViewURL (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_editObj (\n        /*[out,retval]*/ IUnknown * * ppVal ) = 0;\n      virtual HRESULT __stdcall put_editObj (\n        /*[in]*/ IUnknown * ppVal ) = 0;\n      virtual HRESULT __stdcall raw_getStatusString (\n        /*[in]*/ BSTR bstrStatusId,\n        /*[out,retval]*/ BSTR * pbstrStatus ) = 0;\n      virtual HRESULT __stdcall raw_getStatusPct (\n        /*[in]*/ BSTR bstrStatusId,\n        /*[out,retval]*/ long * pvResult ) = 0;\n      virtual HRESULT __stdcall raw_getStatusResult (\n        /*[in]*/ BSTR bstrStatusId,\n        /*[out,retval]*/ long * pvResult ) = 0;\n      virtual HRESULT __stdcall raw_getStatusIcon (\n        /*[in]*/ BSTR bstrStatusId,\n        /*[out,retval]*/ long * pvResult ) = 0;\n      virtual HRESULT __stdcall raw_getStatusIdList (\n        /*[out,retval]*/ BSTR * pbstrStatus ) = 0;\n      virtual HRESULT __stdcall get_notificationString (\n        /*[out,retval]*/ BSTR * pbstrNotificationString ) = 0;\n      virtual HRESULT __stdcall get_htmlViewBaseURL (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_htmlViewBaseURL (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_htmlViewFullURL (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_htmlViewFullURL (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_htmlViewSecureLock (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_htmlViewSecureLock (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_htmlViewBusy (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_htmlViewBusy (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_htmlViewShowCert (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_htmlViewShowCert (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_previousEnabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_previousEnabled (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_doPreviousNow (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_doPreviousNow (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_DPI (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall raw_clearColors ( ) = 0;\n      virtual HRESULT __stdcall get_lastMessage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_lastMessage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_inVistaPlus (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_isBidi (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_isOCX (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_hoverTransportsEnabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall raw_initRipHelper ( ) = 0;\n      virtual HRESULT __stdcall get_isAudioCD (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_isAudioCD (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_canRip (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_canRip (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_isRipping (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_isRipping (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_currentDrive (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_currentDrive (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall raw_startRip ( ) = 0;\n      virtual HRESULT __stdcall raw_stopRip ( ) = 0;\n      virtual HRESULT __stdcall get_showMMO (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_showMMO (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_MMOVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_suggestionsVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_suggestionsTextColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_fontFace (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_fontSize (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_doubleClickTime (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_playAgain (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_previousPlaylistAvailable (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_nextPlaylistAvailable (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall raw_nextPlaylist ( ) = 0;\n      virtual HRESULT __stdcall raw_previousPlaylist ( ) = 0;\n      virtual HRESULT __stdcall raw_playOffsetMedia (\n        /*[in]*/ long iOffset ) = 0;\n      virtual HRESULT __stdcall get_basketVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_basketVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_mmoTextColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundEnabled (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundEnabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundIndex (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundIndex (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_upNext (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_playbackOverlayVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_remoted (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_glassEnabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_highContrast (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_testHighContrast (\n        /*[in]*/ BSTR _arg1 ) = 0;\n      virtual HRESULT __stdcall get_sessionPlaylistCount (\n        /*[out]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall raw_setGestureStatus (\n        /*[in]*/ IDispatch * pObject,\n        /*[in]*/ long newVal ) = 0;\n      virtual HRESULT __stdcall get_metadataString (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_metadataString (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_albumArtAlpha (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_playerModeAlbumArtSelected (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_inFullScreen (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall raw_syncToAlbumArt (\n        /*[in]*/ IDispatch * pObject,\n        /*[in]*/ long iOffsetFromCurrentMedia,\n        /*[in]*/ BSTR bstrFallbackImage ) = 0;\n};\n\nstruct __declspec(uuid(\"2a2e0da3-19fa-4f82-be18-cd7d7a3b977f\"))\nIWMPNowDoingDispatch : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getsync_spaceToUse))\n    long sync_spaceToUse;\n    __declspec(property(get=Getsync_spaceUsed))\n    long sync_spaceUsed;\n    __declspec(property(get=Getsync_totalSpace))\n    long sync_totalSpace;\n    __declspec(property(get=Getsync_deviceName))\n    _bstr_t sync_deviceName;\n    __declspec(property(get=Getsync_selectedDevice,put=Putsync_selectedDevice))\n    long sync_selectedDevice;\n    __declspec(property(get=Getsync_numDevices))\n    long sync_numDevices;\n    __declspec(property(get=Getsync_oemName))\n    _bstr_t sync_oemName;\n    __declspec(property(get=Getsync_percentComplete))\n    long sync_percentComplete;\n    __declspec(property(get=GetDPI))\n    long DPI;\n    __declspec(property(get=GeteditPlaylist))\n    IDispatchPtr editPlaylist;\n    __declspec(property(get=GetbasketPlaylistName))\n    _bstr_t basketPlaylistName;\n    __declspec(property(get=GetisHighContrastMode))\n    VARIANT_BOOL isHighContrastMode;\n    __declspec(property(get=GetallowRating))\n    VARIANT_BOOL allowRating;\n    __declspec(property(get=GetallowShop))\n    VARIANT_BOOL allowShop;\n    __declspec(property(get=Getmode))\n    _bstr_t mode;\n    __declspec(property(get=Getburn_mediaType))\n    _bstr_t burn_mediaType;\n    __declspec(property(get=Getburn_contentType))\n    _bstr_t burn_contentType;\n    __declspec(property(get=Getburn_freeSpace))\n    long burn_freeSpace;\n    __declspec(property(get=Getburn_totalSpace))\n    long burn_totalSpace;\n    __declspec(property(get=Getburn_driveName))\n    _bstr_t burn_driveName;\n    __declspec(property(get=Getburn_selectedDrive,put=Putburn_selectedDrive))\n    long burn_selectedDrive;\n    __declspec(property(get=Getburn_numDevices))\n    long burn_numDevices;\n    __declspec(property(get=Getburn_numDiscsSpanned))\n    long burn_numDiscsSpanned;\n    __declspec(property(get=Getburn_spaceToUse))\n    long burn_spaceToUse;\n    __declspec(property(get=Getburn_percentComplete))\n    long burn_percentComplete;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT buyContent ( );\n    HRESULT hideBasket ( );\n    HRESULT burnNavigateToStatus ( );\n    HRESULT syncNavigateToStatus ( );\n    long GetDPI ( );\n    _bstr_t Getmode ( );\n    void Putburn_selectedDrive (\n        long pVal );\n    long Getburn_selectedDrive ( );\n    long Getsync_selectedDevice ( );\n    void Putsync_selectedDevice (\n        long pVal );\n    long Getburn_numDiscsSpanned ( );\n    IDispatchPtr GeteditPlaylist ( );\n    _bstr_t GetbasketPlaylistName ( );\n    VARIANT_BOOL GetisHighContrastMode ( );\n    VARIANT_BOOL GetallowRating ( );\n    VARIANT_BOOL GetallowShop ( );\n    _bstr_t Getburn_mediaType ( );\n    _bstr_t Getburn_contentType ( );\n    long Getburn_freeSpace ( );\n    long Getburn_totalSpace ( );\n    _bstr_t Getburn_driveName ( );\n    long Getburn_numDevices ( );\n    long Getburn_spaceToUse ( );\n    long Getburn_percentComplete ( );\n    long Getsync_spaceToUse ( );\n    long Getsync_spaceUsed ( );\n    long Getsync_totalSpace ( );\n    _bstr_t Getsync_deviceName ( );\n    long Getsync_numDevices ( );\n    _bstr_t Getsync_oemName ( );\n    long Getsync_percentComplete ( );\n    HRESULT logData (\n        _bstr_t ID,\n        _bstr_t data );\n    _bstr_t formatTime (\n        long value );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_buyContent ( ) = 0;\n      virtual HRESULT __stdcall raw_hideBasket ( ) = 0;\n      virtual HRESULT __stdcall raw_burnNavigateToStatus ( ) = 0;\n      virtual HRESULT __stdcall raw_syncNavigateToStatus ( ) = 0;\n      virtual HRESULT __stdcall get_DPI (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_mode (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_burn_selectedDrive (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_burn_selectedDrive (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_sync_selectedDevice (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_sync_selectedDevice (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_burn_numDiscsSpanned (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_editPlaylist (\n        /*[out,retval]*/ IDispatch * * ppEditPlaylist ) = 0;\n      virtual HRESULT __stdcall get_basketPlaylistName (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_isHighContrastMode (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_allowRating (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_allowShop (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall get_burn_mediaType (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_burn_contentType (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_burn_freeSpace (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_burn_totalSpace (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_burn_driveName (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_burn_numDevices (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_burn_spaceToUse (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_burn_percentComplete (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_sync_spaceToUse (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_sync_spaceUsed (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_sync_totalSpace (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_sync_deviceName (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_sync_numDevices (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_sync_oemName (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_sync_percentComplete (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall raw_logData (\n        /*[in]*/ BSTR ID,\n        /*[in]*/ BSTR data ) = 0;\n      virtual HRESULT __stdcall raw_formatTime (\n        /*[in]*/ long value,\n        /*[out,retval]*/ BSTR * pbstrReturn ) = 0;\n};\n\nstruct __declspec(uuid(\"946b023e-044c-4473-8018-74954f09dc7e\"))\nIWMPHoverPreviewDispatch : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Gettitle))\n    _bstr_t title;\n    __declspec(property(get=Getalbum))\n    _bstr_t album;\n    __declspec(property(put=Putimage))\n    IDispatchPtr image;\n    __declspec(property(get=GetURL))\n    _bstr_t URL;\n    __declspec(property(put=PutpreviewClick))\n    VARIANT_BOOL previewClick;\n    __declspec(property(put=PutautoClick))\n    VARIANT_BOOL autoClick;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t Gettitle ( );\n    _bstr_t Getalbum ( );\n    _bstr_t GetURL ( );\n    void Putimage (\n        IDispatch * _arg1 );\n    void PutautoClick (\n        VARIANT_BOOL _arg1 );\n    void PutpreviewClick (\n        VARIANT_BOOL _arg1 );\n    HRESULT dismiss ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_title (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_album (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_URL (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_image (\n        /*[in]*/ IDispatch * _arg1 ) = 0;\n      virtual HRESULT __stdcall put_autoClick (\n        /*[in]*/ VARIANT_BOOL _arg1 ) = 0;\n      virtual HRESULT __stdcall put_previewClick (\n        /*[in]*/ VARIANT_BOOL _arg1 ) = 0;\n      virtual HRESULT __stdcall raw_dismiss ( ) = 0;\n};\n\nstruct __declspec(uuid(\"bb17fff7-1692-4555-918a-6af7bfacedd2\"))\nIWMPButtonCtrlEvents : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    // Methods:\n    HRESULT onclick ( );\n};\n\nstruct __declspec(uuid(\"87291b51-0c8e-11d3-bb2a-00a0c93ca73a\"))\nWMPButtonCtrl;\n    // [ default ] interface IWMPButtonCtrl\n    // [ default, source ] dispinterface IWMPButtonCtrlEvents\n\nstruct __declspec(uuid(\"87291b50-0c8e-11d3-bb2a-00a0c93ca73a\"))\nIWMPButtonCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getimage,put=Putimage))\n    _bstr_t image;\n    __declspec(property(get=GethoverImage,put=PuthoverImage))\n    _bstr_t hoverImage;\n    __declspec(property(get=GetdownImage,put=PutdownImage))\n    _bstr_t downImage;\n    __declspec(property(get=GetdisabledImage,put=PutdisabledImage))\n    _bstr_t disabledImage;\n    __declspec(property(get=GethoverDownImage,put=PuthoverDownImage))\n    _bstr_t hoverDownImage;\n    __declspec(property(get=Gettiled,put=Puttiled))\n    VARIANT_BOOL tiled;\n    __declspec(property(get=GettransparencyColor,put=PuttransparencyColor))\n    _bstr_t transparencyColor;\n    __declspec(property(get=Getdown,put=Putdown))\n    VARIANT_BOOL down;\n    __declspec(property(get=Getsticky,put=Putsticky))\n    VARIANT_BOOL sticky;\n    __declspec(property(get=GetupToolTip,put=PutupToolTip))\n    _bstr_t upToolTip;\n    __declspec(property(get=GetdownToolTip,put=PutdownToolTip))\n    _bstr_t downToolTip;\n    __declspec(property(get=Getcursor,put=Putcursor))\n    _bstr_t cursor;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t Getimage ( );\n    void Putimage (\n        _bstr_t pVal );\n    _bstr_t GethoverImage ( );\n    void PuthoverImage (\n        _bstr_t pVal );\n    _bstr_t GetdownImage ( );\n    void PutdownImage (\n        _bstr_t pVal );\n    _bstr_t GetdisabledImage ( );\n    void PutdisabledImage (\n        _bstr_t pVal );\n    _bstr_t GethoverDownImage ( );\n    void PuthoverDownImage (\n        _bstr_t pVal );\n    VARIANT_BOOL Gettiled ( );\n    void Puttiled (\n        VARIANT_BOOL pVal );\n    _bstr_t GettransparencyColor ( );\n    void PuttransparencyColor (\n        _bstr_t pVal );\n    VARIANT_BOOL Getdown ( );\n    void Putdown (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL Getsticky ( );\n    void Putsticky (\n        VARIANT_BOOL pVal );\n    _bstr_t GetupToolTip ( );\n    void PutupToolTip (\n        _bstr_t pVal );\n    _bstr_t GetdownToolTip ( );\n    void PutdownToolTip (\n        _bstr_t pVal );\n    _bstr_t Getcursor ( );\n    void Putcursor (\n        _bstr_t pVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_image (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_image (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_hoverImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_hoverImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_downImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_downImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_disabledImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_disabledImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_hoverDownImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_hoverDownImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_tiled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_tiled (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_transparencyColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_transparencyColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_down (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_down (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_sticky (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_sticky (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_upToolTip (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_upToolTip (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_downToolTip (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_downToolTip (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_cursor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_cursor (\n        /*[in]*/ BSTR pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"fc1880cf-83b9-43a7-a066-c44ce8c82583\"))\nWMPListBoxCtrl;\n    // [ default ] interface IWMPListBoxCtrl\n\nstruct __declspec(uuid(\"fc1880ce-83b9-43a7-a066-c44ce8c82583\"))\nIWMPListBoxCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(put=PutpopUp))\n    VARIANT_BOOL popUp;\n    __declspec(property(get=GetfocusItem,put=PutfocusItem))\n    long focusItem;\n    __declspec(property(get=Getborder,put=Putborder))\n    VARIANT_BOOL border;\n    __declspec(property(get=Getsorted,put=Putsorted))\n    VARIANT_BOOL sorted;\n    __declspec(property(get=Getmultiselect,put=Putmultiselect))\n    VARIANT_BOOL multiselect;\n    __declspec(property(get=GetreadOnly,put=PutreadOnly))\n    VARIANT_BOOL readOnly;\n    __declspec(property(get=GetforegroundColor,put=PutforegroundColor))\n    _bstr_t foregroundColor;\n    __declspec(property(get=GetbackgroundColor,put=PutbackgroundColor))\n    _bstr_t backgroundColor;\n    __declspec(property(get=GetfontSize,put=PutfontSize))\n    long fontSize;\n    __declspec(property(get=GetfontStyle,put=PutfontStyle))\n    _bstr_t fontStyle;\n    __declspec(property(get=GetfontFace,put=PutfontFace))\n    _bstr_t fontFace;\n    __declspec(property(get=GetselectedItem,put=PutselectedItem))\n    long selectedItem;\n    __declspec(property(get=GetitemCount))\n    long itemCount;\n    __declspec(property(get=GetfirstVisibleItem,put=PutfirstVisibleItem))\n    long firstVisibleItem;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long GetselectedItem ( );\n    void PutselectedItem (\n        long pnPos );\n    VARIANT_BOOL Getsorted ( );\n    void Putsorted (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL Getmultiselect ( );\n    void Putmultiselect (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetreadOnly ( );\n    void PutreadOnly (\n        VARIANT_BOOL pVal );\n    _bstr_t GetforegroundColor ( );\n    void PutforegroundColor (\n        _bstr_t pVal );\n    _bstr_t GetbackgroundColor ( );\n    void PutbackgroundColor (\n        _bstr_t pVal );\n    long GetfontSize ( );\n    void PutfontSize (\n        long pVal );\n    _bstr_t GetfontStyle ( );\n    void PutfontStyle (\n        _bstr_t pVal );\n    _bstr_t GetfontFace ( );\n    void PutfontFace (\n        _bstr_t pVal );\n    long GetitemCount ( );\n    long GetfirstVisibleItem ( );\n    void PutfirstVisibleItem (\n        long pVal );\n    void PutpopUp (\n        VARIANT_BOOL _arg1 );\n    long GetfocusItem ( );\n    void PutfocusItem (\n        long pVal );\n    VARIANT_BOOL Getborder ( );\n    void Putborder (\n        VARIANT_BOOL pVal );\n    _bstr_t getItem (\n        long nPos );\n    HRESULT insertItem (\n        long nPos,\n        _bstr_t newVal );\n    HRESULT appendItem (\n        _bstr_t newVal );\n    HRESULT replaceItem (\n        long nPos,\n        _bstr_t newVal );\n    HRESULT deleteItem (\n        long nPos );\n    HRESULT deleteAll ( );\n    long findItem (\n        long nStartIndex,\n        _bstr_t newVal );\n    long getNextSelectedItem (\n        long nStartIndex );\n    HRESULT setSelectedState (\n        long nPos,\n        VARIANT_BOOL vbSelected );\n    HRESULT show ( );\n    HRESULT dismiss ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_selectedItem (\n        /*[out,retval]*/ long * pnPos ) = 0;\n      virtual HRESULT __stdcall put_selectedItem (\n        /*[in]*/ long pnPos ) = 0;\n      virtual HRESULT __stdcall get_sorted (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_sorted (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_multiselect (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_multiselect (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_readOnly (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_readOnly (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_foregroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_foregroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_fontSize (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontSize (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_fontStyle (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontStyle (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_fontFace (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontFace (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_itemCount (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_firstVisibleItem (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_firstVisibleItem (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall put_popUp (\n        /*[in]*/ VARIANT_BOOL _arg1 ) = 0;\n      virtual HRESULT __stdcall get_focusItem (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_focusItem (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_border (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_border (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall raw_getItem (\n        /*[in]*/ long nPos,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall raw_insertItem (\n        /*[in]*/ long nPos,\n        /*[in]*/ BSTR newVal ) = 0;\n      virtual HRESULT __stdcall raw_appendItem (\n        /*[in]*/ BSTR newVal ) = 0;\n      virtual HRESULT __stdcall raw_replaceItem (\n        /*[in]*/ long nPos,\n        /*[in]*/ BSTR newVal ) = 0;\n      virtual HRESULT __stdcall raw_deleteItem (\n        /*[in]*/ long nPos ) = 0;\n      virtual HRESULT __stdcall raw_deleteAll ( ) = 0;\n      virtual HRESULT __stdcall raw_findItem (\n        /*[in]*/ long nStartIndex,\n        /*[in]*/ BSTR newVal,\n        /*[out,retval]*/ long * pnPos ) = 0;\n      virtual HRESULT __stdcall raw_getNextSelectedItem (\n        /*[in]*/ long nStartIndex,\n        /*[out,retval]*/ long * pnSelected ) = 0;\n      virtual HRESULT __stdcall raw_setSelectedState (\n        /*[in]*/ long nPos,\n        /*[in]*/ VARIANT_BOOL vbSelected ) = 0;\n      virtual HRESULT __stdcall raw_show ( ) = 0;\n      virtual HRESULT __stdcall raw_dismiss ( ) = 0;\n};\n\nstruct __declspec(uuid(\"d255dfb8-c22a-42cf-b8b7-f15d7bcf65d6\"))\nIWMPListBoxItem : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(put=Putvalue))\n    _bstr_t value;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    void Putvalue (\n        _bstr_t _arg1 );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall put_value (\n        /*[in]*/ BSTR _arg1 ) = 0;\n};\n\nstruct __declspec(uuid(\"63d9d30f-ae4c-4678-8ca8-5720f4fe4419\"))\nIWMPPlaylistCtrlColumn : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetcolumnName,put=PutcolumnName))\n    _bstr_t columnName;\n    __declspec(property(get=GetcolumnID,put=PutcolumnID))\n    _bstr_t columnID;\n    __declspec(property(get=GetcolumnResizeMode,put=PutcolumnResizeMode))\n    _bstr_t columnResizeMode;\n    __declspec(property(get=GetcolumnWidth,put=PutcolumnWidth))\n    long columnWidth;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetcolumnName ( );\n    void PutcolumnName (\n        _bstr_t pVal );\n    _bstr_t GetcolumnID ( );\n    void PutcolumnID (\n        _bstr_t pVal );\n    _bstr_t GetcolumnResizeMode ( );\n    void PutcolumnResizeMode (\n        _bstr_t pVal );\n    long GetcolumnWidth ( );\n    void PutcolumnWidth (\n        long pVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_columnName (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_columnName (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_columnID (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_columnID (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_columnResizeMode (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_columnResizeMode (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_columnWidth (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_columnWidth (\n        /*[in]*/ long pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"cdac14d2-8be4-11d3-bb48-00a0c93ca73a\"))\nIWMPSliderCtrlEvents : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    // Methods:\n    HRESULT ondragbegin ( );\n    HRESULT ondragend ( );\n    HRESULT onpositionchange ( );\n};\n\nstruct __declspec(uuid(\"f2bf2c90-405f-11d3-bb39-00a0c93ca73a\"))\nWMPSliderCtrl;\n    // [ default ] interface IWMPSliderCtrl\n    // [ default, source ] dispinterface IWMPSliderCtrlEvents\n\nstruct __declspec(uuid(\"f2bf2c8f-405f-11d3-bb39-00a0c93ca73a\"))\nIWMPSliderCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetbackgroundHoverImage,put=PutbackgroundHoverImage))\n    _bstr_t backgroundHoverImage;\n    __declspec(property(get=GetdisabledImage,put=PutdisabledImage))\n    _bstr_t disabledImage;\n    __declspec(property(get=GetthumbImage,put=PutthumbImage))\n    _bstr_t thumbImage;\n    __declspec(property(get=GetthumbHoverImage,put=PutthumbHoverImage))\n    _bstr_t thumbHoverImage;\n    __declspec(property(get=GetthumbDownImage,put=PutthumbDownImage))\n    _bstr_t thumbDownImage;\n    __declspec(property(get=GetthumbDisabledImage,put=PutthumbDisabledImage))\n    _bstr_t thumbDisabledImage;\n    __declspec(property(get=Getmin,put=Putmin))\n    float min;\n    __declspec(property(get=Getmax,put=Putmax))\n    float max;\n    __declspec(property(get=Getvalue,put=Putvalue))\n    float value;\n    __declspec(property(get=GettoolTip,put=PuttoolTip))\n    _bstr_t toolTip;\n    __declspec(property(get=Getcursor,put=Putcursor))\n    _bstr_t cursor;\n    __declspec(property(get=GetborderSize,put=PutborderSize))\n    int borderSize;\n    __declspec(property(get=GetforegroundHoverImage,put=PutforegroundHoverImage))\n    _bstr_t foregroundHoverImage;\n    __declspec(property(get=GetforegroundProgress,put=PutforegroundProgress))\n    float foregroundProgress;\n    __declspec(property(get=GetuseForegroundProgress,put=PutuseForegroundProgress))\n    VARIANT_BOOL useForegroundProgress;\n    __declspec(property(get=Getdirection,put=Putdirection))\n    _bstr_t direction;\n    __declspec(property(get=Getslide,put=Putslide))\n    VARIANT_BOOL slide;\n    __declspec(property(get=Gettiled,put=Puttiled))\n    VARIANT_BOOL tiled;\n    __declspec(property(get=GetforegroundColor,put=PutforegroundColor))\n    _bstr_t foregroundColor;\n    __declspec(property(get=GetforegroundEndColor,put=PutforegroundEndColor))\n    _bstr_t foregroundEndColor;\n    __declspec(property(get=GetbackgroundColor,put=PutbackgroundColor))\n    _bstr_t backgroundColor;\n    __declspec(property(get=GetbackgroundEndColor,put=PutbackgroundEndColor))\n    _bstr_t backgroundEndColor;\n    __declspec(property(get=GetdisabledColor,put=PutdisabledColor))\n    _bstr_t disabledColor;\n    __declspec(property(get=GettransparencyColor,put=PuttransparencyColor))\n    _bstr_t transparencyColor;\n    __declspec(property(get=GetforegroundImage,put=PutforegroundImage))\n    _bstr_t foregroundImage;\n    __declspec(property(get=GetbackgroundImage,put=PutbackgroundImage))\n    _bstr_t backgroundImage;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t Getdirection ( );\n    void Putdirection (\n        _bstr_t pVal );\n    VARIANT_BOOL Getslide ( );\n    void Putslide (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL Gettiled ( );\n    void Puttiled (\n        VARIANT_BOOL pVal );\n    _bstr_t GetforegroundColor ( );\n    void PutforegroundColor (\n        _bstr_t pVal );\n    _bstr_t GetforegroundEndColor ( );\n    void PutforegroundEndColor (\n        _bstr_t pVal );\n    _bstr_t GetbackgroundColor ( );\n    void PutbackgroundColor (\n        _bstr_t pVal );\n    _bstr_t GetbackgroundEndColor ( );\n    void PutbackgroundEndColor (\n        _bstr_t pVal );\n    _bstr_t GetdisabledColor ( );\n    void PutdisabledColor (\n        _bstr_t pVal );\n    _bstr_t GettransparencyColor ( );\n    void PuttransparencyColor (\n        _bstr_t pVal );\n    _bstr_t GetforegroundImage ( );\n    void PutforegroundImage (\n        _bstr_t pVal );\n    _bstr_t GetbackgroundImage ( );\n    void PutbackgroundImage (\n        _bstr_t pVal );\n    _bstr_t GetbackgroundHoverImage ( );\n    void PutbackgroundHoverImage (\n        _bstr_t pVal );\n    _bstr_t GetdisabledImage ( );\n    void PutdisabledImage (\n        _bstr_t pVal );\n    _bstr_t GetthumbImage ( );\n    void PutthumbImage (\n        _bstr_t pVal );\n    _bstr_t GetthumbHoverImage ( );\n    void PutthumbHoverImage (\n        _bstr_t pVal );\n    _bstr_t GetthumbDownImage ( );\n    void PutthumbDownImage (\n        _bstr_t pVal );\n    _bstr_t GetthumbDisabledImage ( );\n    void PutthumbDisabledImage (\n        _bstr_t pVal );\n    float Getmin ( );\n    void Putmin (\n        float pVal );\n    float Getmax ( );\n    void Putmax (\n        float pVal );\n    float Getvalue ( );\n    void Putvalue (\n        float pVal );\n    _bstr_t GettoolTip ( );\n    void PuttoolTip (\n        _bstr_t pVal );\n    _bstr_t Getcursor ( );\n    void Putcursor (\n        _bstr_t pVal );\n    int GetborderSize ( );\n    void PutborderSize (\n        int pVal );\n    _bstr_t GetforegroundHoverImage ( );\n    void PutforegroundHoverImage (\n        _bstr_t pVal );\n    float GetforegroundProgress ( );\n    void PutforegroundProgress (\n        float pVal );\n    VARIANT_BOOL GetuseForegroundProgress ( );\n    void PutuseForegroundProgress (\n        VARIANT_BOOL pVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_direction (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_direction (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_slide (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_slide (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_tiled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_tiled (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_foregroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_foregroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_foregroundEndColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_foregroundEndColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundEndColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundEndColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_disabledColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_disabledColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_transparencyColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_transparencyColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_foregroundImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_foregroundImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundHoverImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundHoverImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_disabledImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_disabledImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_thumbImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_thumbImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_thumbHoverImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_thumbHoverImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_thumbDownImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_thumbDownImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_thumbDisabledImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_thumbDisabledImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_min (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_min (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_max (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_max (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_value (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_value (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_toolTip (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_toolTip (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_cursor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_cursor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_borderSize (\n        /*[out,retval]*/ int * pVal ) = 0;\n      virtual HRESULT __stdcall put_borderSize (\n        /*[in]*/ int pVal ) = 0;\n      virtual HRESULT __stdcall get_foregroundHoverImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_foregroundHoverImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_foregroundProgress (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_foregroundProgress (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_useForegroundProgress (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_useForegroundProgress (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"a85c0477-714c-4a06-b9f6-7c8ca38b45dc\"))\nIWMPVideoCtrlEvents : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    // Methods:\n    HRESULT onvideostart ( );\n    HRESULT onvideoend ( );\n};\n\nstruct __declspec(uuid(\"61cecf11-fc3a-11d2-a1cd-005004602752\"))\nWMPVideoCtrl;\n    // [ default ] interface IWMPVideoCtrl\n    // [ default, source ] dispinterface IWMPVideoCtrlEvents\n\nstruct __declspec(uuid(\"61cecf10-fc3a-11d2-a1cd-005004602752\"))\nIWMPVideoCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getwindowless,put=Putwindowless))\n    VARIANT_BOOL windowless;\n    __declspec(property(get=Getcursor,put=Putcursor))\n    _bstr_t cursor;\n    __declspec(property(get=GetbackgroundColor,put=PutbackgroundColor))\n    _bstr_t backgroundColor;\n    __declspec(property(get=GetshrinkToFit,put=PutshrinkToFit))\n    VARIANT_BOOL shrinkToFit;\n    __declspec(property(get=GetmaintainAspectRatio,put=PutmaintainAspectRatio))\n    VARIANT_BOOL maintainAspectRatio;\n    __declspec(property(get=GettoolTip,put=PuttoolTip))\n    _bstr_t toolTip;\n    __declspec(property(get=GetfullScreen,put=PutfullScreen))\n    VARIANT_BOOL fullScreen;\n    __declspec(property(get=GetstretchToFit,put=PutstretchToFit))\n    VARIANT_BOOL stretchToFit;\n    __declspec(property(get=Getzoom,put=Putzoom))\n    long zoom;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    void Putwindowless (\n        VARIANT_BOOL pbClipped );\n    VARIANT_BOOL Getwindowless ( );\n    void Putcursor (\n        _bstr_t pbstrCursor );\n    _bstr_t Getcursor ( );\n    void PutbackgroundColor (\n        _bstr_t pbstrColor );\n    _bstr_t GetbackgroundColor ( );\n    void PutmaintainAspectRatio (\n        VARIANT_BOOL pbMaintainAspectRatio );\n    VARIANT_BOOL GetmaintainAspectRatio ( );\n    void PuttoolTip (\n        _bstr_t bstrToolTip );\n    _bstr_t GettoolTip ( );\n    VARIANT_BOOL GetfullScreen ( );\n    void PutfullScreen (\n        VARIANT_BOOL pbFullScreen );\n    void PutshrinkToFit (\n        VARIANT_BOOL pbShrinkToFit );\n    VARIANT_BOOL GetshrinkToFit ( );\n    void PutstretchToFit (\n        VARIANT_BOOL pbStretchToFit );\n    VARIANT_BOOL GetstretchToFit ( );\n    void Putzoom (\n        long pzoom );\n    long Getzoom ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall put_windowless (\n        /*[in]*/ VARIANT_BOOL pbClipped ) = 0;\n      virtual HRESULT __stdcall get_windowless (\n        /*[out,retval]*/ VARIANT_BOOL * pbClipped ) = 0;\n      virtual HRESULT __stdcall put_cursor (\n        /*[in]*/ BSTR pbstrCursor ) = 0;\n      virtual HRESULT __stdcall get_cursor (\n        /*[out,retval]*/ BSTR * pbstrCursor ) = 0;\n      virtual HRESULT __stdcall put_backgroundColor (\n        /*[in]*/ BSTR pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_backgroundColor (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_maintainAspectRatio (\n        /*[in]*/ VARIANT_BOOL pbMaintainAspectRatio ) = 0;\n      virtual HRESULT __stdcall get_maintainAspectRatio (\n        /*[out,retval]*/ VARIANT_BOOL * pbMaintainAspectRatio ) = 0;\n      virtual HRESULT __stdcall put_toolTip (\n        /*[in]*/ BSTR bstrToolTip ) = 0;\n      virtual HRESULT __stdcall get_toolTip (\n        /*[out,retval]*/ BSTR * bstrToolTip ) = 0;\n      virtual HRESULT __stdcall get_fullScreen (\n        /*[out,retval]*/ VARIANT_BOOL * pbFullScreen ) = 0;\n      virtual HRESULT __stdcall put_fullScreen (\n        /*[in]*/ VARIANT_BOOL pbFullScreen ) = 0;\n      virtual HRESULT __stdcall put_shrinkToFit (\n        /*[in]*/ VARIANT_BOOL pbShrinkToFit ) = 0;\n      virtual HRESULT __stdcall get_shrinkToFit (\n        /*[out,retval]*/ VARIANT_BOOL * pbShrinkToFit ) = 0;\n      virtual HRESULT __stdcall put_stretchToFit (\n        /*[in]*/ VARIANT_BOOL pbStretchToFit ) = 0;\n      virtual HRESULT __stdcall get_stretchToFit (\n        /*[out,retval]*/ VARIANT_BOOL * pbStretchToFit ) = 0;\n      virtual HRESULT __stdcall put_zoom (\n        /*[in]*/ long pzoom ) = 0;\n      virtual HRESULT __stdcall get_zoom (\n        /*[out,retval]*/ long * pzoom ) = 0;\n};\n\nstruct __declspec(uuid(\"47dea830-d619-4154-b8d8-6b74845d6a2d\"))\nWMPEffects;\n    // [ default ] interface IWMPEffectsCtrl\n\nstruct __declspec(uuid(\"a9efab80-0a60-4c3f-bbd1-4558dd2a9769\"))\nIWMPEffectsCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetcurrentEffect,put=PutcurrentEffect))\n    IDispatchPtr currentEffect;\n    __declspec(property(get=GetcurrentEffectTitle))\n    _bstr_t currentEffectTitle;\n    __declspec(property(get=GetcurrentEffectType,put=PutcurrentEffectType))\n    _bstr_t currentEffectType;\n    __declspec(property(get=GetcurrentPreset,put=PutcurrentPreset))\n    long currentPreset;\n    __declspec(property(get=GetcurrentPresetTitle))\n    _bstr_t currentPresetTitle;\n    __declspec(property(get=GetcurrentEffectPresetCount))\n    long currentEffectPresetCount;\n    __declspec(property(get=GetfullScreen,put=PutfullScreen))\n    VARIANT_BOOL fullScreen;\n    __declspec(property(get=GeteffectCanGoFullScreen))\n    VARIANT_BOOL effectCanGoFullScreen;\n    __declspec(property(get=GeteffectHasPropertyPage))\n    VARIANT_BOOL effectHasPropertyPage;\n    __declspec(property(get=GeteffectCount))\n    long effectCount;\n    __declspec(property(get=GeteffectTitle))\n    _bstr_t effectTitle[];\n    __declspec(property(get=GeteffectType))\n    _bstr_t effectType[];\n    __declspec(property(get=Getwindowed,put=Putwindowed))\n    VARIANT_BOOL windowed;\n    __declspec(property(get=GetallowAll,put=PutallowAll))\n    VARIANT_BOOL allowAll;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL Getwindowed ( );\n    void Putwindowed (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetallowAll ( );\n    void PutallowAll (\n        VARIANT_BOOL pVal );\n    void PutcurrentEffectType (\n        _bstr_t pVal );\n    _bstr_t GetcurrentEffectType ( );\n    _bstr_t GetcurrentEffectTitle ( );\n    HRESULT next ( );\n    HRESULT previous ( );\n    HRESULT settings ( );\n    IDispatchPtr GetcurrentEffect ( );\n    void PutcurrentEffect (\n        IDispatch * p );\n    HRESULT nextEffect ( );\n    HRESULT previousEffect ( );\n    HRESULT nextPreset ( );\n    HRESULT previousPreset ( );\n    long GetcurrentPreset ( );\n    void PutcurrentPreset (\n        long pVal );\n    _bstr_t GetcurrentPresetTitle ( );\n    long GetcurrentEffectPresetCount ( );\n    VARIANT_BOOL GetfullScreen ( );\n    void PutfullScreen (\n        VARIANT_BOOL pbFullScreen );\n    VARIANT_BOOL GeteffectCanGoFullScreen ( );\n    VARIANT_BOOL GeteffectHasPropertyPage ( );\n    long GeteffectCount ( );\n    _bstr_t GeteffectTitle (\n        long index );\n    _bstr_t GeteffectType (\n        long index );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_windowed (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_windowed (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_allowAll (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_allowAll (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall put_currentEffectType (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_currentEffectType (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_currentEffectTitle (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall raw_next ( ) = 0;\n      virtual HRESULT __stdcall raw_previous ( ) = 0;\n      virtual HRESULT __stdcall raw_settings ( ) = 0;\n      virtual HRESULT __stdcall get_currentEffect (\n        /*[out,retval]*/ IDispatch * * p ) = 0;\n      virtual HRESULT __stdcall put_currentEffect (\n        /*[in]*/ IDispatch * p ) = 0;\n      virtual HRESULT __stdcall raw_nextEffect ( ) = 0;\n      virtual HRESULT __stdcall raw_previousEffect ( ) = 0;\n      virtual HRESULT __stdcall raw_nextPreset ( ) = 0;\n      virtual HRESULT __stdcall raw_previousPreset ( ) = 0;\n      virtual HRESULT __stdcall get_currentPreset (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_currentPreset (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_currentPresetTitle (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_currentEffectPresetCount (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_fullScreen (\n        /*[out,retval]*/ VARIANT_BOOL * pbFullScreen ) = 0;\n      virtual HRESULT __stdcall put_fullScreen (\n        /*[in]*/ VARIANT_BOOL pbFullScreen ) = 0;\n      virtual HRESULT __stdcall get_effectCanGoFullScreen (\n        /*[out,retval]*/ VARIANT_BOOL * pbFullScreen ) = 0;\n      virtual HRESULT __stdcall get_effectHasPropertyPage (\n        /*[out,retval]*/ VARIANT_BOOL * pbPropertyPage ) = 0;\n      virtual HRESULT __stdcall get_effectCount (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_effectTitle (\n        /*[in]*/ long index,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_effectType (\n        /*[in]*/ long index,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"93eb32f5-87b1-45ad-acc6-0f2483db83bb\"))\nWMPEqualizerSettingsCtrl;\n    // [ default ] interface IWMPEqualizerSettingsCtrl\n\nstruct __declspec(uuid(\"2bd3716f-a914-49fb-8655-996d5f495498\"))\nIWMPEqualizerSettingsCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetgainLevel5,put=PutgainLevel5))\n    float gainLevel5;\n    __declspec(property(get=GetgainLevel6,put=PutgainLevel6))\n    float gainLevel6;\n    __declspec(property(get=GetgainLevel7,put=PutgainLevel7))\n    float gainLevel7;\n    __declspec(property(get=GetgainLevel8,put=PutgainLevel8))\n    float gainLevel8;\n    __declspec(property(get=GetgainLevel9,put=PutgainLevel9))\n    float gainLevel9;\n    __declspec(property(get=GetgainLevel10,put=PutgainLevel10))\n    float gainLevel10;\n    __declspec(property(get=GetgainLevels,put=PutgainLevels))\n    float gainLevels[];\n    __declspec(property(get=GetcurrentPreset,put=PutcurrentPreset))\n    long currentPreset;\n    __declspec(property(get=GetcurrentPresetTitle))\n    _bstr_t currentPresetTitle;\n    __declspec(property(get=GetpresetCount))\n    long presetCount;\n    __declspec(property(get=GetenhancedAudio,put=PutenhancedAudio))\n    VARIANT_BOOL enhancedAudio;\n    __declspec(property(get=GetspeakerSize,put=PutspeakerSize))\n    long speakerSize;\n    __declspec(property(get=GetcurrentSpeakerName))\n    _bstr_t currentSpeakerName;\n    __declspec(property(get=GettruBassLevel,put=PuttruBassLevel))\n    long truBassLevel;\n    __declspec(property(get=GetwowLevel,put=PutwowLevel))\n    long wowLevel;\n    __declspec(property(get=GetenableSplineTension,put=PutenableSplineTension))\n    VARIANT_BOOL enableSplineTension;\n    __declspec(property(get=GetsplineTension,put=PutsplineTension))\n    float splineTension;\n    __declspec(property(get=GetpresetTitle))\n    _bstr_t presetTitle[];\n    __declspec(property(get=Getnormalization,put=Putnormalization))\n    VARIANT_BOOL normalization;\n    __declspec(property(get=GetnormalizationAverage))\n    float normalizationAverage;\n    __declspec(property(get=GetnormalizationPeak))\n    float normalizationPeak;\n    __declspec(property(get=GetcrossFade,put=PutcrossFade))\n    VARIANT_BOOL crossFade;\n    __declspec(property(get=GetcrossFadeWindow,put=PutcrossFadeWindow))\n    long crossFadeWindow;\n    __declspec(property(get=Getbypass,put=Putbypass))\n    VARIANT_BOOL bypass;\n    __declspec(property(get=Getbands))\n    long bands;\n    __declspec(property(get=GetgainLevel1,put=PutgainLevel1))\n    float gainLevel1;\n    __declspec(property(get=GetgainLevel2,put=PutgainLevel2))\n    float gainLevel2;\n    __declspec(property(get=GetgainLevel3,put=PutgainLevel3))\n    float gainLevel3;\n    __declspec(property(get=GetgainLevel4,put=PutgainLevel4))\n    float gainLevel4;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL Getbypass ( );\n    void Putbypass (\n        VARIANT_BOOL pVal );\n    float GetgainLevel1 ( );\n    void PutgainLevel1 (\n        float pflLevel );\n    float GetgainLevel2 ( );\n    void PutgainLevel2 (\n        float pflLevel );\n    float GetgainLevel3 ( );\n    void PutgainLevel3 (\n        float pflLevel );\n    float GetgainLevel4 ( );\n    void PutgainLevel4 (\n        float pflLevel );\n    float GetgainLevel5 ( );\n    void PutgainLevel5 (\n        float pflLevel );\n    float GetgainLevel6 ( );\n    void PutgainLevel6 (\n        float pflLevel );\n    float GetgainLevel7 ( );\n    void PutgainLevel7 (\n        float pflLevel );\n    float GetgainLevel8 ( );\n    void PutgainLevel8 (\n        float pflLevel );\n    float GetgainLevel9 ( );\n    void PutgainLevel9 (\n        float pflLevel );\n    float GetgainLevel10 ( );\n    void PutgainLevel10 (\n        float pflLevel );\n    float GetgainLevels (\n        long iIndex );\n    void PutgainLevels (\n        long iIndex,\n        float pflLevel );\n    HRESULT reset ( );\n    long Getbands ( );\n    HRESULT nextPreset ( );\n    HRESULT previousPreset ( );\n    long GetcurrentPreset ( );\n    void PutcurrentPreset (\n        long pVal );\n    _bstr_t GetcurrentPresetTitle ( );\n    long GetpresetCount ( );\n    VARIANT_BOOL GetenhancedAudio ( );\n    void PutenhancedAudio (\n        VARIANT_BOOL pfVal );\n    long GetspeakerSize ( );\n    void PutspeakerSize (\n        long plVal );\n    _bstr_t GetcurrentSpeakerName ( );\n    long GettruBassLevel ( );\n    void PuttruBassLevel (\n        long plTruBassLevel );\n    long GetwowLevel ( );\n    void PutwowLevel (\n        long plWowLevel );\n    float GetsplineTension ( );\n    void PutsplineTension (\n        float pflSplineTension );\n    VARIANT_BOOL GetenableSplineTension ( );\n    void PutenableSplineTension (\n        VARIANT_BOOL pfEnableSplineTension );\n    _bstr_t GetpresetTitle (\n        long iIndex );\n    VARIANT_BOOL Getnormalization ( );\n    void Putnormalization (\n        VARIANT_BOOL pfVal );\n    float GetnormalizationAverage ( );\n    float GetnormalizationPeak ( );\n    VARIANT_BOOL GetcrossFade ( );\n    void PutcrossFade (\n        VARIANT_BOOL pfVal );\n    long GetcrossFadeWindow ( );\n    void PutcrossFadeWindow (\n        long plWindow );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_bypass (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_bypass (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_gainLevel1 (\n        /*[out,retval]*/ float * pflLevel ) = 0;\n      virtual HRESULT __stdcall put_gainLevel1 (\n        /*[in]*/ float pflLevel ) = 0;\n      virtual HRESULT __stdcall get_gainLevel2 (\n        /*[out,retval]*/ float * pflLevel ) = 0;\n      virtual HRESULT __stdcall put_gainLevel2 (\n        /*[in]*/ float pflLevel ) = 0;\n      virtual HRESULT __stdcall get_gainLevel3 (\n        /*[out,retval]*/ float * pflLevel ) = 0;\n      virtual HRESULT __stdcall put_gainLevel3 (\n        /*[in]*/ float pflLevel ) = 0;\n      virtual HRESULT __stdcall get_gainLevel4 (\n        /*[out,retval]*/ float * pflLevel ) = 0;\n      virtual HRESULT __stdcall put_gainLevel4 (\n        /*[in]*/ float pflLevel ) = 0;\n      virtual HRESULT __stdcall get_gainLevel5 (\n        /*[out,retval]*/ float * pflLevel ) = 0;\n      virtual HRESULT __stdcall put_gainLevel5 (\n        /*[in]*/ float pflLevel ) = 0;\n      virtual HRESULT __stdcall get_gainLevel6 (\n        /*[out,retval]*/ float * pflLevel ) = 0;\n      virtual HRESULT __stdcall put_gainLevel6 (\n        /*[in]*/ float pflLevel ) = 0;\n      virtual HRESULT __stdcall get_gainLevel7 (\n        /*[out,retval]*/ float * pflLevel ) = 0;\n      virtual HRESULT __stdcall put_gainLevel7 (\n        /*[in]*/ float pflLevel ) = 0;\n      virtual HRESULT __stdcall get_gainLevel8 (\n        /*[out,retval]*/ float * pflLevel ) = 0;\n      virtual HRESULT __stdcall put_gainLevel8 (\n        /*[in]*/ float pflLevel ) = 0;\n      virtual HRESULT __stdcall get_gainLevel9 (\n        /*[out,retval]*/ float * pflLevel ) = 0;\n      virtual HRESULT __stdcall put_gainLevel9 (\n        /*[in]*/ float pflLevel ) = 0;\n      virtual HRESULT __stdcall get_gainLevel10 (\n        /*[out,retval]*/ float * pflLevel ) = 0;\n      virtual HRESULT __stdcall put_gainLevel10 (\n        /*[in]*/ float pflLevel ) = 0;\n      virtual HRESULT __stdcall get_gainLevels (\n        /*[in]*/ long iIndex,\n        /*[out,retval]*/ float * pflLevel ) = 0;\n      virtual HRESULT __stdcall put_gainLevels (\n        /*[in]*/ long iIndex,\n        /*[in]*/ float pflLevel ) = 0;\n      virtual HRESULT __stdcall raw_reset ( ) = 0;\n      virtual HRESULT __stdcall get_bands (\n        /*[out,retval]*/ long * pbands ) = 0;\n      virtual HRESULT __stdcall raw_nextPreset ( ) = 0;\n      virtual HRESULT __stdcall raw_previousPreset ( ) = 0;\n      virtual HRESULT __stdcall get_currentPreset (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_currentPreset (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_currentPresetTitle (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_presetCount (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_enhancedAudio (\n        /*[out,retval]*/ VARIANT_BOOL * pfVal ) = 0;\n      virtual HRESULT __stdcall put_enhancedAudio (\n        /*[in]*/ VARIANT_BOOL pfVal ) = 0;\n      virtual HRESULT __stdcall get_speakerSize (\n        /*[out,retval]*/ long * plVal ) = 0;\n      virtual HRESULT __stdcall put_speakerSize (\n        /*[in]*/ long plVal ) = 0;\n      virtual HRESULT __stdcall get_currentSpeakerName (\n        /*[out,retval]*/ BSTR * pbstrName ) = 0;\n      virtual HRESULT __stdcall get_truBassLevel (\n        /*[out,retval]*/ long * plTruBassLevel ) = 0;\n      virtual HRESULT __stdcall put_truBassLevel (\n        /*[in]*/ long plTruBassLevel ) = 0;\n      virtual HRESULT __stdcall get_wowLevel (\n        /*[out,retval]*/ long * plWowLevel ) = 0;\n      virtual HRESULT __stdcall put_wowLevel (\n        /*[in]*/ long plWowLevel ) = 0;\n      virtual HRESULT __stdcall get_splineTension (\n        /*[out,retval]*/ float * pflSplineTension ) = 0;\n      virtual HRESULT __stdcall put_splineTension (\n        /*[in]*/ float pflSplineTension ) = 0;\n      virtual HRESULT __stdcall get_enableSplineTension (\n        /*[out,retval]*/ VARIANT_BOOL * pfEnableSplineTension ) = 0;\n      virtual HRESULT __stdcall put_enableSplineTension (\n        /*[in]*/ VARIANT_BOOL pfEnableSplineTension ) = 0;\n      virtual HRESULT __stdcall get_presetTitle (\n        /*[in]*/ long iIndex,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall get_normalization (\n        /*[out,retval]*/ VARIANT_BOOL * pfVal ) = 0;\n      virtual HRESULT __stdcall put_normalization (\n        /*[in]*/ VARIANT_BOOL pfVal ) = 0;\n      virtual HRESULT __stdcall get_normalizationAverage (\n        /*[out,retval]*/ float * pflAverage ) = 0;\n      virtual HRESULT __stdcall get_normalizationPeak (\n        /*[out,retval]*/ float * pflPeak ) = 0;\n      virtual HRESULT __stdcall get_crossFade (\n        /*[out,retval]*/ VARIANT_BOOL * pfVal ) = 0;\n      virtual HRESULT __stdcall put_crossFade (\n        /*[in]*/ VARIANT_BOOL pfVal ) = 0;\n      virtual HRESULT __stdcall get_crossFadeWindow (\n        /*[out,retval]*/ long * plWindow ) = 0;\n      virtual HRESULT __stdcall put_crossFadeWindow (\n        /*[in]*/ long plWindow ) = 0;\n};\n\nstruct __declspec(uuid(\"ae7bfafe-dcc8-4a73-92c8-cc300ca88859\"))\nWMPVideoSettingsCtrl;\n    // [ default ] interface IWMPVideoSettingsCtrl\n\nstruct __declspec(uuid(\"07ec23da-ef73-4bde-a40f-f269e0b7afd6\"))\nIWMPVideoSettingsCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getbrightness,put=Putbrightness))\n    long brightness;\n    __declspec(property(get=Getcontrast,put=Putcontrast))\n    long contrast;\n    __declspec(property(get=Gethue,put=Puthue))\n    long hue;\n    __declspec(property(get=Getsaturation,put=Putsaturation))\n    long saturation;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long Getbrightness ( );\n    void Putbrightness (\n        long pVal );\n    long Getcontrast ( );\n    void Putcontrast (\n        long pVal );\n    long Gethue ( );\n    void Puthue (\n        long pVal );\n    long Getsaturation ( );\n    void Putsaturation (\n        long pVal );\n    HRESULT reset ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_brightness (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_brightness (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_contrast (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_contrast (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_hue (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_hue (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_saturation (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_saturation (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall raw_reset ( ) = 0;\n};\n\nstruct __declspec(uuid(\"1ea16d11-dcb1-41fe-bc17-42cdfbef8f53\"))\nWMPDolbyDigitalSettingsCtrl;\n    // [ default ] interface IWMPDolbyDigitalSettingsCtrl\n\nstruct __declspec(uuid(\"bbd6801a-a1d4-4d05-9f2d-29e0024c3fd9\"))\nIWMPDolbyDigitalSettingsCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetcurrentPreset,put=PutcurrentPreset))\n    long currentPreset;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT reset ( );\n    long GetcurrentPreset ( );\n    void PutcurrentPreset (\n        long plCurrentPreset );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_reset ( ) = 0;\n      virtual HRESULT __stdcall get_currentPreset (\n        /*[out,retval]*/ long * plCurrentPreset ) = 0;\n      virtual HRESULT __stdcall put_currentPreset (\n        /*[in]*/ long plCurrentPreset ) = 0;\n};\n\nstruct __declspec(uuid(\"d9de732a-aee9-4503-9d11-5605589977a8\"))\nWMPLibraryTreeCtrl;\n    // [ default ] interface IWMPLibraryTreeCtrl\n\nstruct __declspec(uuid(\"6342fced-25ea-4033-bddb-d049a14382d3\"))\nWMPEditCtrl;\n    // [ default ] interface IWMPEditCtrl\n\nstruct __declspec(uuid(\"70e1217c-c617-4cfd-bd8a-69ca2043e70b\"))\nIWMPEditCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getvalue,put=Putvalue))\n    _bstr_t value;\n    __declspec(property(get=Getborder,put=Putborder))\n    VARIANT_BOOL border;\n    __declspec(property(get=Getjustification,put=Putjustification))\n    _bstr_t justification;\n    __declspec(property(get=GeteditStyle,put=PuteditStyle))\n    _bstr_t editStyle;\n    __declspec(property(get=GetwordWrap,put=PutwordWrap))\n    VARIANT_BOOL wordWrap;\n    __declspec(property(get=GetreadOnly,put=PutreadOnly))\n    VARIANT_BOOL readOnly;\n    __declspec(property(get=GetforegroundColor,put=PutforegroundColor))\n    _bstr_t foregroundColor;\n    __declspec(property(get=GetbackgroundColor,put=PutbackgroundColor))\n    _bstr_t backgroundColor;\n    __declspec(property(get=GetfontSize,put=PutfontSize))\n    long fontSize;\n    __declspec(property(get=GetfontStyle,put=PutfontStyle))\n    _bstr_t fontStyle;\n    __declspec(property(get=GetfontFace,put=PutfontFace))\n    _bstr_t fontFace;\n    __declspec(property(get=GettextLimit,put=PuttextLimit))\n    long textLimit;\n    __declspec(property(get=GetlineCount))\n    long lineCount;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t Getvalue ( );\n    void Putvalue (\n        _bstr_t pVal );\n    VARIANT_BOOL Getborder ( );\n    void Putborder (\n        VARIANT_BOOL pVal );\n    _bstr_t Getjustification ( );\n    void Putjustification (\n        _bstr_t pVal );\n    _bstr_t GeteditStyle ( );\n    void PuteditStyle (\n        _bstr_t pVal );\n    VARIANT_BOOL GetwordWrap ( );\n    void PutwordWrap (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetreadOnly ( );\n    void PutreadOnly (\n        VARIANT_BOOL pVal );\n    _bstr_t GetforegroundColor ( );\n    void PutforegroundColor (\n        _bstr_t pVal );\n    _bstr_t GetbackgroundColor ( );\n    void PutbackgroundColor (\n        _bstr_t pVal );\n    long GetfontSize ( );\n    void PutfontSize (\n        long pVal );\n    _bstr_t GetfontStyle ( );\n    void PutfontStyle (\n        _bstr_t pVal );\n    _bstr_t GetfontFace ( );\n    void PutfontFace (\n        _bstr_t pVal );\n    long GettextLimit ( );\n    void PuttextLimit (\n        long pVal );\n    long GetlineCount ( );\n    _bstr_t getLine (\n        long nIndex );\n    long getSelectionStart ( );\n    long getSelectionEnd ( );\n    HRESULT setSelection (\n        long nStart,\n        long nEnd );\n    HRESULT replaceSelection (\n        _bstr_t newVal );\n    long getLineIndex (\n        long nIndex );\n    long getLineFromChar (\n        long nPosition );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_value (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_value (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_border (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_border (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_justification (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_justification (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_editStyle (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_editStyle (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_wordWrap (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_wordWrap (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_readOnly (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_readOnly (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_foregroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_foregroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_fontSize (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontSize (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_fontStyle (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontStyle (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_fontFace (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontFace (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_textLimit (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_textLimit (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_lineCount (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall raw_getLine (\n        /*[in]*/ long nIndex,\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall raw_getSelectionStart (\n        /*[out,retval]*/ long * pnStart ) = 0;\n      virtual HRESULT __stdcall raw_getSelectionEnd (\n        /*[out,retval]*/ long * pnEnd ) = 0;\n      virtual HRESULT __stdcall raw_setSelection (\n        /*[in]*/ long nStart,\n        /*[in]*/ long nEnd ) = 0;\n      virtual HRESULT __stdcall raw_replaceSelection (\n        /*[in]*/ BSTR newVal ) = 0;\n      virtual HRESULT __stdcall raw_getLineIndex (\n        /*[in]*/ long nIndex,\n        /*[out,retval]*/ long * pnPosition ) = 0;\n      virtual HRESULT __stdcall raw_getLineFromChar (\n        /*[in]*/ long nPosition,\n        /*[out,retval]*/ long * pnLine ) = 0;\n};\n\nstruct __declspec(uuid(\"a8a55fac-82ea-4bd7-bd7b-11586a4d99e4\"))\nWMPSkinList;\n    // [ default ] interface IWMPSkinList\n\nstruct __declspec(uuid(\"8cea03a2-d0c5-4e97-9c38-a676a639a51d\"))\nIWMPSkinList : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT updateBasketColumns ( );\n    HRESULT highContrastChange ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_updateBasketColumns ( ) = 0;\n      virtual HRESULT __stdcall raw_highContrastChange ( ) = 0;\n};\n\nstruct __declspec(uuid(\"5d0ad945-289e-45c5-a9c6-f301f0152108\"))\nIWMPPluginUIHost : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetbackgroundColor,put=PutbackgroundColor))\n    _bstr_t backgroundColor;\n    __declspec(property(get=GetobjectID,put=PutobjectID))\n    _bstr_t objectID;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetbackgroundColor ( );\n    void PutbackgroundColor (\n        _bstr_t pVal );\n    _bstr_t GetobjectID ( );\n    void PutobjectID (\n        _bstr_t pVal );\n    _variant_t getProperty (\n        _bstr_t bstrName );\n    HRESULT setProperty (\n        _bstr_t bstrName,\n        const _variant_t & newVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_backgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_objectID (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_objectID (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall raw_getProperty (\n        /*[in]*/ BSTR bstrName,\n        /*[out,retval]*/ VARIANT * pVal ) = 0;\n      virtual HRESULT __stdcall raw_setProperty (\n        /*[in]*/ BSTR bstrName,\n        /*[in]*/ VARIANT newVal ) = 0;\n};\n\nstruct __declspec(uuid(\"bab3768b-8883-4aec-9f9b-e14c947913ef\"))\nWMPMenuCtrl;\n    // [ default ] interface IWMPMenuCtrl\n\nstruct __declspec(uuid(\"158a7adc-33da-4039-a553-bddbbe389f5c\"))\nIWMPMenuCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetshowFlags,put=PutshowFlags))\n    long showFlags;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT deleteAllItems ( );\n    HRESULT appendItem (\n        long nID,\n        _bstr_t bstrItem );\n    HRESULT appendSeparator ( );\n    HRESULT enableItem (\n        long nID,\n        VARIANT_BOOL newVal );\n    HRESULT checkItem (\n        long nID,\n        VARIANT_BOOL newVal );\n    HRESULT checkRadioItem (\n        long nID,\n        VARIANT_BOOL newVal );\n    long GetshowFlags ( );\n    void PutshowFlags (\n        long pVal );\n    long show ( );\n    HRESULT showEx (\n        long nID );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_deleteAllItems ( ) = 0;\n      virtual HRESULT __stdcall raw_appendItem (\n        /*[in]*/ long nID,\n        /*[in]*/ BSTR bstrItem ) = 0;\n      virtual HRESULT __stdcall raw_appendSeparator ( ) = 0;\n      virtual HRESULT __stdcall raw_enableItem (\n        /*[in]*/ long nID,\n        /*[in]*/ VARIANT_BOOL newVal ) = 0;\n      virtual HRESULT __stdcall raw_checkItem (\n        /*[in]*/ long nID,\n        /*[in]*/ VARIANT_BOOL newVal ) = 0;\n      virtual HRESULT __stdcall raw_checkRadioItem (\n        /*[in]*/ long nID,\n        /*[in]*/ VARIANT_BOOL newVal ) = 0;\n      virtual HRESULT __stdcall get_showFlags (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_showFlags (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall raw_show (\n        /*[out,retval]*/ long * pnID ) = 0;\n      virtual HRESULT __stdcall raw_showEx (\n        /*[in]*/ long nID ) = 0;\n};\n\nstruct __declspec(uuid(\"6b28f900-8d64-4b80-9963-cc52ddd1fbb4\"))\nWMPAutoMenuCtrl;\n    // [ default ] interface IWMPAutoMenuCtrl\n\nstruct __declspec(uuid(\"1ad13e0b-4f3a-41df-9be2-f9e6fe0a7875\"))\nIWMPAutoMenuCtrl : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT show (\n        _bstr_t newVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_show (\n        /*[in]*/ BSTR newVal ) = 0;\n};\n\nstruct __declspec(uuid(\"ae3b6831-25a9-11d3-bd41-00c04f6ea5ae\"))\nWMPRegionalButtonCtrl;\n    // [ default ] interface IWMPRegionalButtonCtrl\n\nstruct __declspec(uuid(\"58d507b1-2354-11d3-bd41-00c04f6ea5ae\"))\nIWMPRegionalButtonCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GethueShift,put=PuthueShift))\n    float hueShift;\n    __declspec(property(get=Getsaturation,put=Putsaturation))\n    float saturation;\n    __declspec(property(get=GethoverHoverImage,put=PuthoverHoverImage))\n    _bstr_t hoverHoverImage;\n    __declspec(property(get=Getimage,put=Putimage))\n    _bstr_t image;\n    __declspec(property(get=GethoverImage,put=PuthoverImage))\n    _bstr_t hoverImage;\n    __declspec(property(get=GetdownImage,put=PutdownImage))\n    _bstr_t downImage;\n    __declspec(property(get=GethoverDownImage,put=PuthoverDownImage))\n    _bstr_t hoverDownImage;\n    __declspec(property(get=GetdisabledImage,put=PutdisabledImage))\n    _bstr_t disabledImage;\n    __declspec(property(get=GetmappingImage,put=PutmappingImage))\n    _bstr_t mappingImage;\n    __declspec(property(get=GettransparencyColor,put=PuttransparencyColor))\n    _bstr_t transparencyColor;\n    __declspec(property(get=Getcursor,put=Putcursor))\n    _bstr_t cursor;\n    __declspec(property(get=GetshowBackground,put=PutshowBackground))\n    VARIANT_BOOL showBackground;\n    __declspec(property(get=Getradio,put=Putradio))\n    VARIANT_BOOL radio;\n    __declspec(property(get=GetbuttonCount))\n    long buttonCount;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t Getimage ( );\n    void Putimage (\n        _bstr_t pVal );\n    _bstr_t GethoverImage ( );\n    void PuthoverImage (\n        _bstr_t pVal );\n    _bstr_t GetdownImage ( );\n    void PutdownImage (\n        _bstr_t pVal );\n    _bstr_t GethoverDownImage ( );\n    void PuthoverDownImage (\n        _bstr_t pVal );\n    _bstr_t GethoverHoverImage ( );\n    void PuthoverHoverImage (\n        _bstr_t pVal );\n    _bstr_t GetdisabledImage ( );\n    void PutdisabledImage (\n        _bstr_t pVal );\n    _bstr_t GetmappingImage ( );\n    void PutmappingImage (\n        _bstr_t pVal );\n    _bstr_t GettransparencyColor ( );\n    void PuttransparencyColor (\n        _bstr_t pVal );\n    _bstr_t Getcursor ( );\n    void Putcursor (\n        _bstr_t pVal );\n    VARIANT_BOOL GetshowBackground ( );\n    void PutshowBackground (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL Getradio ( );\n    void Putradio (\n        VARIANT_BOOL pVal );\n    long GetbuttonCount ( );\n    IDispatchPtr createButton ( );\n    IDispatchPtr getButton (\n        long nButton );\n    HRESULT Click (\n        long nButton );\n    float GethueShift ( );\n    void PuthueShift (\n        float pVal );\n    float Getsaturation ( );\n    void Putsaturation (\n        float pVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_image (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_image (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_hoverImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_hoverImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_downImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_downImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_hoverDownImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_hoverDownImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_hoverHoverImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_hoverHoverImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_disabledImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_disabledImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_mappingImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_mappingImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_transparencyColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_transparencyColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_cursor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_cursor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_showBackground (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_showBackground (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_radio (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_radio (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_buttonCount (\n        /*[out,retval]*/ long * nButtons ) = 0;\n      virtual HRESULT __stdcall raw_createButton (\n        /*[out,retval]*/ IDispatch * * pButton ) = 0;\n      virtual HRESULT __stdcall raw_getButton (\n        /*[in]*/ long nButton,\n        /*[out,retval]*/ IDispatch * * pButton ) = 0;\n      virtual HRESULT __stdcall raw_Click (\n        /*[in]*/ long nButton ) = 0;\n      virtual HRESULT __stdcall get_hueShift (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_hueShift (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_saturation (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_saturation (\n        /*[in]*/ float pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"50fc8d31-67ac-11d3-bd4c-00c04f6ea5ae\"))\nIWMPRegionalButtonEvents : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    // Methods:\n    HRESULT onblur ( );\n    HRESULT onfocus ( );\n    HRESULT onclick ( );\n    HRESULT ondblclick ( );\n    HRESULT onmousedown ( );\n    HRESULT onmouseup ( );\n    HRESULT onmousemove ( );\n    HRESULT onmouseover ( );\n    HRESULT onmouseout ( );\n    HRESULT onkeypress ( );\n    HRESULT onkeydown ( );\n    HRESULT onkeyup ( );\n};\n\nstruct __declspec(uuid(\"09aeff11-69ef-11d3-bd4d-00c04f6ea5ae\"))\nWMPRegionalButton;\n    // [ default ] interface IWMPRegionalButton\n    // [ default, source ] dispinterface IWMPRegionalButtonEvents\n\nstruct __declspec(uuid(\"58d507b2-2354-11d3-bd41-00c04f6ea5ae\"))\nIWMPRegionalButton : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetaccName,put=PutaccName))\n    _bstr_t accName;\n    __declspec(property(get=GetaccDescription,put=PutaccDescription))\n    _bstr_t accDescription;\n    __declspec(property(get=GetaccKeyboardShortcut,put=PutaccKeyboardShortcut))\n    _bstr_t accKeyboardShortcut;\n    __declspec(property(get=GetupToolTip,put=PutupToolTip))\n    _bstr_t upToolTip;\n    __declspec(property(get=GetdownToolTip,put=PutdownToolTip))\n    _bstr_t downToolTip;\n    __declspec(property(get=GetmappingColor,put=PutmappingColor))\n    _bstr_t mappingColor;\n    __declspec(property(get=Getenabled,put=Putenabled))\n    VARIANT_BOOL enabled;\n    __declspec(property(get=Getsticky,put=Putsticky))\n    VARIANT_BOOL sticky;\n    __declspec(property(get=Getdown,put=Putdown))\n    VARIANT_BOOL down;\n    __declspec(property(get=Getindex))\n    long index;\n    __declspec(property(get=GettabStop,put=PuttabStop))\n    VARIANT_BOOL tabStop;\n    __declspec(property(get=Getcursor,put=Putcursor))\n    _bstr_t cursor;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetupToolTip ( );\n    void PutupToolTip (\n        _bstr_t pVal );\n    _bstr_t GetdownToolTip ( );\n    void PutdownToolTip (\n        _bstr_t pVal );\n    _bstr_t GetmappingColor ( );\n    void PutmappingColor (\n        _bstr_t pVal );\n    VARIANT_BOOL Getenabled ( );\n    void Putenabled (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL Getsticky ( );\n    void Putsticky (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL Getdown ( );\n    void Putdown (\n        VARIANT_BOOL pVal );\n    long Getindex ( );\n    VARIANT_BOOL GettabStop ( );\n    void PuttabStop (\n        VARIANT_BOOL pVal );\n    _bstr_t Getcursor ( );\n    void Putcursor (\n        _bstr_t pVal );\n    HRESULT Click ( );\n    _bstr_t GetaccName ( );\n    void PutaccName (\n        _bstr_t pszName );\n    _bstr_t GetaccDescription ( );\n    void PutaccDescription (\n        _bstr_t pszDescription );\n    _bstr_t GetaccKeyboardShortcut ( );\n    void PutaccKeyboardShortcut (\n        _bstr_t pszShortcut );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_upToolTip (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_upToolTip (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_downToolTip (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_downToolTip (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_mappingColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_mappingColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_enabled (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_enabled (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_sticky (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_sticky (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_down (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_down (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_index (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_tabStop (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_tabStop (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_cursor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_cursor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall raw_Click ( ) = 0;\n      virtual HRESULT __stdcall get_accName (\n        /*[out,retval]*/ BSTR * pszName ) = 0;\n      virtual HRESULT __stdcall put_accName (\n        /*[in]*/ BSTR pszName ) = 0;\n      virtual HRESULT __stdcall get_accDescription (\n        /*[out,retval]*/ BSTR * pszDescription ) = 0;\n      virtual HRESULT __stdcall put_accDescription (\n        /*[in]*/ BSTR pszDescription ) = 0;\n      virtual HRESULT __stdcall get_accKeyboardShortcut (\n        /*[out,retval]*/ BSTR * pszShortcut ) = 0;\n      virtual HRESULT __stdcall put_accKeyboardShortcut (\n        /*[in]*/ BSTR pszShortcut ) = 0;\n};\n\nstruct __declspec(uuid(\"95f45aa4-ed0a-11d2-ba67-0000f80855e6\"))\nIWMPCustomSliderCtrlEvents : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    // Methods:\n    HRESULT ondragbegin ( );\n    HRESULT ondragend ( );\n    HRESULT onpositionchange ( );\n};\n\nstruct __declspec(uuid(\"95f45aa3-ed0a-11d2-ba67-0000f80855e6\"))\nWMPCustomSliderCtrl;\n    // [ default ] interface IWMPCustomSlider\n    // [ default, source ] dispinterface IWMPCustomSliderCtrlEvents\n\nstruct __declspec(uuid(\"95f45aa2-ed0a-11d2-ba67-0000f80855e6\"))\nIWMPCustomSlider : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getimage,put=Putimage))\n    _bstr_t image;\n    __declspec(property(get=GetpositionImage,put=PutpositionImage))\n    _bstr_t positionImage;\n    __declspec(property(get=GethoverImage,put=PuthoverImage))\n    _bstr_t hoverImage;\n    __declspec(property(get=GetdisabledImage,put=PutdisabledImage))\n    _bstr_t disabledImage;\n    __declspec(property(get=Getmin,put=Putmin))\n    float min;\n    __declspec(property(get=Getmax,put=Putmax))\n    float max;\n    __declspec(property(get=GettransparencyColor,put=PuttransparencyColor))\n    _bstr_t transparencyColor;\n    __declspec(property(get=Getcursor,put=Putcursor))\n    _bstr_t cursor;\n    __declspec(property(get=Getvalue,put=Putvalue))\n    float value;\n    __declspec(property(get=GettoolTip,put=PuttoolTip))\n    _bstr_t toolTip;\n    __declspec(property(get=GetdownImage,put=PutdownImage))\n    _bstr_t downImage;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t Getcursor ( );\n    void Putcursor (\n        _bstr_t pVal );\n    float Getmin ( );\n    void Putmin (\n        float pVal );\n    float Getmax ( );\n    void Putmax (\n        float pVal );\n    float Getvalue ( );\n    void Putvalue (\n        float pVal );\n    _bstr_t GettoolTip ( );\n    void PuttoolTip (\n        _bstr_t pVal );\n    _bstr_t GetpositionImage ( );\n    void PutpositionImage (\n        _bstr_t pVal );\n    _bstr_t Getimage ( );\n    void Putimage (\n        _bstr_t pVal );\n    _bstr_t GethoverImage ( );\n    void PuthoverImage (\n        _bstr_t pVal );\n    _bstr_t GetdisabledImage ( );\n    void PutdisabledImage (\n        _bstr_t pVal );\n    _bstr_t GetdownImage ( );\n    void PutdownImage (\n        _bstr_t pVal );\n    _bstr_t GettransparencyColor ( );\n    void PuttransparencyColor (\n        _bstr_t pVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_cursor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_cursor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_min (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_min (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_max (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_max (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_value (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_value (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_toolTip (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_toolTip (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_positionImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_positionImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_image (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_image (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_hoverImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_hoverImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_disabledImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_disabledImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_downImage (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_downImage (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_transparencyColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_transparencyColor (\n        /*[in]*/ BSTR pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"ddda102e-0e17-11d3-a2e2-00c04f79f88e\"))\nWMPTextCtrl;\n    // [ default ] interface IWMPTextCtrl\n\nstruct __declspec(uuid(\"237dac8e-0e32-11d3-a2e2-00c04f79f88e\"))\nIWMPTextCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetbackgroundColor,put=PutbackgroundColor))\n    _bstr_t backgroundColor;\n    __declspec(property(get=GetfontFace,put=PutfontFace))\n    _bstr_t fontFace;\n    __declspec(property(get=GetfontStyle,put=PutfontStyle))\n    _bstr_t fontStyle;\n    __declspec(property(get=GetfontSize,put=PutfontSize))\n    long fontSize;\n    __declspec(property(get=GetforegroundColor,put=PutforegroundColor))\n    _bstr_t foregroundColor;\n    __declspec(property(get=GethoverBackgroundColor,put=PuthoverBackgroundColor))\n    _bstr_t hoverBackgroundColor;\n    __declspec(property(get=GethoverForegroundColor,put=PuthoverForegroundColor))\n    _bstr_t hoverForegroundColor;\n    __declspec(property(get=GethoverFontStyle,put=PuthoverFontStyle))\n    _bstr_t hoverFontStyle;\n    __declspec(property(get=Getvalue,put=Putvalue))\n    _bstr_t value;\n    __declspec(property(get=GettoolTip,put=PuttoolTip))\n    _bstr_t toolTip;\n    __declspec(property(get=GetdisabledFontStyle,put=PutdisabledFontStyle))\n    _bstr_t disabledFontStyle;\n    __declspec(property(get=GetdisabledForegroundColor,put=PutdisabledForegroundColor))\n    _bstr_t disabledForegroundColor;\n    __declspec(property(get=GetdisabledBackgroundColor,put=PutdisabledBackgroundColor))\n    _bstr_t disabledBackgroundColor;\n    __declspec(property(get=GetfontSmoothing,put=PutfontSmoothing))\n    VARIANT_BOOL fontSmoothing;\n    __declspec(property(get=Getjustification,put=Putjustification))\n    _bstr_t justification;\n    __declspec(property(get=GetwordWrap,put=PutwordWrap))\n    VARIANT_BOOL wordWrap;\n    __declspec(property(get=Getcursor,put=Putcursor))\n    _bstr_t cursor;\n    __declspec(property(get=Getscrolling,put=Putscrolling))\n    VARIANT_BOOL scrolling;\n    __declspec(property(get=GetscrollingDirection,put=PutscrollingDirection))\n    _bstr_t scrollingDirection;\n    __declspec(property(get=GetscrollingDelay,put=PutscrollingDelay))\n    int scrollingDelay;\n    __declspec(property(get=GetscrollingAmount,put=PutscrollingAmount))\n    int scrollingAmount;\n    __declspec(property(get=GettextWidth))\n    int textWidth;\n    __declspec(property(get=GetonGlass,put=PutonGlass))\n    VARIANT_BOOL onGlass;\n    __declspec(property(get=GetdisableGlassBlurBackground,put=PutdisableGlassBlurBackground))\n    VARIANT_BOOL disableGlassBlurBackground;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetbackgroundColor ( );\n    void PutbackgroundColor (\n        _bstr_t pVal );\n    _bstr_t GetfontFace ( );\n    void PutfontFace (\n        _bstr_t pVal );\n    _bstr_t GetfontStyle ( );\n    void PutfontStyle (\n        _bstr_t pVal );\n    long GetfontSize ( );\n    void PutfontSize (\n        long pVal );\n    _bstr_t GetforegroundColor ( );\n    void PutforegroundColor (\n        _bstr_t pVal );\n    _bstr_t GethoverBackgroundColor ( );\n    void PuthoverBackgroundColor (\n        _bstr_t pVal );\n    _bstr_t GethoverForegroundColor ( );\n    void PuthoverForegroundColor (\n        _bstr_t pVal );\n    _bstr_t GethoverFontStyle ( );\n    void PuthoverFontStyle (\n        _bstr_t pVal );\n    _bstr_t Getvalue ( );\n    void Putvalue (\n        _bstr_t pVal );\n    _bstr_t GettoolTip ( );\n    void PuttoolTip (\n        _bstr_t pVal );\n    _bstr_t GetdisabledFontStyle ( );\n    void PutdisabledFontStyle (\n        _bstr_t pVal );\n    _bstr_t GetdisabledForegroundColor ( );\n    void PutdisabledForegroundColor (\n        _bstr_t pVal );\n    _bstr_t GetdisabledBackgroundColor ( );\n    void PutdisabledBackgroundColor (\n        _bstr_t pVal );\n    VARIANT_BOOL GetfontSmoothing ( );\n    void PutfontSmoothing (\n        VARIANT_BOOL pVal );\n    _bstr_t Getjustification ( );\n    void Putjustification (\n        _bstr_t pVal );\n    VARIANT_BOOL GetwordWrap ( );\n    void PutwordWrap (\n        VARIANT_BOOL pVal );\n    _bstr_t Getcursor ( );\n    void Putcursor (\n        _bstr_t pVal );\n    VARIANT_BOOL Getscrolling ( );\n    void Putscrolling (\n        VARIANT_BOOL pVal );\n    _bstr_t GetscrollingDirection ( );\n    void PutscrollingDirection (\n        _bstr_t pVal );\n    int GetscrollingDelay ( );\n    void PutscrollingDelay (\n        int pVal );\n    int GetscrollingAmount ( );\n    void PutscrollingAmount (\n        int pVal );\n    int GettextWidth ( );\n    VARIANT_BOOL GetonGlass ( );\n    void PutonGlass (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetdisableGlassBlurBackground ( );\n    void PutdisableGlassBlurBackground (\n        VARIANT_BOOL pVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_backgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_fontFace (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontFace (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_fontStyle (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontStyle (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_fontSize (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontSize (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_foregroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_foregroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_hoverBackgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_hoverBackgroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_hoverForegroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_hoverForegroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_hoverFontStyle (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_hoverFontStyle (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_value (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_value (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_toolTip (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_toolTip (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_disabledFontStyle (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_disabledFontStyle (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_disabledForegroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_disabledForegroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_disabledBackgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_disabledBackgroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_fontSmoothing (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontSmoothing (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_justification (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_justification (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_wordWrap (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_wordWrap (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_cursor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_cursor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_scrolling (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_scrolling (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_scrollingDirection (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_scrollingDirection (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_scrollingDelay (\n        /*[out,retval]*/ int * pVal ) = 0;\n      virtual HRESULT __stdcall put_scrollingDelay (\n        /*[in]*/ int pVal ) = 0;\n      virtual HRESULT __stdcall get_scrollingAmount (\n        /*[out,retval]*/ int * pVal ) = 0;\n      virtual HRESULT __stdcall put_scrollingAmount (\n        /*[in]*/ int pVal ) = 0;\n      virtual HRESULT __stdcall get_textWidth (\n        /*[out,retval]*/ int * pVal ) = 0;\n      virtual HRESULT __stdcall get_onGlass (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_onGlass (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_disableGlassBlurBackground (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_disableGlassBlurBackground (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"5f9cfd93-8cad-11d3-9a7e-00c04f8efb70\"))\nWMPPlaylistCtrl;\n    // [ default ] interface IWMPPlaylistCtrl\n\nstruct __declspec(uuid(\"891eadb1-1c45-48b0-b704-49a888da98c4\"))\nITaskCntrCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetCurrentContainer,put=PutCurrentContainer))\n    IUnknownPtr CurrentContainer;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    IUnknownPtr GetCurrentContainer ( );\n    void PutCurrentContainer (\n        IUnknown * ppUnk );\n    HRESULT Activate ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_CurrentContainer (\n        /*[out,retval]*/ IUnknown * * ppUnk ) = 0;\n      virtual HRESULT __stdcall put_CurrentContainer (\n        /*[in]*/ IUnknown * ppUnk ) = 0;\n      virtual HRESULT __stdcall raw_Activate ( ) = 0;\n};\n\nstruct __declspec(uuid(\"d84cca96-cce2-11d2-9ecc-0000f8085981\"))\n_WMPCoreEvents : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    // Methods:\n    HRESULT OpenStateChange (\n        long NewState );\n    HRESULT PlayStateChange (\n        long NewState );\n    HRESULT AudioLanguageChange (\n        long LangID );\n    HRESULT StatusChange ( );\n    HRESULT ScriptCommand (\n        _bstr_t scType,\n        _bstr_t Param );\n    HRESULT NewStream ( );\n    HRESULT Disconnect (\n        long Result );\n    HRESULT Buffering (\n        VARIANT_BOOL Start );\n    HRESULT Error ( );\n    HRESULT Warning (\n        long WarningType,\n        long Param,\n        _bstr_t Description );\n    HRESULT EndOfStream (\n        long Result );\n    HRESULT PositionChange (\n        double oldPosition,\n        double newPosition );\n    HRESULT MarkerHit (\n        long MarkerNum );\n    HRESULT DurationUnitChange (\n        long NewDurationUnit );\n    HRESULT CdromMediaChange (\n        long CdromNum );\n    HRESULT PlaylistChange (\n        IDispatch * Playlist,\n        enum WMPPlaylistChangeEventType change );\n    HRESULT CurrentPlaylistChange (\n        enum WMPPlaylistChangeEventType change );\n    HRESULT CurrentPlaylistItemAvailable (\n        _bstr_t bstrItemName );\n    HRESULT MediaChange (\n        IDispatch * Item );\n    HRESULT CurrentMediaItemAvailable (\n        _bstr_t bstrItemName );\n    HRESULT CurrentItemChange (\n        IDispatch * pdispMedia );\n    HRESULT MediaCollectionChange ( );\n    HRESULT MediaCollectionAttributeStringAdded (\n        _bstr_t bstrAttribName,\n        _bstr_t bstrAttribVal );\n    HRESULT MediaCollectionAttributeStringRemoved (\n        _bstr_t bstrAttribName,\n        _bstr_t bstrAttribVal );\n    HRESULT MediaCollectionAttributeStringChanged (\n        _bstr_t bstrAttribName,\n        _bstr_t bstrOldAttribVal,\n        _bstr_t bstrNewAttribVal );\n    HRESULT PlaylistCollectionChange ( );\n    HRESULT PlaylistCollectionPlaylistAdded (\n        _bstr_t bstrPlaylistName );\n    HRESULT PlaylistCollectionPlaylistRemoved (\n        _bstr_t bstrPlaylistName );\n    HRESULT PlaylistCollectionPlaylistSetAsDeleted (\n        _bstr_t bstrPlaylistName,\n        VARIANT_BOOL varfIsDeleted );\n    HRESULT ModeChange (\n        _bstr_t ModeName,\n        VARIANT_BOOL NewValue );\n    HRESULT MediaError (\n        IDispatch * pMediaObject );\n    HRESULT OpenPlaylistSwitch (\n        IDispatch * pItem );\n    HRESULT DomainChange (\n        _bstr_t strDomain );\n    HRESULT StringCollectionChange (\n        IDispatch * pdispStringCollection,\n        enum WMPStringCollectionChangeEventType change,\n        long lCollectionIndex );\n    HRESULT MediaCollectionMediaAdded (\n        IDispatch * pdispMedia );\n    HRESULT MediaCollectionMediaRemoved (\n        IDispatch * pdispMedia );\n};\n\nstruct __declspec(uuid(\"09428d37-e0b9-11d2-b147-00c04f79faa6\"))\nWMPCore;\n    // [ default ] interface IWMPCore3\n    // interface IWMPCore2\n    // interface IWMPCore\n    // interface IWMPControls\n    // interface IWMPPlaylist\n    // interface IWMPSettings\n    // interface IWMPMedia\n    // interface IWMPStringCollection\n    // interface IWMPMediaCollection\n    // interface IWMPPlaylistCollection\n    // interface IWMPCdromCollection\n    // interface IWMPCdrom\n    // interface IWMPErrorItem\n    // interface IWMPClosedCaption\n    // interface IWMPError\n    // interface IWMPDVD\n    // interface IWMPControls2\n    // interface IWMPMedia2\n    // interface IWMPMedia3\n    // interface IWMPMetadataPicture\n    // interface IWMPMetadataText\n    // interface IWMPSettings2\n    // interface IWMPControls3\n    // interface IWMPClosedCaption2\n    // [ default, source ] dispinterface _WMPCoreEvents\n\nstruct __declspec(uuid(\"6b550945-018f-11d3-b14a-00c04f79faa6\"))\nIWMPGraphEventHandler : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT NotifyGraphStateChange (\n        ULONG_PTR punkGraph,\n        long lGraphState );\n    HRESULT AsyncNotifyGraphStateChange (\n        ULONG_PTR punkGraph,\n        long lGraphState );\n    HRESULT NotifyRateChange (\n        ULONG_PTR punkGraph,\n        double dRate );\n    HRESULT NotifyPlaybackEnd (\n        ULONG_PTR punkGraph,\n        _bstr_t bstrQueuedUrl,\n        ULONG_PTR dwCurrentContext );\n    HRESULT NotifyStreamEnd (\n        ULONG_PTR punkGraph );\n    HRESULT NotifyScriptCommand (\n        ULONG_PTR punkGraph,\n        _bstr_t bstrCommand,\n        _bstr_t bstrParam );\n    HRESULT NotifyEarlyScriptCommand (\n        ULONG_PTR punkGraph,\n        _bstr_t bstrCommand,\n        _bstr_t bstrParam,\n        double dTime );\n    HRESULT NotifyMarkerHit (\n        ULONG_PTR punkGraph,\n        long lMarker );\n    HRESULT NotifyGraphError (\n        ULONG_PTR punkGraph,\n        long lErrMajor,\n        long lErrMinor,\n        long lCondition,\n        _bstr_t bstrInfo,\n        IUnknown * punkGraphData );\n    HRESULT NotifyAcquireCredentials (\n        ULONG_PTR punkGraph,\n        _bstr_t bstrRealm,\n        _bstr_t bstrSite,\n        _bstr_t bstrUser,\n        _bstr_t bstrPassword,\n        unsigned long * pdwFlags,\n        VARIANT_BOOL * pfCancel );\n    HRESULT NotifyUntrustedLicense (\n        ULONG_PTR punkGraph,\n        _bstr_t bstrURL,\n        VARIANT_BOOL * pfCancel );\n    HRESULT NotifyLicenseDialog (\n        ULONG_PTR punkGraph,\n        _bstr_t bstrURL,\n        _bstr_t bstrContent,\n        unsigned char * pPostData,\n        unsigned long dwPostDataSize,\n        long lResult );\n    HRESULT NotifyNeedsIndividualization (\n        ULONG_PTR punkGraph,\n        VARIANT_BOOL * pfResult );\n    HRESULT NotifyNewMetadata (\n        ULONG_PTR punkGraph );\n    HRESULT NotifyNewMediaCaps (\n        ULONG_PTR punkGraph );\n    HRESULT NotifyDisconnect (\n        ULONG_PTR punkGraph,\n        long lResult );\n    HRESULT NotifySave (\n        ULONG_PTR punkGraph,\n        long fStarted,\n        long lResult );\n    HRESULT NotifyDelayClose (\n        ULONG_PTR punkGraph,\n        VARIANT_BOOL fDelay );\n    HRESULT NotifyDVD (\n        ULONG_PTR punkGraph,\n        long lEventCode,\n        long lParam1,\n        long lParam2 );\n    HRESULT NotifyRequestAppThreadAction (\n        ULONG_PTR punkGraph,\n        unsigned long dwAction );\n    HRESULT NotifyPrerollReady (\n        ULONG_PTR punkGraph );\n    HRESULT NotifyNewIcons (\n        ULONG_PTR punkGraph );\n    HRESULT NotifyStepComplete (\n        ULONG_PTR punkGraph );\n    HRESULT NotifyNewBitrate (\n        ULONG_PTR punkGraph,\n        unsigned long dwBitrate );\n    HRESULT NotifyGraphCreationPreRender (\n        ULONG_PTR punkGraph,\n        ULONG_PTR punkFilterGraph,\n        ULONG_PTR punkCardeaEncConfig,\n        ULONG_PTR phrContinue,\n        ULONG_PTR hEventToSet );\n    HRESULT NotifyGraphCreationPostRender (\n        ULONG_PTR punkGraph,\n        ULONG_PTR punkFilterGraph,\n        ULONG_PTR phrContinue,\n        ULONG_PTR hEventToSet );\n    HRESULT NotifyGraphUserEvent (\n        ULONG_PTR punkGraph,\n        long EventCode );\n    HRESULT NotifyRevocation (\n        ULONG_PTR punkGraph,\n        VARIANT_BOOL * pfResult );\n    HRESULT NotifyNeedsWMGraphIndividualization (\n        ULONG_PTR punkGraph,\n        ULONG_PTR phWnd,\n        ULONG_PTR hIndivEvent,\n        VARIANT_BOOL * pfCancel,\n        VARIANT_BOOL * pfResult );\n    HRESULT NotifyNeedsFullscreen (\n        ULONG_PTR punkGraph );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_NotifyGraphStateChange (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ long lGraphState ) = 0;\n      virtual HRESULT __stdcall raw_AsyncNotifyGraphStateChange (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ long lGraphState ) = 0;\n      virtual HRESULT __stdcall raw_NotifyRateChange (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ double dRate ) = 0;\n      virtual HRESULT __stdcall raw_NotifyPlaybackEnd (\n        /*[in]*/ ULONG_PTR punkGraph,\n        BSTR bstrQueuedUrl,\n        ULONG_PTR dwCurrentContext ) = 0;\n      virtual HRESULT __stdcall raw_NotifyStreamEnd (\n        /*[in]*/ ULONG_PTR punkGraph ) = 0;\n      virtual HRESULT __stdcall raw_NotifyScriptCommand (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ BSTR bstrCommand,\n        /*[in]*/ BSTR bstrParam ) = 0;\n      virtual HRESULT __stdcall raw_NotifyEarlyScriptCommand (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ BSTR bstrCommand,\n        /*[in]*/ BSTR bstrParam,\n        /*[in]*/ double dTime ) = 0;\n      virtual HRESULT __stdcall raw_NotifyMarkerHit (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ long lMarker ) = 0;\n      virtual HRESULT __stdcall raw_NotifyGraphError (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ long lErrMajor,\n        /*[in]*/ long lErrMinor,\n        /*[in]*/ long lCondition,\n        /*[in]*/ BSTR bstrInfo,\n        /*[in]*/ IUnknown * punkGraphData ) = 0;\n      virtual HRESULT __stdcall raw_NotifyAcquireCredentials (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ BSTR bstrRealm,\n        /*[in]*/ BSTR bstrSite,\n        /*[in,out]*/ BSTR bstrUser,\n        /*[in,out]*/ BSTR bstrPassword,\n        /*[in,out]*/ unsigned long * pdwFlags,\n        /*[out]*/ VARIANT_BOOL * pfCancel ) = 0;\n      virtual HRESULT __stdcall raw_NotifyUntrustedLicense (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ BSTR bstrURL,\n        /*[out]*/ VARIANT_BOOL * pfCancel ) = 0;\n      virtual HRESULT __stdcall raw_NotifyLicenseDialog (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ BSTR bstrURL,\n        /*[in]*/ BSTR bstrContent,\n        /*[in]*/ unsigned char * pPostData,\n        /*[in]*/ unsigned long dwPostDataSize,\n        /*[in]*/ long lResult ) = 0;\n      virtual HRESULT __stdcall raw_NotifyNeedsIndividualization (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[out]*/ VARIANT_BOOL * pfResult ) = 0;\n      virtual HRESULT __stdcall raw_NotifyNewMetadata (\n        /*[in]*/ ULONG_PTR punkGraph ) = 0;\n      virtual HRESULT __stdcall raw_NotifyNewMediaCaps (\n        /*[in]*/ ULONG_PTR punkGraph ) = 0;\n      virtual HRESULT __stdcall raw_NotifyDisconnect (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ long lResult ) = 0;\n      virtual HRESULT __stdcall raw_NotifySave (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ long fStarted,\n        /*[in]*/ long lResult ) = 0;\n      virtual HRESULT __stdcall raw_NotifyDelayClose (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ VARIANT_BOOL fDelay ) = 0;\n      virtual HRESULT __stdcall raw_NotifyDVD (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ long lEventCode,\n        /*[in]*/ long lParam1,\n        /*[in]*/ long lParam2 ) = 0;\n      virtual HRESULT __stdcall raw_NotifyRequestAppThreadAction (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ unsigned long dwAction ) = 0;\n      virtual HRESULT __stdcall raw_NotifyPrerollReady (\n        /*[in]*/ ULONG_PTR punkGraph ) = 0;\n      virtual HRESULT __stdcall raw_NotifyNewIcons (\n        /*[in]*/ ULONG_PTR punkGraph ) = 0;\n      virtual HRESULT __stdcall raw_NotifyStepComplete (\n        /*[in]*/ ULONG_PTR punkGraph ) = 0;\n      virtual HRESULT __stdcall raw_NotifyNewBitrate (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ unsigned long dwBitrate ) = 0;\n      virtual HRESULT __stdcall raw_NotifyGraphCreationPreRender (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ ULONG_PTR punkFilterGraph,\n        /*[in]*/ ULONG_PTR punkCardeaEncConfig,\n        /*[in]*/ ULONG_PTR phrContinue,\n        /*[in]*/ ULONG_PTR hEventToSet ) = 0;\n      virtual HRESULT __stdcall raw_NotifyGraphCreationPostRender (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ ULONG_PTR punkFilterGraph,\n        /*[in]*/ ULONG_PTR phrContinue,\n        /*[in]*/ ULONG_PTR hEventToSet ) = 0;\n      virtual HRESULT __stdcall raw_NotifyGraphUserEvent (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ long EventCode ) = 0;\n      virtual HRESULT __stdcall raw_NotifyRevocation (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[out]*/ VARIANT_BOOL * pfResult ) = 0;\n      virtual HRESULT __stdcall raw_NotifyNeedsWMGraphIndividualization (\n        /*[in]*/ ULONG_PTR punkGraph,\n        /*[in]*/ ULONG_PTR phWnd,\n        /*[in]*/ ULONG_PTR hIndivEvent,\n        /*[out]*/ VARIANT_BOOL * pfCancel,\n        /*[out]*/ VARIANT_BOOL * pfResult ) = 0;\n      virtual HRESULT __stdcall raw_NotifyNeedsFullscreen (\n        /*[in]*/ ULONG_PTR punkGraph ) = 0;\n};\n\nstruct __declspec(uuid(\"f8578bfa-cd8f-4ce1-a684-5b7e85fca7dc\"))\nIBattery : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetpresetCount))\n    long presetCount;\n    __declspec(property(get=Getpreset))\n    IDispatchPtr preset[];\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long GetpresetCount ( );\n    IDispatchPtr Getpreset (\n        long nIndex );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_presetCount (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_preset (\n        /*[in]*/ long nIndex,\n        /*[out,retval]*/ IDispatch * * ppDispatch ) = 0;\n};\n\nstruct __declspec(uuid(\"40c6bde7-9c90-49d4-ad20-bef81a6c5f22\"))\nIBatteryPreset : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Gettitle,put=Puttitle))\n    _bstr_t title;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t Gettitle ( );\n    void Puttitle (\n        _bstr_t pVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_title (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_title (\n        /*[in]*/ BSTR pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"f85e2d65-207d-48db-84b1-915e1735db17\"))\nIBatteryRandomPreset : IBatteryPreset\n{};\n\nstruct __declspec(uuid(\"876e7208-0172-4ebb-b08b-2e1d30dfe44c\"))\nIBatterySavedPreset : IBatteryPreset\n{};\n\nstruct __declspec(uuid(\"33e9291a-f6a9-11d2-9435-00a0c92a2f2d\"))\nIBarsEffect : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetdisplayMode,put=PutdisplayMode))\n    long displayMode;\n    __declspec(property(get=GetshowPeaks,put=PutshowPeaks))\n    VARIANT_BOOL showPeaks;\n    __declspec(property(get=GetpeakHangTime,put=PutpeakHangTime))\n    long peakHangTime;\n    __declspec(property(get=GetpeakFallbackAcceleration,put=PutpeakFallbackAcceleration))\n    float peakFallbackAcceleration;\n    __declspec(property(get=GetpeakFallbackSpeed,put=PutpeakFallbackSpeed))\n    float peakFallbackSpeed;\n    __declspec(property(get=GetlevelFallbackAcceleration,put=PutlevelFallbackAcceleration))\n    float levelFallbackAcceleration;\n    __declspec(property(get=GetlevelFallbackSpeed,put=PutlevelFallbackSpeed))\n    float levelFallbackSpeed;\n    __declspec(property(get=GetbackgroundColor,put=PutbackgroundColor))\n    _bstr_t backgroundColor;\n    __declspec(property(get=GetlevelColor,put=PutlevelColor))\n    _bstr_t levelColor;\n    __declspec(property(get=GetpeakColor,put=PutpeakColor))\n    _bstr_t peakColor;\n    __declspec(property(get=GethorizontalSpacing,put=PuthorizontalSpacing))\n    long horizontalSpacing;\n    __declspec(property(get=GetlevelWidth,put=PutlevelWidth))\n    long levelWidth;\n    __declspec(property(get=GetlevelScale,put=PutlevelScale))\n    float levelScale;\n    __declspec(property(get=GetfadeRate,put=PutfadeRate))\n    long fadeRate;\n    __declspec(property(get=GetfadeMode,put=PutfadeMode))\n    long fadeMode;\n    __declspec(property(get=Gettransparent,put=Puttransparent))\n    VARIANT_BOOL transparent;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long GetdisplayMode ( );\n    void PutdisplayMode (\n        long pVal );\n    VARIANT_BOOL GetshowPeaks ( );\n    void PutshowPeaks (\n        VARIANT_BOOL pVal );\n    long GetpeakHangTime ( );\n    void PutpeakHangTime (\n        long pVal );\n    float GetpeakFallbackAcceleration ( );\n    void PutpeakFallbackAcceleration (\n        float pVal );\n    float GetpeakFallbackSpeed ( );\n    void PutpeakFallbackSpeed (\n        float pVal );\n    float GetlevelFallbackAcceleration ( );\n    void PutlevelFallbackAcceleration (\n        float pVal );\n    float GetlevelFallbackSpeed ( );\n    void PutlevelFallbackSpeed (\n        float pVal );\n    _bstr_t GetbackgroundColor ( );\n    void PutbackgroundColor (\n        _bstr_t pVal );\n    _bstr_t GetlevelColor ( );\n    void PutlevelColor (\n        _bstr_t pVal );\n    _bstr_t GetpeakColor ( );\n    void PutpeakColor (\n        _bstr_t pVal );\n    long GethorizontalSpacing ( );\n    void PuthorizontalSpacing (\n        long pVal );\n    long GetlevelWidth ( );\n    void PutlevelWidth (\n        long pVal );\n    float GetlevelScale ( );\n    void PutlevelScale (\n        float pVal );\n    long GetfadeRate ( );\n    void PutfadeRate (\n        long pVal );\n    long GetfadeMode ( );\n    void PutfadeMode (\n        long pVal );\n    VARIANT_BOOL Gettransparent ( );\n    void Puttransparent (\n        VARIANT_BOOL pVal );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_displayMode (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_displayMode (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_showPeaks (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_showPeaks (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_peakHangTime (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_peakHangTime (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_peakFallbackAcceleration (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_peakFallbackAcceleration (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_peakFallbackSpeed (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_peakFallbackSpeed (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_levelFallbackAcceleration (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_levelFallbackAcceleration (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_levelFallbackSpeed (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_levelFallbackSpeed (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_levelColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_levelColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_peakColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_peakColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_horizontalSpacing (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_horizontalSpacing (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_levelWidth (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_levelWidth (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_levelScale (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_levelScale (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_fadeRate (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_fadeRate (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_fadeMode (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_fadeMode (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_transparent (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_transparent (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n};\n\nstruct __declspec(uuid(\"e2cc638c-fd2c-409b-a1ea-5ddb72dc8e84\"))\nIWMPExternal : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(put=PutOnColorChange))\n    IDispatchPtr OnColorChange;\n    __declspec(property(get=Getversion))\n    _bstr_t version;\n    __declspec(property(get=GetappColorLight))\n    _bstr_t appColorLight;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t Getversion ( );\n    _bstr_t GetappColorLight ( );\n    void PutOnColorChange (\n        IDispatch * _arg1 );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_version (\n        /*[out,retval]*/ BSTR * pBSTR ) = 0;\n      virtual HRESULT __stdcall get_appColorLight (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_OnColorChange (\n        /*[in]*/ IDispatch * _arg1 ) = 0;\n};\n\nstruct __declspec(uuid(\"d10ccdff-472d-498c-b5fe-3630e5405e0a\"))\nIWMPExternalColors : IWMPExternal\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetappColorButtonShadow))\n    _bstr_t appColorButtonShadow;\n    __declspec(property(get=GetappColorButtonHoverFace))\n    _bstr_t appColorButtonHoverFace;\n    __declspec(property(get=GetappColorMedium))\n    _bstr_t appColorMedium;\n    __declspec(property(get=GetappColorDark))\n    _bstr_t appColorDark;\n    __declspec(property(get=GetappColorButtonHighlight))\n    _bstr_t appColorButtonHighlight;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetappColorMedium ( );\n    _bstr_t GetappColorDark ( );\n    _bstr_t GetappColorButtonHighlight ( );\n    _bstr_t GetappColorButtonShadow ( );\n    _bstr_t GetappColorButtonHoverFace ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_appColorMedium (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_appColorDark (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_appColorButtonHighlight (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_appColorButtonShadow (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_appColorButtonHoverFace (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n};\n\nstruct __declspec(uuid(\"54df358e-cf38-4010-99f1-f44b0e9000e5\"))\nIWMPSubscriptionServiceLimited : IWMPExternalColors\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetSelectedTaskPane,put=PutSelectedTaskPane))\n    _bstr_t SelectedTaskPane;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT NavigateTaskPaneURL (\n        _bstr_t bstrKeyName,\n        _bstr_t bstrTaskPane,\n        _bstr_t bstrParams );\n    void PutSelectedTaskPane (\n        _bstr_t bstrTaskPane );\n    _bstr_t GetSelectedTaskPane ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_NavigateTaskPaneURL (\n        /*[in]*/ BSTR bstrKeyName,\n        /*[in]*/ BSTR bstrTaskPane,\n        /*[in]*/ BSTR bstrParams ) = 0;\n      virtual HRESULT __stdcall put_SelectedTaskPane (\n        /*[in]*/ BSTR bstrTaskPane ) = 0;\n      virtual HRESULT __stdcall get_SelectedTaskPane (\n        /*[out,retval]*/ BSTR * bstrTaskPane ) = 0;\n};\n\nenum WMPSubscriptionDownloadState\n{\n    wmpsdlsDownloading = 0,\n    wmpsdlsPaused = 1,\n    wmpsdlsProcessing = 2,\n    wmpsdlsCompleted = 3,\n    wmpsdlsCancelled = 4\n};\n\nstruct __declspec(uuid(\"c9470e8e-3f6b-46a9-a0a9-452815c34297\"))\nIWMPDownloadItem : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetsourceURL))\n    _bstr_t sourceURL;\n    __declspec(property(get=Getsize))\n    long size;\n    __declspec(property(get=Gettype))\n    _bstr_t type;\n    __declspec(property(get=Getprogress))\n    long progress;\n    __declspec(property(get=GetdownloadState))\n    enum WMPSubscriptionDownloadState downloadState;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetsourceURL ( );\n    long Getsize ( );\n    _bstr_t Gettype ( );\n    long Getprogress ( );\n    enum WMPSubscriptionDownloadState GetdownloadState ( );\n    HRESULT pause ( );\n    HRESULT resume ( );\n    HRESULT cancel ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_sourceURL (\n        /*[out,retval]*/ BSTR * pbstrURL ) = 0;\n      virtual HRESULT __stdcall get_size (\n        /*[out,retval]*/ long * plSize ) = 0;\n      virtual HRESULT __stdcall get_type (\n        /*[out,retval]*/ BSTR * pbstrType ) = 0;\n      virtual HRESULT __stdcall get_progress (\n        /*[out,retval]*/ long * plProgress ) = 0;\n      virtual HRESULT __stdcall get_downloadState (\n        /*[out,retval]*/ enum WMPSubscriptionDownloadState * pwmpsdls ) = 0;\n      virtual HRESULT __stdcall raw_pause ( ) = 0;\n      virtual HRESULT __stdcall raw_resume ( ) = 0;\n      virtual HRESULT __stdcall raw_cancel ( ) = 0;\n};\n\nstruct __declspec(uuid(\"9fbb3336-6da3-479d-b8ff-67d46e20a987\"))\nIWMPDownloadItem2 : IWMPDownloadItem\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t getItemInfo (\n        _bstr_t bstrItemName );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_getItemInfo (\n        /*[in]*/ BSTR bstrItemName,\n        /*[out,retval]*/ BSTR * pbstrVal ) = 0;\n};\n\nstruct __declspec(uuid(\"0a319c7f-85f9-436c-b88e-82fd88000e1c\"))\nIWMPDownloadCollection : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetID))\n    long ID;\n    __declspec(property(get=Getcount))\n    long count;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long GetID ( );\n    long Getcount ( );\n    IWMPDownloadItem2Ptr Item (\n        long lItem );\n    IWMPDownloadItem2Ptr startDownload (\n        _bstr_t bstrSourceURL,\n        _bstr_t bstrType );\n    HRESULT removeItem (\n        long lItem );\n    HRESULT clear ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_ID (\n        /*[out,retval]*/ long * plId ) = 0;\n      virtual HRESULT __stdcall get_count (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_Item (\n        /*[in]*/ long lItem,\n        /*[out,retval]*/ struct IWMPDownloadItem2 * * ppDownload ) = 0;\n      virtual HRESULT __stdcall raw_startDownload (\n        /*[in]*/ BSTR bstrSourceURL,\n        /*[in]*/ BSTR bstrType,\n        /*[out,retval]*/ struct IWMPDownloadItem2 * * ppDownload ) = 0;\n      virtual HRESULT __stdcall raw_removeItem (\n        /*[in]*/ long lItem ) = 0;\n      virtual HRESULT __stdcall raw_clear ( ) = 0;\n};\n\nstruct __declspec(uuid(\"e15e9ad1-8f20-4cc4-9ec7-1a328ca86a0d\"))\nIWMPDownloadManager : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    IWMPDownloadCollectionPtr getDownloadCollection (\n        long lCollectionId );\n    IWMPDownloadCollectionPtr createDownloadCollection ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_getDownloadCollection (\n        /*[in]*/ long lCollectionId,\n        /*[out,retval]*/ struct IWMPDownloadCollection * * ppCollection ) = 0;\n      virtual HRESULT __stdcall raw_createDownloadCollection (\n        /*[out,retval]*/ struct IWMPDownloadCollection * * ppCollection ) = 0;\n};\n\nstruct __declspec(uuid(\"2e922378-ee70-4ceb-bbab-ce7ce4a04816\"))\nIWMPSubscriptionServiceExternal : IWMPSubscriptionServiceLimited\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetDownloadManager))\n    IWMPDownloadManagerPtr DownloadManager;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    IWMPDownloadManagerPtr GetDownloadManager ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_DownloadManager (\n        /*[out,retval]*/ struct IWMPDownloadManager * * ppDownloadMgr ) = 0;\n};\n\nstruct __declspec(uuid(\"5f0248c1-62b3-42d7-b927-029119e6ad14\"))\nIWMPSubscriptionServicePlayMedia : IWMPSubscriptionServiceLimited\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT playMedia (\n        _bstr_t bstrURL );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_playMedia (\n        /*[in]*/ BSTR bstrURL ) = 0;\n};\n\nstruct __declspec(uuid(\"a915cea2-72df-41e1-a576-ef0bae5e5169\"))\nIWMPDiscoExternal : IWMPSubscriptionServiceExternal\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(put=PutOnSendMessageComplete))\n    IDispatchPtr OnSendMessageComplete;\n    __declspec(property(put=PutignoreIEHistory))\n    VARIANT_BOOL ignoreIEHistory;\n    __declspec(property(get=GetpluginRunning))\n    VARIANT_BOOL pluginRunning;\n    __declspec(property(get=GettemplateBeingDisplayedInLocalLibrary))\n    VARIANT_BOOL templateBeingDisplayedInLocalLibrary;\n    __declspec(property(put=PutOnChangeViewError))\n    IDispatchPtr OnChangeViewError;\n    __declspec(property(put=PutOnChangeViewOnlineListError))\n    IDispatchPtr OnChangeViewOnlineListError;\n    __declspec(property(put=PutOnLoginChange))\n    IDispatchPtr OnLoginChange;\n    __declspec(property(get=GetuserLoggedIn))\n    VARIANT_BOOL userLoggedIn;\n    __declspec(property(get=GetaccountType))\n    _bstr_t accountType;\n    __declspec(property(put=PutOnViewChange))\n    IDispatchPtr OnViewChange;\n    __declspec(property(get=GetlibraryLocationType))\n    _bstr_t libraryLocationType;\n    __declspec(property(get=GetlibraryLocationID))\n    _bstr_t libraryLocationID;\n    __declspec(property(get=GetselectedItemType))\n    _bstr_t selectedItemType;\n    __declspec(property(get=GetselectedItemID))\n    _bstr_t selectedItemID;\n    __declspec(property(get=Getfilter))\n    _bstr_t filter;\n    __declspec(property(get=Gettask))\n    _bstr_t task;\n    __declspec(property(get=GetviewParameters))\n    _bstr_t viewParameters;\n    __declspec(property(get=GetbasketTitle))\n    _bstr_t basketTitle;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    void PutOnLoginChange (\n        IDispatch * _arg1 );\n    VARIANT_BOOL GetuserLoggedIn ( );\n    HRESULT attemptLogin ( );\n    _bstr_t GetaccountType ( );\n    void PutOnViewChange (\n        IDispatch * _arg1 );\n    HRESULT changeView (\n        _bstr_t bstrLibraryLocationType,\n        _bstr_t bstrLibraryLocationID,\n        _bstr_t bstrFilter,\n        _bstr_t bstrViewParams );\n    HRESULT changeViewOnlineList (\n        _bstr_t bstrLibraryLocationType,\n        _bstr_t bstrLibraryLocationID,\n        _bstr_t bstrParams,\n        _bstr_t bstrFriendlyName,\n        _bstr_t bstrListType,\n        _bstr_t bstrViewMode );\n    _bstr_t GetlibraryLocationType ( );\n    _bstr_t GetlibraryLocationID ( );\n    _bstr_t GetselectedItemType ( );\n    _bstr_t GetselectedItemID ( );\n    _bstr_t Getfilter ( );\n    _bstr_t Gettask ( );\n    _bstr_t GetviewParameters ( );\n    HRESULT cancelNavigate ( );\n    HRESULT showPopup (\n        long lPopupIndex,\n        _bstr_t bstrParameters );\n    HRESULT addToBasket (\n        _bstr_t bstrViewType,\n        _bstr_t bstrViewIDs );\n    _bstr_t GetbasketTitle ( );\n    HRESULT play (\n        _bstr_t bstrLibraryLocationType,\n        _bstr_t bstrLibraryLocationIDs );\n    HRESULT download (\n        _bstr_t bstrViewType,\n        _bstr_t bstrViewIDs );\n    HRESULT buy (\n        _bstr_t bstrViewType,\n        _bstr_t bstrViewIDs );\n    HRESULT saveCurrentViewToLibrary (\n        _bstr_t bstrFriendlyListType,\n        VARIANT_BOOL fDynamic );\n    HRESULT authenticate (\n        long lAuthenticationIndex );\n    HRESULT sendMessage (\n        _bstr_t bstrMsg,\n        _bstr_t bstrParam );\n    void PutOnSendMessageComplete (\n        IDispatch * _arg1 );\n    void PutignoreIEHistory (\n        VARIANT_BOOL _arg1 );\n    VARIANT_BOOL GetpluginRunning ( );\n    VARIANT_BOOL GettemplateBeingDisplayedInLocalLibrary ( );\n    void PutOnChangeViewError (\n        IDispatch * _arg1 );\n    void PutOnChangeViewOnlineListError (\n        IDispatch * _arg1 );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall put_OnLoginChange (\n        /*[in]*/ IDispatch * _arg1 ) = 0;\n      virtual HRESULT __stdcall get_userLoggedIn (\n        /*[out,retval]*/ VARIANT_BOOL * pvbLoggedIn ) = 0;\n      virtual HRESULT __stdcall raw_attemptLogin ( ) = 0;\n      virtual HRESULT __stdcall get_accountType (\n        /*[out,retval]*/ BSTR * pbstrAcctType ) = 0;\n      virtual HRESULT __stdcall put_OnViewChange (\n        /*[in]*/ IDispatch * _arg1 ) = 0;\n      virtual HRESULT __stdcall raw_changeView (\n        /*[in]*/ BSTR bstrLibraryLocationType,\n        /*[in]*/ BSTR bstrLibraryLocationID,\n        /*[in]*/ BSTR bstrFilter,\n        /*[in]*/ BSTR bstrViewParams ) = 0;\n      virtual HRESULT __stdcall raw_changeViewOnlineList (\n        /*[in]*/ BSTR bstrLibraryLocationType,\n        /*[in]*/ BSTR bstrLibraryLocationID,\n        /*[in]*/ BSTR bstrParams,\n        /*[in]*/ BSTR bstrFriendlyName,\n        /*[in]*/ BSTR bstrListType,\n        /*[in]*/ BSTR bstrViewMode ) = 0;\n      virtual HRESULT __stdcall get_libraryLocationType (\n        /*[out,retval]*/ BSTR * pbstrLibraryLocationType ) = 0;\n      virtual HRESULT __stdcall get_libraryLocationID (\n        /*[out,retval]*/ BSTR * pbstrLibraryLocationID ) = 0;\n      virtual HRESULT __stdcall get_selectedItemType (\n        /*[out,retval]*/ BSTR * pbstrSelectedItemType ) = 0;\n      virtual HRESULT __stdcall get_selectedItemID (\n        /*[out,retval]*/ BSTR * pbstrLibraryLocationID ) = 0;\n      virtual HRESULT __stdcall get_filter (\n        /*[out,retval]*/ BSTR * pbstrFilter ) = 0;\n      virtual HRESULT __stdcall get_task (\n        /*[out,retval]*/ BSTR * pbstrTask ) = 0;\n      virtual HRESULT __stdcall get_viewParameters (\n        /*[out,retval]*/ BSTR * pbstrViewParameters ) = 0;\n      virtual HRESULT __stdcall raw_cancelNavigate ( ) = 0;\n      virtual HRESULT __stdcall raw_showPopup (\n        /*[in]*/ long lPopupIndex,\n        /*[in]*/ BSTR bstrParameters ) = 0;\n      virtual HRESULT __stdcall raw_addToBasket (\n        /*[in]*/ BSTR bstrViewType,\n        /*[in]*/ BSTR bstrViewIDs ) = 0;\n      virtual HRESULT __stdcall get_basketTitle (\n        /*[out,retval]*/ BSTR * bstrParams ) = 0;\n      virtual HRESULT __stdcall raw_play (\n        /*[in]*/ BSTR bstrLibraryLocationType,\n        /*[in]*/ BSTR bstrLibraryLocationIDs ) = 0;\n      virtual HRESULT __stdcall raw_download (\n        /*[in]*/ BSTR bstrViewType,\n        /*[in]*/ BSTR bstrViewIDs ) = 0;\n      virtual HRESULT __stdcall raw_buy (\n        /*[in]*/ BSTR bstrViewType,\n        /*[in]*/ BSTR bstrViewIDs ) = 0;\n      virtual HRESULT __stdcall raw_saveCurrentViewToLibrary (\n        /*[in]*/ BSTR bstrFriendlyListType,\n        /*[in]*/ VARIANT_BOOL fDynamic ) = 0;\n      virtual HRESULT __stdcall raw_authenticate (\n        /*[in]*/ long lAuthenticationIndex ) = 0;\n      virtual HRESULT __stdcall raw_sendMessage (\n        /*[in]*/ BSTR bstrMsg,\n        /*[in]*/ BSTR bstrParam ) = 0;\n      virtual HRESULT __stdcall put_OnSendMessageComplete (\n        /*[in]*/ IDispatch * _arg1 ) = 0;\n      virtual HRESULT __stdcall put_ignoreIEHistory (\n        /*[in]*/ VARIANT_BOOL _arg1 ) = 0;\n      virtual HRESULT __stdcall get_pluginRunning (\n        /*[out,retval]*/ VARIANT_BOOL * pfPluginRunning ) = 0;\n      virtual HRESULT __stdcall get_templateBeingDisplayedInLocalLibrary (\n        /*[out,retval]*/ VARIANT_BOOL * pfTemplateDisplayed ) = 0;\n      virtual HRESULT __stdcall put_OnChangeViewError (\n        /*[in]*/ IDispatch * _arg1 ) = 0;\n      virtual HRESULT __stdcall put_OnChangeViewOnlineListError (\n        /*[in]*/ IDispatch * _arg1 ) = 0;\n};\n\nenum WMP_WRITENAMESEX_TYPE\n{\n    WMP_WRITENAMES_TYPE_CD_BY_TOC = 0,\n    WMP_WRITENAMES_TYPE_CD_BY_CONTENT_ID = 1,\n    WMP_WRITENAMES_TYPE_CD_BY_MDQCD = 2,\n    WMP_WRITENAMES_TYPE_DVD_BY_DVDID = 3\n};\n\nstruct __declspec(uuid(\"2d7ef888-1d3c-484a-a906-9f49d99bb344\"))\nIWMPCDDVDWizardExternal : IWMPExternalColors\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT WriteNames (\n        _bstr_t bstrTOC,\n        _bstr_t bstrMetadata );\n    HRESULT ReturnToMainTask ( );\n    HRESULT WriteNamesEx (\n        enum WMP_WRITENAMESEX_TYPE type,\n        _bstr_t bstrTypeId,\n        _bstr_t bstrMetadata,\n        VARIANT_BOOL fRenameRegroupFiles );\n    _bstr_t GetMDQByRequestID (\n        _bstr_t bstrRequestID );\n    HRESULT EditMetadata ( );\n    VARIANT_BOOL IsMetadataAvailableForEdit ( );\n    HRESULT BuyCD (\n        _bstr_t bstrTitle,\n        _bstr_t bstrArtist,\n        _bstr_t bstrAlbum,\n        _bstr_t bstrUFID,\n        _bstr_t bstrWMID );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_WriteNames (\n        /*[in]*/ BSTR bstrTOC,\n        /*[in]*/ BSTR bstrMetadata ) = 0;\n      virtual HRESULT __stdcall raw_ReturnToMainTask ( ) = 0;\n      virtual HRESULT __stdcall raw_WriteNamesEx (\n        /*[in]*/ enum WMP_WRITENAMESEX_TYPE type,\n        /*[in]*/ BSTR bstrTypeId,\n        /*[in]*/ BSTR bstrMetadata,\n        /*[in]*/ VARIANT_BOOL fRenameRegroupFiles ) = 0;\n      virtual HRESULT __stdcall raw_GetMDQByRequestID (\n        /*[in]*/ BSTR bstrRequestID,\n        /*[out,retval]*/ BSTR * pbstrMDQ ) = 0;\n      virtual HRESULT __stdcall raw_EditMetadata ( ) = 0;\n      virtual HRESULT __stdcall raw_IsMetadataAvailableForEdit (\n        /*[out,retval]*/ VARIANT_BOOL * pbIsAvailable ) = 0;\n      virtual HRESULT __stdcall raw_BuyCD (\n        /*[in]*/ BSTR bstrTitle,\n        /*[in]*/ BSTR bstrArtist,\n        /*[in]*/ BSTR bstrAlbum,\n        /*[in]*/ BSTR bstrUFID,\n        /*[in]*/ BSTR bstrWMID ) = 0;\n};\n\nstruct __declspec(uuid(\"f81b2a59-02bc-4003-8b2f-c124af66fc66\"))\nIWMPBaseExternal : IWMPExternal\n{};\n\nstruct __declspec(uuid(\"3148e685-b243-423d-8341-8480d6eff674\"))\nIWMPOfflineExternal : IWMPExternal\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT forceOnline ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_forceOnline ( ) = 0;\n};\n\nstruct __declspec(uuid(\"4e195db1-9e29-47fc-9ce1-de9937d32925\"))\nIWMPDMRAVTransportService : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetTransportState))\n    _bstr_t TransportState;\n    __declspec(property(get=GetTransportStatus))\n    _bstr_t TransportStatus;\n    __declspec(property(get=GetPlaybackStorageMedium))\n    _bstr_t PlaybackStorageMedium;\n    __declspec(property(get=GetRecordStorageMedium))\n    _bstr_t RecordStorageMedium;\n    __declspec(property(get=GetPossiblePlaybackStorageMedia))\n    _bstr_t PossiblePlaybackStorageMedia;\n    __declspec(property(get=GetPossibleRecordStorageMedia))\n    _bstr_t PossibleRecordStorageMedia;\n    __declspec(property(get=GetCurrentPlayMode))\n    _bstr_t CurrentPlayMode;\n    __declspec(property(get=GetTransportPlaySpeed))\n    _bstr_t TransportPlaySpeed;\n    __declspec(property(get=GetRecordMediumWriteStatus))\n    _bstr_t RecordMediumWriteStatus;\n    __declspec(property(get=GetCurrentRecordQualityMode))\n    _bstr_t CurrentRecordQualityMode;\n    __declspec(property(get=GetPossibleRecordQualityModes))\n    _bstr_t PossibleRecordQualityModes;\n    __declspec(property(get=GetNumberOfTracks))\n    unsigned long NumberOfTracks;\n    __declspec(property(get=GetCurrentTrack))\n    unsigned long CurrentTrack;\n    __declspec(property(get=GetCurrentTrackDuration))\n    _bstr_t CurrentTrackDuration;\n    __declspec(property(get=GetCurrentMediaDuration))\n    _bstr_t CurrentMediaDuration;\n    __declspec(property(get=GetCurrentTrackMetaData))\n    _bstr_t CurrentTrackMetaData;\n    __declspec(property(get=GetCurrentTrackURI))\n    _bstr_t CurrentTrackURI;\n    __declspec(property(get=GetAVTransportURI))\n    _bstr_t AVTransportURI;\n    __declspec(property(get=GetAVTransportURIMetaData))\n    _bstr_t AVTransportURIMetaData;\n    __declspec(property(get=GetNextAVTransportURI))\n    _bstr_t NextAVTransportURI;\n    __declspec(property(get=GetNextAVTransportURIMetaData))\n    _bstr_t NextAVTransportURIMetaData;\n    __declspec(property(get=GetRelativeTimePosition))\n    _bstr_t RelativeTimePosition;\n    __declspec(property(get=GetAbsoluteTimePosition))\n    _bstr_t AbsoluteTimePosition;\n    __declspec(property(get=GetRelativeCounterPosition))\n    long RelativeCounterPosition;\n    __declspec(property(get=GetAbsoluteCounterPosition))\n    long AbsoluteCounterPosition;\n    __declspec(property(get=GetCurrentTransportActions))\n    _bstr_t CurrentTransportActions;\n    __declspec(property(get=GetLastChange))\n    _bstr_t LastChange;\n    __declspec(property(get=GetA_ARG_TYPE_SeekMode))\n    _bstr_t A_ARG_TYPE_SeekMode;\n    __declspec(property(get=GetA_ARG_TYPE_SeekTarget))\n    _bstr_t A_ARG_TYPE_SeekTarget;\n    __declspec(property(get=GetA_ARG_TYPE_InstanceID))\n    unsigned long A_ARG_TYPE_InstanceID;\n    __declspec(property(get=GetCurrentProtocolInfo))\n    _bstr_t CurrentProtocolInfo;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetTransportState ( );\n    _bstr_t GetTransportStatus ( );\n    _bstr_t GetPlaybackStorageMedium ( );\n    _bstr_t GetRecordStorageMedium ( );\n    _bstr_t GetPossiblePlaybackStorageMedia ( );\n    _bstr_t GetPossibleRecordStorageMedia ( );\n    _bstr_t GetCurrentPlayMode ( );\n    _bstr_t GetTransportPlaySpeed ( );\n    _bstr_t GetRecordMediumWriteStatus ( );\n    _bstr_t GetCurrentRecordQualityMode ( );\n    _bstr_t GetPossibleRecordQualityModes ( );\n    unsigned long GetNumberOfTracks ( );\n    unsigned long GetCurrentTrack ( );\n    _bstr_t GetCurrentTrackDuration ( );\n    _bstr_t GetCurrentMediaDuration ( );\n    _bstr_t GetCurrentTrackMetaData ( );\n    _bstr_t GetCurrentTrackURI ( );\n    _bstr_t GetAVTransportURI ( );\n    _bstr_t GetAVTransportURIMetaData ( );\n    _bstr_t GetNextAVTransportURI ( );\n    _bstr_t GetNextAVTransportURIMetaData ( );\n    _bstr_t GetRelativeTimePosition ( );\n    _bstr_t GetAbsoluteTimePosition ( );\n    long GetRelativeCounterPosition ( );\n    long GetAbsoluteCounterPosition ( );\n    _bstr_t GetCurrentTransportActions ( );\n    _bstr_t GetLastChange ( );\n    _bstr_t GetA_ARG_TYPE_SeekMode ( );\n    _bstr_t GetA_ARG_TYPE_SeekTarget ( );\n    unsigned long GetA_ARG_TYPE_InstanceID ( );\n    _bstr_t GetCurrentProtocolInfo ( );\n    HRESULT SetAVTransportURI (\n        IUnknown * punkRemoteEndpointInfo,\n        unsigned long ulInstanceID,\n        _bstr_t bstrCurrentURI,\n        _bstr_t bstrCurrentURIMetaData );\n    HRESULT GetMediaInfo (\n        unsigned long ulInstanceID,\n        unsigned long * pulNumTracks,\n        BSTR * pbstrMediaDuration,\n        BSTR * pbstrCurrentURI,\n        BSTR * pbstrCurrentURIMetaData,\n        BSTR * pbstrNextURI,\n        BSTR * pNextURIMetaData,\n        BSTR * pbstrPlayMedium,\n        BSTR * pbstrRecordMedium,\n        BSTR * pbstrWriteStatus );\n    HRESULT GetTransportInfo (\n        unsigned long ulInstanceID,\n        BSTR * pbstrCurrentTransportState,\n        BSTR * pbstrCurrentTransportStatus,\n        BSTR * pbstrCurrentSpeed );\n    HRESULT GetPositionInfo (\n        unsigned long ulInstanceID,\n        unsigned long * pTrack,\n        BSTR * pbstrTrackDuration,\n        BSTR * pbstrTrackMetaData,\n        BSTR * pbstrTrackURI,\n        BSTR * pbstrRelTime,\n        BSTR * pbstrAbsTime,\n        long * plRelCount,\n        long * plAbsCount );\n    HRESULT GetDeviceCapabilities (\n        unsigned long ulInstanceID,\n        BSTR * pbstrPlayMedia,\n        BSTR * pbstrRecMedia,\n        BSTR * pbstrRecQualityModes );\n    HRESULT GetTransportSettings (\n        unsigned long ulInstanceID,\n        BSTR * pbstrPlayMode,\n        BSTR * pbstrRecQualityMode );\n    HRESULT stop (\n        unsigned long ulInstanceID );\n    HRESULT play (\n        unsigned long ulInstanceID,\n        _bstr_t bstrSpeed );\n    HRESULT pause (\n        unsigned long ulInstanceID );\n    HRESULT Seek (\n        unsigned long ulInstanceID,\n        _bstr_t bstrUnit,\n        _bstr_t bstrTarget );\n    HRESULT next (\n        unsigned long ulInstanceID );\n    HRESULT previous (\n        unsigned long ulInstanceID );\n    HRESULT GetCurrentTransportActions (\n        unsigned long ulInstanceID,\n        BSTR * pbstrActions );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_TransportState (\n        /*[out,retval]*/ BSTR * pbstrTransportState ) = 0;\n      virtual HRESULT __stdcall get_TransportStatus (\n        /*[out,retval]*/ BSTR * pbstrTransportStatus ) = 0;\n      virtual HRESULT __stdcall get_PlaybackStorageMedium (\n        /*[out,retval]*/ BSTR * pbstrPlaybackStorageMedium ) = 0;\n      virtual HRESULT __stdcall get_RecordStorageMedium (\n        /*[out,retval]*/ BSTR * pbstrRecordStorageMedium ) = 0;\n      virtual HRESULT __stdcall get_PossiblePlaybackStorageMedia (\n        /*[out,retval]*/ BSTR * pbstrPossiblePlaybackStorageMedia ) = 0;\n      virtual HRESULT __stdcall get_PossibleRecordStorageMedia (\n        /*[out,retval]*/ BSTR * pbstrPossibleRecordStorageMedia ) = 0;\n      virtual HRESULT __stdcall get_CurrentPlayMode (\n        /*[out,retval]*/ BSTR * pbstrCurrentPlayMode ) = 0;\n      virtual HRESULT __stdcall get_TransportPlaySpeed (\n        /*[out,retval]*/ BSTR * pbstrTransportPlaySpeed ) = 0;\n      virtual HRESULT __stdcall get_RecordMediumWriteStatus (\n        /*[out,retval]*/ BSTR * pbstrRecordMediumWriteStatus ) = 0;\n      virtual HRESULT __stdcall get_CurrentRecordQualityMode (\n        /*[out,retval]*/ BSTR * pbstrCurrentRecordQualityMode ) = 0;\n      virtual HRESULT __stdcall get_PossibleRecordQualityModes (\n        /*[out,retval]*/ BSTR * pbstrPossibleRecordQualityModes ) = 0;\n      virtual HRESULT __stdcall get_NumberOfTracks (\n        /*[out,retval]*/ unsigned long * pulNumberOfTracks ) = 0;\n      virtual HRESULT __stdcall get_CurrentTrack (\n        /*[out,retval]*/ unsigned long * pulCurrentTrack ) = 0;\n      virtual HRESULT __stdcall get_CurrentTrackDuration (\n        /*[out,retval]*/ BSTR * pbstrCurrentTrackDuration ) = 0;\n      virtual HRESULT __stdcall get_CurrentMediaDuration (\n        /*[out,retval]*/ BSTR * pbstrCurrentMediaDuration ) = 0;\n      virtual HRESULT __stdcall get_CurrentTrackMetaData (\n        /*[out,retval]*/ BSTR * pbstrCurrentTrackMetaData ) = 0;\n      virtual HRESULT __stdcall get_CurrentTrackURI (\n        /*[out,retval]*/ BSTR * pbstrCurrentTrackURI ) = 0;\n      virtual HRESULT __stdcall get_AVTransportURI (\n        /*[out,retval]*/ BSTR * pbstrAVTransportURI ) = 0;\n      virtual HRESULT __stdcall get_AVTransportURIMetaData (\n        /*[out,retval]*/ BSTR * pbstrAVTransportURIMetaData ) = 0;\n      virtual HRESULT __stdcall get_NextAVTransportURI (\n        /*[out,retval]*/ BSTR * pbstrNextAVTransportURI ) = 0;\n      virtual HRESULT __stdcall get_NextAVTransportURIMetaData (\n        /*[out,retval]*/ BSTR * pbstrNextAVTransportURIMetaData ) = 0;\n      virtual HRESULT __stdcall get_RelativeTimePosition (\n        /*[out,retval]*/ BSTR * pRelativeTimePosition ) = 0;\n      virtual HRESULT __stdcall get_AbsoluteTimePosition (\n        /*[out,retval]*/ BSTR * pbstrAbsoluteTimePosition ) = 0;\n      virtual HRESULT __stdcall get_RelativeCounterPosition (\n        /*[out,retval]*/ long * plRelativeCounterPosition ) = 0;\n      virtual HRESULT __stdcall get_AbsoluteCounterPosition (\n        /*[out,retval]*/ long * plAbsoluteCounterPosition ) = 0;\n      virtual HRESULT __stdcall get_CurrentTransportActions (\n        /*[out,retval]*/ BSTR * pbstrCurrentTransportActions ) = 0;\n      virtual HRESULT __stdcall get_LastChange (\n        /*[out,retval]*/ BSTR * pbstrLastChange ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_SeekMode (\n        /*[out,retval]*/ BSTR * pbstrSeekMode ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_SeekTarget (\n        /*[out,retval]*/ BSTR * pbstrSeekTarget ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_InstanceID (\n        /*[out,retval]*/ unsigned long * pulInstanceID ) = 0;\n      virtual HRESULT __stdcall get_CurrentProtocolInfo (\n        /*[out,retval]*/ BSTR * pstrProtocolInfo ) = 0;\n      virtual HRESULT __stdcall raw_SetAVTransportURI (\n        /*[in]*/ IUnknown * punkRemoteEndpointInfo,\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[in]*/ BSTR bstrCurrentURI,\n        /*[in]*/ BSTR bstrCurrentURIMetaData ) = 0;\n      virtual HRESULT __stdcall raw_GetMediaInfo (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[out]*/ unsigned long * pulNumTracks,\n        /*[out]*/ BSTR * pbstrMediaDuration,\n        /*[out]*/ BSTR * pbstrCurrentURI,\n        /*[out]*/ BSTR * pbstrCurrentURIMetaData,\n        /*[out]*/ BSTR * pbstrNextURI,\n        /*[out]*/ BSTR * pNextURIMetaData,\n        /*[out]*/ BSTR * pbstrPlayMedium,\n        /*[out]*/ BSTR * pbstrRecordMedium,\n        /*[out]*/ BSTR * pbstrWriteStatus ) = 0;\n      virtual HRESULT __stdcall raw_GetTransportInfo (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[out]*/ BSTR * pbstrCurrentTransportState,\n        /*[out]*/ BSTR * pbstrCurrentTransportStatus,\n        /*[out]*/ BSTR * pbstrCurrentSpeed ) = 0;\n      virtual HRESULT __stdcall raw_GetPositionInfo (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[out]*/ unsigned long * pTrack,\n        /*[out]*/ BSTR * pbstrTrackDuration,\n        /*[out]*/ BSTR * pbstrTrackMetaData,\n        /*[out]*/ BSTR * pbstrTrackURI,\n        /*[out]*/ BSTR * pbstrRelTime,\n        /*[out]*/ BSTR * pbstrAbsTime,\n        /*[out]*/ long * plRelCount,\n        /*[out]*/ long * plAbsCount ) = 0;\n      virtual HRESULT __stdcall raw_GetDeviceCapabilities (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[out]*/ BSTR * pbstrPlayMedia,\n        /*[out]*/ BSTR * pbstrRecMedia,\n        /*[out]*/ BSTR * pbstrRecQualityModes ) = 0;\n      virtual HRESULT __stdcall raw_GetTransportSettings (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[out]*/ BSTR * pbstrPlayMode,\n        /*[out]*/ BSTR * pbstrRecQualityMode ) = 0;\n      virtual HRESULT __stdcall raw_stop (\n        /*[in]*/ unsigned long ulInstanceID ) = 0;\n      virtual HRESULT __stdcall raw_play (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[in]*/ BSTR bstrSpeed ) = 0;\n      virtual HRESULT __stdcall raw_pause (\n        /*[in]*/ unsigned long ulInstanceID ) = 0;\n      virtual HRESULT __stdcall raw_Seek (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[in]*/ BSTR bstrUnit,\n        /*[in]*/ BSTR bstrTarget ) = 0;\n      virtual HRESULT __stdcall raw_next (\n        /*[in]*/ unsigned long ulInstanceID ) = 0;\n      virtual HRESULT __stdcall raw_previous (\n        /*[in]*/ unsigned long ulInstanceID ) = 0;\n      virtual HRESULT __stdcall raw_GetCurrentTransportActions (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[in,out]*/ BSTR * pbstrActions ) = 0;\n};\n\nstruct __declspec(uuid(\"fb61cd38-8de7-4479-8b76-a8d097c20c70\"))\nIWMPDMRConnectionManagerService : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetSourceProtocolInfo))\n    _bstr_t SourceProtocolInfo;\n    __declspec(property(get=GetSinkProtocolInfo))\n    _bstr_t SinkProtocolInfo;\n    __declspec(property(get=GetCurrentConnectionIDs))\n    _bstr_t CurrentConnectionIDs;\n    __declspec(property(get=GetA_ARG_TYPE_ConnectionStatus))\n    _bstr_t A_ARG_TYPE_ConnectionStatus;\n    __declspec(property(get=GetA_ARG_TYPE_ConnectionManager))\n    _bstr_t A_ARG_TYPE_ConnectionManager;\n    __declspec(property(get=GetA_ARG_TYPE_Direction))\n    _bstr_t A_ARG_TYPE_Direction;\n    __declspec(property(get=GetA_ARG_TYPE_ProtocolInfo))\n    _bstr_t A_ARG_TYPE_ProtocolInfo;\n    __declspec(property(get=GetA_ARG_TYPE_ConnectionID))\n    long A_ARG_TYPE_ConnectionID;\n    __declspec(property(get=GetA_ARG_TYPE_AVTransportID))\n    long A_ARG_TYPE_AVTransportID;\n    __declspec(property(get=GetA_ARG_TYPE_RcsID))\n    long A_ARG_TYPE_RcsID;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetSourceProtocolInfo ( );\n    _bstr_t GetSinkProtocolInfo ( );\n    _bstr_t GetCurrentConnectionIDs ( );\n    _bstr_t GetA_ARG_TYPE_ConnectionStatus ( );\n    _bstr_t GetA_ARG_TYPE_ConnectionManager ( );\n    _bstr_t GetA_ARG_TYPE_Direction ( );\n    _bstr_t GetA_ARG_TYPE_ProtocolInfo ( );\n    long GetA_ARG_TYPE_ConnectionID ( );\n    long GetA_ARG_TYPE_AVTransportID ( );\n    long GetA_ARG_TYPE_RcsID ( );\n    HRESULT GetProtocolInfo (\n        BSTR * pbstrSource,\n        BSTR * pbstrSink );\n    HRESULT GetCurrentConnectionIDs (\n        BSTR * pbstrConnectionIDs );\n    HRESULT GetCurrentConnectionInfo (\n        long lConnectionID,\n        long * plResID,\n        long * plAVTransportID,\n        BSTR * pbstrProtocolInfo,\n        BSTR * pbstrPeerConnectionManager,\n        long * plPeerConnectionID,\n        BSTR * pbstrDirection,\n        BSTR * pbstrStatus );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_SourceProtocolInfo (\n        /*[out,retval]*/ BSTR * pbstrSourceProtocolInfo ) = 0;\n      virtual HRESULT __stdcall get_SinkProtocolInfo (\n        /*[out,retval]*/ BSTR * pbstrSinkProtocolInfo ) = 0;\n      virtual HRESULT __stdcall get_CurrentConnectionIDs (\n        /*[out,retval]*/ BSTR * pbstrCurrentConnectionIDs ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_ConnectionStatus (\n        /*[out,retval]*/ BSTR * pbstrA_ARG_TYPE_ConnectionStatus ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_ConnectionManager (\n        /*[out,retval]*/ BSTR * pbstrA_ARG_TYPE_ConnectionManager ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_Direction (\n        /*[out,retval]*/ BSTR * pbstrA_ARG_TYPE_Direction ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_ProtocolInfo (\n        /*[out,retval]*/ BSTR * pbstrA_ARG_TYPE_ProtocolInfo ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_ConnectionID (\n        /*[out,retval]*/ long * plA_ARG_TYPE_ConnectionID ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_AVTransportID (\n        /*[out,retval]*/ long * plA_ARG_TYPE_AVTransportID ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_RcsID (\n        /*[out,retval]*/ long * plA_ARG_TYPE_RcsID ) = 0;\n      virtual HRESULT __stdcall raw_GetProtocolInfo (\n        /*[in,out]*/ BSTR * pbstrSource,\n        /*[in,out]*/ BSTR * pbstrSink ) = 0;\n      virtual HRESULT __stdcall raw_GetCurrentConnectionIDs (\n        /*[in,out]*/ BSTR * pbstrConnectionIDs ) = 0;\n      virtual HRESULT __stdcall raw_GetCurrentConnectionInfo (\n        /*[in]*/ long lConnectionID,\n        /*[in,out]*/ long * plResID,\n        /*[in,out]*/ long * plAVTransportID,\n        /*[in,out]*/ BSTR * pbstrProtocolInfo,\n        /*[in,out]*/ BSTR * pbstrPeerConnectionManager,\n        /*[in,out]*/ long * plPeerConnectionID,\n        /*[in,out]*/ BSTR * pbstrDirection,\n        /*[in,out]*/ BSTR * pbstrStatus ) = 0;\n};\n\nstruct __declspec(uuid(\"ff4b1bda-19f0-42cf-8dda-19162950c543\"))\nIWMPDMRRenderingControlService : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetLastChange))\n    _bstr_t LastChange;\n    __declspec(property(get=GetPresetNameList))\n    _bstr_t PresetNameList;\n    __declspec(property(get=Getmute))\n    VARIANT_BOOL mute;\n    __declspec(property(get=Getvolume))\n    unsigned short volume;\n    __declspec(property(get=GetA_ARG_TYPE_Channel))\n    _bstr_t A_ARG_TYPE_Channel;\n    __declspec(property(get=GetA_ARG_TYPE_InstanceID))\n    unsigned long A_ARG_TYPE_InstanceID;\n    __declspec(property(get=GetA_ARG_TYPE_PresetName))\n    _bstr_t A_ARG_TYPE_PresetName;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetLastChange ( );\n    _bstr_t GetPresetNameList ( );\n    VARIANT_BOOL Getmute ( );\n    unsigned short Getvolume ( );\n    _bstr_t GetA_ARG_TYPE_Channel ( );\n    unsigned long GetA_ARG_TYPE_InstanceID ( );\n    _bstr_t GetA_ARG_TYPE_PresetName ( );\n    HRESULT ListPresets (\n        unsigned long ulInstanceID,\n        BSTR * pbstrCurrentPresetList );\n    HRESULT SelectPreset (\n        unsigned long ulInstanceID,\n        _bstr_t bstrPresetName );\n    HRESULT GetMute (\n        unsigned long ulInstanceID,\n        _bstr_t bstrChannel,\n        VARIANT_BOOL * pbCurrentMute );\n    HRESULT SetMute (\n        unsigned long ulInstanceID,\n        _bstr_t bstrChannel,\n        VARIANT_BOOL bDesiredMute );\n    HRESULT GetVolume (\n        unsigned long ulInstanceID,\n        _bstr_t bstrChannel,\n        unsigned short * puiCurrentVolume );\n    HRESULT SetVolume (\n        unsigned long ulInstanceID,\n        _bstr_t bstrChannel,\n        unsigned short uiDesiredVolume );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_LastChange (\n        /*[out,retval]*/ BSTR * pbstrLastChange ) = 0;\n      virtual HRESULT __stdcall get_PresetNameList (\n        /*[out,retval]*/ BSTR * pbstrPresetNameList ) = 0;\n      virtual HRESULT __stdcall get_mute (\n        /*[out,retval]*/ VARIANT_BOOL * pbMute ) = 0;\n      virtual HRESULT __stdcall get_volume (\n        /*[out,retval]*/ unsigned short * puiVolume ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_Channel (\n        /*[out,retval]*/ BSTR * pbstrA_ARG_TYPE_Channel ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_InstanceID (\n        /*[out,retval]*/ unsigned long * pulA_ARG_TYPE_InstanceID ) = 0;\n      virtual HRESULT __stdcall get_A_ARG_TYPE_PresetName (\n        /*[out,retval]*/ BSTR * pbstrA_ARG_TYPE_PresetName ) = 0;\n      virtual HRESULT __stdcall raw_ListPresets (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[in,out]*/ BSTR * pbstrCurrentPresetList ) = 0;\n      virtual HRESULT __stdcall raw_SelectPreset (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[in]*/ BSTR bstrPresetName ) = 0;\n      virtual HRESULT __stdcall raw_GetMute (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[in]*/ BSTR bstrChannel,\n        /*[in,out]*/ VARIANT_BOOL * pbCurrentMute ) = 0;\n      virtual HRESULT __stdcall raw_SetMute (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[in]*/ BSTR bstrChannel,\n        /*[in]*/ VARIANT_BOOL bDesiredMute ) = 0;\n      virtual HRESULT __stdcall raw_GetVolume (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[in]*/ BSTR bstrChannel,\n        /*[in,out]*/ unsigned short * puiCurrentVolume ) = 0;\n      virtual HRESULT __stdcall raw_SetVolume (\n        /*[in]*/ unsigned long ulInstanceID,\n        /*[in]*/ BSTR bstrChannel,\n        /*[in]*/ unsigned short uiDesiredVolume ) = 0;\n};\n\nstruct __declspec(uuid(\"1f504270-a66b-4223-8e96-26a06c63d69f\"))\nIWMPEvents3 : IWMPEvents2\n{\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual void __stdcall CdromRipStateChange (\n        /*[in]*/ struct IWMPCdromRip * pCdromRip,\n        /*[in]*/ enum WMPRipState wmprs ) = 0;\n      virtual void __stdcall CdromRipMediaError (\n        /*[in]*/ struct IWMPCdromRip * pCdromRip,\n        /*[in]*/ IDispatch * pMedia ) = 0;\n      virtual void __stdcall CdromBurnStateChange (\n        /*[in]*/ struct IWMPCdromBurn * pCdromBurn,\n        /*[in]*/ enum WMPBurnState wmpbs ) = 0;\n      virtual void __stdcall CdromBurnMediaError (\n        /*[in]*/ struct IWMPCdromBurn * pCdromBurn,\n        /*[in]*/ IDispatch * pMedia ) = 0;\n      virtual void __stdcall CdromBurnError (\n        /*[in]*/ struct IWMPCdromBurn * pCdromBurn,\n        /*[in]*/ HRESULT hrError ) = 0;\n      virtual void __stdcall LibraryConnect (\n        /*[in]*/ struct IWMPLibrary * pLibrary ) = 0;\n      virtual void __stdcall LibraryDisconnect (\n        /*[in]*/ struct IWMPLibrary * pLibrary ) = 0;\n      virtual void __stdcall FolderScanStateChange (\n        /*[in]*/ enum WMPFolderScanState wmpfss ) = 0;\n      virtual void __stdcall StringCollectionChange (\n        /*[in]*/ IDispatch * pdispStringCollection,\n        /*[in]*/ enum WMPStringCollectionChangeEventType change,\n        /*[in]*/ long lCollectionIndex ) = 0;\n      virtual void __stdcall MediaCollectionMediaAdded (\n        /*[in]*/ IDispatch * pdispMedia ) = 0;\n      virtual void __stdcall MediaCollectionMediaRemoved (\n        /*[in]*/ IDispatch * pdispMedia ) = 0;\n};\n\nstruct __declspec(uuid(\"26dabcfa-306b-404d-9a6f-630a8405048d\"))\nIWMPEvents4 : IWMPEvents3\n{\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual void __stdcall DeviceEstimation (\n        /*[in]*/ struct IWMPSyncDevice * pDevice,\n        /*[in]*/ HRESULT hrResult,\n        /*[in]*/ __int64 qwEstimatedUsedSpace,\n        /*[in]*/ __int64 qwEstimatedSpace ) = 0;\n};\n\nstruct __declspec(uuid(\"bd94dbeb-417f-4928-aa06-087d56ed9b59\"))\nIWMPCdromBurn : IUnknown\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getlabel,put=Putlabel))\n    _bstr_t label;\n    __declspec(property(get=GetburnFormat,put=PutburnFormat))\n    enum WMPBurnFormat burnFormat;\n    __declspec(property(get=GetburnPlaylist,put=PutburnPlaylist))\n    IWMPPlaylistPtr burnPlaylist;\n    __declspec(property(get=GetburnState))\n    enum WMPBurnState burnState;\n    __declspec(property(get=GetburnProgress))\n    long burnProgress;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL isAvailable (\n        _bstr_t bstrItem );\n    _bstr_t getItemInfo (\n        _bstr_t bstrItem );\n    _bstr_t Getlabel ( );\n    void Putlabel (\n        _bstr_t pbstrLabel );\n    enum WMPBurnFormat GetburnFormat ( );\n    void PutburnFormat (\n        enum WMPBurnFormat pwmpbf );\n    IWMPPlaylistPtr GetburnPlaylist ( );\n    void PutburnPlaylist (\n        struct IWMPPlaylist * ppPlaylist );\n    HRESULT refreshStatus ( );\n    enum WMPBurnState GetburnState ( );\n    long GetburnProgress ( );\n    HRESULT startBurn ( );\n    HRESULT stopBurn ( );\n    HRESULT erase ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_isAvailable (\n        /*[in]*/ BSTR bstrItem,\n        /*[out,retval]*/ VARIANT_BOOL * pIsAvailable ) = 0;\n      virtual HRESULT __stdcall raw_getItemInfo (\n        /*[in]*/ BSTR bstrItem,\n        /*[out,retval]*/ BSTR * pbstrVal ) = 0;\n      virtual HRESULT __stdcall get_label (\n        /*[out,retval]*/ BSTR * pbstrLabel ) = 0;\n      virtual HRESULT __stdcall put_label (\n        /*[in]*/ BSTR pbstrLabel ) = 0;\n      virtual HRESULT __stdcall get_burnFormat (\n        /*[out,retval]*/ enum WMPBurnFormat * pwmpbf ) = 0;\n      virtual HRESULT __stdcall put_burnFormat (\n        /*[in]*/ enum WMPBurnFormat pwmpbf ) = 0;\n      virtual HRESULT __stdcall get_burnPlaylist (\n        /*[out,retval]*/ struct IWMPPlaylist * * ppPlaylist ) = 0;\n      virtual HRESULT __stdcall put_burnPlaylist (\n        /*[in]*/ struct IWMPPlaylist * ppPlaylist ) = 0;\n      virtual HRESULT __stdcall raw_refreshStatus ( ) = 0;\n      virtual HRESULT __stdcall get_burnState (\n        /*[out,retval]*/ enum WMPBurnState * pwmpbs ) = 0;\n      virtual HRESULT __stdcall get_burnProgress (\n        /*[out,retval]*/ long * plProgress ) = 0;\n      virtual HRESULT __stdcall raw_startBurn ( ) = 0;\n      virtual HRESULT __stdcall raw_stopBurn ( ) = 0;\n      virtual HRESULT __stdcall raw_erase ( ) = 0;\n};\n\nstruct __declspec(uuid(\"d5f0f4f1-130c-11d3-b14e-00c04f79faa6\"))\nIWMPPlaylist : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getcount))\n    long count;\n    __declspec(property(get=Getname,put=Putname))\n    _bstr_t name;\n    __declspec(property(get=GetattributeCount))\n    long attributeCount;\n    __declspec(property(get=GetattributeName))\n    _bstr_t attributeName[];\n    __declspec(property(get=GetisIdentical))\n    VARIANT_BOOL isIdentical[];\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long Getcount ( );\n    _bstr_t Getname ( );\n    void Putname (\n        _bstr_t pbstrName );\n    long GetattributeCount ( );\n    _bstr_t GetattributeName (\n        long lIndex );\n    IWMPMediaPtr GetItem (\n        long lIndex );\n    _bstr_t getItemInfo (\n        _bstr_t bstrName );\n    HRESULT setItemInfo (\n        _bstr_t bstrName,\n        _bstr_t bstrValue );\n    VARIANT_BOOL GetisIdentical (\n        struct IWMPPlaylist * pIWMPPlaylist );\n    HRESULT clear ( );\n    HRESULT insertItem (\n        long lIndex,\n        struct IWMPMedia * pIWMPMedia );\n    HRESULT appendItem (\n        struct IWMPMedia * pIWMPMedia );\n    HRESULT removeItem (\n        struct IWMPMedia * pIWMPMedia );\n    HRESULT moveItem (\n        long lIndexOld,\n        long lIndexNew );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_count (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall get_name (\n        /*[out,retval]*/ BSTR * pbstrName ) = 0;\n      virtual HRESULT __stdcall put_name (\n        /*[in]*/ BSTR pbstrName ) = 0;\n      virtual HRESULT __stdcall get_attributeCount (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall get_attributeName (\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ BSTR * pbstrAttributeName ) = 0;\n      virtual HRESULT __stdcall get_Item (\n        long lIndex,\n        /*[out,retval]*/ struct IWMPMedia * * ppIWMPMedia ) = 0;\n      virtual HRESULT __stdcall raw_getItemInfo (\n        /*[in]*/ BSTR bstrName,\n        /*[out,retval]*/ BSTR * pbstrVal ) = 0;\n      virtual HRESULT __stdcall raw_setItemInfo (\n        /*[in]*/ BSTR bstrName,\n        /*[in]*/ BSTR bstrValue ) = 0;\n      virtual HRESULT __stdcall get_isIdentical (\n        /*[in]*/ struct IWMPPlaylist * pIWMPPlaylist,\n        /*[out,retval]*/ VARIANT_BOOL * pvbool ) = 0;\n      virtual HRESULT __stdcall raw_clear ( ) = 0;\n      virtual HRESULT __stdcall raw_insertItem (\n        /*[in]*/ long lIndex,\n        /*[in]*/ struct IWMPMedia * pIWMPMedia ) = 0;\n      virtual HRESULT __stdcall raw_appendItem (\n        /*[in]*/ struct IWMPMedia * pIWMPMedia ) = 0;\n      virtual HRESULT __stdcall raw_removeItem (\n        /*[in]*/ struct IWMPMedia * pIWMPMedia ) = 0;\n      virtual HRESULT __stdcall raw_moveItem (\n        long lIndexOld,\n        long lIndexNew ) = 0;\n};\n\nstruct __declspec(uuid(\"94d55e95-3fac-11d3-b155-00c04f79faa6\"))\nIWMPMedia : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetsourceURL))\n    _bstr_t sourceURL;\n    __declspec(property(get=GetimageSourceWidth))\n    long imageSourceWidth;\n    __declspec(property(get=GetimageSourceHeight))\n    long imageSourceHeight;\n    __declspec(property(get=GetmarkerCount))\n    long markerCount;\n    __declspec(property(get=Getduration))\n    double duration;\n    __declspec(property(get=GetdurationString))\n    _bstr_t durationString;\n    __declspec(property(get=GetattributeCount))\n    long attributeCount;\n    __declspec(property(get=GetisIdentical))\n    VARIANT_BOOL isIdentical[];\n    __declspec(property(get=Getname,put=Putname))\n    _bstr_t name;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL GetisIdentical (\n        struct IWMPMedia * pIWMPMedia );\n    _bstr_t GetsourceURL ( );\n    _bstr_t Getname ( );\n    void Putname (\n        _bstr_t pbstrName );\n    long GetimageSourceWidth ( );\n    long GetimageSourceHeight ( );\n    long GetmarkerCount ( );\n    double getMarkerTime (\n        long MarkerNum );\n    _bstr_t getMarkerName (\n        long MarkerNum );\n    double Getduration ( );\n    _bstr_t GetdurationString ( );\n    long GetattributeCount ( );\n    _bstr_t getAttributeName (\n        long lIndex );\n    _bstr_t getItemInfo (\n        _bstr_t bstrItemName );\n    HRESULT setItemInfo (\n        _bstr_t bstrItemName,\n        _bstr_t bstrVal );\n    _bstr_t getItemInfoByAtom (\n        long lAtom );\n    VARIANT_BOOL isMemberOf (\n        struct IWMPPlaylist * pPlaylist );\n    VARIANT_BOOL isReadOnlyItem (\n        _bstr_t bstrItemName );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_isIdentical (\n        /*[in]*/ struct IWMPMedia * pIWMPMedia,\n        /*[out,retval]*/ VARIANT_BOOL * pvbool ) = 0;\n      virtual HRESULT __stdcall get_sourceURL (\n        /*[out,retval]*/ BSTR * pbstrSourceURL ) = 0;\n      virtual HRESULT __stdcall get_name (\n        /*[out,retval]*/ BSTR * pbstrName ) = 0;\n      virtual HRESULT __stdcall put_name (\n        /*[in]*/ BSTR pbstrName ) = 0;\n      virtual HRESULT __stdcall get_imageSourceWidth (\n        /*[out,retval]*/ long * pWidth ) = 0;\n      virtual HRESULT __stdcall get_imageSourceHeight (\n        /*[out,retval]*/ long * pHeight ) = 0;\n      virtual HRESULT __stdcall get_markerCount (\n        /*[out,retval]*/ long * pMarkerCount ) = 0;\n      virtual HRESULT __stdcall raw_getMarkerTime (\n        /*[in]*/ long MarkerNum,\n        /*[out,retval]*/ double * pMarkerTime ) = 0;\n      virtual HRESULT __stdcall raw_getMarkerName (\n        /*[in]*/ long MarkerNum,\n        /*[out,retval]*/ BSTR * pbstrMarkerName ) = 0;\n      virtual HRESULT __stdcall get_duration (\n        /*[out,retval]*/ double * pDuration ) = 0;\n      virtual HRESULT __stdcall get_durationString (\n        /*[out,retval]*/ BSTR * pbstrDuration ) = 0;\n      virtual HRESULT __stdcall get_attributeCount (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_getAttributeName (\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ BSTR * pbstrItemName ) = 0;\n      virtual HRESULT __stdcall raw_getItemInfo (\n        /*[in]*/ BSTR bstrItemName,\n        /*[out,retval]*/ BSTR * pbstrVal ) = 0;\n      virtual HRESULT __stdcall raw_setItemInfo (\n        /*[in]*/ BSTR bstrItemName,\n        /*[in]*/ BSTR bstrVal ) = 0;\n      virtual HRESULT __stdcall raw_getItemInfoByAtom (\n        /*[in]*/ long lAtom,\n        /*[out,retval]*/ BSTR * pbstrVal ) = 0;\n      virtual HRESULT __stdcall raw_isMemberOf (\n        /*[in]*/ struct IWMPPlaylist * pPlaylist,\n        /*[out,retval]*/ VARIANT_BOOL * pvarfIsMemberOf ) = 0;\n      virtual HRESULT __stdcall raw_isReadOnlyItem (\n        /*[in]*/ BSTR bstrItemName,\n        /*[out,retval]*/ VARIANT_BOOL * pvarfIsReadOnly ) = 0;\n};\n\nstruct __declspec(uuid(\"8363bc22-b4b4-4b19-989d-1cd765749dd1\"))\nIWMPMediaCollection : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    IWMPMediaPtr add (\n        _bstr_t bstrURL );\n    IWMPPlaylistPtr getAll ( );\n    IWMPPlaylistPtr getByName (\n        _bstr_t bstrName );\n    IWMPPlaylistPtr getByGenre (\n        _bstr_t bstrGenre );\n    IWMPPlaylistPtr getByAuthor (\n        _bstr_t bstrAuthor );\n    IWMPPlaylistPtr getByAlbum (\n        _bstr_t bstrAlbum );\n    IWMPPlaylistPtr getByAttribute (\n        _bstr_t bstrAttribute,\n        _bstr_t bstrValue );\n    HRESULT remove (\n        struct IWMPMedia * pItem,\n        VARIANT_BOOL varfDeleteFile );\n    IWMPStringCollectionPtr getAttributeStringCollection (\n        _bstr_t bstrAttribute,\n        _bstr_t bstrMediaType );\n    long getMediaAtom (\n        _bstr_t bstrItemName );\n    HRESULT setDeleted (\n        struct IWMPMedia * pItem,\n        VARIANT_BOOL varfIsDeleted );\n    VARIANT_BOOL isDeleted (\n        struct IWMPMedia * pItem );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_add (\n        /*[in]*/ BSTR bstrURL,\n        /*[out,retval]*/ struct IWMPMedia * * ppItem ) = 0;\n      virtual HRESULT __stdcall raw_getAll (\n        /*[out,retval]*/ struct IWMPPlaylist * * ppMediaItems ) = 0;\n      virtual HRESULT __stdcall raw_getByName (\n        /*[in]*/ BSTR bstrName,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppMediaItems ) = 0;\n      virtual HRESULT __stdcall raw_getByGenre (\n        /*[in]*/ BSTR bstrGenre,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppMediaItems ) = 0;\n      virtual HRESULT __stdcall raw_getByAuthor (\n        /*[in]*/ BSTR bstrAuthor,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppMediaItems ) = 0;\n      virtual HRESULT __stdcall raw_getByAlbum (\n        /*[in]*/ BSTR bstrAlbum,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppMediaItems ) = 0;\n      virtual HRESULT __stdcall raw_getByAttribute (\n        /*[in]*/ BSTR bstrAttribute,\n        /*[in]*/ BSTR bstrValue,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppMediaItems ) = 0;\n      virtual HRESULT __stdcall raw_remove (\n        /*[in]*/ struct IWMPMedia * pItem,\n        /*[in]*/ VARIANT_BOOL varfDeleteFile ) = 0;\n      virtual HRESULT __stdcall raw_getAttributeStringCollection (\n        /*[in]*/ BSTR bstrAttribute,\n        /*[in]*/ BSTR bstrMediaType,\n        /*[out,retval]*/ struct IWMPStringCollection * * ppStringCollection ) = 0;\n      virtual HRESULT __stdcall raw_getMediaAtom (\n        /*[in]*/ BSTR bstrItemName,\n        /*[out,retval]*/ long * plAtom ) = 0;\n      virtual HRESULT __stdcall raw_setDeleted (\n        /*[in]*/ struct IWMPMedia * pItem,\n        /*[in]*/ VARIANT_BOOL varfIsDeleted ) = 0;\n      virtual HRESULT __stdcall raw_isDeleted (\n        /*[in]*/ struct IWMPMedia * pItem,\n        /*[out,retval]*/ VARIANT_BOOL * pvarfIsDeleted ) = 0;\n};\n\nstruct __declspec(uuid(\"3df47861-7df1-4c1f-a81b-4c26f0f7a7c6\"))\nIWMPLibrary : IUnknown\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getname))\n    _bstr_t name;\n    __declspec(property(get=Gettype))\n    enum WMPLibraryType type;\n    __declspec(property(get=GetmediaCollection))\n    IWMPMediaCollectionPtr mediaCollection;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t Getname ( );\n    enum WMPLibraryType Gettype ( );\n    IWMPMediaCollectionPtr GetmediaCollection ( );\n    VARIANT_BOOL isIdentical (\n        struct IWMPLibrary * pIWMPLibrary );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_name (\n        /*[out,retval]*/ BSTR * pbstrName ) = 0;\n      virtual HRESULT __stdcall get_type (\n        /*[out,retval]*/ enum WMPLibraryType * pwmplt ) = 0;\n      virtual HRESULT __stdcall get_mediaCollection (\n        /*[out,retval]*/ struct IWMPMediaCollection * * ppIWMPMediaCollection ) = 0;\n      virtual HRESULT __stdcall raw_isIdentical (\n        /*[in]*/ struct IWMPLibrary * pIWMPLibrary,\n        /*[out,retval]*/ VARIANT_BOOL * pvbool ) = 0;\n};\n\nstruct __declspec(uuid(\"74c09e02-f828-11d2-a74b-00a0c905f36e\"))\nIWMPControls : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetcurrentPosition,put=PutcurrentPosition))\n    double currentPosition;\n    __declspec(property(get=GetcurrentPositionString))\n    _bstr_t currentPositionString;\n    __declspec(property(get=GetcurrentItem,put=PutcurrentItem))\n    IWMPMediaPtr currentItem;\n    __declspec(property(get=GetcurrentMarker,put=PutcurrentMarker))\n    long currentMarker;\n    __declspec(property(get=GetisAvailable))\n    VARIANT_BOOL isAvailable[];\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL GetisAvailable (\n        _bstr_t bstrItem );\n    HRESULT play ( );\n    HRESULT stop ( );\n    HRESULT pause ( );\n    HRESULT fastForward ( );\n    HRESULT fastReverse ( );\n    double GetcurrentPosition ( );\n    void PutcurrentPosition (\n        double pdCurrentPosition );\n    _bstr_t GetcurrentPositionString ( );\n    HRESULT next ( );\n    HRESULT previous ( );\n    IWMPMediaPtr GetcurrentItem ( );\n    void PutcurrentItem (\n        struct IWMPMedia * ppIWMPMedia );\n    long GetcurrentMarker ( );\n    void PutcurrentMarker (\n        long plMarker );\n    HRESULT playItem (\n        struct IWMPMedia * pIWMPMedia );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_isAvailable (\n        /*[in]*/ BSTR bstrItem,\n        /*[out,retval]*/ VARIANT_BOOL * pIsAvailable ) = 0;\n      virtual HRESULT __stdcall raw_play ( ) = 0;\n      virtual HRESULT __stdcall raw_stop ( ) = 0;\n      virtual HRESULT __stdcall raw_pause ( ) = 0;\n      virtual HRESULT __stdcall raw_fastForward ( ) = 0;\n      virtual HRESULT __stdcall raw_fastReverse ( ) = 0;\n      virtual HRESULT __stdcall get_currentPosition (\n        /*[out,retval]*/ double * pdCurrentPosition ) = 0;\n      virtual HRESULT __stdcall put_currentPosition (\n        /*[in]*/ double pdCurrentPosition ) = 0;\n      virtual HRESULT __stdcall get_currentPositionString (\n        /*[out,retval]*/ BSTR * pbstrCurrentPosition ) = 0;\n      virtual HRESULT __stdcall raw_next ( ) = 0;\n      virtual HRESULT __stdcall raw_previous ( ) = 0;\n      virtual HRESULT __stdcall get_currentItem (\n        /*[out,retval]*/ struct IWMPMedia * * ppIWMPMedia ) = 0;\n      virtual HRESULT __stdcall put_currentItem (\n        /*[in]*/ struct IWMPMedia * ppIWMPMedia ) = 0;\n      virtual HRESULT __stdcall get_currentMarker (\n        /*[out,retval]*/ long * plMarker ) = 0;\n      virtual HRESULT __stdcall put_currentMarker (\n        /*[in]*/ long plMarker ) = 0;\n      virtual HRESULT __stdcall raw_playItem (\n        /*[in]*/ struct IWMPMedia * pIWMPMedia ) = 0;\n};\n\nstruct __declspec(uuid(\"679409c0-99f7-11d3-9fb7-00105aa620bb\"))\nIWMPPlaylistArray : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getcount))\n    long count;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long Getcount ( );\n    IWMPPlaylistPtr Item (\n        long lIndex );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_count (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_Item (\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppItem ) = 0;\n};\n\nstruct __declspec(uuid(\"10a13217-23a7-439b-b1c0-d847c79b7774\"))\nIWMPPlaylistCollection : IDispatch\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    IWMPPlaylistPtr newPlaylist (\n        _bstr_t bstrName );\n    IWMPPlaylistArrayPtr getAll ( );\n    IWMPPlaylistArrayPtr getByName (\n        _bstr_t bstrName );\n    HRESULT remove (\n        struct IWMPPlaylist * pItem );\n    HRESULT setDeleted (\n        struct IWMPPlaylist * pItem,\n        VARIANT_BOOL varfIsDeleted );\n    VARIANT_BOOL isDeleted (\n        struct IWMPPlaylist * pItem );\n    IWMPPlaylistPtr importPlaylist (\n        struct IWMPPlaylist * pItem );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_newPlaylist (\n        /*[in]*/ BSTR bstrName,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppItem ) = 0;\n      virtual HRESULT __stdcall raw_getAll (\n        /*[out,retval]*/ struct IWMPPlaylistArray * * ppPlaylistArray ) = 0;\n      virtual HRESULT __stdcall raw_getByName (\n        /*[in]*/ BSTR bstrName,\n        /*[out,retval]*/ struct IWMPPlaylistArray * * ppPlaylistArray ) = 0;\n      virtual HRESULT __stdcall raw_remove (\n        /*[in]*/ struct IWMPPlaylist * pItem ) = 0;\n      virtual HRESULT __stdcall raw_setDeleted (\n        /*[in]*/ struct IWMPPlaylist * pItem,\n        /*[in]*/ VARIANT_BOOL varfIsDeleted ) = 0;\n      virtual HRESULT __stdcall raw_isDeleted (\n        /*[in]*/ struct IWMPPlaylist * pItem,\n        /*[out,retval]*/ VARIANT_BOOL * pvarfIsDeleted ) = 0;\n      virtual HRESULT __stdcall raw_importPlaylist (\n        /*[in]*/ struct IWMPPlaylist * pItem,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppImportedItem ) = 0;\n};\n\nstruct __declspec(uuid(\"cfab6e98-8730-11d3-b388-00c04f68574b\"))\nIWMPCdrom : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetdriveSpecifier))\n    _bstr_t driveSpecifier;\n    __declspec(property(get=GetPlaylist))\n    IWMPPlaylistPtr Playlist;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t GetdriveSpecifier ( );\n    IWMPPlaylistPtr GetPlaylist ( );\n    HRESULT eject ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_driveSpecifier (\n        /*[out,retval]*/ BSTR * pbstrDrive ) = 0;\n      virtual HRESULT __stdcall get_Playlist (\n        /*[out,retval]*/ struct IWMPPlaylist * * ppPlaylist ) = 0;\n      virtual HRESULT __stdcall raw_eject ( ) = 0;\n};\n\nstruct __declspec(uuid(\"ee4c8fe2-34b2-11d3-a3bf-006097c9b344\"))\nIWMPCdromCollection : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getcount))\n    long count;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long Getcount ( );\n    IWMPCdromPtr Item (\n        long lIndex );\n    IWMPCdromPtr getByDriveSpecifier (\n        _bstr_t bstrDriveSpecifier );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_count (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_Item (\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ struct IWMPCdrom * * ppItem ) = 0;\n      virtual HRESULT __stdcall raw_getByDriveSpecifier (\n        /*[in]*/ BSTR bstrDriveSpecifier,\n        /*[out,retval]*/ struct IWMPCdrom * * ppCdrom ) = 0;\n};\n\nstruct __declspec(uuid(\"d84cca99-cce2-11d2-9ecc-0000f8085981\"))\nIWMPCore : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetURL,put=PutURL))\n    _bstr_t URL;\n    __declspec(property(get=GetopenState))\n    enum WMPOpenState openState;\n    __declspec(property(get=Getcontrols))\n    IWMPControlsPtr controls;\n    __declspec(property(get=Getsettings))\n    IWMPSettingsPtr settings;\n    __declspec(property(get=GetcurrentMedia,put=PutcurrentMedia))\n    IWMPMediaPtr currentMedia;\n    __declspec(property(get=Getnetwork))\n    IWMPNetworkPtr network;\n    __declspec(property(get=GetmediaCollection))\n    IWMPMediaCollectionPtr mediaCollection;\n    __declspec(property(get=GetplaylistCollection))\n    IWMPPlaylistCollectionPtr playlistCollection;\n    __declspec(property(get=GetplayState))\n    enum WMPPlayState playState;\n    __declspec(property(get=GetversionInfo))\n    _bstr_t versionInfo;\n    __declspec(property(get=GetcurrentPlaylist,put=PutcurrentPlaylist))\n    IWMPPlaylistPtr currentPlaylist;\n    __declspec(property(get=GetcdromCollection))\n    IWMPCdromCollectionPtr cdromCollection;\n    __declspec(property(get=GetclosedCaption))\n    IWMPClosedCaptionPtr closedCaption;\n    __declspec(property(get=GetisOnline))\n    VARIANT_BOOL isOnline;\n    __declspec(property(get=GetError))\n    IWMPErrorPtr Error;\n    __declspec(property(get=Getstatus))\n    _bstr_t status;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT close ( );\n    _bstr_t GetURL ( );\n    void PutURL (\n        _bstr_t pbstrURL );\n    enum WMPOpenState GetopenState ( );\n    enum WMPPlayState GetplayState ( );\n    IWMPControlsPtr Getcontrols ( );\n    IWMPSettingsPtr Getsettings ( );\n    IWMPMediaPtr GetcurrentMedia ( );\n    void PutcurrentMedia (\n        struct IWMPMedia * ppMedia );\n    IWMPMediaCollectionPtr GetmediaCollection ( );\n    IWMPPlaylistCollectionPtr GetplaylistCollection ( );\n    _bstr_t GetversionInfo ( );\n    HRESULT launchURL (\n        _bstr_t bstrURL );\n    IWMPNetworkPtr Getnetwork ( );\n    IWMPPlaylistPtr GetcurrentPlaylist ( );\n    void PutcurrentPlaylist (\n        struct IWMPPlaylist * ppPL );\n    IWMPCdromCollectionPtr GetcdromCollection ( );\n    IWMPClosedCaptionPtr GetclosedCaption ( );\n    VARIANT_BOOL GetisOnline ( );\n    IWMPErrorPtr GetError ( );\n    _bstr_t Getstatus ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_close ( ) = 0;\n      virtual HRESULT __stdcall get_URL (\n        /*[out,retval]*/ BSTR * pbstrURL ) = 0;\n      virtual HRESULT __stdcall put_URL (\n        /*[in]*/ BSTR pbstrURL ) = 0;\n      virtual HRESULT __stdcall get_openState (\n        /*[out,retval]*/ enum WMPOpenState * pwmpos ) = 0;\n      virtual HRESULT __stdcall get_playState (\n        /*[out,retval]*/ enum WMPPlayState * pwmpps ) = 0;\n      virtual HRESULT __stdcall get_controls (\n        /*[out,retval]*/ struct IWMPControls * * ppControl ) = 0;\n      virtual HRESULT __stdcall get_settings (\n        /*[out,retval]*/ struct IWMPSettings * * ppSettings ) = 0;\n      virtual HRESULT __stdcall get_currentMedia (\n        /*[out,retval]*/ struct IWMPMedia * * ppMedia ) = 0;\n      virtual HRESULT __stdcall put_currentMedia (\n        /*[in]*/ struct IWMPMedia * ppMedia ) = 0;\n      virtual HRESULT __stdcall get_mediaCollection (\n        /*[out,retval]*/ struct IWMPMediaCollection * * ppMediaCollection ) = 0;\n      virtual HRESULT __stdcall get_playlistCollection (\n        /*[out,retval]*/ struct IWMPPlaylistCollection * * ppPlaylistCollection ) = 0;\n      virtual HRESULT __stdcall get_versionInfo (\n        /*[out,retval]*/ BSTR * pbstrVersionInfo ) = 0;\n      virtual HRESULT __stdcall raw_launchURL (\n        /*[in]*/ BSTR bstrURL ) = 0;\n      virtual HRESULT __stdcall get_network (\n        /*[out,retval]*/ struct IWMPNetwork * * ppQNI ) = 0;\n      virtual HRESULT __stdcall get_currentPlaylist (\n        /*[out,retval]*/ struct IWMPPlaylist * * ppPL ) = 0;\n      virtual HRESULT __stdcall put_currentPlaylist (\n        /*[in]*/ struct IWMPPlaylist * ppPL ) = 0;\n      virtual HRESULT __stdcall get_cdromCollection (\n        /*[out,retval]*/ struct IWMPCdromCollection * * ppCdromCollection ) = 0;\n      virtual HRESULT __stdcall get_closedCaption (\n        /*[out,retval]*/ struct IWMPClosedCaption * * ppClosedCaption ) = 0;\n      virtual HRESULT __stdcall get_isOnline (\n        /*[out,retval]*/ VARIANT_BOOL * pfOnline ) = 0;\n      virtual HRESULT __stdcall get_Error (\n        /*[out,retval]*/ struct IWMPError * * ppError ) = 0;\n      virtual HRESULT __stdcall get_status (\n        /*[out,retval]*/ BSTR * pbstrStatus ) = 0;\n};\n\nstruct __declspec(uuid(\"bc17e5b7-7561-4c18-bb90-17d485775659\"))\nIWMPCore2 : IWMPCore\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getdvd))\n    IWMPDVDPtr dvd;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    IWMPDVDPtr Getdvd ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_dvd (\n        /*[out,retval]*/ struct IWMPDVD * * ppDVD ) = 0;\n};\n\nstruct __declspec(uuid(\"7587c667-628f-499f-88e7-6a6f4e888464\"))\nIWMPCore3 : IWMPCore2\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    IWMPPlaylistPtr newPlaylist (\n        _bstr_t bstrName,\n        _bstr_t bstrURL );\n    IWMPMediaPtr newMedia (\n        _bstr_t bstrURL );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_newPlaylist (\n        /*[in]*/ BSTR bstrName,\n        /*[in]*/ BSTR bstrURL,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppPlaylist ) = 0;\n      virtual HRESULT __stdcall raw_newMedia (\n        /*[in]*/ BSTR bstrURL,\n        /*[out,retval]*/ struct IWMPMedia * * ppMedia ) = 0;\n};\n\nstruct __declspec(uuid(\"6c497d62-8919-413c-82db-e935fb3ec584\"))\nIWMPPlayer4 : IWMPCore3\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getenabled,put=Putenabled))\n    VARIANT_BOOL enabled;\n    __declspec(property(get=GetuiMode,put=PutuiMode))\n    _bstr_t uiMode;\n    __declspec(property(get=GetstretchToFit,put=PutstretchToFit))\n    VARIANT_BOOL stretchToFit;\n    __declspec(property(get=GetwindowlessVideo,put=PutwindowlessVideo))\n    VARIANT_BOOL windowlessVideo;\n    __declspec(property(get=GetisRemote))\n    VARIANT_BOOL isRemote;\n    __declspec(property(get=GetplayerApplication))\n    IWMPPlayerApplicationPtr playerApplication;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL Getenabled ( );\n    void Putenabled (\n        VARIANT_BOOL pbEnabled );\n    VARIANT_BOOL GetfullScreen ( );\n    void PutfullScreen (\n        VARIANT_BOOL pbFullScreen );\n    VARIANT_BOOL GetenableContextMenu ( );\n    void PutenableContextMenu (\n        VARIANT_BOOL pbEnableContextMenu );\n    void PutuiMode (\n        _bstr_t pbstrMode );\n    _bstr_t GetuiMode ( );\n    VARIANT_BOOL GetstretchToFit ( );\n    void PutstretchToFit (\n        VARIANT_BOOL pbEnabled );\n    VARIANT_BOOL GetwindowlessVideo ( );\n    void PutwindowlessVideo (\n        VARIANT_BOOL pbEnabled );\n    VARIANT_BOOL GetisRemote ( );\n    IWMPPlayerApplicationPtr GetplayerApplication ( );\n    HRESULT openPlayer (\n        _bstr_t bstrURL );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_enabled (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnabled ) = 0;\n      virtual HRESULT __stdcall put_enabled (\n        /*[in]*/ VARIANT_BOOL pbEnabled ) = 0;\n      virtual HRESULT __stdcall get_fullScreen (\n        /*[out,retval]*/ VARIANT_BOOL * pbFullScreen ) = 0;\n      virtual HRESULT __stdcall put_fullScreen (\n        VARIANT_BOOL pbFullScreen ) = 0;\n      virtual HRESULT __stdcall get_enableContextMenu (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnableContextMenu ) = 0;\n      virtual HRESULT __stdcall put_enableContextMenu (\n        VARIANT_BOOL pbEnableContextMenu ) = 0;\n      virtual HRESULT __stdcall put_uiMode (\n        /*[in]*/ BSTR pbstrMode ) = 0;\n      virtual HRESULT __stdcall get_uiMode (\n        /*[out,retval]*/ BSTR * pbstrMode ) = 0;\n      virtual HRESULT __stdcall get_stretchToFit (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnabled ) = 0;\n      virtual HRESULT __stdcall put_stretchToFit (\n        /*[in]*/ VARIANT_BOOL pbEnabled ) = 0;\n      virtual HRESULT __stdcall get_windowlessVideo (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnabled ) = 0;\n      virtual HRESULT __stdcall put_windowlessVideo (\n        /*[in]*/ VARIANT_BOOL pbEnabled ) = 0;\n      virtual HRESULT __stdcall get_isRemote (\n        /*[out,retval]*/ VARIANT_BOOL * pvarfIsRemote ) = 0;\n      virtual HRESULT __stdcall get_playerApplication (\n        /*[out,retval]*/ struct IWMPPlayerApplication * * ppIWMPPlayerApplication ) = 0;\n      virtual HRESULT __stdcall raw_openPlayer (\n        /*[in]*/ BSTR bstrURL ) = 0;\n};\n\nstruct __declspec(uuid(\"54062b68-052a-4c25-a39f-8b63346511d4\"))\nIWMPPlayer3 : IWMPCore2\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getenabled,put=Putenabled))\n    VARIANT_BOOL enabled;\n    __declspec(property(get=GetuiMode,put=PutuiMode))\n    _bstr_t uiMode;\n    __declspec(property(get=GetstretchToFit,put=PutstretchToFit))\n    VARIANT_BOOL stretchToFit;\n    __declspec(property(get=GetwindowlessVideo,put=PutwindowlessVideo))\n    VARIANT_BOOL windowlessVideo;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL Getenabled ( );\n    void Putenabled (\n        VARIANT_BOOL pbEnabled );\n    VARIANT_BOOL GetfullScreen ( );\n    void PutfullScreen (\n        VARIANT_BOOL pbFullScreen );\n    VARIANT_BOOL GetenableContextMenu ( );\n    void PutenableContextMenu (\n        VARIANT_BOOL pbEnableContextMenu );\n    void PutuiMode (\n        _bstr_t pbstrMode );\n    _bstr_t GetuiMode ( );\n    VARIANT_BOOL GetstretchToFit ( );\n    void PutstretchToFit (\n        VARIANT_BOOL pbEnabled );\n    VARIANT_BOOL GetwindowlessVideo ( );\n    void PutwindowlessVideo (\n        VARIANT_BOOL pbEnabled );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_enabled (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnabled ) = 0;\n      virtual HRESULT __stdcall put_enabled (\n        /*[in]*/ VARIANT_BOOL pbEnabled ) = 0;\n      virtual HRESULT __stdcall get_fullScreen (\n        /*[out,retval]*/ VARIANT_BOOL * pbFullScreen ) = 0;\n      virtual HRESULT __stdcall put_fullScreen (\n        VARIANT_BOOL pbFullScreen ) = 0;\n      virtual HRESULT __stdcall get_enableContextMenu (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnableContextMenu ) = 0;\n      virtual HRESULT __stdcall put_enableContextMenu (\n        VARIANT_BOOL pbEnableContextMenu ) = 0;\n      virtual HRESULT __stdcall put_uiMode (\n        /*[in]*/ BSTR pbstrMode ) = 0;\n      virtual HRESULT __stdcall get_uiMode (\n        /*[out,retval]*/ BSTR * pbstrMode ) = 0;\n      virtual HRESULT __stdcall get_stretchToFit (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnabled ) = 0;\n      virtual HRESULT __stdcall put_stretchToFit (\n        /*[in]*/ VARIANT_BOOL pbEnabled ) = 0;\n      virtual HRESULT __stdcall get_windowlessVideo (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnabled ) = 0;\n      virtual HRESULT __stdcall put_windowlessVideo (\n        /*[in]*/ VARIANT_BOOL pbEnabled ) = 0;\n};\n\nstruct __declspec(uuid(\"0e6b01d1-d407-4c85-bf5f-1c01f6150280\"))\nIWMPPlayer2 : IWMPCore\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getenabled,put=Putenabled))\n    VARIANT_BOOL enabled;\n    __declspec(property(get=GetuiMode,put=PutuiMode))\n    _bstr_t uiMode;\n    __declspec(property(get=GetstretchToFit,put=PutstretchToFit))\n    VARIANT_BOOL stretchToFit;\n    __declspec(property(get=GetwindowlessVideo,put=PutwindowlessVideo))\n    VARIANT_BOOL windowlessVideo;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL Getenabled ( );\n    void Putenabled (\n        VARIANT_BOOL pbEnabled );\n    VARIANT_BOOL GetfullScreen ( );\n    void PutfullScreen (\n        VARIANT_BOOL pbFullScreen );\n    VARIANT_BOOL GetenableContextMenu ( );\n    void PutenableContextMenu (\n        VARIANT_BOOL pbEnableContextMenu );\n    void PutuiMode (\n        _bstr_t pbstrMode );\n    _bstr_t GetuiMode ( );\n    VARIANT_BOOL GetstretchToFit ( );\n    void PutstretchToFit (\n        VARIANT_BOOL pbEnabled );\n    VARIANT_BOOL GetwindowlessVideo ( );\n    void PutwindowlessVideo (\n        VARIANT_BOOL pbEnabled );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_enabled (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnabled ) = 0;\n      virtual HRESULT __stdcall put_enabled (\n        /*[in]*/ VARIANT_BOOL pbEnabled ) = 0;\n      virtual HRESULT __stdcall get_fullScreen (\n        /*[out,retval]*/ VARIANT_BOOL * pbFullScreen ) = 0;\n      virtual HRESULT __stdcall put_fullScreen (\n        VARIANT_BOOL pbFullScreen ) = 0;\n      virtual HRESULT __stdcall get_enableContextMenu (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnableContextMenu ) = 0;\n      virtual HRESULT __stdcall put_enableContextMenu (\n        VARIANT_BOOL pbEnableContextMenu ) = 0;\n      virtual HRESULT __stdcall put_uiMode (\n        /*[in]*/ BSTR pbstrMode ) = 0;\n      virtual HRESULT __stdcall get_uiMode (\n        /*[out,retval]*/ BSTR * pbstrMode ) = 0;\n      virtual HRESULT __stdcall get_stretchToFit (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnabled ) = 0;\n      virtual HRESULT __stdcall put_stretchToFit (\n        /*[in]*/ VARIANT_BOOL pbEnabled ) = 0;\n      virtual HRESULT __stdcall get_windowlessVideo (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnabled ) = 0;\n      virtual HRESULT __stdcall put_windowlessVideo (\n        /*[in]*/ VARIANT_BOOL pbEnabled ) = 0;\n};\n\nstruct __declspec(uuid(\"6bf52a4f-394a-11d3-b153-00c04f79faa6\"))\nIWMPPlayer : IWMPCore\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=Getenabled,put=Putenabled))\n    VARIANT_BOOL enabled;\n    __declspec(property(get=GetuiMode,put=PutuiMode))\n    _bstr_t uiMode;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL Getenabled ( );\n    void Putenabled (\n        VARIANT_BOOL pbEnabled );\n    VARIANT_BOOL GetfullScreen ( );\n    void PutfullScreen (\n        VARIANT_BOOL pbFullScreen );\n    VARIANT_BOOL GetenableContextMenu ( );\n    void PutenableContextMenu (\n        VARIANT_BOOL pbEnableContextMenu );\n    void PutuiMode (\n        _bstr_t pbstrMode );\n    _bstr_t GetuiMode ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_enabled (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnabled ) = 0;\n      virtual HRESULT __stdcall put_enabled (\n        /*[in]*/ VARIANT_BOOL pbEnabled ) = 0;\n      virtual HRESULT __stdcall get_fullScreen (\n        /*[out,retval]*/ VARIANT_BOOL * pbFullScreen ) = 0;\n      virtual HRESULT __stdcall put_fullScreen (\n        VARIANT_BOOL pbFullScreen ) = 0;\n      virtual HRESULT __stdcall get_enableContextMenu (\n        /*[out,retval]*/ VARIANT_BOOL * pbEnableContextMenu ) = 0;\n      virtual HRESULT __stdcall put_enableContextMenu (\n        VARIANT_BOOL pbEnableContextMenu ) = 0;\n      virtual HRESULT __stdcall put_uiMode (\n        /*[in]*/ BSTR pbstrMode ) = 0;\n      virtual HRESULT __stdcall get_uiMode (\n        /*[out,retval]*/ BSTR * pbstrMode ) = 0;\n};\n\nstruct __declspec(uuid(\"6f030d25-0890-480f-9775-1f7e40ab5b8e\"))\nIWMPControls2 : IWMPControls\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT step (\n        long lStep );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_step (\n        /*[in]*/ long lStep ) = 0;\n};\n\nstruct __declspec(uuid(\"ab7c88bb-143e-4ea4-acc3-e4350b2106c3\"))\nIWMPMedia2 : IWMPMedia\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetError))\n    IWMPErrorItemPtr Error;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    IWMPErrorItemPtr GetError ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_Error (\n        /*[out,retval]*/ struct IWMPErrorItem * * ppIWMPErrorItem ) = 0;\n};\n\nstruct __declspec(uuid(\"f118efc7-f03a-4fb4-99c9-1c02a5c1065b\"))\nIWMPMedia3 : IWMPMedia2\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long getAttributeCountByType (\n        _bstr_t bstrType,\n        _bstr_t bstrLanguage );\n    _variant_t getItemInfoByType (\n        _bstr_t bstrType,\n        _bstr_t bstrLanguage,\n        long lIndex );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_getAttributeCountByType (\n        /*[in]*/ BSTR bstrType,\n        /*[in]*/ BSTR bstrLanguage,\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_getItemInfoByType (\n        /*[in]*/ BSTR bstrType,\n        /*[in]*/ BSTR bstrLanguage,\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ VARIANT * pvarValue ) = 0;\n};\n\nstruct __declspec(uuid(\"a1d1110e-d545-476a-9a78-ac3e4cb1e6bd\"))\nIWMPControls3 : IWMPControls2\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetaudioLanguageCount))\n    long audioLanguageCount;\n    __declspec(property(get=GetcurrentAudioLanguage,put=PutcurrentAudioLanguage))\n    long currentAudioLanguage;\n    __declspec(property(get=GetcurrentAudioLanguageIndex,put=PutcurrentAudioLanguageIndex))\n    long currentAudioLanguageIndex;\n    __declspec(property(get=GetcurrentPositionTimecode,put=PutcurrentPositionTimecode))\n    _bstr_t currentPositionTimecode;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long GetaudioLanguageCount ( );\n    long getAudioLanguageID (\n        long lIndex );\n    _bstr_t getAudioLanguageDescription (\n        long lIndex );\n    long GetcurrentAudioLanguage ( );\n    void PutcurrentAudioLanguage (\n        long plLangID );\n    long GetcurrentAudioLanguageIndex ( );\n    void PutcurrentAudioLanguageIndex (\n        long plIndex );\n    _bstr_t getLanguageName (\n        long lLangID );\n    _bstr_t GetcurrentPositionTimecode ( );\n    void PutcurrentPositionTimecode (\n        _bstr_t bstrTimecode );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_audioLanguageCount (\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_getAudioLanguageID (\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ long * plLangID ) = 0;\n      virtual HRESULT __stdcall raw_getAudioLanguageDescription (\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ BSTR * pbstrLangDesc ) = 0;\n      virtual HRESULT __stdcall get_currentAudioLanguage (\n        /*[out,retval]*/ long * plLangID ) = 0;\n      virtual HRESULT __stdcall put_currentAudioLanguage (\n        /*[in]*/ long plLangID ) = 0;\n      virtual HRESULT __stdcall get_currentAudioLanguageIndex (\n        /*[out,retval]*/ long * plIndex ) = 0;\n      virtual HRESULT __stdcall put_currentAudioLanguageIndex (\n        /*[in]*/ long plIndex ) = 0;\n      virtual HRESULT __stdcall raw_getLanguageName (\n        /*[in]*/ long lLangID,\n        /*[out,retval]*/ BSTR * pbstrLangName ) = 0;\n      virtual HRESULT __stdcall get_currentPositionTimecode (\n        /*[out,retval]*/ BSTR * bstrTimecode ) = 0;\n      virtual HRESULT __stdcall put_currentPositionTimecode (\n        /*[in]*/ BSTR bstrTimecode ) = 0;\n};\n\nstruct __declspec(uuid(\"8ba957f5-fd8c-4791-b82d-f840401ee474\"))\nIWMPMediaCollection2 : IWMPMediaCollection\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    IWMPQueryPtr createQuery ( );\n    IWMPPlaylistPtr getPlaylistByQuery (\n        struct IWMPQuery * pQuery,\n        _bstr_t bstrMediaType,\n        _bstr_t bstrSortAttribute,\n        VARIANT_BOOL fSortAscending );\n    IWMPStringCollectionPtr getStringCollectionByQuery (\n        _bstr_t bstrAttribute,\n        struct IWMPQuery * pQuery,\n        _bstr_t bstrMediaType,\n        _bstr_t bstrSortAttribute,\n        VARIANT_BOOL fSortAscending );\n    IWMPPlaylistPtr getByAttributeAndMediaType (\n        _bstr_t bstrAttribute,\n        _bstr_t bstrValue,\n        _bstr_t bstrMediaType );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_createQuery (\n        /*[out,retval]*/ struct IWMPQuery * * ppQuery ) = 0;\n      virtual HRESULT __stdcall raw_getPlaylistByQuery (\n        /*[in]*/ struct IWMPQuery * pQuery,\n        /*[in]*/ BSTR bstrMediaType,\n        /*[in]*/ BSTR bstrSortAttribute,\n        /*[in]*/ VARIANT_BOOL fSortAscending,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppPlaylist ) = 0;\n      virtual HRESULT __stdcall raw_getStringCollectionByQuery (\n        /*[in]*/ BSTR bstrAttribute,\n        /*[in]*/ struct IWMPQuery * pQuery,\n        /*[in]*/ BSTR bstrMediaType,\n        /*[in]*/ BSTR bstrSortAttribute,\n        /*[in]*/ VARIANT_BOOL fSortAscending,\n        /*[out,retval]*/ struct IWMPStringCollection * * ppStringCollection ) = 0;\n      virtual HRESULT __stdcall raw_getByAttributeAndMediaType (\n        /*[in]*/ BSTR bstrAttribute,\n        /*[in]*/ BSTR bstrValue,\n        /*[in]*/ BSTR bstrMediaType,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppMediaItems ) = 0;\n};\n\nstruct __declspec(uuid(\"39c2f8d5-1cf2-4d5e-ae09-d73492cf9eaa\"))\nIWMPLibraryServices : IUnknown\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    long getCountByType (\n        enum WMPLibraryType wmplt );\n    IWMPLibraryPtr getLibraryByType (\n        enum WMPLibraryType wmplt,\n        long lIndex );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_getCountByType (\n        /*[in]*/ enum WMPLibraryType wmplt,\n        /*[out,retval]*/ long * plCount ) = 0;\n      virtual HRESULT __stdcall raw_getLibraryByType (\n        /*[in]*/ enum WMPLibraryType wmplt,\n        /*[in]*/ long lIndex,\n        /*[out,retval]*/ struct IWMPLibrary * * ppIWMPLibrary ) = 0;\n};\n\nstruct __declspec(uuid(\"dd578a4e-79b1-426c-bf8f-3add9072500b\"))\nIWMPLibrary2 : IWMPLibrary\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    _bstr_t getItemInfo (\n        _bstr_t bstrItemName );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_getItemInfo (\n        /*[in]*/ BSTR bstrItemName,\n        /*[out,retval]*/ BSTR * pbstrVal ) = 0;\n};\n\nstruct __declspec(uuid(\"b22c85f9-263c-4372-a0da-b518db9b4098\"))\nIWMPSyncDevice3 : IWMPSyncDevice2\n{\n    //\n    // Wrapper methods for error-handling\n    //\n\n    HRESULT estimateSyncSize (\n        struct IWMPPlaylist * pNonRulePlaylist,\n        struct IWMPPlaylist * pRulesPlaylist );\n    HRESULT cancelEstimation ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall raw_estimateSyncSize (\n        /*[in]*/ struct IWMPPlaylist * pNonRulePlaylist,\n        /*[in]*/ struct IWMPPlaylist * pRulesPlaylist ) = 0;\n      virtual HRESULT __stdcall raw_cancelEstimation ( ) = 0;\n};\n\nstruct __declspec(uuid(\"5f9cfd92-8cad-11d3-9a7e-00c04f8efb70\"))\nIWMPPlaylistCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetitemErrorColor,put=PutitemErrorColor))\n    _bstr_t itemErrorColor;\n    __declspec(property(get=GetitemCount))\n    long itemCount;\n    __declspec(property(get=GetitemMedia))\n    IWMPMediaPtr itemMedia[];\n    __declspec(property(get=GetitemPlaylist))\n    IWMPPlaylistPtr itemPlaylist[];\n    __declspec(property(get=GetleftStatus,put=PutleftStatus))\n    _bstr_t leftStatus;\n    __declspec(property(get=GetrightStatus,put=PutrightStatus))\n    _bstr_t rightStatus;\n    __declspec(property(get=GeteditButtonVisible,put=PuteditButtonVisible))\n    VARIANT_BOOL editButtonVisible;\n    __declspec(property(get=GetdropDownImage,put=PutdropDownImage))\n    _bstr_t dropDownImage;\n    __declspec(property(get=GetdropDownBackgroundImage,put=PutdropDownBackgroundImage))\n    _bstr_t dropDownBackgroundImage;\n    __declspec(property(get=GethueShift,put=PuthueShift))\n    float hueShift;\n    __declspec(property(get=Getsaturation,put=Putsaturation))\n    float saturation;\n    __declspec(property(get=GetstatusColor,put=PutstatusColor))\n    _bstr_t statusColor;\n    __declspec(property(get=GettoolbarVisible,put=PuttoolbarVisible))\n    VARIANT_BOOL toolbarVisible;\n    __declspec(property(get=GetPlaylist,put=PutPlaylist))\n    IWMPPlaylistPtr Playlist;\n    __declspec(property(get=Getcolumns,put=Putcolumns))\n    _bstr_t columns;\n    __declspec(property(get=GetcolumnCount))\n    long columnCount;\n    __declspec(property(get=GetcolumnOrder,put=PutcolumnOrder))\n    _bstr_t columnOrder;\n    __declspec(property(get=GetcolumnsVisible,put=PutcolumnsVisible))\n    VARIANT_BOOL columnsVisible;\n    __declspec(property(get=GetitemSelectedColor,put=PutitemSelectedColor))\n    _bstr_t itemSelectedColor;\n    __declspec(property(get=GetdropDownVisible,put=PutdropDownVisible))\n    VARIANT_BOOL dropDownVisible;\n    __declspec(property(get=GetplaylistItemsVisible,put=PutplaylistItemsVisible))\n    VARIANT_BOOL playlistItemsVisible;\n    __declspec(property(get=GetcheckboxesVisible,put=PutcheckboxesVisible))\n    VARIANT_BOOL checkboxesVisible;\n    __declspec(property(get=GetitemSelectedFocusLostColor,put=PutitemSelectedFocusLostColor))\n    _bstr_t itemSelectedFocusLostColor;\n    __declspec(property(get=GetitemSelectedBackgroundColor,put=PutitemSelectedBackgroundColor))\n    _bstr_t itemSelectedBackgroundColor;\n    __declspec(property(get=GetbackgroundColor,put=PutbackgroundColor))\n    _bstr_t backgroundColor;\n    __declspec(property(get=GetforegroundColor,put=PutforegroundColor))\n    _bstr_t foregroundColor;\n    __declspec(property(get=GetdisabledItemColor,put=PutdisabledItemColor))\n    _bstr_t disabledItemColor;\n    __declspec(property(get=GetitemPlayingColor,put=PutitemPlayingColor))\n    _bstr_t itemPlayingColor;\n    __declspec(property(get=GetitemPlayingBackgroundColor,put=PutitemPlayingBackgroundColor))\n    _bstr_t itemPlayingBackgroundColor;\n    __declspec(property(get=GetbackgroundImage,put=PutbackgroundImage))\n    _bstr_t backgroundImage;\n    __declspec(property(get=GetallowItemEditing,put=PutallowItemEditing))\n    VARIANT_BOOL allowItemEditing;\n    __declspec(property(get=GetallowColumnSorting,put=PutallowColumnSorting))\n    VARIANT_BOOL allowColumnSorting;\n    __declspec(property(get=GetdropDownList,put=PutdropDownList))\n    _bstr_t dropDownList;\n    __declspec(property(get=GetdropDownToolTip,put=PutdropDownToolTip))\n    _bstr_t dropDownToolTip;\n    __declspec(property(get=Getcopying,put=Putcopying))\n    VARIANT_BOOL copying;\n    __declspec(property(get=GetitemSelectedBackgroundFocusLostColor,put=PutitemSelectedBackgroundFocusLostColor))\n    _bstr_t itemSelectedBackgroundFocusLostColor;\n    __declspec(property(get=GetbackgroundSplitColor,put=PutbackgroundSplitColor))\n    _bstr_t backgroundSplitColor;\n    __declspec(property(get=GetstatusTextColor,put=PutstatusTextColor))\n    _bstr_t statusTextColor;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    IWMPPlaylistPtr GetPlaylist ( );\n    void PutPlaylist (\n        struct IWMPPlaylist * ppdispPlaylist );\n    _bstr_t Getcolumns ( );\n    void Putcolumns (\n        _bstr_t pbstrColumns );\n    long GetcolumnCount ( );\n    _bstr_t GetcolumnOrder ( );\n    void PutcolumnOrder (\n        _bstr_t pbstrColumnOrder );\n    VARIANT_BOOL GetcolumnsVisible ( );\n    void PutcolumnsVisible (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetdropDownVisible ( );\n    void PutdropDownVisible (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetplaylistItemsVisible ( );\n    void PutplaylistItemsVisible (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetcheckboxesVisible ( );\n    void PutcheckboxesVisible (\n        VARIANT_BOOL pVal );\n    _bstr_t GetbackgroundColor ( );\n    void PutbackgroundColor (\n        _bstr_t pbstrColor );\n    _bstr_t GetforegroundColor ( );\n    void PutforegroundColor (\n        _bstr_t pbstrColor );\n    _bstr_t GetdisabledItemColor ( );\n    void PutdisabledItemColor (\n        _bstr_t pbstrColor );\n    _bstr_t GetitemPlayingColor ( );\n    void PutitemPlayingColor (\n        _bstr_t pbstrColor );\n    _bstr_t GetitemPlayingBackgroundColor ( );\n    void PutitemPlayingBackgroundColor (\n        _bstr_t pbstrBackgroundColor );\n    _bstr_t GetbackgroundImage ( );\n    void PutbackgroundImage (\n        _bstr_t pbstrImage );\n    VARIANT_BOOL GetallowItemEditing ( );\n    void PutallowItemEditing (\n        VARIANT_BOOL pVal );\n    VARIANT_BOOL GetallowColumnSorting ( );\n    void PutallowColumnSorting (\n        VARIANT_BOOL pVal );\n    _bstr_t GetdropDownList ( );\n    void PutdropDownList (\n        _bstr_t pbstrList );\n    _bstr_t GetdropDownToolTip ( );\n    void PutdropDownToolTip (\n        _bstr_t pbstrToolTip );\n    VARIANT_BOOL Getcopying ( );\n    void Putcopying (\n        VARIANT_BOOL pVal );\n    HRESULT copy ( );\n    HRESULT abortCopy ( );\n    HRESULT deleteSelected ( );\n    HRESULT deleteSelectedFromLibrary ( );\n    HRESULT moveSelectedUp ( );\n    HRESULT moveSelectedDown ( );\n    HRESULT addSelectedToPlaylist (\n        struct IWMPPlaylist * pdispPlaylist );\n    long getNextSelectedItem (\n        long nStartIndex );\n    long getNextCheckedItem (\n        long nStartIndex );\n    HRESULT setSelectedState (\n        long nIndex,\n        VARIANT_BOOL vbSelected );\n    HRESULT setCheckedState (\n        long nIndex,\n        VARIANT_BOOL vbChecked );\n    HRESULT sortColumn (\n        long nIndex );\n    HRESULT setColumnResizeMode (\n        long nIndex,\n        _bstr_t newMode );\n    HRESULT setColumnWidth (\n        long nIndex,\n        long nWidth );\n    _bstr_t GetitemErrorColor ( );\n    void PutitemErrorColor (\n        _bstr_t pbstrColor );\n    long GetitemCount ( );\n    IWMPMediaPtr GetitemMedia (\n        long nIndex );\n    IWMPPlaylistPtr GetitemPlaylist (\n        long nIndex );\n    long getNextSelectedItem2 (\n        long nStartIndex );\n    long getNextCheckedItem2 (\n        long nStartIndex );\n    HRESULT setSelectedState2 (\n        long nIndex,\n        VARIANT_BOOL vbSelected );\n    HRESULT setCheckedState2 (\n        long nIndex,\n        VARIANT_BOOL vbChecked );\n    _bstr_t GetleftStatus ( );\n    void PutleftStatus (\n        _bstr_t pbstrStatus );\n    _bstr_t GetrightStatus ( );\n    void PutrightStatus (\n        _bstr_t pbstrStatus );\n    VARIANT_BOOL GeteditButtonVisible ( );\n    void PuteditButtonVisible (\n        VARIANT_BOOL pVal );\n    _bstr_t GetdropDownImage ( );\n    void PutdropDownImage (\n        _bstr_t pbstrImage );\n    _bstr_t GetdropDownBackgroundImage ( );\n    void PutdropDownBackgroundImage (\n        _bstr_t pbstrImage );\n    float GethueShift ( );\n    void PuthueShift (\n        float pVal );\n    float Getsaturation ( );\n    void Putsaturation (\n        float pVal );\n    _bstr_t GetstatusColor ( );\n    void PutstatusColor (\n        _bstr_t pbstrColor );\n    VARIANT_BOOL GettoolbarVisible ( );\n    void PuttoolbarVisible (\n        VARIANT_BOOL pVal );\n    _bstr_t GetitemSelectedColor ( );\n    void PutitemSelectedColor (\n        _bstr_t pbstrColor );\n    _bstr_t GetitemSelectedFocusLostColor ( );\n    void PutitemSelectedFocusLostColor (\n        _bstr_t pbstrFocusLostColor );\n    _bstr_t GetitemSelectedBackgroundColor ( );\n    void PutitemSelectedBackgroundColor (\n        _bstr_t pbstrColor );\n    _bstr_t GetitemSelectedBackgroundFocusLostColor ( );\n    void PutitemSelectedBackgroundFocusLostColor (\n        _bstr_t pbstrFocusLostColor );\n    _bstr_t GetbackgroundSplitColor ( );\n    void PutbackgroundSplitColor (\n        _bstr_t pbstrColor );\n    _bstr_t GetstatusTextColor ( );\n    void PutstatusTextColor (\n        _bstr_t pbstrColor );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_Playlist (\n        /*[out,retval]*/ struct IWMPPlaylist * * ppdispPlaylist ) = 0;\n      virtual HRESULT __stdcall put_Playlist (\n        /*[in]*/ struct IWMPPlaylist * ppdispPlaylist ) = 0;\n      virtual HRESULT __stdcall get_columns (\n        /*[out,retval]*/ BSTR * pbstrColumns ) = 0;\n      virtual HRESULT __stdcall put_columns (\n        /*[in]*/ BSTR pbstrColumns ) = 0;\n      virtual HRESULT __stdcall get_columnCount (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall get_columnOrder (\n        /*[out,retval]*/ BSTR * pbstrColumnOrder ) = 0;\n      virtual HRESULT __stdcall put_columnOrder (\n        /*[in]*/ BSTR pbstrColumnOrder ) = 0;\n      virtual HRESULT __stdcall get_columnsVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_columnsVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_dropDownVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_dropDownVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_playlistItemsVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_playlistItemsVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_checkboxesVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_checkboxesVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundColor (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_backgroundColor (\n        /*[in]*/ BSTR pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_foregroundColor (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_foregroundColor (\n        /*[in]*/ BSTR pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_disabledItemColor (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_disabledItemColor (\n        /*[in]*/ BSTR pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_itemPlayingColor (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_itemPlayingColor (\n        /*[in]*/ BSTR pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_itemPlayingBackgroundColor (\n        /*[out,retval]*/ BSTR * pbstrBackgroundColor ) = 0;\n      virtual HRESULT __stdcall put_itemPlayingBackgroundColor (\n        /*[in]*/ BSTR pbstrBackgroundColor ) = 0;\n      virtual HRESULT __stdcall get_backgroundImage (\n        /*[out,retval]*/ BSTR * pbstrImage ) = 0;\n      virtual HRESULT __stdcall put_backgroundImage (\n        /*[in]*/ BSTR pbstrImage ) = 0;\n      virtual HRESULT __stdcall get_allowItemEditing (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_allowItemEditing (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_allowColumnSorting (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_allowColumnSorting (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_dropDownList (\n        /*[out,retval]*/ BSTR * pbstrList ) = 0;\n      virtual HRESULT __stdcall put_dropDownList (\n        /*[in]*/ BSTR pbstrList ) = 0;\n      virtual HRESULT __stdcall get_dropDownToolTip (\n        /*[out,retval]*/ BSTR * pbstrToolTip ) = 0;\n      virtual HRESULT __stdcall put_dropDownToolTip (\n        /*[in]*/ BSTR pbstrToolTip ) = 0;\n      virtual HRESULT __stdcall get_copying (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_copying (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall raw_copy ( ) = 0;\n      virtual HRESULT __stdcall raw_abortCopy ( ) = 0;\n      virtual HRESULT __stdcall raw_deleteSelected ( ) = 0;\n      virtual HRESULT __stdcall raw_deleteSelectedFromLibrary ( ) = 0;\n      virtual HRESULT __stdcall raw_moveSelectedUp ( ) = 0;\n      virtual HRESULT __stdcall raw_moveSelectedDown ( ) = 0;\n      virtual HRESULT __stdcall raw_addSelectedToPlaylist (\n        /*[in]*/ struct IWMPPlaylist * pdispPlaylist ) = 0;\n      virtual HRESULT __stdcall raw_getNextSelectedItem (\n        /*[in]*/ long nStartIndex,\n        /*[out,retval]*/ long * pnSelected ) = 0;\n      virtual HRESULT __stdcall raw_getNextCheckedItem (\n        /*[in]*/ long nStartIndex,\n        /*[out,retval]*/ long * pnChecked ) = 0;\n      virtual HRESULT __stdcall raw_setSelectedState (\n        /*[in]*/ long nIndex,\n        /*[in]*/ VARIANT_BOOL vbSelected ) = 0;\n      virtual HRESULT __stdcall raw_setCheckedState (\n        /*[in]*/ long nIndex,\n        /*[in]*/ VARIANT_BOOL vbChecked ) = 0;\n      virtual HRESULT __stdcall raw_sortColumn (\n        /*[in]*/ long nIndex ) = 0;\n      virtual HRESULT __stdcall raw_setColumnResizeMode (\n        /*[in]*/ long nIndex,\n        /*[in]*/ BSTR newMode ) = 0;\n      virtual HRESULT __stdcall raw_setColumnWidth (\n        /*[in]*/ long nIndex,\n        /*[in]*/ long nWidth ) = 0;\n      virtual HRESULT __stdcall get_itemErrorColor (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_itemErrorColor (\n        /*[in]*/ BSTR pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_itemCount (\n        /*[out,retval]*/ long * pnItemCount ) = 0;\n      virtual HRESULT __stdcall get_itemMedia (\n        /*[in]*/ long nIndex,\n        /*[out,retval]*/ struct IWMPMedia * * ppMedia ) = 0;\n      virtual HRESULT __stdcall get_itemPlaylist (\n        /*[in]*/ long nIndex,\n        /*[out,retval]*/ struct IWMPPlaylist * * ppPlaylist ) = 0;\n      virtual HRESULT __stdcall raw_getNextSelectedItem2 (\n        /*[in]*/ long nStartIndex,\n        /*[out,retval]*/ long * pnSelected ) = 0;\n      virtual HRESULT __stdcall raw_getNextCheckedItem2 (\n        /*[in]*/ long nStartIndex,\n        /*[out,retval]*/ long * pnChecked ) = 0;\n      virtual HRESULT __stdcall raw_setSelectedState2 (\n        /*[in]*/ long nIndex,\n        /*[in]*/ VARIANT_BOOL vbSelected ) = 0;\n      virtual HRESULT __stdcall raw_setCheckedState2 (\n        /*[in]*/ long nIndex,\n        /*[in]*/ VARIANT_BOOL vbChecked ) = 0;\n      virtual HRESULT __stdcall get_leftStatus (\n        /*[out,retval]*/ BSTR * pbstrStatus ) = 0;\n      virtual HRESULT __stdcall put_leftStatus (\n        /*[in]*/ BSTR pbstrStatus ) = 0;\n      virtual HRESULT __stdcall get_rightStatus (\n        /*[out,retval]*/ BSTR * pbstrStatus ) = 0;\n      virtual HRESULT __stdcall put_rightStatus (\n        /*[in]*/ BSTR pbstrStatus ) = 0;\n      virtual HRESULT __stdcall get_editButtonVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_editButtonVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_dropDownImage (\n        /*[out,retval]*/ BSTR * pbstrImage ) = 0;\n      virtual HRESULT __stdcall put_dropDownImage (\n        /*[in]*/ BSTR pbstrImage ) = 0;\n      virtual HRESULT __stdcall get_dropDownBackgroundImage (\n        /*[out,retval]*/ BSTR * pbstrImage ) = 0;\n      virtual HRESULT __stdcall put_dropDownBackgroundImage (\n        /*[in]*/ BSTR pbstrImage ) = 0;\n      virtual HRESULT __stdcall get_hueShift (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_hueShift (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_saturation (\n        /*[out,retval]*/ float * pVal ) = 0;\n      virtual HRESULT __stdcall put_saturation (\n        /*[in]*/ float pVal ) = 0;\n      virtual HRESULT __stdcall get_statusColor (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_statusColor (\n        /*[in]*/ BSTR pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_toolbarVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_toolbarVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_itemSelectedColor (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_itemSelectedColor (\n        /*[in]*/ BSTR pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_itemSelectedFocusLostColor (\n        /*[out,retval]*/ BSTR * pbstrFocusLostColor ) = 0;\n      virtual HRESULT __stdcall put_itemSelectedFocusLostColor (\n        /*[in]*/ BSTR pbstrFocusLostColor ) = 0;\n      virtual HRESULT __stdcall get_itemSelectedBackgroundColor (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_itemSelectedBackgroundColor (\n        /*[in]*/ BSTR pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_itemSelectedBackgroundFocusLostColor (\n        /*[out,retval]*/ BSTR * pbstrFocusLostColor ) = 0;\n      virtual HRESULT __stdcall put_itemSelectedBackgroundFocusLostColor (\n        /*[in]*/ BSTR pbstrFocusLostColor ) = 0;\n      virtual HRESULT __stdcall get_backgroundSplitColor (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_backgroundSplitColor (\n        /*[in]*/ BSTR pbstrColor ) = 0;\n      virtual HRESULT __stdcall get_statusTextColor (\n        /*[out,retval]*/ BSTR * pbstrColor ) = 0;\n      virtual HRESULT __stdcall put_statusTextColor (\n        /*[in]*/ BSTR pbstrColor ) = 0;\n};\n\nstruct __declspec(uuid(\"b738fcae-f089-45df-aed6-034b9e7db632\"))\nIWMPLibraryTreeCtrl : IDispatch\n{\n    //\n    // Property data\n    //\n\n    __declspec(property(get=GetdropDownVisible,put=PutdropDownVisible))\n    VARIANT_BOOL dropDownVisible;\n    __declspec(property(get=GetforegroundColor,put=PutforegroundColor))\n    _bstr_t foregroundColor;\n    __declspec(property(get=GetbackgroundColor,put=PutbackgroundColor))\n    _bstr_t backgroundColor;\n    __declspec(property(get=GetfontSize,put=PutfontSize))\n    long fontSize;\n    __declspec(property(get=GetfontStyle,put=PutfontStyle))\n    _bstr_t fontStyle;\n    __declspec(property(get=GetfontFace,put=PutfontFace))\n    _bstr_t fontFace;\n    __declspec(property(get=Getfilter,put=Putfilter))\n    _bstr_t filter;\n    __declspec(property(get=GetexpandState,put=PutexpandState))\n    _bstr_t expandState;\n    __declspec(property(get=GetPlaylist,put=PutPlaylist))\n    IWMPPlaylistPtr Playlist;\n    __declspec(property(get=GetselectedPlaylist))\n    IWMPPlaylistPtr selectedPlaylist;\n    __declspec(property(get=GetselectedMedia))\n    IWMPMediaPtr selectedMedia;\n\n    //\n    // Wrapper methods for error-handling\n    //\n\n    VARIANT_BOOL GetdropDownVisible ( );\n    void PutdropDownVisible (\n        VARIANT_BOOL pVal );\n    _bstr_t GetforegroundColor ( );\n    void PutforegroundColor (\n        _bstr_t pVal );\n    _bstr_t GetbackgroundColor ( );\n    void PutbackgroundColor (\n        _bstr_t pVal );\n    long GetfontSize ( );\n    void PutfontSize (\n        long pVal );\n    _bstr_t GetfontStyle ( );\n    void PutfontStyle (\n        _bstr_t pVal );\n    _bstr_t GetfontFace ( );\n    void PutfontFace (\n        _bstr_t pVal );\n    _bstr_t Getfilter ( );\n    void Putfilter (\n        _bstr_t pVal );\n    _bstr_t GetexpandState ( );\n    void PutexpandState (\n        _bstr_t pVal );\n    IWMPPlaylistPtr GetPlaylist ( );\n    void PutPlaylist (\n        struct IWMPPlaylist * ppPlaylist );\n    IWMPPlaylistPtr GetselectedPlaylist ( );\n    IWMPMediaPtr GetselectedMedia ( );\n\n    //\n    // Raw methods provided by interface\n    //\n\n      virtual HRESULT __stdcall get_dropDownVisible (\n        /*[out,retval]*/ VARIANT_BOOL * pVal ) = 0;\n      virtual HRESULT __stdcall put_dropDownVisible (\n        /*[in]*/ VARIANT_BOOL pVal ) = 0;\n      virtual HRESULT __stdcall get_foregroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_foregroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_backgroundColor (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_backgroundColor (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_fontSize (\n        /*[out,retval]*/ long * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontSize (\n        /*[in]*/ long pVal ) = 0;\n      virtual HRESULT __stdcall get_fontStyle (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontStyle (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_fontFace (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_fontFace (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_filter (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_filter (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_expandState (\n        /*[out,retval]*/ BSTR * pVal ) = 0;\n      virtual HRESULT __stdcall put_expandState (\n        /*[in]*/ BSTR pVal ) = 0;\n      virtual HRESULT __stdcall get_Playlist (\n        /*[out,retval]*/ struct IWMPPlaylist * * ppPlaylist ) = 0;\n      virtual HRESULT __stdcall put_Playlist (\n        /*[in]*/ struct IWMPPlaylist * ppPlaylist ) = 0;\n      virtual HRESULT __stdcall get_selectedPlaylist (\n        /*[out,retval]*/ struct IWMPPlaylist * * ppPlaylist ) = 0;\n      virtual HRESULT __stdcall get_selectedMedia (\n        /*[out,retval]*/ struct IWMPMedia * * ppMedia ) = 0;\n};\n\n//\n// Function implementation mapping\n//\n\n#pragma start_map_region(\"Utils\\wmp.tli\")\n__declspec(implementation_key(1)) _bstr_t IWMPSyncDevice::GetfriendlyName ( );\n__declspec(implementation_key(2)) void IWMPSyncDevice::PutfriendlyName ( _bstr_t pbstrName );\n__declspec(implementation_key(3)) _bstr_t IWMPSyncDevice::GetdeviceName ( );\n__declspec(implementation_key(4)) _bstr_t IWMPSyncDevice::GetdeviceId ( );\n__declspec(implementation_key(5)) long IWMPSyncDevice::GetpartnershipIndex ( );\n__declspec(implementation_key(6)) VARIANT_BOOL IWMPSyncDevice::Getconnected ( );\n__declspec(implementation_key(7)) enum WMPDeviceStatus IWMPSyncDevice::Getstatus ( );\n__declspec(implementation_key(8)) enum WMPSyncState IWMPSyncDevice::GetsyncState ( );\n__declspec(implementation_key(9)) long IWMPSyncDevice::Getprogress ( );\n__declspec(implementation_key(10)) _bstr_t IWMPSyncDevice::getItemInfo ( _bstr_t bstrItemName );\n__declspec(implementation_key(11)) HRESULT IWMPSyncDevice::createPartnership ( VARIANT_BOOL vbShowUI );\n__declspec(implementation_key(12)) HRESULT IWMPSyncDevice::deletePartnership ( );\n__declspec(implementation_key(13)) HRESULT IWMPSyncDevice::Start ( );\n__declspec(implementation_key(14)) HRESULT IWMPSyncDevice::stop ( );\n__declspec(implementation_key(15)) HRESULT IWMPSyncDevice::showSettings ( );\n__declspec(implementation_key(16)) VARIANT_BOOL IWMPSyncDevice::isIdentical ( struct IWMPSyncDevice * pDevice );\n__declspec(implementation_key(17)) enum WMPRipState IWMPCdromRip::GetripState ( );\n__declspec(implementation_key(18)) long IWMPCdromRip::GetripProgress ( );\n__declspec(implementation_key(19)) HRESULT IWMPCdromRip::startRip ( );\n__declspec(implementation_key(20)) HRESULT IWMPCdromRip::stopRip ( );\n__declspec(implementation_key(21)) long IWMPStringCollection::Getcount ( );\n__declspec(implementation_key(22)) _bstr_t IWMPStringCollection::Item ( long lIndex );\n__declspec(implementation_key(23)) HRESULT _WMPOCXEvents::OpenStateChange ( long NewState );\n__declspec(implementation_key(24)) HRESULT _WMPOCXEvents::PlayStateChange ( long NewState );\n__declspec(implementation_key(25)) HRESULT _WMPOCXEvents::AudioLanguageChange ( long LangID );\n__declspec(implementation_key(26)) HRESULT _WMPOCXEvents::StatusChange ( );\n__declspec(implementation_key(27)) HRESULT _WMPOCXEvents::ScriptCommand ( _bstr_t scType, _bstr_t Param );\n__declspec(implementation_key(28)) HRESULT _WMPOCXEvents::NewStream ( );\n__declspec(implementation_key(29)) HRESULT _WMPOCXEvents::Disconnect ( long Result );\n__declspec(implementation_key(30)) HRESULT _WMPOCXEvents::Buffering ( VARIANT_BOOL Start );\n__declspec(implementation_key(31)) HRESULT _WMPOCXEvents::Error ( );\n__declspec(implementation_key(32)) HRESULT _WMPOCXEvents::Warning ( long WarningType, long Param, _bstr_t Description );\n__declspec(implementation_key(33)) HRESULT _WMPOCXEvents::EndOfStream ( long Result );\n__declspec(implementation_key(34)) HRESULT _WMPOCXEvents::PositionChange ( double oldPosition, double newPosition );\n__declspec(implementation_key(35)) HRESULT _WMPOCXEvents::MarkerHit ( long MarkerNum );\n__declspec(implementation_key(36)) HRESULT _WMPOCXEvents::DurationUnitChange ( long NewDurationUnit );\n__declspec(implementation_key(37)) HRESULT _WMPOCXEvents::CdromMediaChange ( long CdromNum );\n__declspec(implementation_key(38)) HRESULT _WMPOCXEvents::PlaylistChange ( IDispatch * Playlist, enum WMPPlaylistChangeEventType change );\n__declspec(implementation_key(39)) HRESULT _WMPOCXEvents::CurrentPlaylistChange ( enum WMPPlaylistChangeEventType change );\n__declspec(implementation_key(40)) HRESULT _WMPOCXEvents::CurrentPlaylistItemAvailable ( _bstr_t bstrItemName );\n__declspec(implementation_key(41)) HRESULT _WMPOCXEvents::MediaChange ( IDispatch * Item );\n__declspec(implementation_key(42)) HRESULT _WMPOCXEvents::CurrentMediaItemAvailable ( _bstr_t bstrItemName );\n__declspec(implementation_key(43)) HRESULT _WMPOCXEvents::CurrentItemChange ( IDispatch * pdispMedia );\n__declspec(implementation_key(44)) HRESULT _WMPOCXEvents::MediaCollectionChange ( );\n__declspec(implementation_key(45)) HRESULT _WMPOCXEvents::MediaCollectionAttributeStringAdded ( _bstr_t bstrAttribName, _bstr_t bstrAttribVal );\n__declspec(implementation_key(46)) HRESULT _WMPOCXEvents::MediaCollectionAttributeStringRemoved ( _bstr_t bstrAttribName, _bstr_t bstrAttribVal );\n__declspec(implementation_key(47)) HRESULT _WMPOCXEvents::MediaCollectionAttributeStringChanged ( _bstr_t bstrAttribName, _bstr_t bstrOldAttribVal, _bstr_t bstrNewAttribVal );\n__declspec(implementation_key(48)) HRESULT _WMPOCXEvents::PlaylistCollectionChange ( );\n__declspec(implementation_key(49)) HRESULT _WMPOCXEvents::PlaylistCollectionPlaylistAdded ( _bstr_t bstrPlaylistName );\n__declspec(implementation_key(50)) HRESULT _WMPOCXEvents::PlaylistCollectionPlaylistRemoved ( _bstr_t bstrPlaylistName );\n__declspec(implementation_key(51)) HRESULT _WMPOCXEvents::PlaylistCollectionPlaylistSetAsDeleted ( _bstr_t bstrPlaylistName, VARIANT_BOOL varfIsDeleted );\n__declspec(implementation_key(52)) HRESULT _WMPOCXEvents::ModeChange ( _bstr_t ModeName, VARIANT_BOOL NewValue );\n__declspec(implementation_key(53)) HRESULT _WMPOCXEvents::MediaError ( IDispatch * pMediaObject );\n__declspec(implementation_key(54)) HRESULT _WMPOCXEvents::OpenPlaylistSwitch ( IDispatch * pItem );\n__declspec(implementation_key(55)) HRESULT _WMPOCXEvents::DomainChange ( _bstr_t strDomain );\n__declspec(implementation_key(56)) HRESULT _WMPOCXEvents::SwitchedToPlayerApplication ( );\n__declspec(implementation_key(57)) HRESULT _WMPOCXEvents::SwitchedToControl ( );\n__declspec(implementation_key(58)) HRESULT _WMPOCXEvents::PlayerDockedStateChange ( );\n__declspec(implementation_key(59)) HRESULT _WMPOCXEvents::PlayerReconnect ( );\n__declspec(implementation_key(60)) HRESULT _WMPOCXEvents::Click ( short nButton, short nShiftState, long fX, long fY );\n__declspec(implementation_key(61)) HRESULT _WMPOCXEvents::DoubleClick ( short nButton, short nShiftState, long fX, long fY );\n__declspec(implementation_key(62)) HRESULT _WMPOCXEvents::KeyDown ( short nKeyCode, short nShiftState );\n__declspec(implementation_key(63)) HRESULT _WMPOCXEvents::KeyPress ( short nKeyAscii );\n__declspec(implementation_key(64)) HRESULT _WMPOCXEvents::KeyUp ( short nKeyCode, short nShiftState );\n__declspec(implementation_key(65)) HRESULT _WMPOCXEvents::MouseDown ( short nButton, short nShiftState, long fX, long fY );\n__declspec(implementation_key(66)) HRESULT _WMPOCXEvents::MouseMove ( short nButton, short nShiftState, long fX, long fY );\n__declspec(implementation_key(67)) HRESULT _WMPOCXEvents::MouseUp ( short nButton, short nShiftState, long fX, long fY );\n__declspec(implementation_key(68)) HRESULT _WMPOCXEvents::DeviceConnect ( struct IWMPSyncDevice * pDevice );\n__declspec(implementation_key(69)) HRESULT _WMPOCXEvents::DeviceDisconnect ( struct IWMPSyncDevice * pDevice );\n__declspec(implementation_key(70)) HRESULT _WMPOCXEvents::DeviceStatusChange ( struct IWMPSyncDevice * pDevice, enum WMPDeviceStatus NewStatus );\n__declspec(implementation_key(71)) HRESULT _WMPOCXEvents::DeviceSyncStateChange ( struct IWMPSyncDevice * pDevice, enum WMPSyncState NewState );\n__declspec(implementation_key(72)) HRESULT _WMPOCXEvents::DeviceSyncError ( struct IWMPSyncDevice * pDevice, IDispatch * pMedia );\n__declspec(implementation_key(73)) HRESULT _WMPOCXEvents::CreatePartnershipComplete ( struct IWMPSyncDevice * pDevice, HRESULT hrResult );\n__declspec(implementation_key(74)) HRESULT _WMPOCXEvents::DeviceEstimation ( struct IWMPSyncDevice * pDevice, HRESULT hrResult, __int64 qwEstimatedUsedSpace, __int64 qwEstimatedSpace );\n__declspec(implementation_key(75)) HRESULT _WMPOCXEvents::CdromRipStateChange ( struct IWMPCdromRip * pCdromRip, enum WMPRipState wmprs );\n__declspec(implementation_key(76)) HRESULT _WMPOCXEvents::CdromRipMediaError ( struct IWMPCdromRip * pCdromRip, IDispatch * pMedia );\n__declspec(implementation_key(77)) HRESULT _WMPOCXEvents::CdromBurnStateChange ( struct IWMPCdromBurn * pCdromBurn, enum WMPBurnState wmpbs );\n__declspec(implementation_key(78)) HRESULT _WMPOCXEvents::CdromBurnMediaError ( struct IWMPCdromBurn * pCdromBurn, IDispatch * pMedia );\n__declspec(implementation_key(79)) HRESULT _WMPOCXEvents::CdromBurnError ( struct IWMPCdromBurn * pCdromBurn, HRESULT hrError );\n__declspec(implementation_key(80)) HRESULT _WMPOCXEvents::LibraryConnect ( struct IWMPLibrary * pLibrary );\n__declspec(implementation_key(81)) HRESULT _WMPOCXEvents::LibraryDisconnect ( struct IWMPLibrary * pLibrary );\n__declspec(implementation_key(82)) HRESULT _WMPOCXEvents::FolderScanStateChange ( enum WMPFolderScanState wmpfss );\n__declspec(implementation_key(83)) HRESULT _WMPOCXEvents::StringCollectionChange ( IDispatch * pdispStringCollection, enum WMPStringCollectionChangeEventType change, long lCollectionIndex );\n__declspec(implementation_key(84)) HRESULT _WMPOCXEvents::MediaCollectionMediaAdded ( IDispatch * pdispMedia );\n__declspec(implementation_key(85)) HRESULT _WMPOCXEvents::MediaCollectionMediaRemoved ( IDispatch * pdispMedia );\n__declspec(implementation_key(86)) VARIANT_BOOL IWMPSettings::GetisAvailable ( _bstr_t bstrItem );\n__declspec(implementation_key(87)) VARIANT_BOOL IWMPSettings::GetautoStart ( );\n__declspec(implementation_key(88)) void IWMPSettings::PutautoStart ( VARIANT_BOOL pfAutoStart );\n__declspec(implementation_key(89)) _bstr_t IWMPSettings::GetbaseURL ( );\n__declspec(implementation_key(90)) void IWMPSettings::PutbaseURL ( _bstr_t pbstrBaseURL );\n__declspec(implementation_key(91)) _bstr_t IWMPSettings::GetdefaultFrame ( );\n__declspec(implementation_key(92)) void IWMPSettings::PutdefaultFrame ( _bstr_t pbstrDefaultFrame );\n__declspec(implementation_key(93)) VARIANT_BOOL IWMPSettings::GetinvokeURLs ( );\n__declspec(implementation_key(94)) void IWMPSettings::PutinvokeURLs ( VARIANT_BOOL pfInvokeURLs );\n__declspec(implementation_key(95)) VARIANT_BOOL IWMPSettings::Getmute ( );\n__declspec(implementation_key(96)) void IWMPSettings::Putmute ( VARIANT_BOOL pfMute );\n__declspec(implementation_key(97)) long IWMPSettings::GetplayCount ( );\n__declspec(implementation_key(98)) void IWMPSettings::PutplayCount ( long plCount );\n__declspec(implementation_key(99)) double IWMPSettings::Getrate ( );\n__declspec(implementation_key(100)) void IWMPSettings::Putrate ( double pdRate );\n__declspec(implementation_key(101)) long IWMPSettings::Getbalance ( );\n__declspec(implementation_key(102)) void IWMPSettings::Putbalance ( long plBalance );\n__declspec(implementation_key(103)) long IWMPSettings::Getvolume ( );\n__declspec(implementation_key(104)) void IWMPSettings::Putvolume ( long plVolume );\n__declspec(implementation_key(105)) VARIANT_BOOL IWMPSettings::getMode ( _bstr_t bstrMode );\n__declspec(implementation_key(106)) HRESULT IWMPSettings::setMode ( _bstr_t bstrMode, VARIANT_BOOL varfMode );\n__declspec(implementation_key(107)) VARIANT_BOOL IWMPSettings::GetenableErrorDialogs ( );\n__declspec(implementation_key(108)) void IWMPSettings::PutenableErrorDialogs ( VARIANT_BOOL pfEnableErrorDialogs );\n__declspec(implementation_key(109)) long IWMPNetwork::GetbandWidth ( );\n__declspec(implementation_key(110)) long IWMPNetwork::GetrecoveredPackets ( );\n__declspec(implementation_key(111)) _bstr_t IWMPNetwork::GetsourceProtocol ( );\n__declspec(implementation_key(112)) long IWMPNetwork::GetreceivedPackets ( );\n__declspec(implementation_key(113)) long IWMPNetwork::GetlostPackets ( );\n__declspec(implementation_key(114)) long IWMPNetwork::GetreceptionQuality ( );\n__declspec(implementation_key(115)) long IWMPNetwork::GetbufferingCount ( );\n__declspec(implementation_key(116)) long IWMPNetwork::GetbufferingProgress ( );\n__declspec(implementation_key(117)) long IWMPNetwork::GetbufferingTime ( );\n__declspec(implementation_key(118)) void IWMPNetwork::PutbufferingTime ( long plBufferingTime );\n__declspec(implementation_key(119)) long IWMPNetwork::GetframeRate ( );\n__declspec(implementation_key(120)) long IWMPNetwork::GetmaxBitRate ( );\n__declspec(implementation_key(121)) long IWMPNetwork::GetbitRate ( );\n__declspec(implementation_key(122)) long IWMPNetwork::getProxySettings ( _bstr_t bstrProtocol );\n__declspec(implementation_key(123)) HRESULT IWMPNetwork::setProxySettings ( _bstr_t bstrProtocol, long lProxySetting );\n__declspec(implementation_key(124)) _bstr_t IWMPNetwork::getProxyName ( _bstr_t bstrProtocol );\n__declspec(implementation_key(125)) HRESULT IWMPNetwork::setProxyName ( _bstr_t bstrProtocol, _bstr_t bstrProxyName );\n__declspec(implementation_key(126)) long IWMPNetwork::getProxyPort ( _bstr_t bstrProtocol );\n__declspec(implementation_key(127)) HRESULT IWMPNetwork::setProxyPort ( _bstr_t bstrProtocol, long lProxyPort );\n__declspec(implementation_key(128)) _bstr_t IWMPNetwork::getProxyExceptionList ( _bstr_t bstrProtocol );\n__declspec(implementation_key(129)) HRESULT IWMPNetwork::setProxyExceptionList ( _bstr_t bstrProtocol, _bstr_t pbstrExceptionList );\n__declspec(implementation_key(130)) VARIANT_BOOL IWMPNetwork::getProxyBypassForLocal ( _bstr_t bstrProtocol );\n__declspec(implementation_key(131)) HRESULT IWMPNetwork::setProxyBypassForLocal ( _bstr_t bstrProtocol, VARIANT_BOOL fBypassForLocal );\n__declspec(implementation_key(132)) long IWMPNetwork::GetmaxBandwidth ( );\n__declspec(implementation_key(133)) void IWMPNetwork::PutmaxBandwidth ( long lMaxBandwidth );\n__declspec(implementation_key(134)) long IWMPNetwork::GetdownloadProgress ( );\n__declspec(implementation_key(135)) long IWMPNetwork::GetencodedFrameRate ( );\n__declspec(implementation_key(136)) long IWMPNetwork::GetframesSkipped ( );\n__declspec(implementation_key(137)) _bstr_t IWMPClosedCaption::GetSAMIStyle ( );\n__declspec(implementation_key(138)) void IWMPClosedCaption::PutSAMIStyle ( _bstr_t pbstrSAMIStyle );\n__declspec(implementation_key(139)) _bstr_t IWMPClosedCaption::GetSAMILang ( );\n__declspec(implementation_key(140)) void IWMPClosedCaption::PutSAMILang ( _bstr_t pbstrSAMILang );\n__declspec(implementation_key(141)) _bstr_t IWMPClosedCaption::GetSAMIFileName ( );\n__declspec(implementation_key(142)) void IWMPClosedCaption::PutSAMIFileName ( _bstr_t pbstrSAMIFileName );\n__declspec(implementation_key(143)) _bstr_t IWMPClosedCaption::GetcaptioningId ( );\n__declspec(implementation_key(144)) void IWMPClosedCaption::PutcaptioningId ( _bstr_t pbstrCaptioningID );\n__declspec(implementation_key(145)) long IWMPErrorItem::GeterrorCode ( );\n__declspec(implementation_key(146)) _bstr_t IWMPErrorItem::GeterrorDescription ( );\n__declspec(implementation_key(147)) _variant_t IWMPErrorItem::GeterrorContext ( );\n__declspec(implementation_key(148)) long IWMPErrorItem::Getremedy ( );\n__declspec(implementation_key(149)) _bstr_t IWMPErrorItem::GetcustomUrl ( );\n__declspec(implementation_key(150)) HRESULT IWMPError::clearErrorQueue ( );\n__declspec(implementation_key(151)) long IWMPError::GeterrorCount ( );\n__declspec(implementation_key(152)) IWMPErrorItemPtr IWMPError::GetItem ( long dwIndex );\n__declspec(implementation_key(153)) HRESULT IWMPError::webHelp ( );\n__declspec(implementation_key(154)) VARIANT_BOOL IWMPDVD::GetisAvailable ( _bstr_t bstrItem );\n__declspec(implementation_key(155)) _bstr_t IWMPDVD::Getdomain ( );\n__declspec(implementation_key(156)) HRESULT IWMPDVD::topMenu ( );\n__declspec(implementation_key(157)) HRESULT IWMPDVD::titleMenu ( );\n__declspec(implementation_key(158)) HRESULT IWMPDVD::back ( );\n__declspec(implementation_key(159)) HRESULT IWMPDVD::resume ( );\n__declspec(implementation_key(160)) HRESULT IWMPPlayerApplication::switchToPlayerApplication ( );\n__declspec(implementation_key(161)) HRESULT IWMPPlayerApplication::switchToControl ( );\n__declspec(implementation_key(162)) VARIANT_BOOL IWMPPlayerApplication::GetplayerDocked ( );\n__declspec(implementation_key(163)) VARIANT_BOOL IWMPPlayerApplication::GethasDisplay ( );\n__declspec(implementation_key(164)) long IWMPErrorItem2::Getcondition ( );\n__declspec(implementation_key(165)) _bstr_t IWMPMetadataPicture::GetmimeType ( );\n__declspec(implementation_key(166)) _bstr_t IWMPMetadataPicture::GetpictureType ( );\n__declspec(implementation_key(167)) _bstr_t IWMPMetadataPicture::GetDescription ( );\n__declspec(implementation_key(168)) _bstr_t IWMPMetadataPicture::GetURL ( );\n__declspec(implementation_key(169)) _bstr_t IWMPMetadataText::GetDescription ( );\n__declspec(implementation_key(170)) _bstr_t IWMPMetadataText::Gettext ( );\n__declspec(implementation_key(171)) long IWMPSettings2::GetdefaultAudioLanguage ( );\n__declspec(implementation_key(172)) _bstr_t IWMPSettings2::GetmediaAccessRights ( );\n__declspec(implementation_key(173)) VARIANT_BOOL IWMPSettings2::requestMediaAccessRights ( _bstr_t bstrDesiredAccess );\n__declspec(implementation_key(174)) long IWMPClosedCaption2::GetSAMILangCount ( );\n__declspec(implementation_key(175)) _bstr_t IWMPClosedCaption2::getSAMILangName ( long nIndex );\n__declspec(implementation_key(176)) long IWMPClosedCaption2::getSAMILangID ( long nIndex );\n__declspec(implementation_key(177)) long IWMPClosedCaption2::GetSAMIStyleCount ( );\n__declspec(implementation_key(178)) _bstr_t IWMPClosedCaption2::getSAMIStyleName ( long nIndex );\n__declspec(implementation_key(179)) HRESULT IWMPQuery::addCondition ( _bstr_t bstrAttribute, _bstr_t bstrOperator, _bstr_t bstrValue );\n__declspec(implementation_key(180)) HRESULT IWMPQuery::beginNextGroup ( );\n__declspec(implementation_key(181)) VARIANT_BOOL IWMPStringCollection2::isIdentical ( struct IWMPStringCollection2 * pIWMPStringCollection2 );\n__declspec(implementation_key(182)) _bstr_t IWMPStringCollection2::getItemInfo ( long lCollectionIndex, _bstr_t bstrItemName );\n__declspec(implementation_key(183)) long IWMPStringCollection2::getAttributeCountByType ( long lCollectionIndex, _bstr_t bstrType, _bstr_t bstrLanguage );\n__declspec(implementation_key(184)) _variant_t IWMPStringCollection2::getItemInfoByType ( long lCollectionIndex, _bstr_t bstrType, _bstr_t bstrLanguage, long lAttributeIndex );\n__declspec(implementation_key(185)) HRESULT IWMPPlayerServices::activateUIPlugin ( _bstr_t bstrPlugin );\n__declspec(implementation_key(186)) HRESULT IWMPPlayerServices::setTaskPane ( _bstr_t bstrTaskPane );\n__declspec(implementation_key(187)) HRESULT IWMPPlayerServices::setTaskPaneURL ( _bstr_t bstrTaskPane, _bstr_t bstrURL, _bstr_t bstrFriendlyName );\n__declspec(implementation_key(188)) HRESULT IWMPPlayerServices2::setBackgroundProcessingPriority ( _bstr_t bstrPriority );\n__declspec(implementation_key(189)) HRESULT IWMPRemoteMediaServices::GetServiceType ( BSTR * pbstrType );\n__declspec(implementation_key(190)) HRESULT IWMPRemoteMediaServices::GetApplicationName ( BSTR * pbstrName );\n__declspec(implementation_key(191)) HRESULT IWMPRemoteMediaServices::GetScriptableObject ( BSTR * pbstrName, IDispatch * * ppDispatch );\n__declspec(implementation_key(192)) HRESULT IWMPRemoteMediaServices::GetCustomUIMode ( BSTR * pbstrFile );\n__declspec(implementation_key(193)) long IWMPSyncServices::GetdeviceCount ( );\n__declspec(implementation_key(194)) IWMPSyncDevicePtr IWMPSyncServices::getDevice ( long lIndex );\n__declspec(implementation_key(195)) VARIANT_BOOL IWMPLibrarySharingServices::isLibraryShared ( );\n__declspec(implementation_key(196)) VARIANT_BOOL IWMPLibrarySharingServices::isLibrarySharingEnabled ( );\n__declspec(implementation_key(197)) HRESULT IWMPLibrarySharingServices::showLibrarySharing ( );\n__declspec(implementation_key(198)) long IWMPFolderMonitorServices::Getcount ( );\n__declspec(implementation_key(199)) _bstr_t IWMPFolderMonitorServices::Item ( long lIndex );\n__declspec(implementation_key(200)) HRESULT IWMPFolderMonitorServices::add ( _bstr_t bstrFolder );\n__declspec(implementation_key(201)) HRESULT IWMPFolderMonitorServices::remove ( long lIndex );\n__declspec(implementation_key(202)) enum WMPFolderScanState IWMPFolderMonitorServices::GetscanState ( );\n__declspec(implementation_key(203)) _bstr_t IWMPFolderMonitorServices::GetcurrentFolder ( );\n__declspec(implementation_key(204)) long IWMPFolderMonitorServices::GetscannedFilesCount ( );\n__declspec(implementation_key(205)) long IWMPFolderMonitorServices::GetaddedFilesCount ( );\n__declspec(implementation_key(206)) long IWMPFolderMonitorServices::GetupdateProgress ( );\n__declspec(implementation_key(207)) HRESULT IWMPFolderMonitorServices::startScan ( );\n__declspec(implementation_key(208)) HRESULT IWMPFolderMonitorServices::stopScan ( );\n__declspec(implementation_key(209)) HRESULT IWMPSyncDevice2::setItemInfo ( _bstr_t bstrItemName, _bstr_t bstrVal );\n__declspec(implementation_key(210)) VARIANT_BOOL IAppDispatch::GettitlebarVisible ( );\n__declspec(implementation_key(211)) void IAppDispatch::PuttitlebarVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(212)) VARIANT_BOOL IAppDispatch::GettitlebarAutoHide ( );\n__declspec(implementation_key(213)) void IAppDispatch::PuttitlebarAutoHide ( VARIANT_BOOL pVal );\n__declspec(implementation_key(214)) _bstr_t IAppDispatch::GetcurrentTask ( );\n__declspec(implementation_key(215)) void IAppDispatch::PutcurrentTask ( _bstr_t pVal );\n__declspec(implementation_key(216)) long IAppDispatch::GetlibraryBasketMode ( );\n__declspec(implementation_key(217)) void IAppDispatch::PutlibraryBasketMode ( long pVal );\n__declspec(implementation_key(218)) long IAppDispatch::GetlibraryBasketWidth ( );\n__declspec(implementation_key(219)) long IAppDispatch::GetbreadcrumbItemCount ( );\n__declspec(implementation_key(220)) _bstr_t IAppDispatch::GetbreadcrumbItemName ( long lIndex );\n__declspec(implementation_key(221)) VARIANT_BOOL IAppDispatch::GetbreadcrumbItemHasMenu ( long lIndex );\n__declspec(implementation_key(222)) HRESULT IAppDispatch::breadcrumbItemClick ( long lIndex );\n__declspec(implementation_key(223)) VARIANT_BOOL IAppDispatch::GetsettingsVisible ( );\n__declspec(implementation_key(224)) void IAppDispatch::PutsettingsVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(225)) VARIANT_BOOL IAppDispatch::GetplaylistVisible ( );\n__declspec(implementation_key(226)) void IAppDispatch::PutplaylistVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(227)) HRESULT IAppDispatch::gotoSkinMode ( );\n__declspec(implementation_key(228)) HRESULT IAppDispatch::gotoPlayerMode ( );\n__declspec(implementation_key(229)) HRESULT IAppDispatch::gotoLibraryMode ( long lButton );\n__declspec(implementation_key(230)) HRESULT IAppDispatch::navigatePrevious ( );\n__declspec(implementation_key(231)) HRESULT IAppDispatch::navigateNext ( );\n__declspec(implementation_key(232)) HRESULT IAppDispatch::goFullScreen ( );\n__declspec(implementation_key(233)) VARIANT_BOOL IAppDispatch::GetfullScreenEnabled ( );\n__declspec(implementation_key(234)) VARIANT_BOOL IAppDispatch::GetserviceLoginVisible ( );\n__declspec(implementation_key(235)) VARIANT_BOOL IAppDispatch::GetserviceLoginSignedIn ( );\n__declspec(implementation_key(236)) HRESULT IAppDispatch::serviceLogin ( );\n__declspec(implementation_key(237)) HRESULT IAppDispatch::serviceLogout ( );\n__declspec(implementation_key(238)) _variant_t IAppDispatch::GetserviceGetInfo ( _bstr_t bstrItem );\n__declspec(implementation_key(239)) VARIANT_BOOL IAppDispatch::GetnavigatePreviousEnabled ( );\n__declspec(implementation_key(240)) VARIANT_BOOL IAppDispatch::GetnavigateNextEnabled ( );\n__declspec(implementation_key(241)) HRESULT IAppDispatch::navigateToAddress ( _bstr_t address );\n__declspec(implementation_key(242)) VARIANT_BOOL IAppDispatch::GetglassEnabled ( );\n__declspec(implementation_key(243)) VARIANT_BOOL IAppDispatch::GetinVistaPlus ( );\n__declspec(implementation_key(244)) HRESULT IAppDispatch::adjustLeft ( long nDistance );\n__declspec(implementation_key(245)) VARIANT_BOOL IAppDispatch::GettaskbarVisible ( );\n__declspec(implementation_key(246)) void IAppDispatch::PuttaskbarVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(247)) long IAppDispatch::GetDPI ( );\n__declspec(implementation_key(248)) VARIANT_BOOL IAppDispatch::GetpreviousEnabled ( );\n__declspec(implementation_key(249)) VARIANT_BOOL IAppDispatch::GetplayLibraryItemEnabled ( );\n__declspec(implementation_key(250)) HRESULT IAppDispatch::previous ( );\n__declspec(implementation_key(251)) VARIANT_BOOL IAppDispatch::GettitlebarCurrentlyVisible ( );\n__declspec(implementation_key(252)) VARIANT_BOOL IAppDispatch::GetmenubarCurrentlyVisible ( );\n__declspec(implementation_key(253)) VARIANT_BOOL IAppDispatch::GetbgPluginRunning ( );\n__declspec(implementation_key(254)) HRESULT IAppDispatch::configurePlugins ( long nType );\n__declspec(implementation_key(255)) _bstr_t IAppDispatch::getTimeString ( double dTime );\n__declspec(implementation_key(256)) VARIANT_BOOL IAppDispatch::Getmaximized ( );\n__declspec(implementation_key(257)) long IAppDispatch::Gettop ( );\n__declspec(implementation_key(258)) void IAppDispatch::Puttop ( long pVal );\n__declspec(implementation_key(259)) long IAppDispatch::Getleft ( );\n__declspec(implementation_key(260)) void IAppDispatch::Putleft ( long pVal );\n__declspec(implementation_key(261)) long IAppDispatch::Getwidth ( );\n__declspec(implementation_key(262)) void IAppDispatch::Putwidth ( long pVal );\n__declspec(implementation_key(263)) long IAppDispatch::Getheight ( );\n__declspec(implementation_key(264)) void IAppDispatch::Putheight ( long pVal );\n__declspec(implementation_key(265)) HRESULT IAppDispatch::setWindowPos ( long lTop, long lLeft, long lWidth, long lHeight );\n__declspec(implementation_key(266)) HRESULT IAppDispatch::logData ( _bstr_t ID, _bstr_t data );\n__declspec(implementation_key(267)) _bstr_t IAppDispatch::GetpowerPersonality ( );\n__declspec(implementation_key(268)) HRESULT IAppDispatch::navigateNamespace ( _bstr_t address );\n__declspec(implementation_key(269)) _bstr_t IAppDispatch::GetexclusiveService ( );\n__declspec(implementation_key(270)) void IAppDispatch::PutwindowText ( _bstr_t _arg1 );\n__declspec(implementation_key(271)) _bstr_t IWMPSafeBrowser::GetURL ( );\n__declspec(implementation_key(272)) void IWMPSafeBrowser::PutURL ( _bstr_t pVal );\n__declspec(implementation_key(273)) long IWMPSafeBrowser::Getstatus ( );\n__declspec(implementation_key(274)) long IWMPSafeBrowser::GetpendingDownloads ( );\n__declspec(implementation_key(275)) HRESULT IWMPSafeBrowser::showSAMIText ( _bstr_t samiText );\n__declspec(implementation_key(276)) HRESULT IWMPSafeBrowser::showLyrics ( _bstr_t lyrics );\n__declspec(implementation_key(277)) HRESULT IWMPSafeBrowser::loadSpecialPage ( _bstr_t pageName );\n__declspec(implementation_key(278)) HRESULT IWMPSafeBrowser::goBack ( );\n__declspec(implementation_key(279)) HRESULT IWMPSafeBrowser::goForward ( );\n__declspec(implementation_key(280)) HRESULT IWMPSafeBrowser::stop ( );\n__declspec(implementation_key(281)) HRESULT IWMPSafeBrowser::refresh ( );\n__declspec(implementation_key(282)) _bstr_t IWMPSafeBrowser::GetbaseURL ( );\n__declspec(implementation_key(283)) _bstr_t IWMPSafeBrowser::GetfullURL ( );\n__declspec(implementation_key(284)) long IWMPSafeBrowser::GetsecureLock ( );\n__declspec(implementation_key(285)) VARIANT_BOOL IWMPSafeBrowser::Getbusy ( );\n__declspec(implementation_key(286)) HRESULT IWMPSafeBrowser::showCert ( );\n__declspec(implementation_key(287)) _bstr_t IWMPObjectExtendedProps::GetID ( );\n__declspec(implementation_key(288)) _bstr_t IWMPObjectExtendedProps::GetelementType ( );\n__declspec(implementation_key(289)) long IWMPObjectExtendedProps::Getleft ( );\n__declspec(implementation_key(290)) void IWMPObjectExtendedProps::Putleft ( long pVal );\n__declspec(implementation_key(291)) long IWMPObjectExtendedProps::Gettop ( );\n__declspec(implementation_key(292)) void IWMPObjectExtendedProps::Puttop ( long pVal );\n__declspec(implementation_key(293)) long IWMPObjectExtendedProps::Getright ( );\n__declspec(implementation_key(294)) void IWMPObjectExtendedProps::Putright ( long pVal );\n__declspec(implementation_key(295)) long IWMPObjectExtendedProps::Getbottom ( );\n__declspec(implementation_key(296)) void IWMPObjectExtendedProps::Putbottom ( long pVal );\n__declspec(implementation_key(297)) long IWMPObjectExtendedProps::Getwidth ( );\n__declspec(implementation_key(298)) void IWMPObjectExtendedProps::Putwidth ( long pVal );\n__declspec(implementation_key(299)) long IWMPObjectExtendedProps::Getheight ( );\n__declspec(implementation_key(300)) void IWMPObjectExtendedProps::Putheight ( long pVal );\n__declspec(implementation_key(301)) long IWMPObjectExtendedProps::GetzIndex ( );\n__declspec(implementation_key(302)) void IWMPObjectExtendedProps::PutzIndex ( long pVal );\n__declspec(implementation_key(303)) _bstr_t IWMPObjectExtendedProps::GetclippingImage ( );\n__declspec(implementation_key(304)) void IWMPObjectExtendedProps::PutclippingImage ( _bstr_t pVal );\n__declspec(implementation_key(305)) _bstr_t IWMPObjectExtendedProps::GetclippingColor ( );\n__declspec(implementation_key(306)) void IWMPObjectExtendedProps::PutclippingColor ( _bstr_t pVal );\n__declspec(implementation_key(307)) VARIANT_BOOL IWMPObjectExtendedProps::Getvisible ( );\n__declspec(implementation_key(308)) void IWMPObjectExtendedProps::Putvisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(309)) VARIANT_BOOL IWMPObjectExtendedProps::Getenabled ( );\n__declspec(implementation_key(310)) void IWMPObjectExtendedProps::Putenabled ( VARIANT_BOOL pVal );\n__declspec(implementation_key(311)) VARIANT_BOOL IWMPObjectExtendedProps::GettabStop ( );\n__declspec(implementation_key(312)) void IWMPObjectExtendedProps::PuttabStop ( VARIANT_BOOL pVal );\n__declspec(implementation_key(313)) VARIANT_BOOL IWMPObjectExtendedProps::GetpassThrough ( );\n__declspec(implementation_key(314)) void IWMPObjectExtendedProps::PutpassThrough ( VARIANT_BOOL pVal );\n__declspec(implementation_key(315)) _bstr_t IWMPObjectExtendedProps::GethorizontalAlignment ( );\n__declspec(implementation_key(316)) void IWMPObjectExtendedProps::PuthorizontalAlignment ( _bstr_t pVal );\n__declspec(implementation_key(317)) _bstr_t IWMPObjectExtendedProps::GetverticalAlignment ( );\n__declspec(implementation_key(318)) void IWMPObjectExtendedProps::PutverticalAlignment ( _bstr_t pVal );\n__declspec(implementation_key(319)) HRESULT IWMPObjectExtendedProps::moveTo ( long newX, long newY, long moveTime );\n__declspec(implementation_key(320)) HRESULT IWMPObjectExtendedProps::slideTo ( long newX, long newY, long moveTime );\n__declspec(implementation_key(321)) HRESULT IWMPObjectExtendedProps::moveSizeTo ( long newX, long newY, long newWidth, long newHeight, long moveTime, VARIANT_BOOL fSlide );\n__declspec(implementation_key(322)) long IWMPObjectExtendedProps::GetalphaBlend ( );\n__declspec(implementation_key(323)) void IWMPObjectExtendedProps::PutalphaBlend ( long pVal );\n__declspec(implementation_key(324)) HRESULT IWMPObjectExtendedProps::alphaBlendTo ( long newVal, long alphaTime );\n__declspec(implementation_key(325)) _bstr_t IWMPObjectExtendedProps::GetaccName ( );\n__declspec(implementation_key(326)) void IWMPObjectExtendedProps::PutaccName ( _bstr_t pszName );\n__declspec(implementation_key(327)) _bstr_t IWMPObjectExtendedProps::GetaccDescription ( );\n__declspec(implementation_key(328)) void IWMPObjectExtendedProps::PutaccDescription ( _bstr_t pszDesc );\n__declspec(implementation_key(329)) _bstr_t IWMPObjectExtendedProps::GetaccKeyboardShortcut ( );\n__declspec(implementation_key(330)) void IWMPObjectExtendedProps::PutaccKeyboardShortcut ( _bstr_t pszShortcut );\n__declspec(implementation_key(331)) VARIANT_BOOL IWMPObjectExtendedProps::GetresizeImages ( );\n__declspec(implementation_key(332)) void IWMPObjectExtendedProps::PutresizeImages ( VARIANT_BOOL pVal );\n__declspec(implementation_key(333)) _bstr_t IWMPObjectExtendedProps::GetnineGridMargins ( );\n__declspec(implementation_key(334)) void IWMPObjectExtendedProps::PutnineGridMargins ( _bstr_t pszMargins );\n__declspec(implementation_key(335)) _bstr_t IWMPObjectExtendedProps::GetresizeOptimize ( );\n__declspec(implementation_key(336)) void IWMPObjectExtendedProps::PutresizeOptimize ( _bstr_t ppszResizeOptimize );\n__declspec(implementation_key(337)) float IWMPObjectExtendedProps::Getrotation ( );\n__declspec(implementation_key(338)) void IWMPObjectExtendedProps::Putrotation ( float pfVal );\n__declspec(implementation_key(339)) _bstr_t IWMPLayoutSubView::GettransparencyColor ( );\n__declspec(implementation_key(340)) void IWMPLayoutSubView::PuttransparencyColor ( _bstr_t pVal );\n__declspec(implementation_key(341)) _bstr_t IWMPLayoutSubView::GetbackgroundColor ( );\n__declspec(implementation_key(342)) void IWMPLayoutSubView::PutbackgroundColor ( _bstr_t pVal );\n__declspec(implementation_key(343)) _bstr_t IWMPLayoutSubView::GetbackgroundImage ( );\n__declspec(implementation_key(344)) void IWMPLayoutSubView::PutbackgroundImage ( _bstr_t pVal );\n__declspec(implementation_key(345)) VARIANT_BOOL IWMPLayoutSubView::GetbackgroundTiled ( );\n__declspec(implementation_key(346)) void IWMPLayoutSubView::PutbackgroundTiled ( VARIANT_BOOL pVal );\n__declspec(implementation_key(347)) float IWMPLayoutSubView::GetbackgroundImageHueShift ( );\n__declspec(implementation_key(348)) void IWMPLayoutSubView::PutbackgroundImageHueShift ( float pVal );\n__declspec(implementation_key(349)) float IWMPLayoutSubView::GetbackgroundImageSaturation ( );\n__declspec(implementation_key(350)) void IWMPLayoutSubView::PutbackgroundImageSaturation ( float pVal );\n__declspec(implementation_key(351)) VARIANT_BOOL IWMPLayoutSubView::GetresizeBackgroundImage ( );\n__declspec(implementation_key(352)) void IWMPLayoutSubView::PutresizeBackgroundImage ( VARIANT_BOOL pVal );\n__declspec(implementation_key(353)) _bstr_t IWMPLayoutView::Gettitle ( );\n__declspec(implementation_key(354)) void IWMPLayoutView::Puttitle ( _bstr_t pVal );\n__declspec(implementation_key(355)) _bstr_t IWMPLayoutView::Getcategory ( );\n__declspec(implementation_key(356)) void IWMPLayoutView::Putcategory ( _bstr_t pVal );\n__declspec(implementation_key(357)) _bstr_t IWMPLayoutView::GetfocusObjectID ( );\n__declspec(implementation_key(358)) void IWMPLayoutView::PutfocusObjectID ( _bstr_t pVal );\n__declspec(implementation_key(359)) VARIANT_BOOL IWMPLayoutView::GettitleBar ( );\n__declspec(implementation_key(360)) VARIANT_BOOL IWMPLayoutView::Getresizable ( );\n__declspec(implementation_key(361)) long IWMPLayoutView::GettimerInterval ( );\n__declspec(implementation_key(362)) void IWMPLayoutView::PuttimerInterval ( long pVal );\n__declspec(implementation_key(363)) long IWMPLayoutView::GetminWidth ( );\n__declspec(implementation_key(364)) void IWMPLayoutView::PutminWidth ( long pVal );\n__declspec(implementation_key(365)) long IWMPLayoutView::GetmaxWidth ( );\n__declspec(implementation_key(366)) void IWMPLayoutView::PutmaxWidth ( long pVal );\n__declspec(implementation_key(367)) long IWMPLayoutView::GetminHeight ( );\n__declspec(implementation_key(368)) void IWMPLayoutView::PutminHeight ( long pVal );\n__declspec(implementation_key(369)) long IWMPLayoutView::GetmaxHeight ( );\n__declspec(implementation_key(370)) void IWMPLayoutView::PutmaxHeight ( long pVal );\n__declspec(implementation_key(371)) HRESULT IWMPLayoutView::close ( );\n__declspec(implementation_key(372)) HRESULT IWMPLayoutView::minimize ( );\n__declspec(implementation_key(373)) HRESULT IWMPLayoutView::maximize ( );\n__declspec(implementation_key(374)) HRESULT IWMPLayoutView::restore ( );\n__declspec(implementation_key(375)) HRESULT IWMPLayoutView::size ( _bstr_t bstrDirection );\n__declspec(implementation_key(376)) HRESULT IWMPLayoutView::returnToMediaCenter ( );\n__declspec(implementation_key(377)) HRESULT IWMPLayoutView::updateWindow ( );\n__declspec(implementation_key(378)) VARIANT_BOOL IWMPLayoutView::Getmaximized ( );\n__declspec(implementation_key(379)) VARIANT_BOOL IWMPLayoutView::Getminimized ( );\n__declspec(implementation_key(380)) IDispatchPtr IWMPEventObject::GetsrcElement ( );\n__declspec(implementation_key(381)) VARIANT_BOOL IWMPEventObject::GetaltKey ( );\n__declspec(implementation_key(382)) VARIANT_BOOL IWMPEventObject::GetctrlKey ( );\n__declspec(implementation_key(383)) VARIANT_BOOL IWMPEventObject::GetshiftKey ( );\n__declspec(implementation_key(384)) IDispatchPtr IWMPEventObject::GetfromElement ( );\n__declspec(implementation_key(385)) IDispatchPtr IWMPEventObject::GettoElement ( );\n__declspec(implementation_key(386)) void IWMPEventObject::PutkeyCode ( long p );\n__declspec(implementation_key(387)) long IWMPEventObject::GetkeyCode ( );\n__declspec(implementation_key(388)) long IWMPEventObject::Getbutton ( );\n__declspec(implementation_key(389)) long IWMPEventObject::Getx ( );\n__declspec(implementation_key(390)) long IWMPEventObject::Gety ( );\n__declspec(implementation_key(391)) long IWMPEventObject::GetclientX ( );\n__declspec(implementation_key(392)) long IWMPEventObject::GetclientY ( );\n__declspec(implementation_key(393)) long IWMPEventObject::GetoffsetX ( );\n__declspec(implementation_key(394)) long IWMPEventObject::GetoffsetY ( );\n__declspec(implementation_key(395)) long IWMPEventObject::GetscreenX ( );\n__declspec(implementation_key(396)) long IWMPEventObject::GetscreenY ( );\n__declspec(implementation_key(397)) long IWMPEventObject::GetscreenWidth ( );\n__declspec(implementation_key(398)) long IWMPEventObject::GetscreenHeight ( );\n__declspec(implementation_key(399)) VARIANT_BOOL IWMPEventObject::GetpenOrTouch ( );\n__declspec(implementation_key(400)) _bstr_t IWMPTheme::Gettitle ( );\n__declspec(implementation_key(401)) float IWMPTheme::Getversion ( );\n__declspec(implementation_key(402)) _bstr_t IWMPTheme::GetauthorVersion ( );\n__declspec(implementation_key(403)) _bstr_t IWMPTheme::Getauthor ( );\n__declspec(implementation_key(404)) _bstr_t IWMPTheme::Getcopyright ( );\n__declspec(implementation_key(405)) _bstr_t IWMPTheme::GetcurrentViewID ( );\n__declspec(implementation_key(406)) void IWMPTheme::PutcurrentViewID ( _bstr_t pVal );\n__declspec(implementation_key(407)) HRESULT IWMPTheme::showErrorDialog ( );\n__declspec(implementation_key(408)) HRESULT IWMPTheme::logString ( _bstr_t stringVal );\n__declspec(implementation_key(409)) HRESULT IWMPTheme::openView ( _bstr_t viewID );\n__declspec(implementation_key(410)) IDispatchPtr IWMPTheme::openViewRelative ( _bstr_t viewID, long x, long y );\n__declspec(implementation_key(411)) HRESULT IWMPTheme::closeView ( _bstr_t viewID );\n__declspec(implementation_key(412)) _bstr_t IWMPTheme::openDialog ( _bstr_t dialogType, _bstr_t parameters );\n__declspec(implementation_key(413)) _bstr_t IWMPTheme::loadString ( _bstr_t bstrString );\n__declspec(implementation_key(414)) _bstr_t IWMPTheme::loadPreference ( _bstr_t bstrName );\n__declspec(implementation_key(415)) HRESULT IWMPTheme::savePreference ( _bstr_t bstrName, _bstr_t bstrValue );\n__declspec(implementation_key(416)) HRESULT IWMPTheme::playSound ( _bstr_t bstrFilename );\n__declspec(implementation_key(417)) IDispatchPtr IWMPTheme::openViewRelativeInternal ( _bstr_t viewID, long nIndex, long x, long y, long nWidth, long nHeight, _bstr_t bstrHorizontalAlignment, _bstr_t bstrVerticalAlignment );\n__declspec(implementation_key(418)) HRESULT IWMPTheme::setViewPosition ( _bstr_t viewID, long nIndex, long x, long y, long nWidth, long nHeight, _bstr_t bstrHorizontalAlignment, _bstr_t bstrVerticalAlignment );\n__declspec(implementation_key(419)) _bstr_t IWMPLayoutSettingsDispatch::GeteffectType ( );\n__declspec(implementation_key(420)) void IWMPLayoutSettingsDispatch::PuteffectType ( _bstr_t pVal );\n__declspec(implementation_key(421)) long IWMPLayoutSettingsDispatch::GeteffectPreset ( );\n__declspec(implementation_key(422)) void IWMPLayoutSettingsDispatch::PuteffectPreset ( long pVal );\n__declspec(implementation_key(423)) _bstr_t IWMPLayoutSettingsDispatch::GetsettingsView ( );\n__declspec(implementation_key(424)) void IWMPLayoutSettingsDispatch::PutsettingsView ( _bstr_t pVal );\n__declspec(implementation_key(425)) long IWMPLayoutSettingsDispatch::GetvideoZoom ( );\n__declspec(implementation_key(426)) void IWMPLayoutSettingsDispatch::PutvideoZoom ( long pVal );\n__declspec(implementation_key(427)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetvideoShrinkToFit ( );\n__declspec(implementation_key(428)) void IWMPLayoutSettingsDispatch::PutvideoShrinkToFit ( VARIANT_BOOL pVal );\n__declspec(implementation_key(429)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetvideoStretchToFit ( );\n__declspec(implementation_key(430)) void IWMPLayoutSettingsDispatch::PutvideoStretchToFit ( VARIANT_BOOL pVal );\n__declspec(implementation_key(431)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetuserVideoStretchToFit ( );\n__declspec(implementation_key(432)) void IWMPLayoutSettingsDispatch::PutuserVideoStretchToFit ( VARIANT_BOOL pVal );\n__declspec(implementation_key(433)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetshowCaptions ( );\n__declspec(implementation_key(434)) void IWMPLayoutSettingsDispatch::PutshowCaptions ( VARIANT_BOOL pVal );\n__declspec(implementation_key(435)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetshowTitles ( );\n__declspec(implementation_key(436)) void IWMPLayoutSettingsDispatch::PutshowTitles ( VARIANT_BOOL pVal );\n__declspec(implementation_key(437)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetshowEffects ( );\n__declspec(implementation_key(438)) void IWMPLayoutSettingsDispatch::PutshowEffects ( VARIANT_BOOL pVal );\n__declspec(implementation_key(439)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetshowFullScreenPlaylist ( );\n__declspec(implementation_key(440)) void IWMPLayoutSettingsDispatch::PutshowFullScreenPlaylist ( VARIANT_BOOL pVal );\n__declspec(implementation_key(441)) _bstr_t IWMPLayoutSettingsDispatch::GetcontrastMode ( );\n__declspec(implementation_key(442)) _bstr_t IWMPLayoutSettingsDispatch::getNamedString ( _bstr_t bstrName );\n__declspec(implementation_key(443)) _bstr_t IWMPLayoutSettingsDispatch::getDurationStringFromSeconds ( long lDurationVal );\n__declspec(implementation_key(444)) _bstr_t IWMPLayoutSettingsDispatch::GetdisplayView ( );\n__declspec(implementation_key(445)) void IWMPLayoutSettingsDispatch::PutdisplayView ( _bstr_t pVal );\n__declspec(implementation_key(446)) _bstr_t IWMPLayoutSettingsDispatch::GetmetadataView ( );\n__declspec(implementation_key(447)) void IWMPLayoutSettingsDispatch::PutmetadataView ( _bstr_t pVal );\n__declspec(implementation_key(448)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetshowSettings ( );\n__declspec(implementation_key(449)) void IWMPLayoutSettingsDispatch::PutshowSettings ( VARIANT_BOOL pVal );\n__declspec(implementation_key(450)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetshowResizeBars ( );\n__declspec(implementation_key(451)) void IWMPLayoutSettingsDispatch::PutshowResizeBars ( VARIANT_BOOL pVal );\n__declspec(implementation_key(452)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetshowPlaylist ( );\n__declspec(implementation_key(453)) void IWMPLayoutSettingsDispatch::PutshowPlaylist ( VARIANT_BOOL pVal );\n__declspec(implementation_key(454)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetshowMetadata ( );\n__declspec(implementation_key(455)) void IWMPLayoutSettingsDispatch::PutshowMetadata ( VARIANT_BOOL pVal );\n__declspec(implementation_key(456)) long IWMPLayoutSettingsDispatch::GetsettingsWidth ( );\n__declspec(implementation_key(457)) void IWMPLayoutSettingsDispatch::PutsettingsWidth ( long pVal );\n__declspec(implementation_key(458)) long IWMPLayoutSettingsDispatch::GetsettingsHeight ( );\n__declspec(implementation_key(459)) void IWMPLayoutSettingsDispatch::PutsettingsHeight ( long pVal );\n__declspec(implementation_key(460)) long IWMPLayoutSettingsDispatch::GetplaylistWidth ( );\n__declspec(implementation_key(461)) void IWMPLayoutSettingsDispatch::PutplaylistWidth ( long pVal );\n__declspec(implementation_key(462)) long IWMPLayoutSettingsDispatch::GetplaylistHeight ( );\n__declspec(implementation_key(463)) void IWMPLayoutSettingsDispatch::PutplaylistHeight ( long pVal );\n__declspec(implementation_key(464)) long IWMPLayoutSettingsDispatch::GetmetadataWidth ( );\n__declspec(implementation_key(465)) void IWMPLayoutSettingsDispatch::PutmetadataWidth ( long pVal );\n__declspec(implementation_key(466)) long IWMPLayoutSettingsDispatch::GetmetadataHeight ( );\n__declspec(implementation_key(467)) void IWMPLayoutSettingsDispatch::PutmetadataHeight ( long pVal );\n__declspec(implementation_key(468)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetfullScreenAvailable ( );\n__declspec(implementation_key(469)) void IWMPLayoutSettingsDispatch::PutfullScreenAvailable ( VARIANT_BOOL pVal );\n__declspec(implementation_key(470)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetfullScreenRequest ( );\n__declspec(implementation_key(471)) void IWMPLayoutSettingsDispatch::PutfullScreenRequest ( VARIANT_BOOL pVal );\n__declspec(implementation_key(472)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetquickHide ( );\n__declspec(implementation_key(473)) void IWMPLayoutSettingsDispatch::PutquickHide ( VARIANT_BOOL pVal );\n__declspec(implementation_key(474)) long IWMPLayoutSettingsDispatch::GetdisplayPreset ( );\n__declspec(implementation_key(475)) void IWMPLayoutSettingsDispatch::PutdisplayPreset ( long pVal );\n__declspec(implementation_key(476)) long IWMPLayoutSettingsDispatch::GetsettingsPreset ( );\n__declspec(implementation_key(477)) void IWMPLayoutSettingsDispatch::PutsettingsPreset ( long pVal );\n__declspec(implementation_key(478)) long IWMPLayoutSettingsDispatch::GetmetadataPreset ( );\n__declspec(implementation_key(479)) void IWMPLayoutSettingsDispatch::PutmetadataPreset ( long pVal );\n__declspec(implementation_key(480)) _bstr_t IWMPLayoutSettingsDispatch::GetuserDisplayView ( );\n__declspec(implementation_key(481)) _bstr_t IWMPLayoutSettingsDispatch::GetuserWMPDisplayView ( );\n__declspec(implementation_key(482)) long IWMPLayoutSettingsDispatch::GetuserDisplayPreset ( );\n__declspec(implementation_key(483)) long IWMPLayoutSettingsDispatch::GetuserWMPDisplayPreset ( );\n__declspec(implementation_key(484)) long IWMPLayoutSettingsDispatch::GetdynamicRangeControl ( );\n__declspec(implementation_key(485)) void IWMPLayoutSettingsDispatch::PutdynamicRangeControl ( long pVal );\n__declspec(implementation_key(486)) float IWMPLayoutSettingsDispatch::GetslowRate ( );\n__declspec(implementation_key(487)) void IWMPLayoutSettingsDispatch::PutslowRate ( float pVal );\n__declspec(implementation_key(488)) float IWMPLayoutSettingsDispatch::GetfastRate ( );\n__declspec(implementation_key(489)) void IWMPLayoutSettingsDispatch::PutfastRate ( float pVal );\n__declspec(implementation_key(490)) float IWMPLayoutSettingsDispatch::GetbuttonHueShift ( );\n__declspec(implementation_key(491)) void IWMPLayoutSettingsDispatch::PutbuttonHueShift ( float pVal );\n__declspec(implementation_key(492)) float IWMPLayoutSettingsDispatch::GetbuttonSaturation ( );\n__declspec(implementation_key(493)) void IWMPLayoutSettingsDispatch::PutbuttonSaturation ( float pVal );\n__declspec(implementation_key(494)) float IWMPLayoutSettingsDispatch::GetbackHueShift ( );\n__declspec(implementation_key(495)) void IWMPLayoutSettingsDispatch::PutbackHueShift ( float pVal );\n__declspec(implementation_key(496)) float IWMPLayoutSettingsDispatch::GetbackSaturation ( );\n__declspec(implementation_key(497)) void IWMPLayoutSettingsDispatch::PutbackSaturation ( float pVal );\n__declspec(implementation_key(498)) long IWMPLayoutSettingsDispatch::GetvizRequest ( );\n__declspec(implementation_key(499)) void IWMPLayoutSettingsDispatch::PutvizRequest ( long pVal );\n__declspec(implementation_key(500)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorLight ( );\n__declspec(implementation_key(501)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorMedium ( );\n__declspec(implementation_key(502)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorDark ( );\n__declspec(implementation_key(503)) _bstr_t IWMPLayoutSettingsDispatch::GettoolbarButtonHighlight ( );\n__declspec(implementation_key(504)) _bstr_t IWMPLayoutSettingsDispatch::GettoolbarButtonShadow ( );\n__declspec(implementation_key(505)) _bstr_t IWMPLayoutSettingsDispatch::GettoolbarButtonFace ( );\n__declspec(implementation_key(506)) _bstr_t IWMPLayoutSettingsDispatch::GetitemPlayingColor ( );\n__declspec(implementation_key(507)) _bstr_t IWMPLayoutSettingsDispatch::GetitemPlayingBackgroundColor ( );\n__declspec(implementation_key(508)) _bstr_t IWMPLayoutSettingsDispatch::GetitemErrorColor ( );\n__declspec(implementation_key(509)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetappColorLimited ( );\n__declspec(implementation_key(510)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetappColorBlackBackground ( );\n__declspec(implementation_key(511)) void IWMPLayoutSettingsDispatch::PutappColorBlackBackground ( VARIANT_BOOL pVal );\n__declspec(implementation_key(512)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorVideoBorder ( );\n__declspec(implementation_key(513)) void IWMPLayoutSettingsDispatch::PutappColorVideoBorder ( _bstr_t pVal );\n__declspec(implementation_key(514)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux1 ( );\n__declspec(implementation_key(515)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux2 ( );\n__declspec(implementation_key(516)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux3 ( );\n__declspec(implementation_key(517)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux4 ( );\n__declspec(implementation_key(518)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux5 ( );\n__declspec(implementation_key(519)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux6 ( );\n__declspec(implementation_key(520)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux7 ( );\n__declspec(implementation_key(521)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux8 ( );\n__declspec(implementation_key(522)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux9 ( );\n__declspec(implementation_key(523)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux10 ( );\n__declspec(implementation_key(524)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux11 ( );\n__declspec(implementation_key(525)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux12 ( );\n__declspec(implementation_key(526)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux13 ( );\n__declspec(implementation_key(527)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux14 ( );\n__declspec(implementation_key(528)) _bstr_t IWMPLayoutSettingsDispatch::GetappColorAux15 ( );\n__declspec(implementation_key(529)) _bstr_t IWMPLayoutSettingsDispatch::Getstatus ( );\n__declspec(implementation_key(530)) void IWMPLayoutSettingsDispatch::Putstatus ( _bstr_t pVal );\n__declspec(implementation_key(531)) _bstr_t IWMPLayoutSettingsDispatch::GetuserWMPSettingsView ( );\n__declspec(implementation_key(532)) long IWMPLayoutSettingsDispatch::GetuserWMPSettingsPreset ( );\n__declspec(implementation_key(533)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetuserWMPShowSettings ( );\n__declspec(implementation_key(534)) _bstr_t IWMPLayoutSettingsDispatch::GetuserWMPMetadataView ( );\n__declspec(implementation_key(535)) long IWMPLayoutSettingsDispatch::GetuserWMPMetadataPreset ( );\n__declspec(implementation_key(536)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetuserWMPShowMetadata ( );\n__declspec(implementation_key(537)) long IWMPLayoutSettingsDispatch::GetcaptionsHeight ( );\n__declspec(implementation_key(538)) void IWMPLayoutSettingsDispatch::PutcaptionsHeight ( long pVal );\n__declspec(implementation_key(539)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetsnapToVideo ( );\n__declspec(implementation_key(540)) void IWMPLayoutSettingsDispatch::PutsnapToVideo ( VARIANT_BOOL pVal );\n__declspec(implementation_key(541)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetpinFullScreenControls ( );\n__declspec(implementation_key(542)) void IWMPLayoutSettingsDispatch::PutpinFullScreenControls ( VARIANT_BOOL pVal );\n__declspec(implementation_key(543)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetisMultiMon ( );\n__declspec(implementation_key(544)) float IWMPLayoutSettingsDispatch::GetexclusiveHueShift ( );\n__declspec(implementation_key(545)) void IWMPLayoutSettingsDispatch::PutexclusiveHueShift ( float pVal );\n__declspec(implementation_key(546)) float IWMPLayoutSettingsDispatch::GetexclusiveSaturation ( );\n__declspec(implementation_key(547)) void IWMPLayoutSettingsDispatch::PutexclusiveSaturation ( float pVal );\n__declspec(implementation_key(548)) VARIANT_BOOL IWMPLayoutSettingsDispatch::GetthemeBkgColorIsActive ( );\n__declspec(implementation_key(549)) void IWMPLayoutSettingsDispatch::PutthemeBkgColorIsActive ( VARIANT_BOOL pVal );\n__declspec(implementation_key(550)) _bstr_t IWMPLayoutSettingsDispatch::GetthemeBkgColorActive ( );\n__declspec(implementation_key(551)) _bstr_t IWMPLayoutSettingsDispatch::GetthemeBkgColorInactive ( );\n__declspec(implementation_key(552)) HRESULT IWMPWindow::setWindowPos ( long x, long y, long height, long width );\n__declspec(implementation_key(553)) long IWMPWindow::GetframeRate ( );\n__declspec(implementation_key(554)) void IWMPWindow::PutframeRate ( long pVal );\n__declspec(implementation_key(555)) long IWMPWindow::GetmouseX ( );\n__declspec(implementation_key(556)) long IWMPWindow::GetmouseY ( );\n__declspec(implementation_key(557)) void IWMPWindow::Putonsizing ( IDispatch * _arg1 );\n__declspec(implementation_key(558)) HRESULT IWMPWindow::openViewAlwaysOnTop ( _bstr_t bstrViewID );\n__declspec(implementation_key(559)) _bstr_t IWMPBrandDispatch::GetfullServiceName ( );\n__declspec(implementation_key(560)) _bstr_t IWMPBrandDispatch::GetfriendlyName ( );\n__declspec(implementation_key(561)) _bstr_t IWMPBrandDispatch::GetguideButtonText ( );\n__declspec(implementation_key(562)) _bstr_t IWMPBrandDispatch::GetguideButtonTip ( );\n__declspec(implementation_key(563)) _bstr_t IWMPBrandDispatch::GetguideMenuText ( );\n__declspec(implementation_key(564)) _bstr_t IWMPBrandDispatch::GetguideAccText ( );\n__declspec(implementation_key(565)) _bstr_t IWMPBrandDispatch::Gettask1ButtonText ( );\n__declspec(implementation_key(566)) _bstr_t IWMPBrandDispatch::Gettask1ButtonTip ( );\n__declspec(implementation_key(567)) _bstr_t IWMPBrandDispatch::Gettask1MenuText ( );\n__declspec(implementation_key(568)) _bstr_t IWMPBrandDispatch::Gettask1AccText ( );\n__declspec(implementation_key(569)) _bstr_t IWMPBrandDispatch::GetguideUrl ( );\n__declspec(implementation_key(570)) _bstr_t IWMPBrandDispatch::Gettask1Url ( );\n__declspec(implementation_key(571)) _bstr_t IWMPBrandDispatch::GetimageLargeUrl ( );\n__declspec(implementation_key(572)) _bstr_t IWMPBrandDispatch::GetimageSmallUrl ( );\n__declspec(implementation_key(573)) _bstr_t IWMPBrandDispatch::GetimageMenuUrl ( );\n__declspec(implementation_key(574)) _bstr_t IWMPBrandDispatch::GetinfoCenterUrl ( );\n__declspec(implementation_key(575)) _bstr_t IWMPBrandDispatch::GetalbumInfoUrl ( );\n__declspec(implementation_key(576)) _bstr_t IWMPBrandDispatch::GetbuyCDUrl ( );\n__declspec(implementation_key(577)) _bstr_t IWMPBrandDispatch::GethtmlViewUrl ( );\n__declspec(implementation_key(578)) _bstr_t IWMPBrandDispatch::GetnavigateUrl ( );\n__declspec(implementation_key(579)) _bstr_t IWMPBrandDispatch::GetcookieUrl ( );\n__declspec(implementation_key(580)) _bstr_t IWMPBrandDispatch::GetdownloadStatusUrl ( );\n__declspec(implementation_key(581)) _bstr_t IWMPBrandDispatch::GetcolorPlayer ( );\n__declspec(implementation_key(582)) _bstr_t IWMPBrandDispatch::GetcolorPlayerText ( );\n__declspec(implementation_key(583)) long IWMPBrandDispatch::GetnavigateDispid ( );\n__declspec(implementation_key(584)) _bstr_t IWMPBrandDispatch::GetnavigateParams ( );\n__declspec(implementation_key(585)) _bstr_t IWMPBrandDispatch::GetnavigatePane ( );\n__declspec(implementation_key(586)) _bstr_t IWMPBrandDispatch::GetselectedPane ( );\n__declspec(implementation_key(587)) void IWMPBrandDispatch::PutselectedPane ( _bstr_t pVal );\n__declspec(implementation_key(588)) HRESULT IWMPBrandDispatch::setNavigateProps ( _bstr_t bstrPane, long lDispid, _bstr_t bstrParams );\n__declspec(implementation_key(589)) _bstr_t IWMPBrandDispatch::getMediaParams ( IUnknown * pObject, _bstr_t bstrURL );\n__declspec(implementation_key(590)) void IWMPBrandDispatch::PutselectedTask ( long _arg1 );\n__declspec(implementation_key(591)) VARIANT_BOOL IWMPBrandDispatch::GetcontentPartnerSelected ( );\n__declspec(implementation_key(592)) _bstr_t IWMPNowPlayingHelperDispatch::GetviewFriendlyName ( _bstr_t bstrView );\n__declspec(implementation_key(593)) long IWMPNowPlayingHelperDispatch::GetviewPresetCount ( _bstr_t bstrView );\n__declspec(implementation_key(594)) _bstr_t IWMPNowPlayingHelperDispatch::GetviewPresetName ( _bstr_t bstrView, long nPresetIndex );\n__declspec(implementation_key(595)) _bstr_t IWMPNowPlayingHelperDispatch::GeteffectFriendlyName ( _bstr_t bstrEffect );\n__declspec(implementation_key(596)) _bstr_t IWMPNowPlayingHelperDispatch::GeteffectPresetName ( _bstr_t bstrEffect, long nPresetIndex );\n__declspec(implementation_key(597)) _bstr_t IWMPNowPlayingHelperDispatch::resolveDisplayView ( VARIANT_BOOL fSafe );\n__declspec(implementation_key(598)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::isValidDisplayView ( _bstr_t bstrView );\n__declspec(implementation_key(599)) _bstr_t IWMPNowPlayingHelperDispatch::getSkinFile ( );\n__declspec(implementation_key(600)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetcaptionsAvailable ( );\n__declspec(implementation_key(601)) long IWMPNowPlayingHelperDispatch::GetlinkAvailable ( );\n__declspec(implementation_key(602)) long IWMPNowPlayingHelperDispatch::GetlinkRequest ( );\n__declspec(implementation_key(603)) void IWMPNowPlayingHelperDispatch::PutlinkRequest ( long pVal );\n__declspec(implementation_key(604)) _bstr_t IWMPNowPlayingHelperDispatch::GetlinkRequestParams ( );\n__declspec(implementation_key(605)) void IWMPNowPlayingHelperDispatch::PutlinkRequestParams ( _bstr_t pVal );\n__declspec(implementation_key(606)) long IWMPNowPlayingHelperDispatch::getCurrentArtID ( VARIANT_BOOL fLargeArt );\n__declspec(implementation_key(607)) _bstr_t IWMPNowPlayingHelperDispatch::getTimeString ( double dTime );\n__declspec(implementation_key(608)) _bstr_t IWMPNowPlayingHelperDispatch::getCurrentScriptCommand ( _bstr_t bstrType );\n__declspec(implementation_key(609)) HRESULT IWMPNowPlayingHelperDispatch::calcLayout ( long lWidth, long lHeight, VARIANT_BOOL vbCaptions, VARIANT_BOOL vbBanner );\n__declspec(implementation_key(610)) long IWMPNowPlayingHelperDispatch::getLayoutSize ( long nProp );\n__declspec(implementation_key(611)) IDispatchPtr IWMPNowPlayingHelperDispatch::getRootPlaylist ( IDispatch * pPlaylist );\n__declspec(implementation_key(612)) _bstr_t IWMPNowPlayingHelperDispatch::getHTMLViewURL ( );\n__declspec(implementation_key(613)) IUnknownPtr IWMPNowPlayingHelperDispatch::GeteditObj ( );\n__declspec(implementation_key(614)) void IWMPNowPlayingHelperDispatch::PuteditObj ( IUnknown * ppVal );\n__declspec(implementation_key(615)) _bstr_t IWMPNowPlayingHelperDispatch::getStatusString ( _bstr_t bstrStatusId );\n__declspec(implementation_key(616)) long IWMPNowPlayingHelperDispatch::getStatusPct ( _bstr_t bstrStatusId );\n__declspec(implementation_key(617)) long IWMPNowPlayingHelperDispatch::getStatusResult ( _bstr_t bstrStatusId );\n__declspec(implementation_key(618)) long IWMPNowPlayingHelperDispatch::getStatusIcon ( _bstr_t bstrStatusId );\n__declspec(implementation_key(619)) _bstr_t IWMPNowPlayingHelperDispatch::getStatusIdList ( );\n__declspec(implementation_key(620)) _bstr_t IWMPNowPlayingHelperDispatch::GetnotificationString ( );\n__declspec(implementation_key(621)) _bstr_t IWMPNowPlayingHelperDispatch::GethtmlViewBaseURL ( );\n__declspec(implementation_key(622)) void IWMPNowPlayingHelperDispatch::PuthtmlViewBaseURL ( _bstr_t pVal );\n__declspec(implementation_key(623)) _bstr_t IWMPNowPlayingHelperDispatch::GethtmlViewFullURL ( );\n__declspec(implementation_key(624)) void IWMPNowPlayingHelperDispatch::PuthtmlViewFullURL ( _bstr_t pVal );\n__declspec(implementation_key(625)) long IWMPNowPlayingHelperDispatch::GethtmlViewSecureLock ( );\n__declspec(implementation_key(626)) void IWMPNowPlayingHelperDispatch::PuthtmlViewSecureLock ( long pVal );\n__declspec(implementation_key(627)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GethtmlViewBusy ( );\n__declspec(implementation_key(628)) void IWMPNowPlayingHelperDispatch::PuthtmlViewBusy ( VARIANT_BOOL pVal );\n__declspec(implementation_key(629)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GethtmlViewShowCert ( );\n__declspec(implementation_key(630)) void IWMPNowPlayingHelperDispatch::PuthtmlViewShowCert ( VARIANT_BOOL pVal );\n__declspec(implementation_key(631)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetpreviousEnabled ( );\n__declspec(implementation_key(632)) void IWMPNowPlayingHelperDispatch::PutpreviousEnabled ( VARIANT_BOOL pVal );\n__declspec(implementation_key(633)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetdoPreviousNow ( );\n__declspec(implementation_key(634)) void IWMPNowPlayingHelperDispatch::PutdoPreviousNow ( VARIANT_BOOL pVal );\n__declspec(implementation_key(635)) long IWMPNowPlayingHelperDispatch::GetDPI ( );\n__declspec(implementation_key(636)) HRESULT IWMPNowPlayingHelperDispatch::clearColors ( );\n__declspec(implementation_key(637)) _bstr_t IWMPNowPlayingHelperDispatch::GetlastMessage ( );\n__declspec(implementation_key(638)) void IWMPNowPlayingHelperDispatch::PutlastMessage ( _bstr_t pVal );\n__declspec(implementation_key(639)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetinVistaPlus ( );\n__declspec(implementation_key(640)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetisBidi ( );\n__declspec(implementation_key(641)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetisOCX ( );\n__declspec(implementation_key(642)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GethoverTransportsEnabled ( );\n__declspec(implementation_key(643)) HRESULT IWMPNowPlayingHelperDispatch::initRipHelper ( );\n__declspec(implementation_key(644)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetisAudioCD ( );\n__declspec(implementation_key(645)) void IWMPNowPlayingHelperDispatch::PutisAudioCD ( VARIANT_BOOL pVal );\n__declspec(implementation_key(646)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetcanRip ( );\n__declspec(implementation_key(647)) void IWMPNowPlayingHelperDispatch::PutcanRip ( VARIANT_BOOL pVal );\n__declspec(implementation_key(648)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetisRipping ( );\n__declspec(implementation_key(649)) void IWMPNowPlayingHelperDispatch::PutisRipping ( VARIANT_BOOL pVal );\n__declspec(implementation_key(650)) _bstr_t IWMPNowPlayingHelperDispatch::GetcurrentDrive ( );\n__declspec(implementation_key(651)) void IWMPNowPlayingHelperDispatch::PutcurrentDrive ( _bstr_t pVal );\n__declspec(implementation_key(652)) HRESULT IWMPNowPlayingHelperDispatch::startRip ( );\n__declspec(implementation_key(653)) HRESULT IWMPNowPlayingHelperDispatch::stopRip ( );\n__declspec(implementation_key(654)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetshowMMO ( );\n__declspec(implementation_key(655)) void IWMPNowPlayingHelperDispatch::PutshowMMO ( VARIANT_BOOL pVal );\n__declspec(implementation_key(656)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetMMOVisible ( );\n__declspec(implementation_key(657)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetsuggestionsVisible ( );\n__declspec(implementation_key(658)) _bstr_t IWMPNowPlayingHelperDispatch::GetsuggestionsTextColor ( );\n__declspec(implementation_key(659)) _bstr_t IWMPNowPlayingHelperDispatch::GetfontFace ( );\n__declspec(implementation_key(660)) long IWMPNowPlayingHelperDispatch::GetfontSize ( );\n__declspec(implementation_key(661)) _bstr_t IWMPNowPlayingHelperDispatch::GetbackgroundColor ( );\n__declspec(implementation_key(662)) long IWMPNowPlayingHelperDispatch::GetdoubleClickTime ( );\n__declspec(implementation_key(663)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetplayAgain ( );\n__declspec(implementation_key(664)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetpreviousPlaylistAvailable ( );\n__declspec(implementation_key(665)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetnextPlaylistAvailable ( );\n__declspec(implementation_key(666)) HRESULT IWMPNowPlayingHelperDispatch::nextPlaylist ( );\n__declspec(implementation_key(667)) HRESULT IWMPNowPlayingHelperDispatch::previousPlaylist ( );\n__declspec(implementation_key(668)) HRESULT IWMPNowPlayingHelperDispatch::playOffsetMedia ( long iOffset );\n__declspec(implementation_key(669)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetbasketVisible ( );\n__declspec(implementation_key(670)) void IWMPNowPlayingHelperDispatch::PutbasketVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(671)) _bstr_t IWMPNowPlayingHelperDispatch::GetmmoTextColor ( );\n__declspec(implementation_key(672)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetbackgroundVisible ( );\n__declspec(implementation_key(673)) void IWMPNowPlayingHelperDispatch::PutbackgroundEnabled ( VARIANT_BOOL pVal );\n__declspec(implementation_key(674)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetbackgroundEnabled ( );\n__declspec(implementation_key(675)) void IWMPNowPlayingHelperDispatch::PutbackgroundIndex ( long pVal );\n__declspec(implementation_key(676)) long IWMPNowPlayingHelperDispatch::GetbackgroundIndex ( );\n__declspec(implementation_key(677)) _bstr_t IWMPNowPlayingHelperDispatch::GetupNext ( );\n__declspec(implementation_key(678)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetplaybackOverlayVisible ( );\n__declspec(implementation_key(679)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::Getremoted ( );\n__declspec(implementation_key(680)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetglassEnabled ( );\n__declspec(implementation_key(681)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GethighContrast ( );\n__declspec(implementation_key(682)) void IWMPNowPlayingHelperDispatch::PuttestHighContrast ( _bstr_t _arg1 );\n__declspec(implementation_key(683)) void IWMPNowPlayingHelperDispatch::GetsessionPlaylistCount ( long * pVal );\n__declspec(implementation_key(684)) HRESULT IWMPNowPlayingHelperDispatch::setGestureStatus ( IDispatch * pObject, long newVal );\n__declspec(implementation_key(685)) _bstr_t IWMPNowPlayingHelperDispatch::GetmetadataString ( );\n__declspec(implementation_key(686)) void IWMPNowPlayingHelperDispatch::PutmetadataString ( _bstr_t pVal );\n__declspec(implementation_key(687)) long IWMPNowPlayingHelperDispatch::GetalbumArtAlpha ( );\n__declspec(implementation_key(688)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetplayerModeAlbumArtSelected ( );\n__declspec(implementation_key(689)) VARIANT_BOOL IWMPNowPlayingHelperDispatch::GetinFullScreen ( );\n__declspec(implementation_key(690)) HRESULT IWMPNowPlayingHelperDispatch::syncToAlbumArt ( IDispatch * pObject, long iOffsetFromCurrentMedia, _bstr_t bstrFallbackImage );\n__declspec(implementation_key(691)) HRESULT IWMPNowDoingDispatch::buyContent ( );\n__declspec(implementation_key(692)) HRESULT IWMPNowDoingDispatch::hideBasket ( );\n__declspec(implementation_key(693)) HRESULT IWMPNowDoingDispatch::burnNavigateToStatus ( );\n__declspec(implementation_key(694)) HRESULT IWMPNowDoingDispatch::syncNavigateToStatus ( );\n__declspec(implementation_key(695)) long IWMPNowDoingDispatch::GetDPI ( );\n__declspec(implementation_key(696)) _bstr_t IWMPNowDoingDispatch::Getmode ( );\n__declspec(implementation_key(697)) void IWMPNowDoingDispatch::Putburn_selectedDrive ( long pVal );\n__declspec(implementation_key(698)) long IWMPNowDoingDispatch::Getburn_selectedDrive ( );\n__declspec(implementation_key(699)) long IWMPNowDoingDispatch::Getsync_selectedDevice ( );\n__declspec(implementation_key(700)) void IWMPNowDoingDispatch::Putsync_selectedDevice ( long pVal );\n__declspec(implementation_key(701)) long IWMPNowDoingDispatch::Getburn_numDiscsSpanned ( );\n__declspec(implementation_key(702)) IDispatchPtr IWMPNowDoingDispatch::GeteditPlaylist ( );\n__declspec(implementation_key(703)) _bstr_t IWMPNowDoingDispatch::GetbasketPlaylistName ( );\n__declspec(implementation_key(704)) VARIANT_BOOL IWMPNowDoingDispatch::GetisHighContrastMode ( );\n__declspec(implementation_key(705)) VARIANT_BOOL IWMPNowDoingDispatch::GetallowRating ( );\n__declspec(implementation_key(706)) VARIANT_BOOL IWMPNowDoingDispatch::GetallowShop ( );\n__declspec(implementation_key(707)) _bstr_t IWMPNowDoingDispatch::Getburn_mediaType ( );\n__declspec(implementation_key(708)) _bstr_t IWMPNowDoingDispatch::Getburn_contentType ( );\n__declspec(implementation_key(709)) long IWMPNowDoingDispatch::Getburn_freeSpace ( );\n__declspec(implementation_key(710)) long IWMPNowDoingDispatch::Getburn_totalSpace ( );\n__declspec(implementation_key(711)) _bstr_t IWMPNowDoingDispatch::Getburn_driveName ( );\n__declspec(implementation_key(712)) long IWMPNowDoingDispatch::Getburn_numDevices ( );\n__declspec(implementation_key(713)) long IWMPNowDoingDispatch::Getburn_spaceToUse ( );\n__declspec(implementation_key(714)) long IWMPNowDoingDispatch::Getburn_percentComplete ( );\n__declspec(implementation_key(715)) long IWMPNowDoingDispatch::Getsync_spaceToUse ( );\n__declspec(implementation_key(716)) long IWMPNowDoingDispatch::Getsync_spaceUsed ( );\n__declspec(implementation_key(717)) long IWMPNowDoingDispatch::Getsync_totalSpace ( );\n__declspec(implementation_key(718)) _bstr_t IWMPNowDoingDispatch::Getsync_deviceName ( );\n__declspec(implementation_key(719)) long IWMPNowDoingDispatch::Getsync_numDevices ( );\n__declspec(implementation_key(720)) _bstr_t IWMPNowDoingDispatch::Getsync_oemName ( );\n__declspec(implementation_key(721)) long IWMPNowDoingDispatch::Getsync_percentComplete ( );\n__declspec(implementation_key(722)) HRESULT IWMPNowDoingDispatch::logData ( _bstr_t ID, _bstr_t data );\n__declspec(implementation_key(723)) _bstr_t IWMPNowDoingDispatch::formatTime ( long value );\n__declspec(implementation_key(724)) _bstr_t IWMPHoverPreviewDispatch::Gettitle ( );\n__declspec(implementation_key(725)) _bstr_t IWMPHoverPreviewDispatch::Getalbum ( );\n__declspec(implementation_key(726)) _bstr_t IWMPHoverPreviewDispatch::GetURL ( );\n__declspec(implementation_key(727)) void IWMPHoverPreviewDispatch::Putimage ( IDispatch * _arg1 );\n__declspec(implementation_key(728)) void IWMPHoverPreviewDispatch::PutautoClick ( VARIANT_BOOL _arg1 );\n__declspec(implementation_key(729)) void IWMPHoverPreviewDispatch::PutpreviewClick ( VARIANT_BOOL _arg1 );\n__declspec(implementation_key(730)) HRESULT IWMPHoverPreviewDispatch::dismiss ( );\n__declspec(implementation_key(731)) HRESULT IWMPButtonCtrlEvents::onclick ( );\n__declspec(implementation_key(732)) _bstr_t IWMPButtonCtrl::Getimage ( );\n__declspec(implementation_key(733)) void IWMPButtonCtrl::Putimage ( _bstr_t pVal );\n__declspec(implementation_key(734)) _bstr_t IWMPButtonCtrl::GethoverImage ( );\n__declspec(implementation_key(735)) void IWMPButtonCtrl::PuthoverImage ( _bstr_t pVal );\n__declspec(implementation_key(736)) _bstr_t IWMPButtonCtrl::GetdownImage ( );\n__declspec(implementation_key(737)) void IWMPButtonCtrl::PutdownImage ( _bstr_t pVal );\n__declspec(implementation_key(738)) _bstr_t IWMPButtonCtrl::GetdisabledImage ( );\n__declspec(implementation_key(739)) void IWMPButtonCtrl::PutdisabledImage ( _bstr_t pVal );\n__declspec(implementation_key(740)) _bstr_t IWMPButtonCtrl::GethoverDownImage ( );\n__declspec(implementation_key(741)) void IWMPButtonCtrl::PuthoverDownImage ( _bstr_t pVal );\n__declspec(implementation_key(742)) VARIANT_BOOL IWMPButtonCtrl::Gettiled ( );\n__declspec(implementation_key(743)) void IWMPButtonCtrl::Puttiled ( VARIANT_BOOL pVal );\n__declspec(implementation_key(744)) _bstr_t IWMPButtonCtrl::GettransparencyColor ( );\n__declspec(implementation_key(745)) void IWMPButtonCtrl::PuttransparencyColor ( _bstr_t pVal );\n__declspec(implementation_key(746)) VARIANT_BOOL IWMPButtonCtrl::Getdown ( );\n__declspec(implementation_key(747)) void IWMPButtonCtrl::Putdown ( VARIANT_BOOL pVal );\n__declspec(implementation_key(748)) VARIANT_BOOL IWMPButtonCtrl::Getsticky ( );\n__declspec(implementation_key(749)) void IWMPButtonCtrl::Putsticky ( VARIANT_BOOL pVal );\n__declspec(implementation_key(750)) _bstr_t IWMPButtonCtrl::GetupToolTip ( );\n__declspec(implementation_key(751)) void IWMPButtonCtrl::PutupToolTip ( _bstr_t pVal );\n__declspec(implementation_key(752)) _bstr_t IWMPButtonCtrl::GetdownToolTip ( );\n__declspec(implementation_key(753)) void IWMPButtonCtrl::PutdownToolTip ( _bstr_t pVal );\n__declspec(implementation_key(754)) _bstr_t IWMPButtonCtrl::Getcursor ( );\n__declspec(implementation_key(755)) void IWMPButtonCtrl::Putcursor ( _bstr_t pVal );\n__declspec(implementation_key(756)) long IWMPListBoxCtrl::GetselectedItem ( );\n__declspec(implementation_key(757)) void IWMPListBoxCtrl::PutselectedItem ( long pnPos );\n__declspec(implementation_key(758)) VARIANT_BOOL IWMPListBoxCtrl::Getsorted ( );\n__declspec(implementation_key(759)) void IWMPListBoxCtrl::Putsorted ( VARIANT_BOOL pVal );\n__declspec(implementation_key(760)) VARIANT_BOOL IWMPListBoxCtrl::Getmultiselect ( );\n__declspec(implementation_key(761)) void IWMPListBoxCtrl::Putmultiselect ( VARIANT_BOOL pVal );\n__declspec(implementation_key(762)) VARIANT_BOOL IWMPListBoxCtrl::GetreadOnly ( );\n__declspec(implementation_key(763)) void IWMPListBoxCtrl::PutreadOnly ( VARIANT_BOOL pVal );\n__declspec(implementation_key(764)) _bstr_t IWMPListBoxCtrl::GetforegroundColor ( );\n__declspec(implementation_key(765)) void IWMPListBoxCtrl::PutforegroundColor ( _bstr_t pVal );\n__declspec(implementation_key(766)) _bstr_t IWMPListBoxCtrl::GetbackgroundColor ( );\n__declspec(implementation_key(767)) void IWMPListBoxCtrl::PutbackgroundColor ( _bstr_t pVal );\n__declspec(implementation_key(768)) long IWMPListBoxCtrl::GetfontSize ( );\n__declspec(implementation_key(769)) void IWMPListBoxCtrl::PutfontSize ( long pVal );\n__declspec(implementation_key(770)) _bstr_t IWMPListBoxCtrl::GetfontStyle ( );\n__declspec(implementation_key(771)) void IWMPListBoxCtrl::PutfontStyle ( _bstr_t pVal );\n__declspec(implementation_key(772)) _bstr_t IWMPListBoxCtrl::GetfontFace ( );\n__declspec(implementation_key(773)) void IWMPListBoxCtrl::PutfontFace ( _bstr_t pVal );\n__declspec(implementation_key(774)) long IWMPListBoxCtrl::GetitemCount ( );\n__declspec(implementation_key(775)) long IWMPListBoxCtrl::GetfirstVisibleItem ( );\n__declspec(implementation_key(776)) void IWMPListBoxCtrl::PutfirstVisibleItem ( long pVal );\n__declspec(implementation_key(777)) void IWMPListBoxCtrl::PutpopUp ( VARIANT_BOOL _arg1 );\n__declspec(implementation_key(778)) long IWMPListBoxCtrl::GetfocusItem ( );\n__declspec(implementation_key(779)) void IWMPListBoxCtrl::PutfocusItem ( long pVal );\n__declspec(implementation_key(780)) VARIANT_BOOL IWMPListBoxCtrl::Getborder ( );\n__declspec(implementation_key(781)) void IWMPListBoxCtrl::Putborder ( VARIANT_BOOL pVal );\n__declspec(implementation_key(782)) _bstr_t IWMPListBoxCtrl::getItem ( long nPos );\n__declspec(implementation_key(783)) HRESULT IWMPListBoxCtrl::insertItem ( long nPos, _bstr_t newVal );\n__declspec(implementation_key(784)) HRESULT IWMPListBoxCtrl::appendItem ( _bstr_t newVal );\n__declspec(implementation_key(785)) HRESULT IWMPListBoxCtrl::replaceItem ( long nPos, _bstr_t newVal );\n__declspec(implementation_key(786)) HRESULT IWMPListBoxCtrl::deleteItem ( long nPos );\n__declspec(implementation_key(787)) HRESULT IWMPListBoxCtrl::deleteAll ( );\n__declspec(implementation_key(788)) long IWMPListBoxCtrl::findItem ( long nStartIndex, _bstr_t newVal );\n__declspec(implementation_key(789)) long IWMPListBoxCtrl::getNextSelectedItem ( long nStartIndex );\n__declspec(implementation_key(790)) HRESULT IWMPListBoxCtrl::setSelectedState ( long nPos, VARIANT_BOOL vbSelected );\n__declspec(implementation_key(791)) HRESULT IWMPListBoxCtrl::show ( );\n__declspec(implementation_key(792)) HRESULT IWMPListBoxCtrl::dismiss ( );\n__declspec(implementation_key(793)) void IWMPListBoxItem::Putvalue ( _bstr_t _arg1 );\n__declspec(implementation_key(794)) _bstr_t IWMPPlaylistCtrlColumn::GetcolumnName ( );\n__declspec(implementation_key(795)) void IWMPPlaylistCtrlColumn::PutcolumnName ( _bstr_t pVal );\n__declspec(implementation_key(796)) _bstr_t IWMPPlaylistCtrlColumn::GetcolumnID ( );\n__declspec(implementation_key(797)) void IWMPPlaylistCtrlColumn::PutcolumnID ( _bstr_t pVal );\n__declspec(implementation_key(798)) _bstr_t IWMPPlaylistCtrlColumn::GetcolumnResizeMode ( );\n__declspec(implementation_key(799)) void IWMPPlaylistCtrlColumn::PutcolumnResizeMode ( _bstr_t pVal );\n__declspec(implementation_key(800)) long IWMPPlaylistCtrlColumn::GetcolumnWidth ( );\n__declspec(implementation_key(801)) void IWMPPlaylistCtrlColumn::PutcolumnWidth ( long pVal );\n__declspec(implementation_key(802)) HRESULT IWMPSliderCtrlEvents::ondragbegin ( );\n__declspec(implementation_key(803)) HRESULT IWMPSliderCtrlEvents::ondragend ( );\n__declspec(implementation_key(804)) HRESULT IWMPSliderCtrlEvents::onpositionchange ( );\n__declspec(implementation_key(805)) _bstr_t IWMPSliderCtrl::Getdirection ( );\n__declspec(implementation_key(806)) void IWMPSliderCtrl::Putdirection ( _bstr_t pVal );\n__declspec(implementation_key(807)) VARIANT_BOOL IWMPSliderCtrl::Getslide ( );\n__declspec(implementation_key(808)) void IWMPSliderCtrl::Putslide ( VARIANT_BOOL pVal );\n__declspec(implementation_key(809)) VARIANT_BOOL IWMPSliderCtrl::Gettiled ( );\n__declspec(implementation_key(810)) void IWMPSliderCtrl::Puttiled ( VARIANT_BOOL pVal );\n__declspec(implementation_key(811)) _bstr_t IWMPSliderCtrl::GetforegroundColor ( );\n__declspec(implementation_key(812)) void IWMPSliderCtrl::PutforegroundColor ( _bstr_t pVal );\n__declspec(implementation_key(813)) _bstr_t IWMPSliderCtrl::GetforegroundEndColor ( );\n__declspec(implementation_key(814)) void IWMPSliderCtrl::PutforegroundEndColor ( _bstr_t pVal );\n__declspec(implementation_key(815)) _bstr_t IWMPSliderCtrl::GetbackgroundColor ( );\n__declspec(implementation_key(816)) void IWMPSliderCtrl::PutbackgroundColor ( _bstr_t pVal );\n__declspec(implementation_key(817)) _bstr_t IWMPSliderCtrl::GetbackgroundEndColor ( );\n__declspec(implementation_key(818)) void IWMPSliderCtrl::PutbackgroundEndColor ( _bstr_t pVal );\n__declspec(implementation_key(819)) _bstr_t IWMPSliderCtrl::GetdisabledColor ( );\n__declspec(implementation_key(820)) void IWMPSliderCtrl::PutdisabledColor ( _bstr_t pVal );\n__declspec(implementation_key(821)) _bstr_t IWMPSliderCtrl::GettransparencyColor ( );\n__declspec(implementation_key(822)) void IWMPSliderCtrl::PuttransparencyColor ( _bstr_t pVal );\n__declspec(implementation_key(823)) _bstr_t IWMPSliderCtrl::GetforegroundImage ( );\n__declspec(implementation_key(824)) void IWMPSliderCtrl::PutforegroundImage ( _bstr_t pVal );\n__declspec(implementation_key(825)) _bstr_t IWMPSliderCtrl::GetbackgroundImage ( );\n__declspec(implementation_key(826)) void IWMPSliderCtrl::PutbackgroundImage ( _bstr_t pVal );\n__declspec(implementation_key(827)) _bstr_t IWMPSliderCtrl::GetbackgroundHoverImage ( );\n__declspec(implementation_key(828)) void IWMPSliderCtrl::PutbackgroundHoverImage ( _bstr_t pVal );\n__declspec(implementation_key(829)) _bstr_t IWMPSliderCtrl::GetdisabledImage ( );\n__declspec(implementation_key(830)) void IWMPSliderCtrl::PutdisabledImage ( _bstr_t pVal );\n__declspec(implementation_key(831)) _bstr_t IWMPSliderCtrl::GetthumbImage ( );\n__declspec(implementation_key(832)) void IWMPSliderCtrl::PutthumbImage ( _bstr_t pVal );\n__declspec(implementation_key(833)) _bstr_t IWMPSliderCtrl::GetthumbHoverImage ( );\n__declspec(implementation_key(834)) void IWMPSliderCtrl::PutthumbHoverImage ( _bstr_t pVal );\n__declspec(implementation_key(835)) _bstr_t IWMPSliderCtrl::GetthumbDownImage ( );\n__declspec(implementation_key(836)) void IWMPSliderCtrl::PutthumbDownImage ( _bstr_t pVal );\n__declspec(implementation_key(837)) _bstr_t IWMPSliderCtrl::GetthumbDisabledImage ( );\n__declspec(implementation_key(838)) void IWMPSliderCtrl::PutthumbDisabledImage ( _bstr_t pVal );\n__declspec(implementation_key(839)) float IWMPSliderCtrl::Getmin ( );\n__declspec(implementation_key(840)) void IWMPSliderCtrl::Putmin ( float pVal );\n__declspec(implementation_key(841)) float IWMPSliderCtrl::Getmax ( );\n__declspec(implementation_key(842)) void IWMPSliderCtrl::Putmax ( float pVal );\n__declspec(implementation_key(843)) float IWMPSliderCtrl::Getvalue ( );\n__declspec(implementation_key(844)) void IWMPSliderCtrl::Putvalue ( float pVal );\n__declspec(implementation_key(845)) _bstr_t IWMPSliderCtrl::GettoolTip ( );\n__declspec(implementation_key(846)) void IWMPSliderCtrl::PuttoolTip ( _bstr_t pVal );\n__declspec(implementation_key(847)) _bstr_t IWMPSliderCtrl::Getcursor ( );\n__declspec(implementation_key(848)) void IWMPSliderCtrl::Putcursor ( _bstr_t pVal );\n__declspec(implementation_key(849)) int IWMPSliderCtrl::GetborderSize ( );\n__declspec(implementation_key(850)) void IWMPSliderCtrl::PutborderSize ( int pVal );\n__declspec(implementation_key(851)) _bstr_t IWMPSliderCtrl::GetforegroundHoverImage ( );\n__declspec(implementation_key(852)) void IWMPSliderCtrl::PutforegroundHoverImage ( _bstr_t pVal );\n__declspec(implementation_key(853)) float IWMPSliderCtrl::GetforegroundProgress ( );\n__declspec(implementation_key(854)) void IWMPSliderCtrl::PutforegroundProgress ( float pVal );\n__declspec(implementation_key(855)) VARIANT_BOOL IWMPSliderCtrl::GetuseForegroundProgress ( );\n__declspec(implementation_key(856)) void IWMPSliderCtrl::PutuseForegroundProgress ( VARIANT_BOOL pVal );\n__declspec(implementation_key(857)) HRESULT IWMPVideoCtrlEvents::onvideostart ( );\n__declspec(implementation_key(858)) HRESULT IWMPVideoCtrlEvents::onvideoend ( );\n__declspec(implementation_key(859)) void IWMPVideoCtrl::Putwindowless ( VARIANT_BOOL pbClipped );\n__declspec(implementation_key(860)) VARIANT_BOOL IWMPVideoCtrl::Getwindowless ( );\n__declspec(implementation_key(861)) void IWMPVideoCtrl::Putcursor ( _bstr_t pbstrCursor );\n__declspec(implementation_key(862)) _bstr_t IWMPVideoCtrl::Getcursor ( );\n__declspec(implementation_key(863)) void IWMPVideoCtrl::PutbackgroundColor ( _bstr_t pbstrColor );\n__declspec(implementation_key(864)) _bstr_t IWMPVideoCtrl::GetbackgroundColor ( );\n__declspec(implementation_key(865)) void IWMPVideoCtrl::PutmaintainAspectRatio ( VARIANT_BOOL pbMaintainAspectRatio );\n__declspec(implementation_key(866)) VARIANT_BOOL IWMPVideoCtrl::GetmaintainAspectRatio ( );\n__declspec(implementation_key(867)) void IWMPVideoCtrl::PuttoolTip ( _bstr_t bstrToolTip );\n__declspec(implementation_key(868)) _bstr_t IWMPVideoCtrl::GettoolTip ( );\n__declspec(implementation_key(869)) VARIANT_BOOL IWMPVideoCtrl::GetfullScreen ( );\n__declspec(implementation_key(870)) void IWMPVideoCtrl::PutfullScreen ( VARIANT_BOOL pbFullScreen );\n__declspec(implementation_key(871)) void IWMPVideoCtrl::PutshrinkToFit ( VARIANT_BOOL pbShrinkToFit );\n__declspec(implementation_key(872)) VARIANT_BOOL IWMPVideoCtrl::GetshrinkToFit ( );\n__declspec(implementation_key(873)) void IWMPVideoCtrl::PutstretchToFit ( VARIANT_BOOL pbStretchToFit );\n__declspec(implementation_key(874)) VARIANT_BOOL IWMPVideoCtrl::GetstretchToFit ( );\n__declspec(implementation_key(875)) void IWMPVideoCtrl::Putzoom ( long pzoom );\n__declspec(implementation_key(876)) long IWMPVideoCtrl::Getzoom ( );\n__declspec(implementation_key(877)) VARIANT_BOOL IWMPEffectsCtrl::Getwindowed ( );\n__declspec(implementation_key(878)) void IWMPEffectsCtrl::Putwindowed ( VARIANT_BOOL pVal );\n__declspec(implementation_key(879)) VARIANT_BOOL IWMPEffectsCtrl::GetallowAll ( );\n__declspec(implementation_key(880)) void IWMPEffectsCtrl::PutallowAll ( VARIANT_BOOL pVal );\n__declspec(implementation_key(881)) void IWMPEffectsCtrl::PutcurrentEffectType ( _bstr_t pVal );\n__declspec(implementation_key(882)) _bstr_t IWMPEffectsCtrl::GetcurrentEffectType ( );\n__declspec(implementation_key(883)) _bstr_t IWMPEffectsCtrl::GetcurrentEffectTitle ( );\n__declspec(implementation_key(884)) HRESULT IWMPEffectsCtrl::next ( );\n__declspec(implementation_key(885)) HRESULT IWMPEffectsCtrl::previous ( );\n__declspec(implementation_key(886)) HRESULT IWMPEffectsCtrl::settings ( );\n__declspec(implementation_key(887)) IDispatchPtr IWMPEffectsCtrl::GetcurrentEffect ( );\n__declspec(implementation_key(888)) void IWMPEffectsCtrl::PutcurrentEffect ( IDispatch * p );\n__declspec(implementation_key(889)) HRESULT IWMPEffectsCtrl::nextEffect ( );\n__declspec(implementation_key(890)) HRESULT IWMPEffectsCtrl::previousEffect ( );\n__declspec(implementation_key(891)) HRESULT IWMPEffectsCtrl::nextPreset ( );\n__declspec(implementation_key(892)) HRESULT IWMPEffectsCtrl::previousPreset ( );\n__declspec(implementation_key(893)) long IWMPEffectsCtrl::GetcurrentPreset ( );\n__declspec(implementation_key(894)) void IWMPEffectsCtrl::PutcurrentPreset ( long pVal );\n__declspec(implementation_key(895)) _bstr_t IWMPEffectsCtrl::GetcurrentPresetTitle ( );\n__declspec(implementation_key(896)) long IWMPEffectsCtrl::GetcurrentEffectPresetCount ( );\n__declspec(implementation_key(897)) VARIANT_BOOL IWMPEffectsCtrl::GetfullScreen ( );\n__declspec(implementation_key(898)) void IWMPEffectsCtrl::PutfullScreen ( VARIANT_BOOL pbFullScreen );\n__declspec(implementation_key(899)) VARIANT_BOOL IWMPEffectsCtrl::GeteffectCanGoFullScreen ( );\n__declspec(implementation_key(900)) VARIANT_BOOL IWMPEffectsCtrl::GeteffectHasPropertyPage ( );\n__declspec(implementation_key(901)) long IWMPEffectsCtrl::GeteffectCount ( );\n__declspec(implementation_key(902)) _bstr_t IWMPEffectsCtrl::GeteffectTitle ( long index );\n__declspec(implementation_key(903)) _bstr_t IWMPEffectsCtrl::GeteffectType ( long index );\n__declspec(implementation_key(904)) VARIANT_BOOL IWMPEqualizerSettingsCtrl::Getbypass ( );\n__declspec(implementation_key(905)) void IWMPEqualizerSettingsCtrl::Putbypass ( VARIANT_BOOL pVal );\n__declspec(implementation_key(906)) float IWMPEqualizerSettingsCtrl::GetgainLevel1 ( );\n__declspec(implementation_key(907)) void IWMPEqualizerSettingsCtrl::PutgainLevel1 ( float pflLevel );\n__declspec(implementation_key(908)) float IWMPEqualizerSettingsCtrl::GetgainLevel2 ( );\n__declspec(implementation_key(909)) void IWMPEqualizerSettingsCtrl::PutgainLevel2 ( float pflLevel );\n__declspec(implementation_key(910)) float IWMPEqualizerSettingsCtrl::GetgainLevel3 ( );\n__declspec(implementation_key(911)) void IWMPEqualizerSettingsCtrl::PutgainLevel3 ( float pflLevel );\n__declspec(implementation_key(912)) float IWMPEqualizerSettingsCtrl::GetgainLevel4 ( );\n__declspec(implementation_key(913)) void IWMPEqualizerSettingsCtrl::PutgainLevel4 ( float pflLevel );\n__declspec(implementation_key(914)) float IWMPEqualizerSettingsCtrl::GetgainLevel5 ( );\n__declspec(implementation_key(915)) void IWMPEqualizerSettingsCtrl::PutgainLevel5 ( float pflLevel );\n__declspec(implementation_key(916)) float IWMPEqualizerSettingsCtrl::GetgainLevel6 ( );\n__declspec(implementation_key(917)) void IWMPEqualizerSettingsCtrl::PutgainLevel6 ( float pflLevel );\n__declspec(implementation_key(918)) float IWMPEqualizerSettingsCtrl::GetgainLevel7 ( );\n__declspec(implementation_key(919)) void IWMPEqualizerSettingsCtrl::PutgainLevel7 ( float pflLevel );\n__declspec(implementation_key(920)) float IWMPEqualizerSettingsCtrl::GetgainLevel8 ( );\n__declspec(implementation_key(921)) void IWMPEqualizerSettingsCtrl::PutgainLevel8 ( float pflLevel );\n__declspec(implementation_key(922)) float IWMPEqualizerSettingsCtrl::GetgainLevel9 ( );\n__declspec(implementation_key(923)) void IWMPEqualizerSettingsCtrl::PutgainLevel9 ( float pflLevel );\n__declspec(implementation_key(924)) float IWMPEqualizerSettingsCtrl::GetgainLevel10 ( );\n__declspec(implementation_key(925)) void IWMPEqualizerSettingsCtrl::PutgainLevel10 ( float pflLevel );\n__declspec(implementation_key(926)) float IWMPEqualizerSettingsCtrl::GetgainLevels ( long iIndex );\n__declspec(implementation_key(927)) void IWMPEqualizerSettingsCtrl::PutgainLevels ( long iIndex, float pflLevel );\n__declspec(implementation_key(928)) HRESULT IWMPEqualizerSettingsCtrl::reset ( );\n__declspec(implementation_key(929)) long IWMPEqualizerSettingsCtrl::Getbands ( );\n__declspec(implementation_key(930)) HRESULT IWMPEqualizerSettingsCtrl::nextPreset ( );\n__declspec(implementation_key(931)) HRESULT IWMPEqualizerSettingsCtrl::previousPreset ( );\n__declspec(implementation_key(932)) long IWMPEqualizerSettingsCtrl::GetcurrentPreset ( );\n__declspec(implementation_key(933)) void IWMPEqualizerSettingsCtrl::PutcurrentPreset ( long pVal );\n__declspec(implementation_key(934)) _bstr_t IWMPEqualizerSettingsCtrl::GetcurrentPresetTitle ( );\n__declspec(implementation_key(935)) long IWMPEqualizerSettingsCtrl::GetpresetCount ( );\n__declspec(implementation_key(936)) VARIANT_BOOL IWMPEqualizerSettingsCtrl::GetenhancedAudio ( );\n__declspec(implementation_key(937)) void IWMPEqualizerSettingsCtrl::PutenhancedAudio ( VARIANT_BOOL pfVal );\n__declspec(implementation_key(938)) long IWMPEqualizerSettingsCtrl::GetspeakerSize ( );\n__declspec(implementation_key(939)) void IWMPEqualizerSettingsCtrl::PutspeakerSize ( long plVal );\n__declspec(implementation_key(940)) _bstr_t IWMPEqualizerSettingsCtrl::GetcurrentSpeakerName ( );\n__declspec(implementation_key(941)) long IWMPEqualizerSettingsCtrl::GettruBassLevel ( );\n__declspec(implementation_key(942)) void IWMPEqualizerSettingsCtrl::PuttruBassLevel ( long plTruBassLevel );\n__declspec(implementation_key(943)) long IWMPEqualizerSettingsCtrl::GetwowLevel ( );\n__declspec(implementation_key(944)) void IWMPEqualizerSettingsCtrl::PutwowLevel ( long plWowLevel );\n__declspec(implementation_key(945)) float IWMPEqualizerSettingsCtrl::GetsplineTension ( );\n__declspec(implementation_key(946)) void IWMPEqualizerSettingsCtrl::PutsplineTension ( float pflSplineTension );\n__declspec(implementation_key(947)) VARIANT_BOOL IWMPEqualizerSettingsCtrl::GetenableSplineTension ( );\n__declspec(implementation_key(948)) void IWMPEqualizerSettingsCtrl::PutenableSplineTension ( VARIANT_BOOL pfEnableSplineTension );\n__declspec(implementation_key(949)) _bstr_t IWMPEqualizerSettingsCtrl::GetpresetTitle ( long iIndex );\n__declspec(implementation_key(950)) VARIANT_BOOL IWMPEqualizerSettingsCtrl::Getnormalization ( );\n__declspec(implementation_key(951)) void IWMPEqualizerSettingsCtrl::Putnormalization ( VARIANT_BOOL pfVal );\n__declspec(implementation_key(952)) float IWMPEqualizerSettingsCtrl::GetnormalizationAverage ( );\n__declspec(implementation_key(953)) float IWMPEqualizerSettingsCtrl::GetnormalizationPeak ( );\n__declspec(implementation_key(954)) VARIANT_BOOL IWMPEqualizerSettingsCtrl::GetcrossFade ( );\n__declspec(implementation_key(955)) void IWMPEqualizerSettingsCtrl::PutcrossFade ( VARIANT_BOOL pfVal );\n__declspec(implementation_key(956)) long IWMPEqualizerSettingsCtrl::GetcrossFadeWindow ( );\n__declspec(implementation_key(957)) void IWMPEqualizerSettingsCtrl::PutcrossFadeWindow ( long plWindow );\n__declspec(implementation_key(958)) long IWMPVideoSettingsCtrl::Getbrightness ( );\n__declspec(implementation_key(959)) void IWMPVideoSettingsCtrl::Putbrightness ( long pVal );\n__declspec(implementation_key(960)) long IWMPVideoSettingsCtrl::Getcontrast ( );\n__declspec(implementation_key(961)) void IWMPVideoSettingsCtrl::Putcontrast ( long pVal );\n__declspec(implementation_key(962)) long IWMPVideoSettingsCtrl::Gethue ( );\n__declspec(implementation_key(963)) void IWMPVideoSettingsCtrl::Puthue ( long pVal );\n__declspec(implementation_key(964)) long IWMPVideoSettingsCtrl::Getsaturation ( );\n__declspec(implementation_key(965)) void IWMPVideoSettingsCtrl::Putsaturation ( long pVal );\n__declspec(implementation_key(966)) HRESULT IWMPVideoSettingsCtrl::reset ( );\n__declspec(implementation_key(967)) HRESULT IWMPDolbyDigitalSettingsCtrl::reset ( );\n__declspec(implementation_key(968)) long IWMPDolbyDigitalSettingsCtrl::GetcurrentPreset ( );\n__declspec(implementation_key(969)) void IWMPDolbyDigitalSettingsCtrl::PutcurrentPreset ( long plCurrentPreset );\n__declspec(implementation_key(970)) _bstr_t IWMPEditCtrl::Getvalue ( );\n__declspec(implementation_key(971)) void IWMPEditCtrl::Putvalue ( _bstr_t pVal );\n__declspec(implementation_key(972)) VARIANT_BOOL IWMPEditCtrl::Getborder ( );\n__declspec(implementation_key(973)) void IWMPEditCtrl::Putborder ( VARIANT_BOOL pVal );\n__declspec(implementation_key(974)) _bstr_t IWMPEditCtrl::Getjustification ( );\n__declspec(implementation_key(975)) void IWMPEditCtrl::Putjustification ( _bstr_t pVal );\n__declspec(implementation_key(976)) _bstr_t IWMPEditCtrl::GeteditStyle ( );\n__declspec(implementation_key(977)) void IWMPEditCtrl::PuteditStyle ( _bstr_t pVal );\n__declspec(implementation_key(978)) VARIANT_BOOL IWMPEditCtrl::GetwordWrap ( );\n__declspec(implementation_key(979)) void IWMPEditCtrl::PutwordWrap ( VARIANT_BOOL pVal );\n__declspec(implementation_key(980)) VARIANT_BOOL IWMPEditCtrl::GetreadOnly ( );\n__declspec(implementation_key(981)) void IWMPEditCtrl::PutreadOnly ( VARIANT_BOOL pVal );\n__declspec(implementation_key(982)) _bstr_t IWMPEditCtrl::GetforegroundColor ( );\n__declspec(implementation_key(983)) void IWMPEditCtrl::PutforegroundColor ( _bstr_t pVal );\n__declspec(implementation_key(984)) _bstr_t IWMPEditCtrl::GetbackgroundColor ( );\n__declspec(implementation_key(985)) void IWMPEditCtrl::PutbackgroundColor ( _bstr_t pVal );\n__declspec(implementation_key(986)) long IWMPEditCtrl::GetfontSize ( );\n__declspec(implementation_key(987)) void IWMPEditCtrl::PutfontSize ( long pVal );\n__declspec(implementation_key(988)) _bstr_t IWMPEditCtrl::GetfontStyle ( );\n__declspec(implementation_key(989)) void IWMPEditCtrl::PutfontStyle ( _bstr_t pVal );\n__declspec(implementation_key(990)) _bstr_t IWMPEditCtrl::GetfontFace ( );\n__declspec(implementation_key(991)) void IWMPEditCtrl::PutfontFace ( _bstr_t pVal );\n__declspec(implementation_key(992)) long IWMPEditCtrl::GettextLimit ( );\n__declspec(implementation_key(993)) void IWMPEditCtrl::PuttextLimit ( long pVal );\n__declspec(implementation_key(994)) long IWMPEditCtrl::GetlineCount ( );\n__declspec(implementation_key(995)) _bstr_t IWMPEditCtrl::getLine ( long nIndex );\n__declspec(implementation_key(996)) long IWMPEditCtrl::getSelectionStart ( );\n__declspec(implementation_key(997)) long IWMPEditCtrl::getSelectionEnd ( );\n__declspec(implementation_key(998)) HRESULT IWMPEditCtrl::setSelection ( long nStart, long nEnd );\n__declspec(implementation_key(999)) HRESULT IWMPEditCtrl::replaceSelection ( _bstr_t newVal );\n__declspec(implementation_key(1000)) long IWMPEditCtrl::getLineIndex ( long nIndex );\n__declspec(implementation_key(1001)) long IWMPEditCtrl::getLineFromChar ( long nPosition );\n__declspec(implementation_key(1002)) HRESULT IWMPSkinList::updateBasketColumns ( );\n__declspec(implementation_key(1003)) HRESULT IWMPSkinList::highContrastChange ( );\n__declspec(implementation_key(1004)) _bstr_t IWMPPluginUIHost::GetbackgroundColor ( );\n__declspec(implementation_key(1005)) void IWMPPluginUIHost::PutbackgroundColor ( _bstr_t pVal );\n__declspec(implementation_key(1006)) _bstr_t IWMPPluginUIHost::GetobjectID ( );\n__declspec(implementation_key(1007)) void IWMPPluginUIHost::PutobjectID ( _bstr_t pVal );\n__declspec(implementation_key(1008)) _variant_t IWMPPluginUIHost::getProperty ( _bstr_t bstrName );\n__declspec(implementation_key(1009)) HRESULT IWMPPluginUIHost::setProperty ( _bstr_t bstrName, const _variant_t & newVal );\n__declspec(implementation_key(1010)) HRESULT IWMPMenuCtrl::deleteAllItems ( );\n__declspec(implementation_key(1011)) HRESULT IWMPMenuCtrl::appendItem ( long nID, _bstr_t bstrItem );\n__declspec(implementation_key(1012)) HRESULT IWMPMenuCtrl::appendSeparator ( );\n__declspec(implementation_key(1013)) HRESULT IWMPMenuCtrl::enableItem ( long nID, VARIANT_BOOL newVal );\n__declspec(implementation_key(1014)) HRESULT IWMPMenuCtrl::checkItem ( long nID, VARIANT_BOOL newVal );\n__declspec(implementation_key(1015)) HRESULT IWMPMenuCtrl::checkRadioItem ( long nID, VARIANT_BOOL newVal );\n__declspec(implementation_key(1016)) long IWMPMenuCtrl::GetshowFlags ( );\n__declspec(implementation_key(1017)) void IWMPMenuCtrl::PutshowFlags ( long pVal );\n__declspec(implementation_key(1018)) long IWMPMenuCtrl::show ( );\n__declspec(implementation_key(1019)) HRESULT IWMPMenuCtrl::showEx ( long nID );\n__declspec(implementation_key(1020)) HRESULT IWMPAutoMenuCtrl::show ( _bstr_t newVal );\n__declspec(implementation_key(1021)) _bstr_t IWMPRegionalButtonCtrl::Getimage ( );\n__declspec(implementation_key(1022)) void IWMPRegionalButtonCtrl::Putimage ( _bstr_t pVal );\n__declspec(implementation_key(1023)) _bstr_t IWMPRegionalButtonCtrl::GethoverImage ( );\n__declspec(implementation_key(1024)) void IWMPRegionalButtonCtrl::PuthoverImage ( _bstr_t pVal );\n__declspec(implementation_key(1025)) _bstr_t IWMPRegionalButtonCtrl::GetdownImage ( );\n__declspec(implementation_key(1026)) void IWMPRegionalButtonCtrl::PutdownImage ( _bstr_t pVal );\n__declspec(implementation_key(1027)) _bstr_t IWMPRegionalButtonCtrl::GethoverDownImage ( );\n__declspec(implementation_key(1028)) void IWMPRegionalButtonCtrl::PuthoverDownImage ( _bstr_t pVal );\n__declspec(implementation_key(1029)) _bstr_t IWMPRegionalButtonCtrl::GethoverHoverImage ( );\n__declspec(implementation_key(1030)) void IWMPRegionalButtonCtrl::PuthoverHoverImage ( _bstr_t pVal );\n__declspec(implementation_key(1031)) _bstr_t IWMPRegionalButtonCtrl::GetdisabledImage ( );\n__declspec(implementation_key(1032)) void IWMPRegionalButtonCtrl::PutdisabledImage ( _bstr_t pVal );\n__declspec(implementation_key(1033)) _bstr_t IWMPRegionalButtonCtrl::GetmappingImage ( );\n__declspec(implementation_key(1034)) void IWMPRegionalButtonCtrl::PutmappingImage ( _bstr_t pVal );\n__declspec(implementation_key(1035)) _bstr_t IWMPRegionalButtonCtrl::GettransparencyColor ( );\n__declspec(implementation_key(1036)) void IWMPRegionalButtonCtrl::PuttransparencyColor ( _bstr_t pVal );\n__declspec(implementation_key(1037)) _bstr_t IWMPRegionalButtonCtrl::Getcursor ( );\n__declspec(implementation_key(1038)) void IWMPRegionalButtonCtrl::Putcursor ( _bstr_t pVal );\n__declspec(implementation_key(1039)) VARIANT_BOOL IWMPRegionalButtonCtrl::GetshowBackground ( );\n__declspec(implementation_key(1040)) void IWMPRegionalButtonCtrl::PutshowBackground ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1041)) VARIANT_BOOL IWMPRegionalButtonCtrl::Getradio ( );\n__declspec(implementation_key(1042)) void IWMPRegionalButtonCtrl::Putradio ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1043)) long IWMPRegionalButtonCtrl::GetbuttonCount ( );\n__declspec(implementation_key(1044)) IDispatchPtr IWMPRegionalButtonCtrl::createButton ( );\n__declspec(implementation_key(1045)) IDispatchPtr IWMPRegionalButtonCtrl::getButton ( long nButton );\n__declspec(implementation_key(1046)) HRESULT IWMPRegionalButtonCtrl::Click ( long nButton );\n__declspec(implementation_key(1047)) float IWMPRegionalButtonCtrl::GethueShift ( );\n__declspec(implementation_key(1048)) void IWMPRegionalButtonCtrl::PuthueShift ( float pVal );\n__declspec(implementation_key(1049)) float IWMPRegionalButtonCtrl::Getsaturation ( );\n__declspec(implementation_key(1050)) void IWMPRegionalButtonCtrl::Putsaturation ( float pVal );\n__declspec(implementation_key(1051)) HRESULT IWMPRegionalButtonEvents::onblur ( );\n__declspec(implementation_key(1052)) HRESULT IWMPRegionalButtonEvents::onfocus ( );\n__declspec(implementation_key(1053)) HRESULT IWMPRegionalButtonEvents::onclick ( );\n__declspec(implementation_key(1054)) HRESULT IWMPRegionalButtonEvents::ondblclick ( );\n__declspec(implementation_key(1055)) HRESULT IWMPRegionalButtonEvents::onmousedown ( );\n__declspec(implementation_key(1056)) HRESULT IWMPRegionalButtonEvents::onmouseup ( );\n__declspec(implementation_key(1057)) HRESULT IWMPRegionalButtonEvents::onmousemove ( );\n__declspec(implementation_key(1058)) HRESULT IWMPRegionalButtonEvents::onmouseover ( );\n__declspec(implementation_key(1059)) HRESULT IWMPRegionalButtonEvents::onmouseout ( );\n__declspec(implementation_key(1060)) HRESULT IWMPRegionalButtonEvents::onkeypress ( );\n__declspec(implementation_key(1061)) HRESULT IWMPRegionalButtonEvents::onkeydown ( );\n__declspec(implementation_key(1062)) HRESULT IWMPRegionalButtonEvents::onkeyup ( );\n__declspec(implementation_key(1063)) _bstr_t IWMPRegionalButton::GetupToolTip ( );\n__declspec(implementation_key(1064)) void IWMPRegionalButton::PutupToolTip ( _bstr_t pVal );\n__declspec(implementation_key(1065)) _bstr_t IWMPRegionalButton::GetdownToolTip ( );\n__declspec(implementation_key(1066)) void IWMPRegionalButton::PutdownToolTip ( _bstr_t pVal );\n__declspec(implementation_key(1067)) _bstr_t IWMPRegionalButton::GetmappingColor ( );\n__declspec(implementation_key(1068)) void IWMPRegionalButton::PutmappingColor ( _bstr_t pVal );\n__declspec(implementation_key(1069)) VARIANT_BOOL IWMPRegionalButton::Getenabled ( );\n__declspec(implementation_key(1070)) void IWMPRegionalButton::Putenabled ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1071)) VARIANT_BOOL IWMPRegionalButton::Getsticky ( );\n__declspec(implementation_key(1072)) void IWMPRegionalButton::Putsticky ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1073)) VARIANT_BOOL IWMPRegionalButton::Getdown ( );\n__declspec(implementation_key(1074)) void IWMPRegionalButton::Putdown ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1075)) long IWMPRegionalButton::Getindex ( );\n__declspec(implementation_key(1076)) VARIANT_BOOL IWMPRegionalButton::GettabStop ( );\n__declspec(implementation_key(1077)) void IWMPRegionalButton::PuttabStop ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1078)) _bstr_t IWMPRegionalButton::Getcursor ( );\n__declspec(implementation_key(1079)) void IWMPRegionalButton::Putcursor ( _bstr_t pVal );\n__declspec(implementation_key(1080)) HRESULT IWMPRegionalButton::Click ( );\n__declspec(implementation_key(1081)) _bstr_t IWMPRegionalButton::GetaccName ( );\n__declspec(implementation_key(1082)) void IWMPRegionalButton::PutaccName ( _bstr_t pszName );\n__declspec(implementation_key(1083)) _bstr_t IWMPRegionalButton::GetaccDescription ( );\n__declspec(implementation_key(1084)) void IWMPRegionalButton::PutaccDescription ( _bstr_t pszDescription );\n__declspec(implementation_key(1085)) _bstr_t IWMPRegionalButton::GetaccKeyboardShortcut ( );\n__declspec(implementation_key(1086)) void IWMPRegionalButton::PutaccKeyboardShortcut ( _bstr_t pszShortcut );\n__declspec(implementation_key(1087)) HRESULT IWMPCustomSliderCtrlEvents::ondragbegin ( );\n__declspec(implementation_key(1088)) HRESULT IWMPCustomSliderCtrlEvents::ondragend ( );\n__declspec(implementation_key(1089)) HRESULT IWMPCustomSliderCtrlEvents::onpositionchange ( );\n__declspec(implementation_key(1090)) _bstr_t IWMPCustomSlider::Getcursor ( );\n__declspec(implementation_key(1091)) void IWMPCustomSlider::Putcursor ( _bstr_t pVal );\n__declspec(implementation_key(1092)) float IWMPCustomSlider::Getmin ( );\n__declspec(implementation_key(1093)) void IWMPCustomSlider::Putmin ( float pVal );\n__declspec(implementation_key(1094)) float IWMPCustomSlider::Getmax ( );\n__declspec(implementation_key(1095)) void IWMPCustomSlider::Putmax ( float pVal );\n__declspec(implementation_key(1096)) float IWMPCustomSlider::Getvalue ( );\n__declspec(implementation_key(1097)) void IWMPCustomSlider::Putvalue ( float pVal );\n__declspec(implementation_key(1098)) _bstr_t IWMPCustomSlider::GettoolTip ( );\n__declspec(implementation_key(1099)) void IWMPCustomSlider::PuttoolTip ( _bstr_t pVal );\n__declspec(implementation_key(1100)) _bstr_t IWMPCustomSlider::GetpositionImage ( );\n__declspec(implementation_key(1101)) void IWMPCustomSlider::PutpositionImage ( _bstr_t pVal );\n__declspec(implementation_key(1102)) _bstr_t IWMPCustomSlider::Getimage ( );\n__declspec(implementation_key(1103)) void IWMPCustomSlider::Putimage ( _bstr_t pVal );\n__declspec(implementation_key(1104)) _bstr_t IWMPCustomSlider::GethoverImage ( );\n__declspec(implementation_key(1105)) void IWMPCustomSlider::PuthoverImage ( _bstr_t pVal );\n__declspec(implementation_key(1106)) _bstr_t IWMPCustomSlider::GetdisabledImage ( );\n__declspec(implementation_key(1107)) void IWMPCustomSlider::PutdisabledImage ( _bstr_t pVal );\n__declspec(implementation_key(1108)) _bstr_t IWMPCustomSlider::GetdownImage ( );\n__declspec(implementation_key(1109)) void IWMPCustomSlider::PutdownImage ( _bstr_t pVal );\n__declspec(implementation_key(1110)) _bstr_t IWMPCustomSlider::GettransparencyColor ( );\n__declspec(implementation_key(1111)) void IWMPCustomSlider::PuttransparencyColor ( _bstr_t pVal );\n__declspec(implementation_key(1112)) _bstr_t IWMPTextCtrl::GetbackgroundColor ( );\n__declspec(implementation_key(1113)) void IWMPTextCtrl::PutbackgroundColor ( _bstr_t pVal );\n__declspec(implementation_key(1114)) _bstr_t IWMPTextCtrl::GetfontFace ( );\n__declspec(implementation_key(1115)) void IWMPTextCtrl::PutfontFace ( _bstr_t pVal );\n__declspec(implementation_key(1116)) _bstr_t IWMPTextCtrl::GetfontStyle ( );\n__declspec(implementation_key(1117)) void IWMPTextCtrl::PutfontStyle ( _bstr_t pVal );\n__declspec(implementation_key(1118)) long IWMPTextCtrl::GetfontSize ( );\n__declspec(implementation_key(1119)) void IWMPTextCtrl::PutfontSize ( long pVal );\n__declspec(implementation_key(1120)) _bstr_t IWMPTextCtrl::GetforegroundColor ( );\n__declspec(implementation_key(1121)) void IWMPTextCtrl::PutforegroundColor ( _bstr_t pVal );\n__declspec(implementation_key(1122)) _bstr_t IWMPTextCtrl::GethoverBackgroundColor ( );\n__declspec(implementation_key(1123)) void IWMPTextCtrl::PuthoverBackgroundColor ( _bstr_t pVal );\n__declspec(implementation_key(1124)) _bstr_t IWMPTextCtrl::GethoverForegroundColor ( );\n__declspec(implementation_key(1125)) void IWMPTextCtrl::PuthoverForegroundColor ( _bstr_t pVal );\n__declspec(implementation_key(1126)) _bstr_t IWMPTextCtrl::GethoverFontStyle ( );\n__declspec(implementation_key(1127)) void IWMPTextCtrl::PuthoverFontStyle ( _bstr_t pVal );\n__declspec(implementation_key(1128)) _bstr_t IWMPTextCtrl::Getvalue ( );\n__declspec(implementation_key(1129)) void IWMPTextCtrl::Putvalue ( _bstr_t pVal );\n__declspec(implementation_key(1130)) _bstr_t IWMPTextCtrl::GettoolTip ( );\n__declspec(implementation_key(1131)) void IWMPTextCtrl::PuttoolTip ( _bstr_t pVal );\n__declspec(implementation_key(1132)) _bstr_t IWMPTextCtrl::GetdisabledFontStyle ( );\n__declspec(implementation_key(1133)) void IWMPTextCtrl::PutdisabledFontStyle ( _bstr_t pVal );\n__declspec(implementation_key(1134)) _bstr_t IWMPTextCtrl::GetdisabledForegroundColor ( );\n__declspec(implementation_key(1135)) void IWMPTextCtrl::PutdisabledForegroundColor ( _bstr_t pVal );\n__declspec(implementation_key(1136)) _bstr_t IWMPTextCtrl::GetdisabledBackgroundColor ( );\n__declspec(implementation_key(1137)) void IWMPTextCtrl::PutdisabledBackgroundColor ( _bstr_t pVal );\n__declspec(implementation_key(1138)) VARIANT_BOOL IWMPTextCtrl::GetfontSmoothing ( );\n__declspec(implementation_key(1139)) void IWMPTextCtrl::PutfontSmoothing ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1140)) _bstr_t IWMPTextCtrl::Getjustification ( );\n__declspec(implementation_key(1141)) void IWMPTextCtrl::Putjustification ( _bstr_t pVal );\n__declspec(implementation_key(1142)) VARIANT_BOOL IWMPTextCtrl::GetwordWrap ( );\n__declspec(implementation_key(1143)) void IWMPTextCtrl::PutwordWrap ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1144)) _bstr_t IWMPTextCtrl::Getcursor ( );\n__declspec(implementation_key(1145)) void IWMPTextCtrl::Putcursor ( _bstr_t pVal );\n__declspec(implementation_key(1146)) VARIANT_BOOL IWMPTextCtrl::Getscrolling ( );\n__declspec(implementation_key(1147)) void IWMPTextCtrl::Putscrolling ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1148)) _bstr_t IWMPTextCtrl::GetscrollingDirection ( );\n__declspec(implementation_key(1149)) void IWMPTextCtrl::PutscrollingDirection ( _bstr_t pVal );\n__declspec(implementation_key(1150)) int IWMPTextCtrl::GetscrollingDelay ( );\n__declspec(implementation_key(1151)) void IWMPTextCtrl::PutscrollingDelay ( int pVal );\n__declspec(implementation_key(1152)) int IWMPTextCtrl::GetscrollingAmount ( );\n__declspec(implementation_key(1153)) void IWMPTextCtrl::PutscrollingAmount ( int pVal );\n__declspec(implementation_key(1154)) int IWMPTextCtrl::GettextWidth ( );\n__declspec(implementation_key(1155)) VARIANT_BOOL IWMPTextCtrl::GetonGlass ( );\n__declspec(implementation_key(1156)) void IWMPTextCtrl::PutonGlass ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1157)) VARIANT_BOOL IWMPTextCtrl::GetdisableGlassBlurBackground ( );\n__declspec(implementation_key(1158)) void IWMPTextCtrl::PutdisableGlassBlurBackground ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1159)) IUnknownPtr ITaskCntrCtrl::GetCurrentContainer ( );\n__declspec(implementation_key(1160)) void ITaskCntrCtrl::PutCurrentContainer ( IUnknown * ppUnk );\n__declspec(implementation_key(1161)) HRESULT ITaskCntrCtrl::Activate ( );\n__declspec(implementation_key(1162)) HRESULT _WMPCoreEvents::OpenStateChange ( long NewState );\n__declspec(implementation_key(1163)) HRESULT _WMPCoreEvents::PlayStateChange ( long NewState );\n__declspec(implementation_key(1164)) HRESULT _WMPCoreEvents::AudioLanguageChange ( long LangID );\n__declspec(implementation_key(1165)) HRESULT _WMPCoreEvents::StatusChange ( );\n__declspec(implementation_key(1166)) HRESULT _WMPCoreEvents::ScriptCommand ( _bstr_t scType, _bstr_t Param );\n__declspec(implementation_key(1167)) HRESULT _WMPCoreEvents::NewStream ( );\n__declspec(implementation_key(1168)) HRESULT _WMPCoreEvents::Disconnect ( long Result );\n__declspec(implementation_key(1169)) HRESULT _WMPCoreEvents::Buffering ( VARIANT_BOOL Start );\n__declspec(implementation_key(1170)) HRESULT _WMPCoreEvents::Error ( );\n__declspec(implementation_key(1171)) HRESULT _WMPCoreEvents::Warning ( long WarningType, long Param, _bstr_t Description );\n__declspec(implementation_key(1172)) HRESULT _WMPCoreEvents::EndOfStream ( long Result );\n__declspec(implementation_key(1173)) HRESULT _WMPCoreEvents::PositionChange ( double oldPosition, double newPosition );\n__declspec(implementation_key(1174)) HRESULT _WMPCoreEvents::MarkerHit ( long MarkerNum );\n__declspec(implementation_key(1175)) HRESULT _WMPCoreEvents::DurationUnitChange ( long NewDurationUnit );\n__declspec(implementation_key(1176)) HRESULT _WMPCoreEvents::CdromMediaChange ( long CdromNum );\n__declspec(implementation_key(1177)) HRESULT _WMPCoreEvents::PlaylistChange ( IDispatch * Playlist, enum WMPPlaylistChangeEventType change );\n__declspec(implementation_key(1178)) HRESULT _WMPCoreEvents::CurrentPlaylistChange ( enum WMPPlaylistChangeEventType change );\n__declspec(implementation_key(1179)) HRESULT _WMPCoreEvents::CurrentPlaylistItemAvailable ( _bstr_t bstrItemName );\n__declspec(implementation_key(1180)) HRESULT _WMPCoreEvents::MediaChange ( IDispatch * Item );\n__declspec(implementation_key(1181)) HRESULT _WMPCoreEvents::CurrentMediaItemAvailable ( _bstr_t bstrItemName );\n__declspec(implementation_key(1182)) HRESULT _WMPCoreEvents::CurrentItemChange ( IDispatch * pdispMedia );\n__declspec(implementation_key(1183)) HRESULT _WMPCoreEvents::MediaCollectionChange ( );\n__declspec(implementation_key(1184)) HRESULT _WMPCoreEvents::MediaCollectionAttributeStringAdded ( _bstr_t bstrAttribName, _bstr_t bstrAttribVal );\n__declspec(implementation_key(1185)) HRESULT _WMPCoreEvents::MediaCollectionAttributeStringRemoved ( _bstr_t bstrAttribName, _bstr_t bstrAttribVal );\n__declspec(implementation_key(1186)) HRESULT _WMPCoreEvents::MediaCollectionAttributeStringChanged ( _bstr_t bstrAttribName, _bstr_t bstrOldAttribVal, _bstr_t bstrNewAttribVal );\n__declspec(implementation_key(1187)) HRESULT _WMPCoreEvents::PlaylistCollectionChange ( );\n__declspec(implementation_key(1188)) HRESULT _WMPCoreEvents::PlaylistCollectionPlaylistAdded ( _bstr_t bstrPlaylistName );\n__declspec(implementation_key(1189)) HRESULT _WMPCoreEvents::PlaylistCollectionPlaylistRemoved ( _bstr_t bstrPlaylistName );\n__declspec(implementation_key(1190)) HRESULT _WMPCoreEvents::PlaylistCollectionPlaylistSetAsDeleted ( _bstr_t bstrPlaylistName, VARIANT_BOOL varfIsDeleted );\n__declspec(implementation_key(1191)) HRESULT _WMPCoreEvents::ModeChange ( _bstr_t ModeName, VARIANT_BOOL NewValue );\n__declspec(implementation_key(1192)) HRESULT _WMPCoreEvents::MediaError ( IDispatch * pMediaObject );\n__declspec(implementation_key(1193)) HRESULT _WMPCoreEvents::OpenPlaylistSwitch ( IDispatch * pItem );\n__declspec(implementation_key(1194)) HRESULT _WMPCoreEvents::DomainChange ( _bstr_t strDomain );\n__declspec(implementation_key(1195)) HRESULT _WMPCoreEvents::StringCollectionChange ( IDispatch * pdispStringCollection, enum WMPStringCollectionChangeEventType change, long lCollectionIndex );\n__declspec(implementation_key(1196)) HRESULT _WMPCoreEvents::MediaCollectionMediaAdded ( IDispatch * pdispMedia );\n__declspec(implementation_key(1197)) HRESULT _WMPCoreEvents::MediaCollectionMediaRemoved ( IDispatch * pdispMedia );\n__declspec(implementation_key(1198)) HRESULT IWMPGraphEventHandler::NotifyGraphStateChange ( ULONG_PTR punkGraph, long lGraphState );\n__declspec(implementation_key(1199)) HRESULT IWMPGraphEventHandler::AsyncNotifyGraphStateChange ( ULONG_PTR punkGraph, long lGraphState );\n__declspec(implementation_key(1200)) HRESULT IWMPGraphEventHandler::NotifyRateChange ( ULONG_PTR punkGraph, double dRate );\n__declspec(implementation_key(1201)) HRESULT IWMPGraphEventHandler::NotifyPlaybackEnd ( ULONG_PTR punkGraph, _bstr_t bstrQueuedUrl, ULONG_PTR dwCurrentContext );\n__declspec(implementation_key(1202)) HRESULT IWMPGraphEventHandler::NotifyStreamEnd ( ULONG_PTR punkGraph );\n__declspec(implementation_key(1203)) HRESULT IWMPGraphEventHandler::NotifyScriptCommand ( ULONG_PTR punkGraph, _bstr_t bstrCommand, _bstr_t bstrParam );\n__declspec(implementation_key(1204)) HRESULT IWMPGraphEventHandler::NotifyEarlyScriptCommand ( ULONG_PTR punkGraph, _bstr_t bstrCommand, _bstr_t bstrParam, double dTime );\n__declspec(implementation_key(1205)) HRESULT IWMPGraphEventHandler::NotifyMarkerHit ( ULONG_PTR punkGraph, long lMarker );\n__declspec(implementation_key(1206)) HRESULT IWMPGraphEventHandler::NotifyGraphError ( ULONG_PTR punkGraph, long lErrMajor, long lErrMinor, long lCondition, _bstr_t bstrInfo, IUnknown * punkGraphData );\n__declspec(implementation_key(1207)) HRESULT IWMPGraphEventHandler::NotifyAcquireCredentials ( ULONG_PTR punkGraph, _bstr_t bstrRealm, _bstr_t bstrSite, _bstr_t bstrUser, _bstr_t bstrPassword, unsigned long * pdwFlags, VARIANT_BOOL * pfCancel );\n__declspec(implementation_key(1208)) HRESULT IWMPGraphEventHandler::NotifyUntrustedLicense ( ULONG_PTR punkGraph, _bstr_t bstrURL, VARIANT_BOOL * pfCancel );\n__declspec(implementation_key(1209)) HRESULT IWMPGraphEventHandler::NotifyLicenseDialog ( ULONG_PTR punkGraph, _bstr_t bstrURL, _bstr_t bstrContent, unsigned char * pPostData, unsigned long dwPostDataSize, long lResult );\n__declspec(implementation_key(1210)) HRESULT IWMPGraphEventHandler::NotifyNeedsIndividualization ( ULONG_PTR punkGraph, VARIANT_BOOL * pfResult );\n__declspec(implementation_key(1211)) HRESULT IWMPGraphEventHandler::NotifyNewMetadata ( ULONG_PTR punkGraph );\n__declspec(implementation_key(1212)) HRESULT IWMPGraphEventHandler::NotifyNewMediaCaps ( ULONG_PTR punkGraph );\n__declspec(implementation_key(1213)) HRESULT IWMPGraphEventHandler::NotifyDisconnect ( ULONG_PTR punkGraph, long lResult );\n__declspec(implementation_key(1214)) HRESULT IWMPGraphEventHandler::NotifySave ( ULONG_PTR punkGraph, long fStarted, long lResult );\n__declspec(implementation_key(1215)) HRESULT IWMPGraphEventHandler::NotifyDelayClose ( ULONG_PTR punkGraph, VARIANT_BOOL fDelay );\n__declspec(implementation_key(1216)) HRESULT IWMPGraphEventHandler::NotifyDVD ( ULONG_PTR punkGraph, long lEventCode, long lParam1, long lParam2 );\n__declspec(implementation_key(1217)) HRESULT IWMPGraphEventHandler::NotifyRequestAppThreadAction ( ULONG_PTR punkGraph, unsigned long dwAction );\n__declspec(implementation_key(1218)) HRESULT IWMPGraphEventHandler::NotifyPrerollReady ( ULONG_PTR punkGraph );\n__declspec(implementation_key(1219)) HRESULT IWMPGraphEventHandler::NotifyNewIcons ( ULONG_PTR punkGraph );\n__declspec(implementation_key(1220)) HRESULT IWMPGraphEventHandler::NotifyStepComplete ( ULONG_PTR punkGraph );\n__declspec(implementation_key(1221)) HRESULT IWMPGraphEventHandler::NotifyNewBitrate ( ULONG_PTR punkGraph, unsigned long dwBitrate );\n__declspec(implementation_key(1222)) HRESULT IWMPGraphEventHandler::NotifyGraphCreationPreRender ( ULONG_PTR punkGraph, ULONG_PTR punkFilterGraph, ULONG_PTR punkCardeaEncConfig, ULONG_PTR phrContinue, ULONG_PTR hEventToSet );\n__declspec(implementation_key(1223)) HRESULT IWMPGraphEventHandler::NotifyGraphCreationPostRender ( ULONG_PTR punkGraph, ULONG_PTR punkFilterGraph, ULONG_PTR phrContinue, ULONG_PTR hEventToSet );\n__declspec(implementation_key(1224)) HRESULT IWMPGraphEventHandler::NotifyGraphUserEvent ( ULONG_PTR punkGraph, long EventCode );\n__declspec(implementation_key(1225)) HRESULT IWMPGraphEventHandler::NotifyRevocation ( ULONG_PTR punkGraph, VARIANT_BOOL * pfResult );\n__declspec(implementation_key(1226)) HRESULT IWMPGraphEventHandler::NotifyNeedsWMGraphIndividualization ( ULONG_PTR punkGraph, ULONG_PTR phWnd, ULONG_PTR hIndivEvent, VARIANT_BOOL * pfCancel, VARIANT_BOOL * pfResult );\n__declspec(implementation_key(1227)) HRESULT IWMPGraphEventHandler::NotifyNeedsFullscreen ( ULONG_PTR punkGraph );\n__declspec(implementation_key(1228)) long IBattery::GetpresetCount ( );\n__declspec(implementation_key(1229)) IDispatchPtr IBattery::Getpreset ( long nIndex );\n__declspec(implementation_key(1230)) _bstr_t IBatteryPreset::Gettitle ( );\n__declspec(implementation_key(1231)) void IBatteryPreset::Puttitle ( _bstr_t pVal );\n__declspec(implementation_key(1232)) long IBarsEffect::GetdisplayMode ( );\n__declspec(implementation_key(1233)) void IBarsEffect::PutdisplayMode ( long pVal );\n__declspec(implementation_key(1234)) VARIANT_BOOL IBarsEffect::GetshowPeaks ( );\n__declspec(implementation_key(1235)) void IBarsEffect::PutshowPeaks ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1236)) long IBarsEffect::GetpeakHangTime ( );\n__declspec(implementation_key(1237)) void IBarsEffect::PutpeakHangTime ( long pVal );\n__declspec(implementation_key(1238)) float IBarsEffect::GetpeakFallbackAcceleration ( );\n__declspec(implementation_key(1239)) void IBarsEffect::PutpeakFallbackAcceleration ( float pVal );\n__declspec(implementation_key(1240)) float IBarsEffect::GetpeakFallbackSpeed ( );\n__declspec(implementation_key(1241)) void IBarsEffect::PutpeakFallbackSpeed ( float pVal );\n__declspec(implementation_key(1242)) float IBarsEffect::GetlevelFallbackAcceleration ( );\n__declspec(implementation_key(1243)) void IBarsEffect::PutlevelFallbackAcceleration ( float pVal );\n__declspec(implementation_key(1244)) float IBarsEffect::GetlevelFallbackSpeed ( );\n__declspec(implementation_key(1245)) void IBarsEffect::PutlevelFallbackSpeed ( float pVal );\n__declspec(implementation_key(1246)) _bstr_t IBarsEffect::GetbackgroundColor ( );\n__declspec(implementation_key(1247)) void IBarsEffect::PutbackgroundColor ( _bstr_t pVal );\n__declspec(implementation_key(1248)) _bstr_t IBarsEffect::GetlevelColor ( );\n__declspec(implementation_key(1249)) void IBarsEffect::PutlevelColor ( _bstr_t pVal );\n__declspec(implementation_key(1250)) _bstr_t IBarsEffect::GetpeakColor ( );\n__declspec(implementation_key(1251)) void IBarsEffect::PutpeakColor ( _bstr_t pVal );\n__declspec(implementation_key(1252)) long IBarsEffect::GethorizontalSpacing ( );\n__declspec(implementation_key(1253)) void IBarsEffect::PuthorizontalSpacing ( long pVal );\n__declspec(implementation_key(1254)) long IBarsEffect::GetlevelWidth ( );\n__declspec(implementation_key(1255)) void IBarsEffect::PutlevelWidth ( long pVal );\n__declspec(implementation_key(1256)) float IBarsEffect::GetlevelScale ( );\n__declspec(implementation_key(1257)) void IBarsEffect::PutlevelScale ( float pVal );\n__declspec(implementation_key(1258)) long IBarsEffect::GetfadeRate ( );\n__declspec(implementation_key(1259)) void IBarsEffect::PutfadeRate ( long pVal );\n__declspec(implementation_key(1260)) long IBarsEffect::GetfadeMode ( );\n__declspec(implementation_key(1261)) void IBarsEffect::PutfadeMode ( long pVal );\n__declspec(implementation_key(1262)) VARIANT_BOOL IBarsEffect::Gettransparent ( );\n__declspec(implementation_key(1263)) void IBarsEffect::Puttransparent ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1264)) _bstr_t IWMPExternal::Getversion ( );\n__declspec(implementation_key(1265)) _bstr_t IWMPExternal::GetappColorLight ( );\n__declspec(implementation_key(1266)) void IWMPExternal::PutOnColorChange ( IDispatch * _arg1 );\n__declspec(implementation_key(1267)) _bstr_t IWMPExternalColors::GetappColorMedium ( );\n__declspec(implementation_key(1268)) _bstr_t IWMPExternalColors::GetappColorDark ( );\n__declspec(implementation_key(1269)) _bstr_t IWMPExternalColors::GetappColorButtonHighlight ( );\n__declspec(implementation_key(1270)) _bstr_t IWMPExternalColors::GetappColorButtonShadow ( );\n__declspec(implementation_key(1271)) _bstr_t IWMPExternalColors::GetappColorButtonHoverFace ( );\n__declspec(implementation_key(1272)) HRESULT IWMPSubscriptionServiceLimited::NavigateTaskPaneURL ( _bstr_t bstrKeyName, _bstr_t bstrTaskPane, _bstr_t bstrParams );\n__declspec(implementation_key(1273)) void IWMPSubscriptionServiceLimited::PutSelectedTaskPane ( _bstr_t bstrTaskPane );\n__declspec(implementation_key(1274)) _bstr_t IWMPSubscriptionServiceLimited::GetSelectedTaskPane ( );\n__declspec(implementation_key(1275)) _bstr_t IWMPDownloadItem::GetsourceURL ( );\n__declspec(implementation_key(1276)) long IWMPDownloadItem::Getsize ( );\n__declspec(implementation_key(1277)) _bstr_t IWMPDownloadItem::Gettype ( );\n__declspec(implementation_key(1278)) long IWMPDownloadItem::Getprogress ( );\n__declspec(implementation_key(1279)) enum WMPSubscriptionDownloadState IWMPDownloadItem::GetdownloadState ( );\n__declspec(implementation_key(1280)) HRESULT IWMPDownloadItem::pause ( );\n__declspec(implementation_key(1281)) HRESULT IWMPDownloadItem::resume ( );\n__declspec(implementation_key(1282)) HRESULT IWMPDownloadItem::cancel ( );\n__declspec(implementation_key(1283)) _bstr_t IWMPDownloadItem2::getItemInfo ( _bstr_t bstrItemName );\n__declspec(implementation_key(1284)) long IWMPDownloadCollection::GetID ( );\n__declspec(implementation_key(1285)) long IWMPDownloadCollection::Getcount ( );\n__declspec(implementation_key(1286)) IWMPDownloadItem2Ptr IWMPDownloadCollection::Item ( long lItem );\n__declspec(implementation_key(1287)) IWMPDownloadItem2Ptr IWMPDownloadCollection::startDownload ( _bstr_t bstrSourceURL, _bstr_t bstrType );\n__declspec(implementation_key(1288)) HRESULT IWMPDownloadCollection::removeItem ( long lItem );\n__declspec(implementation_key(1289)) HRESULT IWMPDownloadCollection::clear ( );\n__declspec(implementation_key(1290)) IWMPDownloadCollectionPtr IWMPDownloadManager::getDownloadCollection ( long lCollectionId );\n__declspec(implementation_key(1291)) IWMPDownloadCollectionPtr IWMPDownloadManager::createDownloadCollection ( );\n__declspec(implementation_key(1292)) IWMPDownloadManagerPtr IWMPSubscriptionServiceExternal::GetDownloadManager ( );\n__declspec(implementation_key(1293)) HRESULT IWMPSubscriptionServicePlayMedia::playMedia ( _bstr_t bstrURL );\n__declspec(implementation_key(1294)) void IWMPDiscoExternal::PutOnLoginChange ( IDispatch * _arg1 );\n__declspec(implementation_key(1295)) VARIANT_BOOL IWMPDiscoExternal::GetuserLoggedIn ( );\n__declspec(implementation_key(1296)) HRESULT IWMPDiscoExternal::attemptLogin ( );\n__declspec(implementation_key(1297)) _bstr_t IWMPDiscoExternal::GetaccountType ( );\n__declspec(implementation_key(1298)) void IWMPDiscoExternal::PutOnViewChange ( IDispatch * _arg1 );\n__declspec(implementation_key(1299)) HRESULT IWMPDiscoExternal::changeView ( _bstr_t bstrLibraryLocationType, _bstr_t bstrLibraryLocationID, _bstr_t bstrFilter, _bstr_t bstrViewParams );\n__declspec(implementation_key(1300)) HRESULT IWMPDiscoExternal::changeViewOnlineList ( _bstr_t bstrLibraryLocationType, _bstr_t bstrLibraryLocationID, _bstr_t bstrParams, _bstr_t bstrFriendlyName, _bstr_t bstrListType, _bstr_t bstrViewMode );\n__declspec(implementation_key(1301)) _bstr_t IWMPDiscoExternal::GetlibraryLocationType ( );\n__declspec(implementation_key(1302)) _bstr_t IWMPDiscoExternal::GetlibraryLocationID ( );\n__declspec(implementation_key(1303)) _bstr_t IWMPDiscoExternal::GetselectedItemType ( );\n__declspec(implementation_key(1304)) _bstr_t IWMPDiscoExternal::GetselectedItemID ( );\n__declspec(implementation_key(1305)) _bstr_t IWMPDiscoExternal::Getfilter ( );\n__declspec(implementation_key(1306)) _bstr_t IWMPDiscoExternal::Gettask ( );\n__declspec(implementation_key(1307)) _bstr_t IWMPDiscoExternal::GetviewParameters ( );\n__declspec(implementation_key(1308)) HRESULT IWMPDiscoExternal::cancelNavigate ( );\n__declspec(implementation_key(1309)) HRESULT IWMPDiscoExternal::showPopup ( long lPopupIndex, _bstr_t bstrParameters );\n__declspec(implementation_key(1310)) HRESULT IWMPDiscoExternal::addToBasket ( _bstr_t bstrViewType, _bstr_t bstrViewIDs );\n__declspec(implementation_key(1311)) _bstr_t IWMPDiscoExternal::GetbasketTitle ( );\n__declspec(implementation_key(1312)) HRESULT IWMPDiscoExternal::play ( _bstr_t bstrLibraryLocationType, _bstr_t bstrLibraryLocationIDs );\n__declspec(implementation_key(1313)) HRESULT IWMPDiscoExternal::download ( _bstr_t bstrViewType, _bstr_t bstrViewIDs );\n__declspec(implementation_key(1314)) HRESULT IWMPDiscoExternal::buy ( _bstr_t bstrViewType, _bstr_t bstrViewIDs );\n__declspec(implementation_key(1315)) HRESULT IWMPDiscoExternal::saveCurrentViewToLibrary ( _bstr_t bstrFriendlyListType, VARIANT_BOOL fDynamic );\n__declspec(implementation_key(1316)) HRESULT IWMPDiscoExternal::authenticate ( long lAuthenticationIndex );\n__declspec(implementation_key(1317)) HRESULT IWMPDiscoExternal::sendMessage ( _bstr_t bstrMsg, _bstr_t bstrParam );\n__declspec(implementation_key(1318)) void IWMPDiscoExternal::PutOnSendMessageComplete ( IDispatch * _arg1 );\n__declspec(implementation_key(1319)) void IWMPDiscoExternal::PutignoreIEHistory ( VARIANT_BOOL _arg1 );\n__declspec(implementation_key(1320)) VARIANT_BOOL IWMPDiscoExternal::GetpluginRunning ( );\n__declspec(implementation_key(1321)) VARIANT_BOOL IWMPDiscoExternal::GettemplateBeingDisplayedInLocalLibrary ( );\n__declspec(implementation_key(1322)) void IWMPDiscoExternal::PutOnChangeViewError ( IDispatch * _arg1 );\n__declspec(implementation_key(1323)) void IWMPDiscoExternal::PutOnChangeViewOnlineListError ( IDispatch * _arg1 );\n__declspec(implementation_key(1324)) HRESULT IWMPCDDVDWizardExternal::WriteNames ( _bstr_t bstrTOC, _bstr_t bstrMetadata );\n__declspec(implementation_key(1325)) HRESULT IWMPCDDVDWizardExternal::ReturnToMainTask ( );\n__declspec(implementation_key(1326)) HRESULT IWMPCDDVDWizardExternal::WriteNamesEx ( enum WMP_WRITENAMESEX_TYPE type, _bstr_t bstrTypeId, _bstr_t bstrMetadata, VARIANT_BOOL fRenameRegroupFiles );\n__declspec(implementation_key(1327)) _bstr_t IWMPCDDVDWizardExternal::GetMDQByRequestID ( _bstr_t bstrRequestID );\n__declspec(implementation_key(1328)) HRESULT IWMPCDDVDWizardExternal::EditMetadata ( );\n__declspec(implementation_key(1329)) VARIANT_BOOL IWMPCDDVDWizardExternal::IsMetadataAvailableForEdit ( );\n__declspec(implementation_key(1330)) HRESULT IWMPCDDVDWizardExternal::BuyCD ( _bstr_t bstrTitle, _bstr_t bstrArtist, _bstr_t bstrAlbum, _bstr_t bstrUFID, _bstr_t bstrWMID );\n__declspec(implementation_key(1331)) HRESULT IWMPOfflineExternal::forceOnline ( );\n__declspec(implementation_key(1332)) _bstr_t IWMPDMRAVTransportService::GetTransportState ( );\n__declspec(implementation_key(1333)) _bstr_t IWMPDMRAVTransportService::GetTransportStatus ( );\n__declspec(implementation_key(1334)) _bstr_t IWMPDMRAVTransportService::GetPlaybackStorageMedium ( );\n__declspec(implementation_key(1335)) _bstr_t IWMPDMRAVTransportService::GetRecordStorageMedium ( );\n__declspec(implementation_key(1336)) _bstr_t IWMPDMRAVTransportService::GetPossiblePlaybackStorageMedia ( );\n__declspec(implementation_key(1337)) _bstr_t IWMPDMRAVTransportService::GetPossibleRecordStorageMedia ( );\n__declspec(implementation_key(1338)) _bstr_t IWMPDMRAVTransportService::GetCurrentPlayMode ( );\n__declspec(implementation_key(1339)) _bstr_t IWMPDMRAVTransportService::GetTransportPlaySpeed ( );\n__declspec(implementation_key(1340)) _bstr_t IWMPDMRAVTransportService::GetRecordMediumWriteStatus ( );\n__declspec(implementation_key(1341)) _bstr_t IWMPDMRAVTransportService::GetCurrentRecordQualityMode ( );\n__declspec(implementation_key(1342)) _bstr_t IWMPDMRAVTransportService::GetPossibleRecordQualityModes ( );\n__declspec(implementation_key(1343)) unsigned long IWMPDMRAVTransportService::GetNumberOfTracks ( );\n__declspec(implementation_key(1344)) unsigned long IWMPDMRAVTransportService::GetCurrentTrack ( );\n__declspec(implementation_key(1345)) _bstr_t IWMPDMRAVTransportService::GetCurrentTrackDuration ( );\n__declspec(implementation_key(1346)) _bstr_t IWMPDMRAVTransportService::GetCurrentMediaDuration ( );\n__declspec(implementation_key(1347)) _bstr_t IWMPDMRAVTransportService::GetCurrentTrackMetaData ( );\n__declspec(implementation_key(1348)) _bstr_t IWMPDMRAVTransportService::GetCurrentTrackURI ( );\n__declspec(implementation_key(1349)) _bstr_t IWMPDMRAVTransportService::GetAVTransportURI ( );\n__declspec(implementation_key(1350)) _bstr_t IWMPDMRAVTransportService::GetAVTransportURIMetaData ( );\n__declspec(implementation_key(1351)) _bstr_t IWMPDMRAVTransportService::GetNextAVTransportURI ( );\n__declspec(implementation_key(1352)) _bstr_t IWMPDMRAVTransportService::GetNextAVTransportURIMetaData ( );\n__declspec(implementation_key(1353)) _bstr_t IWMPDMRAVTransportService::GetRelativeTimePosition ( );\n__declspec(implementation_key(1354)) _bstr_t IWMPDMRAVTransportService::GetAbsoluteTimePosition ( );\n__declspec(implementation_key(1355)) long IWMPDMRAVTransportService::GetRelativeCounterPosition ( );\n__declspec(implementation_key(1356)) long IWMPDMRAVTransportService::GetAbsoluteCounterPosition ( );\n__declspec(implementation_key(1357)) _bstr_t IWMPDMRAVTransportService::GetCurrentTransportActions ( );\n__declspec(implementation_key(1358)) _bstr_t IWMPDMRAVTransportService::GetLastChange ( );\n__declspec(implementation_key(1359)) _bstr_t IWMPDMRAVTransportService::GetA_ARG_TYPE_SeekMode ( );\n__declspec(implementation_key(1360)) _bstr_t IWMPDMRAVTransportService::GetA_ARG_TYPE_SeekTarget ( );\n__declspec(implementation_key(1361)) unsigned long IWMPDMRAVTransportService::GetA_ARG_TYPE_InstanceID ( );\n__declspec(implementation_key(1362)) _bstr_t IWMPDMRAVTransportService::GetCurrentProtocolInfo ( );\n__declspec(implementation_key(1363)) HRESULT IWMPDMRAVTransportService::SetAVTransportURI ( IUnknown * punkRemoteEndpointInfo, unsigned long ulInstanceID, _bstr_t bstrCurrentURI, _bstr_t bstrCurrentURIMetaData );\n__declspec(implementation_key(1364)) HRESULT IWMPDMRAVTransportService::GetMediaInfo ( unsigned long ulInstanceID, unsigned long * pulNumTracks, BSTR * pbstrMediaDuration, BSTR * pbstrCurrentURI, BSTR * pbstrCurrentURIMetaData, BSTR * pbstrNextURI, BSTR * pNextURIMetaData, BSTR * pbstrPlayMedium, BSTR * pbstrRecordMedium, BSTR * pbstrWriteStatus );\n__declspec(implementation_key(1365)) HRESULT IWMPDMRAVTransportService::GetTransportInfo ( unsigned long ulInstanceID, BSTR * pbstrCurrentTransportState, BSTR * pbstrCurrentTransportStatus, BSTR * pbstrCurrentSpeed );\n__declspec(implementation_key(1366)) HRESULT IWMPDMRAVTransportService::GetPositionInfo ( unsigned long ulInstanceID, unsigned long * pTrack, BSTR * pbstrTrackDuration, BSTR * pbstrTrackMetaData, BSTR * pbstrTrackURI, BSTR * pbstrRelTime, BSTR * pbstrAbsTime, long * plRelCount, long * plAbsCount );\n__declspec(implementation_key(1367)) HRESULT IWMPDMRAVTransportService::GetDeviceCapabilities ( unsigned long ulInstanceID, BSTR * pbstrPlayMedia, BSTR * pbstrRecMedia, BSTR * pbstrRecQualityModes );\n__declspec(implementation_key(1368)) HRESULT IWMPDMRAVTransportService::GetTransportSettings ( unsigned long ulInstanceID, BSTR * pbstrPlayMode, BSTR * pbstrRecQualityMode );\n__declspec(implementation_key(1369)) HRESULT IWMPDMRAVTransportService::stop ( unsigned long ulInstanceID );\n__declspec(implementation_key(1370)) HRESULT IWMPDMRAVTransportService::play ( unsigned long ulInstanceID, _bstr_t bstrSpeed );\n__declspec(implementation_key(1371)) HRESULT IWMPDMRAVTransportService::pause ( unsigned long ulInstanceID );\n__declspec(implementation_key(1372)) HRESULT IWMPDMRAVTransportService::Seek ( unsigned long ulInstanceID, _bstr_t bstrUnit, _bstr_t bstrTarget );\n__declspec(implementation_key(1373)) HRESULT IWMPDMRAVTransportService::next ( unsigned long ulInstanceID );\n__declspec(implementation_key(1374)) HRESULT IWMPDMRAVTransportService::previous ( unsigned long ulInstanceID );\n__declspec(implementation_key(1375)) HRESULT IWMPDMRAVTransportService::GetCurrentTransportActions ( unsigned long ulInstanceID, BSTR * pbstrActions );\n__declspec(implementation_key(1376)) _bstr_t IWMPDMRConnectionManagerService::GetSourceProtocolInfo ( );\n__declspec(implementation_key(1377)) _bstr_t IWMPDMRConnectionManagerService::GetSinkProtocolInfo ( );\n__declspec(implementation_key(1378)) _bstr_t IWMPDMRConnectionManagerService::GetCurrentConnectionIDs ( );\n__declspec(implementation_key(1379)) _bstr_t IWMPDMRConnectionManagerService::GetA_ARG_TYPE_ConnectionStatus ( );\n__declspec(implementation_key(1380)) _bstr_t IWMPDMRConnectionManagerService::GetA_ARG_TYPE_ConnectionManager ( );\n__declspec(implementation_key(1381)) _bstr_t IWMPDMRConnectionManagerService::GetA_ARG_TYPE_Direction ( );\n__declspec(implementation_key(1382)) _bstr_t IWMPDMRConnectionManagerService::GetA_ARG_TYPE_ProtocolInfo ( );\n__declspec(implementation_key(1383)) long IWMPDMRConnectionManagerService::GetA_ARG_TYPE_ConnectionID ( );\n__declspec(implementation_key(1384)) long IWMPDMRConnectionManagerService::GetA_ARG_TYPE_AVTransportID ( );\n__declspec(implementation_key(1385)) long IWMPDMRConnectionManagerService::GetA_ARG_TYPE_RcsID ( );\n__declspec(implementation_key(1386)) HRESULT IWMPDMRConnectionManagerService::GetProtocolInfo ( BSTR * pbstrSource, BSTR * pbstrSink );\n__declspec(implementation_key(1387)) HRESULT IWMPDMRConnectionManagerService::GetCurrentConnectionIDs ( BSTR * pbstrConnectionIDs );\n__declspec(implementation_key(1388)) HRESULT IWMPDMRConnectionManagerService::GetCurrentConnectionInfo ( long lConnectionID, long * plResID, long * plAVTransportID, BSTR * pbstrProtocolInfo, BSTR * pbstrPeerConnectionManager, long * plPeerConnectionID, BSTR * pbstrDirection, BSTR * pbstrStatus );\n__declspec(implementation_key(1389)) _bstr_t IWMPDMRRenderingControlService::GetLastChange ( );\n__declspec(implementation_key(1390)) _bstr_t IWMPDMRRenderingControlService::GetPresetNameList ( );\n__declspec(implementation_key(1391)) VARIANT_BOOL IWMPDMRRenderingControlService::Getmute ( );\n__declspec(implementation_key(1392)) unsigned short IWMPDMRRenderingControlService::Getvolume ( );\n__declspec(implementation_key(1393)) _bstr_t IWMPDMRRenderingControlService::GetA_ARG_TYPE_Channel ( );\n__declspec(implementation_key(1394)) unsigned long IWMPDMRRenderingControlService::GetA_ARG_TYPE_InstanceID ( );\n__declspec(implementation_key(1395)) _bstr_t IWMPDMRRenderingControlService::GetA_ARG_TYPE_PresetName ( );\n__declspec(implementation_key(1396)) HRESULT IWMPDMRRenderingControlService::ListPresets ( unsigned long ulInstanceID, BSTR * pbstrCurrentPresetList );\n__declspec(implementation_key(1397)) HRESULT IWMPDMRRenderingControlService::SelectPreset ( unsigned long ulInstanceID, _bstr_t bstrPresetName );\n__declspec(implementation_key(1398)) HRESULT IWMPDMRRenderingControlService::GetMute ( unsigned long ulInstanceID, _bstr_t bstrChannel, VARIANT_BOOL * pbCurrentMute );\n__declspec(implementation_key(1399)) HRESULT IWMPDMRRenderingControlService::SetMute ( unsigned long ulInstanceID, _bstr_t bstrChannel, VARIANT_BOOL bDesiredMute );\n__declspec(implementation_key(1400)) HRESULT IWMPDMRRenderingControlService::GetVolume ( unsigned long ulInstanceID, _bstr_t bstrChannel, unsigned short * puiCurrentVolume );\n__declspec(implementation_key(1401)) HRESULT IWMPDMRRenderingControlService::SetVolume ( unsigned long ulInstanceID, _bstr_t bstrChannel, unsigned short uiDesiredVolume );\n__declspec(implementation_key(1402)) VARIANT_BOOL IWMPCdromBurn::isAvailable ( _bstr_t bstrItem );\n__declspec(implementation_key(1403)) _bstr_t IWMPCdromBurn::getItemInfo ( _bstr_t bstrItem );\n__declspec(implementation_key(1404)) _bstr_t IWMPCdromBurn::Getlabel ( );\n__declspec(implementation_key(1405)) void IWMPCdromBurn::Putlabel ( _bstr_t pbstrLabel );\n__declspec(implementation_key(1406)) enum WMPBurnFormat IWMPCdromBurn::GetburnFormat ( );\n__declspec(implementation_key(1407)) void IWMPCdromBurn::PutburnFormat ( enum WMPBurnFormat pwmpbf );\n__declspec(implementation_key(1408)) IWMPPlaylistPtr IWMPCdromBurn::GetburnPlaylist ( );\n__declspec(implementation_key(1409)) void IWMPCdromBurn::PutburnPlaylist ( struct IWMPPlaylist * ppPlaylist );\n__declspec(implementation_key(1410)) HRESULT IWMPCdromBurn::refreshStatus ( );\n__declspec(implementation_key(1411)) enum WMPBurnState IWMPCdromBurn::GetburnState ( );\n__declspec(implementation_key(1412)) long IWMPCdromBurn::GetburnProgress ( );\n__declspec(implementation_key(1413)) HRESULT IWMPCdromBurn::startBurn ( );\n__declspec(implementation_key(1414)) HRESULT IWMPCdromBurn::stopBurn ( );\n__declspec(implementation_key(1415)) HRESULT IWMPCdromBurn::erase ( );\n__declspec(implementation_key(1416)) long IWMPPlaylist::Getcount ( );\n__declspec(implementation_key(1417)) _bstr_t IWMPPlaylist::Getname ( );\n__declspec(implementation_key(1418)) void IWMPPlaylist::Putname ( _bstr_t pbstrName );\n__declspec(implementation_key(1419)) long IWMPPlaylist::GetattributeCount ( );\n__declspec(implementation_key(1420)) _bstr_t IWMPPlaylist::GetattributeName ( long lIndex );\n__declspec(implementation_key(1421)) IWMPMediaPtr IWMPPlaylist::GetItem ( long lIndex );\n__declspec(implementation_key(1422)) _bstr_t IWMPPlaylist::getItemInfo ( _bstr_t bstrName );\n__declspec(implementation_key(1423)) HRESULT IWMPPlaylist::setItemInfo ( _bstr_t bstrName, _bstr_t bstrValue );\n__declspec(implementation_key(1424)) VARIANT_BOOL IWMPPlaylist::GetisIdentical ( struct IWMPPlaylist * pIWMPPlaylist );\n__declspec(implementation_key(1425)) HRESULT IWMPPlaylist::clear ( );\n__declspec(implementation_key(1426)) HRESULT IWMPPlaylist::insertItem ( long lIndex, struct IWMPMedia * pIWMPMedia );\n__declspec(implementation_key(1427)) HRESULT IWMPPlaylist::appendItem ( struct IWMPMedia * pIWMPMedia );\n__declspec(implementation_key(1428)) HRESULT IWMPPlaylist::removeItem ( struct IWMPMedia * pIWMPMedia );\n__declspec(implementation_key(1429)) HRESULT IWMPPlaylist::moveItem ( long lIndexOld, long lIndexNew );\n__declspec(implementation_key(1430)) VARIANT_BOOL IWMPMedia::GetisIdentical ( struct IWMPMedia * pIWMPMedia );\n__declspec(implementation_key(1431)) _bstr_t IWMPMedia::GetsourceURL ( );\n__declspec(implementation_key(1432)) _bstr_t IWMPMedia::Getname ( );\n__declspec(implementation_key(1433)) void IWMPMedia::Putname ( _bstr_t pbstrName );\n__declspec(implementation_key(1434)) long IWMPMedia::GetimageSourceWidth ( );\n__declspec(implementation_key(1435)) long IWMPMedia::GetimageSourceHeight ( );\n__declspec(implementation_key(1436)) long IWMPMedia::GetmarkerCount ( );\n__declspec(implementation_key(1437)) double IWMPMedia::getMarkerTime ( long MarkerNum );\n__declspec(implementation_key(1438)) _bstr_t IWMPMedia::getMarkerName ( long MarkerNum );\n__declspec(implementation_key(1439)) double IWMPMedia::Getduration ( );\n__declspec(implementation_key(1440)) _bstr_t IWMPMedia::GetdurationString ( );\n__declspec(implementation_key(1441)) long IWMPMedia::GetattributeCount ( );\n__declspec(implementation_key(1442)) _bstr_t IWMPMedia::getAttributeName ( long lIndex );\n__declspec(implementation_key(1443)) _bstr_t IWMPMedia::getItemInfo ( _bstr_t bstrItemName );\n__declspec(implementation_key(1444)) HRESULT IWMPMedia::setItemInfo ( _bstr_t bstrItemName, _bstr_t bstrVal );\n__declspec(implementation_key(1445)) _bstr_t IWMPMedia::getItemInfoByAtom ( long lAtom );\n__declspec(implementation_key(1446)) VARIANT_BOOL IWMPMedia::isMemberOf ( struct IWMPPlaylist * pPlaylist );\n__declspec(implementation_key(1447)) VARIANT_BOOL IWMPMedia::isReadOnlyItem ( _bstr_t bstrItemName );\n__declspec(implementation_key(1448)) IWMPMediaPtr IWMPMediaCollection::add ( _bstr_t bstrURL );\n__declspec(implementation_key(1449)) IWMPPlaylistPtr IWMPMediaCollection::getAll ( );\n__declspec(implementation_key(1450)) IWMPPlaylistPtr IWMPMediaCollection::getByName ( _bstr_t bstrName );\n__declspec(implementation_key(1451)) IWMPPlaylistPtr IWMPMediaCollection::getByGenre ( _bstr_t bstrGenre );\n__declspec(implementation_key(1452)) IWMPPlaylistPtr IWMPMediaCollection::getByAuthor ( _bstr_t bstrAuthor );\n__declspec(implementation_key(1453)) IWMPPlaylistPtr IWMPMediaCollection::getByAlbum ( _bstr_t bstrAlbum );\n__declspec(implementation_key(1454)) IWMPPlaylistPtr IWMPMediaCollection::getByAttribute ( _bstr_t bstrAttribute, _bstr_t bstrValue );\n__declspec(implementation_key(1455)) HRESULT IWMPMediaCollection::remove ( struct IWMPMedia * pItem, VARIANT_BOOL varfDeleteFile );\n__declspec(implementation_key(1456)) IWMPStringCollectionPtr IWMPMediaCollection::getAttributeStringCollection ( _bstr_t bstrAttribute, _bstr_t bstrMediaType );\n__declspec(implementation_key(1457)) long IWMPMediaCollection::getMediaAtom ( _bstr_t bstrItemName );\n__declspec(implementation_key(1458)) HRESULT IWMPMediaCollection::setDeleted ( struct IWMPMedia * pItem, VARIANT_BOOL varfIsDeleted );\n__declspec(implementation_key(1459)) VARIANT_BOOL IWMPMediaCollection::isDeleted ( struct IWMPMedia * pItem );\n__declspec(implementation_key(1460)) _bstr_t IWMPLibrary::Getname ( );\n__declspec(implementation_key(1461)) enum WMPLibraryType IWMPLibrary::Gettype ( );\n__declspec(implementation_key(1462)) IWMPMediaCollectionPtr IWMPLibrary::GetmediaCollection ( );\n__declspec(implementation_key(1463)) VARIANT_BOOL IWMPLibrary::isIdentical ( struct IWMPLibrary * pIWMPLibrary );\n__declspec(implementation_key(1464)) VARIANT_BOOL IWMPControls::GetisAvailable ( _bstr_t bstrItem );\n__declspec(implementation_key(1465)) HRESULT IWMPControls::play ( );\n__declspec(implementation_key(1466)) HRESULT IWMPControls::stop ( );\n__declspec(implementation_key(1467)) HRESULT IWMPControls::pause ( );\n__declspec(implementation_key(1468)) HRESULT IWMPControls::fastForward ( );\n__declspec(implementation_key(1469)) HRESULT IWMPControls::fastReverse ( );\n__declspec(implementation_key(1470)) double IWMPControls::GetcurrentPosition ( );\n__declspec(implementation_key(1471)) void IWMPControls::PutcurrentPosition ( double pdCurrentPosition );\n__declspec(implementation_key(1472)) _bstr_t IWMPControls::GetcurrentPositionString ( );\n__declspec(implementation_key(1473)) HRESULT IWMPControls::next ( );\n__declspec(implementation_key(1474)) HRESULT IWMPControls::previous ( );\n__declspec(implementation_key(1475)) IWMPMediaPtr IWMPControls::GetcurrentItem ( );\n__declspec(implementation_key(1476)) void IWMPControls::PutcurrentItem ( struct IWMPMedia * ppIWMPMedia );\n__declspec(implementation_key(1477)) long IWMPControls::GetcurrentMarker ( );\n__declspec(implementation_key(1478)) void IWMPControls::PutcurrentMarker ( long plMarker );\n__declspec(implementation_key(1479)) HRESULT IWMPControls::playItem ( struct IWMPMedia * pIWMPMedia );\n__declspec(implementation_key(1480)) long IWMPPlaylistArray::Getcount ( );\n__declspec(implementation_key(1481)) IWMPPlaylistPtr IWMPPlaylistArray::Item ( long lIndex );\n__declspec(implementation_key(1482)) IWMPPlaylistPtr IWMPPlaylistCollection::newPlaylist ( _bstr_t bstrName );\n__declspec(implementation_key(1483)) IWMPPlaylistArrayPtr IWMPPlaylistCollection::getAll ( );\n__declspec(implementation_key(1484)) IWMPPlaylistArrayPtr IWMPPlaylistCollection::getByName ( _bstr_t bstrName );\n__declspec(implementation_key(1485)) HRESULT IWMPPlaylistCollection::remove ( struct IWMPPlaylist * pItem );\n__declspec(implementation_key(1486)) HRESULT IWMPPlaylistCollection::setDeleted ( struct IWMPPlaylist * pItem, VARIANT_BOOL varfIsDeleted );\n__declspec(implementation_key(1487)) VARIANT_BOOL IWMPPlaylistCollection::isDeleted ( struct IWMPPlaylist * pItem );\n__declspec(implementation_key(1488)) IWMPPlaylistPtr IWMPPlaylistCollection::importPlaylist ( struct IWMPPlaylist * pItem );\n__declspec(implementation_key(1489)) _bstr_t IWMPCdrom::GetdriveSpecifier ( );\n__declspec(implementation_key(1490)) IWMPPlaylistPtr IWMPCdrom::GetPlaylist ( );\n__declspec(implementation_key(1491)) HRESULT IWMPCdrom::eject ( );\n__declspec(implementation_key(1492)) long IWMPCdromCollection::Getcount ( );\n__declspec(implementation_key(1493)) IWMPCdromPtr IWMPCdromCollection::Item ( long lIndex );\n__declspec(implementation_key(1494)) IWMPCdromPtr IWMPCdromCollection::getByDriveSpecifier ( _bstr_t bstrDriveSpecifier );\n__declspec(implementation_key(1495)) HRESULT IWMPCore::close ( );\n__declspec(implementation_key(1496)) _bstr_t IWMPCore::GetURL ( );\n__declspec(implementation_key(1497)) void IWMPCore::PutURL ( _bstr_t pbstrURL );\n__declspec(implementation_key(1498)) enum WMPOpenState IWMPCore::GetopenState ( );\n__declspec(implementation_key(1499)) enum WMPPlayState IWMPCore::GetplayState ( );\n__declspec(implementation_key(1500)) IWMPControlsPtr IWMPCore::Getcontrols ( );\n__declspec(implementation_key(1501)) IWMPSettingsPtr IWMPCore::Getsettings ( );\n__declspec(implementation_key(1502)) IWMPMediaPtr IWMPCore::GetcurrentMedia ( );\n__declspec(implementation_key(1503)) void IWMPCore::PutcurrentMedia ( struct IWMPMedia * ppMedia );\n__declspec(implementation_key(1504)) IWMPMediaCollectionPtr IWMPCore::GetmediaCollection ( );\n__declspec(implementation_key(1505)) IWMPPlaylistCollectionPtr IWMPCore::GetplaylistCollection ( );\n__declspec(implementation_key(1506)) _bstr_t IWMPCore::GetversionInfo ( );\n__declspec(implementation_key(1507)) HRESULT IWMPCore::launchURL ( _bstr_t bstrURL );\n__declspec(implementation_key(1508)) IWMPNetworkPtr IWMPCore::Getnetwork ( );\n__declspec(implementation_key(1509)) IWMPPlaylistPtr IWMPCore::GetcurrentPlaylist ( );\n__declspec(implementation_key(1510)) void IWMPCore::PutcurrentPlaylist ( struct IWMPPlaylist * ppPL );\n__declspec(implementation_key(1511)) IWMPCdromCollectionPtr IWMPCore::GetcdromCollection ( );\n__declspec(implementation_key(1512)) IWMPClosedCaptionPtr IWMPCore::GetclosedCaption ( );\n__declspec(implementation_key(1513)) VARIANT_BOOL IWMPCore::GetisOnline ( );\n__declspec(implementation_key(1514)) IWMPErrorPtr IWMPCore::GetError ( );\n__declspec(implementation_key(1515)) _bstr_t IWMPCore::Getstatus ( );\n__declspec(implementation_key(1516)) IWMPDVDPtr IWMPCore2::Getdvd ( );\n__declspec(implementation_key(1517)) IWMPPlaylistPtr IWMPCore3::newPlaylist ( _bstr_t bstrName, _bstr_t bstrURL );\n__declspec(implementation_key(1518)) IWMPMediaPtr IWMPCore3::newMedia ( _bstr_t bstrURL );\n__declspec(implementation_key(1519)) VARIANT_BOOL IWMPPlayer4::Getenabled ( );\n__declspec(implementation_key(1520)) void IWMPPlayer4::Putenabled ( VARIANT_BOOL pbEnabled );\n__declspec(implementation_key(1521)) VARIANT_BOOL IWMPPlayer4::GetfullScreen ( );\n__declspec(implementation_key(1522)) void IWMPPlayer4::PutfullScreen ( VARIANT_BOOL pbFullScreen );\n__declspec(implementation_key(1523)) VARIANT_BOOL IWMPPlayer4::GetenableContextMenu ( );\n__declspec(implementation_key(1524)) void IWMPPlayer4::PutenableContextMenu ( VARIANT_BOOL pbEnableContextMenu );\n__declspec(implementation_key(1525)) void IWMPPlayer4::PutuiMode ( _bstr_t pbstrMode );\n__declspec(implementation_key(1526)) _bstr_t IWMPPlayer4::GetuiMode ( );\n__declspec(implementation_key(1527)) VARIANT_BOOL IWMPPlayer4::GetstretchToFit ( );\n__declspec(implementation_key(1528)) void IWMPPlayer4::PutstretchToFit ( VARIANT_BOOL pbEnabled );\n__declspec(implementation_key(1529)) VARIANT_BOOL IWMPPlayer4::GetwindowlessVideo ( );\n__declspec(implementation_key(1530)) void IWMPPlayer4::PutwindowlessVideo ( VARIANT_BOOL pbEnabled );\n__declspec(implementation_key(1531)) VARIANT_BOOL IWMPPlayer4::GetisRemote ( );\n__declspec(implementation_key(1532)) IWMPPlayerApplicationPtr IWMPPlayer4::GetplayerApplication ( );\n__declspec(implementation_key(1533)) HRESULT IWMPPlayer4::openPlayer ( _bstr_t bstrURL );\n__declspec(implementation_key(1534)) VARIANT_BOOL IWMPPlayer3::Getenabled ( );\n__declspec(implementation_key(1535)) void IWMPPlayer3::Putenabled ( VARIANT_BOOL pbEnabled );\n__declspec(implementation_key(1536)) VARIANT_BOOL IWMPPlayer3::GetfullScreen ( );\n__declspec(implementation_key(1537)) void IWMPPlayer3::PutfullScreen ( VARIANT_BOOL pbFullScreen );\n__declspec(implementation_key(1538)) VARIANT_BOOL IWMPPlayer3::GetenableContextMenu ( );\n__declspec(implementation_key(1539)) void IWMPPlayer3::PutenableContextMenu ( VARIANT_BOOL pbEnableContextMenu );\n__declspec(implementation_key(1540)) void IWMPPlayer3::PutuiMode ( _bstr_t pbstrMode );\n__declspec(implementation_key(1541)) _bstr_t IWMPPlayer3::GetuiMode ( );\n__declspec(implementation_key(1542)) VARIANT_BOOL IWMPPlayer3::GetstretchToFit ( );\n__declspec(implementation_key(1543)) void IWMPPlayer3::PutstretchToFit ( VARIANT_BOOL pbEnabled );\n__declspec(implementation_key(1544)) VARIANT_BOOL IWMPPlayer3::GetwindowlessVideo ( );\n__declspec(implementation_key(1545)) void IWMPPlayer3::PutwindowlessVideo ( VARIANT_BOOL pbEnabled );\n__declspec(implementation_key(1546)) VARIANT_BOOL IWMPPlayer2::Getenabled ( );\n__declspec(implementation_key(1547)) void IWMPPlayer2::Putenabled ( VARIANT_BOOL pbEnabled );\n__declspec(implementation_key(1548)) VARIANT_BOOL IWMPPlayer2::GetfullScreen ( );\n__declspec(implementation_key(1549)) void IWMPPlayer2::PutfullScreen ( VARIANT_BOOL pbFullScreen );\n__declspec(implementation_key(1550)) VARIANT_BOOL IWMPPlayer2::GetenableContextMenu ( );\n__declspec(implementation_key(1551)) void IWMPPlayer2::PutenableContextMenu ( VARIANT_BOOL pbEnableContextMenu );\n__declspec(implementation_key(1552)) void IWMPPlayer2::PutuiMode ( _bstr_t pbstrMode );\n__declspec(implementation_key(1553)) _bstr_t IWMPPlayer2::GetuiMode ( );\n__declspec(implementation_key(1554)) VARIANT_BOOL IWMPPlayer2::GetstretchToFit ( );\n__declspec(implementation_key(1555)) void IWMPPlayer2::PutstretchToFit ( VARIANT_BOOL pbEnabled );\n__declspec(implementation_key(1556)) VARIANT_BOOL IWMPPlayer2::GetwindowlessVideo ( );\n__declspec(implementation_key(1557)) void IWMPPlayer2::PutwindowlessVideo ( VARIANT_BOOL pbEnabled );\n__declspec(implementation_key(1558)) VARIANT_BOOL IWMPPlayer::Getenabled ( );\n__declspec(implementation_key(1559)) void IWMPPlayer::Putenabled ( VARIANT_BOOL pbEnabled );\n__declspec(implementation_key(1560)) VARIANT_BOOL IWMPPlayer::GetfullScreen ( );\n__declspec(implementation_key(1561)) void IWMPPlayer::PutfullScreen ( VARIANT_BOOL pbFullScreen );\n__declspec(implementation_key(1562)) VARIANT_BOOL IWMPPlayer::GetenableContextMenu ( );\n__declspec(implementation_key(1563)) void IWMPPlayer::PutenableContextMenu ( VARIANT_BOOL pbEnableContextMenu );\n__declspec(implementation_key(1564)) void IWMPPlayer::PutuiMode ( _bstr_t pbstrMode );\n__declspec(implementation_key(1565)) _bstr_t IWMPPlayer::GetuiMode ( );\n__declspec(implementation_key(1566)) HRESULT IWMPControls2::step ( long lStep );\n__declspec(implementation_key(1567)) IWMPErrorItemPtr IWMPMedia2::GetError ( );\n__declspec(implementation_key(1568)) long IWMPMedia3::getAttributeCountByType ( _bstr_t bstrType, _bstr_t bstrLanguage );\n__declspec(implementation_key(1569)) _variant_t IWMPMedia3::getItemInfoByType ( _bstr_t bstrType, _bstr_t bstrLanguage, long lIndex );\n__declspec(implementation_key(1570)) long IWMPControls3::GetaudioLanguageCount ( );\n__declspec(implementation_key(1571)) long IWMPControls3::getAudioLanguageID ( long lIndex );\n__declspec(implementation_key(1572)) _bstr_t IWMPControls3::getAudioLanguageDescription ( long lIndex );\n__declspec(implementation_key(1573)) long IWMPControls3::GetcurrentAudioLanguage ( );\n__declspec(implementation_key(1574)) void IWMPControls3::PutcurrentAudioLanguage ( long plLangID );\n__declspec(implementation_key(1575)) long IWMPControls3::GetcurrentAudioLanguageIndex ( );\n__declspec(implementation_key(1576)) void IWMPControls3::PutcurrentAudioLanguageIndex ( long plIndex );\n__declspec(implementation_key(1577)) _bstr_t IWMPControls3::getLanguageName ( long lLangID );\n__declspec(implementation_key(1578)) _bstr_t IWMPControls3::GetcurrentPositionTimecode ( );\n__declspec(implementation_key(1579)) void IWMPControls3::PutcurrentPositionTimecode ( _bstr_t bstrTimecode );\n__declspec(implementation_key(1580)) IWMPQueryPtr IWMPMediaCollection2::createQuery ( );\n__declspec(implementation_key(1581)) IWMPPlaylistPtr IWMPMediaCollection2::getPlaylistByQuery ( struct IWMPQuery * pQuery, _bstr_t bstrMediaType, _bstr_t bstrSortAttribute, VARIANT_BOOL fSortAscending );\n__declspec(implementation_key(1582)) IWMPStringCollectionPtr IWMPMediaCollection2::getStringCollectionByQuery ( _bstr_t bstrAttribute, struct IWMPQuery * pQuery, _bstr_t bstrMediaType, _bstr_t bstrSortAttribute, VARIANT_BOOL fSortAscending );\n__declspec(implementation_key(1583)) IWMPPlaylistPtr IWMPMediaCollection2::getByAttributeAndMediaType ( _bstr_t bstrAttribute, _bstr_t bstrValue, _bstr_t bstrMediaType );\n__declspec(implementation_key(1584)) long IWMPLibraryServices::getCountByType ( enum WMPLibraryType wmplt );\n__declspec(implementation_key(1585)) IWMPLibraryPtr IWMPLibraryServices::getLibraryByType ( enum WMPLibraryType wmplt, long lIndex );\n__declspec(implementation_key(1586)) _bstr_t IWMPLibrary2::getItemInfo ( _bstr_t bstrItemName );\n__declspec(implementation_key(1587)) HRESULT IWMPSyncDevice3::estimateSyncSize ( struct IWMPPlaylist * pNonRulePlaylist, struct IWMPPlaylist * pRulesPlaylist );\n__declspec(implementation_key(1588)) HRESULT IWMPSyncDevice3::cancelEstimation ( );\n__declspec(implementation_key(1589)) IWMPPlaylistPtr IWMPPlaylistCtrl::GetPlaylist ( );\n__declspec(implementation_key(1590)) void IWMPPlaylistCtrl::PutPlaylist ( struct IWMPPlaylist * ppdispPlaylist );\n__declspec(implementation_key(1591)) _bstr_t IWMPPlaylistCtrl::Getcolumns ( );\n__declspec(implementation_key(1592)) void IWMPPlaylistCtrl::Putcolumns ( _bstr_t pbstrColumns );\n__declspec(implementation_key(1593)) long IWMPPlaylistCtrl::GetcolumnCount ( );\n__declspec(implementation_key(1594)) _bstr_t IWMPPlaylistCtrl::GetcolumnOrder ( );\n__declspec(implementation_key(1595)) void IWMPPlaylistCtrl::PutcolumnOrder ( _bstr_t pbstrColumnOrder );\n__declspec(implementation_key(1596)) VARIANT_BOOL IWMPPlaylistCtrl::GetcolumnsVisible ( );\n__declspec(implementation_key(1597)) void IWMPPlaylistCtrl::PutcolumnsVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1598)) VARIANT_BOOL IWMPPlaylistCtrl::GetdropDownVisible ( );\n__declspec(implementation_key(1599)) void IWMPPlaylistCtrl::PutdropDownVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1600)) VARIANT_BOOL IWMPPlaylistCtrl::GetplaylistItemsVisible ( );\n__declspec(implementation_key(1601)) void IWMPPlaylistCtrl::PutplaylistItemsVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1602)) VARIANT_BOOL IWMPPlaylistCtrl::GetcheckboxesVisible ( );\n__declspec(implementation_key(1603)) void IWMPPlaylistCtrl::PutcheckboxesVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1604)) _bstr_t IWMPPlaylistCtrl::GetbackgroundColor ( );\n__declspec(implementation_key(1605)) void IWMPPlaylistCtrl::PutbackgroundColor ( _bstr_t pbstrColor );\n__declspec(implementation_key(1606)) _bstr_t IWMPPlaylistCtrl::GetforegroundColor ( );\n__declspec(implementation_key(1607)) void IWMPPlaylistCtrl::PutforegroundColor ( _bstr_t pbstrColor );\n__declspec(implementation_key(1608)) _bstr_t IWMPPlaylistCtrl::GetdisabledItemColor ( );\n__declspec(implementation_key(1609)) void IWMPPlaylistCtrl::PutdisabledItemColor ( _bstr_t pbstrColor );\n__declspec(implementation_key(1610)) _bstr_t IWMPPlaylistCtrl::GetitemPlayingColor ( );\n__declspec(implementation_key(1611)) void IWMPPlaylistCtrl::PutitemPlayingColor ( _bstr_t pbstrColor );\n__declspec(implementation_key(1612)) _bstr_t IWMPPlaylistCtrl::GetitemPlayingBackgroundColor ( );\n__declspec(implementation_key(1613)) void IWMPPlaylistCtrl::PutitemPlayingBackgroundColor ( _bstr_t pbstrBackgroundColor );\n__declspec(implementation_key(1614)) _bstr_t IWMPPlaylistCtrl::GetbackgroundImage ( );\n__declspec(implementation_key(1615)) void IWMPPlaylistCtrl::PutbackgroundImage ( _bstr_t pbstrImage );\n__declspec(implementation_key(1616)) VARIANT_BOOL IWMPPlaylistCtrl::GetallowItemEditing ( );\n__declspec(implementation_key(1617)) void IWMPPlaylistCtrl::PutallowItemEditing ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1618)) VARIANT_BOOL IWMPPlaylistCtrl::GetallowColumnSorting ( );\n__declspec(implementation_key(1619)) void IWMPPlaylistCtrl::PutallowColumnSorting ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1620)) _bstr_t IWMPPlaylistCtrl::GetdropDownList ( );\n__declspec(implementation_key(1621)) void IWMPPlaylistCtrl::PutdropDownList ( _bstr_t pbstrList );\n__declspec(implementation_key(1622)) _bstr_t IWMPPlaylistCtrl::GetdropDownToolTip ( );\n__declspec(implementation_key(1623)) void IWMPPlaylistCtrl::PutdropDownToolTip ( _bstr_t pbstrToolTip );\n__declspec(implementation_key(1624)) VARIANT_BOOL IWMPPlaylistCtrl::Getcopying ( );\n__declspec(implementation_key(1625)) void IWMPPlaylistCtrl::Putcopying ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1626)) HRESULT IWMPPlaylistCtrl::copy ( );\n__declspec(implementation_key(1627)) HRESULT IWMPPlaylistCtrl::abortCopy ( );\n__declspec(implementation_key(1628)) HRESULT IWMPPlaylistCtrl::deleteSelected ( );\n__declspec(implementation_key(1629)) HRESULT IWMPPlaylistCtrl::deleteSelectedFromLibrary ( );\n__declspec(implementation_key(1630)) HRESULT IWMPPlaylistCtrl::moveSelectedUp ( );\n__declspec(implementation_key(1631)) HRESULT IWMPPlaylistCtrl::moveSelectedDown ( );\n__declspec(implementation_key(1632)) HRESULT IWMPPlaylistCtrl::addSelectedToPlaylist ( struct IWMPPlaylist * pdispPlaylist );\n__declspec(implementation_key(1633)) long IWMPPlaylistCtrl::getNextSelectedItem ( long nStartIndex );\n__declspec(implementation_key(1634)) long IWMPPlaylistCtrl::getNextCheckedItem ( long nStartIndex );\n__declspec(implementation_key(1635)) HRESULT IWMPPlaylistCtrl::setSelectedState ( long nIndex, VARIANT_BOOL vbSelected );\n__declspec(implementation_key(1636)) HRESULT IWMPPlaylistCtrl::setCheckedState ( long nIndex, VARIANT_BOOL vbChecked );\n__declspec(implementation_key(1637)) HRESULT IWMPPlaylistCtrl::sortColumn ( long nIndex );\n__declspec(implementation_key(1638)) HRESULT IWMPPlaylistCtrl::setColumnResizeMode ( long nIndex, _bstr_t newMode );\n__declspec(implementation_key(1639)) HRESULT IWMPPlaylistCtrl::setColumnWidth ( long nIndex, long nWidth );\n__declspec(implementation_key(1640)) _bstr_t IWMPPlaylistCtrl::GetitemErrorColor ( );\n__declspec(implementation_key(1641)) void IWMPPlaylistCtrl::PutitemErrorColor ( _bstr_t pbstrColor );\n__declspec(implementation_key(1642)) long IWMPPlaylistCtrl::GetitemCount ( );\n__declspec(implementation_key(1643)) IWMPMediaPtr IWMPPlaylistCtrl::GetitemMedia ( long nIndex );\n__declspec(implementation_key(1644)) IWMPPlaylistPtr IWMPPlaylistCtrl::GetitemPlaylist ( long nIndex );\n__declspec(implementation_key(1645)) long IWMPPlaylistCtrl::getNextSelectedItem2 ( long nStartIndex );\n__declspec(implementation_key(1646)) long IWMPPlaylistCtrl::getNextCheckedItem2 ( long nStartIndex );\n__declspec(implementation_key(1647)) HRESULT IWMPPlaylistCtrl::setSelectedState2 ( long nIndex, VARIANT_BOOL vbSelected );\n__declspec(implementation_key(1648)) HRESULT IWMPPlaylistCtrl::setCheckedState2 ( long nIndex, VARIANT_BOOL vbChecked );\n__declspec(implementation_key(1649)) _bstr_t IWMPPlaylistCtrl::GetleftStatus ( );\n__declspec(implementation_key(1650)) void IWMPPlaylistCtrl::PutleftStatus ( _bstr_t pbstrStatus );\n__declspec(implementation_key(1651)) _bstr_t IWMPPlaylistCtrl::GetrightStatus ( );\n__declspec(implementation_key(1652)) void IWMPPlaylistCtrl::PutrightStatus ( _bstr_t pbstrStatus );\n__declspec(implementation_key(1653)) VARIANT_BOOL IWMPPlaylistCtrl::GeteditButtonVisible ( );\n__declspec(implementation_key(1654)) void IWMPPlaylistCtrl::PuteditButtonVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1655)) _bstr_t IWMPPlaylistCtrl::GetdropDownImage ( );\n__declspec(implementation_key(1656)) void IWMPPlaylistCtrl::PutdropDownImage ( _bstr_t pbstrImage );\n__declspec(implementation_key(1657)) _bstr_t IWMPPlaylistCtrl::GetdropDownBackgroundImage ( );\n__declspec(implementation_key(1658)) void IWMPPlaylistCtrl::PutdropDownBackgroundImage ( _bstr_t pbstrImage );\n__declspec(implementation_key(1659)) float IWMPPlaylistCtrl::GethueShift ( );\n__declspec(implementation_key(1660)) void IWMPPlaylistCtrl::PuthueShift ( float pVal );\n__declspec(implementation_key(1661)) float IWMPPlaylistCtrl::Getsaturation ( );\n__declspec(implementation_key(1662)) void IWMPPlaylistCtrl::Putsaturation ( float pVal );\n__declspec(implementation_key(1663)) _bstr_t IWMPPlaylistCtrl::GetstatusColor ( );\n__declspec(implementation_key(1664)) void IWMPPlaylistCtrl::PutstatusColor ( _bstr_t pbstrColor );\n__declspec(implementation_key(1665)) VARIANT_BOOL IWMPPlaylistCtrl::GettoolbarVisible ( );\n__declspec(implementation_key(1666)) void IWMPPlaylistCtrl::PuttoolbarVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1667)) _bstr_t IWMPPlaylistCtrl::GetitemSelectedColor ( );\n__declspec(implementation_key(1668)) void IWMPPlaylistCtrl::PutitemSelectedColor ( _bstr_t pbstrColor );\n__declspec(implementation_key(1669)) _bstr_t IWMPPlaylistCtrl::GetitemSelectedFocusLostColor ( );\n__declspec(implementation_key(1670)) void IWMPPlaylistCtrl::PutitemSelectedFocusLostColor ( _bstr_t pbstrFocusLostColor );\n__declspec(implementation_key(1671)) _bstr_t IWMPPlaylistCtrl::GetitemSelectedBackgroundColor ( );\n__declspec(implementation_key(1672)) void IWMPPlaylistCtrl::PutitemSelectedBackgroundColor ( _bstr_t pbstrColor );\n__declspec(implementation_key(1673)) _bstr_t IWMPPlaylistCtrl::GetitemSelectedBackgroundFocusLostColor ( );\n__declspec(implementation_key(1674)) void IWMPPlaylistCtrl::PutitemSelectedBackgroundFocusLostColor ( _bstr_t pbstrFocusLostColor );\n__declspec(implementation_key(1675)) _bstr_t IWMPPlaylistCtrl::GetbackgroundSplitColor ( );\n__declspec(implementation_key(1676)) void IWMPPlaylistCtrl::PutbackgroundSplitColor ( _bstr_t pbstrColor );\n__declspec(implementation_key(1677)) _bstr_t IWMPPlaylistCtrl::GetstatusTextColor ( );\n__declspec(implementation_key(1678)) void IWMPPlaylistCtrl::PutstatusTextColor ( _bstr_t pbstrColor );\n__declspec(implementation_key(1679)) VARIANT_BOOL IWMPLibraryTreeCtrl::GetdropDownVisible ( );\n__declspec(implementation_key(1680)) void IWMPLibraryTreeCtrl::PutdropDownVisible ( VARIANT_BOOL pVal );\n__declspec(implementation_key(1681)) _bstr_t IWMPLibraryTreeCtrl::GetforegroundColor ( );\n__declspec(implementation_key(1682)) void IWMPLibraryTreeCtrl::PutforegroundColor ( _bstr_t pVal );\n__declspec(implementation_key(1683)) _bstr_t IWMPLibraryTreeCtrl::GetbackgroundColor ( );\n__declspec(implementation_key(1684)) void IWMPLibraryTreeCtrl::PutbackgroundColor ( _bstr_t pVal );\n__declspec(implementation_key(1685)) long IWMPLibraryTreeCtrl::GetfontSize ( );\n__declspec(implementation_key(1686)) void IWMPLibraryTreeCtrl::PutfontSize ( long pVal );\n__declspec(implementation_key(1687)) _bstr_t IWMPLibraryTreeCtrl::GetfontStyle ( );\n__declspec(implementation_key(1688)) void IWMPLibraryTreeCtrl::PutfontStyle ( _bstr_t pVal );\n__declspec(implementation_key(1689)) _bstr_t IWMPLibraryTreeCtrl::GetfontFace ( );\n__declspec(implementation_key(1690)) void IWMPLibraryTreeCtrl::PutfontFace ( _bstr_t pVal );\n__declspec(implementation_key(1691)) _bstr_t IWMPLibraryTreeCtrl::Getfilter ( );\n__declspec(implementation_key(1692)) void IWMPLibraryTreeCtrl::Putfilter ( _bstr_t pVal );\n__declspec(implementation_key(1693)) _bstr_t IWMPLibraryTreeCtrl::GetexpandState ( );\n__declspec(implementation_key(1694)) void IWMPLibraryTreeCtrl::PutexpandState ( _bstr_t pVal );\n__declspec(implementation_key(1695)) IWMPPlaylistPtr IWMPLibraryTreeCtrl::GetPlaylist ( );\n__declspec(implementation_key(1696)) void IWMPLibraryTreeCtrl::PutPlaylist ( struct IWMPPlaylist * ppPlaylist );\n__declspec(implementation_key(1697)) IWMPPlaylistPtr IWMPLibraryTreeCtrl::GetselectedPlaylist ( );\n__declspec(implementation_key(1698)) IWMPMediaPtr IWMPLibraryTreeCtrl::GetselectedMedia ( );\n#pragma stop_map_region\n\n} // namespace WMPLib\n\n#pragma pack(pop)\n"
  },
  {
    "path": "DuiLib/Utils/wmp.tli",
    "content": "﻿// Created by Microsoft (R) C/C++ Compiler Version 15.00.30729.01 (b08d7783).\n//\n// wmp.tli\n//\n// Wrapper implementations for Win32 type library wmp.dll\n// compiler-generated file created 07/31/11 at 23:01:11 - DO NOT EDIT!\n\n\n//\n// interface IWMPSyncDevice wrapper method implementations\n//\n\n#pragma implementation_key(1)\ninline _bstr_t WMPLib::IWMPSyncDevice::GetfriendlyName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_friendlyName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(2)\ninline void WMPLib::IWMPSyncDevice::PutfriendlyName ( _bstr_t pbstrName ) {\n    HRESULT _hr = put_friendlyName(pbstrName);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(3)\ninline _bstr_t WMPLib::IWMPSyncDevice::GetdeviceName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_deviceName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(4)\ninline _bstr_t WMPLib::IWMPSyncDevice::GetdeviceId ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_deviceId(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(5)\ninline long WMPLib::IWMPSyncDevice::GetpartnershipIndex ( ) {\n    long _result = 0;\n    HRESULT _hr = get_partnershipIndex(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(6)\ninline VARIANT_BOOL WMPLib::IWMPSyncDevice::Getconnected ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_connected(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(7)\ninline enum WMPLib::WMPDeviceStatus WMPLib::IWMPSyncDevice::Getstatus ( ) {\n    enum WMPDeviceStatus _result;\n    HRESULT _hr = get_status(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(8)\ninline enum WMPLib::WMPSyncState WMPLib::IWMPSyncDevice::GetsyncState ( ) {\n    enum WMPSyncState _result;\n    HRESULT _hr = get_syncState(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(9)\ninline long WMPLib::IWMPSyncDevice::Getprogress ( ) {\n    long _result = 0;\n    HRESULT _hr = get_progress(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(10)\ninline _bstr_t WMPLib::IWMPSyncDevice::getItemInfo ( _bstr_t bstrItemName ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getItemInfo(bstrItemName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(11)\ninline HRESULT WMPLib::IWMPSyncDevice::createPartnership ( VARIANT_BOOL vbShowUI ) {\n    HRESULT _hr = raw_createPartnership(vbShowUI);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(12)\ninline HRESULT WMPLib::IWMPSyncDevice::deletePartnership ( ) {\n    HRESULT _hr = raw_deletePartnership();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(13)\ninline HRESULT WMPLib::IWMPSyncDevice::Start ( ) {\n    HRESULT _hr = raw_Start();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(14)\ninline HRESULT WMPLib::IWMPSyncDevice::stop ( ) {\n    HRESULT _hr = raw_stop();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(15)\ninline HRESULT WMPLib::IWMPSyncDevice::showSettings ( ) {\n    HRESULT _hr = raw_showSettings();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(16)\ninline VARIANT_BOOL WMPLib::IWMPSyncDevice::isIdentical ( struct IWMPSyncDevice * pDevice ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_isIdentical(pDevice, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPCdromRip wrapper method implementations\n//\n\n#pragma implementation_key(17)\ninline enum WMPLib::WMPRipState WMPLib::IWMPCdromRip::GetripState ( ) {\n    enum WMPRipState _result;\n    HRESULT _hr = get_ripState(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(18)\ninline long WMPLib::IWMPCdromRip::GetripProgress ( ) {\n    long _result = 0;\n    HRESULT _hr = get_ripProgress(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(19)\ninline HRESULT WMPLib::IWMPCdromRip::startRip ( ) {\n    HRESULT _hr = raw_startRip();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(20)\ninline HRESULT WMPLib::IWMPCdromRip::stopRip ( ) {\n    HRESULT _hr = raw_stopRip();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPStringCollection wrapper method implementations\n//\n\n#pragma implementation_key(21)\ninline long WMPLib::IWMPStringCollection::Getcount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_count(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(22)\ninline _bstr_t WMPLib::IWMPStringCollection::Item ( long lIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_Item(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// dispinterface _WMPOCXEvents wrapper method implementations\n//\n\n#pragma implementation_key(23)\ninline HRESULT WMPLib::_WMPOCXEvents::OpenStateChange ( long NewState ) {\n    return _com_dispatch_method(this, 0x1389, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", NewState);\n}\n\n#pragma implementation_key(24)\ninline HRESULT WMPLib::_WMPOCXEvents::PlayStateChange ( long NewState ) {\n    return _com_dispatch_method(this, 0x13ed, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", NewState);\n}\n\n#pragma implementation_key(25)\ninline HRESULT WMPLib::_WMPOCXEvents::AudioLanguageChange ( long LangID ) {\n    return _com_dispatch_method(this, 0x13ee, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", LangID);\n}\n\n#pragma implementation_key(26)\ninline HRESULT WMPLib::_WMPOCXEvents::StatusChange ( ) {\n    return _com_dispatch_method(this, 0x138a, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(27)\ninline HRESULT WMPLib::_WMPOCXEvents::ScriptCommand ( _bstr_t scType, _bstr_t Param ) {\n    return _com_dispatch_method(this, 0x14b5, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x0008\", (BSTR)scType, (BSTR)Param);\n}\n\n#pragma implementation_key(28)\ninline HRESULT WMPLib::_WMPOCXEvents::NewStream ( ) {\n    return _com_dispatch_method(this, 0x151b, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(29)\ninline HRESULT WMPLib::_WMPOCXEvents::Disconnect ( long Result ) {\n    return _com_dispatch_method(this, 0x1519, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", Result);\n}\n\n#pragma implementation_key(30)\ninline HRESULT WMPLib::_WMPOCXEvents::Buffering ( VARIANT_BOOL Start ) {\n    return _com_dispatch_method(this, 0x151a, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000b\", Start);\n}\n\n#pragma implementation_key(31)\ninline HRESULT WMPLib::_WMPOCXEvents::Error ( ) {\n    return _com_dispatch_method(this, 0x157d, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(32)\ninline HRESULT WMPLib::_WMPOCXEvents::Warning ( long WarningType, long Param, _bstr_t Description ) {\n    return _com_dispatch_method(this, 0x15e1, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\\x0003\\x0008\", WarningType, Param, (BSTR)Description);\n}\n\n#pragma implementation_key(33)\ninline HRESULT WMPLib::_WMPOCXEvents::EndOfStream ( long Result ) {\n    return _com_dispatch_method(this, 0x1451, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", Result);\n}\n\n#pragma implementation_key(34)\ninline HRESULT WMPLib::_WMPOCXEvents::PositionChange ( double oldPosition, double newPosition ) {\n    return _com_dispatch_method(this, 0x1452, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0005\\x0005\", oldPosition, newPosition);\n}\n\n#pragma implementation_key(35)\ninline HRESULT WMPLib::_WMPOCXEvents::MarkerHit ( long MarkerNum ) {\n    return _com_dispatch_method(this, 0x1453, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", MarkerNum);\n}\n\n#pragma implementation_key(36)\ninline HRESULT WMPLib::_WMPOCXEvents::DurationUnitChange ( long NewDurationUnit ) {\n    return _com_dispatch_method(this, 0x1454, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", NewDurationUnit);\n}\n\n#pragma implementation_key(37)\ninline HRESULT WMPLib::_WMPOCXEvents::CdromMediaChange ( long CdromNum ) {\n    return _com_dispatch_method(this, 0x1645, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", CdromNum);\n}\n\n#pragma implementation_key(38)\ninline HRESULT WMPLib::_WMPOCXEvents::PlaylistChange ( IDispatch * Playlist, enum WMPPlaylistChangeEventType change ) {\n    return _com_dispatch_method(this, 0x16a9, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\\x0003\", Playlist, change);\n}\n\n#pragma implementation_key(39)\ninline HRESULT WMPLib::_WMPOCXEvents::CurrentPlaylistChange ( enum WMPPlaylistChangeEventType change ) {\n    return _com_dispatch_method(this, 0x16ac, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", change);\n}\n\n#pragma implementation_key(40)\ninline HRESULT WMPLib::_WMPOCXEvents::CurrentPlaylistItemAvailable ( _bstr_t bstrItemName ) {\n    return _com_dispatch_method(this, 0x16ad, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\", (BSTR)bstrItemName);\n}\n\n#pragma implementation_key(41)\ninline HRESULT WMPLib::_WMPOCXEvents::MediaChange ( IDispatch * Item ) {\n    return _com_dispatch_method(this, 0x16aa, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", Item);\n}\n\n#pragma implementation_key(42)\ninline HRESULT WMPLib::_WMPOCXEvents::CurrentMediaItemAvailable ( _bstr_t bstrItemName ) {\n    return _com_dispatch_method(this, 0x16ab, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\", (BSTR)bstrItemName);\n}\n\n#pragma implementation_key(43)\ninline HRESULT WMPLib::_WMPOCXEvents::CurrentItemChange ( IDispatch * pdispMedia ) {\n    return _com_dispatch_method(this, 0x16ae, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", pdispMedia);\n}\n\n#pragma implementation_key(44)\ninline HRESULT WMPLib::_WMPOCXEvents::MediaCollectionChange ( ) {\n    return _com_dispatch_method(this, 0x16af, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(45)\ninline HRESULT WMPLib::_WMPOCXEvents::MediaCollectionAttributeStringAdded ( _bstr_t bstrAttribName, _bstr_t bstrAttribVal ) {\n    return _com_dispatch_method(this, 0x16b0, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x0008\", (BSTR)bstrAttribName, (BSTR)bstrAttribVal);\n}\n\n#pragma implementation_key(46)\ninline HRESULT WMPLib::_WMPOCXEvents::MediaCollectionAttributeStringRemoved ( _bstr_t bstrAttribName, _bstr_t bstrAttribVal ) {\n    return _com_dispatch_method(this, 0x16b1, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x0008\", (BSTR)bstrAttribName, (BSTR)bstrAttribVal);\n}\n\n#pragma implementation_key(47)\ninline HRESULT WMPLib::_WMPOCXEvents::MediaCollectionAttributeStringChanged ( _bstr_t bstrAttribName, _bstr_t bstrOldAttribVal, _bstr_t bstrNewAttribVal ) {\n    return _com_dispatch_method(this, 0x16bc, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x0008\\x0008\", (BSTR)bstrAttribName, (BSTR)bstrOldAttribVal, (BSTR)bstrNewAttribVal);\n}\n\n#pragma implementation_key(48)\ninline HRESULT WMPLib::_WMPOCXEvents::PlaylistCollectionChange ( ) {\n    return _com_dispatch_method(this, 0x16b2, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(49)\ninline HRESULT WMPLib::_WMPOCXEvents::PlaylistCollectionPlaylistAdded ( _bstr_t bstrPlaylistName ) {\n    return _com_dispatch_method(this, 0x16b3, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\", (BSTR)bstrPlaylistName);\n}\n\n#pragma implementation_key(50)\ninline HRESULT WMPLib::_WMPOCXEvents::PlaylistCollectionPlaylistRemoved ( _bstr_t bstrPlaylistName ) {\n    return _com_dispatch_method(this, 0x16b4, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\", (BSTR)bstrPlaylistName);\n}\n\n#pragma implementation_key(51)\ninline HRESULT WMPLib::_WMPOCXEvents::PlaylistCollectionPlaylistSetAsDeleted ( _bstr_t bstrPlaylistName, VARIANT_BOOL varfIsDeleted ) {\n    return _com_dispatch_method(this, 0x16ba, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x000b\", (BSTR)bstrPlaylistName, varfIsDeleted);\n}\n\n#pragma implementation_key(52)\ninline HRESULT WMPLib::_WMPOCXEvents::ModeChange ( _bstr_t ModeName, VARIANT_BOOL NewValue ) {\n    return _com_dispatch_method(this, 0x16bb, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x000b\", (BSTR)ModeName, NewValue);\n}\n\n#pragma implementation_key(53)\ninline HRESULT WMPLib::_WMPOCXEvents::MediaError ( IDispatch * pMediaObject ) {\n    return _com_dispatch_method(this, 0x16bd, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", pMediaObject);\n}\n\n#pragma implementation_key(54)\ninline HRESULT WMPLib::_WMPOCXEvents::OpenPlaylistSwitch ( IDispatch * pItem ) {\n    return _com_dispatch_method(this, 0x16bf, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", pItem);\n}\n\n#pragma implementation_key(55)\ninline HRESULT WMPLib::_WMPOCXEvents::DomainChange ( _bstr_t strDomain ) {\n    return _com_dispatch_method(this, 0x16be, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\", (BSTR)strDomain);\n}\n\n#pragma implementation_key(56)\ninline HRESULT WMPLib::_WMPOCXEvents::SwitchedToPlayerApplication ( ) {\n    return _com_dispatch_method(this, 0x1965, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(57)\ninline HRESULT WMPLib::_WMPOCXEvents::SwitchedToControl ( ) {\n    return _com_dispatch_method(this, 0x1966, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(58)\ninline HRESULT WMPLib::_WMPOCXEvents::PlayerDockedStateChange ( ) {\n    return _com_dispatch_method(this, 0x1967, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(59)\ninline HRESULT WMPLib::_WMPOCXEvents::PlayerReconnect ( ) {\n    return _com_dispatch_method(this, 0x1968, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(60)\ninline HRESULT WMPLib::_WMPOCXEvents::Click ( short nButton, short nShiftState, long fX, long fY ) {\n    return _com_dispatch_method(this, 0x1969, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0002\\x0002\\x0003\\x0003\", nButton, nShiftState, fX, fY);\n}\n\n#pragma implementation_key(61)\ninline HRESULT WMPLib::_WMPOCXEvents::DoubleClick ( short nButton, short nShiftState, long fX, long fY ) {\n    return _com_dispatch_method(this, 0x196a, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0002\\x0002\\x0003\\x0003\", nButton, nShiftState, fX, fY);\n}\n\n#pragma implementation_key(62)\ninline HRESULT WMPLib::_WMPOCXEvents::KeyDown ( short nKeyCode, short nShiftState ) {\n    return _com_dispatch_method(this, 0x196b, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0002\\x0002\", nKeyCode, nShiftState);\n}\n\n#pragma implementation_key(63)\ninline HRESULT WMPLib::_WMPOCXEvents::KeyPress ( short nKeyAscii ) {\n    return _com_dispatch_method(this, 0x196c, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0002\", nKeyAscii);\n}\n\n#pragma implementation_key(64)\ninline HRESULT WMPLib::_WMPOCXEvents::KeyUp ( short nKeyCode, short nShiftState ) {\n    return _com_dispatch_method(this, 0x196d, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0002\\x0002\", nKeyCode, nShiftState);\n}\n\n#pragma implementation_key(65)\ninline HRESULT WMPLib::_WMPOCXEvents::MouseDown ( short nButton, short nShiftState, long fX, long fY ) {\n    return _com_dispatch_method(this, 0x196e, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0002\\x0002\\x0003\\x0003\", nButton, nShiftState, fX, fY);\n}\n\n#pragma implementation_key(66)\ninline HRESULT WMPLib::_WMPOCXEvents::MouseMove ( short nButton, short nShiftState, long fX, long fY ) {\n    return _com_dispatch_method(this, 0x196f, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0002\\x0002\\x0003\\x0003\", nButton, nShiftState, fX, fY);\n}\n\n#pragma implementation_key(67)\ninline HRESULT WMPLib::_WMPOCXEvents::MouseUp ( short nButton, short nShiftState, long fX, long fY ) {\n    return _com_dispatch_method(this, 0x1970, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0002\\x0002\\x0003\\x0003\", nButton, nShiftState, fX, fY);\n}\n\n#pragma implementation_key(68)\ninline HRESULT WMPLib::_WMPOCXEvents::DeviceConnect ( struct IWMPSyncDevice * pDevice ) {\n    return _com_dispatch_method(this, 0x1971, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\", pDevice);\n}\n\n#pragma implementation_key(69)\ninline HRESULT WMPLib::_WMPOCXEvents::DeviceDisconnect ( struct IWMPSyncDevice * pDevice ) {\n    return _com_dispatch_method(this, 0x1972, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\", pDevice);\n}\n\n#pragma implementation_key(70)\ninline HRESULT WMPLib::_WMPOCXEvents::DeviceStatusChange ( struct IWMPSyncDevice * pDevice, enum WMPDeviceStatus NewStatus ) {\n    return _com_dispatch_method(this, 0x1973, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\\x0003\", pDevice, NewStatus);\n}\n\n#pragma implementation_key(71)\ninline HRESULT WMPLib::_WMPOCXEvents::DeviceSyncStateChange ( struct IWMPSyncDevice * pDevice, enum WMPSyncState NewState ) {\n    return _com_dispatch_method(this, 0x1974, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\\x0003\", pDevice, NewState);\n}\n\n#pragma implementation_key(72)\ninline HRESULT WMPLib::_WMPOCXEvents::DeviceSyncError ( struct IWMPSyncDevice * pDevice, IDispatch * pMedia ) {\n    return _com_dispatch_method(this, 0x1975, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\\x0009\", pDevice, pMedia);\n}\n\n#pragma implementation_key(73)\ninline HRESULT WMPLib::_WMPOCXEvents::CreatePartnershipComplete ( struct IWMPSyncDevice * pDevice, HRESULT hrResult ) {\n    return _com_dispatch_method(this, 0x1976, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\\x000a\", pDevice, hrResult);\n}\n\n#pragma implementation_key(74)\ninline HRESULT WMPLib::_WMPOCXEvents::DeviceEstimation ( struct IWMPSyncDevice * pDevice, HRESULT hrResult, __int64 qwEstimatedUsedSpace, __int64 qwEstimatedSpace ) {\n    return _com_dispatch_method(this, 0x197f, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\\x000a\\x0014\\x0014\", pDevice, hrResult, qwEstimatedUsedSpace, qwEstimatedSpace);\n}\n\n#pragma implementation_key(75)\ninline HRESULT WMPLib::_WMPOCXEvents::CdromRipStateChange ( struct IWMPCdromRip * pCdromRip, enum WMPRipState wmprs ) {\n    return _com_dispatch_method(this, 0x1977, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\\x0003\", pCdromRip, wmprs);\n}\n\n#pragma implementation_key(76)\ninline HRESULT WMPLib::_WMPOCXEvents::CdromRipMediaError ( struct IWMPCdromRip * pCdromRip, IDispatch * pMedia ) {\n    return _com_dispatch_method(this, 0x1978, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\\x0009\", pCdromRip, pMedia);\n}\n\n#pragma implementation_key(77)\ninline HRESULT WMPLib::_WMPOCXEvents::CdromBurnStateChange ( struct IWMPCdromBurn * pCdromBurn, enum WMPBurnState wmpbs ) {\n    return _com_dispatch_method(this, 0x1979, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\\x0003\", pCdromBurn, wmpbs);\n}\n\n#pragma implementation_key(78)\ninline HRESULT WMPLib::_WMPOCXEvents::CdromBurnMediaError ( struct IWMPCdromBurn * pCdromBurn, IDispatch * pMedia ) {\n    return _com_dispatch_method(this, 0x197a, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\\x0009\", pCdromBurn, pMedia);\n}\n\n#pragma implementation_key(79)\ninline HRESULT WMPLib::_WMPOCXEvents::CdromBurnError ( struct IWMPCdromBurn * pCdromBurn, HRESULT hrError ) {\n    return _com_dispatch_method(this, 0x197b, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\\x000a\", pCdromBurn, hrError);\n}\n\n#pragma implementation_key(80)\ninline HRESULT WMPLib::_WMPOCXEvents::LibraryConnect ( struct IWMPLibrary * pLibrary ) {\n    return _com_dispatch_method(this, 0x197c, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\", pLibrary);\n}\n\n#pragma implementation_key(81)\ninline HRESULT WMPLib::_WMPOCXEvents::LibraryDisconnect ( struct IWMPLibrary * pLibrary ) {\n    return _com_dispatch_method(this, 0x197d, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000d\", pLibrary);\n}\n\n#pragma implementation_key(82)\ninline HRESULT WMPLib::_WMPOCXEvents::FolderScanStateChange ( enum WMPFolderScanState wmpfss ) {\n    return _com_dispatch_method(this, 0x197e, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", wmpfss);\n}\n\n#pragma implementation_key(83)\ninline HRESULT WMPLib::_WMPOCXEvents::StringCollectionChange ( IDispatch * pdispStringCollection, enum WMPStringCollectionChangeEventType change, long lCollectionIndex ) {\n    return _com_dispatch_method(this, 0x16c0, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\\x0003\\x0003\", pdispStringCollection, change, lCollectionIndex);\n}\n\n#pragma implementation_key(84)\ninline HRESULT WMPLib::_WMPOCXEvents::MediaCollectionMediaAdded ( IDispatch * pdispMedia ) {\n    return _com_dispatch_method(this, 0x16c1, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", pdispMedia);\n}\n\n#pragma implementation_key(85)\ninline HRESULT WMPLib::_WMPOCXEvents::MediaCollectionMediaRemoved ( IDispatch * pdispMedia ) {\n    return _com_dispatch_method(this, 0x16c2, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", pdispMedia);\n}\n\n//\n// interface IWMPSettings wrapper method implementations\n//\n\n#pragma implementation_key(86)\ninline VARIANT_BOOL WMPLib::IWMPSettings::GetisAvailable ( _bstr_t bstrItem ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isAvailable(bstrItem, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(87)\ninline VARIANT_BOOL WMPLib::IWMPSettings::GetautoStart ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_autoStart(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(88)\ninline void WMPLib::IWMPSettings::PutautoStart ( VARIANT_BOOL pfAutoStart ) {\n    HRESULT _hr = put_autoStart(pfAutoStart);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(89)\ninline _bstr_t WMPLib::IWMPSettings::GetbaseURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_baseURL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(90)\ninline void WMPLib::IWMPSettings::PutbaseURL ( _bstr_t pbstrBaseURL ) {\n    HRESULT _hr = put_baseURL(pbstrBaseURL);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(91)\ninline _bstr_t WMPLib::IWMPSettings::GetdefaultFrame ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_defaultFrame(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(92)\ninline void WMPLib::IWMPSettings::PutdefaultFrame ( _bstr_t pbstrDefaultFrame ) {\n    HRESULT _hr = put_defaultFrame(pbstrDefaultFrame);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(93)\ninline VARIANT_BOOL WMPLib::IWMPSettings::GetinvokeURLs ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_invokeURLs(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(94)\ninline void WMPLib::IWMPSettings::PutinvokeURLs ( VARIANT_BOOL pfInvokeURLs ) {\n    HRESULT _hr = put_invokeURLs(pfInvokeURLs);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(95)\ninline VARIANT_BOOL WMPLib::IWMPSettings::Getmute ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_mute(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(96)\ninline void WMPLib::IWMPSettings::Putmute ( VARIANT_BOOL pfMute ) {\n    HRESULT _hr = put_mute(pfMute);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(97)\ninline long WMPLib::IWMPSettings::GetplayCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_playCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(98)\ninline void WMPLib::IWMPSettings::PutplayCount ( long plCount ) {\n    HRESULT _hr = put_playCount(plCount);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(99)\ninline double WMPLib::IWMPSettings::Getrate ( ) {\n    double _result = 0;\n    HRESULT _hr = get_rate(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(100)\ninline void WMPLib::IWMPSettings::Putrate ( double pdRate ) {\n    HRESULT _hr = put_rate(pdRate);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(101)\ninline long WMPLib::IWMPSettings::Getbalance ( ) {\n    long _result = 0;\n    HRESULT _hr = get_balance(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(102)\ninline void WMPLib::IWMPSettings::Putbalance ( long plBalance ) {\n    HRESULT _hr = put_balance(plBalance);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(103)\ninline long WMPLib::IWMPSettings::Getvolume ( ) {\n    long _result = 0;\n    HRESULT _hr = get_volume(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(104)\ninline void WMPLib::IWMPSettings::Putvolume ( long plVolume ) {\n    HRESULT _hr = put_volume(plVolume);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(105)\ninline VARIANT_BOOL WMPLib::IWMPSettings::getMode ( _bstr_t bstrMode ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_getMode(bstrMode, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(106)\ninline HRESULT WMPLib::IWMPSettings::setMode ( _bstr_t bstrMode, VARIANT_BOOL varfMode ) {\n    HRESULT _hr = raw_setMode(bstrMode, varfMode);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(107)\ninline VARIANT_BOOL WMPLib::IWMPSettings::GetenableErrorDialogs ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enableErrorDialogs(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(108)\ninline void WMPLib::IWMPSettings::PutenableErrorDialogs ( VARIANT_BOOL pfEnableErrorDialogs ) {\n    HRESULT _hr = put_enableErrorDialogs(pfEnableErrorDialogs);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPNetwork wrapper method implementations\n//\n\n#pragma implementation_key(109)\ninline long WMPLib::IWMPNetwork::GetbandWidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_bandWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(110)\ninline long WMPLib::IWMPNetwork::GetrecoveredPackets ( ) {\n    long _result = 0;\n    HRESULT _hr = get_recoveredPackets(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(111)\ninline _bstr_t WMPLib::IWMPNetwork::GetsourceProtocol ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_sourceProtocol(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(112)\ninline long WMPLib::IWMPNetwork::GetreceivedPackets ( ) {\n    long _result = 0;\n    HRESULT _hr = get_receivedPackets(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(113)\ninline long WMPLib::IWMPNetwork::GetlostPackets ( ) {\n    long _result = 0;\n    HRESULT _hr = get_lostPackets(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(114)\ninline long WMPLib::IWMPNetwork::GetreceptionQuality ( ) {\n    long _result = 0;\n    HRESULT _hr = get_receptionQuality(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(115)\ninline long WMPLib::IWMPNetwork::GetbufferingCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_bufferingCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(116)\ninline long WMPLib::IWMPNetwork::GetbufferingProgress ( ) {\n    long _result = 0;\n    HRESULT _hr = get_bufferingProgress(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(117)\ninline long WMPLib::IWMPNetwork::GetbufferingTime ( ) {\n    long _result = 0;\n    HRESULT _hr = get_bufferingTime(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(118)\ninline void WMPLib::IWMPNetwork::PutbufferingTime ( long plBufferingTime ) {\n    HRESULT _hr = put_bufferingTime(plBufferingTime);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(119)\ninline long WMPLib::IWMPNetwork::GetframeRate ( ) {\n    long _result = 0;\n    HRESULT _hr = get_frameRate(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(120)\ninline long WMPLib::IWMPNetwork::GetmaxBitRate ( ) {\n    long _result = 0;\n    HRESULT _hr = get_maxBitRate(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(121)\ninline long WMPLib::IWMPNetwork::GetbitRate ( ) {\n    long _result = 0;\n    HRESULT _hr = get_bitRate(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(122)\ninline long WMPLib::IWMPNetwork::getProxySettings ( _bstr_t bstrProtocol ) {\n    long _result = 0;\n    HRESULT _hr = raw_getProxySettings(bstrProtocol, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(123)\ninline HRESULT WMPLib::IWMPNetwork::setProxySettings ( _bstr_t bstrProtocol, long lProxySetting ) {\n    HRESULT _hr = raw_setProxySettings(bstrProtocol, lProxySetting);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(124)\ninline _bstr_t WMPLib::IWMPNetwork::getProxyName ( _bstr_t bstrProtocol ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getProxyName(bstrProtocol, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(125)\ninline HRESULT WMPLib::IWMPNetwork::setProxyName ( _bstr_t bstrProtocol, _bstr_t bstrProxyName ) {\n    HRESULT _hr = raw_setProxyName(bstrProtocol, bstrProxyName);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(126)\ninline long WMPLib::IWMPNetwork::getProxyPort ( _bstr_t bstrProtocol ) {\n    long _result = 0;\n    HRESULT _hr = raw_getProxyPort(bstrProtocol, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(127)\ninline HRESULT WMPLib::IWMPNetwork::setProxyPort ( _bstr_t bstrProtocol, long lProxyPort ) {\n    HRESULT _hr = raw_setProxyPort(bstrProtocol, lProxyPort);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(128)\ninline _bstr_t WMPLib::IWMPNetwork::getProxyExceptionList ( _bstr_t bstrProtocol ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getProxyExceptionList(bstrProtocol, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(129)\ninline HRESULT WMPLib::IWMPNetwork::setProxyExceptionList ( _bstr_t bstrProtocol, _bstr_t pbstrExceptionList ) {\n    HRESULT _hr = raw_setProxyExceptionList(bstrProtocol, pbstrExceptionList);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(130)\ninline VARIANT_BOOL WMPLib::IWMPNetwork::getProxyBypassForLocal ( _bstr_t bstrProtocol ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_getProxyBypassForLocal(bstrProtocol, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(131)\ninline HRESULT WMPLib::IWMPNetwork::setProxyBypassForLocal ( _bstr_t bstrProtocol, VARIANT_BOOL fBypassForLocal ) {\n    HRESULT _hr = raw_setProxyBypassForLocal(bstrProtocol, fBypassForLocal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(132)\ninline long WMPLib::IWMPNetwork::GetmaxBandwidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_maxBandwidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(133)\ninline void WMPLib::IWMPNetwork::PutmaxBandwidth ( long lMaxBandwidth ) {\n    HRESULT _hr = put_maxBandwidth(lMaxBandwidth);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(134)\ninline long WMPLib::IWMPNetwork::GetdownloadProgress ( ) {\n    long _result = 0;\n    HRESULT _hr = get_downloadProgress(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(135)\ninline long WMPLib::IWMPNetwork::GetencodedFrameRate ( ) {\n    long _result = 0;\n    HRESULT _hr = get_encodedFrameRate(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(136)\ninline long WMPLib::IWMPNetwork::GetframesSkipped ( ) {\n    long _result = 0;\n    HRESULT _hr = get_framesSkipped(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPClosedCaption wrapper method implementations\n//\n\n#pragma implementation_key(137)\ninline _bstr_t WMPLib::IWMPClosedCaption::GetSAMIStyle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_SAMIStyle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(138)\ninline void WMPLib::IWMPClosedCaption::PutSAMIStyle ( _bstr_t pbstrSAMIStyle ) {\n    HRESULT _hr = put_SAMIStyle(pbstrSAMIStyle);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(139)\ninline _bstr_t WMPLib::IWMPClosedCaption::GetSAMILang ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_SAMILang(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(140)\ninline void WMPLib::IWMPClosedCaption::PutSAMILang ( _bstr_t pbstrSAMILang ) {\n    HRESULT _hr = put_SAMILang(pbstrSAMILang);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(141)\ninline _bstr_t WMPLib::IWMPClosedCaption::GetSAMIFileName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_SAMIFileName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(142)\ninline void WMPLib::IWMPClosedCaption::PutSAMIFileName ( _bstr_t pbstrSAMIFileName ) {\n    HRESULT _hr = put_SAMIFileName(pbstrSAMIFileName);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(143)\ninline _bstr_t WMPLib::IWMPClosedCaption::GetcaptioningId ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_captioningId(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(144)\ninline void WMPLib::IWMPClosedCaption::PutcaptioningId ( _bstr_t pbstrCaptioningID ) {\n    HRESULT _hr = put_captioningId(pbstrCaptioningID);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPErrorItem wrapper method implementations\n//\n\n#pragma implementation_key(145)\ninline long WMPLib::IWMPErrorItem::GeterrorCode ( ) {\n    long _result = 0;\n    HRESULT _hr = get_errorCode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(146)\ninline _bstr_t WMPLib::IWMPErrorItem::GeterrorDescription ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_errorDescription(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(147)\ninline _variant_t WMPLib::IWMPErrorItem::GeterrorContext ( ) {\n    VARIANT _result;\n    VariantInit(&_result);\n    HRESULT _hr = get_errorContext(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _variant_t(_result, false);\n}\n\n#pragma implementation_key(148)\ninline long WMPLib::IWMPErrorItem::Getremedy ( ) {\n    long _result = 0;\n    HRESULT _hr = get_remedy(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(149)\ninline _bstr_t WMPLib::IWMPErrorItem::GetcustomUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_customUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPError wrapper method implementations\n//\n\n#pragma implementation_key(150)\ninline HRESULT WMPLib::IWMPError::clearErrorQueue ( ) {\n    HRESULT _hr = raw_clearErrorQueue();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(151)\ninline long WMPLib::IWMPError::GeterrorCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_errorCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(152)\ninline WMPLib::IWMPErrorItemPtr WMPLib::IWMPError::GetItem ( long dwIndex ) {\n    struct IWMPErrorItem * _result = 0;\n    HRESULT _hr = get_Item(dwIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPErrorItemPtr(_result, false);\n}\n\n#pragma implementation_key(153)\ninline HRESULT WMPLib::IWMPError::webHelp ( ) {\n    HRESULT _hr = raw_webHelp();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPDVD wrapper method implementations\n//\n\n#pragma implementation_key(154)\ninline VARIANT_BOOL WMPLib::IWMPDVD::GetisAvailable ( _bstr_t bstrItem ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isAvailable(bstrItem, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(155)\ninline _bstr_t WMPLib::IWMPDVD::Getdomain ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_domain(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(156)\ninline HRESULT WMPLib::IWMPDVD::topMenu ( ) {\n    HRESULT _hr = raw_topMenu();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(157)\ninline HRESULT WMPLib::IWMPDVD::titleMenu ( ) {\n    HRESULT _hr = raw_titleMenu();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(158)\ninline HRESULT WMPLib::IWMPDVD::back ( ) {\n    HRESULT _hr = raw_back();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(159)\ninline HRESULT WMPLib::IWMPDVD::resume ( ) {\n    HRESULT _hr = raw_resume();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPPlayerApplication wrapper method implementations\n//\n\n#pragma implementation_key(160)\ninline HRESULT WMPLib::IWMPPlayerApplication::switchToPlayerApplication ( ) {\n    HRESULT _hr = raw_switchToPlayerApplication();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(161)\ninline HRESULT WMPLib::IWMPPlayerApplication::switchToControl ( ) {\n    HRESULT _hr = raw_switchToControl();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(162)\ninline VARIANT_BOOL WMPLib::IWMPPlayerApplication::GetplayerDocked ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_playerDocked(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(163)\ninline VARIANT_BOOL WMPLib::IWMPPlayerApplication::GethasDisplay ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_hasDisplay(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPErrorItem2 wrapper method implementations\n//\n\n#pragma implementation_key(164)\ninline long WMPLib::IWMPErrorItem2::Getcondition ( ) {\n    long _result = 0;\n    HRESULT _hr = get_condition(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPMetadataPicture wrapper method implementations\n//\n\n#pragma implementation_key(165)\ninline _bstr_t WMPLib::IWMPMetadataPicture::GetmimeType ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_mimeType(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(166)\ninline _bstr_t WMPLib::IWMPMetadataPicture::GetpictureType ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_pictureType(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(167)\ninline _bstr_t WMPLib::IWMPMetadataPicture::GetDescription ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_Description(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(168)\ninline _bstr_t WMPLib::IWMPMetadataPicture::GetURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_URL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPMetadataText wrapper method implementations\n//\n\n#pragma implementation_key(169)\ninline _bstr_t WMPLib::IWMPMetadataText::GetDescription ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_Description(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(170)\ninline _bstr_t WMPLib::IWMPMetadataText::Gettext ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_text(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPSettings2 wrapper method implementations\n//\n\n#pragma implementation_key(171)\ninline long WMPLib::IWMPSettings2::GetdefaultAudioLanguage ( ) {\n    long _result = 0;\n    HRESULT _hr = get_defaultAudioLanguage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(172)\ninline _bstr_t WMPLib::IWMPSettings2::GetmediaAccessRights ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_mediaAccessRights(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(173)\ninline VARIANT_BOOL WMPLib::IWMPSettings2::requestMediaAccessRights ( _bstr_t bstrDesiredAccess ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_requestMediaAccessRights(bstrDesiredAccess, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPClosedCaption2 wrapper method implementations\n//\n\n#pragma implementation_key(174)\ninline long WMPLib::IWMPClosedCaption2::GetSAMILangCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_SAMILangCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(175)\ninline _bstr_t WMPLib::IWMPClosedCaption2::getSAMILangName ( long nIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getSAMILangName(nIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(176)\ninline long WMPLib::IWMPClosedCaption2::getSAMILangID ( long nIndex ) {\n    long _result = 0;\n    HRESULT _hr = raw_getSAMILangID(nIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(177)\ninline long WMPLib::IWMPClosedCaption2::GetSAMIStyleCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_SAMIStyleCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(178)\ninline _bstr_t WMPLib::IWMPClosedCaption2::getSAMIStyleName ( long nIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getSAMIStyleName(nIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPQuery wrapper method implementations\n//\n\n#pragma implementation_key(179)\ninline HRESULT WMPLib::IWMPQuery::addCondition ( _bstr_t bstrAttribute, _bstr_t bstrOperator, _bstr_t bstrValue ) {\n    HRESULT _hr = raw_addCondition(bstrAttribute, bstrOperator, bstrValue);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(180)\ninline HRESULT WMPLib::IWMPQuery::beginNextGroup ( ) {\n    HRESULT _hr = raw_beginNextGroup();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPStringCollection2 wrapper method implementations\n//\n\n#pragma implementation_key(181)\ninline VARIANT_BOOL WMPLib::IWMPStringCollection2::isIdentical ( struct IWMPStringCollection2 * pIWMPStringCollection2 ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_isIdentical(pIWMPStringCollection2, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(182)\ninline _bstr_t WMPLib::IWMPStringCollection2::getItemInfo ( long lCollectionIndex, _bstr_t bstrItemName ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getItemInfo(lCollectionIndex, bstrItemName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(183)\ninline long WMPLib::IWMPStringCollection2::getAttributeCountByType ( long lCollectionIndex, _bstr_t bstrType, _bstr_t bstrLanguage ) {\n    long _result = 0;\n    HRESULT _hr = raw_getAttributeCountByType(lCollectionIndex, bstrType, bstrLanguage, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(184)\ninline _variant_t WMPLib::IWMPStringCollection2::getItemInfoByType ( long lCollectionIndex, _bstr_t bstrType, _bstr_t bstrLanguage, long lAttributeIndex ) {\n    VARIANT _result;\n    VariantInit(&_result);\n    HRESULT _hr = raw_getItemInfoByType(lCollectionIndex, bstrType, bstrLanguage, lAttributeIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _variant_t(_result, false);\n}\n\n//\n// interface IWMPPlayerServices wrapper method implementations\n//\n\n#pragma implementation_key(185)\ninline HRESULT WMPLib::IWMPPlayerServices::activateUIPlugin ( _bstr_t bstrPlugin ) {\n    HRESULT _hr = raw_activateUIPlugin(bstrPlugin);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(186)\ninline HRESULT WMPLib::IWMPPlayerServices::setTaskPane ( _bstr_t bstrTaskPane ) {\n    HRESULT _hr = raw_setTaskPane(bstrTaskPane);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(187)\ninline HRESULT WMPLib::IWMPPlayerServices::setTaskPaneURL ( _bstr_t bstrTaskPane, _bstr_t bstrURL, _bstr_t bstrFriendlyName ) {\n    HRESULT _hr = raw_setTaskPaneURL(bstrTaskPane, bstrURL, bstrFriendlyName);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPPlayerServices2 wrapper method implementations\n//\n\n#pragma implementation_key(188)\ninline HRESULT WMPLib::IWMPPlayerServices2::setBackgroundProcessingPriority ( _bstr_t bstrPriority ) {\n    HRESULT _hr = raw_setBackgroundProcessingPriority(bstrPriority);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPRemoteMediaServices wrapper method implementations\n//\n\n#pragma implementation_key(189)\ninline HRESULT WMPLib::IWMPRemoteMediaServices::GetServiceType ( BSTR * pbstrType ) {\n    HRESULT _hr = raw_GetServiceType(pbstrType);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(190)\ninline HRESULT WMPLib::IWMPRemoteMediaServices::GetApplicationName ( BSTR * pbstrName ) {\n    HRESULT _hr = raw_GetApplicationName(pbstrName);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(191)\ninline HRESULT WMPLib::IWMPRemoteMediaServices::GetScriptableObject ( BSTR * pbstrName, IDispatch * * ppDispatch ) {\n    HRESULT _hr = raw_GetScriptableObject(pbstrName, ppDispatch);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(192)\ninline HRESULT WMPLib::IWMPRemoteMediaServices::GetCustomUIMode ( BSTR * pbstrFile ) {\n    HRESULT _hr = raw_GetCustomUIMode(pbstrFile);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPSyncServices wrapper method implementations\n//\n\n#pragma implementation_key(193)\ninline long WMPLib::IWMPSyncServices::GetdeviceCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_deviceCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(194)\ninline WMPLib::IWMPSyncDevicePtr WMPLib::IWMPSyncServices::getDevice ( long lIndex ) {\n    struct IWMPSyncDevice * _result = 0;\n    HRESULT _hr = raw_getDevice(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPSyncDevicePtr(_result, false);\n}\n\n//\n// interface IWMPLibrarySharingServices wrapper method implementations\n//\n\n#pragma implementation_key(195)\ninline VARIANT_BOOL WMPLib::IWMPLibrarySharingServices::isLibraryShared ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_isLibraryShared(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(196)\ninline VARIANT_BOOL WMPLib::IWMPLibrarySharingServices::isLibrarySharingEnabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_isLibrarySharingEnabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(197)\ninline HRESULT WMPLib::IWMPLibrarySharingServices::showLibrarySharing ( ) {\n    HRESULT _hr = raw_showLibrarySharing();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPFolderMonitorServices wrapper method implementations\n//\n\n#pragma implementation_key(198)\ninline long WMPLib::IWMPFolderMonitorServices::Getcount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_count(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(199)\ninline _bstr_t WMPLib::IWMPFolderMonitorServices::Item ( long lIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_Item(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(200)\ninline HRESULT WMPLib::IWMPFolderMonitorServices::add ( _bstr_t bstrFolder ) {\n    HRESULT _hr = raw_add(bstrFolder);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(201)\ninline HRESULT WMPLib::IWMPFolderMonitorServices::remove ( long lIndex ) {\n    HRESULT _hr = raw_remove(lIndex);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(202)\ninline enum WMPLib::WMPFolderScanState WMPLib::IWMPFolderMonitorServices::GetscanState ( ) {\n    enum WMPFolderScanState _result;\n    HRESULT _hr = get_scanState(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(203)\ninline _bstr_t WMPLib::IWMPFolderMonitorServices::GetcurrentFolder ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_currentFolder(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(204)\ninline long WMPLib::IWMPFolderMonitorServices::GetscannedFilesCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_scannedFilesCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(205)\ninline long WMPLib::IWMPFolderMonitorServices::GetaddedFilesCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_addedFilesCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(206)\ninline long WMPLib::IWMPFolderMonitorServices::GetupdateProgress ( ) {\n    long _result = 0;\n    HRESULT _hr = get_updateProgress(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(207)\ninline HRESULT WMPLib::IWMPFolderMonitorServices::startScan ( ) {\n    HRESULT _hr = raw_startScan();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(208)\ninline HRESULT WMPLib::IWMPFolderMonitorServices::stopScan ( ) {\n    HRESULT _hr = raw_stopScan();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPSyncDevice2 wrapper method implementations\n//\n\n#pragma implementation_key(209)\ninline HRESULT WMPLib::IWMPSyncDevice2::setItemInfo ( _bstr_t bstrItemName, _bstr_t bstrVal ) {\n    HRESULT _hr = raw_setItemInfo(bstrItemName, bstrVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IAppDispatch wrapper method implementations\n//\n\n#pragma implementation_key(210)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GettitlebarVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_titlebarVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(211)\ninline void WMPLib::IAppDispatch::PuttitlebarVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_titlebarVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(212)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GettitlebarAutoHide ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_titlebarAutoHide(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(213)\ninline void WMPLib::IAppDispatch::PuttitlebarAutoHide ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_titlebarAutoHide(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(214)\ninline _bstr_t WMPLib::IAppDispatch::GetcurrentTask ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_currentTask(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(215)\ninline void WMPLib::IAppDispatch::PutcurrentTask ( _bstr_t pVal ) {\n    HRESULT _hr = put_currentTask(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(216)\ninline long WMPLib::IAppDispatch::GetlibraryBasketMode ( ) {\n    long _result = 0;\n    HRESULT _hr = get_libraryBasketMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(217)\ninline void WMPLib::IAppDispatch::PutlibraryBasketMode ( long pVal ) {\n    HRESULT _hr = put_libraryBasketMode(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(218)\ninline long WMPLib::IAppDispatch::GetlibraryBasketWidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_libraryBasketWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(219)\ninline long WMPLib::IAppDispatch::GetbreadcrumbItemCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_breadcrumbItemCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(220)\ninline _bstr_t WMPLib::IAppDispatch::GetbreadcrumbItemName ( long lIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_breadcrumbItemName(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(221)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetbreadcrumbItemHasMenu ( long lIndex ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_breadcrumbItemHasMenu(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(222)\ninline HRESULT WMPLib::IAppDispatch::breadcrumbItemClick ( long lIndex ) {\n    HRESULT _hr = raw_breadcrumbItemClick(lIndex);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(223)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetsettingsVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_settingsVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(224)\ninline void WMPLib::IAppDispatch::PutsettingsVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_settingsVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(225)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetplaylistVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_playlistVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(226)\ninline void WMPLib::IAppDispatch::PutplaylistVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_playlistVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(227)\ninline HRESULT WMPLib::IAppDispatch::gotoSkinMode ( ) {\n    HRESULT _hr = raw_gotoSkinMode();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(228)\ninline HRESULT WMPLib::IAppDispatch::gotoPlayerMode ( ) {\n    HRESULT _hr = raw_gotoPlayerMode();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(229)\ninline HRESULT WMPLib::IAppDispatch::gotoLibraryMode ( long lButton ) {\n    HRESULT _hr = raw_gotoLibraryMode(lButton);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(230)\ninline HRESULT WMPLib::IAppDispatch::navigatePrevious ( ) {\n    HRESULT _hr = raw_navigatePrevious();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(231)\ninline HRESULT WMPLib::IAppDispatch::navigateNext ( ) {\n    HRESULT _hr = raw_navigateNext();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(232)\ninline HRESULT WMPLib::IAppDispatch::goFullScreen ( ) {\n    HRESULT _hr = raw_goFullScreen();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(233)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetfullScreenEnabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_fullScreenEnabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(234)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetserviceLoginVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_serviceLoginVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(235)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetserviceLoginSignedIn ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_serviceLoginSignedIn(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(236)\ninline HRESULT WMPLib::IAppDispatch::serviceLogin ( ) {\n    HRESULT _hr = raw_serviceLogin();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(237)\ninline HRESULT WMPLib::IAppDispatch::serviceLogout ( ) {\n    HRESULT _hr = raw_serviceLogout();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(238)\ninline _variant_t WMPLib::IAppDispatch::GetserviceGetInfo ( _bstr_t bstrItem ) {\n    VARIANT _result;\n    VariantInit(&_result);\n    HRESULT _hr = get_serviceGetInfo(bstrItem, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _variant_t(_result, false);\n}\n\n#pragma implementation_key(239)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetnavigatePreviousEnabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_navigatePreviousEnabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(240)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetnavigateNextEnabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_navigateNextEnabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(241)\ninline HRESULT WMPLib::IAppDispatch::navigateToAddress ( _bstr_t address ) {\n    HRESULT _hr = raw_navigateToAddress(address);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(242)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetglassEnabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_glassEnabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(243)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetinVistaPlus ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_inVistaPlus(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(244)\ninline HRESULT WMPLib::IAppDispatch::adjustLeft ( long nDistance ) {\n    HRESULT _hr = raw_adjustLeft(nDistance);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(245)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GettaskbarVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_taskbarVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(246)\ninline void WMPLib::IAppDispatch::PuttaskbarVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_taskbarVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(247)\ninline long WMPLib::IAppDispatch::GetDPI ( ) {\n    long _result = 0;\n    HRESULT _hr = get_DPI(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(248)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetpreviousEnabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_previousEnabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(249)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetplayLibraryItemEnabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_playLibraryItemEnabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(250)\ninline HRESULT WMPLib::IAppDispatch::previous ( ) {\n    HRESULT _hr = raw_previous();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(251)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GettitlebarCurrentlyVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_titlebarCurrentlyVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(252)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetmenubarCurrentlyVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_menubarCurrentlyVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(253)\ninline VARIANT_BOOL WMPLib::IAppDispatch::GetbgPluginRunning ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_bgPluginRunning(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(254)\ninline HRESULT WMPLib::IAppDispatch::configurePlugins ( long nType ) {\n    HRESULT _hr = raw_configurePlugins(nType);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(255)\ninline _bstr_t WMPLib::IAppDispatch::getTimeString ( double dTime ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getTimeString(dTime, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(256)\ninline VARIANT_BOOL WMPLib::IAppDispatch::Getmaximized ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_maximized(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(257)\ninline long WMPLib::IAppDispatch::Gettop ( ) {\n    long _result = 0;\n    HRESULT _hr = get_top(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(258)\ninline void WMPLib::IAppDispatch::Puttop ( long pVal ) {\n    HRESULT _hr = put_top(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(259)\ninline long WMPLib::IAppDispatch::Getleft ( ) {\n    long _result = 0;\n    HRESULT _hr = get_left(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(260)\ninline void WMPLib::IAppDispatch::Putleft ( long pVal ) {\n    HRESULT _hr = put_left(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(261)\ninline long WMPLib::IAppDispatch::Getwidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_width(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(262)\ninline void WMPLib::IAppDispatch::Putwidth ( long pVal ) {\n    HRESULT _hr = put_width(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(263)\ninline long WMPLib::IAppDispatch::Getheight ( ) {\n    long _result = 0;\n    HRESULT _hr = get_height(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(264)\ninline void WMPLib::IAppDispatch::Putheight ( long pVal ) {\n    HRESULT _hr = put_height(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(265)\ninline HRESULT WMPLib::IAppDispatch::setWindowPos ( long lTop, long lLeft, long lWidth, long lHeight ) {\n    HRESULT _hr = raw_setWindowPos(lTop, lLeft, lWidth, lHeight);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(266)\ninline HRESULT WMPLib::IAppDispatch::logData ( _bstr_t ID, _bstr_t data ) {\n    HRESULT _hr = raw_logData(ID, data);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(267)\ninline _bstr_t WMPLib::IAppDispatch::GetpowerPersonality ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_powerPersonality(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(268)\ninline HRESULT WMPLib::IAppDispatch::navigateNamespace ( _bstr_t address ) {\n    HRESULT _hr = raw_navigateNamespace(address);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(269)\ninline _bstr_t WMPLib::IAppDispatch::GetexclusiveService ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_exclusiveService(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(270)\ninline void WMPLib::IAppDispatch::PutwindowText ( _bstr_t _arg1 ) {\n    HRESULT _hr = put_windowText(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPSafeBrowser wrapper method implementations\n//\n\n#pragma implementation_key(271)\ninline _bstr_t WMPLib::IWMPSafeBrowser::GetURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_URL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(272)\ninline void WMPLib::IWMPSafeBrowser::PutURL ( _bstr_t pVal ) {\n    HRESULT _hr = put_URL(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(273)\ninline long WMPLib::IWMPSafeBrowser::Getstatus ( ) {\n    long _result = 0;\n    HRESULT _hr = get_status(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(274)\ninline long WMPLib::IWMPSafeBrowser::GetpendingDownloads ( ) {\n    long _result = 0;\n    HRESULT _hr = get_pendingDownloads(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(275)\ninline HRESULT WMPLib::IWMPSafeBrowser::showSAMIText ( _bstr_t samiText ) {\n    HRESULT _hr = raw_showSAMIText(samiText);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(276)\ninline HRESULT WMPLib::IWMPSafeBrowser::showLyrics ( _bstr_t lyrics ) {\n    HRESULT _hr = raw_showLyrics(lyrics);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(277)\ninline HRESULT WMPLib::IWMPSafeBrowser::loadSpecialPage ( _bstr_t pageName ) {\n    HRESULT _hr = raw_loadSpecialPage(pageName);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(278)\ninline HRESULT WMPLib::IWMPSafeBrowser::goBack ( ) {\n    HRESULT _hr = raw_goBack();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(279)\ninline HRESULT WMPLib::IWMPSafeBrowser::goForward ( ) {\n    HRESULT _hr = raw_goForward();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(280)\ninline HRESULT WMPLib::IWMPSafeBrowser::stop ( ) {\n    HRESULT _hr = raw_stop();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(281)\ninline HRESULT WMPLib::IWMPSafeBrowser::refresh ( ) {\n    HRESULT _hr = raw_refresh();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(282)\ninline _bstr_t WMPLib::IWMPSafeBrowser::GetbaseURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_baseURL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(283)\ninline _bstr_t WMPLib::IWMPSafeBrowser::GetfullURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_fullURL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(284)\ninline long WMPLib::IWMPSafeBrowser::GetsecureLock ( ) {\n    long _result = 0;\n    HRESULT _hr = get_secureLock(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(285)\ninline VARIANT_BOOL WMPLib::IWMPSafeBrowser::Getbusy ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_busy(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(286)\ninline HRESULT WMPLib::IWMPSafeBrowser::showCert ( ) {\n    HRESULT _hr = raw_showCert();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPObjectExtendedProps wrapper method implementations\n//\n\n#pragma implementation_key(287)\ninline _bstr_t WMPLib::IWMPObjectExtendedProps::GetID ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_ID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(288)\ninline _bstr_t WMPLib::IWMPObjectExtendedProps::GetelementType ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_elementType(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(289)\ninline long WMPLib::IWMPObjectExtendedProps::Getleft ( ) {\n    long _result = 0;\n    HRESULT _hr = get_left(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(290)\ninline void WMPLib::IWMPObjectExtendedProps::Putleft ( long pVal ) {\n    HRESULT _hr = put_left(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(291)\ninline long WMPLib::IWMPObjectExtendedProps::Gettop ( ) {\n    long _result = 0;\n    HRESULT _hr = get_top(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(292)\ninline void WMPLib::IWMPObjectExtendedProps::Puttop ( long pVal ) {\n    HRESULT _hr = put_top(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(293)\ninline long WMPLib::IWMPObjectExtendedProps::Getright ( ) {\n    long _result = 0;\n    HRESULT _hr = get_right(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(294)\ninline void WMPLib::IWMPObjectExtendedProps::Putright ( long pVal ) {\n    HRESULT _hr = put_right(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(295)\ninline long WMPLib::IWMPObjectExtendedProps::Getbottom ( ) {\n    long _result = 0;\n    HRESULT _hr = get_bottom(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(296)\ninline void WMPLib::IWMPObjectExtendedProps::Putbottom ( long pVal ) {\n    HRESULT _hr = put_bottom(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(297)\ninline long WMPLib::IWMPObjectExtendedProps::Getwidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_width(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(298)\ninline void WMPLib::IWMPObjectExtendedProps::Putwidth ( long pVal ) {\n    HRESULT _hr = put_width(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(299)\ninline long WMPLib::IWMPObjectExtendedProps::Getheight ( ) {\n    long _result = 0;\n    HRESULT _hr = get_height(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(300)\ninline void WMPLib::IWMPObjectExtendedProps::Putheight ( long pVal ) {\n    HRESULT _hr = put_height(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(301)\ninline long WMPLib::IWMPObjectExtendedProps::GetzIndex ( ) {\n    long _result = 0;\n    HRESULT _hr = get_zIndex(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(302)\ninline void WMPLib::IWMPObjectExtendedProps::PutzIndex ( long pVal ) {\n    HRESULT _hr = put_zIndex(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(303)\ninline _bstr_t WMPLib::IWMPObjectExtendedProps::GetclippingImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_clippingImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(304)\ninline void WMPLib::IWMPObjectExtendedProps::PutclippingImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_clippingImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(305)\ninline _bstr_t WMPLib::IWMPObjectExtendedProps::GetclippingColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_clippingColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(306)\ninline void WMPLib::IWMPObjectExtendedProps::PutclippingColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_clippingColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(307)\ninline VARIANT_BOOL WMPLib::IWMPObjectExtendedProps::Getvisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_visible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(308)\ninline void WMPLib::IWMPObjectExtendedProps::Putvisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_visible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(309)\ninline VARIANT_BOOL WMPLib::IWMPObjectExtendedProps::Getenabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(310)\ninline void WMPLib::IWMPObjectExtendedProps::Putenabled ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_enabled(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(311)\ninline VARIANT_BOOL WMPLib::IWMPObjectExtendedProps::GettabStop ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_tabStop(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(312)\ninline void WMPLib::IWMPObjectExtendedProps::PuttabStop ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_tabStop(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(313)\ninline VARIANT_BOOL WMPLib::IWMPObjectExtendedProps::GetpassThrough ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_passThrough(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(314)\ninline void WMPLib::IWMPObjectExtendedProps::PutpassThrough ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_passThrough(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(315)\ninline _bstr_t WMPLib::IWMPObjectExtendedProps::GethorizontalAlignment ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_horizontalAlignment(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(316)\ninline void WMPLib::IWMPObjectExtendedProps::PuthorizontalAlignment ( _bstr_t pVal ) {\n    HRESULT _hr = put_horizontalAlignment(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(317)\ninline _bstr_t WMPLib::IWMPObjectExtendedProps::GetverticalAlignment ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_verticalAlignment(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(318)\ninline void WMPLib::IWMPObjectExtendedProps::PutverticalAlignment ( _bstr_t pVal ) {\n    HRESULT _hr = put_verticalAlignment(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(319)\ninline HRESULT WMPLib::IWMPObjectExtendedProps::moveTo ( long newX, long newY, long moveTime ) {\n    HRESULT _hr = raw_moveTo(newX, newY, moveTime);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(320)\ninline HRESULT WMPLib::IWMPObjectExtendedProps::slideTo ( long newX, long newY, long moveTime ) {\n    HRESULT _hr = raw_slideTo(newX, newY, moveTime);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(321)\ninline HRESULT WMPLib::IWMPObjectExtendedProps::moveSizeTo ( long newX, long newY, long newWidth, long newHeight, long moveTime, VARIANT_BOOL fSlide ) {\n    HRESULT _hr = raw_moveSizeTo(newX, newY, newWidth, newHeight, moveTime, fSlide);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(322)\ninline long WMPLib::IWMPObjectExtendedProps::GetalphaBlend ( ) {\n    long _result = 0;\n    HRESULT _hr = get_alphaBlend(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(323)\ninline void WMPLib::IWMPObjectExtendedProps::PutalphaBlend ( long pVal ) {\n    HRESULT _hr = put_alphaBlend(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(324)\ninline HRESULT WMPLib::IWMPObjectExtendedProps::alphaBlendTo ( long newVal, long alphaTime ) {\n    HRESULT _hr = raw_alphaBlendTo(newVal, alphaTime);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(325)\ninline _bstr_t WMPLib::IWMPObjectExtendedProps::GetaccName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_accName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(326)\ninline void WMPLib::IWMPObjectExtendedProps::PutaccName ( _bstr_t pszName ) {\n    HRESULT _hr = put_accName(pszName);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(327)\ninline _bstr_t WMPLib::IWMPObjectExtendedProps::GetaccDescription ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_accDescription(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(328)\ninline void WMPLib::IWMPObjectExtendedProps::PutaccDescription ( _bstr_t pszDesc ) {\n    HRESULT _hr = put_accDescription(pszDesc);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(329)\ninline _bstr_t WMPLib::IWMPObjectExtendedProps::GetaccKeyboardShortcut ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_accKeyboardShortcut(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(330)\ninline void WMPLib::IWMPObjectExtendedProps::PutaccKeyboardShortcut ( _bstr_t pszShortcut ) {\n    HRESULT _hr = put_accKeyboardShortcut(pszShortcut);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(331)\ninline VARIANT_BOOL WMPLib::IWMPObjectExtendedProps::GetresizeImages ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_resizeImages(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(332)\ninline void WMPLib::IWMPObjectExtendedProps::PutresizeImages ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_resizeImages(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(333)\ninline _bstr_t WMPLib::IWMPObjectExtendedProps::GetnineGridMargins ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_nineGridMargins(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(334)\ninline void WMPLib::IWMPObjectExtendedProps::PutnineGridMargins ( _bstr_t pszMargins ) {\n    HRESULT _hr = put_nineGridMargins(pszMargins);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(335)\ninline _bstr_t WMPLib::IWMPObjectExtendedProps::GetresizeOptimize ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_resizeOptimize(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(336)\ninline void WMPLib::IWMPObjectExtendedProps::PutresizeOptimize ( _bstr_t ppszResizeOptimize ) {\n    HRESULT _hr = put_resizeOptimize(ppszResizeOptimize);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(337)\ninline float WMPLib::IWMPObjectExtendedProps::Getrotation ( ) {\n    float _result = 0;\n    HRESULT _hr = get_rotation(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(338)\ninline void WMPLib::IWMPObjectExtendedProps::Putrotation ( float pfVal ) {\n    HRESULT _hr = put_rotation(pfVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPLayoutSubView wrapper method implementations\n//\n\n#pragma implementation_key(339)\ninline _bstr_t WMPLib::IWMPLayoutSubView::GettransparencyColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_transparencyColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(340)\ninline void WMPLib::IWMPLayoutSubView::PuttransparencyColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_transparencyColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(341)\ninline _bstr_t WMPLib::IWMPLayoutSubView::GetbackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(342)\ninline void WMPLib::IWMPLayoutSubView::PutbackgroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(343)\ninline _bstr_t WMPLib::IWMPLayoutSubView::GetbackgroundImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(344)\ninline void WMPLib::IWMPLayoutSubView::PutbackgroundImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(345)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSubView::GetbackgroundTiled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_backgroundTiled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(346)\ninline void WMPLib::IWMPLayoutSubView::PutbackgroundTiled ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_backgroundTiled(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(347)\ninline float WMPLib::IWMPLayoutSubView::GetbackgroundImageHueShift ( ) {\n    float _result = 0;\n    HRESULT _hr = get_backgroundImageHueShift(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(348)\ninline void WMPLib::IWMPLayoutSubView::PutbackgroundImageHueShift ( float pVal ) {\n    HRESULT _hr = put_backgroundImageHueShift(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(349)\ninline float WMPLib::IWMPLayoutSubView::GetbackgroundImageSaturation ( ) {\n    float _result = 0;\n    HRESULT _hr = get_backgroundImageSaturation(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(350)\ninline void WMPLib::IWMPLayoutSubView::PutbackgroundImageSaturation ( float pVal ) {\n    HRESULT _hr = put_backgroundImageSaturation(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(351)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSubView::GetresizeBackgroundImage ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_resizeBackgroundImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(352)\ninline void WMPLib::IWMPLayoutSubView::PutresizeBackgroundImage ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_resizeBackgroundImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPLayoutView wrapper method implementations\n//\n\n#pragma implementation_key(353)\ninline _bstr_t WMPLib::IWMPLayoutView::Gettitle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_title(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(354)\ninline void WMPLib::IWMPLayoutView::Puttitle ( _bstr_t pVal ) {\n    HRESULT _hr = put_title(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(355)\ninline _bstr_t WMPLib::IWMPLayoutView::Getcategory ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_category(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(356)\ninline void WMPLib::IWMPLayoutView::Putcategory ( _bstr_t pVal ) {\n    HRESULT _hr = put_category(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(357)\ninline _bstr_t WMPLib::IWMPLayoutView::GetfocusObjectID ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_focusObjectID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(358)\ninline void WMPLib::IWMPLayoutView::PutfocusObjectID ( _bstr_t pVal ) {\n    HRESULT _hr = put_focusObjectID(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(359)\ninline VARIANT_BOOL WMPLib::IWMPLayoutView::GettitleBar ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_titleBar(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(360)\ninline VARIANT_BOOL WMPLib::IWMPLayoutView::Getresizable ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_resizable(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(361)\ninline long WMPLib::IWMPLayoutView::GettimerInterval ( ) {\n    long _result = 0;\n    HRESULT _hr = get_timerInterval(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(362)\ninline void WMPLib::IWMPLayoutView::PuttimerInterval ( long pVal ) {\n    HRESULT _hr = put_timerInterval(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(363)\ninline long WMPLib::IWMPLayoutView::GetminWidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_minWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(364)\ninline void WMPLib::IWMPLayoutView::PutminWidth ( long pVal ) {\n    HRESULT _hr = put_minWidth(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(365)\ninline long WMPLib::IWMPLayoutView::GetmaxWidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_maxWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(366)\ninline void WMPLib::IWMPLayoutView::PutmaxWidth ( long pVal ) {\n    HRESULT _hr = put_maxWidth(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(367)\ninline long WMPLib::IWMPLayoutView::GetminHeight ( ) {\n    long _result = 0;\n    HRESULT _hr = get_minHeight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(368)\ninline void WMPLib::IWMPLayoutView::PutminHeight ( long pVal ) {\n    HRESULT _hr = put_minHeight(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(369)\ninline long WMPLib::IWMPLayoutView::GetmaxHeight ( ) {\n    long _result = 0;\n    HRESULT _hr = get_maxHeight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(370)\ninline void WMPLib::IWMPLayoutView::PutmaxHeight ( long pVal ) {\n    HRESULT _hr = put_maxHeight(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(371)\ninline HRESULT WMPLib::IWMPLayoutView::close ( ) {\n    HRESULT _hr = raw_close();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(372)\ninline HRESULT WMPLib::IWMPLayoutView::minimize ( ) {\n    HRESULT _hr = raw_minimize();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(373)\ninline HRESULT WMPLib::IWMPLayoutView::maximize ( ) {\n    HRESULT _hr = raw_maximize();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(374)\ninline HRESULT WMPLib::IWMPLayoutView::restore ( ) {\n    HRESULT _hr = raw_restore();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(375)\ninline HRESULT WMPLib::IWMPLayoutView::size ( _bstr_t bstrDirection ) {\n    HRESULT _hr = raw_size(bstrDirection);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(376)\ninline HRESULT WMPLib::IWMPLayoutView::returnToMediaCenter ( ) {\n    HRESULT _hr = raw_returnToMediaCenter();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(377)\ninline HRESULT WMPLib::IWMPLayoutView::updateWindow ( ) {\n    HRESULT _hr = raw_updateWindow();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(378)\ninline VARIANT_BOOL WMPLib::IWMPLayoutView::Getmaximized ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_maximized(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(379)\ninline VARIANT_BOOL WMPLib::IWMPLayoutView::Getminimized ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_minimized(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPEventObject wrapper method implementations\n//\n\n#pragma implementation_key(380)\ninline IDispatchPtr WMPLib::IWMPEventObject::GetsrcElement ( ) {\n    IDispatch * _result = 0;\n    HRESULT _hr = get_srcElement(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IDispatchPtr(_result, false);\n}\n\n#pragma implementation_key(381)\ninline VARIANT_BOOL WMPLib::IWMPEventObject::GetaltKey ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_altKey(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(382)\ninline VARIANT_BOOL WMPLib::IWMPEventObject::GetctrlKey ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_ctrlKey(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(383)\ninline VARIANT_BOOL WMPLib::IWMPEventObject::GetshiftKey ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_shiftKey(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(384)\ninline IDispatchPtr WMPLib::IWMPEventObject::GetfromElement ( ) {\n    IDispatch * _result = 0;\n    HRESULT _hr = get_fromElement(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IDispatchPtr(_result, false);\n}\n\n#pragma implementation_key(385)\ninline IDispatchPtr WMPLib::IWMPEventObject::GettoElement ( ) {\n    IDispatch * _result = 0;\n    HRESULT _hr = get_toElement(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IDispatchPtr(_result, false);\n}\n\n#pragma implementation_key(386)\ninline void WMPLib::IWMPEventObject::PutkeyCode ( long p ) {\n    HRESULT _hr = put_keyCode(p);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(387)\ninline long WMPLib::IWMPEventObject::GetkeyCode ( ) {\n    long _result = 0;\n    HRESULT _hr = get_keyCode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(388)\ninline long WMPLib::IWMPEventObject::Getbutton ( ) {\n    long _result = 0;\n    HRESULT _hr = get_button(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(389)\ninline long WMPLib::IWMPEventObject::Getx ( ) {\n    long _result = 0;\n    HRESULT _hr = get_x(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(390)\ninline long WMPLib::IWMPEventObject::Gety ( ) {\n    long _result = 0;\n    HRESULT _hr = get_y(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(391)\ninline long WMPLib::IWMPEventObject::GetclientX ( ) {\n    long _result = 0;\n    HRESULT _hr = get_clientX(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(392)\ninline long WMPLib::IWMPEventObject::GetclientY ( ) {\n    long _result = 0;\n    HRESULT _hr = get_clientY(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(393)\ninline long WMPLib::IWMPEventObject::GetoffsetX ( ) {\n    long _result = 0;\n    HRESULT _hr = get_offsetX(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(394)\ninline long WMPLib::IWMPEventObject::GetoffsetY ( ) {\n    long _result = 0;\n    HRESULT _hr = get_offsetY(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(395)\ninline long WMPLib::IWMPEventObject::GetscreenX ( ) {\n    long _result = 0;\n    HRESULT _hr = get_screenX(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(396)\ninline long WMPLib::IWMPEventObject::GetscreenY ( ) {\n    long _result = 0;\n    HRESULT _hr = get_screenY(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(397)\ninline long WMPLib::IWMPEventObject::GetscreenWidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_screenWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(398)\ninline long WMPLib::IWMPEventObject::GetscreenHeight ( ) {\n    long _result = 0;\n    HRESULT _hr = get_screenHeight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(399)\ninline VARIANT_BOOL WMPLib::IWMPEventObject::GetpenOrTouch ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_penOrTouch(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPTheme wrapper method implementations\n//\n\n#pragma implementation_key(400)\ninline _bstr_t WMPLib::IWMPTheme::Gettitle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_title(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(401)\ninline float WMPLib::IWMPTheme::Getversion ( ) {\n    float _result = 0;\n    HRESULT _hr = get_version(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(402)\ninline _bstr_t WMPLib::IWMPTheme::GetauthorVersion ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_authorVersion(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(403)\ninline _bstr_t WMPLib::IWMPTheme::Getauthor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_author(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(404)\ninline _bstr_t WMPLib::IWMPTheme::Getcopyright ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_copyright(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(405)\ninline _bstr_t WMPLib::IWMPTheme::GetcurrentViewID ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_currentViewID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(406)\ninline void WMPLib::IWMPTheme::PutcurrentViewID ( _bstr_t pVal ) {\n    HRESULT _hr = put_currentViewID(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(407)\ninline HRESULT WMPLib::IWMPTheme::showErrorDialog ( ) {\n    HRESULT _hr = raw_showErrorDialog();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(408)\ninline HRESULT WMPLib::IWMPTheme::logString ( _bstr_t stringVal ) {\n    HRESULT _hr = raw_logString(stringVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(409)\ninline HRESULT WMPLib::IWMPTheme::openView ( _bstr_t viewID ) {\n    HRESULT _hr = raw_openView(viewID);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(410)\ninline IDispatchPtr WMPLib::IWMPTheme::openViewRelative ( _bstr_t viewID, long x, long y ) {\n    IDispatch * _result = 0;\n    HRESULT _hr = raw_openViewRelative(viewID, x, y, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IDispatchPtr(_result, false);\n}\n\n#pragma implementation_key(411)\ninline HRESULT WMPLib::IWMPTheme::closeView ( _bstr_t viewID ) {\n    HRESULT _hr = raw_closeView(viewID);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(412)\ninline _bstr_t WMPLib::IWMPTheme::openDialog ( _bstr_t dialogType, _bstr_t parameters ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_openDialog(dialogType, parameters, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(413)\ninline _bstr_t WMPLib::IWMPTheme::loadString ( _bstr_t bstrString ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_loadString(bstrString, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(414)\ninline _bstr_t WMPLib::IWMPTheme::loadPreference ( _bstr_t bstrName ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_loadPreference(bstrName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(415)\ninline HRESULT WMPLib::IWMPTheme::savePreference ( _bstr_t bstrName, _bstr_t bstrValue ) {\n    HRESULT _hr = raw_savePreference(bstrName, bstrValue);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(416)\ninline HRESULT WMPLib::IWMPTheme::playSound ( _bstr_t bstrFilename ) {\n    HRESULT _hr = raw_playSound(bstrFilename);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(417)\ninline IDispatchPtr WMPLib::IWMPTheme::openViewRelativeInternal ( _bstr_t viewID, long nIndex, long x, long y, long nWidth, long nHeight, _bstr_t bstrHorizontalAlignment, _bstr_t bstrVerticalAlignment ) {\n    IDispatch * _result = 0;\n    HRESULT _hr = raw_openViewRelativeInternal(viewID, nIndex, x, y, nWidth, nHeight, bstrHorizontalAlignment, bstrVerticalAlignment, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IDispatchPtr(_result, false);\n}\n\n#pragma implementation_key(418)\ninline HRESULT WMPLib::IWMPTheme::setViewPosition ( _bstr_t viewID, long nIndex, long x, long y, long nWidth, long nHeight, _bstr_t bstrHorizontalAlignment, _bstr_t bstrVerticalAlignment ) {\n    HRESULT _hr = raw_setViewPosition(viewID, nIndex, x, y, nWidth, nHeight, bstrHorizontalAlignment, bstrVerticalAlignment);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPLayoutSettingsDispatch wrapper method implementations\n//\n\n#pragma implementation_key(419)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GeteffectType ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_effectType(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(420)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PuteffectType ( _bstr_t pVal ) {\n    HRESULT _hr = put_effectType(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(421)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GeteffectPreset ( ) {\n    long _result = 0;\n    HRESULT _hr = get_effectPreset(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(422)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PuteffectPreset ( long pVal ) {\n    HRESULT _hr = put_effectPreset(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(423)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetsettingsView ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_settingsView(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(424)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutsettingsView ( _bstr_t pVal ) {\n    HRESULT _hr = put_settingsView(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(425)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetvideoZoom ( ) {\n    long _result = 0;\n    HRESULT _hr = get_videoZoom(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(426)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutvideoZoom ( long pVal ) {\n    HRESULT _hr = put_videoZoom(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(427)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetvideoShrinkToFit ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_videoShrinkToFit(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(428)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutvideoShrinkToFit ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_videoShrinkToFit(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(429)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetvideoStretchToFit ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_videoStretchToFit(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(430)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutvideoStretchToFit ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_videoStretchToFit(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(431)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetuserVideoStretchToFit ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_userVideoStretchToFit(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(432)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutuserVideoStretchToFit ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_userVideoStretchToFit(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(433)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetshowCaptions ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_showCaptions(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(434)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutshowCaptions ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_showCaptions(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(435)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetshowTitles ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_showTitles(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(436)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutshowTitles ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_showTitles(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(437)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetshowEffects ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_showEffects(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(438)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutshowEffects ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_showEffects(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(439)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetshowFullScreenPlaylist ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_showFullScreenPlaylist(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(440)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutshowFullScreenPlaylist ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_showFullScreenPlaylist(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(441)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetcontrastMode ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_contrastMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(442)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::getNamedString ( _bstr_t bstrName ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getNamedString(bstrName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(443)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::getDurationStringFromSeconds ( long lDurationVal ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getDurationStringFromSeconds(lDurationVal, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(444)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetdisplayView ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_displayView(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(445)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutdisplayView ( _bstr_t pVal ) {\n    HRESULT _hr = put_displayView(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(446)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetmetadataView ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_metadataView(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(447)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutmetadataView ( _bstr_t pVal ) {\n    HRESULT _hr = put_metadataView(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(448)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetshowSettings ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_showSettings(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(449)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutshowSettings ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_showSettings(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(450)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetshowResizeBars ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_showResizeBars(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(451)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutshowResizeBars ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_showResizeBars(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(452)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetshowPlaylist ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_showPlaylist(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(453)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutshowPlaylist ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_showPlaylist(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(454)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetshowMetadata ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_showMetadata(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(455)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutshowMetadata ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_showMetadata(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(456)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetsettingsWidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_settingsWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(457)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutsettingsWidth ( long pVal ) {\n    HRESULT _hr = put_settingsWidth(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(458)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetsettingsHeight ( ) {\n    long _result = 0;\n    HRESULT _hr = get_settingsHeight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(459)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutsettingsHeight ( long pVal ) {\n    HRESULT _hr = put_settingsHeight(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(460)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetplaylistWidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_playlistWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(461)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutplaylistWidth ( long pVal ) {\n    HRESULT _hr = put_playlistWidth(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(462)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetplaylistHeight ( ) {\n    long _result = 0;\n    HRESULT _hr = get_playlistHeight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(463)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutplaylistHeight ( long pVal ) {\n    HRESULT _hr = put_playlistHeight(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(464)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetmetadataWidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_metadataWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(465)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutmetadataWidth ( long pVal ) {\n    HRESULT _hr = put_metadataWidth(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(466)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetmetadataHeight ( ) {\n    long _result = 0;\n    HRESULT _hr = get_metadataHeight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(467)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutmetadataHeight ( long pVal ) {\n    HRESULT _hr = put_metadataHeight(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(468)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetfullScreenAvailable ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_fullScreenAvailable(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(469)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutfullScreenAvailable ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_fullScreenAvailable(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(470)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetfullScreenRequest ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_fullScreenRequest(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(471)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutfullScreenRequest ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_fullScreenRequest(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(472)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetquickHide ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_quickHide(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(473)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutquickHide ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_quickHide(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(474)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetdisplayPreset ( ) {\n    long _result = 0;\n    HRESULT _hr = get_displayPreset(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(475)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutdisplayPreset ( long pVal ) {\n    HRESULT _hr = put_displayPreset(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(476)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetsettingsPreset ( ) {\n    long _result = 0;\n    HRESULT _hr = get_settingsPreset(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(477)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutsettingsPreset ( long pVal ) {\n    HRESULT _hr = put_settingsPreset(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(478)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetmetadataPreset ( ) {\n    long _result = 0;\n    HRESULT _hr = get_metadataPreset(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(479)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutmetadataPreset ( long pVal ) {\n    HRESULT _hr = put_metadataPreset(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(480)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetuserDisplayView ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_userDisplayView(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(481)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetuserWMPDisplayView ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_userWMPDisplayView(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(482)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetuserDisplayPreset ( ) {\n    long _result = 0;\n    HRESULT _hr = get_userDisplayPreset(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(483)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetuserWMPDisplayPreset ( ) {\n    long _result = 0;\n    HRESULT _hr = get_userWMPDisplayPreset(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(484)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetdynamicRangeControl ( ) {\n    long _result = 0;\n    HRESULT _hr = get_dynamicRangeControl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(485)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutdynamicRangeControl ( long pVal ) {\n    HRESULT _hr = put_dynamicRangeControl(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(486)\ninline float WMPLib::IWMPLayoutSettingsDispatch::GetslowRate ( ) {\n    float _result = 0;\n    HRESULT _hr = get_slowRate(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(487)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutslowRate ( float pVal ) {\n    HRESULT _hr = put_slowRate(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(488)\ninline float WMPLib::IWMPLayoutSettingsDispatch::GetfastRate ( ) {\n    float _result = 0;\n    HRESULT _hr = get_fastRate(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(489)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutfastRate ( float pVal ) {\n    HRESULT _hr = put_fastRate(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(490)\ninline float WMPLib::IWMPLayoutSettingsDispatch::GetbuttonHueShift ( ) {\n    float _result = 0;\n    HRESULT _hr = get_buttonHueShift(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(491)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutbuttonHueShift ( float pVal ) {\n    HRESULT _hr = put_buttonHueShift(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(492)\ninline float WMPLib::IWMPLayoutSettingsDispatch::GetbuttonSaturation ( ) {\n    float _result = 0;\n    HRESULT _hr = get_buttonSaturation(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(493)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutbuttonSaturation ( float pVal ) {\n    HRESULT _hr = put_buttonSaturation(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(494)\ninline float WMPLib::IWMPLayoutSettingsDispatch::GetbackHueShift ( ) {\n    float _result = 0;\n    HRESULT _hr = get_backHueShift(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(495)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutbackHueShift ( float pVal ) {\n    HRESULT _hr = put_backHueShift(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(496)\ninline float WMPLib::IWMPLayoutSettingsDispatch::GetbackSaturation ( ) {\n    float _result = 0;\n    HRESULT _hr = get_backSaturation(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(497)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutbackSaturation ( float pVal ) {\n    HRESULT _hr = put_backSaturation(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(498)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetvizRequest ( ) {\n    long _result = 0;\n    HRESULT _hr = get_vizRequest(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(499)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutvizRequest ( long pVal ) {\n    HRESULT _hr = put_vizRequest(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(500)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorLight ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorLight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(501)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorMedium ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorMedium(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(502)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorDark ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorDark(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(503)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GettoolbarButtonHighlight ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_toolbarButtonHighlight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(504)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GettoolbarButtonShadow ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_toolbarButtonShadow(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(505)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GettoolbarButtonFace ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_toolbarButtonFace(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(506)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetitemPlayingColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_itemPlayingColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(507)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetitemPlayingBackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_itemPlayingBackgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(508)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetitemErrorColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_itemErrorColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(509)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetappColorLimited ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_appColorLimited(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(510)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetappColorBlackBackground ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_appColorBlackBackground(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(511)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutappColorBlackBackground ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_appColorBlackBackground(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(512)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorVideoBorder ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorVideoBorder(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(513)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutappColorVideoBorder ( _bstr_t pVal ) {\n    HRESULT _hr = put_appColorVideoBorder(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(514)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux1 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux1(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(515)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux2 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux2(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(516)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux3 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux3(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(517)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux4 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux4(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(518)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux5 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux5(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(519)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux6 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux6(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(520)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux7 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux7(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(521)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux8 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux8(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(522)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux9 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux9(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(523)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux10 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux10(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(524)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux11 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux11(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(525)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux12 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux12(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(526)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux13 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux13(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(527)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux14 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux14(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(528)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetappColorAux15 ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorAux15(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(529)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::Getstatus ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_status(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(530)\ninline void WMPLib::IWMPLayoutSettingsDispatch::Putstatus ( _bstr_t pVal ) {\n    HRESULT _hr = put_status(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(531)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetuserWMPSettingsView ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_userWMPSettingsView(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(532)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetuserWMPSettingsPreset ( ) {\n    long _result = 0;\n    HRESULT _hr = get_userWMPSettingsPreset(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(533)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetuserWMPShowSettings ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_userWMPShowSettings(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(534)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetuserWMPMetadataView ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_userWMPMetadataView(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(535)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetuserWMPMetadataPreset ( ) {\n    long _result = 0;\n    HRESULT _hr = get_userWMPMetadataPreset(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(536)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetuserWMPShowMetadata ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_userWMPShowMetadata(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(537)\ninline long WMPLib::IWMPLayoutSettingsDispatch::GetcaptionsHeight ( ) {\n    long _result = 0;\n    HRESULT _hr = get_captionsHeight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(538)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutcaptionsHeight ( long pVal ) {\n    HRESULT _hr = put_captionsHeight(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(539)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetsnapToVideo ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_snapToVideo(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(540)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutsnapToVideo ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_snapToVideo(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(541)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetpinFullScreenControls ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_pinFullScreenControls(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(542)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutpinFullScreenControls ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_pinFullScreenControls(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(543)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetisMultiMon ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isMultiMon(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(544)\ninline float WMPLib::IWMPLayoutSettingsDispatch::GetexclusiveHueShift ( ) {\n    float _result = 0;\n    HRESULT _hr = get_exclusiveHueShift(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(545)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutexclusiveHueShift ( float pVal ) {\n    HRESULT _hr = put_exclusiveHueShift(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(546)\ninline float WMPLib::IWMPLayoutSettingsDispatch::GetexclusiveSaturation ( ) {\n    float _result = 0;\n    HRESULT _hr = get_exclusiveSaturation(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(547)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutexclusiveSaturation ( float pVal ) {\n    HRESULT _hr = put_exclusiveSaturation(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(548)\ninline VARIANT_BOOL WMPLib::IWMPLayoutSettingsDispatch::GetthemeBkgColorIsActive ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_themeBkgColorIsActive(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(549)\ninline void WMPLib::IWMPLayoutSettingsDispatch::PutthemeBkgColorIsActive ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_themeBkgColorIsActive(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(550)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetthemeBkgColorActive ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_themeBkgColorActive(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(551)\ninline _bstr_t WMPLib::IWMPLayoutSettingsDispatch::GetthemeBkgColorInactive ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_themeBkgColorInactive(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPWindow wrapper method implementations\n//\n\n#pragma implementation_key(552)\ninline HRESULT WMPLib::IWMPWindow::setWindowPos ( long x, long y, long height, long width ) {\n    HRESULT _hr = raw_setWindowPos(x, y, height, width);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(553)\ninline long WMPLib::IWMPWindow::GetframeRate ( ) {\n    long _result = 0;\n    HRESULT _hr = get_frameRate(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(554)\ninline void WMPLib::IWMPWindow::PutframeRate ( long pVal ) {\n    HRESULT _hr = put_frameRate(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(555)\ninline long WMPLib::IWMPWindow::GetmouseX ( ) {\n    long _result = 0;\n    HRESULT _hr = get_mouseX(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(556)\ninline long WMPLib::IWMPWindow::GetmouseY ( ) {\n    long _result = 0;\n    HRESULT _hr = get_mouseY(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(557)\ninline void WMPLib::IWMPWindow::Putonsizing ( IDispatch * _arg1 ) {\n    HRESULT _hr = put_onsizing(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(558)\ninline HRESULT WMPLib::IWMPWindow::openViewAlwaysOnTop ( _bstr_t bstrViewID ) {\n    HRESULT _hr = raw_openViewAlwaysOnTop(bstrViewID);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPBrandDispatch wrapper method implementations\n//\n\n#pragma implementation_key(559)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetfullServiceName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_fullServiceName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(560)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetfriendlyName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_friendlyName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(561)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetguideButtonText ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_guideButtonText(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(562)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetguideButtonTip ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_guideButtonTip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(563)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetguideMenuText ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_guideMenuText(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(564)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetguideAccText ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_guideAccText(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(565)\ninline _bstr_t WMPLib::IWMPBrandDispatch::Gettask1ButtonText ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_task1ButtonText(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(566)\ninline _bstr_t WMPLib::IWMPBrandDispatch::Gettask1ButtonTip ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_task1ButtonTip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(567)\ninline _bstr_t WMPLib::IWMPBrandDispatch::Gettask1MenuText ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_task1MenuText(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(568)\ninline _bstr_t WMPLib::IWMPBrandDispatch::Gettask1AccText ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_task1AccText(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(569)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetguideUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_guideUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(570)\ninline _bstr_t WMPLib::IWMPBrandDispatch::Gettask1Url ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_task1Url(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(571)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetimageLargeUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_imageLargeUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(572)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetimageSmallUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_imageSmallUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(573)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetimageMenuUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_imageMenuUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(574)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetinfoCenterUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_infoCenterUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(575)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetalbumInfoUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_albumInfoUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(576)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetbuyCDUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_buyCDUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(577)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GethtmlViewUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_htmlViewUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(578)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetnavigateUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_navigateUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(579)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetcookieUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_cookieUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(580)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetdownloadStatusUrl ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_downloadStatusUrl(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(581)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetcolorPlayer ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_colorPlayer(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(582)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetcolorPlayerText ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_colorPlayerText(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(583)\ninline long WMPLib::IWMPBrandDispatch::GetnavigateDispid ( ) {\n    long _result = 0;\n    HRESULT _hr = get_navigateDispid(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(584)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetnavigateParams ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_navigateParams(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(585)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetnavigatePane ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_navigatePane(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(586)\ninline _bstr_t WMPLib::IWMPBrandDispatch::GetselectedPane ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_selectedPane(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(587)\ninline void WMPLib::IWMPBrandDispatch::PutselectedPane ( _bstr_t pVal ) {\n    HRESULT _hr = put_selectedPane(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(588)\ninline HRESULT WMPLib::IWMPBrandDispatch::setNavigateProps ( _bstr_t bstrPane, long lDispid, _bstr_t bstrParams ) {\n    HRESULT _hr = raw_setNavigateProps(bstrPane, lDispid, bstrParams);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(589)\ninline _bstr_t WMPLib::IWMPBrandDispatch::getMediaParams ( IUnknown * pObject, _bstr_t bstrURL ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getMediaParams(pObject, bstrURL, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(590)\ninline void WMPLib::IWMPBrandDispatch::PutselectedTask ( long _arg1 ) {\n    HRESULT _hr = put_selectedTask(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(591)\ninline VARIANT_BOOL WMPLib::IWMPBrandDispatch::GetcontentPartnerSelected ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_contentPartnerSelected(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPNowPlayingHelperDispatch wrapper method implementations\n//\n\n#pragma implementation_key(592)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetviewFriendlyName ( _bstr_t bstrView ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_viewFriendlyName(bstrView, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(593)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::GetviewPresetCount ( _bstr_t bstrView ) {\n    long _result = 0;\n    HRESULT _hr = get_viewPresetCount(bstrView, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(594)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetviewPresetName ( _bstr_t bstrView, long nPresetIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_viewPresetName(bstrView, nPresetIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(595)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GeteffectFriendlyName ( _bstr_t bstrEffect ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_effectFriendlyName(bstrEffect, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(596)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GeteffectPresetName ( _bstr_t bstrEffect, long nPresetIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_effectPresetName(bstrEffect, nPresetIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(597)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::resolveDisplayView ( VARIANT_BOOL fSafe ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_resolveDisplayView(fSafe, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(598)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::isValidDisplayView ( _bstr_t bstrView ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_isValidDisplayView(bstrView, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(599)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::getSkinFile ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getSkinFile(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(600)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetcaptionsAvailable ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_captionsAvailable(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(601)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::GetlinkAvailable ( ) {\n    long _result = 0;\n    HRESULT _hr = get_linkAvailable(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(602)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::GetlinkRequest ( ) {\n    long _result = 0;\n    HRESULT _hr = get_linkRequest(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(603)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutlinkRequest ( long pVal ) {\n    HRESULT _hr = put_linkRequest(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(604)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetlinkRequestParams ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_linkRequestParams(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(605)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutlinkRequestParams ( _bstr_t pVal ) {\n    HRESULT _hr = put_linkRequestParams(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(606)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::getCurrentArtID ( VARIANT_BOOL fLargeArt ) {\n    long _result = 0;\n    HRESULT _hr = raw_getCurrentArtID(fLargeArt, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(607)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::getTimeString ( double dTime ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getTimeString(dTime, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(608)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::getCurrentScriptCommand ( _bstr_t bstrType ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getCurrentScriptCommand(bstrType, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(609)\ninline HRESULT WMPLib::IWMPNowPlayingHelperDispatch::calcLayout ( long lWidth, long lHeight, VARIANT_BOOL vbCaptions, VARIANT_BOOL vbBanner ) {\n    HRESULT _hr = raw_calcLayout(lWidth, lHeight, vbCaptions, vbBanner);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(610)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::getLayoutSize ( long nProp ) {\n    long _result = 0;\n    HRESULT _hr = raw_getLayoutSize(nProp, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(611)\ninline IDispatchPtr WMPLib::IWMPNowPlayingHelperDispatch::getRootPlaylist ( IDispatch * pPlaylist ) {\n    IDispatch * _result = 0;\n    HRESULT _hr = raw_getRootPlaylist(pPlaylist, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IDispatchPtr(_result, false);\n}\n\n#pragma implementation_key(612)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::getHTMLViewURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getHTMLViewURL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(613)\ninline IUnknownPtr WMPLib::IWMPNowPlayingHelperDispatch::GeteditObj ( ) {\n    IUnknown * _result = 0;\n    HRESULT _hr = get_editObj(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IUnknownPtr(_result, false);\n}\n\n#pragma implementation_key(614)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PuteditObj ( IUnknown * ppVal ) {\n    HRESULT _hr = put_editObj(ppVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(615)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::getStatusString ( _bstr_t bstrStatusId ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getStatusString(bstrStatusId, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(616)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::getStatusPct ( _bstr_t bstrStatusId ) {\n    long _result = 0;\n    HRESULT _hr = raw_getStatusPct(bstrStatusId, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(617)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::getStatusResult ( _bstr_t bstrStatusId ) {\n    long _result = 0;\n    HRESULT _hr = raw_getStatusResult(bstrStatusId, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(618)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::getStatusIcon ( _bstr_t bstrStatusId ) {\n    long _result = 0;\n    HRESULT _hr = raw_getStatusIcon(bstrStatusId, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(619)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::getStatusIdList ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getStatusIdList(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(620)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetnotificationString ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_notificationString(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(621)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GethtmlViewBaseURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_htmlViewBaseURL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(622)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PuthtmlViewBaseURL ( _bstr_t pVal ) {\n    HRESULT _hr = put_htmlViewBaseURL(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(623)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GethtmlViewFullURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_htmlViewFullURL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(624)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PuthtmlViewFullURL ( _bstr_t pVal ) {\n    HRESULT _hr = put_htmlViewFullURL(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(625)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::GethtmlViewSecureLock ( ) {\n    long _result = 0;\n    HRESULT _hr = get_htmlViewSecureLock(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(626)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PuthtmlViewSecureLock ( long pVal ) {\n    HRESULT _hr = put_htmlViewSecureLock(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(627)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GethtmlViewBusy ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_htmlViewBusy(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(628)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PuthtmlViewBusy ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_htmlViewBusy(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(629)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GethtmlViewShowCert ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_htmlViewShowCert(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(630)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PuthtmlViewShowCert ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_htmlViewShowCert(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(631)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetpreviousEnabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_previousEnabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(632)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutpreviousEnabled ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_previousEnabled(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(633)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetdoPreviousNow ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_doPreviousNow(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(634)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutdoPreviousNow ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_doPreviousNow(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(635)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::GetDPI ( ) {\n    long _result = 0;\n    HRESULT _hr = get_DPI(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(636)\ninline HRESULT WMPLib::IWMPNowPlayingHelperDispatch::clearColors ( ) {\n    HRESULT _hr = raw_clearColors();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(637)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetlastMessage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_lastMessage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(638)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutlastMessage ( _bstr_t pVal ) {\n    HRESULT _hr = put_lastMessage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(639)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetinVistaPlus ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_inVistaPlus(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(640)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetisBidi ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isBidi(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(641)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetisOCX ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isOCX(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(642)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GethoverTransportsEnabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_hoverTransportsEnabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(643)\ninline HRESULT WMPLib::IWMPNowPlayingHelperDispatch::initRipHelper ( ) {\n    HRESULT _hr = raw_initRipHelper();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(644)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetisAudioCD ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isAudioCD(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(645)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutisAudioCD ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_isAudioCD(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(646)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetcanRip ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_canRip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(647)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutcanRip ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_canRip(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(648)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetisRipping ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isRipping(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(649)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutisRipping ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_isRipping(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(650)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetcurrentDrive ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_currentDrive(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(651)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutcurrentDrive ( _bstr_t pVal ) {\n    HRESULT _hr = put_currentDrive(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(652)\ninline HRESULT WMPLib::IWMPNowPlayingHelperDispatch::startRip ( ) {\n    HRESULT _hr = raw_startRip();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(653)\ninline HRESULT WMPLib::IWMPNowPlayingHelperDispatch::stopRip ( ) {\n    HRESULT _hr = raw_stopRip();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(654)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetshowMMO ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_showMMO(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(655)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutshowMMO ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_showMMO(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(656)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetMMOVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_MMOVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(657)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetsuggestionsVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_suggestionsVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(658)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetsuggestionsTextColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_suggestionsTextColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(659)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetfontFace ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_fontFace(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(660)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::GetfontSize ( ) {\n    long _result = 0;\n    HRESULT _hr = get_fontSize(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(661)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetbackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(662)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::GetdoubleClickTime ( ) {\n    long _result = 0;\n    HRESULT _hr = get_doubleClickTime(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(663)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetplayAgain ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_playAgain(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(664)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetpreviousPlaylistAvailable ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_previousPlaylistAvailable(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(665)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetnextPlaylistAvailable ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_nextPlaylistAvailable(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(666)\ninline HRESULT WMPLib::IWMPNowPlayingHelperDispatch::nextPlaylist ( ) {\n    HRESULT _hr = raw_nextPlaylist();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(667)\ninline HRESULT WMPLib::IWMPNowPlayingHelperDispatch::previousPlaylist ( ) {\n    HRESULT _hr = raw_previousPlaylist();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(668)\ninline HRESULT WMPLib::IWMPNowPlayingHelperDispatch::playOffsetMedia ( long iOffset ) {\n    HRESULT _hr = raw_playOffsetMedia(iOffset);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(669)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetbasketVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_basketVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(670)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutbasketVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_basketVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(671)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetmmoTextColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_mmoTextColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(672)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetbackgroundVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_backgroundVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(673)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutbackgroundEnabled ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_backgroundEnabled(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(674)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetbackgroundEnabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_backgroundEnabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(675)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutbackgroundIndex ( long pVal ) {\n    HRESULT _hr = put_backgroundIndex(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(676)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::GetbackgroundIndex ( ) {\n    long _result = 0;\n    HRESULT _hr = get_backgroundIndex(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(677)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetupNext ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_upNext(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(678)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetplaybackOverlayVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_playbackOverlayVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(679)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::Getremoted ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_remoted(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(680)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetglassEnabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_glassEnabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(681)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GethighContrast ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_highContrast(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(682)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PuttestHighContrast ( _bstr_t _arg1 ) {\n    HRESULT _hr = put_testHighContrast(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(683)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::GetsessionPlaylistCount ( long * pVal ) {\n    HRESULT _hr = get_sessionPlaylistCount(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(684)\ninline HRESULT WMPLib::IWMPNowPlayingHelperDispatch::setGestureStatus ( IDispatch * pObject, long newVal ) {\n    HRESULT _hr = raw_setGestureStatus(pObject, newVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(685)\ninline _bstr_t WMPLib::IWMPNowPlayingHelperDispatch::GetmetadataString ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_metadataString(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(686)\ninline void WMPLib::IWMPNowPlayingHelperDispatch::PutmetadataString ( _bstr_t pVal ) {\n    HRESULT _hr = put_metadataString(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(687)\ninline long WMPLib::IWMPNowPlayingHelperDispatch::GetalbumArtAlpha ( ) {\n    long _result = 0;\n    HRESULT _hr = get_albumArtAlpha(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(688)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetplayerModeAlbumArtSelected ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_playerModeAlbumArtSelected(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(689)\ninline VARIANT_BOOL WMPLib::IWMPNowPlayingHelperDispatch::GetinFullScreen ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_inFullScreen(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(690)\ninline HRESULT WMPLib::IWMPNowPlayingHelperDispatch::syncToAlbumArt ( IDispatch * pObject, long iOffsetFromCurrentMedia, _bstr_t bstrFallbackImage ) {\n    HRESULT _hr = raw_syncToAlbumArt(pObject, iOffsetFromCurrentMedia, bstrFallbackImage);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPNowDoingDispatch wrapper method implementations\n//\n\n#pragma implementation_key(691)\ninline HRESULT WMPLib::IWMPNowDoingDispatch::buyContent ( ) {\n    HRESULT _hr = raw_buyContent();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(692)\ninline HRESULT WMPLib::IWMPNowDoingDispatch::hideBasket ( ) {\n    HRESULT _hr = raw_hideBasket();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(693)\ninline HRESULT WMPLib::IWMPNowDoingDispatch::burnNavigateToStatus ( ) {\n    HRESULT _hr = raw_burnNavigateToStatus();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(694)\ninline HRESULT WMPLib::IWMPNowDoingDispatch::syncNavigateToStatus ( ) {\n    HRESULT _hr = raw_syncNavigateToStatus();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(695)\ninline long WMPLib::IWMPNowDoingDispatch::GetDPI ( ) {\n    long _result = 0;\n    HRESULT _hr = get_DPI(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(696)\ninline _bstr_t WMPLib::IWMPNowDoingDispatch::Getmode ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_mode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(697)\ninline void WMPLib::IWMPNowDoingDispatch::Putburn_selectedDrive ( long pVal ) {\n    HRESULT _hr = put_burn_selectedDrive(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(698)\ninline long WMPLib::IWMPNowDoingDispatch::Getburn_selectedDrive ( ) {\n    long _result = 0;\n    HRESULT _hr = get_burn_selectedDrive(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(699)\ninline long WMPLib::IWMPNowDoingDispatch::Getsync_selectedDevice ( ) {\n    long _result = 0;\n    HRESULT _hr = get_sync_selectedDevice(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(700)\ninline void WMPLib::IWMPNowDoingDispatch::Putsync_selectedDevice ( long pVal ) {\n    HRESULT _hr = put_sync_selectedDevice(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(701)\ninline long WMPLib::IWMPNowDoingDispatch::Getburn_numDiscsSpanned ( ) {\n    long _result = 0;\n    HRESULT _hr = get_burn_numDiscsSpanned(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(702)\ninline IDispatchPtr WMPLib::IWMPNowDoingDispatch::GeteditPlaylist ( ) {\n    IDispatch * _result = 0;\n    HRESULT _hr = get_editPlaylist(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IDispatchPtr(_result, false);\n}\n\n#pragma implementation_key(703)\ninline _bstr_t WMPLib::IWMPNowDoingDispatch::GetbasketPlaylistName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_basketPlaylistName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(704)\ninline VARIANT_BOOL WMPLib::IWMPNowDoingDispatch::GetisHighContrastMode ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isHighContrastMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(705)\ninline VARIANT_BOOL WMPLib::IWMPNowDoingDispatch::GetallowRating ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_allowRating(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(706)\ninline VARIANT_BOOL WMPLib::IWMPNowDoingDispatch::GetallowShop ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_allowShop(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(707)\ninline _bstr_t WMPLib::IWMPNowDoingDispatch::Getburn_mediaType ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_burn_mediaType(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(708)\ninline _bstr_t WMPLib::IWMPNowDoingDispatch::Getburn_contentType ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_burn_contentType(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(709)\ninline long WMPLib::IWMPNowDoingDispatch::Getburn_freeSpace ( ) {\n    long _result = 0;\n    HRESULT _hr = get_burn_freeSpace(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(710)\ninline long WMPLib::IWMPNowDoingDispatch::Getburn_totalSpace ( ) {\n    long _result = 0;\n    HRESULT _hr = get_burn_totalSpace(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(711)\ninline _bstr_t WMPLib::IWMPNowDoingDispatch::Getburn_driveName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_burn_driveName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(712)\ninline long WMPLib::IWMPNowDoingDispatch::Getburn_numDevices ( ) {\n    long _result = 0;\n    HRESULT _hr = get_burn_numDevices(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(713)\ninline long WMPLib::IWMPNowDoingDispatch::Getburn_spaceToUse ( ) {\n    long _result = 0;\n    HRESULT _hr = get_burn_spaceToUse(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(714)\ninline long WMPLib::IWMPNowDoingDispatch::Getburn_percentComplete ( ) {\n    long _result = 0;\n    HRESULT _hr = get_burn_percentComplete(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(715)\ninline long WMPLib::IWMPNowDoingDispatch::Getsync_spaceToUse ( ) {\n    long _result = 0;\n    HRESULT _hr = get_sync_spaceToUse(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(716)\ninline long WMPLib::IWMPNowDoingDispatch::Getsync_spaceUsed ( ) {\n    long _result = 0;\n    HRESULT _hr = get_sync_spaceUsed(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(717)\ninline long WMPLib::IWMPNowDoingDispatch::Getsync_totalSpace ( ) {\n    long _result = 0;\n    HRESULT _hr = get_sync_totalSpace(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(718)\ninline _bstr_t WMPLib::IWMPNowDoingDispatch::Getsync_deviceName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_sync_deviceName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(719)\ninline long WMPLib::IWMPNowDoingDispatch::Getsync_numDevices ( ) {\n    long _result = 0;\n    HRESULT _hr = get_sync_numDevices(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(720)\ninline _bstr_t WMPLib::IWMPNowDoingDispatch::Getsync_oemName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_sync_oemName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(721)\ninline long WMPLib::IWMPNowDoingDispatch::Getsync_percentComplete ( ) {\n    long _result = 0;\n    HRESULT _hr = get_sync_percentComplete(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(722)\ninline HRESULT WMPLib::IWMPNowDoingDispatch::logData ( _bstr_t ID, _bstr_t data ) {\n    HRESULT _hr = raw_logData(ID, data);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(723)\ninline _bstr_t WMPLib::IWMPNowDoingDispatch::formatTime ( long value ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_formatTime(value, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPHoverPreviewDispatch wrapper method implementations\n//\n\n#pragma implementation_key(724)\ninline _bstr_t WMPLib::IWMPHoverPreviewDispatch::Gettitle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_title(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(725)\ninline _bstr_t WMPLib::IWMPHoverPreviewDispatch::Getalbum ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_album(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(726)\ninline _bstr_t WMPLib::IWMPHoverPreviewDispatch::GetURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_URL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(727)\ninline void WMPLib::IWMPHoverPreviewDispatch::Putimage ( IDispatch * _arg1 ) {\n    HRESULT _hr = put_image(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(728)\ninline void WMPLib::IWMPHoverPreviewDispatch::PutautoClick ( VARIANT_BOOL _arg1 ) {\n    HRESULT _hr = put_autoClick(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(729)\ninline void WMPLib::IWMPHoverPreviewDispatch::PutpreviewClick ( VARIANT_BOOL _arg1 ) {\n    HRESULT _hr = put_previewClick(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(730)\ninline HRESULT WMPLib::IWMPHoverPreviewDispatch::dismiss ( ) {\n    HRESULT _hr = raw_dismiss();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// dispinterface IWMPButtonCtrlEvents wrapper method implementations\n//\n\n#pragma implementation_key(731)\ninline HRESULT WMPLib::IWMPButtonCtrlEvents::onclick ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x1400, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n//\n// interface IWMPButtonCtrl wrapper method implementations\n//\n\n#pragma implementation_key(732)\ninline _bstr_t WMPLib::IWMPButtonCtrl::Getimage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_image(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(733)\ninline void WMPLib::IWMPButtonCtrl::Putimage ( _bstr_t pVal ) {\n    HRESULT _hr = put_image(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(734)\ninline _bstr_t WMPLib::IWMPButtonCtrl::GethoverImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_hoverImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(735)\ninline void WMPLib::IWMPButtonCtrl::PuthoverImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_hoverImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(736)\ninline _bstr_t WMPLib::IWMPButtonCtrl::GetdownImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_downImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(737)\ninline void WMPLib::IWMPButtonCtrl::PutdownImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_downImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(738)\ninline _bstr_t WMPLib::IWMPButtonCtrl::GetdisabledImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_disabledImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(739)\ninline void WMPLib::IWMPButtonCtrl::PutdisabledImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_disabledImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(740)\ninline _bstr_t WMPLib::IWMPButtonCtrl::GethoverDownImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_hoverDownImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(741)\ninline void WMPLib::IWMPButtonCtrl::PuthoverDownImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_hoverDownImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(742)\ninline VARIANT_BOOL WMPLib::IWMPButtonCtrl::Gettiled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_tiled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(743)\ninline void WMPLib::IWMPButtonCtrl::Puttiled ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_tiled(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(744)\ninline _bstr_t WMPLib::IWMPButtonCtrl::GettransparencyColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_transparencyColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(745)\ninline void WMPLib::IWMPButtonCtrl::PuttransparencyColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_transparencyColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(746)\ninline VARIANT_BOOL WMPLib::IWMPButtonCtrl::Getdown ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_down(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(747)\ninline void WMPLib::IWMPButtonCtrl::Putdown ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_down(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(748)\ninline VARIANT_BOOL WMPLib::IWMPButtonCtrl::Getsticky ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_sticky(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(749)\ninline void WMPLib::IWMPButtonCtrl::Putsticky ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_sticky(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(750)\ninline _bstr_t WMPLib::IWMPButtonCtrl::GetupToolTip ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_upToolTip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(751)\ninline void WMPLib::IWMPButtonCtrl::PutupToolTip ( _bstr_t pVal ) {\n    HRESULT _hr = put_upToolTip(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(752)\ninline _bstr_t WMPLib::IWMPButtonCtrl::GetdownToolTip ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_downToolTip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(753)\ninline void WMPLib::IWMPButtonCtrl::PutdownToolTip ( _bstr_t pVal ) {\n    HRESULT _hr = put_downToolTip(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(754)\ninline _bstr_t WMPLib::IWMPButtonCtrl::Getcursor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_cursor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(755)\ninline void WMPLib::IWMPButtonCtrl::Putcursor ( _bstr_t pVal ) {\n    HRESULT _hr = put_cursor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPListBoxCtrl wrapper method implementations\n//\n\n#pragma implementation_key(756)\ninline long WMPLib::IWMPListBoxCtrl::GetselectedItem ( ) {\n    long _result = 0;\n    HRESULT _hr = get_selectedItem(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(757)\ninline void WMPLib::IWMPListBoxCtrl::PutselectedItem ( long pnPos ) {\n    HRESULT _hr = put_selectedItem(pnPos);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(758)\ninline VARIANT_BOOL WMPLib::IWMPListBoxCtrl::Getsorted ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_sorted(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(759)\ninline void WMPLib::IWMPListBoxCtrl::Putsorted ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_sorted(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(760)\ninline VARIANT_BOOL WMPLib::IWMPListBoxCtrl::Getmultiselect ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_multiselect(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(761)\ninline void WMPLib::IWMPListBoxCtrl::Putmultiselect ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_multiselect(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(762)\ninline VARIANT_BOOL WMPLib::IWMPListBoxCtrl::GetreadOnly ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_readOnly(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(763)\ninline void WMPLib::IWMPListBoxCtrl::PutreadOnly ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_readOnly(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(764)\ninline _bstr_t WMPLib::IWMPListBoxCtrl::GetforegroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_foregroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(765)\ninline void WMPLib::IWMPListBoxCtrl::PutforegroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_foregroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(766)\ninline _bstr_t WMPLib::IWMPListBoxCtrl::GetbackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(767)\ninline void WMPLib::IWMPListBoxCtrl::PutbackgroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(768)\ninline long WMPLib::IWMPListBoxCtrl::GetfontSize ( ) {\n    long _result = 0;\n    HRESULT _hr = get_fontSize(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(769)\ninline void WMPLib::IWMPListBoxCtrl::PutfontSize ( long pVal ) {\n    HRESULT _hr = put_fontSize(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(770)\ninline _bstr_t WMPLib::IWMPListBoxCtrl::GetfontStyle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_fontStyle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(771)\ninline void WMPLib::IWMPListBoxCtrl::PutfontStyle ( _bstr_t pVal ) {\n    HRESULT _hr = put_fontStyle(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(772)\ninline _bstr_t WMPLib::IWMPListBoxCtrl::GetfontFace ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_fontFace(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(773)\ninline void WMPLib::IWMPListBoxCtrl::PutfontFace ( _bstr_t pVal ) {\n    HRESULT _hr = put_fontFace(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(774)\ninline long WMPLib::IWMPListBoxCtrl::GetitemCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_itemCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(775)\ninline long WMPLib::IWMPListBoxCtrl::GetfirstVisibleItem ( ) {\n    long _result = 0;\n    HRESULT _hr = get_firstVisibleItem(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(776)\ninline void WMPLib::IWMPListBoxCtrl::PutfirstVisibleItem ( long pVal ) {\n    HRESULT _hr = put_firstVisibleItem(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(777)\ninline void WMPLib::IWMPListBoxCtrl::PutpopUp ( VARIANT_BOOL _arg1 ) {\n    HRESULT _hr = put_popUp(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(778)\ninline long WMPLib::IWMPListBoxCtrl::GetfocusItem ( ) {\n    long _result = 0;\n    HRESULT _hr = get_focusItem(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(779)\ninline void WMPLib::IWMPListBoxCtrl::PutfocusItem ( long pVal ) {\n    HRESULT _hr = put_focusItem(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(780)\ninline VARIANT_BOOL WMPLib::IWMPListBoxCtrl::Getborder ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_border(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(781)\ninline void WMPLib::IWMPListBoxCtrl::Putborder ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_border(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(782)\ninline _bstr_t WMPLib::IWMPListBoxCtrl::getItem ( long nPos ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getItem(nPos, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(783)\ninline HRESULT WMPLib::IWMPListBoxCtrl::insertItem ( long nPos, _bstr_t newVal ) {\n    HRESULT _hr = raw_insertItem(nPos, newVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(784)\ninline HRESULT WMPLib::IWMPListBoxCtrl::appendItem ( _bstr_t newVal ) {\n    HRESULT _hr = raw_appendItem(newVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(785)\ninline HRESULT WMPLib::IWMPListBoxCtrl::replaceItem ( long nPos, _bstr_t newVal ) {\n    HRESULT _hr = raw_replaceItem(nPos, newVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(786)\ninline HRESULT WMPLib::IWMPListBoxCtrl::deleteItem ( long nPos ) {\n    HRESULT _hr = raw_deleteItem(nPos);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(787)\ninline HRESULT WMPLib::IWMPListBoxCtrl::deleteAll ( ) {\n    HRESULT _hr = raw_deleteAll();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(788)\ninline long WMPLib::IWMPListBoxCtrl::findItem ( long nStartIndex, _bstr_t newVal ) {\n    long _result = 0;\n    HRESULT _hr = raw_findItem(nStartIndex, newVal, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(789)\ninline long WMPLib::IWMPListBoxCtrl::getNextSelectedItem ( long nStartIndex ) {\n    long _result = 0;\n    HRESULT _hr = raw_getNextSelectedItem(nStartIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(790)\ninline HRESULT WMPLib::IWMPListBoxCtrl::setSelectedState ( long nPos, VARIANT_BOOL vbSelected ) {\n    HRESULT _hr = raw_setSelectedState(nPos, vbSelected);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(791)\ninline HRESULT WMPLib::IWMPListBoxCtrl::show ( ) {\n    HRESULT _hr = raw_show();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(792)\ninline HRESULT WMPLib::IWMPListBoxCtrl::dismiss ( ) {\n    HRESULT _hr = raw_dismiss();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPListBoxItem wrapper method implementations\n//\n\n#pragma implementation_key(793)\ninline void WMPLib::IWMPListBoxItem::Putvalue ( _bstr_t _arg1 ) {\n    HRESULT _hr = put_value(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPPlaylistCtrlColumn wrapper method implementations\n//\n\n#pragma implementation_key(794)\ninline _bstr_t WMPLib::IWMPPlaylistCtrlColumn::GetcolumnName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_columnName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(795)\ninline void WMPLib::IWMPPlaylistCtrlColumn::PutcolumnName ( _bstr_t pVal ) {\n    HRESULT _hr = put_columnName(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(796)\ninline _bstr_t WMPLib::IWMPPlaylistCtrlColumn::GetcolumnID ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_columnID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(797)\ninline void WMPLib::IWMPPlaylistCtrlColumn::PutcolumnID ( _bstr_t pVal ) {\n    HRESULT _hr = put_columnID(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(798)\ninline _bstr_t WMPLib::IWMPPlaylistCtrlColumn::GetcolumnResizeMode ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_columnResizeMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(799)\ninline void WMPLib::IWMPPlaylistCtrlColumn::PutcolumnResizeMode ( _bstr_t pVal ) {\n    HRESULT _hr = put_columnResizeMode(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(800)\ninline long WMPLib::IWMPPlaylistCtrlColumn::GetcolumnWidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_columnWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(801)\ninline void WMPLib::IWMPPlaylistCtrlColumn::PutcolumnWidth ( long pVal ) {\n    HRESULT _hr = put_columnWidth(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// dispinterface IWMPSliderCtrlEvents wrapper method implementations\n//\n\n#pragma implementation_key(802)\ninline HRESULT WMPLib::IWMPSliderCtrlEvents::ondragbegin ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x1536, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(803)\ninline HRESULT WMPLib::IWMPSliderCtrlEvents::ondragend ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x1537, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(804)\ninline HRESULT WMPLib::IWMPSliderCtrlEvents::onpositionchange ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x1538, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n//\n// interface IWMPSliderCtrl wrapper method implementations\n//\n\n#pragma implementation_key(805)\ninline _bstr_t WMPLib::IWMPSliderCtrl::Getdirection ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_direction(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(806)\ninline void WMPLib::IWMPSliderCtrl::Putdirection ( _bstr_t pVal ) {\n    HRESULT _hr = put_direction(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(807)\ninline VARIANT_BOOL WMPLib::IWMPSliderCtrl::Getslide ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_slide(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(808)\ninline void WMPLib::IWMPSliderCtrl::Putslide ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_slide(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(809)\ninline VARIANT_BOOL WMPLib::IWMPSliderCtrl::Gettiled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_tiled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(810)\ninline void WMPLib::IWMPSliderCtrl::Puttiled ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_tiled(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(811)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetforegroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_foregroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(812)\ninline void WMPLib::IWMPSliderCtrl::PutforegroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_foregroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(813)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetforegroundEndColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_foregroundEndColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(814)\ninline void WMPLib::IWMPSliderCtrl::PutforegroundEndColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_foregroundEndColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(815)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetbackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(816)\ninline void WMPLib::IWMPSliderCtrl::PutbackgroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(817)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetbackgroundEndColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundEndColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(818)\ninline void WMPLib::IWMPSliderCtrl::PutbackgroundEndColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundEndColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(819)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetdisabledColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_disabledColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(820)\ninline void WMPLib::IWMPSliderCtrl::PutdisabledColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_disabledColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(821)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GettransparencyColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_transparencyColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(822)\ninline void WMPLib::IWMPSliderCtrl::PuttransparencyColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_transparencyColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(823)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetforegroundImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_foregroundImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(824)\ninline void WMPLib::IWMPSliderCtrl::PutforegroundImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_foregroundImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(825)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetbackgroundImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(826)\ninline void WMPLib::IWMPSliderCtrl::PutbackgroundImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(827)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetbackgroundHoverImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundHoverImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(828)\ninline void WMPLib::IWMPSliderCtrl::PutbackgroundHoverImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundHoverImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(829)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetdisabledImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_disabledImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(830)\ninline void WMPLib::IWMPSliderCtrl::PutdisabledImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_disabledImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(831)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetthumbImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_thumbImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(832)\ninline void WMPLib::IWMPSliderCtrl::PutthumbImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_thumbImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(833)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetthumbHoverImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_thumbHoverImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(834)\ninline void WMPLib::IWMPSliderCtrl::PutthumbHoverImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_thumbHoverImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(835)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetthumbDownImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_thumbDownImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(836)\ninline void WMPLib::IWMPSliderCtrl::PutthumbDownImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_thumbDownImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(837)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetthumbDisabledImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_thumbDisabledImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(838)\ninline void WMPLib::IWMPSliderCtrl::PutthumbDisabledImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_thumbDisabledImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(839)\ninline float WMPLib::IWMPSliderCtrl::Getmin ( ) {\n    float _result = 0;\n    HRESULT _hr = get_min(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(840)\ninline void WMPLib::IWMPSliderCtrl::Putmin ( float pVal ) {\n    HRESULT _hr = put_min(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(841)\ninline float WMPLib::IWMPSliderCtrl::Getmax ( ) {\n    float _result = 0;\n    HRESULT _hr = get_max(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(842)\ninline void WMPLib::IWMPSliderCtrl::Putmax ( float pVal ) {\n    HRESULT _hr = put_max(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(843)\ninline float WMPLib::IWMPSliderCtrl::Getvalue ( ) {\n    float _result = 0;\n    HRESULT _hr = get_value(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(844)\ninline void WMPLib::IWMPSliderCtrl::Putvalue ( float pVal ) {\n    HRESULT _hr = put_value(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(845)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GettoolTip ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_toolTip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(846)\ninline void WMPLib::IWMPSliderCtrl::PuttoolTip ( _bstr_t pVal ) {\n    HRESULT _hr = put_toolTip(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(847)\ninline _bstr_t WMPLib::IWMPSliderCtrl::Getcursor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_cursor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(848)\ninline void WMPLib::IWMPSliderCtrl::Putcursor ( _bstr_t pVal ) {\n    HRESULT _hr = put_cursor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(849)\ninline int WMPLib::IWMPSliderCtrl::GetborderSize ( ) {\n    int _result = 0;\n    HRESULT _hr = get_borderSize(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(850)\ninline void WMPLib::IWMPSliderCtrl::PutborderSize ( int pVal ) {\n    HRESULT _hr = put_borderSize(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(851)\ninline _bstr_t WMPLib::IWMPSliderCtrl::GetforegroundHoverImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_foregroundHoverImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(852)\ninline void WMPLib::IWMPSliderCtrl::PutforegroundHoverImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_foregroundHoverImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(853)\ninline float WMPLib::IWMPSliderCtrl::GetforegroundProgress ( ) {\n    float _result = 0;\n    HRESULT _hr = get_foregroundProgress(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(854)\ninline void WMPLib::IWMPSliderCtrl::PutforegroundProgress ( float pVal ) {\n    HRESULT _hr = put_foregroundProgress(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(855)\ninline VARIANT_BOOL WMPLib::IWMPSliderCtrl::GetuseForegroundProgress ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_useForegroundProgress(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(856)\ninline void WMPLib::IWMPSliderCtrl::PutuseForegroundProgress ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_useForegroundProgress(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// dispinterface IWMPVideoCtrlEvents wrapper method implementations\n//\n\n#pragma implementation_key(857)\ninline HRESULT WMPLib::IWMPVideoCtrlEvents::onvideostart ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x1658, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(858)\ninline HRESULT WMPLib::IWMPVideoCtrlEvents::onvideoend ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x1659, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n//\n// interface IWMPVideoCtrl wrapper method implementations\n//\n\n#pragma implementation_key(859)\ninline void WMPLib::IWMPVideoCtrl::Putwindowless ( VARIANT_BOOL pbClipped ) {\n    HRESULT _hr = put_windowless(pbClipped);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(860)\ninline VARIANT_BOOL WMPLib::IWMPVideoCtrl::Getwindowless ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_windowless(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(861)\ninline void WMPLib::IWMPVideoCtrl::Putcursor ( _bstr_t pbstrCursor ) {\n    HRESULT _hr = put_cursor(pbstrCursor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(862)\ninline _bstr_t WMPLib::IWMPVideoCtrl::Getcursor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_cursor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(863)\ninline void WMPLib::IWMPVideoCtrl::PutbackgroundColor ( _bstr_t pbstrColor ) {\n    HRESULT _hr = put_backgroundColor(pbstrColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(864)\ninline _bstr_t WMPLib::IWMPVideoCtrl::GetbackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(865)\ninline void WMPLib::IWMPVideoCtrl::PutmaintainAspectRatio ( VARIANT_BOOL pbMaintainAspectRatio ) {\n    HRESULT _hr = put_maintainAspectRatio(pbMaintainAspectRatio);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(866)\ninline VARIANT_BOOL WMPLib::IWMPVideoCtrl::GetmaintainAspectRatio ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_maintainAspectRatio(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(867)\ninline void WMPLib::IWMPVideoCtrl::PuttoolTip ( _bstr_t bstrToolTip ) {\n    HRESULT _hr = put_toolTip(bstrToolTip);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(868)\ninline _bstr_t WMPLib::IWMPVideoCtrl::GettoolTip ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_toolTip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(869)\ninline VARIANT_BOOL WMPLib::IWMPVideoCtrl::GetfullScreen ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_fullScreen(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(870)\ninline void WMPLib::IWMPVideoCtrl::PutfullScreen ( VARIANT_BOOL pbFullScreen ) {\n    HRESULT _hr = put_fullScreen(pbFullScreen);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(871)\ninline void WMPLib::IWMPVideoCtrl::PutshrinkToFit ( VARIANT_BOOL pbShrinkToFit ) {\n    HRESULT _hr = put_shrinkToFit(pbShrinkToFit);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(872)\ninline VARIANT_BOOL WMPLib::IWMPVideoCtrl::GetshrinkToFit ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_shrinkToFit(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(873)\ninline void WMPLib::IWMPVideoCtrl::PutstretchToFit ( VARIANT_BOOL pbStretchToFit ) {\n    HRESULT _hr = put_stretchToFit(pbStretchToFit);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(874)\ninline VARIANT_BOOL WMPLib::IWMPVideoCtrl::GetstretchToFit ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_stretchToFit(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(875)\ninline void WMPLib::IWMPVideoCtrl::Putzoom ( long pzoom ) {\n    HRESULT _hr = put_zoom(pzoom);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(876)\ninline long WMPLib::IWMPVideoCtrl::Getzoom ( ) {\n    long _result = 0;\n    HRESULT _hr = get_zoom(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPEffectsCtrl wrapper method implementations\n//\n\n#pragma implementation_key(877)\ninline VARIANT_BOOL WMPLib::IWMPEffectsCtrl::Getwindowed ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_windowed(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(878)\ninline void WMPLib::IWMPEffectsCtrl::Putwindowed ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_windowed(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(879)\ninline VARIANT_BOOL WMPLib::IWMPEffectsCtrl::GetallowAll ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_allowAll(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(880)\ninline void WMPLib::IWMPEffectsCtrl::PutallowAll ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_allowAll(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(881)\ninline void WMPLib::IWMPEffectsCtrl::PutcurrentEffectType ( _bstr_t pVal ) {\n    HRESULT _hr = put_currentEffectType(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(882)\ninline _bstr_t WMPLib::IWMPEffectsCtrl::GetcurrentEffectType ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_currentEffectType(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(883)\ninline _bstr_t WMPLib::IWMPEffectsCtrl::GetcurrentEffectTitle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_currentEffectTitle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(884)\ninline HRESULT WMPLib::IWMPEffectsCtrl::next ( ) {\n    HRESULT _hr = raw_next();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(885)\ninline HRESULT WMPLib::IWMPEffectsCtrl::previous ( ) {\n    HRESULT _hr = raw_previous();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(886)\ninline HRESULT WMPLib::IWMPEffectsCtrl::settings ( ) {\n    HRESULT _hr = raw_settings();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(887)\ninline IDispatchPtr WMPLib::IWMPEffectsCtrl::GetcurrentEffect ( ) {\n    IDispatch * _result = 0;\n    HRESULT _hr = get_currentEffect(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IDispatchPtr(_result, false);\n}\n\n#pragma implementation_key(888)\ninline void WMPLib::IWMPEffectsCtrl::PutcurrentEffect ( IDispatch * p ) {\n    HRESULT _hr = put_currentEffect(p);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(889)\ninline HRESULT WMPLib::IWMPEffectsCtrl::nextEffect ( ) {\n    HRESULT _hr = raw_nextEffect();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(890)\ninline HRESULT WMPLib::IWMPEffectsCtrl::previousEffect ( ) {\n    HRESULT _hr = raw_previousEffect();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(891)\ninline HRESULT WMPLib::IWMPEffectsCtrl::nextPreset ( ) {\n    HRESULT _hr = raw_nextPreset();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(892)\ninline HRESULT WMPLib::IWMPEffectsCtrl::previousPreset ( ) {\n    HRESULT _hr = raw_previousPreset();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(893)\ninline long WMPLib::IWMPEffectsCtrl::GetcurrentPreset ( ) {\n    long _result = 0;\n    HRESULT _hr = get_currentPreset(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(894)\ninline void WMPLib::IWMPEffectsCtrl::PutcurrentPreset ( long pVal ) {\n    HRESULT _hr = put_currentPreset(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(895)\ninline _bstr_t WMPLib::IWMPEffectsCtrl::GetcurrentPresetTitle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_currentPresetTitle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(896)\ninline long WMPLib::IWMPEffectsCtrl::GetcurrentEffectPresetCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_currentEffectPresetCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(897)\ninline VARIANT_BOOL WMPLib::IWMPEffectsCtrl::GetfullScreen ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_fullScreen(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(898)\ninline void WMPLib::IWMPEffectsCtrl::PutfullScreen ( VARIANT_BOOL pbFullScreen ) {\n    HRESULT _hr = put_fullScreen(pbFullScreen);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(899)\ninline VARIANT_BOOL WMPLib::IWMPEffectsCtrl::GeteffectCanGoFullScreen ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_effectCanGoFullScreen(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(900)\ninline VARIANT_BOOL WMPLib::IWMPEffectsCtrl::GeteffectHasPropertyPage ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_effectHasPropertyPage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(901)\ninline long WMPLib::IWMPEffectsCtrl::GeteffectCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_effectCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(902)\ninline _bstr_t WMPLib::IWMPEffectsCtrl::GeteffectTitle ( long index ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_effectTitle(index, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(903)\ninline _bstr_t WMPLib::IWMPEffectsCtrl::GeteffectType ( long index ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_effectType(index, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPEqualizerSettingsCtrl wrapper method implementations\n//\n\n#pragma implementation_key(904)\ninline VARIANT_BOOL WMPLib::IWMPEqualizerSettingsCtrl::Getbypass ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_bypass(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(905)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::Putbypass ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_bypass(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(906)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetgainLevel1 ( ) {\n    float _result = 0;\n    HRESULT _hr = get_gainLevel1(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(907)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutgainLevel1 ( float pflLevel ) {\n    HRESULT _hr = put_gainLevel1(pflLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(908)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetgainLevel2 ( ) {\n    float _result = 0;\n    HRESULT _hr = get_gainLevel2(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(909)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutgainLevel2 ( float pflLevel ) {\n    HRESULT _hr = put_gainLevel2(pflLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(910)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetgainLevel3 ( ) {\n    float _result = 0;\n    HRESULT _hr = get_gainLevel3(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(911)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutgainLevel3 ( float pflLevel ) {\n    HRESULT _hr = put_gainLevel3(pflLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(912)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetgainLevel4 ( ) {\n    float _result = 0;\n    HRESULT _hr = get_gainLevel4(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(913)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutgainLevel4 ( float pflLevel ) {\n    HRESULT _hr = put_gainLevel4(pflLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(914)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetgainLevel5 ( ) {\n    float _result = 0;\n    HRESULT _hr = get_gainLevel5(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(915)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutgainLevel5 ( float pflLevel ) {\n    HRESULT _hr = put_gainLevel5(pflLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(916)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetgainLevel6 ( ) {\n    float _result = 0;\n    HRESULT _hr = get_gainLevel6(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(917)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutgainLevel6 ( float pflLevel ) {\n    HRESULT _hr = put_gainLevel6(pflLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(918)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetgainLevel7 ( ) {\n    float _result = 0;\n    HRESULT _hr = get_gainLevel7(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(919)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutgainLevel7 ( float pflLevel ) {\n    HRESULT _hr = put_gainLevel7(pflLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(920)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetgainLevel8 ( ) {\n    float _result = 0;\n    HRESULT _hr = get_gainLevel8(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(921)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutgainLevel8 ( float pflLevel ) {\n    HRESULT _hr = put_gainLevel8(pflLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(922)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetgainLevel9 ( ) {\n    float _result = 0;\n    HRESULT _hr = get_gainLevel9(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(923)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutgainLevel9 ( float pflLevel ) {\n    HRESULT _hr = put_gainLevel9(pflLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(924)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetgainLevel10 ( ) {\n    float _result = 0;\n    HRESULT _hr = get_gainLevel10(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(925)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutgainLevel10 ( float pflLevel ) {\n    HRESULT _hr = put_gainLevel10(pflLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(926)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetgainLevels ( long iIndex ) {\n    float _result = 0;\n    HRESULT _hr = get_gainLevels(iIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(927)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutgainLevels ( long iIndex, float pflLevel ) {\n    HRESULT _hr = put_gainLevels(iIndex, pflLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(928)\ninline HRESULT WMPLib::IWMPEqualizerSettingsCtrl::reset ( ) {\n    HRESULT _hr = raw_reset();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(929)\ninline long WMPLib::IWMPEqualizerSettingsCtrl::Getbands ( ) {\n    long _result = 0;\n    HRESULT _hr = get_bands(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(930)\ninline HRESULT WMPLib::IWMPEqualizerSettingsCtrl::nextPreset ( ) {\n    HRESULT _hr = raw_nextPreset();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(931)\ninline HRESULT WMPLib::IWMPEqualizerSettingsCtrl::previousPreset ( ) {\n    HRESULT _hr = raw_previousPreset();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(932)\ninline long WMPLib::IWMPEqualizerSettingsCtrl::GetcurrentPreset ( ) {\n    long _result = 0;\n    HRESULT _hr = get_currentPreset(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(933)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutcurrentPreset ( long pVal ) {\n    HRESULT _hr = put_currentPreset(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(934)\ninline _bstr_t WMPLib::IWMPEqualizerSettingsCtrl::GetcurrentPresetTitle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_currentPresetTitle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(935)\ninline long WMPLib::IWMPEqualizerSettingsCtrl::GetpresetCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_presetCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(936)\ninline VARIANT_BOOL WMPLib::IWMPEqualizerSettingsCtrl::GetenhancedAudio ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enhancedAudio(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(937)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutenhancedAudio ( VARIANT_BOOL pfVal ) {\n    HRESULT _hr = put_enhancedAudio(pfVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(938)\ninline long WMPLib::IWMPEqualizerSettingsCtrl::GetspeakerSize ( ) {\n    long _result = 0;\n    HRESULT _hr = get_speakerSize(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(939)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutspeakerSize ( long plVal ) {\n    HRESULT _hr = put_speakerSize(plVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(940)\ninline _bstr_t WMPLib::IWMPEqualizerSettingsCtrl::GetcurrentSpeakerName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_currentSpeakerName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(941)\ninline long WMPLib::IWMPEqualizerSettingsCtrl::GettruBassLevel ( ) {\n    long _result = 0;\n    HRESULT _hr = get_truBassLevel(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(942)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PuttruBassLevel ( long plTruBassLevel ) {\n    HRESULT _hr = put_truBassLevel(plTruBassLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(943)\ninline long WMPLib::IWMPEqualizerSettingsCtrl::GetwowLevel ( ) {\n    long _result = 0;\n    HRESULT _hr = get_wowLevel(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(944)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutwowLevel ( long plWowLevel ) {\n    HRESULT _hr = put_wowLevel(plWowLevel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(945)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetsplineTension ( ) {\n    float _result = 0;\n    HRESULT _hr = get_splineTension(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(946)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutsplineTension ( float pflSplineTension ) {\n    HRESULT _hr = put_splineTension(pflSplineTension);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(947)\ninline VARIANT_BOOL WMPLib::IWMPEqualizerSettingsCtrl::GetenableSplineTension ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enableSplineTension(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(948)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutenableSplineTension ( VARIANT_BOOL pfEnableSplineTension ) {\n    HRESULT _hr = put_enableSplineTension(pfEnableSplineTension);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(949)\ninline _bstr_t WMPLib::IWMPEqualizerSettingsCtrl::GetpresetTitle ( long iIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_presetTitle(iIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(950)\ninline VARIANT_BOOL WMPLib::IWMPEqualizerSettingsCtrl::Getnormalization ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_normalization(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(951)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::Putnormalization ( VARIANT_BOOL pfVal ) {\n    HRESULT _hr = put_normalization(pfVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(952)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetnormalizationAverage ( ) {\n    float _result = 0;\n    HRESULT _hr = get_normalizationAverage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(953)\ninline float WMPLib::IWMPEqualizerSettingsCtrl::GetnormalizationPeak ( ) {\n    float _result = 0;\n    HRESULT _hr = get_normalizationPeak(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(954)\ninline VARIANT_BOOL WMPLib::IWMPEqualizerSettingsCtrl::GetcrossFade ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_crossFade(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(955)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutcrossFade ( VARIANT_BOOL pfVal ) {\n    HRESULT _hr = put_crossFade(pfVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(956)\ninline long WMPLib::IWMPEqualizerSettingsCtrl::GetcrossFadeWindow ( ) {\n    long _result = 0;\n    HRESULT _hr = get_crossFadeWindow(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(957)\ninline void WMPLib::IWMPEqualizerSettingsCtrl::PutcrossFadeWindow ( long plWindow ) {\n    HRESULT _hr = put_crossFadeWindow(plWindow);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPVideoSettingsCtrl wrapper method implementations\n//\n\n#pragma implementation_key(958)\ninline long WMPLib::IWMPVideoSettingsCtrl::Getbrightness ( ) {\n    long _result = 0;\n    HRESULT _hr = get_brightness(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(959)\ninline void WMPLib::IWMPVideoSettingsCtrl::Putbrightness ( long pVal ) {\n    HRESULT _hr = put_brightness(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(960)\ninline long WMPLib::IWMPVideoSettingsCtrl::Getcontrast ( ) {\n    long _result = 0;\n    HRESULT _hr = get_contrast(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(961)\ninline void WMPLib::IWMPVideoSettingsCtrl::Putcontrast ( long pVal ) {\n    HRESULT _hr = put_contrast(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(962)\ninline long WMPLib::IWMPVideoSettingsCtrl::Gethue ( ) {\n    long _result = 0;\n    HRESULT _hr = get_hue(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(963)\ninline void WMPLib::IWMPVideoSettingsCtrl::Puthue ( long pVal ) {\n    HRESULT _hr = put_hue(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(964)\ninline long WMPLib::IWMPVideoSettingsCtrl::Getsaturation ( ) {\n    long _result = 0;\n    HRESULT _hr = get_saturation(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(965)\ninline void WMPLib::IWMPVideoSettingsCtrl::Putsaturation ( long pVal ) {\n    HRESULT _hr = put_saturation(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(966)\ninline HRESULT WMPLib::IWMPVideoSettingsCtrl::reset ( ) {\n    HRESULT _hr = raw_reset();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPDolbyDigitalSettingsCtrl wrapper method implementations\n//\n\n#pragma implementation_key(967)\ninline HRESULT WMPLib::IWMPDolbyDigitalSettingsCtrl::reset ( ) {\n    HRESULT _hr = raw_reset();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(968)\ninline long WMPLib::IWMPDolbyDigitalSettingsCtrl::GetcurrentPreset ( ) {\n    long _result = 0;\n    HRESULT _hr = get_currentPreset(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(969)\ninline void WMPLib::IWMPDolbyDigitalSettingsCtrl::PutcurrentPreset ( long plCurrentPreset ) {\n    HRESULT _hr = put_currentPreset(plCurrentPreset);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPEditCtrl wrapper method implementations\n//\n\n#pragma implementation_key(970)\ninline _bstr_t WMPLib::IWMPEditCtrl::Getvalue ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_value(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(971)\ninline void WMPLib::IWMPEditCtrl::Putvalue ( _bstr_t pVal ) {\n    HRESULT _hr = put_value(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(972)\ninline VARIANT_BOOL WMPLib::IWMPEditCtrl::Getborder ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_border(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(973)\ninline void WMPLib::IWMPEditCtrl::Putborder ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_border(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(974)\ninline _bstr_t WMPLib::IWMPEditCtrl::Getjustification ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_justification(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(975)\ninline void WMPLib::IWMPEditCtrl::Putjustification ( _bstr_t pVal ) {\n    HRESULT _hr = put_justification(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(976)\ninline _bstr_t WMPLib::IWMPEditCtrl::GeteditStyle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_editStyle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(977)\ninline void WMPLib::IWMPEditCtrl::PuteditStyle ( _bstr_t pVal ) {\n    HRESULT _hr = put_editStyle(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(978)\ninline VARIANT_BOOL WMPLib::IWMPEditCtrl::GetwordWrap ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_wordWrap(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(979)\ninline void WMPLib::IWMPEditCtrl::PutwordWrap ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_wordWrap(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(980)\ninline VARIANT_BOOL WMPLib::IWMPEditCtrl::GetreadOnly ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_readOnly(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(981)\ninline void WMPLib::IWMPEditCtrl::PutreadOnly ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_readOnly(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(982)\ninline _bstr_t WMPLib::IWMPEditCtrl::GetforegroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_foregroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(983)\ninline void WMPLib::IWMPEditCtrl::PutforegroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_foregroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(984)\ninline _bstr_t WMPLib::IWMPEditCtrl::GetbackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(985)\ninline void WMPLib::IWMPEditCtrl::PutbackgroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(986)\ninline long WMPLib::IWMPEditCtrl::GetfontSize ( ) {\n    long _result = 0;\n    HRESULT _hr = get_fontSize(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(987)\ninline void WMPLib::IWMPEditCtrl::PutfontSize ( long pVal ) {\n    HRESULT _hr = put_fontSize(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(988)\ninline _bstr_t WMPLib::IWMPEditCtrl::GetfontStyle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_fontStyle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(989)\ninline void WMPLib::IWMPEditCtrl::PutfontStyle ( _bstr_t pVal ) {\n    HRESULT _hr = put_fontStyle(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(990)\ninline _bstr_t WMPLib::IWMPEditCtrl::GetfontFace ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_fontFace(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(991)\ninline void WMPLib::IWMPEditCtrl::PutfontFace ( _bstr_t pVal ) {\n    HRESULT _hr = put_fontFace(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(992)\ninline long WMPLib::IWMPEditCtrl::GettextLimit ( ) {\n    long _result = 0;\n    HRESULT _hr = get_textLimit(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(993)\ninline void WMPLib::IWMPEditCtrl::PuttextLimit ( long pVal ) {\n    HRESULT _hr = put_textLimit(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(994)\ninline long WMPLib::IWMPEditCtrl::GetlineCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_lineCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(995)\ninline _bstr_t WMPLib::IWMPEditCtrl::getLine ( long nIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getLine(nIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(996)\ninline long WMPLib::IWMPEditCtrl::getSelectionStart ( ) {\n    long _result = 0;\n    HRESULT _hr = raw_getSelectionStart(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(997)\ninline long WMPLib::IWMPEditCtrl::getSelectionEnd ( ) {\n    long _result = 0;\n    HRESULT _hr = raw_getSelectionEnd(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(998)\ninline HRESULT WMPLib::IWMPEditCtrl::setSelection ( long nStart, long nEnd ) {\n    HRESULT _hr = raw_setSelection(nStart, nEnd);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(999)\ninline HRESULT WMPLib::IWMPEditCtrl::replaceSelection ( _bstr_t newVal ) {\n    HRESULT _hr = raw_replaceSelection(newVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1000)\ninline long WMPLib::IWMPEditCtrl::getLineIndex ( long nIndex ) {\n    long _result = 0;\n    HRESULT _hr = raw_getLineIndex(nIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1001)\ninline long WMPLib::IWMPEditCtrl::getLineFromChar ( long nPosition ) {\n    long _result = 0;\n    HRESULT _hr = raw_getLineFromChar(nPosition, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPSkinList wrapper method implementations\n//\n\n#pragma implementation_key(1002)\ninline HRESULT WMPLib::IWMPSkinList::updateBasketColumns ( ) {\n    HRESULT _hr = raw_updateBasketColumns();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1003)\ninline HRESULT WMPLib::IWMPSkinList::highContrastChange ( ) {\n    HRESULT _hr = raw_highContrastChange();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPPluginUIHost wrapper method implementations\n//\n\n#pragma implementation_key(1004)\ninline _bstr_t WMPLib::IWMPPluginUIHost::GetbackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1005)\ninline void WMPLib::IWMPPluginUIHost::PutbackgroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1006)\ninline _bstr_t WMPLib::IWMPPluginUIHost::GetobjectID ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_objectID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1007)\ninline void WMPLib::IWMPPluginUIHost::PutobjectID ( _bstr_t pVal ) {\n    HRESULT _hr = put_objectID(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1008)\ninline _variant_t WMPLib::IWMPPluginUIHost::getProperty ( _bstr_t bstrName ) {\n    VARIANT _result;\n    VariantInit(&_result);\n    HRESULT _hr = raw_getProperty(bstrName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _variant_t(_result, false);\n}\n\n#pragma implementation_key(1009)\ninline HRESULT WMPLib::IWMPPluginUIHost::setProperty ( _bstr_t bstrName, const _variant_t & newVal ) {\n    HRESULT _hr = raw_setProperty(bstrName, newVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPMenuCtrl wrapper method implementations\n//\n\n#pragma implementation_key(1010)\ninline HRESULT WMPLib::IWMPMenuCtrl::deleteAllItems ( ) {\n    HRESULT _hr = raw_deleteAllItems();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1011)\ninline HRESULT WMPLib::IWMPMenuCtrl::appendItem ( long nID, _bstr_t bstrItem ) {\n    HRESULT _hr = raw_appendItem(nID, bstrItem);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1012)\ninline HRESULT WMPLib::IWMPMenuCtrl::appendSeparator ( ) {\n    HRESULT _hr = raw_appendSeparator();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1013)\ninline HRESULT WMPLib::IWMPMenuCtrl::enableItem ( long nID, VARIANT_BOOL newVal ) {\n    HRESULT _hr = raw_enableItem(nID, newVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1014)\ninline HRESULT WMPLib::IWMPMenuCtrl::checkItem ( long nID, VARIANT_BOOL newVal ) {\n    HRESULT _hr = raw_checkItem(nID, newVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1015)\ninline HRESULT WMPLib::IWMPMenuCtrl::checkRadioItem ( long nID, VARIANT_BOOL newVal ) {\n    HRESULT _hr = raw_checkRadioItem(nID, newVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1016)\ninline long WMPLib::IWMPMenuCtrl::GetshowFlags ( ) {\n    long _result = 0;\n    HRESULT _hr = get_showFlags(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1017)\ninline void WMPLib::IWMPMenuCtrl::PutshowFlags ( long pVal ) {\n    HRESULT _hr = put_showFlags(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1018)\ninline long WMPLib::IWMPMenuCtrl::show ( ) {\n    long _result = 0;\n    HRESULT _hr = raw_show(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1019)\ninline HRESULT WMPLib::IWMPMenuCtrl::showEx ( long nID ) {\n    HRESULT _hr = raw_showEx(nID);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPAutoMenuCtrl wrapper method implementations\n//\n\n#pragma implementation_key(1020)\ninline HRESULT WMPLib::IWMPAutoMenuCtrl::show ( _bstr_t newVal ) {\n    HRESULT _hr = raw_show(newVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPRegionalButtonCtrl wrapper method implementations\n//\n\n#pragma implementation_key(1021)\ninline _bstr_t WMPLib::IWMPRegionalButtonCtrl::Getimage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_image(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1022)\ninline void WMPLib::IWMPRegionalButtonCtrl::Putimage ( _bstr_t pVal ) {\n    HRESULT _hr = put_image(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1023)\ninline _bstr_t WMPLib::IWMPRegionalButtonCtrl::GethoverImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_hoverImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1024)\ninline void WMPLib::IWMPRegionalButtonCtrl::PuthoverImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_hoverImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1025)\ninline _bstr_t WMPLib::IWMPRegionalButtonCtrl::GetdownImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_downImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1026)\ninline void WMPLib::IWMPRegionalButtonCtrl::PutdownImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_downImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1027)\ninline _bstr_t WMPLib::IWMPRegionalButtonCtrl::GethoverDownImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_hoverDownImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1028)\ninline void WMPLib::IWMPRegionalButtonCtrl::PuthoverDownImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_hoverDownImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1029)\ninline _bstr_t WMPLib::IWMPRegionalButtonCtrl::GethoverHoverImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_hoverHoverImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1030)\ninline void WMPLib::IWMPRegionalButtonCtrl::PuthoverHoverImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_hoverHoverImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1031)\ninline _bstr_t WMPLib::IWMPRegionalButtonCtrl::GetdisabledImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_disabledImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1032)\ninline void WMPLib::IWMPRegionalButtonCtrl::PutdisabledImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_disabledImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1033)\ninline _bstr_t WMPLib::IWMPRegionalButtonCtrl::GetmappingImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_mappingImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1034)\ninline void WMPLib::IWMPRegionalButtonCtrl::PutmappingImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_mappingImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1035)\ninline _bstr_t WMPLib::IWMPRegionalButtonCtrl::GettransparencyColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_transparencyColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1036)\ninline void WMPLib::IWMPRegionalButtonCtrl::PuttransparencyColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_transparencyColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1037)\ninline _bstr_t WMPLib::IWMPRegionalButtonCtrl::Getcursor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_cursor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1038)\ninline void WMPLib::IWMPRegionalButtonCtrl::Putcursor ( _bstr_t pVal ) {\n    HRESULT _hr = put_cursor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1039)\ninline VARIANT_BOOL WMPLib::IWMPRegionalButtonCtrl::GetshowBackground ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_showBackground(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1040)\ninline void WMPLib::IWMPRegionalButtonCtrl::PutshowBackground ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_showBackground(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1041)\ninline VARIANT_BOOL WMPLib::IWMPRegionalButtonCtrl::Getradio ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_radio(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1042)\ninline void WMPLib::IWMPRegionalButtonCtrl::Putradio ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_radio(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1043)\ninline long WMPLib::IWMPRegionalButtonCtrl::GetbuttonCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_buttonCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1044)\ninline IDispatchPtr WMPLib::IWMPRegionalButtonCtrl::createButton ( ) {\n    IDispatch * _result = 0;\n    HRESULT _hr = raw_createButton(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IDispatchPtr(_result, false);\n}\n\n#pragma implementation_key(1045)\ninline IDispatchPtr WMPLib::IWMPRegionalButtonCtrl::getButton ( long nButton ) {\n    IDispatch * _result = 0;\n    HRESULT _hr = raw_getButton(nButton, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IDispatchPtr(_result, false);\n}\n\n#pragma implementation_key(1046)\ninline HRESULT WMPLib::IWMPRegionalButtonCtrl::Click ( long nButton ) {\n    HRESULT _hr = raw_Click(nButton);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1047)\ninline float WMPLib::IWMPRegionalButtonCtrl::GethueShift ( ) {\n    float _result = 0;\n    HRESULT _hr = get_hueShift(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1048)\ninline void WMPLib::IWMPRegionalButtonCtrl::PuthueShift ( float pVal ) {\n    HRESULT _hr = put_hueShift(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1049)\ninline float WMPLib::IWMPRegionalButtonCtrl::Getsaturation ( ) {\n    float _result = 0;\n    HRESULT _hr = get_saturation(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1050)\ninline void WMPLib::IWMPRegionalButtonCtrl::Putsaturation ( float pVal ) {\n    HRESULT _hr = put_saturation(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// dispinterface IWMPRegionalButtonEvents wrapper method implementations\n//\n\n#pragma implementation_key(1051)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::onblur ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14f0, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1052)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::onfocus ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14f1, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1053)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::onclick ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14f2, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1054)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::ondblclick ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14f3, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1055)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::onmousedown ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14f4, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1056)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::onmouseup ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14f5, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1057)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::onmousemove ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14f6, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1058)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::onmouseover ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14f7, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1059)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::onmouseout ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14f8, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1060)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::onkeypress ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14f9, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1061)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::onkeydown ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14fa, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1062)\ninline HRESULT WMPLib::IWMPRegionalButtonEvents::onkeyup ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x14fb, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n//\n// interface IWMPRegionalButton wrapper method implementations\n//\n\n#pragma implementation_key(1063)\ninline _bstr_t WMPLib::IWMPRegionalButton::GetupToolTip ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_upToolTip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1064)\ninline void WMPLib::IWMPRegionalButton::PutupToolTip ( _bstr_t pVal ) {\n    HRESULT _hr = put_upToolTip(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1065)\ninline _bstr_t WMPLib::IWMPRegionalButton::GetdownToolTip ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_downToolTip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1066)\ninline void WMPLib::IWMPRegionalButton::PutdownToolTip ( _bstr_t pVal ) {\n    HRESULT _hr = put_downToolTip(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1067)\ninline _bstr_t WMPLib::IWMPRegionalButton::GetmappingColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_mappingColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1068)\ninline void WMPLib::IWMPRegionalButton::PutmappingColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_mappingColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1069)\ninline VARIANT_BOOL WMPLib::IWMPRegionalButton::Getenabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1070)\ninline void WMPLib::IWMPRegionalButton::Putenabled ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_enabled(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1071)\ninline VARIANT_BOOL WMPLib::IWMPRegionalButton::Getsticky ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_sticky(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1072)\ninline void WMPLib::IWMPRegionalButton::Putsticky ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_sticky(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1073)\ninline VARIANT_BOOL WMPLib::IWMPRegionalButton::Getdown ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_down(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1074)\ninline void WMPLib::IWMPRegionalButton::Putdown ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_down(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1075)\ninline long WMPLib::IWMPRegionalButton::Getindex ( ) {\n    long _result = 0;\n    HRESULT _hr = get_index(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1076)\ninline VARIANT_BOOL WMPLib::IWMPRegionalButton::GettabStop ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_tabStop(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1077)\ninline void WMPLib::IWMPRegionalButton::PuttabStop ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_tabStop(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1078)\ninline _bstr_t WMPLib::IWMPRegionalButton::Getcursor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_cursor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1079)\ninline void WMPLib::IWMPRegionalButton::Putcursor ( _bstr_t pVal ) {\n    HRESULT _hr = put_cursor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1080)\ninline HRESULT WMPLib::IWMPRegionalButton::Click ( ) {\n    HRESULT _hr = raw_Click();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1081)\ninline _bstr_t WMPLib::IWMPRegionalButton::GetaccName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_accName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1082)\ninline void WMPLib::IWMPRegionalButton::PutaccName ( _bstr_t pszName ) {\n    HRESULT _hr = put_accName(pszName);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1083)\ninline _bstr_t WMPLib::IWMPRegionalButton::GetaccDescription ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_accDescription(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1084)\ninline void WMPLib::IWMPRegionalButton::PutaccDescription ( _bstr_t pszDescription ) {\n    HRESULT _hr = put_accDescription(pszDescription);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1085)\ninline _bstr_t WMPLib::IWMPRegionalButton::GetaccKeyboardShortcut ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_accKeyboardShortcut(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1086)\ninline void WMPLib::IWMPRegionalButton::PutaccKeyboardShortcut ( _bstr_t pszShortcut ) {\n    HRESULT _hr = put_accKeyboardShortcut(pszShortcut);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// dispinterface IWMPCustomSliderCtrlEvents wrapper method implementations\n//\n\n#pragma implementation_key(1087)\ninline HRESULT WMPLib::IWMPCustomSliderCtrlEvents::ondragbegin ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x139c, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1088)\ninline HRESULT WMPLib::IWMPCustomSliderCtrlEvents::ondragend ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x139d, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n#pragma implementation_key(1089)\ninline HRESULT WMPLib::IWMPCustomSliderCtrlEvents::onpositionchange ( ) {\n    HRESULT _result = 0;\n    _com_dispatch_method(this, 0x139e, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);\n    return _result;\n}\n\n//\n// interface IWMPCustomSlider wrapper method implementations\n//\n\n#pragma implementation_key(1090)\ninline _bstr_t WMPLib::IWMPCustomSlider::Getcursor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_cursor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1091)\ninline void WMPLib::IWMPCustomSlider::Putcursor ( _bstr_t pVal ) {\n    HRESULT _hr = put_cursor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1092)\ninline float WMPLib::IWMPCustomSlider::Getmin ( ) {\n    float _result = 0;\n    HRESULT _hr = get_min(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1093)\ninline void WMPLib::IWMPCustomSlider::Putmin ( float pVal ) {\n    HRESULT _hr = put_min(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1094)\ninline float WMPLib::IWMPCustomSlider::Getmax ( ) {\n    float _result = 0;\n    HRESULT _hr = get_max(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1095)\ninline void WMPLib::IWMPCustomSlider::Putmax ( float pVal ) {\n    HRESULT _hr = put_max(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1096)\ninline float WMPLib::IWMPCustomSlider::Getvalue ( ) {\n    float _result = 0;\n    HRESULT _hr = get_value(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1097)\ninline void WMPLib::IWMPCustomSlider::Putvalue ( float pVal ) {\n    HRESULT _hr = put_value(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1098)\ninline _bstr_t WMPLib::IWMPCustomSlider::GettoolTip ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_toolTip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1099)\ninline void WMPLib::IWMPCustomSlider::PuttoolTip ( _bstr_t pVal ) {\n    HRESULT _hr = put_toolTip(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1100)\ninline _bstr_t WMPLib::IWMPCustomSlider::GetpositionImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_positionImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1101)\ninline void WMPLib::IWMPCustomSlider::PutpositionImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_positionImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1102)\ninline _bstr_t WMPLib::IWMPCustomSlider::Getimage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_image(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1103)\ninline void WMPLib::IWMPCustomSlider::Putimage ( _bstr_t pVal ) {\n    HRESULT _hr = put_image(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1104)\ninline _bstr_t WMPLib::IWMPCustomSlider::GethoverImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_hoverImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1105)\ninline void WMPLib::IWMPCustomSlider::PuthoverImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_hoverImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1106)\ninline _bstr_t WMPLib::IWMPCustomSlider::GetdisabledImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_disabledImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1107)\ninline void WMPLib::IWMPCustomSlider::PutdisabledImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_disabledImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1108)\ninline _bstr_t WMPLib::IWMPCustomSlider::GetdownImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_downImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1109)\ninline void WMPLib::IWMPCustomSlider::PutdownImage ( _bstr_t pVal ) {\n    HRESULT _hr = put_downImage(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1110)\ninline _bstr_t WMPLib::IWMPCustomSlider::GettransparencyColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_transparencyColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1111)\ninline void WMPLib::IWMPCustomSlider::PuttransparencyColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_transparencyColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPTextCtrl wrapper method implementations\n//\n\n#pragma implementation_key(1112)\ninline _bstr_t WMPLib::IWMPTextCtrl::GetbackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1113)\ninline void WMPLib::IWMPTextCtrl::PutbackgroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1114)\ninline _bstr_t WMPLib::IWMPTextCtrl::GetfontFace ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_fontFace(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1115)\ninline void WMPLib::IWMPTextCtrl::PutfontFace ( _bstr_t pVal ) {\n    HRESULT _hr = put_fontFace(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1116)\ninline _bstr_t WMPLib::IWMPTextCtrl::GetfontStyle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_fontStyle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1117)\ninline void WMPLib::IWMPTextCtrl::PutfontStyle ( _bstr_t pVal ) {\n    HRESULT _hr = put_fontStyle(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1118)\ninline long WMPLib::IWMPTextCtrl::GetfontSize ( ) {\n    long _result = 0;\n    HRESULT _hr = get_fontSize(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1119)\ninline void WMPLib::IWMPTextCtrl::PutfontSize ( long pVal ) {\n    HRESULT _hr = put_fontSize(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1120)\ninline _bstr_t WMPLib::IWMPTextCtrl::GetforegroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_foregroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1121)\ninline void WMPLib::IWMPTextCtrl::PutforegroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_foregroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1122)\ninline _bstr_t WMPLib::IWMPTextCtrl::GethoverBackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_hoverBackgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1123)\ninline void WMPLib::IWMPTextCtrl::PuthoverBackgroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_hoverBackgroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1124)\ninline _bstr_t WMPLib::IWMPTextCtrl::GethoverForegroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_hoverForegroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1125)\ninline void WMPLib::IWMPTextCtrl::PuthoverForegroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_hoverForegroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1126)\ninline _bstr_t WMPLib::IWMPTextCtrl::GethoverFontStyle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_hoverFontStyle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1127)\ninline void WMPLib::IWMPTextCtrl::PuthoverFontStyle ( _bstr_t pVal ) {\n    HRESULT _hr = put_hoverFontStyle(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1128)\ninline _bstr_t WMPLib::IWMPTextCtrl::Getvalue ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_value(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1129)\ninline void WMPLib::IWMPTextCtrl::Putvalue ( _bstr_t pVal ) {\n    HRESULT _hr = put_value(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1130)\ninline _bstr_t WMPLib::IWMPTextCtrl::GettoolTip ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_toolTip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1131)\ninline void WMPLib::IWMPTextCtrl::PuttoolTip ( _bstr_t pVal ) {\n    HRESULT _hr = put_toolTip(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1132)\ninline _bstr_t WMPLib::IWMPTextCtrl::GetdisabledFontStyle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_disabledFontStyle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1133)\ninline void WMPLib::IWMPTextCtrl::PutdisabledFontStyle ( _bstr_t pVal ) {\n    HRESULT _hr = put_disabledFontStyle(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1134)\ninline _bstr_t WMPLib::IWMPTextCtrl::GetdisabledForegroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_disabledForegroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1135)\ninline void WMPLib::IWMPTextCtrl::PutdisabledForegroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_disabledForegroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1136)\ninline _bstr_t WMPLib::IWMPTextCtrl::GetdisabledBackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_disabledBackgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1137)\ninline void WMPLib::IWMPTextCtrl::PutdisabledBackgroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_disabledBackgroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1138)\ninline VARIANT_BOOL WMPLib::IWMPTextCtrl::GetfontSmoothing ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_fontSmoothing(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1139)\ninline void WMPLib::IWMPTextCtrl::PutfontSmoothing ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_fontSmoothing(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1140)\ninline _bstr_t WMPLib::IWMPTextCtrl::Getjustification ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_justification(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1141)\ninline void WMPLib::IWMPTextCtrl::Putjustification ( _bstr_t pVal ) {\n    HRESULT _hr = put_justification(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1142)\ninline VARIANT_BOOL WMPLib::IWMPTextCtrl::GetwordWrap ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_wordWrap(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1143)\ninline void WMPLib::IWMPTextCtrl::PutwordWrap ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_wordWrap(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1144)\ninline _bstr_t WMPLib::IWMPTextCtrl::Getcursor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_cursor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1145)\ninline void WMPLib::IWMPTextCtrl::Putcursor ( _bstr_t pVal ) {\n    HRESULT _hr = put_cursor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1146)\ninline VARIANT_BOOL WMPLib::IWMPTextCtrl::Getscrolling ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_scrolling(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1147)\ninline void WMPLib::IWMPTextCtrl::Putscrolling ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_scrolling(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1148)\ninline _bstr_t WMPLib::IWMPTextCtrl::GetscrollingDirection ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_scrollingDirection(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1149)\ninline void WMPLib::IWMPTextCtrl::PutscrollingDirection ( _bstr_t pVal ) {\n    HRESULT _hr = put_scrollingDirection(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1150)\ninline int WMPLib::IWMPTextCtrl::GetscrollingDelay ( ) {\n    int _result = 0;\n    HRESULT _hr = get_scrollingDelay(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1151)\ninline void WMPLib::IWMPTextCtrl::PutscrollingDelay ( int pVal ) {\n    HRESULT _hr = put_scrollingDelay(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1152)\ninline int WMPLib::IWMPTextCtrl::GetscrollingAmount ( ) {\n    int _result = 0;\n    HRESULT _hr = get_scrollingAmount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1153)\ninline void WMPLib::IWMPTextCtrl::PutscrollingAmount ( int pVal ) {\n    HRESULT _hr = put_scrollingAmount(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1154)\ninline int WMPLib::IWMPTextCtrl::GettextWidth ( ) {\n    int _result = 0;\n    HRESULT _hr = get_textWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1155)\ninline VARIANT_BOOL WMPLib::IWMPTextCtrl::GetonGlass ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_onGlass(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1156)\ninline void WMPLib::IWMPTextCtrl::PutonGlass ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_onGlass(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1157)\ninline VARIANT_BOOL WMPLib::IWMPTextCtrl::GetdisableGlassBlurBackground ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_disableGlassBlurBackground(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1158)\ninline void WMPLib::IWMPTextCtrl::PutdisableGlassBlurBackground ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_disableGlassBlurBackground(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface ITaskCntrCtrl wrapper method implementations\n//\n\n#pragma implementation_key(1159)\ninline IUnknownPtr WMPLib::ITaskCntrCtrl::GetCurrentContainer ( ) {\n    IUnknown * _result = 0;\n    HRESULT _hr = get_CurrentContainer(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IUnknownPtr(_result, false);\n}\n\n#pragma implementation_key(1160)\ninline void WMPLib::ITaskCntrCtrl::PutCurrentContainer ( IUnknown * ppUnk ) {\n    HRESULT _hr = put_CurrentContainer(ppUnk);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1161)\ninline HRESULT WMPLib::ITaskCntrCtrl::Activate ( ) {\n    HRESULT _hr = raw_Activate();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// dispinterface _WMPCoreEvents wrapper method implementations\n//\n\n#pragma implementation_key(1162)\ninline HRESULT WMPLib::_WMPCoreEvents::OpenStateChange ( long NewState ) {\n    return _com_dispatch_method(this, 0x1389, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", NewState);\n}\n\n#pragma implementation_key(1163)\ninline HRESULT WMPLib::_WMPCoreEvents::PlayStateChange ( long NewState ) {\n    return _com_dispatch_method(this, 0x13ed, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", NewState);\n}\n\n#pragma implementation_key(1164)\ninline HRESULT WMPLib::_WMPCoreEvents::AudioLanguageChange ( long LangID ) {\n    return _com_dispatch_method(this, 0x13ee, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", LangID);\n}\n\n#pragma implementation_key(1165)\ninline HRESULT WMPLib::_WMPCoreEvents::StatusChange ( ) {\n    return _com_dispatch_method(this, 0x138a, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(1166)\ninline HRESULT WMPLib::_WMPCoreEvents::ScriptCommand ( _bstr_t scType, _bstr_t Param ) {\n    return _com_dispatch_method(this, 0x14b5, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x0008\", (BSTR)scType, (BSTR)Param);\n}\n\n#pragma implementation_key(1167)\ninline HRESULT WMPLib::_WMPCoreEvents::NewStream ( ) {\n    return _com_dispatch_method(this, 0x151b, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(1168)\ninline HRESULT WMPLib::_WMPCoreEvents::Disconnect ( long Result ) {\n    return _com_dispatch_method(this, 0x1519, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", Result);\n}\n\n#pragma implementation_key(1169)\ninline HRESULT WMPLib::_WMPCoreEvents::Buffering ( VARIANT_BOOL Start ) {\n    return _com_dispatch_method(this, 0x151a, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x000b\", Start);\n}\n\n#pragma implementation_key(1170)\ninline HRESULT WMPLib::_WMPCoreEvents::Error ( ) {\n    return _com_dispatch_method(this, 0x157d, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(1171)\ninline HRESULT WMPLib::_WMPCoreEvents::Warning ( long WarningType, long Param, _bstr_t Description ) {\n    return _com_dispatch_method(this, 0x15e1, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\\x0003\\x0008\", WarningType, Param, (BSTR)Description);\n}\n\n#pragma implementation_key(1172)\ninline HRESULT WMPLib::_WMPCoreEvents::EndOfStream ( long Result ) {\n    return _com_dispatch_method(this, 0x1451, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", Result);\n}\n\n#pragma implementation_key(1173)\ninline HRESULT WMPLib::_WMPCoreEvents::PositionChange ( double oldPosition, double newPosition ) {\n    return _com_dispatch_method(this, 0x1452, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0005\\x0005\", oldPosition, newPosition);\n}\n\n#pragma implementation_key(1174)\ninline HRESULT WMPLib::_WMPCoreEvents::MarkerHit ( long MarkerNum ) {\n    return _com_dispatch_method(this, 0x1453, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", MarkerNum);\n}\n\n#pragma implementation_key(1175)\ninline HRESULT WMPLib::_WMPCoreEvents::DurationUnitChange ( long NewDurationUnit ) {\n    return _com_dispatch_method(this, 0x1454, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", NewDurationUnit);\n}\n\n#pragma implementation_key(1176)\ninline HRESULT WMPLib::_WMPCoreEvents::CdromMediaChange ( long CdromNum ) {\n    return _com_dispatch_method(this, 0x1645, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", CdromNum);\n}\n\n#pragma implementation_key(1177)\ninline HRESULT WMPLib::_WMPCoreEvents::PlaylistChange ( IDispatch * Playlist, enum WMPPlaylistChangeEventType change ) {\n    return _com_dispatch_method(this, 0x16a9, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\\x0003\", Playlist, change);\n}\n\n#pragma implementation_key(1178)\ninline HRESULT WMPLib::_WMPCoreEvents::CurrentPlaylistChange ( enum WMPPlaylistChangeEventType change ) {\n    return _com_dispatch_method(this, 0x16ac, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0003\", change);\n}\n\n#pragma implementation_key(1179)\ninline HRESULT WMPLib::_WMPCoreEvents::CurrentPlaylistItemAvailable ( _bstr_t bstrItemName ) {\n    return _com_dispatch_method(this, 0x16ad, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\", (BSTR)bstrItemName);\n}\n\n#pragma implementation_key(1180)\ninline HRESULT WMPLib::_WMPCoreEvents::MediaChange ( IDispatch * Item ) {\n    return _com_dispatch_method(this, 0x16aa, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", Item);\n}\n\n#pragma implementation_key(1181)\ninline HRESULT WMPLib::_WMPCoreEvents::CurrentMediaItemAvailable ( _bstr_t bstrItemName ) {\n    return _com_dispatch_method(this, 0x16ab, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\", (BSTR)bstrItemName);\n}\n\n#pragma implementation_key(1182)\ninline HRESULT WMPLib::_WMPCoreEvents::CurrentItemChange ( IDispatch * pdispMedia ) {\n    return _com_dispatch_method(this, 0x16ae, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", pdispMedia);\n}\n\n#pragma implementation_key(1183)\ninline HRESULT WMPLib::_WMPCoreEvents::MediaCollectionChange ( ) {\n    return _com_dispatch_method(this, 0x16af, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(1184)\ninline HRESULT WMPLib::_WMPCoreEvents::MediaCollectionAttributeStringAdded ( _bstr_t bstrAttribName, _bstr_t bstrAttribVal ) {\n    return _com_dispatch_method(this, 0x16b0, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x0008\", (BSTR)bstrAttribName, (BSTR)bstrAttribVal);\n}\n\n#pragma implementation_key(1185)\ninline HRESULT WMPLib::_WMPCoreEvents::MediaCollectionAttributeStringRemoved ( _bstr_t bstrAttribName, _bstr_t bstrAttribVal ) {\n    return _com_dispatch_method(this, 0x16b1, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x0008\", (BSTR)bstrAttribName, (BSTR)bstrAttribVal);\n}\n\n#pragma implementation_key(1186)\ninline HRESULT WMPLib::_WMPCoreEvents::MediaCollectionAttributeStringChanged ( _bstr_t bstrAttribName, _bstr_t bstrOldAttribVal, _bstr_t bstrNewAttribVal ) {\n    return _com_dispatch_method(this, 0x16bc, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x0008\\x0008\", (BSTR)bstrAttribName, (BSTR)bstrOldAttribVal, (BSTR)bstrNewAttribVal);\n}\n\n#pragma implementation_key(1187)\ninline HRESULT WMPLib::_WMPCoreEvents::PlaylistCollectionChange ( ) {\n    return _com_dispatch_method(this, 0x16b2, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);\n}\n\n#pragma implementation_key(1188)\ninline HRESULT WMPLib::_WMPCoreEvents::PlaylistCollectionPlaylistAdded ( _bstr_t bstrPlaylistName ) {\n    return _com_dispatch_method(this, 0x16b3, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\", (BSTR)bstrPlaylistName);\n}\n\n#pragma implementation_key(1189)\ninline HRESULT WMPLib::_WMPCoreEvents::PlaylistCollectionPlaylistRemoved ( _bstr_t bstrPlaylistName ) {\n    return _com_dispatch_method(this, 0x16b4, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\", (BSTR)bstrPlaylistName);\n}\n\n#pragma implementation_key(1190)\ninline HRESULT WMPLib::_WMPCoreEvents::PlaylistCollectionPlaylistSetAsDeleted ( _bstr_t bstrPlaylistName, VARIANT_BOOL varfIsDeleted ) {\n    return _com_dispatch_method(this, 0x16ba, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x000b\", (BSTR)bstrPlaylistName, varfIsDeleted);\n}\n\n#pragma implementation_key(1191)\ninline HRESULT WMPLib::_WMPCoreEvents::ModeChange ( _bstr_t ModeName, VARIANT_BOOL NewValue ) {\n    return _com_dispatch_method(this, 0x16bb, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\\x000b\", (BSTR)ModeName, NewValue);\n}\n\n#pragma implementation_key(1192)\ninline HRESULT WMPLib::_WMPCoreEvents::MediaError ( IDispatch * pMediaObject ) {\n    return _com_dispatch_method(this, 0x16bd, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", pMediaObject);\n}\n\n#pragma implementation_key(1193)\ninline HRESULT WMPLib::_WMPCoreEvents::OpenPlaylistSwitch ( IDispatch * pItem ) {\n    return _com_dispatch_method(this, 0x16bf, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", pItem);\n}\n\n#pragma implementation_key(1194)\ninline HRESULT WMPLib::_WMPCoreEvents::DomainChange ( _bstr_t strDomain ) {\n    return _com_dispatch_method(this, 0x16be, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0008\", (BSTR)strDomain);\n}\n\n#pragma implementation_key(1195)\ninline HRESULT WMPLib::_WMPCoreEvents::StringCollectionChange ( IDispatch * pdispStringCollection, enum WMPStringCollectionChangeEventType change, long lCollectionIndex ) {\n    return _com_dispatch_method(this, 0x16c0, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\\x0003\\x0003\", pdispStringCollection, change, lCollectionIndex);\n}\n\n#pragma implementation_key(1196)\ninline HRESULT WMPLib::_WMPCoreEvents::MediaCollectionMediaAdded ( IDispatch * pdispMedia ) {\n    return _com_dispatch_method(this, 0x16c1, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", pdispMedia);\n}\n\n#pragma implementation_key(1197)\ninline HRESULT WMPLib::_WMPCoreEvents::MediaCollectionMediaRemoved ( IDispatch * pdispMedia ) {\n    return _com_dispatch_method(this, 0x16c2, DISPATCH_METHOD, VT_EMPTY, NULL, \n        L\"\\x0009\", pdispMedia);\n}\n\n//\n// interface IWMPGraphEventHandler wrapper method implementations\n//\n\n#pragma implementation_key(1198)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyGraphStateChange ( ULONG_PTR punkGraph, long lGraphState ) {\n    HRESULT _hr = raw_NotifyGraphStateChange(punkGraph, lGraphState);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1199)\ninline HRESULT WMPLib::IWMPGraphEventHandler::AsyncNotifyGraphStateChange ( ULONG_PTR punkGraph, long lGraphState ) {\n    HRESULT _hr = raw_AsyncNotifyGraphStateChange(punkGraph, lGraphState);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1200)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyRateChange ( ULONG_PTR punkGraph, double dRate ) {\n    HRESULT _hr = raw_NotifyRateChange(punkGraph, dRate);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1201)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyPlaybackEnd ( ULONG_PTR punkGraph, _bstr_t bstrQueuedUrl, ULONG_PTR dwCurrentContext ) {\n    HRESULT _hr = raw_NotifyPlaybackEnd(punkGraph, bstrQueuedUrl, dwCurrentContext);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1202)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyStreamEnd ( ULONG_PTR punkGraph ) {\n    HRESULT _hr = raw_NotifyStreamEnd(punkGraph);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1203)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyScriptCommand ( ULONG_PTR punkGraph, _bstr_t bstrCommand, _bstr_t bstrParam ) {\n    HRESULT _hr = raw_NotifyScriptCommand(punkGraph, bstrCommand, bstrParam);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1204)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyEarlyScriptCommand ( ULONG_PTR punkGraph, _bstr_t bstrCommand, _bstr_t bstrParam, double dTime ) {\n    HRESULT _hr = raw_NotifyEarlyScriptCommand(punkGraph, bstrCommand, bstrParam, dTime);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1205)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyMarkerHit ( ULONG_PTR punkGraph, long lMarker ) {\n    HRESULT _hr = raw_NotifyMarkerHit(punkGraph, lMarker);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1206)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyGraphError ( ULONG_PTR punkGraph, long lErrMajor, long lErrMinor, long lCondition, _bstr_t bstrInfo, IUnknown * punkGraphData ) {\n    HRESULT _hr = raw_NotifyGraphError(punkGraph, lErrMajor, lErrMinor, lCondition, bstrInfo, punkGraphData);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1207)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyAcquireCredentials ( ULONG_PTR punkGraph, _bstr_t bstrRealm, _bstr_t bstrSite, _bstr_t bstrUser, _bstr_t bstrPassword, unsigned long * pdwFlags, VARIANT_BOOL * pfCancel ) {\n    HRESULT _hr = raw_NotifyAcquireCredentials(punkGraph, bstrRealm, bstrSite, bstrUser, bstrPassword, pdwFlags, pfCancel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1208)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyUntrustedLicense ( ULONG_PTR punkGraph, _bstr_t bstrURL, VARIANT_BOOL * pfCancel ) {\n    HRESULT _hr = raw_NotifyUntrustedLicense(punkGraph, bstrURL, pfCancel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1209)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyLicenseDialog ( ULONG_PTR punkGraph, _bstr_t bstrURL, _bstr_t bstrContent, unsigned char * pPostData, unsigned long dwPostDataSize, long lResult ) {\n    HRESULT _hr = raw_NotifyLicenseDialog(punkGraph, bstrURL, bstrContent, pPostData, dwPostDataSize, lResult);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1210)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyNeedsIndividualization ( ULONG_PTR punkGraph, VARIANT_BOOL * pfResult ) {\n    HRESULT _hr = raw_NotifyNeedsIndividualization(punkGraph, pfResult);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1211)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyNewMetadata ( ULONG_PTR punkGraph ) {\n    HRESULT _hr = raw_NotifyNewMetadata(punkGraph);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1212)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyNewMediaCaps ( ULONG_PTR punkGraph ) {\n    HRESULT _hr = raw_NotifyNewMediaCaps(punkGraph);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1213)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyDisconnect ( ULONG_PTR punkGraph, long lResult ) {\n    HRESULT _hr = raw_NotifyDisconnect(punkGraph, lResult);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1214)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifySave ( ULONG_PTR punkGraph, long fStarted, long lResult ) {\n    HRESULT _hr = raw_NotifySave(punkGraph, fStarted, lResult);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1215)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyDelayClose ( ULONG_PTR punkGraph, VARIANT_BOOL fDelay ) {\n    HRESULT _hr = raw_NotifyDelayClose(punkGraph, fDelay);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1216)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyDVD ( ULONG_PTR punkGraph, long lEventCode, long lParam1, long lParam2 ) {\n    HRESULT _hr = raw_NotifyDVD(punkGraph, lEventCode, lParam1, lParam2);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1217)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyRequestAppThreadAction ( ULONG_PTR punkGraph, unsigned long dwAction ) {\n    HRESULT _hr = raw_NotifyRequestAppThreadAction(punkGraph, dwAction);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1218)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyPrerollReady ( ULONG_PTR punkGraph ) {\n    HRESULT _hr = raw_NotifyPrerollReady(punkGraph);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1219)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyNewIcons ( ULONG_PTR punkGraph ) {\n    HRESULT _hr = raw_NotifyNewIcons(punkGraph);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1220)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyStepComplete ( ULONG_PTR punkGraph ) {\n    HRESULT _hr = raw_NotifyStepComplete(punkGraph);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1221)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyNewBitrate ( ULONG_PTR punkGraph, unsigned long dwBitrate ) {\n    HRESULT _hr = raw_NotifyNewBitrate(punkGraph, dwBitrate);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1222)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyGraphCreationPreRender ( ULONG_PTR punkGraph, ULONG_PTR punkFilterGraph, ULONG_PTR punkCardeaEncConfig, ULONG_PTR phrContinue, ULONG_PTR hEventToSet ) {\n    HRESULT _hr = raw_NotifyGraphCreationPreRender(punkGraph, punkFilterGraph, punkCardeaEncConfig, phrContinue, hEventToSet);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1223)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyGraphCreationPostRender ( ULONG_PTR punkGraph, ULONG_PTR punkFilterGraph, ULONG_PTR phrContinue, ULONG_PTR hEventToSet ) {\n    HRESULT _hr = raw_NotifyGraphCreationPostRender(punkGraph, punkFilterGraph, phrContinue, hEventToSet);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1224)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyGraphUserEvent ( ULONG_PTR punkGraph, long EventCode ) {\n    HRESULT _hr = raw_NotifyGraphUserEvent(punkGraph, EventCode);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1225)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyRevocation ( ULONG_PTR punkGraph, VARIANT_BOOL * pfResult ) {\n    HRESULT _hr = raw_NotifyRevocation(punkGraph, pfResult);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1226)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyNeedsWMGraphIndividualization ( ULONG_PTR punkGraph, ULONG_PTR phWnd, ULONG_PTR hIndivEvent, VARIANT_BOOL * pfCancel, VARIANT_BOOL * pfResult ) {\n    HRESULT _hr = raw_NotifyNeedsWMGraphIndividualization(punkGraph, phWnd, hIndivEvent, pfCancel, pfResult);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1227)\ninline HRESULT WMPLib::IWMPGraphEventHandler::NotifyNeedsFullscreen ( ULONG_PTR punkGraph ) {\n    HRESULT _hr = raw_NotifyNeedsFullscreen(punkGraph);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IBattery wrapper method implementations\n//\n\n#pragma implementation_key(1228)\ninline long WMPLib::IBattery::GetpresetCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_presetCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1229)\ninline IDispatchPtr WMPLib::IBattery::Getpreset ( long nIndex ) {\n    IDispatch * _result = 0;\n    HRESULT _hr = get_preset(nIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IDispatchPtr(_result, false);\n}\n\n//\n// interface IBatteryPreset wrapper method implementations\n//\n\n#pragma implementation_key(1230)\ninline _bstr_t WMPLib::IBatteryPreset::Gettitle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_title(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1231)\ninline void WMPLib::IBatteryPreset::Puttitle ( _bstr_t pVal ) {\n    HRESULT _hr = put_title(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IBarsEffect wrapper method implementations\n//\n\n#pragma implementation_key(1232)\ninline long WMPLib::IBarsEffect::GetdisplayMode ( ) {\n    long _result = 0;\n    HRESULT _hr = get_displayMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1233)\ninline void WMPLib::IBarsEffect::PutdisplayMode ( long pVal ) {\n    HRESULT _hr = put_displayMode(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1234)\ninline VARIANT_BOOL WMPLib::IBarsEffect::GetshowPeaks ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_showPeaks(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1235)\ninline void WMPLib::IBarsEffect::PutshowPeaks ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_showPeaks(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1236)\ninline long WMPLib::IBarsEffect::GetpeakHangTime ( ) {\n    long _result = 0;\n    HRESULT _hr = get_peakHangTime(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1237)\ninline void WMPLib::IBarsEffect::PutpeakHangTime ( long pVal ) {\n    HRESULT _hr = put_peakHangTime(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1238)\ninline float WMPLib::IBarsEffect::GetpeakFallbackAcceleration ( ) {\n    float _result = 0;\n    HRESULT _hr = get_peakFallbackAcceleration(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1239)\ninline void WMPLib::IBarsEffect::PutpeakFallbackAcceleration ( float pVal ) {\n    HRESULT _hr = put_peakFallbackAcceleration(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1240)\ninline float WMPLib::IBarsEffect::GetpeakFallbackSpeed ( ) {\n    float _result = 0;\n    HRESULT _hr = get_peakFallbackSpeed(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1241)\ninline void WMPLib::IBarsEffect::PutpeakFallbackSpeed ( float pVal ) {\n    HRESULT _hr = put_peakFallbackSpeed(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1242)\ninline float WMPLib::IBarsEffect::GetlevelFallbackAcceleration ( ) {\n    float _result = 0;\n    HRESULT _hr = get_levelFallbackAcceleration(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1243)\ninline void WMPLib::IBarsEffect::PutlevelFallbackAcceleration ( float pVal ) {\n    HRESULT _hr = put_levelFallbackAcceleration(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1244)\ninline float WMPLib::IBarsEffect::GetlevelFallbackSpeed ( ) {\n    float _result = 0;\n    HRESULT _hr = get_levelFallbackSpeed(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1245)\ninline void WMPLib::IBarsEffect::PutlevelFallbackSpeed ( float pVal ) {\n    HRESULT _hr = put_levelFallbackSpeed(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1246)\ninline _bstr_t WMPLib::IBarsEffect::GetbackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1247)\ninline void WMPLib::IBarsEffect::PutbackgroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1248)\ninline _bstr_t WMPLib::IBarsEffect::GetlevelColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_levelColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1249)\ninline void WMPLib::IBarsEffect::PutlevelColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_levelColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1250)\ninline _bstr_t WMPLib::IBarsEffect::GetpeakColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_peakColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1251)\ninline void WMPLib::IBarsEffect::PutpeakColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_peakColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1252)\ninline long WMPLib::IBarsEffect::GethorizontalSpacing ( ) {\n    long _result = 0;\n    HRESULT _hr = get_horizontalSpacing(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1253)\ninline void WMPLib::IBarsEffect::PuthorizontalSpacing ( long pVal ) {\n    HRESULT _hr = put_horizontalSpacing(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1254)\ninline long WMPLib::IBarsEffect::GetlevelWidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_levelWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1255)\ninline void WMPLib::IBarsEffect::PutlevelWidth ( long pVal ) {\n    HRESULT _hr = put_levelWidth(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1256)\ninline float WMPLib::IBarsEffect::GetlevelScale ( ) {\n    float _result = 0;\n    HRESULT _hr = get_levelScale(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1257)\ninline void WMPLib::IBarsEffect::PutlevelScale ( float pVal ) {\n    HRESULT _hr = put_levelScale(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1258)\ninline long WMPLib::IBarsEffect::GetfadeRate ( ) {\n    long _result = 0;\n    HRESULT _hr = get_fadeRate(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1259)\ninline void WMPLib::IBarsEffect::PutfadeRate ( long pVal ) {\n    HRESULT _hr = put_fadeRate(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1260)\ninline long WMPLib::IBarsEffect::GetfadeMode ( ) {\n    long _result = 0;\n    HRESULT _hr = get_fadeMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1261)\ninline void WMPLib::IBarsEffect::PutfadeMode ( long pVal ) {\n    HRESULT _hr = put_fadeMode(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1262)\ninline VARIANT_BOOL WMPLib::IBarsEffect::Gettransparent ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_transparent(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1263)\ninline void WMPLib::IBarsEffect::Puttransparent ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_transparent(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPExternal wrapper method implementations\n//\n\n#pragma implementation_key(1264)\ninline _bstr_t WMPLib::IWMPExternal::Getversion ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_version(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1265)\ninline _bstr_t WMPLib::IWMPExternal::GetappColorLight ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorLight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1266)\ninline void WMPLib::IWMPExternal::PutOnColorChange ( IDispatch * _arg1 ) {\n    HRESULT _hr = put_OnColorChange(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPExternalColors wrapper method implementations\n//\n\n#pragma implementation_key(1267)\ninline _bstr_t WMPLib::IWMPExternalColors::GetappColorMedium ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorMedium(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1268)\ninline _bstr_t WMPLib::IWMPExternalColors::GetappColorDark ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorDark(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1269)\ninline _bstr_t WMPLib::IWMPExternalColors::GetappColorButtonHighlight ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorButtonHighlight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1270)\ninline _bstr_t WMPLib::IWMPExternalColors::GetappColorButtonShadow ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorButtonShadow(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1271)\ninline _bstr_t WMPLib::IWMPExternalColors::GetappColorButtonHoverFace ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_appColorButtonHoverFace(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPSubscriptionServiceLimited wrapper method implementations\n//\n\n#pragma implementation_key(1272)\ninline HRESULT WMPLib::IWMPSubscriptionServiceLimited::NavigateTaskPaneURL ( _bstr_t bstrKeyName, _bstr_t bstrTaskPane, _bstr_t bstrParams ) {\n    HRESULT _hr = raw_NavigateTaskPaneURL(bstrKeyName, bstrTaskPane, bstrParams);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1273)\ninline void WMPLib::IWMPSubscriptionServiceLimited::PutSelectedTaskPane ( _bstr_t bstrTaskPane ) {\n    HRESULT _hr = put_SelectedTaskPane(bstrTaskPane);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1274)\ninline _bstr_t WMPLib::IWMPSubscriptionServiceLimited::GetSelectedTaskPane ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_SelectedTaskPane(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPDownloadItem wrapper method implementations\n//\n\n#pragma implementation_key(1275)\ninline _bstr_t WMPLib::IWMPDownloadItem::GetsourceURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_sourceURL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1276)\ninline long WMPLib::IWMPDownloadItem::Getsize ( ) {\n    long _result = 0;\n    HRESULT _hr = get_size(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1277)\ninline _bstr_t WMPLib::IWMPDownloadItem::Gettype ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_type(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1278)\ninline long WMPLib::IWMPDownloadItem::Getprogress ( ) {\n    long _result = 0;\n    HRESULT _hr = get_progress(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1279)\ninline enum WMPLib::WMPSubscriptionDownloadState WMPLib::IWMPDownloadItem::GetdownloadState ( ) {\n    enum WMPSubscriptionDownloadState _result;\n    HRESULT _hr = get_downloadState(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1280)\ninline HRESULT WMPLib::IWMPDownloadItem::pause ( ) {\n    HRESULT _hr = raw_pause();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1281)\ninline HRESULT WMPLib::IWMPDownloadItem::resume ( ) {\n    HRESULT _hr = raw_resume();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1282)\ninline HRESULT WMPLib::IWMPDownloadItem::cancel ( ) {\n    HRESULT _hr = raw_cancel();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPDownloadItem2 wrapper method implementations\n//\n\n#pragma implementation_key(1283)\ninline _bstr_t WMPLib::IWMPDownloadItem2::getItemInfo ( _bstr_t bstrItemName ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getItemInfo(bstrItemName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPDownloadCollection wrapper method implementations\n//\n\n#pragma implementation_key(1284)\ninline long WMPLib::IWMPDownloadCollection::GetID ( ) {\n    long _result = 0;\n    HRESULT _hr = get_ID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1285)\ninline long WMPLib::IWMPDownloadCollection::Getcount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_count(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1286)\ninline WMPLib::IWMPDownloadItem2Ptr WMPLib::IWMPDownloadCollection::Item ( long lItem ) {\n    struct IWMPDownloadItem2 * _result = 0;\n    HRESULT _hr = raw_Item(lItem, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPDownloadItem2Ptr(_result, false);\n}\n\n#pragma implementation_key(1287)\ninline WMPLib::IWMPDownloadItem2Ptr WMPLib::IWMPDownloadCollection::startDownload ( _bstr_t bstrSourceURL, _bstr_t bstrType ) {\n    struct IWMPDownloadItem2 * _result = 0;\n    HRESULT _hr = raw_startDownload(bstrSourceURL, bstrType, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPDownloadItem2Ptr(_result, false);\n}\n\n#pragma implementation_key(1288)\ninline HRESULT WMPLib::IWMPDownloadCollection::removeItem ( long lItem ) {\n    HRESULT _hr = raw_removeItem(lItem);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1289)\ninline HRESULT WMPLib::IWMPDownloadCollection::clear ( ) {\n    HRESULT _hr = raw_clear();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPDownloadManager wrapper method implementations\n//\n\n#pragma implementation_key(1290)\ninline WMPLib::IWMPDownloadCollectionPtr WMPLib::IWMPDownloadManager::getDownloadCollection ( long lCollectionId ) {\n    struct IWMPDownloadCollection * _result = 0;\n    HRESULT _hr = raw_getDownloadCollection(lCollectionId, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPDownloadCollectionPtr(_result, false);\n}\n\n#pragma implementation_key(1291)\ninline WMPLib::IWMPDownloadCollectionPtr WMPLib::IWMPDownloadManager::createDownloadCollection ( ) {\n    struct IWMPDownloadCollection * _result = 0;\n    HRESULT _hr = raw_createDownloadCollection(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPDownloadCollectionPtr(_result, false);\n}\n\n//\n// interface IWMPSubscriptionServiceExternal wrapper method implementations\n//\n\n#pragma implementation_key(1292)\ninline WMPLib::IWMPDownloadManagerPtr WMPLib::IWMPSubscriptionServiceExternal::GetDownloadManager ( ) {\n    struct IWMPDownloadManager * _result = 0;\n    HRESULT _hr = get_DownloadManager(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPDownloadManagerPtr(_result, false);\n}\n\n//\n// interface IWMPSubscriptionServicePlayMedia wrapper method implementations\n//\n\n#pragma implementation_key(1293)\ninline HRESULT WMPLib::IWMPSubscriptionServicePlayMedia::playMedia ( _bstr_t bstrURL ) {\n    HRESULT _hr = raw_playMedia(bstrURL);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPDiscoExternal wrapper method implementations\n//\n\n#pragma implementation_key(1294)\ninline void WMPLib::IWMPDiscoExternal::PutOnLoginChange ( IDispatch * _arg1 ) {\n    HRESULT _hr = put_OnLoginChange(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1295)\ninline VARIANT_BOOL WMPLib::IWMPDiscoExternal::GetuserLoggedIn ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_userLoggedIn(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1296)\ninline HRESULT WMPLib::IWMPDiscoExternal::attemptLogin ( ) {\n    HRESULT _hr = raw_attemptLogin();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1297)\ninline _bstr_t WMPLib::IWMPDiscoExternal::GetaccountType ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_accountType(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1298)\ninline void WMPLib::IWMPDiscoExternal::PutOnViewChange ( IDispatch * _arg1 ) {\n    HRESULT _hr = put_OnViewChange(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1299)\ninline HRESULT WMPLib::IWMPDiscoExternal::changeView ( _bstr_t bstrLibraryLocationType, _bstr_t bstrLibraryLocationID, _bstr_t bstrFilter, _bstr_t bstrViewParams ) {\n    HRESULT _hr = raw_changeView(bstrLibraryLocationType, bstrLibraryLocationID, bstrFilter, bstrViewParams);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1300)\ninline HRESULT WMPLib::IWMPDiscoExternal::changeViewOnlineList ( _bstr_t bstrLibraryLocationType, _bstr_t bstrLibraryLocationID, _bstr_t bstrParams, _bstr_t bstrFriendlyName, _bstr_t bstrListType, _bstr_t bstrViewMode ) {\n    HRESULT _hr = raw_changeViewOnlineList(bstrLibraryLocationType, bstrLibraryLocationID, bstrParams, bstrFriendlyName, bstrListType, bstrViewMode);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1301)\ninline _bstr_t WMPLib::IWMPDiscoExternal::GetlibraryLocationType ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_libraryLocationType(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1302)\ninline _bstr_t WMPLib::IWMPDiscoExternal::GetlibraryLocationID ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_libraryLocationID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1303)\ninline _bstr_t WMPLib::IWMPDiscoExternal::GetselectedItemType ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_selectedItemType(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1304)\ninline _bstr_t WMPLib::IWMPDiscoExternal::GetselectedItemID ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_selectedItemID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1305)\ninline _bstr_t WMPLib::IWMPDiscoExternal::Getfilter ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_filter(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1306)\ninline _bstr_t WMPLib::IWMPDiscoExternal::Gettask ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_task(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1307)\ninline _bstr_t WMPLib::IWMPDiscoExternal::GetviewParameters ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_viewParameters(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1308)\ninline HRESULT WMPLib::IWMPDiscoExternal::cancelNavigate ( ) {\n    HRESULT _hr = raw_cancelNavigate();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1309)\ninline HRESULT WMPLib::IWMPDiscoExternal::showPopup ( long lPopupIndex, _bstr_t bstrParameters ) {\n    HRESULT _hr = raw_showPopup(lPopupIndex, bstrParameters);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1310)\ninline HRESULT WMPLib::IWMPDiscoExternal::addToBasket ( _bstr_t bstrViewType, _bstr_t bstrViewIDs ) {\n    HRESULT _hr = raw_addToBasket(bstrViewType, bstrViewIDs);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1311)\ninline _bstr_t WMPLib::IWMPDiscoExternal::GetbasketTitle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_basketTitle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1312)\ninline HRESULT WMPLib::IWMPDiscoExternal::play ( _bstr_t bstrLibraryLocationType, _bstr_t bstrLibraryLocationIDs ) {\n    HRESULT _hr = raw_play(bstrLibraryLocationType, bstrLibraryLocationIDs);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1313)\ninline HRESULT WMPLib::IWMPDiscoExternal::download ( _bstr_t bstrViewType, _bstr_t bstrViewIDs ) {\n    HRESULT _hr = raw_download(bstrViewType, bstrViewIDs);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1314)\ninline HRESULT WMPLib::IWMPDiscoExternal::buy ( _bstr_t bstrViewType, _bstr_t bstrViewIDs ) {\n    HRESULT _hr = raw_buy(bstrViewType, bstrViewIDs);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1315)\ninline HRESULT WMPLib::IWMPDiscoExternal::saveCurrentViewToLibrary ( _bstr_t bstrFriendlyListType, VARIANT_BOOL fDynamic ) {\n    HRESULT _hr = raw_saveCurrentViewToLibrary(bstrFriendlyListType, fDynamic);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1316)\ninline HRESULT WMPLib::IWMPDiscoExternal::authenticate ( long lAuthenticationIndex ) {\n    HRESULT _hr = raw_authenticate(lAuthenticationIndex);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1317)\ninline HRESULT WMPLib::IWMPDiscoExternal::sendMessage ( _bstr_t bstrMsg, _bstr_t bstrParam ) {\n    HRESULT _hr = raw_sendMessage(bstrMsg, bstrParam);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1318)\ninline void WMPLib::IWMPDiscoExternal::PutOnSendMessageComplete ( IDispatch * _arg1 ) {\n    HRESULT _hr = put_OnSendMessageComplete(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1319)\ninline void WMPLib::IWMPDiscoExternal::PutignoreIEHistory ( VARIANT_BOOL _arg1 ) {\n    HRESULT _hr = put_ignoreIEHistory(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1320)\ninline VARIANT_BOOL WMPLib::IWMPDiscoExternal::GetpluginRunning ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_pluginRunning(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1321)\ninline VARIANT_BOOL WMPLib::IWMPDiscoExternal::GettemplateBeingDisplayedInLocalLibrary ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_templateBeingDisplayedInLocalLibrary(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1322)\ninline void WMPLib::IWMPDiscoExternal::PutOnChangeViewError ( IDispatch * _arg1 ) {\n    HRESULT _hr = put_OnChangeViewError(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1323)\ninline void WMPLib::IWMPDiscoExternal::PutOnChangeViewOnlineListError ( IDispatch * _arg1 ) {\n    HRESULT _hr = put_OnChangeViewOnlineListError(_arg1);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPCDDVDWizardExternal wrapper method implementations\n//\n\n#pragma implementation_key(1324)\ninline HRESULT WMPLib::IWMPCDDVDWizardExternal::WriteNames ( _bstr_t bstrTOC, _bstr_t bstrMetadata ) {\n    HRESULT _hr = raw_WriteNames(bstrTOC, bstrMetadata);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1325)\ninline HRESULT WMPLib::IWMPCDDVDWizardExternal::ReturnToMainTask ( ) {\n    HRESULT _hr = raw_ReturnToMainTask();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1326)\ninline HRESULT WMPLib::IWMPCDDVDWizardExternal::WriteNamesEx ( enum WMP_WRITENAMESEX_TYPE type, _bstr_t bstrTypeId, _bstr_t bstrMetadata, VARIANT_BOOL fRenameRegroupFiles ) {\n    HRESULT _hr = raw_WriteNamesEx(type, bstrTypeId, bstrMetadata, fRenameRegroupFiles);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1327)\ninline _bstr_t WMPLib::IWMPCDDVDWizardExternal::GetMDQByRequestID ( _bstr_t bstrRequestID ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_GetMDQByRequestID(bstrRequestID, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1328)\ninline HRESULT WMPLib::IWMPCDDVDWizardExternal::EditMetadata ( ) {\n    HRESULT _hr = raw_EditMetadata();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1329)\ninline VARIANT_BOOL WMPLib::IWMPCDDVDWizardExternal::IsMetadataAvailableForEdit ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_IsMetadataAvailableForEdit(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1330)\ninline HRESULT WMPLib::IWMPCDDVDWizardExternal::BuyCD ( _bstr_t bstrTitle, _bstr_t bstrArtist, _bstr_t bstrAlbum, _bstr_t bstrUFID, _bstr_t bstrWMID ) {\n    HRESULT _hr = raw_BuyCD(bstrTitle, bstrArtist, bstrAlbum, bstrUFID, bstrWMID);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPOfflineExternal wrapper method implementations\n//\n\n#pragma implementation_key(1331)\ninline HRESULT WMPLib::IWMPOfflineExternal::forceOnline ( ) {\n    HRESULT _hr = raw_forceOnline();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPDMRAVTransportService wrapper method implementations\n//\n\n#pragma implementation_key(1332)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetTransportState ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_TransportState(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1333)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetTransportStatus ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_TransportStatus(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1334)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetPlaybackStorageMedium ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_PlaybackStorageMedium(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1335)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetRecordStorageMedium ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_RecordStorageMedium(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1336)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetPossiblePlaybackStorageMedia ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_PossiblePlaybackStorageMedia(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1337)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetPossibleRecordStorageMedia ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_PossibleRecordStorageMedia(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1338)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetCurrentPlayMode ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_CurrentPlayMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1339)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetTransportPlaySpeed ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_TransportPlaySpeed(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1340)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetRecordMediumWriteStatus ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_RecordMediumWriteStatus(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1341)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetCurrentRecordQualityMode ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_CurrentRecordQualityMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1342)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetPossibleRecordQualityModes ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_PossibleRecordQualityModes(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1343)\ninline unsigned long WMPLib::IWMPDMRAVTransportService::GetNumberOfTracks ( ) {\n    unsigned long _result = 0;\n    HRESULT _hr = get_NumberOfTracks(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1344)\ninline unsigned long WMPLib::IWMPDMRAVTransportService::GetCurrentTrack ( ) {\n    unsigned long _result = 0;\n    HRESULT _hr = get_CurrentTrack(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1345)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetCurrentTrackDuration ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_CurrentTrackDuration(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1346)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetCurrentMediaDuration ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_CurrentMediaDuration(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1347)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetCurrentTrackMetaData ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_CurrentTrackMetaData(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1348)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetCurrentTrackURI ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_CurrentTrackURI(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1349)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetAVTransportURI ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_AVTransportURI(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1350)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetAVTransportURIMetaData ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_AVTransportURIMetaData(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1351)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetNextAVTransportURI ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_NextAVTransportURI(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1352)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetNextAVTransportURIMetaData ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_NextAVTransportURIMetaData(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1353)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetRelativeTimePosition ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_RelativeTimePosition(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1354)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetAbsoluteTimePosition ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_AbsoluteTimePosition(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1355)\ninline long WMPLib::IWMPDMRAVTransportService::GetRelativeCounterPosition ( ) {\n    long _result = 0;\n    HRESULT _hr = get_RelativeCounterPosition(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1356)\ninline long WMPLib::IWMPDMRAVTransportService::GetAbsoluteCounterPosition ( ) {\n    long _result = 0;\n    HRESULT _hr = get_AbsoluteCounterPosition(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1357)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetCurrentTransportActions ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_CurrentTransportActions(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1358)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetLastChange ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_LastChange(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1359)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetA_ARG_TYPE_SeekMode ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_SeekMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1360)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetA_ARG_TYPE_SeekTarget ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_SeekTarget(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1361)\ninline unsigned long WMPLib::IWMPDMRAVTransportService::GetA_ARG_TYPE_InstanceID ( ) {\n    unsigned long _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_InstanceID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1362)\ninline _bstr_t WMPLib::IWMPDMRAVTransportService::GetCurrentProtocolInfo ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_CurrentProtocolInfo(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1363)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::SetAVTransportURI ( IUnknown * punkRemoteEndpointInfo, unsigned long ulInstanceID, _bstr_t bstrCurrentURI, _bstr_t bstrCurrentURIMetaData ) {\n    HRESULT _hr = raw_SetAVTransportURI(punkRemoteEndpointInfo, ulInstanceID, bstrCurrentURI, bstrCurrentURIMetaData);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1364)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::GetMediaInfo ( unsigned long ulInstanceID, unsigned long * pulNumTracks, BSTR * pbstrMediaDuration, BSTR * pbstrCurrentURI, BSTR * pbstrCurrentURIMetaData, BSTR * pbstrNextURI, BSTR * pNextURIMetaData, BSTR * pbstrPlayMedium, BSTR * pbstrRecordMedium, BSTR * pbstrWriteStatus ) {\n    HRESULT _hr = raw_GetMediaInfo(ulInstanceID, pulNumTracks, pbstrMediaDuration, pbstrCurrentURI, pbstrCurrentURIMetaData, pbstrNextURI, pNextURIMetaData, pbstrPlayMedium, pbstrRecordMedium, pbstrWriteStatus);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1365)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::GetTransportInfo ( unsigned long ulInstanceID, BSTR * pbstrCurrentTransportState, BSTR * pbstrCurrentTransportStatus, BSTR * pbstrCurrentSpeed ) {\n    HRESULT _hr = raw_GetTransportInfo(ulInstanceID, pbstrCurrentTransportState, pbstrCurrentTransportStatus, pbstrCurrentSpeed);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1366)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::GetPositionInfo ( unsigned long ulInstanceID, unsigned long * pTrack, BSTR * pbstrTrackDuration, BSTR * pbstrTrackMetaData, BSTR * pbstrTrackURI, BSTR * pbstrRelTime, BSTR * pbstrAbsTime, long * plRelCount, long * plAbsCount ) {\n    HRESULT _hr = raw_GetPositionInfo(ulInstanceID, pTrack, pbstrTrackDuration, pbstrTrackMetaData, pbstrTrackURI, pbstrRelTime, pbstrAbsTime, plRelCount, plAbsCount);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1367)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::GetDeviceCapabilities ( unsigned long ulInstanceID, BSTR * pbstrPlayMedia, BSTR * pbstrRecMedia, BSTR * pbstrRecQualityModes ) {\n    HRESULT _hr = raw_GetDeviceCapabilities(ulInstanceID, pbstrPlayMedia, pbstrRecMedia, pbstrRecQualityModes);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1368)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::GetTransportSettings ( unsigned long ulInstanceID, BSTR * pbstrPlayMode, BSTR * pbstrRecQualityMode ) {\n    HRESULT _hr = raw_GetTransportSettings(ulInstanceID, pbstrPlayMode, pbstrRecQualityMode);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1369)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::stop ( unsigned long ulInstanceID ) {\n    HRESULT _hr = raw_stop(ulInstanceID);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1370)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::play ( unsigned long ulInstanceID, _bstr_t bstrSpeed ) {\n    HRESULT _hr = raw_play(ulInstanceID, bstrSpeed);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1371)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::pause ( unsigned long ulInstanceID ) {\n    HRESULT _hr = raw_pause(ulInstanceID);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1372)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::Seek ( unsigned long ulInstanceID, _bstr_t bstrUnit, _bstr_t bstrTarget ) {\n    HRESULT _hr = raw_Seek(ulInstanceID, bstrUnit, bstrTarget);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1373)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::next ( unsigned long ulInstanceID ) {\n    HRESULT _hr = raw_next(ulInstanceID);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1374)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::previous ( unsigned long ulInstanceID ) {\n    HRESULT _hr = raw_previous(ulInstanceID);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1375)\ninline HRESULT WMPLib::IWMPDMRAVTransportService::GetCurrentTransportActions ( unsigned long ulInstanceID, BSTR * pbstrActions ) {\n    HRESULT _hr = raw_GetCurrentTransportActions(ulInstanceID, pbstrActions);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPDMRConnectionManagerService wrapper method implementations\n//\n\n#pragma implementation_key(1376)\ninline _bstr_t WMPLib::IWMPDMRConnectionManagerService::GetSourceProtocolInfo ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_SourceProtocolInfo(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1377)\ninline _bstr_t WMPLib::IWMPDMRConnectionManagerService::GetSinkProtocolInfo ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_SinkProtocolInfo(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1378)\ninline _bstr_t WMPLib::IWMPDMRConnectionManagerService::GetCurrentConnectionIDs ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_CurrentConnectionIDs(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1379)\ninline _bstr_t WMPLib::IWMPDMRConnectionManagerService::GetA_ARG_TYPE_ConnectionStatus ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_ConnectionStatus(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1380)\ninline _bstr_t WMPLib::IWMPDMRConnectionManagerService::GetA_ARG_TYPE_ConnectionManager ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_ConnectionManager(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1381)\ninline _bstr_t WMPLib::IWMPDMRConnectionManagerService::GetA_ARG_TYPE_Direction ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_Direction(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1382)\ninline _bstr_t WMPLib::IWMPDMRConnectionManagerService::GetA_ARG_TYPE_ProtocolInfo ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_ProtocolInfo(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1383)\ninline long WMPLib::IWMPDMRConnectionManagerService::GetA_ARG_TYPE_ConnectionID ( ) {\n    long _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_ConnectionID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1384)\ninline long WMPLib::IWMPDMRConnectionManagerService::GetA_ARG_TYPE_AVTransportID ( ) {\n    long _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_AVTransportID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1385)\ninline long WMPLib::IWMPDMRConnectionManagerService::GetA_ARG_TYPE_RcsID ( ) {\n    long _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_RcsID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1386)\ninline HRESULT WMPLib::IWMPDMRConnectionManagerService::GetProtocolInfo ( BSTR * pbstrSource, BSTR * pbstrSink ) {\n    HRESULT _hr = raw_GetProtocolInfo(pbstrSource, pbstrSink);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1387)\ninline HRESULT WMPLib::IWMPDMRConnectionManagerService::GetCurrentConnectionIDs ( BSTR * pbstrConnectionIDs ) {\n    HRESULT _hr = raw_GetCurrentConnectionIDs(pbstrConnectionIDs);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1388)\ninline HRESULT WMPLib::IWMPDMRConnectionManagerService::GetCurrentConnectionInfo ( long lConnectionID, long * plResID, long * plAVTransportID, BSTR * pbstrProtocolInfo, BSTR * pbstrPeerConnectionManager, long * plPeerConnectionID, BSTR * pbstrDirection, BSTR * pbstrStatus ) {\n    HRESULT _hr = raw_GetCurrentConnectionInfo(lConnectionID, plResID, plAVTransportID, pbstrProtocolInfo, pbstrPeerConnectionManager, plPeerConnectionID, pbstrDirection, pbstrStatus);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPDMRRenderingControlService wrapper method implementations\n//\n\n#pragma implementation_key(1389)\ninline _bstr_t WMPLib::IWMPDMRRenderingControlService::GetLastChange ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_LastChange(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1390)\ninline _bstr_t WMPLib::IWMPDMRRenderingControlService::GetPresetNameList ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_PresetNameList(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1391)\ninline VARIANT_BOOL WMPLib::IWMPDMRRenderingControlService::Getmute ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_mute(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1392)\ninline unsigned short WMPLib::IWMPDMRRenderingControlService::Getvolume ( ) {\n    unsigned short _result = 0;\n    HRESULT _hr = get_volume(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1393)\ninline _bstr_t WMPLib::IWMPDMRRenderingControlService::GetA_ARG_TYPE_Channel ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_Channel(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1394)\ninline unsigned long WMPLib::IWMPDMRRenderingControlService::GetA_ARG_TYPE_InstanceID ( ) {\n    unsigned long _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_InstanceID(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1395)\ninline _bstr_t WMPLib::IWMPDMRRenderingControlService::GetA_ARG_TYPE_PresetName ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_A_ARG_TYPE_PresetName(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1396)\ninline HRESULT WMPLib::IWMPDMRRenderingControlService::ListPresets ( unsigned long ulInstanceID, BSTR * pbstrCurrentPresetList ) {\n    HRESULT _hr = raw_ListPresets(ulInstanceID, pbstrCurrentPresetList);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1397)\ninline HRESULT WMPLib::IWMPDMRRenderingControlService::SelectPreset ( unsigned long ulInstanceID, _bstr_t bstrPresetName ) {\n    HRESULT _hr = raw_SelectPreset(ulInstanceID, bstrPresetName);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1398)\ninline HRESULT WMPLib::IWMPDMRRenderingControlService::GetMute ( unsigned long ulInstanceID, _bstr_t bstrChannel, VARIANT_BOOL * pbCurrentMute ) {\n    HRESULT _hr = raw_GetMute(ulInstanceID, bstrChannel, pbCurrentMute);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1399)\ninline HRESULT WMPLib::IWMPDMRRenderingControlService::SetMute ( unsigned long ulInstanceID, _bstr_t bstrChannel, VARIANT_BOOL bDesiredMute ) {\n    HRESULT _hr = raw_SetMute(ulInstanceID, bstrChannel, bDesiredMute);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1400)\ninline HRESULT WMPLib::IWMPDMRRenderingControlService::GetVolume ( unsigned long ulInstanceID, _bstr_t bstrChannel, unsigned short * puiCurrentVolume ) {\n    HRESULT _hr = raw_GetVolume(ulInstanceID, bstrChannel, puiCurrentVolume);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1401)\ninline HRESULT WMPLib::IWMPDMRRenderingControlService::SetVolume ( unsigned long ulInstanceID, _bstr_t bstrChannel, unsigned short uiDesiredVolume ) {\n    HRESULT _hr = raw_SetVolume(ulInstanceID, bstrChannel, uiDesiredVolume);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPCdromBurn wrapper method implementations\n//\n\n#pragma implementation_key(1402)\ninline VARIANT_BOOL WMPLib::IWMPCdromBurn::isAvailable ( _bstr_t bstrItem ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_isAvailable(bstrItem, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1403)\ninline _bstr_t WMPLib::IWMPCdromBurn::getItemInfo ( _bstr_t bstrItem ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getItemInfo(bstrItem, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1404)\ninline _bstr_t WMPLib::IWMPCdromBurn::Getlabel ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_label(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1405)\ninline void WMPLib::IWMPCdromBurn::Putlabel ( _bstr_t pbstrLabel ) {\n    HRESULT _hr = put_label(pbstrLabel);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1406)\ninline enum WMPLib::WMPBurnFormat WMPLib::IWMPCdromBurn::GetburnFormat ( ) {\n    enum WMPBurnFormat _result;\n    HRESULT _hr = get_burnFormat(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1407)\ninline void WMPLib::IWMPCdromBurn::PutburnFormat ( enum WMPBurnFormat pwmpbf ) {\n    HRESULT _hr = put_burnFormat(pwmpbf);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1408)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPCdromBurn::GetburnPlaylist ( ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = get_burnPlaylist(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1409)\ninline void WMPLib::IWMPCdromBurn::PutburnPlaylist ( struct IWMPPlaylist * ppPlaylist ) {\n    HRESULT _hr = put_burnPlaylist(ppPlaylist);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1410)\ninline HRESULT WMPLib::IWMPCdromBurn::refreshStatus ( ) {\n    HRESULT _hr = raw_refreshStatus();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1411)\ninline enum WMPLib::WMPBurnState WMPLib::IWMPCdromBurn::GetburnState ( ) {\n    enum WMPBurnState _result;\n    HRESULT _hr = get_burnState(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1412)\ninline long WMPLib::IWMPCdromBurn::GetburnProgress ( ) {\n    long _result = 0;\n    HRESULT _hr = get_burnProgress(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1413)\ninline HRESULT WMPLib::IWMPCdromBurn::startBurn ( ) {\n    HRESULT _hr = raw_startBurn();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1414)\ninline HRESULT WMPLib::IWMPCdromBurn::stopBurn ( ) {\n    HRESULT _hr = raw_stopBurn();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1415)\ninline HRESULT WMPLib::IWMPCdromBurn::erase ( ) {\n    HRESULT _hr = raw_erase();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPPlaylist wrapper method implementations\n//\n\n#pragma implementation_key(1416)\ninline long WMPLib::IWMPPlaylist::Getcount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_count(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1417)\ninline _bstr_t WMPLib::IWMPPlaylist::Getname ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_name(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1418)\ninline void WMPLib::IWMPPlaylist::Putname ( _bstr_t pbstrName ) {\n    HRESULT _hr = put_name(pbstrName);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1419)\ninline long WMPLib::IWMPPlaylist::GetattributeCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_attributeCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1420)\ninline _bstr_t WMPLib::IWMPPlaylist::GetattributeName ( long lIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_attributeName(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1421)\ninline WMPLib::IWMPMediaPtr WMPLib::IWMPPlaylist::GetItem ( long lIndex ) {\n    struct IWMPMedia * _result = 0;\n    HRESULT _hr = get_Item(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPMediaPtr(_result, false);\n}\n\n#pragma implementation_key(1422)\ninline _bstr_t WMPLib::IWMPPlaylist::getItemInfo ( _bstr_t bstrName ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getItemInfo(bstrName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1423)\ninline HRESULT WMPLib::IWMPPlaylist::setItemInfo ( _bstr_t bstrName, _bstr_t bstrValue ) {\n    HRESULT _hr = raw_setItemInfo(bstrName, bstrValue);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1424)\ninline VARIANT_BOOL WMPLib::IWMPPlaylist::GetisIdentical ( struct IWMPPlaylist * pIWMPPlaylist ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isIdentical(pIWMPPlaylist, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1425)\ninline HRESULT WMPLib::IWMPPlaylist::clear ( ) {\n    HRESULT _hr = raw_clear();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1426)\ninline HRESULT WMPLib::IWMPPlaylist::insertItem ( long lIndex, struct IWMPMedia * pIWMPMedia ) {\n    HRESULT _hr = raw_insertItem(lIndex, pIWMPMedia);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1427)\ninline HRESULT WMPLib::IWMPPlaylist::appendItem ( struct IWMPMedia * pIWMPMedia ) {\n    HRESULT _hr = raw_appendItem(pIWMPMedia);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1428)\ninline HRESULT WMPLib::IWMPPlaylist::removeItem ( struct IWMPMedia * pIWMPMedia ) {\n    HRESULT _hr = raw_removeItem(pIWMPMedia);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1429)\ninline HRESULT WMPLib::IWMPPlaylist::moveItem ( long lIndexOld, long lIndexNew ) {\n    HRESULT _hr = raw_moveItem(lIndexOld, lIndexNew);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPMedia wrapper method implementations\n//\n\n#pragma implementation_key(1430)\ninline VARIANT_BOOL WMPLib::IWMPMedia::GetisIdentical ( struct IWMPMedia * pIWMPMedia ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isIdentical(pIWMPMedia, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1431)\ninline _bstr_t WMPLib::IWMPMedia::GetsourceURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_sourceURL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1432)\ninline _bstr_t WMPLib::IWMPMedia::Getname ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_name(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1433)\ninline void WMPLib::IWMPMedia::Putname ( _bstr_t pbstrName ) {\n    HRESULT _hr = put_name(pbstrName);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1434)\ninline long WMPLib::IWMPMedia::GetimageSourceWidth ( ) {\n    long _result = 0;\n    HRESULT _hr = get_imageSourceWidth(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1435)\ninline long WMPLib::IWMPMedia::GetimageSourceHeight ( ) {\n    long _result = 0;\n    HRESULT _hr = get_imageSourceHeight(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1436)\ninline long WMPLib::IWMPMedia::GetmarkerCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_markerCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1437)\ninline double WMPLib::IWMPMedia::getMarkerTime ( long MarkerNum ) {\n    double _result = 0;\n    HRESULT _hr = raw_getMarkerTime(MarkerNum, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1438)\ninline _bstr_t WMPLib::IWMPMedia::getMarkerName ( long MarkerNum ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getMarkerName(MarkerNum, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1439)\ninline double WMPLib::IWMPMedia::Getduration ( ) {\n    double _result = 0;\n    HRESULT _hr = get_duration(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1440)\ninline _bstr_t WMPLib::IWMPMedia::GetdurationString ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_durationString(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1441)\ninline long WMPLib::IWMPMedia::GetattributeCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_attributeCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1442)\ninline _bstr_t WMPLib::IWMPMedia::getAttributeName ( long lIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getAttributeName(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1443)\ninline _bstr_t WMPLib::IWMPMedia::getItemInfo ( _bstr_t bstrItemName ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getItemInfo(bstrItemName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1444)\ninline HRESULT WMPLib::IWMPMedia::setItemInfo ( _bstr_t bstrItemName, _bstr_t bstrVal ) {\n    HRESULT _hr = raw_setItemInfo(bstrItemName, bstrVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1445)\ninline _bstr_t WMPLib::IWMPMedia::getItemInfoByAtom ( long lAtom ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getItemInfoByAtom(lAtom, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1446)\ninline VARIANT_BOOL WMPLib::IWMPMedia::isMemberOf ( struct IWMPPlaylist * pPlaylist ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_isMemberOf(pPlaylist, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1447)\ninline VARIANT_BOOL WMPLib::IWMPMedia::isReadOnlyItem ( _bstr_t bstrItemName ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_isReadOnlyItem(bstrItemName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPMediaCollection wrapper method implementations\n//\n\n#pragma implementation_key(1448)\ninline WMPLib::IWMPMediaPtr WMPLib::IWMPMediaCollection::add ( _bstr_t bstrURL ) {\n    struct IWMPMedia * _result = 0;\n    HRESULT _hr = raw_add(bstrURL, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPMediaPtr(_result, false);\n}\n\n#pragma implementation_key(1449)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPMediaCollection::getAll ( ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_getAll(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1450)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPMediaCollection::getByName ( _bstr_t bstrName ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_getByName(bstrName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1451)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPMediaCollection::getByGenre ( _bstr_t bstrGenre ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_getByGenre(bstrGenre, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1452)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPMediaCollection::getByAuthor ( _bstr_t bstrAuthor ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_getByAuthor(bstrAuthor, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1453)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPMediaCollection::getByAlbum ( _bstr_t bstrAlbum ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_getByAlbum(bstrAlbum, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1454)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPMediaCollection::getByAttribute ( _bstr_t bstrAttribute, _bstr_t bstrValue ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_getByAttribute(bstrAttribute, bstrValue, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1455)\ninline HRESULT WMPLib::IWMPMediaCollection::remove ( struct IWMPMedia * pItem, VARIANT_BOOL varfDeleteFile ) {\n    HRESULT _hr = raw_remove(pItem, varfDeleteFile);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1456)\ninline WMPLib::IWMPStringCollectionPtr WMPLib::IWMPMediaCollection::getAttributeStringCollection ( _bstr_t bstrAttribute, _bstr_t bstrMediaType ) {\n    struct IWMPStringCollection * _result = 0;\n    HRESULT _hr = raw_getAttributeStringCollection(bstrAttribute, bstrMediaType, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPStringCollectionPtr(_result, false);\n}\n\n#pragma implementation_key(1457)\ninline long WMPLib::IWMPMediaCollection::getMediaAtom ( _bstr_t bstrItemName ) {\n    long _result = 0;\n    HRESULT _hr = raw_getMediaAtom(bstrItemName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1458)\ninline HRESULT WMPLib::IWMPMediaCollection::setDeleted ( struct IWMPMedia * pItem, VARIANT_BOOL varfIsDeleted ) {\n    HRESULT _hr = raw_setDeleted(pItem, varfIsDeleted);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1459)\ninline VARIANT_BOOL WMPLib::IWMPMediaCollection::isDeleted ( struct IWMPMedia * pItem ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_isDeleted(pItem, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPLibrary wrapper method implementations\n//\n\n#pragma implementation_key(1460)\ninline _bstr_t WMPLib::IWMPLibrary::Getname ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_name(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1461)\ninline enum WMPLib::WMPLibraryType WMPLib::IWMPLibrary::Gettype ( ) {\n    enum WMPLibraryType _result;\n    HRESULT _hr = get_type(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1462)\ninline WMPLib::IWMPMediaCollectionPtr WMPLib::IWMPLibrary::GetmediaCollection ( ) {\n    struct IWMPMediaCollection * _result = 0;\n    HRESULT _hr = get_mediaCollection(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPMediaCollectionPtr(_result, false);\n}\n\n#pragma implementation_key(1463)\ninline VARIANT_BOOL WMPLib::IWMPLibrary::isIdentical ( struct IWMPLibrary * pIWMPLibrary ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_isIdentical(pIWMPLibrary, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n//\n// interface IWMPControls wrapper method implementations\n//\n\n#pragma implementation_key(1464)\ninline VARIANT_BOOL WMPLib::IWMPControls::GetisAvailable ( _bstr_t bstrItem ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isAvailable(bstrItem, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1465)\ninline HRESULT WMPLib::IWMPControls::play ( ) {\n    HRESULT _hr = raw_play();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1466)\ninline HRESULT WMPLib::IWMPControls::stop ( ) {\n    HRESULT _hr = raw_stop();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1467)\ninline HRESULT WMPLib::IWMPControls::pause ( ) {\n    HRESULT _hr = raw_pause();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1468)\ninline HRESULT WMPLib::IWMPControls::fastForward ( ) {\n    HRESULT _hr = raw_fastForward();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1469)\ninline HRESULT WMPLib::IWMPControls::fastReverse ( ) {\n    HRESULT _hr = raw_fastReverse();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1470)\ninline double WMPLib::IWMPControls::GetcurrentPosition ( ) {\n    double _result = 0;\n    HRESULT _hr = get_currentPosition(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1471)\ninline void WMPLib::IWMPControls::PutcurrentPosition ( double pdCurrentPosition ) {\n    HRESULT _hr = put_currentPosition(pdCurrentPosition);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1472)\ninline _bstr_t WMPLib::IWMPControls::GetcurrentPositionString ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_currentPositionString(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1473)\ninline HRESULT WMPLib::IWMPControls::next ( ) {\n    HRESULT _hr = raw_next();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1474)\ninline HRESULT WMPLib::IWMPControls::previous ( ) {\n    HRESULT _hr = raw_previous();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1475)\ninline WMPLib::IWMPMediaPtr WMPLib::IWMPControls::GetcurrentItem ( ) {\n    struct IWMPMedia * _result = 0;\n    HRESULT _hr = get_currentItem(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPMediaPtr(_result, false);\n}\n\n#pragma implementation_key(1476)\ninline void WMPLib::IWMPControls::PutcurrentItem ( struct IWMPMedia * ppIWMPMedia ) {\n    HRESULT _hr = put_currentItem(ppIWMPMedia);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1477)\ninline long WMPLib::IWMPControls::GetcurrentMarker ( ) {\n    long _result = 0;\n    HRESULT _hr = get_currentMarker(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1478)\ninline void WMPLib::IWMPControls::PutcurrentMarker ( long plMarker ) {\n    HRESULT _hr = put_currentMarker(plMarker);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1479)\ninline HRESULT WMPLib::IWMPControls::playItem ( struct IWMPMedia * pIWMPMedia ) {\n    HRESULT _hr = raw_playItem(pIWMPMedia);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPPlaylistArray wrapper method implementations\n//\n\n#pragma implementation_key(1480)\ninline long WMPLib::IWMPPlaylistArray::Getcount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_count(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1481)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPPlaylistArray::Item ( long lIndex ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_Item(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n//\n// interface IWMPPlaylistCollection wrapper method implementations\n//\n\n#pragma implementation_key(1482)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPPlaylistCollection::newPlaylist ( _bstr_t bstrName ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_newPlaylist(bstrName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1483)\ninline WMPLib::IWMPPlaylistArrayPtr WMPLib::IWMPPlaylistCollection::getAll ( ) {\n    struct IWMPPlaylistArray * _result = 0;\n    HRESULT _hr = raw_getAll(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistArrayPtr(_result, false);\n}\n\n#pragma implementation_key(1484)\ninline WMPLib::IWMPPlaylistArrayPtr WMPLib::IWMPPlaylistCollection::getByName ( _bstr_t bstrName ) {\n    struct IWMPPlaylistArray * _result = 0;\n    HRESULT _hr = raw_getByName(bstrName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistArrayPtr(_result, false);\n}\n\n#pragma implementation_key(1485)\ninline HRESULT WMPLib::IWMPPlaylistCollection::remove ( struct IWMPPlaylist * pItem ) {\n    HRESULT _hr = raw_remove(pItem);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1486)\ninline HRESULT WMPLib::IWMPPlaylistCollection::setDeleted ( struct IWMPPlaylist * pItem, VARIANT_BOOL varfIsDeleted ) {\n    HRESULT _hr = raw_setDeleted(pItem, varfIsDeleted);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1487)\ninline VARIANT_BOOL WMPLib::IWMPPlaylistCollection::isDeleted ( struct IWMPPlaylist * pItem ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = raw_isDeleted(pItem, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1488)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPPlaylistCollection::importPlaylist ( struct IWMPPlaylist * pItem ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_importPlaylist(pItem, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n//\n// interface IWMPCdrom wrapper method implementations\n//\n\n#pragma implementation_key(1489)\ninline _bstr_t WMPLib::IWMPCdrom::GetdriveSpecifier ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_driveSpecifier(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1490)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPCdrom::GetPlaylist ( ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = get_Playlist(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1491)\ninline HRESULT WMPLib::IWMPCdrom::eject ( ) {\n    HRESULT _hr = raw_eject();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPCdromCollection wrapper method implementations\n//\n\n#pragma implementation_key(1492)\ninline long WMPLib::IWMPCdromCollection::Getcount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_count(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1493)\ninline WMPLib::IWMPCdromPtr WMPLib::IWMPCdromCollection::Item ( long lIndex ) {\n    struct IWMPCdrom * _result = 0;\n    HRESULT _hr = raw_Item(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPCdromPtr(_result, false);\n}\n\n#pragma implementation_key(1494)\ninline WMPLib::IWMPCdromPtr WMPLib::IWMPCdromCollection::getByDriveSpecifier ( _bstr_t bstrDriveSpecifier ) {\n    struct IWMPCdrom * _result = 0;\n    HRESULT _hr = raw_getByDriveSpecifier(bstrDriveSpecifier, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPCdromPtr(_result, false);\n}\n\n//\n// interface IWMPCore wrapper method implementations\n//\n\n#pragma implementation_key(1495)\ninline HRESULT WMPLib::IWMPCore::close ( ) {\n    HRESULT _hr = raw_close();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1496)\ninline _bstr_t WMPLib::IWMPCore::GetURL ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_URL(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1497)\ninline void WMPLib::IWMPCore::PutURL ( _bstr_t pbstrURL ) {\n    HRESULT _hr = put_URL(pbstrURL);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1498)\ninline enum WMPLib::WMPOpenState WMPLib::IWMPCore::GetopenState ( ) {\n    enum WMPOpenState _result;\n    HRESULT _hr = get_openState(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1499)\ninline enum WMPLib::WMPPlayState WMPLib::IWMPCore::GetplayState ( ) {\n    enum WMPPlayState _result;\n    HRESULT _hr = get_playState(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1500)\ninline WMPLib::IWMPControlsPtr WMPLib::IWMPCore::Getcontrols ( ) {\n    struct IWMPControls * _result = 0;\n    HRESULT _hr = get_controls(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPControlsPtr(_result, false);\n}\n\n#pragma implementation_key(1501)\ninline WMPLib::IWMPSettingsPtr WMPLib::IWMPCore::Getsettings ( ) {\n    struct IWMPSettings * _result = 0;\n    HRESULT _hr = get_settings(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPSettingsPtr(_result, false);\n}\n\n#pragma implementation_key(1502)\ninline WMPLib::IWMPMediaPtr WMPLib::IWMPCore::GetcurrentMedia ( ) {\n    struct IWMPMedia * _result = 0;\n    HRESULT _hr = get_currentMedia(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPMediaPtr(_result, false);\n}\n\n#pragma implementation_key(1503)\ninline void WMPLib::IWMPCore::PutcurrentMedia ( struct IWMPMedia * ppMedia ) {\n    HRESULT _hr = put_currentMedia(ppMedia);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1504)\ninline WMPLib::IWMPMediaCollectionPtr WMPLib::IWMPCore::GetmediaCollection ( ) {\n    struct IWMPMediaCollection * _result = 0;\n    HRESULT _hr = get_mediaCollection(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPMediaCollectionPtr(_result, false);\n}\n\n#pragma implementation_key(1505)\ninline WMPLib::IWMPPlaylistCollectionPtr WMPLib::IWMPCore::GetplaylistCollection ( ) {\n    struct IWMPPlaylistCollection * _result = 0;\n    HRESULT _hr = get_playlistCollection(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistCollectionPtr(_result, false);\n}\n\n#pragma implementation_key(1506)\ninline _bstr_t WMPLib::IWMPCore::GetversionInfo ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_versionInfo(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1507)\ninline HRESULT WMPLib::IWMPCore::launchURL ( _bstr_t bstrURL ) {\n    HRESULT _hr = raw_launchURL(bstrURL);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1508)\ninline WMPLib::IWMPNetworkPtr WMPLib::IWMPCore::Getnetwork ( ) {\n    struct IWMPNetwork * _result = 0;\n    HRESULT _hr = get_network(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPNetworkPtr(_result, false);\n}\n\n#pragma implementation_key(1509)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPCore::GetcurrentPlaylist ( ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = get_currentPlaylist(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1510)\ninline void WMPLib::IWMPCore::PutcurrentPlaylist ( struct IWMPPlaylist * ppPL ) {\n    HRESULT _hr = put_currentPlaylist(ppPL);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1511)\ninline WMPLib::IWMPCdromCollectionPtr WMPLib::IWMPCore::GetcdromCollection ( ) {\n    struct IWMPCdromCollection * _result = 0;\n    HRESULT _hr = get_cdromCollection(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPCdromCollectionPtr(_result, false);\n}\n\n#pragma implementation_key(1512)\ninline WMPLib::IWMPClosedCaptionPtr WMPLib::IWMPCore::GetclosedCaption ( ) {\n    struct IWMPClosedCaption * _result = 0;\n    HRESULT _hr = get_closedCaption(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPClosedCaptionPtr(_result, false);\n}\n\n#pragma implementation_key(1513)\ninline VARIANT_BOOL WMPLib::IWMPCore::GetisOnline ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isOnline(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1514)\ninline WMPLib::IWMPErrorPtr WMPLib::IWMPCore::GetError ( ) {\n    struct IWMPError * _result = 0;\n    HRESULT _hr = get_Error(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPErrorPtr(_result, false);\n}\n\n#pragma implementation_key(1515)\ninline _bstr_t WMPLib::IWMPCore::Getstatus ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_status(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPCore2 wrapper method implementations\n//\n\n#pragma implementation_key(1516)\ninline WMPLib::IWMPDVDPtr WMPLib::IWMPCore2::Getdvd ( ) {\n    struct IWMPDVD * _result = 0;\n    HRESULT _hr = get_dvd(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPDVDPtr(_result, false);\n}\n\n//\n// interface IWMPCore3 wrapper method implementations\n//\n\n#pragma implementation_key(1517)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPCore3::newPlaylist ( _bstr_t bstrName, _bstr_t bstrURL ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_newPlaylist(bstrName, bstrURL, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1518)\ninline WMPLib::IWMPMediaPtr WMPLib::IWMPCore3::newMedia ( _bstr_t bstrURL ) {\n    struct IWMPMedia * _result = 0;\n    HRESULT _hr = raw_newMedia(bstrURL, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPMediaPtr(_result, false);\n}\n\n//\n// interface IWMPPlayer4 wrapper method implementations\n//\n\n#pragma implementation_key(1519)\ninline VARIANT_BOOL WMPLib::IWMPPlayer4::Getenabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1520)\ninline void WMPLib::IWMPPlayer4::Putenabled ( VARIANT_BOOL pbEnabled ) {\n    HRESULT _hr = put_enabled(pbEnabled);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1521)\ninline VARIANT_BOOL WMPLib::IWMPPlayer4::GetfullScreen ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_fullScreen(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1522)\ninline void WMPLib::IWMPPlayer4::PutfullScreen ( VARIANT_BOOL pbFullScreen ) {\n    HRESULT _hr = put_fullScreen(pbFullScreen);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1523)\ninline VARIANT_BOOL WMPLib::IWMPPlayer4::GetenableContextMenu ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enableContextMenu(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1524)\ninline void WMPLib::IWMPPlayer4::PutenableContextMenu ( VARIANT_BOOL pbEnableContextMenu ) {\n    HRESULT _hr = put_enableContextMenu(pbEnableContextMenu);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1525)\ninline void WMPLib::IWMPPlayer4::PutuiMode ( _bstr_t pbstrMode ) {\n    HRESULT _hr = put_uiMode(pbstrMode);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1526)\ninline _bstr_t WMPLib::IWMPPlayer4::GetuiMode ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_uiMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1527)\ninline VARIANT_BOOL WMPLib::IWMPPlayer4::GetstretchToFit ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_stretchToFit(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1528)\ninline void WMPLib::IWMPPlayer4::PutstretchToFit ( VARIANT_BOOL pbEnabled ) {\n    HRESULT _hr = put_stretchToFit(pbEnabled);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1529)\ninline VARIANT_BOOL WMPLib::IWMPPlayer4::GetwindowlessVideo ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_windowlessVideo(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1530)\ninline void WMPLib::IWMPPlayer4::PutwindowlessVideo ( VARIANT_BOOL pbEnabled ) {\n    HRESULT _hr = put_windowlessVideo(pbEnabled);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1531)\ninline VARIANT_BOOL WMPLib::IWMPPlayer4::GetisRemote ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_isRemote(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1532)\ninline WMPLib::IWMPPlayerApplicationPtr WMPLib::IWMPPlayer4::GetplayerApplication ( ) {\n    struct IWMPPlayerApplication * _result = 0;\n    HRESULT _hr = get_playerApplication(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlayerApplicationPtr(_result, false);\n}\n\n#pragma implementation_key(1533)\ninline HRESULT WMPLib::IWMPPlayer4::openPlayer ( _bstr_t bstrURL ) {\n    HRESULT _hr = raw_openPlayer(bstrURL);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPPlayer3 wrapper method implementations\n//\n\n#pragma implementation_key(1534)\ninline VARIANT_BOOL WMPLib::IWMPPlayer3::Getenabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1535)\ninline void WMPLib::IWMPPlayer3::Putenabled ( VARIANT_BOOL pbEnabled ) {\n    HRESULT _hr = put_enabled(pbEnabled);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1536)\ninline VARIANT_BOOL WMPLib::IWMPPlayer3::GetfullScreen ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_fullScreen(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1537)\ninline void WMPLib::IWMPPlayer3::PutfullScreen ( VARIANT_BOOL pbFullScreen ) {\n    HRESULT _hr = put_fullScreen(pbFullScreen);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1538)\ninline VARIANT_BOOL WMPLib::IWMPPlayer3::GetenableContextMenu ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enableContextMenu(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1539)\ninline void WMPLib::IWMPPlayer3::PutenableContextMenu ( VARIANT_BOOL pbEnableContextMenu ) {\n    HRESULT _hr = put_enableContextMenu(pbEnableContextMenu);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1540)\ninline void WMPLib::IWMPPlayer3::PutuiMode ( _bstr_t pbstrMode ) {\n    HRESULT _hr = put_uiMode(pbstrMode);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1541)\ninline _bstr_t WMPLib::IWMPPlayer3::GetuiMode ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_uiMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1542)\ninline VARIANT_BOOL WMPLib::IWMPPlayer3::GetstretchToFit ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_stretchToFit(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1543)\ninline void WMPLib::IWMPPlayer3::PutstretchToFit ( VARIANT_BOOL pbEnabled ) {\n    HRESULT _hr = put_stretchToFit(pbEnabled);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1544)\ninline VARIANT_BOOL WMPLib::IWMPPlayer3::GetwindowlessVideo ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_windowlessVideo(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1545)\ninline void WMPLib::IWMPPlayer3::PutwindowlessVideo ( VARIANT_BOOL pbEnabled ) {\n    HRESULT _hr = put_windowlessVideo(pbEnabled);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPPlayer2 wrapper method implementations\n//\n\n#pragma implementation_key(1546)\ninline VARIANT_BOOL WMPLib::IWMPPlayer2::Getenabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1547)\ninline void WMPLib::IWMPPlayer2::Putenabled ( VARIANT_BOOL pbEnabled ) {\n    HRESULT _hr = put_enabled(pbEnabled);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1548)\ninline VARIANT_BOOL WMPLib::IWMPPlayer2::GetfullScreen ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_fullScreen(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1549)\ninline void WMPLib::IWMPPlayer2::PutfullScreen ( VARIANT_BOOL pbFullScreen ) {\n    HRESULT _hr = put_fullScreen(pbFullScreen);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1550)\ninline VARIANT_BOOL WMPLib::IWMPPlayer2::GetenableContextMenu ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enableContextMenu(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1551)\ninline void WMPLib::IWMPPlayer2::PutenableContextMenu ( VARIANT_BOOL pbEnableContextMenu ) {\n    HRESULT _hr = put_enableContextMenu(pbEnableContextMenu);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1552)\ninline void WMPLib::IWMPPlayer2::PutuiMode ( _bstr_t pbstrMode ) {\n    HRESULT _hr = put_uiMode(pbstrMode);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1553)\ninline _bstr_t WMPLib::IWMPPlayer2::GetuiMode ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_uiMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1554)\ninline VARIANT_BOOL WMPLib::IWMPPlayer2::GetstretchToFit ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_stretchToFit(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1555)\ninline void WMPLib::IWMPPlayer2::PutstretchToFit ( VARIANT_BOOL pbEnabled ) {\n    HRESULT _hr = put_stretchToFit(pbEnabled);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1556)\ninline VARIANT_BOOL WMPLib::IWMPPlayer2::GetwindowlessVideo ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_windowlessVideo(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1557)\ninline void WMPLib::IWMPPlayer2::PutwindowlessVideo ( VARIANT_BOOL pbEnabled ) {\n    HRESULT _hr = put_windowlessVideo(pbEnabled);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPPlayer wrapper method implementations\n//\n\n#pragma implementation_key(1558)\ninline VARIANT_BOOL WMPLib::IWMPPlayer::Getenabled ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enabled(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1559)\ninline void WMPLib::IWMPPlayer::Putenabled ( VARIANT_BOOL pbEnabled ) {\n    HRESULT _hr = put_enabled(pbEnabled);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1560)\ninline VARIANT_BOOL WMPLib::IWMPPlayer::GetfullScreen ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_fullScreen(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1561)\ninline void WMPLib::IWMPPlayer::PutfullScreen ( VARIANT_BOOL pbFullScreen ) {\n    HRESULT _hr = put_fullScreen(pbFullScreen);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1562)\ninline VARIANT_BOOL WMPLib::IWMPPlayer::GetenableContextMenu ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_enableContextMenu(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1563)\ninline void WMPLib::IWMPPlayer::PutenableContextMenu ( VARIANT_BOOL pbEnableContextMenu ) {\n    HRESULT _hr = put_enableContextMenu(pbEnableContextMenu);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1564)\ninline void WMPLib::IWMPPlayer::PutuiMode ( _bstr_t pbstrMode ) {\n    HRESULT _hr = put_uiMode(pbstrMode);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1565)\ninline _bstr_t WMPLib::IWMPPlayer::GetuiMode ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_uiMode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPControls2 wrapper method implementations\n//\n\n#pragma implementation_key(1566)\ninline HRESULT WMPLib::IWMPControls2::step ( long lStep ) {\n    HRESULT _hr = raw_step(lStep);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPMedia2 wrapper method implementations\n//\n\n#pragma implementation_key(1567)\ninline WMPLib::IWMPErrorItemPtr WMPLib::IWMPMedia2::GetError ( ) {\n    struct IWMPErrorItem * _result = 0;\n    HRESULT _hr = get_Error(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPErrorItemPtr(_result, false);\n}\n\n//\n// interface IWMPMedia3 wrapper method implementations\n//\n\n#pragma implementation_key(1568)\ninline long WMPLib::IWMPMedia3::getAttributeCountByType ( _bstr_t bstrType, _bstr_t bstrLanguage ) {\n    long _result = 0;\n    HRESULT _hr = raw_getAttributeCountByType(bstrType, bstrLanguage, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1569)\ninline _variant_t WMPLib::IWMPMedia3::getItemInfoByType ( _bstr_t bstrType, _bstr_t bstrLanguage, long lIndex ) {\n    VARIANT _result;\n    VariantInit(&_result);\n    HRESULT _hr = raw_getItemInfoByType(bstrType, bstrLanguage, lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _variant_t(_result, false);\n}\n\n//\n// interface IWMPControls3 wrapper method implementations\n//\n\n#pragma implementation_key(1570)\ninline long WMPLib::IWMPControls3::GetaudioLanguageCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_audioLanguageCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1571)\ninline long WMPLib::IWMPControls3::getAudioLanguageID ( long lIndex ) {\n    long _result = 0;\n    HRESULT _hr = raw_getAudioLanguageID(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1572)\ninline _bstr_t WMPLib::IWMPControls3::getAudioLanguageDescription ( long lIndex ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getAudioLanguageDescription(lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1573)\ninline long WMPLib::IWMPControls3::GetcurrentAudioLanguage ( ) {\n    long _result = 0;\n    HRESULT _hr = get_currentAudioLanguage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1574)\ninline void WMPLib::IWMPControls3::PutcurrentAudioLanguage ( long plLangID ) {\n    HRESULT _hr = put_currentAudioLanguage(plLangID);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1575)\ninline long WMPLib::IWMPControls3::GetcurrentAudioLanguageIndex ( ) {\n    long _result = 0;\n    HRESULT _hr = get_currentAudioLanguageIndex(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1576)\ninline void WMPLib::IWMPControls3::PutcurrentAudioLanguageIndex ( long plIndex ) {\n    HRESULT _hr = put_currentAudioLanguageIndex(plIndex);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1577)\ninline _bstr_t WMPLib::IWMPControls3::getLanguageName ( long lLangID ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getLanguageName(lLangID, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1578)\ninline _bstr_t WMPLib::IWMPControls3::GetcurrentPositionTimecode ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_currentPositionTimecode(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1579)\ninline void WMPLib::IWMPControls3::PutcurrentPositionTimecode ( _bstr_t bstrTimecode ) {\n    HRESULT _hr = put_currentPositionTimecode(bstrTimecode);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPMediaCollection2 wrapper method implementations\n//\n\n#pragma implementation_key(1580)\ninline WMPLib::IWMPQueryPtr WMPLib::IWMPMediaCollection2::createQuery ( ) {\n    struct IWMPQuery * _result = 0;\n    HRESULT _hr = raw_createQuery(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPQueryPtr(_result, false);\n}\n\n#pragma implementation_key(1581)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPMediaCollection2::getPlaylistByQuery ( struct IWMPQuery * pQuery, _bstr_t bstrMediaType, _bstr_t bstrSortAttribute, VARIANT_BOOL fSortAscending ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_getPlaylistByQuery(pQuery, bstrMediaType, bstrSortAttribute, fSortAscending, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1582)\ninline WMPLib::IWMPStringCollectionPtr WMPLib::IWMPMediaCollection2::getStringCollectionByQuery ( _bstr_t bstrAttribute, struct IWMPQuery * pQuery, _bstr_t bstrMediaType, _bstr_t bstrSortAttribute, VARIANT_BOOL fSortAscending ) {\n    struct IWMPStringCollection * _result = 0;\n    HRESULT _hr = raw_getStringCollectionByQuery(bstrAttribute, pQuery, bstrMediaType, bstrSortAttribute, fSortAscending, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPStringCollectionPtr(_result, false);\n}\n\n#pragma implementation_key(1583)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPMediaCollection2::getByAttributeAndMediaType ( _bstr_t bstrAttribute, _bstr_t bstrValue, _bstr_t bstrMediaType ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = raw_getByAttributeAndMediaType(bstrAttribute, bstrValue, bstrMediaType, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n//\n// interface IWMPLibraryServices wrapper method implementations\n//\n\n#pragma implementation_key(1584)\ninline long WMPLib::IWMPLibraryServices::getCountByType ( enum WMPLibraryType wmplt ) {\n    long _result = 0;\n    HRESULT _hr = raw_getCountByType(wmplt, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1585)\ninline WMPLib::IWMPLibraryPtr WMPLib::IWMPLibraryServices::getLibraryByType ( enum WMPLibraryType wmplt, long lIndex ) {\n    struct IWMPLibrary * _result = 0;\n    HRESULT _hr = raw_getLibraryByType(wmplt, lIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPLibraryPtr(_result, false);\n}\n\n//\n// interface IWMPLibrary2 wrapper method implementations\n//\n\n#pragma implementation_key(1586)\ninline _bstr_t WMPLib::IWMPLibrary2::getItemInfo ( _bstr_t bstrItemName ) {\n    BSTR _result = 0;\n    HRESULT _hr = raw_getItemInfo(bstrItemName, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n//\n// interface IWMPSyncDevice3 wrapper method implementations\n//\n\n#pragma implementation_key(1587)\ninline HRESULT WMPLib::IWMPSyncDevice3::estimateSyncSize ( struct IWMPPlaylist * pNonRulePlaylist, struct IWMPPlaylist * pRulesPlaylist ) {\n    HRESULT _hr = raw_estimateSyncSize(pNonRulePlaylist, pRulesPlaylist);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1588)\ninline HRESULT WMPLib::IWMPSyncDevice3::cancelEstimation ( ) {\n    HRESULT _hr = raw_cancelEstimation();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n//\n// interface IWMPPlaylistCtrl wrapper method implementations\n//\n\n#pragma implementation_key(1589)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPPlaylistCtrl::GetPlaylist ( ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = get_Playlist(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1590)\ninline void WMPLib::IWMPPlaylistCtrl::PutPlaylist ( struct IWMPPlaylist * ppdispPlaylist ) {\n    HRESULT _hr = put_Playlist(ppdispPlaylist);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1591)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::Getcolumns ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_columns(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1592)\ninline void WMPLib::IWMPPlaylistCtrl::Putcolumns ( _bstr_t pbstrColumns ) {\n    HRESULT _hr = put_columns(pbstrColumns);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1593)\ninline long WMPLib::IWMPPlaylistCtrl::GetcolumnCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_columnCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1594)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetcolumnOrder ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_columnOrder(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1595)\ninline void WMPLib::IWMPPlaylistCtrl::PutcolumnOrder ( _bstr_t pbstrColumnOrder ) {\n    HRESULT _hr = put_columnOrder(pbstrColumnOrder);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1596)\ninline VARIANT_BOOL WMPLib::IWMPPlaylistCtrl::GetcolumnsVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_columnsVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1597)\ninline void WMPLib::IWMPPlaylistCtrl::PutcolumnsVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_columnsVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1598)\ninline VARIANT_BOOL WMPLib::IWMPPlaylistCtrl::GetdropDownVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_dropDownVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1599)\ninline void WMPLib::IWMPPlaylistCtrl::PutdropDownVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_dropDownVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1600)\ninline VARIANT_BOOL WMPLib::IWMPPlaylistCtrl::GetplaylistItemsVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_playlistItemsVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1601)\ninline void WMPLib::IWMPPlaylistCtrl::PutplaylistItemsVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_playlistItemsVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1602)\ninline VARIANT_BOOL WMPLib::IWMPPlaylistCtrl::GetcheckboxesVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_checkboxesVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1603)\ninline void WMPLib::IWMPPlaylistCtrl::PutcheckboxesVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_checkboxesVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1604)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetbackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1605)\ninline void WMPLib::IWMPPlaylistCtrl::PutbackgroundColor ( _bstr_t pbstrColor ) {\n    HRESULT _hr = put_backgroundColor(pbstrColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1606)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetforegroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_foregroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1607)\ninline void WMPLib::IWMPPlaylistCtrl::PutforegroundColor ( _bstr_t pbstrColor ) {\n    HRESULT _hr = put_foregroundColor(pbstrColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1608)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetdisabledItemColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_disabledItemColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1609)\ninline void WMPLib::IWMPPlaylistCtrl::PutdisabledItemColor ( _bstr_t pbstrColor ) {\n    HRESULT _hr = put_disabledItemColor(pbstrColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1610)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetitemPlayingColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_itemPlayingColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1611)\ninline void WMPLib::IWMPPlaylistCtrl::PutitemPlayingColor ( _bstr_t pbstrColor ) {\n    HRESULT _hr = put_itemPlayingColor(pbstrColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1612)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetitemPlayingBackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_itemPlayingBackgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1613)\ninline void WMPLib::IWMPPlaylistCtrl::PutitemPlayingBackgroundColor ( _bstr_t pbstrBackgroundColor ) {\n    HRESULT _hr = put_itemPlayingBackgroundColor(pbstrBackgroundColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1614)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetbackgroundImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1615)\ninline void WMPLib::IWMPPlaylistCtrl::PutbackgroundImage ( _bstr_t pbstrImage ) {\n    HRESULT _hr = put_backgroundImage(pbstrImage);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1616)\ninline VARIANT_BOOL WMPLib::IWMPPlaylistCtrl::GetallowItemEditing ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_allowItemEditing(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1617)\ninline void WMPLib::IWMPPlaylistCtrl::PutallowItemEditing ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_allowItemEditing(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1618)\ninline VARIANT_BOOL WMPLib::IWMPPlaylistCtrl::GetallowColumnSorting ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_allowColumnSorting(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1619)\ninline void WMPLib::IWMPPlaylistCtrl::PutallowColumnSorting ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_allowColumnSorting(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1620)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetdropDownList ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_dropDownList(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1621)\ninline void WMPLib::IWMPPlaylistCtrl::PutdropDownList ( _bstr_t pbstrList ) {\n    HRESULT _hr = put_dropDownList(pbstrList);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1622)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetdropDownToolTip ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_dropDownToolTip(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1623)\ninline void WMPLib::IWMPPlaylistCtrl::PutdropDownToolTip ( _bstr_t pbstrToolTip ) {\n    HRESULT _hr = put_dropDownToolTip(pbstrToolTip);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1624)\ninline VARIANT_BOOL WMPLib::IWMPPlaylistCtrl::Getcopying ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_copying(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1625)\ninline void WMPLib::IWMPPlaylistCtrl::Putcopying ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_copying(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1626)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::copy ( ) {\n    HRESULT _hr = raw_copy();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1627)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::abortCopy ( ) {\n    HRESULT _hr = raw_abortCopy();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1628)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::deleteSelected ( ) {\n    HRESULT _hr = raw_deleteSelected();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1629)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::deleteSelectedFromLibrary ( ) {\n    HRESULT _hr = raw_deleteSelectedFromLibrary();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1630)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::moveSelectedUp ( ) {\n    HRESULT _hr = raw_moveSelectedUp();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1631)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::moveSelectedDown ( ) {\n    HRESULT _hr = raw_moveSelectedDown();\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1632)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::addSelectedToPlaylist ( struct IWMPPlaylist * pdispPlaylist ) {\n    HRESULT _hr = raw_addSelectedToPlaylist(pdispPlaylist);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1633)\ninline long WMPLib::IWMPPlaylistCtrl::getNextSelectedItem ( long nStartIndex ) {\n    long _result = 0;\n    HRESULT _hr = raw_getNextSelectedItem(nStartIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1634)\ninline long WMPLib::IWMPPlaylistCtrl::getNextCheckedItem ( long nStartIndex ) {\n    long _result = 0;\n    HRESULT _hr = raw_getNextCheckedItem(nStartIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1635)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::setSelectedState ( long nIndex, VARIANT_BOOL vbSelected ) {\n    HRESULT _hr = raw_setSelectedState(nIndex, vbSelected);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1636)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::setCheckedState ( long nIndex, VARIANT_BOOL vbChecked ) {\n    HRESULT _hr = raw_setCheckedState(nIndex, vbChecked);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1637)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::sortColumn ( long nIndex ) {\n    HRESULT _hr = raw_sortColumn(nIndex);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1638)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::setColumnResizeMode ( long nIndex, _bstr_t newMode ) {\n    HRESULT _hr = raw_setColumnResizeMode(nIndex, newMode);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1639)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::setColumnWidth ( long nIndex, long nWidth ) {\n    HRESULT _hr = raw_setColumnWidth(nIndex, nWidth);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1640)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetitemErrorColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_itemErrorColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1641)\ninline void WMPLib::IWMPPlaylistCtrl::PutitemErrorColor ( _bstr_t pbstrColor ) {\n    HRESULT _hr = put_itemErrorColor(pbstrColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1642)\ninline long WMPLib::IWMPPlaylistCtrl::GetitemCount ( ) {\n    long _result = 0;\n    HRESULT _hr = get_itemCount(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1643)\ninline WMPLib::IWMPMediaPtr WMPLib::IWMPPlaylistCtrl::GetitemMedia ( long nIndex ) {\n    struct IWMPMedia * _result = 0;\n    HRESULT _hr = get_itemMedia(nIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPMediaPtr(_result, false);\n}\n\n#pragma implementation_key(1644)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPPlaylistCtrl::GetitemPlaylist ( long nIndex ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = get_itemPlaylist(nIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1645)\ninline long WMPLib::IWMPPlaylistCtrl::getNextSelectedItem2 ( long nStartIndex ) {\n    long _result = 0;\n    HRESULT _hr = raw_getNextSelectedItem2(nStartIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1646)\ninline long WMPLib::IWMPPlaylistCtrl::getNextCheckedItem2 ( long nStartIndex ) {\n    long _result = 0;\n    HRESULT _hr = raw_getNextCheckedItem2(nStartIndex, &_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1647)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::setSelectedState2 ( long nIndex, VARIANT_BOOL vbSelected ) {\n    HRESULT _hr = raw_setSelectedState2(nIndex, vbSelected);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1648)\ninline HRESULT WMPLib::IWMPPlaylistCtrl::setCheckedState2 ( long nIndex, VARIANT_BOOL vbChecked ) {\n    HRESULT _hr = raw_setCheckedState2(nIndex, vbChecked);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _hr;\n}\n\n#pragma implementation_key(1649)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetleftStatus ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_leftStatus(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1650)\ninline void WMPLib::IWMPPlaylistCtrl::PutleftStatus ( _bstr_t pbstrStatus ) {\n    HRESULT _hr = put_leftStatus(pbstrStatus);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1651)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetrightStatus ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_rightStatus(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1652)\ninline void WMPLib::IWMPPlaylistCtrl::PutrightStatus ( _bstr_t pbstrStatus ) {\n    HRESULT _hr = put_rightStatus(pbstrStatus);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1653)\ninline VARIANT_BOOL WMPLib::IWMPPlaylistCtrl::GeteditButtonVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_editButtonVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1654)\ninline void WMPLib::IWMPPlaylistCtrl::PuteditButtonVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_editButtonVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1655)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetdropDownImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_dropDownImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1656)\ninline void WMPLib::IWMPPlaylistCtrl::PutdropDownImage ( _bstr_t pbstrImage ) {\n    HRESULT _hr = put_dropDownImage(pbstrImage);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1657)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetdropDownBackgroundImage ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_dropDownBackgroundImage(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1658)\ninline void WMPLib::IWMPPlaylistCtrl::PutdropDownBackgroundImage ( _bstr_t pbstrImage ) {\n    HRESULT _hr = put_dropDownBackgroundImage(pbstrImage);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1659)\ninline float WMPLib::IWMPPlaylistCtrl::GethueShift ( ) {\n    float _result = 0;\n    HRESULT _hr = get_hueShift(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1660)\ninline void WMPLib::IWMPPlaylistCtrl::PuthueShift ( float pVal ) {\n    HRESULT _hr = put_hueShift(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1661)\ninline float WMPLib::IWMPPlaylistCtrl::Getsaturation ( ) {\n    float _result = 0;\n    HRESULT _hr = get_saturation(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1662)\ninline void WMPLib::IWMPPlaylistCtrl::Putsaturation ( float pVal ) {\n    HRESULT _hr = put_saturation(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1663)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetstatusColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_statusColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1664)\ninline void WMPLib::IWMPPlaylistCtrl::PutstatusColor ( _bstr_t pbstrColor ) {\n    HRESULT _hr = put_statusColor(pbstrColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1665)\ninline VARIANT_BOOL WMPLib::IWMPPlaylistCtrl::GettoolbarVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_toolbarVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1666)\ninline void WMPLib::IWMPPlaylistCtrl::PuttoolbarVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_toolbarVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1667)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetitemSelectedColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_itemSelectedColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1668)\ninline void WMPLib::IWMPPlaylistCtrl::PutitemSelectedColor ( _bstr_t pbstrColor ) {\n    HRESULT _hr = put_itemSelectedColor(pbstrColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1669)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetitemSelectedFocusLostColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_itemSelectedFocusLostColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1670)\ninline void WMPLib::IWMPPlaylistCtrl::PutitemSelectedFocusLostColor ( _bstr_t pbstrFocusLostColor ) {\n    HRESULT _hr = put_itemSelectedFocusLostColor(pbstrFocusLostColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1671)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetitemSelectedBackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_itemSelectedBackgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1672)\ninline void WMPLib::IWMPPlaylistCtrl::PutitemSelectedBackgroundColor ( _bstr_t pbstrColor ) {\n    HRESULT _hr = put_itemSelectedBackgroundColor(pbstrColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1673)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetitemSelectedBackgroundFocusLostColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_itemSelectedBackgroundFocusLostColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1674)\ninline void WMPLib::IWMPPlaylistCtrl::PutitemSelectedBackgroundFocusLostColor ( _bstr_t pbstrFocusLostColor ) {\n    HRESULT _hr = put_itemSelectedBackgroundFocusLostColor(pbstrFocusLostColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1675)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetbackgroundSplitColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundSplitColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1676)\ninline void WMPLib::IWMPPlaylistCtrl::PutbackgroundSplitColor ( _bstr_t pbstrColor ) {\n    HRESULT _hr = put_backgroundSplitColor(pbstrColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1677)\ninline _bstr_t WMPLib::IWMPPlaylistCtrl::GetstatusTextColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_statusTextColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1678)\ninline void WMPLib::IWMPPlaylistCtrl::PutstatusTextColor ( _bstr_t pbstrColor ) {\n    HRESULT _hr = put_statusTextColor(pbstrColor);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n//\n// interface IWMPLibraryTreeCtrl wrapper method implementations\n//\n\n#pragma implementation_key(1679)\ninline VARIANT_BOOL WMPLib::IWMPLibraryTreeCtrl::GetdropDownVisible ( ) {\n    VARIANT_BOOL _result = 0;\n    HRESULT _hr = get_dropDownVisible(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1680)\ninline void WMPLib::IWMPLibraryTreeCtrl::PutdropDownVisible ( VARIANT_BOOL pVal ) {\n    HRESULT _hr = put_dropDownVisible(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1681)\ninline _bstr_t WMPLib::IWMPLibraryTreeCtrl::GetforegroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_foregroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1682)\ninline void WMPLib::IWMPLibraryTreeCtrl::PutforegroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_foregroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1683)\ninline _bstr_t WMPLib::IWMPLibraryTreeCtrl::GetbackgroundColor ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_backgroundColor(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1684)\ninline void WMPLib::IWMPLibraryTreeCtrl::PutbackgroundColor ( _bstr_t pVal ) {\n    HRESULT _hr = put_backgroundColor(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1685)\ninline long WMPLib::IWMPLibraryTreeCtrl::GetfontSize ( ) {\n    long _result = 0;\n    HRESULT _hr = get_fontSize(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _result;\n}\n\n#pragma implementation_key(1686)\ninline void WMPLib::IWMPLibraryTreeCtrl::PutfontSize ( long pVal ) {\n    HRESULT _hr = put_fontSize(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1687)\ninline _bstr_t WMPLib::IWMPLibraryTreeCtrl::GetfontStyle ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_fontStyle(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1688)\ninline void WMPLib::IWMPLibraryTreeCtrl::PutfontStyle ( _bstr_t pVal ) {\n    HRESULT _hr = put_fontStyle(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1689)\ninline _bstr_t WMPLib::IWMPLibraryTreeCtrl::GetfontFace ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_fontFace(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1690)\ninline void WMPLib::IWMPLibraryTreeCtrl::PutfontFace ( _bstr_t pVal ) {\n    HRESULT _hr = put_fontFace(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1691)\ninline _bstr_t WMPLib::IWMPLibraryTreeCtrl::Getfilter ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_filter(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1692)\ninline void WMPLib::IWMPLibraryTreeCtrl::Putfilter ( _bstr_t pVal ) {\n    HRESULT _hr = put_filter(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1693)\ninline _bstr_t WMPLib::IWMPLibraryTreeCtrl::GetexpandState ( ) {\n    BSTR _result = 0;\n    HRESULT _hr = get_expandState(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return _bstr_t(_result, false);\n}\n\n#pragma implementation_key(1694)\ninline void WMPLib::IWMPLibraryTreeCtrl::PutexpandState ( _bstr_t pVal ) {\n    HRESULT _hr = put_expandState(pVal);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1695)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPLibraryTreeCtrl::GetPlaylist ( ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = get_Playlist(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1696)\ninline void WMPLib::IWMPLibraryTreeCtrl::PutPlaylist ( struct IWMPPlaylist * ppPlaylist ) {\n    HRESULT _hr = put_Playlist(ppPlaylist);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n}\n\n#pragma implementation_key(1697)\ninline WMPLib::IWMPPlaylistPtr WMPLib::IWMPLibraryTreeCtrl::GetselectedPlaylist ( ) {\n    struct IWMPPlaylist * _result = 0;\n    HRESULT _hr = get_selectedPlaylist(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPPlaylistPtr(_result, false);\n}\n\n#pragma implementation_key(1698)\ninline WMPLib::IWMPMediaPtr WMPLib::IWMPLibraryTreeCtrl::GetselectedMedia ( ) {\n    struct IWMPMedia * _result = 0;\n    HRESULT _hr = get_selectedMedia(&_result);\n    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));\n    return IWMPMediaPtr(_result, false);\n}\n"
  },
  {
    "path": "Entry.cc",
    "content": "﻿#include \"stdafx.h\"\n#include \"CEFWebkitBrowser.h\"\n#include \"clientapp.h\"\n#include <Shlobj.h>\n#include <strsafe.h>\n#include \"MiniDumper.h\"\n\n//记得拷贝resource中的资源到运行目录\n\n\nCMiniDumper g_miniDumper(true);\n\nint APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)\n{\n\t//实例句柄与渲染类关联\n\tCPaintManagerUI::SetInstance(hInstance);\n\n\t//Initializes the COM library on the current thread and identifies,初始化COM库, 为加载COM库提供支持\n\tHRESULT Hr = ::CoInitialize(NULL);\n\tif (FAILED(Hr))\n\t{\n\t\treturn 0;\n\t}\n\n\t//\n\n\tHMODULE hModule = LoadLibrary(_T(\"HookFlash.dll\"));\n\n\n\tcef_enable_highdpi_support();\n\n\tvoid* sandbox_info = NULL;\n\n#if defined(CEF_USE_SANDBOX)\n\t// Manage the life span of the sandbox information object. This is necessary\n\t// for sandbox support on Windows. See cef_sandbox_win.h for complete details.\n\tCefScopedSandboxInfo scoped_sandbox;\n\tsandbox_info = scoped_sandbox.sandbox_info();\n#endif\n\n\n\t// Provide CEF with command-line arguments.\n\tCefMainArgs main_args(hInstance);\n\n\t// SimpleApp implements application-level callbacks for the browser process.\n\t// It will create the first browser instance in OnContextInitialized() after\n\t// CEF has initialized.\n\tCefRefPtr<CCefClientApp> app(new CCefClientApp); //CefApp实现，用于处理进程相关的回调。\n\n\n\t// CEF applications have multiple sub-processes (render, plugin, GPU, etc)\n\t// that share the same executable. This function checks the command-line and,\n\t// if this is a sub-process, executes the appropriate logic.\n\tint exit_code = CefExecuteProcess(main_args, app, sandbox_info);\n\tif (exit_code >= 0) {\n\t\t// The sub-process has completed so return here.\n\t\treturn exit_code;\n\t}\n\n\t// Specify CEF global settings here.\n\tCefSettings settings;\n\tCefSettingsTraits::init(&settings);\n\tsettings.single_process = true;                //使用多进程模式\n\tsettings.ignore_certificate_errors = true;      //忽略掉ssl证书验证错误\n\tsettings.log_severity = LOGSEVERITY_ERROR;\n//\tsettings.command_line_args_disabled = true;\n//\tCefString(&settings.locale).FromASCII(\"zh-CN\");\n\tTCHAR szSpecialPath[MAX_PATH];\n\tmemset(szSpecialPath, '\\0', sizeof(szSpecialPath));\n\t//\tGetEnvironmentVariable(\"\",szSpecialPath,sizeof())\n\t\n\tif (FALSE!= SHGetSpecialFolderPath(NULL, szSpecialPath, CSIDL_PROFILE, FALSE))\n\t{\n\t\tStringCbCat(szSpecialPath,sizeof(szSpecialPath),_T(\"\\\\AppData\\\\Local\\\\Temp\\\\CEF\"));\n\t\tCefString(&settings.cache_path).FromString(szSpecialPath,sizeof(szSpecialPath)/2,true);\n\t}\n\t\n\t\n\n#if !defined(CEF_USE_SANDBOX)\n\tsettings.no_sandbox = true;\n#endif\n\n\t//multi_threaded_message_loop=true 这样设置的目的是使cef的browser ui线程和程序的线程分离，使用duilib的消息循环函数\n\tsettings.multi_threaded_message_loop = true;\n\n\t\n\n\t// Initialize CEF.\n\tCefInitialize(main_args, settings, app, sandbox_info);\n\n\t//////////////////////////////hook test////////////////////////////////////////////\n\n\t/*\n\tPROCESS_INFORMATION   p;\n\tSTARTUPINFO   startupInfo = { 0 };\n\tstartupInfo.cb = sizeof(STARTUPINFO);\n\tstartupInfo.lpReserved = NULL;\n\tstartupInfo.lpReserved2 = NULL;\n\tstartupInfo.lpDesktop = NULL;\n\tstartupInfo.dwFlags = 0;\n\tBOOL   res = CreateProcess(L\"C:\\\\WINNT\\\\system32\\\\CMD.exe\",L\"ping 192.168.1.6\",    \n\t\tNULL,\n\t\tNULL,\n\t\tTRUE,\n\t\tNORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW,\n\t\tNULL,\n\t\tNULL,\n\t\t&startupInfo,\n\t\t&p);\n\t*/\n\n\t//////////////////////////////////////////////////////////////////////////\n\n\t\n\tCEFWebkitBrowserWnd pFrame;\n\tpFrame.Create(NULL, _T(\"浏览器\"), UI_WNDSTYLE_FRAME | WS_CLIPCHILDREN, WS_EX_ACCEPTFILES);\n\tpFrame.CenterWindow();\n\n\t//\t绘制阴影\n\n\tCShadowWindow shadowwnd;\n\tCShadowWindow::Initialize(hInstance);\n\tshadowwnd.Create(pFrame.GetHWND());\n\tshadowwnd.SetSize(6);\n\t//shadowwnd.SetPosition(4, 4);\n\tshadowwnd.SetPosition(0, 0);\n\tshadowwnd.SetColor(RGB(22, 22, 22));\n\n\t//   pFrame.ShowWindow(true);\n\n\tif (!settings.multi_threaded_message_loop)\n\t{\n\t\t//Run the CEF message loop. This function will block until the application\n\t\t//recieves a WM_QUIT message.\n\t\tCefRunMessageLoop();\n\t\t//CefDoMessageLoopWork();\n\n\t}\n\telse\n\t{\n\t\tCPaintManagerUI::MessageLoop();\n\t}\n\n\n\tCefShutdown();\n\n\t//退出程序并释放COM库\n\t::CoUninitialize();\n\n\treturn 0;\n}"
  },
  {
    "path": "HookFlash/EasyHook/LICENSE",
    "content": "Copyright (c) 2009 Christoph Husse & Copyright (c) 2012 Justin Stenning\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "HookFlash/EasyHook/README.md",
    "content": "# Welcome to EasyHook - The reinvention of Windows API Hooking\n\n[![Join the chat at https://gitter.im/EasyHook/EasyHook](https://badges.gitter.im/EasyHook/EasyHook.svg)](https://gitter.im/EasyHook/EasyHook?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nThis project supports extending (hooking) unmanaged code (APIs) with pure managed ones, from within a fully managed environment on 32- or 64-bit Windows XP SP2, Windows Vista x64, Windows Server 2008 x64, Windows 7, Windows 8.1, and Windows 10. \n\nEasyHook currently supports injecting assemblies built for .NET Framework 3.5 and 4.0 and can also inject native DLLs.\n\n## EasyHook homepage\n\nFor more information head to the EasyHook site at https://easyhook.github.io\n\n## NuGet\nhttps://www.nuget.org/packages/EasyHook\n\nFor native C++ apps there is also a native NuGet package available: https://www.nuget.org/packages/EasyHookNativePackage\n\n## Bug reports or questions\nReporting bugs is the only way to get them fixed and help other users of the library!\n\nReport issues at: https://github.com/EasyHook/EasyHook/issues\n\n## License\n    Copyright (c) 2009 Christoph Husse & Copyright (c) 2012 Justin Stenning\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n    \n    The above copyright notice and this permission notice shall be included in\n    all copies or substantial portions of the Software.\n    \n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n    THE SOFTWARE.\n\n## External libraries\nEasyHook includes the UDIS86 library Copyright (c) 2002-2012, Vivek Thampi <vivek.mt@gmail.com>. See .\\DriverShared\\Disassembler\\udis86-LICENSE.txt for license details. Minor modifications have been made for it to compile with EasyHook.\n\nMore information about UDIS86 can be found at https://github.com/vmt/udis86\n"
  },
  {
    "path": "HookFlash/EasyHook/easyhook.h",
    "content": "// EasyHook (File: EasyHookDll\\easyhook.h)\n//\n// Copyright (c) 2009 Christoph Husse & Copyright (c) 2015 Justin Stenning\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// Please visit https://easyhook.github.io for more information\n// about the project and latest updates.\n\n#ifndef _EASYHOOK_H_\n#define _EASYHOOK_H_\n\n#ifdef DRIVER\n\n    #include <ntddk.h>\n    #include <ntstrsafe.h>\n\n\ttypedef int BOOL;\n\ttypedef void* HMODULE;\n\n#else\n\n    #define NTDDI_VERSION           NTDDI_WIN2KSP4\n    #define _WIN32_WINNT            0x500\n    #define _WIN32_IE_              _WIN32_IE_WIN2KSP4\n\n    #include <windows.h>\n    #include <winnt.h>\n    #include <winternl.h>\n\n#endif\n\n\n#ifdef __cplusplus\nextern \"C\"{\n#endif\n\n#ifdef EASYHOOK_EXPORTS\n    #define EASYHOOK_API\t\t\t\t\t\t__declspec(dllexport) __stdcall\n\t#define DRIVER_SHARED_API(type, decl)\t\tEXTERN_C type EASYHOOK_API decl\n#else\n    #ifndef DRIVER\n        #define EASYHOOK_API\t\t\t\t\t__declspec(dllimport) __stdcall\n\t\t#define DRIVER_SHARED_API(type, decl)\tEXTERN_C type EASYHOOK_API decl\n    #else\n        #define EASYHOOK_API\t\t\t\t\t__stdcall\n\t\t#define DRIVER_SHARED_API(type, decl)\ttypedef type EASYHOOK_API PROC_##decl; EXTERN_C type EASYHOOK_API decl\n    #endif\n#endif\n\n/* \n    This is the typical sign that a defined method is exported...\n\n    Methods marked with this attribute need special attention\n    during parameter validation and documentation.\n*/\n#define EASYHOOK_NT_EXPORT          EXTERN_C NTSTATUS EASYHOOK_API\n#define EASYHOOK_BOOL_EXPORT        EXTERN_C BOOL EASYHOOK_API\n\n#define MAX_HOOK_COUNT              1024\n#define MAX_ACE_COUNT               128\n#define MAX_THREAD_COUNT            128\n#define MAX_PASSTHRU_SIZE           1024 * 64\n\ntypedef struct _LOCAL_HOOK_INFO_* PLOCAL_HOOK_INFO;\n\ntypedef struct _HOOK_TRACE_INFO_\n{\n    PLOCAL_HOOK_INFO        Link;\n}HOOK_TRACE_INFO, *TRACED_HOOK_HANDLE;\n\nDRIVER_SHARED_API(NTSTATUS, RtlGetLastError());\n\nDRIVER_SHARED_API(PWCHAR, RtlGetLastErrorString());\n\n#ifndef DRIVER\nDRIVER_SHARED_API(PWCHAR, RtlGetLastErrorStringCopy());\n#endif\n\nDRIVER_SHARED_API(NTSTATUS, LhInstallHook(\n            void* InEntryPoint,\n            void* InHookProc,\n            void* InCallback,\n            TRACED_HOOK_HANDLE OutHandle));\n\nDRIVER_SHARED_API(NTSTATUS, LhUninstallAllHooks());\n\nDRIVER_SHARED_API(NTSTATUS, LhUninstallHook(TRACED_HOOK_HANDLE InHandle));\n\nDRIVER_SHARED_API(NTSTATUS, LhWaitForPendingRemovals());\n\n/*\n    Setup the ACLs after hook installation. Please note that every\n    hook starts suspended. You will have to set a proper ACL to\n    make it active!\n*/\n#ifdef DRIVER\n\n\tDRIVER_SHARED_API(NTSTATUS, LhSetInclusiveACL(\n\t\t\t\tULONG* InProcessIdList,\n\t\t\t\tULONG InProcessCount,\n\t\t\t\tTRACED_HOOK_HANDLE InHandle));\n\n\tDRIVER_SHARED_API(NTSTATUS, LhSetExclusiveACL(\n\t\t\t\tULONG* InProcessIdList,\n\t\t\t\tULONG InProcessCount,\n\t\t\t\tTRACED_HOOK_HANDLE InHandle));\n\n\tDRIVER_SHARED_API(NTSTATUS, LhSetGlobalInclusiveACL(\n\t\t\t\tULONG* InProcessIdList,\n\t\t\t\tULONG InProcessCount));\n\n\tDRIVER_SHARED_API(NTSTATUS, LhSetGlobalExclusiveACL(\n\t\t\t\tULONG* InProcessIdList,\n\t\t\t\tULONG InProcessCount));\n\n\tDRIVER_SHARED_API(NTSTATUS, LhIsProcessIntercepted(\n\t\t\t\tTRACED_HOOK_HANDLE InHook,\n\t\t\t\tULONG InProcessID,\n\t\t\t\tBOOL* OutResult));\n\n#else\n\n\tEASYHOOK_NT_EXPORT LhSetInclusiveACL(\n\t\t\t\tULONG* InThreadIdList,\n\t\t\t\tULONG InThreadCount,\n\t\t\t\tTRACED_HOOK_HANDLE InHandle);\n\n\tEASYHOOK_NT_EXPORT LhSetExclusiveACL(\n\t\t\t\tULONG* InThreadIdList,\n\t\t\t\tULONG InThreadCount,\n\t\t\t\tTRACED_HOOK_HANDLE InHandle);\n\n\tEASYHOOK_NT_EXPORT LhSetGlobalInclusiveACL(\n\t\t\t\tULONG* InThreadIdList,\n\t\t\t\tULONG InThreadCount);\n\n\tEASYHOOK_NT_EXPORT LhSetGlobalExclusiveACL(\n\t\t\t\tULONG* InThreadIdList,\n\t\t\t\tULONG InThreadCount);\n\n\tEASYHOOK_NT_EXPORT LhIsThreadIntercepted(\n\t\t\t\tTRACED_HOOK_HANDLE InHook,\n\t\t\t\tULONG InThreadID,\n\t\t\t\tBOOL* OutResult);\n\n#endif // !DRIVER\n\n/*\n    The following barrier methods are meant to be used in hook handlers only!\n\n    They will all fail with STATUS_NOT_SUPPORTED if called outside a\n    valid hook handler...\n*/\nDRIVER_SHARED_API(NTSTATUS, LhBarrierGetCallback(PVOID* OutValue));\n\nDRIVER_SHARED_API(NTSTATUS, LhBarrierGetReturnAddress(PVOID* OutValue));\n\nDRIVER_SHARED_API(NTSTATUS, LhBarrierGetAddressOfReturnAddress(PVOID** OutValue));\n\nDRIVER_SHARED_API(NTSTATUS, LhBarrierBeginStackTrace(PVOID* OutBackup));\n\nDRIVER_SHARED_API(NTSTATUS, LhBarrierEndStackTrace(PVOID InBackup));\n\ntypedef struct _MODULE_INFORMATION_* PMODULE_INFORMATION;\n\ntypedef struct _MODULE_INFORMATION_\n{\t\n\tPMODULE_INFORMATION\t\tNext;\n\tUCHAR*\t\t\t\t\tBaseAddress;\n\tULONG\t\t\t\t\tImageSize;\n\tCHAR\t\t\t\t\tPath[256];\n\tPCHAR\t\t\t\t\tModuleName;\n}MODULE_INFORMATION;\n\nEASYHOOK_NT_EXPORT LhUpdateModuleInformation();\n\nDRIVER_SHARED_API(NTSTATUS, LhBarrierPointerToModule(\n\t\t\tPVOID InPointer,\n\t\t\tMODULE_INFORMATION* OutModule));\n\nDRIVER_SHARED_API(NTSTATUS, LhEnumModules(\n\t\t\tHMODULE* OutModuleArray, \n            ULONG InMaxModuleCount,\n            ULONG* OutModuleCount));\n\nDRIVER_SHARED_API(NTSTATUS, LhBarrierGetCallingModule(MODULE_INFORMATION* OutModule));\n\nDRIVER_SHARED_API(NTSTATUS, LhBarrierCallStackTrace(\n            PVOID* OutMethodArray, \n            ULONG InMaxMethodCount,\n            ULONG* OutMethodCount));\n\n#ifdef DRIVER\n\n\t#define DRIVER_EXPORT(proc)\t\t\t\tPROC_##proc * proc\n\n\t#define EASYHOOK_INTERFACE_v_1\t\t\t0x0001\n\n\t#define EASYHOOK_WIN32_DEVICE_NAME\t\tL\"\\\\\\\\.\\\\EasyHook\"\n\t#define EASYHOOK_DEVICE_NAME\t\t\tL\"\\\\Device\\\\EasyHook\"\n\t#define EASYHOOK_DOS_DEVICE_NAME\t\tL\"\\\\DosDevices\\\\EasyHook\"\n\t#define FILE_DEVICE_EASYHOOK\t\t\t0x893F\n\n\ttypedef struct _EASYHOOK_INTERFACE_API_v_1_\n\t{\n\t\tDRIVER_EXPORT(RtlGetLastError);\n\t\tDRIVER_EXPORT(RtlGetLastErrorString);\n\t\tDRIVER_EXPORT(LhInstallHook);\n\t\tDRIVER_EXPORT(LhUninstallHook);\n\t\tDRIVER_EXPORT(LhWaitForPendingRemovals);\n\t\tDRIVER_EXPORT(LhBarrierGetCallback);\n\t\tDRIVER_EXPORT(LhBarrierGetReturnAddress);\n\t\tDRIVER_EXPORT(LhBarrierGetAddressOfReturnAddress);\n\t\tDRIVER_EXPORT(LhBarrierBeginStackTrace);\n\t\tDRIVER_EXPORT(LhBarrierEndStackTrace);\n\t\tDRIVER_EXPORT(LhBarrierPointerToModule);\n\t\tDRIVER_EXPORT(LhBarrierGetCallingModule);\n\t\tDRIVER_EXPORT(LhBarrierCallStackTrace);\n\t\tDRIVER_EXPORT(LhSetGlobalExclusiveACL);\n\t\tDRIVER_EXPORT(LhSetGlobalInclusiveACL);\n\t\tDRIVER_EXPORT(LhSetExclusiveACL);\n\t\tDRIVER_EXPORT(LhSetInclusiveACL);\n\t\tDRIVER_EXPORT(LhIsProcessIntercepted);\n\t}EASYHOOK_INTERFACE_API_v_1, *PEASYHOOK_INTERFACE_API_v_1;\n\n\ttypedef struct _EASYHOOK_DEVICE_EXTENSION_\n\t{\n\t\tULONG\t\t\t\t\t\t\t\tMaxVersion;\n\t\t// enumeration of APIs\n\t\tEASYHOOK_INTERFACE_API_v_1\t\t\tAPI_v_1;\n\t}EASYHOOK_DEVICE_EXTENSION, *PEASYHOOK_DEVICE_EXTENSION;\n\n\tstatic NTSTATUS EasyHookQueryInterface(\n\t\tULONG InInterfaceVersion,\n\t\tPVOID OutInterface,\n\t\tPFILE_OBJECT* OutEasyHookDrv)\n\t{\n\t/*\n\t\tDescription:\n\t\t\t\n\t\t\tProvides a convenient way to load the desired EasyHook interface.\n\t\t\tThe method will only work if the EasyHook support driver is loaded, of course.\n\t\t\tIf you don't need the interface anymore, you have to release the\n\t\t\tfile object with ObDereferenceObject().\n\n\t\tParameters:\n\t\t\t\n\t\t\t- InInterfaceVersion\n\n\t\t\t\tThe desired interface version. Any future EasyHook driver will ALWAYS\n\t\t\t\tbe backward compatible. This is the reason why I provide such a flexible\n\t\t\t\tinterface mechanism. \n\n\t\t\t- OutInterface\n\n\t\t\t\tA pointer to the interface structure to be filled with data. If you specify\n\t\t\t\tEASYHOOK_INTERFACE_v_1 as InInterfaceVersion, you will have to provide a\n\t\t\t\tpointer to a EASYHOOK_INTERFACE_API_v_1 structure, for example...\n\n\t\t\t- OutEasyHookDrv\n\n\t\t\t\tA reference to the EasyHook driver. Make sure that you dereference it if\n\t\t\t\tyou don't need the interface any longer! As long as you keep this handle,\n\t\t\t\tthe EasyHook driver CAN'T be unloaded...\n\n\t*/\n\t\tUNICODE_STRING\t\t\t\tDeviceName;\n\t\tPDEVICE_OBJECT\t\t\t\thEasyHookDrv = NULL;\n\t\tNTSTATUS\t\t\t\t\tNtStatus = STATUS_INTERNAL_ERROR;\n\t\tEASYHOOK_DEVICE_EXTENSION*\tDevExt;\n\n\t\t/*\n\t\t\tOpen log file...\n\t\t*/\n\t\tRtlInitUnicodeString(&DeviceName, EASYHOOK_DEVICE_NAME);\n\n\t\tif(!NT_SUCCESS(NtStatus = IoGetDeviceObjectPointer(&DeviceName, FILE_READ_DATA, OutEasyHookDrv, &hEasyHookDrv)))\n\t\t\treturn NtStatus;\n\n\t\t__try\n\t\t{\n\t\t\tDevExt = (EASYHOOK_DEVICE_EXTENSION*)hEasyHookDrv->DeviceExtension;\n\n\t\t\tif(DevExt->MaxVersion < InInterfaceVersion)\n\t\t\t\treturn STATUS_NOT_SUPPORTED;\n\n\t\t\tswitch(InInterfaceVersion)\n\t\t\t{\n\t\t\tcase EASYHOOK_INTERFACE_v_1: memcpy(OutInterface, &DevExt->API_v_1, sizeof(DevExt->API_v_1)); break;\n\t\t\tdefault: \n\t\t\t\treturn STATUS_INVALID_PARAMETER_1;\n\t\t\t}\n\n\t\t\treturn STATUS_SUCCESS;\n\t\t}\n\t\t__except(EXCEPTION_EXECUTE_HANDLER)\n\t\t{\n\t\t\tObDereferenceObject(*OutEasyHookDrv);\n\n\t\t\treturn NtStatus;\n\t\t}\n\t}\n\n\n#endif // DRIVER\n\n#ifndef DRIVER\n\t/*\n\t\tDebug helper API.\n\t*/\n\tEASYHOOK_BOOL_EXPORT DbgIsAvailable();\n\n\tEASYHOOK_BOOL_EXPORT DbgIsEnabled();\n\n\tEASYHOOK_NT_EXPORT DbgAttachDebugger();\n\n\tEASYHOOK_NT_EXPORT DbgDetachDebugger();\n\n\tEASYHOOK_NT_EXPORT DbgGetThreadIdByHandle(\n\t\t\t\tHANDLE InThreadHandle,\n\t\t\t\tULONG* OutThreadId);\n\n\tEASYHOOK_NT_EXPORT DbgGetProcessIdByHandle(\n\t\t\t\tHANDLE InProcessHandle,\n\t\t\t\tULONG* OutProcessId);\n\n\tEASYHOOK_NT_EXPORT DbgHandleToObjectName(\n\t\t\t\tHANDLE InNamedHandle,\n\t\t\t\tUNICODE_STRING* OutNameBuffer,\n\t\t\t\tULONG InBufferSize,\n\t\t\t\tULONG* OutRequiredSize);\n    /*\n        Test API\n    */\n    typedef struct _TEST_FUNC_HOOKS_OPTIONS\n    {\n        LPSTR Filename;\n        LPSTR FilterByName;\n    } TEST_FUNC_HOOKS_OPTIONS;\n\n    typedef struct _TEST_FUNC_HOOKS_RESULT\n    {\n        LPSTR FnName;\n        LPSTR ModuleRedirect;\n        LPSTR FnRedirect;\n        void* FnAddress;\n        void* RelocAddress;\n        LPSTR EntryDisasm;\n        LPSTR RelocDisasm;\n        LPSTR Error;\n    } TEST_FUNC_HOOKS_RESULT;\n\n    EASYHOOK_NT_EXPORT TestFuncHooks(ULONG pId, \n        PCHAR module,\n        TEST_FUNC_HOOKS_OPTIONS options,\n        TEST_FUNC_HOOKS_RESULT** outResults,\n        int* resultCount);\n\n    EASYHOOK_NT_EXPORT ReleaseTestFuncHookResults(TEST_FUNC_HOOKS_RESULT* results, int count);\n\t/*\n\t\tInjection support API.\n\t*/\n\ttypedef struct _REMOTE_ENTRY_INFO_\n\t{\n\t\tULONG           HostPID;\n\t\tUCHAR*          UserData;\n\t\tULONG           UserDataSize;\n\t}REMOTE_ENTRY_INFO;\n\n\ttypedef void __stdcall REMOTE_ENTRY_POINT(REMOTE_ENTRY_INFO* InRemoteInfo);\n\n\t#define EASYHOOK_INJECT_DEFAULT\t\t\t\t0x00000000\n\t#define EASYHOOK_INJECT_STEALTH\t\t\t\t0x10000000 // (experimental)\n\t#define EASYHOOK_INJECT_NET_DEFIBRILLATOR\t0x20000000 // USE THIS ONLY IN UNMANAGED CODE AND ONLY WITH CreateAndInject() FOR MANAGED PROCESSES!!\n\n\tEASYHOOK_NT_EXPORT RhCreateStealthRemoteThread(\n\t\t\t\tULONG InTargetPID,\n\t\t\t\tLPTHREAD_START_ROUTINE InRemoteRoutine,\n\t\t\t\tPVOID InRemoteParam,\n\t\t\t\tHANDLE* OutRemoteThread);\n\n\tEASYHOOK_NT_EXPORT RhInjectLibrary(\n\t\t\t\tULONG InTargetPID,\n\t\t\t\tULONG InWakeUpTID,\n\t\t\t\tULONG InInjectionOptions,\n\t\t\t\tWCHAR* InLibraryPath_x86,\n\t\t\t\tWCHAR* InLibraryPath_x64,\n\t\t\t\tPVOID InPassThruBuffer,\n\t\t\t\tULONG InPassThruSize);\n\n\tEASYHOOK_NT_EXPORT RhCreateAndInject(\n\t\t\t\tWCHAR* InEXEPath,\n\t\t\t\tWCHAR* InCommandLine,\n\t\t\t\tULONG InProcessCreationFlags,\n\t\t\t\tULONG InInjectionOptions,\n\t\t\t\tWCHAR* InLibraryPath_x86,\n\t\t\t\tWCHAR* InLibraryPath_x64,\n\t\t\t\tPVOID InPassThruBuffer,\n\t\t\t\tULONG InPassThruSize,\n\t\t\t\tULONG* OutProcessId);\n\n\tEASYHOOK_BOOL_EXPORT RhIsX64System();\n\n\tEASYHOOK_NT_EXPORT RhIsX64Process(\n\t\t\t\tULONG InProcessId,\n\t\t\t\tBOOL* OutResult);\n\n\tEASYHOOK_BOOL_EXPORT RhIsAdministrator();\n\n\tEASYHOOK_NT_EXPORT RhWakeUpProcess();\n\n\tEASYHOOK_NT_EXPORT RhInstallSupportDriver();\n\n\tEASYHOOK_NT_EXPORT RhInstallDriver(\n\t\t\tWCHAR* InDriverPath,\n\t\t\tWCHAR* InDriverName);\n\n\ttypedef struct _GACUTIL_INFO_* HGACUTIL;\n\n\n#endif // !DRIVER\n\n#ifdef __cplusplus\n};\n#endif\n\n#endif"
  },
  {
    "path": "HookFlash/HookFlash.cpp",
    "content": "// HookFlash.cpp :  DLL Ӧóĵ\n//\n\n\n\n#include \"stdafx.h\"\n\nusing namespace std;\n\nHOOK_TRACE_INFO hAHookTrackInfo = { NULL }; // keep track of our hook\nHOOK_TRACE_INFO hWHookTrackInfo = { NULL }; // keep track of our hook\n\n//עԼ WINAPIֶջ쳣\n\ntypedef\tBOOL(WINAPI *realCreateProcessWPtr)(LPCWSTR lpApplicationName, LPWSTR lpCommandLine,\n\tLPSECURITY_ATTRIBUTES lpProcessAttributes,\n\tLPSECURITY_ATTRIBUTES lpThreadAttributes,\n\tBOOL bInheritHandles,\n\tDWORD dwCreationFlags,\n\tLPVOID lpEnvironment,\n\tLPCWSTR lpCurrentDirectory,\n\tLPSTARTUPINFOW lpStartupInfo,\n\tLPPROCESS_INFORMATION lpProcessInformation\n\t);\n\n\ntypedef BOOL(WINAPI *realCreateProcessAPtr)(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment,\n\tLPCSTR lpCurrentDirectory, \\\n\tLPSTARTUPINFOA lpStartupInfo, \\\n\tLPPROCESS_INFORMATION lpProcessInformation);\n\n\nrealCreateProcessAPtr prealCreateProcessA;\nrealCreateProcessWPtr prealCreateProcessW;\n\n\nBOOL WINAPI MYCreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine,\n\tLPSECURITY_ATTRIBUTES lpProcessAttributes,\n\tLPSECURITY_ATTRIBUTES lpThreadAttributes,\n\tBOOL bInheritHandles,\n\tDWORD dwCreationFlags,\n\tLPVOID lpEnvironment,\n\tLPCWSTR lpCurrentDirectory,\n\tLPSTARTUPINFOW lpStartupInfo,\n\tLPPROCESS_INFORMATION lpProcessInformation\n)\n{\n\tstd::wstring strCommandLine(lpCommandLine);\n\n\t//MessageBoxW(GetActiveWindow(), strCommandLine.c_str(), L\"createproceW\", MB_OK);\n\n\tif (string::npos != strCommandLine.find(L\"echo NOT SANDBOXED\"))\n\t{\n\t\t//MessageBoxW(GetActiveWindow(), strCommandLine.c_str(), L\"createproceW\", MB_OK);\n\t\treturn TRUE;\n\t}\n\telse\n\t{\n\t\treturn (prealCreateProcessW)(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation);\n\t}\n\n}\n\nBOOL WINAPI MYCreateProcessA(\n\tLPCSTR lpApplicationName,\n\tLPSTR lpCommandLine,\n\tLPSECURITY_ATTRIBUTES lpProcessAttributes,\n\tLPSECURITY_ATTRIBUTES lpThreadAttributes,\n\tBOOL bInheritHandles,\n\tDWORD dwCreationFlags,\n\tLPVOID lpEnvironment,\n\tLPCSTR lpCurrentDirectory,\n\tLPSTARTUPINFOA lpStartupInfo,\n\tLPPROCESS_INFORMATION lpProcessInformation\n)\n{\n\tstd::string strCommandLine = lpCommandLine;\n\n\tif (string::npos != strCommandLine.find(\"echo NOT SANDBOXED\"))\n\t{\n\t\t//MessageBoxA(GetActiveWindow(), strCommandLine.c_str(), \"createprocesA\", MB_OK);\n\t\treturn TRUE;\n\t}\n\telse\n\t{\n\t\treturn (prealCreateProcessA)(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation);\n\t}\n\n}\n\n\n\n\nvoid DoHook()\n{\n\n \tHMODULE hKernel32 = LoadLibrary(L\"kernel32.dll\");\n\n\tif (!(prealCreateProcessA = (realCreateProcessAPtr)GetProcAddress(hKernel32, \"CreateProcessA\")))\n\t{\n\t\tMessageBoxW(GetDesktopWindow(), L\"GetProcAddress Err\", L\"CreateProcessA\", MB_OK);\n\t\treturn;\n\t}\n\n\tif (!(prealCreateProcessW = (realCreateProcessWPtr)GetProcAddress(hKernel32, \"CreateProcessW\")))\n\t{\n\t\tMessageBoxW(GetDesktopWindow(), L\"GetProcAddress Err\", L\"CreateProcessW\", MB_OK);\n\t\treturn;\n\t}\n\n\n\tNTSTATUS resultA = LhInstallHook(prealCreateProcessA, MYCreateProcessA, NULL, &hAHookTrackInfo);\n\tNTSTATUS resultW = LhInstallHook(prealCreateProcessW, MYCreateProcessW, NULL, &hWHookTrackInfo);\n\n\n\tif (FAILED(resultA) || (FAILED(resultW)))\n\t{\n\t\tMessageBox(GetForegroundWindow(), _T(\"Hook Failed\"), _T(\"Error\"), MB_OK);\n\t}\n\n\n\tULONG ACLEntriesA[1] = { 0 };\n\tULONG ACLEntriesW[1] = { 0 };\n\n\t// If the threadId in the ACL is set to  0 ,\n\t// then internally EasyHook uses GetCurrentThreadId()\n\t// Disable the hook for the provided threadIds, enable for all others\n\tLhSetExclusiveACL(ACLEntriesA, 0, &hAHookTrackInfo);\n\tLhSetExclusiveACL(ACLEntriesW, 0, &hWHookTrackInfo);\n\n}\n\n\nvoid UnHook()\n{\n\n\t// this will also invalidate \"hHook\", because it is a traced handle...  \n\tLhUninstallAllHooks();\n\n\t// this will do nothing because the hook is already removed...  \n\tLhUninstallHook(&hAHookTrackInfo);\n\tLhUninstallHook(&hWHookTrackInfo);\n\n\t// even if the hook is removed, we need to wait for memory release  \n\tLhWaitForPendingRemovals();\n\n}"
  },
  {
    "path": "HookFlash/HookFlash.h",
    "content": "#pragma once\n#include \"stdafx.h\"\n\nvoid DoHook();\n\nvoid UnHook();"
  },
  {
    "path": "HookFlash/HookFlash.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectGuid>{CAF87436-915F-4088-BDDC-8BDAA08006D9}</ProjectGuid>\n    <Keyword>Win32Proj</Keyword>\n    <RootNamespace>HookFlash</RootNamespace>\n    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v140</PlatformToolset>\n    <CharacterSet>Unicode</CharacterSet>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v140</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Label=\"Shared\">\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>true</LinkIncremental>\n    <IncludePath>$(projectdir)EasyHook;$(IncludePath)</IncludePath>\n    <OutDir>$(SolutionDir)bin\\</OutDir>\n    <IntDir>$(solutiondir)Build\\$(ProjectName)</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <IncludePath>$(projectdir)EasyHook;$(IncludePath)</IncludePath>\n    <OutDir>$(SolutionDir)bin_d\\</OutDir>\n    <IntDir>$(solutiondir)Build\\$(ProjectName)</IntDir>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;HOOKFLASH_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;HOOKFLASH_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <SubSystem>Windows</SubSystem>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <Text Include=\"ReadMe.txt\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"HookFlash.h\" />\n    <ClInclude Include=\"stdafx.h\" />\n    <ClInclude Include=\"targetver.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"dllmain.cpp\">\n      <CompileAsManaged Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">false</CompileAsManaged>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n      </PrecompiledHeader>\n      <CompileAsManaged Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">false</CompileAsManaged>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n      </PrecompiledHeader>\n    </ClCompile>\n    <ClCompile Include=\"HookFlash.cpp\" />\n    <ClCompile Include=\"stdafx.cpp\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Create</PrecompiledHeader>\n    </ClCompile>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "HookFlash/HookFlash.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"源文件\">\n      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\n      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\n    </Filter>\n    <Filter Include=\"头文件\">\n      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\n      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>\n    </Filter>\n    <Filter Include=\"资源文件\">\n      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <Text Include=\"ReadMe.txt\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"stdafx.h\">\n      <Filter>头文件</Filter>\n    </ClInclude>\n    <ClInclude Include=\"targetver.h\">\n      <Filter>头文件</Filter>\n    </ClInclude>\n    <ClInclude Include=\"HookFlash.h\">\n      <Filter>头文件</Filter>\n    </ClInclude>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"stdafx.cpp\">\n      <Filter>源文件</Filter>\n    </ClCompile>\n    <ClCompile Include=\"HookFlash.cpp\">\n      <Filter>源文件</Filter>\n    </ClCompile>\n    <ClCompile Include=\"dllmain.cpp\">\n      <Filter>源文件</Filter>\n    </ClCompile>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "HookFlash/HookFlash.vcxproj.user",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup />\n</Project>"
  },
  {
    "path": "HookFlash/ReadMe.txt",
    "content": "﻿========================================================================\n    动态链接库：HookFlash 项目概述\n========================================================================\n\n应用程序向导已为您创建了此 HookFlash DLL。\n\n本文件概要介绍组成 HookFlash 应用程序的每个文件的内容。\n\n\nHookFlash.vcxproj\n    这是使用应用程序向导生成的 VC++ 项目的主项目文件，其中包含生成该文件的 Visual C++ 的版本信息，以及有关使用应用程序向导选择的平台、配置和项目功能的信息。\n\nHookFlash.vcxproj.filters\n    这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中，通过这种关联，在特定节点下以分组形式显示具有相似扩展名的文件。例如，“.cpp”文件与“源文件”筛选器关联。\n\nHookFlash.cpp\n    这是主 DLL 源文件。\n\n\t此 DLL 在创建时不导出任何符号。因此，生成时不会产生 .lib 文件。如果希望此项目成为其他某个项目的项目依赖项，则需要添加代码以从 DLL 导出某些符号，以便产生一个导出库，或者，也可以在项目“属性页”对话框中的“链接器”文件夹中，将“常规”属性页上的“忽略输入库”属性设置为“是”。\n\n/////////////////////////////////////////////////////////////////////////////\n其他标准文件:\n\nStdAfx.h, StdAfx.cpp\n    这些文件用于生成名为 HookFlash.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。\n\n/////////////////////////////////////////////////////////////////////////////\n其他注释:\n\n应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。\n\n/////////////////////////////////////////////////////////////////////////////\n"
  },
  {
    "path": "HookFlash/dllmain.cpp",
    "content": "// dllmain.cpp :  DLL Ӧóڵ㡣\n#include \"stdafx.h\"\n#include \"HookFlash.h\"\n\nBOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)\n{\n\tswitch (ul_reason_for_call)\n\t{\n\tcase DLL_PROCESS_ATTACH:\n\t{\n\t\tDoHook();\n\t}\n\tbreak;\n\tcase DLL_THREAD_ATTACH:\n\t\tbreak;\n\tcase DLL_THREAD_DETACH:\n\t\tbreak;\n\tcase DLL_PROCESS_DETACH:\n\t{\n\t\tUnHook();\n\t}\n\t\tbreak;\n\t}\n\treturn TRUE;\n}\n\n"
  },
  {
    "path": "HookFlash/stdafx.cpp",
    "content": "// stdafx.cpp : ֻ׼ļԴļ\n// HookFlash.pch ΪԤͷ\n// stdafx.obj ԤϢ\n\n#include \"stdafx.h\"\n\n// TODO:  STDAFX.H κĸͷļ\n//ڴļ\n"
  },
  {
    "path": "HookFlash/stdafx.h",
    "content": "// stdafx.h : ׼ϵͳļİļ\n// Ǿʹõĵ\n// ضĿİļ\n//\n\n#pragma once\n\n#include <easyhook.h>\n\n#include \"targetver.h\"\n\n#define WIN32_LEAN_AND_MEAN             //  Windows ͷųʹõ\n// Windows ͷļ: \n#include <windows.h>\n#include <tchar.h>\n#include <iostream>\n\n\n#if _WIN64\n#pragma comment(lib, \"EasyHook\\\\EasyHook64.lib\")\n#else\n#pragma comment(lib, \"EasyHook\\\\EasyHook32.lib\")\n#endif\n\n\n\n\n\n// TODO:  ڴ˴óҪͷļ\n"
  },
  {
    "path": "HookFlash/targetver.h",
    "content": "#pragma once\n\n//  SDKDDKVer.h õ߰汾 Windows ƽ̨\n\n// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h\n//  _WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h\n\n#include <SDKDDKVer.h>\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU Affero General Public License is a free, copyleft license for\nsoftware and other kinds of works, specifically designed to ensure\ncooperation with the community in the case of network server software.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nour General Public Licenses are intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  Developers that use our General Public Licenses protect your rights\nwith two steps: (1) assert copyright on the software, and (2) offer\nyou this License which gives you legal permission to copy, distribute\nand/or modify the software.\n\n  A secondary benefit of defending all users' freedom is that\nimprovements made in alternate versions of the program, if they\nreceive widespread use, become available for other developers to\nincorporate.  Many developers of free software are heartened and\nencouraged by the resulting cooperation.  However, in the case of\nsoftware used on network servers, this result may fail to come about.\nThe GNU General Public License permits making a modified version and\nletting the public access it on a server without ever releasing its\nsource code to the public.\n\n  The GNU Affero General Public License is designed specifically to\nensure that, in such cases, the modified source code becomes available\nto the community.  It requires the operator of a network server to\nprovide the source code of the modified version running there to the\nusers of that server.  Therefore, public use of a modified version, on\na publicly accessible server, gives the public access to the source\ncode of the modified version.\n\n  An older license, called the Affero General Public License and\npublished by Affero, was designed to accomplish similar goals.  This is\na different license, not a version of the Affero GPL, but Affero has\nreleased a new version of the Affero GPL which permits relicensing under\nthis license.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU Affero General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Remote Network Interaction; Use with the GNU General Public License.\n\n  Notwithstanding any other provision of this License, if you modify the\nProgram, your modified version must prominently offer all users\ninteracting with it remotely through a computer network (if your version\nsupports such interaction) an opportunity to receive the Corresponding\nSource of your version by providing access to the Corresponding Source\nfrom a network server at no charge, through some standard or customary\nmeans of facilitating copying of software.  This Corresponding Source\nshall include the Corresponding Source for any work covered by version 3\nof the GNU General Public License that is incorporated pursuant to the\nfollowing paragraph.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the work with which it is combined will remain governed by version\n3 of the GNU General Public License.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU Affero General Public License from time to time.  Such new versions\nwill be similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU Affero General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU Affero General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU Affero General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU Affero General Public License as published\n    by the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU Affero General Public License for more details.\n\n    You should have received a copy of the GNU Affero General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If your software can interact with users remotely through a computer\nnetwork, you should also make sure that it provides a way for users to\nget its source.  For example, if your program is a web application, its\ninterface could display a \"Source\" link that leads users to an archive\nof the code.  There are many ways you could offer source, and different\nsolutions will be better for different programs; see section 13 for the\nspecific requirements.\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU AGPL, see\n<http://www.gnu.org/licenses/>.\n"
  },
  {
    "path": "MiniDumper.cpp",
    "content": "#include \"stdafx.h\"\n#include <windows.h>\n#include <stdio.h>\n#include <assert.h>\n#include <time.h>\n#include <tchar.h>\n#include <dbghelp.h>\n#include \"miniDumper.h\"\n\n\n#ifdef UNICODE\n    #define _tcssprintf wsprintf\n    #define tcsplitpath _wsplitpath\n#else\n    #define _tcssprintf sprintf\n    #define tcsplitpath _splitpath\n#endif\n\nconst int USER_DATA_BUFFER_SIZE = 4096;\n\n//-----------------------------------------------------------------------------\n// GLOBALS\n//-----------------------------------------------------------------------------\nCMiniDumper* CMiniDumper::s_pMiniDumper = NULL;\nLPCRITICAL_SECTION CMiniDumper::s_pCriticalSection = NULL;\n\n// Based on dbghelp.h\ntypedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess,\n                                         DWORD dwPid,\n                                         HANDLE hFile,\n                                         MINIDUMP_TYPE DumpType,\n                                         CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,\n                                         CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,\n                                         CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam);\n\n//-----------------------------------------------------------------------------\n// Name: CMiniDumper()\n// Desc: Constructor\n//-----------------------------------------------------------------------------\nCMiniDumper::CMiniDumper( bool bPromptUserForMiniDump )\n{\n\t// Our CMiniDumper should act alone as a singleton.\n\tassert( !s_pMiniDumper );\n\n    s_pMiniDumper = this;\n    m_bPromptUserForMiniDump = bPromptUserForMiniDump;\n\n    // The SetUnhandledExceptionFilter function enables an application to \n    // supersede the top-level exception handler of each thread and process.\n    // After calling this function, if an exception occurs in a process \n    // that is not being debugged, and the exception makes it to the \n    // unhandled exception filter, that filter will call the exception \n    // filter function specified by the lpTopLevelExceptionFilter parameter.\n\t::SetUnhandledExceptionFilter( unhandledExceptionHandler );\n\n    // Since DBGHELP.dll is not inherently thread-safe, making calls into it \n    // from more than one thread simultaneously may yield undefined behavior. \n    // This means that if your application has multiple threads, or is \n    // called by multiple threads in a non-synchronized manner, you need to  \n    // make sure that all calls into DBGHELP.dll are isolated via a global\n    // critical section.\n    s_pCriticalSection = new CRITICAL_SECTION;\n\n    if( s_pCriticalSection )\n        InitializeCriticalSection( s_pCriticalSection );\n}\n\n//-----------------------------------------------------------------------------\n// Name: ~CMiniDumper()\n// Desc: Destructor\n//-----------------------------------------------------------------------------\nCMiniDumper::~CMiniDumper( void )\n{\n    if( s_pCriticalSection )\n    {\n        DeleteCriticalSection( s_pCriticalSection );\n        delete s_pCriticalSection;\n    }\n}\n\n//-----------------------------------------------------------------------------\n// Name: unhandledExceptionHandler()\n// Desc: Call-back filter function for unhandled exceptions\n//-----------------------------------------------------------------------------\nLONG CMiniDumper::unhandledExceptionHandler( _EXCEPTION_POINTERS *pExceptionInfo )\n{\n\tif( !s_pMiniDumper )\n\t\treturn EXCEPTION_CONTINUE_SEARCH;\n\n\treturn s_pMiniDumper->writeMiniDump( pExceptionInfo );\n}\n\n//-----------------------------------------------------------------------------\n// Name: setMiniDumpFileName()\n// Desc: \n//-----------------------------------------------------------------------------\nvoid CMiniDumper::setMiniDumpFileName( void )\n{\n    time_t currentTime;\n    time( &currentTime );\n\n    _tcssprintf( m_szMiniDumpPath,\n                 _T( \"%s%s.%ld.dmp\" ),\n                 m_szAppPath,\n                 m_szAppBaseName,\n                 currentTime );\n}\n\n//-----------------------------------------------------------------------------\n// Name: getImpersonationToken()\n// Desc: The method acts as a potential workaround for the fact that the \n//       current thread may not have a token assigned to it, and if not, the \n//       process token is received.\n//-----------------------------------------------------------------------------\nbool CMiniDumper::getImpersonationToken( HANDLE* phToken )\n{\n    *phToken = NULL;\n\n    if( !OpenThreadToken( GetCurrentThread(),\n                          TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES,\n                          TRUE,\n                          phToken) )\n    {\n        if( GetLastError() == ERROR_NO_TOKEN )\n        {\n            // No impersonation token for the current thread is available. \n            // Let's go for the process token instead.\n            if( !OpenProcessToken( GetCurrentProcess(),\n                                   TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES,\n                                   phToken) )\n                return false;\n        }\n        else\n            return false;\n    }\n\n    return true;\n}\n\n//-----------------------------------------------------------------------------\n// Name: enablePrivilege()\n// Desc: Since a MiniDump contains a lot of meta-data about the OS and \n//       application state at the time of the dump, it is a rather privileged \n//       operation. This means we need to set the SeDebugPrivilege to be able \n//       to call MiniDumpWriteDump.\n//-----------------------------------------------------------------------------\nBOOL CMiniDumper::enablePrivilege( LPCTSTR pszPriv, HANDLE hToken, TOKEN_PRIVILEGES* ptpOld )\n{\n    BOOL bOk = FALSE;\n\n    TOKEN_PRIVILEGES tp;\n    tp.PrivilegeCount = 1;\n    tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;\n    bOk = LookupPrivilegeValue( 0, pszPriv, &tp.Privileges[0].Luid );\n\n    if( bOk )\n    {\n        DWORD cbOld = sizeof(*ptpOld);\n        bOk = AdjustTokenPrivileges( hToken, FALSE, &tp, cbOld, ptpOld, &cbOld );\n    }\n\n    return (bOk && (ERROR_NOT_ALL_ASSIGNED != GetLastError()));\n}\n\n//-----------------------------------------------------------------------------\n// Name: restorePrivilege()\n// Desc: \n//-----------------------------------------------------------------------------\nBOOL CMiniDumper::restorePrivilege( HANDLE hToken, TOKEN_PRIVILEGES* ptpOld )\n{\n    BOOL bOk = AdjustTokenPrivileges(hToken, FALSE, ptpOld, 0, NULL, NULL);\n    return ( bOk && (ERROR_NOT_ALL_ASSIGNED != GetLastError()) );\n}\n\n//-----------------------------------------------------------------------------\n// Name: writeMiniDump()\n// Desc: \n//-----------------------------------------------------------------------------\nLONG CMiniDumper::writeMiniDump( _EXCEPTION_POINTERS *pExceptionInfo )\n{\n\tLONG retval = EXCEPTION_CONTINUE_SEARCH;\n\tm_pExceptionInfo = pExceptionInfo;\n\n    HANDLE hImpersonationToken = NULL;\n    if( !getImpersonationToken( &hImpersonationToken ) )\n        return FALSE;\n\n\t// You have to find the right dbghelp.dll. \n\t// Look next to the EXE first since the one in System32 might be old (Win2k)\n\t\n\tHMODULE hDll = NULL;\n\tTCHAR szDbgHelpPath[MAX_PATH];\n\n\tif( GetModuleFileName( NULL, m_szAppPath, _MAX_PATH ) )\n\t{\n\t\tTCHAR *pSlash = _tcsrchr( m_szAppPath, '\\\\' );\n\n\t\tif( pSlash )\n\t\t{\n\t\t\t_tcscpy_s( m_szAppBaseName, pSlash + 1);\n\t\t\t*(pSlash+1) = 0;\n\t\t}\n\n\t\t_tcscpy_s( szDbgHelpPath, m_szAppPath );\n        _tcscat_s( szDbgHelpPath, _T(\"DBGHELP.DLL\") );\n\t\thDll = ::LoadLibrary( szDbgHelpPath );\n\t}\n\n\tif( hDll == NULL )\n\t{\n\t\t// If we haven't found it yet - try one more time.\n\t\thDll = ::LoadLibrary( _T(\"DBGHELP.DLL\") );\n\t}\n\n\tLPCTSTR szResult = NULL;\n\n\tif( hDll )\n\t{\n        // Get the address of the MiniDumpWriteDump function, which writes \n        // user-mode mini-dump information to a specified file.\n\t\tMINIDUMPWRITEDUMP MiniDumpWriteDump = \n            (MINIDUMPWRITEDUMP)::GetProcAddress( hDll, \"MiniDumpWriteDump\" );\n\n\t\tif( MiniDumpWriteDump != NULL )\n        {\n\t\t\tTCHAR szScratch[USER_DATA_BUFFER_SIZE];\n\n\t\t\tsetMiniDumpFileName();\n\n\t\t\t// Ask the user if he or she wants to save a mini-dump file...\n\t\t\t_tcssprintf( szScratch,\n                         _T(\"There was an unexpected error:\\n\\nWould you \")\n                         _T(\"like to create a mini-dump file?\\n\\n%s \" ),\n                         m_szMiniDumpPath);\n\n\t\t\t// Create the mini-dump file...\n\t\t\tHANDLE hFile = ::CreateFile( m_szMiniDumpPath, \n                                            GENERIC_WRITE, \n                                            FILE_SHARE_WRITE, \n                                            NULL, \n                                            CREATE_ALWAYS, \n                                            FILE_ATTRIBUTE_NORMAL, \n                                            NULL );\n\n\t\t\tif( hFile != INVALID_HANDLE_VALUE )\n\t\t\t{\n\t\t\t\t_MINIDUMP_EXCEPTION_INFORMATION ExInfo;\n\t\t\t\tExInfo.ThreadId          = ::GetCurrentThreadId();\n\t\t\t\tExInfo.ExceptionPointers = pExceptionInfo;\n\t\t\t\tExInfo.ClientPointers    = NULL;\n\n                // We need the SeDebugPrivilege to be able to run MiniDumpWriteDump\n                TOKEN_PRIVILEGES tp;\n                BOOL bPrivilegeEnabled = enablePrivilege( SE_DEBUG_NAME, hImpersonationToken, &tp );\n\n                BOOL bOk;\n\n                // DBGHELP.dll is not thread-safe, so we need to restrict access...\n                EnterCriticalSection( s_pCriticalSection );\n                {\n\t\t\t\t\t// Write out the mini-dump data to the file...\n                    bOk = MiniDumpWriteDump( GetCurrentProcess(),\n                                                GetCurrentProcessId(),\n                                                hFile,\n                                                MiniDumpNormal,\n                                                &ExInfo,\n                                                NULL,\n                                                NULL );\n                }\n                LeaveCriticalSection( s_pCriticalSection );\n\n                // Restore the privileges when done\n                if( bPrivilegeEnabled )\n\t                restorePrivilege( hImpersonationToken, &tp );\n\n                if( bOk )\n\t\t\t\t{\n\t\t\t\t\tszResult = NULL;\n\t\t\t\t\tretval = EXCEPTION_EXECUTE_HANDLER;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t_tcssprintf( szScratch,\n                                    _T(\"Failed to save the mini-dump file to '%s' (error %d)\"),\n                                    m_szMiniDumpPath,\n                                    GetLastError() );\n\n\t\t\t\t\tszResult = szScratch;\n\t\t\t\t}\n\n\t\t\t\t::CloseHandle( hFile );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t_tcssprintf( szScratch,\n                                _T(\"Failed to create the mini-dump file '%s' (error %d)\"),\n                                m_szMiniDumpPath,\n                                GetLastError() );\n\n\t\t\t\tszResult = szScratch;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tszResult = _T( \"Call to GetProcAddress failed to find MiniDumpWriteDump. \")\n                       _T(\"The DBGHELP.DLL is possibly outdated.\" );\n\t\t}\n\t}\n\telse\n\t{\n\t\tszResult = _T( \"Call to LoadLibrary failed to find DBGHELP.DLL.\" );\n\t}\n\n\tif( szResult && m_bPromptUserForMiniDump )\n\t\t::MessageBox( NULL, szResult, NULL, MB_OK );\n\n\tTerminateProcess( GetCurrentProcess(), 0 );\n\n\treturn retval;\n}\n\n"
  },
  {
    "path": "MiniDumper.h",
    "content": "#ifndef MINIDUMPER_H\n#define MINIDUMPER_H\n\n#include <windows.h>\n\n// ޷֤Դdumper˵ǵ¿Ĳִ룬˽ĿעȨ\n\nclass CMiniDumper\n{\npublic:\n\n    CMiniDumper(bool bPromptUserForMiniDump);\n    ~CMiniDumper(void);\n\nprivate:\n\n    static LONG WINAPI unhandledExceptionHandler(struct _EXCEPTION_POINTERS *pExceptionInfo);\n    void setMiniDumpFileName(void);\n    bool getImpersonationToken(HANDLE* phToken);\n    BOOL enablePrivilege(LPCTSTR pszPriv, HANDLE hToken, TOKEN_PRIVILEGES* ptpOld);\n    BOOL restorePrivilege(HANDLE hToken, TOKEN_PRIVILEGES* ptpOld);\n    LONG writeMiniDump(_EXCEPTION_POINTERS *pExceptionInfo );\n\n    _EXCEPTION_POINTERS *m_pExceptionInfo;\n    TCHAR m_szMiniDumpPath[MAX_PATH];\n    TCHAR m_szAppPath[MAX_PATH];\n    TCHAR m_szAppBaseName[MAX_PATH];\n    bool m_bPromptUserForMiniDump;\n\n    static CMiniDumper* s_pMiniDumper;\n    static LPCRITICAL_SECTION s_pCriticalSection;\n};\n\n#endif // MINIDUMPER_H\n"
  },
  {
    "path": "README.md",
    "content": "# CEFWebkitBrowser\n Chromium Embedded Framework 3 是基于Google Chromium的Webbrowser控件。CEF支持一系列的编程语言(.net c++ c)和操作系统(windows,linux,os)，能很容易地整合到已有的工程中。\n \n \n项目是基于duilib和CEF3的简单浏览器，只有基本的框架没有实现复杂的功能，主要用于CEF的学习参考，使用vs2015编译。\n \t\n \t\nCEF用的是 https://cefbuilds.com/ 下载的编译好的版本，现在采用的是Branch 2704-Windows 32bit，下载后拷贝到CEF文件夹即可，\n详看http://blog.csdn.net/x356982611/article/details/52174234\n\n这个里面收集了一些CEF的文档和资料，可以参考学习\nhttps://github.com/fanfeilong/cefutil\n\n编译好程序下载地址: http://download.csdn.net/detail/x356982611/9623253\n\n![image](https://github.com/CodeBees/CEFWebkitBrowser/blob/master/show.png)\n"
  },
  {
    "path": "ReadMe.txt",
    "content": "﻿========================================================================\n    WIN32 应用程序：CEFWebkitBrowser 项目概述\n========================================================================\n\n应用程序向导已为您创建了此 CEFWebkitBrowser 应用程序。\n\n本文件概要介绍组成 CEFWebkitBrowser 应用程序的每个文件的内容。\n\n\nCEFWebkitBrowser.vcxproj\n    这是使用应用程序向导生成的 VC++ 项目的主项目文件，其中包含生成该文件的 Visual C++ 的版本信息，以及有关使用应用程序向导选择的平台、配置和项目功能的信息。\n\nCEFWebkitBrowser.vcxproj.filters\n    这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中，通过这种关联，在特定节点下以分组形式显示具有相似扩展名的文件。例如，“.cpp”文件与“源文件”筛选器关联。\n\nCEFWebkitBrowser.cpp\n    这是主应用程序源文件。\n\n/////////////////////////////////////////////////////////////////////////////\n应用程序向导创建了下列资源：\n\nCEFWebkitBrowser.rc\n    这是程序使用的所有 Microsoft Windows 资源的列表。它包括 RES 子目录中存储的图标、位图和光标。此文件可以直接在 Microsoft Visual C++ 中进行编辑。\n\nResource.h\n    这是标准头文件，可用于定义新的资源 ID。Microsoft Visual C++ 将读取并更新此文件。\n\nCEFWebkitBrowser.ico\n    这是用作应用程序图标 (32x32) 的图标文件。此图标包括在主资源文件 CEFWebkitBrowser.rc 中。\n\nsmall.ico\n    这是一个图标文件，其中包含应用程序的图标的较小版本 (16x16)。此图标包括在主资源文件 CEFWebkitBrowser.rc 中。\n\n/////////////////////////////////////////////////////////////////////////////\n其他标准文件:\n\nStdAfx.h, StdAfx.cpp\n    这些文件用于生成名为 CEFWebkitBrowser.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。\n\n/////////////////////////////////////////////////////////////////////////////\n其他注释:\n\n应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。\n\n/////////////////////////////////////////////////////////////////////////////\n"
  },
  {
    "path": "Resource.h",
    "content": "//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ generated include file.\n// Used by CEFWebkitBrowser.rc\n//\n\n#define IDS_APP_TITLE\t\t\t103\n\n#define IDR_MAINFRAME\t\t\t128\n#define IDD_CEFWEBKITBROWSER_DIALOG\t102\n#define IDD_ABOUTBOX\t\t\t103\n#define IDM_ABOUT\t\t\t\t104\n#define IDM_EXIT\t\t\t\t105\n#define IDI_CEFWEBKITBROWSER\t\t\t107\n#define IDI_SMALL\t\t\t\t108\n#define IDC_CEFWEBKITBROWSER\t\t\t109\n#define IDC_MYICON\t\t\t\t2\n#ifndef IDC_STATIC\n#define IDC_STATIC\t\t\t\t-1\n#endif\n// ¶һĬֵ\n//\n#ifdef APSTUDIO_INVOKED\n#ifndef APSTUDIO_READONLY_SYMBOLS\n\n#define _APS_NO_MFC\t\t\t\t\t130\n#define _APS_NEXT_RESOURCE_VALUE\t129\n#define _APS_NEXT_COMMAND_VALUE\t\t32771\n#define _APS_NEXT_CONTROL_VALUE\t\t1000\n#define _APS_NEXT_SYMED_VALUE\t\t110\n#endif\n#endif\n"
  },
  {
    "path": "bin/Skin/skin.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>\n<Window size=\"1200,800\" sizebox=\"8,0,8,8\" caption=\"0,0,0,50\" mininfo=\"800,600\">\n    <Default name=\"OptionEx\" value=\"bordersize=&quot;0&quot; float=&quot;f&quot; align=&quot;center&quot; normalimage=&quot;file=&apos;TabBtnBk.png&apos; source=&apos;0,0,87,30&apos; corner=&apos;15,15,15,15&apos;&quot; hotimage=&quot;file=&apos;TabBtnBk.png&apos; corner=&apos;15,15,15,15&apos; source=&apos;87,0,174,30&apos;&quot; selectedimage=&quot;file=&apos;TabBtnBk.png&apos; corner=&apos;15,15,15,15&apos; source=&apos;174,0,261,30&apos;&quot;\" />\n    <Default name=\"OptionEx2\" value=\"bordersize=&quot;0&quot; float=&quot;f&quot; align=&quot;center&quot; normalimage=&quot;file=&apos;TabBtnBk.png&apos; source=&apos;0,0,87,30&apos; corner=&apos;2,1,2,1&apos;&quot; hotimage=&quot;file=&apos;TabBtnBk.png&apos; corner=&apos;2,1,2,1&apos; source=&apos;87,0,174,30&apos;&quot; selectedimage=&quot;file=&apos;TabBtnBk.png&apos; corner=&apos;2,1,2,1&apos; source=&apos;174,0,261,30&apos;&quot;\" />\n    <VerticalLayout name=\"framework\" bkcolor=\"#FFFFFFFF\" inset=\"2,0,2,1\">\n        <HorizontalLayout name=\"title\" height=\"27\" bkcolor=\"#FF808080\">\n            <VerticalLayout inset=\"10,4,0,0\">\n                <Label text=\"CEF Browser\" width=\"478\" height=\"18\" textcolor=\"#00FFFFFF\" disabledtextcolor=\"#FFA7A6AA\" align=\"center\" valign=\"center\" />\n            </VerticalLayout>\n            <HorizontalLayout width=\"100\" height=\"20\">\n                <Button name=\"minbtn\" width=\"32\" height=\"19\" textcolor=\"#FF000000\" disabledtextcolor=\"#FFA7A6AA\" align=\"center\" valign=\"center\" normalimage=\"file=&apos;title_min.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;0,0,32,20&apos;\" hotimage=\"file=&apos;title_min.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;32,0,64,20&apos;\" pushedimage=\"file=&apos;title_min.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;64,0,96,20&apos;\" />\n                <Button name=\"maxbtn\" width=\"32\" height=\"20\" textcolor=\"#FF000000\" disabledtextcolor=\"#FFA7A6AA\" align=\"center\" valign=\"center\" normalimage=\"file=&apos;title_max.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;0,0,32,20&apos;\" hotimage=\"file=&apos;title_max.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;32,0,64,20&apos;\" pushedimage=\"file=&apos;title_max.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;64,0,96,20&apos;\" />\n                <Button name=\"restorebtn\" visible=\"false\" textcolor=\"#FF000000\" disabledtextcolor=\"#FFA7A6AA\" align=\"center\" valign=\"center\" normalimage=\"file=&apos;title_restore.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;0,0,32,20&apos;\" hotimage=\"file=&apos;title_restore.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;32,0,64,20&apos;\" pushedimage=\"file=&apos;title_restore.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;64,0,96,20&apos;\" />\n                <Button name=\"ui_btn_close\" width=\"32\" height=\"21\" textcolor=\"#FF000000\" disabledtextcolor=\"#FFA7A6AA\" align=\"center\" valign=\"center\" normalimage=\"file=&apos;title_close.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;0,0,32,20&apos;\" hotimage=\"file=&apos;title_close.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;32,0,64,20&apos;\" pushedimage=\"file=&apos;title_close.png&apos; dest=&apos;0,0,32,20&apos; source=&apos;64,0,96,20&apos;\" />\n            </HorizontalLayout>\n        </HorizontalLayout>\n        <HorizontalLayout name=\"ui_hl_urltabs\" height=\"30\">\n            <Option name=\"ui_btn_newpage\" tooltip=\"添加新页签\" width=\"28\" height=\"30\" textcolor=\"#FF000000\" disabledtextcolor=\"#FFA7A6AA\" align=\"center\" valign=\"center\" normalimage=\"file=&apos;newtab.png&apos; dest=&apos;0,6,28,24&apos;\" group=\"ui_grp_webtab\" selectedimage=\"file=&apos;newtab.png&apos; dest=&apos;0,6,28,24&apos;\" selectedpushedimage=\"file=&apos;newtab_p.png&apos; dest=&apos;0,6,28,24&apos;\" selectedhotimage=\"file=&apos;newtab_h.png&apos; dest=&apos;0,6,28,24&apos;\" selectedtextcolor=\"#FF000000\" />\n        </HorizontalLayout>\n        <VerticalLayout height=\"60\" bkimage=\"Main-Tab.png\" bkcolor=\"#FFFFFBF0\" childpadding=\"2\">\n            <Control />\n            <HorizontalLayout height=\"30\">\n                <Control width=\"4\" height=\"28\" />\n                <Button name=\"ui_btn_home\" width=\"32\" height=\"27\" textcolor=\"#FF000000\" disabledtextcolor=\"#FFA7A6AA\" align=\"center\" valign=\"center\" normalimage=\"file=&apos;home.png&apos; dest=&apos;4,4,28,23&apos;\" pushedimage=\"file=&apos;home-push.png&apos; dest=&apos;4,4,28,23&apos;\" />\n                <Control width=\"4\" height=\"28\" />\n                <Button name=\"ui_btn_goback\" width=\"32\" height=\"27\" enabled=\"false\" textcolor=\"#FF000000\" disabledtextcolor=\"#FFA7A6AA\" align=\"center\" valign=\"center\" normalimage=\"file=&apos;CB_previews.png&apos; dest=&apos;4,4,28,23&apos;\" pushedimage=\"file=&apos;previews-push.png&apos; dest=&apos;4,4,28,23&apos;\" disabledimage=\"file=&apos;CB_previews-disable.png&apos; dest=&apos;4,4,28,23&apos;\" pushedbkcolor=\"#FF800080\" />\n                <Control width=\"4\" height=\"28\" />\n                <Button name=\"ui_btn_goforward\" width=\"32\" height=\"27\" enabled=\"false\" textcolor=\"#FF000000\" disabledtextcolor=\"#FFA7A6AA\" align=\"center\" valign=\"center\" normalimage=\"file=&apos;CB_next.png&apos; dest=&apos;4,4,28,23&apos;\" pushedimage=\"file=&apos;next-push.png&apos; dest=&apos;4,4,28,23&apos;\" disabledimage=\"file=&apos;CB_next -disable.png&apos; dest=&apos;4,4,28,23&apos;\" />\n                <Control width=\"4\" height=\"28\" />\n                <Button name=\"ui_btn_refresh\" width=\"32\" height=\"27\" textcolor=\"#FF000000\" disabledtextcolor=\"#FFA7A6AA\" align=\"center\" valign=\"center\" normalimage=\"file=&apos;refresh.png&apos; dest=&apos;6,4,25,23&apos;\" pushedimage=\"file=&apos;refresh-push.png&apos; dest=&apos;6,4,25,23&apos;\" />\n                <Control width=\"4\" height=\"28\" />\n                <RichEdit name=\"ui_et_urlinput\" height=\"27\" bkimage=\"URL-Tab.png\" textpadding=\"4,8,0,0\" wantreturn=\"false\" multiline=\"false\" align=\"left\" />\n                <Control width=\"4\" height=\"28\" />\n                <Edit name=\"ui_et_search\" tooltip=\"搜索\" width=\"142\" height=\"27\" bkimage=\"Search-Tab.png\" bkcolor=\"#FFD8D8D8\" textpadding=\"4,4,0,0\" textcolor=\"#FF000000\" disabledtextcolor=\"#FFA7A6AA\" align=\"left\" valign=\"center\" nativebkcolor=\"#FFD8D8D8\" />\n                <Control width=\"4\" height=\"28\" />\n            </HorizontalLayout>\n            <Control />\n        </VerticalLayout>\n        <HorizontalLayout>\n            <CEFWebkitBrowser height=\"0\" name=\"CEFWebkitBrowserUI1\" size=\"0, 0\" width=\"0\" />\n        </HorizontalLayout>\n        <HorizontalLayout height=\"20\">\n            <Label name=\"ui_lbl_status\" bkcolor=\"#FFA0A0A4\" textcolor=\"#FF000000\" disabledtextcolor=\"#FFA7A6AA\" align=\"left\" valign=\"center\" />\n        </HorizontalLayout>\n    </VerticalLayout>\n</Window>\n"
  },
  {
    "path": "bin/htmlexample/css/style.css",
    "content": "html, body, div, ul {\n\tmargin: 0;\n\tpadding: 2;\n}\n\nbody {\n    color: #262626;\n\n\n}\n\n#content {\n\twidth: 400px;\n\tmargin: 40px auto 0 auto;\n\tpadding: 0 60px 30px 60px;\n\tborder: solid 0px #cbcbcb;\n\n\t-moz-box-shadow: 0px 0px 10px #cbcbcb;\n\t-webkit-box-shadow: 0px 0px 10px #cbcbcb;\n}\n\nh1 {\n\tmargin: 30px 0 15px 0;\n\tfont-size: 30px;\n\tfont-weight: bold;\n\tfont-family: Arial;\n}\n\nh1 span {\n\tfont-size: 50%;\n\tletter-spacing: -0.05em;\n}\n\nhr {\n\tborder: none;\n\theight: 1px; line-height: 1px;\n\tbackground: #E5E5E5;\n\tmargin-bottom: 20px;\n\tpadding: 0;\n}\n\np {\n\tmargin: 0;\n\tpadding: 7px 0;\n}\n\na {\n\toutline: none;\n}\n\na img {\n\tborder: none;\n\n}\n\na img.last {\n\tmargin-right: 0;\t\n}\n\nul {\n\tmargin-bottom: 24px;\n\tpadding-left: 30px;\n}\n"
  },
  {
    "path": "bin/htmlexample/css/style_1_common.css",
    "content": "*{word-wrap:break-word;}body{background:#FFF url(\"http://www.52pojie.cn/static/image/common/background.png\") repeat-x 0 0;}body,input,button,select,textarea{font:12px/1.5 Tahoma,Helvetica,SimSun,sans-serif;color:#444;}textarea{resize:none;}body,ul,ol,li,dl,dd,p,h1,h2,h3,h4,h5,h6,form,fieldset,.pr,.pc{margin:0;padding:0;}table{empty-cells:show;border-collapse:collapse;}caption,th{text-align:left;font-weight:400;}ul li,.xl li{list-style:none;}h1,h2,h3,h4,h5,h6{font-size:1em;}em,cite,i{font-style:normal;}a{color:#333;text-decoration:none;}a:hover{text-decoration:underline;}a img{border:none;}label{cursor:pointer;}.z{float:left;}.y{float:right;}.cl:after{content:\".\";display:block;height:0;clear:both;visibility:hidden;}.cl{zoom:1;}.hidefocus{outline:none;}hr{display:block;clear:both;*margin-top:-8px !important;*margin-bottom:-8px !important;}.mn hr,.sd hr{margin:0 10px;}.area hr{margin-left:0 !important;margin-right:0 !important;}hr.l{height:1px;border:none;background:#CDCDCD;color:#CDCDCD;}hr.l2{height:2px;}hr.l3{height:3px;}hr.da{height:0;border:none;border-top:1px dashed #CDCDCD;background:transparent;color:transparent;}hr.bk{margin-bottom:10px !important;*margin-bottom:2px !important;height:0;border:none;border-top:1px solid #FFF;background:transparent;color:transparent;}.n .sd hr.bk{border-top-color:#F9F9F9;}hr.m0{margin-left:0;margin-right:0;}.wx,.ph{font-family:'Microsoft YaHei','Hiragino Sans GB','STHeiti',Tahoma,'SimHei',sans-serif;font-weight:100;} .ph{font-size:20px;} .mt{padding:10px 0;font-size:16px;} .pipe{margin:0 5px;color:#CCC;}.xs0{font-family:Tahoma,Helvetica,sans-serif;font-size:0.83em;-webkit-text-size-adjust:none;}.xs1{font-size:12px !important;}.xs2{font-size:14px !important;}.xs3{font-size:16px !important;}.xg1,.xg1 a{color:#999 !important;}.xg1 .xi2{color:#369 !important;}.xg2{color:#666;}.xi1,.onerror{color:#F26C4F;}.xi2,.xi2 a,.xi3 a{color:#369;}.xw0{font-weight:400;}.xw1{font-weight:700;}.bbda{border-bottom:1px dashed #CDCDCD;}.btda{border-top:1px dashed #CDCDCD;}.bbs{border-bottom:1px solid #CDCDCD !important;}.bts{border-top:1px dashed #CDCDCD !important;}.bw0{border:none !important;}.bw0_all,.bw0_all th,.bw0_all td{border:none !important;}.bg0_c{background-color:transparent !important;}.bg0_i{background-image:none !important;}.bg0_all{background:none !important;}.ntc_l{padding:5px 10px;background:#FEFEE9;}.ntc_l .d{width:20px;height:20px;background:url(http://www.52pojie.cn/static/image/common/op.png) no-repeat 0 0;line-height:9999px;overflow:hidden;}.ntc_l .d:hover{background-position:0 -20px;}.brs,.avt img,.oshr{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;}.brm{-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}.brw{-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;}.mtn{margin-top:5px !important;}.mbn{margin-bottom:5px !important;}.mtm{margin-top:10px !important;}.mbm{margin-bottom:10px !important;}.mtw{margin-top:20px !important;}.mbw{margin-bottom:20px !important;}.ptn{padding-top:5px !important;}.pbn{padding-bottom:5px !important;}.ptm{padding-top:10px !important;}.pbm{padding-bottom:10px !important;}.ptw{padding-top:20px !important;}.pbw{padding-bottom:20px !important;}.avt img{padding:2px;width:48px;height:48px;background:#FFF;border:1px solid;border-color:#F2F2F2 #CDCDCD #CDCDCD #F2F2F2;}.avtm img{width:120px;height:auto;}.avts img{width:24px;height:24px;vertical-align:middle;}.emp{padding:20px 10px;}.emp a{color:#369;text-decoration:underline !important;}.vm{vertical-align:middle;}.vm *{vertical-align:middle;}.hm{text-align:center;}.alt,.alt th,.alt td{background-color:#F2F2F2;}.notice{clear:both;margin:5px 0;padding:3px 5px 3px 20px;background:url(http://www.52pojie.cn/static/image/common/notice.gif) no-repeat 2px 6px;}#ajaxwaitid{display:none;position:absolute;right:0;top:0;z-index:1;padding:0 5px;background:#D00;color:#FFF;}.showmenu{padding-right:16px;background:url(http://www.52pojie.cn/static/image/common/arrwd.gif) no-repeat 100% 50%;cursor:pointer;white-space:nowrap;}#um .showmenu{margin-right:-5px;}.cur1{cursor:pointer;}.ie6 .sec .p_pop{white-space:expression(this.offsetWidth >= 220 ? 'normal':'nowrap');width:expression(this.offsetWidth >= 220 ? 200:'auto');} .rq{color:red;}.px,.pt,.ps,select{border:1px solid;border-color:#848484 #E0E0E0 #E0E0E0 #848484;background:#FFF url(http://www.52pojie.cn/static/image/common/px.png) repeat-x 0 0;color:;}.px,.pt{padding:2px 4px;line-height:17px;}.px{height:17px;}.pxs{width:30px !important;}.fdiy .tfm .px,.fdiy .tfm .pt{width:auto;}.p_fre{width:auto !important;}.er{border-color:#F66 #FFBDB9 #FFBDB9 #F66;background-color:#FDF4F4;background-image:url(http://www.52pojie.cn/static/image/common/px_e.png);}.pt{overflow-y:auto;}div.pt{height:100px;line-height:100px;}.ps,select{padding:2px 2px 2px 1px;}.pts{vertical-align:top;overflow:hidden;}.cmt .pts{width:60%;}button::-moz-focus-inner{border:0;padding:0;}.pn{vertical-align:middle;overflow:hidden;margin-right:3px;padding:0;height:23px;border:1px solid #999;background:#E5E5E5 url(http://www.52pojie.cn/static/image/common/pn.png) repeat-x 0 0;cursor:pointer;-moz-box-shadow:0 1px 0 #E5E5E5;-webkit-box-shadow:0 1px 0 #E5E5E5;box-shadow:0 1px 0 #E5E5E5;}.pn:active{background-position:0 -23px;}.ie6 .pn{overflow-x:visible;width:0;}.pn em,.pn span,.pn strong{padding:0 10px;line-height:21px;}.pn em,.pn strong{font-weight:700;}.ie7 .pn em,.ie7 .pn span,.ie7 .pn strong{padding:0 5px;line-height:18px;}a.pn{height:21px;line-height:21px;color:#444 !important;}a.pn:hover{text-decoration:none;}.ie6 a.pn{width:auto;}.ie6 a.pn em,.ie6 a.pn span,.ie6 a.pn strong{display:block;}.ie7 a.pn em,.ie7 a.pn span,.ie7 a.pn strong{line-height:21px;}.pnc,a.pnc{border-color:#235994;background-color:#06C;background-position:0 -48px;color:#FFF !important;}.pnc:active{background-position:0 -71px;}.pnpost .pn{height:26px;}.pr,.pc{vertical-align:middle;margin:0 5px 1px 0;padding:0;}.ie6 .pr,.ie6 .pc,.ie7 .pr,.ie7 .pc{margin-right:2px;}.lb{margin-right:20px;}.pns .px{}.pns .pn{}.ftid{float:left;margin-right:6px;}.ftid select{float:left;height:23px;}.ftid a{display:block;overflow:hidden;padding:0 17px 0 4px;height:21px;line-height:21px;text-decoration:none !important;font-size:12px;font-weight:400;color:#444 !important;border:1px solid;border-color:#848484 #E0E0E0 #E0E0E0 #848484;background:#FFF url(http://www.52pojie.cn/static/image/common/newarow.gif) no-repeat 100% 0;}.ftid a:hover,.ftid a:focus{background-position:100% -23px;}.ftid select{width:94px;}.sslt a{width:54px;}.sslt select{width:60px;}.sltm{padding:5px 11px 5px 10px;border:1px solid #DDD;background-color:#FFF;text-align:left;}.sltm li{padding:2px 0;color:#666;cursor:pointer;}.sltm li:hover{color:#369;}.sltm li.current{color:#F26C4F;} .oshr{float:right;margin-left:5px;padding:0 5px 0 22px;border:1px solid;border-color:#CCC #A9A9A9 #A9A9A9 #CCC;background:#FFF url(http://www.52pojie.cn/static/image/common/oshr.png) no-repeat 5px 50%;}.oshr:hover{text-decoration:none;} .ofav{background-image:url(http://www.52pojie.cn/static/image/common/fav.gif);} .oivt{background-image:url(http://www.52pojie.cn/static/image/common/activitysmall.gif);}.tfm{width:100%;}.tfm caption,.tfm th,.tfm td{vertical-align:top;padding:7px 0;}.tfm caption h2{font-size:16px;}.vt th,.vt td{vertical-align:top;}.tfm th{padding-top:9px;padding-right:5px;width:130px;}.tfm th .rq{float:right;font-size:14px;}.tfm .pt,.tfm .px{margin-right:3px;width:330px;}.tfm .c,.tfm .tedt,.m_c .tfm .tedt{width:338px;}.tfm .d{clear:both;margin:5px 0;color:#999;}.tfm .d em{margin-left:5px;color:red;}.tfm .d strong{margin-left:5px;}.tfm .d a{color:#369;}.tfm .p{text-align:right;}.tfm .pcl label{display:block;padding:0 2px 5px;}.tfm .pcl .pc{margin-right:5px;padding:0;}.tfm .l th,.tfm .l td{padding-top:0;padding-bottom:0;}.bn .tfm caption,.bn .tfm th,.bn .tfm td{padding-top:5px;padding-bottom:5px;}.pbt{margin-bottom:10px;}.ie6 .pbt .ftid a,.ie7 .pbt .ftid a{margin-top:1px;}#custominfo.mtn{margin-bottom:-5px;}.altw{width:350px;}.altw .fltc{margin-bottom:0;padding:8px;}.alert_right,.alert_error,.alert_info{padding:6px 0 6px 58px;min-height:40px;height:auto !important;height:40px;line-height:160%;background:url(http://www.52pojie.cn/static/image/common/right.gif) no-repeat 8px 8px;font-size:14px;}.alert_error{background-image:url(http://www.52pojie.cn/static/image/common/error.gif);}.alert_error a{font-weight:700;color:#369;}.alert_info{background-image:url(http://www.52pojie.cn/static/image/common/info.gif);}.alert_btnleft{margin-top:8px;}.alert_btn{margin-top:20px;text-align:center;}.alert_act{margin-top:20px;padding-left:58px;}.pbnv{float:left;white-space:nowrap;overflow:hidden;width:400px;padding:7px 0;}.pbl{overflow:hidden;margin:9px 0;width:621px;border-width:1px 0 1px 1px;border-style:solid;border-color:#CCC;background:#FFF;}.pbl li{float:left;overflow-x:hidden;overflow-y:auto;padding:5px;width:196px;height:300px;border-right:1px solid #CCC;}.pbl p{height:25px;line-height:25px;}.pbl a{display:block;white-space:nowrap;overflow:hidden;padding:0 4px;text-decoration:none;color:#369;border:solid #FFF;border-width:1px 0;}.pbl a:hover{text-decoration:none;background-color:#F3F3F3;}.pbl .highlightlink{color:#08C;}.pbls a,.pbls a:hover{background-color:#EEE;color:#666;font-weight:700;}.pbsb{background:url(http://www.52pojie.cn/static/image/common/arrow.gif) right -33px no-repeat;} .wp{margin:0 auto;width:960px;}#wp .wp{width:auto;}#toptb{min-width:960px;border-bottom:1px solid #CDCDCD;background:#F2F2F2;line-height:28px;}#toptb a{float:left;padding:0 4px;height:28px;}#toptb a.showmenu{padding-right:15px;}#toptb a.hover{background-color:#FFF;}#toptb .pipe{float:left;display:none;}#hd{border-bottom:0 solid #C2D5E3;}#hd .wp{padding:10px 0 0;}.hdc{min-height:70px;}.ie6 .hdc{height:70px;}#hd h2{padding:0 20px 8px 0;float:left;}#space #hd h2{margin-top:0;}#hd .fastlg{padding-top:10px;}#scbar{overflow:hidden;height:42px;line-height:42px;border-top:1px solid #FFF;border-bottom:1px solid #E9EFF5;background:#E8EFF5;}.scbar_icon_td{width:21px;background:url(http://www.52pojie.cn/static/image/common/search.png) no-repeat 0 -50px;}.scbar_txt_td,.scbar_type_td{background:url(http://www.52pojie.cn/static/image/common/search.png) repeat-x 0 -93px;}#scbar_txt{width:400px;border:1px solid #FFF;outline:none;}.scbar_narrow #scbar_txt{width:260px;}.scbar_btn_td{width:38px;background:url(http://www.52pojie.cn/static/image/common/search.png) no-repeat 8px -142px;}#scbar_btn{margin:0;padding:0;border:none;background:transparent none;box-shadow:none;}#scbar_btn strong{line-height:84px;}.scbar_type_td{width:61px;background:url(http://www.52pojie.cn/static/image/common/search.png) no-repeat 0 -193px;}#scbar_type{display:block;padding-left:10px;text-align:left;text-decoration:none;}#scbar_type_menu{margin-top:-8px;}#scbar_hot{padding-left:8px;height:45px;overflow:hidden;}#scbar_hot strong,#scbar_hot a{float:left;margin-right:8px;white-space:nowrap;}#nv{overflow:hidden;height:33px;background:#2B7ACD url(\"http://www.52pojie.cn/static/image/common/nv.png\") no-repeat 0 0;}#nv li{float:left;padding-right:1px;height:33px;line-height:33px;background:url(http://www.52pojie.cn/static/image/common/nv_a.png) no-repeat 100% 0;font-weight:700;font-size:14px;}.ie_all #nv li{line-height:36px;}.ie6 #nv li{line-height:33px;}#nv li a{float:left;padding:0 15px;height:33px;}#nv li a{color:#FFF;}#nv li span{display:none;}#nv li.a{margin-left:-1px;background:#005AB4 url(\"http://www.52pojie.cn/static/image/common/nv_a.png\") no-repeat 50% -33px;}#nv li.a a{color:#FFF;}#nv li a:hover{background:url(http://www.52pojie.cn/static/image/common/nv_a.png) no-repeat 50% -66px;}#nv li.hover a:hover,#nv li.hover a{background:url(http://www.52pojie.cn/static/image/common/nv_a.png) no-repeat 50% -99px;}#mu{position:relative;z-index:1;}.ie6 #mu,.ie7 #mu{line-height:0;font-size:0;}#mu ul{background:url(http://www.52pojie.cn/static/image/common/mu_bg.png) no-repeat 0 100%;line-height:22px;z-index:2;font-size:12px;}#mu li{float:left;height:32px}#mu a{float:left;display:inline;margin:5px 6px;padding:0 10px;white-space:nowrap;}#mu a:hover{margin:4px 5px;border:1px solid #C2D5E3;background:#E5EDF2;color:#369;text-decoration:none;}.floatmu{position:absolute;left:0;top:0;}#um{padding-top:10px;padding-right:60px;_padding-right:54px;line-height:2.3;zoom:1;}#um,#um a{color:#444;}#um p{text-align:right;}#um .avt{display:inline;margin-right:-60px;}.vwmy{padding-left:16px;background:url(http://www.52pojie.cn/static/image/common/user_online.gif) no-repeat 0 2px;}.vwmy.qq{background:url(http://www.52pojie.cn/static/image/common/connect_qq.gif) no-repeat scroll 0 0;padding-left:20px;}#um .new,.topnav .new,.sch .new,#toptb .new{padding-left:20px;background-repeat:no-repeat;background-position:0 50%;color:#369;font-weight:700;}#myprompt.new{background-image:url(http://www.52pojie.cn/static/image/common/notice.gif);background-position:3px 50%;}#pm_ntc.new{background-image:url(http://www.52pojie.cn/static/image/common/new_pm.gif);}#task_ntc{background-image:url(http://www.52pojie.cn/static/image/feed/task.gif);}#um .pipe{margin:0 5px 0 0;}#extcreditmenu,#g_upmine{margin-right:2px !important;padding-top:3px;padding-bottom:3px;padding-left:10px;}#g_upmine{margin-right:1px !important;border:1px solid transparent;}.ie6 #g_upmine{border:0;}#extcreditmenu.a,#g_upmine.a{position:relative;z-index:302;margin-right:1px !important;border:1px solid;border-color:#DDD;border-bottom:none;background-color:#FFF;}#extcreditmenu_menu,#g_upmine_menu{margin-top:-1px;width:auto;}#extcreditmenu_menu li{float:none;display:block;padding-left:5px !important;padding-right:1em !important;}#g_upmine_menu li{float:none;display:block;padding-left:5px !important;}#g_upmine_menu ul.extg li{padding-left:0px !important;}#qmenu{float:right;display:inline;margin:5px 8px 0;padding-right:10px;width:103px;height:24px;background:url(http://www.52pojie.cn/static/image/common/qmenu.png) no-repeat 0 0;line-height:24px;text-align:center;color:#369;font-weight:700;overflow:hidden;}#qmenu:hover{text-decoration:none;}#qmenu.a{position:relative;z-index:302;background-position:0 -27px;}#qmenu_menu{margin-top:-2px;padding:20px 5px 10px;width:610px;border-color:#DCE4EB;}#qmenu_menu ul.nav li{float:left;}.ie6 #qmenu_menu ul.nav li{clear:none !important;width:auto !important;}#qmenu_menu ul.nav a{margin-bottom:10px;padding:47px 0 0;width:60px;border:none;border-radius:4px;background:url(http://www.52pojie.cn/static/image/common/noicon.gif) no-repeat 50% 5px;text-align:center;}#qmenu_menu ul.nav a:hover{background-color:#E5EDF2;color:#369;text-shadow:none;}#shortcut{position:relative;display:none;height:30px;line-height:30px;background-color:#3A83F1;color:white;text-align:center;}#shortcuttip{padding:2px 8px;background:url(http://www.52pojie.cn/static/image/common/search.gif) repeat-x 0 -1px;border-radius:3px;color:#3A83F1;font-weight:700;}#shortcutcloseid{position:absolute;right:8px;top:8px;display:block;width:12px;height:12px;background:url(http://www.52pojie.cn/static/image/common/close.gif) no-repeat 0 -12px;text-indent:-999em;}#mn_userapp .icon_down{background:url(http://www.52pojie.cn/static/image/common/arr_w.gif) no-repeat 50% 50%;display:inline-block;width:12px;height:12px;overflow:hidden;margin-left:3px;}.ie6 #mn_userapp .icon_down{height:24px;vertical-align:middle;}#nv li.a .icon_down{background:url(http://www.52pojie.cn/static/image/common/arr_w.gif) no-repeat  50% 50%;display:inline-block;width:12px;height:12px;overflow:hidden;margin-left:3px;}.ie6 #nv li.a .icon_down{height:24px;vertical-align:middle;}#mn_userapp_menu{clear:left;min-height:210px;min-width:630px;}.ie6 #mn_userapp_menu{height:210px;width:630px;}#mn_userapp_menu ul.mrec{float:left;width:182px;padding-right:5px;border-right:1px dotted #DDD;}#mn_userapp_menu ul.uused{float:left;width:273px;}.ie6 #mn_userapp_menu ul.mrec,.ie7 #mn_userapp_menu ul.mrec{width:182px;padding:0 5px 0 0;}#mn_userapp_menu ul.mrec li,#mn_userapp_menu ul.uused li{float:left;display:inline;padding:3px;width:85px;text-align:center;overflow:hidden;}.ie6 #mn_userapp_menu ul.mrec li,.ie6 #mn_userapp_menu ul.uused li{float:left !important;clear:none;}#mn_userapp_menu ul.mrec li img,#mn_userapp_menu ul.uused li img{width:75px;height:75px;}#mn_userapp_menu ul.mrec li a,#mn_userapp_menu ul.uused li a{border-bottom:0;}#mn_userapp_menu ul.adv{position:absolute;top:0;right:0;padding:10px;height:198px;width:140px;border-left:1px solid #EBEBEB;background:#F5F5F5;text-align:left;zoom:1;}#mn_userapp_menu ul.mrec li{position:relative;}.ie6 #mn_userapp_menu ul.adv li{clear:none;}#mn_userapp_menu .icon_hotapp{position:absolute;right:8px;bottom:25px;display:inline-block;width:16px;height:16px;background:#F00;color:#FFF;}#mn_userapp_menu .icon_myapp a{float:left;display:inline-block;border-bottom:0;padding:0;margin-bottom:10px;width:66px;height:51px;background:url(http://www.52pojie.cn/static/image/common/app.png) no-repeat 0 0;line-height:2000px;overflow:hidden;clear:none;}#mn_userapp_menu .icon_appcenter a{float:right;margin-left:7px;background-position:0 -51px;}.ie6 #mn_userapp_menu .icon_myapp a{margin-bottom:0px;}.ie6 #mn_userapp_menu .icon_myapp,.ie6 #mn_userapp_menu .icon_appcenter{float:left;width:66px;}#mn_userapp_menu .ad_img img{width:140px;height:100px;}#mn_userapp_menu .ad_img a{padding:0;line-height:26px;border-bottom:0;}#mn_userapp_menu .ad_img a:hover{background:none;}#ct{min-height:300px;}.ie6 #ct{height:300px;}.mn{overflow:hidden;}.ct1{border:1px solid #CCC;border-top:none;}.ct2 .mn{float:left;width:730px;margin-bottom:1em;}.ct2 .sd{float:right;width:220px;overflow:hidden;_overflow-y:visible;}.appl{float:left;overflow:hidden;margin-bottom:10px;padding:6px 10px;width:117px;}.ct2_a,.ct3_a{border:1px solid #CCC;background:url(\"http://www.52pojie.cn/static/image/common/vlineb.png\") repeat-y 0 0}.ct2_a_r{border:none;background-image:none;}.ct2_a h1.mt{display:none;}.ct2_a .tb{margin-top:3px;}.ct2_a .mn{float:right;width:810px;}.ct2_a .mn{display:inline;margin-right:10px;padding-top:10px;width:800px;}#nv_userapp .ct2_a .mn,.ct2_a_r .mn{margin-right:0;width:810px;}.ct3_a .mn{float:left;margin-left:20px;width:565px;}.ct3_a .sd{float:right;width:220px;}#nv_home .ct3_a .sd .bm{margin-right:10px;border:none;}#nv_home .ct3_a .sd .bm_c{padding:10px 0;}.mw{width:100%;float:none;}.mnw{clear:both;border-top:1px solid #CCC;}.mnh{width:643px;background:#F2F2F2;margin-bottom:0;}#ft{padding:10px 0 50px;border-top:1px solid #CDCDCD;line-height:1.8;color:#666;}#flk{text-align:right;}#flk img{vertical-align:middle;}#scrolltop{visibility:hidden;position:fixed;bottom:100px;display:block;margin:-30px 0 0 2px;width:40px;background:#f4f4f4;border:1px #cdcdcd solid;border-radius:3px;border-top:0;cursor:pointer;}#scrolltop:hover{text-decoration:none;}.ie6 #scrolltop{position:absolute;bottom:auto;}#scrolltop a{display:block;width:30px;height:24px;padding:3px 5px;line-height:12px;text-align:center;color:#787878;text-decoration:none;background:url(http://www.52pojie.cn/static/image/common/scrolltop.png) no-repeat 0 0;border-top:1px #cdcdcd solid;}a.scrolltopa:hover{background-position:-40px 0px !important;}a.replyfast{background-position:0 -30px !important;}a.replyfast:hover{background-position:-40px -30px !important;}a.returnlist,a.returnboard{background-position:0 -60px !important;}a.returnlist:hover,a.returnboard:hover{background-position:-40px -60px !important;}#scrolltop a b{visibility:hidden;font-weight:normal;}#nv_home #ft,.pg_announcement #ft,.pg_modcp #ft,.pg_portalcp #ft,.pg_ranklist #ft,#nv_userapp #ft{border-top:none;}.bm,.bn{margin-bottom:10px;}.bm{border:1px solid #CDCDCD;background:#FFF;}.bm_c{padding:10px;}.drag{}.bm_h .o{float:right;width:30px;}.bm_h .o img{float:right;margin-top:8px;cursor:pointer;}.bm_h .i{padding-left:10px;}.bm_h .pn{margin-top:4px;}.bm_h{padding:0 10px;height:31px;border-top:1px solid #FFF;border-bottom:1px solid #C2D5E3;background:#F2F2F2;line-height:31px;white-space:nowrap;overflow:hidden;}.bmw{border:1px solid #CDCDCD;}.bmw .bm_h{border-top-color:#FFF;border-right:1px solid #FFF;border-bottom-color:#C2D5E3;border-left:1px solid #FFF;background:#E5EDF2;}.bmw .bm_h a{color:#369;}.bml .bm_h{padding-top:5px;border:none;background:transparent;}.bml .bm_c{padding-top:0;}.bmn{padding:7px 10px;border-color:#C2D5E3;background:#E5EDF2;}.fl{border:1px solid #CDCDCD;border-top:none;background:#FFF;}.fl .bm{margin-bottom:0;border:none;}.fl .bm_h{border-width:1px 0;border-color:#C2D5E3;background:#E5EDF2 url(\"http://www.52pojie.cn/static/image/common/titlebg.png\") repeat-x 0 0;}.fl .bm_c,#online .bm_c,.lk .bm_c{padding-top:0;padding-bottom:0;}.bm2 .bm2_b{float:left;width:49%;border:1px solid #CDCDCD;}.bm2 .bm2_b_y{float:right;}.bw0{background:transparent;}.bw{padding:0 15px;}#pt{margin:2px 0;height:29px;border:none;background:transparent;line-height:29px;}#pt .z{padding-right:10px;}#pt .z a,#pt .z em,#pt .z span{float:left;height:29px;}#pt .z em{width:20px;background:url(http://www.52pojie.cn/static/image/common/pt_item.png) no-repeat 3px 10px;line-height:200px;overflow:hidden;}.nvhm{width:16px;background:url(http://www.52pojie.cn/static/image/common/search.png) no-repeat 0 0;line-height:200px;overflow:hidden;}.ie_all #pt .z em{background-position:3px 9px;}.ie_all .nvhm{background-position:0 -1px;}#uhd{padding-top:10px;border:1px solid #CCC;border-bottom:none;background:#E5EDF2;}#uhd .tb a{border-width:1px 0;border-top-color:#E5EDF2;border-bottom-color:#CCC;}#uhd .tb .a a{border:1px solid #CCC;border-bottom-color:#FFF;}.ie6 #uhd .tb .a{position:relative;}#uhd .mn{float:right;margin-right:15px;margin-bottom:-30px;line-height:28px;}#uhd .mn a{padding:2px 0 2px 20px;background:no-repeat 0 50%;color:#666;}#uhd .mn a:hover{color:#369;}#uhd .mn .addflw a{background-image:url(http://www.52pojie.cn/static/image/common/flw_ico.png);}#uhd .mn .addf a{background-image:url(http://www.52pojie.cn/static/image/feed/friend.gif);}#uhd .mn .pm2 a{background-image:url(http://www.52pojie.cn/static/image/common/pmto.gif);}#uhd .h{padding-left:75px;}#uhd .avt{display:inline;float:left;margin-left:-65px;}#uhd .mt{padding-bottom:0;}#uhd .flw_hd{float:right;width:260px;margin-right:10px;margin-bottom:-30px;}#uhd .tns th,#uhd .tns td{padding-left:20px;text-align:left;}#uhd .flw_hd .o{padding-left:20px;}.tns{padding:10px 0;}.tns table{width:100%;}.tns th,.tns td{text-align:center;font-size:12px;}.sd .tns th,.sd .tns td{width:110px !important;}.tns th{border-right:1px solid #CCC;}.tns th p,.tns td p{font-size:14px;margin:0;}.pls .tns{padding:0 10px 10px;}.pls .tns th p,.pls .tns td p{font-size:12px;margin:0;}.ih .icn{float:left;width:60px;}.ih dl{margin-left:60px;}.ih dt{font-size:14px;font-weight:700;}.ih dd{padding-bottom:1em;}.ih dd strong{margin:0 2em 0 4px;color:#C00;}.tb{margin-top:10px;padding-left:5px;line-height:30px;border-bottom:1px solid #CDCDCD;}.tb li{float:left;margin:0 3px -1px 0;}.ie6 .tb .a,.ie6 .tb .current{position:relative;}.tb a{display:block;padding:0 10px;border:1px solid #CDCDCD;background:#E5EDF2;}.tb .a a,.tb .current a{border-bottom-color:#FFF;background:#FFF;font-weight:700;}.tb a:hover{text-decoration:none;}.tb .y{float:right;margin-right:0;}.tb .y a{border:none;background:transparent;}.tb .o{margin:1px 4px 0 2px;border:1px solid #235994;}.tb .o,.tb .o a{height:23px;line-height:23px;background:#06C url(http://www.52pojie.cn/static/image/common/pn.png) repeat-x 0 -48px;}.tb .o a{padding:0 15px;border:none;font-weight:700;color:#FFF;}.ie6 .tb .o a{float:left;}.tb_h{margin:0;padding:0;background-color:#E5EDF2;}.tb_h li{margin-right:0;}.tb_h a{border-top:none;border-left:none;}.tb_h .o{margin-top:2px;}.tb_s{margin-top:0;line-height:26px;}.tbmu{padding:8px 10px 8px 0;border-bottom:1px dashed #CDCDCD;}.tbmu a{color:#369;}.tbmu .a{color:#333;font-weight:700;}.tbms{padding:10px 10px 10px 26px;border:1px dashed #FF9A9A;background:url(http://www.52pojie.cn/static/image/common/notice.gif) no-repeat 10px 50%;}.tbms_r{background-image:url(http://www.52pojie.cn/static/image/common/data_valid.gif);}.tbx{margin:10px 0;}.tbx span{margin-right:10px;cursor:pointer;}.tbx .a{padding:3px 5px;border:solid #999;border-width:0 1px 1px 0;background:#F2F2F2 url(http://www.52pojie.cn/static/image/common/thead.png) repeat-x 0 -20px;}.tbx strong{color:#F26C4F;}.obn{border-bottom:1px solid #CDCDCD;}.obn select{width:100%;margin-bottom:5px;} .a_h{padding-top:5px;} .a_mu{border:solid #CDCDCD;border-width:0 1px 1px;background:#F2F2F2;} .a_f{margin:5px auto;} .a_b{float:right;margin:0 0 5px 5px;} .a_t{margin-bottom:10px;}.a_t table{width:100%;}.a_t td{padding:4px 15px;border:1px solid #CDCDCD;} .a_pr{float:right;overflow:hidden;}.a_pt,.a_pb{background:url(http://www.52pojie.cn/static/image/common/ad.gif) no-repeat 0 50%;margin-bottom:6px;padding-left:20px;zoom:1;} .a_fl,.a_fr{float:right;position:fixed;top:350px;z-index:100;}.a_fl{left:0;}.a_fr{right:0;text-align:right;}* html .a_fl,* html .a_fr{position:absolute;top:expression(offsetParent.scrollTop+350);} .a_cb{top:20px}* html .a_cb{top:expression(offsetParent.scrollTop+20);} .a_af{float:left;margin-right:10px;margin-bottom:10px;} .a_cn{position:fixed;right:10px;bottom:10px;z-index:300;}* html .a_cn{position:absolute;top:expression(offsetParent.scrollTop+document.documentElement.clientHeight-this.offsetHeight);}.a_cn .close{text-align:right;}.a_h,.a_mu,.a_c,.a_p,.a_f,.a_t{text-align:center;}.xl li{margin:2px 0;}.xl em{float:right;padding-left:5px;}.xl em,.xl em a{color:#999;}.xl label,.xl label a{color:#C00;}.xl1 li{height:1.5em;overflow:hidden;}.xl1_elp{float:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.xl2 li{float:left;margin:2px 0;padding:0;width:50%;height:1.5em;overflow:hidden;}.xl ol,ol.xl{background:url(http://www.52pojie.cn/static/image/common/sortnum.png) no-repeat 0 3px;line-height:21px;}.xl ol li,ol.xl li{background:none;padding-left:20px;}.xl ol li,ol.xl li{height:21px;}.xld dt{padding:8px 0 5px;font-weight:700;}.xld dd{margin-bottom:8px;}.xld .m{float:left;margin:8px 8px 10px 0;}.xld .atc{float:right;margin-left:20px;}.ie8 .xld .atc{max-width:86px;}.xld .atc img{padding:2px;max-width:80px;max-height:80px;border:1px solid #CCC;background:#FFF;}.ie6 .xld .atc img{width:expression(this.width > 80 && this.width>=this.height ? 80:true);height:expression(this.height > 80 && this.width<=this.height ? 80:true);}.xld a.d,.xl a.d,.attc a.d,.c a.d,.sinf a.d{float:right;width:20px;height:20px;overflow:hidden;line-height:100px;background:url(http://www.52pojie.cn/static/image/common/op.png) no-repeat 0 -2px;}.attc a.d{float:left;}.xld a.d:hover,.xl a.d:hover,.attc a.d:hover,.c a.d:hover,.sinf a.d:hover{background-position:0 -22px;}.xld a.b{background-position:0 -40px;}.xld a.b:hover{background-position:0 -60px;}.xlda dl{padding-left:65px;}.xlda .m{display:inline;margin:8px 0 8px -65px;}.xlda .avt img{display:block;}.xlda dd img{max-width:550px;}* html .xlda dd img{width:expression(this.width > 550 ? 550:true);}.xlda dd a{color:#369;}.xlda dd .hot{color:#F26C4F;}.ml{}.ml li{float:left;padding:0 5px 5px;text-align:center;overflow:hidden;}.ml img{display:block;margin:0 auto;}.ml p,.ml span{display:block;width:100%;height:20px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.ml span,.ml span a{color:#999;}.mls li{padding:0 0 5px;width:66px;}.mls .avt{display:block;margin:0 auto;width:54px;}.mls img{width:48px;height:48px;}.mls p{margin-top:5px;}.mlm li{padding:0 0 5px;width:150px;}.mlm img{width:120px;height:120px;}.mla li{width:140px;height:224px;}.mla1 li{height:150px;}.mla .c{margin:0 auto;width:136px;height:150px;background:url(http://www.52pojie.cn/static/image/common/gb.gif) no-repeat 0 0;text-align:left;}.mla .a{background-position:0 100%;}.mla .c a{display:block;padding:14px 4px 3px 8px;width:120px;height:120px;overflow:hidden;}.mla img{max-width:120px;max-height:120px;_width:expression(this.width > 120 && this.width>=this.height ? 120:true);_height:expression(this.height > 120 && this.width<=this.height ? 120:true);}.mlp li{width:140px;height:140px;}.mlp .d{padding:0 0 5px;width:150px;height:180px;}.mlp img{padding:2px;max-width:120px;max-height:120px;border:1px solid #CCC;background:#FFF;}* html .mlp img{width:expression(this.width > 120 && this.width>=this.height ? 120:true);height:expression(this.height > 120 && this.width<=this.height ? 120:true);}.gm,.gs,.gol,.god{position:absolute;overflow:hidden;margin:-3px 0 0 -3px;width:60px;height:18px;background:url(http://www.52pojie.cn/static/image/common/gst.gif) no-repeat 0 0;display:block;}.gs{background-position:0 -18px;}.gol{background-position:0 -36px;}.god{margin:-5px 0px 0px 45px;background:url(http://www.52pojie.cn/static/image/common/access_disallow.gif) no-repeat 0 0;}.appl ul{margin:3px 0;}.appl li{display:block;height:28px;line-height:28px;white-space:nowrap;word-wrap:normal;font-size:14px;text-overflow:ellipsis;overflow:hidden;}.appl li a{text-decoration:none !important;}.appl img{margin:5px 5px -3px 0;}.appl span{float:right;font-size:12px;}.appl span a{color:#999;}.appl span a:hover{color:#369;}.myo li{height:auto;line-height:1.5;}.myo img{margin-bottom:-1px;}.myo a{color:#369;}.tbn{margin:-6px -10px 0;}.tbn ul{margin:0;}.tbn li{margin:0 10px;height:33px;border-bottom:1px dashed #CCC;}.tbn li.a{margin:-1px 0 0;padding:0 10px 0 9px;border-top:1px solid #CDCDCD;border-bottom-style:solid;background:#FFF;}.tbn ul a{display:block;height:33px;line-height:33px;}.tbn .mt{padding:10px;}.notice_pm,.notice_mypost,.notice_interactive,.notice_system,.notice_manage,.notice_app{float:left;width:18px;height:14px;background-image:url(http://www.52pojie.cn/static/image/common/ico_notice.png);margin:11px 5px 5px 0;}.notice_pm{background-position:0 0;}.notice_mypost{background-position:0 -33px;}.notice_interactive{background-position:0 -68px;}.notice_system{background-position:0 -101px;}.notice_manage{background-position:0 -135px;}.notice_app{background-position:0 -169px;}.mg_img{padding:10px;width:76px;height:76px;background:url(http://www.52pojie.cn/static/image/common/magic_imgbg.gif) no-repeat 0 0;}.lk img{float:left;margin-right:5px;margin-bottom:5px;width:88px;height:31px;}.lk p{color:#666;}.lk .m li{clear:left;padding:0 0 10px 98px;}.lk .m img{display:inline;margin-top:4px;margin-top:1px\\9;margin-left:-98px;}.lk .x li{float:left;margin-right:5px;width:88px;height:1.5em;overflow:hidden;}.lk_logo .lk_content{float:left;}.tedt{width:98%;border:1px solid;border-color:#999 #CCC #CCC #999;}.tedt .bar{padding:0 10px 0 0;height:25px;line-height:25px;border-bottom:1px solid #CDCDCD;background:#F2F2F2;}.fpd a{float:left;margin:2px 5px 0 0;width:20px;height:20px;background:url(http://www.52pojie.cn/static/image/editor/editor.gif) no-repeat;text-indent:-9999px;line-height:20px;overflow:hidden;}.fpd a.fbld{background-position:0 0;}.fpd a.fclr{background-position:-60px 0;}.fpd a.fmg{background-position:0 -20px;}.fpd a.flnk{background-position:-40px -20px;}.fpd a.fqt{background-position:-140px -20px;}.fpd a.fcd{background-position:-120px -20px;}.fpd a.fsml{background-position:-20px -20px;}.fpd a.fat{background-position:-140px 0;}.tedt .area{padding:4px;background:#FFF;zoom:1;}.tedt .pt{width:100%;margin-right:0;padding:0 !important;border:none;background:#FFF none;}.tedt .pt:focus{outline:none;-moz-box-shadow:none;}.m_c .tedt{width:600px;}.sllt{padding:10px 5px 5px !important;}.sllt td{padding:8px;border:none;cursor:pointer;}.sllt_p{*float:left;text-align:right;}.sllt_p a{margin-right:5px;color:#069;text-decoration:underline;}.sl_pv{margin-top:5px;padding:8px;background:#FAFAFA;border:1px solid #CCC;}.ie6 .slg,.ie7 .slg{width:expression(this.parentNode.offsetWidth);}#diy-tg{float:right;padding:0 !important;width:56px;background:url(http://www.52pojie.cn/static/image/diy/panel-toggle.png) no-repeat 100% 4px;text-indent:-9999px;overflow:hidden;}#diy-tg_menu{position:absolute;margin:-2px 0 0 -1px;padding:6px 0;width:72px;height:48px;line-height:24px;background:url(http://www.52pojie.cn/static/image/diy/panel-toggle-drop.png) no-repeat 0 0;text-align:center;}#diy-tg_menu a{float:none !important;}#toptb #diy-tg_menu{margin:-7px 0 0 -17px;}#toptb a#sslct,.switchwidth,#toptb a.switchblind{margin-top:5px;padding:0 !important;width:23px;height:18px !important;background:url(http://www.52pojie.cn/static/image/common/switch_style.png) no-repeat 100% 0;text-indent:-9999px;overflow:hidden;}.switchwidth{background-image:url(http://www.52pojie.cn/static/image/common/switch_width.png);}.switchwidth:hover{background:url(http://www.52pojie.cn/static/image/common/switch_width.png) no-repeat 100% -36px;}#sslct_menu{padding:6px 10px 10px;}.sslct_btn{float:left;margin:4px 4px 0 0;width:12px;height:12px;border:1px solid #CDCDCD;cursor:pointer;}.sslct_btn i{float:left;display:inline;margin:1px;width:10px;height:10px;background:#2E80D1;overflow:hidden;font-style:normal;}#toptb a.switchblind{width:10px;background-image:none;}.p_pop,.p_pof,.sllt{padding:4px;border:1px solid;min-width:60px;border-color:#DDD;background:#FEFEFE;box-shadow:1px 2px 2px rgba(0,0,0,0.3);}.ie6 .p_pop{width:100px;}.p_pof .p_pop{padding:0;border:none;box-shadow:none;}.p_pof{width:500px;}.p_opt{padding:10px;}.p_pop li{display:inline;}.p_pop a{display:block;padding:3px 5px;border-bottom:1px solid #E5EDF2;white-space:nowrap;}.p_pop li:last-child a{border:none;}.ie6 .p_pop li{zoom:1;clear:both;width:100%;}.ie6 .p_pop a{position:relative;}.p_pop a:hover,.p_pop a.a,#sctype_menu .sca{background-color:#E5EDF2;color:#369;text-decoration:none;}.prompt_news,.prompt_follower,.prompt_news_0,.prompt_follower_0,.ignore_notice,.prompt_concern{float:left;width:18px;height:14px;margin:3px 3px 5px 0;display:inline;background:url(http://www.52pojie.cn/static/image/common/ico_notice.png) no-repeat 0 0;}.prompt_follower_0{background-position:0 -225px;}.prompt_news{background-image:url(http://www.52pojie.cn/static/image/common/new_pm.gif);}.prompt_follower{background-position:0 -191px;}.prompt_concern{background-position:0 -258px;}.ignore_notice{background:url(http://www.52pojie.cn/static/image/common/close.gif) no-repeat 0 0;position:absolute;right:0;top:0;width:12px;height:12px;overflow:hidden;}.p_pop .ignore_noticeli a,.p_pop .ignore_noticeli a:hover,.p_pop .ignore_noticeli a.a{background:none;border-bottom:0;}.p_pop .notice_interactive,.p_pop .notice_system,.p_pop .notice_manage,.p_pop .notice_app,.p_pop .notice_mypost{margin:3px 2px 5px 0;}.ie6 .ignore_notice{display:none;}.blk a,.inlinelist a{display:inline;padding:0;border:none;}.blk a:hover{background:none;color:#333;text-shadow:none;text-decoration:underline;}.inlinelist{padding:5px;}.inlinelist a{float:left;width:5em;height:2em;overflow:hidden;text-align:center;line-height:2em;}.h_pop{min-width:120px;border-top:none;}.p_opt .txt,.p_opt .txtarea{margin:5px 0;}.p_pop .flbc,.p_pof .flbc{margin-right:8px;margin-top:4px;}.t_l,.t_c,.t_r,.m_l,.m_r,.b_l,.b_c,.b_r{overflow:hidden;background:#000;opacity:0.2;filter:alpha(opacity=20);}.t_l,.t_r,.b_l,.b_r{width:8px;height:8px;}.t_c,.b_c{height:8px;}.m_l,.m_r{width:8px;}.t_l{-moz-border-radius:8px 0 0 0;-webkit-border-radius:8px 0 0 0;border-radius:8px 0 0 0;}.t_r{-moz-border-radius:0 8px 0 0;-webkit-border-radius:0 8px 0 0;border-radius:0 8px 0 0;}.b_l{-moz-border-radius:0 0 0 8px;-webkit-border-radius:0 0 0 8px;border-radius:0 0 0 8px;}.b_r{-moz-border-radius:0 0 8px 0;-webkit-border-radius:0 0 8px 0;border-radius:0 0 8px 0;}.m_c{background:#FFF;}.m_c .tb{margin:0 0 10px;padding:0 10px;}.m_c .c{padding:0 10px 10px;}.m_c .o{padding:8px 10px;height:26px;text-align:right;border-top:1px solid #CCC;background:#F2F2F2;}.m_c .el{width:420px;}.m_c .el li{padding:0;border:none;}.flb{padding:10px 10px 8px;height:20px;line-height:20px;}.flb em{float:left;font-size:14px;font-weight:700;color:#369;}.flb em a{text-decoration:none;}.flb .needverify{float:left;margin-left:8px;padding-left:13px;width:45px;height:21px;line-height:21px;background:url(http://www.52pojie.cn/static/image/common/re_unsolved.gif) no-repeat 0 0;font-size:12px;color:#999;font-weight:400;}.flb .onerror,.flb .onright{padding-left:20px;height:auto;line-height:140%;white-space:nowrap;font-size:12px;font-weight:400;}.flb .onerror{background:url(http://www.52pojie.cn/static/image/common/check_error.gif) no-repeat 0 50%;}.flb .onright{background:url(http://www.52pojie.cn/static/image/common/check_right.gif) no-repeat 0 50%;color:#666;}.flb span{float:right;color:#999;}.flb span a,.flb strong{float:left;text-decoration:none;margin-left:8px;font-weight:400;color:#333;}.flb span a:hover{color:#999;}.flbc{float:left;width:20px;height:20px;overflow:hidden;text-indent:-9999px;background:url(http://www.52pojie.cn/static/image/common/cls.gif) no-repeat 0 0;cursor:pointer;}.flbc:hover{background-position:0 -20px;}.floatwrap{overflow:auto;overflow-x:hidden;margin-bottom:10px;height:280px;}.f_c{}.f_c li{list-style:none;}.f_c hr.l{margin:0;}.f_c a{color:#369;}.f_c .list{margin:0 auto 10px;width:570px;border-top:3px solid #CDCDCD;}.f_c .list th,.f_c .list td{padding:5px 2px;height:auto;border-bottom:1px dashed #CDCDCD;}.f_c .list .btns th,.f_c .list .btns td{border-bottom:none;}.f_c .th th,.f_c .th td{padding:10px 0;}.f_c .list th{background:none;}.nfl{height:auto !important;height:320px;min-height:320px;}.nfl .f_c{margin:60px auto;padding:20px;width:580px;border:3px solid #F2F2F2;background:#FFF;}.nfl .loginform{height:auto;}.nfl .clause{width:auto;height:auto;}.hasd{}.hasd input{float:left;width:121px;}.hasd input.crl{padding:0;width:20px;height:20px;background:none;border-style:solid;border-color:#848484 #E0E0E0 #E0E0E0 #848484;border-width:1px 0 1px 1px;}.hasd .spmediuminput{width:115px;}.dpbtn{float:left;overflow:hidden;text-indent:-9999px;width:21px;height:21px;border-width:1px 1px 1px 0;border-style:solid;border-color:#848484 #E0E0E0 #E0E0E0 #848484;background:#FFF url(http://www.52pojie.cn/static/image/common/newarow.gif) no-repeat 100% 0;}.dpbtn:hover{background-position:100% -23px;}.hasd label{float:left;}.tpclg h4 a.dpbtn{float:right;border-width:1px;}.tpclg h4{font-weight:400;}.tpclg .pt{margin:5px 0;width:212px;overflow:hidden;}.mark .dt,.mark .tpclg h4{width:270px;}.mark .tpclg .pt{width:260px;}#postbox dd.hasd input{width:99px;margin-right:0;}.colorbox{width:130px !important;}.colorbox input{float:left;margin:2px;padding:0;width:12px;height:12px;border:0;cursor:pointer;}.hrbox{width:500px !important;}.hrbox input{float:left;margin:2px;padding:0;width:495px;height:25px;border:0;cursor:pointer;background:#FFFFFF;}.postbgbox{width:325px !important;}.postbgbox input{float:left;margin:2px;padding:0;width:50px;height:50px;border:1px solid;border-color:#F7F7F7 #EFEFEF #EFEFEF #F7F7F7;cursor:pointer;background:#FFFFFF;}.pm{overflow:hidden;width:400px;}.pm .flb{margin-bottom:0;padding:1px 5px 4px;background:#CCC url(http://www.52pojie.cn/static/image/common/pm.png) repeat-x 0 -101px;}* html .pm .flb{padding:4px 5px 1px;}.pm .flb em{padding-left:15px;background:url(http://www.52pojie.cn/static/image/common/pm.png) no-repeat 0 -65px;text-shadow:1px 1px 1px #FFF;color:#333;font-size:12px;}.pm .flbc{background-image:url(http://www.52pojie.cn/static/image/common/pm.png);}.pm_tac{padding:5px 10px;background:#F2F2F2;}.pm .c{padding:0;background:#F2F2F2;}.pmb{position:relative;padding:20px 20px 0;width:360px;height:280px;overflow:auto;overflow-x:hidden;}.pmb li{position:relative;margin-bottom:10px;}.pmt{overflow:hidden;position:absolute;bottom:0;left:-6px;text-indent:-999px;width:7px;height:7px;background:url(http://www.52pojie.cn/static/image/common/pm.png) no-repeat -13px -40px;zoom:1;}.pmd{float:left;padding:5px 8px;background:#F0F0F0 url(http://www.52pojie.cn/static/image/common/pm-bg1.png) repeat-x;border:1px solid;border-color:#E7E7E7 #BBB #999 #E7E7E7;word-wrap:break-word;-moz-box-shadow:2px 2px 4px #DDD;-webkit-box-shadow:2px 2px 4px #DDD;box-shadow:2px 2px 4px #DDD;-moz-border-radius:10px 10px 10px 0;-webkit-border-radius:10px 10px 10px 0;border-radius:10px 10px 10px 0;}.pmd,.pmd img{max-width:292px;}* html .pmd{width:expression(this.offsetWidth > 292 ? 292+'px':'auto');}* html .pmd img{width:expression(this.width > 292 ? 292:true);}.pmd .quote{overflow:hidden;margin:0;padding-left:16px;background:url(http://www.52pojie.cn/static/image/common/qa.gif) no-repeat 0 0;color:#666;}.pmd .quote blockquote{display:inline;margin:0;padding-right:16px;background:url(http://www.52pojie.cn/static/image/common/qz.gif) no-repeat 100% 100%;}.pmd .blockcode{overflow:hidden;margin:0;padding:0;background:transparent;color:#666;}.pmd .blockcode code{font-family:Monaco,Consolas,'Lucida Console','Courier New',serif;font-size:12px;line-height:1.8em;}* html .pmd .blockcode code{font-family:'Courier New',serif;}.pmm .pmt{right:-6px;left:auto;background-position:0 -47px;}.pmm .pmd{float:right;background:#FEF5E7 url(http://www.52pojie.cn/static/image/common/pm-bg2.png) repeat-x;border-color:#FFC68C #F9D4A7 #F3BB65 #DDC4A9;-moz-box-shadow:-2px 2px 4px #DDD;-webkit-box-shadow:-2px 2px 4px #DDD;box-shadow:-2px 2px 4px #DDD;-moz-border-radius:10px 10px 0 10px;-webkit-border-radius:10px 10px 0 10px;border-radius:10px 10px 0 10px;}.pmb h4{text-align:center;}.pmfm{padding:0 15px 15px;}.pmfm .tedt{width:365px;}.pmfm .pt{height:65px;}.pmfm .pn{float:right;}.pma a{margin-right:5px;}.pmo{position:absolute;top:8px;right:10px;overflow:hidden;padding-left:10px;width:130px;height:31px;line-height:24px;line-height :26px\\9;background:url(http://www.52pojie.cn/static/image/common/pn.png) repeat-x 0 -320px;text-shadow:1px 1px 1px #FFF;}.pmo em{display:block;padding:3px 5px 4px 0;background:url(http://www.52pojie.cn/static/image/common/pn.png) no-repeat 100% -360px;}.pmo a{overflow:hidden;white-space:nowrap;display:block;padding-right:10px;background:url(http://www.52pojie.cn/static/image/common/pm.png) no-repeat 100% -222px;outline:none;}.pmo .b{background-position:100% -278px;}.pmfl{position:absolute;top:35px;right:10px;z-index:200;width:138px;border:solid #CCC;border-width:0 1px 1px;background:#FFF;}.pmfl .s,.pmfl .o{padding:5px;border-bottom:1px solid #CCC;background:#F2F2F2;}.pmfl .o{border-bottom-color:#FFF;}.pmfl .s .px{padding-left:20px;width:101px;background:#FFF url(http://www.52pojie.cn/static/image/common/pm.png) no-repeat 0 -160px;}.pmfl .o .ps{width:100%;}.pmfl ul{overflow:auto;overflow-x:hidden;width:138px;height:306px;}.pmfl li{padding:5px;height:24px;}.pmfl .avt{float:left;width:29px;height:29px;}.pmfl .avt img{padding:0;width:24px;height:24px;border:none;}.pmfl .newpm img{margin:1px 0 0 1px;}.pmfl p{overflow:hidden;white-space:nowrap;width:78px;}.pmfl p .a{color:red;}.pmfl p .ol{color:#333;}.pmfl strong{color:#000;}.rfm{margin:0 auto;width:760px;border-bottom:1px dotted #CDCDCD;}.rfm a{color:#369;}.rfm .rq{}.rfm th,.rfm td{padding:10px 2px;vertical-align:top;line-height:24px;}.rfm .tipwide{padding-top:0;}.rfm th{padding-right:10px;width:10em;text-align:right;}.rfm .px{width:220px;}.rfm .px:focus{border-color:#369;background:#FFF;}.rfm .p_tip{position:absolute;z-index:2;display:none;padding-left:10px;width:390px;background:#FFF;color:#666;font-style:normal;}.rfm .p_chk{position:absolute;z-index:1;padding-left:10px;width:390px;color:red;font-weight:700;font-family:Tahoma,Helvetica,SimSun,sans-serif;}.rfm #emailmore{position:absolute;}.p_right{background:url(http://www.52pojie.cn/static/image/common/check_right.gif) no-repeat 10px 12px;width:30px;}#returnmessage4{display:none;padding:10px 0;border-bottom:1px solid #CDCDCD;background:#FFE;text-align:center;font-weight:700;}#returnmessage4.onerror{display:block;}.rfm .l{margin:0;}.blr .c{padding:0 10px 10px;}.login_slct a{margin-right:-8px;padding-right:16px;background:url(http://www.52pojie.cn/static/image/common/arrwd.gif) no-repeat 100% 50%;}.fwin .rfm,.nfl .f_c .rfm{width:500px;}.fwin .rfm th,.fwin .rfm td,.nfl .f_c .rfm th,.nfl .f_c .rfm td{padding:6px 2px;}.fwin .loginb button{margin-left:11.3em;}.nfl .f_c .loginb button{margin-left:12em;}.passlevel{padding-left:70px;background:url(http://www.52pojie.cn/static/image/common/passlevel.png) no-repeat 0 5px;}.passlevel1{background-position:0 -35px;}.passlevel2{background-position:0 -75px;}.passlevel3{background-position:0 -115px;}.blr{width:580px;margin:20px auto 30px;}.m_c .blr{margin:0 auto;}.lgfm{font:12px/1.5 Tahoma,Helvetica,SimSun,sans-serif;float:left;margin-bottom:10px;*margin-bottom:-10px;padding:20px 0;width:280px;border-right:1px solid #CCC;}.rgs{margin-bottom:10px;}.lgfm label,.lgfm p,.reginfo{clear:both;overflow:hidden;display:block;margin-bottom:10px;line-height:22px;}.reginfo label{display:inline;}.reg_c{float:left;width:200px;}.lgfm .txt,.lgfm .px{padding:2px 4px;height:16px;border:1px solid;border-color:#848484 #E0E0E0 #E0E0E0 #848484;background-image:none;}.lgfm .txt,.lgfm .px,.lgfm .pt{width:170px;}.lgfm .ftid a,.lgfm .ftid a:hover{height:20px;background-position:100% -1px;border-color:#848484 #E0E0E0 #E0E0E0 #848484;}.fsb{clear:both;margin-top:8px;padding:10px;}.fsb .z{padding-top:5px;}.m_c .fsb{background:#F2F2F2;border-top:1px solid #CCC;}.fsb .pns{margin-right:8px;}.lgfm em,.fsb em{float:left;width:60px;}.fsb .pnr{*margin-top:4px;}.nlf .txt{width:230px;}.brls{overflow:auto;margin-bottom:10px;width:470px;height:240px;}.sipt{float:none;margin:0 0 10px;width:234px;height:20px;background-color:#FFF;border:1px solid;border-color:#848484 #E0E0E0 #E0E0E0 #848484;clear:left;}.sipt a{float:left;width:54px;border:none;}.sipt a:hover,.sipt a:focus{border:none;}.sipt .txt{float:left;width:154px;border:none;outline:none;background:#FFF;}.sltp{float:none;margin:10px 0;clear:both;}.sltp a,.sltp a:hover,.sltp a:focus{height:20px;line-height:20px;border-color:#EEE;background-color:transparent;background-position:100% -1px;color:#069 !important;}.sltp a:hover,.sltp a:focus{background-position:100% -24px;}.lpsw label{float:left;padding-left:4px;width:61px;line-height:150%;}.clck,.sipt .clck{background:#FFF url(http://www.52pojie.cn/static/image/common/clck.gif) no-repeat 98% 50%;}.lgf{float:left;overflow:visible;margin:47px 25px 10px 40px;}.lgf h4{margin-bottom:10px;font-weight:400;font-size:14px;}.lgf a{color:#369;}.minf{margin-top:23px;}#messagelogin{margin-top:5px;border-top:1px solid #CDCDCD;}#messagelogin .flb{padding-left:0;}#messagelogin .blr{margin:0;}#messagelogin .lgfm{padding-top:0;}#messagelogin .minf{margin-top:0;}#messagelogin .fsb{padding:0;}.fastlg{line-height:24px;}.fastlg td{padding:2px 0 2px 4px;}.fastlg_fm{margin-right:5px;padding-right:5px;border-right:1px solid #CDCDCD;}#ls_fastloginfield_ctrl{line-height:20px;border:none;background-color:transparent;background-position:100% -1px;}#ls_fastloginfield_ctrl:hover{background-position:100% -24px;}.psw_w{padding-left:5px;}.fastlg_l{padding-right:4px !important;border-right:1px solid #E5EDF2;}.poke{margin-bottom:10px;}.poke li{float:left;margin:0 1% 5px 0;width:32%;height:22px;}.poke img{vertical-align:middle;}.dt{border-top:1px solid #CDCDCD;width:100%;}.dt th{background:#F2F2F2;}.dt td,.dt th{padding:7px 4px;border-bottom:1px solid #CDCDCD;}.dt .c{width:50px;}.tdat{width:100%;border:1px solid #CDCDCD;}.tdat th,.tdat td{padding:4px 5px;border:1px solid #CDCDCD;}.um{margin-bottom:1em;padding-bottom:1em;border-bottom:1px dashed #CDCDCD;clear:left;}.umh{margin-bottom:10px;overflow:hidden;}.umh h2,.umh h3{clear:left;font-size:14px;float:left;background:#FFF url(http://www.52pojie.cn/static/image/common/arrow.gif) no-repeat right 6px;padding-right:14px;cursor:pointer;}.schfaq h3{background:none;cursor:default;}.umh h3 a{color:#666;}.umh h3 span{font-size:12px;font-weight:400;color:#666;}.umh h2 em,.umh h3 em{margin-left:8px;font-size:12px;color:#999;font-weight:400;}.umh_act{float:right;}.umh .umh_cb{display:none;}.umh .umh_ext{display:block;}.umn{background:url(http://www.52pojie.cn/static/image/common/dash.gif) repeat-x 0 10px;clear:left;}.umn h3{background:#FFF url(http://www.52pojie.cn/static/image/common/arrow.gif) no-repeat right -35px;font-size:14px;}.umn .umh_cb{display:block;background-color:#FFF;color:#666;cursor:pointer;}.umn .umh_ext{display:none;}.lum{}.lum h2{font-size:14px;}.lum ul{padding:1em 0 1em 2em;margin-bottom:1em;border-bottom:1px dashed #CDCDCD;}.lum ul li{padding:0.2em 0;}.pgs{}.pgs #newspecial,.pgs #newspecialtmp,.pgs #post_reply,.pgs #post_replytmp{float:left;margin-right:5px;}.pg{float:right;}.pg,.pgb{line-height:26px;}.pg a,.pg strong,.pgb a,.pg label{float:left;display:inline;margin-left:4px;padding:0 8px;height:26px;border:1px solid;border-color:#C2D5E3;background-color:#FFF;background-repeat:no-repeat;color:#333;overflow:hidden;text-decoration:none;}.pg a.nxt,.pgb a{padding:0 10px;}.pg a:hover,.pgb a:hover{border-color:#369;color:#369;}.pg a.nxt{padding-right:25px;background-image:url(http://www.52pojie.cn/static/image/common/arw_r.gif);background-position:90% 50%;}.pg a.prev{background-image:url(http://www.52pojie.cn/static/image/common/arw_l.gif);background-position:50% 50%;}.pg strong{background-color:#E5EDF2;}.pgb a{padding-left:25px;background-image:url(http://www.52pojie.cn/static/image/common/arw_l.gif);background-position:10px 50%;}.pg label{cursor:text;}.ie6 .pg label{padding-top:3px;height:23px;}.pg label .px{padding:0;width:25px;height:16px;line-height:16px;}#pgt .pg,#pgt .pgb{margin-top:5px;}.bac{margin:0;padding:0;width:70px;height:30px;line-height:30px;color:#333;overflow:hidden;text-decoration:none;background:url(http://www.52pojie.cn/static/image/common/pg_arw.png) no-repeat 0 0;text-align:center;text-indent:-7px;display:block;}#psd .bn .mbn input,#postbox input{margin-right:4px;}#postbox .mbn,#psd .mbn{height:1.6em;line-height:1.6em;}.popupcredit{}.pc_l,.pc_c,.pc_inner,.pc_r{width:29px;height:56px;line-height:56px;background:url(http://www.52pojie.cn/static/image/common/popupcredit_bg.gif) no-repeat 0 0;}.pc_c{width:200px;background-position:0 -56px;background-repeat:repeat-x;}.pc_inner{white-space:nowrap;text-align:center;width:auto;background-position:50% -112px;}.pc_inner i{margin-right:10px;font-size:12px;font-style:normal;color:#FFF;font-weight:400;}.pc_inner span{margin-right:15px;color:#FFEA97;font-size:14px;font-weight:700;}* html .pc_inner span{display:inline-block;}.pc_inner span a{color:#FFEA97;text-decoration:underline;}.pc_inner span em{color:#FFF;font-size:18px;font-weight:400;}.pc_inner span u{font-size:10px;text-decoration:none;}.pc_inner span em.desc{color:#930;}.pc_btn img{opacity:0.5;}.pc_btn:hover img{opacity:1;}.pc_r{background-position:-30px 0;}.popuptext .pc_l,.popuptext .pc_c,.popuptext .pc_inner,.popuptext .pc_r{background:url(http://www.52pojie.cn/static/image/common/popuptext_bg.gif) no-repeat 0 0;}.popuptext .pc_c{width:200px;background-position:0 -56px;background-repeat:repeat-x;}.popuptext .pc_inner{white-space:nowrap;text-align:center;width:auto;background-position:50% -112px;}.popuptext .pc_r{background-position:-30px 0;}#fjump_menu{padding:7px 0 10px 10px;}#fjump_menu .sch{position:absolute;top:6px;right:10px;}.jump_bdl{overflow:hidden;}.jump_bdl li{float:left;overflow-x:hidden;overflow-y:auto;margin-right:10px;padding:5px;width:178px;height:300px;border:1px solid #CCC;background:#FFF;}.ie6 .jump_bdl li{clear:none !important;float:left !important;width:178px !important;}.bdl_title li{float:left;margin-right:9px;padding:0 1px;width:189px;height:33px;line-height:23px;font-weight:700;}.bdl_title .px{width:80px;}.jump_bdl p{overflow:hidden;height:25px;line-height:25px;}.jump_bdl .sub{text-indent:1em;}.jump_bdl .child{text-indent:2em;}.jump_bdl a{display:block;position:static !important;padding:0 4px;text-decoration:none;color:#444;}.jump_bdl .a a,.jump_bdl .a a:hover{background-color:#E5EDF2;}.mgcmn{width:100px;}.mgcmn a{padding-left:25px;line-height:16px !important;}.mgcmn img{position:absolute;margin-left:-20px;}.cmen{overflow:hidden;width:63px;}.cmen a{overflow:hidden;float:left;width:20px;height:20px;}.focus{position:fixed;right:10px;bottom:0;z-index:300;overflow:hidden;width:270px;background:#FFF;}* html .focus{position:absolute;top:expression(offsetParent.scrollTop+document.documentElement.clientHeight-this.offsetHeight);}.fctrl{margin-left:10px;font-weight:400;}.fctrl img{margin-bottom:-4px;}.fctrl em{display:inline-block;}.focus .m img{width:60px;height:60px;}.focus dt{padding-top:0;}.m_c .sec .secq{display:block;margin:5px 0 10px;}.reason_slct{}.reason_slct .reasonselect{height:4.3em;overflow:scroll !important;overflow-x:auto !important;}.reason_slct .reasonselect li{white-space:nowrap;}.reason_slct .pt,.reason_slct .px{width:25.2em !important;}.reasonarea{height:5.8em;}.reason_slct .reasonselect:hover{height:auto;}.filebtn{position:relative;margin:0 auto;width:60px;overflow:hidden;}.filebtn .pf{position:absolute;right:0;height:23px;opacity:0;filter:alpha(opacity=0);}.upfile{width:220px;}.uploadform{padding:0 10px;border:1px dashed #CDCDCD;background:#F2F2F2;}.progressWrapper{overflow:hidden;width:100%;}.progressContainer{overflow:hidden;margin:5px;padding:4px;border:solid 1px #E8E8E8;background-color:#F7F7F7;}.message{overflow:hidden;margin:1em 0;padding:10px 20px;border:solid 1px #FD9;background-color:#FFC;}.red{border:solid 1px #B50000;background-color:#FFEBEB;}.green{border:solid 1px #DDF0DD;background-color:#EBFFEB;}.blue{border:solid 1px #CEE2F2;background-color:#F0F5FF;}.progressName{overflow:hidden;white-space:nowrap;width:323px;height:18px;text-align:left;font-weight:700;color:#555;}.progressBarInProgress,.progressBarComplete,.progressBarError{clear:both;margin-top:2px;width:0;height:2px;background-color:blue;font-size:0;}.progressBarComplete{visibility:hidden;width:100%;background-color:green;}.progressBarError{visibility:hidden;width:100%;background-color:red;}.progressBarStatus{white-space:nowrap;margin-top:2px;width:337px;text-align:left;}a.progressCancel{display:block;float:right;width:14px;height:14px;background:url(http://www.52pojie.cn/static/image/common/cancelbutton.gif) no-repeat -14px 0;font-size:0;}a.progressCancel:hover{background-position:0 0;}.swfupload{vertical-align:top;}.frame,.frame-tab{margin-bottom:10px;border:1px solid #CCC;background:#FFF;}.title{padding:0 10px;height:32px;font-size:14px;font-weight:700;line-height:32px;overflow:hidden;}.frame-title,.frametitle,.tab-title{background:#F2F2F2 url(http://www.52pojie.cn/static/image/common/title.png) repeat-x 0 100%;}.frame-1-1-l,.frame-1-1-1-l,.frame-1-1-1-c,.frame-2-1-l,.frame-1-2-l,.frame-3-1-l,.frame-1-3-l{float:left;}.frame-1-1-r,.frame-1-1-1-r,.frame-2-1-r,.frame-1-2-r,.frame-3-1-r,.frame-1-3-r{float:right;}.frame-1-1-l,.frame-1-1-r{width:49.9%}.frame-1-1-1-l,.frame-1-1-1-c,.frame-1-1-1-r,.frame-2-1-r,.frame-1-2-l{width:33.3%;}.frame-2-1-l,.frame-1-2-r{width:66.6%;}.frame-3-1-l,.frame-1-3-r{width:74.9%;}.frame-3-1-r,.frame-1-3-l{width:24.9%;}.frame .mn{margin-bottom:0;}.frame .sd{min-height:0;_height:auto;}.frame-1-1 .col-r{float:right;width:49.9%;}.frame-1-1 .col-l{float:left;width:49.9%;}.frame-1-2 .mn,.frame-1-2 .col-r,.frame .frame-1-2 .mn,.frame .frame-1-2 .col-r{float:right;width:66.6%;}.frame-1-2 .sd,.frame-1-2 .col-l,.frame .frame-1-2 .sd,.frame .frame-1-2 .col-l{float:left;width:33.3%;}.frame-2-1 .mn,.frame-2-1 .col-l,.frame .frame-2-1 .mn,.frame .frame-2-1 .col-l{float:left;width:66.6%;}.frame-2-1 .sd,.frame-2-1 .col-r,.frame .frame-2-1 .sd,.frame .frame-2-1 .col-r{float:right;width:33.3%;}.frame-1-3 .mn,.frame-1-3 .col-r,.frame .frame-1-3 .mn,.frame .frame-1-3 .col-r{float:right;width:74.9%;}.frame-1-3 .sd,.frame-1-3 .col-l,.frame .frame-1-3 .sd,.frame .frame-1-3 .col-l{float:left;width:24.9%;}.frame-3-1 .mn,.frame-3-1 .col-l,.frame .frame-3-1 .mn,.frame .frame-3-1 .col-l{float:left;width:74.9%;}.frame-3-1 .sd,.frame-3-1 .col-r,.frame .frame-3-1 .sd,.frame .frame-3-1 .col-r{float:right;width:24.9%}.frame-1-1-1 .col-l{float:left;width:33.3%;}.frame-1-1-1 .col-c{float:left;width:33.3%;}.frame-1-1-1 .col-r{float:right;width:33.3%;}.frame .frame-1-1-1 .col-l,.frame .frame-1-1-1 .col-c,.frame .frame-1-1-1 .col-r{padding:0;width:33%;}.frame .frame-1-1 .col-l,.frame .frame-1-1 .col-r{width:49.9%;}.frame .title .titletext,.block .title .titletext{float:left;}.frame-tab .tab-title .titletext{float:left;margin:0 10px;}.tab-title{padding:0;width:100% !important;border:none;}.frame-tab .tb{margin-top:0;padding-left:15px;line-height:32px;border:none;}.frame-tab .tb li{margin:0;margin-left:-1px;font-weight:400;}.frame-tab .tb li,.frame-tab .tb li a{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-top:none;background:transparent none;}* html .frame-tab .tb li a{float:left;}.frame-tab .tb .a a{background:#FFF;font-weight:700;}.frame-tab .tb-c{padding:10px 16px;}.block{margin:10px 10px 0;}.frame-1-2 .sd .block,.col-l .block,.frame-2-1 .mn .block,.frame-1-1-1 .col-c .block,.frame-1-3 .sd .block,.frame-3-1 .mn .block{margin-right:10px;}.frame-1-2 .mn .block,.col-r .block,.frame-2-1 .sd .block,.frame-1-1-1 .col-c .block,.frame-1-3 .mn .block,.frame-3-1 .sd .block{margin-left:10px;}body#space .block{margin:0 5px 10px;}.temp{margin:1px;}#ct .frame{margin:0;border:none;}.bx{border:none;}.bx .frame-1-1-1{background:transparent url(http://www.52pojie.cn/static/image/common/vline2.png) repeat-y 320px 0;}.bx .frame-2-1{background:transparent url(http://www.52pojie.cn/static/image/common/vline.png) repeat-y 645px 0;}.drag .block .title{margin-bottom:0;padding-left:0;font-size:14px;font-weight:700;}#ct .sd .block{margin:0;}.block .xl1 ul li{padding-left:10px;background:url(http://www.52pojie.cn/static/image/common/dot.gif) no-repeat 0 50%;}.ie_all .block .xl1 ul li{background-position:0 6px;}.xfs{border-top:none;}.xfs .frame-title,.xfs .frametitle,.xfs .tab-title{border:none;background:transparent url(http://www.52pojie.cn/static/image/common/mu.png) repeat-x 0 0;}.xfs .frame-title,.xfs .frametitle,.xfs .tab-title,.xfs .frame-title a,.xfs .frametitle a,.xfs .tab-title a{color:#FFF !important;}.xfs .tb li a{height:32px;border:none !important;}.xfs .tb .a a{background:transparent url(http://www.52pojie.cn/static/image/common/mu.png) no-repeat 50% -165px;}.xfs_1{border-color:#2267B5;}.xfs_1 .frame-title,.xfs_1 .frametitle,.xfs_1 .tab-title{background-color:#2267B5;background-position:0 0;}.xfs_1 .tb .a a{background-position:50% -66px;}.xfs_2{border-color:#A90000;}.xfs_2 .frame-title,.xfs_2 .frametitle,.xfs_2 .tab-title{background-color:#A90000;background-position:0 -99px;}.xfs_2 .tb .a a{background-position:50% -165px;}.xfs_3{border-color:#006C6C;}.xfs_3 .frame-title,.xfs_3 .frametitle,.xfs_3 .tab-title{background-color:#006C6C;background-position:0 -198px;}.xfs_3 .tb .a a{background-position:50% -264px;}.xfs_4{border-color:#EC5A00;}.xfs_4 .frame-title,.xfs_4 .frametitle,.xfs_4 .tab-title{background-color:#EC5A00;background-position:0 -297px;}.xfs_4 .tb .a a{background-position:50% -363px;}.xfs_5{border-color:#6F099E;}.xfs_5 .frame-title,.xfs_5 .frametitle,.xfs_5 .tab-title{background-color:#6F099E;background-position:0 -396px;}.xfs_5 .tb .a a{background-position:50% -462px;}.xfs_nbd{border:none;}.xfs_nbd .block{margin-top:0;margin-bottom:10px;}.xfs_nbd .col-l .block,.xfs_nbd .frame-1-1-l .block,.xfs_nbd .frame-2-1-l .block,.xfs_nbd .frame-1-2-l .block,.xfs_nbd .frame-3-1-l .block,.xfs_nbd .frame-1-3-l .block,.xfs_nbd .frame-1-1-1-l .block{margin-left:0;}.xfs_nbd .sd .block,.xfs_nbd .col-r .block,.xfs_nbd .frame-1-1-r .block,.xfs_nbd .frame-2-1-r .block,.xfs_nbd .frame-1-2-r .block,.xfs_nbd .frame-3-1-r .block,.xfs_nbd .frame-1-3-r .block,.xfs_nbd .frame-1-1-1-r .block{margin-right:0;}.xbs{background:no-repeat 0 100%;}.xbs .title{padding-left:0;padding-right:10px;background:no-repeat 100% 0;}.xbs .titletext{float:left;padding-left:10px;background:no-repeat 0 0;}.xbs .dxb_bc{padding-bottom:6px;background:transparent no-repeat 100% 100%;}.xbs .module,.xbs .portal_block_summary{padding:10px 10px 4px;border-style:solid;border-width:0 1px;}.xbs_1{border:1px solid #CCC;}.xbs_1 .title{padding:0 10px;height:31px;border-bottom:1px solid #CCC;background:url(http://www.52pojie.cn/static/image/common/thead.png) repeat-x 0 0;line-height:31px;}.xbs_1 .title,.xbs_1 .title a{color:#666 !important;}.xbs_1 .dxb_bc{padding:9px 10px;}.xbs_2{background-image:url(http://www.52pojie.cn/static/image/diy/bs_2_ft.png);}.xbs_2 .title,.xbs_2 .titletext{background-image:url(http://www.52pojie.cn/static/image/diy/bs_2_hd.png);}.xbs_2 .title,.xbs_2 .title a{color:#F60 !important;}.xbs_2 .dxb_bc{background-image:url(http://www.52pojie.cn/static/image/diy/bs_2_ft_r.png);}.xbs_2 .module,.xbs_2 .portal_block_summary{border-color:#E0E0E0;}.xbs_3{background-image:url(http://www.52pojie.cn/static/image/diy/bs_3_ft.png);}.xbs_3 .title,.xbs_3 .titletext{background-image:url(http://www.52pojie.cn/static/image/diy/bs_3_hd.png);}.xbs_3 .title,.xbs_3 .title a{color:#FFF !important;}.xbs_3 .dxb_bc{background-image:url(http://www.52pojie.cn/static/image/diy/bs_3_ft_r.png);}.xbs_3 .module,.xbs_3 .portal_block_summary{border-color:#B2B2B2;background-color:#F1F1F1;}.xbs_4{background-image:url(http://www.52pojie.cn/static/image/diy/bs_4_ft.png);}.xbs_4 .title,.xbs_4 .titletext{background-image:url(http://www.52pojie.cn/static/image/diy/bs_4_hd.png);}.xbs_4 .title,.xbs_4 .title a{color:#FFF !important;}.xbs_4 .dxb_bc{background-image:url(http://www.52pojie.cn/static/image/diy/bs_4_ft_r.png);}.xbs_4 .module,.xbs_4 .portal_block_summary{border-color:#B2B2B2;}.xbs_5{background-image:url(http://www.52pojie.cn/static/image/diy/bs_5_ft.png);}.xbs_5 .title{padding:0 10px;height:30px;border:1px solid;border-color:#F08C3B #F08C3B #DDD;background:url(http://www.52pojie.cn/static/image/diy/bs_5_hd.png) repeat-x 0 0;line-height:30px;}.xbs_5 .title,.xbs_5 .title a{color:#BC4A2D !important;}.xbs_5 .dxb_bc{padding-bottom:10px;background-image:url(http://www.52pojie.cn/static/image/diy/bs_5_ft_r.png);}.xbs_5 .module,.xbs_5 .portal_block_summary{padding:10px 10px 0;border-color:#F08C3B;}.xbs_6{background-image:url(http://www.52pojie.cn/static/image/diy/bs_6_ft.png);}.xbs_6 .title,.xbs_6 .titletext{background-image:url(http://www.52pojie.cn/static/image/diy/bs_6_hd.png);line-height:24px;}.xbs_6 .titletext{height:32px;}.xbs_6 .title,.xbs_6 .title a{color:#FFF !important;}.xbs_6 .dxb_bc{background-image:url(http://www.52pojie.cn/static/image/diy/bs_6_ft_r.png);}.xbs_6 .module,.xbs_6 .portal_block_summary{border-color:#4B85A0;}.xbs_7{background-image:url(http://www.52pojie.cn/static/image/diy/bs_7_ft.png);}.xbs_7 .title,.xbs_7 .titletext{background-image:url(http://www.52pojie.cn/static/image/diy/bs_7_hd.png);}.xbs_7 .title,.xbs_7 .title a{color:#444 !important;}.xbs_7 .dxb_bc{background-image:url(http://www.52pojie.cn/static/image/diy/bs_7_ft_r.png);}.xbs_7 .module,.xbs_7 .portal_block_summary{border-color:#E5E5E5;}.fcs{font-size:12px;}.fcs dt,.fcs dd{margin:0;padding:0;}.fcs dt{font-size:18px;font-weight:100;}.fcs dd,.fcs dd a{color:#666;}.slideblock{position:relative;}.slideshow{clear:both;}.slideshow li{position:relative;overflow:hidden;}.slideshow span.title{position:absolute;bottom:0;left:0;margin-bottom:0;width:100%;height:32px;line-height:32px;font-size:14px;text-indent:10px;}.slideshow span.title,.slidebar li{background:rgba(0,0,0,0.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr = #30000000,endColorstr = #30000000);color:#FFF;overflow:hidden;}.slidebar li{float:left;margin-right:1px;width:20px;height:20px;line-height:20px;text-align:center;font-size:10px;cursor:pointer;}.slidebar li.on{background:rgba(255,255,255,0.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr = #50FFFFFF,endColorstr = #50FFFFFF);color:#000;font-weight:700;}.cl_frame_bm{margin:0 !important;border:0 !important;}.cl_block_bm{margin:0 !important;border:0 !important;}.cl_block_bm .dxb_bc{margin:0 !important;}.b_poll dt{padding-left:20px;background:url(http://www.52pojie.cn/static/image/common/pollsmall.gif) no-repeat 0 9px;}.b_poll dd li{padding:0 0 4px 20px;}.b_poll dd li .pc{float:left;margin:4px 0 0 -20px;}.b_debate{}.b_debate dt{padding-left:20px;background:url(http://www.52pojie.cn/static/image/common/debatesmall.gif) no-repeat 0 10px;}.b_debate .chart{position:relative;margin:8px auto;padding:0;width:279px;height:78px;background:url(http://www.52pojie.cn/static/image/common/p_debate_chart.png) no-repeat 0 0;}.b_debate .chart strong{position:absolute;top:25px;width:80px;font-size:14px;text-align:center;}.b_debate .chart .debater2{right:0;}.b_debate .chart1,.b_debate .chart2{position:absolute;left:80px;bottom:0;width:40px;background:url(http://www.52pojie.cn/static/image/common/p_debate_chart.png) no-repeat 0 -78px;}.b_debate .chart2{left:159px;background-position:100% -78px;}.b_debate p{height:1.5em;overflow:hidden;}.b_hstab td{padding:5px 0;border-bottom:1px solid #CDCDCD;}.tip{position:absolute;padding:10px;width:260px;border:1px solid #B1B1B1;background:#FEFEE9;}.tip_1,.tip_2{margin-top:8px;}.tip_3,.tip_4{margin-top:-8px;}.tip_horn{position:absolute;width:11px;height:6px;overflow:hidden;}.tip_1 .tip_horn{left:5px;top:-6px;background:url(http://www.52pojie.cn/static/image/common/tip_top.png);}.tip_2 .tip_horn{right:5px;top:-6px;background:url(http://www.52pojie.cn/static/image/common/tip_top.png);}.tip_3 .tip_horn{right:5px;bottom:-6px;background:url(http://www.52pojie.cn/static/image/common/tip_bottom.png);}.tip_4 .tip_horn{left:5px;bottom:-6px;background:url(http://www.52pojie.cn/static/image/common/tip_bottom.png);}.tip_js .tip_horn{right:61px;bottom:-6px;background:url(http://www.52pojie.cn/static/image/common/tip_bottom.png);}.aimg_tip{margin-top:0;}em.hot{position:absolute;left:-2px;top:-2px;text-indent:-9999px;overflow:hidden;background:url(http://www.52pojie.cn/static/image/common/hot.png) no-repeat 0 0;}.gsh{text-align:center;}.gsh h1{margin:1em 0 0.5em -60px;font-size:16px;font-weight:100;}.gsh .px{width:272px;}.gsh .pns .px{margin-right:3px;width:190px;}.card{padding:0;width:295px !important;border-color:#C2D5E3;background:#FDFEFF;}.card .p_opt{padding:0;}.card .avt{position:absolute;display:inline;margin-left:-70px;width:70px;}.card_mn,.card_info{padding:10px 10px 10px 80px;}.card_mn{min-height:56px;}.ie6 .card_mn{height:56px;}.card_info{border:dashed #CDCDCD;border-width:1px 0;}.card_msg{width:95%;height:4em;}.card a{padding:0;display:inline !important;white-space:normal;border-bottom:none;}.card a:hover{background-color:transparent !important;color:#444;text-shadow:none;}.card .o{clear:both;padding:5px 10px;}.card .o a{float:left;margin:3px 5px 3px 0;padding:2px 0;width:5em;border:1px solid #C2D5E3;background:#E5EDF2 url(http://www.52pojie.cn/static/image/common/card_btn.png) repeat-x 0 100%;line-height:14px;text-align:center;}.ie_all .card .o a{padding:3px 0 0;}.card .mgc,.card .f{padding:0 10px 5px;}.card .f li{display:block;}.card_gender_0{background:#efefef url(http://www.52pojie.cn/static/image/common/nosexbg.png) no-repeat bottom right;}.card_gender_1{background:#bbebf9 url(http://www.52pojie.cn/static/image/common/gentlemanbg.png) no-repeat bottom right;}.card_gender_2{background:#fce0df url(http://www.52pojie.cn/static/image/common/ladybg.png) no-repeat bottom right;}.ss em{display:block;float:left;margin-right:2px;padding-left:7px;width:16px;line-height:23px;background:#EEE;cursor:pointer;}.ss em.a{background:#09F;color:#FFF;}.dopt a{float:left;margin-right:3px;width:21px !important;height:21px;line-height:21px;text-align:center;}.dopt_b,.dopt_i,.dopt_l{border:1px solid #F1F5FA;outline:none;}.dopt .cnt{border:1px solid #999;background-color:#FFF;}.colorwd{margin-left:3px;width:23px !important;background-color:#666;background-image:url(http://www.52pojie.cn/static/image/common/pn_color.png) !important;background-repeat:no-repeat;background-position:0 0;}.colorwd:active{background-position:0 0;}.ie6 .colorwd,.ie7 .colorwd{background-position:-1px -1px;}.ie6 a.colorwd,.ie7 a.colorwd{background-position:0 0;}.colorpx{margin:0 -3px 0 3px;border-right:none;}.slidebox,.block-name{display:none;}.imgzoom_title{padding:10px 0 0;color:#666;}.imgzoom_exif{position:absolute;left:10px;bottom:24px;padding:0 6px;height:18px;background:rgba(0,0,0,.6);text-align:left;line-height:1.5;color:white;overflow:hidden;}.imgzoom_exif_hover{height:auto;}.ie_all .imgzoom_exif,.imgzoom_exif_hover{background:#000;}.ie6 .imgzoom_exif{bottom:39px;}.patch{width:300px;}.patch .bm{border-color:#F26C4F;background:#FFF;}.patch .allfixed{border-color:#6C3;}.patch .bm_h{border:solid #FFF;border-width:1px 1px 0;background:#F26C4F;}.patch .allfixed .bm_h{background:#6C3;}.patch h2,.patch .bm_h .y{color:#FFF;}.patch table{table-layout:fixed;}.patch th,.patch td{padding:2px;border-bottom:1px dotted #CDCDCD;}.patchdate{width:70px;}.patchstat{width:55px;}.unfixed{color:#F26C4F;}.plugin{width:270px;}.plugin .bm_h{border-color:#CDCDCD;color:#444;background:#F2F2F2;}.waterfall{position:relative;margin-top:15px;}.waterfall li{margin:0 10px 10px 0;padding:0 0 3px;text-align:left;border-width:1px 0 0;border-top:1px solid #EAEAEA;background:url(http://www.52pojie.cn/static/image/common/bg_waterfall.png) no-repeat 100% 100%;}.waterfall .c,.waterfall h3{padding:10px;border:solid #EAEAEA;border-width:0 1px;background-color:#F8F8F8;}.waterfall .c{overflow:hidden;padding-bottom:0;max-height:800px;}.waterfall .c .nopic{display:block;background:#FFF url(http://www.52pojie.cn/static/image/common/nophototiny.png) no-repeat 50% 50%;cursor:pointer;}.waterfall .auth{padding:0 10px 10px;border-width:0 1px 1px;border-style:solid;border-color:transparent #EAEAEA #B9B9B9;background:#F8F8F8;}.waterfall .auth img{display:inline-block;margin:0 1px;}.pgbtn{margin:5px 0 10px;}.pgbtn a{display:block;height:40px;line-height:40px;letter-spacing:5px;text-align:center;border:1px solid #DCDCDC;font-size:14px;outline:none;border-radius:5px;box-shadow:0 1px 0 #F5F5F5;}.pgbtn a:hover{border-color:#BABABA;text-decoration:none;}.pgbtn a:active{background:#EEE;border-color:#D0D0D0;box-shadow:none;}.qq_bind{margin-top:-3px;}#toptb .qq_bind{margin-top:2px;}#qq_groupbox{padding:0 12px;width:710px;}.qq_list{width:710px;}.qq_list dt{width:34px;padding-right:4px;overflow:hidden;}.qq_list dt img{padding:1px;border:1px #ccc solid;}.qq_list dt,.qq_list dd{float:left;height:40px;}.qq_name{width:110px;font-weight:bold;text-align:middle;}.qq_copy{width:90px;}.qq_img{width:100px;}.qq_qr{width:40px;}.qgroupinfo{padding:7px 10px 0;border-top:1px solid #d1d1d1;}#jz52scbar{overflow:hidden;height:42px;line-height:42px;}.jz52scbar_icon_td{width:21px;background:url(../../source/plugin/jz52_top/template/search.png) no-repeat 0 -50px;}.jz52scbar_txt_td,.jz52scbar_type_td{background:url(../../source/plugin/jz52_top/template/search.png) repeat-x 0 -93px;}#jz52scbar_txt{width:400px;border:1px solid #FFF;outline:none;}.jz52scbar_txt_td input{box-shadow:none;}.jz52scbar_narrow #jz52scbar_txt{width:260px;}.jz52scbar_btn_td{width:90px;}#jz52scbar_btn{margin:0;padding:0;border:none;box-shadow:none;height:37px;width:70px;}#jz52scbar_btn strong{line-height:36px;font-size:14px;}.jz52scbar_type_td{width:61px;background:url(../../source/plugin/jz52_top/template/search.png) no-repeat 0 -193px;}#jz52scbar_type{display:block;padding-left:10px;text-align:left;text-decoration:none;}#jz52scbar_type_menu{margin-top:-8px;}#jz52scbar_hot{padding-left:8px;height:45px;overflow:hidden;}#jz52scbar_hot strong,#jz52scbar_hot a{float:left;margin-right:8px;white-space:nowrap;}.soflbc{margin:4px 0px 0px;background:url(../../source/plugin/jz52_top/template/imc_access_pop2.png) no-repeat scroll 0% 0% transparent;background-position:-27px -22px;width:11px;height:12px;text-indent:-999em;}"
  },
  {
    "path": "bin/htmlexample/css/text.css",
    "content": "@charset \"utf-8\";\n/* CSS Document */\n\n#goTopBtn {POSITION: fixed; TEXT-ALIGN: center; LINE-HEIGHT: 30px; WIDTH: 30px; BOTTOM: 35px; HEIGHT: 33px; FONT-SIZE: 12px; CURSOR: pointer; RIGHT: 0px; _position: absolute; _right: auto}\na:link {text-decoration: none; color: darkblue; }\na:visited {text-decoration: none; color: darkblue;}\na:hover {color: grey;}\na:active {color: #0000FF;}\na,img {border-style: none; outline: none !important}\na#alt:link {text-indent: 2em; background: #EAF2D3}\na#alt:visited {text-indent: 2em; background: #EAF2D3}\na#alt:hover {text-indent: 2em; background: #EAF2D3}\na#alt:active {text-indent: 2em; background: #EAF2D3}\ndl {font-size:1.5em; text-indent: 2em; line-height: 1.5;}\ndl.alt {font-size:0.8em; text-indent: 2em; line-height: 1.2;}\n\n#page{page-break-after: always;}\nbody {font-size:100%; padding:2em;}\nh1 {font-size:2em; text-align: center; color: darkblue;}\nh2 {font-size:1.5em; color: darkgreen}\nh3 {font-size:1.3em; text-indent:0.5em; color: darkgreen}\nh4 {font-size:1.2em; text-indent:1.5em}\nh5 {font-size:1em; text-indent:2em}\n\np.head {text-align: right; color: grey;}\np.paragraph {text-indent: 2em; line-height: 1.5}\np.center {text-align: center}\np.name {text-align: center; line-height: 1.5; font-size: 0.9em; margin-left:2em; margin-right:2em}\np.premark {text-align: center; line-height: 1.5; font-size: 0.8em; margin-left:2em; margin-right:2em}\np.tremark {line-height: 1.5; margin-left:2em}\np.seq {line-height: 1.5; font-size: 0.8em; margin-left:2em; margin-right:2em; font-family:Courier New}\np.ref {font-family:Arial; line-height: 1.5; font-size: 0.9em}\n\nimg.normal {height: auto}\nimg.small {height: 480px}\nimg.logo {height: 40px}\nimg.big {height: 720px}\nimg.normal2 {height:120px; width:200px}\nimg.low {height: 300px}\n\n#tb{overflow: auto; width: 100%; height: 100%}\ntable {font-family:Calibri, Arial, Helvetica, sans-serif; width:100%; font-size:0.8em; border:1px solid grey; border-collapse:collapse}\ntable, tr, th, td {border:1px solid grey; text-align:center}\ntable, th {background-color:#EAF2D3;}\ntable, tr {background-color:#ffffff}\n\n\n.menu { position:fixed; right:50px;top:0; z-index: 1000;}\n.menu ul {list-style-type: none; padding-left:0}\n.main_menu li{ float:left;  background: none repeat scroll 0 0 #368BCC;cursor: pointer; font-weight: bold;height: 45px;line-height: 45px;\nmargin: 3px;text-align: center;width: 160px;font-size: 14px;}\n.main_menu li:hover { background: none repeat scroll 0 0 #20B2AA; box-shadow: 0 0 10px #9ACD32}\n.main_menu li ul{ display:none; }\n.main_menu li ul:hover{ display:block; }\n#menu_list li{ margin:0; width:100%; font-size:12px; float:left; height:30px; line-height:30px; border-bottom:1px dashed #aaa;}\n#menu_list li a,.main_menu li a{color:#fff; text-decoration:none;display: block;}\n.close{ background:url(../images/close.gif) no-repeat; width:45px; height:45px;  position: fixed;top: 0; right: 0px; cursor:pointer;}\n.open{ background:url(../images/open.gif) no-repeat; width:45px; height:45px;  position: fixed;top: 0;right: 0px;cursor:pointer;}\n\n\n.albumSlider {width:600px;background:#EAF2D3; margin:0 auto; padding:10px; font-size:10px;\n\tposition:relative;overflow:hidden;}\n.albumSlider .fullview{position:relative; float:left;}\n.albumSlider .fullview,\n.albumSlider .fullview img {width:480px; height:480px;}\n\t.albumSlider .fullview img {position:absolute; top:0; left:0;}\n.albumSlider .slider{width:110px;height:480px;background:#fff;\n\tposition:absolute;top:10px;right:10px;}\n\t\t.albumSlider .imglistwrap{height:448px; overflow:hidden;margin-right:5px; position:relative;}\n\t.albumSlider .imglist{position:relative;}\n\t.albumSlider ul{list-style-type: none; padding-left:0}\n\t.albumSlider li{height:96px;margin-top:0;clear:both; list-style:none;}\n\t.albumSlider li img{width:90px;height:90px; float:right; display:inline;\n\t\tmargin:2px 2px 0 0;border:1px solid #EAF2D3;}\n\t.albumSlider a{width:103px;height:96px;display:block; outline:none;}\n\t.albumSlider li a:hover,\n\t.albumSlider li.current a{background:url(../images/album-slider-arrow_box.png) no-repeat 0 0;}\n.albumSlider .button {width: 100px; height:16px;cursor:pointer;margin-left:5px;\n\tbackground:url(../images/album-slider-button.png) no-repeat 50% 100%;}\n\t\t.albumSlider .movebackward{background-position: 50% 0;}\n\t\t\n"
  },
  {
    "path": "bin/htmlexample/css/tree.css",
    "content": ".tree {\n\tfont-family: Verdana, Geneva, Arial, Helvetica, sans-serif;\n\tfont-size: 11px;\n\tpadding: 10px;\n\twhite-space: nowrap;\n}\n.tree img {\n\tborder: 0px;\n\theight: 18px;\n\tvertical-align: text-bottom;\n}\n.tree a {\n\tcolor: #000;\n\ttext-decoration: none;\n}\n.tree a:hover {\n\tcolor: #345373;\n}"
  },
  {
    "path": "bin/htmlexample/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"src/css/text.css\">\n<link rel=\"StyleSheet\" href=\"src/js/tree/tree.css\" type=\"text/css\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"src/js/fancybox/jquery.fancybox-1.3.4.css\" media=\"screen\" />\n<link rel=\"stylesheet\" href=\"src/css/style.css\" />\n<script src=\"src/js/jquery-1.4.2.min.js\" type=\"text/javascript\"></script>\n<script src=\"src/js/scrollTop.js\" type=\"text/javascript\"></script>\n<script src=\"src/js/common.js\" type=\"text/javascript\"></script>\n<script src=\"src/js/jquery.albumSlider.min.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\" src=\"src/js/tree/tree.js\"></script>\n<script type=\"text/javascript\" src=\"src/js/fancybox/jquery.mousewheel-3.0.4.pack.js\"></script>\n<script type=\"text/javascript\" src=\"src/js/fancybox/jquery.fancybox-1.3.4.pack.js\"></script>\n\n<script type=\"text/javascript\">\nalter(jsValue);\n</script>\n\n<script type=\"text/javascript\">\n\t$(document).ready(function() {\n\t\t/*\n\t\t*   Examples - images\n\t\t*/\n\n\t\t$(\"a#example1\").fancybox();\n\n\t\t$(\"a#example2\").fancybox({\n\t\t\t'overlayShow'\t: false,\n\t\t\t'transitionIn'\t: 'elastic',\n\t\t\t'transitionOut'\t: 'elastic'\n\t\t});\n\t\t$(\"a#example3\").fancybox({\n\t\t\t'transitionIn'\t: 'none',\n\t\t\t'transitionOut'\t: 'none'\n\t\t});\n\n\t\t$(\"a#example4\").fancybox({\n\t\t\t'opacity'\t\t: true,\n\t\t\t'overlayShow'\t: false,\n\t\t\t'transitionIn'\t: 'elastic',\n\t\t\t'transitionOut'\t: 'none'\n\t\t});\n\n\t\t$(\"a#example5\").fancybox();\n\n\t\t$(\"a#example6\").fancybox({\n\t\t\t'titlePosition'\t\t: 'outside',\n\t\t\t'overlayColor'\t\t: '#000',\n\t\t\t'overlayOpacity'\t: 0.9\n\t\t});\n\n\t\t$(\"a#example7\").fancybox({\n\t\t\t'titlePosition'\t: 'inside'\n\t\t});\n\n\t\t$(\"a#example8\").fancybox({\n\t\t\t'titlePosition'\t: 'over'\n\t\t});\n\n\t\t$(\"a[rel=example_group]\").fancybox({\n\t\t\t'transitionIn'\t\t: 'none',\n\t\t\t'transitionOut'\t\t: 'none',\n\t\t\t'titlePosition' \t: 'over',\n\t\t\t'titleFormat'\t\t: function(title, currentArray, currentIndex, currentOpts) {\n\t\t\t\treturn '<span id=\"fancybox-title-over\">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';\n\t\t\t}\n\t\t});\n\n\t\t/*\n\t\t*   Examples - various\n\t\t*/\n\n\t\t$(\"#various1\").fancybox({\n\t\t\t'titlePosition'\t\t: 'inside',\n\t\t\t'transitionIn'\t\t: 'none',\n\t\t\t'transitionOut'\t\t: 'none'\n\t\t});\n\n\t\t$(\"#various2\").fancybox();\n\n\t\t$(\"#various3\").fancybox({\n\t\t\t'width'\t\t\t\t: '75%',\n\t\t\t'height'\t\t\t: '75%',\n\t\t\t'autoScale'\t\t\t: false,\n\t\t\t'transitionIn'\t\t: 'none',\n\t\t\t'transitionOut'\t\t: 'none',\n\t\t\t'type'\t\t\t\t: 'iframe'\n\t\t});\n\n\t\t$(\"#various4\").fancybox({\n\t\t\t'padding'\t\t\t: 0,\n\t\t\t'autoScale'\t\t\t: false,\n\t\t\t'transitionIn'\t\t: 'none',\n\t\t\t'transitionOut'\t\t: 'none'\n\t\t});\n\n\t});\n</script>\n\n<script type=\"text/javascript\">\n$(function(){\n\t//纵向，默认，移动间隔2\n    $('div.albumSlider').albumSlider();\n    //横向设置\n    $('div.albumSlider-h').albumSlider({direction:'h',step:3});\n});\n\nfunction  ButtonPushed()\n{\n\t//alert(\"文本\");\n\talert(jsValue); //c++ 构造的值\n\tapp.jsInvokeCPlusPlus(\"Button clicked \",\"Second param\"); //js 调用c++\n\tmyobject.myval=\"object value\";\n\talert(myobject.myval); \n}\n\n</script>\n\n\n<title>Html Example</title>\n</head>\n<body>\n<button  id=\"buttonjs\" onClick=\"ButtonPushed()\" >JS Invoke C plus plus</button>\n<a href=\"http:\\\\www.baidu.com\" title=\"title\" target=\"_self\">百度</a>\n<div id=\"page\" >\n<p class=\"head\"><a href=\"#home\" title = \"返回首页\"><img class=\"logo\" align=\"left\" src=\"src/images/logo.png\" alt=\"Need Logo\" /></a>\n<div class=\"albumSlider\">\n<div class=\"fullview\"> <img src=\"src/images/cover.jpg\" alt=\"LDM_1.Error\" /></div>\n<div class=\"slider\">\n<div class=\"button movebackward\" title=\"向上滚动\"></div>\n<div class=\"imglistwrap\"><ul class=\"imglist\">\n<li><a id=\"example2\" href=\"src/images/POS-1.jpg\" ><img src=\"src/images/POS-1.jpg\" alt=\"LDM_1.Error\" /></a></li>\n<li><a id=\"example3\" href=\"src/images/POS-2.jpg\" ><img src=\"src/images/POS-2.jpg\" alt=\"LDM_2.Error\" /></a></li>\n<li><a id=\"example4\" href=\"src/images/POS-3.jpg\" ><img src=\"src/images/POS-3.jpg\" alt=\"LDM_3.Error\" /></a></li>\n<li><a id=\"example5\" href=\"src/images/POS-4.jpg\" ><img src=\"src/images/POS-4.jpg\" alt=\"PMM_1.Error\" /></a></li>\n<li><a id=\"example6\" href=\"src/images/POS-5.jpg\" ><img src=\"src/images/POS-5.jpg\" alt=\"PMM_2.Error\" /></a></li>\n</ul></div>\n<div class=\"button moveforward\" title=\"向下滚动\"></div>\n</div>\n</div>\n\n<p class=\"name\">相册图片</p>\n<p class=\"premark\">美美哒</p>\n</div>\n</div>\n\n\n</body>\n</html>\n"
  },
  {
    "path": "bin/htmlexample/src/css/style.css",
    "content": "html, body, div, ul {\n\tmargin: 0;\n\tpadding: 2;\n}\n\nbody {\n    color: #262626;\n\n\n}\n\n#content {\n\twidth: 400px;\n\tmargin: 40px auto 0 auto;\n\tpadding: 0 60px 30px 60px;\n\tborder: solid 0px #cbcbcb;\n\n\t-moz-box-shadow: 0px 0px 10px #cbcbcb;\n\t-webkit-box-shadow: 0px 0px 10px #cbcbcb;\n}\n\nh1 {\n\tmargin: 30px 0 15px 0;\n\tfont-size: 30px;\n\tfont-weight: bold;\n\tfont-family: Arial;\n}\n\nh1 span {\n\tfont-size: 50%;\n\tletter-spacing: -0.05em;\n}\n\nhr {\n\tborder: none;\n\theight: 1px; line-height: 1px;\n\tbackground: #E5E5E5;\n\tmargin-bottom: 20px;\n\tpadding: 0;\n}\n\np {\n\tmargin: 0;\n\tpadding: 7px 0;\n}\n\na {\n\toutline: none;\n}\n\na img {\n\tborder: none;\n\n}\n\na img.last {\n\tmargin-right: 0;\t\n}\n\nul {\n\tmargin-bottom: 24px;\n\tpadding-left: 30px;\n}\n"
  },
  {
    "path": "bin/htmlexample/src/css/text.css",
    "content": "@charset \"utf-8\";\n/* CSS Document */\n\n#goTopBtn {POSITION: fixed; TEXT-ALIGN: center; LINE-HEIGHT: 30px; WIDTH: 30px; BOTTOM: 35px; HEIGHT: 33px; FONT-SIZE: 12px; CURSOR: pointer; RIGHT: 0px; _position: absolute; _right: auto}\na:link {text-decoration: none; color: darkblue; }\na:visited {text-decoration: none; color: darkblue;}\na:hover {color: grey;}\na:active {color: #0000FF;}\na,img {border-style: none; outline: none !important}\na#alt:link {text-indent: 2em; background: #EAF2D3}\na#alt:visited {text-indent: 2em; background: #EAF2D3}\na#alt:hover {text-indent: 2em; background: #EAF2D3}\na#alt:active {text-indent: 2em; background: #EAF2D3}\ndl {font-size:1.5em; text-indent: 2em; line-height: 1.5;}\ndl.alt {font-size:0.8em; text-indent: 2em; line-height: 1.2;}\n\n#page{page-break-after: always;}\nbody {font-size:100%; padding:2em;}\nh1 {font-size:2em; text-align: center; color: darkblue;}\nh2 {font-size:1.5em; color: darkgreen}\nh3 {font-size:1.3em; text-indent:0.5em; color: darkgreen}\nh4 {font-size:1.2em; text-indent:1.5em}\nh5 {font-size:1em; text-indent:2em}\n\np.head {text-align: right; color: grey;}\np.paragraph {text-indent: 2em; line-height: 1.5}\np.center {text-align: center}\np.name {text-align: center; line-height: 1.5; font-size: 0.9em; margin-left:2em; margin-right:2em}\np.premark {text-align: center; line-height: 1.5; font-size: 0.8em; margin-left:2em; margin-right:2em}\np.tremark {line-height: 1.5; margin-left:2em}\np.seq {line-height: 1.5; font-size: 0.8em; margin-left:2em; margin-right:2em; font-family:Courier New}\np.ref {font-family:Arial; line-height: 1.5; font-size: 0.9em}\n\nimg.normal {height: auto}\nimg.small {height: 480px}\nimg.logo {height: 40px}\nimg.big {height: 720px}\nimg.normal2 {height:120px; width:200px}\nimg.low {height: 300px}\n\n#tb{overflow: auto; width: 100%; height: 100%}\ntable {font-family:Calibri, Arial, Helvetica, sans-serif; width:100%; font-size:0.8em; border:1px solid grey; border-collapse:collapse}\ntable, tr, th, td {border:1px solid grey; text-align:center}\ntable, th {background-color:#EAF2D3;}\ntable, tr {background-color:#ffffff}\n\n\n.menu { position:fixed; right:50px;top:0; z-index: 1000;}\n.menu ul {list-style-type: none; padding-left:0}\n.main_menu li{ float:left;  background: none repeat scroll 0 0 #368BCC;cursor: pointer; font-weight: bold;height: 45px;line-height: 45px;\nmargin: 3px;text-align: center;width: 160px;font-size: 14px;}\n.main_menu li:hover { background: none repeat scroll 0 0 #20B2AA; box-shadow: 0 0 10px #9ACD32}\n.main_menu li ul{ display:none; }\n.main_menu li ul:hover{ display:block; }\n#menu_list li{ margin:0; width:100%; font-size:12px; float:left; height:30px; line-height:30px; border-bottom:1px dashed #aaa;}\n#menu_list li a,.main_menu li a{color:#fff; text-decoration:none;display: block;}\n.close{ background:url(../images/close.gif) no-repeat; width:45px; height:45px;  position: fixed;top: 0; right: 0px; cursor:pointer;}\n.open{ background:url(../images/open.gif) no-repeat; width:45px; height:45px;  position: fixed;top: 0;right: 0px;cursor:pointer;}\n\n\n.albumSlider {width:600px;background:#EAF2D3; margin:0 auto; padding:10px; font-size:10px;\n\tposition:relative;overflow:hidden;}\n.albumSlider .fullview{position:relative; float:left;}\n.albumSlider .fullview,\n.albumSlider .fullview img {width:480px; height:480px;}\n\t.albumSlider .fullview img {position:absolute; top:0; left:0;}\n.albumSlider .slider{width:110px;height:480px;background:#fff;\n\tposition:absolute;top:10px;right:10px;}\n\t\t.albumSlider .imglistwrap{height:448px; overflow:hidden;margin-right:5px; position:relative;}\n\t.albumSlider .imglist{position:relative;}\n\t.albumSlider ul{list-style-type: none; padding-left:0}\n\t.albumSlider li{height:96px;margin-top:0;clear:both; list-style:none;}\n\t.albumSlider li img{width:90px;height:90px; float:right; display:inline;\n\t\tmargin:2px 2px 0 0;border:1px solid #EAF2D3;}\n\t.albumSlider a{width:103px;height:96px;display:block; outline:none;}\n\t.albumSlider li a:hover,\n\t.albumSlider li.current a{background:url(../images/album-slider-arrow_box.png) no-repeat 0 0;}\n.albumSlider .button {width: 100px; height:16px;cursor:pointer;margin-left:5px;\n\tbackground:url(../images/album-slider-button.png) no-repeat 50% 100%;}\n\t\t.albumSlider .movebackward{background-position: 50% 0;}\n\t\t\n.buttonfo {\n}\n"
  },
  {
    "path": "bin/htmlexample/src/css/tree.css",
    "content": ".tree {\n\tfont-family: Verdana, Geneva, Arial, Helvetica, sans-serif;\n\tfont-size: 11px;\n\tpadding: 10px;\n\twhite-space: nowrap;\n}\n.tree img {\n\tborder: 0px;\n\theight: 18px;\n\tvertical-align: text-bottom;\n}\n.tree a {\n\tcolor: #000;\n\ttext-decoration: none;\n}\n.tree a:hover {\n\tcolor: #345373;\n}"
  },
  {
    "path": "bin/htmlexample/src/js/common.js",
    "content": "// JavaScript Document\n$(function(){\n$('.main_menu li:eq(1)').live('mouseenter', function(){\n\t$('#menu_list').show();\t\t\t\t\t\t\t\t\t\t\n});\n$('#menu_list').live('mouseleave', function(){\n\t$('#menu_list').hide();\t\t\t\t\t\t\t\t\t\t\n});\n$('.main_menu li:eq(1)').live('mouseleave', function(){\n\t$('#menu_list').hide();\t\t\t\t\t\t\t\t\t\t\n});\n\n$('.close').live('click',function(){\n\t$('.main_menu').fadeOut();\n\t$(this).removeClass(\"close\").addClass(\"open\");\n})\n$('.open').live('click',function(){\n\t$('.main_menu').fadeIn();\n\t$(this).removeClass(\"open\").addClass(\"close\");\n})\n\n});\n//顶部导航\n\n$(document).ready(function(){\n\t$(\".img_show\").each( function(i)\n\t{\n\n\t\tvar currentPosition = 0;\n\t\tvar slideHeight=110;\n\t\tvar slides = $(this).find(\"li\");\n\t\t//alert(slides.length);\n\t\tvar numberOfSlides = slides.length;\n\n\t\t// Wrap all .slides with #slideInner div\n\t\t   slides\n\t\t\t.wrapAll('<div class=\"slideInner\"></div>')\n\t\t\t// Float left to display horizontally, readjust .slides width\n\t\t\t.css({\n\t\t\t  //'float' : 'left',\n\t\t\t  'height' : slideHeight\n\t\t\t});\n\n\t\t// Insert controls in the DOM\n\t\t   $(this).find('.slideshow')\n\t\t\t.prepend('<input class=\"leftControl btn_up control\" width=\"130\" height=\"20\" type=\"button\"/>')\n\t\t\t.append('<input class=\"rightControl btn_down control\" width=\"130\" height=\"20\" type=\"button\"/>');\n\t\t// Hide left arrow control on first load\n\t\t\t  manageControls(currentPosition,$(this));\n\n\t\t\t  // Create event listeners for .controls clicks\n\t\t\t  $(this).find('.control')\n\t\t\t\t.bind('click',  {tou: $(this)}, function(event){\n\t\t\t\t  //alert(currentPosition);\n\t\t\t\t// Determine new position\n\t\t\t\t\n\t\t\t\tcurrentPosition = ($(this).attr('class')=='rightControl btn_down control') ? currentPosition+1 : currentPosition-1;\n\t\t\t\t// Hide / show controls\n\t\t\t\tmanageControls(currentPosition, event.data.tou);\n\t\t\t\t// Move slideInner using margin-left\n\t\t\t\t//alert( $(this).parent().find('.slideInner') );\n\t\t\t\tevent.data.tou.find('.slideInner').animate({\n\t\t\t\t  'marginTop' : slideHeight*(-currentPosition)\n\t\t\t\t});\n\t\t\t  });\n\n\t\t\t  // manageControls: Hides and Shows controls depending on currentPosition\n\t\t\t  function manageControls(position,lr){\n\t\t\t\t// Hide left arrow if position is first slide\n\t\t\t\tif(position==0){ $(lr).find('.leftControl').hide() } else{ $(lr).find('.leftControl').show() }\n\t\t\t\t// Hide right arrow if position is last slide\n\t\t\t\tif(position==numberOfSlides-4){ $(lr).find('.rightControl').hide() } else{ $(lr).find('.rightControl').show() }\n\t\t\t  }\t\n\n\t});\n\n  \n  \n});\n//图片轮番"
  },
  {
    "path": "bin/htmlexample/src/js/common52.js",
    "content": "function $(id) {return !id ? null : document.getElementById(id);}function $C(classname, ele, tag) {var returns = [];ele = ele || document;tag = tag || '*';if(ele.getElementsByClassName) {var eles = ele.getElementsByClassName(classname);if(tag != '*') {for (var i = 0, L = eles.length; i < L; i++) {if (eles[i].tagName.toLowerCase() == tag.toLowerCase()) {returns.push(eles[i]);}}} else {returns = eles;}}else {eles = ele.getElementsByTagName(tag);var pattern = new RegExp(\"(^|\\\\s)\"+classname+\"(\\\\s|$)\");for (i = 0, L = eles.length; i < L; i++) {if (pattern.test(eles[i].className)) {returns.push(eles[i]);}}}return returns;}function _attachEvent(obj, evt, func, eventobj) {eventobj = !eventobj ? obj : eventobj;if(obj.addEventListener) {obj.addEventListener(evt, func, false);} else if(eventobj.attachEvent) {obj.attachEvent('on' + evt, func);}}function _detachEvent(obj, evt, func, eventobj) {eventobj = !eventobj ? obj : eventobj;if(obj.removeEventListener) {obj.removeEventListener(evt, func, false);} else if(eventobj.detachEvent) {obj.detachEvent('on' + evt, func);}}function browserVersion(types) {var other = 1;for(i in types) {var v = types[i] ? types[i] : i;if(USERAGENT.indexOf(v) != -1) {var re = new RegExp(v + '(\\\\/|\\\\s|:)([\\\\d\\\\.]+)', 'ig');var matches = re.exec(USERAGENT);var ver = matches != null ? matches[2] : 0;other = ver !== 0 && v != 'mozilla' ? 0 : other;}else {var ver = 0;}eval('BROWSER.' + i + '= ver');}BROWSER.other = other;}function getEvent() {if(document.all) return window.event;func = getEvent.caller;while(func != null) {var arg0 = func.arguments[0];if (arg0) {if((arg0.constructor  == Event || arg0.constructor == MouseEvent) || (typeof(arg0) == \"object\" && arg0.preventDefault && arg0.stopPropagation)) {return arg0;}}func=func.caller;}return null;}function isUndefined(variable) {return typeof variable == 'undefined' ? true : false;}function in_array(needle, haystack) {if(typeof needle == 'string' || typeof needle == 'number') {for(var i in haystack) {if(haystack[i] == needle) {return true;}}}return false;}function trim(str) {return (str + '').replace(/(\\s+)$/g, '').replace(/^\\s+/g, '');}function strlen(str) {return (BROWSER.ie && str.indexOf('\\n') != -1) ? str.replace(/\\r?\\n/g, '_').length : str.length;}function mb_strlen(str) {var len = 0;for(var i = 0; i < str.length; i++) {len += str.charCodeAt(i) < 0 || str.charCodeAt(i) > 255 ? (charset == 'utf-8' ? 3 : 2) : 1;}return len;}function mb_cutstr(str, maxlen, dot) {var len = 0;var ret = '';var dot = !dot ? '...' : dot;maxlen = maxlen - dot.length;for(var i = 0; i < str.length; i++) {len += str.charCodeAt(i) < 0 || str.charCodeAt(i) > 255 ? (charset == 'utf-8' ? 3 : 2) : 1;if(len > maxlen) {ret += dot;break;}ret += str.substr(i, 1);}return ret;}function preg_replace(search, replace, str, regswitch) {var regswitch = !regswitch ? 'ig' : regswitch;var len = search.length;for(var i = 0; i < len; i++) {re = new RegExp(search[i], regswitch);str = str.replace(re, typeof replace == 'string' ? replace : (replace[i] ? replace[i] : replace[0]));}return str;}function htmlspecialchars(str) {return preg_replace(['&', '<', '>', '\"'], ['&amp;', '&lt;', '&gt;', '&quot;'], str);}function display(id) {var obj = $(id);if(obj.style.visibility) {obj.style.visibility = obj.style.visibility == 'visible' ? 'hidden' : 'visible';} else {obj.style.display = obj.style.display == '' ? 'none' : '';}}function checkall(form, prefix, checkall) {var checkall = checkall ? checkall : 'chkall';count = 0;for(var i = 0; i < form.elements.length; i++) {var e = form.elements[i];if(e.name && e.name != checkall && !e.disabled && (!prefix || (prefix && e.name.match(prefix)))) {e.checked = form.elements[checkall].checked;if(e.checked) {count++;}}}return count;}function setcookie(cookieName, cookieValue, seconds, path, domain, secure) {if(cookieValue == '' || seconds < 0) {cookieValue = '';seconds = -2592000;}if(seconds) {var expires = new Date();expires.setTime(expires.getTime() + seconds * 1000);}domain = !domain ? cookiedomain : domain;path = !path ? cookiepath : path;document.cookie = escape(cookiepre + cookieName) + '=' + escape(cookieValue)+ (expires ? '; expires=' + expires.toGMTString() : '')+ (path ? '; path=' + path : '/')+ (domain ? '; domain=' + domain : '')+ (secure ? '; secure' : '');}function getcookie(name, nounescape) {name = cookiepre + name;var cookie_start = document.cookie.indexOf(name);var cookie_end = document.cookie.indexOf(\";\", cookie_start);if(cookie_start == -1) {return '';} else {var v = document.cookie.substring(cookie_start + name.length + 1, (cookie_end > cookie_start ? cookie_end : document.cookie.length));return !nounescape ? unescape(v) : v;}}function Ajax(recvType, waitId) {var aj = new Object();aj.loading = 'Ժ...';aj.recvType = recvType ? recvType : 'XML';aj.waitId = waitId ? $(waitId) : null;aj.resultHandle = null;aj.sendString = '';aj.targetUrl = '';aj.setLoading = function(loading) {if(typeof loading !== 'undefined' && loading !== null) aj.loading = loading;};aj.setRecvType = function(recvtype) {aj.recvType = recvtype;};aj.setWaitId = function(waitid) {aj.waitId = typeof waitid == 'object' ? waitid : $(waitid);};aj.createXMLHttpRequest = function() {var request = false;if(window.XMLHttpRequest) {request = new XMLHttpRequest();if(request.overrideMimeType) {request.overrideMimeType('text/xml');}} else if(window.ActiveXObject) {var versions = ['Microsoft.XMLHTTP', 'MSXML.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.7.0', 'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP'];for(var i=0; i<versions.length; i++) {try {request = new ActiveXObject(versions[i]);if(request) {return request;}} catch(e) {}}}return request;};aj.XMLHttpRequest = aj.createXMLHttpRequest();aj.showLoading = function() {if(aj.waitId && (aj.XMLHttpRequest.readyState != 4 || aj.XMLHttpRequest.status != 200)) {aj.waitId.style.display = '';aj.waitId.innerHTML = '<span><img src=\"' + IMGDIR + '/loading.gif\" class=\"vm\"> ' + aj.loading + '</span>';}};aj.processHandle = function() {if(aj.XMLHttpRequest.readyState == 4 && aj.XMLHttpRequest.status == 200) {if(aj.waitId) {aj.waitId.style.display = 'none';}if(aj.recvType == 'HTML') {aj.resultHandle(aj.XMLHttpRequest.responseText, aj);} else if(aj.recvType == 'XML') {if(!aj.XMLHttpRequest.responseXML || !aj.XMLHttpRequest.responseXML.lastChild || aj.XMLHttpRequest.responseXML.lastChild.localName == 'parsererror') {aj.resultHandle('' , aj);} else {aj.resultHandle(aj.XMLHttpRequest.responseXML.lastChild.firstChild.nodeValue, aj);}} else if(aj.recvType == 'JSON') {var s = null;try {s = (new Function(\"return (\"+aj.XMLHttpRequest.responseText+\")\"))();} catch (e) {s = null;}aj.resultHandle(s, aj);}}};aj.get = function(targetUrl, resultHandle) {targetUrl = hostconvert(targetUrl);setTimeout(function(){aj.showLoading()}, 250);aj.targetUrl = targetUrl;aj.XMLHttpRequest.onreadystatechange = aj.processHandle;aj.resultHandle = resultHandle;var attackevasive = isUndefined(attackevasive) ? 0 : attackevasive;if(window.XMLHttpRequest) {aj.XMLHttpRequest.open('GET', aj.targetUrl);aj.XMLHttpRequest.setRequestHeader('X-Requested-With', 'XMLHttpRequest');aj.XMLHttpRequest.send(null);} else {aj.XMLHttpRequest.open(\"GET\", targetUrl, true);aj.XMLHttpRequest.setRequestHeader('X-Requested-With', 'XMLHttpRequest');aj.XMLHttpRequest.send();}};aj.post = function(targetUrl, sendString, resultHandle) {targetUrl = hostconvert(targetUrl);setTimeout(function(){aj.showLoading()}, 250);aj.targetUrl = targetUrl;aj.sendString = sendString;aj.XMLHttpRequest.onreadystatechange = aj.processHandle;aj.resultHandle = resultHandle;aj.XMLHttpRequest.open('POST', targetUrl);aj.XMLHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');aj.XMLHttpRequest.setRequestHeader('X-Requested-With', 'XMLHttpRequest');aj.XMLHttpRequest.send(aj.sendString);};aj.getJSON = function(targetUrl, resultHandle) {aj.setRecvType('JSON');aj.get(targetUrl+'&ajaxdata=json', resultHandle);};aj.getHTML = function(targetUrl, resultHandle) {aj.setRecvType('HTML');aj.get(targetUrl+'&ajaxdata=html', resultHandle);};return aj;}function getHost(url) {var host = \"null\";if(typeof url == \"undefined\"|| null == url) {url = window.location.href;}var regex = /^\\w+\\:\\/\\/([^\\/]*).*/;var match = url.match(regex);if(typeof match != \"undefined\" && null != match) {host = match[1];}return host;}function hostconvert(url) {if(!url.match(/^https?:\\/\\//)) url = SITEURL + url;var url_host = getHost(url);var cur_host = getHost().toLowerCase();if(url_host && cur_host != url_host) {url = url.replace(url_host, cur_host);}return url;}function newfunction(func) {var args = [];for(var i=1; i<arguments.length; i++) args.push(arguments[i]);return function(event) {doane(event);window[func].apply(window, args);return false;}}function evalscript(s) {if(s.indexOf('<script') == -1) return s;var p = /<script[^\\>]*?>([^\\x00]*?)<\\/script>/ig;var arr = [];while(arr = p.exec(s)) {var p1 = /<script[^\\>]*?src=\\\"([^\\>]*?)\\\"[^\\>]*?(reload=\\\"1\\\")?(?:charset=\\\"([\\w\\-]+?)\\\")?><\\/script>/i;var arr1 = [];arr1 = p1.exec(arr[0]);if(arr1) {appendscript(arr1[1], '', arr1[2], arr1[3]);} else {p1 = /<script(.*?)>([^\\x00]+?)<\\/script>/i;arr1 = p1.exec(arr[0]);appendscript('', arr1[2], arr1[1].indexOf('reload=') != -1);}}return s;}function safescript(id, call, seconds, times, timeoutcall, endcall, index) {seconds = seconds || 1000;times = times || 0;var checked = true;try {if(typeof call == 'function') {call();} else {eval(call);}} catch(e) {checked = false;}if(!checked) {if(!safescripts[id] || !index) {safescripts[id] = safescripts[id] || [];safescripts[id].push({'times':0,'si':setInterval(function () {safescript(id, call, seconds, times, timeoutcall, endcall, safescripts[id].length);}, seconds)});} else {index = (index || 1) - 1;safescripts[id][index]['times']++;if(safescripts[id][index]['times'] >= times) {clearInterval(safescripts[id][index]['si']);if(typeof timeoutcall == 'function') {timeoutcall();} else {eval(timeoutcall);}}}} else {try {index = (index || 1) - 1;if(safescripts[id][index]['si']) {clearInterval(safescripts[id][index]['si']);}if(typeof endcall == 'function') {endcall();} else {eval(endcall);}} catch(e) {}}}function $F(func, args, script) {var run = function () {var argc = args.length, s = '';for(i = 0;i < argc;i++) {s += ',args[' + i + ']';}eval('var check = typeof ' + func + ' == \\'function\\'');if(check) {eval(func + '(' + s.substr(1) + ')');} else {setTimeout(function () {checkrun();}, 50);}};var checkrun = function () {if(JSLOADED[src]) {run();} else {setTimeout(function () {checkrun();}, 50);}};script = script || 'common_extra';src = JSPATH + script + '.js?' + VERHASH;if(!JSLOADED[src]) {appendscript(src);}return checkrun();}function appendscript(src, text, reload, charset) {var id = hash(src + text);if(!reload && in_array(id, evalscripts)) return;if(reload && $(id)) {$(id).parentNode.removeChild($(id));}evalscripts.push(id);var scriptNode = document.createElement(\"script\");scriptNode.type = \"text/javascript\";scriptNode.id = id;scriptNode.charset = charset ? charset : (BROWSER.firefox ? document.characterSet : document.charset);try {if(src) {scriptNode.src = src;scriptNode.onloadDone = false;scriptNode.onload = function () {scriptNode.onloadDone = true;JSLOADED[src] = 1;};scriptNode.onreadystatechange = function () {if((scriptNode.readyState == 'loaded' || scriptNode.readyState == 'complete') && !scriptNode.onloadDone) {scriptNode.onloadDone = true;JSLOADED[src] = 1;}};} else if(text){scriptNode.text = text;}document.getElementsByTagName('head')[0].appendChild(scriptNode);} catch(e) {}}function hash(string, length) {var length = length ? length : 32;var start = 0;var i = 0;var result = '';filllen = length - string.length % length;for(i = 0; i < filllen; i++){string += \"0\";}while(start < string.length) {result = stringxor(result, string.substr(start, length));start += length;}return result;}function stringxor(s1, s2) {var s = '';var hash = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';var max = Math.max(s1.length, s2.length);for(var i=0; i<max; i++) {var k = s1.charCodeAt(i) ^ s2.charCodeAt(i);s += hash.charAt(k % 52);}return s;}function ajaxupdateevents(obj, tagName) {$F('_ajaxupdateevents', arguments, 'ajax');}function ajaxupdateevent(o) {$F('_ajaxupdateevent', arguments, 'ajax');}function ajaxget(url, showid, waitid, loading, display, recall) {$F('_ajaxget', arguments, 'ajax');}function ajaxpost(formid, showid, waitid, showidclass, submitbtn, recall) {$F('_ajaxpost', arguments, 'ajax');}function ajaxmenu(ctrlObj, timeout, cache, duration, pos, recall, idclass, contentclass) {$F('_ajaxmenu', arguments, 'ajax');}function ajaxinnerhtml(showid, s) {$F('_ajaxinnerhtml', arguments, 'ajax');}function showPreview(val, id) {var showObj = $(id);if(showObj) {showObj.innerHTML = val.replace(/\\n/ig, \"<bupdateseccoder />\");}}function showloading(display, waiting) {var display = display ? display : 'block';var waiting = waiting ? waiting : 'Ժ...';$('ajaxwaitid').innerHTML = waiting;$('ajaxwaitid').style.display = display;}function doane(event, preventDefault, stopPropagation) {var preventDefault = isUndefined(preventDefault) ? 1 : preventDefault;var stopPropagation = isUndefined(stopPropagation) ? 1 : stopPropagation;e = event ? event : window.event;if(!e) {e = getEvent();}if(!e) {return null;}if(preventDefault) {if(e.preventDefault) {e.preventDefault();} else {e.returnValue = false;}}if(stopPropagation) {if(e.stopPropagation) {e.stopPropagation();} else {e.cancelBubble = true;}}return e;}function loadcss(cssname) {if(!CSSLOADED[cssname]) {var csspath = (typeof CSSPATH == 'undefined' ? 'data/cache/style_' : CSSPATH);if(!$('css_' + cssname)) {css = document.createElement('link');css.id = 'css_' + cssname,css.type = 'text/css';css.rel = 'stylesheet';css.href = csspath + STYLEID + '_' + cssname + '.css?' + VERHASH;var headNode = document.getElementsByTagName(\"head\")[0];headNode.appendChild(css);} else {$('css_' + cssname).href = csspath + STYLEID + '_' + cssname + '&' + VERHASH;}CSSLOADED[cssname] = 1;}}function showMenu(v) {var ctrlid = isUndefined(v['ctrlid']) ? v : v['ctrlid'];var showid = isUndefined(v['showid']) ? ctrlid : v['showid'];var menuid = isUndefined(v['menuid']) ? showid + '_menu' : v['menuid'];var ctrlObj = $(ctrlid);var menuObj = $(menuid);if(!menuObj) return;var mtype = isUndefined(v['mtype']) ? 'menu' : v['mtype'];var evt = isUndefined(v['evt']) ? 'mouseover' : v['evt'];var pos = isUndefined(v['pos']) ? '43' : v['pos'];var layer = isUndefined(v['layer']) ? 1 : v['layer'];var duration = isUndefined(v['duration']) ? 2 : v['duration'];var timeout = isUndefined(v['timeout']) ? 250 : v['timeout'];var maxh = isUndefined(v['maxh']) ? 600 : v['maxh'];var cache = isUndefined(v['cache']) ? 1 : v['cache'];var drag = isUndefined(v['drag']) ? '' : v['drag'];var dragobj = drag && $(drag) ? $(drag) : menuObj;var fade = isUndefined(v['fade']) ? 0 : v['fade'];var cover = isUndefined(v['cover']) ? 0 : v['cover'];var zindex = isUndefined(v['zindex']) ? JSMENU['zIndex']['menu'] : v['zindex'];var ctrlclass = isUndefined(v['ctrlclass']) ? '' : v['ctrlclass'];var winhandlekey = isUndefined(v['win']) ? '' : v['win'];if(winhandlekey && ctrlObj && !ctrlObj.getAttribute('fwin')) {ctrlObj.setAttribute('fwin', winhandlekey);}zindex = cover ? zindex + 500 : zindex;if(typeof JSMENU['active'][layer] == 'undefined') {JSMENU['active'][layer] = [];}for(i in EXTRAFUNC['showmenu']) {try {eval(EXTRAFUNC['showmenu'][i] + '()');} catch(e) {}}if(evt == 'click' && in_array(menuid, JSMENU['active'][layer]) && mtype != 'win') {hideMenu(menuid, mtype);return;}if(mtype == 'menu') {hideMenu(layer, mtype);}if(ctrlObj) {if(!ctrlObj.getAttribute('initialized')) {ctrlObj.setAttribute('initialized', true);ctrlObj.unselectable = true;ctrlObj.outfunc = typeof ctrlObj.onmouseout == 'function' ? ctrlObj.onmouseout : null;ctrlObj.onmouseout = function() {if(this.outfunc) this.outfunc();if(duration < 3 && !JSMENU['timer'][menuid]) {JSMENU['timer'][menuid] = setTimeout(function () {hideMenu(menuid, mtype);}, timeout);}};ctrlObj.overfunc = typeof ctrlObj.onmouseover == 'function' ? ctrlObj.onmouseover : null;ctrlObj.onmouseover = function(e) {doane(e);if(this.overfunc) this.overfunc();if(evt == 'click') {clearTimeout(JSMENU['timer'][menuid]);JSMENU['timer'][menuid] = null;} else {for(var i in JSMENU['timer']) {if(JSMENU['timer'][i]) {clearTimeout(JSMENU['timer'][i]);JSMENU['timer'][i] = null;}}}};}}if(!menuObj.getAttribute('initialized')) {menuObj.setAttribute('initialized', true);menuObj.ctrlkey = ctrlid;menuObj.mtype = mtype;menuObj.layer = layer;menuObj.cover = cover;if(ctrlObj && ctrlObj.getAttribute('fwin')) {menuObj.scrolly = true;}menuObj.style.position = 'absolute';menuObj.style.zIndex = zindex + layer;menuObj.onclick = function(e) {return doane(e, 0, 1);};if(duration < 3) {if(duration > 1) {menuObj.onmouseover = function() {clearTimeout(JSMENU['timer'][menuid]);JSMENU['timer'][menuid] = null;};}if(duration != 1) {menuObj.onmouseout = function() {JSMENU['timer'][menuid] = setTimeout(function () {hideMenu(menuid, mtype);}, timeout);};}}if(cover) {var coverObj = document.createElement('div');coverObj.id = menuid + '_cover';coverObj.style.position = 'absolute';coverObj.style.zIndex = menuObj.style.zIndex - 1;coverObj.style.left = coverObj.style.top = '0px';coverObj.style.width = '100%';coverObj.style.height = Math.max(document.documentElement.clientHeight, document.body.offsetHeight) + 'px';coverObj.style.backgroundColor = '#000';coverObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=50)';coverObj.style.opacity = 0.5;coverObj.onclick = function () {hideMenu();};$('append_parent').appendChild(coverObj);_attachEvent(window, 'load', function () {coverObj.style.height = Math.max(document.documentElement.clientHeight, document.body.offsetHeight) + 'px';}, document);}}if(drag) {dragobj.style.cursor = 'move';dragobj.onmousedown = function(event) {try{dragMenu(menuObj, event, 1);}catch(e){}};}if(cover) $(menuid + '_cover').style.display = '';if(fade) {var O = 0;var fadeIn = function(O) {if(O > 100) {clearTimeout(fadeInTimer);return;}menuObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + O + ')';menuObj.style.opacity = O / 100;O += 20;var fadeInTimer = setTimeout(function () {fadeIn(O);}, 40);};fadeIn(O);menuObj.fade = true;} else {menuObj.fade = false;}menuObj.style.display = '';if(ctrlObj && ctrlclass) {ctrlObj.className += ' ' + ctrlclass;menuObj.setAttribute('ctrlid', ctrlid);menuObj.setAttribute('ctrlclass', ctrlclass);}if(pos != '*') {setMenuPosition(showid, menuid, pos);}if(BROWSER.ie && BROWSER.ie < 7 && winhandlekey && $('fwin_' + winhandlekey)) {$(menuid).style.left = (parseInt($(menuid).style.left) - parseInt($('fwin_' + winhandlekey).style.left)) + 'px';$(menuid).style.top = (parseInt($(menuid).style.top) - parseInt($('fwin_' + winhandlekey).style.top)) + 'px';}if(maxh && menuObj.scrollHeight > maxh) {menuObj.style.height = maxh + 'px';if(BROWSER.opera) {menuObj.style.overflow = 'auto';} else {menuObj.style.overflowY = 'auto';}}if(!duration) {setTimeout('hideMenu(\\'' + menuid + '\\', \\'' + mtype + '\\')', timeout);}if(!in_array(menuid, JSMENU['active'][layer])) JSMENU['active'][layer].push(menuid);menuObj.cache = cache;if(layer > JSMENU['layer']) {JSMENU['layer'] = layer;}var hasshow = function(ele) {while(ele.parentNode && ((typeof(ele['currentStyle']) === 'undefined') ? window.getComputedStyle(ele,null) : ele['currentStyle'])['display'] !== 'none') {ele = ele.parentNode;}if(ele === document) {return true;} else {return false;}};if(!menuObj.getAttribute('disautofocus')) {try{var focused = false;var tags = ['input', 'select', 'textarea', 'button', 'a'];for(var i = 0; i < tags.length; i++) {var _all = menuObj.getElementsByTagName(tags[i]);if(_all.length) {for(j = 0; j < _all.length; j++) {if((!_all[j]['type'] || _all[j]['type'] != 'hidden') && hasshow(_all[j])) {_all[j].className += ' hidefocus';_all[j].focus();focused = true;var cobj = _all[j];_attachEvent(_all[j], 'blur', function (){cobj.className = trim(cobj.className.replace(' hidefocus', ''));});break;}}}if(focused) {break;}}} catch (e) {}}}var delayShowST = null;function delayShow(ctrlObj, call, time) {if(typeof ctrlObj == 'object') {var ctrlid = ctrlObj.id;call = call || function () {showMenu(ctrlid);};}var time = isUndefined(time) ? 500 : time;delayShowST = setTimeout(function () {if(typeof call == 'function') {call();} else {eval(call);}}, time);if(!ctrlObj.delayinit) {_attachEvent(ctrlObj, 'mouseout', function() {clearTimeout(delayShowST);});ctrlObj.delayinit = 1;}}var dragMenuDisabled = false;function dragMenu(menuObj, e, op) {e = e ? e : window.event;if(op == 1) {if(dragMenuDisabled || in_array(e.target ? e.target.tagName : e.srcElement.tagName, ['TEXTAREA', 'INPUT', 'BUTTON', 'SELECT'])) {return;}JSMENU['drag'] = [e.clientX, e.clientY];JSMENU['drag'][2] = parseInt(menuObj.style.left);JSMENU['drag'][3] = parseInt(menuObj.style.top);document.onmousemove = function(e) {try{dragMenu(menuObj, e, 2);}catch(err){}};document.onmouseup = function(e) {try{dragMenu(menuObj, e, 3);}catch(err){}};doane(e);}else if(op == 2 && JSMENU['drag'][0]) {var menudragnow = [e.clientX, e.clientY];menuObj.style.left = (JSMENU['drag'][2] + menudragnow[0] - JSMENU['drag'][0]) + 'px';menuObj.style.top = (JSMENU['drag'][3] + menudragnow[1] - JSMENU['drag'][1]) + 'px';menuObj.removeAttribute('top_');menuObj.removeAttribute('left_');doane(e);}else if(op == 3) {JSMENU['drag'] = [];document.onmousemove = null;document.onmouseup = null;}}function setMenuPosition(showid, menuid, pos) {var showObj = $(showid);var menuObj = menuid ? $(menuid) : $(showid + '_menu');if(isUndefined(pos) || !pos) pos = '43';var basePoint = parseInt(pos.substr(0, 1));var direction = parseInt(pos.substr(1, 1));var important = pos.indexOf('!') != -1 ? 1 : 0;var sxy = 0, sx = 0, sy = 0, sw = 0, sh = 0, ml = 0, mt = 0, mw = 0, mcw = 0, mh = 0, mch = 0, bpl = 0, bpt = 0;if(!menuObj || (basePoint > 0 && !showObj)) return;if(showObj) {sxy = fetchOffset(showObj);sx = sxy['left'];sy = sxy['top'];sw = showObj.offsetWidth;sh = showObj.offsetHeight;}mw = menuObj.offsetWidth;mcw = menuObj.clientWidth;mh = menuObj.offsetHeight;mch = menuObj.clientHeight;switch(basePoint) {case 1:bpl = sx;bpt = sy;break;case 2:bpl = sx + sw;bpt = sy;break;case 3:bpl = sx + sw;bpt = sy + sh;break;case 4:bpl = sx;bpt = sy + sh;break;}switch(direction) {case 0:menuObj.style.left = (document.body.clientWidth - menuObj.clientWidth) / 2 + 'px';mt = (document.documentElement.clientHeight - menuObj.clientHeight) / 2;break;case 1:ml = bpl - mw;mt = bpt - mh;break;case 2:ml = bpl;mt = bpt - mh;break;case 3:ml = bpl;mt = bpt;break;case 4:ml = bpl - mw;mt = bpt;break;}var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);if(!important) {if(in_array(direction, [1, 4]) && ml < 0) {ml = bpl;if(in_array(basePoint, [1, 4])) ml += sw;} else if(ml + mw > scrollLeft + document.body.clientWidth && sx >= mw) {ml = bpl - mw;if(in_array(basePoint, [2, 3])) {ml -= sw;} else if(basePoint == 4) {ml += sw;}}if(in_array(direction, [1, 2]) && mt < 0) {mt = bpt;if(in_array(basePoint, [1, 2])) mt += sh;} else if(mt + mh > scrollTop + document.documentElement.clientHeight && sy >= mh) {mt = bpt - mh;if(in_array(basePoint, [3, 4])) mt -= sh;}}if(pos.substr(0, 3) == '210') {ml += 69 - sw / 2;mt -= 5;if(showObj.tagName == 'TEXTAREA') {ml -= sw / 2;mt += sh / 2;}}if(direction == 0 || menuObj.scrolly) {if(BROWSER.ie && BROWSER.ie < 7) {if(direction == 0) mt += scrollTop;} else {if(menuObj.scrolly) mt -= scrollTop;menuObj.style.position = 'fixed';}}if(ml) menuObj.style.left = ml + 'px';if(mt) menuObj.style.top = mt + 'px';if(direction == 0 && BROWSER.ie && !document.documentElement.clientHeight) {menuObj.style.position = 'absolute';menuObj.style.top = (document.body.clientHeight - menuObj.clientHeight) / 2 + 'px';}if(menuObj.style.clip && !BROWSER.opera) {menuObj.style.clip = 'rect(auto, auto, auto, auto)';}}function hideMenu(attr, mtype) {attr = isUndefined(attr) ? '' : attr;mtype = isUndefined(mtype) ? 'menu' : mtype;if(attr == '') {for(var i = 1; i <= JSMENU['layer']; i++) {hideMenu(i, mtype);}return;} else if(typeof attr == 'number') {for(var j in JSMENU['active'][attr]) {hideMenu(JSMENU['active'][attr][j], mtype);}return;}else if(typeof attr == 'string') {var menuObj = $(attr);if(!menuObj || (mtype && menuObj.mtype != mtype)) return;var ctrlObj = '', ctrlclass = '';if((ctrlObj = $(menuObj.getAttribute('ctrlid'))) && (ctrlclass = menuObj.getAttribute('ctrlclass'))) {var reg = new RegExp(' ' + ctrlclass);ctrlObj.className = ctrlObj.className.replace(reg, '');}clearTimeout(JSMENU['timer'][attr]);var hide = function() {if(menuObj.cache) {if(menuObj.style.visibility != 'hidden') {menuObj.style.display = 'none';if(menuObj.cover) $(attr + '_cover').style.display = 'none';}}else {menuObj.parentNode.removeChild(menuObj);if(menuObj.cover) $(attr + '_cover').parentNode.removeChild($(attr + '_cover'));}var tmp = [];for(var k in JSMENU['active'][menuObj.layer]) {if(attr != JSMENU['active'][menuObj.layer][k]) tmp.push(JSMENU['active'][menuObj.layer][k]);}JSMENU['active'][menuObj.layer] = tmp;};if(menuObj.fade) {var O = 100;var fadeOut = function(O) {if(O == 0) {clearTimeout(fadeOutTimer);hide();return;}menuObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + O + ')';menuObj.style.opacity = O / 100;O -= 20;var fadeOutTimer = setTimeout(function () {fadeOut(O);}, 40);};fadeOut(O);} else {hide();}}}function getCurrentStyle(obj, cssproperty, csspropertyNS) {if(obj.style[cssproperty]){return obj.style[cssproperty];}if (obj.currentStyle) {return obj.currentStyle[cssproperty];} else if (document.defaultView.getComputedStyle(obj, null)) {var currentStyle = document.defaultView.getComputedStyle(obj, null);var value = currentStyle.getPropertyValue(csspropertyNS);if(!value){value = currentStyle[cssproperty];}return value;} else if (window.getComputedStyle) {var currentStyle = window.getComputedStyle(obj, \"\");return currentStyle.getPropertyValue(csspropertyNS);}}function fetchOffset(obj, mode) {var left_offset = 0, top_offset = 0, mode = !mode ? 0 : mode;if(obj.getBoundingClientRect && !mode) {var rect = obj.getBoundingClientRect();var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);if(document.documentElement.dir == 'rtl') {scrollLeft = scrollLeft + document.documentElement.clientWidth - document.documentElement.scrollWidth;}left_offset = rect.left + scrollLeft - document.documentElement.clientLeft;top_offset = rect.top + scrollTop - document.documentElement.clientTop;}if(left_offset <= 0 || top_offset <= 0) {left_offset = obj.offsetLeft;top_offset = obj.offsetTop;while((obj = obj.offsetParent) != null) {position = getCurrentStyle(obj, 'position', 'position');if(position == 'relative') {continue;}left_offset += obj.offsetLeft;top_offset += obj.offsetTop;}}return {'left' : left_offset, 'top' : top_offset};}function showTip(ctrlobj) {$F('_showTip', arguments);}function showPrompt(ctrlid, evt, msg, timeout, classname) {$F('_showPrompt', arguments);}function showCreditPrompt() {$F('_showCreditPrompt', []);}var showDialogST = null;function showDialog(msg, mode, t, func, cover, funccancel, leftmsg, confirmtxt, canceltxt, closetime, locationtime) {clearTimeout(showDialogST);cover = isUndefined(cover) ? (mode == 'info' ? 0 : 1) : cover;leftmsg = isUndefined(leftmsg) ? '' : leftmsg;mode = in_array(mode, ['confirm', 'notice', 'info', 'right']) ? mode : 'alert';var menuid = 'fwin_dialog';var menuObj = $(menuid);var showconfirm = 1;confirmtxtdefault = 'ȷ';closetime = isUndefined(closetime) ? '' : closetime;closefunc = function () {if(typeof func == 'function') func();else eval(func);hideMenu(menuid, 'dialog');};if(closetime) {showPrompt(null, null, '<i>' + msg + '</i>', closetime * 1000, 'popuptext');return;}locationtime = isUndefined(locationtime) ? '' : locationtime;if(locationtime) {leftmsg = locationtime + ' ҳת';showDialogST = setTimeout(closefunc, locationtime * 1000);showconfirm = 0;}confirmtxt = confirmtxt ? confirmtxt : confirmtxtdefault;canceltxt = canceltxt ? canceltxt : 'ȡ';if(menuObj) hideMenu('fwin_dialog', 'dialog');menuObj = document.createElement('div');menuObj.style.display = 'none';menuObj.className = 'fwinmask';menuObj.id = menuid;$('append_parent').appendChild(menuObj);var hidedom = '';if(!BROWSER.ie) {hidedom = '<style type=\"text/css\">object{visibility:hidden;}</style>';}var s = hidedom + '<table cellpadding=\"0\" cellspacing=\"0\" class=\"fwin\"><tr><td class=\"t_l\"></td><td class=\"t_c\"></td><td class=\"t_r\"></td></tr><tr><td class=\"m_l\">&nbsp;&nbsp;</td><td class=\"m_c\"><h3 class=\"flb\"><em>';s += t ? t : 'ʾϢ';s += '</em><span><a href=\"javascript:;\" id=\"fwin_dialog_close\" class=\"flbc\" onclick=\"hideMenu(\\'' + menuid + '\\', \\'dialog\\')\" title=\"ر\">ر</a></span></h3>';if(mode == 'info') {s += msg ? msg : '';} else {s += '<div class=\"c altw\"><div class=\"' + (mode == 'alert' ? 'alert_error' : (mode == 'right' ? 'alert_right' : 'alert_info')) + '\"><p>' + msg + '</p></div></div>';s += '<p class=\"o pns\">' + (leftmsg ? '<span class=\"z xg1\">' + leftmsg + '</span>' : '') + (showconfirm ? '<button id=\"fwin_dialog_submit\" value=\"true\" class=\"pn pnc\"><strong>'+confirmtxt+'</strong></button>' : '');s += mode == 'confirm' ? '<button id=\"fwin_dialog_cancel\" value=\"true\" class=\"pn\" onclick=\"hideMenu(\\'' + menuid + '\\', \\'dialog\\')\"><strong>'+canceltxt+'</strong></button>' : '';s += '</p>';}s += '</td><td class=\"m_r\"></td></tr><tr><td class=\"b_l\"></td><td class=\"b_c\"></td><td class=\"b_r\"></td></tr></table>';menuObj.innerHTML = s;if($('fwin_dialog_submit')) $('fwin_dialog_submit').onclick = function() {if(typeof func == 'function') func();else eval(func);hideMenu(menuid, 'dialog');};if($('fwin_dialog_cancel')) {$('fwin_dialog_cancel').onclick = function() {if(typeof funccancel == 'function') funccancel();else eval(funccancel);hideMenu(menuid, 'dialog');};$('fwin_dialog_close').onclick = $('fwin_dialog_cancel').onclick;}showMenu({'mtype':'dialog','menuid':menuid,'duration':3,'pos':'00','zindex':JSMENU['zIndex']['dialog'],'cache':0,'cover':cover});try {if($('fwin_dialog_submit')) $('fwin_dialog_submit').focus();} catch(e) {}}function showWindow(k, url, mode, cache, menuv) {mode = isUndefined(mode) ? 'get' : mode;cache = isUndefined(cache) ? 1 : cache;var menuid = 'fwin_' + k;var menuObj = $(menuid);var drag = null;var loadingst = null;var hidedom = '';if(disallowfloat && disallowfloat.indexOf(k) != -1) {if(BROWSER.ie) url += (url.indexOf('?') != -1 ?  '&' : '?') + 'referer=' + escape(location.href);location.href = url;doane();return;}var fetchContent = function() {if(mode == 'get') {menuObj.url = url;url += (url.search(/\\?/) > 0 ? '&' : '?') + 'infloat=yes&handlekey=' + k;url += cache == -1 ? '&t='+(+ new Date()) : '';if(BROWSER.ie &&  url.indexOf('referer=') < 0) {url = url + '&referer=' + encodeURIComponent(location);}ajaxget(url, 'fwin_content_' + k, null, '', '', function() {initMenu();show();});} else if(mode == 'post') {menuObj.act = $(url).action;ajaxpost(url, 'fwin_content_' + k, '', '', '', function() {initMenu();show();});}if(parseInt(BROWSER.ie) != 6) {loadingst = setTimeout(function() {showDialog('', 'info', '<img src=\"' + IMGDIR + '/loading.gif\"> Ժ...')}, 500);}};var initMenu = function() {clearTimeout(loadingst);var objs = menuObj.getElementsByTagName('*');var fctrlidinit = false;for(var i = 0; i < objs.length; i++) {if(objs[i].id) {objs[i].setAttribute('fwin', k);}if(objs[i].className == 'flb' && !fctrlidinit) {if(!objs[i].id) objs[i].id = 'fctrl_' + k;drag = objs[i].id;fctrlidinit = true;}}};var show = function() {hideMenu('fwin_dialog', 'dialog');v = {'mtype':'win','menuid':menuid,'duration':3,'pos':'00','zindex':JSMENU['zIndex']['win'],'drag':typeof drag == null ? '' : drag,'cache':cache};for(k in menuv) {v[k] = menuv[k];}showMenu(v);};if(!menuObj) {menuObj = document.createElement('div');menuObj.id = menuid;menuObj.className = 'fwinmask';menuObj.style.display = 'none';$('append_parent').appendChild(menuObj);evt = ' style=\"cursor:move\" onmousedown=\"dragMenu($(\\'' + menuid + '\\'), event, 1)\" ondblclick=\"hideWindow(\\'' + k + '\\')\"';if(!BROWSER.ie) {hidedom = '<style type=\"text/css\">object{visibility:hidden;}</style>';}menuObj.innerHTML = hidedom + '<table cellpadding=\"0\" cellspacing=\"0\" class=\"fwin\"><tr><td class=\"t_l\"></td><td class=\"t_c\"' + evt + '></td><td class=\"t_r\"></td></tr><tr><td class=\"m_l\"' + evt + ')\">&nbsp;&nbsp;</td><td class=\"m_c\" id=\"fwin_content_' + k + '\">'+ '</td><td class=\"m_r\"' + evt + '\"></td></tr><tr><td class=\"b_l\"></td><td class=\"b_c\"' + evt + '></td><td class=\"b_r\"></td></tr></table>';if(mode == 'html') {$('fwin_content_' + k).innerHTML = url;initMenu();show();} else {fetchContent();}} else if((mode == 'get' && (url != menuObj.url || cache != 1)) || (mode == 'post' && $(url).action != menuObj.act)) {fetchContent();} else {show();}doane();}function showError(msg) {var p = /<script[^\\>]*?>([^\\x00]*?)<\\/script>/ig;msg = msg.replace(p, '');if(msg !== '') {showDialog(msg, 'alert', 'Ϣ', null, true, null, '', '', '', 3);}}function hideWindow(k, all, clear) {all = isUndefined(all) ? 1 : all;clear = isUndefined(clear) ? 1 : clear;hideMenu('fwin_' + k, 'win');if(clear && $('fwin_' + k)) {$('append_parent').removeChild($('fwin_' + k));}if(all) {hideMenu();}}function AC_FL_RunContent() {var str = '';var ret = AC_GetArgs(arguments, \"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\", \"application/x-shockwave-flash\");if(BROWSER.ie && !BROWSER.opera) {str += '<object ';for (var i in ret.objAttrs) {str += i + '=\"' + ret.objAttrs[i] + '\" ';}str += '>';for (var i in ret.params) {str += '<param name=\"' + i + '\" value=\"' + ret.params[i] + '\" /> ';}str += '</object>';} else {str += '<embed ';for (var i in ret.embedAttrs) {str += i + '=\"' + ret.embedAttrs[i] + '\" ';}str += '></embed>';}return str;}function AC_GetArgs(args, classid, mimeType) {var ret = new Object();ret.embedAttrs = new Object();ret.params = new Object();ret.objAttrs = new Object();for (var i = 0; i < args.length; i = i + 2){var currArg = args[i].toLowerCase();switch (currArg){case \"classid\":break;case \"pluginspage\":ret.embedAttrs[args[i]] = 'http://www.macromedia.com/go/getflashplayer';break;case \"src\":ret.embedAttrs[args[i]] = args[i+1];ret.params[\"movie\"] = args[i+1];break;case \"codebase\":ret.objAttrs[args[i]] = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0';break;case \"onafterupdate\":case \"onbeforeupdate\":case \"onblur\":case \"oncellchange\":case \"onclick\":case \"ondblclick\":case \"ondrag\":case \"ondragend\":case \"ondragenter\":case \"ondragleave\":case \"ondragover\":case \"ondrop\":case \"onfinish\":case \"onfocus\":case \"onhelp\":case \"onmousedown\":case \"onmouseup\":case \"onmouseover\":case \"onmousemove\":case \"onmouseout\":case \"onkeypress\":case \"onkeydown\":case \"onkeyup\":case \"onload\":case \"onlosecapture\":case \"onpropertychange\":case \"onreadystatechange\":case \"onrowsdelete\":case \"onrowenter\":case \"onrowexit\":case \"onrowsinserted\":case \"onstart\":case \"onscroll\":case \"onbeforeeditfocus\":case \"onactivate\":case \"onbeforedeactivate\":case \"ondeactivate\":case \"type\":case \"id\":ret.objAttrs[args[i]] = args[i+1];break;case \"width\":case \"height\":case \"align\":case \"vspace\": case \"hspace\":case \"class\":case \"title\":case \"accesskey\":case \"name\":case \"tabindex\":ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];break;default:ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];}}ret.objAttrs[\"classid\"] = classid;if(mimeType) {ret.embedAttrs[\"type\"] = mimeType;}return ret;}function simulateSelect(selectId, widthvalue) {var selectObj = $(selectId);if(!selectObj) return;if(BROWSER.other) {if(selectObj.getAttribute('change')) {selectObj.onchange = function () {eval(selectObj.getAttribute('change'));}}return;}var widthvalue = widthvalue ? widthvalue : 70;var defaultopt = selectObj.options[0] ? selectObj.options[0].innerHTML : '';var defaultv = '';var menuObj = document.createElement('div');var ul = document.createElement('ul');var handleKeyDown = function(e) {e = BROWSER.ie ? event : e;if(e.keyCode == 40 || e.keyCode == 38) doane(e);};var selectwidth = (selectObj.getAttribute('width', i) ? selectObj.getAttribute('width', i) : widthvalue) + 'px';var tabindex = selectObj.getAttribute('tabindex', i) ? selectObj.getAttribute('tabindex', i) : 1;for(var i = 0; i < selectObj.options.length; i++) {var li = document.createElement('li');li.innerHTML = selectObj.options[i].innerHTML;li.k_id = i;li.k_value = selectObj.options[i].value;if(selectObj.options[i].selected) {defaultopt = selectObj.options[i].innerHTML;defaultv = selectObj.options[i].value;li.className = 'current';selectObj.setAttribute('selecti', i);}li.onclick = function() {if($(selectId + '_ctrl').innerHTML != this.innerHTML) {var lis = menuObj.getElementsByTagName('li');lis[$(selectId).getAttribute('selecti')].className = '';this.className = 'current';$(selectId + '_ctrl').innerHTML = this.innerHTML;$(selectId).setAttribute('selecti', this.k_id);$(selectId).options.length = 0;$(selectId).options[0] = new Option('', this.k_value);eval(selectObj.getAttribute('change'));}hideMenu(menuObj.id);return false;};ul.appendChild(li);}selectObj.options.length = 0;selectObj.options[0]= new Option('', defaultv);selectObj.style.display = 'none';selectObj.outerHTML += '<a href=\"javascript:;\" id=\"' + selectId + '_ctrl\" style=\"width:' + selectwidth + '\" tabindex=\"' + tabindex + '\">' + defaultopt + '</a>';menuObj.id = selectId + '_ctrl_menu';menuObj.className = 'sltm';menuObj.style.display = 'none';menuObj.style.width = selectwidth;menuObj.appendChild(ul);$('append_parent').appendChild(menuObj);$(selectId + '_ctrl').onclick = function(e) {$(selectId + '_ctrl_menu').style.width = selectwidth;showMenu({'ctrlid':(selectId == 'loginfield' ? 'account' : selectId + '_ctrl'),'menuid':selectId + '_ctrl_menu','evt':'click','pos':'43'});doane(e);};$(selectId + '_ctrl').onfocus = menuObj.onfocus = function() {_attachEvent(document.body, 'keydown', handleKeyDown);};$(selectId + '_ctrl').onblur = menuObj.onblur = function() {_detachEvent(document.body, 'keydown', handleKeyDown);};$(selectId + '_ctrl').onkeyup = function(e) {e = e ? e : window.event;value = e.keyCode;if(value == 40 || value == 38) {if(menuObj.style.display == 'none') {$(selectId + '_ctrl').onclick();} else {lis = menuObj.getElementsByTagName('li');selecti = selectObj.getAttribute('selecti');lis[selecti].className = '';if(value == 40) {selecti = parseInt(selecti) + 1;} else if(value == 38) {selecti = parseInt(selecti) - 1;}if(selecti < 0) {selecti = lis.length - 1} else if(selecti > lis.length - 1) {selecti = 0;}lis[selecti].className = 'current';selectObj.setAttribute('selecti', selecti);lis[selecti].parentNode.scrollTop = lis[selecti].offsetTop;}} else if(value == 13) {var lis = menuObj.getElementsByTagName('li');lis[selectObj.getAttribute('selecti')].onclick();} else if(value == 27) {hideMenu(menuObj.id);}};}function switchTab(prefix, current, total, activeclass) {$F('_switchTab', arguments);}function imageRotate(imgid, direct) {$F('_imageRotate', arguments);}function thumbImg(obj, method) {if(!obj) {return;}obj.onload = null;file = obj.src;zw = obj.offsetWidth;zh = obj.offsetHeight;if(zw < 2) {if(!obj.id) {obj.id = 'img_' + Math.random();}setTimeout(\"thumbImg($('\" + obj.id + \"'), \" + method + \")\", 100);return;}zr = zw / zh;method = !method ? 0 : 1;if(method) {fixw = obj.getAttribute('_width');fixh = obj.getAttribute('_height');if(zw > fixw) {zw = fixw;zh = zw / zr;}if(zh > fixh) {zh = fixh;zw = zh * zr;}} else {fixw = typeof imagemaxwidth == 'undefined' ? '600' : imagemaxwidth;if(zw > fixw) {zw = fixw;zh = zw / zr;obj.style.cursor = 'pointer';if(!obj.onclick) {obj.onclick = function() {zoom(obj, obj.src);};}}}obj.width = zw;obj.height = zh;}var zoomstatus = 1;function zoom(obj, zimg, nocover, pn, showexif) {$F('_zoom', arguments);}function showselect(obj, inpid, t, rettype) {$F('_showselect', arguments);}function showColorBox(ctrlid, layer, k, bgcolor) {$F('_showColorBox', arguments);}function ctrlEnter(event, btnId, onlyEnter) {if(isUndefined(onlyEnter)) onlyEnter = 0;if((event.ctrlKey || onlyEnter) && event.keyCode == 13) {$(btnId).click();return false;}return true;}function parseurl(str, mode, parsecode) {if(isUndefined(parsecode)) parsecode = true;if(parsecode) str= str.replace(/\\[code\\]([\\s\\S]+?)\\[\\/code\\]/ig, function($1, $2) {return codetag($2, -1);});str = str.replace(/([^>=\\]\"'\\/]|^)((((https?|ftp):\\/\\/)|www\\.)([\\w\\-]+\\.)*[\\w\\-\\u4e00-\\u9fa5]+\\.([\\.a-zA-Z0-9]+|\\u4E2D\\u56FD|\\u7F51\\u7EDC|\\u516C\\u53F8)((\\?|\\/|:)+[\\w\\.\\/=\\?%\\-&~`@':+!]*)+\\.(swf|flv))/ig, '$1[flash]$2[/flash]');str = str.replace(/([^>=\\]\"'\\/]|^)((((https?|ftp):\\/\\/)|www\\.)([\\w\\-]+\\.)*[\\w\\-\\u4e00-\\u9fa5]+\\.([\\.a-zA-Z0-9]+|\\u4E2D\\u56FD|\\u7F51\\u7EDC|\\u516C\\u53F8)((\\?|\\/|:)+[\\w\\.\\/=\\?%\\-&~`@':+!]*)+\\.(mp3|wma))/ig, '$1[audio]$2[/audio]');str = str.replace(/([^>=\\]\"'\\/@]|^)((((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|ed2k|thunder|qqdl|synacast):\\/\\/))([\\w\\-]+\\.)*[:\\.@\\-\\w\\u4e00-\\u9fa5]+\\.([\\.a-zA-Z0-9]+|\\u4E2D\\u56FD|\\u7F51\\u7EDC|\\u516C\\u53F8)((\\?|\\/|:)+[\\w\\.\\/=\\?%\\-&;~`@':+!#]*)*)/ig, mode == 'html' ? '$1<a href=\"$2\" target=\"_blank\">$2</a>' : '$1[url]$2[/url]');str = str.replace(/([^\\w>=\\]\"'\\/@]|^)((www\\.)([\\w\\-]+\\.)*[:\\.@\\-\\w\\u4e00-\\u9fa5]+\\.([\\.a-zA-Z0-9]+|\\u4E2D\\u56FD|\\u7F51\\u7EDC|\\u516C\\u53F8)((\\?|\\/|:)+[\\w\\.\\/=\\?%\\-&;~`@':+!#]*)*)/ig, mode == 'html' ? '$1<a href=\"$2\" target=\"_blank\">$2</a>' : '$1[url]$2[/url]');str = str.replace(/([^\\w->=\\]:\"'\\.\\/]|^)(([\\-\\.\\w]+@[\\.\\-\\w]+(\\.\\w+)+))/ig, mode == 'html' ? '$1<a href=\"mailto:$2\">$2</a>' : '$1[email]$2[/email]');if(parsecode) {for(var i = 0; i <= DISCUZCODE['num']; i++) {str = str.replace(\"[\\tDISCUZ_CODE_\" + i + \"\\t]\", DISCUZCODE['html'][i]);}}return str;}function codetag(text, br) {var br = !br ? 1 : br;DISCUZCODE['num']++;if(br > 0 && typeof wysiwyg != 'undefined' && wysiwyg) text = text.replace(/<br[^\\>]*>/ig, '\\n');text = text.replace(/\\$/ig, '$$');DISCUZCODE['html'][DISCUZCODE['num']] = '[code]' + text + '[/code]';return '[\\tDISCUZ_CODE_' + DISCUZCODE['num'] + '\\t]';}function saveUserdata(name, data) {try {if(window.localStorage){localStorage.setItem('Discuz_' + name, data);} else if(window.sessionStorage){sessionStorage.setItem('Discuz_' + name, data);}} catch(e) {if(BROWSER.ie){if(data.length < 54889) {with(document.documentElement) {setAttribute(\"value\", data);save('Discuz_' + name);}}}}setcookie('clearUserdata', '', -1);}function loadUserdata(name) {if(window.localStorage){return localStorage.getItem('Discuz_' + name);} else if(window.sessionStorage){return sessionStorage.getItem('Discuz_' + name);} else if(BROWSER.ie){with(document.documentElement) {load('Discuz_' + name);return getAttribute(\"value\");}}}function initTab(frameId, type) {$F('_initTab', arguments);}function openDiy(){if(DYNAMICURL) {window.location.href = SITEURL+DYNAMICURL + (DYNAMICURL.indexOf('?') < 0 ? '?' : '&') + ('diy=yes');} else {window.location.href = ((window.location.href + '').replace(/[\\?\\&]diy=yes/g, '').split('#')[0] + ( window.location.search && window.location.search.indexOf('?diy=yes') < 0 ? '&diy=yes' : '?diy=yes'));}}function hasClass(elem, className) {return elem.className && (\" \" + elem.className + \" \").indexOf(\" \" + className + \" \") != -1;}function runslideshow() {$F('_runslideshow', []);}function toggle_collapse(objname, noimg, complex, lang) {$F('_toggle_collapse', arguments);}function updatestring(str1, str2, clear) {str2 = '_' + str2 + '_';return clear ? str1.replace(str2, '') : (str1.indexOf(str2) == -1 ? str1 + str2 : str1);}function getClipboardData() {window.document.clipboardswf.SetVariable('str', CLIPBOARDSWFDATA);}function setCopy(text, msg) {$F('_setCopy', arguments);}function copycode(obj) {$F('_copycode', arguments);}function showdistrict(container, elems, totallevel, changelevel, containertype) {$F('_showdistrict', arguments);}function setDoodle(fid, oid, url, tid, from) {$F('_setDoodle', arguments);}function initSearchmenu(searchform, cloudSearchUrl) {var defaultUrl = 'search.php?searchsubmit=yes';if(typeof cloudSearchUrl == \"undefined\" || cloudSearchUrl == null || cloudSearchUrl == '') {cloudSearchUrl = defaultUrl;}var searchtxt = $(searchform + '_txt');if(!searchtxt) {searchtxt = $(searchform);}var tclass = searchtxt.className;searchtxt.className = tclass + ' xg1';if (!!(\"placeholder\" in document.createElement(\"input\"))) {if(searchtxt.value == '') {searchtxt.value = '';}searchtxt.placeholder = '';} else {searchtxt.onfocus = function () {if(searchtxt.value == '') {searchtxt.value = '';searchtxt.className = tclass;}};searchtxt.onblur = function () {if(searchtxt.value == '' ) {searchtxt.value = '';searchtxt.className = tclass + ' xg1';}};}if(!$(searchform + '_type_menu')) return false;var o = $(searchform + '_type');var a = $(searchform + '_type_menu').getElementsByTagName('a');var formobj = searchtxt.form;for(var i=0; i<a.length; i++){if(a[i].className == 'curtype'){o.innerHTML = a[i].innerHTML;$(searchform + '_mod').value = a[i].rel;formobj.method = 'post';if((a[i].rel == 'forum' || a[i].rel == 'curforum') && defaultUrl != cloudSearchUrl) {formobj.action = cloudSearchUrl;formobj.method = 'get';if($('srchFId')) {$('srchFId').value = a[i].rel == 'forum' ? 0 : a[i].getAttribute('fid');}} else {formobj.action = defaultUrl;}}a[i].onclick = function(){o.innerHTML = this.innerHTML;$(searchform + '_mod').value = this.rel;formobj.method = 'post';if((this.rel == 'forum' || this.rel == 'curforum') && defaultUrl != cloudSearchUrl) {formobj.action = cloudSearchUrl;formobj.method = 'get';if($('srchFId')) {$('srchFId').value = this.rel == 'forum' ? 0 : this.getAttribute('fid');}} else {formobj.action = defaultUrl;}};}}function searchFocus(obj) {if(obj.value == '') {obj.value = '';}if($('cloudsearchquery') != null) {$('cloudsearchquery').value = obj.value;}}function extstyle(css) {$F('_extstyle', arguments);}function widthauto(obj) {$F('_widthauto', arguments);}var secST = new Array();function updatesecqaa(idhash) {$F('_updatesecqaa', arguments);}function updateseccode(idhash) {$F('_updateseccode', arguments);}function checksec(type, idhash, showmsg, recall) {$F('_checksec', arguments);}function createPalette(colorid, id, func) {$F('_createPalette', arguments);}function showForummenu(fid) {$F('_showForummenu', arguments);}function showUserApp() {$F('_showUserApp', arguments);}function cardInit() {var cardShow = function (obj) {if(BROWSER.ie && BROWSER.ie < 7 && obj.href.indexOf('username') != -1) {return;}pos = obj.getAttribute('c') == '1' ? '43' : obj.getAttribute('c');USERCARDST = setTimeout(function() {ajaxmenu(obj, 500, 1, 2, pos, null, 'p_pop card');}, 250);};var cardids = {};var a = document.body.getElementsByTagName('a');for(var i = 0;i < a.length;i++){if(a[i].getAttribute('c')) {var href = a[i].getAttribute('href', 1);if(typeof cardids[href] == 'undefined') {cardids[href] = Math.round(Math.random()*10000);}a[i].setAttribute('mid', 'card_' + cardids[href]);a[i].onmouseover = function() {cardShow(this)};a[i].onmouseout = function() {clearTimeout(USERCARDST);};}}}function navShow(id) {var mnobj = $('snav_mn_' + id);if(!mnobj) {return;}var uls = $('mu').getElementsByTagName('ul');for(i = 0;i < uls.length;i++) {if(uls[i].className != 'cl current') {uls[i].style.display = 'none';}}if(mnobj.className != 'cl current') {showMenu({'ctrlid':'mn_' + id,'menuid':'snav_mn_' + id,'pos':'*'});mnobj.className = 'cl floatmu';mnobj.style.width = ($('nv').clientWidth) + 'px';mnobj.style.display = '';}}function strLenCalc(obj, checklen, maxlen) {var v = obj.value, charlen = 0, maxlen = !maxlen ? 200 : maxlen, curlen = maxlen, len = strlen(v);for(var i = 0; i < v.length; i++) {if(v.charCodeAt(i) < 0 || v.charCodeAt(i) > 255) {curlen -= charset == 'utf-8' ? 2 : 1;}}if(curlen >= len) {$(checklen).innerHTML = curlen - len;} else {obj.value = mb_cutstr(v, maxlen, 0);}}function patchNotice() {if($('patch_notice')) {ajaxget('misc.php?mod=patch&action=patchnotice', 'patch_notice', '');}}function pluginNotice() {if($('plugin_notice')) {ajaxget('misc.php?mod=patch&action=pluginnotice', 'plugin_notice', '');}}function ipNotice() {if($('ip_notice')) {ajaxget('misc.php?mod=patch&action=ipnotice&_r='+Math.random(), 'ip_notice', '');}}function noticeTitle() {NOTICETITLE = {'State':0, 'oldTitle':NOTICECURTITLE, flashNumber:0, sleep:15};if(!getcookie('noticeTitle')) {window.setInterval('noticeTitleFlash();', 500);} else {window.setTimeout('noticeTitleFlash();', 500);}setcookie('noticeTitle', 1, 600);}function noticeTitleFlash() {if(NOTICETITLE.flashNumber < 5 || NOTICETITLE.flashNumber > 4 && !NOTICETITLE['State']) {document.title = (NOTICETITLE['State'] ? '' : 'ѡ') + NOTICETITLE['oldTitle'];NOTICETITLE['State'] = !NOTICETITLE['State'];}NOTICETITLE.flashNumber = NOTICETITLE.flashNumber < NOTICETITLE.sleep ? ++NOTICETITLE.flashNumber : 0;}function relatedlinks(rlinkmsgid) {$F('_relatedlinks', arguments);}function con_handle_response(response) {return response;}function showTopLink() {var ft = $('ft');if(ft){var scrolltop = $('scrolltop');var viewPortHeight = parseInt(document.documentElement.clientHeight);var scrollHeight = parseInt(document.body.getBoundingClientRect().top);var basew = parseInt(ft.clientWidth);var sw = scrolltop.clientWidth;if (basew < 1000) {var left = parseInt(fetchOffset(ft)['left']);left = left < sw ? left * 2 - sw : left;scrolltop.style.left = ( basew + left ) + 'px';} else {scrolltop.style.left = 'auto';scrolltop.style.right = 0;}if (BROWSER.ie && BROWSER.ie < 7) {scrolltop.style.top = viewPortHeight - scrollHeight - 150 + 'px';}if (scrollHeight < -100) {scrolltop.style.visibility = 'visible';} else {scrolltop.style.visibility = 'hidden';}}}function showCreditmenu() {$F('_showCreditmenu', []);}function showUpgradeinfo() {$F('_showUpgradeinfo', []);}function addFavorite(url, title) {try {window.external.addFavorite(url, title);} catch (e){try {window.sidebar.addPanel(title, url, '');} catch (e) {showDialog(\"밴 Ctrl+D ӵղؼ\", 'notice');}}}function setHomepage(sURL) {if(BROWSER.ie){document.body.style.behavior = 'url(#default#homepage)';document.body.setHomePage(sURL);} else {showDialog(\" IE ֶվΪҳ\", 'notice');doane();}}function setShortcut() {var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);if(!loadUserdata('setshortcut') && !scrollTop) {$F('_setShortcut', []);}}function smilies_show(id, smcols, seditorkey) {$F('_smilies_show', arguments, 'smilies');}function showfocus(ftype, autoshow) {var id = parseInt($('focuscur').innerHTML);if(ftype == 'prev') {id = (id-1) < 1 ? focusnum : (id-1);if(!autoshow) {window.clearInterval(focusautoshow);}} else if(ftype == 'next') {id = (id+1) > focusnum ? 1 : (id+1);if(!autoshow) {window.clearInterval(focusautoshow);}}$('focuscur').innerHTML = id;$('focus_con').innerHTML = $('focus_'+(id-1)).innerHTML;}function rateStarHover(target,level) {if(level ==  0) {$(target).style.width = '';} else {$(target).style.width = level * 16 + 'px';}}function rateStarSet(target,level,input) {$(input).value = level;$(target).className = 'star star' + level;}function img_onmouseoverfunc(obj) {if(typeof showsetcover == 'function') {showsetcover(obj);}return;}function toggleBlind(dom) {if(dom) {if(loadUserdata('is_blindman')) {saveUserdata('is_blindman', '');dom.title = '';} else {saveUserdata('is_blindman', '1');dom.title = 'رո';}}}function checkBlind() {var dom = $('switchblind');if(dom) {if(loadUserdata('is_blindman')) {dom.title = 'رո';} else {dom.title = '';}}}function getElementOffset(element) {var left = element.offsetLeft, top = element.offsetTop;while(element = element.offsetParent) {left += element.offsetLeft;top += element.offsetTop;}if($('nv').style.position == 'fixed') {top -= parseInt($('nv').style.height);}return {'left' : left, 'top' : top};}function mobileplayer() {var platform = navigator.platform;var ua = navigator.userAgent;var ios = /iPhone|iPad|iPod/.test(platform) && ua.indexOf( \"AppleWebKit\" ) > -1;var andriod = ua.indexOf( \"Android\" ) > -1;if(ios || andriod) {return true;} else {return false;}}var BROWSER = {};var USERAGENT = navigator.userAgent.toLowerCase();browserVersion({'ie':'msie','firefox':'','chrome':'','opera':'','safari':'','mozilla':'','webkit':'','maxthon':'','qq':'qqbrowser','rv':'rv'});if(BROWSER.safari || BROWSER.rv) {BROWSER.firefox = true;}BROWSER.opera = BROWSER.opera ? opera.version() : 0;HTMLNODE = document.getElementsByTagName('head')[0].parentNode;if(BROWSER.ie) {BROWSER.iemode = parseInt(typeof document.documentMode != 'undefined' ? document.documentMode : BROWSER.ie);HTMLNODE.className = 'ie_all ie' + BROWSER.iemode;}var CSSLOADED = [];var JSLOADED = [];var JSMENU = [];JSMENU['active'] = [];JSMENU['timer'] = [];JSMENU['drag'] = [];JSMENU['layer'] = 0;JSMENU['zIndex'] = {'win':200,'menu':300,'dialog':400,'prompt':500};JSMENU['float'] = '';var CURRENTSTYPE = null;var discuz_uid = isUndefined(discuz_uid) ? 0 : discuz_uid;var creditnotice = isUndefined(creditnotice) ? '' : creditnotice;var cookiedomain = isUndefined(cookiedomain) ? '' : cookiedomain;var cookiepath = isUndefined(cookiepath) ? '' : cookiepath;var EXTRAFUNC = [], EXTRASTR = '';EXTRAFUNC['showmenu'] = [];var DISCUZCODE = [];DISCUZCODE['num'] = '-1';DISCUZCODE['html'] = [];var USERABOUT_BOX = true;var USERCARDST = null;var CLIPBOARDSWFDATA = '';var NOTICETITLE = [];var NOTICECURTITLE = document.title;var safescripts = {}, evalscripts = [];if(BROWSER.firefox && window.HTMLElement) {HTMLElement.prototype.__defineGetter__( \"innerText\", function(){var anyString = \"\";var childS = this.childNodes;for(var i=0; i <childS.length; i++) {if(childS[i].nodeType==1) {anyString += childS[i].tagName==\"BR\" ? '\\n' : childS[i].innerText;} else if(childS[i].nodeType==3) {anyString += childS[i].nodeValue;}}return anyString;});HTMLElement.prototype.__defineSetter__( \"innerText\", function(sText){this.textContent=sText;});HTMLElement.prototype.__defineSetter__('outerHTML', function(sHTML) {var r = this.ownerDocument.createRange();r.setStartBefore(this);var df = r.createContextualFragment(sHTML);this.parentNode.replaceChild(df,this);return sHTML;});HTMLElement.prototype.__defineGetter__('outerHTML', function() {var attr;var attrs = this.attributes;var str = '<' + this.tagName.toLowerCase();for(var i = 0;i < attrs.length;i++){attr = attrs[i];if(attr.specified)str += ' ' + attr.name + '=\"' + attr.value + '\"';}if(!this.canHaveChildren) {return str + '>';}return str + '>' + this.innerHTML + '</' + this.tagName.toLowerCase() + '>';});HTMLElement.prototype.__defineGetter__('canHaveChildren', function() {switch(this.tagName.toLowerCase()) {case 'area':case 'base':case 'basefont':case 'col':case 'frame':case 'hr':case 'img':case 'br':case 'input':case 'isindex':case 'link':case 'meta':case 'param':return false;}return true;});}if(typeof IN_ADMINCP == 'undefined') {if(creditnotice != '' && getcookie('creditnotice')) {_attachEvent(window, 'load', showCreditPrompt, document);}if(typeof showusercard != 'undefined' && showusercard == 1) {_attachEvent(window, 'load', cardInit, document);}}if(BROWSER.ie) {document.documentElement.addBehavior(\"#default#userdata\");}"
  },
  {
    "path": "bin/htmlexample/src/js/fancybox/jquery.easing-1.3.pack.js",
    "content": "/*\n * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/\n *\n * Uses the built in easing capabilities added In jQuery 1.1\n * to offer multiple easing options\n *\n * TERMS OF USE - jQuery Easing\n * \n * Open source under the BSD License. \n * \n * Copyright © 2008 George McGinley Smith\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n * Redistributions of source code must retain the above copyright notice, this list of \n * conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice, this list \n * of conditions and the following disclaimer in the documentation and/or other materials \n * provided with the distribution.\n * \n * Neither the name of the author nor the names of contributors may be used to endorse \n * or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY \n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED \n * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED \n * OF THE POSSIBILITY OF SUCH DAMAGE. \n *\n*/\n\n// t: current time, b: begInnIng value, c: change In value, d: duration\neval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('h.i[\\'1a\\']=h.i[\\'z\\'];h.O(h.i,{y:\\'D\\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))\n\n/*\n *\n * TERMS OF USE - EASING EQUATIONS\n * \n * Open source under the BSD License. \n * \n * Copyright © 2001 Robert Penner\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n * Redistributions of source code must retain the above copyright notice, this list of \n * conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice, this list \n * of conditions and the following disclaimer in the documentation and/or other materials \n * provided with the distribution.\n * \n * Neither the name of the author nor the names of contributors may be used to endorse \n * or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY \n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED \n * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED \n * OF THE POSSIBILITY OF SUCH DAMAGE. \n *\n */\n"
  },
  {
    "path": "bin/htmlexample/src/js/fancybox/jquery.fancybox-1.3.4.css",
    "content": "/*\n * FancyBox - jQuery Plugin\n * Simple and fancy lightbox alternative\n *\n * Examples and documentation at: http://fancybox.net\n * \n * Copyright (c) 2008 - 2010 Janis Skarnelis\n * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.\n * \n * Version: 1.3.4 (11/11/2010)\n * Requires: jQuery v1.3+\n *\n * Dual licensed under the MIT and GPL licenses:\n *   http://www.opensource.org/licenses/mit-license.php\n *   http://www.gnu.org/licenses/gpl.html\n */\n\n#fancybox-loading {\n\tposition: fixed;\n\ttop: 50%;\n\tleft: 50%;\n\twidth: 40px;\n\theight: 40px;\n\tmargin-top: -20px;\n\tmargin-left: -20px;\n\tcursor: pointer;\n\toverflow: hidden;\n\tz-index: 1104;\n\tdisplay: none;\n}\n\n#fancybox-loading div {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 40px;\n\theight: 480px;\n\tbackground-image: url('fancybox.png');\n}\n\n#fancybox-overlay {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\tz-index: 1100;\n\tdisplay: none;\n}\n\n#fancybox-tmp {\n\tpadding: 0;\n\tmargin: 0;\n\tborder: 0;\n\toverflow: auto;\n\tdisplay: none;\n}\n\n#fancybox-wrap {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 20px;\n\tz-index: 1101;\n\toutline: none;\n\tdisplay: none;\n}\n\n#fancybox-outer {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\tbackground: #fff;\n}\n\n#fancybox-content {\n\twidth: 0;\n\theight: 0;\n\tpadding: 0;\n\toutline: none;\n\tposition: relative;\n\toverflow: hidden;\n\tz-index: 1102;\n\tborder: 0px solid #fff;\n}\n\n#fancybox-hide-sel-frame {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbackground: transparent;\n\tz-index: 1101;\n}\n\n#fancybox-close {\n\tposition: absolute;\n\ttop: -15px;\n\tright: -15px;\n\twidth: 30px;\n\theight: 30px;\n\tbackground: transparent url('fancybox.png') -40px 0px;\n\tcursor: pointer;\n\tz-index: 1103;\n\tdisplay: none;\n}\n\n#fancybox-error {\n\tcolor: #444;\n\tfont: normal 12px/20px Arial;\n\tpadding: 14px;\n\tmargin: 0;\n}\n\n#fancybox-img {\n\twidth: 100%;\n\theight: 100%;\n\tpadding: 0;\n\tmargin: 0;\n\tborder: none;\n\toutline: none;\n\tline-height: 0;\n\tvertical-align: top;\n}\n\n#fancybox-frame {\n\twidth: 100%;\n\theight: 100%;\n\tborder: none;\n\tdisplay: block;\n}\n\n#fancybox-left, #fancybox-right {\n\tposition: absolute;\n\tbottom: 0px;\n\theight: 100%;\n\twidth: 35%;\n\tcursor: pointer;\n\toutline: none;\n\tbackground: transparent url('blank.gif');\n\tz-index: 1102;\n\tdisplay: none;\n}\n\n#fancybox-left {\n\tleft: 0px;\n}\n\n#fancybox-right {\n\tright: 0px;\n}\n\n#fancybox-left-ico, #fancybox-right-ico {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: -9999px;\n\twidth: 30px;\n\theight: 30px;\n\tmargin-top: -15px;\n\tcursor: pointer;\n\tz-index: 1102;\n\tdisplay: block;\n}\n\n#fancybox-left-ico {\n\tbackground-image: url('fancybox.png');\n\tbackground-position: -40px -30px;\n}\n\n#fancybox-right-ico {\n\tbackground-image: url('fancybox.png');\n\tbackground-position: -40px -60px;\n}\n\n#fancybox-left:hover, #fancybox-right:hover {\n\tvisibility: visible; /* IE6 */\n}\n\n#fancybox-left:hover span {\n\tleft: 20px;\n}\n\n#fancybox-right:hover span {\n\tleft: auto;\n\tright: 20px;\n}\n\n.fancybox-bg {\n\tposition: absolute;\n\tpadding: 0;\n\tmargin: 0;\n\tborder: 0;\n\twidth: 20px;\n\theight: 20px;\n\tz-index: 1001;\n}\n\n#fancybox-bg-n {\n\ttop: -20px;\n\tleft: 0;\n\twidth: 100%;\n\tbackground-image: url('fancybox-x.png');\n}\n\n#fancybox-bg-ne {\n\ttop: -20px;\n\tright: -20px;\n\tbackground-image: url('fancybox.png');\n\tbackground-position: -40px -162px;\n}\n\n#fancybox-bg-e {\n\ttop: 0;\n\tright: -20px;\n\theight: 100%;\n\tbackground-image: url('fancybox-y.png');\n\tbackground-position: -20px 0px;\n}\n\n#fancybox-bg-se {\n\tbottom: -20px;\n\tright: -20px;\n\tbackground-image: url('fancybox.png');\n\tbackground-position: -40px -182px; \n}\n\n#fancybox-bg-s {\n\tbottom: -20px;\n\tleft: 0;\n\twidth: 100%;\n\tbackground-image: url('fancybox-x.png');\n\tbackground-position: 0px -20px;\n}\n\n#fancybox-bg-sw {\n\tbottom: -20px;\n\tleft: -20px;\n\tbackground-image: url('fancybox.png');\n\tbackground-position: -40px -142px;\n}\n\n#fancybox-bg-w {\n\ttop: 0;\n\tleft: -20px;\n\theight: 100%;\n\tbackground-image: url('fancybox-y.png');\n}\n\n#fancybox-bg-nw {\n\ttop: -20px;\n\tleft: -20px;\n\tbackground-image: url('fancybox.png');\n\tbackground-position: -40px -122px;\n}\n\n#fancybox-title {\n\tfont-family: Helvetica;\n\tfont-size: 12px;\n\tz-index: 1102;\n}\n\n.fancybox-title-inside {\n\tpadding-bottom: 10px;\n\ttext-align: center;\n\tcolor: #333;\n\tbackground: #fff;\n\tposition: relative;\n}\n\n.fancybox-title-outside {\n\tpadding-top: 10px;\n\tcolor: #fff;\n}\n\n.fancybox-title-over {\n\tposition: absolute;\n\tbottom: 0;\n\tleft: 0;\n\tcolor: #FFF;\n\ttext-align: left;\n}\n\n#fancybox-title-over {\n\tpadding: 10px;\n\tbackground-image: url('fancy_title_over.png');\n\tdisplay: block;\n}\n\n.fancybox-title-float {\n\tposition: absolute;\n\tleft: 0;\n\tbottom: -20px;\n\theight: 32px;\n}\n\n#fancybox-title-float-wrap {\n\tborder: none;\n\tborder-collapse: collapse;\n\twidth: auto;\n}\n\n#fancybox-title-float-wrap td {\n\tborder: none;\n\twhite-space: nowrap;\n}\n\n#fancybox-title-float-left {\n\tpadding: 0 0 0 15px;\n\tbackground: url('fancybox.png') -40px -90px no-repeat;\n}\n\n#fancybox-title-float-main {\n\tcolor: #FFF;\n\tline-height: 29px;\n\tfont-weight: bold;\n\tpadding: 0 0 3px 0;\n\tbackground: url('fancybox-x.png') 0px -40px;\n}\n\n#fancybox-title-float-right {\n\tpadding: 0 0 0 15px;\n\tbackground: url('fancybox.png') -55px -90px no-repeat;\n}\n\n/* IE6 */\n\n.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }\n\n.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }\n.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }\n\n.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }\n.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }\n.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }\n.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }\n\n.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {\n\theight: expression(this.parentNode.clientHeight + \"px\");\n}\n\n#fancybox-loading.fancybox-ie6 {\n\tposition: absolute; margin-top: 0;\n\ttop: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');\n}\n\n#fancybox-loading.fancybox-ie6 div\t{ background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }\n\n/* IE6, IE7, IE8 */\n\n.fancybox-ie .fancybox-bg { background: transparent !important; }\n\n.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }\n.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }\n.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }\n.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }\n.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }\n.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }\n.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }\n.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }"
  },
  {
    "path": "bin/htmlexample/src/js/fancybox/jquery.fancybox-1.3.4.js",
    "content": "/*\n * FancyBox - jQuery Plugin\n * Simple and fancy lightbox alternative\n *\n * Examples and documentation at: http://fancybox.net\n *\n * Copyright (c) 2008 - 2010 Janis Skarnelis\n * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.\n *\n * Version: 1.3.4 (11/11/2010)\n * Requires: jQuery v1.3+\n *\n * Dual licensed under the MIT and GPL licenses:\n *   http://www.opensource.org/licenses/mit-license.php\n *   http://www.gnu.org/licenses/gpl.html\n */\n\n;(function($) {\n\tvar tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,\n\n\t\tselectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],\n\n\t\tajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\\.]\\.(swf)\\s*$/i,\n\n\t\tloadingTimer, loadingFrame = 1,\n\n\t\ttitleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),\n\n\t\tisIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,\n\n\t\t/*\n\t\t * Private methods \n\t\t */\n\n\t\t_abort = function() {\n\t\t\tloading.hide();\n\n\t\t\timgPreloader.onerror = imgPreloader.onload = null;\n\n\t\t\tif (ajaxLoader) {\n\t\t\t\tajaxLoader.abort();\n\t\t\t}\n\n\t\t\ttmp.empty();\n\t\t},\n\n\t\t_error = function() {\n\t\t\tif (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {\n\t\t\t\tloading.hide();\n\t\t\t\tbusy = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tselectedOpts.titleShow = false;\n\n\t\t\tselectedOpts.width = 'auto';\n\t\t\tselectedOpts.height = 'auto';\n\n\t\t\ttmp.html( '<p id=\"fancybox-error\">The requested content cannot be loaded.<br />Please try again later.</p>' );\n\n\t\t\t_process_inline();\n\t\t},\n\n\t\t_start = function() {\n\t\t\tvar obj = selectedArray[ selectedIndex ],\n\t\t\t\thref, \n\t\t\t\ttype, \n\t\t\t\ttitle,\n\t\t\t\tstr,\n\t\t\t\temb,\n\t\t\t\tret;\n\n\t\t\t_abort();\n\n\t\t\tselectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));\n\n\t\t\tret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);\n\n\t\t\tif (ret === false) {\n\t\t\t\tbusy = false;\n\t\t\t\treturn;\n\t\t\t} else if (typeof ret == 'object') {\n\t\t\t\tselectedOpts = $.extend(selectedOpts, ret);\n\t\t\t}\n\n\t\t\ttitle = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';\n\n\t\t\tif (obj.nodeName && !selectedOpts.orig) {\n\t\t\t\tselectedOpts.orig = $(obj).children(\"img:first\").length ? $(obj).children(\"img:first\") : $(obj);\n\t\t\t}\n\n\t\t\tif (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {\n\t\t\t\ttitle = selectedOpts.orig.attr('alt');\n\t\t\t}\n\n\t\t\thref = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;\n\n\t\t\tif ((/^(?:javascript)/i).test(href) || href == '#') {\n\t\t\t\thref = null;\n\t\t\t}\n\n\t\t\tif (selectedOpts.type) {\n\t\t\t\ttype = selectedOpts.type;\n\n\t\t\t\tif (!href) {\n\t\t\t\t\thref = selectedOpts.content;\n\t\t\t\t}\n\n\t\t\t} else if (selectedOpts.content) {\n\t\t\t\ttype = 'html';\n\n\t\t\t} else if (href) {\n\t\t\t\tif (href.match(imgRegExp)) {\n\t\t\t\t\ttype = 'image';\n\n\t\t\t\t} else if (href.match(swfRegExp)) {\n\t\t\t\t\ttype = 'swf';\n\n\t\t\t\t} else if ($(obj).hasClass(\"iframe\")) {\n\t\t\t\t\ttype = 'iframe';\n\n\t\t\t\t} else if (href.indexOf(\"#\") === 0) {\n\t\t\t\t\ttype = 'inline';\n\n\t\t\t\t} else {\n\t\t\t\t\ttype = 'ajax';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!type) {\n\t\t\t\t_error();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (type == 'inline') {\n\t\t\t\tobj\t= href.substr(href.indexOf(\"#\"));\n\t\t\t\ttype = $(obj).length > 0 ? 'inline' : 'ajax';\n\t\t\t}\n\n\t\t\tselectedOpts.type = type;\n\t\t\tselectedOpts.href = href;\n\t\t\tselectedOpts.title = title;\n\n\t\t\tif (selectedOpts.autoDimensions) {\n\t\t\t\tif (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {\n\t\t\t\t\tselectedOpts.width = 'auto';\n\t\t\t\t\tselectedOpts.height = 'auto';\n\t\t\t\t} else {\n\t\t\t\t\tselectedOpts.autoDimensions = false;\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (selectedOpts.modal) {\n\t\t\t\tselectedOpts.overlayShow = true;\n\t\t\t\tselectedOpts.hideOnOverlayClick = false;\n\t\t\t\tselectedOpts.hideOnContentClick = false;\n\t\t\t\tselectedOpts.enableEscapeButton = false;\n\t\t\t\tselectedOpts.showCloseButton = false;\n\t\t\t}\n\n\t\t\tselectedOpts.padding = parseInt(selectedOpts.padding, 10);\n\t\t\tselectedOpts.margin = parseInt(selectedOpts.margin, 10);\n\n\t\t\ttmp.css('padding', (selectedOpts.padding + selectedOpts.margin));\n\n\t\t\t$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {\n\t\t\t\t$(this).replaceWith(content.children());\t\t\t\t\n\t\t\t});\n\n\t\t\tswitch (type) {\n\t\t\t\tcase 'html' :\n\t\t\t\t\ttmp.html( selectedOpts.content );\n\t\t\t\t\t_process_inline();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'inline' :\n\t\t\t\t\tif ( $(obj).parent().is('#fancybox-content') === true) {\n\t\t\t\t\t\tbusy = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t$('<div class=\"fancybox-inline-tmp\" />')\n\t\t\t\t\t\t.hide()\n\t\t\t\t\t\t.insertBefore( $(obj) )\n\t\t\t\t\t\t.bind('fancybox-cleanup', function() {\n\t\t\t\t\t\t\t$(this).replaceWith(content.children());\n\t\t\t\t\t\t}).bind('fancybox-cancel', function() {\n\t\t\t\t\t\t\t$(this).replaceWith(tmp.children());\n\t\t\t\t\t\t});\n\n\t\t\t\t\t$(obj).appendTo(tmp);\n\n\t\t\t\t\t_process_inline();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'image':\n\t\t\t\t\tbusy = false;\n\n\t\t\t\t\t$.fancybox.showActivity();\n\n\t\t\t\t\timgPreloader = new Image();\n\n\t\t\t\t\timgPreloader.onerror = function() {\n\t\t\t\t\t\t_error();\n\t\t\t\t\t};\n\n\t\t\t\t\timgPreloader.onload = function() {\n\t\t\t\t\t\tbusy = true;\n\n\t\t\t\t\t\timgPreloader.onerror = imgPreloader.onload = null;\n\n\t\t\t\t\t\t_process_image();\n\t\t\t\t\t};\n\n\t\t\t\t\timgPreloader.src = href;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'swf':\n\t\t\t\t\tselectedOpts.scrolling = 'no';\n\n\t\t\t\t\tstr = '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"' + selectedOpts.width + '\" height=\"' + selectedOpts.height + '\"><param name=\"movie\" value=\"' + href + '\"></param>';\n\t\t\t\t\temb = '';\n\n\t\t\t\t\t$.each(selectedOpts.swf, function(name, val) {\n\t\t\t\t\t\tstr += '<param name=\"' + name + '\" value=\"' + val + '\"></param>';\n\t\t\t\t\t\temb += ' ' + name + '=\"' + val + '\"';\n\t\t\t\t\t});\n\n\t\t\t\t\tstr += '<embed src=\"' + href + '\" type=\"application/x-shockwave-flash\" width=\"' + selectedOpts.width + '\" height=\"' + selectedOpts.height + '\"' + emb + '></embed></object>';\n\n\t\t\t\t\ttmp.html(str);\n\n\t\t\t\t\t_process_inline();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'ajax':\n\t\t\t\t\tbusy = false;\n\n\t\t\t\t\t$.fancybox.showActivity();\n\n\t\t\t\t\tselectedOpts.ajax.win = selectedOpts.ajax.success;\n\n\t\t\t\t\tajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {\n\t\t\t\t\t\turl\t: href,\n\t\t\t\t\t\tdata : selectedOpts.ajax.data || {},\n\t\t\t\t\t\terror : function(XMLHttpRequest, textStatus, errorThrown) {\n\t\t\t\t\t\t\tif ( XMLHttpRequest.status > 0 ) {\n\t\t\t\t\t\t\t\t_error();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess : function(data, textStatus, XMLHttpRequest) {\n\t\t\t\t\t\t\tvar o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;\n\t\t\t\t\t\t\tif (o.status == 200) {\n\t\t\t\t\t\t\t\tif ( typeof selectedOpts.ajax.win == 'function' ) {\n\t\t\t\t\t\t\t\t\tret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);\n\n\t\t\t\t\t\t\t\t\tif (ret === false) {\n\t\t\t\t\t\t\t\t\t\tloading.hide();\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t} else if (typeof ret == 'string' || typeof ret == 'object') {\n\t\t\t\t\t\t\t\t\t\tdata = ret;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\ttmp.html( data );\n\t\t\t\t\t\t\t\t_process_inline();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'iframe':\n\t\t\t\t\t_show();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\n\t\t_process_inline = function() {\n\t\t\tvar\n\t\t\t\tw = selectedOpts.width,\n\t\t\t\th = selectedOpts.height;\n\n\t\t\tif (w.toString().indexOf('%') > -1) {\n\t\t\t\tw = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';\n\n\t\t\t} else {\n\t\t\t\tw = w == 'auto' ? 'auto' : w + 'px';\t\n\t\t\t}\n\n\t\t\tif (h.toString().indexOf('%') > -1) {\n\t\t\t\th = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';\n\n\t\t\t} else {\n\t\t\t\th = h == 'auto' ? 'auto' : h + 'px';\t\n\t\t\t}\n\n\t\t\ttmp.wrapInner('<div style=\"width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;\"></div>');\n\n\t\t\tselectedOpts.width = tmp.width();\n\t\t\tselectedOpts.height = tmp.height();\n\n\t\t\t_show();\n\t\t},\n\n\t\t_process_image = function() {\n\t\t\tselectedOpts.width = imgPreloader.width;\n\t\t\tselectedOpts.height = imgPreloader.height;\n\n\t\t\t$(\"<img />\").attr({\n\t\t\t\t'id' : 'fancybox-img',\n\t\t\t\t'src' : imgPreloader.src,\n\t\t\t\t'alt' : selectedOpts.title\n\t\t\t}).appendTo( tmp );\n\n\t\t\t_show();\n\t\t},\n\n\t\t_show = function() {\n\t\t\tvar pos, equal;\n\n\t\t\tloading.hide();\n\n\t\t\tif (wrap.is(\":visible\") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {\n\t\t\t\t$.event.trigger('fancybox-cancel');\n\n\t\t\t\tbusy = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tbusy = true;\n\n\t\t\t$(content.add( overlay )).unbind();\n\n\t\t\t$(window).unbind(\"resize.fb scroll.fb\");\n\t\t\t$(document).unbind('keydown.fb');\n\n\t\t\tif (wrap.is(\":visible\") && currentOpts.titlePosition !== 'outside') {\n\t\t\t\twrap.css('height', wrap.height());\n\t\t\t}\n\n\t\t\tcurrentArray = selectedArray;\n\t\t\tcurrentIndex = selectedIndex;\n\t\t\tcurrentOpts = selectedOpts;\n\n\t\t\tif (currentOpts.overlayShow) {\n\t\t\t\toverlay.css({\n\t\t\t\t\t'background-color' : currentOpts.overlayColor,\n\t\t\t\t\t'opacity' : currentOpts.overlayOpacity,\n\t\t\t\t\t'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',\n\t\t\t\t\t'height' : $(document).height()\n\t\t\t\t});\n\n\t\t\t\tif (!overlay.is(':visible')) {\n\t\t\t\t\tif (isIE6) {\n\t\t\t\t\t\t$('select:not(#fancybox-tmp select)').filter(function() {\n\t\t\t\t\t\t\treturn this.style.visibility !== 'hidden';\n\t\t\t\t\t\t}).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {\n\t\t\t\t\t\t\tthis.style.visibility = 'inherit';\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\toverlay.show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toverlay.hide();\n\t\t\t}\n\n\t\t\tfinal_pos = _get_zoom_to();\n\n\t\t\t_process_title();\n\n\t\t\tif (wrap.is(\":visible\")) {\n\t\t\t\t$( close.add( nav_left ).add( nav_right ) ).hide();\n\n\t\t\t\tpos = wrap.position(),\n\n\t\t\t\tstart_pos = {\n\t\t\t\t\ttop\t : pos.top,\n\t\t\t\t\tleft : pos.left,\n\t\t\t\t\twidth : wrap.width(),\n\t\t\t\t\theight : wrap.height()\n\t\t\t\t};\n\n\t\t\t\tequal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);\n\n\t\t\t\tcontent.fadeTo(currentOpts.changeFade, 0.3, function() {\n\t\t\t\t\tvar finish_resizing = function() {\n\t\t\t\t\t\tcontent.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);\n\t\t\t\t\t};\n\n\t\t\t\t\t$.event.trigger('fancybox-change');\n\n\t\t\t\t\tcontent\n\t\t\t\t\t\t.empty()\n\t\t\t\t\t\t.removeAttr('filter')\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\t'border-width' : currentOpts.padding,\n\t\t\t\t\t\t\t'width'\t: final_pos.width - currentOpts.padding * 2,\n\t\t\t\t\t\t\t'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2\n\t\t\t\t\t\t});\n\n\t\t\t\t\tif (equal) {\n\t\t\t\t\t\tfinish_resizing();\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfx.prop = 0;\n\n\t\t\t\t\t\t$(fx).animate({prop: 1}, {\n\t\t\t\t\t\t\t duration : currentOpts.changeSpeed,\n\t\t\t\t\t\t\t easing : currentOpts.easingChange,\n\t\t\t\t\t\t\t step : _draw,\n\t\t\t\t\t\t\t complete : finish_resizing\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twrap.removeAttr(\"style\");\n\n\t\t\tcontent.css('border-width', currentOpts.padding);\n\n\t\t\tif (currentOpts.transitionIn == 'elastic') {\n\t\t\t\tstart_pos = _get_zoom_from();\n\n\t\t\t\tcontent.html( tmp.contents() );\n\n\t\t\t\twrap.show();\n\n\t\t\t\tif (currentOpts.opacity) {\n\t\t\t\t\tfinal_pos.opacity = 0;\n\t\t\t\t}\n\n\t\t\t\tfx.prop = 0;\n\n\t\t\t\t$(fx).animate({prop: 1}, {\n\t\t\t\t\t duration : currentOpts.speedIn,\n\t\t\t\t\t easing : currentOpts.easingIn,\n\t\t\t\t\t step : _draw,\n\t\t\t\t\t complete : _finish\n\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (currentOpts.titlePosition == 'inside' && titleHeight > 0) {\t\n\t\t\t\ttitle.show();\t\n\t\t\t}\n\n\t\t\tcontent\n\t\t\t\t.css({\n\t\t\t\t\t'width' : final_pos.width - currentOpts.padding * 2,\n\t\t\t\t\t'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2\n\t\t\t\t})\n\t\t\t\t.html( tmp.contents() );\n\n\t\t\twrap\n\t\t\t\t.css(final_pos)\n\t\t\t\t.fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );\n\t\t},\n\n\t\t_format_title = function(title) {\n\t\t\tif (title && title.length) {\n\t\t\t\tif (currentOpts.titlePosition == 'float') {\n\t\t\t\t\treturn '<table id=\"fancybox-title-float-wrap\" cellpadding=\"0\" cellspacing=\"0\"><tr><td id=\"fancybox-title-float-left\"></td><td id=\"fancybox-title-float-main\">' + title + '</td><td id=\"fancybox-title-float-right\"></td></tr></table>';\n\t\t\t\t}\n\n\t\t\t\treturn '<div id=\"fancybox-title-' + currentOpts.titlePosition + '\">' + title + '</div>';\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\n\t\t_process_title = function() {\n\t\t\ttitleStr = currentOpts.title || '';\n\t\t\ttitleHeight = 0;\n\n\t\t\ttitle\n\t\t\t\t.empty()\n\t\t\t\t.removeAttr('style')\n\t\t\t\t.removeClass();\n\n\t\t\tif (currentOpts.titleShow === false) {\n\t\t\t\ttitle.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttitleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);\n\n\t\t\tif (!titleStr || titleStr === '') {\n\t\t\t\ttitle.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttitle\n\t\t\t\t.addClass('fancybox-title-' + currentOpts.titlePosition)\n\t\t\t\t.html( titleStr )\n\t\t\t\t.appendTo( 'body' )\n\t\t\t\t.show();\n\n\t\t\tswitch (currentOpts.titlePosition) {\n\t\t\t\tcase 'inside':\n\t\t\t\t\ttitle\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\t'width' : final_pos.width - (currentOpts.padding * 2),\n\t\t\t\t\t\t\t'marginLeft' : currentOpts.padding,\n\t\t\t\t\t\t\t'marginRight' : currentOpts.padding\n\t\t\t\t\t\t});\n\n\t\t\t\t\ttitleHeight = title.outerHeight(true);\n\n\t\t\t\t\ttitle.appendTo( outer );\n\n\t\t\t\t\tfinal_pos.height += titleHeight;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'over':\n\t\t\t\t\ttitle\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\t'marginLeft' : currentOpts.padding,\n\t\t\t\t\t\t\t'width'\t: final_pos.width - (currentOpts.padding * 2),\n\t\t\t\t\t\t\t'bottom' : currentOpts.padding\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo( outer );\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'float':\n\t\t\t\t\ttitle\n\t\t\t\t\t\t.css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)\n\t\t\t\t\t\t.appendTo( wrap );\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\ttitle\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\t'width' : final_pos.width - (currentOpts.padding * 2),\n\t\t\t\t\t\t\t'paddingLeft' : currentOpts.padding,\n\t\t\t\t\t\t\t'paddingRight' : currentOpts.padding\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo( wrap );\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttitle.hide();\n\t\t},\n\n\t\t_set_navigation = function() {\n\t\t\tif (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {\n\t\t\t\t$(document).bind('keydown.fb', function(e) {\n\t\t\t\t\tif (e.keyCode == 27 && currentOpts.enableEscapeButton) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t$.fancybox.close();\n\n\t\t\t\t\t} else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t$.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!currentOpts.showNavArrows) { \n\t\t\t\tnav_left.hide();\n\t\t\t\tnav_right.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {\n\t\t\t\tnav_left.show();\n\t\t\t}\n\n\t\t\tif ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {\n\t\t\t\tnav_right.show();\n\t\t\t}\n\t\t},\n\n\t\t_finish = function () {\n\t\t\tif (!$.support.opacity) {\n\t\t\t\tcontent.get(0).style.removeAttribute('filter');\n\t\t\t\twrap.get(0).style.removeAttribute('filter');\n\t\t\t}\n\n\t\t\tif (selectedOpts.autoDimensions) {\n\t\t\t\tcontent.css('height', 'auto');\n\t\t\t}\n\n\t\t\twrap.css('height', 'auto');\n\n\t\t\tif (titleStr && titleStr.length) {\n\t\t\t\ttitle.show();\n\t\t\t}\n\n\t\t\tif (currentOpts.showCloseButton) {\n\t\t\t\tclose.show();\n\t\t\t}\n\n\t\t\t_set_navigation();\n\t\n\t\t\tif (currentOpts.hideOnContentClick)\t{\n\t\t\t\tcontent.bind('click', $.fancybox.close);\n\t\t\t}\n\n\t\t\tif (currentOpts.hideOnOverlayClick)\t{\n\t\t\t\toverlay.bind('click', $.fancybox.close);\n\t\t\t}\n\n\t\t\t$(window).bind(\"resize.fb\", $.fancybox.resize);\n\n\t\t\tif (currentOpts.centerOnScroll) {\n\t\t\t\t$(window).bind(\"scroll.fb\", $.fancybox.center);\n\t\t\t}\n\n\t\t\tif (currentOpts.type == 'iframe') {\n\t\t\t\t$('<iframe id=\"fancybox-frame\" name=\"fancybox-frame' + new Date().getTime() + '\" frameborder=\"0\" hspace=\"0\" ' + ($.browser.msie ? 'allowtransparency=\"true\"\"' : '') + ' scrolling=\"' + selectedOpts.scrolling + '\" src=\"' + currentOpts.href + '\"></iframe>').appendTo(content);\n\t\t\t}\n\n\t\t\twrap.show();\n\n\t\t\tbusy = false;\n\n\t\t\t$.fancybox.center();\n\n\t\t\tcurrentOpts.onComplete(currentArray, currentIndex, currentOpts);\n\n\t\t\t_preload_images();\n\t\t},\n\n\t\t_preload_images = function() {\n\t\t\tvar href, \n\t\t\t\tobjNext;\n\n\t\t\tif ((currentArray.length -1) > currentIndex) {\n\t\t\t\thref = currentArray[ currentIndex + 1 ].href;\n\n\t\t\t\tif (typeof href !== 'undefined' && href.match(imgRegExp)) {\n\t\t\t\t\tobjNext = new Image();\n\t\t\t\t\tobjNext.src = href;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\thref = currentArray[ currentIndex - 1 ].href;\n\n\t\t\t\tif (typeof href !== 'undefined' && href.match(imgRegExp)) {\n\t\t\t\t\tobjNext = new Image();\n\t\t\t\t\tobjNext.src = href;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t_draw = function(pos) {\n\t\t\tvar dim = {\n\t\t\t\twidth : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),\n\t\t\t\theight : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),\n\n\t\t\t\ttop : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),\n\t\t\t\tleft : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)\n\t\t\t};\n\n\t\t\tif (typeof final_pos.opacity !== 'undefined') {\n\t\t\t\tdim.opacity = pos < 0.5 ? 0.5 : pos;\n\t\t\t}\n\n\t\t\twrap.css(dim);\n\n\t\t\tcontent.css({\n\t\t\t\t'width' : dim.width - currentOpts.padding * 2,\n\t\t\t\t'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2\n\t\t\t});\n\t\t},\n\n\t\t_get_viewport = function() {\n\t\t\treturn [\n\t\t\t\t$(window).width() - (currentOpts.margin * 2),\n\t\t\t\t$(window).height() - (currentOpts.margin * 2),\n\t\t\t\t$(document).scrollLeft() + currentOpts.margin,\n\t\t\t\t$(document).scrollTop() + currentOpts.margin\n\t\t\t];\n\t\t},\n\n\t\t_get_zoom_to = function () {\n\t\t\tvar view = _get_viewport(),\n\t\t\t\tto = {},\n\t\t\t\tresize = currentOpts.autoScale,\n\t\t\t\tdouble_padding = currentOpts.padding * 2,\n\t\t\t\tratio;\n\n\t\t\tif (currentOpts.width.toString().indexOf('%') > -1) {\n\t\t\t\tto.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);\n\t\t\t} else {\n\t\t\t\tto.width = currentOpts.width + double_padding;\n\t\t\t}\n\n\t\t\tif (currentOpts.height.toString().indexOf('%') > -1) {\n\t\t\t\tto.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);\n\t\t\t} else {\n\t\t\t\tto.height = currentOpts.height + double_padding;\n\t\t\t}\n\n\t\t\tif (resize && (to.width > view[0] || to.height > view[1])) {\n\t\t\t\tif (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {\n\t\t\t\t\tratio = (currentOpts.width ) / (currentOpts.height );\n\n\t\t\t\t\tif ((to.width ) > view[0]) {\n\t\t\t\t\t\tto.width = view[0];\n\t\t\t\t\t\tto.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((to.height) > view[1]) {\n\t\t\t\t\t\tto.height = view[1];\n\t\t\t\t\t\tto.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tto.width = Math.min(to.width, view[0]);\n\t\t\t\t\tto.height = Math.min(to.height, view[1]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tto.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);\n\t\t\tto.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);\n\n\t\t\treturn to;\n\t\t},\n\n\t\t_get_obj_pos = function(obj) {\n\t\t\tvar pos = obj.offset();\n\n\t\t\tpos.top += parseInt( obj.css('paddingTop'), 10 ) || 0;\n\t\t\tpos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0;\n\n\t\t\tpos.top += parseInt( obj.css('border-top-width'), 10 ) || 0;\n\t\t\tpos.left += parseInt( obj.css('border-left-width'), 10 ) || 0;\n\n\t\t\tpos.width = obj.width();\n\t\t\tpos.height = obj.height();\n\n\t\t\treturn pos;\n\t\t},\n\n\t\t_get_zoom_from = function() {\n\t\t\tvar orig = selectedOpts.orig ? $(selectedOpts.orig) : false,\n\t\t\t\tfrom = {},\n\t\t\t\tpos,\n\t\t\t\tview;\n\n\t\t\tif (orig && orig.length) {\n\t\t\t\tpos = _get_obj_pos(orig);\n\n\t\t\t\tfrom = {\n\t\t\t\t\twidth : pos.width + (currentOpts.padding * 2),\n\t\t\t\t\theight : pos.height + (currentOpts.padding * 2),\n\t\t\t\t\ttop\t: pos.top - currentOpts.padding - 20,\n\t\t\t\t\tleft : pos.left - currentOpts.padding - 20\n\t\t\t\t};\n\n\t\t\t} else {\n\t\t\t\tview = _get_viewport();\n\n\t\t\t\tfrom = {\n\t\t\t\t\twidth : currentOpts.padding * 2,\n\t\t\t\t\theight : currentOpts.padding * 2,\n\t\t\t\t\ttop\t: parseInt(view[3] + view[1] * 0.5, 10),\n\t\t\t\t\tleft : parseInt(view[2] + view[0] * 0.5, 10)\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn from;\n\t\t},\n\n\t\t_animate_loading = function() {\n\t\t\tif (!loading.is(':visible')){\n\t\t\t\tclearInterval(loadingTimer);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$('div', loading).css('top', (loadingFrame * -40) + 'px');\n\n\t\t\tloadingFrame = (loadingFrame + 1) % 12;\n\t\t};\n\n\t/*\n\t * Public methods \n\t */\n\n\t$.fn.fancybox = function(options) {\n\t\tif (!$(this).length) {\n\t\t\treturn this;\n\t\t}\n\n\t\t$(this)\n\t\t\t.data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))\n\t\t\t.unbind('click.fb')\n\t\t\t.bind('click.fb', function(e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tif (busy) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tbusy = true;\n\n\t\t\t\t$(this).blur();\n\n\t\t\t\tselectedArray = [];\n\t\t\t\tselectedIndex = 0;\n\n\t\t\t\tvar rel = $(this).attr('rel') || '';\n\n\t\t\t\tif (!rel || rel == '' || rel === 'nofollow') {\n\t\t\t\t\tselectedArray.push(this);\n\n\t\t\t\t} else {\n\t\t\t\t\tselectedArray = $(\"a[rel=\" + rel + \"], area[rel=\" + rel + \"]\");\n\t\t\t\t\tselectedIndex = selectedArray.index( this );\n\t\t\t\t}\n\n\t\t\t\t_start();\n\n\t\t\t\treturn;\n\t\t\t});\n\n\t\treturn this;\n\t};\n\n\t$.fancybox = function(obj) {\n\t\tvar opts;\n\n\t\tif (busy) {\n\t\t\treturn;\n\t\t}\n\n\t\tbusy = true;\n\t\topts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};\n\n\t\tselectedArray = [];\n\t\tselectedIndex = parseInt(opts.index, 10) || 0;\n\n\t\tif ($.isArray(obj)) {\n\t\t\tfor (var i = 0, j = obj.length; i < j; i++) {\n\t\t\t\tif (typeof obj[i] == 'object') {\n\t\t\t\t\t$(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));\n\t\t\t\t} else {\n\t\t\t\t\tobj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tselectedArray = jQuery.merge(selectedArray, obj);\n\n\t\t} else {\n\t\t\tif (typeof obj == 'object') {\n\t\t\t\t$(obj).data('fancybox', $.extend({}, opts, obj));\n\t\t\t} else {\n\t\t\t\tobj = $({}).data('fancybox', $.extend({content : obj}, opts));\n\t\t\t}\n\n\t\t\tselectedArray.push(obj);\n\t\t}\n\n\t\tif (selectedIndex > selectedArray.length || selectedIndex < 0) {\n\t\t\tselectedIndex = 0;\n\t\t}\n\n\t\t_start();\n\t};\n\n\t$.fancybox.showActivity = function() {\n\t\tclearInterval(loadingTimer);\n\n\t\tloading.show();\n\t\tloadingTimer = setInterval(_animate_loading, 66);\n\t};\n\n\t$.fancybox.hideActivity = function() {\n\t\tloading.hide();\n\t};\n\n\t$.fancybox.next = function() {\n\t\treturn $.fancybox.pos( currentIndex + 1);\n\t};\n\n\t$.fancybox.prev = function() {\n\t\treturn $.fancybox.pos( currentIndex - 1);\n\t};\n\n\t$.fancybox.pos = function(pos) {\n\t\tif (busy) {\n\t\t\treturn;\n\t\t}\n\n\t\tpos = parseInt(pos);\n\n\t\tselectedArray = currentArray;\n\n\t\tif (pos > -1 && pos < currentArray.length) {\n\t\t\tselectedIndex = pos;\n\t\t\t_start();\n\n\t\t} else if (currentOpts.cyclic && currentArray.length > 1) {\n\t\t\tselectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;\n\t\t\t_start();\n\t\t}\n\n\t\treturn;\n\t};\n\n\t$.fancybox.cancel = function() {\n\t\tif (busy) {\n\t\t\treturn;\n\t\t}\n\n\t\tbusy = true;\n\n\t\t$.event.trigger('fancybox-cancel');\n\n\t\t_abort();\n\n\t\tselectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);\n\n\t\tbusy = false;\n\t};\n\n\t// Note: within an iframe use - parent.$.fancybox.close();\n\t$.fancybox.close = function() {\n\t\tif (busy || wrap.is(':hidden')) {\n\t\t\treturn;\n\t\t}\n\n\t\tbusy = true;\n\n\t\tif (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {\n\t\t\tbusy = false;\n\t\t\treturn;\n\t\t}\n\n\t\t_abort();\n\n\t\t$(close.add( nav_left ).add( nav_right )).hide();\n\n\t\t$(content.add( overlay )).unbind();\n\n\t\t$(window).unbind(\"resize.fb scroll.fb\");\n\t\t$(document).unbind('keydown.fb');\n\n\t\tcontent.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');\n\n\t\tif (currentOpts.titlePosition !== 'inside') {\n\t\t\ttitle.empty();\n\t\t}\n\n\t\twrap.stop();\n\n\t\tfunction _cleanup() {\n\t\t\toverlay.fadeOut('fast');\n\n\t\t\ttitle.empty().hide();\n\t\t\twrap.hide();\n\n\t\t\t$.event.trigger('fancybox-cleanup');\n\n\t\t\tcontent.empty();\n\n\t\t\tcurrentOpts.onClosed(currentArray, currentIndex, currentOpts);\n\n\t\t\tcurrentArray = selectedOpts\t= [];\n\t\t\tcurrentIndex = selectedIndex = 0;\n\t\t\tcurrentOpts = selectedOpts\t= {};\n\n\t\t\tbusy = false;\n\t\t}\n\n\t\tif (currentOpts.transitionOut == 'elastic') {\n\t\t\tstart_pos = _get_zoom_from();\n\n\t\t\tvar pos = wrap.position();\n\n\t\t\tfinal_pos = {\n\t\t\t\ttop\t : pos.top ,\n\t\t\t\tleft : pos.left,\n\t\t\t\twidth :\twrap.width(),\n\t\t\t\theight : wrap.height()\n\t\t\t};\n\n\t\t\tif (currentOpts.opacity) {\n\t\t\t\tfinal_pos.opacity = 1;\n\t\t\t}\n\n\t\t\ttitle.empty().hide();\n\n\t\t\tfx.prop = 1;\n\n\t\t\t$(fx).animate({ prop: 0 }, {\n\t\t\t\t duration : currentOpts.speedOut,\n\t\t\t\t easing : currentOpts.easingOut,\n\t\t\t\t step : _draw,\n\t\t\t\t complete : _cleanup\n\t\t\t});\n\n\t\t} else {\n\t\t\twrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);\n\t\t}\n\t};\n\n\t$.fancybox.resize = function() {\n\t\tif (overlay.is(':visible')) {\n\t\t\toverlay.css('height', $(document).height());\n\t\t}\n\n\t\t$.fancybox.center(true);\n\t};\n\n\t$.fancybox.center = function() {\n\t\tvar view, align;\n\n\t\tif (busy) {\n\t\t\treturn;\t\n\t\t}\n\n\t\talign = arguments[0] === true ? 1 : 0;\n\t\tview = _get_viewport();\n\n\t\tif (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {\n\t\t\treturn;\t\n\t\t}\n\n\t\twrap\n\t\t\t.stop()\n\t\t\t.animate({\n\t\t\t\t'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),\n\t\t\t\t'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))\n\t\t\t}, typeof arguments[0] == 'number' ? arguments[0] : 200);\n\t};\n\n\t$.fancybox.init = function() {\n\t\tif ($(\"#fancybox-wrap\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\t$('body').append(\n\t\t\ttmp\t= $('<div id=\"fancybox-tmp\"></div>'),\n\t\t\tloading\t= $('<div id=\"fancybox-loading\"><div></div></div>'),\n\t\t\toverlay\t= $('<div id=\"fancybox-overlay\"></div>'),\n\t\t\twrap = $('<div id=\"fancybox-wrap\"></div>')\n\t\t);\n\n\t\touter = $('<div id=\"fancybox-outer\"></div>')\n\t\t\t.append('<div class=\"fancybox-bg\" id=\"fancybox-bg-n\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-ne\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-e\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-se\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-s\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-sw\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-w\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-nw\"></div>')\n\t\t\t.appendTo( wrap );\n\n\t\touter.append(\n\t\t\tcontent = $('<div id=\"fancybox-content\"></div>'),\n\t\t\tclose = $('<a id=\"fancybox-close\"></a>'),\n\t\t\ttitle = $('<div id=\"fancybox-title\"></div>'),\n\n\t\t\tnav_left = $('<a href=\"javascript:;\" id=\"fancybox-left\"><span class=\"fancy-ico\" id=\"fancybox-left-ico\"></span></a>'),\n\t\t\tnav_right = $('<a href=\"javascript:;\" id=\"fancybox-right\"><span class=\"fancy-ico\" id=\"fancybox-right-ico\"></span></a>')\n\t\t);\n\n\t\tclose.click($.fancybox.close);\n\t\tloading.click($.fancybox.cancel);\n\n\t\tnav_left.click(function(e) {\n\t\t\te.preventDefault();\n\t\t\t$.fancybox.prev();\n\t\t});\n\n\t\tnav_right.click(function(e) {\n\t\t\te.preventDefault();\n\t\t\t$.fancybox.next();\n\t\t});\n\n\t\tif ($.fn.mousewheel) {\n\t\t\twrap.bind('mousewheel.fb', function(e, delta) {\n\t\t\t\tif (busy) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t} else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t$.fancybox[ delta > 0 ? 'prev' : 'next']();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (!$.support.opacity) {\n\t\t\twrap.addClass('fancybox-ie');\n\t\t}\n\n\t\tif (isIE6) {\n\t\t\tloading.addClass('fancybox-ie6');\n\t\t\twrap.addClass('fancybox-ie6');\n\n\t\t\t$('<iframe id=\"fancybox-hide-sel-frame\" src=\"' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '\" scrolling=\"no\" border=\"0\" frameborder=\"0\" tabindex=\"-1\"></iframe>').prependTo(outer);\n\t\t}\n\t};\n\n\t$.fn.fancybox.defaults = {\n\t\tpadding : 10,\n\t\tmargin : 40,\n\t\topacity : false,\n\t\tmodal : false,\n\t\tcyclic : false,\n\t\tscrolling : 'auto',\t// 'auto', 'yes' or 'no'\n\n\t\twidth : 560,\n\t\theight : 340,\n\n\t\tautoScale : true,\n\t\tautoDimensions : true,\n\t\tcenterOnScroll : false,\n\n\t\tajax : {},\n\t\tswf : { wmode: 'transparent' },\n\n\t\thideOnOverlayClick : true,\n\t\thideOnContentClick : false,\n\n\t\toverlayShow : true,\n\t\toverlayOpacity : 0.7,\n\t\toverlayColor : '#777',\n\n\t\ttitleShow : true,\n\t\ttitlePosition : 'float', // 'float', 'outside', 'inside' or 'over'\n\t\ttitleFormat : null,\n\t\ttitleFromAlt : false,\n\n\t\ttransitionIn : 'fade', // 'elastic', 'fade' or 'none'\n\t\ttransitionOut : 'fade', // 'elastic', 'fade' or 'none'\n\n\t\tspeedIn : 300,\n\t\tspeedOut : 300,\n\n\t\tchangeSpeed : 300,\n\t\tchangeFade : 'fast',\n\n\t\teasingIn : 'swing',\n\t\teasingOut : 'swing',\n\n\t\tshowCloseButton\t : true,\n\t\tshowNavArrows : true,\n\t\tenableEscapeButton : true,\n\t\tenableKeyboardNav : true,\n\n\t\tonStart : function(){},\n\t\tonCancel : function(){},\n\t\tonComplete : function(){},\n\t\tonCleanup : function(){},\n\t\tonClosed : function(){},\n\t\tonError : function(){}\n\t};\n\n\t$(document).ready(function() {\n\t\t$.fancybox.init();\n\t});\n\n})(jQuery);"
  },
  {
    "path": "bin/htmlexample/src/js/fancybox/jquery.fancybox-1.3.4.pack.js",
    "content": "/*\n * FancyBox - jQuery Plugin\n * Simple and fancy lightbox alternative\n *\n * Examples and documentation at: http://fancybox.net\n * \n * Copyright (c) 2008 - 2010 Janis Skarnelis\n * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.\n * \n * Version: 1.3.4 (11/11/2010)\n * Requires: jQuery v1.3+\n *\n * Dual licensed under the MIT and GPL licenses:\n *   http://www.opensource.org/licenses/mit-license.php\n *   http://www.gnu.org/licenses/gpl.html\n */\n\n;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\\.]\\.(swf)\\s*$/i,K,L=1,y=0,s=\"\",r,i,h=false,B=b.extend(b(\"<div/>\")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width=\"auto\";e.height=\"auto\";m.html('<p id=\"fancybox-error\">The requested content cannot be loaded.<br />Please try again later.</p>');\nF()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data(\"fancybox\")==\"undefined\"?e:b(a).data(\"fancybox\"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w==\"object\")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr(\"title\"):a.title)||\"\";if(a.nodeName&&!e.orig)e.orig=b(a).children(\"img:first\").length?b(a).children(\"img:first\"):b(a);if(k===\"\"&&e.orig&&e.titleFromAlt)k=e.orig.attr(\"alt\");c=e.href||(a.nodeName?b(a).attr(\"href\"):a.href)||null;if(/^(?:javascript)/i.test(c)||\nc==\"#\")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g=\"html\";else if(c)g=c.match(J)?\"image\":c.match(W)?\"swf\":b(a).hasClass(\"iframe\")?\"iframe\":c.indexOf(\"#\")===0?\"inline\":\"ajax\";if(g){if(g==\"inline\"){a=c.substr(c.indexOf(\"#\"));g=b(a).length>0?\"inline\":\"ajax\"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type==\"html\"||e.type==\"inline\"||e.type==\"ajax\"){e.width=\"auto\";e.height=\"auto\"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=\nfalse;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css(\"padding\",e.padding+e.margin);b(\".fancybox-inline-tmp\").unbind(\"fancybox-cancel\").bind(\"fancybox-change\",function(){b(this).replaceWith(j.children())});switch(g){case \"html\":m.html(e.content);F();break;case \"inline\":if(b(a).parent().is(\"#fancybox-content\")===true){h=false;break}b('<div class=\"fancybox-inline-tmp\" />').hide().insertBefore(b(a)).bind(\"fancybox-cleanup\",function(){b(this).replaceWith(j.children())}).bind(\"fancybox-cancel\",\nfunction(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case \"image\":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b(\"<img />\").attr({id:\"fancybox-img\",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case \"swf\":e.scrolling=\"no\";C='<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"'+e.width+'\" height=\"'+e.height+'\"><param name=\"movie\" value=\"'+c+\n'\"></param>';P=\"\";b.each(e.swf,function(x,H){C+='<param name=\"'+x+'\" value=\"'+H+'\"></param>';P+=\" \"+x+'=\"'+H+'\"'});C+='<embed src=\"'+c+'\" type=\"application/x-shockwave-flash\" width=\"'+e.width+'\" height=\"'+e.height+'\"'+P+\"></embed></object>\";m.html(C);F();break;case \"ajax\":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R==\"object\"?R:G).status==200){if(typeof e.ajax.win==\n\"function\"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w==\"string\"||typeof w==\"object\")x=w}m.html(x);F()}}}));break;case \"iframe\":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf(\"%\")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+\"px\":a==\"auto\"?\"auto\":a+\"px\";c=c.toString().indexOf(\"%\")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+\"px\":c==\"auto\"?\"auto\":c+\"px\";m.wrapInner('<div style=\"width:'+a+\";height:\"+c+\n\";overflow: \"+(e.scrolling==\"auto\"?\"auto\":e.scrolling==\"yes\"?\"scroll\":\"hidden\")+';position:relative;\"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(\":visible\")&&false===d.onCleanup(l,p,d)){b.event.trigger(\"fancybox-cancel\");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind(\"resize.fb scroll.fb\");b(document).unbind(\"keydown.fb\");f.is(\":visible\")&&d.titlePosition!==\"outside\"&&f.css(\"height\",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({\"background-color\":d.overlayColor,\nopacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?\"pointer\":\"auto\",height:b(document).height()});if(!u.is(\":visible\")){M&&b(\"select:not(#fancybox-tmp select)\").filter(function(){return this.style.visibility!==\"hidden\"}).css({visibility:\"hidden\"}).one(\"fancybox-cleanup\",function(){this.style.visibility=\"inherit\"});u.show()}}else u.hide();i=X();s=d.title||\"\";y=0;n.empty().removeAttr(\"style\").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?\nd.titlePosition==\"float\"?'<table id=\"fancybox-title-float-wrap\" cellpadding=\"0\" cellspacing=\"0\"><tr><td id=\"fancybox-title-float-left\"></td><td id=\"fancybox-title-float-main\">'+s+'</td><td id=\"fancybox-title-float-right\"></td></tr></table>':'<div id=\"fancybox-title-'+d.titlePosition+'\">'+s+\"</div>\":false;s=a;if(!(!s||s===\"\")){n.addClass(\"fancybox-title-\"+d.titlePosition).html(s).appendTo(\"body\").show();switch(d.titlePosition){case \"inside\":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});\ny=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case \"over\":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case \"float\":n.css(\"left\",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(\":visible\")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==\ni.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger(\"fancybox-change\");j.empty().removeAttr(\"filter\").css({\"border-width\":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?\"auto\":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr(\"style\");j.css(\"border-width\",d.padding);if(d.transitionIn==\"elastic\"){r=V();j.html(m.contents());\nf.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition==\"inside\"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?\"auto\":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn==\"none\"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind(\"keydown.fb\",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==\n37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!==\"INPUT\"&&a.target.tagName!==\"TEXTAREA\"&&a.target.tagName!==\"SELECT\"){a.preventDefault();b.fancybox[a.keyCode==37?\"prev\":\"next\"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute(\"filter\");f.get(0).style.removeAttribute(\"filter\")}e.autoDimensions&&j.css(\"height\",\"auto\");f.css(\"height\",\"auto\");\ns&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind(\"click\",b.fancybox.close);d.hideOnOverlayClick&&u.bind(\"click\",b.fancybox.close);b(window).bind(\"resize.fb\",b.fancybox.resize);d.centerOnScroll&&b(window).bind(\"scroll.fb\",b.fancybox.center);if(d.type==\"iframe\")b('<iframe id=\"fancybox-frame\" name=\"fancybox-frame'+(new Date).getTime()+'\" frameborder=\"0\" hspace=\"0\" '+(b.browser.msie?'allowtransparency=\"true\"\"':\"\")+' scrolling=\"'+e.scrolling+'\" src=\"'+d.href+'\"></iframe>').appendTo(j);\nf.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!==\"undefined\"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!==\"undefined\"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!==\"undefined\")c.opacity=a<0.5?0.5:a;f.css(c);\nj.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf(\"%\")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf(\"%\")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==\n\"image\"||e.type==\"swf\"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css(\"paddingTop\"),\n10)||0;c.left+=parseInt(a.css(\"paddingLeft\"),10)||0;c.top+=parseInt(a.css(\"border-top-width\"),10)||0;c.left+=parseInt(a.css(\"border-left-width\"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(\":visible\")){b(\"div\",t).css(\"top\",L*-40+\"px\");L=(L+1)%12}else clearInterval(K)};\nb.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data(\"fancybox\",b.extend({},a,b.metadata?b(this).metadata():{})).unbind(\"click.fb\").bind(\"click.fb\",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr(\"rel\")||\"\";if(!c||c==\"\"||c===\"nofollow\")o.push(this);else{o=b(\"a[rel=\"+c+\"], area[rel=\"+c+\"]\");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!==\"undefined\"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=\n0,C=a.length;k<C;k++)if(typeof a[k]==\"object\")b(a[k]).data(\"fancybox\",b.extend({},g,a[k]));else a[k]=b({}).data(\"fancybox\",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a==\"object\")b(a).data(\"fancybox\",b.extend({},g,a));else a=b({}).data(\"fancybox\",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+\n1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger(\"fancybox-cancel\");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut(\"fast\");n.empty().hide();f.hide();b.event.trigger(\"fancybox-cleanup\");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(\":hidden\"))){h=\ntrue;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind(\"resize.fb scroll.fb\");b(document).unbind(\"keydown.fb\");j.find(\"iframe\").attr(\"src\",M&&/^https/i.test(window.location.href||\"\")?\"javascript:void(false)\":\"about:blank\");d.titlePosition!==\"inside\"&&n.empty();f.stop();if(d.transitionOut==\"elastic\"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;\nb(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut==\"none\"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(\":visible\")&&u.css(\"height\",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-\nd.padding))},typeof a==\"number\"?a:200)}};b.fancybox.init=function(){if(!b(\"#fancybox-wrap\").length){b(\"body\").append(m=b('<div id=\"fancybox-tmp\"></div>'),t=b('<div id=\"fancybox-loading\"><div></div></div>'),u=b('<div id=\"fancybox-overlay\"></div>'),f=b('<div id=\"fancybox-wrap\"></div>'));D=b('<div id=\"fancybox-outer\"></div>').append('<div class=\"fancybox-bg\" id=\"fancybox-bg-n\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-ne\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-e\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-se\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-s\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-sw\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-w\"></div><div class=\"fancybox-bg\" id=\"fancybox-bg-nw\"></div>').appendTo(f);\nD.append(j=b('<div id=\"fancybox-content\"></div>'),E=b('<a id=\"fancybox-close\"></a>'),n=b('<div id=\"fancybox-title\"></div>'),z=b('<a href=\"javascript:;\" id=\"fancybox-left\"><span class=\"fancy-ico\" id=\"fancybox-left-ico\"></span></a>'),A=b('<a href=\"javascript:;\" id=\"fancybox-right\"><span class=\"fancy-ico\" id=\"fancybox-right-ico\"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});\nb.fn.mousewheel&&f.bind(\"mousewheel.fb\",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?\"prev\":\"next\"]()}});b.support.opacity||f.addClass(\"fancybox-ie\");if(M){t.addClass(\"fancybox-ie6\");f.addClass(\"fancybox-ie6\");b('<iframe id=\"fancybox-hide-sel-frame\" src=\"'+(/^https/i.test(window.location.href||\"\")?\"javascript:void(false)\":\"about:blank\")+'\" scrolling=\"no\" border=\"0\" frameborder=\"0\" tabindex=\"-1\"></iframe>').prependTo(D)}}};\nb.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:\"auto\",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:\"transparent\"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:\"#777\",titleShow:true,titlePosition:\"float\",titleFormat:null,titleFromAlt:false,transitionIn:\"fade\",transitionOut:\"fade\",speedIn:300,speedOut:300,changeSpeed:300,changeFade:\"fast\",easingIn:\"swing\",\neasingOut:\"swing\",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);"
  },
  {
    "path": "bin/htmlexample/src/js/fancybox/jquery.mousewheel-3.0.4.pack.js",
    "content": "/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)\n* Licensed under the MIT License (LICENSE.txt).\n*\n* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.\n* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.\n* Thanks to: Seamus Leahy for adding deltaX and deltaY\n*\n* Version: 3.0.4\n*\n* Requires: 1.2.2+\n*/\n\n(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type=\"mousewheel\";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=[\"DOMMouseScroll\",\"mousewheel\"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=\nf.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind(\"mousewheel\",a):this.trigger(\"mousewheel\")},unmousewheel:function(a){return this.unbind(\"mousewheel\",a)}})})(jQuery);"
  },
  {
    "path": "bin/htmlexample/src/js/scrolltop.js",
    "content": "$(document).ready(function(){\n\t//1.Ƚ#goTopBtn\n\t$(\"#goTopBtn\").hide();\n\n\t//2.¼ʱ\n\t$(window).scroll(function(){\n\t\t//λôھඥ0ʱضť֣ʧ\n\t\tif ($(window).scrollTop()>0){\n\t\t\t$(\"#goTopBtn\").fadeIn(1500);\n\t\t\t}\n\t\telse{\n\t\t\t$(\"#goTopBtn\").fadeOut(1500);\n\t\t\t}\n\t});\n\t\n\t//3.ضť󣬻صҳ涥λ\n\t$(\"#goTopBtn\").click(function(){\n\t\t$('body,html').animate({scrollTop:0},1000);\n\t});\n});\n"
  },
  {
    "path": "bin/htmlexample/src/js/tree/tree.css",
    "content": ".tree {\n\tfont-family: Verdana, Geneva, Arial, Helvetica, sans-serif;\n\tfont-size: 11px;\n\tpadding: 10px;\n\twhite-space: nowrap;\n}\n.tree img {\n\tborder: 0px;\n\theight: 18px;\n\tvertical-align: text-bottom;\n}\n.tree a {\n\tcolor: #000;\n\ttext-decoration: none;\n}\n.tree a:hover {\n\tcolor: #345373;\n}"
  },
  {
    "path": "bin/htmlexample/src/js/tree/tree.js",
    "content": "/**************************************************************************\n\tCopyright (c) 2001-2003 Geir Landr (drop@destroydrop.com)\n\tJavaScript Tree - www.destroydrop.com/hjavascripts/tree/\n\tVersion 0.96\t\n\n\tThis script can be used freely as long as all copyright messages are\n\tintact.\n**************************************************************************/\n\n// Arrays for nodes and icons\nvar nodes\t\t\t= new Array();;\nvar openNodes\t= new Array();\nvar icons\t\t\t= new Array(6);\n\n// Loads all icons that are used in the tree\nfunction preloadIcons() {\n\ticons[0] = new Image();\n\ticons[0].src = \"src/js/tree/img/plus.gif\";\n\ticons[1] = new Image();\n\ticons[1].src = \"src/js/tree/img/plusbottom.gif\";\n\ticons[2] = new Image();\n\ticons[2].src = \"src/js/tree/img/minus.gif\";\n\ticons[3] = new Image();\n\ticons[3].src = \"src/js/tree/img/minusbottom.gif\";\n\ticons[4] = new Image();\n\ticons[4].src = \"src/js/tree/img/folder.gif\";\n\ticons[5] = new Image();\n\ticons[5].src = \"src/js/tree/img/folderopen.gif\";\n}\n// Create the tree\nfunction createTree(arrName, startNode, openNode) {\n\tnodes = arrName;\n\tif (nodes.length > 0) {\n\t\tpreloadIcons();\n\t\tif (startNode == null) startNode = 0;\n\t\tif (openNode != 0 || openNode != null) setOpenNodes(openNode);\n\t\n\t\tif (startNode !=0) {\n\t\t\tvar nodeValues = nodes[getArrayId(startNode)].split(\"|\");\n\t\t\tdocument.write(\"<a target=\\\"_blank\\\" href=\\\"\" + nodeValues[3] + \"\\\" onmouseover=\\\"window.status='\" + nodeValues[2] + \"';return true;\\\" onmouseout=\\\"window.status=' ';return true;\\\"><img src=\\\"src/js/tree/img/folderopen.gif\\\" align=\\\"absbottom\\\" alt=\\\"\\\" />\" + nodeValues[2] + \"</a><br />\");\n\t\t} else document.write(\"<img src=\\\"src/js/tree/img/base.gif\\\" align=\\\"absbottom\\\" alt=\\\"\\\" />Website<br />\");\n\t\n\t\tvar recursedNodes = new Array();\n\t\taddNode(startNode, recursedNodes);\n\t}\n}\n// Returns the position of a node in the array\nfunction getArrayId(node) {\n\tfor (i=0; i<nodes.length; i++) {\n\t\tvar nodeValues = nodes[i].split(\"|\");\n\t\tif (nodeValues[0]==node) return i;\n\t}\n}\n// Puts in array nodes that will be open\nfunction setOpenNodes(openNode) {\n\tfor (i=0; i<nodes.length; i++) {\n\t\tvar nodeValues = nodes[i].split(\"|\");\n\t\tif (nodeValues[0]==openNode) {\n\t\t\topenNodes.push(nodeValues[0]);\n\t\t\tsetOpenNodes(nodeValues[1]);\n\t\t}\n\t} \n}\n// Checks if a node is open\nfunction isNodeOpen(node) {\n\tfor (i=0; i<openNodes.length; i++)\n\t\tif (openNodes[i]==node) return true;\n\treturn false;\n}\n// Checks if a node has any children\nfunction hasChildNode(parentNode) {\n\tfor (i=0; i< nodes.length; i++) {\n\t\tvar nodeValues = nodes[i].split(\"|\");\n\t\tif (nodeValues[1] == parentNode) return true;\n\t}\n\treturn false;\n}\n// Checks if a node is the last sibling\nfunction lastSibling (node, parentNode) {\n\tvar lastChild = 0;\n\tfor (i=0; i< nodes.length; i++) {\n\t\tvar nodeValues = nodes[i].split(\"|\");\n\t\tif (nodeValues[1] == parentNode)\n\t\t\tlastChild = nodeValues[0];\n\t}\n\tif (lastChild==node) return true;\n\treturn false;\n}\n// Adds a new node to the tree\nfunction addNode(parentNode, recursedNodes) {\n\tfor (var i = 0; i < nodes.length; i++) {\n\n\t\tvar nodeValues = nodes[i].split(\"|\");\n\t\tif (nodeValues[1] == parentNode) {\n\t\t\t\n\t\t\tvar ls\t= lastSibling(nodeValues[0], nodeValues[1]);\n\t\t\tvar hcn\t= hasChildNode(nodeValues[0]);\n\t\t\tvar ino = isNodeOpen(nodeValues[0]);\n\n\t\t\t// Write out line & empty icons\n\t\t\tfor (g=0; g<recursedNodes.length; g++) {\n\t\t\t\tif (recursedNodes[g] == 1) document.write(\"<img src=\\\"src/js/tree/img/line.gif\\\" align=\\\"absbottom\\\" alt=\\\"\\\" />\");\n\t\t\t\telse  document.write(\"<img src=\\\"src/js/tree/img/empty.gif\\\" align=\\\"absbottom\\\" alt=\\\"\\\" />\");\n\t\t\t}\n\n\t\t\t// put in array line & empty icons\n\t\t\tif (ls) recursedNodes.push(0);\n\t\t\telse recursedNodes.push(1);\n\n\t\t\t// Write out join icons\n\t\t\tif (hcn) {\n\t\t\t\tif (ls) {\n\t\t\t\t\tdocument.write(\"<a href=\\\"javascript: oc(\" + nodeValues[0] + \", 1);\\\"><img id=\\\"join\" + nodeValues[0] + \"\\\" src=\\\"src/js/tree/img/\");\n\t\t\t\t\t \tif (ino) document.write(\"minus\");\n\t\t\t\t\t\telse document.write(\"plus\");\n\t\t\t\t\tdocument.write(\"bottom.gif\\\" align=\\\"absbottom\\\" alt=\\\"Open/Close node\\\" /></a>\");\n\t\t\t\t} else {\n\t\t\t\t\tdocument.write(\"<a href=\\\"javascript: oc(\" + nodeValues[0] + \", 0);\\\"><img id=\\\"join\" + nodeValues[0] + \"\\\" src=\\\"src/js/tree/img/\");\n\t\t\t\t\t\tif (ino) document.write(\"minus\");\n\t\t\t\t\t\telse document.write(\"plus\");\n\t\t\t\t\tdocument.write(\".gif\\\" align=\\\"absbottom\\\" alt=\\\"Open/Close node\\\" /></a>\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ls) document.write(\"<img src=\\\"src/js/tree/img/joinbottom.gif\\\" align=\\\"absbottom\\\" alt=\\\"\\\" />\");\n\t\t\t\telse document.write(\"<img src=\\\"src/js/tree/img/join.gif\\\" align=\\\"absbottom\\\" alt=\\\"\\\" />\");\n\t\t\t}\n\n\t\t\t// Start link\n\t\t\tdocument.write(\"<a target=\\\"_blank\\\" href=\\\"\" + nodeValues[3] + \"\\\" onmouseover=\\\"window.status='\" + nodeValues[2] + \"';return true;\\\" onmouseout=\\\"window.status=' ';return true;\\\">\");\n\t\t\t\n\t\t\t// Write out folder & page icons\n\t\t\tif (hcn) {\n\t\t\t\tdocument.write(\"<img id=\\\"icon\" + nodeValues[0] + \"\\\" src=\\\"src/js/tree/img/folder\")\n\t\t\t\t\tif (ino) document.write(\"open\");\n\t\t\t\tdocument.write(\".gif\\\" align=\\\"absbottom\\\" alt=\\\"Folder\\\" />\");\n\t\t\t} else document.write(\"<img id=\\\"icon\" + nodeValues[0] + \"\\\" src=\\\"src/js/tree/img/page.gif\\\" align=\\\"absbottom\\\" alt=\\\"Page\\\" />\");\n\t\t\t\n\t\t\t// Write out node name\n\t\t\tdocument.write(nodeValues[2]);\n\n\t\t\t// End link\n\t\t\tdocument.write(\"</a><br />\");\n\t\t\t\n\t\t\t// If node has children write out divs and go deeper\n\t\t\tif (hcn) {\n\t\t\t\tdocument.write(\"<div id=\\\"div\" + nodeValues[0] + \"\\\"\");\n\t\t\t\t\tif (!ino) document.write(\" style=\\\"display: none;\\\"\");\n\t\t\t\tdocument.write(\">\");\n\t\t\t\taddNode(nodeValues[0], recursedNodes);\n\t\t\t\tdocument.write(\"</div>\");\n\t\t\t}\n\t\t\t\n\t\t\t// remove last line or empty icon \n\t\t\trecursedNodes.pop();\n\t\t}\n\t}\n}\n// Opens or closes a node\nfunction oc(node, bottom) {\n\tvar theDiv = document.getElementById(\"div\" + node);\n\tvar theJoin\t= document.getElementById(\"join\" + node);\n\tvar theIcon = document.getElementById(\"icon\" + node);\n\t\n\tif (theDiv.style.display == 'none') {\n\t\tif (bottom==1) theJoin.src = icons[3].src;\n\t\telse theJoin.src = icons[2].src;\n\t\ttheIcon.src = icons[5].src;\n\t\ttheDiv.style.display = '';\n\t} else {\n\t\tif (bottom==1) theJoin.src = icons[1].src;\n\t\telse theJoin.src = icons[0].src;\n\t\ttheIcon.src = icons[4].src;\n\t\ttheDiv.style.display = 'none';\n\t}\n}\n// Push and pop not implemented in IE\nif(!Array.prototype.push) {\n\tfunction array_push() {\n\t\tfor(var i=0;i<arguments.length;i++)\n\t\t\tthis[this.length]=arguments[i];\n\t\treturn this.length;\n\t}\n\tArray.prototype.push = array_push;\n}\nif(!Array.prototype.pop) {\n\tfunction array_pop(){\n\t\tlastElement = this[this.length-1];\n\t\tthis.length = Math.max(this.length-1,0);\n\t\treturn lastElement;\n\t}\n\tArray.prototype.pop = array_pop;\n}\n"
  },
  {
    "path": "bin/ppflash/18_0_0_209/manifest.json",
    "content": "{\n    \"description\": \"Pepper Flash Player\", \n    \"name\": \"Flapper\", \n    \"version\": \"18.0.0.209\", \n    \"x-flapper-revision\": \"23752\", \n    \"x-ppapi-arch\": \"ia32\", \n    \"x-ppapi-os\": \"win\", \n    \"x-ppapi-required-interfaces\": [\n        \"PPB_AudioConfig;1.1|PPB_AudioConfig;1.0\", \n        \"PPB_AudioInput(Dev);0.4|PPB_AudioInput(Dev);0.3\", \n        \"PPB_Audio;1.0\", \n        \"PPB_BrowserFont_Trusted;1.0\", \n        \"PPB_Buffer(Dev);0.4\", \n        \"PPB_CharSet(Dev);0.4\", \n        \"PPB_Core;1.0\", \n        \"PPB_Crypto(Dev);0.1\", \n        \"PPB_CursorControl(Dev);0.4\", \n        \"PPB_FileChooser(Dev);0.6|PPB_FileChooser(Dev);0.5\", \n        \"PPB_FileChooserTrusted;0.6|PPB_FileChooserTrusted;0.5\", \n        \"PPB_FileRef;1.0\", \n        \"PPB_Flash_Clipboard;5.0|PPB_Flash_Clipboard;4.0\", \n        \"PPB_Flash_File_FileRef;2\", \n        \"PPB_Flash_File_ModuleLocal;3\", \n        \"PPB_Flash_FontFile;0.1|PPB_PDF;1\", \n        \"PPB_FlashFullscreen;1.0|PPB_FlashFullscreen;0.1\", \n        \"PPB_Flash;13.0|PPB_Flash;12.6|PPB_Flash;12.5|PPB_Flash;12.4\", \n        \"PPB_Flash_Menu;0.2\", \n        \"PPB_Graphics2D;1.0\", \n        \"PPB_Graphics3D;1.0\", \n        \"PPB_ImageData;1.0\", \n        \"PPB_IMEInputEvent(Dev);0.2|PPB_IMEInputEvent(Dev);0.1\", \n        \"PPB_InputEvent;1.0\", \n        \"PPB_Instance;1.0\", \n        \"PPB_Memory(Dev);0.1\", \n        \"PPB_NetAddress_Private;1.1|PPB_NetAddress_Private;1.0|PPB_NetAddress_Private;0.1\", \n        \"PPB_OpenGLES2ChromiumMapSub;1.0|PPB_OpenGLES2ChromiumMapSub(Dev);1.0|PPB_GLESChromiumTextureMapping(Dev);0.1\", \n        \"PPB_OpenGLES2;1.0\", \n        \"PPB_TCPSocket_Private;0.4|PPB_TCPSocket_Private;0.3\", \n        \"PPB_TextInput(Dev);0.2|PPB_TextInput(Dev);0.1\", \n        \"PPB_UDPSocket_Private;0.4|PPB_UDPSocket_Private;0.3\", \n        \"PPB_URLLoader;1.0\", \n        \"PPB_URLLoaderTrusted;0.3\", \n        \"PPB_URLRequestInfo;1.0\", \n        \"PPB_URLResponseInfo;1.0\", \n        \"PPB_URLUtil(Dev);0.7|PPB_URLUtil(Dev);0.6\", \n        \"PPB_Var;1.1|PPB_Var;1.0\", \n        \"PPB_VideoCapture(Dev);0.3\", \n        \"PPB_View;1.0\"\n    ]\n}\n"
  },
  {
    "path": "clientapp.cc",
    "content": "#include \"stdafx.h\"\n#include \"clientapp.h\"\n\nCCefClientApp::CCefClientApp()\n{\n\tv8Handler_ = new CCEFV8HandlerEx;\n\n}\n\nCCefClientApp::~CCefClientApp()\n{\n\n}\n\n\nCefRefPtr<CefBrowserProcessHandler> CCefClientApp::GetBrowserProcessHandler()\n{\n\treturn this;\n}\n\nvoid CCefClientApp::OnBeforeCommandLineProcessing(const CefString & process_type, CefRefPtr<CefCommandLine> command_line)\n{\n\t//flash\n\tcommand_line->AppendSwitchWithValue(\"--ppapi-flash-path\", \"ppflash/18_0_0_209/pepflashplayer32_18_0_0_209.dll\");\n\t//manifest.jsonеversion\n\tcommand_line->AppendSwitchWithValue(\"--ppapi-flash-version\", \"18.0.0.209\");\n\tcommand_line->AppendSwitch(\"--disable-extensions\");\n}\n\n\nvoid CCefClientApp::OnContextInitialized()\n{\n\n}\n\n\n//CefRefPtr<CefRenderProcessHandler> CCefClientApp::GetRenderProcessHandler()\n//{\n//\treturn this;\t\n//}\n\nvoid CCefClientApp::OnWebKitInitialized()\n{\n\tstd::string app_code =\n\t\t//-----------------------------------\n\t\t//JavaScriptҪõCpp\n\t\t\"var app;\"\n\t\t\"if (!app)\"\n\t\t\"  app = {};\"\n\t\t\"(function() {\"\n\n\t\t//  jsInvokeCPlusPlus \n\t\t\"  app.jsInvokeCPlusPlus = function(v1, v2) {\"\n\t\t\"    native function jsInvokeCPlusPlus();\"\n\t\t\"    return jsInvokeCPlusPlus(v1, v2);\"\n\t\t\"  };\"\n\n\t\t\"})();\";\n\n\n\t// Register app extension module\n\n\t// JavaScriptapp.jsInvokeCPlusPlusʱͻȥͨCefRegisterExtensionעCefV8Handlerб\n\t// ҵ\"v8/app\"ӦCCEFV8HandlerEx͵Execute\n\t// v8Handler_CCefClientAppһԱ\n\t//v8Handler_ = new CCEFV8HandlerEx();\n\n\tCefRegisterExtension(\"v8/app\", app_code, v8Handler_);\n\n}\n\nvoid CCefClientApp::OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context)\n{\n\tCefRefPtr<CefV8Value> object = context->GetGlobal();// ȡwindow  \n\tCefRefPtr<CefV8Value> str = CefV8Value::CreateString(\"C++ created Value!\");\n\tobject->SetValue(\"jsValue\", str, V8_PROPERTY_ATTRIBUTE_NONE);\n\n\tCefRefPtr<CefV8Accessor> accessor = new MyV8Accessor;\n\tCefRefPtr<CefV8Value> obj = CefV8Value::CreateObject(accessor);\n\n\tobj->SetValue(\"myval\", V8_ACCESS_CONTROL_DEFAULT, V8_PROPERTY_ATTRIBUTE_NONE);\n\n\tobject->SetValue(\"myobject\", obj, V8_PROPERTY_ATTRIBUTE_NONE);\n\n}\n\n\nvoid CCefClientApp::OnContextReleased(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context)\n{\n\tv8Handler_ = nullptr;\n}\n"
  },
  {
    "path": "clientapp.h",
    "content": "#pragma once\n\n#include \"stdafx.h\"\n#include \"CEFV8HandlerEx.h\"\n\nclass CCefClientApp : public CefApp, public CefBrowserProcessHandler, CefRenderProcessHandler\n{\npublic:\n\tCCefClientApp();\n\t~CCefClientApp();\n\n\n\tvirtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() {\n\t\treturn this;\n\t}\n\n\t// CefApp methods:\n\tvirtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() override; \n\tvirtual void OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line) override;\n\t\n\t\n\t// CefBrowserProcessHandler methods:\n\tvirtual void OnContextInitialized() override;\n\t//CefRenderProcessHandler methods\n\n//\tvirtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler()  override;\n\n\tvirtual void OnWebKitInitialized() override;\n\tvirtual void OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context)  override;\n\tvirtual void OnContextReleased(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) override;\n\n\nprivate:\n\tCefRefPtr<CCEFV8HandlerEx> v8Handler_;\n\t// Include the default reference counting implementation.\n\tIMPLEMENT_REFCOUNTING(CCefClientApp);\n\nprivate:\n\n};\n\n\nclass MyV8Accessor : public CefV8Accessor {\npublic:\n\tMyV8Accessor() {}\n\n\tvirtual bool Get(const CefString& name,\n\t\tconst CefRefPtr<CefV8Value> object,\n\t\tCefRefPtr<CefV8Value>& retval,\n\t\tCefString& exception) OVERRIDE {\n\t\tif (name == \"myval\") {\n\t\t\t// Return the value.\n\t\t\tretval = CefV8Value::CreateString(myval_);\n\t\t\treturn true;\n\t\t}\n\n\t\t// Value does not exist.\n\t\treturn false;\n\t}\n\n\tvirtual bool Set(const CefString& name,const CefRefPtr<CefV8Value> object,const CefRefPtr<CefV8Value> value,CefString& exception) override {\n\t\tif (name == \"myval\") {\n\t\t\tif (value->IsString()) {\n\t\t\t\t// Store the value.\n\t\t\t\tmyval_ = value->GetStringValue();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Throw an exception.\n\t\t\t\texception = \"Invalid value type\";\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\t// Value does not exist.\n\t\treturn false;\n\t}\n\n\t// Variable used for storing the value.\n\tCefString myval_;\n\n\t// Provide the reference counting implementation for this class.\n\tIMPLEMENT_REFCOUNTING(MyV8Accessor);\n};"
  },
  {
    "path": "stdafx.cpp",
    "content": "// stdafx.cpp : ֻ׼ļԴļ\n// CEFWebkitBrowser.pch ΪԤͷ\n// stdafx.obj ԤϢ\n\n#include \"stdafx.h\"\n\n// TODO:  STDAFX.H \n// κĸͷļڴļ\n"
  },
  {
    "path": "stdafx.h",
    "content": "// stdafx.h : ׼ϵͳļİļ\n// Ǿʹõĵ\n// ضĿİļ\n//\n\n#pragma once\n\n#include \"targetver.h\"\n\n#define WIN32_LEAN_AND_MEAN             //   Windows ͷļųʹõϢ\n#define _CRT_SECURE_NO_DEPRECATE\n\n\n#include <cef_client.h>\n#include <cef_app.h>\n#include <capi/cef_app_capi.h>\n\n#include <sstream>\n#include <string>\n\n#include <base/cef_bind.h>\n#include <wrapper/cef_closure_task.h>\n#include <cef_app.h>\n#include <cef_base.h>\n#include <base/cef_lock.h>\n#include <wrapper/cef_helpers.h>\n\n\n// Windows ͷļ:\n#include <windows.h>\n#include <objbase.h>\n#include <Commdlg.h>\n// C ʱͷļ\n#include <stdlib.h>\n#include <malloc.h>\n#include <memory.h>\n#include <tchar.h>\n//\n// TODO: ڴ˴óҪͷļ\n\n\n// TODO: ڴ˴óҪͷļ\n\n#include \"DuiLib\\UIlib.h\"\n#include \"DuiLib\\Ex\\ShadowWindow.h\"\n\nusing namespace DuiLib;\n#ifdef _DEBUG\n#   ifdef _UNICODE\n#       pragma comment(lib, \"lib\\\\DuiLib_ud.lib\")\n#   else\n#      pragma comment(lib, \"lib\\\\DuiLib_d.lib\")\n#   endif\n#else\n#   ifdef _UNICODE\n#       pragma comment(lib, \"lib\\\\DuiLib_u.lib\")\n#   else\n#       pragma comment(lib, \"lib\\\\DuiLib.lib\")\n#   endif\n#endif\n\n\n#define  UM_CEF_WEBLOADSTART\t\t\tWM_USER+100\n#define  UM_CEF_WEBLOADEND\t\t\t\tWM_USER+101\n#define  UM_CEF_WEBLOADPOPUP\t\t\tWM_USER+102\n\n#define  UM_CEF_WEBTITLECHANGE\t\t\tWM_USER+104\n#define  UM_CEF_AFTERCREATED\t\t\tWM_USER+105\n#define  UM_CEF_BROWSERCLOSE\t\t\tWM_USER+106\n\n#define UM_CEF_POSTQUITMESSAGE\t\t\tWM_USER+107\n\n// TODO: ڴ˴óҪͷļ\n"
  },
  {
    "path": "targetver.h",
    "content": "#pragma once\n\n//  SDKDDKVer.h õ߰汾 Windows ƽ̨\n\n// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h\n// WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h\n\n#include <SDKDDKVer.h>\n"
  }
]