mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
// Copyright © 2010-2013 The CefSharp Project. All rights reserved.
|
|
//
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "Stdafx.h"
|
|
#include "IRenderWebBrowser.h"
|
|
#include "RenderClientAdapterInternal.h"
|
|
|
|
namespace CefSharp
|
|
{
|
|
namespace Internals
|
|
{
|
|
void RenderClientAdapterInternal::OnPopupShow(CefRefPtr<CefBrowser> browser, bool show)
|
|
{
|
|
_renderBrowserControl->SetPopupIsOpen(show);
|
|
}
|
|
|
|
void RenderClientAdapterInternal::OnPopupSize(CefRefPtr<CefBrowser> browser, const CefRect& rect)
|
|
{
|
|
_renderBrowserControl->SetPopupSizeAndPosition((void*) &rect);
|
|
}
|
|
|
|
void RenderClientAdapterInternal::OnPaint(CefRefPtr<CefBrowser> browser, PaintElementType type, const RectList& dirtyRects,
|
|
const void* buffer, int width, int height)
|
|
{
|
|
if (type == PET_VIEW)
|
|
{
|
|
_renderBrowserControl->SetBuffer(width, height, buffer);
|
|
}
|
|
else if (type == PET_POPUP)
|
|
{
|
|
_renderBrowserControl->SetPopupBuffer(width, height, buffer);
|
|
}
|
|
}
|
|
|
|
void RenderClientAdapterInternal::OnCursorChange(CefRefPtr<CefBrowser> browser, CefCursorHandle cursor)
|
|
{
|
|
_renderBrowserControl->SetCursor((IntPtr)cursor);
|
|
}
|
|
}
|
|
} |